vue-data-ui 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -232,7 +232,7 @@ endobj\r
232
232
  * http://opensource.org/licenses/mit-license
233
233
  */function oa(t,o){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!o,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function rf(t){function o(b){if(!b)throw Error("assert :P")}function a(b,T,Y){for(var $=0;4>$;$++)if(b[T+$]!=Y.charCodeAt($))return!0;return!1}function n(b,T,Y,$,S){for(var W=0;W<S;W++)b[T+W]=Y[$+W]}function r(b,T,Y,$){for(var S=0;S<$;S++)b[T+S]=Y}function l(b){return new Int32Array(b)}function s(b,T){for(var Y=[],$=0;$<b;$++)Y.push(new T);return Y}function u(b,T){var Y=[];return function $(S,W,oe){for(var te=oe[W],he=0;he<te&&(S.push(oe.length>W+1?[]:new T),!(oe.length<W+1));he++)$(S[he],W+1,oe)}(Y,0,b),Y}var h=function(){var b=this;function T(p,k){for(var L=1<<k-1>>>0;p&L;)L>>>=1;return L?(p&L-1)+L:p}function Y(p,k,L,R,ue){o(!(R%L));do p[k+(R-=L)]=ue;while(0<R)}function $(p,k,L,R,ue){if(o(2328>=ue),512>=ue)var pe=l(512);else if((pe=l(ue))==null)return 0;return function(ye,me,be,we,Ne,Ie){var $e,Le,He=me,Qe=1<<be,_e=l(16),Se=l(16);for(o(Ne!=0),o(we!=null),o(ye!=null),o(0<be),Le=0;Le<Ne;++Le){if(15<we[Le])return 0;++_e[we[Le]]}if(_e[0]==Ne)return 0;for(Se[1]=0,$e=1;15>$e;++$e){if(_e[$e]>1<<$e)return 0;Se[$e+1]=Se[$e]+_e[$e]}for(Le=0;Le<Ne;++Le)$e=we[Le],0<we[Le]&&(Ie[Se[$e]++]=Le);if(Se[15]==1)return(we=new S).g=0,we.value=Ie[0],Y(ye,He,1,Qe,we),Qe;var De,Re=-1,Pe=Qe-1,lt=0,Ze=1,gt=1,et=1<<be;for(Le=0,$e=1,Ne=2;$e<=be;++$e,Ne<<=1){if(Ze+=gt<<=1,0>(gt-=_e[$e]))return 0;for(;0<_e[$e];--_e[$e])(we=new S).g=$e,we.value=Ie[Le++],Y(ye,He+lt,Ne,et,we),lt=T(lt,$e)}for($e=be+1,Ne=2;15>=$e;++$e,Ne<<=1){if(Ze+=gt<<=1,0>(gt-=_e[$e]))return 0;for(;0<_e[$e];--_e[$e]){if(we=new S,(lt&Pe)!=Re){for(He+=et,De=1<<(Re=$e)-be;15>Re&&!(0>=(De-=_e[Re]));)++Re,De<<=1;Qe+=et=1<<(De=Re-be),ye[me+(Re=lt&Pe)].g=De+be,ye[me+Re].value=He-me-Re}we.g=$e-be,we.value=Ie[Le++],Y(ye,He+(lt>>be),Ne,et,we),lt=T(lt,$e)}}return Ze!=2*Se[15]-1?0:Qe}(p,k,L,R,ue,pe)}function S(){this.value=this.g=0}function W(){this.value=this.g=0}function oe(){this.G=s(5,S),this.H=l(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(vl,W)}function te(p,k,L,R){o(p!=null),o(k!=null),o(2147483648>R),p.Ca=254,p.I=0,p.b=-8,p.Ka=0,p.oa=k,p.pa=L,p.Jd=k,p.Yc=L+R,p.Zc=4<=R?L+R-4+1:L,ke(p)}function he(p,k){for(var L=0;0<k--;)L|=ge(p,128)<<k;return L}function le(p,k){var L=he(p,k);return ae(p)?-L:L}function H(p,k,L,R){var ue,pe=0;for(o(p!=null),o(k!=null),o(4294967288>R),p.Sb=R,p.Ra=0,p.u=0,p.h=0,4<R&&(R=4),ue=0;ue<R;++ue)pe+=k[L+ue]<<8*ue;p.Ra=pe,p.bb=R,p.oa=k,p.pa=L}function P(p){for(;8<=p.u&&p.bb<p.Sb;)p.Ra>>>=8,p.Ra+=p.oa[p.pa+p.bb]<<an-8>>>0,++p.bb,p.u-=8;x(p)&&(p.h=1,p.u=0)}function X(p,k){if(o(0<=k),!p.h&&k<=ln){var L=_(p)&on[k];return p.u+=k,P(p),L}return p.h=1,p.u=0}function q(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function m(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function _(p){return p.Ra>>>(p.u&an-1)>>>0}function x(p){return o(p.bb<=p.Sb),p.h||p.bb==p.Sb&&p.u>an}function V(p,k){p.u=k,p.h=x(p)}function J(p){p.u>=os&&(o(p.u>=os),P(p))}function ke(p){o(p!=null&&p.oa!=null),p.pa<p.Zc?(p.I=(p.oa[p.pa++]|p.I<<8)>>>0,p.b+=8):(o(p!=null&&p.oa!=null),p.pa<p.Yc?(p.b+=8,p.I=p.oa[p.pa++]|p.I<<8):p.Ka?p.b=0:(p.I<<=8,p.b+=8,p.Ka=1))}function ae(p){return he(p,1)}function ge(p,k){var L=p.Ca;0>p.b&&ke(p);var R=p.b,ue=L*k>>>8,pe=(p.I>>>R>ue)+0;for(pe?(L-=ue,p.I-=ue+1<<R>>>0):L=ue+1,R=L,ue=0;256<=R;)ue+=8,R>>=8;return R=7^ue+gl[R],p.b-=R,p.Ca=(L<<R)-1,pe}function Z(p,k,L){p[k+0]=L>>24&255,p[k+1]=L>>16&255,p[k+2]=L>>8&255,p[k+3]=L>>0&255}function ee(p,k){return p[k+0]<<0|p[k+1]<<8}function z(p,k){return ee(p,k)|p[k+2]<<16}function D(p,k){return ee(p,k)|ee(p,k+2)<<16}function fe(p,k){var L=1<<k;return o(p!=null),o(0<k),p.X=l(L),p.X==null?0:(p.Mb=32-k,p.Xa=k,1)}function M(p,k){o(p!=null),o(k!=null),o(p.Xa==k.Xa),n(k.X,0,p.X,0,1<<k.Xa)}function N(){this.X=[],this.Xa=this.Mb=0}function j(p,k,L,R){o(L!=null),o(R!=null);var ue=L[0],pe=R[0];return ue==0&&(ue=(p*pe+k/2)/k),pe==0&&(pe=(k*ue+p/2)/p),0>=ue||0>=pe?0:(L[0]=ue,R[0]=pe,1)}function O(p,k){return p+(1<<k)-1>>>k}function ce(p,k){return((4278255360&p)+(4278255360&k)>>>0&4278255360)+((16711935&p)+(16711935&k)>>>0&16711935)>>>0}function re(p,k){b[k]=function(L,R,ue,pe,ye,me,be){var we;for(we=0;we<ye;++we){var Ne=b[p](me[be+we-1],ue,pe+we);me[be+we]=ce(L[R+we],Ne)}}}function ie(){this.ud=this.hd=this.jd=0}function G(p,k){return((4278124286&(p^k))>>>1)+(p&k)>>>0}function ne(p){return 0<=p&&256>p?p:0>p?0:255<p?255:void 0}function Ae(p,k){return ne(p+(p-k+.5>>1))}function se(p,k,L){return Math.abs(k-L)-Math.abs(p-L)}function ve(p,k,L,R,ue,pe,ye){for(R=pe[ye-1],L=0;L<ue;++L)pe[ye+L]=R=ce(p[k+L],R)}function Ce(p,k,L,R,ue){var pe;for(pe=0;pe<L;++pe){var ye=p[k+pe],me=ye>>8&255,be=16711935&(be=(be=16711935&ye)+((me<<16)+me));R[ue+pe]=(4278255360&ye)+be>>>0}}function Ue(p,k){k.jd=p>>0&255,k.hd=p>>8&255,k.ud=p>>16&255}function Ve(p,k,L,R,ue,pe){var ye;for(ye=0;ye<R;++ye){var me=k[L+ye],be=me>>>8,we=me,Ne=255&(Ne=(Ne=me>>>16)+((p.jd<<24>>24)*(be<<24>>24)>>>5));we=255&(we=(we=we+((p.hd<<24>>24)*(be<<24>>24)>>>5))+((p.ud<<24>>24)*(Ne<<24>>24)>>>5)),ue[pe+ye]=(4278255360&me)+(Ne<<16)+we}}function Ye(p,k,L,R,ue){b[k]=function(pe,ye,me,be,we,Ne,Ie,$e,Le){for(be=Ie;be<$e;++be)for(Ie=0;Ie<Le;++Ie)we[Ne++]=ue(me[R(pe[ye++])])},b[p]=function(pe,ye,me,be,we,Ne,Ie){var $e=8>>pe.b,Le=pe.Ea,He=pe.K[0],Qe=pe.w;if(8>$e)for(pe=(1<<pe.b)-1,Qe=(1<<$e)-1;ye<me;++ye){var _e,Se=0;for(_e=0;_e<Le;++_e)_e&pe||(Se=R(be[we++])),Ne[Ie++]=ue(He[Se&Qe]),Se>>=$e}else b["VP8LMapColor"+L](be,we,He,Qe,Ne,Ie,ye,me,Le)}}function ze(p,k,L,R,ue){for(L=k+L;k<L;){var pe=p[k++];R[ue++]=pe>>16&255,R[ue++]=pe>>8&255,R[ue++]=pe>>0&255}}function It(p,k,L,R,ue){for(L=k+L;k<L;){var pe=p[k++];R[ue++]=pe>>16&255,R[ue++]=pe>>8&255,R[ue++]=pe>>0&255,R[ue++]=pe>>24&255}}function kt(p,k,L,R,ue){for(L=k+L;k<L;){var pe=(ye=p[k++])>>16&240|ye>>12&15,ye=ye>>0&240|ye>>28&15;R[ue++]=pe,R[ue++]=ye}}function jo(p,k,L,R,ue){for(L=k+L;k<L;){var pe=(ye=p[k++])>>16&248|ye>>13&7,ye=ye>>5&224|ye>>3&31;R[ue++]=pe,R[ue++]=ye}}function St(p,k,L,R,ue){for(L=k+L;k<L;){var pe=p[k++];R[ue++]=pe>>0&255,R[ue++]=pe>>8&255,R[ue++]=pe>>16&255}}function Dt(p,k,L,R,ue,pe){if(pe==0)for(L=k+L;k<L;)Z(R,((pe=p[k++])[0]>>24|pe[1]>>8&65280|pe[2]<<8&16711680|pe[3]<<24)>>>0),ue+=32;else n(R,ue,p,k,L)}function Al(p,k){b[k][0]=b[p+"0"],b[k][1]=b[p+"1"],b[k][2]=b[p+"2"],b[k][3]=b[p+"3"],b[k][4]=b[p+"4"],b[k][5]=b[p+"5"],b[k][6]=b[p+"6"],b[k][7]=b[p+"7"],b[k][8]=b[p+"8"],b[k][9]=b[p+"9"],b[k][10]=b[p+"10"],b[k][11]=b[p+"11"],b[k][12]=b[p+"12"],b[k][13]=b[p+"13"],b[k][14]=b[p+"0"],b[k][15]=b[p+"0"]}function Ut(p){return p==vA||p==gA||p==pi||p==pA}function xe(){this.eb=[],this.size=this.A=this.fb=0}function Oe(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function qe(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new xe,this.f.kb=new Oe,this.sd=null}function mt(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function dt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function nt(p){return alert("todo:WebPSamplerProcessPlane"),p.T}function rt(p,k){var L=p.T,R=k.ba.f.RGBA,ue=R.eb,pe=R.fb+p.ka*R.A,ye=Vl[k.ba.S],me=p.y,be=p.O,we=p.f,Ne=p.N,Ie=p.ea,$e=p.W,Le=k.cc,He=k.dc,Qe=k.Mc,_e=k.Nc,Se=p.ka,De=p.ka+p.T,Re=p.U,Pe=Re+1>>1;for(Se==0?ye(me,be,null,null,we,Ne,Ie,$e,we,Ne,Ie,$e,ue,pe,null,null,Re):(ye(k.ec,k.fc,me,be,Le,He,Qe,_e,we,Ne,Ie,$e,ue,pe-R.A,ue,pe,Re),++L);Se+2<De;Se+=2)Le=we,He=Ne,Qe=Ie,_e=$e,Ne+=p.Rc,$e+=p.Rc,pe+=2*R.A,ye(me,(be+=2*p.fa)-p.fa,me,be,Le,He,Qe,_e,we,Ne,Ie,$e,ue,pe-R.A,ue,pe,Re);return be+=p.fa,p.j+De<p.o?(n(k.ec,k.fc,me,be,Re),n(k.cc,k.dc,we,Ne,Pe),n(k.Mc,k.Nc,Ie,$e,Pe),L--):1&De||ye(me,be,null,null,we,Ne,Ie,$e,we,Ne,Ie,$e,ue,pe+R.A,null,null,Re),L}function qt(p,k,L){var R=p.F,ue=[p.J];if(R!=null){var pe=p.U,ye=k.ba.S,me=ye==gi||ye==pi;k=k.ba.f.RGBA;var be=[0],we=p.ka;be[0]=p.T,p.Kb&&(we==0?--be[0]:(--we,ue[0]-=p.width),p.j+p.ka+p.T==p.o&&(be[0]=p.o-p.j-we));var Ne=k.eb;we=k.fb+we*k.A,p=ci(R,ue[0],p.width,pe,be,Ne,we+(me?0:3),k.A),o(L==be),p&&Ut(ye)&&qa(Ne,we,me,pe,be,k.A)}return 0}function Vt(p){var k=p.ma,L=k.ba.S,R=11>L,ue=L==fi||L==vi||L==gi||L==fA||L==12||Ut(L);if(k.memory=null,k.Ib=null,k.Jb=null,k.Nd=null,!es(k.Oa,p,ue?11:12))return 0;if(ue&&Ut(L)&&je(),p.da)alert("todo:use_scaling");else{if(R){if(k.Ib=nt,p.Kb){if(L=p.U+1>>1,k.memory=l(p.U+2*L),k.memory==null)return 0;k.ec=k.memory,k.fc=0,k.cc=k.ec,k.dc=k.fc+p.U,k.Mc=k.cc,k.Nc=k.dc+L,k.Ib=rt,je()}}else alert("todo:EmitYUV");ue&&(k.Jb=qt,R&&Ee())}if(R&&!Bd){for(p=0;256>p;++p)u1[p]=89858*(p-128)+mi>>yi,d1[p]=-22014*(p-128)+mi,c1[p]=-45773*(p-128),A1[p]=113618*(p-128)+mi>>yi;for(p=is;p<bA;++p)k=76283*(p-16)+mi>>yi,h1[p-is]=Bl(k,255),f1[p-is]=Bl(k+8>>4,15);Bd=1}return 1}function Xo(p){var k=p.ma,L=p.U,R=p.T;return o(!(1&p.ka)),0>=L||0>=R?0:(L=k.Ib(p,k),k.Jb!=null&&k.Jb(p,k,L),k.Dc+=L,1)}function go(p){p.ma.memory=null}function ut(p,k,L,R){return X(p,8)!=47?0:(k[0]=X(p,14)+1,L[0]=X(p,14)+1,R[0]=X(p,1),X(p,3)!=0?0:!p.h)}function Ht(p,k){if(4>p)return p+1;var L=p-2>>1;return(2+(1&p)<<L)+X(k,L)+1}function el(p,k){return 120<k?k-120:1<=(L=((L=Xg[k-1])>>4)*p+(8-(15&L)))?L:1;var L}function $o(p,k,L){var R=_(L),ue=p[k+=255&R].g-8;return 0<ue&&(V(L,L.u+8),R=_(L),k+=p[k].value,k+=R&(1<<ue)-1),V(L,L.u+p[k].g),p[k].value}function ho(p,k,L){return L.g+=p.g,L.value+=p.value<<k>>>0,o(8>=L.g),p.g}function mo(p,k,L){var R=p.xc;return o((k=R==0?0:p.vc[p.md*(L>>R)+(k>>R)])<p.Wb),p.Ya[k]}function wl(p,k,L,R){var ue=p.ab,pe=p.c*k,ye=p.C;k=ye+k;var me=L,be=R;for(R=p.Ta,L=p.Ua;0<ue--;){var we=p.gc[ue],Ne=ye,Ie=k,$e=me,Le=be,He=(be=R,me=L,we.Ea);switch(o(Ne<Ie),o(Ie<=we.nc),we.hc){case 2:Ai($e,Le,(Ie-Ne)*He,be,me);break;case 0:var Qe=Ne,_e=Ie,Se=be,De=me,Re=(et=we).Ea;Qe==0&&(AA($e,Le,null,null,1,Se,De),ve($e,Le+1,0,0,Re-1,Se,De+1),Le+=Re,De+=Re,++Qe);for(var Pe=1<<et.b,lt=Pe-1,Ze=O(Re,et.b),gt=et.K,et=et.w+(Qe>>et.b)*Ze;Qe<_e;){var Rt=gt,Yt=et,Ot=1;for(ls($e,Le,Se,De-Re,1,Se,De);Ot<Re;){var $t=(Ot&~lt)+Pe;$t>Re&&($t=Re),(0,Wa[Rt[Yt++]>>8&15])($e,Le+ +Ot,Se,De+Ot-Re,$t-Ot,Se,De+Ot),Ot=$t}Le+=Re,De+=Re,++Qe&lt||(et+=Ze)}Ie!=we.nc&&n(be,me-He,be,me+(Ie-Ne-1)*He,He);break;case 1:for(He=$e,_e=Le,Re=($e=we.Ea)-(De=$e&~(Se=(Le=1<<we.b)-1)),Qe=O($e,we.b),Pe=we.K,we=we.w+(Ne>>we.b)*Qe;Ne<Ie;){for(lt=Pe,Ze=we,gt=new ie,et=_e+De,Rt=_e+$e;_e<et;)Ue(lt[Ze++],gt),$l(gt,He,_e,Le,be,me),_e+=Le,me+=Le;_e<Rt&&(Ue(lt[Ze++],gt),$l(gt,He,_e,Re,be,me),_e+=Re,me+=Re),++Ne&Se||(we+=Qe)}break;case 3:if($e==be&&Le==me&&0<we.b){for(_e=be,$e=He=me+(Ie-Ne)*He-(De=(Ie-Ne)*O(we.Ea,we.b)),Le=be,Se=me,Qe=[],De=(Re=De)-1;0<=De;--De)Qe[De]=Le[Se+De];for(De=Re-1;0<=De;--De)_e[$e+De]=Qe[De];Xl(we,Ne,Ie,be,He,be,me)}else Xl(we,Ne,Ie,$e,Le,be,me)}me=R,be=L}be!=L&&n(R,L,me,be,pe)}function Or(p,k){var L=p.V,R=p.Ba+p.c*p.C,ue=k-p.C;if(o(k<=p.l.o),o(16>=ue),0<ue){var pe=p.l,ye=p.Ta,me=p.Ua,be=pe.width;if(wl(p,ue,L,R),ue=me=[me],o((L=p.C)<(R=k)),o(pe.v<pe.va),R>pe.o&&(R=pe.o),L<pe.j){var we=pe.j-L;L=pe.j,ue[0]+=we*be}if(L>=R?L=0:(ue[0]+=4*pe.v,pe.ka=L-pe.j,pe.U=pe.va-pe.v,pe.T=R-L,L=1),L){if(me=me[0],11>(L=p.ca).S){var Ne=L.f.RGBA,Ie=(R=L.S,ue=pe.U,pe=pe.T,we=Ne.eb,Ne.A),$e=pe;for(Ne=Ne.fb+p.Ma*Ne.A;0<$e--;){var Le=ye,He=me,Qe=ue,_e=we,Se=Ne;switch(R){case hi:ql(Le,He,Qe,_e,Se);break;case fi:Ka(Le,He,Qe,_e,Se);break;case vA:Ka(Le,He,Qe,_e,Se),qa(_e,Se,0,Qe,1,0);break;case fd:rn(Le,He,Qe,_e,Se);break;case vi:Dt(Le,He,Qe,_e,Se,1);break;case gA:Dt(Le,He,Qe,_e,Se,1),qa(_e,Se,0,Qe,1,0);break;case gi:Dt(Le,He,Qe,_e,Se,0);break;case pi:Dt(Le,He,Qe,_e,Se,0),qa(_e,Se,1,Qe,1,0);break;case fA:fa(Le,He,Qe,_e,Se);break;case pA:fa(Le,He,Qe,_e,Se),un(_e,Se,Qe,1,0);break;case vd:_a(Le,He,Qe,_e,Se);break;default:o(0)}me+=be,Ne+=Ie}p.Ma+=pe}else alert("todo:EmitRescaledRowsYUVA");o(p.Ma<=L.height)}}p.C=k,o(p.C<=p.i)}function Ba(p){var k;if(0<p.ua)return 0;for(k=0;k<p.Wb;++k){var L=p.Ya[k].G,R=p.Ya[k].H;if(0<L[1][R[1]+0].g||0<L[2][R[2]+0].g||0<L[3][R[3]+0].g)return 0}return 1}function Hl(p,k,L,R,ue,pe){if(p.Z!=0){var ye=p.qd,me=p.rd;for(o(Ja[p.Z]!=null);k<L;++k)Ja[p.Z](ye,me,R,ue,R,ue,pe),ye=R,me=ue,ue+=pe;p.qd=ye,p.rd=me}}function Rl(p,k){var L=p.l.ma,R=L.Z==0||L.Z==1?p.l.j:p.C;if(R=p.C<R?R:p.C,o(k<=p.l.o),k>R){var ue=p.l.width,pe=L.ca,ye=L.tb+ue*R,me=p.V,be=p.Ba+p.c*R,we=p.gc;o(p.ab==1),o(we[0].hc==3),cA(we[0],R,k,me,be,pe,ye),Hl(L,R,k,pe,ye,ue)}p.C=p.Ma=k}function Gl(p,k,L,R,ue,pe,ye){var me=p.$/R,be=p.$%R,we=p.m,Ne=p.s,Ie=L+p.$,$e=Ie;ue=L+R*ue;var Le=L+R*pe,He=280+Ne.ua,Qe=p.Pb?me:16777216,_e=0<Ne.ua?Ne.Wa:null,Se=Ne.wc,De=Ie<Le?mo(Ne,be,me):null;o(p.C<pe),o(Le<=ue);var Re=!1;e:for(;;){for(;Re||Ie<Le;){var Pe=0;if(me>=Qe){var lt=Ie-L;o((Qe=p).Pb),Qe.wd=Qe.m,Qe.xd=lt,0<Qe.s.ua&&M(Qe.s.Wa,Qe.s.vb),Qe=me+Yg}if(be&Se||(De=mo(Ne,be,me)),o(De!=null),De.Qb&&(k[Ie]=De.qb,Re=!0),!Re)if(J(we),De.jc){Pe=we,lt=k;var Ze=Ie,gt=De.pd[_(Pe)&vl-1];o(De.jc),256>gt.g?(V(Pe,Pe.u+gt.g),lt[Ze]=gt.value,Pe=0):(V(Pe,Pe.u+gt.g-256),o(256<=gt.value),Pe=gt.value),Pe==0&&(Re=!0)}else Pe=$o(De.G[0],De.H[0],we);if(we.h)break;if(Re||256>Pe){if(!Re)if(De.nd)k[Ie]=(De.qb|Pe<<8)>>>0;else{if(J(we),Re=$o(De.G[1],De.H[1],we),J(we),lt=$o(De.G[2],De.H[2],we),Ze=$o(De.G[3],De.H[3],we),we.h)break;k[Ie]=(Ze<<24|Re<<16|Pe<<8|lt)>>>0}if(Re=!1,++Ie,++be>=R&&(be=0,++me,ye!=null&&me<=pe&&!(me%16)&&ye(p,me),_e!=null))for(;$e<Ie;)Pe=k[$e++],_e.X[(506832829*Pe&4294967295)>>>_e.Mb]=Pe}else if(280>Pe){if(Pe=Ht(Pe-256,we),lt=$o(De.G[4],De.H[4],we),J(we),lt=el(R,lt=Ht(lt,we)),we.h)break;if(Ie-L<lt||ue-Ie<Pe)break e;for(Ze=0;Ze<Pe;++Ze)k[Ie+Ze]=k[Ie+Ze-lt];for(Ie+=Pe,be+=Pe;be>=R;)be-=R,++me,ye!=null&&me<=pe&&!(me%16)&&ye(p,me);if(o(Ie<=ue),be&Se&&(De=mo(Ne,be,me)),_e!=null)for(;$e<Ie;)Pe=k[$e++],_e.X[(506832829*Pe&4294967295)>>>_e.Mb]=Pe}else{if(!(Pe<He))break e;for(Re=Pe-280,o(_e!=null);$e<Ie;)Pe=k[$e++],_e.X[(506832829*Pe&4294967295)>>>_e.Mb]=Pe;Pe=Ie,o(!(Re>>>(lt=_e).Xa)),k[Pe]=lt.X[Re],Re=!0}Re||o(we.h==x(we))}if(p.Pb&&we.h&&Ie<ue)o(p.m.h),p.a=5,p.m=p.wd,p.$=p.xd,0<p.s.ua&&M(p.s.vb,p.s.Wa);else{if(we.h)break e;ye!=null&&ye(p,me>pe?pe:me),p.a=0,p.$=Ie-L}return 1}return p.a=3,0}function ca(p){o(p!=null),p.vc=null,p.yc=null,p.Ya=null;var k=p.Wa;k!=null&&(k.X=null),p.vb=null,o(p!=null)}function Il(){var p=new uA;return p==null?null:(p.a=0,p.xb=yd,Al("Predictor","VP8LPredictors"),Al("Predictor","VP8LPredictors_C"),Al("PredictorAdd","VP8LPredictorsAdd"),Al("PredictorAdd","VP8LPredictorsAdd_C"),Ai=Ce,$l=Ve,ql=ze,Ka=It,fa=kt,_a=jo,rn=St,b.VP8LMapColor32b=as,b.VP8LMapColor8b=dA,p)}function da(p,k,L,R,ue){var pe=1,ye=[p],me=[k],be=R.m,we=R.s,Ne=null,Ie=0;e:for(;;){if(L)for(;pe&&X(be,1);){var $e=ye,Le=me,He=R,Qe=1,_e=He.m,Se=He.gc[He.ab],De=X(_e,2);if(He.Oc&1<<De)pe=0;else{switch(He.Oc|=1<<De,Se.hc=De,Se.Ea=$e[0],Se.nc=Le[0],Se.K=[null],++He.ab,o(4>=He.ab),De){case 0:case 1:Se.b=X(_e,3)+2,Qe=da(O(Se.Ea,Se.b),O(Se.nc,Se.b),0,He,Se.K),Se.K=Se.K[0];break;case 3:var Re,Pe=X(_e,8)+1,lt=16<Pe?0:4<Pe?1:2<Pe?2:3;if($e[0]=O(Se.Ea,lt),Se.b=lt,Re=Qe=da(Pe,1,0,He,Se.K)){var Ze,gt=Pe,et=Se,Rt=1<<(8>>et.b),Yt=l(Rt);if(Yt==null)Re=0;else{var Ot=et.K[0],$t=et.w;for(Yt[0]=et.K[0][0],Ze=1;Ze<1*gt;++Ze)Yt[Ze]=ce(Ot[$t+Ze],Yt[Ze-1]);for(;Ze<4*Rt;++Ze)Yt[Ze]=0;et.K[0]=null,et.K[0]=Yt,Re=1}}Qe=Re;break;case 2:break;default:o(0)}pe=Qe}}if(ye=ye[0],me=me[0],pe&&X(be,1)&&!(pe=1<=(Ie=X(be,4))&&11>=Ie)){R.a=3;break e}var ao;if(ao=pe)t:{var to,Ft,Uo,pl=R,Vo=ye,yl=me,Jt=Ie,Fl=L,Nl=pl.m,Ho=pl.s,qo=[null],cl=1,Ql=0,va=qg[Jt];o:for(;;){if(Fl&&X(Nl,1)){var Ro=X(Nl,3)+2,$a=O(Vo,Ro),Fr=O(yl,Ro),An=$a*Fr;if(!da($a,Fr,0,pl,qo))break o;for(qo=qo[0],Ho.xc=Ro,to=0;to<An;++to){var Za=qo[to]>>8&65535;qo[to]=Za,Za>=cl&&(cl=Za+1)}}if(Nl.h)break o;for(Ft=0;5>Ft;++Ft){var ko=gd[Ft];!Ft&&0<Jt&&(ko+=1<<Jt),Ql<ko&&(Ql=ko)}var kA=s(cl*va,S),Nd=cl,_d=s(Nd,oe);if(_d==null)var ki=null;else o(65536>=Nd),ki=_d;var us=l(Ql);if(ki==null||us==null||kA==null){pl.a=1;break o}var Ci=kA;for(to=Uo=0;to<cl;++to){var ea=ki[to],cn=ea.G,dn=ea.H,Sd=0,wi=1,Ld=0;for(Ft=0;5>Ft;++Ft){ko=gd[Ft],cn[Ft]=Ci,dn[Ft]=Uo,!Ft&&0<Jt&&(ko+=1<<Jt);a:{var Bi,CA=ko,xi=pl,As=us,p1=Ci,y1=Uo,wA=0,er=xi.m,m1=X(er,1);if(r(As,0,0,CA),m1){var b1=X(er,1)+1,k1=X(er,1),Ed=X(er,k1==0?1:8);As[Ed]=1,b1==2&&(As[Ed=X(er,8)]=1);var Fi=1}else{var Id=l(19),$d=X(er,4)+4;if(19<$d){xi.a=3;var Ni=0;break a}for(Bi=0;Bi<$d;++Bi)Id[jg[Bi]]=X(er,3);var BA=void 0,cs=void 0,Md=xi,C1=Id,_i=CA,Ud=As,xA=0,tr=Md.m,Vd=8,Qd=s(128,S);l:for(;$(Qd,0,7,C1,19);){if(X(tr,1)){var w1=2+2*X(tr,3);if((BA=2+X(tr,w1))>_i)break l}else BA=_i;for(cs=0;cs<_i&&BA--;){J(tr);var Td=Qd[0+(127&_(tr))];V(tr,tr.u+Td.g);var hn=Td.value;if(16>hn)Ud[cs++]=hn,hn!=0&&(Vd=hn);else{var B1=hn==16,Od=hn-16,x1=Wg[Od],zd=X(tr,Gg[Od])+x1;if(cs+zd>_i)break l;for(var F1=B1?Vd:0;0<zd--;)Ud[cs++]=F1}}xA=1;break l}xA||(Md.a=3),Fi=xA}(Fi=Fi&&!er.h)&&(wA=$(p1,y1,8,As,CA)),Fi&&wA!=0?Ni=wA:(xi.a=3,Ni=0)}if(Ni==0)break o;if(wi&&Kg[Ft]==1&&(wi=Ci[Uo].g==0),Sd+=Ci[Uo].g,Uo+=Ni,3>=Ft){var ds,FA=us[0];for(ds=1;ds<ko;++ds)us[ds]>FA&&(FA=us[ds]);Ld+=FA}}if(ea.nd=wi,ea.Qb=0,wi&&(ea.qb=(cn[3][dn[3]+0].value<<24|cn[1][dn[1]+0].value<<16|cn[2][dn[2]+0].value)>>>0,Sd==0&&256>cn[0][dn[0]+0].value&&(ea.Qb=1,ea.qb+=cn[0][dn[0]+0].value<<8)),ea.jc=!ea.Qb&&6>Ld,ea.jc){var Si,Ma=ea;for(Si=0;Si<vl;++Si){var or=Si,lr=Ma.pd[or],Li=Ma.G[0][Ma.H[0]+or];256<=Li.value?(lr.g=Li.g+256,lr.value=Li.value):(lr.g=0,lr.value=0,or>>=ho(Li,8,lr),or>>=ho(Ma.G[1][Ma.H[1]+or],16,lr),or>>=ho(Ma.G[2][Ma.H[2]+or],0,lr),ho(Ma.G[3][Ma.H[3]+or],24,lr))}}}Ho.vc=qo,Ho.Wb=cl,Ho.Ya=ki,Ho.yc=kA,ao=1;break t}ao=0}if(!(pe=ao)){R.a=3;break e}if(0<Ie){if(we.ua=1<<Ie,!fe(we.Wa,Ie)){R.a=1,pe=0;break e}}else we.ua=0;var NA=R,Dd=ye,N1=me,_A=NA.s,SA=_A.xc;if(NA.c=Dd,NA.i=N1,_A.md=O(Dd,SA),_A.wc=SA==0?-1:(1<<SA)-1,L){R.xb=a1;break e}if((Ne=l(ye*me))==null){R.a=1,pe=0;break e}pe=(pe=Gl(R,Ne,0,ye,me,me,null))&&!be.h;break e}return pe?(ue!=null?ue[0]=Ne:(o(Ne==null),o(L)),R.$=0,L||ca(we)):ca(we),pe}function mr(p,k){var L=p.c*p.i,R=L+k+16*k;return o(p.c<=k),p.V=l(R),p.V==null?(p.Ta=null,p.Ua=0,p.a=1,0):(p.Ta=p.V,p.Ua=p.Ba+L+k,1)}function zr(p,k){var L=p.C,R=k-L,ue=p.V,pe=p.Ba+p.c*L;for(o(k<=p.l.o);0<R;){var ye=16<R?16:R,me=p.l.ma,be=p.l.width,we=be*ye,Ne=me.ca,Ie=me.tb+be*L,$e=p.Ta,Le=p.Ua;wl(p,ye,ue,pe),id($e,Le,Ne,Ie,we),Hl(me,L,L+ye,Ne,Ie,be),R-=ye,ue+=ye*p.c,L+=ye}o(L==k),p.C=p.Ma=k}function Dr(){this.ub=this.yd=this.td=this.Rb=0}function Pr(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Hr(){this.Fb=this.Bb=this.Cb=0,this.Zb=l(4),this.Lb=l(4)}function Rs(){this.Yb=function(){var p=[];return function k(L,R,ue){for(var pe=ue[R],ye=0;ye<pe&&(L.push(ue.length>R+1?[]:0),!(ue.length<R+1));ye++)k(L[ye],R+1,ue)}(p,0,[3,11]),p}()}function zu(){this.jb=l(3),this.Wc=u([4,8],Rs),this.Xc=u([4,17],Rs)}function Du(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new l(4),this.od=new l(4)}function Rr(){this.ld=this.La=this.dd=this.tc=0}function Gs(){this.Na=this.la=0}function Pu(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Tn(){this.ad=l(384),this.Za=0,this.Ob=l(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Hu(){this.uc=this.M=this.Nb=0,this.wa=Array(new Rr),this.Y=0,this.ya=Array(new Tn),this.aa=0,this.l=new Gr}function Ws(){this.y=l(16),this.f=l(8),this.ea=l(8)}function Ru(){this.cb=this.a=0,this.sc="",this.m=new q,this.Od=new Dr,this.Kc=new Pr,this.ed=new Du,this.Qa=new Hr,this.Ic=this.$c=this.Aa=0,this.D=new Hu,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,q),this.ia=0,this.pb=s(4,Pu),this.Pa=new zu,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ws),this.Hd=0,this.rb=Array(new Gs),this.sb=0,this.wa=Array(new Rr),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Tn),this.L=this.aa=0,this.gd=u([4,2],Rr),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Gr(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Gu(){var p=new Ru;return p!=null&&(p.a=0,p.sc="OK",p.cb=0,p.Xb=0,ss||(ss=Xs)),p}function Fo(p,k,L){return p.a==0&&(p.a=k,p.sc=L,p.cb=0),0}function Ks(p,k,L){return 3<=L&&p[k+0]==157&&p[k+1]==1&&p[k+2]==42}function js(p,k){if(p==null)return 0;if(p.a=0,p.sc="OK",k==null)return Fo(p,2,"null VP8Io passed to VP8GetHeaders()");var L=k.data,R=k.w,ue=k.ha;if(4>ue)return Fo(p,7,"Truncated header.");var pe=L[R+0]|L[R+1]<<8|L[R+2]<<16,ye=p.Od;if(ye.Rb=!(1&pe),ye.td=pe>>1&7,ye.yd=pe>>4&1,ye.ub=pe>>5,3<ye.td)return Fo(p,3,"Incorrect keyframe parameters.");if(!ye.yd)return Fo(p,4,"Frame not displayable.");R+=3,ue-=3;var me=p.Kc;if(ye.Rb){if(7>ue)return Fo(p,7,"cannot parse picture header");if(!Ks(L,R,ue))return Fo(p,3,"Bad code word");me.c=16383&(L[R+4]<<8|L[R+3]),me.Td=L[R+4]>>6,me.i=16383&(L[R+6]<<8|L[R+5]),me.Ud=L[R+6]>>6,R+=7,ue-=7,p.za=me.c+15>>4,p.Ub=me.i+15>>4,k.width=me.c,k.height=me.i,k.Da=0,k.j=0,k.v=0,k.va=k.width,k.o=k.height,k.da=0,k.ib=k.width,k.hb=k.height,k.U=k.width,k.T=k.height,r((pe=p.Pa).jb,0,255,pe.jb.length),o((pe=p.Qa)!=null),pe.Cb=0,pe.Bb=0,pe.Fb=1,r(pe.Zb,0,0,pe.Zb.length),r(pe.Lb,0,0,pe.Lb)}if(ye.ub>ue)return Fo(p,7,"bad partition length");te(pe=p.m,L,R,ye.ub),R+=ye.ub,ue-=ye.ub,ye.Rb&&(me.Ld=ae(pe),me.Kd=ae(pe)),me=p.Qa;var be,we=p.Pa;if(o(pe!=null),o(me!=null),me.Cb=ae(pe),me.Cb){if(me.Bb=ae(pe),ae(pe)){for(me.Fb=ae(pe),be=0;4>be;++be)me.Zb[be]=ae(pe)?le(pe,7):0;for(be=0;4>be;++be)me.Lb[be]=ae(pe)?le(pe,6):0}if(me.Bb)for(be=0;3>be;++be)we.jb[be]=ae(pe)?he(pe,8):255}else me.Bb=0;if(pe.Ka)return Fo(p,3,"cannot parse segment header");if((me=p.ed).zd=ae(pe),me.Tb=he(pe,6),me.wb=he(pe,3),me.Pc=ae(pe),me.Pc&&ae(pe)){for(we=0;4>we;++we)ae(pe)&&(me.vd[we]=le(pe,6));for(we=0;4>we;++we)ae(pe)&&(me.od[we]=le(pe,6))}if(p.L=me.Tb==0?0:me.zd?1:2,pe.Ka)return Fo(p,3,"cannot parse filter header");var Ne=ue;if(ue=be=R,R=be+Ne,me=Ne,p.Xb=(1<<he(p.m,2))-1,Ne<3*(we=p.Xb))L=7;else{for(be+=3*we,me-=3*we,Ne=0;Ne<we;++Ne){var Ie=L[ue+0]|L[ue+1]<<8|L[ue+2]<<16;Ie>me&&(Ie=me),te(p.Jc[+Ne],L,be,Ie),be+=Ie,me-=Ie,ue+=3}te(p.Jc[+we],L,be,me),L=be<R?0:5}if(L!=0)return Fo(p,L,"cannot parse partitions");for(L=he(be=p.m,7),ue=ae(be)?le(be,4):0,R=ae(be)?le(be,4):0,me=ae(be)?le(be,4):0,we=ae(be)?le(be,4):0,be=ae(be)?le(be,4):0,Ne=p.Qa,Ie=0;4>Ie;++Ie){if(Ne.Cb){var $e=Ne.Zb[Ie];Ne.Fb||($e+=L)}else{if(0<Ie){p.pb[Ie]=p.pb[0];continue}$e=L}var Le=p.pb[Ie];Le.Sc[0]=yA[Bl($e+ue,127)],Le.Sc[1]=mA[Bl($e+0,127)],Le.Eb[0]=2*yA[Bl($e+R,127)],Le.Eb[1]=101581*mA[Bl($e+me,127)]>>16,8>Le.Eb[1]&&(Le.Eb[1]=8),Le.Qc[0]=yA[Bl($e+we,117)],Le.Qc[1]=mA[Bl($e+be,127)],Le.lc=$e+be}if(!ye.Rb)return Fo(p,4,"Not a key frame.");for(ae(pe),ye=p.Pa,L=0;4>L;++L){for(ue=0;8>ue;++ue)for(R=0;3>R;++R)for(me=0;11>me;++me)we=ge(pe,o1[L][ue][R][me])?he(pe,8):e1[L][ue][R][me],ye.Wc[L][ue].Yb[R][me]=we;for(ue=0;17>ue;++ue)ye.Xc[L][ue]=ye.Wc[L][l1[ue]]}return p.kc=ae(pe),p.kc&&(p.Bd=he(pe,8)),p.cb=1}function Xs(p,k,L,R,ue,pe,ye){var me=k[ue].Yb[L];for(L=0;16>ue;++ue){if(!ge(p,me[L+0]))return ue;for(;!ge(p,me[L+1]);)if(me=k[++ue].Yb[0],L=0,ue==16)return 16;var be=k[ue+1].Yb;if(ge(p,me[L+2])){var we=p,Ne=0;if(ge(we,($e=me)[(Ie=L)+3]))if(ge(we,$e[Ie+6])){for(me=0,Ie=2*(Ne=ge(we,$e[Ie+8]))+($e=ge(we,$e[Ie+9+Ne])),Ne=0,$e=Jg[Ie];$e[me];++me)Ne+=Ne+ge(we,$e[me]);Ne+=3+(8<<Ie)}else ge(we,$e[Ie+7])?(Ne=7+2*ge(we,165),Ne+=ge(we,145)):Ne=5+ge(we,159);else Ne=ge(we,$e[Ie+4])?3+ge(we,$e[Ie+5]):2;me=be[2]}else Ne=1,me=be[1];be=ye+Zg[ue],0>(we=p).b&&ke(we);var Ie,$e=we.b,Le=(Ie=we.Ca>>1)-(we.I>>$e)>>31;--we.b,we.Ca+=Le,we.Ca|=1,we.I-=(Ie+1&Le)<<$e,pe[be]=((Ne^Le)-Le)*R[(0<ue)+0]}return 16}function On(p){var k=p.rb[p.sb-1];k.la=0,k.Na=0,r(p.zc,0,0,p.zc.length),p.ja=0}function Wu(p,k){if(p==null)return 0;if(k==null)return Fo(p,2,"NULL VP8Io parameter in VP8Decode().");if(!p.cb&&!js(p,k))return 0;if(o(p.cb),k.ac==null||k.ac(k)){k.ob&&(p.L=0);var L=bi[p.L];if(p.L==2?(p.yb=0,p.zb=0):(p.yb=k.v-L>>4,p.zb=k.j-L>>4,0>p.yb&&(p.yb=0),0>p.zb&&(p.zb=0)),p.Va=k.o+15+L>>4,p.Hb=k.va+15+L>>4,p.Hb>p.za&&(p.Hb=p.za),p.Va>p.Ub&&(p.Va=p.Ub),0<p.L){var R=p.ed;for(L=0;4>L;++L){var ue;if(p.Qa.Cb){var pe=p.Qa.Lb[L];p.Qa.Fb||(pe+=R.Tb)}else pe=R.Tb;for(ue=0;1>=ue;++ue){var ye=p.gd[L][ue],me=pe;if(R.Pc&&(me+=R.vd[0],ue&&(me+=R.od[0])),0<(me=0>me?0:63<me?63:me)){var be=me;0<R.wb&&(be=4<R.wb?be>>2:be>>1)>9-R.wb&&(be=9-R.wb),1>be&&(be=1),ye.dd=be,ye.tc=2*me+be,ye.ld=40<=me?2:15<=me?1:0}else ye.tc=0;ye.La=ue}}}L=0}else Fo(p,6,"Frame setup failed"),L=p.a;if(L=L==0){if(L){p.$c=0,0<p.Aa||(p.Ic=g1);e:{L=p.Ic,R=4*(be=p.za);var we=32*be,Ne=be+1,Ie=0<p.L?be*(0<p.Aa?2:1):0,$e=(p.Aa==2?2:1)*be;if((ye=R+832+(ue=3*(16*L+bi[p.L])/2*we)+(pe=p.Fa!=null&&0<p.Fa.length?p.Kc.c*p.Kc.i:0))!=ye)L=0;else{if(ye>p.Vb){if(p.Vb=0,p.Ec=l(ye),p.Fc=0,p.Ec==null){L=Fo(p,1,"no memory during frame initialization.");break e}p.Vb=ye}ye=p.Ec,me=p.Fc,p.Ac=ye,p.Bc=me,me+=R,p.Gd=s(we,Ws),p.Hd=0,p.rb=s(Ne+1,Gs),p.sb=1,p.wa=Ie?s(Ie,Rr):null,p.Y=0,p.D.Nb=0,p.D.wa=p.wa,p.D.Y=p.Y,0<p.Aa&&(p.D.Y+=be),o(!0),p.oc=ye,p.pc=me,me+=832,p.ya=s($e,Tn),p.aa=0,p.D.ya=p.ya,p.D.aa=p.aa,p.Aa==2&&(p.D.aa+=be),p.R=16*be,p.B=8*be,be=(we=bi[p.L])*p.R,we=we/2*p.B,p.sa=ye,p.ta=me+be,p.qa=p.sa,p.ra=p.ta+16*L*p.R+we,p.Ha=p.qa,p.Ia=p.ra+8*L*p.B+we,p.$c=0,me+=ue,p.mb=pe?ye:null,p.nb=pe?me:null,o(me+pe<=p.Fc+p.Vb),On(p),r(p.Ac,p.Bc,0,R),L=1}}if(L){if(k.ka=0,k.y=p.sa,k.O=p.ta,k.f=p.qa,k.N=p.ra,k.ea=p.Ha,k.Vd=p.Ia,k.fa=p.R,k.Rc=p.B,k.F=null,k.J=0,!hd){for(L=-255;255>=L;++L)ud[255+L]=0>L?-L:L;for(L=-1020;1020>=L;++L)Ad[1020+L]=-128>L?-128:127<L?127:L;for(L=-112;112>=L;++L)cd[112+L]=-16>L?-16:15<L?15:L;for(L=-255;510>=L;++L)dd[255+L]=0>L?0:255<L?255:L;hd=1}Yl=Xu,nn=Ku,ja=Ys,Jl=ju,Sa=Js,rs=qs,Br=Gn,sn=Cr,xr=iA,Xa=Wn,ns=sA,Ml=Yr,La=Kn,io=si,uo=ni,No=Fa,zo=Ha,Ea=nA,Zl[0]=ha,Zl[1]=qu,Zl[2]=eA,Zl[3]=tA,Zl[4]=ti,Zl[5]=Xr,Zl[6]=oi,Zl[7]=Pn,Zl[8]=lA,Zl[9]=oA,Ya[0]=Zs,Ya[1]=Ju,Ya[2]=xa,Ya[3]=Kr,Ya[4]=tl,Ya[5]=Zu,Ya[6]=ei,Ia[0]=Pa,Ia[1]=Yu,Ia[2]=aA,Ia[3]=Hn,Ia[4]=kr,Ia[5]=rA,Ia[6]=Rn,L=1}else L=0}L&&(L=function(Le,He){for(Le.M=0;Le.M<Le.Va;++Le.M){var Qe,_e=Le.Jc[Le.M&Le.Xb],Se=Le.m,De=Le;for(Qe=0;Qe<De.za;++Qe){var Re=Se,Pe=De,lt=Pe.Ac,Ze=Pe.Bc+4*Qe,gt=Pe.zc,et=Pe.ya[Pe.aa+Qe];if(Pe.Qa.Bb?et.$b=ge(Re,Pe.Pa.jb[0])?2+ge(Re,Pe.Pa.jb[2]):ge(Re,Pe.Pa.jb[1]):et.$b=0,Pe.kc&&(et.Ad=ge(Re,Pe.Bd)),et.Za=!ge(Re,145)+0,et.Za){var Rt=et.Ob,Yt=0;for(Pe=0;4>Pe;++Pe){var Ot,$t=gt[0+Pe];for(Ot=0;4>Ot;++Ot){$t=t1[lt[Ze+Ot]][$t];for(var ao=pd[ge(Re,$t[0])];0<ao;)ao=pd[2*ao+ge(Re,$t[ao])];$t=-ao,lt[Ze+Ot]=$t}n(Rt,Yt,lt,Ze,4),Yt+=4,gt[0+Pe]=$t}}else $t=ge(Re,156)?ge(Re,128)?1:3:ge(Re,163)?2:0,et.Ob[0]=$t,r(lt,Ze,$t,4),r(gt,0,$t,4);et.Dd=ge(Re,142)?ge(Re,114)?ge(Re,183)?1:3:2:0}if(De.m.Ka)return Fo(Le,7,"Premature end-of-partition0 encountered.");for(;Le.ja<Le.za;++Le.ja){if(De=_e,Re=(Se=Le).rb[Se.sb-1],lt=Se.rb[Se.sb+Se.ja],Qe=Se.ya[Se.aa+Se.ja],Ze=Se.kc?Qe.Ad:0)Re.la=lt.la=0,Qe.Za||(Re.Na=lt.Na=0),Qe.Hc=0,Qe.Gc=0,Qe.ia=0;else{var to,Ft;if(Re=lt,lt=De,Ze=Se.Pa.Xc,gt=Se.ya[Se.aa+Se.ja],et=Se.pb[gt.$b],Pe=gt.ad,Rt=0,Yt=Se.rb[Se.sb-1],$t=Ot=0,r(Pe,Rt,0,384),gt.Za)var Uo=0,pl=Ze[3];else{ao=l(16);var Vo=Re.Na+Yt.Na;if(Vo=ss(lt,Ze[1],Vo,et.Eb,0,ao,0),Re.Na=Yt.Na=(0<Vo)+0,1<Vo)Yl(ao,0,Pe,Rt);else{var yl=ao[0]+3>>3;for(ao=0;256>ao;ao+=16)Pe[Rt+ao]=yl}Uo=1,pl=Ze[0]}var Jt=15&Re.la,Fl=15&Yt.la;for(ao=0;4>ao;++ao){var Nl=1&Fl;for(yl=Ft=0;4>yl;++yl)Jt=Jt>>1|(Nl=(Vo=ss(lt,pl,Vo=Nl+(1&Jt),et.Sc,Uo,Pe,Rt))>Uo)<<7,Ft=Ft<<2|(3<Vo?3:1<Vo?2:Pe[Rt+0]!=0),Rt+=16;Jt>>=4,Fl=Fl>>1|Nl<<7,Ot=(Ot<<8|Ft)>>>0}for(pl=Jt,Uo=Fl>>4,to=0;4>to;to+=2){for(Ft=0,Jt=Re.la>>4+to,Fl=Yt.la>>4+to,ao=0;2>ao;++ao){for(Nl=1&Fl,yl=0;2>yl;++yl)Vo=Nl+(1&Jt),Jt=Jt>>1|(Nl=0<(Vo=ss(lt,Ze[2],Vo,et.Qc,0,Pe,Rt)))<<3,Ft=Ft<<2|(3<Vo?3:1<Vo?2:Pe[Rt+0]!=0),Rt+=16;Jt>>=2,Fl=Fl>>1|Nl<<5}$t|=Ft<<4*to,pl|=Jt<<4<<to,Uo|=(240&Fl)<<to}Re.la=pl,Yt.la=Uo,gt.Hc=Ot,gt.Gc=$t,gt.ia=43690&$t?0:et.ia,Ze=!(Ot|$t)}if(0<Se.L&&(Se.wa[Se.Y+Se.ja]=Se.gd[Qe.$b][Qe.Za],Se.wa[Se.Y+Se.ja].La|=!Ze),De.Ka)return Fo(Le,7,"Premature end-of-file encountered.")}if(On(Le),Se=He,De=1,Qe=(_e=Le).D,Re=0<_e.L&&_e.M>=_e.zb&&_e.M<=_e.Va,_e.Aa==0)e:{if(Qe.M=_e.M,Qe.uc=Re,Zn(_e,Qe),De=1,Qe=(Ft=_e.D).Nb,Re=($t=bi[_e.L])*_e.R,lt=$t/2*_e.B,ao=16*Qe*_e.R,yl=8*Qe*_e.B,Ze=_e.sa,gt=_e.ta-Re+ao,et=_e.qa,Pe=_e.ra-lt+yl,Rt=_e.Ha,Yt=_e.Ia-lt+yl,Fl=(Jt=Ft.M)==0,Ot=Jt>=_e.Va-1,_e.Aa==2&&Zn(_e,Ft),Ft.uc)for(Nl=(Vo=_e).D.M,o(Vo.D.uc),Ft=Vo.yb;Ft<Vo.Hb;++Ft){Uo=Ft,pl=Nl;var Ho=(qo=(ko=Vo).D).Nb;to=ko.R;var qo=qo.wa[qo.Y+Uo],cl=ko.sa,Ql=ko.ta+16*Ho*to+16*Uo,va=qo.dd,Ro=qo.tc;if(Ro!=0)if(o(3<=Ro),ko.L==1)0<Uo&&No(cl,Ql,to,Ro+4),qo.La&&Ea(cl,Ql,to,Ro),0<pl&&uo(cl,Ql,to,Ro+4),qo.La&&zo(cl,Ql,to,Ro);else{var $a=ko.B,Fr=ko.qa,An=ko.ra+8*Ho*$a+8*Uo,Za=ko.Ha,ko=ko.Ia+8*Ho*$a+8*Uo;Ho=qo.ld,0<Uo&&(sn(cl,Ql,to,Ro+4,va,Ho),Xa(Fr,An,Za,ko,$a,Ro+4,va,Ho)),qo.La&&(Ml(cl,Ql,to,Ro,va,Ho),io(Fr,An,Za,ko,$a,Ro,va,Ho)),0<pl&&(Br(cl,Ql,to,Ro+4,va,Ho),xr(Fr,An,Za,ko,$a,Ro+4,va,Ho)),qo.La&&(ns(cl,Ql,to,Ro,va,Ho),La(Fr,An,Za,ko,$a,Ro,va,Ho))}}if(_e.ia&&alert("todo:DitherRow"),Se.put!=null){if(Ft=16*Jt,Jt=16*(Jt+1),Fl?(Se.y=_e.sa,Se.O=_e.ta+ao,Se.f=_e.qa,Se.N=_e.ra+yl,Se.ea=_e.Ha,Se.W=_e.Ia+yl):(Ft-=$t,Se.y=Ze,Se.O=gt,Se.f=et,Se.N=Pe,Se.ea=Rt,Se.W=Yt),Ot||(Jt-=$t),Jt>Se.o&&(Jt=Se.o),Se.F=null,Se.J=null,_e.Fa!=null&&0<_e.Fa.length&&Ft<Jt&&(Se.J=Yn(_e,Se,Ft,Jt-Ft),Se.F=_e.mb,Se.F==null&&Se.F.length==0)){De=Fo(_e,3,"Could not decode alpha data.");break e}Ft<Se.j&&($t=Se.j-Ft,Ft=Se.j,o(!(1&$t)),Se.O+=_e.R*$t,Se.N+=_e.B*($t>>1),Se.W+=_e.B*($t>>1),Se.F!=null&&(Se.J+=Se.width*$t)),Ft<Jt&&(Se.O+=Se.v,Se.N+=Se.v>>1,Se.W+=Se.v>>1,Se.F!=null&&(Se.J+=Se.v),Se.ka=Ft-Se.j,Se.U=Se.va-Se.v,Se.T=Jt-Ft,De=Se.put(Se))}Qe+1!=_e.Ic||Ot||(n(_e.sa,_e.ta-Re,Ze,gt+16*_e.R,Re),n(_e.qa,_e.ra-lt,et,Pe+8*_e.B,lt),n(_e.Ha,_e.Ia-lt,Rt,Yt+8*_e.B,lt))}if(!De)return Fo(Le,6,"Output aborted.")}return 1}(p,k)),k.bc!=null&&k.bc(k),L&=1}return L?(p.cb=0,L):0}function Wl(p,k,L,R,ue){ue=p[k+L+32*R]+(ue>>3),p[k+L+32*R]=-256&ue?0>ue?0:255:ue}function Wr(p,k,L,R,ue,pe){Wl(p,k,0,L,R+ue),Wl(p,k,1,L,R+pe),Wl(p,k,2,L,R-pe),Wl(p,k,3,L,R-ue)}function fl(p){return(20091*p>>16)+p}function zn(p,k,L,R){var ue,pe=0,ye=l(16);for(ue=0;4>ue;++ue){var me=p[k+0]+p[k+8],be=p[k+0]-p[k+8],we=(35468*p[k+4]>>16)-fl(p[k+12]),Ne=fl(p[k+4])+(35468*p[k+12]>>16);ye[pe+0]=me+Ne,ye[pe+1]=be+we,ye[pe+2]=be-we,ye[pe+3]=me-Ne,pe+=4,k++}for(ue=pe=0;4>ue;++ue)me=(p=ye[pe+0]+4)+ye[pe+8],be=p-ye[pe+8],we=(35468*ye[pe+4]>>16)-fl(ye[pe+12]),Wl(L,R,0,0,me+(Ne=fl(ye[pe+4])+(35468*ye[pe+12]>>16))),Wl(L,R,1,0,be+we),Wl(L,R,2,0,be-we),Wl(L,R,3,0,me-Ne),pe++,R+=32}function qs(p,k,L,R){var ue=p[k+0]+4,pe=35468*p[k+4]>>16,ye=fl(p[k+4]),me=35468*p[k+1]>>16;Wr(L,R,0,ue+ye,p=fl(p[k+1]),me),Wr(L,R,1,ue+pe,p,me),Wr(L,R,2,ue-pe,p,me),Wr(L,R,3,ue-ye,p,me)}function Ku(p,k,L,R,ue){zn(p,k,L,R),ue&&zn(p,k+16,L,R+4)}function Ys(p,k,L,R){nn(p,k+0,L,R,1),nn(p,k+32,L,R+128,1)}function ju(p,k,L,R){var ue;for(p=p[k+0]+4,ue=0;4>ue;++ue)for(k=0;4>k;++k)Wl(L,R,k,ue,p)}function Js(p,k,L,R){p[k+0]&&Jl(p,k+0,L,R),p[k+16]&&Jl(p,k+16,L,R+4),p[k+32]&&Jl(p,k+32,L,R+128),p[k+48]&&Jl(p,k+48,L,R+128+4)}function Xu(p,k,L,R){var ue,pe=l(16);for(ue=0;4>ue;++ue){var ye=p[k+0+ue]+p[k+12+ue],me=p[k+4+ue]+p[k+8+ue],be=p[k+4+ue]-p[k+8+ue],we=p[k+0+ue]-p[k+12+ue];pe[0+ue]=ye+me,pe[8+ue]=ye-me,pe[4+ue]=we+be,pe[12+ue]=we-be}for(ue=0;4>ue;++ue)ye=(p=pe[0+4*ue]+3)+pe[3+4*ue],me=pe[1+4*ue]+pe[2+4*ue],be=pe[1+4*ue]-pe[2+4*ue],we=p-pe[3+4*ue],L[R+0]=ye+me>>3,L[R+16]=we+be>>3,L[R+32]=ye-me>>3,L[R+48]=we-be>>3,R+=64}function Dn(p,k,L){var R,ue=k-32,pe=xl,ye=255-p[ue-1];for(R=0;R<L;++R){var me,be=pe,we=ye+p[k-1];for(me=0;me<L;++me)p[k+me]=be[we+p[ue+me]];k+=32}}function qu(p,k){Dn(p,k,4)}function Yu(p,k){Dn(p,k,8)}function Ju(p,k){Dn(p,k,16)}function xa(p,k){var L;for(L=0;16>L;++L)n(p,k+32*L,p,k-32,16)}function Kr(p,k){var L;for(L=16;0<L;--L)r(p,k,p[k-1],16),k+=32}function jr(p,k,L){var R;for(R=0;16>R;++R)r(k,L+32*R,p,16)}function Zs(p,k){var L,R=16;for(L=0;16>L;++L)R+=p[k-1+32*L]+p[k+L-32];jr(R>>5,p,k)}function tl(p,k){var L,R=8;for(L=0;16>L;++L)R+=p[k-1+32*L];jr(R>>4,p,k)}function Zu(p,k){var L,R=8;for(L=0;16>L;++L)R+=p[k+L-32];jr(R>>4,p,k)}function ei(p,k){jr(128,p,k)}function Ct(p,k,L){return p+2*k+L+2>>2}function eA(p,k){var L,R=k-32;for(R=new Uint8Array([Ct(p[R-1],p[R+0],p[R+1]),Ct(p[R+0],p[R+1],p[R+2]),Ct(p[R+1],p[R+2],p[R+3]),Ct(p[R+2],p[R+3],p[R+4])]),L=0;4>L;++L)n(p,k+32*L,R,0,R.length)}function tA(p,k){var L=p[k-1],R=p[k-1+32],ue=p[k-1+64],pe=p[k-1+96];Z(p,k+0,16843009*Ct(p[k-1-32],L,R)),Z(p,k+32,16843009*Ct(L,R,ue)),Z(p,k+64,16843009*Ct(R,ue,pe)),Z(p,k+96,16843009*Ct(ue,pe,pe))}function ha(p,k){var L,R=4;for(L=0;4>L;++L)R+=p[k+L-32]+p[k-1+32*L];for(R>>=3,L=0;4>L;++L)r(p,k+32*L,R,4)}function ti(p,k){var L=p[k-1+0],R=p[k-1+32],ue=p[k-1+64],pe=p[k-1-32],ye=p[k+0-32],me=p[k+1-32],be=p[k+2-32],we=p[k+3-32];p[k+0+96]=Ct(R,ue,p[k-1+96]),p[k+1+96]=p[k+0+64]=Ct(L,R,ue),p[k+2+96]=p[k+1+64]=p[k+0+32]=Ct(pe,L,R),p[k+3+96]=p[k+2+64]=p[k+1+32]=p[k+0+0]=Ct(ye,pe,L),p[k+3+64]=p[k+2+32]=p[k+1+0]=Ct(me,ye,pe),p[k+3+32]=p[k+2+0]=Ct(be,me,ye),p[k+3+0]=Ct(we,be,me)}function oi(p,k){var L=p[k+1-32],R=p[k+2-32],ue=p[k+3-32],pe=p[k+4-32],ye=p[k+5-32],me=p[k+6-32],be=p[k+7-32];p[k+0+0]=Ct(p[k+0-32],L,R),p[k+1+0]=p[k+0+32]=Ct(L,R,ue),p[k+2+0]=p[k+1+32]=p[k+0+64]=Ct(R,ue,pe),p[k+3+0]=p[k+2+32]=p[k+1+64]=p[k+0+96]=Ct(ue,pe,ye),p[k+3+32]=p[k+2+64]=p[k+1+96]=Ct(pe,ye,me),p[k+3+64]=p[k+2+96]=Ct(ye,me,be),p[k+3+96]=Ct(me,be,be)}function Xr(p,k){var L=p[k-1+0],R=p[k-1+32],ue=p[k-1+64],pe=p[k-1-32],ye=p[k+0-32],me=p[k+1-32],be=p[k+2-32],we=p[k+3-32];p[k+0+0]=p[k+1+64]=pe+ye+1>>1,p[k+1+0]=p[k+2+64]=ye+me+1>>1,p[k+2+0]=p[k+3+64]=me+be+1>>1,p[k+3+0]=be+we+1>>1,p[k+0+96]=Ct(ue,R,L),p[k+0+64]=Ct(R,L,pe),p[k+0+32]=p[k+1+96]=Ct(L,pe,ye),p[k+1+32]=p[k+2+96]=Ct(pe,ye,me),p[k+2+32]=p[k+3+96]=Ct(ye,me,be),p[k+3+32]=Ct(me,be,we)}function Pn(p,k){var L=p[k+0-32],R=p[k+1-32],ue=p[k+2-32],pe=p[k+3-32],ye=p[k+4-32],me=p[k+5-32],be=p[k+6-32],we=p[k+7-32];p[k+0+0]=L+R+1>>1,p[k+1+0]=p[k+0+64]=R+ue+1>>1,p[k+2+0]=p[k+1+64]=ue+pe+1>>1,p[k+3+0]=p[k+2+64]=pe+ye+1>>1,p[k+0+32]=Ct(L,R,ue),p[k+1+32]=p[k+0+96]=Ct(R,ue,pe),p[k+2+32]=p[k+1+96]=Ct(ue,pe,ye),p[k+3+32]=p[k+2+96]=Ct(pe,ye,me),p[k+3+64]=Ct(ye,me,be),p[k+3+96]=Ct(me,be,we)}function oA(p,k){var L=p[k-1+0],R=p[k-1+32],ue=p[k-1+64],pe=p[k-1+96];p[k+0+0]=L+R+1>>1,p[k+2+0]=p[k+0+32]=R+ue+1>>1,p[k+2+32]=p[k+0+64]=ue+pe+1>>1,p[k+1+0]=Ct(L,R,ue),p[k+3+0]=p[k+1+32]=Ct(R,ue,pe),p[k+3+32]=p[k+1+64]=Ct(ue,pe,pe),p[k+3+64]=p[k+2+64]=p[k+0+96]=p[k+1+96]=p[k+2+96]=p[k+3+96]=pe}function lA(p,k){var L=p[k-1+0],R=p[k-1+32],ue=p[k-1+64],pe=p[k-1+96],ye=p[k-1-32],me=p[k+0-32],be=p[k+1-32],we=p[k+2-32];p[k+0+0]=p[k+2+32]=L+ye+1>>1,p[k+0+32]=p[k+2+64]=R+L+1>>1,p[k+0+64]=p[k+2+96]=ue+R+1>>1,p[k+0+96]=pe+ue+1>>1,p[k+3+0]=Ct(me,be,we),p[k+2+0]=Ct(ye,me,be),p[k+1+0]=p[k+3+32]=Ct(L,ye,me),p[k+1+32]=p[k+3+64]=Ct(R,L,ye),p[k+1+64]=p[k+3+96]=Ct(ue,R,L),p[k+1+96]=Ct(pe,ue,R)}function aA(p,k){var L;for(L=0;8>L;++L)n(p,k+32*L,p,k-32,8)}function Hn(p,k){var L;for(L=0;8>L;++L)r(p,k,p[k-1],8),k+=32}function br(p,k,L){var R;for(R=0;8>R;++R)r(k,L+32*R,p,8)}function Pa(p,k){var L,R=8;for(L=0;8>L;++L)R+=p[k+L-32]+p[k-1+32*L];br(R>>4,p,k)}function rA(p,k){var L,R=4;for(L=0;8>L;++L)R+=p[k+L-32];br(R>>3,p,k)}function kr(p,k){var L,R=4;for(L=0;8>L;++L)R+=p[k-1+32*L];br(R>>3,p,k)}function Rn(p,k){br(128,p,k)}function qr(p,k,L){var R=p[k-L],ue=p[k+0],pe=3*(ue-R)+hA[1020+p[k-2*L]-p[k+L]],ye=di[112+(pe+4>>3)];p[k-L]=xl[255+R+di[112+(pe+3>>3)]],p[k+0]=xl[255+ue-ye]}function li(p,k,L,R){var ue=p[k+0],pe=p[k+L];return Ul[255+p[k-2*L]-p[k-L]]>R||Ul[255+pe-ue]>R}function ai(p,k,L,R){return 4*Ul[255+p[k-L]-p[k+0]]+Ul[255+p[k-2*L]-p[k+L]]<=R}function ri(p,k,L,R,ue){var pe=p[k-3*L],ye=p[k-2*L],me=p[k-L],be=p[k+0],we=p[k+L],Ne=p[k+2*L],Ie=p[k+3*L];return 4*Ul[255+me-be]+Ul[255+ye-we]>R?0:Ul[255+p[k-4*L]-pe]<=ue&&Ul[255+pe-ye]<=ue&&Ul[255+ye-me]<=ue&&Ul[255+Ie-Ne]<=ue&&Ul[255+Ne-we]<=ue&&Ul[255+we-be]<=ue}function ni(p,k,L,R){var ue=2*R+1;for(R=0;16>R;++R)ai(p,k+R,L,ue)&&qr(p,k+R,L)}function Fa(p,k,L,R){var ue=2*R+1;for(R=0;16>R;++R)ai(p,k+R*L,1,ue)&&qr(p,k+R*L,1)}function Ha(p,k,L,R){var ue;for(ue=3;0<ue;--ue)ni(p,k+=4*L,L,R)}function nA(p,k,L,R){var ue;for(ue=3;0<ue;--ue)Fa(p,k+=4,L,R)}function Ra(p,k,L,R,ue,pe,ye,me){for(pe=2*pe+1;0<ue--;){if(ri(p,k,L,pe,ye))if(li(p,k,L,me))qr(p,k,L);else{var be=p,we=k,Ne=L,Ie=be[we-2*Ne],$e=be[we-Ne],Le=be[we+0],He=be[we+Ne],Qe=be[we+2*Ne],_e=27*(De=hA[1020+3*(Le-$e)+hA[1020+Ie-He]])+63>>7,Se=18*De+63>>7,De=9*De+63>>7;be[we-3*Ne]=xl[255+be[we-3*Ne]+De],be[we-2*Ne]=xl[255+Ie+Se],be[we-Ne]=xl[255+$e+_e],be[we+0]=xl[255+Le-_e],be[we+Ne]=xl[255+He-Se],be[we+2*Ne]=xl[255+Qe-De]}k+=R}}function Kl(p,k,L,R,ue,pe,ye,me){for(pe=2*pe+1;0<ue--;){if(ri(p,k,L,pe,ye))if(li(p,k,L,me))qr(p,k,L);else{var be=p,we=k,Ne=L,Ie=be[we-Ne],$e=be[we+0],Le=be[we+Ne],He=di[112+((Qe=3*($e-Ie))+4>>3)],Qe=di[112+(Qe+3>>3)],_e=He+1>>1;be[we-2*Ne]=xl[255+be[we-2*Ne]+_e],be[we-Ne]=xl[255+Ie+Qe],be[we+0]=xl[255+$e-He],be[we+Ne]=xl[255+Le-_e]}k+=R}}function Gn(p,k,L,R,ue,pe){Ra(p,k,L,1,16,R,ue,pe)}function Cr(p,k,L,R,ue,pe){Ra(p,k,1,L,16,R,ue,pe)}function sA(p,k,L,R,ue,pe){var ye;for(ye=3;0<ye;--ye)Kl(p,k+=4*L,L,1,16,R,ue,pe)}function Yr(p,k,L,R,ue,pe){var ye;for(ye=3;0<ye;--ye)Kl(p,k+=4,1,L,16,R,ue,pe)}function iA(p,k,L,R,ue,pe,ye,me){Ra(p,k,ue,1,8,pe,ye,me),Ra(L,R,ue,1,8,pe,ye,me)}function Wn(p,k,L,R,ue,pe,ye,me){Ra(p,k,1,ue,8,pe,ye,me),Ra(L,R,1,ue,8,pe,ye,me)}function Kn(p,k,L,R,ue,pe,ye,me){Kl(p,k+4*ue,ue,1,8,pe,ye,me),Kl(L,R+4*ue,ue,1,8,pe,ye,me)}function si(p,k,L,R,ue,pe,ye,me){Kl(p,k+4,1,ue,8,pe,ye,me),Kl(L,R+4,1,ue,8,pe,ye,me)}function Jr(){this.ba=new qe,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new dt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function jn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Xn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function ii(){this.ua=0,this.Wa=new N,this.vb=new N,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new oe,this.yc=new S}function uA(){this.xb=this.a=0,this.l=new Gr,this.ca=new qe,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new m,this.Pb=0,this.wd=new m,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new ii,this.ab=0,this.gc=s(4,Xn),this.Oc=0}function Zr(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Gr,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function wr(p,k,L,R,ue,pe,ye){for(p=p==null?0:p[k+0],k=0;k<ye;++k)ue[pe+k]=p+L[R+k]&255,p=ue[pe+k]}function qn(p,k,L,R,ue,pe,ye){var me;if(p==null)wr(null,null,L,R,ue,pe,ye);else for(me=0;me<ye;++me)ue[pe+me]=p[k+me]+L[R+me]&255}function Ga(p,k,L,R,ue,pe,ye){if(p==null)wr(null,null,L,R,ue,pe,ye);else{var me,be=p[k+0],we=be,Ne=be;for(me=0;me<ye;++me)we=Ne+(be=p[k+me])-we,Ne=L[R+me]+(-256&we?0>we?0:255:we)&255,we=be,ue[pe+me]=Ne}}function Yn(p,k,L,R){var ue=k.width,pe=k.o;if(o(p!=null&&k!=null),0>L||0>=R||L+R>pe)return null;if(!p.Cc){if(p.ga==null){var ye;if(p.ga=new Zr,(ye=p.ga==null)||(ye=k.width*k.o,o(p.Gb.length==0),p.Gb=l(ye),p.Uc=0,p.Gb==null?ye=0:(p.mb=p.Gb,p.nb=p.Uc,p.rc=null,ye=1),ye=!ye),!ye){ye=p.ga;var me=p.Fa,be=p.P,we=p.qc,Ne=p.mb,Ie=p.nb,$e=be+1,Le=we-1,He=ye.l;if(o(me!=null&&Ne!=null&&k!=null),Ja[0]=null,Ja[1]=wr,Ja[2]=qn,Ja[3]=Ga,ye.ca=Ne,ye.tb=Ie,ye.c=k.width,ye.i=k.height,o(0<ye.c&&0<ye.i),1>=we)k=0;else if(ye.$a=me[be+0]>>0&3,ye.Z=me[be+0]>>2&3,ye.Lc=me[be+0]>>4&3,be=me[be+0]>>6&3,0>ye.$a||1<ye.$a||4<=ye.Z||1<ye.Lc||be)k=0;else if(He.put=Xo,He.ac=Vt,He.bc=go,He.ma=ye,He.width=k.width,He.height=k.height,He.Da=k.Da,He.v=k.v,He.va=k.va,He.j=k.j,He.o=k.o,ye.$a)e:{o(ye.$a==1),k=Il();t:for(;;){if(k==null){k=0;break e}if(o(ye!=null),ye.mc=k,k.c=ye.c,k.i=ye.i,k.l=ye.l,k.l.ma=ye,k.l.width=ye.c,k.l.height=ye.i,k.a=0,H(k.m,me,$e,Le),!da(ye.c,ye.i,1,k,null)||(k.ab==1&&k.gc[0].hc==3&&Ba(k.s)?(ye.ic=1,me=k.c*k.i,k.Ta=null,k.Ua=0,k.V=l(me),k.Ba=0,k.V==null?(k.a=1,k=0):k=1):(ye.ic=0,k=mr(k,ye.c)),!k))break t;k=1;break e}ye.mc=null,k=0}else k=Le>=ye.c*ye.i;ye=!k}if(ye)return null;p.ga.Lc!=1?p.Ga=0:R=pe-L}o(p.ga!=null),o(L+R<=pe);e:{if(k=(me=p.ga).c,pe=me.l.o,me.$a==0){if($e=p.rc,Le=p.Vc,He=p.Fa,be=p.P+1+L*k,we=p.mb,Ne=p.nb+L*k,o(be<=p.P+p.qc),me.Z!=0)for(o(Ja[me.Z]!=null),ye=0;ye<R;++ye)Ja[me.Z]($e,Le,He,be,we,Ne,k),$e=we,Le=Ne,Ne+=k,be+=k;else for(ye=0;ye<R;++ye)n(we,Ne,He,be,k),$e=we,Le=Ne,Ne+=k,be+=k;p.rc=$e,p.Vc=Le}else{if(o(me.mc!=null),k=L+R,o((ye=me.mc)!=null),o(k<=ye.i),ye.C>=k)k=1;else if(me.ic||Ee(),me.ic){me=ye.V,$e=ye.Ba,Le=ye.c;var Qe=ye.i,_e=(He=1,be=ye.$/Le,we=ye.$%Le,Ne=ye.m,Ie=ye.s,ye.$),Se=Le*Qe,De=Le*k,Re=Ie.wc,Pe=_e<De?mo(Ie,we,be):null;o(_e<=Se),o(k<=Qe),o(Ba(Ie));t:for(;;){for(;!Ne.h&&_e<De;){if(we&Re||(Pe=mo(Ie,we,be)),o(Pe!=null),J(Ne),256>(Qe=$o(Pe.G[0],Pe.H[0],Ne)))me[$e+_e]=Qe,++_e,++we>=Le&&(we=0,++be<=k&&!(be%16)&&Rl(ye,be));else{if(!(280>Qe)){He=0;break t}Qe=Ht(Qe-256,Ne);var lt,Ze=$o(Pe.G[4],Pe.H[4],Ne);if(J(Ne),!(_e>=(Ze=el(Le,Ze=Ht(Ze,Ne)))&&Se-_e>=Qe)){He=0;break t}for(lt=0;lt<Qe;++lt)me[$e+_e+lt]=me[$e+_e+lt-Ze];for(_e+=Qe,we+=Qe;we>=Le;)we-=Le,++be<=k&&!(be%16)&&Rl(ye,be);_e<De&&we&Re&&(Pe=mo(Ie,we,be))}o(Ne.h==x(Ne))}Rl(ye,be>k?k:be);break t}!He||Ne.h&&_e<Se?(He=0,ye.a=Ne.h?5:3):ye.$=_e,k=He}else k=Gl(ye,ye.V,ye.Ba,ye.c,ye.i,k,zr);if(!k){R=0;break e}}L+R>=pe&&(p.Cc=1),R=1}if(!R)return null;if(p.Cc&&((R=p.ga)!=null&&(R.mc=null),p.ga=null,0<p.Ga))return alert("todo:WebPDequantizeLevels"),null}return p.nb+L*ue}function F(p,k,L,R,ue,pe){for(;0<ue--;){var ye,me=p,be=k+(L?1:0),we=p,Ne=k+(L?0:3);for(ye=0;ye<R;++ye){var Ie=we[Ne+4*ye];Ie!=255&&(Ie*=32897,me[be+4*ye+0]=me[be+4*ye+0]*Ie>>23,me[be+4*ye+1]=me[be+4*ye+1]*Ie>>23,me[be+4*ye+2]=me[be+4*ye+2]*Ie>>23)}k+=pe}}function de(p,k,L,R,ue){for(;0<R--;){var pe;for(pe=0;pe<L;++pe){var ye=p[k+2*pe+0],me=15&(we=p[k+2*pe+1]),be=4369*me,we=(240&we|we>>4)*be>>16;p[k+2*pe+0]=(240&ye|ye>>4)*be>>16&240|(15&ye|ye<<4)*be>>16>>4&15,p[k+2*pe+1]=240&we|me}k+=ue}}function Be(p,k,L,R,ue,pe,ye,me){var be,we,Ne=255;for(we=0;we<ue;++we){for(be=0;be<R;++be){var Ie=p[k+be];pe[ye+4*be]=Ie,Ne&=Ie}k+=L,ye+=me}return Ne!=255}function Fe(p,k,L,R,ue){var pe;for(pe=0;pe<ue;++pe)L[R+pe]=p[k+pe]>>8}function Ee(){qa=F,un=de,ci=Be,id=Fe}function Te(p,k,L){b[p]=function(R,ue,pe,ye,me,be,we,Ne,Ie,$e,Le,He,Qe,_e,Se,De,Re){var Pe,lt=Re-1>>1,Ze=me[be+0]|we[Ne+0]<<16,gt=Ie[$e+0]|Le[He+0]<<16;o(R!=null);var et=3*Ze+gt+131074>>2;for(k(R[ue+0],255&et,et>>16,Qe,_e),pe!=null&&(et=3*gt+Ze+131074>>2,k(pe[ye+0],255&et,et>>16,Se,De)),Pe=1;Pe<=lt;++Pe){var Rt=me[be+Pe]|we[Ne+Pe]<<16,Yt=Ie[$e+Pe]|Le[He+Pe]<<16,Ot=Ze+Rt+gt+Yt+524296,$t=Ot+2*(Rt+gt)>>3;et=$t+Ze>>1,Ze=(Ot=Ot+2*(Ze+Yt)>>3)+Rt>>1,k(R[ue+2*Pe-1],255&et,et>>16,Qe,_e+(2*Pe-1)*L),k(R[ue+2*Pe-0],255&Ze,Ze>>16,Qe,_e+(2*Pe-0)*L),pe!=null&&(et=Ot+gt>>1,Ze=$t+Yt>>1,k(pe[ye+2*Pe-1],255&et,et>>16,Se,De+(2*Pe-1)*L),k(pe[ye+2*Pe+0],255&Ze,Ze>>16,Se,De+(2*Pe+0)*L)),Ze=Rt,gt=Yt}1&Re||(et=3*Ze+gt+131074>>2,k(R[ue+Re-1],255&et,et>>16,Qe,_e+(Re-1)*L),pe!=null&&(et=3*gt+Ze+131074>>2,k(pe[ye+Re-1],255&et,et>>16,Se,De+(Re-1)*L)))}}function je(){Vl[hi]=r1,Vl[fi]=md,Vl[fd]=n1,Vl[vi]=bd,Vl[gi]=kd,Vl[fA]=Cd,Vl[vd]=s1,Vl[vA]=md,Vl[gA]=bd,Vl[pi]=kd,Vl[pA]=Cd}function ot(p){return p&~i1?0>p?0:255:p>>wd}function ht(p,k){return ot((19077*p>>8)+(26149*k>>8)-14234)}function Bt(p,k,L){return ot((19077*p>>8)-(6419*k>>8)-(13320*L>>8)+8708)}function _t(p,k){return ot((19077*p>>8)+(33050*k>>8)-17685)}function Qt(p,k,L,R,ue){R[ue+0]=ht(p,L),R[ue+1]=Bt(p,k,L),R[ue+2]=_t(p,k)}function po(p,k,L,R,ue){R[ue+0]=_t(p,k),R[ue+1]=Bt(p,k,L),R[ue+2]=ht(p,L)}function bo(p,k,L,R,ue){var pe=Bt(p,k,L);k=pe<<3&224|_t(p,k)>>3,R[ue+0]=248&ht(p,L)|pe>>5,R[ue+1]=k}function Mo(p,k,L,R,ue){var pe=240&_t(p,k)|15;R[ue+0]=240&ht(p,L)|Bt(p,k,L)>>4,R[ue+1]=pe}function ol(p,k,L,R,ue){R[ue+0]=255,Qt(p,k,L,R,ue+1)}function Po(p,k,L,R,ue){po(p,k,L,R,ue),R[ue+3]=255}function jl(p,k,L,R,ue){Qt(p,k,L,R,ue),R[ue+3]=255}function Bl(p,k){return 0>p?0:p>k?k:p}function Na(p,k,L){b[p]=function(R,ue,pe,ye,me,be,we,Ne,Ie){for(var $e=Ne+(-2&Ie)*L;Ne!=$e;)k(R[ue+0],pe[ye+0],me[be+0],we,Ne),k(R[ue+1],pe[ye+0],me[be+0],we,Ne+L),ue+=2,++ye,++be,Ne+=2*L;1&Ie&&k(R[ue+0],pe[ye+0],me[be+0],we,Ne)}}function ui(p,k,L){return L==0?p==0?k==0?6:5:k==0?4:0:L}function Jn(p,k,L,R,ue){switch(p>>>30){case 3:nn(k,L,R,ue,0);break;case 2:rs(k,L,R,ue);break;case 1:Jl(k,L,R,ue)}}function Zn(p,k){var L,R,ue=k.M,pe=k.Nb,ye=p.oc,me=p.pc+40,be=p.oc,we=p.pc+584,Ne=p.oc,Ie=p.pc+600;for(L=0;16>L;++L)ye[me+32*L-1]=129;for(L=0;8>L;++L)be[we+32*L-1]=129,Ne[Ie+32*L-1]=129;for(0<ue?ye[me-1-32]=be[we-1-32]=Ne[Ie-1-32]=129:(r(ye,me-32-1,127,21),r(be,we-32-1,127,9),r(Ne,Ie-32-1,127,9)),R=0;R<p.za;++R){var $e=k.ya[k.aa+R];if(0<R){for(L=-1;16>L;++L)n(ye,me+32*L-4,ye,me+32*L+12,4);for(L=-1;8>L;++L)n(be,we+32*L-4,be,we+32*L+4,4),n(Ne,Ie+32*L-4,Ne,Ie+32*L+4,4)}var Le=p.Gd,He=p.Hd+R,Qe=$e.ad,_e=$e.Hc;if(0<ue&&(n(ye,me-32,Le[He].y,0,16),n(be,we-32,Le[He].f,0,8),n(Ne,Ie-32,Le[He].ea,0,8)),$e.Za){var Se=ye,De=me-32+16;for(0<ue&&(R>=p.za-1?r(Se,De,Le[He].y[15],4):n(Se,De,Le[He+1].y,0,4)),L=0;4>L;L++)Se[De+128+L]=Se[De+256+L]=Se[De+384+L]=Se[De+0+L];for(L=0;16>L;++L,_e<<=2)Se=ye,De=me+xd[L],Zl[$e.Ob[L]](Se,De),Jn(_e,Qe,16*+L,Se,De)}else if(Se=ui(R,ue,$e.Ob[0]),Ya[Se](ye,me),_e!=0)for(L=0;16>L;++L,_e<<=2)Jn(_e,Qe,16*+L,ye,me+xd[L]);for(L=$e.Gc,Se=ui(R,ue,$e.Dd),Ia[Se](be,we),Ia[Se](Ne,Ie),_e=Qe,Se=be,De=we,255&($e=L>>0)&&(170&$e?ja(_e,256,Se,De):Sa(_e,256,Se,De)),$e=Ne,_e=Ie,255&(L>>=8)&&(170&L?ja(Qe,320,$e,_e):Sa(Qe,320,$e,_e)),ue<p.Ub-1&&(n(Le[He].y,0,ye,me+480,16),n(Le[He].f,0,be,we+224,8),n(Le[He].ea,0,Ne,Ie+224,8)),L=8*pe*p.B,Le=p.sa,He=p.ta+16*R+16*pe*p.R,Qe=p.qa,$e=p.ra+8*R+L,_e=p.Ha,Se=p.Ia+8*R+L,L=0;16>L;++L)n(Le,He+L*p.R,ye,me+32*L,16);for(L=0;8>L;++L)n(Qe,$e+L*p.B,be,we+32*L,8),n(_e,Se+L*p.B,Ne,Ie+32*L,8)}}function en(p,k,L,R,ue,pe,ye,me,be){var we=[0],Ne=[0],Ie=0,$e=be!=null?be.kd:0,Le=be??new jn;if(p==null||12>L)return 7;Le.data=p,Le.w=k,Le.ha=L,k=[k],L=[L],Le.gb=[Le.gb];e:{var He=k,Qe=L,_e=Le.gb;if(o(p!=null),o(Qe!=null),o(_e!=null),_e[0]=0,12<=Qe[0]&&!a(p,He[0],"RIFF")){if(a(p,He[0]+8,"WEBP")){_e=3;break e}var Se=D(p,He[0]+4);if(12>Se||4294967286<Se){_e=3;break e}if($e&&Se>Qe[0]-8){_e=7;break e}_e[0]=Se,He[0]+=12,Qe[0]-=12}_e=0}if(_e!=0)return _e;for(Se=0<Le.gb[0],L=L[0];;){e:{var De=p;Qe=k,_e=L;var Re=we,Pe=Ne,lt=He=[0];if((et=Ie=[Ie])[0]=0,8>_e[0])_e=7;else{if(!a(De,Qe[0],"VP8X")){if(D(De,Qe[0]+4)!=10){_e=3;break e}if(18>_e[0]){_e=7;break e}var Ze=D(De,Qe[0]+8),gt=1+z(De,Qe[0]+12);if(2147483648<=gt*(De=1+z(De,Qe[0]+15))){_e=3;break e}lt!=null&&(lt[0]=Ze),Re!=null&&(Re[0]=gt),Pe!=null&&(Pe[0]=De),Qe[0]+=18,_e[0]-=18,et[0]=1}_e=0}}if(Ie=Ie[0],He=He[0],_e!=0)return _e;if(Qe=!!(2&He),!Se&&Ie)return 3;if(pe!=null&&(pe[0]=!!(16&He)),ye!=null&&(ye[0]=Qe),me!=null&&(me[0]=0),ye=we[0],He=Ne[0],Ie&&Qe&&be==null){_e=0;break}if(4>L){_e=7;break}if(Se&&Ie||!Se&&!Ie&&!a(p,k[0],"ALPH")){L=[L],Le.na=[Le.na],Le.P=[Le.P],Le.Sa=[Le.Sa];e:{Ze=p,_e=k,Se=L;var et=Le.gb;Re=Le.na,Pe=Le.P,lt=Le.Sa,gt=22,o(Ze!=null),o(Se!=null),De=_e[0];var Rt=Se[0];for(o(Re!=null),o(lt!=null),Re[0]=null,Pe[0]=null,lt[0]=0;;){if(_e[0]=De,Se[0]=Rt,8>Rt){_e=7;break e}var Yt=D(Ze,De+4);if(4294967286<Yt){_e=3;break e}var Ot=8+Yt+1&-2;if(gt+=Ot,0<et&&gt>et){_e=3;break e}if(!a(Ze,De,"VP8 ")||!a(Ze,De,"VP8L")){_e=0;break e}if(Rt[0]<Ot){_e=7;break e}a(Ze,De,"ALPH")||(Re[0]=Ze,Pe[0]=De+8,lt[0]=Yt),De+=Ot,Rt-=Ot}}if(L=L[0],Le.na=Le.na[0],Le.P=Le.P[0],Le.Sa=Le.Sa[0],_e!=0)break}L=[L],Le.Ja=[Le.Ja],Le.xa=[Le.xa];e:if(et=p,_e=k,Se=L,Re=Le.gb[0],Pe=Le.Ja,lt=Le.xa,Ze=_e[0],De=!a(et,Ze,"VP8 "),gt=!a(et,Ze,"VP8L"),o(et!=null),o(Se!=null),o(Pe!=null),o(lt!=null),8>Se[0])_e=7;else{if(De||gt){if(et=D(et,Ze+4),12<=Re&&et>Re-12){_e=3;break e}if($e&&et>Se[0]-8){_e=7;break e}Pe[0]=et,_e[0]+=8,Se[0]-=8,lt[0]=gt}else lt[0]=5<=Se[0]&&et[Ze+0]==47&&!(et[Ze+4]>>5),Pe[0]=Se[0];_e=0}if(L=L[0],Le.Ja=Le.Ja[0],Le.xa=Le.xa[0],k=k[0],_e!=0)break;if(4294967286<Le.Ja)return 3;if(me==null||Qe||(me[0]=Le.xa?2:1),ye=[ye],He=[He],Le.xa){if(5>L){_e=7;break}me=ye,$e=He,Qe=pe,p==null||5>L?p=0:5<=L&&p[k+0]==47&&!(p[k+4]>>5)?(Se=[0],et=[0],Re=[0],H(Pe=new m,p,k,L),ut(Pe,Se,et,Re)?(me!=null&&(me[0]=Se[0]),$e!=null&&($e[0]=et[0]),Qe!=null&&(Qe[0]=Re[0]),p=1):p=0):p=0}else{if(10>L){_e=7;break}me=He,p==null||10>L||!Ks(p,k+3,L-3)?p=0:($e=p[k+0]|p[k+1]<<8|p[k+2]<<16,Qe=16383&(p[k+7]<<8|p[k+6]),p=16383&(p[k+9]<<8|p[k+8]),1&$e||3<($e>>1&7)||!($e>>4&1)||$e>>5>=Le.Ja||!Qe||!p?p=0:(ye&&(ye[0]=Qe),me&&(me[0]=p),p=1))}if(!p||(ye=ye[0],He=He[0],Ie&&(we[0]!=ye||Ne[0]!=He)))return 3;be!=null&&(be[0]=Le,be.offset=k-be.w,o(4294967286>k-be.w),o(be.offset==be.ha-L));break}return _e==0||_e==7&&Ie&&be==null?(pe!=null&&(pe[0]|=Le.na!=null&&0<Le.na.length),R!=null&&(R[0]=ye),ue!=null&&(ue[0]=He),0):_e}function es(p,k,L){var R=k.width,ue=k.height,pe=0,ye=0,me=R,be=ue;if(k.Da=p!=null&&0<p.Da,k.Da&&(me=p.cd,be=p.bd,pe=p.v,ye=p.j,11>L||(pe&=-2,ye&=-2),0>pe||0>ye||0>=me||0>=be||pe+me>R||ye+be>ue))return 0;if(k.v=pe,k.j=ye,k.va=pe+me,k.o=ye+be,k.U=me,k.T=be,k.da=p!=null&&0<p.da,k.da){if(!j(me,be,L=[p.ib],pe=[p.hb]))return 0;k.ib=L[0],k.hb=pe[0]}return k.ob=p!=null&&p.ob,k.Kb=p==null||!p.Sd,k.da&&(k.ob=k.ib<3*R/4&&k.hb<3*ue/4,k.Kb=0),1}function ts(p){if(p==null)return 2;if(11>p.S){var k=p.f.RGBA;k.fb+=(p.height-1)*k.A,k.A=-k.A}else k=p.f.kb,p=p.height,k.O+=(p-1)*k.fa,k.fa=-k.fa,k.N+=(p-1>>1)*k.Ab,k.Ab=-k.Ab,k.W+=(p-1>>1)*k.Db,k.Db=-k.Db,k.F!=null&&(k.J+=(p-1)*k.lb,k.lb=-k.lb);return 0}function tn(p,k,L,R){if(R==null||0>=p||0>=k)return 2;if(L!=null){if(L.Da){var ue=L.cd,pe=L.bd,ye=-2&L.v,me=-2&L.j;if(0>ye||0>me||0>=ue||0>=pe||ye+ue>p||me+pe>k)return 2;p=ue,k=pe}if(L.da){if(!j(p,k,ue=[L.ib],pe=[L.hb]))return 2;p=ue[0],k=pe[0]}}R.width=p,R.height=k;e:{var be=R.width,we=R.height;if(p=R.S,0>=be||0>=we||!(p>=hi&&13>p))p=2;else{if(0>=R.Rd&&R.sd==null){ye=pe=ue=k=0;var Ne=(me=be*Fd[p])*we;if(11>p||(pe=(we+1)/2*(k=(be+1)/2),p==12&&(ye=(ue=be)*we)),(we=l(Ne+2*pe+ye))==null){p=1;break e}R.sd=we,11>p?((be=R.f.RGBA).eb=we,be.fb=0,be.A=me,be.size=Ne):((be=R.f.kb).y=we,be.O=0,be.fa=me,be.Fd=Ne,be.f=we,be.N=0+Ne,be.Ab=k,be.Cd=pe,be.ea=we,be.W=0+Ne+pe,be.Db=k,be.Ed=pe,p==12&&(be.F=we,be.J=0+Ne+2*pe),be.Tc=ye,be.lb=ue)}if(k=1,ue=R.S,pe=R.width,ye=R.height,ue>=hi&&13>ue)if(11>ue)p=R.f.RGBA,k&=(me=Math.abs(p.A))*(ye-1)+pe<=p.size,k&=me>=pe*Fd[ue],k&=p.eb!=null;else{p=R.f.kb,me=(pe+1)/2,Ne=(ye+1)/2,be=Math.abs(p.fa),we=Math.abs(p.Ab);var Ie=Math.abs(p.Db),$e=Math.abs(p.lb),Le=$e*(ye-1)+pe;k&=be*(ye-1)+pe<=p.Fd,k&=we*(Ne-1)+me<=p.Cd,k=(k&=Ie*(Ne-1)+me<=p.Ed)&be>=pe&we>=me&Ie>=me,k&=p.y!=null,k&=p.f!=null,k&=p.ea!=null,ue==12&&(k&=$e>=pe,k&=Le<=p.Tc,k&=p.F!=null)}else k=0;p=k?0:2}}return p!=0||L!=null&&L.fd&&(p=ts(R)),p}var vl=64,on=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],ln=24,an=32,os=8,gl=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];re("Predictor0","PredictorAdd0"),b.Predictor0=function(){return 4278190080},b.Predictor1=function(p){return p},b.Predictor2=function(p,k,L){return k[L+0]},b.Predictor3=function(p,k,L){return k[L+1]},b.Predictor4=function(p,k,L){return k[L-1]},b.Predictor5=function(p,k,L){return G(G(p,k[L+1]),k[L+0])},b.Predictor6=function(p,k,L){return G(p,k[L-1])},b.Predictor7=function(p,k,L){return G(p,k[L+0])},b.Predictor8=function(p,k,L){return G(k[L-1],k[L+0])},b.Predictor9=function(p,k,L){return G(k[L+0],k[L+1])},b.Predictor10=function(p,k,L){return G(G(p,k[L-1]),G(k[L+0],k[L+1]))},b.Predictor11=function(p,k,L){var R=k[L+0];return 0>=se(R>>24&255,p>>24&255,(k=k[L-1])>>24&255)+se(R>>16&255,p>>16&255,k>>16&255)+se(R>>8&255,p>>8&255,k>>8&255)+se(255&R,255&p,255&k)?R:p},b.Predictor12=function(p,k,L){var R=k[L+0];return(ne((p>>24&255)+(R>>24&255)-((k=k[L-1])>>24&255))<<24|ne((p>>16&255)+(R>>16&255)-(k>>16&255))<<16|ne((p>>8&255)+(R>>8&255)-(k>>8&255))<<8|ne((255&p)+(255&R)-(255&k)))>>>0},b.Predictor13=function(p,k,L){var R=k[L-1];return(Ae((p=G(p,k[L+0]))>>24&255,R>>24&255)<<24|Ae(p>>16&255,R>>16&255)<<16|Ae(p>>8&255,R>>8&255)<<8|Ae(p>>0&255,R>>0&255))>>>0};var AA=b.PredictorAdd0;b.PredictorAdd1=ve,re("Predictor2","PredictorAdd2"),re("Predictor3","PredictorAdd3"),re("Predictor4","PredictorAdd4"),re("Predictor5","PredictorAdd5"),re("Predictor6","PredictorAdd6"),re("Predictor7","PredictorAdd7"),re("Predictor8","PredictorAdd8"),re("Predictor9","PredictorAdd9"),re("Predictor10","PredictorAdd10"),re("Predictor11","PredictorAdd11"),re("Predictor12","PredictorAdd12"),re("Predictor13","PredictorAdd13");var ls=b.PredictorAdd2;Ye("ColorIndexInverseTransform","MapARGB","32b",function(p){return p>>8&255},function(p){return p}),Ye("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(p){return p},function(p){return p>>8&255});var Ai,Xl=b.ColorIndexInverseTransform,as=b.MapARGB,cA=b.VP8LColorIndexInverseTransformAlpha,dA=b.MapAlpha,Wa=b.VP8LPredictorsAdd=[];Wa.length=16,(b.VP8LPredictors=[]).length=16,(b.VP8LPredictorsAdd_C=[]).length=16,(b.VP8LPredictors_C=[]).length=16;var $l,ql,Ka,fa,_a,rn,Yl,nn,rs,ja,Jl,Sa,Br,sn,xr,Xa,ns,Ml,La,io,uo,No,zo,Ea,qa,un,ci,id,ud=l(511),Ad=l(2041),cd=l(225),dd=l(767),hd=0,hA=Ad,di=cd,xl=dd,Ul=ud,hi=0,fi=1,fd=2,vi=3,gi=4,fA=5,vd=6,vA=7,gA=8,pi=9,pA=10,Gg=[2,3,7],Wg=[3,3,11],gd=[280,256,256,256,40],Kg=[0,1,1,1,0],jg=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Xg=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],qg=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Yg=8,yA=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],mA=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ss=null,Jg=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Zg=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],pd=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],e1=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],t1=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],o1=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],l1=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Ya=[],Zl=[],Ia=[],a1=1,yd=2,Ja=[],Vl=[];Te("UpsampleRgbLinePair",Qt,3),Te("UpsampleBgrLinePair",po,3),Te("UpsampleRgbaLinePair",jl,4),Te("UpsampleBgraLinePair",Po,4),Te("UpsampleArgbLinePair",ol,4),Te("UpsampleRgba4444LinePair",Mo,2),Te("UpsampleRgb565LinePair",bo,2);var r1=b.UpsampleRgbLinePair,n1=b.UpsampleBgrLinePair,md=b.UpsampleRgbaLinePair,bd=b.UpsampleBgraLinePair,kd=b.UpsampleArgbLinePair,Cd=b.UpsampleRgba4444LinePair,s1=b.UpsampleRgb565LinePair,yi=16,mi=1<<yi-1,is=-227,bA=482,wd=6,i1=(256<<wd)-1,Bd=0,u1=l(256),A1=l(256),c1=l(256),d1=l(256),h1=l(bA-is),f1=l(bA-is);Na("YuvToRgbRow",Qt,3),Na("YuvToBgrRow",po,3),Na("YuvToRgbaRow",jl,4),Na("YuvToBgraRow",Po,4),Na("YuvToArgbRow",ol,4),Na("YuvToRgba4444Row",Mo,2),Na("YuvToRgb565Row",bo,2);var xd=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],bi=[0,2,8],v1=[8,7,6,4,4,2,2,2,1,1,1,1],g1=1;this.WebPDecodeRGBA=function(p,k,L,R,ue){var pe=fi,ye=new Jr,me=new qe;ye.ba=me,me.S=pe,me.width=[me.width],me.height=[me.height];var be=me.width,we=me.height,Ne=new mt;if(Ne==null||p==null)var Ie=2;else o(Ne!=null),Ie=en(p,k,L,Ne.width,Ne.height,Ne.Pd,Ne.Qd,Ne.format,null);if(Ie!=0?be=0:(be!=null&&(be[0]=Ne.width[0]),we!=null&&(we[0]=Ne.height[0]),be=1),be){me.width=me.width[0],me.height=me.height[0],R!=null&&(R[0]=me.width),ue!=null&&(ue[0]=me.height);e:{if(R=new Gr,(ue=new jn).data=p,ue.w=k,ue.ha=L,ue.kd=1,k=[0],o(ue!=null),((p=en(ue.data,ue.w,ue.ha,null,null,null,k,null,ue))==0||p==7)&&k[0]&&(p=4),(k=p)==0){if(o(ye!=null),R.data=ue.data,R.w=ue.w+ue.offset,R.ha=ue.ha-ue.offset,R.put=Xo,R.ac=Vt,R.bc=go,R.ma=ye,ue.xa){if((p=Il())==null){ye=1;break e}if(function($e,Le){var He=[0],Qe=[0],_e=[0];t:for(;;){if($e==null)return 0;if(Le==null)return $e.a=2,0;if($e.l=Le,$e.a=0,H($e.m,Le.data,Le.w,Le.ha),!ut($e.m,He,Qe,_e)){$e.a=3;break t}if($e.xb=yd,Le.width=He[0],Le.height=Qe[0],!da(He[0],Qe[0],1,$e,null))break t;return 1}return o($e.a!=0),0}(p,R)){if(R=(k=tn(R.width,R.height,ye.Oa,ye.ba))==0){t:{R=p;o:for(;;){if(R==null){R=0;break t}if(o(R.s.yc!=null),o(R.s.Ya!=null),o(0<R.s.Wb),o((L=R.l)!=null),o((ue=L.ma)!=null),R.xb!=0){if(R.ca=ue.ba,R.tb=ue.tb,o(R.ca!=null),!es(ue.Oa,L,vi)){R.a=2;break o}if(!mr(R,L.width)||L.da)break o;if((L.da||Ut(R.ca.S))&&Ee(),11>R.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),R.ca.f.kb.F!=null&&Ee()),R.Pb&&0<R.s.ua&&R.s.vb.X==null&&!fe(R.s.vb,R.s.Wa.Xa)){R.a=1;break o}R.xb=0}if(!Gl(R,R.V,R.Ba,R.c,R.i,L.o,Or))break o;ue.Dc=R.Ma,R=1;break t}o(R.a!=0),R=0}R=!R}R&&(k=p.a)}else k=p.a}else{if((p=new Gu)==null){ye=1;break e}if(p.Fa=ue.na,p.P=ue.P,p.qc=ue.Sa,js(p,R)){if((k=tn(R.width,R.height,ye.Oa,ye.ba))==0){if(p.Aa=0,L=ye.Oa,o((ue=p)!=null),L!=null){if(0<(be=0>(be=L.Md)?0:100<be?255:255*be/100)){for(we=Ne=0;4>we;++we)12>(Ie=ue.pb[we]).lc&&(Ie.ia=be*v1[0>Ie.lc?0:Ie.lc]>>3),Ne|=Ie.ia;Ne&&(alert("todo:VP8InitRandom"),ue.ia=1)}ue.Ga=L.Id,100<ue.Ga?ue.Ga=100:0>ue.Ga&&(ue.Ga=0)}Wu(p,R)||(k=p.a)}}else k=p.a}k==0&&ye.Oa!=null&&ye.Oa.fd&&(k=ts(ye.ba))}ye=k}pe=ye!=0?null:11>pe?me.f.RGBA.eb:me.f.kb.y}else pe=null;return pe};var Fd=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function f(b,T){for(var Y="",$=0;$<4;$++)Y+=String.fromCharCode(b[T++]);return Y}function c(b,T){return(b[T+0]<<0|b[T+1]<<8|b[T+2]<<16)>>>0}function y(b,T){return(b[T+0]<<0|b[T+1]<<8|b[T+2]<<16|b[T+3]<<24)>>>0}new h;var C=[0],A=[0],B=[],v=new h,i=t,g=function(b,T){var Y={},$=0,S=!1,W=0,oe=0;if(Y.frames=[],!function(_,x,V,J){for(var ke=0;ke<J;ke++)if(_[x+ke]!=V.charCodeAt(ke))return!0;return!1}(b,T,"RIFF",4)){var te,he;for(y(b,T+=4),T+=8;T<b.length;){var le=f(b,T),H=y(b,T+=4);T+=4;var P=H+(1&H);switch(le){case"VP8 ":case"VP8L":Y.frames[$]===void 0&&(Y.frames[$]={}),(m=Y.frames[$]).src_off=S?oe:T-8,m.src_size=W+H+8,$++,S&&(S=!1,W=0,oe=0);break;case"VP8X":(m=Y.header={}).feature_flags=b[T];var X=T+4;m.canvas_width=1+c(b,X),X+=3,m.canvas_height=1+c(b,X),X+=3;break;case"ALPH":S=!0,W=P+8,oe=T-8;break;case"ANIM":(m=Y.header).bgcolor=y(b,T),X=T+4,m.loop_count=(te=b)[(he=X)+0]<<0|te[he+1]<<8,X+=2;break;case"ANMF":var q,m;(m=Y.frames[$]={}).offset_x=2*c(b,T),T+=3,m.offset_y=2*c(b,T),T+=3,m.width=1+c(b,T),T+=3,m.height=1+c(b,T),T+=3,m.duration=c(b,T),T+=3,q=b[T++],m.dispose=1&q,m.blend=q>>1&1}le!="ANMF"&&(T+=P)}return Y}}(i,0);g.response=i,g.rgbaoutput=!0,g.dataurl=!1;var w=g.header?g.header:null,U=g.frames?g.frames:null;if(w){w.loop_counter=w.loop_count,C=[w.canvas_height],A=[w.canvas_width];for(var I=0;I<U.length&&U[I].blend!=0;I++);}var Q=U[0],K=v.WebPDecodeRGBA(i,Q.src_off,Q.src_size,A,C);Q.rgba=K,Q.imgwidth=A[0],Q.imgheight=C[0];for(var E=0;E<A[0]*C[0]*4;E++)B[E]=K[E];return this.width=A,this.height=C,this.data=B,this}(function(t){var o=function(){return typeof Vc=="function"},a=function(C,A,B,v){var i=4,g=s;switch(v){case t.image_compression.FAST:i=1,g=l;break;case t.image_compression.MEDIUM:i=6,g=u;break;case t.image_compression.SLOW:i=9,g=h}C=n(C,A,B,g);var w=Vc(C,{level:i});return t.__addimage__.arrayBufferToBinaryString(w)},n=function(C,A,B,v){for(var i,g,w,U=C.length/A,I=new Uint8Array(C.length+U),Q=c(),K=0;K<U;K+=1){if(w=K*A,i=C.subarray(w,w+A),v)I.set(v(i,B,g),w+K);else{for(var E,b=Q.length,T=[];E<b;E+=1)T[E]=Q[E](i,B,g);var Y=y(T.concat());I.set(T[Y],w+K)}g=i}return I},r=function(C){var A=Array.apply([],C);return A.unshift(0),A},l=function(C,A){var B,v=[],i=C.length;v[0]=1;for(var g=0;g<i;g+=1)B=C[g-A]||0,v[g+1]=C[g]-B+256&255;return v},s=function(C,A,B){var v,i=[],g=C.length;i[0]=2;for(var w=0;w<g;w+=1)v=B&&B[w]||0,i[w+1]=C[w]-v+256&255;return i},u=function(C,A,B){var v,i,g=[],w=C.length;g[0]=3;for(var U=0;U<w;U+=1)v=C[U-A]||0,i=B&&B[U]||0,g[U+1]=C[U]+256-(v+i>>>1)&255;return g},h=function(C,A,B){var v,i,g,w,U=[],I=C.length;U[0]=4;for(var Q=0;Q<I;Q+=1)v=C[Q-A]||0,i=B&&B[Q]||0,g=B&&B[Q-A]||0,w=f(v,i,g),U[Q+1]=C[Q]-w+256&255;return U},f=function(C,A,B){if(C===A&&A===B)return C;var v=Math.abs(A-B),i=Math.abs(C-B),g=Math.abs(C+A-B-B);return v<=i&&v<=g?C:i<=g?A:B},c=function(){return[r,l,s,u,h]},y=function(C){var A=C.map(function(B){return B.reduce(function(v,i){return v+Math.abs(i)},0)});return A.indexOf(Math.min.apply(null,A))};t.processPNG=function(C,A,B,v){var i,g,w,U,I,Q,K,E,b,T,Y,$,S,W,oe,te=this.decode.FLATE_DECODE,he="";if(this.__addimage__.isArrayBuffer(C)&&(C=new Uint8Array(C)),this.__addimage__.isArrayBufferView(C)){if(C=(w=new Ik(C)).imgData,g=w.bits,i=w.colorSpace,I=w.colors,[4,6].indexOf(w.colorType)!==-1){if(w.bits===8){b=(E=w.pixelBitlength==32?new Uint32Array(w.decodePixels().buffer):w.pixelBitlength==16?new Uint16Array(w.decodePixels().buffer):new Uint8Array(w.decodePixels().buffer)).length,Y=new Uint8Array(b*w.colors),T=new Uint8Array(b);var le,H=w.pixelBitlength-w.bits;for(W=0,oe=0;W<b;W++){for(S=E[W],le=0;le<H;)Y[oe++]=S>>>le&255,le+=w.bits;T[W]=S>>>le&255}}if(w.bits===16){b=(E=new Uint32Array(w.decodePixels().buffer)).length,Y=new Uint8Array(b*(32/w.pixelBitlength)*w.colors),T=new Uint8Array(b*(32/w.pixelBitlength)),$=w.colors>1,W=0,oe=0;for(var P=0;W<b;)S=E[W++],Y[oe++]=S>>>0&255,$&&(Y[oe++]=S>>>16&255,S=E[W++],Y[oe++]=S>>>0&255),T[P++]=S>>>16&255;g=8}v!==t.image_compression.NONE&&o()?(C=a(Y,w.width*w.colors,w.colors,v),K=a(T,w.width,1,v)):(C=Y,K=T,te=void 0)}if(w.colorType===3&&(i=this.color_spaces.INDEXED,Q=w.palette,w.transparency.indexed)){var X=w.transparency.indexed,q=0;for(W=0,b=X.length;W<b;++W)q+=X[W];if((q/=255)===b-1&&X.indexOf(0)!==-1)U=[X.indexOf(0)];else if(q!==b){for(E=w.decodePixels(),T=new Uint8Array(E.length),W=0,b=E.length;W<b;W++)T[W]=X[E[W]];K=a(T,w.width,1)}}var m=function(_){var x;switch(_){case t.image_compression.FAST:x=11;break;case t.image_compression.MEDIUM:x=13;break;case t.image_compression.SLOW:x=14;break;default:x=12}return x}(v);return te===this.decode.FLATE_DECODE&&(he="/Predictor "+m+" "),he+="/Colors "+I+" /BitsPerComponent "+g+" /Columns "+w.width,(this.__addimage__.isArrayBuffer(C)||this.__addimage__.isArrayBufferView(C))&&(C=this.__addimage__.arrayBufferToBinaryString(C)),(K&&this.__addimage__.isArrayBuffer(K)||this.__addimage__.isArrayBufferView(K))&&(K=this.__addimage__.arrayBufferToBinaryString(K)),{alias:B,data:C,index:A,filter:te,decodeParameters:he,transparency:U,palette:Q,sMask:K,predictor:m,width:w.width,height:w.height,bitsPerComponent:g,colorSpace:i}}}})(pt.API),function(t){t.processGIF89A=function(o,a,n,r){var l=new $k(o),s=l.width,u=l.height,h=[];l.decodeAndBlitFrameRGBA(0,h);var f={data:h,width:s,height:u},c=new rc(100).encode(f,100);return t.processJPEG.call(this,c,a,n,r)},t.processGIF87A=t.processGIF89A}(pt.API),oa.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var o=0;o<t;o++){var a=this.datav.getUint8(this.pos++,!0),n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0);this.palette[o]={red:r,green:n,blue:a,quad:l}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},oa.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,o=this.width*this.height*4;this.data=new Uint8Array(o),this[t]()}catch(a){no.log("bit decode error:"+a)}},oa.prototype.bit1=function(){var t,o=Math.ceil(this.width/8),a=o%4;for(t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<o;r++)for(var l=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+8*r*4,u=0;u<8&&8*r+u<this.width;u++){var h=this.palette[l>>7-u&1];this.data[s+4*u]=h.blue,this.data[s+4*u+1]=h.green,this.data[s+4*u+2]=h.red,this.data[s+4*u+3]=255}a!==0&&(this.pos+=4-a)}},oa.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),o=t%4,a=this.height-1;a>=0;a--){for(var n=this.bottom_up?a:this.height-1-a,r=0;r<t;r++){var l=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+2*r*4,u=l>>4,h=15&l,f=this.palette[u];if(this.data[s]=f.blue,this.data[s+1]=f.green,this.data[s+2]=f.red,this.data[s+3]=255,2*r+1>=this.width)break;f=this.palette[h],this.data[s+4]=f.blue,this.data[s+4+1]=f.green,this.data[s+4+2]=f.red,this.data[s+4+3]=255}o!==0&&(this.pos+=4-o)}},oa.prototype.bit8=function(){for(var t=this.width%4,o=this.height-1;o>=0;o--){for(var a=this.bottom_up?o:this.height-1-o,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),l=a*this.width*4+4*n;if(r<this.palette.length){var s=this.palette[r];this.data[l]=s.red,this.data[l+1]=s.green,this.data[l+2]=s.blue,this.data[l+3]=255}else this.data[l]=255,this.data[l+1]=255,this.data[l+2]=255,this.data[l+3]=255}t!==0&&(this.pos+=4-t)}},oa.prototype.bit15=function(){for(var t=this.width%3,o=parseInt("11111",2),a=this.height-1;a>=0;a--){for(var n=this.bottom_up?a:this.height-1-a,r=0;r<this.width;r++){var l=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(l&o)/o*255|0,u=(l>>5&o)/o*255|0,h=(l>>10&o)/o*255|0,f=l>>15?255:0,c=n*this.width*4+4*r;this.data[c]=h,this.data[c+1]=u,this.data[c+2]=s,this.data[c+3]=f}this.pos+=t}},oa.prototype.bit16=function(){for(var t=this.width%3,o=parseInt("11111",2),a=parseInt("111111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,l=0;l<this.width;l++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var u=(s&o)/o*255|0,h=(s>>5&a)/a*255|0,f=(s>>11)/o*255|0,c=r*this.width*4+4*l;this.data[c]=f,this.data[c+1]=h,this.data[c+2]=u,this.data[c+3]=255}this.pos+=t}},oa.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var o=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),s=o*this.width*4+4*a;this.data[s]=l,this.data[s+1]=r,this.data[s+2]=n,this.data[s+3]=255}this.pos+=this.width%4}},oa.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var o=this.bottom_up?t:this.height-1-t,a=0;a<this.width;a++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),l=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),u=o*this.width*4+4*a;this.data[u]=l,this.data[u+1]=r,this.data[u+2]=n,this.data[u+3]=s}},oa.prototype.getData=function(){return this.data},function(t){t.processBMP=function(o,a,n,r){var l=new oa(o,!1),s=l.width,u=l.height,h={data:l.getData(),width:s,height:u},f=new rc(100).encode(h,100);return t.processJPEG.call(this,f,a,n,r)}}(pt.API),rf.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(o,a,n,r){var l=new rf(o),s=l.width,u=l.height,h={data:l.getData(),width:s,height:u},f=new rc(100).encode(h,100);return t.processJPEG.call(this,f,a,n,r)}}(pt.API),pt.API.processRGBA=function(t,o,a){for(var n=t.data,r=n.length,l=new Uint8Array(r/4*3),s=new Uint8Array(r/4),u=0,h=0,f=0;f<r;f+=4){var c=n[f],y=n[f+1],C=n[f+2],A=n[f+3];l[u++]=c,l[u++]=y,l[u++]=C,s[h++]=A}var B=this.__addimage__.arrayBufferToBinaryString(l);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:B,index:o,alias:a,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},pt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},kn=pt.API,lu=kn.getCharWidthsArray=function(t,o){var a,n,r=(o=o||{}).font||this.internal.getFont(),l=o.fontSize||this.internal.getFontSize(),s=o.charSpace||this.internal.getCharSpace(),u=o.widths?o.widths:r.metadata.Unicode.widths,h=u.fof?u.fof:1,f=o.kerning?o.kerning:r.metadata.Unicode.kerning,c=f.fof?f.fof:1,y=o.doKerning!==!1,C=0,A=t.length,B=0,v=u[0]||h,i=[];for(a=0;a<A;a++)n=t.charCodeAt(a),typeof r.metadata.widthOfString=="function"?i.push((r.metadata.widthOfGlyph(r.metadata.characterToGlyph(n))+s*(1e3/l)||0)/1e3):(C=y&&jt(f[n])==="object"&&!isNaN(parseInt(f[n][B],10))?f[n][B]/c:0,i.push((u[n]||v)/h+C)),B=n;return i},tf=kn.getStringUnitWidth=function(t,o){var a=(o=o||{}).fontSize||this.internal.getFontSize(),n=o.font||this.internal.getFont(),r=o.charSpace||this.internal.getCharSpace();return kn.processArabic&&(t=kn.processArabic(t)),typeof n.metadata.widthOfString=="function"?n.metadata.widthOfString(t,a,r)/a:lu.apply(this,arguments).reduce(function(l,s){return l+s},0)},of=function(t,o,a,n){for(var r=[],l=0,s=t.length,u=0;l!==s&&u+o[l]<a;)u+=o[l],l++;r.push(t.slice(0,l));var h=l;for(u=0;l!==s;)u+o[l]>n&&(r.push(t.slice(h,l)),u=0,h=l),u+=o[l],l++;return h!==l&&r.push(t.slice(h,l)),r},lf=function(t,o,a){a||(a={});var n,r,l,s,u,h,f,c=[],y=[c],C=a.textIndent||0,A=0,B=0,v=t.split(" "),i=lu.apply(this,[" ",a])[0];if(h=a.lineIndent===-1?v[0].length+2:a.lineIndent||0){var g=Array(h).join(" "),w=[];v.map(function(I){(I=I.split(/\s*\n/)).length>1?w=w.concat(I.map(function(Q,K){return(K&&Q.length?`
234
234
  `:"")+Q})):w.push(I[0])}),v=w,h=tf.apply(this,[g,a])}for(l=0,s=v.length;l<s;l++){var U=0;if(n=v[l],h&&n[0]==`
235
- `&&(n=n.substr(1),U=1),C+A+(B=(r=lu.apply(this,[n,a])).reduce(function(I,Q){return I+Q},0))>o||U){if(B>o){for(u=of.apply(this,[n,r,o-(C+A),o]),c.push(u.shift()),c=[u.pop()];u.length;)y.push([u.shift()]);B=r.slice(n.length-(c[0]?c[0].length:0)).reduce(function(I,Q){return I+Q},0)}else c=[n];y.push(c),C=B+h,A=i}else c.push(n),C+=A+B,A=i}return f=h?function(I,Q){return(Q?g:"")+I.join(" ")}:function(I){return I.join(" ")},y.map(f)},kn.splitTextToSize=function(t,o,a){var n,r=(a=a||{}).fontSize||this.internal.getFontSize(),l=(function(c){if(c.widths&&c.kerning)return{widths:c.widths,kerning:c.kerning};var y=this.internal.getFont(c.fontName,c.fontStyle);return y.metadata.Unicode?{widths:y.metadata.Unicode.widths||{0:1},kerning:y.metadata.Unicode.kerning||{}}:{font:y.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,a);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var s=1*this.internal.scaleFactor*o/r;l.textIndent=a.textIndent?1*a.textIndent*this.internal.scaleFactor/r:0,l.lineIndent=a.lineIndent;var u,h,f=[];for(u=0,h=n.length;u<h;u++)f=f.concat(lf.apply(this,[n[u],s,l]));return f},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var o="klmnopqrstuvwxyz",a={},n={},r=0;r<o.length;r++)a[o[r]]="0123456789abcdef"[r],n["0123456789abcdef"[r]]=o[r];var l=function(y){return"0x"+parseInt(y,10).toString(16)},s=t.__fontmetrics__.compress=function(y){var C,A,B,v,i=["{"];for(var g in y){if(C=y[g],isNaN(parseInt(g,10))?A="'"+g+"'":(g=parseInt(g,10),A=(A=l(g).slice(2)).slice(0,-1)+n[A.slice(-1)]),typeof C=="number")C<0?(B=l(C).slice(3),v="-"):(B=l(C).slice(2),v=""),B=v+B.slice(0,-1)+n[B.slice(-1)];else{if(jt(C)!=="object")throw new Error("Don't know what to do with value type "+jt(C)+".");B=s(C)}i.push(A+B)}return i.push("}"),i.join("")},u=t.__fontmetrics__.uncompress=function(y){if(typeof y!="string")throw new Error("Invalid argument passed to uncompress.");for(var C,A,B,v,i={},g=1,w=i,U=[],I="",Q="",K=y.length-1,E=1;E<K;E+=1)(v=y[E])=="'"?C?(B=C.join(""),C=void 0):C=[]:C?C.push(v):v=="{"?(U.push([w,B]),w={},B=void 0):v=="}"?((A=U.pop())[0][A[1]]=w,B=void 0,w=A[0]):v=="-"?g=-1:B===void 0?a.hasOwnProperty(v)?(I+=a[v],B=parseInt(I,16)*g,g=1,I=""):I+=v:a.hasOwnProperty(v)?(Q+=a[v],w[B]=parseInt(Q,16)*g,g=1,B=void 0,Q=""):Q+=v;return i},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},c={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(y){var C=y.font,A=c.Unicode[C.postScriptName];A&&(C.metadata.Unicode={},C.metadata.Unicode.widths=A.widths,C.metadata.Unicode.kerning=A.kerning);var B=f.Unicode[C.postScriptName];B&&(C.metadata.Unicode.encoding=B,C.encoding=B.codePages[0])}])}(pt.API),function(t){var o=function(a){for(var n=a.length,r=new Uint8Array(n),l=0;l<n;l++)r[l]=a.charCodeAt(l);return r};t.API.events.push(["addFont",function(a){var n=void 0,r=a.font,l=a.instance;if(!r.isStandardFont){if(l===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(n=l.existsFileInVFS(r.postScriptName)===!1?l.loadFile(r.postScriptName):l.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(s,u){u=/^\x00\x01\x00\x00/.test(u)?o(u):o(Is(u)),s.metadata=t.API.TTFFont.open(u),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(r,n)}}])}(pt),function(t){function o(){return(yt.canvg?Promise.resolve(yt.canvg):Promise.resolve().then(()=>require("./index.es-ukvlAq4C.cjs"))).catch(function(a){return Promise.reject(new Error("Could not load canvg: "+a))}).then(function(a){return a.default?a.default:a})}pt.API.addSvgAsImage=function(a,n,r,l,s,u,h,f){if(isNaN(n)||isNaN(r))throw no.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(l)||isNaN(s))throw no.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=l,c.height=s;var y=c.getContext("2d");y.fillStyle="#fff",y.fillRect(0,0,c.width,c.height);var C={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return o().then(function(B){return B.fromString(y,a,C)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(B){return B.render(C)}).then(function(){A.addImage(c.toDataURL("image/jpeg",1),n,r,l,s,h,f)})}}(),pt.API.putTotalPages=function(t){var o,a=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(o=new RegExp(t,"g"),a=this.internal.getNumberOfPages()):(o=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),a=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var r=0;r<this.internal.pages[n].length;r++)this.internal.pages[n][r]=this.internal.pages[n][r].replace(o,a);return this},pt.API.viewerPreferences=function(t,o){var a;t=t||{},o=o||!1;var n,r,l,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),h=[],f=0,c=0,y=0;function C(B,v){var i,g=!1;for(i=0;i<B.length;i+=1)B[i]===v&&(g=!0);return g}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),a=this.internal.viewerpreferences.configuration,t==="reset"||o===!0){var A=u.length;for(y=0;y<A;y+=1)a[u[y]].value=a[u[y]].defaultValue,a[u[y]].explicitSet=!1}if(jt(t)==="object"){for(r in t)if(l=t[r],C(u,r)&&l!==void 0){if(a[r].type==="boolean"&&typeof l=="boolean")a[r].value=l;else if(a[r].type==="name"&&C(a[r].valueSet,l))a[r].value=l;else if(a[r].type==="integer"&&Number.isInteger(l))a[r].value=l;else if(a[r].type==="array"){for(f=0;f<l.length;f+=1)if(n=!0,l[f].length===1&&typeof l[f][0]=="number")h.push(String(l[f]-1));else if(l[f].length>1){for(c=0;c<l[f].length;c+=1)typeof l[f][c]!="number"&&(n=!1);n===!0&&h.push([l[f][0]-1,l[f][1]-1].join(" "))}a[r].value="["+h.join(" ")+"]"}else a[r].value=a[r].defaultValue;a[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var B,v=[];for(B in a)a[B].explicitSet===!0&&(a[B].type==="name"?v.push("/"+B+" /"+a[B].value):v.push("/"+B+" "+a[B].value));v.length!==0&&this.internal.write(`/ViewerPreferences
235
+ `&&(n=n.substr(1),U=1),C+A+(B=(r=lu.apply(this,[n,a])).reduce(function(I,Q){return I+Q},0))>o||U){if(B>o){for(u=of.apply(this,[n,r,o-(C+A),o]),c.push(u.shift()),c=[u.pop()];u.length;)y.push([u.shift()]);B=r.slice(n.length-(c[0]?c[0].length:0)).reduce(function(I,Q){return I+Q},0)}else c=[n];y.push(c),C=B+h,A=i}else c.push(n),C+=A+B,A=i}return f=h?function(I,Q){return(Q?g:"")+I.join(" ")}:function(I){return I.join(" ")},y.map(f)},kn.splitTextToSize=function(t,o,a){var n,r=(a=a||{}).fontSize||this.internal.getFontSize(),l=(function(c){if(c.widths&&c.kerning)return{widths:c.widths,kerning:c.kerning};var y=this.internal.getFont(c.fontName,c.fontStyle);return y.metadata.Unicode?{widths:y.metadata.Unicode.widths||{0:1},kerning:y.metadata.Unicode.kerning||{}}:{font:y.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,a);n=Array.isArray(t)?t:String(t).split(/\r?\n/);var s=1*this.internal.scaleFactor*o/r;l.textIndent=a.textIndent?1*a.textIndent*this.internal.scaleFactor/r:0,l.lineIndent=a.lineIndent;var u,h,f=[];for(u=0,h=n.length;u<h;u++)f=f.concat(lf.apply(this,[n[u],s,l]));return f},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var o="klmnopqrstuvwxyz",a={},n={},r=0;r<o.length;r++)a[o[r]]="0123456789abcdef"[r],n["0123456789abcdef"[r]]=o[r];var l=function(y){return"0x"+parseInt(y,10).toString(16)},s=t.__fontmetrics__.compress=function(y){var C,A,B,v,i=["{"];for(var g in y){if(C=y[g],isNaN(parseInt(g,10))?A="'"+g+"'":(g=parseInt(g,10),A=(A=l(g).slice(2)).slice(0,-1)+n[A.slice(-1)]),typeof C=="number")C<0?(B=l(C).slice(3),v="-"):(B=l(C).slice(2),v=""),B=v+B.slice(0,-1)+n[B.slice(-1)];else{if(jt(C)!=="object")throw new Error("Don't know what to do with value type "+jt(C)+".");B=s(C)}i.push(A+B)}return i.push("}"),i.join("")},u=t.__fontmetrics__.uncompress=function(y){if(typeof y!="string")throw new Error("Invalid argument passed to uncompress.");for(var C,A,B,v,i={},g=1,w=i,U=[],I="",Q="",K=y.length-1,E=1;E<K;E+=1)(v=y[E])=="'"?C?(B=C.join(""),C=void 0):C=[]:C?C.push(v):v=="{"?(U.push([w,B]),w={},B=void 0):v=="}"?((A=U.pop())[0][A[1]]=w,B=void 0,w=A[0]):v=="-"?g=-1:B===void 0?a.hasOwnProperty(v)?(I+=a[v],B=parseInt(I,16)*g,g=1,I=""):I+=v:a.hasOwnProperty(v)?(Q+=a[v],w[B]=parseInt(Q,16)*g,g=1,B=void 0,Q=""):Q+=v;return i},h={codePages:["WinAnsiEncoding"],WinAnsiEncoding:u("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},f={Unicode:{Courier:h,"Courier-Bold":h,"Courier-BoldOblique":h,"Courier-Oblique":h,Helvetica:h,"Helvetica-Bold":h,"Helvetica-BoldOblique":h,"Helvetica-Oblique":h,"Times-Roman":h,"Times-Bold":h,"Times-BoldItalic":h,"Times-Italic":h}},c={Unicode:{"Courier-Oblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":u("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":u("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:u("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":u("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:u("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":u("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":u("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":u("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":u("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};t.events.push(["addFont",function(y){var C=y.font,A=c.Unicode[C.postScriptName];A&&(C.metadata.Unicode={},C.metadata.Unicode.widths=A.widths,C.metadata.Unicode.kerning=A.kerning);var B=f.Unicode[C.postScriptName];B&&(C.metadata.Unicode.encoding=B,C.encoding=B.codePages[0])}])}(pt.API),function(t){var o=function(a){for(var n=a.length,r=new Uint8Array(n),l=0;l<n;l++)r[l]=a.charCodeAt(l);return r};t.API.events.push(["addFont",function(a){var n=void 0,r=a.font,l=a.instance;if(!r.isStandardFont){if(l===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");if(typeof(n=l.existsFileInVFS(r.postScriptName)===!1?l.loadFile(r.postScriptName):l.getFileFromVFS(r.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+r.postScriptName+"').");(function(s,u){u=/^\x00\x01\x00\x00/.test(u)?o(u):o(Is(u)),s.metadata=t.API.TTFFont.open(u),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(r,n)}}])}(pt),function(t){function o(){return(yt.canvg?Promise.resolve(yt.canvg):Promise.resolve().then(()=>require("./index.es-QZA3uBzC.cjs"))).catch(function(a){return Promise.reject(new Error("Could not load canvg: "+a))}).then(function(a){return a.default?a.default:a})}pt.API.addSvgAsImage=function(a,n,r,l,s,u,h,f){if(isNaN(n)||isNaN(r))throw no.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(l)||isNaN(s))throw no.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=l,c.height=s;var y=c.getContext("2d");y.fillStyle="#fff",y.fillRect(0,0,c.width,c.height);var C={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return o().then(function(B){return B.fromString(y,a,C)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(B){return B.render(C)}).then(function(){A.addImage(c.toDataURL("image/jpeg",1),n,r,l,s,h,f)})}}(),pt.API.putTotalPages=function(t){var o,a=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(o=new RegExp(t,"g"),a=this.internal.getNumberOfPages()):(o=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),a=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var n=1;n<=this.internal.getNumberOfPages();n++)for(var r=0;r<this.internal.pages[n].length;r++)this.internal.pages[n][r]=this.internal.pages[n][r].replace(o,a);return this},pt.API.viewerPreferences=function(t,o){var a;t=t||{},o=o||!1;var n,r,l,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},u=Object.keys(s),h=[],f=0,c=0,y=0;function C(B,v){var i,g=!1;for(i=0;i<B.length;i+=1)B[i]===v&&(g=!0);return g}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),a=this.internal.viewerpreferences.configuration,t==="reset"||o===!0){var A=u.length;for(y=0;y<A;y+=1)a[u[y]].value=a[u[y]].defaultValue,a[u[y]].explicitSet=!1}if(jt(t)==="object"){for(r in t)if(l=t[r],C(u,r)&&l!==void 0){if(a[r].type==="boolean"&&typeof l=="boolean")a[r].value=l;else if(a[r].type==="name"&&C(a[r].valueSet,l))a[r].value=l;else if(a[r].type==="integer"&&Number.isInteger(l))a[r].value=l;else if(a[r].type==="array"){for(f=0;f<l.length;f+=1)if(n=!0,l[f].length===1&&typeof l[f][0]=="number")h.push(String(l[f]-1));else if(l[f].length>1){for(c=0;c<l[f].length;c+=1)typeof l[f][c]!="number"&&(n=!1);n===!0&&h.push([l[f][0]-1,l[f][1]-1].join(" "))}a[r].value="["+h.join(" ")+"]"}else a[r].value=a[r].defaultValue;a[r].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var B,v=[];for(B in a)a[B].explicitSet===!0&&(a[B].type==="name"?v.push("/"+B+" /"+a[B].value):v.push("/"+B+" "+a[B].value));v.length!==0&&this.internal.write(`/ViewerPreferences
236
236
  <<
237
237
  `+v.join(`
238
238
  `)+`
@@ -329,7 +329,7 @@ Provide an array of objects of type:
329
329
  ${Ue?`<div>${Ue}</div>`:""}
330
330
  </div>`,i.value.style.chart.tooltip.showValue&&(ve+=`<div>${i.value.translations.value}: <b>${i.value.style.chart.tooltip.prefix}${[void 0,NaN,null].includes(Ae.value)?"-":Ae.value.toFixed(i.value.style.chart.tooltip.roundingValue)}${i.value.style.chart.tooltip.suffix}</b></div>`),i.value.style.chart.tooltip.showPercentage&&(ve+=`<div>${i.value.translations.percentageToTotal} : <b>${isNaN(Ae.value/V.value)?"-":`${(Ae.value/V.value*100).toFixed(i.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`,Ae.isChild&&(ve+=`<div>${i.value.translations.percentageToSerie}: <b>${isNaN(Ae.value/Ae.parentValue)?"-":`${(Ae.value/Ae.parentValue*100).toFixed(i.value.style.chart.tooltip.roundingPercentage)}`}%</b></div>`)),f.value=`<div style="text-align:left">${ve}</div>`)}function N(Ae){if(isNaN(Ae)||!i.value.style.chart.layout.bars.dataLabels.value.show)return"";const se=Ge({p:i.value.style.chart.layout.bars.dataLabels.value.prefix,v:Ae,s:i.value.style.chart.layout.bars.dataLabels.value.suffix,r:i.value.style.chart.layout.bars.dataLabels.value.roundingValue}),ve=`(${J(Ae,!0,i.value.style.chart.layout.bars.dataLabels.percentage.roundingPercentage)})`;return`${se}${i.value.style.chart.layout.bars.dataLabels.percentage.show?` ${ve}`:""}`}const j=e.computed(()=>{const Ae=[i.value.translations.parentName,i.value.translations.value,i.value.translations.percentageToTotal,i.value.translations.childName,i.value.translations.value,i.value.translations.percentageToSerie,i.value.translations.percentageToTotal],se=ke.value.map(ve=>ve.isChild?ve.isFirstChild?{color:ve.color,parentName:ve.parentName,parentValue:ve.parentValue,percentageToTotal:ve.parentValue/V.value,childName:ve.name,childValue:ve.value,childPercentageToParent:ve.value/ve.parentValue,childPercentageToTotal:ve.value/V.value}:{color:"",parentName:"",parentValue:"",percentageToTotal:"",childName:ve.name,childValue:ve.value,childPercentageToParent:ve.value/ve.parentValue,childPercentageToTotal:ve.value/V.value}:{color:ve.color,parentName:ve.name,parentValue:ve.value,percentageToTotal:ve.value/V.value,childName:"",childValue:"",childPercentageToParent:"",childPercentageToTotal:""});return{head:Ae,body:se}});function O(){const Ae=[[i.value.style.chart.title.text],[i.value.style.chart.title.subtitle.text],[""]],se=j.value.head,ve=j.value.body.map(Ve=>[Ve.parentName,Ve.parentValue,Ve.percentageToTotal,Ve.childName,Ve.childValue,Ve.childPercentageToParent,Ve.childPercentageToTotal]),Ce=Ae.concat([se]).concat(ve),Ue=eo(Ce);Zt({csvContent:Ue,title:i.value.style.chart.title.text||"vue-ui-vertical-bar"})}const ce=e.ref(!1);function re(Ae){ce.value=Ae,C.value+=1}function ie(){$.value.showTable=!$.value.showTable}function G(){$.value.sortDesc=!$.value.sortDesc,q()}function ne(){$.value.showTooltip=!$.value.showTooltip}return o({getData:z,recalculateHeight:q,generatePdf:U,generateCsv:O,generateImage:I,toggleTable:ie,toggleSort:G,toggleTooltip:ne}),(Ae,se)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-vertical-bar ${ce.value?"vue-data-ui-wrapper-fullscreen":""} ${i.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"verticalBarChart",ref:A,id:`vue-ui-vertical-bar_${s.value}`,style:e.normalizeStyle(`font-family:${i.value.style.fontFamily};width:100%; text-align:center;${i.value.style.chart.title.text?"":"padding-top:36px"};background:${i.value.style.chart.backgroundColor};${i.value.responsive?"height: 100%":""}`)},[i.value.style.chart.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:B,style:e.normalizeStyle(`width:100%;background:${i.value.style.chart.backgroundColor};padding-bottom:12px`)},[e.createVNode(Xt,{config:{title:{cy:"vertical-bar-div-title",...i.value.style.chart.title},subtitle:{cy:"vertical-bar-div-subtitle",...i.value.style.chart.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),i.value.userOptions.show&&l.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:u,key:`user_options_${C.value}`,backgroundColor:i.value.style.chart.backgroundColor,color:i.value.style.chart.color,isImaging:e.unref(w),isPrinting:e.unref(g),uid:s.value,hasTooltip:i.value.userOptions.buttons.tooltip&&i.value.style.chart.tooltip.show,hasPdf:i.value.userOptions.buttons.pdf,hasImg:i.value.userOptions.buttons.img,hasXls:i.value.userOptions.buttons.csv,hasTable:i.value.userOptions.buttons.table,hasSort:i.value.userOptions.buttons.sort,hasFullscreen:i.value.userOptions.buttons.fullscreen,isFullscreen:ce.value,isTooltip:$.value.showTooltip,titles:{...i.value.userOptions.buttonTitles},chartElement:A.value,onToggleFullscreen:re,onGeneratePdf:e.unref(U),onGenerateCsv:O,onGenerateImage:e.unref(I),onToggleTable:ie,onToggleSort:G,onToggleTooltip:ne},e.createSlots({_:2},[Ae.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,Ae.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,Ae.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,Ae.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,Ae.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,Ae.$slots.optionLabels?{name:"optionLabels",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionLabels",{},void 0,!0)]),key:"5"}:void 0,Ae.$slots.optionSort?{name:"optionSort",fn:e.withCtx(()=>[e.renderSlot(Ae.$slots,"optionSort",{},void 0,!0)]),key:"6"}:void 0,Ae.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:ve,isFullscreen:Ce})=>[e.renderSlot(Ae.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:ve,isFullscreen:Ce})),void 0,!0)]),key:"7"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasSort","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),i.value.style.chart.legend.show&&i.value.style.chart.legend.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartLegend",ref:v},[e.createVNode(Zo,{legendSet:W.value,config:oe.value,onClickMarker:se[0]||(se[0]=({legend:ve})=>_(ve.id))},{item:e.withCtx(({legend:ve})=>[e.createElementVNode("div",{"data-cy-legend-item":"",onClick:Ce=>_(ve.id),style:e.normalizeStyle(`opacity:${m.value.includes(ve.id)?.5:1}`)},e.toDisplayString(ve.name)+": "+e.toDisplayString(i.value.style.chart.legend.prefix)+e.toDisplayString(ve.value.toFixed(i.value.style.chart.legend.roundingValue))+e.toDisplayString(i.value.style.chart.legend.suffix),13,JI)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":ce.value,"vue-data-ui-fulscreen--off":!ce.value}),viewBox:`0 0 ${P.value.width<=0?10:P.value.width} ${X.value.fullHeight<=0?10:X.value.fullHeight}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${i.value.style.chart.backgroundColor};color:${i.value.style.chart.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(ve,Ce)=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`vertical_bar_gradient_${s.value}_${Ce}`},[e.createElementVNode("stop",{offset:"0%","stop-color":ve.color},null,8,t9),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(Lt)(ve.color,.03)}${e.unref(Xe)[100-i.value.style.chart.layout.bars.gradientIntensity]}`},null,8,o9)],8,e9))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(ve,Ce)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:X.value.left,y:X.value.top+(he.value+te.value)*Ce,width:ge(ve.value)<=0?1e-4:ge(ve.value),height:te.value<=0?1e-4:te.value,fill:i.value.style.chart.layout.bars.underlayerColor,rx:i.value.style.chart.layout.bars.borderRadius,class:e.normalizeClass({animated:i.value.useCssAnimation})},null,10,l9)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ke.value,(ve,Ce)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:X.value.left,y:X.value.top+(he.value+te.value)*Ce,width:ge(ve.value)<=0?1e-4:ge(ve.value),height:te.value<=0?1e-4:te.value,fill:i.value.style.chart.layout.bars.useGradient?`url(#vertical_bar_gradient_${s.value}_${Ce})`:`${ve.color}${e.unref(Xe)[i.value.style.chart.layout.bars.fillOpacity]}`,rx:i.value.style.chart.layout.bars.borderRadius,stroke:i.value.style.chart.layout.bars.useStroke?ve.color:"none","stroke-width":i.value.style.chart.layout.bars.useStroke?i.value.style.chart.layout.bars.strokeWidth:0,class:e.normalizeClass({animated:i.value.useCssAnimation})},null,10,a9),(!ve.isChild||ve.isLastChild)&&i.value.style.chart.layout.separators.show&&Ce!==ke.value.length-1?(e.openBlock(),e.createElementBlock("line",{key:0,x1:0,x2:X.value.left,y1:te.value+he.value/2+X.value.top+(he.value+te.value)*Ce,y2:te.value+he.value/2+X.value.top+(he.value+te.value)*Ce,stroke:i.value.style.chart.layout.separators.color,"stroke-width":i.value.style.chart.layout.separators.strokeWidth,"stroke-linecap":"round"},null,8,r9)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:Z(ve.value)+3+i.value.style.chart.layout.bars.dataLabels.offsetX,y:X.value.top+(he.value+te.value)*Ce+te.value/2+i.value.style.chart.layout.bars.dataLabels.fontSize/2,"text-anchor":"start","font-size":i.value.style.chart.layout.bars.dataLabels.fontSize,fill:i.value.style.chart.layout.bars.dataLabels.color,"font-weight":i.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal"},e.toDisplayString(N(ve.value)),9,n9),(ve.isChild||!ve.hasChildren)&&i.value.style.chart.layout.bars.nameLabels.show?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"end",x:X.value.left-3+i.value.style.chart.layout.bars.nameLabels.offsetX,y:X.value.top+(he.value+te.value)*Ce+te.value/2+i.value.style.chart.layout.bars.nameLabels.fontSize/2,"font-size":i.value.style.chart.layout.bars.nameLabels.fontSize,fill:i.value.style.chart.layout.bars.nameLabels.color,"font-weight":i.value.style.chart.layout.bars.nameLabels.bold?"bold":"normal"},e.toDisplayString(ve.name),9,s9)):e.createCommentVNode("",!0),ve.isChild&&ve.childIndex===0&&i.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:2,x:3+i.value.style.chart.layout.bars.parentLabels.offsetX,y:ee(ve,Ce).y,"font-size":i.value.style.chart.layout.bars.parentLabels.fontSize,fill:i.value.style.chart.layout.bars.parentLabels.color,"font-weight":i.value.style.chart.layout.bars.parentLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(ee(ve,Ce).name),9,i9)):e.createCommentVNode("",!0),ve.isChild&&ve.childIndex===0&&i.value.style.chart.layout.bars.parentLabels.show?(e.openBlock(),e.createElementBlock("text",{key:3,x:3+i.value.style.chart.layout.bars.parentLabels.offsetX,y:ee(ve,Ce).y+i.value.style.chart.layout.bars.parentLabels.fontSize+6,"font-size":i.value.style.chart.layout.bars.parentLabels.fontSize,fill:i.value.style.chart.layout.bars.parentLabels.color,"font-weight":i.value.style.chart.layout.bars.dataLabels.bold?"bold":"normal","text-anchor":"start"},e.toDisplayString(N(ee(ve,Ce).value)),9,u9)):e.createCommentVNode("",!0),e.createElementVNode("rect",{"data-cy-trap":"",x:0,y:X.value.top+(he.value+te.value)*Ce-he.value/2,width:P.value.width<=0?1e-4:P.value.width,height:te.value+he.value<=0?1e-4:te.value+he.value,fill:D.value===ve.id?`${i.value.style.chart.layout.highlighter.color}${e.unref(Xe)[i.value.style.chart.layout.highlighter.opacity]}`:"transparent",onMouseenter:Ue=>M(ve,Ce),onMouseleave:se[1]||(se[1]=Ue=>{y.value=null,h.value=!1,D.value=null})},null,40,A9)]))),256)),e.renderSlot(Ae.$slots,"svg",{svg:P.value},void 0,!0)],14,ZI)):e.createCommentVNode("",!0),l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:4,config:{type:"verticalBar",style:{backgroundColor:i.value.style.chart.backgroundColor,verticalBar:{axis:{color:"#CCCCCC"},color:"#CCCCCC"}}}},null,8,["config"])),i.value.style.chart.legend.show&&i.value.style.chart.legend.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:5,ref_key:"chartLegend",ref:v},[e.createVNode(Zo,{legendSet:W.value,config:oe.value,onClickMarker:se[2]||(se[2]=({legend:ve})=>_(ve.id))},{item:e.withCtx(({legend:ve})=>[e.createElementVNode("div",{onClick:Ce=>_(ve.id),style:e.normalizeStyle(`opacity:${m.value.includes(ve.id)?.5:1}`)},e.toDisplayString(ve.name)+" : "+e.toDisplayString(i.value.style.chart.legend.prefix)+e.toDisplayString(ve.value.toFixed(i.value.style.chart.legend.roundingValue))+e.toDisplayString(i.value.style.chart.legend.suffix),13,c9)]),_:1},8,["legendSet","config"])],512)):e.createCommentVNode("",!0),e.renderSlot(Ae.$slots,"legend",{legend:W.value},void 0,!0),e.createVNode(Oo,{show:$.value.showTooltip&&h.value&&m.value.length<n.dataset.length,backgroundColor:i.value.style.chart.tooltip.backgroundColor,color:i.value.style.chart.tooltip.color,borderRadius:i.value.style.chart.tooltip.borderRadius,borderColor:i.value.style.chart.tooltip.borderColor,borderWidth:i.value.style.chart.tooltip.borderWidth,fontSize:i.value.style.chart.tooltip.fontSize,backgroundOpacity:i.value.style.chart.tooltip.backgroundOpacity,parent:A.value,content:f.value,isCustom:i.value.style.chart.tooltip.customFormat&&typeof i.value.style.chart.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(Ae.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...fe.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(Ae.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...fe.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),l.value?(e.openBlock(),e.createBlock(lo,{key:6,hideDetails:"",config:{open:$.value.showTable,maxHeight:1e4,body:{backgroundColor:i.value.style.chart.backgroundColor,color:i.value.style.chart.color},head:{backgroundColor:i.value.style.chart.backgroundColor,color:i.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:K,class:"vue-ui-vertical-bar-table"},[e.createElementVNode("div",d9,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${i.value.table.th.backgroundColor};`),onClick:se[3]||(se[3]=ve=>$.value.showTable=!1),onKeypress:se[4]||(se[4]=e.withKeys(ve=>$.value.showTable=!1,["enter"]))},[e.createVNode(bt,{name:"close",stroke:i.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%","container-type":"inline-size"},class:e.normalizeClass({"vue-ui-responsive":E.value})},[e.createElementVNode("table",h9,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:i.value.table.th.backgroundColor,color:i.value.table.th.color,outline:i.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(i.value.style.chart.title.text)+" ",1),i.value.style.chart.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",f9,e.toDisplayString(i.value.style.chart.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value.head,ve=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${i.value.table.th.outline}`)},[e.createElementVNode("div",v9,e.toDisplayString(ve),1)],4))),256))],4),e.createElementVNode("tr",null,[e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"∑ "+e.toDisplayString(i.value.table.td.prefix)+e.toDisplayString(isNaN(V.value)?"":V.value.toFixed(i.value.table.td.roundingValue))+e.toDisplayString(i.value.table.td.suffix),5),e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},"100%",4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline}`)},null,4),e.createElementVNode("th",{style:e.normalizeStyle(`background:${i.value.table.th.backgroundColor};color:${i.value.table.th.color};outline:${i.value.table.th.outline}`)},null,4)])]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(j.value.body,(ve,Ce)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":Ce%2===0,"vue-ui-data-table__tbody__row-odd":Ce%2!==0}),style:e.normalizeStyle(`background:${i.value.table.td.backgroundColor};color:${i.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":j.value.head[0]??""},[e.createElementVNode("div",p9,[ve.color?(e.openBlock(),e.createElementBlock("span",{key:0,style:e.normalizeStyle(`color:${ve.color};margin-right:3px`)},"⬤",4)):e.createCommentVNode("",!0),e.createElementVNode("span",null,e.toDisplayString(ve.parentName),1)])],12,g9),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline}`),"data-cell":j.value.head[1]??""},[e.createElementVNode("div",m9,e.toDisplayString(i.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(ve.parentValue)?"":ve.parentValue.toFixed(i.value.table.td.roundingValue))+e.toDisplayString(i.value.table.td.suffix),1)],12,y9),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline}`),"data-cell":j.value.head[2]??""},[e.createElementVNode("div",k9,e.toDisplayString(["",NaN,void 0].includes(ve.percentageToTotal)?"":`${(ve.percentageToTotal*100).toFixed(i.value.table.td.roundingPercentage)}%`),1)],12,b9),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline}`),"data-cell":j.value.head[3]??""},[e.createElementVNode("div",w9,e.toDisplayString(ve.childName),1)],12,C9),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline}`),"data-cell":j.value.head[4]??""},[e.createElementVNode("div",x9,e.toDisplayString(i.value.table.td.prefix)+e.toDisplayString(["",NaN,void 0].includes(ve.childValue)?"":ve.childValue.toFixed(i.value.table.td.roundingValue))+e.toDisplayString(i.value.table.td.suffix),1)],12,B9),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline}`),"data-cell":j.value.head[5]??""},[e.createElementVNode("div",N9,e.toDisplayString(["",NaN,void 0].includes(ve.childPercentageToParent)?"":`${(ve.childPercentageToParent*100).toFixed(i.value.table.td.roundingPercentage)}%`),1)],12,F9),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${i.value.table.td.outline}`),"data-cell":j.value.head[6]??""},[e.createElementVNode("div",S9,e.toDisplayString(["",NaN,void 0].includes(ve.childPercentageToTotal)?"":`${(ve.childPercentageToTotal*100).toFixed(i.value.table.td.roundingPercentage)}%`),1)],12,_9)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,YI))}},og=vt(L9,[["__scopeId","data-v-22e85059"]]),E9=Object.freeze(Object.defineProperty({__proto__:null,default:og},Symbol.toStringTag,{value:"Module"})),lg={__name:"vue-ui-screenshot",props:{config:{type:Object,default(){return{}}}},emits:["postImage"],setup(t,{expose:o,emit:a}){const n=t,{vue_ui_screenshot:r}=ft(),l=e.ref(`vue-ui-screenshot-${Math.random()}`),s=e.computed(()=>{if(!Object.keys(n.config||{}).length)return r;const H=Vn({defaultConfig:r,userConfig:n.config});return Qn(H)}),u=e.ref(null),h=e.ref(null),f=e.ref(null),c=e.ref(null),y=e.ref(null),C=e.ref(null),A=e.ref(null),B=e.ref(null),v=e.ref(null),i=e.ref(null),g=e.ref(null),w=e.ref(!1),U=e.ref(null);function I(){const H=document.createElement("DIV"),{innerWidth:P,innerHeight:X}=window;return H.style.position="fixed",H.style.top=`${X?X/2-s.value.style.captureArea.initialHeight/2:200}px`,H.style.left=`${P?P/2-s.value.style.captureArea.initialWidth/2:100}px`,H.style.width=`${s.value.style.captureArea.initialWidth}px`,H.style.height=`${s.value.style.captureArea.initialHeight}px`,H.style.background=s.value.style.captureArea.background,H.style.cursor="move",H.style.boxSizing="border-box",H.style.border=s.value.style.captureArea.border,H.style.resize="both",H.style.padding="none !important",H.style.margin="none !important",H.dataset.cy="screenshot-overlay",H}function Q(){u.value&&(clearTimeout(U.value),u.value.remove(),u.value=null)}function K(H){const P=document.createElement("DIV");P.classList.add("vue-ui-screenshot-info-text"),P.innerHTML=s.value.translations.info,P.dataset.html2canvasIgnore="true",P.dataset.cy="screenshot-info-text",P.style.background=s.value.style.info.background,P.style.color=s.value.style.info.color,P.style.fontWeight=s.value.style.info.bold?"bold":"normal",P.style.minWidth=`${s.value.style.info.minWidth}px`,P.style.left="50%",P.style.padding=`${s.value.style.info.padding}px`,P.style.position="absolute",P.style.textAlign="center",P.style.top=`${s.value.style.info.top}px`,P.style.transform="translateX(-50%)",P.style.borderRadius=`${s.value.style.info.borderRadius}px`,P.style.boxShadow=s.value.style.info.boxShadow,P.style.fontFamily=s.value.style.info.fontFamily,P.style.fontSize=`${s.value.style.info.fontSize}px`,P.style.border=s.value.style.info.border,P.style.userSelect="none";const X=document.createElement("BUTTON");X.classList.add("vue-ui-screenshot-close-button"),X.innerHTML='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 24 24" stroke-width="2.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M18 6l-12 12" /><path d="M6 6l12 12" /></svg>',X.style.outline="none",X.dataset.cy="screenshot-close-button",X.style.display="flex",X.style.cursor="pointer",X.style.borderRadius="50%",X.style.alignItems="center",X.style.position="absolute",X.style.justifyContent="center",X.style.transformOrigin="center",X.style.top=`${s.value.style.cancelButton.top}px`,X.style.right=`${s.value.style.cancelButton.right}px`,X.style.background=s.value.style.cancelButton.background,X.style.color=s.value.style.cancelButton.color,X.style.border=s.value.style.cancelButton.border,X.style.borderRadius=`${s.value.style.cancelButton.borderRadius}px`,X.style.height=`${s.value.style.cancelButton.size}px`,X.style.width=`${s.value.style.cancelButton.size}px`,X.addEventListener("click",Q),P.appendChild(X),H.appendChild(P)}function E(H){u.value&&(w.value=!0,H.touches?(C.value=H.touches[0].clientX,A.value=H.touches[0].clientY):(C.value=H.clientX,A.value=H.clientY),i.value=u.value.getBoundingClientRect().width,g.value=u.value.getBoundingClientRect().height,H.target.addEventListener("mousemove",b),H.target.addEventListener("touchmove",b))}function b(H){if(!u.value)return;let P,X;H.touches?(B.value=H.touches[0].clientX,P=H.touches[0].clientX,v.value=H.touches[0].clientY,X=H.touches[0].clientY):(B.value=H.clientX,P=H.clientX,v.value=H.clientY,X=H.clientY);const q=H.target.classList[0],m=u.value.style;switch(!0){case q==="vue-ui-screenshot-handle-nw":m.top=`${X}px`,m.left=`${P}px`,m.width=`${i.value+(C.value-B.value)}px`,m.height=`${g.value+(A.value-v.value)}px`;break;case q==="vue-ui-screenshot-handle-ne":m.top=`${X}px`,m.width=`${i.value+(B.value-C.value)}px`,m.height=`${g.value+(A.value-v.value)}px`;break;case q==="vue-ui-screenshot-handle-sw":m.left=`${P}px`,m.width=`${i.value+(C.value-B.value)}px`,m.height=`${g.value+(v.value-A.value)}px`;break;case q==="vue-ui-screenshot-handle-se":m.width=`${i.value+(B.value-C.value)}px`,m.height=`${g.value+(v.value-A.value)}px`;break}}function T(H){if(!u.value)return;H.stopPropagation();const P=Array.from(H.target.classList);P.includes("vue-ui-screenshot-handle-se")||P.includes("vue-ui-screenshot-handle-sw")||P.includes("vue-ui-screenshot-handle-nw")||P.includes("vue-ui-screenshot-handle-ne")||(w.value=!0,u.value.style.pointerEvents="auto",H.touches?(h.value=H.touches[0].clientX,f.value=H.touches[0].clientY):(h.value=H.clientX,f.value=H.clientY),c.value=h.value,y.value=f.value,document.addEventListener("mousemove",$),document.addEventListener("touchmove",$),document.addEventListener("mouseup",Y),document.addEventListener("touchend",Y))}function Y(){h.value=null,f.value=null,c.value=null,y.value=null,w.value=!1,document.removeEventListener("mousemove",$),document.removeEventListener("mouseup",Y),document.removeEventListener("touchmove",$),document.removeEventListener("touchend",Y)}function $(H){if(!u.value)return;const P=u.value.getBoundingClientRect();let X,q;H.touches?(X=H.touches[0].clientX-h.value,q=H.touches[0].clientY-f.value,h.value=H.touches[0].clientX,f.value=H.touches[0].clientY):(X=H.clientX-h.value,q=H.clientY-f.value,h.value=H.clientX,f.value=H.clientY),u.value.style.top=`${P.top+q}px`,u.value.style.left=`${P.left+X}px`}function S(H){H.target.removeEventListener("mousemove",b),H.target.removeEventListener("touchmove",b),document.removeEventListener("mousemove",$),document.removeEventListener("touchmove",$),document.removeEventListener("mouseup",Y),document.removeEventListener("touchend",Y),w.value=!1}function W(){const H=navigator.userAgent;return/(tablet|ipad|playbook|silk)|(android(?!.*mobi))/i.test(H)?"tablet":/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|Silk-Accelerated|(hpw|web)OS|Opera M(obi|ini)/.test(H)?"mobile":"desktop"}function oe(){const H=document.getElementById(`vue-ui-screenshot-button-${l.value}`);H.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
331
331
  <path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" />
332
- </svg>`,document.getElementById(`vue-ui-screenshot-button-${l.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),H.classList.add("loading"),H.setAttribute("disabled","true")}function te(){if(!u.value)return;oe();const H=u.value.getBoundingClientRect();U.value=setTimeout(()=>{Ps(document.body,{allowTaint:!0,width:H.width,height:H.height,x:H.left+window.scrollX,y:H.top+window.scrollY,useCORS:!0,scale:s.value.quality}).then(P=>{const X=P.toDataURL("image/png",1),q=X.split(",")[1],_=atob(q).length/1024;if(s.value.mode==="download"){const x=document.createElement("a");x.download="screenshot.png",x.href=X,x.click()}s.value.mode==="post"&&a("postImage",{createdAt:Date.now(),fileSize:`${_.toFixed(2)} KB`,image:X,x:H.left+window.scrollX,y:H.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:W()})}).finally(Q)},10)}function he(H){const P=s.value.style.handles.size/2+4,X=document.createElement("DIV");X.style.top=`${-P}px`,X.style.left=`${-P}px`,X.style.cursor="nw-resize",X.classList.add("vue-ui-screenshot-handle-nw"),X.dataset.cy="screenshot-handle-nw";const q=document.createElement("DIV");q.style.top=`${-P}px`,q.style.left="auto",q.style.right=`${-P}px`,q.style.cursor="ne-resize",q.classList.add("vue-ui-screenshot-handle-ne"),q.dataset.cy="screenshot-handle-ne";const m=document.createElement("DIV");m.style.top="auto",m.style.bottom=`${-P}px`,m.style.left=`${-P}px`,m.style.cursor="sw-resize",m.classList.add("vue-ui-screenshot-handle-sw"),m.dataset.cy="screenshot-handle-sw";const _=document.createElement("DIV");_.style.top="auto",_.style.left="auto",_.style.right=`${-P}px`,_.style.bottom=`${-P}px`,_.style.cursor="se-resize",_.classList.add("vue-ui-screenshot-handle-se"),_.dataset.cy="screenshot-handle-se";const x=document.createElement("BUTTON");x.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${s.value.translations.captureButton}</span>`,x.classList.add("vue-ui-screenshot-capture-button"),x.id=`vue-ui-screenshot-button-${l.value}`,x.style.position="absolute",x.style.top="50%",x.style.left="50%",x.style.transform="translate(-50%,-50%)",x.style.background=s.value.style.captureButton.background,x.style.color=s.value.style.captureButton.color,x.style.border=s.value.style.captureButton.border,x.style.outline="none",x.style.cursor="pointer",x.style.padding=s.value.style.captureButton.padding,x.style.fontFamily=s.value.style.captureButton.fontFamily,x.style.fontSize=`${s.value.style.captureButton.fontSize}px`,x.style.minHeight=`${s.value.style.captureButton.minHeight}px`,x.style.width="fit-content",x.style.display="flex",x.style.alignItems="center",x.style.justifyContent="center",x.style.gap="3px",x.style.borderRadius=`${s.value.style.captureButton.borderRadius}px`,x.style.boxShadow=s.value.style.captureButton.boxShadow,x.style.userSelect="none",x.style.opacity="0.95",x.style.textAlign="left",x.style.fontWeight=s.value.style.captureButton.bold?"bold":"normal",x.dataset.cy="screenshot-save-button",x.addEventListener("mouseenter",()=>{x.style.opacity="1"}),x.addEventListener("mouseleave",()=>{x.style.opacity="0.95"}),x.addEventListener("click",te),H.appendChild(x),[X,q,m,_].forEach((V,J)=>{V.classList.add(`handle-${J}`),V.dataset.html2canvasIgnore="true",V.style.position="absolute",V.style.height=`${s.value.style.handles.size}px`,V.style.width=`${s.value.style.handles.size}px`,V.style.background=s.value.style.handles.background,V.style.border=s.value.style.handles.border,V.style.borderRadius=`${s.value.style.handles.borderRadius}px`,V.style.pointerEvents="auto !important",V.addEventListener("mousedown",E),V.addEventListener("touchstart",E),H.appendChild(V)})}function le(){u.value||e.nextTick(()=>{const H=I();H.dataset.html2canvasIgnore=!0,K(H),he(H),u.value=H,H.addEventListener("touchmove",function(P){P.preventDefault()},{passive:!1}),document.body.appendChild(H),document.addEventListener("mousedown",T),document.addEventListener("touchstart",T),document.addEventListener("mouseup",S),document.addEventListener("touchend",S)})}return o({shoot:le,close:Q}),(H,P)=>(e.openBlock(),e.createElementBlock("div"))}},I9=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"})),$9={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M9=["src","height","width"],U9=["xmlns","height","width"],V9=["id"],Q9=["stop-color"],T9=["stop-color"],O9=["points","fill","stroke","stroke-width"],z9=["src","alt","height","width","id"],D9=["xmlns","viewBox","height","id"],P9=["id"],H9=["stop-color"],R9=["stop-color"],G9=["points","fill","stroke"],W9=["xmlns","height"],K9=["onClick","onMouseenter","onKeyup"],j9=["onMouseenter"],X9={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(t,{expose:o,emit:a}){const n=t,{vue_ui_rating:r}=ft(),l=e.ref(it()),s=e.ref(!1),u=e.ref(void 0),h=e.ref([]),f=e.computed(()=>Je({userConfig:n.config,defaultConfig:r})),c=e.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)?v(n.dataset.rating):n.dataset.rating),y=e.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)),C=e.ref(c.value),A=e.ref(f.value.type==="image"),B=e.ref(f.value.readonly);function v(Q){let K=0,E=0;for(const T in Q){const Y=parseInt(T),$=Q[T];K+=Y*$,E+=$}if(E===0)return 0;const b=K/E;return Math.min(f.value.to,Math.max(f.value.from,b))}e.onMounted(()=>{xt(n.dataset)&&Ke({componentName:"VueUiRating",type:"dataset"});for(let Q=f.value.from;Q<=f.value.to;Q+=1)h.value.push(Q)});function i(Q,K=!1){return Q>u.value||B.value?K?f.value.style.image.inactiveOpacity:f.value.style.star.inactiveColor:K?1:f.value.style.star.useGradient?`url(#star_gradient_under_${l.value})`:f.value.style.star.activeColor}function g(Q,K=!1){const E=C.value-Q,b=K?1:100;switch(!0){case E<=0:return .001;case E>1:return 1*b;default:return E*b}}function w(Q){B.value||(C.value=Q,a("rate",Q))}function U(){return C.value}function I(Q=!0){B.value=Q}return o({getData:U,toggleReadonly:I}),(Q,K)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${f.value.style.backgroundColor};font-family:${f.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:K[2]||(K[2]=E=>s.value=!0),onMouseleave:K[3]||(K[3]=E=>{s.value=!1,u.value=void 0})},[f.value.style.title.text?(e.openBlock(),e.createElementBlock("div",$9,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${f.value.style.title.color};font-weight:${f.value.style.title.bold?"bold":"normal"};text-align:${f.value.style.title.textAlign};margin-bottom:${f.value.style.title.offsetY}px;font-size:${f.value.style.title.fontSize}px`)},e.toDisplayString(f.value.style.title.text),5),f.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${f.value.style.title.subtitle.color};font-size:${f.value.style.title.subtitle.fontSize}px;text-align:${f.value.style.title.textAlign};margin-bottom:${f.value.style.title.subtitle.offsetY}px;font-weight:${f.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(f.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value.style.rating.show&&f.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};margin-left:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${f.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[f.value.style.rating.show&&f.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};padding-right:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(E,b)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${f.value.style.itemSize}px;width:${f.value.style.itemSize}px`)},[A.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:f.value.style.image.src,height:f.value.style.itemSize,width:f.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(u.value)?f.value.style.image.inactiveOpacity:i(E,!0)}`)},null,12,M9)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(We),viewBox:"0 0 100 100",height:f.value.style.itemSize,width:f.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${l.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(Lt)(f.value.style.star.activeColor,.05)}`},null,8,Q9),e.createElementVNode("stop",{offset:"100%","stop-color":f.value.style.star.activeColor},null,8,T9)],8,V9)]),e.createElementVNode("polygon",{points:e.unref(Vr)({plot:{x:50,y:50},radius:30,apexes:f.value.style.star.apexes}),fill:isNaN(u.value)?f.value.style.star.inactiveColor:i(E),stroke:f.value.style.star.borderColor?f.value.style.star.borderColor:u.value?i(E):f.value.style.star.inactiveColor,"stroke-width":f.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O9)],8,U9)),A.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:f.value.style.image.src,alt:`${f.value.style.image.alt} ${E}`,height:f.value.style.itemSize,width:f.value.style.itemSize,id:`active_${l.value}_${E}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${g(b,!0)*f.value.style.itemSize}px,${f.value.style.itemSize}px,0px`)},null,12,z9)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(We),viewBox:`0 0 ${g(b)} 100`,height:f.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${l.value}_${E}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${l.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(Lt)(f.value.style.star.activeColor,.05)}`},null,8,H9),e.createElementVNode("stop",{offset:"100%","stop-color":f.value.style.star.activeColor},null,8,R9)],8,P9)]),e.createElementVNode("polygon",{points:e.unref(Vr)({plot:{x:50,y:50},radius:30,apexes:f.value.style.star.apexes}),fill:f.value.style.star.useGradient?`url(#star_gradient_over_${l.value})`:f.value.style.star.activeColor,stroke:f.value.style.star.activeColor},null,8,G9)],8,D9)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(We),viewBox:"0 0 100 100",height:f.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${B.value?"":"cursor:pointer"}`)},[B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:T=>w(E),onMouseenter:T=>u.value=E,onMouseleave:K[0]||(K[0]=T=>u.value=void 0),tabindex:"0",onKeyup:e.withKeys(T=>w(E),["enter"])},null,40,K9)),B.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:T=>u.value=E,onMouseleave:K[1]||(K[1]=T=>u.value=void 0)},null,40,j9)):e.createCommentVNode("",!0)],12,W9)),f.value.style.tooltip.show&&y.value&&B.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${f.value.style.tooltip.borderColor};position:absolute;top:${-48+f.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${f.value.style.tooltip.backgroundColor};display:${u.value===E?"block":"none"};padding:2px 12px;border-radius:${f.value.style.tooltip.borderRadius}px;box-shadow:${f.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${f.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${f.value.style.tooltip.fontSize}px`)},e.toDisplayString(E),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${f.value.style.tooltip.bold?"bold":"normal"};font-size:${f.value.style.tooltip.fontSize}px`)},e.toDisplayString(n.dataset.rating[E]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${f.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),f.value.style.rating.show&&f.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};padding-left:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),f.value.style.rating.show&&f.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};margin-left:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},ag=vt(X9,[["__scopeId","data-v-86ced882"]]),q9=Object.freeze(Object.defineProperty({__proto__:null,default:ag},Symbol.toStringTag,{value:"Module"})),Y9=["id"],J9=["xmlns","viewBox"],Z9=["x","y","width","height","fill","stroke","stroke-width"],e$=["x","y","width","height","fill","stroke","stroke-width"],t$=["font-size","font-weight","fill","x","y"],o$=["x","y","width","height","onMouseover"],l$={key:0},a$=["font-size","fill","x","y","font-weight"],r$={key:0},n$=["x","y","font-size","fill","font-weight"],s$={key:1},i$=["x","y","width","height","stroke","stroke-width"],u$={key:2},A$=["id"],c$=["stop-color"],d$=["stop-color"],h$=["x","y","font-size","fill"],f$=["x","y","height","rx","fill"],v$=["x","y","font-size","fill"],g$=["stroke","x1","x2","y1","y2"],p$=["fill","d"],y$={key:3},m$={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},b$=["stop-color"],k$=["stop-color"],C$=["x","y","width","height","rx"],w$=["x","y","font-size","fill"],B$=["x","y","font-size","fill"],x$=["stroke","x1","x2","y1","y2"],F$=["fill","d"],N$={class:"vue-ui-data-table"},_$={key:0},S$=["data-cell"],L$={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},E$=["data-cell"],I$={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$$={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t;e.useCssVars(ae=>({cb9df2f2:ae.tdo}));const{vue_ui_heatmap:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length);xt(a.dataset)&&Ke({componentName:"VueUiHeatmap",type:"dataset"});const l=e.ref(it()),s=e.ref(null),u=e.ref(null),h=e.ref(!1),f=e.ref(""),c=e.ref(void 0),y=e.ref(null),C=e.ref(0),A=e.ref(null),B=e.ref(!1),v=e.computed(()=>{const ae=Je({userConfig:a.config,defaultConfig:n});return ae.theme?{...Je({userConfig:Nt.vue_ui_heatmap[ae.theme]||a.config,defaultConfig:ae})}:ae}),{isPrinting:i,isImaging:g,generatePdf:w,generateImage:U}=zt({elementId:`heatmap__${l.value}`,fileName:v.value.style.title.text||"vue-ui-heatmap"}),I=e.ref({showTable:v.value.table.show,showTooltip:v.value.style.tooltip.show}),Q=e.computed(()=>v.value.table.responsiveBreakpoint);function K(){new ResizeObserver(ge=>{ge.forEach(Z=>{B.value=Z.contentRect.width<Q.value})}).observe(A.value)}e.onMounted(K);const E=e.computed(()=>Math.max(...a.dataset.flatMap(ae=>(ae.values||[]).length))),b=e.computed(()=>{const ae=v.value.style.layout.padding.top+v.value.style.layout.padding.bottom+a.dataset.length*v.value.style.layout.cells.height,ge=v.value.style.layout.padding.left+v.value.style.layout.padding.right+(E.value<a.dataset.length?a.dataset.length:E.value)*v.value.style.layout.cells.height,Z=ae+(v.value.style.legend.show?v.value.style.legend.position==="right"?0:v.value.style.layout.cells.height*2:0);return{height:ae,heightWithLegend:Z,width:ge}}),T=e.computed(()=>v.value.style.legend.position),Y=e.computed(()=>({top:v.value.style.layout.padding.top,left:v.value.style.layout.padding.left,right:b.value.width-v.value.style.layout.padding.right-(T.value==="right"&&v.value.style.legend.show?92:0),bottom:b.value.height-v.value.style.layout.padding.bottom,height:b.value.height-v.value.style.layout.padding.top-v.value.style.layout.padding.bottom,width:b.value.width-v.value.style.layout.padding.right-v.value.style.layout.padding.left-(T.value==="right"&&v.value.style.legend.show?92:0)})),$=e.computed(()=>te.value.height*a.dataset.length),S=e.computed(()=>Math.max(...a.dataset.flatMap(ae=>ae.values))),W=e.computed(()=>Math.min(...a.dataset.flatMap(ae=>ae.values))),oe=e.computed(()=>{const ae=a.dataset.flatMap(Z=>Z.values);return ae.reduce((Z,ee)=>Z+ee,0)/ae.length}),te=e.computed(()=>({width:Y.value.width/E.value,height:Y.value.width/(E.value<a.dataset.length?a.dataset.length:E.value)})),he=e.computed(()=>{const ae=v.value.style.layout.dataLabels.yAxis.values.length?v.value.style.layout.dataLabels.yAxis.values:a.dataset.map(Z=>Z.name),ge=v.value.style.layout.dataLabels.xAxis.values;return{yLabels:ae,xLabels:ge.slice(0,E.value)}}),le=e.computed(()=>(a.dataset.forEach((ae,ge)=>{Wt({datasetObject:ae,requiredAttributes:["values"]}).forEach(Z=>{Ke({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:ge})})}),a.dataset.map(ae=>({...ae,temperatures:(ae.values||[]).map((ge,Z)=>ge>=oe.value?{side:"up",color:$s(v.value.style.layout.cells.colors.cold,v.value.style.layout.cells.colors.hot,W.value,S.value,ge),ratio:Math.abs(Math.abs(ge-oe.value)/Math.abs(S.value-oe.value))>1?1:Math.abs(Math.abs(ge-oe.value)/Math.abs(S.value-oe.value)),value:ge,yAxisName:ae.name,xAxisName:he.value.xLabels[Z],id:`vue-data-ui-heatmap-cell-${it()}`}:{side:"down",ratio:Math.abs(1-Math.abs(ge)/Math.abs(oe.value))>1?1:Math.abs(1-Math.abs(ge)/Math.abs(oe.value)),color:$s(v.value.style.layout.cells.colors.cold,v.value.style.layout.cells.colors.hot,W.value,S.value,ge),value:ge,yAxisName:ae.name,xAxisName:he.value.xLabels[Z],id:`vue-data-ui-heatmap-cell-${it()}`})})))),H=e.ref(null),P=e.ref(null);function X(ae,ge,Z,ee){y.value={x:Z,y:ee},console.log(ae);const{value:z,yAxisName:D,xAxisName:fe,id:M}=ae;c.value=M,H.value=z,P.value={datapoint:ae,seriesIndex:ge,series:le.value,config:v.value},h.value=!0;let N="";const j=v.value.style.tooltip.customFormat;Gt(j)&&wo(()=>j({datapoint:ae,seriesIndex:ge,series:le.value,config:v.value}))?f.value=j({datapoint:ae,seriesIndex:ge,series:le.value,config:v.value}):(N+=`<div>${D} ${fe?`${fe}`:""}</div>`,N+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${v.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${$s(v.value.style.layout.cells.colors.cold,v.value.style.layout.cells.colors.hot,W.value,S.value,z)}">⬤</span><span>${isNaN(z)?"-":Ge({p:v.value.style.layout.dataLabels.prefix,v:z,s:v.value.style.layout.dataLabels.suffix,r:v.value.style.tooltip.roundingValue})}</span></div>`,f.value=`<div style="font-size:${v.value.style.tooltip.fontSize}px">${N}</div>`)}const q=e.computed(()=>Y.value.top+$.value*(1-H.value/S.value)),m=e.computed(()=>Y.value.left+(b.value.width-Y.value.left-v.value.style.layout.padding.right)*(H.value/S.value));e.computed(()=>{const ae=a.dataset.map(Z=>({name:Z.name})),ge=a.dataset.map(Z=>Z.values);return{head:ae,body:ge}});function _(){e.nextTick(()=>{const ae=["",...a.dataset.map((z,D)=>z.name)],ge=[];for(let z=0;z<he.value.xLabels.length;z+=1){const D=[he.value.xLabels[z]];for(let fe=0;fe<a.dataset.length;fe+=1)D.push([a.dataset[fe].values[z]]);ge.push(D)}const Z=[[v.value.style.title.text],[v.value.style.title.subtitle.text],[[""],[""],[""]]].concat([ae]).concat(ge),ee=eo(Z);Zt({csvContent:ee,title:v.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function V(ae){x.value=ae,C.value+=1}function J(){I.value.showTable=!I.value.showTable}function ke(){I.value.showTooltip=!I.value.showTooltip}return o({generatePdf:w,generateCsv:_,generateImage:U,toggleTable:J,toggleTooltip:ke}),(ae,ge)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:s,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${v.value.style.fontFamily};width:100%; text-align:center;${v.value.style.title.text?"":"padding-top:36px"};background:${v.value.style.backgroundColor}`),id:`heatmap__${l.value}`},[v.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${v.value.style.backgroundColor}`)},[e.createVNode(Xt,{config:{title:{cy:"heatmap-div-title",...v.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...v.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),v.value.userOptions.show&&r.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:u,key:`user_options_${C.value}`,backgroundColor:v.value.style.backgroundColor,color:v.value.style.color,isImaging:e.unref(g),isPrinting:e.unref(i),uid:l.value,hasTooltip:v.value.userOptions.buttons.tooltip&&v.value.style.tooltip.show,hasPdf:v.value.userOptions.buttons.pdf,hasImg:v.value.userOptions.buttons.img,hasXls:v.value.userOptions.buttons.csv,hasTable:v.value.userOptions.buttons.table,hasFullscreen:v.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:I.value.showTooltip,titles:{...v.value.userOptions.buttonTitles},chartElement:s.value,onToggleFullscreen:V,onGeneratePdf:e.unref(w),onGenerateCsv:_,onGenerateImage:e.unref(U),onToggleTable:J,onToggleTooltip:ke},e.createSlots({_:2},[ae.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,ae.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,ae.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,ae.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,ae.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,ae.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:Z,isFullscreen:ee})=>[e.renderSlot(ae.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:Z,isFullscreen:ee})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${b.value.width} ${b.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${v.value.style.backgroundColor};color:${v.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(Z,ee)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.temperatures,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:Y.value.left+te.value.width*D+v.value.style.layout.cells.spacing/2,y:Y.value.top+te.value.height*ee+v.value.style.layout.cells.spacing/2,width:te.value.width-v.value.style.layout.cells.spacing,height:te.value.height-v.value.style.layout.cells.spacing,fill:v.value.style.layout.cells.colors.underlayer,stroke:v.value.style.backgroundColor,"stroke-width":v.value.style.layout.cells.spacing},null,8,Z9),e.createElementVNode("rect",{x:Y.value.left+te.value.width*D+v.value.style.layout.cells.spacing/2,y:Y.value.top+te.value.height*ee+v.value.style.layout.cells.spacing/2,width:te.value.width-v.value.style.layout.cells.spacing,height:te.value.height-v.value.style.layout.cells.spacing,fill:z.color,stroke:c.value&&c.value===z.id?v.value.style.layout.cells.selected.color:v.value.style.backgroundColor,"stroke-width":v.value.style.layout.cells.spacing},null,8,e$),v.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":v.value.style.layout.cells.value.fontSize,"font-weight":v.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(aa)(z.color),x:Y.value.left+te.value.width*D+te.value.width/2,y:Y.value.top+te.value.height*ee+te.value.height/2+v.value.style.layout.cells.value.fontSize/3},e.toDisplayString(v.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(z.value.toFixed(v.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(v.value.style.layout.dataLabels.suffix),9,t$)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.temperatures,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:Y.value.left+te.value.width*D,y:Y.value.top+te.value.height*ee,width:te.value.width,height:te.value.height,fill:"transparent",stroke:"none",onMouseover:fe=>X(z,ee,Y.value.left+te.value.width*D,Y.value.top+te.value.height*ee),onMouseout:ge[0]||(ge[0]=fe=>{h.value=!1,c.value=void 0,H.value=null,y.value=null})},null,40,o$)]))),256)),v.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",l$,[e.createElementVNode("text",{"font-size":v.value.style.layout.dataLabels.yAxis.fontSize,fill:v.value.style.layout.dataLabels.yAxis.color,x:Y.value.left+v.value.style.layout.dataLabels.yAxis.offsetX-6,y:Y.value.top+te.value.height*ee+te.value.height/2+v.value.style.layout.dataLabels.yAxis.fontSize/3+v.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":v.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(he.value.yLabels[ee]),9,a$)])):e.createCommentVNode("",!0)]))),256)),v.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",r$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he.value.xLabels,(Z,ee)=>(e.openBlock(),e.createElementBlock("text",{x:Y.value.left+te.value.width/2+Y.value.width/he.value.xLabels.length*ee+v.value.style.layout.dataLabels.xAxis.offsetX,y:Y.value.top+v.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","font-size":v.value.style.layout.dataLabels.xAxis.fontSize,fill:v.value.style.layout.dataLabels.xAxis.color,"font-weight":v.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(Z),9,n$))),256))])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("g",s$,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:y.value.x-v.value.style.layout.cells.selected.border/2,y:y.value.y-v.value.style.layout.cells.selected.border/2,width:te.value.width-v.value.style.layout.cells.spacing+v.value.style.layout.cells.selected.border,height:te.value.height-v.value.style.layout.cells.spacing+v.value.style.layout.cells.selected.border,fill:"transparent",stroke:v.value.style.layout.cells.selected.color,"stroke-width":v.value.style.layout.cells.selected.border,rx:1},null,8,i$)])):e.createCommentVNode("",!0),v.value.style.legend.show&&T.value==="right"?(e.openBlock(),e.createElementBlock("g",u$,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${l.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":v.value.style.layout.cells.colors.hot},null,8,c$),e.createElementVNode("stop",{offset:"100%","stop-color":v.value.style.layout.cells.colors.cold},null,8,d$)],8,A$)]),e.createElementVNode("text",{x:Y.value.right+36+18,y:Y.value.top-v.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(S.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,h$),e.createElementVNode("rect",{x:Y.value.right+36,y:Y.value.top,width:36,height:$.value,rx:v.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${l.value})`},null,8,f$),e.createElementVNode("text",{x:Y.value.right+36+18,y:Y.value.top+$.value+v.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(W.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,v$),H.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:v.value.style.backgroundColor,"stroke-width":"2",x1:Y.value.right+36,x2:Y.value.right+72,y1:q.value,y2:q.value},null,8,g$)):e.createCommentVNode("",!0),H.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:v.value.style.color,stroke:"none",d:`M ${Y.value.right+36},${q.value} ${Y.value.right+26},${q.value-8} ${Y.value.right+26},${q.value+8}z`},null,8,p$)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),v.value.style.legend.show&&T.value==="bottom"?(e.openBlock(),e.createElementBlock("g",y$,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",m$,[e.createElementVNode("stop",{offset:"0%","stop-color":v.value.style.layout.cells.colors.cold},null,8,b$),e.createElementVNode("stop",{offset:"100%","stop-color":v.value.style.layout.cells.colors.hot},null,8,k$)])]),e.createElementVNode("rect",{x:Y.value.left,y:Y.value.bottom+v.value.style.layout.cells.height,width:b.value.width-Y.value.left-v.value.style.layout.padding.right,height:v.value.style.layout.cells.height,rx:v.value.style.legend.scaleBorderRadius>v.value.style.layout.cells.height/2?v.value.style.layout.cells.height/2:v.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,C$),e.createElementVNode("text",{x:Y.value.left,y:Y.value.bottom+v.value.style.layout.cells.height*2+v.value.style.legend.fontSize*2,"text-anchor":"start","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(W.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,w$),e.createElementVNode("text",{x:Y.value.right,y:Y.value.bottom+v.value.style.layout.cells.height*2+v.value.style.legend.fontSize*2,"text-anchor":"end","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(S.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,B$),H.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:v.value.style.backgroundColor,"stroke-width":"2",x1:m.value,x2:m.value,y1:Y.value.bottom+v.value.style.layout.cells.height,y2:Y.value.bottom+v.value.style.layout.cells.height*2},null,8,x$)):e.createCommentVNode("",!0),H.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:v.value.style.color,stroke:"none",d:`M ${m.value},${Y.value.bottom+v.value.style.layout.cells.height} ${m.value-12},${Y.value.bottom+v.value.style.layout.cells.height-20} ${m.value+12},${Y.value.bottom+v.value.style.layout.cells.height-20}z`},null,8,F$)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(ae.$slots,"svg",{svg:b.value},void 0,!0)],14,J9)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:3,config:{type:"heatmap",style:{backgroundColor:v.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Oo,{show:I.value.showTooltip&&h.value,backgroundColor:v.value.style.tooltip.backgroundColor,color:v.value.style.tooltip.color,borderRadius:v.value.style.tooltip.borderRadius,borderColor:v.value.style.tooltip.borderColor,borderWidth:v.value.style.tooltip.borderWidth,fontSize:v.value.style.tooltip.fontSize,backgroundOpacity:v.value.style.tooltip.backgroundOpacity,parent:s.value,content:f.value,isCustom:v.value.style.tooltip.customFormat&&typeof v.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(ae.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(ae.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),r.value?(e.openBlock(),e.createBlock(lo,{key:4,hideDetails:"",config:{open:I.value.showTable,maxHeight:1e4,body:{backgroundColor:v.value.style.backgroundColor,color:v.value.style.color},head:{backgroundColor:v.value.style.backgroundColor,color:v.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:A,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":B.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${v.value.table.th.backgroundColor};`),onClick:ge[1]||(ge[1]=Z=>I.value.showTable=!1),onKeypress:ge[2]||(ge[2]=e.withKeys(Z=>I.value.showTable=!1,["enter"]))},[e.createVNode(bt,{name:"close",stroke:v.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",N$,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${v.value.table.th.backgroundColor};color:${v.value.table.th.color};outline:${v.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(v.value.style.title.text)+" ",1),v.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",_$,e.toDisplayString(v.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${v.value.table.th.backgroundColor};color:${v.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${v.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataset,(Z,ee)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${v.value.table.th.outline};padding-right:6px`)},e.toDisplayString(Z.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he.value.xLabels,(Z,ee)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":ee%2===0,"vue-ui-data-table__tbody__row-odd":ee%2!==0}),style:e.normalizeStyle(`background:${v.value.table.td.backgroundColor};color:${v.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":v.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${v.value.table.td.outline}`)},[e.createElementVNode("div",L$,e.toDisplayString(Z),1)],12,S$),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataset,(z,D)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":t.dataset[D].name,style:e.normalizeStyle(`outline:${v.value.table.td.outline}`)},[e.createElementVNode("div",I$,e.toDisplayString(isNaN(z.values[ee])?"-":e.unref(Ge)({p:v.value.style.layout.dataLabels.prefix,v:z.values[ee],s:v.value.style.layout.dataLabels.suffix,r:v.value.table.td.roundingValue})),1)],12,E$))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Y9))}},rg=vt($$,[["__scopeId","data-v-017b6c09"]]),M$=Object.freeze(Object.defineProperty({__proto__:null,default:rg},Symbol.toStringTag,{value:"Module"})),U$=["id"],V$=["xmlns","viewBox"],Q$={key:0},T$=["x1","x2","y1","y2","stroke","stroke-width"],O$=["x1","x2","y1","y2","stroke","stroke-width"],z$={key:1},D$=["points","fill","stroke-width","stroke-dasharray","stroke"],P$={key:0},H$=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],R$={key:1},G$={key:2},W$=["id"],K$=["stop-color"],j$=["stop-color"],X$=["id"],q$=["stop-color"],Y$=["stop-color"],J$=["x","y","width","height","fill","stroke","stroke-width","rx"],Z$=["x","y","height","width","fill","stroke","stroke-width","rx"],eM={key:0},tM=["d","stroke","stroke-width"],oM=["d","stroke","stroke-width"],lM=["d","stroke","stroke-width"],aM=["d","stroke","stroke-width"],rM={key:3,style:{"pointer-events":"none !important"}},nM=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],sM=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],iM=["x","y","font-size","fill","font-weight","text-anchor"],uM=["x","y","font-size","fill","font-weight"],AM=["cx","cy","r","fill","stroke","stroke-width"],cM=["cx","cy","r","fill","stroke","stroke-width"],dM=["x","y","font-size","fill","font-weight","text-anchor"],hM={key:4},fM=["x","y","font-size","fill"],vM=["x","y","font-size","fill"],gM=["id","transform","font-size","font-weight","fill"],pM={key:5},yM=["x","y","font-size","fill"],mM=["x","y","font-size","fill"],bM=["font-size","font-weight","fill","x","y"],kM=["id"],CM=["x","y","width","height"],wM={key:6},BM=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],xM=["x","y","fill","font-size","font-weight"],FM=["onClick"],NM={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},_M={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},SM={key:0},LM=["innerHTML"],EM={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t,{vue_ui_scatter:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length),l=e.ref(it()),s=e.ref(null),u=e.ref(!1),h=e.ref(""),f=e.ref(0),c=e.ref(null),y=e.ref(null),C=e.ref(null),A=e.computed(()=>{const D=Je({userConfig:a.config,defaultConfig:n});return D.theme?{...Je({userConfig:Nt.vue_ui_scatter[D.theme]||a.config,defaultConfig:D}),customPalette:Pt[D.theme]||Me}:D}),B=e.ref(null);e.onMounted(()=>{if(xt(a.dataset)&&Ke({componentName:"VueUiScatter",type:"dataset"}),A.value.responsive){const D=Bo(()=>{const{width:fe,height:M}=xo({chart:c.value,title:A.value.style.title.text?y.value:null,legend:A.value.style.legend.show?C.value:null});Q.value.width=fe,Q.value.height=M});B.value=new ResizeObserver(D),B.value.observe(c.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:v,isImaging:i,generatePdf:g,generateImage:w}=zt({elementId:`vue-ui-scatter_${l.value}`,fileName:A.value.style.title.text||"vue-ui-scatter"}),U=e.computed(()=>so(A.value.customPalette)),I=e.ref({showTable:A.value.table.show,showTooltip:A.value.style.tooltip.show}),Q=e.ref({height:A.value.style.layout.height,width:A.value.style.layout.width}),K=e.computed(()=>A.value.style.layout.marginalBars.show?A.value.style.layout.marginalBars.size+A.value.style.layout.marginalBars.offset:0),E=e.computed(()=>({top:A.value.style.layout.padding.top+K.value,right:Q.value.width-A.value.style.layout.padding.right-K.value,bottom:Q.value.height-A.value.style.layout.padding.bottom,left:A.value.style.layout.padding.left,height:Q.value.height-A.value.style.layout.padding.top-A.value.style.layout.padding.bottom-K.value,width:Q.value.width-A.value.style.layout.padding.left-A.value.style.layout.padding.right-K.value})),b=e.computed(()=>{a.dataset.forEach((j,O)=>{Wt({datasetObject:j,requiredAttributes:["values"]}).forEach(ce=>{Ke({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:ce,index:O})}),j.values&&j.values.forEach((ce,re)=>{Wt({datasetObject:ce,requiredAttributes:["x","y"]}).forEach(ie=>{Ke({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${ie}`,index:`${O} - ${re}`})})})});const D=Math.min(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.x))),fe=Math.max(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.x))),M=Math.min(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.y))),N=Math.max(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.y)));return{xMin:D>=0?0:D,xMax:fe,yMin:M>=0?0:M,yMax:N}}),T=e.computed(()=>({x:E.value.left+Math.abs(b.value.xMin)/(b.value.xMax+Math.abs(b.value.xMin))*E.value.width,y:E.value.bottom-Math.abs(b.value.yMin)/(b.value.yMax+Math.abs(b.value.yMin))*E.value.height})),Y=e.computed(()=>a.dataset.map((D,fe)=>{const M=`cluster_${l.value}_${fe}`;return{...D,id:M,color:D.color?D.color:U.value[fe]||Me[fe]||Me[fe%Me.length],opacity:V.value.includes(M)?.5:1,shape:D.shape??"circle",segregate:()=>J(M),isSegregated:V.value.includes(M)}})),$=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:A.value.style.legend.backgroundColor,color:A.value.style.legend.color,fontSize:A.value.style.legend.fontSize,paddingBottom:12,fontWeight:A.value.style.legend.bold?"bold":""})),S=e.computed(()=>Y.value.map((D,fe)=>({...D,plots:D.values.map(M=>({x:E.value.left+(M.x+Math.abs(b.value.xMin))/(b.value.xMax+Math.abs(b.value.xMin))*E.value.width,y:E.value.bottom-(M.y+Math.abs(b.value.yMin))/(b.value.yMax+Math.abs(b.value.yMin))*E.value.height,v:{...M,name:M.name||""},clusterName:D.name,color:D.color?D.color:U.value[fe]||Me[fe]||Me[fe%Me.length],id:`plot_${l.value}_${Math.random()}`,weight:M.weight??A.value.style.layout.plots.radius}))})).filter(D=>!V.value.includes(D.id))),W=e.computed(()=>S.value.map(D=>{const fe=D.plots.reduce((Ce,Ue)=>Ce+Ue.x,0)/D.plots.length,M=D.plots.reduce((Ce,Ue)=>Ce+Ue.y,0)/D.plots.length;let N=0,j=0,O=0;for(const Ce of D.plots)N+=(Ce.x-fe)*(Ce.y-M),j+=(Ce.x-fe)**2,O+=(Ce.y-M)**2;const ce=N/Math.sqrt(j*O),re=ce*(Math.sqrt(O)/Math.sqrt(j)),ie=M-re*fe,G={x1:E.value.left,x2:E.value.right,y1:re*E.value.left+ie,y2:re*E.value.right+ie,coefficient:ce},ne=(G.y2-G.y1)/(G.x2-G.x1),Ae=G.y1-ne*G.x1,se=Math.min(Q.value.width-A.value.style.layout.padding.right,Math.max(A.value.style.layout.padding.left,(E.value.top-Ae)/ne)),ve={x:se,y:ne*se+Ae<=A.value.style.layout.padding.top?E.value.top:ne*se+Ae};return{...D,correlation:G,label:ve,plots:D.plots.map(Ce=>{const Ue=(Ce.x+ne*Ce.y-ne*Ae)/(1+Math.pow(ne,2)),Ve=(ne*Ce.x+Math.pow(ne,2)*Ce.y+Ae)/(1+Math.pow(ne,2)),Ye=Math.sqrt(Math.pow(Ce.x-Ue,2)+Math.pow(Ce.y-Ve,2));return{...Ce,deviation:Ye,shape:D.shape,color:D.color}})}})),oe=e.computed(()=>Math.max(...W.value.flatMap(D=>D.plots.map(fe=>Math.abs(fe.deviation)))));function te(){return W.value}function he(D,fe){const M=Array.isArray(D)?D.flatMap(Ye=>Ye.plots.map(ze=>({x:ze.x,y:ze.y}))):D.plots.map(Ye=>({x:Ye.x,y:Ye.y}));let N=1/0,j=-1/0,O=1/0,ce=-1/0;M.forEach(({x:Ye,y:ze})=>{N=Math.min(N,Ye),j=Math.max(j,Ye),O=Math.min(O,ze),ce=Math.max(ce,ze)});const re=j-N,ie=ce-O,G=re/fe,ne=ie/fe,Ae=Array(fe).fill(0),se=Array(fe).fill(0);M.forEach(({x:Ye,y:ze})=>{const It=Math.floor((Ye-N)/G),kt=Math.floor((ze-O)/ne);Ae[It]||(Ae[It]=0),se[kt]||(se[kt]=0),Ae[It]+=1,se[kt]+=1});const ve=[],Ce=[];for(let Ye=0;Ye<fe;Ye+=1)ve.push(N+(Ye+.5)*G),Ce.push(O+(Ye+.5)*ne);const Ue=Math.max(...Ae),Ve=Math.max(...se);return{x:Ae,y:se,avgX:ve,avgY:Ce,maxX:Ue,maxY:Ve}}const le=e.computed(()=>A.value.style.layout.marginalBars.tranches),H=e.computed(()=>he(S.value,le.value)),P=e.computed(()=>{const D=E.value.top-A.value.style.layout.marginalBars.offset,fe=E.value.right+A.value.style.layout.marginalBars.offset;return S.value.map(M=>{const N=he(M,le.value);return{coords:N,dX:ba(N.avgX.map((j,O)=>({x:j,y:D-N.x[O]/N.maxX*A.value.style.layout.marginalBars.size}))),dY:ba(N.avgY.map((j,O)=>({y:j,x:fe+A.value.style.layout.marginalBars.size*N.y[O]/N.maxY}))),color:M.color,id:M.id}})}),X=e.ref(void 0),q=e.ref(null),m=e.ref(null);function _(D,fe){X.value=D.id,q.value=D;let M="";m.value={datapoint:D,seriesIndex:fe,series:W.value,config:A.value};const N=A.value.style.tooltip.customFormat;Gt(N)&&wo(()=>N({datapoint:D,seriesIndex:fe,series:W.value,config:A.value}))?h.value=N({datapoint:D,seriesIndex:fe,series:W.value,config:A.value}):(D.clusterName&&(M+=`<div style="display:flex;gap:3px;align-items:center">${D.clusterName}</div>`),D.v.name&&(M+=`<div>${D.v.name}</div>`),M+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${A.value.style.tooltip.borderColor}">`,M+=`<div>${A.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(D.v.x)?"-":Ge({p:A.value.style.tooltip.prefix,v:D.v.x,s:A.value.style.tooltip.suffix,r:A.value.style.tooltip.roundingValue})}</b></div>`,M+=`<div>${A.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(D.v.y)?"-":Ge({p:A.value.style.tooltip.prefix,v:D.v.y,s:A.value.style.tooltip.suffix,r:A.value.style.tooltip.roundingValue})}</b></div>`,M+=`${A.value.style.layout.plots.deviation.translation}: <b>${Ge({v:D.deviation,r:A.value.style.layout.plots.deviation.roundingValue})}</b>`,M+="</div>",h.value=`<div>${M}</div>`),u.value=!0}function x(){u.value=!1,X.value=void 0,q.value=null}const V=e.ref([]);function J(D){V.value.includes(D)?V.value=V.value.filter(fe=>fe!==D):V.value.length<a.dataset.length-1&&V.value.push(D)}function ke(){e.nextTick(()=>{const D=["",A.value.table.translations.correlationCoefficient,A.value.table.translations.nbrPlots,`${A.value.style.layout.dataLabels.xAxis.name} ${A.value.table.translations.average}`,`${A.value.style.layout.dataLabels.yAxis.name} ${A.value.table.translations.average}`],fe=W.value.map(j=>[j.name,j.correlation.coefficient,j.plots.length,j.plots.map(O=>O.v.x).reduce((O,ce)=>O+ce,0)/j.plots.length,j.plots.map(O=>O.v.y).reduce((O,ce)=>O+ce,0)/j.plots.length]),M=[[A.value.style.title.text],[A.value.style.title.subtitle.text],[[""],[""],[""]]].concat([D]).concat(fe),N=eo(M);Zt({csvContent:N,title:A.value.style.title.text||"vue-ui-heatmap"})})}const ae=e.computed(()=>{const D=[A.value.table.translations.series,A.value.table.translations.correlationCoefficient,A.value.table.translations.nbrPlots,`${A.value.style.layout.dataLabels.xAxis.name} ${A.value.table.translations.average}`,`${A.value.style.layout.dataLabels.yAxis.name} ${A.value.table.translations.average}`],fe=W.value.map(N=>[{shape:N.shape,content:N.name,color:N.color},Number((N.correlation.coefficient??0).toFixed(A.value.table.td.roundingValue)).toLocaleString(),N.plots.length.toLocaleString(),Number((N.plots.map(j=>j.v.x??0).reduce((j,O)=>j+O,0)/N.plots.length).toFixed(A.value.table.td.roundingAverage)).toLocaleString(),Number((N.plots.map(j=>j.v.y??0).reduce((j,O)=>j+O,0)/N.plots.length).toFixed(A.value.table.td.roundingAverage)).toLocaleString()]),M={th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint};return{head:D,body:fe,config:M,colNames:D}}),ge=e.ref(!1);function Z(D){ge.value=D,f.value+=1}function ee(){I.value.showTable=!I.value.showTable}function z(){I.value.showTooltip=!I.value.showTooltip}return o({getData:te,generatePdf:g,generateCsv:ke,generateImage:w,toggleTable:ee,toggleTooltip:z}),(D,fe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${ge.value?"vue-data-ui-wrapper-fullscreen":""} ${A.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:c,id:`vue-ui-scatter_${l.value}`,style:e.normalizeStyle(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;${A.value.style.title.text?"":"padding-top:36px"};background:${A.value.style.backgroundColor};${A.value.responsive?"height: 100%":""}`)},[A.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:y,style:e.normalizeStyle(`width:100%;background:${A.value.style.backgroundColor}`)},[e.createVNode(Xt,{config:{title:{cy:"scatter-div-title",...A.value.style.title},subtitle:{cy:"scatter-div-subtitle",...A.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),A.value.userOptions.show&&r.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:s,key:`user_options_${f.value}`,backgroundColor:A.value.style.backgroundColor,color:A.value.style.color,isImaging:e.unref(i),isPrinting:e.unref(v),uid:l.value,hasTooltip:A.value.userOptions.buttons.tooltip&&A.value.style.tooltip.show,hasPdf:A.value.userOptions.buttons.pdf,hasImg:A.value.userOptions.buttons.img,hasXls:A.value.userOptions.buttons.csv,hasTable:A.value.userOptions.buttons.table,hasFullscreen:A.value.userOptions.buttons.fullscreen,isTooltip:I.value.showTooltip,isFullscreen:ge.value,titles:{...A.value.userOptions.buttonTitles},chartElement:c.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(g),onGenerateCsv:ke,onGenerateImage:e.unref(w),onToggleTable:ee,onToggleTooltip:z},e.createSlots({_:2},[D.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,D.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,D.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,D.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,D.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,D.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:M,isFullscreen:N})=>[e.renderSlot(D.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:M,isFullscreen:N})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":ge.value,"vue-data-ui-fulscreen--off":!ge.value}),viewBox:`0 0 ${Q.value.width<=0?10:Q.value.width} ${Q.value.height<=0?10:Q.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${A.value.style.backgroundColor};color:${A.value.style.color}`)},[A.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Q$,[e.createElementVNode("line",{x1:T.value.x,x2:T.value.x,y1:E.value.top,y2:E.value.bottom,stroke:A.value.style.layout.axis.stroke,"stroke-width":A.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,T$),e.createElementVNode("line",{x1:E.value.left,x2:E.value.right,y1:T.value.y,y2:T.value.y,stroke:A.value.style.layout.axis.stroke,"stroke-width":A.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,O$)])):e.createCommentVNode("",!0),A.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",z$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[M.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(Dv)({series:M.plots}),fill:`${M.color}${e.unref(Xe)[A.value.style.layout.plots.giftWrap.fillOpacity*100]}`,"stroke-width":A.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":A.value.style.layout.plots.giftWrap.strokeDasharray,stroke:M.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,D$)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[!M.shape||M.shape==="circle"?(e.openBlock(),e.createElementBlock("g",P$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.plots,(j,O)=>(e.openBlock(),e.createElementBlock("circle",{cx:j.x,cy:j.y,r:X.value&&X.value===j.id?j.weight*2:j.weight,fill:`${M.color}${e.unref(Xe)[A.value.style.layout.plots.opacity*100]}`,stroke:A.value.style.layout.plots.stroke,"stroke-width":A.value.style.layout.plots.strokeWidth,onMouseover:ce=>_(j,N),onMouseleave:x,style:e.normalizeStyle(`opacity:${X.value&&X.value===j.id?1:A.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(j.deviation)/oe.value:A.value.style.layout.plots.significance.show&&Math.abs(j.deviation)>A.value.style.layout.plots.significance.deviationThreshold?A.value.style.layout.plots.significance.opacity:1}`)},null,44,H$))),256))])):(e.openBlock(),e.createElementBlock("g",R$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.plots,(j,O)=>(e.openBlock(),e.createBlock(ra,{plot:{x:j.x,y:j.y},radius:X.value&&X.value===j.id?j.weight*2:j.weight,shape:M.shape,color:`${M.color}${e.unref(Xe)[A.value.style.layout.plots.opacity*100]}`,stroke:A.value.style.layout.plots.stroke,strokeWidth:A.value.style.layout.plots.strokeWidth,onMouseover:ce=>_(j,N),onMouseleave:x,style:e.normalizeStyle(`opacity:${X.value&&X.value===j.id?1:A.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(j.deviation)/oe.value:A.value.style.layout.plots.significance.show&&Math.abs(j.deviation)>A.value.style.layout.plots.significance.deviationThreshold?A.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),A.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",G$,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${l.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":A.value.style.layout.marginalBars.fill},null,8,K$),e.createElementVNode("stop",{offset:"100%","stop-color":A.value.style.backgroundColor},null,8,j$)],8,W$),e.createElementVNode("linearGradient",{id:`marginal_y_${l.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":A.value.style.backgroundColor},null,8,q$),e.createElementVNode("stop",{offset:"100%","stop-color":A.value.style.layout.marginalBars.fill},null,8,Y$)],8,X$)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value.x,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[M&&H.value.avgX[N]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:H.value.avgX[N]-E.value.width/le.value/2,y:E.value.top-A.value.style.layout.marginalBars.offset-M/H.value.maxX*A.value.style.layout.marginalBars.size,width:E.value.width/le.value<=0?1e-4:E.value.width/le.value,height:M/H.value.maxX*A.value.style.layout.marginalBars.size<=0?1e-4:M/H.value.maxX*A.value.style.layout.marginalBars.size,fill:A.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${l.value})`:A.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${A.value.style.layout.marginalBars.opacity}`),stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.strokeWidth,rx:A.value.style.layout.marginalBars.borderRadius},null,12,J$)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value.y,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[M&&H.value.avgY[N]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:E.value.right+A.value.style.layout.marginalBars.offset,y:H.value.avgY[N]-E.value.height/le.value/2,height:E.value.height/le.value<=0?1e-4:E.value.height/le.value,width:M/H.value.maxY*A.value.style.layout.marginalBars.size<=0?1e-4:M/H.value.maxY*A.value.style.layout.marginalBars.size,fill:A.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${l.value})`:A.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${A.value.style.layout.marginalBars.opacity}`),stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.strokeWidth,rx:A.value.style.layout.marginalBars.borderRadius},null,12,Z$)):e.createCommentVNode("",!0)]))),256)),A.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",eM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,M=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${M.dX}`,stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,tM)),V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${M.dX}`,stroke:M.color,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,oM)),V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${M.dY}`,stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,lM)),V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${M.dY}`,stroke:M.color,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,aM))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),q.value&&A.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",rM,[e.createElementVNode("line",{x1:T.value.x,x2:q.value.x,y1:q.value.y,y2:q.value.y,stroke:A.value.style.layout.plots.selectors.stroke,"stroke-width":A.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":A.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,nM),e.createElementVNode("line",{x1:q.value.x,x2:q.value.x,y1:T.value.y,y2:q.value.y,stroke:A.value.style.layout.plots.selectors.stroke,"stroke-width":A.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":A.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,sM),e.createElementVNode("text",{x:T.value.x+(q.value.x>T.value.x?-6:6),y:q.value.y+A.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":A.value.style.layout.plots.selectors.labels.fontSize,fill:A.value.style.layout.plots.selectors.labels.color,"font-weight":A.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":q.value.x>T.value.x?"end":"start"},e.toDisplayString(e.unref(Ge)({p:A.value.style.layout.plots.selectors.labels.prefix,v:q.value.v.y,s:A.value.style.layout.plots.selectors.labels.suffix,r:A.value.style.layout.plots.selectors.labels.rounding})),9,iM),e.createElementVNode("text",{x:q.value.x,y:T.value.y+(q.value.y>T.value.y?-6:A.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":A.value.style.layout.plots.selectors.labels.fontSize,fill:A.value.style.layout.plots.selectors.labels.color,"font-weight":A.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(Ge)({p:A.value.style.layout.plots.selectors.labels.prefix,v:q.value.v.x,s:A.value.style.layout.plots.selectors.labels.suffix,r:A.value.style.layout.plots.selectors.labels.rounding})),9,uM),e.createElementVNode("circle",{cx:T.value.x,cy:q.value.y,r:A.value.style.layout.plots.selectors.markers.radius,fill:A.value.style.layout.plots.selectors.markers.fill,stroke:A.value.style.layout.plots.selectors.markers.stroke,"stroke-width":A.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,AM),e.createElementVNode("circle",{cx:q.value.x,cy:T.value.y,r:A.value.style.layout.plots.selectors.markers.radius,fill:A.value.style.layout.plots.selectors.markers.fill,stroke:A.value.style.layout.plots.selectors.markers.stroke,"stroke-width":A.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,cM),A.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:q.value.x,y:q.value.y+(q.value.y<T.value.y?-A.value.style.layout.plots.selectors.labels.fontSize/2:A.value.style.layout.plots.selectors.labels.fontSize),"font-size":A.value.style.layout.plots.selectors.labels.fontSize,fill:A.value.style.layout.plots.selectors.labels.color,"font-weight":A.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":q.value.x<E.value.left+100?"start":q.value.x>E.value.right-100?"end":q.value.x>T.value.x?"start":"end"},e.toDisplayString(q.value.v.name),9,dM)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),A.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",hM,[e.createElementVNode("text",{x:E.value.left-5,y:T.value.y+A.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(b.value.xMin.toFixed(A.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,fM),e.createElementVNode("text",{x:E.value.right+3,y:T.value.y+A.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(b.value.xMax.toFixed(A.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,vM),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${l.value}`,transform:`translate(${A.value.style.layout.dataLabels.xAxis.fontSize*2}, ${E.value.top+E.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":A.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:A.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(A.value.style.layout.dataLabels.xAxis.name),9,gM)])):e.createCommentVNode("",!0),A.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",pM,[e.createElementVNode("text",{x:T.value.x,y:E.value.bottom+A.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,fill:A.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(b.value.yMin.toFixed(A.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,yM),e.createElementVNode("text",{x:T.value.x,y:E.value.top-A.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,fill:A.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(b.value.yMax.toFixed(A.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,mM),e.createElementVNode("text",{"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":A.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:A.value.style.layout.dataLabels.yAxis.color,x:E.value.left+E.value.width/2,y:E.value.bottom+8+A.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(A.value.style.layout.dataLabels.yAxis.name),9,bM)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${l.value}`},[e.createElementVNode("rect",{x:E.value.left,y:E.value.top,width:E.value.width<=0?1e-4:E.value.width,height:E.value.height<=0?1e-4:E.value.height},null,8,CM)],8,kM),A.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",wM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("line",{x1:M.correlation.x1,x2:M.correlation.x2,y1:M.correlation.y1,y2:M.correlation.y2,"stroke-dasharray":A.value.style.layout.correlation.strokeDasharray,stroke:M.color,"stroke-width":A.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${l.value})`},null,8,BM))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[A.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:M.label.x,y:M.label.y,fill:A.value.style.layout.correlation.label.useSerieColor?M.color:A.value.style.layout.correlation.label.color,"font-size":A.value.style.layout.correlation.label.fontSize,"font-weight":A.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(Number(M.correlation.coefficient.toFixed(A.value.style.layout.correlation.label.roundingValue)).toLocaleString()),9,xM)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(D.$slots,"svg",{svg:Q.value},void 0,!0)],14,V$)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:3,config:{type:"quadrant",style:{backgroundColor:A.value.style.backgroundColor,quadrant:{grid:{color:A.value.style.layout.axis.stroke},plots:{color:A.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:C},[A.value.style.legend.show?(e.openBlock(),e.createBlock(Zo,{key:0,legendSet:Y.value,config:$.value,onClickMarker:fe[0]||(fe[0]=({legend:M})=>J(M.id))},{item:e.withCtx(({legend:M})=>[e.createElementVNode("div",{onClick:N=>M.segregate(),style:e.normalizeStyle(`opacity:${V.value.includes(M.id)?.5:1}`)},e.toDisplayString(M.name),13,FM)]),_:1},8,["legendSet","config"])):e.renderSlot(D.$slots,"legend",{key:1,legend:Y.value},void 0,!0)],512),e.createVNode(Oo,{show:I.value.showTooltip&&u.value,backgroundColor:A.value.style.tooltip.backgroundColor,color:A.value.style.tooltip.color,borderRadius:A.value.style.tooltip.borderRadius,borderColor:A.value.style.tooltip.borderColor,borderWidth:A.value.style.tooltip.borderWidth,fontSize:A.value.style.tooltip.fontSize,backgroundOpacity:A.value.style.tooltip.backgroundOpacity,parent:c.value,content:h.value,isCustom:A.value.style.tooltip.customFormat&&typeof A.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(D.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...m.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(D.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...m.value})),void 0,!0)]),default:e.withCtx(()=>[A.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",NM,[(e.openBlock(),e.createElementBlock("svg",_M,[e.createVNode(ra,{shape:q.value.shape,color:q.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),r.value?(e.openBlock(),e.createBlock(lo,{key:4,hideDetails:"",config:{open:I.value.showTable,maxHeight:1e4,body:{backgroundColor:A.value.style.backgroundColor,color:A.value.style.color},head:{backgroundColor:A.value.style.backgroundColor,color:A.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(yo,{colNames:ae.value.colNames,head:ae.value.head,body:ae.value.body,config:ae.value.config,title:`${A.value.style.title.text}${A.value.style.title.subtitle.text?` : ${A.value.style.title.subtitle.text}`:""}`,onClose:fe[1]||(fe[1]=M=>I.value.showTable=!1)},{th:e.withCtx(({th:M})=>[e.createTextVNode(e.toDisplayString(M),1)]),td:e.withCtx(({td:M})=>[M.shape?(e.openBlock(),e.createElementBlock("div",SM,[e.createElementVNode("span",null,e.toDisplayString(M.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:M},null,8,LM))]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,U$))}},ng=vt(EM,[["__scopeId","data-v-134a7dfd"]]),IM=Object.freeze(Object.defineProperty({__proto__:null,default:ng},Symbol.toStringTag,{value:"Module"})),$M=["id"],MM=["xmlns","viewBox"],UM={key:0},VM=["id"],QM=["stop-color"],TM=["stop-color"],OM=["stop-color"],zM=["id"],DM=["stop-color"],PM=["stop-color"],HM=["stop-color"],RM={key:0},GM=["x1","x2","y1","y2","stroke","stroke-width"],WM=["x1","x2","y1","y2","stroke","stroke-width"],KM={key:1},jM=["x1","x2","y1","y2","stroke","stroke-width"],XM=["x","y","font-size","fill","font-weight"],qM={key:2},YM=["transform","text-anchor","font-size","fill","font-weight"],JM=["x1","x2","y1","y2","stroke","stroke-width"],ZM={key:0},eU=["cx","cy","r","fill"],tU=["cx","cy","r","fill"],oU={key:1},lU=["x1","x2","y1","y2","stroke","stroke-width"],aU=["x1","x2","y1","y2","stroke","stroke-width"],rU=["x","y","height","width","fill","rx"],nU=["x","y","height","width","fill","rx","stroke","stroke-width"],sU=["x","y","height","width","fill","onMouseover"],iU=["innerHTML"],uU={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t,{vue_ui_candlestick:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length),l=e.ref(it()),s=e.ref(null),u=e.ref(!1),h=e.ref(""),f=e.ref(void 0),c=e.ref(0),y=e.ref(0),C=e.ref(null),A=e.ref(null),B=e.ref(null),v=e.ref(null),i=e.computed(()=>{const Z=Je({userConfig:a.config,defaultConfig:n});return Z.theme?{...Je({userConfig:Nt.vue_ui_candlestick[Z.theme]||a.config,defaultConfig:Z})}:Z}),g=e.ref({height:i.value.style.height,width:i.value.style.width,xAxisFontSize:i.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:i.value.style.layout.grid.yAxis.dataLabels.fontSize}),w=e.ref(null);e.onMounted(()=>{if(xt(a.dataset)&&Ke({componentName:"VueUiCandlestick",type:"dataset"}),i.value.responsive){const Z=Bo(()=>{const{width:ee,height:z}=xo({chart:C.value,title:i.value.style.title.text?A.value:null,slicer:v.value,legend:B.value});g.value.width=ee,g.value.height=z,g.value.xAxisFontSize=El({relator:Math.min(ee,z),adjuster:i.value.style.width,source:i.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),g.value.yAxisFontSize=El({relator:Math.min(ee,z),adjuster:i.value.style.width,source:i.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});w.value=new ResizeObserver(Z),w.value.observe(C.value.parentNode)}}),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});const{isPrinting:U,isImaging:I,generatePdf:Q,generateImage:K}=zt({elementId:`vue-ui-candlestick_${l.value}`,fileName:i.value.style.title.text||"vue-ui-candlestick"}),E=e.ref({showTable:i.value.table.show,showTooltip:i.value.style.tooltip.show}),b=e.computed(()=>{const{top:Z,right:ee,bottom:z,left:D}=i.value.style.layout.padding;return{top:Z,right:g.value.width-ee,left:D,bottom:g.value.height-z,width:g.value.width-D-ee,height:g.value.height-Z-z}}),T=e.computed(()=>a.dataset.length),Y=e.ref({start:0,end:T.value}),$=e.computed(()=>a.dataset.slice(Y.value.start,Y.value.end)),S=e.computed(()=>(a.dataset.forEach((Z,ee)=>{[null,void 0].includes(Z[0])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:ee}),[null,void 0].includes(Z[1])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:ee}),[null,void 0].includes(Z[2])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:ee}),[null,void 0].includes(Z[3])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:ee}),[null,void 0].includes(Z[4])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:ee}),[null,void 0].includes(Z[5])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:ee})}),$.value.map(Z=>({period:Z[0],open:Z[1],high:Z[2],low:Z[3],last:Z[4],volume:Z[5]})))),W=e.computed(()=>b.value.width/$.value.length),oe=e.computed(()=>({max:Math.max(...S.value.map(Z=>Z.high)),min:0})),te=e.computed(()=>Pl(oe.value.min,oe.value.max,i.value.style.layout.grid.yAxis.dataLabels.steps));function he(Z,ee){return{...Z,x:b.value.left+ee*W.value+W.value/2,y:b.value.top+(1-Z/te.value.max)*b.value.height,value:Z}}const le=e.computed(()=>S.value.map((Z,ee)=>{const z=he(Z.open,ee),D=he(Z.high,ee),fe=he(Z.low,ee),M=he(Z.last,ee),N=Z.last>Z.open;return{period:Z.period,open:z,high:D,low:fe,last:M,volume:Z.volume,isBullish:N}}));function H(Z){return Z/te.value.max}const P=e.computed(()=>te.value.ticks.map(Z=>({y:b.value.bottom-b.value.height*H(Z),value:Z}))),X=e.computed(()=>S.value.map(Z=>Z.period)),q=e.ref(null);function m(Z,ee){f.value=Z,q.value={datapoint:ee,seriesIndex:Z,series:le.value,config:i.value};const z=i.value.style.tooltip.customFormat;if(Gt(z)&&wo(()=>z({seriesIndex:Z,datapoint:ee,series:le.value,config:i.value})))h.value=z({seriesIndex:Z,datapoint:ee,series:le.value,config:i.value});else if(i.value.style.tooltip.show){let D="";const{period:fe,open:M,high:N,low:j,last:O,volume:ce,isBullish:re}=le.value[Z],{period:ie,open:G,high:ne,low:Ae,last:se,volume:ve}=i.value.translations;D+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${i.value.style.layout.candle.borderRadius*3}" stroke="${i.value.style.layout.candle.stroke}" stroke-width="${i.value.style.layout.candle.strokeWidth}"
332
+ </svg>`,document.getElementById(`vue-ui-screenshot-button-${l.value}`).animate([{opacity:"0.3"},{opacity:"1"},{opacity:"0.3"}],{duration:1e3,iterations:1/0}),H.classList.add("loading"),H.setAttribute("disabled","true")}function te(){if(!u.value)return;oe();const H=u.value.getBoundingClientRect();U.value=setTimeout(()=>{Ps(document.body,{allowTaint:!0,width:H.width,height:H.height,x:H.left+window.scrollX,y:H.top+window.scrollY,useCORS:!0,scale:s.value.quality}).then(P=>{const X=P.toDataURL("image/png",1),q=X.split(",")[1],_=atob(q).length/1024;if(s.value.mode==="download"){const x=document.createElement("a");x.download="screenshot.png",x.href=X,x.click()}s.value.mode==="post"&&a("postImage",{createdAt:Date.now(),fileSize:`${_.toFixed(2)} KB`,image:X,x:H.left+window.scrollX,y:H.top+window.scrollY,screenWidth:window.innerWidth>0?window.innerWidth:screen.width,deviceType:W()})}).finally(Q)},10)}function he(H){const P=s.value.style.handles.size/2+4,X=document.createElement("DIV");X.style.top=`${-P}px`,X.style.left=`${-P}px`,X.style.cursor="nw-resize",X.classList.add("vue-ui-screenshot-handle-nw"),X.dataset.cy="screenshot-handle-nw";const q=document.createElement("DIV");q.style.top=`${-P}px`,q.style.left="auto",q.style.right=`${-P}px`,q.style.cursor="ne-resize",q.classList.add("vue-ui-screenshot-handle-ne"),q.dataset.cy="screenshot-handle-ne";const m=document.createElement("DIV");m.style.top="auto",m.style.bottom=`${-P}px`,m.style.left=`${-P}px`,m.style.cursor="sw-resize",m.classList.add("vue-ui-screenshot-handle-sw"),m.dataset.cy="screenshot-handle-sw";const _=document.createElement("DIV");_.style.top="auto",_.style.left="auto",_.style.right=`${-P}px`,_.style.bottom=`${-P}px`,_.style.cursor="se-resize",_.classList.add("vue-ui-screenshot-handle-se"),_.dataset.cy="screenshot-handle-se";const x=document.createElement("BUTTON");x.innerHTML=`<svg id="saveButtonSvg" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 20 20" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path fill="none" stroke="currentColor" d="M1 4 1 3C1 2 2 1 3 1L4 1M16 1 17 1C18 1 19 2 19 3L19 4M1 16 1 17C1 18 2 19 3 19L4 19M16 19 17 19C18 19 19 18 19 17L19 16M8 10A1 1 0 0012 10 1 1 0 008 10M5 13 5 8C5 7 5 7 6 7L14 7C15 7 15 7 15 8L15 13C15 14 15 14 14 14L6 14C5 14 5 14 5 13M7 6 13 6" /></svg><span>${s.value.translations.captureButton}</span>`,x.classList.add("vue-ui-screenshot-capture-button"),x.id=`vue-ui-screenshot-button-${l.value}`,x.style.position="absolute",x.style.top="50%",x.style.left="50%",x.style.transform="translate(-50%,-50%)",x.style.background=s.value.style.captureButton.background,x.style.color=s.value.style.captureButton.color,x.style.border=s.value.style.captureButton.border,x.style.outline="none",x.style.cursor="pointer",x.style.padding=s.value.style.captureButton.padding,x.style.fontFamily=s.value.style.captureButton.fontFamily,x.style.fontSize=`${s.value.style.captureButton.fontSize}px`,x.style.minHeight=`${s.value.style.captureButton.minHeight}px`,x.style.width="fit-content",x.style.display="flex",x.style.alignItems="center",x.style.justifyContent="center",x.style.gap="3px",x.style.borderRadius=`${s.value.style.captureButton.borderRadius}px`,x.style.boxShadow=s.value.style.captureButton.boxShadow,x.style.userSelect="none",x.style.opacity="0.95",x.style.textAlign="left",x.style.fontWeight=s.value.style.captureButton.bold?"bold":"normal",x.dataset.cy="screenshot-save-button",x.addEventListener("mouseenter",()=>{x.style.opacity="1"}),x.addEventListener("mouseleave",()=>{x.style.opacity="0.95"}),x.addEventListener("click",te),H.appendChild(x),[X,q,m,_].forEach((V,J)=>{V.classList.add(`handle-${J}`),V.dataset.html2canvasIgnore="true",V.style.position="absolute",V.style.height=`${s.value.style.handles.size}px`,V.style.width=`${s.value.style.handles.size}px`,V.style.background=s.value.style.handles.background,V.style.border=s.value.style.handles.border,V.style.borderRadius=`${s.value.style.handles.borderRadius}px`,V.style.pointerEvents="auto !important",V.addEventListener("mousedown",E),V.addEventListener("touchstart",E),H.appendChild(V)})}function le(){u.value||e.nextTick(()=>{const H=I();H.dataset.html2canvasIgnore=!0,K(H),he(H),u.value=H,H.addEventListener("touchmove",function(P){P.preventDefault()},{passive:!1}),document.body.appendChild(H),document.addEventListener("mousedown",T),document.addEventListener("touchstart",T),document.addEventListener("mouseup",S),document.addEventListener("touchend",S)})}return o({shoot:le,close:Q}),(H,P)=>(e.openBlock(),e.createElementBlock("div"))}},I9=Object.freeze(Object.defineProperty({__proto__:null,default:lg},Symbol.toStringTag,{value:"Module"})),$9={key:0,class:"vue-ui-rating-title",style:{width:"100%"}},M9=["src","height","width"],U9=["xmlns","height","width"],V9=["id"],Q9=["stop-color"],T9=["stop-color"],O9=["points","fill","stroke","stroke-width"],z9=["src","alt","height","width","id"],D9=["xmlns","viewBox","height","id"],P9=["id"],H9=["stop-color"],R9=["stop-color"],G9=["points","fill","stroke"],W9=["xmlns","height"],K9=["onClick","onMouseenter","onKeyup"],j9=["onMouseenter"],X9={__name:"vue-ui-rating",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:["rate"],setup(t,{expose:o,emit:a}){const n=t,{vue_ui_rating:r}=ft(),l=e.ref(it()),s=e.ref(!1),u=e.ref(void 0),h=e.ref([]),f=e.computed(()=>Je({userConfig:n.config,defaultConfig:r})),c=e.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)?v(n.dataset.rating):n.dataset.rating),y=e.computed(()=>typeof n.dataset.rating=="object"&&!Array.isArray(n.dataset.rating)),C=e.ref(c.value),A=e.ref(f.value.type==="image"),B=e.ref(f.value.readonly);function v(Q){let K=0,E=0;for(const T in Q){const Y=parseInt(T),$=Q[T];K+=Y*$,E+=$}if(E===0)return 0;const b=K/E;return Math.min(f.value.to,Math.max(f.value.from,b))}e.onMounted(()=>{xt(n.dataset)&&Ke({componentName:"VueUiRating",type:"dataset"});for(let Q=f.value.from;Q<=f.value.to;Q+=1)h.value.push(Q)});function i(Q,K=!1){return Q>u.value||B.value?K?f.value.style.image.inactiveOpacity:f.value.style.star.inactiveColor:K?1:f.value.style.star.useGradient?`url(#star_gradient_under_${l.value})`:f.value.style.star.activeColor}function g(Q,K=!1){const E=C.value-Q,b=K?1:100;switch(!0){case E<=0:return .001;case E>1:return 1*b;default:return E*b}}function w(Q){B.value||(C.value=Q,a("rate",Q))}function U(){return C.value}function I(Q=!0){B.value=Q}return o({getData:U,toggleReadonly:I}),(Q,K)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`background:${f.value.style.backgroundColor};font-family:${f.value.style.fontFamily};width:100%`),class:"vue-ui-rating",onMouseover:K[2]||(K[2]=E=>s.value=!0),onMouseleave:K[3]||(K[3]=E=>{s.value=!1,u.value=void 0})},[f.value.style.title.text?(e.openBlock(),e.createElementBlock("div",$9,[e.createElementVNode("div",{style:e.normalizeStyle(`color:${f.value.style.title.color};font-weight:${f.value.style.title.bold?"bold":"normal"};text-align:${f.value.style.title.textAlign};margin-bottom:${f.value.style.title.offsetY}px;font-size:${f.value.style.title.fontSize}px`)},e.toDisplayString(f.value.style.title.text),5),f.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`color:${f.value.style.title.subtitle.color};font-size:${f.value.style.title.subtitle.fontSize}px;text-align:${f.value.style.title.textAlign};margin-bottom:${f.value.style.title.subtitle.offsetY}px;font-weight:${f.value.style.title.subtitle.bold?"bold":"normal"}`)},e.toDisplayString(f.value.style.title.subtitle.text),5)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),f.value.style.rating.show&&f.value.style.rating.position==="top"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:100%;text-align:center;margin-bottom:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};margin-left:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-rating-wrapper",style:e.normalizeStyle(`height:${f.value.style.itemSize}px;width:100%;display:flex;align-items:center;justify-content:center`)},[f.value.style.rating.show&&f.value.style.rating.position==="left"?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};padding-right:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(E,b)=>(e.openBlock(),e.createElementBlock("div",{class:"vue-ui-rating-unit-container",style:e.normalizeStyle(`position:relative;height:${f.value.style.itemSize}px;width:${f.value.style.itemSize}px`)},[A.value?(e.openBlock(),e.createElementBlock("img",{key:0,src:f.value.style.image.src,height:f.value.style.itemSize,width:f.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;opacity:${isNaN(u.value)?f.value.style.image.inactiveOpacity:i(E,!0)}`)},null,12,M9)):(e.openBlock(),e.createElementBlock("svg",{key:1,xmlns:e.unref(We),viewBox:"0 0 100 100",height:f.value.style.itemSize,width:f.value.style.itemSize,class:"vue-ui-rating-unit"},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_under_${l.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(Lt)(f.value.style.star.activeColor,.05)}`},null,8,Q9),e.createElementVNode("stop",{offset:"100%","stop-color":f.value.style.star.activeColor},null,8,T9)],8,V9)]),e.createElementVNode("polygon",{points:e.unref(Vr)({plot:{x:50,y:50},radius:30,apexes:f.value.style.star.apexes}),fill:isNaN(u.value)?f.value.style.star.inactiveColor:i(E),stroke:f.value.style.star.borderColor?f.value.style.star.borderColor:u.value?i(E):f.value.style.star.inactiveColor,"stroke-width":f.value.style.star.borderWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,O9)],8,U9)),A.value?(e.openBlock(),e.createElementBlock("img",{key:2,src:f.value.style.image.src,alt:`${f.value.style.image.alt} ${E}`,height:f.value.style.itemSize,width:f.value.style.itemSize,id:`active_${l.value}_${E}`,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;clip:rect(0px,${g(b,!0)*f.value.style.itemSize}px,${f.value.style.itemSize}px,0px`)},null,12,z9)):(e.openBlock(),e.createElementBlock("svg",{key:3,xmlns:e.unref(We),viewBox:`0 0 ${g(b)} 100`,height:f.value.style.itemSize,class:"vue-ui-rating-unit",id:`active_${l.value}_${E}`,style:{position:"absolute",top:"0",left:"0"}},[e.createElementVNode("defs",null,[e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`star_gradient_over_${l.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(Lt)(f.value.style.star.activeColor,.05)}`},null,8,H9),e.createElementVNode("stop",{offset:"100%","stop-color":f.value.style.star.activeColor},null,8,R9)],8,P9)]),e.createElementVNode("polygon",{points:e.unref(Vr)({plot:{x:50,y:50},radius:30,apexes:f.value.style.star.apexes}),fill:f.value.style.star.useGradient?`url(#star_gradient_over_${l.value})`:f.value.style.star.activeColor,stroke:f.value.style.star.activeColor},null,8,G9)],8,D9)),(e.openBlock(),e.createElementBlock("svg",{xmlns:e.unref(We),viewBox:"0 0 100 100",height:f.value.style.itemSize,class:"vue-ui-rating-unit",style:e.normalizeStyle(`position:absolute;top:0;left:0;${B.value?"":"cursor:pointer"}`)},[B.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("rect",{key:0,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onClick:T=>w(E),onMouseenter:T=>u.value=E,onMouseleave:K[0]||(K[0]=T=>u.value=void 0),tabindex:"0",onKeyup:e.withKeys(T=>w(E),["enter"])},null,40,K9)),B.value?(e.openBlock(),e.createElementBlock("rect",{key:1,class:"vue-ui-rating-mouse-trap",x:0,y:0,width:100,height:100,fill:"transparent",onMouseenter:T=>u.value=E,onMouseleave:K[1]||(K[1]=T=>u.value=void 0)},null,40,j9)):e.createCommentVNode("",!0)],12,W9)),f.value.style.tooltip.show&&y.value&&B.value?(e.openBlock(),e.createElementBlock("div",{key:4,class:"vue-ui-rating-tooltip",style:e.normalizeStyle(`border:1px solid ${f.value.style.tooltip.borderColor};position:absolute;top:${-48+f.value.style.tooltip.offsetY}px;left:50%;transform:translateX(-50%);width:fit-content;text-align:center;background:${f.value.style.tooltip.backgroundColor};display:${u.value===E?"block":"none"};padding:2px 12px;border-radius:${f.value.style.tooltip.borderRadius}px;box-shadow:${f.value.style.tooltip.boxShadow}`)},[e.createElementVNode("div",{style:e.normalizeStyle(`width:100%;display:flex;flex-direction:row;gap:6px;position:relative;text-align:center;color:${f.value.style.tooltip.color}`)},[e.createElementVNode("span",{style:e.normalizeStyle(`font-size:${f.value.style.tooltip.fontSize}px`)},e.toDisplayString(E),5),e.createTextVNode(" : "),e.createElementVNode("span",{style:e.normalizeStyle(`font-weight:${f.value.style.tooltip.bold?"bold":"normal"};font-size:${f.value.style.tooltip.fontSize}px`)},e.toDisplayString(n.dataset.rating[E]),5),e.createElementVNode("div",{style:e.normalizeStyle(`font-family:Arial !important;position:absolute;top:calc(100% - 4px);left:50%;transform:translateX(-50%);color:${f.value.style.tooltip.borderColor}`)}," ▼ ",4)],4)],4)):e.createCommentVNode("",!0)],4))),256)),f.value.style.rating.show&&f.value.style.rating.position==="right"?(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle(`width:fit-content;text-align:center;margin-bottom:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};padding-left:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],4),f.value.style.rating.show&&f.value.style.rating.position==="bottom"?(e.openBlock(),e.createElementBlock("div",{key:2,style:e.normalizeStyle(`width:100%;text-align:center;margin-top:${f.value.style.rating.offsetY}px;font-size:${f.value.style.rating.fontSize}px;font-weight:${f.value.style.rating.bold?"bold":"normal"};margin-left:${f.value.style.rating.offsetX}px`)},e.toDisplayString(isNaN(C.value)?"":C.value.toFixed(f.value.style.rating.roundingValue)),5)):e.createCommentVNode("",!0)],36))}},ag=vt(X9,[["__scopeId","data-v-86ced882"]]),q9=Object.freeze(Object.defineProperty({__proto__:null,default:ag},Symbol.toStringTag,{value:"Module"})),Y9=["id"],J9=["xmlns","viewBox"],Z9=["x","y","width","height","fill","stroke","stroke-width"],e$=["x","y","width","height","fill","stroke","stroke-width"],t$=["font-size","font-weight","fill","x","y"],o$=["x","y","width","height","onMouseover"],l$={key:0},a$=["font-size","fill","x","y","font-weight"],r$={key:0},n$=["x","y","font-size","fill","font-weight"],s$={key:1},i$=["x","y","width","height","stroke","stroke-width"],u$={key:2},A$=["id"],c$=["stop-color"],d$=["stop-color"],h$=["x","y","font-size","fill"],f$=["x","y","height","rx","fill"],v$=["x","y","font-size","fill"],g$=["stroke","x1","x2","y1","y2"],p$=["fill","d"],y$={key:3},m$={id:"colorScaleHorizontal",x1:"0%",x2:"100%",y1:"0%",y2:"0%"},b$=["stop-color"],k$=["stop-color"],C$=["x","y","width","height","rx"],w$=["x","y","font-size","fill"],B$=["x","y","font-size","fill"],x$=["stroke","x1","x2","y1","y2"],F$=["fill","d"],N$={class:"vue-ui-data-table"},_$={key:0},S$=["data-cell"],L$={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},E$=["data-cell"],I$={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$$={__name:"vue-ui-heatmap",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t;e.useCssVars(ae=>({"2d7e5208":ae.tdo}));const{vue_ui_heatmap:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length);xt(a.dataset)&&Ke({componentName:"VueUiHeatmap",type:"dataset"});const l=e.ref(it()),s=e.ref(null),u=e.ref(null),h=e.ref(!1),f=e.ref(""),c=e.ref(void 0),y=e.ref(null),C=e.ref(0),A=e.ref(null),B=e.ref(!1),v=e.computed(()=>{const ae=Je({userConfig:a.config,defaultConfig:n});return ae.theme?{...Je({userConfig:Nt.vue_ui_heatmap[ae.theme]||a.config,defaultConfig:ae})}:ae}),{isPrinting:i,isImaging:g,generatePdf:w,generateImage:U}=zt({elementId:`heatmap__${l.value}`,fileName:v.value.style.title.text||"vue-ui-heatmap"}),I=e.ref({showTable:v.value.table.show,showTooltip:v.value.style.tooltip.show}),Q=e.computed(()=>v.value.table.responsiveBreakpoint);function K(){new ResizeObserver(ge=>{ge.forEach(Z=>{B.value=Z.contentRect.width<Q.value})}).observe(A.value)}e.onMounted(K);const E=e.computed(()=>Math.max(...a.dataset.flatMap(ae=>(ae.values||[]).length))),b=e.computed(()=>{const ae=v.value.style.layout.padding.top+v.value.style.layout.padding.bottom+a.dataset.length*v.value.style.layout.cells.height,ge=v.value.style.layout.padding.left+v.value.style.layout.padding.right+(E.value<a.dataset.length?a.dataset.length:E.value)*v.value.style.layout.cells.height,Z=ae+(v.value.style.legend.show?v.value.style.legend.position==="right"?0:v.value.style.layout.cells.height*2:0);return{height:ae,heightWithLegend:Z,width:ge}}),T=e.computed(()=>v.value.style.legend.position),Y=e.computed(()=>({top:v.value.style.layout.padding.top,left:v.value.style.layout.padding.left,right:b.value.width-v.value.style.layout.padding.right-(T.value==="right"&&v.value.style.legend.show?92:0),bottom:b.value.height-v.value.style.layout.padding.bottom,height:b.value.height-v.value.style.layout.padding.top-v.value.style.layout.padding.bottom,width:b.value.width-v.value.style.layout.padding.right-v.value.style.layout.padding.left-(T.value==="right"&&v.value.style.legend.show?92:0)})),$=e.computed(()=>te.value.height*a.dataset.length),S=e.computed(()=>Math.max(...a.dataset.flatMap(ae=>ae.values))),W=e.computed(()=>Math.min(...a.dataset.flatMap(ae=>ae.values))),oe=e.computed(()=>{const ae=a.dataset.flatMap(Z=>Z.values);return ae.reduce((Z,ee)=>Z+ee,0)/ae.length}),te=e.computed(()=>({width:Y.value.width/E.value,height:Y.value.width/(E.value<a.dataset.length?a.dataset.length:E.value)})),he=e.computed(()=>{const ae=v.value.style.layout.dataLabels.yAxis.values.length?v.value.style.layout.dataLabels.yAxis.values:a.dataset.map(Z=>Z.name),ge=v.value.style.layout.dataLabels.xAxis.values;return{yLabels:ae,xLabels:ge.slice(0,E.value)}}),le=e.computed(()=>(a.dataset.forEach((ae,ge)=>{Wt({datasetObject:ae,requiredAttributes:["values"]}).forEach(Z=>{Ke({componentName:"VueUiHeatmap",type:"datasetSerieAttribute",property:"values",index:ge})})}),a.dataset.map(ae=>({...ae,temperatures:(ae.values||[]).map((ge,Z)=>ge>=oe.value?{side:"up",color:$s(v.value.style.layout.cells.colors.cold,v.value.style.layout.cells.colors.hot,W.value,S.value,ge),ratio:Math.abs(Math.abs(ge-oe.value)/Math.abs(S.value-oe.value))>1?1:Math.abs(Math.abs(ge-oe.value)/Math.abs(S.value-oe.value)),value:ge,yAxisName:ae.name,xAxisName:he.value.xLabels[Z],id:`vue-data-ui-heatmap-cell-${it()}`}:{side:"down",ratio:Math.abs(1-Math.abs(ge)/Math.abs(oe.value))>1?1:Math.abs(1-Math.abs(ge)/Math.abs(oe.value)),color:$s(v.value.style.layout.cells.colors.cold,v.value.style.layout.cells.colors.hot,W.value,S.value,ge),value:ge,yAxisName:ae.name,xAxisName:he.value.xLabels[Z],id:`vue-data-ui-heatmap-cell-${it()}`})})))),H=e.ref(null),P=e.ref(null);function X(ae,ge,Z,ee){y.value={x:Z,y:ee},console.log(ae);const{value:z,yAxisName:D,xAxisName:fe,id:M}=ae;c.value=M,H.value=z,P.value={datapoint:ae,seriesIndex:ge,series:le.value,config:v.value},h.value=!0;let N="";const j=v.value.style.tooltip.customFormat;Gt(j)&&wo(()=>j({datapoint:ae,seriesIndex:ge,series:le.value,config:v.value}))?f.value=j({datapoint:ae,seriesIndex:ge,series:le.value,config:v.value}):(N+=`<div>${D} ${fe?`${fe}`:""}</div>`,N+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${v.value.style.tooltip.borderColor};font-weight:bold;display:flex;flex-direction:row;gap:12px;align-items:center;justify-content:center"><span style="color:${$s(v.value.style.layout.cells.colors.cold,v.value.style.layout.cells.colors.hot,W.value,S.value,z)}">⬤</span><span>${isNaN(z)?"-":Ge({p:v.value.style.layout.dataLabels.prefix,v:z,s:v.value.style.layout.dataLabels.suffix,r:v.value.style.tooltip.roundingValue})}</span></div>`,f.value=`<div style="font-size:${v.value.style.tooltip.fontSize}px">${N}</div>`)}const q=e.computed(()=>Y.value.top+$.value*(1-H.value/S.value)),m=e.computed(()=>Y.value.left+(b.value.width-Y.value.left-v.value.style.layout.padding.right)*(H.value/S.value));e.computed(()=>{const ae=a.dataset.map(Z=>({name:Z.name})),ge=a.dataset.map(Z=>Z.values);return{head:ae,body:ge}});function _(){e.nextTick(()=>{const ae=["",...a.dataset.map((z,D)=>z.name)],ge=[];for(let z=0;z<he.value.xLabels.length;z+=1){const D=[he.value.xLabels[z]];for(let fe=0;fe<a.dataset.length;fe+=1)D.push([a.dataset[fe].values[z]]);ge.push(D)}const Z=[[v.value.style.title.text],[v.value.style.title.subtitle.text],[[""],[""],[""]]].concat([ae]).concat(ge),ee=eo(Z);Zt({csvContent:ee,title:v.value.style.title.text||"vue-ui-heatmap"})})}const x=e.ref(!1);function V(ae){x.value=ae,C.value+=1}function J(){I.value.showTable=!I.value.showTable}function ke(){I.value.showTooltip=!I.value.showTooltip}return o({generatePdf:w,generateCsv:_,generateImage:U,toggleTable:J,toggleTooltip:ke}),(ae,ge)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"heatmapChart",ref:s,class:e.normalizeClass(`vue-ui-heatmap ${x.value?"vue-data-ui-wrapper-fullscreen":""}`),style:e.normalizeStyle(`font-family:${v.value.style.fontFamily};width:100%; text-align:center;${v.value.style.title.text?"":"padding-top:36px"};background:${v.value.style.backgroundColor}`),id:`heatmap__${l.value}`},[v.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,style:e.normalizeStyle(`width:100%;background:${v.value.style.backgroundColor}`)},[e.createVNode(Xt,{config:{title:{cy:"heatmap-div-title",...v.value.style.title},subtitle:{cy:"heatmap-div-subtitle",...v.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),v.value.userOptions.show&&r.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:u,key:`user_options_${C.value}`,backgroundColor:v.value.style.backgroundColor,color:v.value.style.color,isImaging:e.unref(g),isPrinting:e.unref(i),uid:l.value,hasTooltip:v.value.userOptions.buttons.tooltip&&v.value.style.tooltip.show,hasPdf:v.value.userOptions.buttons.pdf,hasImg:v.value.userOptions.buttons.img,hasXls:v.value.userOptions.buttons.csv,hasTable:v.value.userOptions.buttons.table,hasFullscreen:v.value.userOptions.buttons.fullscreen,isFullscreen:x.value,isTooltip:I.value.showTooltip,titles:{...v.value.userOptions.buttonTitles},chartElement:s.value,onToggleFullscreen:V,onGeneratePdf:e.unref(w),onGenerateCsv:_,onGenerateImage:e.unref(U),onToggleTable:J,onToggleTooltip:ke},e.createSlots({_:2},[ae.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,ae.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,ae.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,ae.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,ae.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(ae.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,ae.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:Z,isFullscreen:ee})=>[e.renderSlot(ae.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:Z,isFullscreen:ee})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${b.value.width} ${b.value.heightWithLegend}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${v.value.style.backgroundColor};color:${v.value.style.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(Z,ee)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.temperatures,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:Y.value.left+te.value.width*D+v.value.style.layout.cells.spacing/2,y:Y.value.top+te.value.height*ee+v.value.style.layout.cells.spacing/2,width:te.value.width-v.value.style.layout.cells.spacing,height:te.value.height-v.value.style.layout.cells.spacing,fill:v.value.style.layout.cells.colors.underlayer,stroke:v.value.style.backgroundColor,"stroke-width":v.value.style.layout.cells.spacing},null,8,Z9),e.createElementVNode("rect",{x:Y.value.left+te.value.width*D+v.value.style.layout.cells.spacing/2,y:Y.value.top+te.value.height*ee+v.value.style.layout.cells.spacing/2,width:te.value.width-v.value.style.layout.cells.spacing,height:te.value.height-v.value.style.layout.cells.spacing,fill:z.color,stroke:v.value.style.backgroundColor,"stroke-width":v.value.style.layout.cells.spacing},null,8,e$),v.value.style.layout.cells.value.show?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle","font-size":v.value.style.layout.cells.value.fontSize,"font-weight":v.value.style.layout.cells.value.bold?"bold":"normal",fill:e.unref(aa)(z.color),x:Y.value.left+te.value.width*D+te.value.width/2,y:Y.value.top+te.value.height*ee+te.value.height/2+v.value.style.layout.cells.value.fontSize/3},e.toDisplayString(v.value.style.layout.dataLabels.prefix)+e.toDisplayString(Number(z.value.toFixed(v.value.style.layout.cells.value.roundingValue)).toLocaleString())+e.toDisplayString(v.value.style.layout.dataLabels.suffix),9,t$)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Z.temperatures,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:Y.value.left+te.value.width*D,y:Y.value.top+te.value.height*ee,width:te.value.width,height:te.value.height,fill:"transparent",stroke:"none",onMouseover:fe=>X(z,ee,Y.value.left+te.value.width*D,Y.value.top+te.value.height*ee),onMouseout:ge[0]||(ge[0]=fe=>{h.value=!1,c.value=void 0,H.value=null,y.value=null})},null,40,o$)]))),256)),v.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",l$,[e.createElementVNode("text",{"font-size":v.value.style.layout.dataLabels.yAxis.fontSize,fill:v.value.style.layout.dataLabels.yAxis.color,x:Y.value.left+v.value.style.layout.dataLabels.yAxis.offsetX-6,y:Y.value.top+te.value.height*ee+te.value.height/2+v.value.style.layout.dataLabels.yAxis.fontSize/3+v.value.style.layout.dataLabels.yAxis.offsetY,"text-anchor":"end","font-weight":v.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(he.value.yLabels[ee]),9,a$)])):e.createCommentVNode("",!0)]))),256)),v.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",r$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he.value.xLabels,(Z,ee)=>(e.openBlock(),e.createElementBlock("text",{x:Y.value.left+te.value.width/2+Y.value.width/he.value.xLabels.length*ee+v.value.style.layout.dataLabels.xAxis.offsetX,y:Y.value.top+v.value.style.layout.dataLabels.xAxis.offsetY-6,"text-anchor":"middle","font-size":v.value.style.layout.dataLabels.xAxis.fontSize,fill:v.value.style.layout.dataLabels.xAxis.color,"font-weight":v.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(Z),9,n$))),256))])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createElementBlock("g",s$,[e.createElementVNode("rect",{style:{"pointer-events":"none"},x:y.value.x-v.value.style.layout.cells.selected.border/2+v.value.style.layout.cells.spacing,y:y.value.y-v.value.style.layout.cells.selected.border/2+v.value.style.layout.cells.spacing,width:te.value.width-v.value.style.layout.cells.spacing+v.value.style.layout.cells.selected.border-v.value.style.layout.cells.spacing,height:te.value.height-v.value.style.layout.cells.spacing+v.value.style.layout.cells.selected.border-v.value.style.layout.cells.spacing,fill:"transparent",stroke:v.value.style.layout.cells.selected.color,"stroke-width":v.value.style.layout.cells.selected.border,rx:1},null,8,i$)])):e.createCommentVNode("",!0),v.value.style.legend.show&&T.value==="right"?(e.openBlock(),e.createElementBlock("g",u$,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`colorScaleVertical_${l.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":v.value.style.layout.cells.colors.hot},null,8,c$),e.createElementVNode("stop",{offset:"100%","stop-color":v.value.style.layout.cells.colors.cold},null,8,d$)],8,A$)]),e.createElementVNode("text",{x:Y.value.right+36+18,y:Y.value.top-v.value.style.legend.fontSize*1.5,"text-anchor":"middle","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(S.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,h$),e.createElementVNode("rect",{x:Y.value.right+36,y:Y.value.top,width:36,height:$.value,rx:v.value.style.legend.scaleBorderRadius,fill:`url(#colorScaleVertical_${l.value})`},null,8,f$),e.createElementVNode("text",{x:Y.value.right+36+18,y:Y.value.top+$.value+v.value.style.legend.fontSize*2.5,"text-anchor":"middle","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(W.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,v$),H.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:v.value.style.backgroundColor,"stroke-width":"2",x1:Y.value.right+36,x2:Y.value.right+72,y1:q.value,y2:q.value},null,8,g$)):e.createCommentVNode("",!0),H.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:v.value.style.color,stroke:"none",d:`M ${Y.value.right+36},${q.value} ${Y.value.right+26},${q.value-8} ${Y.value.right+26},${q.value+8}z`},null,8,p$)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),v.value.style.legend.show&&T.value==="bottom"?(e.openBlock(),e.createElementBlock("g",y$,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",m$,[e.createElementVNode("stop",{offset:"0%","stop-color":v.value.style.layout.cells.colors.cold},null,8,b$),e.createElementVNode("stop",{offset:"100%","stop-color":v.value.style.layout.cells.colors.hot},null,8,k$)])]),e.createElementVNode("rect",{x:Y.value.left,y:Y.value.bottom+v.value.style.layout.cells.height,width:b.value.width-Y.value.left-v.value.style.layout.padding.right,height:v.value.style.layout.cells.height,rx:v.value.style.legend.scaleBorderRadius>v.value.style.layout.cells.height/2?v.value.style.layout.cells.height/2:v.value.style.legend.scaleBorderRadius,fill:"url(#colorScaleHorizontal)"},null,8,C$),e.createElementVNode("text",{x:Y.value.left,y:Y.value.bottom+v.value.style.layout.cells.height*2+v.value.style.legend.fontSize*2,"text-anchor":"start","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(W.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,w$),e.createElementVNode("text",{x:Y.value.right,y:Y.value.bottom+v.value.style.layout.cells.height*2+v.value.style.legend.fontSize*2,"text-anchor":"end","font-size":v.value.style.legend.fontSize*2,fill:v.value.style.legend.color},e.toDisplayString(Number(S.value.toFixed(v.value.style.legend.roundingValue)).toLocaleString()),9,B$),H.value!==null?(e.openBlock(),e.createElementBlock("line",{key:0,stroke:v.value.style.backgroundColor,"stroke-width":"2",x1:m.value,x2:m.value,y1:Y.value.bottom+v.value.style.layout.cells.height,y2:Y.value.bottom+v.value.style.layout.cells.height*2},null,8,x$)):e.createCommentVNode("",!0),H.value!==null?(e.openBlock(),e.createElementBlock("path",{key:1,fill:v.value.style.color,stroke:"none",d:`M ${m.value},${Y.value.bottom+v.value.style.layout.cells.height} ${m.value-12},${Y.value.bottom+v.value.style.layout.cells.height-20} ${m.value+12},${Y.value.bottom+v.value.style.layout.cells.height-20}z`},null,8,F$)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.renderSlot(ae.$slots,"svg",{svg:b.value},void 0,!0)],14,J9)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:3,config:{type:"heatmap",style:{backgroundColor:v.value.style.backgroundColor,heatmap:{color:"#CCCCCC"}}}},null,8,["config"])),e.createVNode(Oo,{show:I.value.showTooltip&&h.value,backgroundColor:v.value.style.tooltip.backgroundColor,color:v.value.style.tooltip.color,borderRadius:v.value.style.tooltip.borderRadius,borderColor:v.value.style.tooltip.borderColor,borderWidth:v.value.style.tooltip.borderWidth,fontSize:v.value.style.tooltip.fontSize,backgroundOpacity:v.value.style.tooltip.backgroundOpacity,parent:s.value,content:f.value,isCustom:v.value.style.tooltip.customFormat&&typeof v.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(ae.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(ae.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...P.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),r.value?(e.openBlock(),e.createBlock(lo,{key:4,hideDetails:"",config:{open:I.value.showTable,maxHeight:1e4,body:{backgroundColor:v.value.style.backgroundColor,color:v.value.style.color},head:{backgroundColor:v.value.style.backgroundColor,color:v.value.style.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:A,class:"vue-ui-heatmap-table"},[e.createElementVNode("div",{style:"width:100%;overflow-x:auto;padding-top:36px;position:relative",class:e.normalizeClass({"vue-ui-responsive":B.value})},[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${v.value.table.th.backgroundColor};`),onClick:ge[1]||(ge[1]=Z=>I.value.showTable=!1),onKeypress:ge[2]||(ge[2]=e.withKeys(Z=>I.value.showTable=!1,["enter"]))},[e.createVNode(bt,{name:"close",stroke:v.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("table",N$,[e.createElementVNode("caption",{style:e.normalizeStyle(`backgroundColor:${v.value.table.th.backgroundColor};color:${v.value.table.th.color};outline:${v.value.table.th.outline}`)},[e.createTextVNode(e.toDisplayString(v.value.style.title.text)+" ",1),v.value.style.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",_$,e.toDisplayString(v.value.style.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${v.value.table.th.backgroundColor};color:${v.value.table.th.color}`)},[e.createElementVNode("th",{style:e.normalizeStyle(`outline:${v.value.table.th.outline};padding-right:6px`)},null,4),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataset,(Z,ee)=>(e.openBlock(),e.createElementBlock("th",{align:"right",style:e.normalizeStyle(`outline:${v.value.table.th.outline};padding-right:6px`)},e.toDisplayString(Z.name),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(he.value.xLabels,(Z,ee)=>(e.openBlock(),e.createElementBlock("tr",{role:"row",class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":ee%2===0,"vue-ui-data-table__tbody__row-odd":ee%2!==0}),style:e.normalizeStyle(`background:${v.value.table.td.backgroundColor};color:${v.value.table.td.color}`)},[e.createElementVNode("td",{"data-cell":v.value.table.colNames.xAxis,class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${v.value.table.td.outline}`)},[e.createElementVNode("div",L$,e.toDisplayString(Z),1)],12,S$),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataset,(z,D)=>(e.openBlock(),e.createElementBlock("td",{class:"vue-ui-data-table__tbody__td","data-cell":t.dataset[D].name,style:e.normalizeStyle(`outline:${v.value.table.td.outline}`)},[e.createElementVNode("div",I$,e.toDisplayString(isNaN(z.values[ee])?"-":e.unref(Ge)({p:v.value.style.layout.dataLabels.prefix,v:z.values[ee],s:v.value.style.layout.dataLabels.suffix,r:v.value.table.td.roundingValue})),1)],12,E$))),256))],6))),256))])])],2)],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,Y9))}},rg=vt($$,[["__scopeId","data-v-52af0be2"]]),M$=Object.freeze(Object.defineProperty({__proto__:null,default:rg},Symbol.toStringTag,{value:"Module"})),U$=["id"],V$=["xmlns","viewBox"],Q$={key:0},T$=["x1","x2","y1","y2","stroke","stroke-width"],O$=["x1","x2","y1","y2","stroke","stroke-width"],z$={key:1},D$=["points","fill","stroke-width","stroke-dasharray","stroke"],P$={key:0},H$=["cx","cy","r","fill","stroke","stroke-width","onMouseover"],R$={key:1},G$={key:2},W$=["id"],K$=["stop-color"],j$=["stop-color"],X$=["id"],q$=["stop-color"],Y$=["stop-color"],J$=["x","y","width","height","fill","stroke","stroke-width","rx"],Z$=["x","y","height","width","fill","stroke","stroke-width","rx"],eM={key:0},tM=["d","stroke","stroke-width"],oM=["d","stroke","stroke-width"],lM=["d","stroke","stroke-width"],aM=["d","stroke","stroke-width"],rM={key:3,style:{"pointer-events":"none !important"}},nM=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],sM=["x1","x2","y1","y2","stroke","stroke-width","stroke-dasharray"],iM=["x","y","font-size","fill","font-weight","text-anchor"],uM=["x","y","font-size","fill","font-weight"],AM=["cx","cy","r","fill","stroke","stroke-width"],cM=["cx","cy","r","fill","stroke","stroke-width"],dM=["x","y","font-size","fill","font-weight","text-anchor"],hM={key:4},fM=["x","y","font-size","fill"],vM=["x","y","font-size","fill"],gM=["id","transform","font-size","font-weight","fill"],pM={key:5},yM=["x","y","font-size","fill"],mM=["x","y","font-size","fill"],bM=["font-size","font-weight","fill","x","y"],kM=["id"],CM=["x","y","width","height"],wM={key:6},BM=["x1","x2","y1","y2","stroke-dasharray","stroke","stroke-width","clip-path"],xM=["x","y","fill","font-size","font-weight"],FM=["onClick"],NM={key:0,style:{width:"100%",display:"flex","align-items":"center","justify-content":"center"}},_M={viewBox:"0 0 20 20",height:"20",width:"20",style:{overflow:"hidden",background:"transparent"}},SM={key:0},LM=["innerHTML"],EM={__name:"vue-ui-scatter",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t,{vue_ui_scatter:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length),l=e.ref(it()),s=e.ref(null),u=e.ref(!1),h=e.ref(""),f=e.ref(0),c=e.ref(null),y=e.ref(null),C=e.ref(null),A=e.computed(()=>{const D=Je({userConfig:a.config,defaultConfig:n});return D.theme?{...Je({userConfig:Nt.vue_ui_scatter[D.theme]||a.config,defaultConfig:D}),customPalette:Pt[D.theme]||Me}:D}),B=e.ref(null);e.onMounted(()=>{if(xt(a.dataset)&&Ke({componentName:"VueUiScatter",type:"dataset"}),A.value.responsive){const D=Bo(()=>{const{width:fe,height:M}=xo({chart:c.value,title:A.value.style.title.text?y.value:null,legend:A.value.style.legend.show?C.value:null});Q.value.width=fe,Q.value.height=M});B.value=new ResizeObserver(D),B.value.observe(c.value.parentNode)}}),e.onBeforeUnmount(()=>{B.value&&B.value.disconnect()});const{isPrinting:v,isImaging:i,generatePdf:g,generateImage:w}=zt({elementId:`vue-ui-scatter_${l.value}`,fileName:A.value.style.title.text||"vue-ui-scatter"}),U=e.computed(()=>so(A.value.customPalette)),I=e.ref({showTable:A.value.table.show,showTooltip:A.value.style.tooltip.show}),Q=e.ref({height:A.value.style.layout.height,width:A.value.style.layout.width}),K=e.computed(()=>A.value.style.layout.marginalBars.show?A.value.style.layout.marginalBars.size+A.value.style.layout.marginalBars.offset:0),E=e.computed(()=>({top:A.value.style.layout.padding.top+K.value,right:Q.value.width-A.value.style.layout.padding.right-K.value,bottom:Q.value.height-A.value.style.layout.padding.bottom,left:A.value.style.layout.padding.left,height:Q.value.height-A.value.style.layout.padding.top-A.value.style.layout.padding.bottom-K.value,width:Q.value.width-A.value.style.layout.padding.left-A.value.style.layout.padding.right-K.value})),b=e.computed(()=>{a.dataset.forEach((j,O)=>{Wt({datasetObject:j,requiredAttributes:["values"]}).forEach(ce=>{Ke({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:ce,index:O})}),j.values&&j.values.forEach((ce,re)=>{Wt({datasetObject:ce,requiredAttributes:["x","y"]}).forEach(ie=>{Ke({componentName:"VueUiScatter",type:"datasetSerieAttribute",property:`values.${ie}`,index:`${O} - ${re}`})})})});const D=Math.min(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.x))),fe=Math.max(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.x))),M=Math.min(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.y))),N=Math.max(...Y.value.filter(j=>!V.value.includes(j.id)).flatMap(j=>j.values.map(O=>O.y)));return{xMin:D>=0?0:D,xMax:fe,yMin:M>=0?0:M,yMax:N}}),T=e.computed(()=>({x:E.value.left+Math.abs(b.value.xMin)/(b.value.xMax+Math.abs(b.value.xMin))*E.value.width,y:E.value.bottom-Math.abs(b.value.yMin)/(b.value.yMax+Math.abs(b.value.yMin))*E.value.height})),Y=e.computed(()=>a.dataset.map((D,fe)=>{const M=`cluster_${l.value}_${fe}`;return{...D,id:M,color:D.color?D.color:U.value[fe]||Me[fe]||Me[fe%Me.length],opacity:V.value.includes(M)?.5:1,shape:D.shape??"circle",segregate:()=>J(M),isSegregated:V.value.includes(M)}})),$=e.computed(()=>({cy:"scatter-div-legend",backgroundColor:A.value.style.legend.backgroundColor,color:A.value.style.legend.color,fontSize:A.value.style.legend.fontSize,paddingBottom:12,fontWeight:A.value.style.legend.bold?"bold":""})),S=e.computed(()=>Y.value.map((D,fe)=>({...D,plots:D.values.map(M=>({x:E.value.left+(M.x+Math.abs(b.value.xMin))/(b.value.xMax+Math.abs(b.value.xMin))*E.value.width,y:E.value.bottom-(M.y+Math.abs(b.value.yMin))/(b.value.yMax+Math.abs(b.value.yMin))*E.value.height,v:{...M,name:M.name||""},clusterName:D.name,color:D.color?D.color:U.value[fe]||Me[fe]||Me[fe%Me.length],id:`plot_${l.value}_${Math.random()}`,weight:M.weight??A.value.style.layout.plots.radius}))})).filter(D=>!V.value.includes(D.id))),W=e.computed(()=>S.value.map(D=>{const fe=D.plots.reduce((Ce,Ue)=>Ce+Ue.x,0)/D.plots.length,M=D.plots.reduce((Ce,Ue)=>Ce+Ue.y,0)/D.plots.length;let N=0,j=0,O=0;for(const Ce of D.plots)N+=(Ce.x-fe)*(Ce.y-M),j+=(Ce.x-fe)**2,O+=(Ce.y-M)**2;const ce=N/Math.sqrt(j*O),re=ce*(Math.sqrt(O)/Math.sqrt(j)),ie=M-re*fe,G={x1:E.value.left,x2:E.value.right,y1:re*E.value.left+ie,y2:re*E.value.right+ie,coefficient:ce},ne=(G.y2-G.y1)/(G.x2-G.x1),Ae=G.y1-ne*G.x1,se=Math.min(Q.value.width-A.value.style.layout.padding.right,Math.max(A.value.style.layout.padding.left,(E.value.top-Ae)/ne)),ve={x:se,y:ne*se+Ae<=A.value.style.layout.padding.top?E.value.top:ne*se+Ae};return{...D,correlation:G,label:ve,plots:D.plots.map(Ce=>{const Ue=(Ce.x+ne*Ce.y-ne*Ae)/(1+Math.pow(ne,2)),Ve=(ne*Ce.x+Math.pow(ne,2)*Ce.y+Ae)/(1+Math.pow(ne,2)),Ye=Math.sqrt(Math.pow(Ce.x-Ue,2)+Math.pow(Ce.y-Ve,2));return{...Ce,deviation:Ye,shape:D.shape,color:D.color}})}})),oe=e.computed(()=>Math.max(...W.value.flatMap(D=>D.plots.map(fe=>Math.abs(fe.deviation)))));function te(){return W.value}function he(D,fe){const M=Array.isArray(D)?D.flatMap(Ye=>Ye.plots.map(ze=>({x:ze.x,y:ze.y}))):D.plots.map(Ye=>({x:Ye.x,y:Ye.y}));let N=1/0,j=-1/0,O=1/0,ce=-1/0;M.forEach(({x:Ye,y:ze})=>{N=Math.min(N,Ye),j=Math.max(j,Ye),O=Math.min(O,ze),ce=Math.max(ce,ze)});const re=j-N,ie=ce-O,G=re/fe,ne=ie/fe,Ae=Array(fe).fill(0),se=Array(fe).fill(0);M.forEach(({x:Ye,y:ze})=>{const It=Math.floor((Ye-N)/G),kt=Math.floor((ze-O)/ne);Ae[It]||(Ae[It]=0),se[kt]||(se[kt]=0),Ae[It]+=1,se[kt]+=1});const ve=[],Ce=[];for(let Ye=0;Ye<fe;Ye+=1)ve.push(N+(Ye+.5)*G),Ce.push(O+(Ye+.5)*ne);const Ue=Math.max(...Ae),Ve=Math.max(...se);return{x:Ae,y:se,avgX:ve,avgY:Ce,maxX:Ue,maxY:Ve}}const le=e.computed(()=>A.value.style.layout.marginalBars.tranches),H=e.computed(()=>he(S.value,le.value)),P=e.computed(()=>{const D=E.value.top-A.value.style.layout.marginalBars.offset,fe=E.value.right+A.value.style.layout.marginalBars.offset;return S.value.map(M=>{const N=he(M,le.value);return{coords:N,dX:ba(N.avgX.map((j,O)=>({x:j,y:D-N.x[O]/N.maxX*A.value.style.layout.marginalBars.size}))),dY:ba(N.avgY.map((j,O)=>({y:j,x:fe+A.value.style.layout.marginalBars.size*N.y[O]/N.maxY}))),color:M.color,id:M.id}})}),X=e.ref(void 0),q=e.ref(null),m=e.ref(null);function _(D,fe){X.value=D.id,q.value=D;let M="";m.value={datapoint:D,seriesIndex:fe,series:W.value,config:A.value};const N=A.value.style.tooltip.customFormat;Gt(N)&&wo(()=>N({datapoint:D,seriesIndex:fe,series:W.value,config:A.value}))?h.value=N({datapoint:D,seriesIndex:fe,series:W.value,config:A.value}):(D.clusterName&&(M+=`<div style="display:flex;gap:3px;align-items:center">${D.clusterName}</div>`),D.v.name&&(M+=`<div>${D.v.name}</div>`),M+=`<div style="text-align:left;margin-top:6px;padding-top:6px;border-top:1px solid ${A.value.style.tooltip.borderColor}">`,M+=`<div>${A.value.style.layout.dataLabels.xAxis.name}: <b>${isNaN(D.v.x)?"-":Ge({p:A.value.style.tooltip.prefix,v:D.v.x,s:A.value.style.tooltip.suffix,r:A.value.style.tooltip.roundingValue})}</b></div>`,M+=`<div>${A.value.style.layout.dataLabels.yAxis.name}: <b>${isNaN(D.v.y)?"-":Ge({p:A.value.style.tooltip.prefix,v:D.v.y,s:A.value.style.tooltip.suffix,r:A.value.style.tooltip.roundingValue})}</b></div>`,M+=`${A.value.style.layout.plots.deviation.translation}: <b>${Ge({v:D.deviation,r:A.value.style.layout.plots.deviation.roundingValue})}</b>`,M+="</div>",h.value=`<div>${M}</div>`),u.value=!0}function x(){u.value=!1,X.value=void 0,q.value=null}const V=e.ref([]);function J(D){V.value.includes(D)?V.value=V.value.filter(fe=>fe!==D):V.value.length<a.dataset.length-1&&V.value.push(D)}function ke(){e.nextTick(()=>{const D=["",A.value.table.translations.correlationCoefficient,A.value.table.translations.nbrPlots,`${A.value.style.layout.dataLabels.xAxis.name} ${A.value.table.translations.average}`,`${A.value.style.layout.dataLabels.yAxis.name} ${A.value.table.translations.average}`],fe=W.value.map(j=>[j.name,j.correlation.coefficient,j.plots.length,j.plots.map(O=>O.v.x).reduce((O,ce)=>O+ce,0)/j.plots.length,j.plots.map(O=>O.v.y).reduce((O,ce)=>O+ce,0)/j.plots.length]),M=[[A.value.style.title.text],[A.value.style.title.subtitle.text],[[""],[""],[""]]].concat([D]).concat(fe),N=eo(M);Zt({csvContent:N,title:A.value.style.title.text||"vue-ui-heatmap"})})}const ae=e.computed(()=>{const D=[A.value.table.translations.series,A.value.table.translations.correlationCoefficient,A.value.table.translations.nbrPlots,`${A.value.style.layout.dataLabels.xAxis.name} ${A.value.table.translations.average}`,`${A.value.style.layout.dataLabels.yAxis.name} ${A.value.table.translations.average}`],fe=W.value.map(N=>[{shape:N.shape,content:N.name,color:N.color},Number((N.correlation.coefficient??0).toFixed(A.value.table.td.roundingValue)).toLocaleString(),N.plots.length.toLocaleString(),Number((N.plots.map(j=>j.v.x??0).reduce((j,O)=>j+O,0)/N.plots.length).toFixed(A.value.table.td.roundingAverage)).toLocaleString(),Number((N.plots.map(j=>j.v.y??0).reduce((j,O)=>j+O,0)/N.plots.length).toFixed(A.value.table.td.roundingAverage)).toLocaleString()]),M={th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint};return{head:D,body:fe,config:M,colNames:D}}),ge=e.ref(!1);function Z(D){ge.value=D,f.value+=1}function ee(){I.value.showTable=!I.value.showTable}function z(){I.value.showTooltip=!I.value.showTooltip}return o({getData:te,generatePdf:g,generateCsv:ke,generateImage:w,toggleTable:ee,toggleTooltip:z}),(D,fe)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-scatter ${ge.value?"vue-data-ui-wrapper-fullscreen":""} ${A.value.useCssAnimation?"":"vue-ui-dna"}`),ref_key:"scatterChart",ref:c,id:`vue-ui-scatter_${l.value}`,style:e.normalizeStyle(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;${A.value.style.title.text?"":"padding-top:36px"};background:${A.value.style.backgroundColor};${A.value.responsive?"height: 100%":""}`)},[A.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:y,style:e.normalizeStyle(`width:100%;background:${A.value.style.backgroundColor}`)},[e.createVNode(Xt,{config:{title:{cy:"scatter-div-title",...A.value.style.title},subtitle:{cy:"scatter-div-subtitle",...A.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),A.value.userOptions.show&&r.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:s,key:`user_options_${f.value}`,backgroundColor:A.value.style.backgroundColor,color:A.value.style.color,isImaging:e.unref(i),isPrinting:e.unref(v),uid:l.value,hasTooltip:A.value.userOptions.buttons.tooltip&&A.value.style.tooltip.show,hasPdf:A.value.userOptions.buttons.pdf,hasImg:A.value.userOptions.buttons.img,hasXls:A.value.userOptions.buttons.csv,hasTable:A.value.userOptions.buttons.table,hasFullscreen:A.value.userOptions.buttons.fullscreen,isTooltip:I.value.showTooltip,isFullscreen:ge.value,titles:{...A.value.userOptions.buttonTitles},chartElement:c.value,onToggleFullscreen:Z,onGeneratePdf:e.unref(g),onGenerateCsv:ke,onGenerateImage:e.unref(w),onToggleTable:ee,onToggleTooltip:z},e.createSlots({_:2},[D.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,D.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,D.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,D.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,D.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(D.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,D.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:M,isFullscreen:N})=>[e.renderSlot(D.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:M,isFullscreen:N})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isTooltip","isFullscreen","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":ge.value,"vue-data-ui-fulscreen--off":!ge.value}),viewBox:`0 0 ${Q.value.width<=0?10:Q.value.width} ${Q.value.height<=0?10:Q.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${A.value.style.backgroundColor};color:${A.value.style.color}`)},[A.value.style.layout.axis.show?(e.openBlock(),e.createElementBlock("g",Q$,[e.createElementVNode("line",{x1:T.value.x,x2:T.value.x,y1:E.value.top,y2:E.value.bottom,stroke:A.value.style.layout.axis.stroke,"stroke-width":A.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,T$),e.createElementVNode("line",{x1:E.value.left,x2:E.value.right,y1:T.value.y,y2:T.value.y,stroke:A.value.style.layout.axis.stroke,"stroke-width":A.value.style.layout.axis.strokeWidth,"stroke-linecap":"round"},null,8,O$)])):e.createCommentVNode("",!0),A.value.style.layout.plots.giftWrap.show?(e.openBlock(),e.createElementBlock("g",z$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[M.plots.length>2?(e.openBlock(),e.createElementBlock("polygon",{key:0,points:e.unref(Dv)({series:M.plots}),fill:`${M.color}${e.unref(Xe)[A.value.style.layout.plots.giftWrap.fillOpacity*100]}`,"stroke-width":A.value.style.layout.plots.giftWrap.strokeWidth,"stroke-dasharray":A.value.style.layout.plots.giftWrap.strokeDasharray,stroke:M.color,"stroke-linejoin":"round","stroke-linecap":"round"},null,8,D$)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[!M.shape||M.shape==="circle"?(e.openBlock(),e.createElementBlock("g",P$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.plots,(j,O)=>(e.openBlock(),e.createElementBlock("circle",{cx:j.x,cy:j.y,r:X.value&&X.value===j.id?j.weight*2:j.weight,fill:`${M.color}${e.unref(Xe)[A.value.style.layout.plots.opacity*100]}`,stroke:A.value.style.layout.plots.stroke,"stroke-width":A.value.style.layout.plots.strokeWidth,onMouseover:ce=>_(j,N),onMouseleave:x,style:e.normalizeStyle(`opacity:${X.value&&X.value===j.id?1:A.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(j.deviation)/oe.value:A.value.style.layout.plots.significance.show&&Math.abs(j.deviation)>A.value.style.layout.plots.significance.deviationThreshold?A.value.style.layout.plots.significance.opacity:1}`)},null,44,H$))),256))])):(e.openBlock(),e.createElementBlock("g",R$,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(M.plots,(j,O)=>(e.openBlock(),e.createBlock(ra,{plot:{x:j.x,y:j.y},radius:X.value&&X.value===j.id?j.weight*2:j.weight,shape:M.shape,color:`${M.color}${e.unref(Xe)[A.value.style.layout.plots.opacity*100]}`,stroke:A.value.style.layout.plots.stroke,strokeWidth:A.value.style.layout.plots.strokeWidth,onMouseover:ce=>_(j,N),onMouseleave:x,style:e.normalizeStyle(`opacity:${X.value&&X.value===j.id?1:A.value.style.layout.plots.significance.useDistanceOpacity?1-Math.abs(j.deviation)/oe.value:A.value.style.layout.plots.significance.show&&Math.abs(j.deviation)>A.value.style.layout.plots.significance.deviationThreshold?A.value.style.layout.plots.significance.opacity:1}`)},null,8,["plot","radius","shape","color","stroke","strokeWidth","onMouseover","style"]))),256))]))]))),256)),A.value.style.layout.marginalBars.show?(e.openBlock(),e.createElementBlock("g",G$,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`marginal_x_${l.value}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":A.value.style.layout.marginalBars.fill},null,8,K$),e.createElementVNode("stop",{offset:"100%","stop-color":A.value.style.backgroundColor},null,8,j$)],8,W$),e.createElementVNode("linearGradient",{id:`marginal_y_${l.value}`,x1:"0%",x2:"100%",y1:"0%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":A.value.style.backgroundColor},null,8,q$),e.createElementVNode("stop",{offset:"100%","stop-color":A.value.style.layout.marginalBars.fill},null,8,Y$)],8,X$)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value.x,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[M&&H.value.avgX[N]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:H.value.avgX[N]-E.value.width/le.value/2,y:E.value.top-A.value.style.layout.marginalBars.offset-M/H.value.maxX*A.value.style.layout.marginalBars.size,width:E.value.width/le.value<=0?1e-4:E.value.width/le.value,height:M/H.value.maxX*A.value.style.layout.marginalBars.size<=0?1e-4:M/H.value.maxX*A.value.style.layout.marginalBars.size,fill:A.value.style.layout.marginalBars.useGradient?`url(#marginal_x_${l.value})`:A.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${A.value.style.layout.marginalBars.opacity}`),stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.strokeWidth,rx:A.value.style.layout.marginalBars.borderRadius},null,12,J$)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(H.value.y,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[M&&H.value.avgY[N]?(e.openBlock(),e.createElementBlock("rect",{key:0,x:E.value.right+A.value.style.layout.marginalBars.offset,y:H.value.avgY[N]-E.value.height/le.value/2,height:E.value.height/le.value<=0?1e-4:E.value.height/le.value,width:M/H.value.maxY*A.value.style.layout.marginalBars.size<=0?1e-4:M/H.value.maxY*A.value.style.layout.marginalBars.size,fill:A.value.style.layout.marginalBars.useGradient?`url(#marginal_y_${l.value})`:A.value.style.layout.marginalBars.fill,style:e.normalizeStyle(`opacity:${A.value.style.layout.marginalBars.opacity}`),stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.strokeWidth,rx:A.value.style.layout.marginalBars.borderRadius},null,12,Z$)):e.createCommentVNode("",!0)]))),256)),A.value.style.layout.marginalBars.showLines?(e.openBlock(),e.createElementBlock("g",eM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,M=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:0,d:`M ${M.dX}`,stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,tM)),V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:1,d:`M ${M.dX}`,stroke:M.color,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,oM)),V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:2,d:`M ${M.dY}`,stroke:A.value.style.backgroundColor,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth+1,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,lM)),V.value.includes(M.id)?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("path",{key:3,d:`M ${M.dY}`,stroke:M.color,"stroke-width":A.value.style.layout.marginalBars.linesStrokeWidth,"stroke-linecap":"round","stroke-linejoin":"round",fill:"none"},null,8,aM))],64))),256))])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),q.value&&A.value.style.layout.plots.selectors.show?(e.openBlock(),e.createElementBlock("g",rM,[e.createElementVNode("line",{x1:T.value.x,x2:q.value.x,y1:q.value.y,y2:q.value.y,stroke:A.value.style.layout.plots.selectors.stroke,"stroke-width":A.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":A.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,nM),e.createElementVNode("line",{x1:q.value.x,x2:q.value.x,y1:T.value.y,y2:q.value.y,stroke:A.value.style.layout.plots.selectors.stroke,"stroke-width":A.value.style.layout.plots.selectors.strokeWidth,"stroke-dasharray":A.value.style.layout.plots.selectors.strokeDasharray,"stroke-linecap":"round",class:"line-pointer"},null,8,sM),e.createElementVNode("text",{x:T.value.x+(q.value.x>T.value.x?-6:6),y:q.value.y+A.value.style.layout.plots.selectors.labels.fontSize/3,"font-size":A.value.style.layout.plots.selectors.labels.fontSize,fill:A.value.style.layout.plots.selectors.labels.color,"font-weight":A.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":q.value.x>T.value.x?"end":"start"},e.toDisplayString(e.unref(Ge)({p:A.value.style.layout.plots.selectors.labels.prefix,v:q.value.v.y,s:A.value.style.layout.plots.selectors.labels.suffix,r:A.value.style.layout.plots.selectors.labels.rounding})),9,iM),e.createElementVNode("text",{x:q.value.x,y:T.value.y+(q.value.y>T.value.y?-6:A.value.style.layout.plots.selectors.labels.fontSize+6),"font-size":A.value.style.layout.plots.selectors.labels.fontSize,fill:A.value.style.layout.plots.selectors.labels.color,"font-weight":A.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":"middle"},e.toDisplayString(e.unref(Ge)({p:A.value.style.layout.plots.selectors.labels.prefix,v:q.value.v.x,s:A.value.style.layout.plots.selectors.labels.suffix,r:A.value.style.layout.plots.selectors.labels.rounding})),9,uM),e.createElementVNode("circle",{cx:T.value.x,cy:q.value.y,r:A.value.style.layout.plots.selectors.markers.radius,fill:A.value.style.layout.plots.selectors.markers.fill,stroke:A.value.style.layout.plots.selectors.markers.stroke,"stroke-width":A.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,AM),e.createElementVNode("circle",{cx:q.value.x,cy:T.value.y,r:A.value.style.layout.plots.selectors.markers.radius,fill:A.value.style.layout.plots.selectors.markers.fill,stroke:A.value.style.layout.plots.selectors.markers.stroke,"stroke-width":A.value.style.layout.plots.selectors.markers.strokeWidth,class:"line-pointer"},null,8,cM),A.value.style.layout.plots.selectors.labels.showName?(e.openBlock(),e.createElementBlock("text",{key:0,x:q.value.x,y:q.value.y+(q.value.y<T.value.y?-A.value.style.layout.plots.selectors.labels.fontSize/2:A.value.style.layout.plots.selectors.labels.fontSize),"font-size":A.value.style.layout.plots.selectors.labels.fontSize,fill:A.value.style.layout.plots.selectors.labels.color,"font-weight":A.value.style.layout.plots.selectors.labels.bold?"bold":"normal","text-anchor":q.value.x<E.value.left+100?"start":q.value.x>E.value.right-100?"end":q.value.x>T.value.x?"start":"end"},e.toDisplayString(q.value.v.name),9,dM)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),A.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",hM,[e.createElementVNode("text",{x:E.value.left-5,y:T.value.y+A.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"end","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(b.value.xMin.toFixed(A.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,fM),e.createElementVNode("text",{x:E.value.right+3,y:T.value.y+A.value.style.layout.dataLabels.xAxis.fontSize/3,"text-anchor":"start","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(Number(b.value.xMax.toFixed(A.value.style.layout.dataLabels.xAxis.rounding)).toLocaleString()),9,vM),e.createElementVNode("text",{id:`vue-ui-scatter-xAxis-label-${l.value}`,transform:`translate(${A.value.style.layout.dataLabels.xAxis.fontSize*2}, ${E.value.top+E.value.height/2}), rotate(-90)`,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,"font-weight":A.value.style.layout.dataLabels.xAxis.bold?"bold":"normal",fill:A.value.style.layout.dataLabels.xAxis.color},e.toDisplayString(A.value.style.layout.dataLabels.xAxis.name),9,gM)])):e.createCommentVNode("",!0),A.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",pM,[e.createElementVNode("text",{x:T.value.x,y:E.value.bottom+A.value.style.layout.dataLabels.yAxis.fontSize+3,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,fill:A.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(b.value.yMin.toFixed(A.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,yM),e.createElementVNode("text",{x:T.value.x,y:E.value.top-A.value.style.layout.dataLabels.yAxis.fontSize/2,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,fill:A.value.style.layout.dataLabels.yAxis.color},e.toDisplayString(Number(b.value.yMax.toFixed(A.value.style.layout.dataLabels.yAxis.rounding)).toLocaleString()),9,mM),e.createElementVNode("text",{"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,"font-weight":A.value.style.layout.dataLabels.yAxis.bold?"bold":"normal",fill:A.value.style.layout.dataLabels.yAxis.color,x:E.value.left+E.value.width/2,y:E.value.bottom+8+A.value.style.layout.dataLabels.yAxis.fontSize*2},e.toDisplayString(A.value.style.layout.dataLabels.yAxis.name),9,bM)])):e.createCommentVNode("",!0),e.createElementVNode("clipPath",{id:`clip_path_${l.value}`},[e.createElementVNode("rect",{x:E.value.left,y:E.value.top,width:E.value.width<=0?1e-4:E.value.width,height:E.value.height<=0?1e-4:E.value.height},null,8,CM)],8,kM),A.value.style.layout.correlation.show?(e.openBlock(),e.createElementBlock("g",wM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("line",{x1:M.correlation.x1,x2:M.correlation.x2,y1:M.correlation.y1,y2:M.correlation.y2,"stroke-dasharray":A.value.style.layout.correlation.strokeDasharray,stroke:M.color,"stroke-width":A.value.style.layout.correlation.strokeWidth,"clip-path":`url(#clip_path_${l.value})`},null,8,BM))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(W.value,(M,N)=>(e.openBlock(),e.createElementBlock("g",null,[A.value.style.layout.correlation.label.show?(e.openBlock(),e.createElementBlock("text",{key:0,x:M.label.x,y:M.label.y,fill:A.value.style.layout.correlation.label.useSerieColor?M.color:A.value.style.layout.correlation.label.color,"font-size":A.value.style.layout.correlation.label.fontSize,"font-weight":A.value.style.layout.correlation.label.bold?"bold":"normal"},e.toDisplayString(Number(M.correlation.coefficient.toFixed(A.value.style.layout.correlation.label.roundingValue)).toLocaleString()),9,xM)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),e.renderSlot(D.$slots,"svg",{svg:Q.value},void 0,!0)],14,V$)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:3,config:{type:"quadrant",style:{backgroundColor:A.value.style.backgroundColor,quadrant:{grid:{color:A.value.style.layout.axis.stroke},plots:{color:A.value.style.layout.axis.stroke,radius:1}}}}},null,8,["config"])),e.createElementVNode("div",{ref_key:"chartLegend",ref:C},[A.value.style.legend.show?(e.openBlock(),e.createBlock(Zo,{key:0,legendSet:Y.value,config:$.value,onClickMarker:fe[0]||(fe[0]=({legend:M})=>J(M.id))},{item:e.withCtx(({legend:M})=>[e.createElementVNode("div",{onClick:N=>M.segregate(),style:e.normalizeStyle(`opacity:${V.value.includes(M.id)?.5:1}`)},e.toDisplayString(M.name),13,FM)]),_:1},8,["legendSet","config"])):e.renderSlot(D.$slots,"legend",{key:1,legend:Y.value},void 0,!0)],512),e.createVNode(Oo,{show:I.value.showTooltip&&u.value,backgroundColor:A.value.style.tooltip.backgroundColor,color:A.value.style.tooltip.color,borderRadius:A.value.style.tooltip.borderRadius,borderColor:A.value.style.tooltip.borderColor,borderWidth:A.value.style.tooltip.borderWidth,fontSize:A.value.style.tooltip.fontSize,backgroundOpacity:A.value.style.tooltip.backgroundOpacity,parent:c.value,content:h.value,isCustom:A.value.style.tooltip.customFormat&&typeof A.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(D.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...m.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(D.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...m.value})),void 0,!0)]),default:e.withCtx(()=>[A.value.style.tooltip.showShape?(e.openBlock(),e.createElementBlock("div",NM,[(e.openBlock(),e.createElementBlock("svg",_M,[e.createVNode(ra,{shape:q.value.shape,color:q.value.color,plot:{x:10,y:10},radius:7},null,8,["shape","color"])]))])):e.createCommentVNode("",!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),r.value?(e.openBlock(),e.createBlock(lo,{key:4,hideDetails:"",config:{open:I.value.showTable,maxHeight:1e4,body:{backgroundColor:A.value.style.backgroundColor,color:A.value.style.color},head:{backgroundColor:A.value.style.backgroundColor,color:A.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(yo,{colNames:ae.value.colNames,head:ae.value.head,body:ae.value.body,config:ae.value.config,title:`${A.value.style.title.text}${A.value.style.title.subtitle.text?` : ${A.value.style.title.subtitle.text}`:""}`,onClose:fe[1]||(fe[1]=M=>I.value.showTable=!1)},{th:e.withCtx(({th:M})=>[e.createTextVNode(e.toDisplayString(M),1)]),td:e.withCtx(({td:M})=>[M.shape?(e.openBlock(),e.createElementBlock("div",SM,[e.createElementVNode("span",null,e.toDisplayString(M.content),1)])):(e.openBlock(),e.createElementBlock("div",{key:1,innerHTML:M},null,8,LM))]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,U$))}},ng=vt(EM,[["__scopeId","data-v-134a7dfd"]]),IM=Object.freeze(Object.defineProperty({__proto__:null,default:ng},Symbol.toStringTag,{value:"Module"})),$M=["id"],MM=["xmlns","viewBox"],UM={key:0},VM=["id"],QM=["stop-color"],TM=["stop-color"],OM=["stop-color"],zM=["id"],DM=["stop-color"],PM=["stop-color"],HM=["stop-color"],RM={key:0},GM=["x1","x2","y1","y2","stroke","stroke-width"],WM=["x1","x2","y1","y2","stroke","stroke-width"],KM={key:1},jM=["x1","x2","y1","y2","stroke","stroke-width"],XM=["x","y","font-size","fill","font-weight"],qM={key:2},YM=["transform","text-anchor","font-size","fill","font-weight"],JM=["x1","x2","y1","y2","stroke","stroke-width"],ZM={key:0},eU=["cx","cy","r","fill"],tU=["cx","cy","r","fill"],oU={key:1},lU=["x1","x2","y1","y2","stroke","stroke-width"],aU=["x1","x2","y1","y2","stroke","stroke-width"],rU=["x","y","height","width","fill","rx"],nU=["x","y","height","width","fill","rx","stroke","stroke-width"],sU=["x","y","height","width","fill","onMouseover"],iU=["innerHTML"],uU={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t,{vue_ui_candlestick:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length),l=e.ref(it()),s=e.ref(null),u=e.ref(!1),h=e.ref(""),f=e.ref(void 0),c=e.ref(0),y=e.ref(0),C=e.ref(null),A=e.ref(null),B=e.ref(null),v=e.ref(null),i=e.computed(()=>{const Z=Je({userConfig:a.config,defaultConfig:n});return Z.theme?{...Je({userConfig:Nt.vue_ui_candlestick[Z.theme]||a.config,defaultConfig:Z})}:Z}),g=e.ref({height:i.value.style.height,width:i.value.style.width,xAxisFontSize:i.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:i.value.style.layout.grid.yAxis.dataLabels.fontSize}),w=e.ref(null);e.onMounted(()=>{if(xt(a.dataset)&&Ke({componentName:"VueUiCandlestick",type:"dataset"}),i.value.responsive){const Z=Bo(()=>{const{width:ee,height:z}=xo({chart:C.value,title:i.value.style.title.text?A.value:null,slicer:v.value,legend:B.value});g.value.width=ee,g.value.height=z,g.value.xAxisFontSize=El({relator:Math.min(ee,z),adjuster:i.value.style.width,source:i.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),g.value.yAxisFontSize=El({relator:Math.min(ee,z),adjuster:i.value.style.width,source:i.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});w.value=new ResizeObserver(Z),w.value.observe(C.value.parentNode)}}),e.onBeforeUnmount(()=>{w.value&&w.value.disconnect()});const{isPrinting:U,isImaging:I,generatePdf:Q,generateImage:K}=zt({elementId:`vue-ui-candlestick_${l.value}`,fileName:i.value.style.title.text||"vue-ui-candlestick"}),E=e.ref({showTable:i.value.table.show,showTooltip:i.value.style.tooltip.show}),b=e.computed(()=>{const{top:Z,right:ee,bottom:z,left:D}=i.value.style.layout.padding;return{top:Z,right:g.value.width-ee,left:D,bottom:g.value.height-z,width:g.value.width-D-ee,height:g.value.height-Z-z}}),T=e.computed(()=>a.dataset.length),Y=e.ref({start:0,end:T.value}),$=e.computed(()=>a.dataset.slice(Y.value.start,Y.value.end)),S=e.computed(()=>(a.dataset.forEach((Z,ee)=>{[null,void 0].includes(Z[0])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:ee}),[null,void 0].includes(Z[1])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:ee}),[null,void 0].includes(Z[2])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:ee}),[null,void 0].includes(Z[3])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:ee}),[null,void 0].includes(Z[4])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:ee}),[null,void 0].includes(Z[5])&&Ke({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:ee})}),$.value.map(Z=>({period:Z[0],open:Z[1],high:Z[2],low:Z[3],last:Z[4],volume:Z[5]})))),W=e.computed(()=>b.value.width/$.value.length),oe=e.computed(()=>({max:Math.max(...S.value.map(Z=>Z.high)),min:0})),te=e.computed(()=>Pl(oe.value.min,oe.value.max,i.value.style.layout.grid.yAxis.dataLabels.steps));function he(Z,ee){return{...Z,x:b.value.left+ee*W.value+W.value/2,y:b.value.top+(1-Z/te.value.max)*b.value.height,value:Z}}const le=e.computed(()=>S.value.map((Z,ee)=>{const z=he(Z.open,ee),D=he(Z.high,ee),fe=he(Z.low,ee),M=he(Z.last,ee),N=Z.last>Z.open;return{period:Z.period,open:z,high:D,low:fe,last:M,volume:Z.volume,isBullish:N}}));function H(Z){return Z/te.value.max}const P=e.computed(()=>te.value.ticks.map(Z=>({y:b.value.bottom-b.value.height*H(Z),value:Z}))),X=e.computed(()=>S.value.map(Z=>Z.period)),q=e.ref(null);function m(Z,ee){f.value=Z,q.value={datapoint:ee,seriesIndex:Z,series:le.value,config:i.value};const z=i.value.style.tooltip.customFormat;if(Gt(z)&&wo(()=>z({seriesIndex:Z,datapoint:ee,series:le.value,config:i.value})))h.value=z({seriesIndex:Z,datapoint:ee,series:le.value,config:i.value});else if(i.value.style.tooltip.show){let D="";const{period:fe,open:M,high:N,low:j,last:O,volume:ce,isBullish:re}=le.value[Z],{period:ie,open:G,high:ne,low:Ae,last:se,volume:ve}=i.value.translations;D+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${i.value.style.layout.candle.borderRadius*3}" stroke="${i.value.style.layout.candle.stroke}" stroke-width="${i.value.style.layout.candle.strokeWidth}"
333
333
  fill="${i.value.style.layout.candle.gradient.show?re?`url(#bullish_gradient_${l.value})`:`url(#bearish_gradient_${l.value})`:re?i.value.style.layout.candle.colors.bullish:i.value.style.layout.candle.colors.bearish}"/></svg>${fe}</div>`,D+=`${ve} : <b>${isNaN(ce)?"-":Number(ce.toFixed(i.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,D+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${i.value.style.tooltip.borderColor}">`,D+=`<div>${G}: <b>${i.value.style.tooltip.prefix} ${isNaN(M.value)?"-":Number(M.value.toFixed(i.value.style.tooltip.roundingValue)).toLocaleString()} ${i.value.style.tooltip.suffix}</b></div>`,D+=`<div>${ne}: <b>${i.value.style.tooltip.prefix} ${isNaN(N.value)?"-":Number(N.value.toFixed(i.value.style.tooltip.roundingValue)).toLocaleString()} ${i.value.style.tooltip.suffix}</b></div>`,D+=`<div>${Ae}: <b>${i.value.style.tooltip.prefix} ${isNaN(j.value)?"-":Number(j.value.toFixed(i.value.style.tooltip.roundingValue)).toLocaleString()} ${i.value.style.tooltip.suffix}</b></div>`,D+=`<div>${se}: <b>${i.value.style.tooltip.prefix} ${isNaN(O.value)?"-":Number(O.value.toFixed(i.value.style.tooltip.roundingValue)).toLocaleString()} ${i.value.style.tooltip.suffix}</b></div>`,D+="</div>",h.value=`<div style="text-align:right">${D}</div>`}u.value=!0}function _(){Y.value={start:0,end:T.value},y.value+=1}function x(){e.nextTick(()=>{const Z=[i.value.translations.period,i.value.translations.open,i.value.translations.high,i.value.translations.low,i.value.translations.last,i.value.translations.volume],ee=le.value.map(fe=>[fe.period,fe.open.value,fe.high.value,fe.low.value,fe.last.value,fe.volume]),z=[[i.value.style.title.text],[i.value.style.title.subtitle.text],[[""],[""],[""]]].concat([Z]).concat(ee),D=eo(z);Zt({csvContent:D,title:i.value.style.title.text||"vue-ui-candlestick"})})}const V=e.computed(()=>{const Z=le.value.map(D=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${i.value.style.layout.candle.borderRadius*3}" fill="${i.value.style.layout.candle.gradient.show?D.isBullish?`url(#bullish_gradient_${l.value}`:`url(#bearish_gradient_${l.value})`:D.isBullish?i.value.style.layout.candle.colors.bullish:i.value.style.layout.candle.colors.bearish}"/></svg> ${D.period}`,`${i.value.table.td.prefix} ${isNaN(D.open.value)?"-":Number(D.open.value.toFixed(i.value.table.td.roundingValue)).toLocaleString()} ${i.value.table.td.suffix}`,`${i.value.table.td.prefix} ${isNaN(D.high.value)?"-":Number(D.high.value.toFixed(i.value.table.td.roundingValue)).toLocaleString()} ${i.value.table.td.suffix}`,`${i.value.table.td.prefix} ${isNaN(D.low.value)?"-":Number(D.low.value.toFixed(i.value.table.td.roundingValue)).toLocaleString()} ${i.value.table.td.suffix}`,`${i.value.table.td.prefix} ${isNaN(D.last.value)?"-":Number(D.last.value.toFixed(i.value.table.td.roundingValue)).toLocaleString()} ${i.value.table.td.suffix}`,`${isNaN(D.volume)?"-":D.volume.toLocaleString()}`]),ee={th:{backgroundColor:i.value.table.th.backgroundColor,color:i.value.table.th.color,outline:i.value.table.th.outline},td:{backgroundColor:i.value.table.td.backgroundColor,color:i.value.table.td.color,outline:i.value.table.td.outline},breakpoint:i.value.table.responsiveBreakpoint},z=[i.value.translations.period,i.value.translations.open,i.value.translations.high,i.value.translations.low,i.value.translations.last,i.value.translations.volume];return{head:z,body:Z,config:ee,colNames:z}}),J=e.ref(!1);function ke(Z){J.value=Z,c.value+=1}function ae(){E.value.showTable=!E.value.showTable}function ge(){E.value.showTooltip=!E.value.showTooltip}return o({generatePdf:Q,generateCsv:x,generateImage:K,toggleTable:ae,toggleTooltip:ge}),(Z,ee)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:C,class:e.normalizeClass(`vue-ui-candlestick ${J.value?"vue-data-ui-wrapper-fullscreen":""} ${i.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${i.value.style.fontFamily}; text-align:center;${i.value.style.title.text?"":"padding-top:36px"};background:${i.value.style.backgroundColor}; ${i.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${l.value}`},[i.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:A,style:e.normalizeStyle(`width:100%;background:${i.value.style.backgroundColor}`)},[e.createVNode(Xt,{config:{title:{cy:"candlestick-div-title",...i.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...i.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),i.value.userOptions.show&&r.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:s,key:`user_options_${c.value}`,backgroundColor:i.value.style.backgroundColor,color:i.value.style.color,isImaging:e.unref(I),isPrinting:e.unref(U),uid:l.value,hasTooltip:i.value.userOptions.buttons.tooltip&&i.value.style.tooltip.show,hasPdf:i.value.userOptions.buttons.pdf,hasImg:i.value.userOptions.buttons.img,hasXls:i.value.userOptions.buttons.csv,hasTable:i.value.userOptions.buttons.table,hasFullscreen:i.value.userOptions.buttons.fullscreen,isFullscreen:J.value,isTooltip:E.value.showTooltip,titles:{...i.value.userOptions.buttonTitles},chartElement:C.value,onToggleFullscreen:ke,onGeneratePdf:e.unref(Q),onGenerateCsv:x,onGenerateImage:e.unref(K),onToggleTable:ae,onToggleTooltip:ge},e.createSlots({_:2},[Z.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,Z.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,Z.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,Z.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,Z.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(Z.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,Z.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:z,isFullscreen:D})=>[e.renderSlot(Z.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:z,isFullscreen:D})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":J.value,"vue-data-ui-fulscreen--off":!J.value}),viewBox:`0 0 ${g.value.width<=0?10:g.value.width} ${g.value.height<=0?10:g.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${i.value.style.backgroundColor};color:${i.value.style.color}`)},[le.value.length>0?(e.openBlock(),e.createElementBlock("g",UM,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${l.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":i.value.style.layout.candle.colors.bearish},null,8,QM),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(Lt)(i.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,TM),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(Lt)(i.value.style.layout.candle.colors.bearish,.05)}66`},null,8,OM)],8,VM),e.createElementVNode("linearGradient",{id:`bullish_gradient_${l.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":i.value.style.layout.candle.colors.bullish},null,8,DM),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(Lt)(i.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,PM),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(Lt)(i.value.style.layout.candle.colors.bullish,.05)}66`},null,8,HM)],8,zM)]),i.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",RM,[e.createElementVNode("line",{x1:b.value.left,x2:b.value.left,y1:b.value.top,y2:b.value.bottom,stroke:i.value.style.layout.grid.stroke,"stroke-width":i.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,GM),e.createElementVNode("line",{x1:b.value.left,x2:b.value.right,y1:b.value.bottom,y2:b.value.bottom,stroke:i.value.style.layout.grid.stroke,"stroke-width":i.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,WM)])):e.createCommentVNode("",!0),i.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",KM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(P.value,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[z.value>=te.value.min&&z.value<=te.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:b.value.left,x2:b.value.left-5,y1:z.y,y2:z.y,stroke:i.value.style.layout.grid.stroke,"stroke-width":i.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,jM)):e.createCommentVNode("",!0),z.value>=te.value.min&&z.value<=te.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:b.value.left-8+i.value.style.layout.grid.yAxis.dataLabels.offsetX,y:z.y+g.value.yAxisFontSize/3,"font-size":g.value.yAxisFontSize,"text-anchor":"end",fill:i.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":i.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(i.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(Pv)(z.value)?z.value.toFixed(i.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(i.value.style.layout.grid.yAxis.dataLabels.suffix),9,XM)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),i.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",qM,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(X.value,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${b.value.left+W.value*D+W.value/2}, ${b.value.bottom+g.value.xAxisFontSize*2+i.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${i.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":i.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":i.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":g.value.xAxisFontSize,fill:i.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":i.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(z),9,YM)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(z,D)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:z.open.x,x2:z.open.x,y1:z.high.y,y2:z.low.y,stroke:i.value.style.layout.wick.stroke,"stroke-width":i.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,JM),i.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",ZM,[e.createElementVNode("circle",{cx:z.high.x,cy:z.high.y,r:i.value.style.layout.wick.extremity.size==="auto"?W.value/20:i.value.style.layout.wick.extremity.size,fill:i.value.style.layout.wick.extremity.color},null,8,eU),e.createElementVNode("circle",{cx:z.low.x,cy:z.low.y,r:i.value.style.layout.wick.extremity.size==="auto"?W.value/20:i.value.style.layout.wick.extremity.size,fill:i.value.style.layout.wick.extremity.color},null,8,tU)])):e.createCommentVNode("",!0),i.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",oU,[e.createElementVNode("line",{x1:z.high.x-(i.value.style.layout.wick.extremity.size==="auto"?W.value*i.value.style.layout.candle.widthRatio:i.value.style.layout.wick.extremity.size)/2,x2:z.high.x+(i.value.style.layout.wick.extremity.size==="auto"?W.value*i.value.style.layout.candle.widthRatio:i.value.style.layout.wick.extremity.size)/2,y1:z.high.y,y2:z.high.y,stroke:i.value.style.layout.wick.extremity.color,"stroke-width":i.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,lU),e.createElementVNode("line",{x1:z.low.x-(i.value.style.layout.wick.extremity.size==="auto"?W.value*i.value.style.layout.candle.widthRatio:i.value.style.layout.wick.extremity.size)/2,x2:z.low.x+(i.value.style.layout.wick.extremity.size==="auto"?W.value*i.value.style.layout.candle.widthRatio:i.value.style.layout.wick.extremity.size)/2,y1:z.low.y,y2:z.low.y,stroke:i.value.style.layout.wick.extremity.color,"stroke-width":i.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,aU)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(z,D)=>(e.openBlock(),e.createElementBlock("rect",{x:z.open.x-W.value/2+W.value*(1-i.value.style.layout.candle.widthRatio)/2,y:z.isBullish?z.last.y:z.open.y,height:Math.abs(z.last.y-z.open.y)<=0?1e-4:Math.abs(z.last.y-z.open.y),width:W.value*i.value.style.layout.candle.widthRatio<=0?1e-4:W.value*i.value.style.layout.candle.widthRatio,fill:i.value.style.layout.candle.gradient.underlayer,rx:i.value.style.layout.candle.borderRadius,stroke:"none"},null,8,rU))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(z,D)=>(e.openBlock(),e.createElementBlock("rect",{x:z.open.x-W.value/2+W.value*(1-i.value.style.layout.candle.widthRatio)/2,y:z.isBullish?z.last.y:z.open.y,height:Math.abs(z.last.y-z.open.y)<=0?1e-4:Math.abs(z.last.y-z.open.y),width:W.value*i.value.style.layout.candle.widthRatio<=0?1e-4:W.value*i.value.style.layout.candle.widthRatio,fill:z.isBullish?i.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${l.value})`:i.value.style.layout.candle.colors.bullish:i.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${l.value})`:i.value.style.layout.candle.colors.bearish,rx:i.value.style.layout.candle.borderRadius,stroke:i.value.style.layout.candle.stroke,"stroke-width":i.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,nU))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(le.value,(z,D)=>(e.openBlock(),e.createElementBlock("rect",{x:b.value.left+D*W.value,y:b.value.top,height:b.value.height<=0?1e-4:b.value.height,width:W.value<=0?1e-4:W.value,fill:f.value===D?`${i.value.style.layout.selector.color}${e.unref(Xe)[i.value.style.layout.selector.opacity]}`:"transparent",onMouseover:fe=>m(D,z),onMouseleave:ee[0]||(ee[0]=fe=>{f.value=void 0,u.value=!1})},null,40,sU))),256))])])):e.createCommentVNode("",!0),e.renderSlot(Z.$slots,"svg",{svg:g.value},void 0,!0)],14,MM)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:3,config:{type:"candlesticks",style:{backgroundColor:i.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),i.value.style.zoom.show&&r.value?(e.openBlock(),e.createElementBlock("div",{key:4,ref_key:"chartSlicer",ref:v},[(e.openBlock(),e.createBlock(Hs,{key:`slicer_${y.value}`,background:i.value.style.zoom.color,borderColor:i.value.style.backgroundColor,fontSize:i.value.style.zoom.fontSize,useResetSlot:i.value.style.zoom.useResetSlot,labelLeft:t.dataset[Y.value.start]?t.dataset[Y.value.start][0]:t.dataset[0][0],labelRight:t.dataset[Y.value.end-1]?t.dataset[Y.value.end-1][0]:t.dataset.at(-1)[0],textColor:i.value.style.color,inputColor:i.value.style.zoom.color,selectColor:i.value.style.zoom.highlightColor,max:T.value,min:0,valueStart:Y.value.start,valueEnd:Y.value.end,start:Y.value.start,"onUpdate:start":ee[1]||(ee[1]=z=>Y.value.start=z),end:Y.value.end,"onUpdate:end":ee[2]||(ee[2]=z=>Y.value.end=z),onReset:_},{"reset-action":e.withCtx(({reset:z})=>[e.renderSlot(Z.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:z})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:B},[e.renderSlot(Z.$slots,"legend",{legend:le.value},void 0,!0)],512),e.createVNode(Oo,{show:E.value.showTooltip&&u.value,backgroundColor:i.value.style.tooltip.backgroundColor,color:i.value.style.tooltip.color,borderRadius:i.value.style.tooltip.borderRadius,borderColor:i.value.style.tooltip.borderColor,borderWidth:i.value.style.tooltip.borderWidth,fontSize:i.value.style.tooltip.fontSize,backgroundOpacity:i.value.style.tooltip.backgroundOpacity,parent:C.value,content:h.value,isCustom:i.value.style.tooltip.customFormat&&typeof i.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(Z.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(Z.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...q.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),r.value?(e.openBlock(),e.createBlock(lo,{key:5,hideDetails:"",config:{open:E.value.showTable,maxHeight:1e4,body:{backgroundColor:i.value.style.backgroundColor,color:i.value.style.color},head:{backgroundColor:i.value.style.backgroundColor,color:i.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(yo,{colNames:V.value.colNames,head:V.value.head,body:V.value.body,config:V.value.config,title:`${i.value.style.title.text}${i.value.style.title.subtitle.text?` : ${i.value.style.title.subtitle.text}`:""}`,onClose:ee[3]||(ee[3]=z=>E.value.showTable=!1)},{th:e.withCtx(({th:z})=>[e.createTextVNode(e.toDisplayString(z),1)]),td:e.withCtx(({td:z})=>[e.createElementVNode("div",{innerHTML:z},null,8,iU)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,$M))}},sg=vt(uU,[["__scopeId","data-v-0ed64fca"]]),AU=Object.freeze(Object.defineProperty({__proto__:null,default:sg},Symbol.toStringTag,{value:"Module"})),cU=["id"],dU=["xmlns","viewBox"],hU=["id"],fU=["stop-color"],vU=["stop-color"],gU=["id"],pU=["stop-color"],yU=["stop-color"],mU=["x","y","width","height","fill","rx"],bU=["x","y","width","height","fill","rx"],kU=["x","y","width","height","fill","rx"],CU=["x","y","width","height","fill","rx"],wU={key:0},BU=["x","y","fill","font-size","font-weight"],xU=["x","y","fill","font-size","font-weight"],FU={key:1},NU=["x","y","font-size","fill","font-weight"],_U={key:2},SU={key:0},LU=["x1","x2","y1","y2","stroke","stroke-width"],EU=["x1","x2","y1","y2","stroke","stroke-width"],IU=["x1","x2","y1","y2","stroke","stroke-width"],$U=["x","y","font-size","fill","font-weight"],MU=["x1","x2","y1","y2","stroke","stroke-width"],UU=["x","y","font-size","fill","font-weight"],VU=["x","y","font-size","fill","font-weight"],QU=["x","y","width","height","fill","onMouseover"],TU={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(t,{expose:o}){const a=t,{vue_ui_age_pyramid:n}=ft(),r=e.computed(()=>!!a.dataset&&a.dataset.length),l=e.ref(it()),s=e.ref(null),u=e.ref(!1),h=e.ref(""),f=e.ref(null),c=e.ref(0),y=e.ref(null),C=e.ref(null),A=e.computed(()=>{const q=Je({userConfig:a.config,defaultConfig:n});return q.theme?{...Je({userConfig:Nt.vue_ui_age_pyramid[q.theme]||a.config,defaultConfig:q})}:q}),B=e.ref(null);e.onMounted(()=>{if(xt(a.dataset)&&Ke({componentName:"VueUiAgePyramid",type:"dataset"}),A.value.responsive){const q=Bo(()=>{const{width:m,height:_}=xo({chart:y.value,title:A.value.style.title.text?C.value:null});I.value.width=m,I.value.height=_});B.value=new ResizeObserver(q),B.value.observe(y.value.parentNode)}});const{isPrinting:v,isImaging:i,generatePdf:g,generateImage:w}=zt({elementId:`vue-ui-age-pyramid_${l.value}`,fileName:A.value.style.title.text||"vue-ui-age-pyramid"}),U=e.ref({showTable:A.value.table.show,showTooltip:A.value.style.tooltip.show}),I=e.ref({height:A.value.style.height,width:A.value.style.width}),Q=e.computed(()=>{const q=I.value.width-A.value.style.layout.padding.right-A.value.style.layout.padding.left,m=A.value.style.layout.padding.left,_=I.value.width-A.value.style.layout.padding.right;return{top:A.value.style.layout.padding.top,left:m,right:_,bottom:I.value.height-A.value.style.layout.padding.bottom,width:q,height:I.value.height-A.value.style.layout.padding.top-A.value.style.layout.padding.bottom,centerX:A.value.style.layout.padding.left+q/2,leftChart:{width:q/2-A.value.style.layout.centerSlit.width,right:m+q/2-A.value.style.layout.centerSlit.width},rightChart:{width:q/2-A.value.style.layout.centerSlit.width,left:m+q/2+A.value.style.layout.centerSlit.width}}}),K=e.computed(()=>a.dataset.map(q=>A.value.style.layout.dataLabels.yAxis.display==="age"?q[1]:q[0])),E=e.computed(()=>{const q=b(T.value/5),m=[],_=[];for(let x=0;x<=5;x+=1){const V=q*x,J=q*(x-5);m.push({value:V,x:Q.value.left+Q.value.width/2+A.value.style.layout.centerSlit.width+V/T.value*Q.value.leftChart.width}),_.push({value:Math.abs(J),x:Q.value.left+Q.value.width/2+J/T.value*Q.value.leftChart.width-A.value.style.layout.centerSlit.width})}return{right:m,left:_}});function b(q){if(q===0)return 0;const _=10**Math.floor(Math.log10(Math.abs(q)));let x;return q<0,x=Math.round(q/_)*_,x}const T=e.computed(()=>Math.max(...a.dataset.flatMap(q=>q.slice(-2)))),Y=e.computed(()=>a.dataset.length),$=e.computed(()=>a.dataset.map(q=>({segment:q[0],age:q[1],left:{value:q[2],proportionToMax:q[2]/T.value},right:{value:q[3],proportionToMax:q[3]/T.value}}))),S=e.computed(()=>$.value.map((q,m)=>{const _=Q.value.top+Q.value.height/Y.value*m,x=Q.value.height/Y.value-A.value.style.layout.bars.gap;return{segment:q.segment,age:q.age,left:{...q.left,y:_,color:A.value.style.layout.bars.left.color,x:Q.value.leftChart.right-q.left.proportionToMax*Q.value.leftChart.width,width:q.left.proportionToMax*Q.value.leftChart.width,height:x},right:{...q.right,y:_,color:A.value.style.layout.bars.right.color,x:Q.value.rightChart.left,width:q.right.proportionToMax*Q.value.rightChart.width,height:x}}})),W=e.ref(null);function oe(q,m){f.value=q,W.value={datapoint:m,seriesIndex:q,series:S.value,config:A.value};const _=A.value.style.tooltip.customFormat;if(Gt(_)&&wo(()=>_({seriesIndex:q,datapoint:{segment:m[0],index:m[1],left:m[2],right:m[3]},series:S.value,config:A.value})))h.value=_({seriesIndex:q,datapoint:{segment:m[0],index:m[1],left:m[2],right:m[3]},series:S.value,config:A.value});else{let x="";const V=S.value[q];x+=`<div><b>${V.segment}</b></div>`,x+=`<div>${A.value.translations.age}: ${V.age}</div>`,x+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${A.value.style.tooltip.borderColor}">`,x+='<div style="display:flex; flex-direction:row;gap:12px">',x+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${A.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${A.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${l.value})`:A.value.style.layout.bars.left.color}"/></svg><div>${A.value.translations.female}</div><div><b>${V.left.value.toLocaleString()}</b></div></div>`,x+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${A.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${A.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${l.value})`:A.value.style.layout.bars.right.color}"/></svg><div>${A.value.translations.male}</div><div><b>${V.right.value.toLocaleString()}</b></div></div>`,x+="</div>",x+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${A.value.style.tooltip.borderColor}"><div>${A.value.translations.total}</div><div><b>${(V.left.value+V.right.value).toLocaleString()}</b></div></div>`,x+="</div>",h.value=`<div>${x}</div>`}u.value=!0}function te(){e.nextTick(()=>{const q=[A.value.translations.year,A.value.translations.age,A.value.translations.female,A.value.translations.male,A.value.translations.total],m=a.dataset.map(V=>[V[0],V[1],V[2],V[3],V[2]+V[3]]),_=[[A.value.style.title.text],[A.value.style.title.subtitle.text],[[""],[""],[""]]].concat([q]).concat(m),x=eo(_);Zt({csvContent:x,title:A.value.style.title.text||"vue-ui-heatmap"})})}const he=e.computed(()=>{const q=[A.value.translations.year,A.value.translations.age,A.value.translations.female,A.value.translations.male,A.value.translations.total],m=a.dataset.map(x=>[x[0],x[1],x[2].toLocaleString(),x[3].toLocaleString(),(x[2]+x[3]).toLocaleString()]),_={th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint};return{head:q,body:m,config:_,colNames:q}}),le=e.ref(!1);function H(q){le.value=q,c.value+=1}function P(){U.value.showTable=!U.value.showTable}function X(){U.value.showTooltip=!U.value.showTooltip}return o({generatePdf:g,generateCsv:te,generateImage:w,toggleTable:P,toggleTooltip:X}),(q,m)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${le.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${l.value}`,style:e.normalizeStyle(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;${A.value.style.title.text?"":"padding-top:36px"};background:${A.value.style.backgroundColor};${A.value.responsive?"height:100%":""}`)},[A.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"chartTitle",ref:C,style:e.normalizeStyle(`width:100%;background:${A.value.style.backgroundColor}`)},[e.createVNode(Xt,{config:{title:{cy:"pyramid-div-title",...A.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...A.value.style.title.subtitle}}},null,8,["config"])],4)):e.createCommentVNode("",!0),A.value.userOptions.show&&r.value?(e.openBlock(),e.createBlock(Tt,{ref_key:"details",ref:s,key:`user_options_${c.value}`,backgroundColor:A.value.style.backgroundColor,color:A.value.style.color,isImaging:e.unref(i),isPrinting:e.unref(v),uid:l.value,hasTooltip:A.value.userOptions.buttons.tooltip&&A.value.style.tooltip.show,hasPdf:A.value.userOptions.buttons.pdf,hasXls:A.value.userOptions.buttons.csv,hasImg:A.value.userOptions.buttons.img,hasTable:A.value.userOptions.buttons.table,hasFullscreen:A.value.userOptions.buttons.fullscreen,isFullscreen:le.value,isTooltip:U.value.showTooltip,titles:{...A.value.userOptions.buttonTitles},chartElement:y.value,onToggleFullscreen:H,onGeneratePdf:e.unref(g),onGenerateCsv:te,onGenerateImage:e.unref(w),onToggleTable:P,onToggleTooltip:X},e.createSlots({_:2},[q.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(q.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,q.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(q.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,q.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(q.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,q.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(q.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,q.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(q.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,q.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:_,isFullscreen:x})=>[e.renderSlot(q.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:_,isFullscreen:x})),void 0,!0)]),key:"5"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","onGeneratePdf","onGenerateImage"])):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("svg",{key:2,xmlns:e.unref(We),class:e.normalizeClass({"vue-data-ui-fullscreen--on":le.value,"vue-data-ui-fulscreen--off":!le.value}),viewBox:`0 0 ${I.value.width<=0?10:I.value.width} ${I.value.height<=0?10:I.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:${A.value.style.backgroundColor};color:${A.value.style.color}`)},[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${l.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":A.value.style.layout.bars.left.color},null,8,fU),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(Lt)(A.value.style.layout.bars.left.color,A.value.style.layout.bars.gradient.shiftHue)}${e.unref(Xe)[100-A.value.style.layout.bars.gradient.intensity]}`},null,8,vU)],8,hU),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${l.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":`${e.unref(Lt)(A.value.style.layout.bars.right.color,A.value.style.layout.bars.gradient.shiftHue)}${e.unref(Xe)[100-A.value.style.layout.bars.gradient.intensity]}`},null,8,pU),e.createElementVNode("stop",{offset:"100%","stop-color":A.value.style.layout.bars.right.color},null,8,yU)],8,gU)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(S.value,(_,x)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:_.left.x,y:_.left.y,width:_.left.width<=0?1e-4:_.left.width,height:_.left.height<=0?1e-4:_.left.height,fill:A.value.style.layout.bars.gradient.underlayer,rx:A.value.style.layout.bars.borderRadius},null,8,mU),e.createElementVNode("rect",{x:_.left.x,y:_.left.y,width:_.left.width<=0?1e-4:_.left.width,height:_.left.height<=0?1e-4:_.left.height,fill:A.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${l.value})`:_.left.color,rx:A.value.style.layout.bars.borderRadius},null,8,bU),e.createElementVNode("rect",{x:_.right.x,y:_.right.y,width:_.right.width<=0?1e-4:_.right.width,height:_.right.height<=0?1e-4:_.right.height,fill:A.value.style.layout.bars.gradient.underlayer,rx:A.value.style.layout.bars.borderRadius},null,8,kU),e.createElementVNode("rect",{x:_.right.x,y:_.right.y,width:_.right.width<=0?1e-4:_.right.width,height:_.right.height<=0?1e-4:_.right.height,fill:A.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${l.value})`:_.right.color,rx:A.value.style.layout.bars.borderRadius},null,8,CU)]))),256)),e.createElementVNode("g",null,[A.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",wU,[e.createElementVNode("text",{x:Q.value.left,y:Q.value.top+A.value.style.layout.dataLabels.sideTitles.offsetY,fill:A.value.style.layout.dataLabels.sideTitles.useSideColor?A.value.style.layout.bars.left.color:A.value.style.layout.dataLabels.sideTitles.color,"font-size":A.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":A.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(A.value.translations.female),9,BU),e.createElementVNode("text",{x:Q.value.right,y:Q.value.top+A.value.style.layout.dataLabels.sideTitles.offsetY,fill:A.value.style.layout.dataLabels.sideTitles.useSideColor?A.value.style.layout.bars.right.color:A.value.style.layout.dataLabels.sideTitles.color,"font-size":A.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":A.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(A.value.translations.male),9,xU)])):e.createCommentVNode("",!0),A.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",FU,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(K.value,(_,x)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[x%A.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:Q.value.centerX,y:Q.value.top+Q.value.height/Y.value*x+A.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":A.value.style.layout.dataLabels.yAxis.fontSize,fill:A.value.style.layout.dataLabels.yAxis.color,"font-weight":A.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(_),9,NU)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),A.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",_U,[A.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",SU,[e.createElementVNode("line",{x1:E.value.right[0].x,x2:E.value.right.at(-1).x,y1:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/2,y2:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:A.value.style.layout.grid.stroke,"stroke-width":A.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,LU),e.createElementVNode("line",{x1:E.value.left[0].x,x2:E.value.left.at(-1).x,y1:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/2,y2:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:A.value.style.layout.grid.stroke,"stroke-width":A.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,EU)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.right,_=>(e.openBlock(),e.createElementBlock("g",null,[A.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:_.x,x2:_.x,y1:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/2,y2:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:A.value.style.layout.grid.stroke,"stroke-width":A.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,IU)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:_.x,y:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":A.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(Number((_.value/A.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()),9,$U)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value.left,_=>(e.openBlock(),e.createElementBlock("g",null,[A.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:_.x,x2:_.x,y1:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/2,y2:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:A.value.style.layout.grid.stroke,"stroke-width":A.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,MU)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:_.x,y:Q.value.bottom+A.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":A.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(Number((_.value/A.value.style.layout.dataLabels.xAxis.scale).toFixed(0)).toLocaleString()),9,UU)]))),256)),e.createElementVNode("text",{x:Q.value.right,y:I.value.height,"text-anchor":"end","font-size":A.value.style.layout.dataLabels.xAxis.fontSize,fill:A.value.style.layout.dataLabels.xAxis.color,"font-weight":A.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(A.value.style.layout.dataLabels.xAxis.translation),9,VU)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.dataset,(_,x)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:Q.value.left,y:Q.value.top+Q.value.height/Y.value*x-A.value.style.layout.bars.gap/2,width:Q.value.width<=0?1e-4:Q.value.width,height:Q.value.height/Y.value<=0?1e-4:Q.value.height/Y.value,fill:f.value!==null&&f.value===x?`${A.value.style.highlighter.color}${e.unref(Xe)[A.value.style.highlighter.opacity]}`:"transparent",onMouseover:V=>oe(x,_),onMouseleave:m[0]||(m[0]=V=>{f.value=null,u.value=!1})},null,40,QU)]))),256)),e.renderSlot(q.$slots,"svg",{svg:I.value},void 0,!0)],14,dU)):e.createCommentVNode("",!0),r.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Et,{key:3,config:{type:"pyramid",style:{backgroundColor:A.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(q.$slots,"legend",{legend:S.value},void 0,!0),e.createVNode(Oo,{show:U.value.showTooltip&&u.value,backgroundColor:A.value.style.tooltip.backgroundColor,color:A.value.style.tooltip.color,borderRadius:A.value.style.tooltip.borderRadius,borderColor:A.value.style.tooltip.borderColor,borderWidth:A.value.style.tooltip.borderWidth,fontSize:A.value.style.tooltip.fontSize,backgroundOpacity:A.value.style.tooltip.backgroundOpacity,parent:y.value,content:h.value,isCustom:A.value.style.tooltip.customFormat&&typeof A.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(q.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(q.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...W.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","parent","content","isCustom"]),r.value?(e.openBlock(),e.createBlock(lo,{key:4,hideDetails:"",config:{open:U.value.showTable,maxHeight:1e4,body:{backgroundColor:A.value.style.backgroundColor,color:A.value.style.color},head:{backgroundColor:A.value.style.backgroundColor,color:A.value.style.color}}},{content:e.withCtx(()=>[e.createVNode(yo,{colNames:he.value.colNames,head:he.value.head,body:he.value.body,config:he.value.config,title:`${A.value.style.title.text}${A.value.style.title.subtitle.text?` : ${A.value.style.title.subtitle.text}`:""}`,onClose:m[1]||(m[1]=_=>U.value.showTable=!1)},{th:e.withCtx(({th:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),td:e.withCtx(({td:_})=>[e.createTextVNode(e.toDisplayString(_),1)]),_:1},8,["colNames","head","body","config","title"])]),_:1},8,["config"])):e.createCommentVNode("",!0)],14,cU))}},ig=vt(TU,[["__scopeId","data-v-44b2f1f2"]]),OU=Object.freeze(Object.defineProperty({__proto__:null,default:ig},Symbol.toStringTag,{value:"Module"})),zU=t=>(e.pushScopeId("data-v-57895b3a"),t=t(),e.popScopeId(),t),DU={key:0,"data-html2canvas-ignore":"",style:{width:"100%",display:"flex","justify-content":"end"}},PU=["disabled"],HU=["stroke"],RU=e.createStaticVNode('<path stroke="none" d="M0 0h24v24H0z" fill="none" data-v-57895b3a></path><path d="M18 16v.01" data-v-57895b3a></path><path d="M6 16v.01" data-v-57895b3a></path><path d="M12 5v.01" data-v-57895b3a></path><path d="M12 12v.01" data-v-57895b3a></path><path d="M12 1a4 4 0 0 1 2.001 7.464l.001 .072a3.998 3.998 0 0 1 1.987 3.758l.22 .128a3.978 3.978 0 0 1 1.591 -.417l.2 -.005a4 4 0 1 1 -3.994 3.77l-.28 -.16c-.522 .25 -1.108 .39 -1.726 .39c-.619 0 -1.205 -.14 -1.728 -.391l-.279 .16l.007 .231a4 4 0 1 1 -2.212 -3.579l.222 -.129a3.998 3.998 0 0 1 1.988 -3.756l.002 -.071a4 4 0 0 1 -1.995 -3.265l-.005 -.2a4 4 0 0 1 4 -4z" data-v-57895b3a></path>',6),GU=[RU],WU={key:1},KU=["id"],jU=zU(()=>e.createElementVNode("div",{class:"vue-ui-dashboard-grid"},null,-1)),XU=["onMousedown","onTouchstart"],qU=["onMousedown","onTouchstart"],YU=["onMousedown","onTouchstart"],JU=["onMousedown","onTouchstart"],ZU=["onMousedown","onTouchstart"],au=20,e7={__name:"vue-ui-dashboard",props:{dataset:Array,config:Object},emits:["change"],setup(t,{expose:o,emit:a}){const n=t;e.useCssVars(P=>({"417957d3":W.value,"60fae9e7":oe.value}));const{vue_ui_dashboard:r}=ft(),l=e.computed(()=>Je({userConfig:n.config,defaultConfig:r})),s=e.ref(`vue-ui-dashboard-${Math.random()}`),u=e.ref(l.value.locked);function h(){u.value=!u.value}const f=e.ref(n.dataset),c=e.ref(null),y=e.ref(null),C=e.ref({x:0,y:0}),A=e.ref({x:0,y:0}),B=e.ref(null),v=e.ref(!1),i=e.ref(null),g=e.ref(!1);function w(){g.value=!0,ed({domElement:document.getElementById(`vue-ui-dashboard_${s.value}`),fileName:"vue-ui-dashboard"}).finally(()=>{g.value=!1})}function U(P){if(!u.value&&(v.value=!0,i.value=P,y.value===null)){c.value=P,C.value={x:event.clientX,y:event.clientY};const X=f.value[P],q=100-X.width,m=100-X.height;X.left<0&&(X.left=0),X.top<0&&(X.top=0),X.left>q&&(X.left=q),X.top>m&&(X.top=m),X.left<0&&(X.left=0),X.top<0&&(X.top=0),X.left+X.width>100&&(X.left=100-X.width),X.top+X.height>100&&(X.top=100-X.height)}}function I(P,X){v.value=!0,i.value=P,y.value={index:P,direction:X};const q=f.value[P];A.value={x:event.clientX,y:event.clientY,initialWidth:q.width,initialHeight:q.height}}function Q(P,X,q){if(y.value.direction.includes("top")){const m=P.height-q/B.value.offsetHeight*100;m>=au&&(P.top+=q/B.value.offsetHeight*100,P.height=m)}if(y.value.direction.includes("bottom")){const m=P.height+q/B.value.offsetHeight*100;m>=au&&(P.height=m)}if(y.value.direction.includes("left")){const m=P.width-X/B.value.offsetWidth*100;m>=au&&(P.left+=X/B.value.offsetWidth*100,P.width=m)}if(y.value.direction.includes("right")){const m=P.width+X/B.value.offsetWidth*100;m>=au&&(P.width=m)}}function K(P){if(!u.value){if(v.value=!0,c.value!==null){const X=f.value[c.value],q=P.clientX-C.value.x,m=P.clientY-C.value.y,_=X.left+q/B.value.offsetWidth*100,x=X.top+m/B.value.offsetHeight*100;_>=0&&x>=0&&_+X.width<=100&&x+X.height<=100&&(X.left=_,X.top=x),C.value={x:P.clientX,y:P.clientY}}if(y.value!==null){const X=f.value[y.value.index],q=P.clientX-A.value.x,m=P.clientY-A.value.y;Q(X,q,m),A.value={x:P.clientX,y:P.clientY}}}}e.watch(f,P=>{P&&!v.value&&a("change",f.value)},{deep:!0});function E(){c.value=null,y.value=null,v.value=!1,i.value=null,f.value.forEach(P=>{P.left=Math.round(P.left/100*100),P.top=Math.round(P.top/100*100),P.width=Math.round(P.width/100*100),P.height=Math.round(P.height/100*100)})}function b(P){u.value||(v.value=!0,i.value=P,y.value===null&&(c.value=P,C.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function T(P,X,q){if(v.value=!0,i.value=P,y.value===null){y.value={index:P,direction:X};const m=f.value[P];A.value={x:q.touches[0].clientX,y:q.touches[0].clientY,initialWidth:m.width,initialHeight:m.height}}}function Y(P){if(v.value=!0,P.preventDefault(),y.value!==null){const X=f.value[y.value.index],q=P.touches[0].clientX-A.value.x,m=P.touches[0].clientY-A.value.y;Q(X,q,m),A.value={x:P.touches[0].clientX,y:P.touches[0].clientY}}}function $(P){if(!u.value&&(v.value=!0,P.preventDefault(),c.value!==null)){const X=f.value[c.value],q=P.touches[0].clientX-C.value.x,m=P.touches[0].clientY-C.value.y,_=X.left+q/B.value.offsetWidth*100,x=X.top+m/B.value.offsetHeight*100;_>=0&&x>=0&&_+X.width<=100&&x+X.height<=100&&(X.left=_,X.top=x),C.value={x:P.touches[0].clientX,y:P.touches[0].clientY}}}function S(){v.value=!1,i.value=null,c.value=null,y.value=null,f.value.forEach(P=>{P.left=Math.round(P.left/100*100),P.top=Math.round(P.top/100*100),P.width=Math.round(P.width/100*100),P.height=Math.round(P.height/100*100)})}const W=e.computed(()=>l.value.style.item.borderColor),oe=e.computed(()=>l.value.style.resizeHandles.backgroundColor),te=e.computed(()=>l.value.style.board.aspectRatio),he=e.computed(()=>l.value.style.board.backgroundColor),le=e.computed(()=>l.value.style.board.border);function H(){return f.value}return o({generatePdf:w,getItemsPositions:H,toggleLock:h}),(P,X)=>(e.openBlock(),e.createElementBlock("div",null,[l.value.allowPrint?(e.openBlock(),e.createElementBlock("div",DU,[e.createElementVNode("button",{class:"vue-ui-dashboard-button",onClick:w,disabled:g.value,style:e.normalizeStyle([{"margin-top":"12px"},`color:${l.value.style.board.color}`])},[g.value?(e.openBlock(),e.createElementBlock("svg",{key:0,class:"vue-ui-dashboard-print-icon",xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:l.value.style.board.color,fill:"none","stroke-linecap":"round","stroke-linejoin":"round"},GU,8,HU)):(e.openBlock(),e.createElementBlock("span",WU,"PDF"))],12,PU)])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"vue-ui-dashboard-container",ref_key:"dashboardContainer",ref:B,id:`vue-ui-dashboard_${s.value}`,style:e.normalizeStyle(`border:${le.value}; sbackground:${he.value}; aspect-ratio:${te.value}`)},[e.createElementVNode("div",{class:"vue-ui-dashboard-grid-container",ref:"container",onMousemove:K,onMouseup:E,onTouchmove:$,onTouchend:S,style:e.normalizeStyle(`background:${l.value.style.board.backgroundColor}`)},[jU,(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.value,(q,m)=>(e.openBlock(),e.createElementBlock("div",{key:q.id,class:e.normalizeClass({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":u.value}),style:e.normalizeStyle({width:`${q.width}%`,height:`${q.height}%`,left:`${q.left}%`,top:`${q.top}%`,cursor:"move",boxShadow:i.value===m?"0 6px 12px -3px rgba(0,0,0,0.3)":"",zIndex:i.value===m?"1":"0",backgroundColor:l.value.style.item.backgroundColor}),onMousedown:_=>U(m),onTouchstart:_=>b(m)},[u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left",onMousedown:_=>I(m,"top-left"),onTouchstart:_=>T(m,"top-left",_),onTouchmove:X[0]||(X[0]=_=>Y(_)),onTouchend:S},null,40,qU),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right",onMousedown:_=>I(m,"top-right"),onTouchstart:_=>T(m,"top-right",_),onTouchmove:X[1]||(X[1]=_=>Y(_)),onTouchend:S},null,40,YU),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left",onMousedown:_=>I(m,"bottom-left"),onTouchstart:_=>T(m,"bottom-left",_),onTouchmove:X[2]||(X[2]=_=>Y(_)),onTouchend:S},null,40,JU),e.createElementVNode("div",{class:"vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right",onMousedown:_=>I(m,"bottom-right"),onTouchstart:_=>T(m,"bottom-right",_),onTouchmove:X[3]||(X[3]=_=>Y(_)),onTouchend:S},null,40,ZU)],64)),e.renderSlot(P.$slots,"content",{item:q,index:m,left:q.left,top:q.top,height:q.height,width:q.width},void 0,!0)],46,XU))),128))],36)],12,KU)]))}},ug=vt(e7,[["__scopeId","data-v-57895b3a"]]),t7=Object.freeze(Object.defineProperty({__proto__:null,default:ug},Symbol.toStringTag,{value:"Module"})),o7={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:Xe}},watch:{shapes:{handler(t){t.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const t=ft().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return t;const o=this.treeShake({defaultConfig:t,userConfig:this.config});return this.convertConfigColors(o)},canSelect(){return this.shapes.filter(t=>!["line","group"].includes(t.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(t=>{switch(!0){case(t&&t.type==="arrow"):const o=t.strokeWidth>3?5:10,a=t.strokeWidth>3?2.5:5;return`
334
334
  <defs>
335
335
  <marker