You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/7743.4bfa6e69.async.js

140 lines
1.4 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

!(function(){var E5=Object.defineProperty,B5=Object.defineProperties;var b5=Object.getOwnPropertyDescriptors;var oM=Object.getOwnPropertySymbols;var x5=Object.prototype.hasOwnProperty,C5=Object.prototype.propertyIsEnumerable;var QA=Math.pow,j1=(X,et,M)=>et in X?E5(X,et,{enumerable:!0,configurable:!0,writable:!0,value:M}):X[et]=M,ru=(X,et)=>{for(var M in et||(et={}))x5.call(et,M)&&j1(X,M,et[M]);if(oM)for(var M of oM(et))C5.call(et,M)&&j1(X,M,et[M]);return X},Y1=(X,et)=>B5(X,b5(et));var yr=(X,et,M)=>j1(X,typeof et!="symbol"?et+"":et,M);(self.webpackChunk=self.webpackChunk||[]).push([[7743],{32568:function(X,et,M){"use strict";M.d(et,{kJ:function(){return G0},RN:function(){return i5}});var O={};M.r(O),M.d(O,{add:function(){return Yh},adjoint:function(){return Lt},clone:function(){return Ee},copy:function(){return He},create:function(){return te},decompose:function(){return au},determinant:function(){return ee},equals:function(){return tv},exactEquals:function(){return Kr},frob:function(){return jh},fromQuat:function(){return _A},fromQuat2:function(){return ti},fromRotation:function(){return Xi},fromRotationTranslation:function(){return $r},fromRotationTranslationScale:function(){return co},fromRotationTranslationScaleOrigin:function(){return uo},fromScaling:function(){return Dn},fromTranslation:function(){return Tr},fromValues:function(){return je},fromXRotation:function(){return Ji},fromYRotation:function(){return fn},fromZRotation:function(){return wr},frustum:function(){return su},getRotation:function(){return Wo},getScaling:function(){return ks},getTranslation:function(){return Rn},identity:function(){return Ie},invert:function(){return on},lookAt:function(){return Zh},mul:function(){return ho},multiply:function(){return he},multiplyScalar:function(){return q0},multiplyScalarAndAdd:function(){return $0},ortho:function(){return lu},orthoNO:function(){return Au},orthoZO:function(){return cu},perspective:function(){return ou},perspectiveFromFieldOfView:function(){return za},perspectiveNO:function(){return Vl},perspectiveZO:function(){return Y0},rotate:function(){return Qn},rotateX:function(){return Zn},rotateY:function(){return qn},rotateZ:function(){return kr},scale:function(){return Jn},set:function(){return Wn},str:function(){return J0},sub:function(){return ev},subtract:function(){return uu},targetTo:function(){return X0},translate:function(){return se},transpose:function(){return De}});var W={};M.r(W),M.d(W,{circle:function(){return Lk},diamond:function(){return Nk},rect:function(){return Qk},simple:function(){return Pk},triangle:function(){return rx},triangleRect:function(){return Uk},vee:function(){return kk}});var H=M(33885),L=M(67732),I=M(83652),N=M(94480),P=M(22214),k=M(42403),U=M(42978),Z=M(37271),V=Z,Y=1e-6,nt=typeof Float32Array!="undefined"?Float32Array:Array,rt=Math.random,ft="zyx";function ct(r){return r>=0?Math.round(r):r%.5===0?Math.floor(r):Math.round(r)}function it(r){nt=r}var vt=Math.PI/180,gt=180/Math.PI;function yt(r){return r*vt}function mt(r){return r*gt}function Mt(r,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Y;return Math.abs(r-t)<=e*Math.max(1,Math.abs(r),Math.abs(t))}function Ct(){var r=new nt(3);return nt!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Nt(r){var t=new nt(3);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t}function qt(r){var t=r[0],e=r[1],n=r[2];return Math.sqrt(t*t+e*e+n*n)}function Gt(r,t,e){var n=new nt(3);return n[0]=r,n[1]=t,n[2]=e,n}function re(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}function de(r,t,e,n){return r[0]=t,r[1]=e,r[2]=n,r}function ue(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r}function Me(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r}function Ve(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r[2]=t[2]*e[2],r}function dn(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r[2]=t[2]/e[2],r}function Xn(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r[2]=Math.ceil(t[2]),r}function Xr(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r[2]=Math.floor(t[2]),r}function Vi(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r[2]=Math.min(t[2],e[2]),r}function is(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r[2]=Math.max(t[2],e[2]),r}function Ao(r,t){return r[0]=glMatrix.round(t[0]),r[1]=glMatrix.round(t[1]),r[2]=glMatrix.round(t[2]),r}function Ht(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r}function zt(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r[2]=t[2]+e[2]*n,r}function Zt(r,t){var e=t[0]-r[0],n=t[1]-r[1],i=t[2]-r[2];return Math.sqrt(e*e+n*n+i*i)}function Et(r,t){var e=t[0]-r[0],n=t[1]-r[1],i=t[2]-r[2];return e*e+n*n+i*i}function It(r){var t=r[0],e=r[1],n=r[2];return t*t+e*e+n*n}function Ut(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r}function ne(r,t){return r[0]=1/t[0],r[1]=1/t[1],r[2]=1/t[2],r}function be(r,t){var e=t[0],n=t[1],i=t[2],a=e*e+n*n+i*i;return a>0&&(a=1/Math.sqrt(a)),r[0]=t[0]*a,r[1]=t[1]*a,r[2]=t[2]*a,r}function _e(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}function Te(r,t,e){var n=t[0],i=t[1],a=t[2],s=e[0],o=e[1],A=e[2];return r[0]=i*A-a*o,r[1]=a*s-n*A,r[2]=n*o-i*s,r}function rn(r,t,e,n){var i=t[0],a=t[1],s=t[2];return r[0]=i+n*(e[0]-i),r[1]=a+n*(e[1]-a),r[2]=s+n*(e[2]-s),r}function rr(r,t,e,n){var i=Math.acos(Math.min(Math.max(_e(t,e),-1),1)),a=Math.sin(i),s=Math.sin((1-n)*i)/a,o=Math.sin(n*i)/a;return r[0]=s*t[0]+o*e[0],r[1]=s*t[1]+o*e[1],r[2]=s*t[2]+o*e[2],r}function sr(r,t,e,n,i,a){var s=a*a,o=s*(2*a-3)+1,A=s*(a-2)+a,l=s*(a-1),c=s*(3-2*a);return r[0]=t[0]*o+e[0]*A+n[0]*l+i[0]*c,r[1]=t[1]*o+e[1]*A+n[1]*l+i[1]*c,r[2]=t[2]*o+e[2]*A+n[2]*l+i[2]*c,r}function Ge(r,t,e,n,i,a){var s=1-a,o=s*s,A=a*a,l=o*s,c=3*a*o,u=3*A*s,h=A*a;return r[0]=t[0]*l+e[0]*c+n[0]*u+i[0]*h,r[1]=t[1]*l+e[1]*c+n[1]*u+i[1]*h,r[2]=t[2]*l+e[2]*c+n[2]*u+i[2]*h,r}function Ke(r,t){t=t===void 0?1:t;var e=glMatrix.RANDOM()*2*Math.PI,n=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-n*n)*t;return r[0]=Math.cos(e)*i,r[1]=Math.sin(e)*i,r[2]=n*t,r}function me(r,t,e){var n=t[0],i=t[1],a=t[2],s=e[3]*n+e[7]*i+e[11]*a+e[15];return s=s||1,r[0]=(e[0]*n+e[4]*i+e[8]*a+e[12])/s,r[1]=(e[1]*n+e[5]*i+e[9]*a+e[13])/s,r[2]=(e[2]*n+e[6]*i+e[10]*a+e[14])/s,r}function We(r,t,e){var n=t[0],i=t[1],a=t[2];return r[0]=n*e[0]+i*e[3]+a*e[6],r[1]=n*e[1]+i*e[4]+a*e[7],r[2]=n*e[2]+i*e[5]+a*e[8],r}function Gr(r,t,e){var n=e[0],i=e[1],a=e[2],s=e[3],o=t[0],A=t[1],l=t[2],c=i*l-a*A,u=a*o-n*l,h=n*A-i*o;return c=c+c,u=u+u,h=h+h,r[0]=o+s*c+i*h-a*u,r[1]=A+s*u+a*c-n*h,r[2]=l+s*h+n*u-i*c,r}function Wi(r,t,e,n){var i=[],a=[];return i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],a[0]=i[0],a[1]=i[1]*Math.cos(n)-i[2]*Math.sin(n),a[2]=i[1]*Math.sin(n)+i[2]*Math.cos(n),r[0]=a[0]+e[0],r[1]=a[1]+e[1],r[2]=a[2]+e[2],r}function pe(r,t,e,n){var i=[],a=[];return i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],a[0]=i[2]*Math.sin(n)+i[0]*Math.cos(n),a[1]=i[1],a[2]=i[2]*Math.cos(n)-i[0]*Math.sin(n),r[0]=a[0]+e[0],r[1]=a[1]+e[1],r[2]=a[2]+e[2],r}function Ga(r,t,e,n){var i=[],a=[];return i[0]=t[0]-e[0],i[1]=t[1]-e[1],i[2]=t[2]-e[2],a[0]=i[0]*Math.cos(n)-i[1]*Math.sin(n),a[1]=i[0]*Math.sin(n)+i[1]*Math.cos(n),a[2]=i[2],r[0]=a[0]+e[0],r[1]=a[1]+e[1],r[2]=a[2]+e[2],r}function Nr(r,t){var e=r[0],n=r[1],i=r[2],a=t[0],s=t[1],o=t[2],A=Math.sqrt((e*e+n*n+i*i)*(a*a+s*s+o*o)),l=A&&_e(r,t)/A;return Math.acos(Math.min(Math.max(l,-1),1))}function Mr(r){return r[0]=0,r[1]=0,r[2]=0,r}function di(r){return"vec3("+r[0]+", "+r[1]+", "+r[2]+")"}function as(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}function Zi(r,t){var e=r[0],n=r[1],i=r[2],a=t[0],s=t[1],o=t[2];return Math.abs(e-a)<=Y*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(n-s)<=Y*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-o)<=Y*Math.max(1,Math.abs(i),Math.abs(o))}var ss=Me,Ii=null,Jr=null,ma=Zt,ya=null,aa=qt,wa=null,qr=function(){var r=Ct();return function(t,e,n,i,a,s){var o,A;for(e||(e=3),n||(n=0),i?A=Math.min(i*e+n,t.length):A=t.length,o=n;o<A;o+=e)r[0]=t[o],r[1]=t[o+1],r[2]=t[o+2],a(r,r,s),t[o]=r[0],t[o+1]=r[1],t[o+2]=r[2];return t}}();function or(){var r=new nt(4);return nt!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function Ko(r){var t=new nt(4);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}function ji(r,t,e,n){var i=new nt(4);return i[0]=r,i[1]=t,i[2]=e,i[3]=n,i}function Yi(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}function lo(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function Ka(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r[3]=t[3]+e[3],r}function zo(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r[3]=t[3]-e[3],r}function UA(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r[2]=t[2]*e[2],r[3]=t[3]*e[3],r}function Ns(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r[2]=t[2]/e[2],r[3]=t[3]/e[3],r}function PA(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r[2]=Math.ceil(t[2]),r[3]=Math.ceil(t[3]),r}function _l(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r[2]=Math.floor(t[2]),r[3]=Math.floor(t[3]),r}function iu(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r[2]=Math.min(t[2],e[2]),r[3]=Math.min(t[3],e[3]),r}function Vh(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r[2]=Math.max(t[2],e[2]),r[3]=Math.max(t[3],e[3]),r}function Wh(r,t){return r[0]=glMatrix.round(t[0]),r[1]=glMatrix.round(t[1]),r[2]=glMatrix.round(t[2]),r[3]=glMatrix.round(t[3]),r}function Hl(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r}function pn(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r[2]=t[2]+e[2]*n,r[3]=t[3]+e[3]*n,r}function DA(r,t){var e=t[0]-r[0],n=t[1]-r[1],i=t[2]-r[2],a=t[3]-r[3];return Math.sqrt(e*e+n*n+i*i+a*a)}function Gl(r,t){var e=t[0]-r[0],n=t[1]-r[1],i=t[2]-r[2],a=t[3]-r[3];return e*e+n*n+i*i+a*a}function Ea(r){var t=r[0],e=r[1],n=r[2],i=r[3];return Math.sqrt(t*t+e*e+n*n+i*i)}function RA(r){var t=r[0],e=r[1],n=r[2],i=r[3];return t*t+e*e+n*n+i*i}function Vo(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r[3]=-t[3],r}function Kl(r,t){return r[0]=1/t[0],r[1]=1/t[1],r[2]=1/t[2],r[3]=1/t[3],r}function zl(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e*e+n*n+i*i+a*a;return s>0&&(s=1/Math.sqrt(s)),r[0]=e*s,r[1]=n*s,r[2]=i*s,r[3]=a*s,r}function q(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]*t[3]}function x(r,t,e,n){var i=e[0]*n[1]-e[1]*n[0],a=e[0]*n[2]-e[2]*n[0],s=e[0]*n[3]-e[3]*n[0],o=e[1]*n[2]-e[2]*n[1],A=e[1]*n[3]-e[3]*n[1],l=e[2]*n[3]-e[3]*n[2],c=t[0],u=t[1],h=t[2],d=t[3];return r[0]=u*l-h*A+d*o,r[1]=-(c*l)+h*s-d*a,r[2]=c*A-u*s+d*i,r[3]=-(c*o)+u*a-h*i,r}function S(r,t,e,n){var i=t[0],a=t[1],s=t[2],o=t[3];return r[0]=i+n*(e[0]-i),r[1]=a+n*(e[1]-a),r[2]=s+n*(e[2]-s),r[3]=o+n*(e[3]-o),r}function y(r,t){t=t===void 0?1:t;var e,n,i,a,s,o,A;A=glMatrix.RANDOM(),e=A*2-1,n=(4*glMatrix.RANDOM()-2)*Math.sqrt(A*-A+A),s=e*e+n*n,A=glMatrix.RANDOM(),i=A*2-1,a=(4*glMatrix.RANDOM()-2)*Math.sqrt(A*-A+A),o=i*i+a*a;var l=Math.sqrt((1-s)/o);return r[0]=t*e,r[1]=t*n,r[2]=t*i*l,r[3]=t*a*l,r}function T(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3];return r[0]=e[0]*n+e[4]*i+e[8]*a+e[12]*s,r[1]=e[1]*n+e[5]*i+e[9]*a+e[13]*s,r[2]=e[2]*n+e[6]*i+e[10]*a+e[14]*s,r[3]=e[3]*n+e[7]*i+e[11]*a+e[15]*s,r}function R(r,t,e){var n=e[0],i=e[1],a=e[2],s=e[3],o=t[0],A=t[1],l=t[2],c=i*l-a*A,u=a*o-n*l,h=n*A-i*o;return c=c+c,u=u+u,h=h+h,r[0]=o+s*c+i*h-a*u,r[1]=A+s*u+a*c-n*h,r[2]=l+s*h+n*u-i*c,r[3]=t[3],r}function st(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}function ot(r){return"vec4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+")"}function ut(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]}function ht(r,t){var e=r[0],n=r[1],i=r[2],a=r[3],s=t[0],o=t[1],A=t[2],l=t[3];return Math.abs(e-s)<=glMatrix.EPSILON*Math.max(1,Math.abs(e),Math.abs(s))&&Math.abs(n-o)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(o))&&Math.abs(i-A)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(A))&&Math.abs(a-l)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(l))}var kt=null,Bt=null,jt=null,ce=null,Kt=null,$t=null,Ce=null,St=function(){var r=or();return function(t,e,n,i,a,s){var o,A;for(e||(e=4),n||(n=0),i?A=Math.min(i*e+n,t.length):A=t.length,o=n;o<A;o+=e)r[0]=t[o],r[1]=t[o+1],r[2]=t[o+2],r[3]=t[o+3],a(r,r,s),t[o]=r[0],t[o+1]=r[1],t[o+2]=r[2],t[o+3]=r[3];return t}}();function te(){var r=new nt(16);return nt!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=0,r[12]=0,r[13]=0,r[14]=0),r[0]=1,r[5]=1,r[10]=1,r[15]=1,r}function Ee(r){var t=new nt(16);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t[9]=r[9],t[10]=r[10],t[11]=r[11],t[12]=r[12],t[13]=r[13],t[14]=r[14],t[15]=r[15],t}function He(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}function je(r,t,e,n,i,a,s,o,A,l,c,u,h,d,f,g){var v=new nt(16);return v[0]=r,v[1]=t,v[2]=e,v[3]=n,v[4]=i,v[5]=a,v[6]=s,v[7]=o,v[8]=A,v[9]=l,v[10]=c,v[11]=u,v[12]=h,v[13]=d,v[14]=f,v[15]=g,v}function Wn(r,t,e,n,i,a,s,o,A,l,c,u,h,d,f,g,v){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=a,r[5]=s,r[6]=o,r[7]=A,r[8]=l,r[9]=c,r[10]=u,r[11]=h,r[12]=d,r[13]=f,r[14]=g,r[15]=v,r}function Ie(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function De(r,t){if(r===t){var e=t[1],n=t[2],i=t[3],a=t[6],s=t[7],o=t[11];r[1]=t[4],r[2]=t[8],r[3]=t[12],r[4]=e,r[6]=t[9],r[7]=t[13],r[8]=n,r[9]=a,r[11]=t[14],r[12]=i,r[13]=s,r[14]=o}else r[0]=t[0],r[1]=t[4],r[2]=t[8],r[3]=t[12],r[4]=t[1],r[5]=t[5],r[6]=t[9],r[7]=t[13],r[8]=t[2],r[9]=t[6],r[10]=t[10],r[11]=t[14],r[12]=t[3],r[13]=t[7],r[14]=t[11],r[15]=t[15];return r}function on(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],A=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],f=t[12],g=t[13],v=t[14],m=t[15],w=e*o-n*s,C=e*A-i*s,F=e*l-a*s,Q=n*A-i*o,D=n*l-a*o,K=i*l-a*A,G=c*g-u*f,J=c*v-h*f,$=c*m-d*f,at=u*v-h*g,At=u*m-d*g,pt=h*m-d*v,wt=w*pt-C*At+F*at+Q*$-D*J+K*G;return wt?(wt=1/wt,r[0]=(o*pt-A*At+l*at)*wt,r[1]=(i*At-n*pt-a*at)*wt,r[2]=(g*K-v*D+m*Q)*wt,r[3]=(h*D-u*K-d*Q)*wt,r[4]=(A*$-s*pt-l*J)*wt,r[5]=(e*pt-i*$+a*J)*wt,r[6]=(v*F-f*K-m*C)*wt,r[7]=(c*K-h*F+d*C)*wt,r[8]=(s*At-o*$+l*G)*wt,r[9]=(n*$-e*At-a*G)*wt,r[10]=(f*D-g*F+m*w)*wt,r[11]=(u*F-c*D-d*w)*wt,r[12]=(o*J-s*at-A*G)*wt,r[13]=(e*at-n*J+i*G)*wt,r[14]=(g*C-f*Q-v*w)*wt,r[15]=(c*Q-u*C+h*w)*wt,r):null}function Lt(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],A=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],f=t[12],g=t[13],v=t[14],m=t[15],w=e*o-n*s,C=e*A-i*s,F=e*l-a*s,Q=n*A-i*o,D=n*l-a*o,K=i*l-a*A,G=c*g-u*f,J=c*v-h*f,$=c*m-d*f,at=u*v-h*g,At=u*m-d*g,pt=h*m-d*v;return r[0]=o*pt-A*At+l*at,r[1]=i*At-n*pt-a*at,r[2]=g*K-v*D+m*Q,r[3]=h*D-u*K-d*Q,r[4]=A*$-s*pt-l*J,r[5]=e*pt-i*$+a*J,r[6]=v*F-f*K-m*C,r[7]=c*K-h*F+d*C,r[8]=s*At-o*$+l*G,r[9]=n*$-e*At-a*G,r[10]=f*D-g*F+m*w,r[11]=u*F-c*D-d*w,r[12]=o*J-s*at-A*G,r[13]=e*at-n*J+i*G,r[14]=g*C-f*Q-v*w,r[15]=c*Q-u*C+h*w,r}function ee(r){var t=r[0],e=r[1],n=r[2],i=r[3],a=r[4],s=r[5],o=r[6],A=r[7],l=r[8],c=r[9],u=r[10],h=r[11],d=r[12],f=r[13],g=r[14],v=r[15],m=t*s-e*a,w=t*o-n*a,C=e*o-n*s,F=l*f-c*d,Q=l*g-u*d,D=c*g-u*f,K=t*D-e*Q+n*F,G=a*D-s*Q+o*F,J=l*C-c*w+u*m,$=d*C-f*w+g*m;return A*K-i*G+v*J-h*$}function he(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],A=t[5],l=t[6],c=t[7],u=t[8],h=t[9],d=t[10],f=t[11],g=t[12],v=t[13],m=t[14],w=t[15],C=e[0],F=e[1],Q=e[2],D=e[3];return r[0]=C*n+F*o+Q*u+D*g,r[1]=C*i+F*A+Q*h+D*v,r[2]=C*a+F*l+Q*d+D*m,r[3]=C*s+F*c+Q*f+D*w,C=e[4],F=e[5],Q=e[6],D=e[7],r[4]=C*n+F*o+Q*u+D*g,r[5]=C*i+F*A+Q*h+D*v,r[6]=C*a+F*l+Q*d+D*m,r[7]=C*s+F*c+Q*f+D*w,C=e[8],F=e[9],Q=e[10],D=e[11],r[8]=C*n+F*o+Q*u+D*g,r[9]=C*i+F*A+Q*h+D*v,r[10]=C*a+F*l+Q*d+D*m,r[11]=C*s+F*c+Q*f+D*w,C=e[12],F=e[13],Q=e[14],D=e[15],r[12]=C*n+F*o+Q*u+D*g,r[13]=C*i+F*A+Q*h+D*v,r[14]=C*a+F*l+Q*d+D*m,r[15]=C*s+F*c+Q*f+D*w,r}function se(r,t,e){var n=e[0],i=e[1],a=e[2],s,o,A,l,c,u,h,d,f,g,v,m;return t===r?(r[12]=t[0]*n+t[4]*i+t[8]*a+t[12],r[13]=t[1]*n+t[5]*i+t[9]*a+t[13],r[14]=t[2]*n+t[6]*i+t[10]*a+t[14],r[15]=t[3]*n+t[7]*i+t[11]*a+t[15]):(s=t[0],o=t[1],A=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7],f=t[8],g=t[9],v=t[10],m=t[11],r[0]=s,r[1]=o,r[2]=A,r[3]=l,r[4]=c,r[5]=u,r[6]=h,r[7]=d,r[8]=f,r[9]=g,r[10]=v,r[11]=m,r[12]=s*n+c*i+f*a+t[12],r[13]=o*n+u*i+g*a+t[13],r[14]=A*n+h*i+v*a+t[14],r[15]=l*n+d*i+m*a+t[15]),r}function Jn(r,t,e){var n=e[0],i=e[1],a=e[2];return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r[3]=t[3]*n,r[4]=t[4]*i,r[5]=t[5]*i,r[6]=t[6]*i,r[7]=t[7]*i,r[8]=t[8]*a,r[9]=t[9]*a,r[10]=t[10]*a,r[11]=t[11]*a,r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15],r}function Qn(r,t,e,n){var i=n[0],a=n[1],s=n[2],o=Math.sqrt(i*i+a*a+s*s),A,l,c,u,h,d,f,g,v,m,w,C,F,Q,D,K,G,J,$,at,At,pt,wt,bt;return o<Y?null:(o=1/o,i*=o,a*=o,s*=o,A=Math.sin(e),l=Math.cos(e),c=1-l,u=t[0],h=t[1],d=t[2],f=t[3],g=t[4],v=t[5],m=t[6],w=t[7],C=t[8],F=t[9],Q=t[10],D=t[11],K=i*i*c+l,G=a*i*c+s*A,J=s*i*c-a*A,$=i*a*c-s*A,at=a*a*c+l,At=s*a*c+i*A,pt=i*s*c+a*A,wt=a*s*c-i*A,bt=s*s*c+l,r[0]=u*K+g*G+C*J,r[1]=h*K+v*G+F*J,r[2]=d*K+m*G+Q*J,r[3]=f*K+w*G+D*J,r[4]=u*$+g*at+C*At,r[5]=h*$+v*at+F*At,r[6]=d*$+m*at+Q*At,r[7]=f*$+w*at+D*At,r[8]=u*pt+g*wt+C*bt,r[9]=h*pt+v*wt+F*bt,r[10]=d*pt+m*wt+Q*bt,r[11]=f*pt+w*wt+D*bt,t!==r&&(r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r)}function Zn(r,t,e){var n=Math.sin(e),i=Math.cos(e),a=t[4],s=t[5],o=t[6],A=t[7],l=t[8],c=t[9],u=t[10],h=t[11];return t!==r&&(r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[4]=a*i+l*n,r[5]=s*i+c*n,r[6]=o*i+u*n,r[7]=A*i+h*n,r[8]=l*i-a*n,r[9]=c*i-s*n,r[10]=u*i-o*n,r[11]=h*i-A*n,r}function qn(r,t,e){var n=Math.sin(e),i=Math.cos(e),a=t[0],s=t[1],o=t[2],A=t[3],l=t[8],c=t[9],u=t[10],h=t[11];return t!==r&&(r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=a*i-l*n,r[1]=s*i-c*n,r[2]=o*i-u*n,r[3]=A*i-h*n,r[8]=a*n+l*i,r[9]=s*n+c*i,r[10]=o*n+u*i,r[11]=A*n+h*i,r}function kr(r,t,e){var n=Math.sin(e),i=Math.cos(e),a=t[0],s=t[1],o=t[2],A=t[3],l=t[4],c=t[5],u=t[6],h=t[7];return t!==r&&(r[8]=t[8],r[9]=t[9],r[10]=t[10],r[11]=t[11],r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r[0]=a*i+l*n,r[1]=s*i+c*n,r[2]=o*i+u*n,r[3]=A*i+h*n,r[4]=l*i-a*n,r[5]=c*i-s*n,r[6]=u*i-o*n,r[7]=h*i-A*n,r}function Tr(r,t){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=t[0],r[13]=t[1],r[14]=t[2],r[15]=1,r}function Dn(r,t){return r[0]=t[0],r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=t[1],r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=t[2],r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function Xi(r,t,e){var n=e[0],i=e[1],a=e[2],s=Math.sqrt(n*n+i*i+a*a),o,A,l;return s<Y?null:(s=1/s,n*=s,i*=s,a*=s,o=Math.sin(t),A=Math.cos(t),l=1-A,r[0]=n*n*l+A,r[1]=i*n*l+a*o,r[2]=a*n*l-i*o,r[3]=0,r[4]=n*i*l-a*o,r[5]=i*i*l+A,r[6]=a*i*l+n*o,r[7]=0,r[8]=n*a*l+i*o,r[9]=i*a*l-n*o,r[10]=a*a*l+A,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r)}function Ji(r,t){var e=Math.sin(t),n=Math.cos(t);return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=n,r[6]=e,r[7]=0,r[8]=0,r[9]=-e,r[10]=n,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function fn(r,t){var e=Math.sin(t),n=Math.cos(t);return r[0]=n,r[1]=0,r[2]=-e,r[3]=0,r[4]=0,r[5]=1,r[6]=0,r[7]=0,r[8]=e,r[9]=0,r[10]=n,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function wr(r,t){var e=Math.sin(t),n=Math.cos(t);return r[0]=n,r[1]=e,r[2]=0,r[3]=0,r[4]=-e,r[5]=n,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=1,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function $r(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3],o=n+n,A=i+i,l=a+a,c=n*o,u=n*A,h=n*l,d=i*A,f=i*l,g=a*l,v=s*o,m=s*A,w=s*l;return r[0]=1-(d+g),r[1]=u+w,r[2]=h-m,r[3]=0,r[4]=u-w,r[5]=1-(c+g),r[6]=f+v,r[7]=0,r[8]=h+m,r[9]=f-v,r[10]=1-(c+d),r[11]=0,r[12]=e[0],r[13]=e[1],r[14]=e[2],r[15]=1,r}function ti(r,t){var e=new nt(3),n=-t[0],i=-t[1],a=-t[2],s=t[3],o=t[4],A=t[5],l=t[6],c=t[7],u=n*n+i*i+a*a+s*s;return u>0?(e[0]=(o*s+c*n+A*a-l*i)*2/u,e[1]=(A*s+c*i+l*n-o*a)*2/u,e[2]=(l*s+c*a+o*i-A*n)*2/u):(e[0]=(o*s+c*n+A*a-l*i)*2,e[1]=(A*s+c*i+l*n-o*a)*2,e[2]=(l*s+c*a+o*i-A*n)*2),$r(r,t,e),r}function Rn(r,t){return r[0]=t[12],r[1]=t[13],r[2]=t[14],r}function ks(r,t){var e=t[0],n=t[1],i=t[2],a=t[4],s=t[5],o=t[6],A=t[8],l=t[9],c=t[10];return r[0]=Math.sqrt(e*e+n*n+i*i),r[1]=Math.sqrt(a*a+s*s+o*o),r[2]=Math.sqrt(A*A+l*l+c*c),r}function Wo(r,t){var e=new nt(3);ks(e,t);var n=1/e[0],i=1/e[1],a=1/e[2],s=t[0]*n,o=t[1]*i,A=t[2]*a,l=t[4]*n,c=t[5]*i,u=t[6]*a,h=t[8]*n,d=t[9]*i,f=t[10]*a,g=s+c+f,v=0;return g>0?(v=Math.sqrt(g+1)*2,r[3]=.25*v,r[0]=(u-d)/v,r[1]=(h-A)/v,r[2]=(o-l)/v):s>c&&s>f?(v=Math.sqrt(1+s-c-f)*2,r[3]=(u-d)/v,r[0]=.25*v,r[1]=(o+l)/v,r[2]=(h+A)/v):c>f?(v=Math.sqrt(1+c-s-f)*2,r[3]=(h-A)/v,r[0]=(o+l)/v,r[1]=.25*v,r[2]=(u+d)/v):(v=Math.sqrt(1+f-s-c)*2,r[3]=(o-l)/v,r[0]=(h+A)/v,r[1]=(u+d)/v,r[2]=.25*v),r}function au(r,t,e,n){t[0]=n[12],t[1]=n[13],t[2]=n[14];var i=n[0],a=n[1],s=n[2],o=n[4],A=n[5],l=n[6],c=n[8],u=n[9],h=n[10];e[0]=Math.sqrt(i*i+a*a+s*s),e[1]=Math.sqrt(o*o+A*A+l*l),e[2]=Math.sqrt(c*c+u*u+h*h);var d=1/e[0],f=1/e[1],g=1/e[2],v=i*d,m=a*f,w=s*g,C=o*d,F=A*f,Q=l*g,D=c*d,K=u*f,G=h*g,J=v+F+G,$=0;return J>0?($=Math.sqrt(J+1)*2,r[3]=.25*$,r[0]=(Q-K)/$,r[1]=(D-w)/$,r[2]=(m-C)/$):v>F&&v>G?($=Math.sqrt(1+v-F-G)*2,r[3]=(Q-K)/$,r[0]=.25*$,r[1]=(m+C)/$,r[2]=(D+w)/$):F>G?($=Math.sqrt(1+F-v-G)*2,r[3]=(D-w)/$,r[0]=(m+C)/$,r[1]=.25*$,r[2]=(Q+K)/$):($=Math.sqrt(1+G-v-F)*2,r[3]=(m-C)/$,r[0]=(D+w)/$,r[1]=(Q+K)/$,r[2]=.25*$),r}function co(r,t,e,n){var i=t[0],a=t[1],s=t[2],o=t[3],A=i+i,l=a+a,c=s+s,u=i*A,h=i*l,d=i*c,f=a*l,g=a*c,v=s*c,m=o*A,w=o*l,C=o*c,F=n[0],Q=n[1],D=n[2];return r[0]=(1-(f+v))*F,r[1]=(h+C)*F,r[2]=(d-w)*F,r[3]=0,r[4]=(h-C)*Q,r[5]=(1-(u+v))*Q,r[6]=(g+m)*Q,r[7]=0,r[8]=(d+w)*D,r[9]=(g-m)*D,r[10]=(1-(u+f))*D,r[11]=0,r[12]=e[0],r[13]=e[1],r[14]=e[2],r[15]=1,r}function uo(r,t,e,n,i){var a=t[0],s=t[1],o=t[2],A=t[3],l=a+a,c=s+s,u=o+o,h=a*l,d=a*c,f=a*u,g=s*c,v=s*u,m=o*u,w=A*l,C=A*c,F=A*u,Q=n[0],D=n[1],K=n[2],G=i[0],J=i[1],$=i[2],at=(1-(g+m))*Q,At=(d+F)*Q,pt=(f-C)*Q,wt=(d-F)*D,bt=(1-(h+m))*D,Rt=(v+w)*D,Pt=(f+C)*K,xt=(v-w)*K,Ft=(1-(h+g))*K;return r[0]=at,r[1]=At,r[2]=pt,r[3]=0,r[4]=wt,r[5]=bt,r[6]=Rt,r[7]=0,r[8]=Pt,r[9]=xt,r[10]=Ft,r[11]=0,r[12]=e[0]+G-(at*G+wt*J+Pt*$),r[13]=e[1]+J-(At*G+bt*J+xt*$),r[14]=e[2]+$-(pt*G+Rt*J+Ft*$),r[15]=1,r}function _A(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e+e,o=n+n,A=i+i,l=e*s,c=n*s,u=n*o,h=i*s,d=i*o,f=i*A,g=a*s,v=a*o,m=a*A;return r[0]=1-u-f,r[1]=c+m,r[2]=h-v,r[3]=0,r[4]=c-m,r[5]=1-l-f,r[6]=d+g,r[7]=0,r[8]=h+v,r[9]=d-g,r[10]=1-l-u,r[11]=0,r[12]=0,r[13]=0,r[14]=0,r[15]=1,r}function su(r,t,e,n,i,a,s){var o=1/(e-t),A=1/(i-n),l=1/(a-s);return r[0]=a*2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a*2*A,r[6]=0,r[7]=0,r[8]=(e+t)*o,r[9]=(i+n)*A,r[10]=(s+a)*l,r[11]=-1,r[12]=0,r[13]=0,r[14]=s*a*2*l,r[15]=0,r}function Vl(r,t,e,n,i){var a=1/Math.tan(t/2);if(r[0]=a/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,i!=null&&i!==1/0){var s=1/(n-i);r[10]=(i+n)*s,r[14]=2*i*n*s}else r[10]=-1,r[14]=-2*n;return r}var ou=Vl;function Y0(r,t,e,n,i){var a=1/Math.tan(t/2);if(r[0]=a/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=a,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[11]=-1,r[12]=0,r[13]=0,r[15]=0,i!=null&&i!==1/0){var s=1/(n-i);r[10]=i*s,r[14]=i*n*s}else r[10]=-1,r[14]=-n;return r}function za(r,t,e,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),s=Math.tan(t.leftDegrees*Math.PI/180),o=Math.tan(t.rightDegrees*Math.PI/180),A=2/(s+o),l=2/(i+a);return r[0]=A,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=l,r[6]=0,r[7]=0,r[8]=-((s-o)*A*.5),r[9]=(i-a)*l*.5,r[10]=n/(e-n),r[11]=-1,r[12]=0,r[13]=0,r[14]=n*e/(e-n),r[15]=0,r}function Au(r,t,e,n,i,a,s){var o=1/(t-e),A=1/(n-i),l=1/(a-s);return r[0]=-2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*A,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=2*l,r[11]=0,r[12]=(t+e)*o,r[13]=(i+n)*A,r[14]=(s+a)*l,r[15]=1,r}var lu=Au;function cu(r,t,e,n,i,a,s){var o=1/(t-e),A=1/(n-i),l=1/(a-s);return r[0]=-2*o,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=-2*A,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=l,r[11]=0,r[12]=(t+e)*o,r[13]=(i+n)*A,r[14]=a*l,r[15]=1,r}function Zh(r,t,e,n){var i,a,s,o,A,l,c,u,h,d,f=t[0],g=t[1],v=t[2],m=n[0],w=n[1],C=n[2],F=e[0],Q=e[1],D=e[2];return Math.abs(f-F)<Y&&Math.abs(g-Q)<Y&&Math.abs(v-D)<Y?Ie(r):(c=f-F,u=g-Q,h=v-D,d=1/Math.sqrt(c*c+u*u+h*h),c*=d,u*=d,h*=d,i=w*h-C*u,a=C*c-m*h,s=m*u-w*c,d=Math.sqrt(i*i+a*a+s*s),d?(d=1/d,i*=d,a*=d,s*=d):(i=0,a=0,s=0),o=u*s-h*a,A=h*i-c*s,l=c*a-u*i,d=Math.sqrt(o*o+A*A+l*l),d?(d=1/d,o*=d,A*=d,l*=d):(o=0,A=0,l=0),r[0]=i,r[1]=o,r[2]=c,r[3]=0,r[4]=a,r[5]=A,r[6]=u,r[7]=0,r[8]=s,r[9]=l,r[10]=h,r[11]=0,r[12]=-(i*f+a*g+s*v),r[13]=-(o*f+A*g+l*v),r[14]=-(c*f+u*g+h*v),r[15]=1,r)}function X0(r,t,e,n){var i=t[0],a=t[1],s=t[2],o=n[0],A=n[1],l=n[2],c=i-e[0],u=a-e[1],h=s-e[2],d=c*c+u*u+h*h;d>0&&(d=1/Math.sqrt(d),c*=d,u*=d,h*=d);var f=A*h-l*u,g=l*c-o*h,v=o*u-A*c;return d=f*f+g*g+v*v,d>0&&(d=1/Math.sqrt(d),f*=d,g*=d,v*=d),r[0]=f,r[1]=g,r[2]=v,r[3]=0,r[4]=u*v-h*g,r[5]=h*f-c*v,r[6]=c*g-u*f,r[7]=0,r[8]=c,r[9]=u,r[10]=h,r[11]=0,r[12]=i,r[13]=a,r[14]=s,r[15]=1,r}function J0(r){return"mat4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+", "+r[9]+", "+r[10]+", "+r[11]+", "+r[12]+", "+r[13]+", "+r[14]+", "+r[15]+")"}function jh(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+r[3]*r[3]+r[4]*r[4]+r[5]*r[5]+r[6]*r[6]+r[7]*r[7]+r[8]*r[8]+r[9]*r[9]+r[10]*r[10]+r[11]*r[11]+r[12]*r[12]+r[13]*r[13]+r[14]*r[14]+r[15]*r[15])}function Yh(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r[3]=t[3]+e[3],r[4]=t[4]+e[4],r[5]=t[5]+e[5],r[6]=t[6]+e[6],r[7]=t[7]+e[7],r[8]=t[8]+e[8],r[9]=t[9]+e[9],r[10]=t[10]+e[10],r[11]=t[11]+e[11],r[12]=t[12]+e[12],r[13]=t[13]+e[13],r[14]=t[14]+e[14],r[15]=t[15]+e[15],r}function uu(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r[3]=t[3]-e[3],r[4]=t[4]-e[4],r[5]=t[5]-e[5],r[6]=t[6]-e[6],r[7]=t[7]-e[7],r[8]=t[8]-e[8],r[9]=t[9]-e[9],r[10]=t[10]-e[10],r[11]=t[11]-e[11],r[12]=t[12]-e[12],r[13]=t[13]-e[13],r[14]=t[14]-e[14],r[15]=t[15]-e[15],r}function q0(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7]*e,r[8]=t[8]*e,r[9]=t[9]*e,r[10]=t[10]*e,r[11]=t[11]*e,r[12]=t[12]*e,r[13]=t[13]*e,r[14]=t[14]*e,r[15]=t[15]*e,r}function $0(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r[2]=t[2]+e[2]*n,r[3]=t[3]+e[3]*n,r[4]=t[4]+e[4]*n,r[5]=t[5]+e[5]*n,r[6]=t[6]+e[6]*n,r[7]=t[7]+e[7]*n,r[8]=t[8]+e[8]*n,r[9]=t[9]+e[9]*n,r[10]=t[10]+e[10]*n,r[11]=t[11]+e[11]*n,r[12]=t[12]+e[12]*n,r[13]=t[13]+e[13]*n,r[14]=t[14]+e[14]*n,r[15]=t[15]+e[15]*n,r}function Kr(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]&&r[4]===t[4]&&r[5]===t[5]&&r[6]===t[6]&&r[7]===t[7]&&r[8]===t[8]&&r[9]===t[9]&&r[10]===t[10]&&r[11]===t[11]&&r[12]===t[12]&&r[13]===t[13]&&r[14]===t[14]&&r[15]===t[15]}function tv(r,t){var e=r[0],n=r[1],i=r[2],a=r[3],s=r[4],o=r[5],A=r[6],l=r[7],c=r[8],u=r[9],h=r[10],d=r[11],f=r[12],g=r[13],v=r[14],m=r[15],w=t[0],C=t[1],F=t[2],Q=t[3],D=t[4],K=t[5],G=t[6],J=t[7],$=t[8],at=t[9],At=t[10],pt=t[11],wt=t[12],bt=t[13],Rt=t[14],Pt=t[15];return Math.abs(e-w)<=Y*Math.max(1,Math.abs(e),Math.abs(w))&&Math.abs(n-C)<=Y*Math.max(1,Math.abs(n),Math.abs(C))&&Math.abs(i-F)<=Y*Math.max(1,Math.abs(i),Math.abs(F))&&Math.abs(a-Q)<=Y*Math.max(1,Math.abs(a),Math.abs(Q))&&Math.abs(s-D)<=Y*Math.max(1,Math.abs(s),Math.abs(D))&&Math.abs(o-K)<=Y*Math.max(1,Math.abs(o),Math.abs(K))&&Math.abs(A-G)<=Y*Math.max(1,Math.abs(A),Math.abs(G))&&Math.abs(l-J)<=Y*Math.max(1,Math.abs(l),Math.abs(J))&&Math.abs(c-$)<=Y*Math.max(1,Math.abs(c),Math.abs($))&&Math.abs(u-at)<=Y*Math.max(1,Math.abs(u),Math.abs(at))&&Math.abs(h-At)<=Y*Math.max(1,Math.abs(h),Math.abs(At))&&Math.abs(d-pt)<=Y*Math.max(1,Math.abs(d),Math.abs(pt))&&Math.abs(f-wt)<=Y*Math.max(1,Math.abs(f),Math.abs(wt))&&Math.abs(g-bt)<=Y*Math.max(1,Math.abs(g),Math.abs(bt))&&Math.abs(v-Rt)<=Y*Math.max(1,Math.abs(v),Math.abs(Rt))&&Math.abs(m-Pt)<=Y*Math.max(1,Math.abs(m),Math.abs(Pt))}var ho=he,ev=uu;function Xh(){var r=new nt(9);return nt!=Float32Array&&(r[1]=0,r[2]=0,r[3]=0,r[5]=0,r[6]=0,r[7]=0),r[0]=1,r[4]=1,r[8]=1,r}function nv(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[4],r[4]=t[5],r[5]=t[6],r[6]=t[8],r[7]=t[9],r[8]=t[10],r}function q1(r){var t=new glMatrix.ARRAY_TYPE(9);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t[4]=r[4],t[5]=r[5],t[6]=r[6],t[7]=r[7],t[8]=r[8],t}function hu(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r}function Wl(r,t,e,n,i,a,s,o,A){var l=new nt(9);return l[0]=r,l[1]=t,l[2]=e,l[3]=n,l[4]=i,l[5]=a,l[6]=s,l[7]=o,l[8]=A,l}function rv(r,t,e,n,i,a,s,o,A,l){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r[4]=a,r[5]=s,r[6]=o,r[7]=A,r[8]=l,r}function $1(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function fo(r,t){if(r===t){var e=t[1],n=t[2],i=t[5];r[1]=t[3],r[2]=t[6],r[3]=e,r[5]=t[7],r[6]=n,r[7]=i}else r[0]=t[0],r[1]=t[3],r[2]=t[6],r[3]=t[1],r[4]=t[4],r[5]=t[7],r[6]=t[2],r[7]=t[5],r[8]=t[8];return r}function du(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],A=t[6],l=t[7],c=t[8],u=c*s-o*l,h=-c*a+o*A,d=l*a-s*A,f=e*u+n*h+i*d;return f?(f=1/f,r[0]=u*f,r[1]=(-c*n+i*l)*f,r[2]=(o*n-i*s)*f,r[3]=h*f,r[4]=(c*e-i*A)*f,r[5]=(-o*e+i*a)*f,r[6]=d*f,r[7]=(-l*e+n*A)*f,r[8]=(s*e-n*a)*f,r):null}function Jh(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],A=t[6],l=t[7],c=t[8];return r[0]=s*c-o*l,r[1]=i*l-n*c,r[2]=n*o-i*s,r[3]=o*A-a*c,r[4]=e*c-i*A,r[5]=i*a-e*o,r[6]=a*l-s*A,r[7]=n*A-e*l,r[8]=e*s-n*a,r}function tw(r){var t=r[0],e=r[1],n=r[2],i=r[3],a=r[4],s=r[5],o=r[6],A=r[7],l=r[8];return t*(l*a-s*A)+e*(-l*i+s*o)+n*(A*i-a*o)}function ew(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],A=t[5],l=t[6],c=t[7],u=t[8],h=e[0],d=e[1],f=e[2],g=e[3],v=e[4],m=e[5],w=e[6],C=e[7],F=e[8];return r[0]=h*n+d*s+f*l,r[1]=h*i+d*o+f*c,r[2]=h*a+d*A+f*u,r[3]=g*n+v*s+m*l,r[4]=g*i+v*o+m*c,r[5]=g*a+v*A+m*u,r[6]=w*n+C*s+F*l,r[7]=w*i+C*o+F*c,r[8]=w*a+C*A+F*u,r}function nw(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],A=t[5],l=t[6],c=t[7],u=t[8],h=e[0],d=e[1];return r[0]=n,r[1]=i,r[2]=a,r[3]=s,r[4]=o,r[5]=A,r[6]=h*n+d*s+l,r[7]=h*i+d*o+c,r[8]=h*a+d*A+u,r}function rw(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3],o=t[4],A=t[5],l=t[6],c=t[7],u=t[8],h=Math.sin(e),d=Math.cos(e);return r[0]=d*n+h*s,r[1]=d*i+h*o,r[2]=d*a+h*A,r[3]=d*s-h*n,r[4]=d*o-h*i,r[5]=d*A-h*a,r[6]=l,r[7]=c,r[8]=u,r}function iw(r,t,e){var n=e[0],i=e[1];return r[0]=n*t[0],r[1]=n*t[1],r[2]=n*t[2],r[3]=i*t[3],r[4]=i*t[4],r[5]=i*t[5],r[6]=t[6],r[7]=t[7],r[8]=t[8],r}function aw(r,t){return r[0]=1,r[1]=0,r[2]=0,r[3]=0,r[4]=1,r[5]=0,r[6]=t[0],r[7]=t[1],r[8]=1,r}function sw(r,t){var e=Math.sin(t),n=Math.cos(t);return r[0]=n,r[1]=e,r[2]=0,r[3]=-e,r[4]=n,r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function ow(r,t){return r[0]=t[0],r[1]=0,r[2]=0,r[3]=0,r[4]=t[1],r[5]=0,r[6]=0,r[7]=0,r[8]=1,r}function Aw(r,t){return r[0]=t[0],r[1]=t[1],r[2]=0,r[3]=t[2],r[4]=t[3],r[5]=0,r[6]=t[4],r[7]=t[5],r[8]=1,r}function lw(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e+e,o=n+n,A=i+i,l=e*s,c=n*s,u=n*o,h=i*s,d=i*o,f=i*A,g=a*s,v=a*o,m=a*A;return r[0]=1-u-f,r[3]=c-m,r[6]=h+v,r[1]=c+m,r[4]=1-l-f,r[7]=d-g,r[2]=h-v,r[5]=d+g,r[8]=1-l-u,r}function cw(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=t[4],o=t[5],A=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11],f=t[12],g=t[13],v=t[14],m=t[15],w=e*o-n*s,C=e*A-i*s,F=e*l-a*s,Q=n*A-i*o,D=n*l-a*o,K=i*l-a*A,G=c*g-u*f,J=c*v-h*f,$=c*m-d*f,at=u*v-h*g,At=u*m-d*g,pt=h*m-d*v,wt=w*pt-C*At+F*at+Q*$-D*J+K*G;return wt?(wt=1/wt,r[0]=(o*pt-A*At+l*at)*wt,r[1]=(A*$-s*pt-l*J)*wt,r[2]=(s*At-o*$+l*G)*wt,r[3]=(i*At-n*pt-a*at)*wt,r[4]=(e*pt-i*$+a*J)*wt,r[5]=(n*$-e*At-a*G)*wt,r[6]=(g*K-v*D+m*Q)*wt,r[7]=(v*F-f*K-m*C)*wt,r[8]=(f*D-g*F+m*w)*wt,r):null}function uw(r,t,e){return r[0]=2/t,r[1]=0,r[2]=0,r[3]=0,r[4]=-2/e,r[5]=0,r[6]=-1,r[7]=1,r[8]=1,r}function fu(r){return"mat3("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+")"}function hw(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]+r[3]*r[3]+r[4]*r[4]+r[5]*r[5]+r[6]*r[6]+r[7]*r[7]+r[8]*r[8])}function dw(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r[3]=t[3]+e[3],r[4]=t[4]+e[4],r[5]=t[5]+e[5],r[6]=t[6]+e[6],r[7]=t[7]+e[7],r[8]=t[8]+e[8],r}function fw(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r[3]=t[3]-e[3],r[4]=t[4]-e[4],r[5]=t[5]-e[5],r[6]=t[6]-e[6],r[7]=t[7]-e[7],r[8]=t[8]-e[8],r}function gw(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r[2]=t[2]*e,r[3]=t[3]*e,r[4]=t[4]*e,r[5]=t[5]*e,r[6]=t[6]*e,r[7]=t[7]*e,r[8]=t[8]*e,r}function vw(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r[2]=t[2]+e[2]*n,r[3]=t[3]+e[3]*n,r[4]=t[4]+e[4]*n,r[5]=t[5]+e[5]*n,r[6]=t[6]+e[6]*n,r[7]=t[7]+e[7]*n,r[8]=t[8]+e[8]*n,r}function pw(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]&&r[4]===t[4]&&r[5]===t[5]&&r[6]===t[6]&&r[7]===t[7]&&r[8]===t[8]}function mw(r,t){var e=r[0],n=r[1],i=r[2],a=r[3],s=r[4],o=r[5],A=r[6],l=r[7],c=r[8],u=t[0],h=t[1],d=t[2],f=t[3],g=t[4],v=t[5],m=t[6],w=t[7],C=t[8];return Math.abs(e-u)<=glMatrix.EPSILON*Math.max(1,Math.abs(e),Math.abs(u))&&Math.abs(n-h)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(h))&&Math.abs(i-d)<=glMatrix.EPSILON*Math.max(1,Math.abs(i),Math.abs(d))&&Math.abs(a-f)<=glMatrix.EPSILON*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(s-g)<=glMatrix.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(o-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(v))&&Math.abs(A-m)<=glMatrix.EPSILON*Math.max(1,Math.abs(A),Math.abs(m))&&Math.abs(l-w)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(w))&&Math.abs(c-C)<=glMatrix.EPSILON*Math.max(1,Math.abs(c),Math.abs(C))}var yw=null,qh=null;function Er(){var r=new nt(4);return nt!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function iv(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=1,r}function sa(r,t,e){e=e*.5;var n=Math.sin(e);return r[0]=n*t[0],r[1]=n*t[1],r[2]=n*t[2],r[3]=Math.cos(e),r}function HA(r,t){var e=Math.acos(t[3])*2,n=Math.sin(e/2);return n>glMatrix.EPSILON?(r[0]=t[0]/n,r[1]=t[1]/n,r[2]=t[2]/n):(r[0]=1,r[1]=0,r[2]=0),e}function $n(r,t){var e=Ps(r,t);return Math.acos(2*e*e-1)}function Qs(r,t,e){var n=t[0],i=t[1],a=t[2],s=t[3],o=e[0],A=e[1],l=e[2],c=e[3];return r[0]=n*c+s*o+i*l-a*A,r[1]=i*c+s*A+a*o-n*l,r[2]=a*c+s*l+n*A-i*o,r[3]=s*c-n*o-i*A-a*l,r}function $h(r,t,e){e*=.5;var n=t[0],i=t[1],a=t[2],s=t[3],o=Math.sin(e),A=Math.cos(e);return r[0]=n*A+s*o,r[1]=i*A+a*o,r[2]=a*A-i*o,r[3]=s*A-n*o,r}function av(r,t,e){e*=.5;var n=t[0],i=t[1],a=t[2],s=t[3],o=Math.sin(e),A=Math.cos(e);return r[0]=n*A-a*o,r[1]=i*A+s*o,r[2]=a*A+n*o,r[3]=s*A-i*o,r}function GA(r,t,e){e*=.5;var n=t[0],i=t[1],a=t[2],s=t[3],o=Math.sin(e),A=Math.cos(e);return r[0]=n*A+i*o,r[1]=i*A-n*o,r[2]=a*A+s*o,r[3]=s*A-a*o,r}function os(r,t){var e=t[0],n=t[1],i=t[2];return r[0]=e,r[1]=n,r[2]=i,r[3]=Math.sqrt(Math.abs(1-e*e-n*n-i*i)),r}function sv(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=Math.sqrt(e*e+n*n+i*i),o=Math.exp(a),A=s>0?o*Math.sin(s)/s:0;return r[0]=e*A,r[1]=n*A,r[2]=i*A,r[3]=o*Math.cos(s),r}function Us(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=Math.sqrt(e*e+n*n+i*i),o=s>0?Math.atan2(s,a)/s:0;return r[0]=e*o,r[1]=n*o,r[2]=i*o,r[3]=.5*Math.log(e*e+n*n+i*i+a*a),r}function Qr(r,t,e){return Us(r,t),oa(r,r,e),sv(r,r),r}function Zl(r,t,e,n){var i=t[0],a=t[1],s=t[2],o=t[3],A=e[0],l=e[1],c=e[2],u=e[3],h,d,f,g,v;return d=i*A+a*l+s*c+o*u,d<0&&(d=-d,A=-A,l=-l,c=-c,u=-u),1-d>Y?(h=Math.acos(d),f=Math.sin(h),g=Math.sin((1-n)*h)/f,v=Math.sin(n*h)/f):(g=1-n,v=n),r[0]=g*i+v*A,r[1]=g*a+v*l,r[2]=g*s+v*c,r[3]=g*o+v*u,r}function fi(r){var t=glMatrix.RANDOM(),e=glMatrix.RANDOM(),n=glMatrix.RANDOM(),i=Math.sqrt(1-t),a=Math.sqrt(t);return r[0]=i*Math.sin(2*Math.PI*e),r[1]=i*Math.cos(2*Math.PI*e),r[2]=a*Math.sin(2*Math.PI*n),r[3]=a*Math.cos(2*Math.PI*n),r}function KA(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e*e+n*n+i*i+a*a,o=s?1/s:0;return r[0]=-e*o,r[1]=-n*o,r[2]=-i*o,r[3]=a*o,r}function go(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r[3]=t[3],r}function zA(r,t){var e=t[0]+t[4]+t[8],n;if(e>0)n=Math.sqrt(e+1),r[3]=.5*n,n=.5/n,r[0]=(t[5]-t[7])*n,r[1]=(t[6]-t[2])*n,r[2]=(t[1]-t[3])*n;else{var i=0;t[4]>t[0]&&(i=1),t[8]>t[i*3+i]&&(i=2);var a=(i+1)%3,s=(i+2)%3;n=Math.sqrt(t[i*3+i]-t[a*3+a]-t[s*3+s]+1),r[i]=.5*n,n=.5/n,r[3]=(t[a*3+s]-t[s*3+a])*n,r[a]=(t[a*3+i]+t[i*3+a])*n,r[s]=(t[s*3+i]+t[i*3+s])*n}return r}function Gn(r,t,e,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:ft,a=Math.PI/360;t*=a,n*=a,e*=a;var s=Math.sin(t),o=Math.cos(t),A=Math.sin(e),l=Math.cos(e),c=Math.sin(n),u=Math.cos(n);switch(i){case"xyz":r[0]=s*l*u+o*A*c,r[1]=o*A*u-s*l*c,r[2]=o*l*c+s*A*u,r[3]=o*l*u-s*A*c;break;case"xzy":r[0]=s*l*u-o*A*c,r[1]=o*A*u-s*l*c,r[2]=o*l*c+s*A*u,r[3]=o*l*u+s*A*c;break;case"yxz":r[0]=s*l*u+o*A*c,r[1]=o*A*u-s*l*c,r[2]=o*l*c-s*A*u,r[3]=o*l*u+s*A*c;break;case"yzx":r[0]=s*l*u+o*A*c,r[1]=o*A*u+s*l*c,r[2]=o*l*c-s*A*u,r[3]=o*l*u-s*A*c;break;case"zxy":r[0]=s*l*u-o*A*c,r[1]=o*A*u+s*l*c,r[2]=o*l*c+s*A*u,r[3]=o*l*u-s*A*c;break;case"zyx":r[0]=s*l*u-o*A*c,r[1]=o*A*u+s*l*c,r[2]=o*l*c-s*A*u,r[3]=o*l*u+s*A*c;break;default:throw new Error("Unknown angle order "+i)}return r}function ov(r){return"quat("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+")"}var Av=Ko,td=ji,VA=Yi,WA=lo,lv=Ka,gu=Qs,oa=Hl,Ps=q,vo=S,ei=Ea,po=null,cv=RA,uv=null,Zo=zl,hv=ut;function ww(r,t){return Math.abs(vec4.dot(r,t))>=1-glMatrix.EPSILON}var jl=function(){var r=Ct(),t=Gt(1,0,0),e=Gt(0,1,0);return function(n,i,a){var s=_e(i,a);return s<-.999999?(Te(r,t,i),aa(r)<1e-6&&Te(r,e,i),be(r,r),sa(n,r,Math.PI),n):s>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(Te(r,i,a),n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=1+s,Zo(n,n))}}(),Ds=function(){var r=Er(),t=Er();return function(e,n,i,a,s,o){return Zl(r,n,s,o),Zl(t,i,a,o),Zl(e,r,t,2*o*(1-o)),e}}(),Ew=function(){var r=Xh();return function(t,e,n,i){return r[0]=n[0],r[3]=n[1],r[6]=n[2],r[1]=i[0],r[4]=i[1],r[7]=i[2],r[2]=-e[0],r[5]=-e[1],r[8]=-e[2],Zo(t,zA(t,r))}}();function vu(){var r=new nt(2);return nt!=Float32Array&&(r[0]=0,r[1]=0),r}function pu(r){var t=new glMatrix.ARRAY_TYPE(2);return t[0]=r[0],t[1]=r[1],t}function dv(r,t){var e=new glMatrix.ARRAY_TYPE(2);return e[0]=r,e[1]=t,e}function fv(r,t){return r[0]=t[0],r[1]=t[1],r}function gv(r,t,e){return r[0]=t,r[1]=e,r}function Va(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function vv(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function Bw(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function bw(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function mu(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r}function xw(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r}function pv(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function mv(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}function yv(r,t){return r[0]=glMatrix.round(t[0]),r[1]=glMatrix.round(t[1]),r}function wv(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function Ev(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r}function Bv(r,t){var e=t[0]-r[0],n=t[1]-r[1];return Math.sqrt(e*e+n*n)}function bv(r,t){var e=t[0]-r[0],n=t[1]-r[1];return e*e+n*n}function xv(r){var t=r[0],e=r[1];return Math.sqrt(t*t+e*e)}function Cw(r){var t=r[0],e=r[1];return t*t+e*e}function yu(r,t){return r[0]=-t[0],r[1]=-t[1],r}function Sw(r,t){return r[0]=1/t[0],r[1]=1/t[1],r}function Cv(r,t){var e=t[0],n=t[1],i=e*e+n*n;return i>0&&(i=1/Math.sqrt(i)),r[0]=t[0]*i,r[1]=t[1]*i,r}function wu(r,t){return r[0]*t[0]+r[1]*t[1]}function Mw(r,t,e){var n=t[0]*e[1]-t[1]*e[0];return r[0]=r[1]=0,r[2]=n,r}function Sv(r,t,e,n){var i=t[0],a=t[1];return r[0]=i+n*(e[0]-i),r[1]=a+n*(e[1]-a),r}function Tw(r,t){t=t===void 0?1:t;var e=glMatrix.RANDOM()*2*Math.PI;return r[0]=Math.cos(e)*t,r[1]=Math.sin(e)*t,r}function Fw(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i,r[1]=e[1]*n+e[3]*i,r}function Ow(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i+e[4],r[1]=e[1]*n+e[3]*i+e[5],r}function Iw(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[3]*i+e[6],r[1]=e[1]*n+e[4]*i+e[7],r}function Lw(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[4]*i+e[12],r[1]=e[1]*n+e[5]*i+e[13],r}function ZA(r,t,e,n){var i=t[0]-e[0],a=t[1]-e[1],s=Math.sin(n),o=Math.cos(n);return r[0]=i*o-a*s+e[0],r[1]=i*s+a*o+e[1],r}function Nw(r,t){var e=r[0],n=r[1],i=t[0],a=t[1];return Math.abs(Math.atan2(n*i-e*a,e*i+n*a))}function kw(r,t){var e=r[0],n=r[1],i=t[0],a=t[1];return Math.atan2(e*a-n*i,e*i+n*a)}function Eu(r){return r[0]=0,r[1]=0,r}function Qw(r){return"vec2("+r[0]+", "+r[1]+")"}function Mv(r,t){return r[0]===t[0]&&r[1]===t[1]}function Uw(r,t){var e=r[0],n=r[1],i=t[0],a=t[1];return Math.abs(e-i)<=glMatrix.EPSILON*Math.max(1,Math.abs(e),Math.abs(i))&&Math.abs(n-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))}var Pw=null,Bu=null,Dw=null,Rw=null,_w=null,Hw=null,bu=null,Gw=function(){var r=vu();return function(t,e,n,i,a,s){var o,A;for(e||(e=2),n||(n=0),i?A=Math.min(i*e+n,t.length):A=t.length,o=n;o<A;o+=e)r[0]=t[o],r[1]=t[o+1],a(r,r,s),t[o]=r[0],t[o+1]=r[1];return t}}();function ye(r){return typeof r=="number"}function Li(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}function Pe(r){return r==null}function gn(r){return typeof r=="string"}var Tv=function(r,t,e){return r<t?t:r>e?e:r},hr=Tv,z=M(80813),jA={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ed(r){return Array.isArray(r)&&r.every(function(t){var e=t[0].toLowerCase();return jA[e]===t.length-1&&"achlmqstvz".includes(e)})}function nd(r){return ed(r)&&r.every(function(t){var e=t[0];return e===e.toUpperCase()})}function rd(r){return nd(r)&&r.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var id={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function ad(r){for(var t=r.pathValue[r.segmentStart],e=t.toLowerCase(),n=r.data;n.length>=jA[e]&&(e==="m"&&n.length>2?(r.segments.push([t].concat(n.splice(0,2))),e="l",t=t==="m"?"l":"L"):r.segments.push([t].concat(n.splice(0,jA[e]))),!!jA[e]););}function Fv(r){var t=r.index,e=r.pathValue,n=e.charCodeAt(t);if(n===48){r.param=0,r.index+=1;return}if(n===49){r.param=1,r.index+=1;return}r.err='[path-util]: invalid Arc flag "'.concat(e[t],'", expecting 0 or 1 at index ').concat(t)}function Yl(r){return r>=48&&r<=57||r===43||r===45||r===46}function jo(r){return r>=48&&r<=57}function Ov(r){var t=r.max,e=r.pathValue,n=r.index,i=n,a=!1,s=!1,o=!1,A=!1,l;if(i>=t){r.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');return}if(l=e.charCodeAt(i),(l===43||l===45)&&(i+=1,l=e.charCodeAt(i)),!jo(l)&&l!==46){r.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" is not a number');return}if(l!==46){if(a=l===48,i+=1,l=e.charCodeAt(i),a&&i<t&&l&&jo(l)){r.err="[path-util]: Invalid path value at index ".concat(n,', "').concat(e[n],'" illegal number');return}for(;i<t&&jo(e.charCodeAt(i));)i+=1,s=!0;l=e.charCodeAt(i)}if(l===46){for(A=!0,i+=1;jo(e.charCodeAt(i));)i+=1,o=!0;l=e.charCodeAt(i)}if(l===101||l===69){if(A&&!s&&!o){r.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid float exponent');return}if(i+=1,l=e.charCodeAt(i),(l===43||l===45)&&(i+=1),i<t&&jo(e.charCodeAt(i)))for(;i<t&&jo(e.charCodeAt(i));)i+=1;else{r.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(e[i],'" invalid integer exponent');return}}r.index=i,r.param=+r.pathValue.slice(n,i)}function sd(r){var t=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return r===10||r===13||r===8232||r===8233||r===32||r===9||r===11||r===12||r===160||r>=5760&&t.includes(r)}function Xl(r){for(var t=r.pathValue,e=r.max;r.index<e&&sd(t.charCodeAt(r.index));)r.index+=1}function Iv(r){switch(r|32){case 109:case 122:case 108:case 104:case 118:case 99:case 115:case 113:case 116:case 97:return!0;default:return!1}}function xu(r){return(r|32)===97}function Jl(r){var t=r.max,e=r.pathValue,n=r.index,i=e.charCodeAt(n),a=jA[e[n].toLowerCase()];if(r.segmentStart=n,!Iv(i)){r.err='[path-util]: Invalid path value "'.concat(e[n],'" is not a path command');return}if(r.index+=1,Xl(r),r.data=[],!a){ad(r);return}for(;;){for(var s=a;s>0;s-=1){if(xu(i)&&(s===3||s===4)?Fv(r):Ov(r),r.err.length)return;r.data.push(r.param),Xl(r),r.index<t&&e.charCodeAt(r.index)===44&&(r.index+=1,Xl(r))}if(r.index>=r.max||!Yl(e.charCodeAt(r.index)))break}ad(r)}var Lv=function(){function r(t){this.pathValue=t,this.segments=[],this.max=t.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return r}();function Nv(r){if(ed(r))return[].concat(r);var t=new Lv(r);for(Xl(t);t.index<t.max&&!t.err.length;)Jl(t);return t.err?t.err:t.segments}function kv(r){if(nd(r))return[].concat(r);var t=Nv(r),e=0,n=0,i=0,a=0;return t.map(function(s){var o=s.slice(1).map(Number),A=s[0],l=A.toUpperCase();if(A==="M")return e=o[0],n=o[1],i=e,a=n,["M",e,n];var c;if(A!==l)switch(l){case"A":c=[l,o[0],o[1],o[2],o[3],o[4],o[5]+e,o[6]+n];break;case"V":c=[l,o[0]+n];break;case"H":c=[l,o[0]+e];break;default:{var u=o.map(function(d,f){return d+(f%2?n:e)});c=[l].concat(u)}}else c=[l].concat(o);var h=c.length;switch(l){case"Z":e=i,n=a;break;case"H":e=c[1];break;case"V":n=c[1];break;default:e=c[h-2],n=c[h-1],l==="M"&&(i=e,a=n)}return c})}function Qv(r,t){var e=r[0],n=t.x1,i=t.y1,a=t.x2,s=t.y2,o=r.slice(1).map(Number),A=r;if("TQ".includes(e)||(t.qx=null,t.qy=null),e==="H")A=["L",r[1],i];else if(e==="V")A=["L",n,r[1]];else if(e==="S"){var l=n*2-a,c=i*2-s;t.x1=l,t.y1=c,A=["C",l,c].concat(o)}else if(e==="T"){var u=n*2-t.qx,h=i*2-t.qy;t.qx=u,t.qy=h,A=["Q",u,h].concat(o)}else if(e==="Q"){var d=o[0],f=o[1];t.qx=d,t.qy=f}return A}function ql(r){if(rd(r))return[].concat(r);for(var t=kv(r),e=(0,z.pi)({},id),n=0;n<t.length;n+=1){t[n]=Qv(t[n],e);var i=t[n],a=i.length;e.x1=+i[a-2],e.y1=+i[a-1],e.x2=+i[a-4]||e.x1,e.y2=+i[a-3]||e.y1}return t}function Rs(r,t,e){var n=r[0],i=r[1],a=t[0],s=t[1];return[n+(a-n)*e,i+(s-i)*e]}function Yo(r,t,e,n,i){var a=Li([r,t],[e,n]),s={x:0,y:0};if(typeof i=="number")if(i<=0)s={x:r,y:t};else if(i>=a)s={x:e,y:n};else{var o=Rs([r,t],[e,n],i/a),A=o[0],l=o[1];s={x:A,y:l}}return{length:a,point:s,min:{x:Math.min(r,e),y:Math.min(t,n)},max:{x:Math.max(r,e),y:Math.max(t,n)}}}function od(r,t){var e=r.x,n=r.y,i=t.x,a=t.y,s=e*i+n*a,o=Math.sqrt((Math.pow(e,2)+Math.pow(n,2))*(Math.pow(i,2)+Math.pow(a,2))),A=e*a-n*i<0?-1:1,l=A*Math.acos(s/o);return l}function Uv(r,t,e,n,i,a,s,o,A,l){var c=Math.abs,u=Math.sin,h=Math.cos,d=Math.sqrt,f=Math.PI,g=c(e),v=c(n),m=(i%360+360)%360,w=m*(f/180);if(r===o&&t===A)return{x:r,y:t};if(g===0||v===0)return Yo(r,t,o,A,l).point;var C=(r-o)/2,F=(t-A)/2,Q={x:h(w)*C+u(w)*F,y:-u(w)*C+h(w)*F},D=Math.pow(Q.x,2)/Math.pow(g,2)+Math.pow(Q.y,2)/Math.pow(v,2);D>1&&(g*=d(D),v*=d(D));var K=Math.pow(g,2)*Math.pow(v,2)-Math.pow(g,2)*Math.pow(Q.y,2)-Math.pow(v,2)*Math.pow(Q.x,2),G=Math.pow(g,2)*Math.pow(Q.y,2)+Math.pow(v,2)*Math.pow(Q.x,2),J=K/G;J=J<0?0:J;var $=(a!==s?1:-1)*d(J),at={x:$*(g*Q.y/v),y:$*(-(v*Q.x)/g)},At={x:h(w)*at.x-u(w)*at.y+(r+o)/2,y:u(w)*at.x+h(w)*at.y+(t+A)/2},pt={x:(Q.x-at.x)/g,y:(Q.y-at.y)/v},wt=od({x:1,y:0},pt),bt={x:(-Q.x-at.x)/g,y:(-Q.y-at.y)/v},Rt=od(pt,bt);!s&&Rt>0?Rt-=2*f:s&&Rt<0&&(Rt+=2*f),Rt%=2*f;var Pt=wt+Rt*l,xt=g*h(Pt),Ft=v*u(Pt),_t={x:h(w)*xt-u(w)*Ft+At.x,y:u(w)*xt+h(w)*Ft+At.y};return _t}function Pv(r,t,e,n,i,a,s,o,A,l,c){var u,h=c.bbox,d=h===void 0?!0:h,f=c.length,g=f===void 0?!0:f,v=c.sampleSize,m=v===void 0?30:v,w=typeof l=="number",C=r,F=t,Q=0,D=[C,F,Q],K=[C,F],G=0,J={x:0,y:0},$=[{x:C,y:F}];w&&l<=0&&(J={x:C,y:F});for(var at=0;at<=m;at+=1){if(G=at/m,u=Uv(r,t,e,n,i,a,s,o,A,G),C=u.x,F=u.y,d&&$.push({x:C,y:F}),g&&(Q+=Li(K,[C,F])),K=[C,F],w&&Q>=l&&l>D[2]){var At=(Q-l)/(Q-D[2]);J={x:K[0]*(1-At)+D[0]*At,y:K[1]*(1-At)+D[1]*At}}D=[C,F,Q]}return w&&l>=Q&&(J={x:o,y:A}),{length:Q,point:J,min:{x:Math.min.apply(null,$.map(function(pt){return pt.x})),y:Math.min.apply(null,$.map(function(pt){return pt.y}))},max:{x:Math.max.apply(null,$.map(function(pt){return pt.x})),y:Math.max.apply(null,$.map(function(pt){return pt.y}))}}}function Dv(r,t,e,n,i,a,s,o,A){var l=1-A;return{x:Math.pow(l,3)*r+3*Math.pow(l,2)*A*e+3*l*Math.pow(A,2)*i+Math.pow(A,3)*s,y:Math.pow(l,3)*t+3*Math.pow(l,2)*A*n+3*l*Math.pow(A,2)*a+Math.pow(A,3)*o}}function Ad(r,t,e,n,i,a,s,o,A,l){var c,u=l.bbox,h=u===void 0?!0:u,d=l.length,f=d===void 0?!0:d,g=l.sampleSize,v=g===void 0?10:g,m=typeof A=="number",w=r,C=t,F=0,Q=[w,C,F],D=[w,C],K=0,G={x:0,y:0},J=[{x:w,y:C}];m&&A<=0&&(G={x:w,y:C});for(var $=0;$<=v;$+=1){if(K=$/v,c=Dv(r,t,e,n,i,a,s,o,K),w=c.x,C=c.y,h&&J.push({x:w,y:C}),f&&(F+=Li(D,[w,C])),D=[w,C],m&&F>=A&&A>Q[2]){var at=(F-A)/(F-Q[2]);G={x:D[0]*(1-at)+Q[0]*at,y:D[1]*(1-at)+Q[1]*at}}Q=[w,C,F]}return m&&A>=F&&(G={x:s,y:o}),{length:F,point:G,min:{x:Math.min.apply(null,J.map(function(At){return At.x})),y:Math.min.apply(null,J.map(function(At){return At.y}))},max:{x:Math.max.apply(null,J.map(function(At){return At.x})),y:Math.max.apply(null,J.map(function(At){return At.y}))}}}function Rv(r,t,e,n,i,a,s){var o=1-s;return{x:Math.pow(o,2)*r+2*o*s*e+Math.pow(s,2)*i,y:Math.pow(o,2)*t+2*o*s*n+Math.pow(s,2)*a}}function _v(r,t,e,n,i,a,s,o){var A,l=o.bbox,c=l===void 0?!0:l,u=o.length,h=u===void 0?!0:u,d=o.sampleSize,f=d===void 0?10:d,g=typeof s=="number",v=r,m=t,w=0,C=[v,m,w],F=[v,m],Q=0,D={x:0,y:0},K=[{x:v,y:m}];g&&s<=0&&(D={x:v,y:m});for(var G=0;G<=f;G+=1){if(Q=G/f,A=Rv(r,t,e,n,i,a,Q),v=A.x,m=A.y,c&&K.push({x:v,y:m}),h&&(w+=Li(F,[v,m])),F=[v,m],g&&w>=s&&s>C[2]){var J=(w-s)/(w-C[2]);D={x:F[0]*(1-J)+C[0]*J,y:F[1]*(1-J)+C[1]*J}}C=[v,m,w]}return g&&s>=w&&(D={x:i,y:a}),{length:w,point:D,min:{x:Math.min.apply(null,K.map(function($){return $.x})),y:Math.min.apply(null,K.map(function($){return $.y}))},max:{x:Math.max.apply(null,K.map(function($){return $.x})),y:Math.max.apply(null,K.map(function($){return $.y}))}}}function ld(r,t,e){for(var n,i,a,s,o,A,l=ql(r),c=typeof t=="number",u,h=[],d,f=0,g=0,v=0,m=0,w,C=[],F=[],Q=0,D={x:0,y:0},K=D,G=D,J=D,$=0,at=0,At=l.length;at<At;at+=1)w=l[at],d=w[0],u=d==="M",h=u?h:[f,g].concat(w.slice(1)),u?(v=w[1],m=w[2],D={x:v,y:m},K=D,Q=0,c&&t<.001&&(J=D)):d==="L"?(n=Yo(h[0],h[1],h[2],h[3],(t||0)-$),Q=n.length,D=n.min,K=n.max,G=n.point):d==="A"?(i=Pv(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],(t||0)-$,e||{}),Q=i.length,D=i.min,K=i.max,G=i.point):d==="C"?(a=Ad(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],(t||0)-$,e||{}),Q=a.length,D=a.min,K=a.max,G=a.point):d==="Q"?(s=_v(h[0],h[1],h[2],h[3],h[4],h[5],(t||0)-$,e||{}),Q=s.length,D=s.min,K=s.max,G=s.point):d==="Z"&&(h=[f,g,v,m],o=Yo(h[0],h[1],h[2],h[3],(t||0)-$),Q=o.length,D=o.min,K=o.max,G=o.point),c&&$<t&&$+Q>=t&&(J=G),F.push(K),C.push(D),$+=Q,A=d!=="Z"?w.slice(-2):[v,m],f=A[0],g=A[1];return c&&t>=$&&(J={x:f,y:g}),{length:$,point:J,min:{x:Math.min.apply(null,C.map(function(pt){return pt.x})),y:Math.min.apply(null,C.map(function(pt){return pt.y}))},max:{x:Math.max.apply(null,F.map(function(pt){return pt.x})),y:Math.max.apply(null,F.map(function(pt){return pt.y}))}}}function Hv(r,t){return ld(r,void 0,(0,z.pi)((0,z.pi)({},t),{bbox:!1,length:!0})).length}function Ni(r){return Array.isArray(r)}var $l=function(r){if(Ni(r))return r.reduce(function(t,e){return Math.min(t,e)},r[0])};function tc(r){if(!Array.isArray(r))return-1/0;var t=r.length;if(!t)return-1/0;for(var e=r[0],n=1;n<t;n++)e=Math.max(e,r[n]);return e}var cd=1e-5;function Xo(r,t,e){return e===void 0&&(e=cd),r===t||Math.abs(r-t)<e}var Gv=function(r,t){return(r%t+t)%t},ud=Gv;function YA(r,t,e){if(r[e].length>7){r[e].shift();for(var n=r[e],i=e;n.length;)t[e]="A",r.splice(i+=1,0,["C"].concat(n.splice(0,6)));r.splice(e,1)}}function Kv(r){return rd(r)&&r.every(function(t){var e=t[0];return"MC".includes(e)})}function ec(r,t,e){var n=r*Math.cos(e)-t*Math.sin(e),i=r*Math.sin(e)+t*Math.cos(e);return{x:n,y:i}}function nc(r,t,e,n,i,a,s,o,A,l){var c=r,u=t,h=e,d=n,f=o,g=A,v=Math.PI*120/180,m=Math.PI/180*(+i||0),w=[],C,F,Q,D,K;if(l)F=l[0],Q=l[1],D=l[2],K=l[3];else{C=ec(c,u,-m),c=C.x,u=C.y,C=ec(f,g,-m),f=C.x,g=C.y;var G=(c-f)/2,J=(u-g)/2,$=G*G/(h*h)+J*J/(d*d);$>1&&($=Math.sqrt($),h*=$,d*=$);var at=h*h,At=d*d,pt=(a===s?-1:1)*Math.sqrt(Math.abs((at*At-at*J*J-At*G*G)/(at*J*J+At*G*G)));D=pt*h*J/d+(c+f)/2,K=pt*-d*G/h+(u+g)/2,F=Math.asin(((u-K)/d*Math.pow(10,9)>>0)/Math.pow(10,9)),Q=Math.asin(((g-K)/d*Math.pow(10,9)>>0)/Math.pow(10,9)),F=c<D?Math.PI-F:F,Q=f<D?Math.PI-Q:Q,F<0&&(F=Math.PI*2+F),Q<0&&(Q=Math.PI*2+Q),s&&F>Q&&(F-=Math.PI*2),!s&&Q>F&&(Q-=Math.PI*2)}var wt=Q-F;if(Math.abs(wt)>v){var bt=Q,Rt=f,Pt=g;Q=F+v*(s&&Q>F?1:-1),f=D+h*Math.cos(Q),g=K+d*Math.sin(Q),w=nc(f,g,h,d,i,0,s,Rt,Pt,[Q,bt,D,K])}wt=Q-F;var xt=Math.cos(F),Ft=Math.sin(F),_t=Math.cos(Q),Xt=Math.sin(Q),ie=Math.tan(wt/4),le=4/3*h*ie,ve=4/3*d*ie,xe=[c,u],Qe=[c+le*Ft,u-ve*xt],Re=[f+le*Xt,g-ve*_t],nn=[f,g];if(Qe[0]=2*xe[0]-Qe[0],Qe[1]=2*xe[1]-Qe[1],l)return Qe.concat(Re,nn,w);w=Qe.concat(Re,nn,w);for(var mn=[],sn=0,er=w.length;sn<er;sn+=1)mn[sn]=sn%2?ec(w[sn-1],w[sn],m).y:ec(w[sn],w[sn+1],m).x;return mn}function zv(r,t,e,n,i,a){var s=.3333333333333333,o=2/3;return[s*r+o*e,s*t+o*n,s*i+o*e,s*a+o*n,i,a]}var hd=function(r,t,e,n){var i=.5,a=Rs([r,t],[e,n],i);return(0,z.ev)((0,z.ev)([],a,!0),[e,n,e,n],!1)};function Vv(r,t){var e=r[0],n=r.slice(1).map(Number),i=n[0],a=n[1],s,o=t.x1,A=t.y1,l=t.x,c=t.y;switch("TQ".includes(e)||(t.qx=null,t.qy=null),e){case"M":return t.x=i,t.y=a,r;case"A":return s=[o,A].concat(n),["C"].concat(nc(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return t.qx=i,t.qy=a,s=[o,A].concat(n),["C"].concat(zv(s[0],s[1],s[2],s[3],s[4],s[5]));case"L":return["C"].concat(hd(o,A,i,a));case"Z":return o===l&&A===c?["C",o,A,l,c,l,c]:["C"].concat(hd(o,A,l,c));default:}return r}function Cu(r,t){if(t===void 0&&(t=!1),Kv(r)){var e=[].concat(r);return t?[e,[]]:e}for(var n=ql(r),i=(0,z.pi)({},id),a=[],s="",o=n.length,A,l,c=[],u=0;u<o;u+=1){n[u]&&(s=n[u][0]),a[u]=s;var h=Vv(n[u],i);n[u]=h,YA(n,a,u),o=n.length,s==="Z"&&c.push(u),A=n[u],l=A.length,i.x1=+A[l-2],i.y1=+A[l-1],i.x2=+A[l-4]||i.x1,i.y2=+A[l-3]||i.y1}return t?[n,c]:n}var Wv=50;function Zv(r,t){t===void 0&&(t=.5);var e=r.slice(0,2),n=r.slice(2,4),i=r.slice(4,6),a=r.slice(6,8),s=Rs(e,n,t),o=Rs(n,i,t),A=Rs(i,a,t),l=Rs(s,o,t),c=Rs(o,A,t),u=Rs(l,c,t);return[["C"].concat(s,l,u),["C"].concat(c,A,a)]}function dd(r){return r.map(function(t,e,n){var i=e&&n[e-1].slice(-2).concat(t.slice(1)),a=e?Ad(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,s;return e?s=a?Zv(i):[t,t]:s=[t],{s:t,ss:s,l:a}})}function fd(r,t,e,n){if(n===void 0&&(n=0),n>Wv)return console.warn("Maximum recursion depth reached in equalizeSegments"),[r,t];var i=dd(r),a=dd(t),s=i.length,o=a.length,A=i.filter(function(m){return m.l}).length,l=a.filter(function(m){return m.l}).length,c=i.filter(function(m){return m.l}).reduce(function(m,w){var C=w.l;return m+C},0)/A||0,u=a.filter(function(m){return m.l}).reduce(function(m,w){var C=w.l;return m+C},0)/l||0,h=e||Math.max(s,o),d=[c,u],f=[h-s,h-o],g=0,v=[i,a].map(function(m,w){return m.l===h?m.map(function(C){return C.s}):m.map(function(C,F){return g=F&&f[w]&&C.l>=d[w],f[w]-=g?1:0,g?C.ss:[C.s]}).flat()});return v[0].length===v[1].length?v:fd(v[0],v[1],h,n+1)}function Ur(r,t,e,n,i,a,s,o){return 3*((o-t)*(e+i)-(s-r)*(n+a)+n*(r-i)-e*(t-a)+o*(i+r/3)-s*(a+t/3))/20}function jv(r){var t=0,e=0,n=0;return Cu(r).map(function(i){var a;switch(i[0]){case"M":return t=i[1],e=i[2],0;default:var s=i.slice(1),o=s[0],A=s[1],l=s[2],c=s[3],u=s[4],h=s[5];return n=Ur(t,e,o,A,l,c,u,h),a=i.slice(-2),t=a[0],e=a[1],n}}).reduce(function(i,a){return i+a},0)}function gd(r){return jv(r)>=0}function Yv(r){var t=r.slice(1).map(function(e,n,i){return n?i[n-1].slice(-2).concat(e.slice(1)):r[0].slice(1).concat(e.slice(1))}).map(function(e){return e.map(function(n,i){return e[e.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(t[0].slice(0,2))].concat(t.map(function(e){return["C"].concat(e.slice(2))}))}function Xv(r){return r.map(function(t){return Array.isArray(t)?[].concat(t):t})}function Jv(r){var t=r.length,e=t-1;return r.map(function(n,i){return r.map(function(a,s){var o=i+s,A;return s===0||r[o]&&r[o][0]==="M"?(A=r[o],["M"].concat(A.slice(-2))):(o>=t&&(o-=e),r[o])})})}function vd(r,t){var e=r.length-1,n=[],i=0,a=0,s=Jv(r);return s.forEach(function(o,A){r.slice(1).forEach(function(l,c){a+=Li(r[(A+c)%e].slice(-2),t[c%e].slice(-2))}),n[A]=a,a=0}),i=n.indexOf(Math.min.apply(null,n)),s[i]}var qv=function(r){return r===void 0},Ye=qv,$v={}.toString,tp=function(r,t){return $v.call(r)==="[object "+t+"]"},pd=tp,ep=function(r){return pd(r,"Boolean")},Jo=ep;function Wt(r){return typeof r=="function"}var Br=function(r){var t=typeof r;return r!==null&&t==="object"||t==="function"};function np(r,t,e){return ld(r,t,(0,z.pi)((0,z.pi)({},e),{bbox:!1,length:!0})).point}var we=M(20068),Ba=M(58289);function rp(r,t){for(;!{}.hasOwnProperty.call(r,t)&&(r=(0,Ba.Z)(r))!==null;);return r}function rc(){return rc=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,t,e){var n=rp(r,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?r:e):i.value}},rc.apply(null,arguments)}function _s(r,t,e,n){var i=rc((0,Ba.Z)(1&n?r.prototype:r),t,e);return 2&n&&typeof i=="function"?function(a){return i.apply(e,a)}:i}var ic=M(97047);function gi(r,t,e,n){var i=r-e,a=t-n;return Math.sqrt(i*i+a*a)}function ac(r,t){var e=Math.min.apply(Math,(0,N.Z)(r)),n=Math.min.apply(Math,(0,N.Z)(t)),i=Math.max.apply(Math,(0,N.Z)(r)),a=Math.max.apply(Math,(0,N.Z)(t));return{x:e,y:n,width:i-e,height:a-n}}function md(r){return(r+Math.PI*2)%(Math.PI*2)}function Hs(r,t){var e=Math.abs(r);return t>0?e:e*-1}function Su(r,t,e,n,i,a){var s=e,o=n;if(s===0||o===0)return{x:r,y:t};for(var A=i-r,l=a-t,c=Math.abs(A),u=Math.abs(l),h=s*s,d=o*o,f=Math.PI/4,g=0,v=0,m=0;m<4;m++){g=s*Math.cos(f),v=o*Math.sin(f);var w=(h-d)*Math.pow(Math.cos(f),3)/s,C=(d-h)*Math.pow(Math.sin(f),3)/o,F=g-w,Q=v-C,D=c-w,K=u-C,G=Math.hypot(Q,F),J=Math.hypot(K,D),$=G*Math.asin((F*K-Q*D)/(G*J)),at=$/Math.sqrt(h+d-g*g-v*v);f+=at,f=Math.min(Math.PI/2,Math.max(0,f))}return{x:r+Hs(g,A),y:t+Hs(v,l)}}function Mu(r,t,e,n,i,a,s,o){return-1*e*Math.cos(i)*Math.sin(o)-n*Math.sin(i)*Math.cos(o)}function ip(r,t,e,n,i,a,s,o){return-1*e*Math.sin(i)*Math.sin(o)+n*Math.cos(i)*Math.cos(o)}function yd(r,t,e){return Math.atan(-t/r*Math.tan(e))}function ap(r,t,e){return Math.atan(t/(r*Math.tan(e)))}function Tu(r,t,e,n,i,a){return e*Math.cos(i)*Math.cos(a)-n*Math.sin(i)*Math.sin(a)+r}function sp(r,t,e,n,i,a){return e*Math.sin(i)*Math.cos(a)+n*Math.cos(i)*Math.sin(a)+t}function op(r,t,e,n){var i=Math.atan2(n*r,e*t);return(i+Math.PI*2)%(Math.PI*2)}function wd(r,t,e){return{x:r*Math.cos(e),y:t*Math.sin(e)}}function Ed(r,t,e){var n=Math.cos(e),i=Math.sin(e);return[r*n-t*i,r*i+t*n]}function Ap(r,t,e,n,i,a,s){for(var o=yd(e,n,i),A=1/0,l=-1/0,c=[a,s],u=-Math.PI*2;u<=Math.PI*2;u+=Math.PI){var h=o+u;a<s?a<h&&h<s&&c.push(h):s<h&&h<a&&c.push(h)}for(var d=0;d<c.length;d++){var f=Tu(r,t,e,n,i,c[d]);f<A&&(A=f),f>l&&(l=f)}for(var g=ap(e,n,i),v=1/0,m=-1/0,w=[a,s],C=-Math.PI*2;C<=Math.PI*2;C+=Math.PI){var F=g+C;a<s?a<F&&F<s&&w.push(F):s<F&&F<a&&w.push(F)}for(var Q=0;Q<w.length;Q++){var D=sp(r,t,e,n,i,w[Q]);D<v&&(v=D),D>m&&(m=D)}return{x:A,y:v,width:l-A,height:m-v}}function Kw(r,t,e,n,i,a,s,o,A){var l=Ed(o-r,A-t,-i),c=_slicedToArray(l,2),u=c[0],h=c[1],d=Su(0,0,e,n,u,h),f=op(e,n,d.x,d.y);f<a?d=wd(e,n,a):f>s&&(d=wd(e,n,s));var g=Ed(d.x,d.y,i);return{x:g[0]+r,y:g[1]+t}}function zw(r,t,e,n,i,a,s,o){var A=(s-a)*o+a,l=Mu(r,t,e,n,i,a,s,A),c=ip(r,t,e,n,i,a,s,A);return md(Math.atan2(c,l))}var lp=1e-4;function Fu(r,t,e,n,i,a){var s=-1,o=1/0,A=[e,n],l=20;a&&a>200&&(l=a/10);for(var c=1/l,u=c/10,h=0;h<=l;h++){var d=h*c,f=[i.apply(void 0,(0,N.Z)(r.concat([d]))),i.apply(void 0,(0,N.Z)(t.concat([d])))],g=gi(A[0],A[1],f[0],f[1]);g<o&&(s=d,o=g)}if(s===0)return{x:r[0],y:t[0]};if(s===1){var v=r.length;return{x:r[v-1],y:t[v-1]}}o=1/0;for(var m=0;m<32&&!(u<lp);m++){var w=s-u,C=s+u,F=[i.apply(void 0,(0,N.Z)(r.concat([w]))),i.apply(void 0,(0,N.Z)(t.concat([w])))],Q=gi(A[0],A[1],F[0],F[1]);if(w>=0&&Q<o)s=w,o=Q;else{var D=[i.apply(void 0,(0,N.Z)(r.concat([C]))),i.apply(void 0,(0,N.Z)(t.concat([C])))],K=gi(A[0],A[1],D[0],D[1]);C<=1&&K<o?(s=C,o=K):u*=.5}}return{x:i.apply(void 0,(0,N.Z)(r.concat([s]))),y:i.apply(void 0,(0,N.Z)(t.concat([s])))}}function cp(r,t){for(var e=0,n=r.length,i=0;i<n;i++){var a=r[i],s=t[i],o=r[(i+1)%n],A=t[(i+1)%n];e+=gi(a,s,o,A)}return e/2}function Vw(r,t,e,n){return ac([r,e],[t,n])}function Bd(r,t,e,n){return gi(r,t,e,n)}function ba(r,t,e,n,i){return{x:(1-i)*r+i*e,y:(1-i)*t+i*n}}function up(r,t,e,n,i,a){var s=(e-r)*(i-r)+(n-t)*(a-t);if(s<0)return gi(r,t,i,a);var o=(e-r)*(e-r)+(n-t)*(n-t);return s>o?gi(e,n,i,a):XA(r,t,e,n,i,a)}function XA(r,t,e,n,i,a){var s=[e-r,n-t];if(Mv(s,[0,0]))return Math.sqrt((i-r)*(i-r)+(a-t)*(a-t));var o=[-s[1],s[0]];Cv(o,o);var A=[i-r,a-t];return Math.abs(wu(A,o))}function Ww(r,t,e,n){return Math.atan2(n-t,e-r)}function As(r,t,e,n,i){var a=1-i;return a*a*a*r+3*t*i*a*a+3*e*i*i*a+n*i*i*i}function sc(r,t,e,n,i){var a=1-i;return 3*(a*a*(t-r)+2*a*i*(e-t)+i*i*(n-e))}function Ou(r,t,e,n){var i=-3*r+9*t-9*e+3*n,a=6*r-12*t+6*e,s=3*t-3*r,o=[],A,l,c;if(Xo(i,0))Xo(a,0)||(A=-s/a,A>=0&&A<=1&&o.push(A));else{var u=a*a-4*i*s;Xo(u,0)?o.push(-a/(2*i)):u>0&&(c=Math.sqrt(u),A=(-a+c)/(2*i),l=(-a-c)/(2*i),A>=0&&A<=1&&o.push(A),l>=0&&l<=1&&o.push(l))}return o}function bd(r,t,e,n,i,a,s,o,A){var l=As(r,e,i,s,A),c=As(t,n,a,o,A),u=ba(r,t,e,n,A),h=ba(e,n,i,a,A),d=ba(i,a,s,o,A),f=ba(u.x,u.y,h.x,h.y,A),g=ba(h.x,h.y,d.x,d.y,A);return[[r,t,u.x,u.y,f.x,f.y,l,c],[l,c,g.x,g.y,d.x,d.y,s,o]]}function Iu(r,t,e,n,i,a,s,o,A){if(A===0)return cp([r,e,i,s],[t,n,a,o]);var l=bd(r,t,e,n,i,a,s,o,.5),c=[].concat(_toConsumableArray(l[0]),[A-1]),u=[].concat(_toConsumableArray(l[1]),[A-1]);return Iu.apply(void 0,_toConsumableArray(c))+Iu.apply(void 0,_toConsumableArray(u))}function xd(r,t,e,n,i,a,s,o){for(var A=[r,s],l=[t,o],c=Ou(r,e,i,s),u=Ou(t,n,a,o),h=0;h<c.length;h++)A.push(As(r,e,i,s,c[h]));for(var d=0;d<u.length;d++)l.push(As(t,n,a,o,u[d]));return ac(A,l)}function Cd(r,t,e,n,i,a,s,o){return Iu(r,t,e,n,i,a,s,o,3)}function Lu(r,t,e,n,i,a,s,o,A,l,c){return Fu([r,e,i,s],[t,n,a,o],A,l,As,c)}function Nu(r,t,e,n,i,a,s,o,A,l,c){var u=Lu(r,t,e,n,i,a,s,o,A,l,c);return gi(u.x,u.y,A,l)}function hp(r,t,e,n,i,a,s,o,A){return{x:As(r,e,i,s,A),y:As(t,n,a,o,A)}}function dp(r,t,e,n,i,a,s,o,A){var l=sc(r,e,i,s,A),c=sc(t,n,a,o,A);return md(Math.atan2(c,l))}function ku(r){for(var t=0,e=[],n=0;n<r.length-1;n++){var i=r[n],a=r[n+1],s=gi(i[0],i[1],a[0],a[1]),o={from:i,to:a,length:s};e.push(o),t+=s}return{segments:e,totalLength:t}}function oc(r){if(r.length<2)return 0;for(var t=0,e=0;e<r.length-1;e++){var n=r[e],i=r[e+1];t+=gi(n[0],n[1],i[0],i[1])}return t}function Sd(r,t){if(t>1||t<0||r.length<2)return null;var e=ku(r),n=e.segments,i=e.totalLength;if(i===0)return{x:r[0][0],y:r[0][1]};for(var a=0,s=null,o=0;o<n.length;o++){var A=n[o],l=A.from,c=A.to,u=A.length/i;if(t>=a&&t<=a+u){var h=(t-a)/u;s=ba(l[0],l[1],c[0],c[1],h);break}a+=u}return s}function Md(r,t){if(t>1||t<0||r.length<2)return 0;for(var e=ku(r),n=e.segments,i=e.totalLength,a=0,s=0,o=0;o<n.length;o++){var A=n[o],l=A.from,c=A.to,u=A.length/i;if(t>=a&&t<=a+u){s=Math.atan2(c[1]-l[1],c[0]-l[0]);break}a+=u}return s}function Td(r,t,e){for(var n=1/0,i=0;i<r.length-1;i++){var a=r[i],s=r[i+1],o=up(a[0],a[1],s[0],s[1],t,e);o<n&&(n=o)}return n}function Aa(r){for(var t=[],e=[],n=0;n<r.length;n++){var i=r[n];t.push(i[0]),e.push(i[1])}return ac(t,e)}function Qu(r){return oc(r)}function Zw(r,t){return Sd(r,t)}function jw(r,t,e){return Td(r,t,e)}function Yw(r,t){return Md(r,t)}function Ac(r){var t=r.slice(0);return r.length&&t.push(r[0]),t}function Xw(r){return Aa(r)}function Jw(r){return oc(Ac(r))}function qw(r,t){return Sd(Ac(r),t)}function $w(r,t,e){return Td(Ac(r),t,e)}function tE(r,t){return Md(Ac(r),t)}function qo(r,t,e,n){var i=1-n;return i*i*r+2*n*i*t+n*n*e}function Fd(r,t,e){var n=r+e-2*t;if(Xo(n,0))return[.5];var i=(r-t)/n;return i<=1&&i>=0?[i]:[]}function Uu(r,t,e,n,i,a,s){var o=qo(r,e,i,s),A=qo(t,n,a,s),l=ba(r,t,e,n,s),c=ba(e,n,i,a,s);return[[r,t,l.x,l.y,o,A],[o,A,c.x,c.y,i,a]]}function lc(r,t,e,n,i,a,s){if(s===0)return(gi(r,t,e,n)+gi(e,n,i,a)+gi(r,t,i,a))/2;var o=Uu(r,t,e,n,i,a,.5),A=o[0],l=o[1];return A.push(s-1),l.push(s-1),lc.apply(void 0,_toConsumableArray(A))+lc.apply(void 0,_toConsumableArray(l))}function ni(r,t,e,n,i,a){var s=Fd(r,e,i)[0],o=Fd(t,n,a)[0],A=[r,i],l=[t,a];return s!==void 0&&A.push(qo(r,e,i,s)),o!==void 0&&l.push(qo(t,n,a,o)),ac(A,l)}function cc(r,t,e,n,i,a){return lc(r,t,e,n,i,a,3)}function fp(r,t,e,n,i,a,s,o){return Fu([r,e,i],[t,n,a],s,o,qo)}function gp(r,t,e,n,i,a,s,o){var A=fp(r,t,e,n,i,a,s,o);return gi(A.x,A.y,s,o)}var ri=M(75044),Wa=M(3202),Gs=M(19251),Za=M(75931);var Vt=function(r){return r.GROUP="g",r.FRAGMENT="fragment",r.CIRCLE="circle",r.ELLIPSE="ellipse",r.IMAGE="image",r.RECT="rect",r.LINE="line",r.POLYLINE="polyline",r.POLYGON="polygon",r.TEXT="text",r.PATH="path",r.HTML="html",r.MESH="mesh",r}({}),uc=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),ls=function(){function r(){(0,L.Z)(this,r),this.plugins=[]}return(0,I.Z)(r,[{key:"addRenderingPlugin",value:function(e){this.plugins.push(e),this.context.renderingPlugins.push(e)}},{key:"removeAllRenderingPlugins",value:function(){var e=this;this.plugins.forEach(function(n){var i=e.context.renderingPlugins.indexOf(n);i>=0&&e.context.renderingPlugins.splice(i,1)})}}])}(),vp=function(){function r(t){(0,L.Z)(this,r),this.clipSpaceNearZ=uc.NEGATIVE_ONE,this.plugins=[],this.config=(0,H.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)}return(0,I.Z)(r,[{key:"registerPlugin",value:function(e){var n=this.plugins.findIndex(function(i){return i===e});n===-1&&this.plugins.push(e)}},{key:"unregisterPlugin",value:function(e){var n=this.plugins.findIndex(function(i){return i===e});n>-1&&this.plugins.splice(n,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(e){return this.plugins.find(function(n){return n.name===e})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(e){Object.assign(this.config,e)}}])}(),Pu=ue,$o=re,Od=is,Id=Vi,Du=Ht,hc=ss,jn=function(){function r(){(0,L.Z)(this,r),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,I.Z)(r,[{key:"update",value:function(e,n){$o(this.center,e),$o(this.halfExtents,n),hc(this.min,this.center,this.halfExtents),Pu(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,n){Pu(this.center,n,e),Du(this.center,this.center,.5),hc(this.halfExtents,n,e),Du(this.halfExtents,this.halfExtents,.5),$o(this.min,e),$o(this.max,n)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(e){if(!r.isEmpty(e)){if(r.isEmpty(this)){this.setMinMax(e.getMin(),e.getMax());return}var n=this.center,i=n[0],a=n[1],s=n[2],o=this.halfExtents,A=o[0],l=o[1],c=o[2],u=i-A,h=i+A,d=a-l,f=a+l,g=s-c,v=s+c,m=e.center,w=m[0],C=m[1],F=m[2],Q=e.halfExtents,D=Q[0],K=Q[1],G=Q[2],J=w-D,$=w+D,at=C-K,At=C+K,pt=F-G,wt=F+G;J<u&&(u=J),$>h&&(h=$),at<d&&(d=at),At>f&&(f=At),pt<g&&(g=pt),wt>v&&(v=wt),n[0]=(u+h)*.5,n[1]=(d+f)*.5,n[2]=(g+v)*.5,o[0]=(h-u)*.5,o[1]=(f-d)*.5,o[2]=(v-g)*.5,this.min[0]=u,this.min[1]=d,this.min[2]=g,this.max[0]=h,this.max[1]=f,this.max[2]=v}}},{key:"setFromTransformedAABB",value:function(e,n){var i=this.center,a=this.halfExtents,s=e.center,o=e.halfExtents,A=n[0],l=n[4],c=n[8],u=n[1],h=n[5],d=n[9],f=n[2],g=n[6],v=n[10],m=Math.abs(A),w=Math.abs(l),C=Math.abs(c),F=Math.abs(u),Q=Math.abs(h),D=Math.abs(d),K=Math.abs(f),G=Math.abs(g),J=Math.abs(v);i[0]=n[12]+A*s[0]+l*s[1]+c*s[2],i[1]=n[13]+u*s[0]+h*s[1]+d*s[2],i[2]=n[14]+f*s[0]+g*s[1]+v*s[2],a[0]=m*o[0]+w*o[1]+C*o[2],a[1]=F*o[0]+Q*o[1]+D*o[2],a[2]=K*o[0]+G*o[1]+J*o[2],hc(this.min,i,a),Pu(this.max,i,a)}},{key:"intersects",value:function(e){var n=this.getMax(),i=this.getMin(),a=e.getMax(),s=e.getMin();return i[0]<=a[0]&&n[0]>=s[0]&&i[1]<=a[1]&&n[1]>=s[1]&&i[2]<=a[2]&&n[2]>=s[2]}},{key:"intersection",value:function(e){if(!this.intersects(e))return null;var n=new r,i=Od([0,0,0],this.getMin(),e.getMin()),a=Id([0,0,0],this.getMax(),e.getMax());return n.setMinMax(i,a),n}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?$o([0,0,0],this.min):e.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:e.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(e){return e.pnVertexFlag===273?$o([0,0,0],this.max):e.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:e.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:e.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:e.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:e.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:e.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(e){return!e||e.halfExtents[0]===0&&e.halfExtents[1]===0&&e.halfExtents[2]===0}}])}(),pp=function(){function r(t,e){(0,L.Z)(this,r),this.distance=t||0,this.normal=e||Gt(0,1,0),this.updatePNVertexFlag()}return(0,I.Z)(r,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(e){return _e(e,this.normal)-this.distance}},{key:"normalize",value:function(){var e=1/aa(this.normal);Ht(this.normal,this.normal,e),this.distance*=e}},{key:"intersectsLine",value:function(e,n,i){var a=this.distanceToPoint(e),s=this.distanceToPoint(n),o=a/(a-s),A=o>=0&&o<=1;return A&&i&&rn(i,e,n,o),A}}])}(),tA=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),mp=function(){function r(t){if((0,L.Z)(this,r),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new pp)}return(0,I.Z)(r,[{key:"extractFromVPMatrix",value:function(e){var n=(0,U.Z)(e,16),i=n[0],a=n[1],s=n[2],o=n[3],A=n[4],l=n[5],c=n[6],u=n[7],h=n[8],d=n[9],f=n[10],g=n[11],v=n[12],m=n[13],w=n[14],C=n[15];de(this.planes[0].normal,o-i,u-A,g-h),this.planes[0].distance=C-v,de(this.planes[1].normal,o+i,u+A,g+h),this.planes[1].distance=C+v,de(this.planes[2].normal,o+a,u+l,g+d),this.planes[2].distance=C+m,de(this.planes[3].normal,o-a,u-l,g-d),this.planes[3].distance=C-m,de(this.planes[4].normal,o-s,u-c,g-f),this.planes[4].distance=C-w,de(this.planes[5].normal,o+s,u+c,g+f),this.planes[5].distance=C+w,this.planes.forEach(function(F){F.normalize(),F.updatePNVertexFlag()})}}])}(),ii=function(){function r(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(0,L.Z)(this,r),this.x=0,this.y=0,this.x=t,this.y=e}return(0,I.Z)(r,[{key:"clone",value:function(){return new r(this.x,this.y)}},{key:"copyFrom",value:function(e){this.x=e.x,this.y=e.y}}])}(),cs=function(){function r(t,e,n,i){(0,L.Z)(this,r),this.x=t,this.y=e,this.width=n,this.height=i,this.left=t,this.right=t+n,this.top=e,this.bottom=e+i}return(0,I.Z)(r,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(e){return new r(e.x,e.y,e.width,e.height)}},{key:"applyTransform",value:function(e,n){var i=ji(e.x,e.y,0,1),a=ji(e.x+e.width,e.y,0,1),s=ji(e.x,e.y+e.height,0,1),o=ji(e.x+e.width,e.y+e.height,0,1),A=or(),l=or(),c=or(),u=or();T(A,i,n),T(l,a,n),T(c,s,n),T(u,o,n);var h=Math.min(A[0],l[0],c[0],u[0]),d=Math.min(A[1],l[1],c[1],u[1]),f=Math.max(A[0],l[0],c[0],u[0]),g=Math.max(A[1],l[1],c[1],u[1]);return r.fromRect({x:h,y:d,width:f-h,height:g-d})}}])}(),On="Method not implemented.",eA="Use document.documentElement instead.",Ld="Cannot append a destroyed element.";function Ks(r){return r===void 0?0:r>360||r<-360?r%360:r}var dc=Ct();function vi(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(r)&&r.length===3?n?Nt(r):re(dc,r):ye(r)?n?Gt(r,t,e):de(dc,r,t,e):n?Gt(r[0],r[1]||t,r[2]||e):de(dc,r[0],r[1]||t,r[2]||e)}var Nd=Math.PI/180;function Un(r){return r*Nd}var fc=180/Math.PI;function Bi(r){return r*fc}var kd=.9;function eE(r){return r%=400,r<0&&(r+=400),r*kd}function nE(r){return r/360}function Qd(r){return 360*r}var us=Math.PI/2;function Ru(r,t){var e=t[0],n=t[1],i=t[2],a=t[3],s=e*e,o=n*n,A=i*i,l=a*a,c=s+o+A+l,u=e*a-n*i;return u>.499995*c?(r[0]=us,r[1]=2*Math.atan2(n,e),r[2]=0):u<-.499995*c?(r[0]=-us,r[1]=2*Math.atan2(n,e),r[2]=0):(r[0]=Math.asin(2*(e*i-a*n)),r[1]=Math.atan2(2*(e*a+n*i),1-2*(A+l)),r[2]=Math.atan2(2*(e*n+i*a),1-2*(o+A))),r}function gc(r,t){var e,n,i=ks(Ct(),t),a=(0,U.Z)(i,3),s=a[0],o=a[1],A=a[2],l=Math.asin(-t[2]/s);return l<us?l>-us?(e=Math.atan2(t[6]/o,t[10]/A),n=Math.atan2(t[1]/s,t[0]/s)):(n=0,e=-Math.atan2(t[4]/o,t[5]/o)):(n=0,e=Math.atan2(t[4]/o,t[5]/o)),r[0]=e,r[1]=l,r[2]=n,r}function _u(r,t){return t.length===16?gc(r,t):Ru(r,t)}function yp(r,t,e,n,i){var a=Math.cos(r),s=Math.sin(r);return Wl(n*a,i*s,0,-n*s,i*a,0,t,e,1)}function wp(r,t,e,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,A=2*a,l=e-t,c=n-i,u=A/l,h=A/c,d=(e+t)/l,f=(n+i)/c,g,v,m=s-a,w=s*a;return o?(g=-s/m,v=-w/m):(g=-(s+a)/m,v=-2*w/m),r[0]=u,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=h,r[6]=0,r[7]=0,r[8]=d,r[9]=f,r[10]=g,r[11]=-1,r[12]=0,r[13]=0,r[14]=v,r[15]=0,r}function Ud(r){var t=r[0],e=r[1],n=r[3],i=r[4],a=Math.sqrt(t*t+e*e),s=Math.sqrt(n*n+i*i),o=t*i-e*n;if(o<0&&(t<i?a=-a:s=-s),a){var A=1/a;t*=A,e*=A}if(s){var l=1/s;n*=l,i*=l}var c=Math.atan2(e,t),u=Bi(c);return[r[6],r[7],a,s,u]}var xa=te(),qi=te(),nA=or(),ze=[Ct(),Ct(),Ct()],vc=Ct();function Pd(r,t,e,n,i,a){if(!Dd(xa,r)||(He(qi,xa),qi[3]=0,qi[7]=0,qi[11]=0,qi[15]=1,Math.abs(ee(qi))<1e-8))return!1;var s=xa[3],o=xa[7],A=xa[11],l=xa[12],c=xa[13],u=xa[14],h=xa[15];if(s!==0||o!==0||A!==0){nA[0]=s,nA[1]=o,nA[2]=A,nA[3]=h;var d=on(qi,qi);if(!d)return!1;De(qi,qi),T(i,nA,qi)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=l,t[1]=c,t[2]=u,Ep(ze,xa),e[0]=qt(ze[0]),be(ze[0],ze[0]),n[0]=_e(ze[0],ze[1]),rA(ze[1],ze[1],ze[0],1,-n[0]),e[1]=qt(ze[1]),be(ze[1],ze[1]),n[0]/=e[1],n[1]=_e(ze[0],ze[2]),rA(ze[2],ze[2],ze[0],1,-n[1]),n[2]=_e(ze[1],ze[2]),rA(ze[2],ze[2],ze[1],1,-n[2]),e[2]=qt(ze[2]),be(ze[2],ze[2]),n[1]/=e[2],n[2]/=e[2],Te(vc,ze[1],ze[2]),_e(ze[0],vc)<0)for(var f=0;f<3;f++)e[f]*=-1,ze[f][0]*=-1,ze[f][1]*=-1,ze[f][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+ze[0][0]-ze[1][1]-ze[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-ze[0][0]+ze[1][1]-ze[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-ze[0][0]-ze[1][1]+ze[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+ze[0][0]+ze[1][1]+ze[2][2],0)),ze[2][1]>ze[1][2]&&(a[0]=-a[0]),ze[0][2]>ze[2][0]&&(a[1]=-a[1]),ze[1][0]>ze[0][1]&&(a[2]=-a[2]),!0}function Dd(r,t){var e=t[15];if(e===0)return!1;for(var n=1/e,i=0;i<16;i++)r[i]=t[i]*n;return!0}function Ep(r,t){r[0][0]=t[0],r[0][1]=t[1],r[0][2]=t[2],r[1][0]=t[4],r[1][1]=t[5],r[1][2]=t[6],r[2][0]=t[8],r[2][1]=t[9],r[2][2]=t[10]}function rA(r,t,e,n,i){r[0]=t[0]*n+e[0]*i,r[1]=t[1]*n+e[1]*i,r[2]=t[2]*n+e[2]*i}var In=function(r){return r[r.ORBITING=0]="ORBITING",r[r.EXPLORING=1]="EXPLORING",r[r.TRACKING=2]="TRACKING",r}({}),pc=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),$i=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),Rd={UPDATED:"updated"},Hu=2e-4,Gu=function(){function r(){(0,L.Z)(this,r),this.clipSpaceNearZ=uc.NEGATIVE_ONE,this.eventEmitter=new V,this.matrix=te(),this.right=Gt(1,0,0),this.up=Gt(0,1,0),this.forward=Gt(0,0,1),this.position=Gt(0,0,1),this.focalPoint=Gt(0,0,0),this.distanceVector=Gt(0,0,-1),this.distance=1,this.azimuth=0,this.elevation=0,this.roll=0,this.relAzimuth=0,this.relElevation=0,this.relRoll=0,this.dollyingStep=0,this.maxDistance=1/0,this.minDistance=-1/0,this.zoom=1,this.rotateWorld=!1,this.fov=30,this.near=.1,this.far=1e3,this.aspect=1,this.projectionMatrix=te(),this.projectionMatrixInverse=te(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=In.EXPLORING,this.trackingMode=pc.DEFAULT,this.projectionMode=$i.PERSPECTIVE,this.frustum=new mp,this.orthoMatrix=te()}return(0,I.Z)(r,[{key:"isOrtho",value:function(){return this.projectionMode===$i.ORTHOGRAPHIC}},{key:"getProjectionMode",value:function(){return this.projectionMode}},{key:"getPerspective",value:function(){return this.jitteredProjectionMatrix||this.projectionMatrix}},{key:"getPerspectiveInverse",value:function(){return this.projectionMatrixInverse}},{key:"getFrustum",value:function(){return this.frustum}},{key:"getPosition",value:function(){return this.position}},{key:"getFocalPoint",value:function(){return this.focalPoint}},{key:"getDollyingStep",value:function(){return this.dollyingStep}},{key:"getNear",value:function(){return this.near}},{key:"getFar",value:function(){return this.far}},{key:"getZoom",value:function(){return this.zoom}},{key:"getOrthoMatrix",value:function(){return this.orthoMatrix}},{key:"getView",value:function(){return this.view}},{key:"setEnableUpdate",value:function(e){this.enableUpdate=e}},{key:"setType",value:function(e,n){return this.type=e,this.type===In.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===In.TRACKING&&n!==void 0&&this.setTrackingMode(n),this}},{key:"setProjectionMode",value:function(e){return this.projectionMode=e,this}},{key:"setTrackingMode",value:function(e){if(this.type!==In.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=e,this}},{key:"setWorldRotation",value:function(e){return this.rotateWorld=e,this._getAngles(),this}},{key:"getViewTransform",value:function(){return on(te(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,n){var i=Tr(te(),[e,n,0]);this.jitteredProjectionMatrix=he(te(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(e){return this.matrix=e,this._update(),this}},{key:"setProjectionMatrix",value:function(e){this.projectionMatrix=e}},{key:"setFov",value:function(e){return this.setPerspective(this.near,this.far,e,this.aspect),this}},{key:"setAspect",value:function(e){return this.setPerspective(this.near,this.far,this.fov,e),this}},{key:"setNear",value:function(e){return this.projectionMode===$i.PERSPECTIVE?this.setPerspective(e,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,e,this.far),this}},{key:"setFar",value:function(e){return this.projectionMode===$i.PERSPECTIVE?this.setPerspective(this.near,e,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,e),this}},{key:"setViewOffset",value:function(e,n,i,a,s,o){return this.aspect=e/n,this.view===void 0&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=n,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===$i.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"clearViewOffset",value:function(){return this.view!==void 0&&(this.view.enabled=!1),this.projectionMode===$i.PERSPECTIVE?this.setPerspective(this.near,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far),this}},{key:"setZoom",value:function(e){return this.zoom=e,this.projectionMode===$i.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===$i.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(e,n){var i=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),a=i.x,s=i.y,o=this.roll;this.rotate(0,0,-o),this.setPosition(a,s),this.setFocalPoint(a,s),this.setZoom(e),this.rotate(0,0,o);var A=this.canvas.viewport2Canvas({x:n[0],y:n[1]}),l=A.x,c=A.y,u=Gt(l-a,c-s,0),h=_e(u,this.right)/qt(this.right),d=_e(u,this.up)/qt(this.up),f=this.getPosition(),g=(0,U.Z)(f,2),v=g[0],m=g[1],w=this.getFocalPoint(),C=(0,U.Z)(w,2),F=C[0],Q=C[1];return this.setPosition(v-h,m-d),this.setFocalPoint(F-h,Q-d),this}},{key:"setPerspective",value:function(e,n,i,a){var s;this.projectionMode=$i.PERSPECTIVE,this.fov=i,this.near=e,this.far=n,this.aspect=a;var o=this.near*Math.tan(Un(.5*this.fov))/this.zoom,A=2*o,l=this.aspect*A,c=-.5*l;if((s=this.view)!==null&&s!==void 0&&s.enabled){var u=this.view.fullWidth,h=this.view.fullHeight;c+=this.view.offsetX*l/u,o-=this.view.offsetY*A/h,l*=this.view.width/u,A*=this.view.height/h}return wp(this.projectionMatrix,c,c+l,o-A,o,e,this.far,this.clipSpaceNearZ===uc.ZERO),on(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,n,i,a,s,o){var A;this.projectionMode=$i.ORTHOGRAPHIC,this.rright=n,this.left=e,this.top=i,this.bottom=a,this.near=s,this.far=o;var l=(this.rright-this.left)/(2*this.zoom),c=(this.top-this.bottom)/(2*this.zoom),u=(this.rright+this.left)/2,h=(this.top+this.bottom)/2,d=u-l,f=u+l,g=h+c,v=h-c;if((A=this.view)!==null&&A!==void 0&&A.enabled){var m=(this.rright-this.left)/this.view.fullWidth/this.zoom,w=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d+=m*this.view.offsetX,f=d+m*this.view.width,g-=w*this.view.offsetY,v=g-w*this.view.height}return this.clipSpaceNearZ===uc.NEGATIVE_ONE?lu(this.projectionMatrix,d,f,g,v,s,o):cu(this.projectionMatrix,d,f,g,v,s,o),on(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],a=vi(e,n,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],a=Gt(0,1,0);if(this.focalPoint=vi(e,n,i),this.trackingMode===pc.CINEMATIC){var s=Me(Ct(),this.focalPoint,this.position);e=s[0],n=s[1],i=s[2];var o=qt(s),A=Bi(Math.asin(n/o)),l=90+Bi(Math.atan2(i,e)),c=te();qn(c,c,Un(l)),Zn(c,c,Un(A)),a=me(Ct(),[0,1,0],c)}return on(this.matrix,Zh(te(),this.position,this.focalPoint,a)),this._getAxes(),this._getDistance(),this._getAngles(),this.triggerUpdate(),this}},{key:"getDistance",value:function(){return this.distance}},{key:"getDistanceVector",value:function(){return this.distanceVector}},{key:"setDistance",value:function(e){if(this.distance===e||e<0)return this;this.distance=e,this.distance<Hu&&(this.distance=Hu),this.dollyingStep=this.distance/100;var n=Ct();e=this.distance;var i=this.forward,a=this.focalPoint;return n[0]=e*i[0]+a[0],n[1]=e*i[1]+a[1],n[2]=e*i[2]+a[2],this._setPosition(n),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(e){return this.maxDistance=e,this}},{key:"setMinDistance",value:function(e){return this.minDistance=e,this}},{key:"setAzimuth",value:function(e){return this.azimuth=Ks(e),this.computeMatrix(),this._getAxes(),this.type===In.ORBITING||this.type===In.EXPLORING?this._getPosition():this.type===In.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(e){return this.elevation=Ks(e),this.computeMatrix(),this._getAxes(),this.type===In.ORBITING||this.type===In.EXPLORING?this._getPosition():this.type===In.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(e){return this.roll=Ks(e),this.computeMatrix(),this._getAxes(),this.type===In.ORBITING||this.type===In.EXPLORING?this._getPosition():this.type===In.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getRoll",value:function(){return this.roll}},{key:"_update",value:function(){this._getAxes(),this._getPosition(),this._getDistance(),this._getAngles(),this._getOrthoMatrix(),this.triggerUpdate()}},{key:"computeMatrix",value:function(){var e=sa(Er(),[0,0,1],Un(this.roll));Ie(this.matrix);var n=sa(Er(),[1,0,0],Un((this.rotateWorld&&this.type!==In.TRACKING||this.type===In.TRACKING?1:-1)*this.elevation)),i=sa(Er(),[0,1,0],Un((this.rotateWorld&&this.type!==In.TRACKING||this.type===In.TRACKING?1:-1)*this.azimuth)),a=Qs(Er(),i,n);a=Qs(Er(),a,e);var s=_A(te(),a);this.type===In.ORBITING||this.type===In.EXPLORING?(se(this.matrix,this.matrix,this.focalPoint),he(this.matrix,this.matrix,s),se(this.matrix,this.matrix,[0,0,this.distance])):this.type===In.TRACKING&&(se(this.matrix,this.matrix,this.position),he(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,n,i){this.position=vi(e,n,i);var a=this.matrix;a[12]=this.position[0],a[13]=this.position[1],a[14]=this.position[2],a[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){re(this.right,vi(T(or(),[1,0,0,0],this.matrix))),re(this.up,vi(T(or(),[0,1,0,0],this.matrix))),re(this.forward,vi(T(or(),[0,0,1,0],this.matrix))),be(this.right,this.right),be(this.up,this.up),be(this.forward,this.forward)}},{key:"_getAngles",value:function(){var e=this.distanceVector[0],n=this.distanceVector[1],i=this.distanceVector[2],a=qt(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===In.TRACKING?(this.elevation=Bi(Math.asin(n/a)),this.azimuth=Bi(Math.atan2(-e,-i))):this.rotateWorld?(this.elevation=Bi(Math.asin(n/a)),this.azimuth=Bi(Math.atan2(-e,-i))):(this.elevation=-Bi(Math.asin(n/a)),this.azimuth=-Bi(Math.atan2(-e,-i)))}},{key:"_getPosition",value:function(){re(this.position,vi(T(or(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){We(this.distanceVector,[0,0,-this.distance],nv(Xh(),this.matrix)),ue(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=Me(Ct(),this.focalPoint,this.position),this.distance=qt(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===$i.ORTHOGRAPHIC){var e=this.position,n=sa(Er(),[0,0,1],-this.roll*Math.PI/180);uo(this.orthoMatrix,n,Gt((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Gt(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),n=he(te(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(Rd.UPDATED)}}},{key:"rotate",value:function(e,n,i){throw new Error(On)}},{key:"pan",value:function(e,n){throw new Error(On)}},{key:"dolly",value:function(e){throw new Error(On)}},{key:"createLandmark",value:function(e,n){throw new Error(On)}},{key:"gotoLandmark",value:function(e,n){throw new Error(On)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(On)}}])}(),Bp=function(r){return r[r.Standard=0]="Standard",r}({}),mc=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),iA=Ct(),aA=te(),br=Er();function zs(r){if(r.localDirtyFlag){var t=r.localSkew[0]!==0||r.localSkew[1]!==0;if(t){uo(r.localTransform,r.localRotation,r.localPosition,Gt(1,1,1),r.origin),(r.localSkew[0]!==0||r.localSkew[1]!==0)&&(Ie(aA),aA[4]=Math.tan(r.localSkew[0]),aA[1]=Math.tan(r.localSkew[1]),he(r.localTransform,r.localTransform,aA));var e=uo(aA,WA(br,0,0,0,1),de(iA,1,1,1),r.localScale,r.origin);he(r.localTransform,r.localTransform,e)}else{var n=r.localTransform,i=r.localPosition,a=r.localRotation,s=r.localScale,o=r.origin,A=i[0]!==0||i[1]!==0||i[2]!==0,l=a[3]!==1||a[0]!==0||a[1]!==0||a[2]!==0,c=s[0]!==1||s[1]!==1||s[2]!==1,u=o[0]!==0||o[1]!==0||o[2]!==0;!l&&!c&&!u?A?Tr(n,i):Ie(n):uo(n,a,i,s,o)}r.localDirtyFlag=!1}}function sA(r,t){r.dirtyFlag&&(t?he(r.worldTransform,t.worldTransform,r.localTransform):He(r.worldTransform,r.localTransform),r.dirtyFlag=!1)}var hs={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new cs(0,0,0,0)},oe=function(r){return r.COORDINATE="<coordinate>",r.COLOR="<color>",r.PAINT="<paint>",r.NUMBER="<number>",r.ANGLE="<angle>",r.OPACITY_VALUE="<opacity-value>",r.SHADOW_BLUR="<shadow-blur>",r.LENGTH="<length>",r.PERCENTAGE="<percentage>",r.LENGTH_PERCENTAGE="<length> | <percentage>",r.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",r.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",r.LIST_OF_POINTS="<list-of-points>",r.PATH="<path>",r.FILTER="<filter>",r.Z_INDEX="<z-index>",r.OFFSET_DISTANCE="<offset-distance>",r.DEFINED_PATH="<defined-path>",r.MARKER="<marker>",r.TRANSFORM="<transform>",r.TRANSFORM_ORIGIN="<transform-origin>",r.TEXT="<text>",r.TEXT_TRANSFORM="<text-transform>",r}({});function mo(r,t,e){r.prototype=t.prototype=e,e.constructor=r}function ja(r,t){var e=Object.create(r.prototype);for(var n in t)e[n]=t[n];return e}function oA(){}var AA=.7,JA=1/AA,Vs="\\s*([+-]?\\d+)\\s*",ds="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ca="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_d=/^#([0-9a-f]{3,8})$/,qA=new RegExp(`^rgb\\(${Vs},${Vs},${Vs}\\)$`),bp=new RegExp(`^rgb\\(${Ca},${Ca},${Ca}\\)$`),xp=new RegExp(`^rgba\\(${Vs},${Vs},${Vs},${ds}\\)$`),Cp=new RegExp(`^rgba\\(${Ca},${Ca},${Ca},${ds}\\)$`),Sp=new RegExp(`^hsl\\(${ds},${Ca},${Ca}\\)$`),Mp=new RegExp(`^hsla\\(${ds},${Ca},${Ca},${ds}\\)$`),yc={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};mo(oA,wc,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Hd,formatHex:Hd,formatHex8:Tp,formatHsl:Fp,formatRgb:Gd,toString:Gd});function Hd(){return this.rgb().formatHex()}function Tp(){return this.rgb().formatHex8()}function Fp(){return Vd(this).formatHsl()}function Gd(){return this.rgb().formatRgb()}function wc(r){var t,e;return r=(r+"").trim().toLowerCase(),(t=_d.exec(r))?(e=t[1].length,t=parseInt(t[1],16),e===6?Ec(t):e===3?new ki(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?lA(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?lA(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=qA.exec(r))?new ki(t[1],t[2],t[3],1):(t=bp.exec(r))?new ki(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=xp.exec(r))?lA(t[1],t[2],t[3],t[4]):(t=Cp.exec(r))?lA(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Sp.exec(r))?bc(t[1],t[2]/100,t[3]/100,1):(t=Mp.exec(r))?bc(t[1],t[2]/100,t[3]/100,t[4]):yc.hasOwnProperty(r)?Ec(yc[r]):r==="transparent"?new ki(NaN,NaN,NaN,0):null}function Ec(r){return new ki(r>>16&255,r>>8&255,r&255,1)}function lA(r,t,e,n){return n<=0&&(r=t=e=NaN),new ki(r,t,e,n)}function Kd(r){return r instanceof oA||(r=wc(r)),r?(r=r.rgb(),new ki(r.r,r.g,r.b,r.opacity)):new ki}function Op(r,t,e,n){return arguments.length===1?Kd(r):new ki(r,t,e,n==null?1:n)}function ki(r,t,e,n){this.r=+r,this.g=+t,this.b=+e,this.opacity=+n}mo(ki,Op,ja(oA,{brighter(r){return r=r==null?JA:Math.pow(JA,r),new ki(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?AA:Math.pow(AA,r),new ki(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new ki(yo(this.r),yo(this.g),yo(this.b),Bc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Ku,formatHex:Ku,formatHex8:Ip,formatRgb:zd,toString:zd}));function Ku(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}`}function Ip(){return`#${wo(this.r)}${wo(this.g)}${wo(this.b)}${wo((isNaN(this.opacity)?1:this.opacity)*255)}`}function zd(){const r=Bc(this.opacity);return`${r===1?"rgb(":"rgba("}${yo(this.r)}, ${yo(this.g)}, ${yo(this.b)}${r===1?")":`, ${r})`}`}function Bc(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function yo(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function wo(r){return r=yo(r),(r<16?"0":"")+r.toString(16)}function bc(r,t,e,n){return n<=0?r=t=e=NaN:e<=0||e>=1?r=t=NaN:t<=0&&(r=NaN),new Sa(r,t,e,n)}function Vd(r){if(r instanceof Sa)return new Sa(r.h,r.s,r.l,r.opacity);if(r instanceof oA||(r=wc(r)),!r)return new Sa;if(r instanceof Sa)return r;r=r.rgb();var t=r.r/255,e=r.g/255,n=r.b/255,i=Math.min(t,e,n),a=Math.max(t,e,n),s=NaN,o=a-i,A=(a+i)/2;return o?(t===a?s=(e-n)/o+(e<n)*6:e===a?s=(n-t)/o+2:s=(t-e)/o+4,o/=A<.5?a+i:2-a-i,s*=60):o=A>0&&A<1?0:s,new Sa(s,o,A,r.opacity)}function zu(r,t,e,n){return arguments.length===1?Vd(r):new Sa(r,t,e,n==null?1:n)}function Sa(r,t,e,n){this.h=+r,this.s=+t,this.l=+e,this.opacity=+n}mo(Sa,zu,ja(oA,{brighter(r){return r=r==null?JA:Math.pow(JA,r),new Sa(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?AA:Math.pow(AA,r),new Sa(this.h,this.s,this.l*r,this.opacity)},rgb(){var r=this.h%360+(this.h<0)*360,t=isNaN(r)||isNaN(this.s)?0:this.s,e=this.l,n=e+(e<.5?e:1-e)*t,i=2*e-n;return new ki(cA(r>=240?r-240:r+120,i,n),cA(r,i,n),cA(r<120?r+240:r-120,i,n),this.opacity)},clamp(){return new Sa(Se(this.h),fs(this.s),fs(this.l),Bc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const r=Bc(this.opacity);return`${r===1?"hsl(":"hsla("}${Se(this.h)}, ${fs(this.s)*100}%, ${fs(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Se(r){return r=(r||0)%360,r<0?r+360:r}function fs(r){return Math.max(0,Math.min(1,r||0))}function cA(r,t,e){return(r<60?t+(e-t)*r/60:r<180?e:r<240?t+(e-t)*(240-r)/60:t)*255}function Ln(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");var e=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=t?t.apply(this,a):a[0],A=e.cache;if(A.has(o))return A.get(o);var l=r.apply(this,a);return e.cache=A.set(o,l)||A,l};return e.cache=new(Ln.Cache||Map),Ln.cacheList.push(e.cache),e}Ln.Cache=Map,Ln.cacheList=[],Ln.clearCache=function(){Ln.cacheList.forEach(function(r){return r.clear()})};var ge=function(r){return r[r.kUnknown=0]="kUnknown",r[r.kNumber=1]="kNumber",r[r.kPercentage=2]="kPercentage",r[r.kEms=3]="kEms",r[r.kPixels=4]="kPixels",r[r.kRems=5]="kRems",r[r.kDegrees=6]="kDegrees",r[r.kRadians=7]="kRadians",r[r.kGradians=8]="kGradians",r[r.kTurns=9]="kTurns",r[r.kMilliseconds=10]="kMilliseconds",r[r.kSeconds=11]="kSeconds",r[r.kInteger=12]="kInteger",r}({}),un=function(r){return r[r.kUNumber=0]="kUNumber",r[r.kUPercent=1]="kUPercent",r[r.kULength=2]="kULength",r[r.kUAngle=3]="kUAngle",r[r.kUTime=4]="kUTime",r[r.kUOther=5]="kUOther",r}({}),Ar=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),xc=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Lp=[{name:"em",unit_type:ge.kEms},{name:"px",unit_type:ge.kPixels},{name:"deg",unit_type:ge.kDegrees},{name:"rad",unit_type:ge.kRadians},{name:"grad",unit_type:ge.kGradians},{name:"ms",unit_type:ge.kMilliseconds},{name:"s",unit_type:ge.kSeconds},{name:"rem",unit_type:ge.kRems},{name:"turn",unit_type:ge.kTurns}],gs=function(r){return r[r.kUnknownType=0]="kUnknownType",r[r.kUnparsedType=1]="kUnparsedType",r[r.kKeywordType=2]="kKeywordType",r[r.kUnitType=3]="kUnitType",r[r.kSumType=4]="kSumType",r[r.kProductType=5]="kProductType",r[r.kNegateType=6]="kNegateType",r[r.kInvertType=7]="kInvertType",r[r.kMinType=8]="kMinType",r[r.kMaxType=9]="kMaxType",r[r.kClampType=10]="kClampType",r[r.kTransformType=11]="kTransformType",r[r.kPositionType=12]="kPositionType",r[r.kURLImageType=13]="kURLImageType",r[r.kColorType=14]="kColorType",r[r.kUnsupportedColorType=15]="kUnsupportedColorType",r}({}),Np=function(t){return Lp.find(function(e){return e.name===t}).unit_type},Cc=function(t){return t?t==="number"?ge.kNumber:t==="percent"||t==="%"?ge.kPercentage:Np(t):ge.kUnknown},kp=function(t){switch(t){case ge.kNumber:case ge.kInteger:return un.kUNumber;case ge.kPercentage:return un.kUPercent;case ge.kPixels:return un.kULength;case ge.kMilliseconds:case ge.kSeconds:return un.kUTime;case ge.kDegrees:case ge.kRadians:case ge.kGradians:case ge.kTurns:return un.kUAngle;default:return un.kUOther}},Qp=function(t){switch(t){case un.kUNumber:return ge.kNumber;case un.kULength:return ge.kPixels;case un.kUPercent:return ge.kPercentage;case un.kUTime:return ge.kSeconds;case un.kUAngle:return ge.kDegrees;default:return ge.kUnknown}},Vu=function(t){var e=1;switch(t){case ge.kPixels:case ge.kDegrees:case ge.kSeconds:break;case ge.kMilliseconds:e=.001;break;case ge.kRadians:e=180/Math.PI;break;case ge.kGradians:e=.9;break;case ge.kTurns:e=360;break}return e},Wu=function(t){switch(t){case ge.kNumber:case ge.kInteger:return"";case ge.kPercentage:return"%";case ge.kEms:return"em";case ge.kRems:return"rem";case ge.kPixels:return"px";case ge.kDegrees:return"deg";case ge.kRadians:return"rad";case ge.kGradians:return"grad";case ge.kMilliseconds:return"ms";case ge.kSeconds:return"s";case ge.kTurns:return"turn"}return""},$A=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"toString",value:function(){return this.buildCSSText(Ar.kNo,xc.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=gs.kUnitType&&this.getType()<=gs.kClampType}}],[{key:"isAngle",value:function(e){return e===ge.kDegrees||e===ge.kRadians||e===ge.kGradians||e===ge.kTurns}},{key:"isLength",value:function(e){return e>=ge.kEms&&e<ge.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===ge.kPercentage||e===ge.kEms||e===ge.kRems}},{key:"isTime",value:function(e){return e===ge.kSeconds||e===ge.kMilliseconds}}])}(),Up=function(r){function t(e){var n;return(0,L.Z)(this,t),n=(0,P.Z)(this,t),n.colorSpace=e,n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"getType",value:function(){return gs.kColorType}},{key:"to",value:function(n){return this}}])}($A),vs=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),tl=function(r){function t(e,n){var i;return(0,L.Z)(this,t),i=(0,P.Z)(this,t),i.type=e,i.value=n,i}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"clone",value:function(){return new t(this.type,this.value)}},{key:"buildCSSText",value:function(n,i,a){return a}},{key:"getType",value:function(){return gs.kColorType}}])}($A),Qi=function(r){function t(e){var n;return(0,L.Z)(this,t),n=(0,P.Z)(this,t),n.value=e,n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return gs.kKeywordType}},{key:"buildCSSText",value:function(n,i,a){return a+this.value}}])}($A),Wd=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n="";return Number.isFinite(t)?n="NaN":t>0?n="infinity":n="-infinity",n+=e},Zu=function(t){return Qp(kp(t))},_n=function(r){function t(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.kNumber;(0,L.Z)(this,t),n=(0,P.Z)(this,t);var a;return typeof i=="string"?a=Cc(i):a=i,n.unit=a,n.value=e,n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"clone",value:function(){return new t(this.value,this.unit)}},{key:"equals",value:function(n){var i=n;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return gs.kUnitType}},{key:"convertTo",value:function(n){if(this.unit===n)return new t(this.value,this.unit);var i=Zu(this.unit);if(i!==Zu(n)||i===ge.kUnknown)return null;var a=Vu(this.unit)/Vu(n);return new t(this.value*a,n)}},{key:"buildCSSText",value:function(n,i,a){var s;switch(this.unit){case ge.kUnknown:break;case ge.kInteger:s=Number(this.value).toFixed(0);break;case ge.kNumber:case ge.kPercentage:case ge.kEms:case ge.kRems:case ge.kPixels:case ge.kDegrees:case ge.kRadians:case ge.kGradians:case ge.kMilliseconds:case ge.kSeconds:case ge.kTurns:{var o=-999999,A=999999,l=this.value,c=Wu(this.unit);if(l<o||l>A){var u=Wu(this.unit);!Number.isFinite(l)||Number.isNaN(l)?s=Wd(l,u):s=l+(u||"")}else s="".concat(l).concat(c)}}return a+=s,a}}])}($A),Ma=new _n(0,"px");new _n(1,"px");var Eo=new _n(0,"deg"),ju=function(r){function t(e,n,i){var a,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return(0,L.Z)(this,t),a=(0,P.Z)(this,t,["rgb"]),a.r=e,a.g=n,a.b=i,a.alpha=s,a.isNone=o,a}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"clone",value:function(){return new t(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(n,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(Up),el=new Qi("unset"),la=new Qi("initial"),Zd=new Qi("inherit"),uA={"":el,unset:el,initial:la,inherit:Zd},Pp=function(t){return uA[t]||(uA[t]=new Qi(t)),uA[t]},jd=new ju(0,0,0,0,!0),Sc=new ju(0,0,0,0),hA=Ln(function(r,t,e,n){return new ju(r,t,e,n)},function(r,t,e,n){return"rgba(".concat(r,",").concat(t,",").concat(e,",").concat(n,")")}),Yn=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ge.kNumber;return new _n(t,e)};new _n(50,"%");function Dp(r){var t=r.type,e=r.value;return t==="hex"?"#".concat(e):t==="literal"?e:t==="rgb"?"rgb(".concat(e.join(","),")"):"rgba(".concat(e.join(","),")")}var dA=function(){var r={linearGradient:/^(linear\-gradient)/i,repeatingLinearGradient:/^(repeating\-linear\-gradient)/i,radialGradient:/^(radial\-gradient)/i,repeatingRadialGradient:/^(repeating\-radial\-gradient)/i,conicGradient:/^(conic\-gradient)/i,sideOrCorner:/^to (left (top|bottom)|right (top|bottom)|top (left|right)|bottom (left|right)|left|right|top|bottom)/i,extentKeywords:/^(closest\-side|closest\-corner|farthest\-side|farthest\-corner|contain|cover)/,positionKeywords:/^(left|center|right|top|bottom)/i,pixelValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))px/,percentageValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))\%/,emValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))em/,angleValue:/^(-?(([0-9]*\.[0-9]+)|([0-9]+\.?)))deg/,startCall:/^\(/,endCall:/^\)/,comma:/^,/,hexColor:/^\#([0-9a-fA-F]+)/,literalColor:/^([a-zA-Z]+)/,rgbColor:/^rgb/i,rgbaColor:/^rgba/i,number:/^(([0-9]*\.[0-9]+)|([0-9]+\.?))/},t="";function e(Pt){throw new Error("".concat(t,": ").concat(Pt))}function n(){var Pt=i();return t.length>0&&e("Invalid input not EOF"),Pt}function i(){return C(a)}function a(){return s("linear-gradient",r.linearGradient,A)||s("repeating-linear-gradient",r.repeatingLinearGradient,A)||s("radial-gradient",r.radialGradient,u)||s("repeating-radial-gradient",r.repeatingRadialGradient,u)||s("conic-gradient",r.conicGradient,u)}function s(Pt,xt,Ft){return o(xt,function(_t){var Xt=Ft();return Xt&&(bt(r.comma)||e("Missing comma before color stops")),{type:Pt,orientation:Xt,colorStops:C(F)}})}function o(Pt,xt){var Ft=bt(Pt);if(Ft){bt(r.startCall)||e("Missing (");var _t=xt(Ft);return bt(r.endCall)||e("Missing )"),_t}}function A(){return l()||c()}function l(){return wt("directional",r.sideOrCorner,1)}function c(){return wt("angular",r.angleValue,1)}function u(){var Pt,xt=h(),Ft;return xt&&(Pt=[],Pt.push(xt),Ft=t,bt(r.comma)&&(xt=h(),xt?Pt.push(xt):t=Ft)),Pt}function h(){var Pt=d()||f();if(Pt)Pt.at=v();else{var xt=g();if(xt){Pt=xt;var Ft=v();Ft&&(Pt.at=Ft)}else{var _t=m();_t&&(Pt={type:"default-radial",at:_t})}}return Pt}function d(){var Pt=wt("shape",/^(circle)/i,0);return Pt&&(Pt.style=pt()||g()),Pt}function f(){var Pt=wt("shape",/^(ellipse)/i,0);return Pt&&(Pt.style=at()||g()),Pt}function g(){return wt("extent-keyword",r.extentKeywords,1)}function v(){if(wt("position",/^at/,0)){var Pt=m();return Pt||e("Missing positioning value"),Pt}}function m(){var Pt=w();if(Pt.x||Pt.y)return{type:"position",value:Pt}}function w(){return{x:at(),y:at()}}function C(Pt){var xt=Pt(),Ft=[];if(xt)for(Ft.push(xt);bt(r.comma);)xt=Pt(),xt?Ft.push(xt):e("One extra comma");return Ft}function F(){var Pt=Q();return Pt||e("Expected color definition"),Pt.length=at(),Pt}function Q(){return K()||J()||G()||D()}function D(){return wt("literal",r.literalColor,0)}function K(){return wt("hex",r.hexColor,1)}function G(){return o(r.rgbColor,function(){return{type:"rgb",value:C($)}})}function J(){return o(r.rgbaColor,function(){return{type:"rgba",value:C($)}})}function $(){return bt(r.number)[1]}function at(){return wt("%",r.percentageValue,1)||At()||pt()}function At(){return wt("position-keyword",r.positionKeywords,1)}function pt(){return wt("px",r.pixelValue,1)||wt("em",r.emValue,1)}function wt(Pt,xt,Ft){var _t=bt(xt);if(_t)return{type:Pt,value:_t[Ft]}}function bt(Pt){var xt=/^[\n\r\t\s]+/.exec(t);xt&&Rt(xt[0].length);var Ft=Pt.exec(t);return Ft&&Rt(Ft[0].length),Ft}function Rt(Pt){t=t.substring(Pt)}return function(Pt){return t=Pt,n()}}();function Rp(r,t,e,n){var i=Un(n.value),a=0,s=0,o=a+t/2,A=s+e/2,l=Math.abs(t*Math.cos(i))+Math.abs(e*Math.sin(i)),c=r[0]+o-Math.cos(i)*l/2,u=r[1]+A-Math.sin(i)*l/2,h=r[0]+o+Math.cos(i)*l/2,d=r[1]+A+Math.sin(i)*l/2;return{x1:c,y1:u,x2:h,y2:d}}function _p(r,t,e,n,i,a){var s=n.value,o=i.value;n.unit===ge.kPercentage&&(s=n.value/100*t),i.unit===ge.kPercentage&&(o=i.value/100*e);var A=Math.max(Li([0,0],[s,o]),Li([0,e],[s,o]),Li([t,e],[s,o]),Li([t,0],[s,o]));return a&&(a instanceof _n?A=a.value:a instanceof Qi&&(a.value==="closest-side"?A=Math.min(s,t-s,o,e-o):a.value==="farthest-side"?A=Math.max(s,t-s,o,e-o):a.value==="closest-corner"&&(A=Math.min(Li([0,0],[s,o]),Li([0,e],[s,o]),Li([t,e],[s,o]),Li([t,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:A}}var Yd=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Hp=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,Xd=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Jd=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Gp(r){var t,e=r.length;if(r[e-1].length=(t=r[e-1].length)!==null&&t!==void 0?t:{type:"%",value:"100"},e>1){var n;r[0].length=(n=r[0].length)!==null&&n!==void 0?n:{type:"%",value:"0"}}for(var i=0,a=Number(r[0].length.value),s=1;s<e;s++){var o,A=(o=r[s].length)===null||o===void 0?void 0:o.value;if(!Pe(A)&&!Pe(a)){for(var l=1;l<s-i;l++)r[i+l].length={type:"%",value:"".concat(a+(Number(A)-a)*l/(s-i))};i=s,a=Number(A)}}}var Kp={left:180,top:-90,bottom:90,right:0,"left top":225,"top left":225,"left bottom":135,"bottom left":135,"right top":-45,"top right":-45,"right bottom":45,"bottom right":45},zp=Ln(function(r){var t;return r.type==="angular"?t=Number(r.value):t=Kp[r.value]||0,Yn(t,"deg")}),Vp=Ln(function(r){var t=50,e=50,n="%",i="%";if((r==null?void 0:r.type)==="position"){var a=r.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?t=0:s.value==="center"?t=50:s.value==="right"?t=100:s.value==="top"?e=0:s.value==="bottom"&&(e=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?t=0:o.value==="center"?e=50:o.value==="right"?t=100:o.value==="top"?e=0:o.value==="bottom"&&(e=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(n=s==null?void 0:s.type,t=Number(s.value)),((o==null?void 0:o.type)==="px"||(o==null?void 0:o.type)==="%"||(o==null?void 0:o.type)==="em")&&(i=o==null?void 0:o.type,e=Number(o.value))}return{cx:Yn(t,n),cy:Yn(e,i)}}),Wp=Ln(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var t=dA(r);return t.map(function(o){var A=o.type,l=o.orientation,c=o.colorStops;Gp(c);var u=c.map(function(C){return{offset:Yn(Number(C.length.value),"%"),color:Dp(C)}});if(A==="linear-gradient")return new tl(vs.LinearGradient,{angle:l?zp(l):Eo,steps:u});if(A==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var h=Vp(l[0].at),d=h.cx,f=h.cy,g;if(l[0].style){var v=l[0].style,m=v.type,w=v.value;m==="extent-keyword"?g=Pp(w):g=Yn(w,m)}return new tl(vs.RadialGradient,{cx:d,cy:f,size:g,steps:u})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var n=Yd.exec(r);if(n){var i,a=((i=n[2].match(Jd))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new tl(vs.LinearGradient,{angle:Yn(parseFloat(n[1]),"deg"),steps:a.map(function(o){var A=(0,U.Z)(o,2),l=A[0],c=A[1];return{offset:Yn(Number(l)*100,"%"),color:c}})})]}}else if(e==="r"){var s=Zp(r);if(s)if(gn(s))r=s;else return[new tl(vs.RadialGradient,s)]}else if(e==="p")return jp(r)}});function Zp(r){var t=Hp.exec(r);if(t){var e,n=((e=t[4].match(Jd))===null||e===void 0?void 0:e.map(function(i){return i.split(":")}))||[];return{cx:Yn(50,"%"),cy:Yn(50,"%"),steps:n.map(function(i){var a=(0,U.Z)(i,2),s=a[0],o=a[1];return{offset:Yn(Number(s)*100,"%"),color:o}})}}return null}function jp(r){var t=Xd.exec(r);if(t){var e=t[1],n=t[2];switch(e){case"a":e="repeat";break;case"x":e="repeat-x";break;case"y":e="repeat-y";break;case"n":e="no-repeat";break;default:e="no-repeat"}return{image:n,repetition:e}}return null}function rE(r){return!!r.type&&!!r.value}function Bo(r){return r&&!!r.image}function Mc(r){return r&&!Pe(r.r)&&!Pe(r.g)&&!Pe(r.b)}var nl=Ln(function(r){if(Bo(r))return(0,H.Z)({repetition:"repeat"},r);if(Pe(r)&&(r=""),r==="transparent")return Sc;if(r==="currentColor")r="black";else if(r==="none")return jd;var t=Wp(r);if(t)return t;var e=wc(r),n=[0,0,0,0];return e!==null&&(n[0]=e.r||0,n[1]=e.g||0,n[2]=e.b||0,n[3]=e.opacity),hA.apply(void 0,n)});function Yp(r,t){if(!(!Mc(r)||!Mc(t)))return[[Number(r.r),Number(r.g),Number(r.b),Number(r.alpha)],[Number(t.r),Number(t.g),Number(t.b),Number(t.alpha)],function(e){var n=e.slice();if(n[3])for(var i=0;i<3;i++)n[i]=Math.round(hr(n[i],0,255));return n[3]=hr(n[3],0,1),"rgba(".concat(n.join(","),")")}]}function rl(r,t){if(Pe(t))return Yn(0,"px");if(t="".concat(t).trim().toLowerCase(),isFinite(Number(t))){if("px".search(r)>=0)return Yn(Number(t),"px");if("deg".search(r)>=0)return Yn(Number(t),"deg")}var e=[];t=t.replace(r,function(i){return e.push(i),"U".concat(i)});var n="U(".concat(r.source,")");return e.map(function(i){return Yn(Number(t.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(n,"g"),"*0")),i)})[0]}var E=function(t){return rl(new RegExp("px","g"),t)},p=Ln(E),b=function(t){return rl(new RegExp("%","g"),t)};Ln(b);var B=function(t){return ye(t)||isFinite(Number(t))?Yn(Number(t)||0,"px"):rl(new RegExp("px|%|em|rem","g"),t)},_=Ln(B),j=function(t){return rl(new RegExp("deg|rad|grad|turn","g"),t)},tt=Ln(j);function dt(r,t,e,n){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=r.value||0,o=t.value||0,A=Zu(r.unit),l=r.convertTo(A),c=t.convertTo(A);return l&&c?(s=l.value,o=c.value,a=Wu(r.unit)):(_n.isLength(r.unit)||_n.isLength(t.unit))&&(s=Ot(r,i,e),o=Ot(t,i,e),a="px"),[s,o,function(u){return n&&(u=Math.max(u,0)),u+a}]}function lt(r){var t=0;return r.unit===ge.kDegrees?t=r.value:r.unit===ge.kRadians?t=Bi(Number(r.value)):r.unit===ge.kTurns?t=Qd(Number(r.value)):r.value&&(t=r.value),t}function Tt(r,t){var e;return Array.isArray(r)?e=r.map(function(n){return Number(n)}):gn(r)?e=r.split(" ").map(function(n){return Number(n)}):ye(r)&&(e=[r]),t===2?e.length===1?[e[0],e[0]]:[e[0],e[1]]:t===4?e.length===1?[e[0],e[0],e[0],e[0]]:e.length===2?[e[0],e[1],e[0],e[1]]:e.length===3?[e[0],e[1],e[2],e[1]]:[e[0],e[1],e[2],e[3]]:t==="even"&&e.length%2===1?[].concat((0,N.Z)(e),(0,N.Z)(e)):e}function Ot(r,t,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===ge.kPixels)return Number(r.value);if(r.unit===ge.kPercentage&&e){var i=e.nodeName===Vt.GROUP?e.getLocalBounds():e.getGeometryBounds();return(n?i.min[t]:0)+r.value/100*i.halfExtents[t]*2}return 0}var Dt=function(t){return rl(/deg|rad|grad|turn|px|%/g,t)},Jt=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Oe(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(r=r.toLowerCase().trim(),r==="none")return[];for(var t=/\s*([\w-]+)\(([^)]*)\)/g,e=[],n,i=0;n=t.exec(r);){if(n.index!==i)return[];if(i=n.index+n[0].length,Jt.indexOf(n[1])>-1&&e.push({name:n[1],params:n[2].split(" ").map(function(a){return Dt(a)||nl(a)})}),t.lastIndex===r.length)return e}return[]}function fe(r){return r.toString()}var Be=function(t){return typeof t=="number"?Yn(t):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(t)?Yn(Number(t)):Yn(0)},an=Ln(Be);Ln(function(r){return gn(r)?r.split(" ").map(an):r.map(an)});function Ue(r,t){return[r,t,fe]}function Ne(r,t){return function(e,n){return[e,n,function(i){return fe(hr(i,r,t))}]}}function Mn(r,t){if(r.length===t.length)return[r,t,function(e){return e}]}function An(r){return r.parsedStyle.d.totalLength===0&&(r.parsedStyle.d.totalLength=Hv(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function Xe(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=Qu(r.parsedStyle.points.points)),r.parsedStyle.points.totalLength}function Fe(r){for(var t=0;t<r.length;t++){var e=r[t-1],n=r[t],i=n[0];if(i==="M"&&e){var a=e[0],s=[n[1],n[2]],o=void 0;a==="L"||a==="M"?o=[e[1],e[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[e[e.length-2],e[e.length-1]]),o&&Ze(s,o)&&(r.splice(t,1),t--)}}}function bn(r){for(var t=!1,e=r.length,n=0;n<e;n++){var i=r[n],a=i[0];if(a==="C"||a==="A"||a==="Q"){t=!0;break}}return t}function xn(r){for(var t=[],e=[],n=[],i=0;i<r.length;i++){var a=r[i],s=a[0];s==="M"?(n.length&&(e.push(n),n=[]),n.push([a[1],a[2]])):s==="Z"?n.length&&(t.push(n),n=[]):n.push([a[1],a[2]])}return n.length>0&&e.push(n),{polygons:t,polylines:e}}function Ze(r,t){return r[0]===t[0]&&r[1]===t[1]}function Fr(r,t){for(var e=[],n=[],i=[],a=0;a<r.length;a++){var s=r[a],o=s.currentPoint,A=s.params,l=s.prePoint,c=void 0;switch(s.command){case"Q":c=ni(l[0],l[1],A[1],A[2],A[3],A[4]);break;case"C":c=xd(l[0],l[1],A[1],A[2],A[3],A[4],A[5],A[6]);break;case"A":var u=s.arcParams;c=Ap(u.cx,u.cy,u.rx,u.ry,u.xRotation,u.startAngle,u.endAngle);break;default:e.push(o[0]),n.push(o[1]);break}c&&(s.box=c,e.push(c.x,c.x+c.width),n.push(c.y,c.y+c.height)),t&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}e=e.filter(function(F){return!Number.isNaN(F)&&F!==1/0&&F!==-1/0}),n=n.filter(function(F){return!Number.isNaN(F)&&F!==1/0&&F!==-1/0});var h=$l(e),d=$l(n),f=tc(e),g=tc(n);if(i.length===0)return{x:h,y:d,width:f-h,height:g-d};for(var v=0;v<i.length;v++){var m=i[v],w=m.currentPoint,C=void 0;w[0]===h?(C=ai(m,t),h-=C.xExtra):w[0]===f&&(C=ai(m,t),f+=C.xExtra),w[1]===d?(C=ai(m,t),d-=C.yExtra):w[1]===g&&(C=ai(m,t),g+=C.yExtra)}return{x:h,y:d,width:f-h,height:g-d}}function ai(r,t){var e=r.prePoint,n=r.currentPoint,i=r.nextPoint,a=Math.pow(n[0]-e[0],2)+Math.pow(n[1]-e[1],2),s=Math.pow(n[0]-i[0],2)+Math.pow(n[1]-i[1],2),o=Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2),A=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!A||Math.sin(A)===0||Xo(A,0))return{xExtra:0,yExtra:0};var l=Math.abs(Math.atan2(i[1]-n[1],i[0]-n[0])),c=Math.abs(Math.atan2(i[0]-n[0],i[1]-n[1]));l=l>Math.PI/2?Math.PI-l:l,c=c>Math.PI/2?Math.PI-c:c;var u={xExtra:Math.cos(A/2-l)*(t/2*(1/Math.sin(A/2)))-t/2||0,yExtra:Math.cos(c-A/2)*(t/2*(1/Math.sin(A/2)))-t/2||0};return u}function Ui(r,t){return[t[0]+(t[0]-r[0]),t[1]+(t[1]-r[1])]}var Kn=function(t,e){var n=t.x*e.x+t.y*e.y,i=Math.sqrt((Math.pow(t.x,2)+Math.pow(t.y,2))*(Math.pow(e.x,2)+Math.pow(e.y,2))),a=t.x*e.y-t.y*e.x<0?-1:1,s=a*Math.acos(n/i);return s},zr=function(t,e,n,i,a,s,o,A){e=Math.abs(e),n=Math.abs(n),i=ud(i,360);var l=Un(i);if(t.x===o.x&&t.y===o.y)return{x:t.x,y:t.y,ellipticalArcAngle:0};if(e===0||n===0)return{x:0,y:0,ellipticalArcAngle:0};var c=(t.x-o.x)/2,u=(t.y-o.y)/2,h={x:Math.cos(l)*c+Math.sin(l)*u,y:-Math.sin(l)*c+Math.cos(l)*u},d=Math.pow(h.x,2)/Math.pow(e,2)+Math.pow(h.y,2)/Math.pow(n,2);d>1&&(e*=Math.sqrt(d),n*=Math.sqrt(d));var f=Math.pow(e,2)*Math.pow(n,2)-Math.pow(e,2)*Math.pow(h.y,2)-Math.pow(n,2)*Math.pow(h.x,2),g=Math.pow(e,2)*Math.pow(h.y,2)+Math.pow(n,2)*Math.pow(h.x,2),v=f/g;v=v<0?0:v;var m=(a!==s?1:-1)*Math.sqrt(v),w={x:m*(e*h.y/n),y:m*(-(n*h.x)/e)},C={x:Math.cos(l)*w.x-Math.sin(l)*w.y+(t.x+o.x)/2,y:Math.sin(l)*w.x+Math.cos(l)*w.y+(t.y+o.y)/2},F={x:(h.x-w.x)/e,y:(h.y-w.y)/n},Q=Kn({x:1,y:0},F),D={x:(-h.x-w.x)/e,y:(-h.y-w.y)/n},K=Kn(F,D);!s&&K>0?K-=2*Math.PI:s&&K<0&&(K+=2*Math.PI),K%=2*Math.PI;var G=Q+K*A,J=e*Math.cos(G),$=n*Math.sin(G),at={x:Math.cos(l)*J-Math.sin(l)*$+C.x,y:Math.sin(l)*J+Math.cos(l)*$+C.y,ellipticalArcStartAngle:Q,ellipticalArcEndAngle:Q+K,ellipticalArcAngle:G,ellipticalArcCenter:C,resultantRx:e,resultantRy:n};return at};function Ws(r){for(var t=[],e=null,n=null,i=null,a=0,s=r.length,o=0;o<s;o++){var A=r[o];n=r[o+1];var l=A[0],c={command:l,prePoint:e,params:A,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(l){case"M":i=[A[1],A[2]],a=o;break;case"A":var u=Zs(e,A);c.arcParams=u;break}if(l==="Z")e=i,n=r[a+1];else{var h=A.length;e=[A[h-2],A[h-1]]}n&&n[0]==="Z"&&(n=r[a],t[a]&&(t[a].prePoint=e)),c.currentPoint=e,t[a]&&Ze(e,t[a].currentPoint)&&(t[a].prePoint=c.prePoint);var d=n?[n[n.length-2],n[n.length-1]]:null;c.nextPoint=d;var f=c.prePoint;if(["L","H","V"].includes(l))c.startTangent=[f[0]-e[0],f[1]-e[1]],c.endTangent=[e[0]-f[0],e[1]-f[1]];else if(l==="Q"){var g=[A[1],A[2]];c.startTangent=[f[0]-g[0],f[1]-g[1]],c.endTangent=[e[0]-g[0],e[1]-g[1]]}else if(l==="T"){var v=t[o-1],m=Ui(v.currentPoint,f);v.command==="Q"?(c.command="Q",c.startTangent=[f[0]-m[0],f[1]-m[1]],c.endTangent=[e[0]-m[0],e[1]-m[1]]):(c.command="TL",c.startTangent=[f[0]-e[0],f[1]-e[1]],c.endTangent=[e[0]-f[0],e[1]-f[1]])}else if(l==="C"){var w=[A[1],A[2]],C=[A[3],A[4]];c.startTangent=[f[0]-w[0],f[1]-w[1]],c.endTangent=[e[0]-C[0],e[1]-C[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[w[0]-C[0],w[1]-C[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[C[0]-w[0],C[1]-w[1]])}else if(l==="S"){var F=t[o-1],Q=Ui(F.currentPoint,f),D=[A[1],A[2]];F.command==="C"?(c.command="C",c.startTangent=[f[0]-Q[0],f[1]-Q[1]],c.endTangent=[e[0]-D[0],e[1]-D[1]]):(c.command="SQ",c.startTangent=[f[0]-D[0],f[1]-D[1]],c.endTangent=[e[0]-D[0],e[1]-D[1]])}else if(l==="A"){var K=bi(c,0),G=K.x,J=K.y,$=bi(c,1,!1),at=$.x,At=$.y;c.startTangent=[G,J],c.endTangent=[at,At]}t.push(c)}return t}function bi(r,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,n=r.arcParams,i=n.rx,a=i===void 0?0:i,s=n.ry,o=s===void 0?0:s,A=n.xRotation,l=n.arcFlag,c=n.sweepFlag,u=zr({x:r.prePoint[0],y:r.prePoint[1]},a,o,A,!!l,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},t),h=zr({x:r.prePoint[0],y:r.prePoint[1]},a,o,A,!!l,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},e?t+.005:t-.005),d=h.x-u.x,f=h.y-u.y,g=Math.sqrt(d*d+f*f);return{x:-d/g,y:-f/g}}function si(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function ps(r,t){return si(r)*si(t)?(r[0]*t[0]+r[1]*t[1])/(si(r)*si(t)):1}function Ta(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(ps(r,t))}function Zs(r,t){var e=t[1],n=t[2],i=ud(Un(t[3]),Math.PI*2),a=t[4],s=t[5],o=r[0],A=r[1],l=t[6],c=t[7],u=Math.cos(i)*(o-l)/2+Math.sin(i)*(A-c)/2,h=-1*Math.sin(i)*(o-l)/2+Math.cos(i)*(A-c)/2,d=u*u/(e*e)+h*h/(n*n);d>1&&(e*=Math.sqrt(d),n*=Math.sqrt(d));var f=e*e*(h*h)+n*n*(u*u),g=f?Math.sqrt((e*e*(n*n)-f)/f):1;a===s&&(g*=-1),isNaN(g)&&(g=0);var v=n?g*e*h/n:0,m=e?g*-n*u/e:0,w=(o+l)/2+Math.cos(i)*v-Math.sin(i)*m,C=(A+c)/2+Math.sin(i)*v+Math.cos(i)*m,F=[(u-v)/e,(h-m)/n],Q=[(-1*u-v)/e,(-1*h-m)/n],D=Ta([1,0],F),K=Ta(F,Q);return ps(F,Q)<=-1&&(K=Math.PI),ps(F,Q)>=1&&(K=0),s===0&&K>0&&(K-=2*Math.PI),s===1&&K<0&&(K+=2*Math.PI),{cx:w,cy:C,rx:Ze(r,[l,c])?0:e,ry:Ze(r,[l,c])?0:n,startAngle:D,endAngle:D+K,xRotation:i,arcFlag:a,sweepFlag:s}}function bo(r,t,e){return r.reduce(function(n,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);e&&vec3.transformMat4(s,s,e),a="".concat(i[0]).concat(s[0],",").concat(s[1])}else if(i[0]==="Z")a=i[0];else if(i[0]==="C"){var o=vec3.fromValues(i[1],i[2],0),A=vec3.fromValues(i[3],i[4],0),l=vec3.fromValues(i[5],i[6],0);e&&(vec3.transformMat4(o,o,e),vec3.transformMat4(A,A,e),vec3.transformMat4(l,l,e)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(A[0],",").concat(A[1],",").concat(l[0],",").concat(l[1])}else if(i[0]==="A"){var c=vec3.fromValues(i[6],i[7],0);e&&vec3.transformMat4(c,c,e),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(c[0],",").concat(c[1])}else if(i[0]==="Q"){var u=vec3.fromValues(i[1],i[2],0),h=vec3.fromValues(i[3],i[4],0);e&&(vec3.transformMat4(u,u,e),vec3.transformMat4(h,h,e)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return n+=a},"")}function xo(r,t,e,n){return[["M",r,t],["L",e,n]]}function Ya(r,t,e,n){var i=(-1+Math.sqrt(2))/3*4,a=r*i,s=t*i,o=e-r,A=e+r,l=n-t,c=n+t;return[["M",o,n],["C",o,n-s,e-a,l,e,l],["C",e+a,l,A,n-s,A,n],["C",A,n+s,e+a,c,e,c],["C",e-a,c,o,n+s,o,n],["Z"]]}function Co(r,t){var e=r.map(function(n,i){return[i===0?"M":"L",n[0],n[1]]});return t&&e.push(["Z"]),e}function ms(r,t,e,n,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],A=a[2],l=a[3],c=r>0?1:-1,u=t>0?1:-1,h=c+u!==0?1:0;return[["M",c*s+e,n],["L",r-c*o+e,n],o?["A",o,o,0,0,h,r+e,u*o+n]:null,["L",r+e,t-u*A+n],A?["A",A,A,0,0,h,r+e-c*A,t+n]:null,["L",e+c*l,t+n],l?["A",l,l,0,0,h,e,t+n-u*l]:null,["L",e,u*s+n],s?["A",s,s,0,0,h,c*s+e,n]:null,["Z"]].filter(function(d){return d})}return[["M",e,n],["L",e+r,n],["L",e+r,n+t],["L",e,n+t],["Z"]]}function il(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Vt.LINE:var n=r.parsedStyle,i=n.x1,a=i===void 0?0:i,s=n.y1,o=s===void 0?0:s,A=n.x2,l=A===void 0?0:A,c=n.y2,u=c===void 0?0:c;e=xo(a,o,l,u);break;case Vt.CIRCLE:{var h=r.parsedStyle,d=h.r,f=d===void 0?0:d,g=h.cx,v=g===void 0?0:g,m=h.cy,w=m===void 0?0:m;e=Ya(f,f,v,w);break}case Vt.ELLIPSE:{var C=r.parsedStyle,F=C.rx,Q=F===void 0?0:F,D=C.ry,K=D===void 0?0:D,G=C.cx,J=G===void 0?0:G,$=C.cy,at=$===void 0?0:$;e=Ya(Q,K,J,at);break}case Vt.POLYLINE:case Vt.POLYGON:var At=r.parsedStyle.points;e=Co(At.points,r.nodeName===Vt.POLYGON);break;case Vt.RECT:var pt=r.parsedStyle,wt=pt.width,bt=wt===void 0?0:wt,Rt=pt.height,Pt=Rt===void 0?0:Rt,xt=pt.x,Ft=xt===void 0?0:xt,_t=pt.y,Xt=_t===void 0?0:_t,ie=pt.radius,le=ie&&ie.some(function(xe){return xe!==0});e=ms(bt,Pt,Ft,Xt,le&&ie.map(function(xe){return clamp(xe,0,Math.min(Math.abs(bt)/2,Math.abs(Pt)/2))}));break;case Vt.PATH:var ve=r.parsedStyle.d.absolutePath;e=_toConsumableArray(ve);break}if(e.length)return bo(e,r,t)}function Tc(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=r.map(function(s,o){var A=s[0],l=r[o+1],c=o===0&&(t!==0||e!==0),u=(o===r.length-1||l&&(l[0]==="M"||l[0]==="Z"))&&n!==0&&i!==0,h=c?[t,e]:[0,0],d=_slicedToArray(h,2),f=d[0],g=d[1],v=u?[n,i]:[0,0],m=_slicedToArray(v,2),w=m[0],C=m[1];switch(A){case"M":return"M ".concat(s[1]+f,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+w,",").concat(s[2]+C);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+w," ").concat(s[4]+C);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+w," ").concat(s[6]+C);case"A":return"A ".concat(s[1]," ").concat(s[2]," ").concat(s[3]," ").concat(s[4]," ").concat(s[5]," ").concat(s[6]," ").concat(s[7]).concat(u?" L ".concat(s[6]+n,",").concat(s[7]+i):"");case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var iE=function(t){if(t===""||Array.isArray(t)&&t.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var e;try{e=ql(t)}catch(d){e=ql(""),console.error("[g]: Invalid SVG Path definition: ".concat(t))}Fe(e);var n=bn(e),i=xn(e),a=i.polygons,s=i.polylines,o=Ws(e),A=Fr(o,0),l=A.x,c=A.y,u=A.width,h=A.height;return{absolutePath:e,hasArc:n,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(l)?l:0,y:Number.isFinite(c)?c:0,width:Number.isFinite(u)?u:0,height:Number.isFinite(h)?h:0}}},AM=Ln(iE);function aE(r){return gn(r)?AM(r):iE(r)}function lM(r,t,e){var n=r.curve,i=t.curve;(!n||n.length===0)&&(n=Cu(r.absolutePath,!1),r.curve=n),(!i||i.length===0)&&(i=Cu(t.absolutePath,!1),t.curve=i);var a=[n,i];n.length!==i.length&&(a=fd(n,i));var s=gd(a[0])!==gd(a[1])?Yv(a[0]):Xv(a[0]);return[s,vd(a[1],s),function(o){return o}]}function cM(r,t){var e;return gn(r)?e=r.split(" ").map(function(n){var i=n.split(","),a=(0,U.Z)(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function uM(r,t){return[r.points,t.points,function(e){return e}]}var xr=null,Fc=/\s*(\w+)\(([^)]*)\)/g;function ca(r){return function(t){var e=0;return r.map(function(n){return n===xr?t[e++]:n})}}function al(r){return r}var Yu={matrix:["NNNNNN",[xr,xr,0,0,xr,xr,0,0,0,0,1,0,xr,xr,0,1],al],matrix3d:["NNNNNNNNNNNNNNNN",al],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",ca([xr,xr,new _n(1)]),al],scaleX:["N",ca([xr,new _n(1),new _n(1)]),ca([xr,new _n(1)])],scaleY:["N",ca([new _n(1),xr,new _n(1)]),ca([new _n(1),xr])],scaleZ:["N",ca([new _n(1),new _n(1),xr])],scale3d:["NNN",al],skew:["Aa",null,al],skewX:["A",null,ca([xr,Eo])],skewY:["A",null,ca([Eo,xr])],translate:["Tt",ca([xr,xr,Ma]),al],translateX:["T",ca([xr,Ma,Ma]),ca([xr,Ma])],translateY:["T",ca([Ma,xr,Ma]),ca([Ma,xr])],translateZ:["L",ca([Ma,Ma,xr])],translate3d:["TTL",al]};function sE(r){for(var t=[],e=r.length,n=0;n<e;n++){var i=r[n],a=i[0],s=i.slice(1);a==="translate"||a==="skew"?s.length===1&&s.push(0):a==="scale"&&s.length===1&&s.push(s[0]);var o=Yu[a];if(!o)return[];var A=s.map(function(l){return Yn(l)});t.push({t:a,d:A})}return t}function oE(r){if(Array.isArray(r))return sE(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(Fc.lastIndex=0;e=Fc.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=Yu[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var A=[],l=0;l<o.length;l++){var c=s[l],u=o[l],h=void 0;if(c?h={A:function(f){return f.trim()==="0"?Eo:tt(f)},N:an,T:_,L:p}[u.toUpperCase()](c):h={a:Eo,n:A[0],t:Ma}[u],h===void 0)return[];A.push(h)}if(t.push({t:i,d:A}),Fc.lastIndex===r.length)return t}return[]}function hM(r){if(Array.isArray(r))return sE(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(Fc.lastIndex=0;e=Fc.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=Yu[i];if(!a)return[];var s=e[2].split(","),o=a[0];if(o.length<s.length)return[];for(var A=[],l=0;l<o.length;l++){var c=s[l],u=o[l],h=void 0;if(c?h={A:function(f){return f.trim()==="0"?Eo:j(f)},N:Be,T:B,L:E}[u.toUpperCase()](c):h={a:Eo,n:A[0],t:Ma}[u],h===void 0)return[];A.push(h)}if(t.push({t:i,d:A}),Fc.lastIndex===r.length)return t}return[]}function dM(r){var t,e,n,i;switch(r.t){case"rotateX":return i=Un(lt(r.d[0])),[1,0,0,0,0,Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1];case"rotateY":return i=Un(lt(r.d[0])),[Math.cos(i),0,-Math.sin(i),0,0,1,0,0,Math.sin(i),0,Math.cos(i),0,0,0,0,1];case"rotate":case"rotateZ":return i=Un(lt(r.d[0])),[Math.cos(i),Math.sin(i),0,0,-Math.sin(i),Math.cos(i),0,0,0,0,1,0,0,0,0,1];case"rotate3d":t=r.d[0].value,e=r.d[1].value,n=r.d[2].value,i=Un(lt(r.d[3]));var a=t*t+e*e+n*n;if(a===0)t=1,e=0,n=0;else if(a!==1){var s=Math.sqrt(a);t/=s,e/=s,n/=s}var o=Math.sin(i/2),A=o*Math.cos(i/2),l=o*o;return[1-2*(e*e+n*n)*l,2*(t*e*l+n*A),2*(t*n*l-e*A),0,2*(t*e*l-n*A),1-2*(t*t+n*n)*l,2*(e*n*l+t*A),0,2*(t*n*l+e*A),2*(e*n*l-t*A),1-2*(t*t+e*e)*l,0,0,0,0,1];case"scale":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[r.d[0].value,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"scaleY":return[1,0,0,0,0,r.d[0].value,0,0,0,0,1,0,0,0,0,1];case"scaleZ":return[1,0,0,0,0,1,0,0,0,0,r.d[0].value,0,0,0,0,1];case"scale3d":return[r.d[0].value,0,0,0,0,r.d[1].value,0,0,0,0,r.d[2].value,0,0,0,0,1];case"skew":var c=Un(lt(r.d[0])),u=Un(lt(r.d[1]));return[1,Math.tan(u),0,0,Math.tan(c),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Un(lt(r.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Un(lt(r.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return t=Ot(r.d[0],0,null)||0,e=Ot(r.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,e,0,1];case"translateX":return t=Ot(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,0,0,1];case"translateY":return e=Ot(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,e,0,1];case"translateZ":return n=Ot(r.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,n,1];case"translate3d":return t=Ot(r.d[0],0,null)||0,e=Ot(r.d[1],0,null)||0,n=Ot(r.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,t,e,n,1];case"perspective":var h=Ot(r.d[0],0,null)||0,d=h?-1/h:0;return[1,0,0,0,0,1,0,0,0,0,1,d,0,0,0,1];case"matrix":return[r.d[0].value,r.d[1].value,0,0,r.d[2].value,r.d[3].value,0,0,0,0,1,0,r.d[4].value,r.d[5].value,0,1];case"matrix3d":return r.d.map(function(f){return f.value})}}function fM(r,t){return[r[0]*t[0]+r[4]*t[1]+r[8]*t[2]+r[12]*t[3],r[1]*t[0]+r[5]*t[1]+r[9]*t[2]+r[13]*t[3],r[2]*t[0]+r[6]*t[1]+r[10]*t[2]+r[14]*t[3],r[3]*t[0]+r[7]*t[1]+r[11]*t[2]+r[15]*t[3],r[0]*t[4]+r[4]*t[5]+r[8]*t[6]+r[12]*t[7],r[1]*t[4]+r[5]*t[5]+r[9]*t[6]+r[13]*t[7],r[2]*t[4]+r[6]*t[5]+r[10]*t[6]+r[14]*t[7],r[3]*t[4]+r[7]*t[5]+r[11]*t[6]+r[15]*t[7],r[0]*t[8]+r[4]*t[9]+r[8]*t[10]+r[12]*t[11],r[1]*t[8]+r[5]*t[9]+r[9]*t[10]+r[13]*t[11],r[2]*t[8]+r[6]*t[9]+r[10]*t[10]+r[14]*t[11],r[3]*t[8]+r[7]*t[9]+r[11]*t[10]+r[15]*t[11],r[0]*t[12]+r[4]*t[13]+r[8]*t[14]+r[12]*t[15],r[1]*t[12]+r[5]*t[13]+r[9]*t[14]+r[13]*t[15],r[2]*t[12]+r[6]*t[13]+r[10]*t[14]+r[14]*t[15],r[3]*t[12]+r[7]*t[13]+r[11]*t[14]+r[15]*t[15]]}function gM(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(dM).reduce(fM)}function AE(r){var t=[0,0,0],e=[1,1,1],n=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return Pd(gM(r),t,e,n,i,a),[[t,e,n,a,i]]}var vM=function(){function r(n,i){for(var a=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],s=0;s<4;s++)for(var o=0;o<4;o++)for(var A=0;A<4;A++)a[s][o]+=i[s][A]*n[A][o];return a}function t(n){return n[0][2]===0&&n[0][3]===0&&n[1][2]===0&&n[1][3]===0&&n[2][0]===0&&n[2][1]===0&&n[2][2]===1&&n[2][3]===0&&n[3][2]===0&&n[3][3]===1}function e(n,i,a,s,o){for(var A=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],l=0;l<4;l++)A[l][3]=o[l];for(var c=0;c<3;c++)for(var u=0;u<3;u++)A[3][c]+=n[u]*A[u][c];var h=s[0],d=s[1],f=s[2],g=s[3],v=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];v[0][0]=1-2*(d*d+f*f),v[0][1]=2*(h*d-f*g),v[0][2]=2*(h*f+d*g),v[1][0]=2*(h*d+f*g),v[1][1]=1-2*(h*h+f*f),v[1][2]=2*(d*f-h*g),v[2][0]=2*(h*f-d*g),v[2][1]=2*(d*f+h*g),v[2][2]=1-2*(h*h+d*d),A=r(A,v);var m=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(m[2][1]=a[2],A=r(A,m)),a[1]&&(m[2][1]=0,m[2][0]=a[0],A=r(A,m)),a[0]&&(m[2][0]=0,m[1][0]=a[0],A=r(A,m));for(var w=0;w<3;w++)for(var C=0;C<3;C++)A[w][C]*=i[w];return t(A)?[A[0][0],A[0][1],A[1][0],A[1][1],A[3][0],A[3][1]]:A[0].concat(A[1],A[2],A[3])}return e}();function pM(r){return r.toFixed(6).replace(".000000","")}function Xp(r,t){var e,n;return r.decompositionPair!==t&&(r.decompositionPair=t,e=AE(r)),t.decompositionPair!==r&&(t.decompositionPair=r,n=AE(t)),e[0]===null||n[0]===null?[[!1],[!0],function(i){return i?t[0].d:r[0].d}]:(e[0].push(0),n[0].push(1),[e,n,function(i){var a=yM(e[0][3],n[0][3],i[5]),s=vM(i[0],i[1],i[2],a,i[4]),o=s.map(pM).join(",");return o}])}function mM(r,t){for(var e=0,n=0;n<r.length;n++)e+=r[n]*t[n];return e}function yM(r,t,e){var n=mM(r,t);n=hr(n,-1,1);var i=[];if(n===1)i=r;else for(var a=Math.acos(n),s=Math.sin(e*a)*1/Math.sqrt(1-n*n),o=0;o<4;o++)i.push(r[o]*(Math.cos(e*a)-n*s)+t[o]*s);return i}function Jp(r){return r.replace(/[XY]/,"")}function qp(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var wM=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function EM(r,t,e){var n=!1;if(!r.length||!t.length){r.length||(n=!0,r=t,t=[]);for(var i=function(){var at=r[a],At=at.t,pt=at.d,wt=At.substring(0,5)==="scale"?1:0;t.push({t:At,d:pt.map(function(bt){return typeof bt=="number"?Yn(wt):Yn(wt,bt.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],A=[];if(r.length!==t.length){var l=Xp(r,t);s=[l[0]],o=[l[1]],A=[["matrix",[l[2]]]]}else for(var c=0;c<r.length;c++){var u=r[c].t,h=t[c].t,d=r[c].d,f=t[c].d,g=Yu[u],v=Yu[h],m=void 0;if(wM(u,h)){var w=Xp([r[c]],[t[c]]);s.push(w[0]),o.push(w[1]),A.push(["matrix",[w[2]]]);continue}else if(u===h)m=u;else if(g[2]&&v[2]&&Jp(u)===Jp(h))m=Jp(u),d=g[2](d),f=v[2](f);else if(g[1]&&v[1]&&qp(u)===qp(h))m=qp(u),d=g[1](d),f=v[1](f);else{var C=Xp(r,t);s=[C[0]],o=[C[1]],A=[["matrix",[C[2]]]];break}for(var F=[],Q=[],D=[],K=0;K<d.length;K++){var G=dt(d[K],f[K],e,!1,K);F[K]=G[0],Q[K]=G[1],D.push(G[2])}s.push(F),o.push(Q),A.push([m,D])}if(n){var J=s;s=o,o=J}return[s,o,function($){return $.map(function(at,At){var pt=at.map(function(wt,bt){return A[At][1][bt](wt)}).join(",");return A[At][0]==="matrix"&&pt.split(",").length===16&&(A[At][0]="matrix3d"),A[At][0]==="matrix3d"&&pt.split(",").length===6&&(A[At][0]="matrix"),"".concat(A[At][0],"(").concat(pt,")")}).join(" ")}]}var BM=Ln(function(r){if(gn(r)){if(r==="text-anchor")return[Yn(0,"px"),Yn(0,"px")];var t=r.split(" ");return t.length===1&&(t[0]==="top"||t[0]==="bottom"?(t[1]=t[0],t[0]="center"):t[1]="center"),t.length!==2?null:[_(lE(t[0])),_(lE(t[1]))]}return[Yn(r[0]||0,"px"),Yn(r[1]||0,"px")]});function lE(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var $p=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:oe.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:oe.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:oe.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:oe.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:oe.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:oe.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:oe.LENGTH_PERCENTAGE},{n:"lineJoin",inh:!0,l:!0,a:["strokeLinejoin"],k:["miter","bevel","round"],d:"miter"},{n:"lineCap",inh:!0,l:!0,a:["strokeLinecap"],k:["butt","round","square"],d:"butt"},{n:"lineDash",int:!0,inh:!0,k:["none"],a:["strokeDasharray"],syntax:oe.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:oe.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:oe.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:oe.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:oe.Z_INDEX},{n:"visibility",k:["visible","hidden"],ind:!0,inh:!0,int:!0,d:"visible"},{n:"pointerEvents",inh:!0,k:["none","auto","stroke","fill","painted","visible","visiblestroke","visiblefill","visiblepainted","all"],d:"auto"},{n:"filter",ind:!0,l:!0,k:["none"],d:"none",syntax:oe.FILTER},{n:"clipPath",syntax:oe.DEFINED_PATH},{n:"textPath",syntax:oe.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:oe.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:oe.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:oe.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:oe.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:oe.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:oe.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:oe.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:oe.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:oe.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:oe.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"y1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"z1",int:!0,l:!0,syntax:oe.COORDINATE},{n:"x2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"y2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"z2",int:!0,l:!0,syntax:oe.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:oe.PATH,p:50},{n:"points",int:!0,l:!0,syntax:oe.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:oe.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:oe.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:oe.LENGTH_PERCENTAGE},{n:"fontFamily",l:!0,inh:!0,d:"sans-serif"},{n:"fontStyle",l:!0,inh:!0,k:["normal","italic","oblique"],d:"normal"},{n:"fontWeight",l:!0,inh:!0,k:["normal","bold","bolder","lighter"],d:"normal"},{n:"fontVariant",l:!0,inh:!0,k:["normal","small-caps"],d:"normal"},{n:"lineHeight",l:!0,syntax:oe.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:oe.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:oe.NUMBER,d:function(t){return t===Vt.PATH||t===Vt.POLYGON||t===Vt.POLYLINE?"4":"10"}},{n:"wordWrap",l:!0},{n:"wordWrapWidth",l:!0},{n:"maxLines",l:!0},{n:"textOverflow",l:!0,d:"clip"},{n:"leading",l:!0},{n:"textBaseline",l:!0,inh:!0,k:["top","hanging","middle","alphabetic","ideographic","bottom"],d:"alphabetic"},{n:"textAlign",l:!0,inh:!0,k:["start","center","middle","end","left","right"],d:"start"},{n:"markerStart",syntax:oe.MARKER},{n:"markerEnd",syntax:oe.MARKER},{n:"markerMid",syntax:oe.MARKER},{n:"markerStartOffset",syntax:oe.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:oe.LENGTH,l:!0,int:!0,d:"0"}],bM=new Set($p.filter(function(r){return!!r.l}).map(function(r){return r.n})),cE={},xM=function(){function r(t){var e=this;(0,L.Z)(this,r),this.runtime=t,$p.forEach(function(n){e.registerMetadata(n)})}return(0,I.Z)(r,[{key:"registerMetadata",value:function(e){[e.n].concat((0,N.Z)(e.a||[])).forEach(function(n){cE[n]=e})}},{key:"getPropertySyntax",value:function(e){return this.runtime.CSSPropertySyntaxFactory[e]}},{key:"processProperties",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(e.attributes,n);var a=e.parsedStyle.clipPath,s=e.parsedStyle.offsetPath;CM(e,n);var o=!!i.forceUpdateGeometry;if(!o){for(var A in n)if(bM.has(A)){o=!0;break}}var l=uE(e);l.has("fill")&&n.fill&&(e.parsedStyle.fill=nl(n.fill)),l.has("stroke")&&n.stroke&&(e.parsedStyle.stroke=nl(n.stroke)),l.has("shadowColor")&&n.shadowColor&&(e.parsedStyle.shadowColor=nl(n.shadowColor)),l.has("filter")&&n.filter&&(e.parsedStyle.filter=Oe(n.filter)),l.has("radius")&&!Pe(n.radius)&&(e.parsedStyle.radius=Tt(n.radius,4)),l.has("lineDash")&&!Pe(n.lineDash)&&(e.parsedStyle.lineDash=Tt(n.lineDash,"even")),l.has("points")&&n.points&&(e.parsedStyle.points=cM(n.points)),l.has("d")&&n.d===""&&(e.parsedStyle.d=(0,H.Z)({},hs)),l.has("d")&&n.d&&(e.parsedStyle.d=aE(n.d)),l.has("textTransform")&&n.textTransform&&this.runtime.CSSPropertySyntaxFactory[oe.TEXT_TRANSFORM].calculator(null,null,{value:n.textTransform},e,null),l.has("clipPath")&&!Ye(n.clipPath)&&this.runtime.CSSPropertySyntaxFactory[oe.DEFINED_PATH].calculator("clipPath",a,n.clipPath,e,this.runtime),l.has("offsetPath")&&n.offsetPath&&this.runtime.CSSPropertySyntaxFactory[oe.DEFINED_PATH].calculator("offsetPath",s,n.offsetPath,e,this.runtime),l.has("transform")&&n.transform&&(e.parsedStyle.transform=oE(n.transform)),l.has("transformOrigin")&&n.transformOrigin&&(e.parsedStyle.transformOrigin=BM(n.transformOrigin)),l.has("markerStart")&&n.markerStart&&(e.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[oe.MARKER].calculator(null,n.markerStart,n.markerStart,null,null)),l.has("markerEnd")&&n.markerEnd&&(e.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[oe.MARKER].calculator(null,n.markerEnd,n.markerEnd,null,null)),l.has("markerMid")&&n.markerMid&&(e.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[oe.MARKER].calculator("",n.markerMid,n.markerMid,null,null)),l.has("zIndex")&&!Pe(n.zIndex)&&this.runtime.CSSPropertySyntaxFactory[oe.Z_INDEX].postProcessor(e),l.has("offsetDistance")&&!Pe(n.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[oe.OFFSET_DISTANCE].postProcessor(e),l.has("transform")&&n.transform&&this.runtime.CSSPropertySyntaxFactory[oe.TRANSFORM].postProcessor(e),l.has("transformOrigin")&&n.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[oe.TRANSFORM_ORIGIN].postProcessor(e),o&&(e.dirty(!0,!0),i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(e))}},{key:"updateGeometry",value:function(e){var n=e.nodeName,i=this.runtime.geometryUpdaterFactory[n];if(i){var a=e.geometry;a.contentBounds||(a.contentBounds=new jn),a.renderBounds||(a.renderBounds=new jn);var s=e.parsedStyle,o=i.update(s,e),A=o.cx,l=A===void 0?0:A,c=o.cy,u=c===void 0?0:c,h=o.cz,d=h===void 0?0:h,f=o.hwidth,g=f===void 0?0:f,v=o.hheight,m=v===void 0?0:v,w=o.hdepth,C=w===void 0?0:w,F=[Math.abs(g),Math.abs(m),C],Q=s.stroke,D=s.lineWidth,K=D===void 0?1:D,G=s.increasedLineWidthForHitTesting,J=G===void 0?0:G,$=s.shadowType,at=$===void 0?"outer":$,At=s.shadowColor,pt=s.filter,wt=pt===void 0?[]:pt,bt=s.transformOrigin,Rt=[l,u,d];a.contentBounds.update(Rt,F);var Pt=n===Vt.POLYLINE||n===Vt.POLYGON||n===Vt.PATH?Math.SQRT2:.5,xt=Q&&!Q.isNone;if(xt){var Ft=((K||0)+(J||0))*Pt;F[0]+=Ft,F[1]+=Ft}if(a.renderBounds.update(Rt,F),At&&at&&at!=="inner"){var _t=a.renderBounds,Xt=_t.min,ie=_t.max,le=s.shadowBlur,ve=s.shadowOffsetX,xe=s.shadowOffsetY,Qe=le||0,Re=ve||0,nn=xe||0,mn=Xt[0]-Qe+Re,sn=ie[0]+Qe+Re,er=Xt[1]-Qe+nn,kn=ie[1]+Qe+nn;Xt[0]=Math.min(Xt[0],mn),ie[0]=Math.max(ie[0],sn),Xt[1]=Math.min(Xt[1],er),ie[1]=Math.max(ie[1],kn),a.renderBounds.setMinMax(Xt,ie)}wt.forEach(function(Bn){var Ls=Bn.name,ui=Bn.params;if(Ls==="blur"){var Ki=ui[0].value;a.renderBounds.update(a.renderBounds.center,ue(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[Ki,Ki,0]))}else if(Ls==="drop-shadow"){var cn=ui[0].value,Tn=ui[1].value,hn=ui[2].value,Sn=a.renderBounds,Pn=Sn.min,ke=Sn.max,Fn=Pn[0]-hn+cn,En=ke[0]+hn+cn,cr=Pn[1]-hn+Tn,$e=ke[1]+hn+Tn;Pn[0]=Math.min(Pn[0],Fn),ke[0]=Math.max(ke[0],En),Pn[1]=Math.min(Pn[1],cr),ke[1]=Math.max(ke[1],$e),a.renderBounds.setMinMax(Pn,ke)}}),e.geometry.dirty=!1;var Cn=g<0,gr=m<0,va=(Cn?-1:1)*(bt?Ot(bt[0],0,e,!0):0),Hn=(gr?-1:1)*(bt?Ot(bt[1],1,e,!0):0);(va||Hn)&&e.setOrigin(va,Hn)}}},{key:"updateSizeAttenuation",value:function(e,n){e.style.isSizeAttenuation?(e.style.rawLineWidth||(e.style.rawLineWidth=e.style.lineWidth),e.style.lineWidth=(e.style.rawLineWidth||1)/n,e.nodeName===Vt.CIRCLE&&(e.style.rawR||(e.style.rawR=e.style.r),e.style.r=(e.style.rawR||1)/n)):(e.style.rawLineWidth&&(e.style.lineWidth=e.style.rawLineWidth,delete e.style.rawLineWidth),e.nodeName===Vt.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function CM(r,t){var e=uE(r);for(var n in t)e.has(n)&&(r.parsedStyle[n]=t[n])}function uE(r){return r.constructor.PARSED_STYLE_LIST}var SM=function(){function r(){(0,L.Z)(this,r),this.mixer=Ue}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){return lt(i)}}])}(),MM=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a,s){return i instanceof Qi&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,n,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtyToRoot(o)}),i}}])}(),TM=function(){function r(){(0,L.Z)(this,r),this.parser=nl,this.mixer=Yp}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Qi?i.value==="none"?jd:Sc:i}}])}(),FM=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i instanceof Qi?[]:i}}])}();function hE(r){var t=r.parsedStyle,e=t.fontSize;return Pe(e)?null:e}var tm=function(){function r(){(0,L.Z)(this,r),this.mixer=Ue}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a,s){if(ye(i))return i;if(_n.isRelativeUnit(i.unit)){if(i.unit===ge.kPercentage)return 0;if(i.unit===ge.kEms){if(a.parentNode){var o=hE(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===ge.kRems){var A;if(a!=null&&(A=a.ownerDocument)!==null&&A!==void 0&&A.documentElement){var l=hE(a.ownerDocument.documentElement);if(l)return l*=i.value,l}return 0}}else return i.value}}])}(),OM=function(){function r(){(0,L.Z)(this,r),this.mixer=Mn}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),IM=function(){function r(){(0,L.Z)(this,r),this.mixer=Mn}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),LM=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){var s;i instanceof Qi&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),NM=function(){function r(){(0,L.Z)(this,r),this.mixer=Ue}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),kM=function(){function r(){(0,L.Z)(this,r),this.mixer=Ne(0,1)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i.value}},{key:"postProcessor",value:function(e){var n=e.parsedStyle,i=n.offsetPath,a=n.offsetDistance;if(i){var s=i.nodeName;if(s===Vt.LINE||s===Vt.PATH||s===Vt.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),QM=function(){function r(){(0,L.Z)(this,r),this.mixer=Ne(0,1)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),UM=function(){function r(){(0,L.Z)(this,r),this.parser=aE,this.mixer=lM}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i){return i instanceof Qi&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new cs(0,0,0,0)}:i}}])}(),PM=(0,I.Z)(function r(){(0,L.Z)(this,r),this.mixer=uM}),DM=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.mixer=Ne(0,1/0),e}return(0,k.Z)(t,r),(0,I.Z)(t)}(tm),RM=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Qi?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),_M=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){var s=a.getAttribute("text");if(s){var o=s;i.value==="capitalize"?o=s.charAt(0).toUpperCase()+s.slice(1):i.value==="lowercase"?o=s.toLowerCase():i.value==="uppercase"&&(o=s.toUpperCase()),a.parsedStyle.text=o}return i.value}}])}(),S5=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=_slicedToArray(e,2),i=n[1];return i!==void 0}))},em=new WeakMap;function HM(r,t,e){if(r){var n=typeof r=="string"?document.getElementById(r):r;em.has(n)&&em.get(n).destroy(e),em.set(n,t)}}var nm=typeof window!="undefined"&&typeof window.document!="undefined";function GM(r){return!!r.getAttribute}function KM(r,t){for(var e=0,n=r.length;e<n;){var i=e+n>>>1;dE(r[i],t)<0?e=i+1:n=i}return e}function dE(r,t){var e=Number(r.parsedStyle.zIndex||0),n=Number(t.parsedStyle.zIndex||0);if(e===n){var i=r.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(r)-a.indexOf(t)}}return e-n}function fE(r){var t=r;do{var e,n=(e=t.parsedStyle)===null||e===void 0?void 0:e.clipPath;if(n)return t;t=t.parentElement}while(t!==null);return null}var gE="px";function zM(r,t,e){nm&&r.style&&(r.style.width=t+gE,r.style.height=e+gE)}function vE(r,t){if(nm)return document.defaultView.getComputedStyle(r,null).getPropertyValue(t)}function VM(r){var t=vE(r,"width");return t==="auto"?r.offsetWidth:parseFloat(t)}function WM(r){var t=vE(r,"height");return t==="auto"?r.offsetHeight:parseFloat(t)}var ZM=1,jM={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},rm=typeof performance=="object"&&performance.now?performance:Date;function qd(r){return r.nodeName===Vt.FRAGMENT?!0:r.getRootNode().nodeName===Vt.FRAGMENT}function sl(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",t=arguments.length>1?arguments[1]:void 0,e=arguments.length>2?arguments[2]:void 0,n=!1,i=!1,a=!!t&&!t.isNone,s=!!e&&!e.isNone;return r==="visiblepainted"||r==="painted"||r==="auto"?(n=a,i=s):r==="visiblefill"||r==="fill"?n=!0:r==="visiblestroke"||r==="stroke"?i=!0:(r==="visible"||r==="all")&&(n=!0,i=!0),[n,i]}var YM=1,XM=function(){return YM++},js=typeof self=="object"&&self.self===self?self:typeof M.g=="object"&&M.g.global===M.g?M.g:{},JM=Date.now(),qM=function(){return js.performance&&typeof js.performance.now=="function"?js.performance.now():Date.now()-JM},Xu={},pE=Date.now(),$M=function(t){if(typeof t!="function")throw new TypeError("".concat(t," is not a function"));var e=Date.now(),n=e-pE,i=n>16?0:16-n,a=XM();return Xu[a]=t,Object.keys(Xu).length>1||setTimeout(function(){pE=e;var s=Xu;Xu={},Object.keys(s).forEach(function(o){return s[o](qM())})},i),a},tT=function(t){delete Xu[t]},eT=["","webkit","moz","ms","o"],mE=function(t){return typeof t!="string"?$M:t===""?js.requestAnimationFrame:js["".concat(t,"RequestAnimationFrame")]},nT=function(t){return typeof t!="string"?tT:t===""?js.cancelAnimationFrame:js["".concat(t,"CancelAnimationFrame")]||js["".concat(t,"CancelRequestAnimationFrame")]},rT=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n+=1}},yE=rT(eT,function(r){return!!mE(r)}),im=mE(yE),wE=nT(yE);js.requestAnimationFrame=im,js.cancelAnimationFrame=wE;var iT=function(){function r(){(0,L.Z)(this,r),this.callbacks=[]}return(0,I.Z)(r,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(e,n){this.callbacks.push(n)}},{key:"promise",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];return Promise.all(this.callbacks.map(function(a){return a.apply(void 0,n)}))}}])}(),aT=function(){function r(){(0,L.Z)(this,r),this.callbacks=[]}return(0,I.Z)(r,[{key:"tapPromise",value:function(e,n){this.callbacks.push(n)}},{key:"promise",value:function(){var t=(0,Wa.Z)((0,ri.Z)().mark(function n(){var i,a,s,o,A=arguments;return(0,ri.Z)().wrap(function(l){for(;;)switch(l.prev=l.next){case 0:if(!this.callbacks.length){l.next=6;break}return l.next=1,(i=this.callbacks)[0].apply(i,A);case 1:a=l.sent,s=1;case 2:if(!(s<this.callbacks.length)){l.next=5;break}return o=this.callbacks[s],l.next=3,o(a);case 3:a=l.sent;case 4:s++,l.next=2;break;case 5:return l.abrupt("return",a);case 6:return l.abrupt("return",null);case 7:case"end":return l.stop()}},n,this)}));function e(){return t.apply(this,arguments)}return e}()}])}(),ta=function(){function r(){(0,L.Z)(this,r),this.callbacks=[]}return(0,I.Z)(r,[{key:"tap",value:function(e,n){this.callbacks.push(n)}},{key:"call",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];var a=arguments;this.callbacks.forEach(function(s){s.apply(void 0,a)})}}])}(),am=function(){function r(){(0,L.Z)(this,r),this.callbacks=[]}return(0,I.Z)(r,[{key:"tap",value:function(e,n){this.callbacks.push(n)}},{key:"call",value:function(){for(var e=arguments.length,n=new Array(e),i=0;i<e;i++)n[i]=arguments[i];if(this.callbacks.length){for(var a=arguments,s=this.callbacks[0].apply(void 0,a),o=1;o<this.callbacks.length;o++){var A=this.callbacks[o];s=A(s)}return s}return null}}])}(),sT=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],oT=/([\"\'])[^\'\"]+\1/;function EE(r){var t=r.fontSize,e=t===void 0?16:t,n=r.fontFamily,i=n===void 0?"sans-serif":n,a=r.fontStyle,s=a===void 0?"normal":a,o=r.fontVariant,A=o===void 0?"normal":o,l=r.fontWeight,c=l===void 0?"normal":l;return{fontSize:e,fontFamily:i,fontStyle:s,fontVariant:A,fontWeight:c}}var BE=Ln(function(t){for(var e=EE(t),n=e.fontSize,i=e.fontFamily,a=e.fontStyle,s=e.fontVariant,o=e.fontWeight,A=ye(n)&&"".concat(n,"px")||"16px",l=i.split(","),c=l.length-1;c>=0;c--){var u=l[c].trim();!oT.test(u)&&sT.indexOf(u)<0&&(u='"'.concat(u,'"')),l[c]=u}return"".concat(a," ").concat(s," ").concat(o," ").concat(A," ").concat(l.join(","))},function(r){var t=EE(r),e=t.fontSize,n=t.fontFamily,i=t.fontStyle,a=t.fontVariant,s=t.fontWeight;return"".concat(i,"_").concat(a,"_").concat(s,"_").concat(e,"_").concat(n)}),AT=1e-6,Ju=function(t){return Math.max(t,AT)};function sm(r,t,e){return Ie(r),r[4]=Math.tan(t),r[1]=Math.tan(e),r}var Pr=te(),lT=te(),cT={scale:function(t){Dn(Pr,[t[0].value,t[1].value,1].map(function(e){return Ju(e)}))},scaleX:function(t){Dn(Pr,[t[0].value,1,1].map(function(e){return Ju(e)}))},scaleY:function(t){Dn(Pr,[1,t[0].value,1].map(function(e){return Ju(e)}))},scaleZ:function(t){Dn(Pr,[1,1,t[0].value].map(function(e){return Ju(e)}))},scale3d:function(t){Dn(Pr,[t[0].value,t[1].value,t[2].value].map(function(e){return Ju(e)}))},translate:function(t){Tr(Pr,[t[0].value,t[1].value,0])},translateX:function(t){Tr(Pr,[t[0].value,0,0])},translateY:function(t){Tr(Pr,[0,t[0].value,0])},translateZ:function(t){Tr(Pr,[0,0,t[0].value])},translate3d:function(t){Tr(Pr,[t[0].value,t[1].value,t[2].value])},rotate:function(t){wr(Pr,Un(lt(t[0])))},rotateX:function(t){Ji(Pr,Un(lt(t[0])))},rotateY:function(t){fn(Pr,Un(lt(t[0])))},rotateZ:function(t){wr(Pr,Un(lt(t[0])))},rotate3d:function(t){Xi(Pr,Un(lt(t[3])),[t[0].value,t[1].value,t[2].value])},skew:function(t){sm(Pr,Un(t[0].value),Un(t[1].value))},skewX:function(t){sm(Pr,Un(t[0].value),0)},skewY:function(t){sm(Pr,0,Un(t[0].value))},matrix:function(t){Wn(Pr,t[0].value,t[1].value,0,0,t[2].value,t[3].value,0,0,0,0,1,0,t[4].value,t[5].value,0,1)},matrix3d:function(t){Wn.apply(O,[Pr].concat((0,N.Z)(t.map(function(e){return e.value}))))}},uT=Gt(1,1,1),hT=Ct(),bE={translate:function(t,e){ae.sceneGraphService.setLocalScale(t,uT,!1),ae.sceneGraphService.setLocalEulerAngles(t,hT,void 0,void 0,!1),ae.sceneGraphService.setLocalPosition(t,[e[0].value,e[1].value,0],!1),ae.sceneGraphService.dirtyLocalTransform(t,t.transformable)}};function xE(r,t){if(r.length){if(r.length===1&&bE[r[0].t]){bE[r[0].t](t,r[0].d);return}for(var e=Ie(lT),n=0;n<r.length;n++){var i=r[n],a=i.t,s=i.d,o=cT[a];o&&(o(s),ho(e,e,Pr))}t.setLocalTransform(e)}else t.resetLocalTransform();return t.getLocalTransform()}var dT=function(){function r(){(0,L.Z)(this,r),this.parser=hM,this.mixer=EM}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Qi?[]:i}},{key:"postProcessor",value:function(e){xE(e.parsedStyle.transform,e)}}])}(),fT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"postProcessor",value:function(e){var n=e.parsedStyle.transformOrigin;n[0].unit===ge.kPixels&&n[1].unit===ge.kPixels?e.setOrigin(n[0].value,n[1].value):e.getGeometryBounds()}}])}(),gT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i.value}},{key:"postProcessor",value:function(e){if(e.parentNode){var n=e.parentNode,i=n.renderable,a=n.sortable;i&&n.dirty(),a&&(a.dirty=!0,a.dirtyReason=mc.Z_INDEX_CHANGED)}}}])}(),vT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e,n){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,A=e.r,l=A===void 0?0:A;return{cx:a,cy:o,hwidth:l,hheight:l}}}])}(),pT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e,n){var i=e.cx,a=i===void 0?0:i,s=e.cy,o=s===void 0?0:s,A=e.rx,l=A===void 0?0:A,c=e.ry,u=c===void 0?0:c;return{cx:a,cy:o,hwidth:l,hheight:u}}}])}(),mT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e){var n=e.x1,i=e.y1,a=e.x2,s=e.y2,o=Math.min(n,a),A=Math.max(n,a),l=Math.min(i,s),c=Math.max(i,s),u=A-o,h=c-l,d=u/2,f=h/2;return{cx:o+d,cy:l+f,hwidth:d,hheight:f}}}])}(),yT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e){var n=e.d,i=n.rect,a=i.x,s=i.y,o=i.width,A=i.height,l=o/2,c=A/2;return{cx:a+l,cy:s+c,hwidth:l,hheight:c}}}])}(),wT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e){if(e.points&&Ni(e.points.points)){var n=e.points.points,i=Math.min.apply(Math,(0,N.Z)(n.map(function(h){return h[0]}))),a=Math.max.apply(Math,(0,N.Z)(n.map(function(h){return h[0]}))),s=Math.min.apply(Math,(0,N.Z)(n.map(function(h){return h[1]}))),o=Math.max.apply(Math,(0,N.Z)(n.map(function(h){return h[1]}))),A=a-i,l=o-s,c=A/2,u=l/2;return{cx:i+c,cy:s+u,hwidth:c,hheight:u}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),ET=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,A=e.src,l=e.width,c=l===void 0?0:l,u=e.height,h=u===void 0?0:u,d=c,f=h;return A&&!gn(A)&&(d||(d=A.width,e.width=d),f||(f=A.height,e.height=f)),{cx:a+d/2,cy:o+f/2,hwidth:d/2,hheight:f/2}}}])}(),BT=function(){function r(t){(0,L.Z)(this,r),this.globalRuntime=t}return(0,I.Z)(r,[{key:"isReadyToMeasure",value:function(e,n){var i=e.text;return i}},{key:"update",value:function(e,n){var i,a=e.text,s=e.textAlign,o=s===void 0?"start":s,A=e.lineWidth,l=A===void 0?1:A,c=e.textBaseline,u=c===void 0?"alphabetic":c,h=e.dx,d=h===void 0?0:h,f=e.dy,g=f===void 0?0:f,v=e.x,m=v===void 0?0:v,w=e.y,C=w===void 0?0:w;if(!this.isReadyToMeasure(e,n))return e.metrics={font:"",width:0,height:0,lines:[],lineWidths:[],lineHeight:0,maxLineWidth:0,fontProperties:{ascent:0,descent:0,fontSize:0},lineMetrics:[]},{hwidth:0,hheight:0,cx:0,cy:0};var F=(n==null||(i=n.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},Q=F.offscreenCanvas,D=this.globalRuntime.textService.measureText(a,e,Q);e.metrics=D;var K=D.width,G=D.height,J=K/2,$=G/2,at=m+J;o==="center"||o==="middle"?at+=l/2-J:(o==="right"||o==="end")&&(at+=l-J*2);var At=C-$;return u==="middle"?At+=$:u==="top"||u==="hanging"?At+=$*2:u==="alphabetic"||(u==="bottom"||u==="ideographic")&&(At+=0),d&&(at+=d),g&&(At+=g),{cx:at,cy:At,hwidth:J,hheight:$}}}])}(),bT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e,n){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),xT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"update",value:function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,A=e.width,l=A===void 0?0:A,c=e.height,u=c===void 0?0:c;return{cx:a+l/2,cy:o+u/2,hwidth:l/2,hheight:u/2}}}])}();function M5(r){return!!r.type}var $d=function(){function r(t){(0,L.Z)(this,r),this.eventPhase=r.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new ii,this.page=new ii,this.canvas=new ii,this.viewport=new ii,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return(0,I.Z)(r,[{key:"name",get:function(){return this.type}},{key:"layerX",get:function(){return this.layer.x}},{key:"layerY",get:function(){return this.layer.y}},{key:"pageX",get:function(){return this.page.x}},{key:"pageY",get:function(){return this.page.y}},{key:"x",get:function(){return this.canvas.x}},{key:"y",get:function(){return this.canvas.y}},{key:"canvasX",get:function(){return this.canvas.x}},{key:"canvasY",get:function(){return this.canvas.y}},{key:"viewportX",get:function(){return this.viewport.x}},{key:"viewportY",get:function(){return this.viewport.y}},{key:"composedPath",value:function(){return this.manager&&(!this.path||this.path[0]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}},{key:"propagationPath",get:function(){return this.composedPath()}},{key:"preventDefault",value:function(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}},{key:"stopImmediatePropagation",value:function(){this.propagationImmediatelyStopped=!0}},{key:"stopPropagation",value:function(){this.propagationStopped=!0}},{key:"initEvent",value:function(){}},{key:"initUIEvent",value:function(){}},{key:"clone",value:function(){throw new Error(On)}}])}(),CE=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.client=new ii,e.movement=new ii,e.offset=new ii,e.global=new ii,e.screen=new ii,e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"clientX",get:function(){return this.client.x}},{key:"clientY",get:function(){return this.client.y}},{key:"movementX",get:function(){return this.movement.x}},{key:"movementY",get:function(){return this.movement.y}},{key:"offsetX",get:function(){return this.offset.x}},{key:"offsetY",get:function(){return this.offset.y}},{key:"globalX",get:function(){return this.global.x}},{key:"globalY",get:function(){return this.global.y}},{key:"screenX",get:function(){return this.screen.x}},{key:"screenY",get:function(){return this.screen.y}},{key:"getModifierState",value:function(n){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(n)}},{key:"initMouseEvent",value:function(){throw new Error(On)}}])}($d),tf=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"getCoalescedEvents",value:function(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}},{key:"getPredictedEvents",value:function(){throw new Error("getPredictedEvents is not supported!")}},{key:"clone",value:function(){return this.manager.clonePointerEvent(this)}}])}(CE),om=function(r){function t(){return(0,L.Z)(this,t),(0,P.Z)(this,t,arguments)}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(CE),Vr=function(r){function t(e,n){var i;return(0,L.Z)(this,t),i=(0,P.Z)(this,t,[null]),i.type=e,i.detail=n==null?void 0:n.detail,n&&!("detail"in n)&&(i.detail=n),Object.assign(i,n),i}return(0,k.Z)(t,r),(0,I.Z)(t)}($d),SE=function(){function r(){(0,L.Z)(this,r),this.emitter=new V}return(0,I.Z)(r,[{key:"on",value:function(e,n,i){return this.addEventListener(e,n,i),this}},{key:"addEventListener",value:function(e,n,i){var a=!1,s=!1;if(Jo(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var A=i.once;s=A===void 0?!1:A}a&&(e+="capture"),n=Wt(n)?n:n.handleEvent;var l=Wt(n)?void 0:n;return s?this.emitter.once(e,n,l):this.emitter.on(e,n,l),this}},{key:"off",value:function(e,n,i){return e?this.removeEventListener(e,n,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var e;(e=this.emitter)===null||e===void 0||e.removeAllListeners()}},{key:"removeEventListener",value:function(e,n,i){var a;if(!this.emitter)return this;var s=Jo(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),n=Wt(n)?n:(a=n)===null||a===void 0?void 0:a.handleEvent;var o=Wt(n)?void 0:n;return this.emitter.off(e,n,o),this}},{key:"emit",value:function(e,n){this.dispatchEvent(new Vr(e,n))}},{key:"dispatchEventToSelf",value:function(e){e.target||(e.target=this),e.currentTarget=this,this.emitter.emit(e.type,e)}},{key:"dispatchEvent",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0;if(i)return this.dispatchEventToSelf(e),!0;var a;if(this.document)a=this;else if(this.defaultView)a=this.defaultView;else{var s;a=(s=this.ownerDocument)===null||s===void 0?void 0:s.defaultView}if(a){if(e.manager=a.getEventService(),!e.manager)return!1;e.defaultPrevented=!1,e.path?e.path.length=0:e.page=[],n||(e.target=this),e.manager.dispatchEvent(e,e.type,n)}else this.dispatchEventToSelf(e);return!e.defaultPrevented}}])}(),vr=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.shadow=!1,e.ownerDocument=null,e.isConnected=!1,e.baseURI="",e.childNodes=[],e.nodeType=0,e.nodeName="",e.nodeValue=null,e.mutations=void 0,e.parentNode=null,e.destroyed=!1,e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"textContent",get:function(){var n="";this.nodeName===Vt.TEXT&&(n+=this.style.text);var i=(0,Gs.Z)(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Vt.TEXT?n+=s.nodeValue:n+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return n},set:function(n){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Vt.TEXT&&(this.style.text="".concat(n))}},{key:"getRootNode",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(n):n.composed&&this.host?this.host.getRootNode(n):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(n){throw new Error(On)}},{key:"lookupNamespaceURI",value:function(n){throw new Error(On)}},{key:"lookupPrefix",value:function(n){throw new Error(On)}},{key:"normalize",value:function(){throw new Error(On)}},{key:"isEqualNode",value:function(n){return this===n}},{key:"isSameNode",value:function(n){return this.isEqualNode(n)}},{key:"parent",get:function(){return this.parentNode}},{key:"parentElement",get:function(){return null}},{key:"nextSibling",get:function(){return null}},{key:"previousSibling",get:function(){return null}},{key:"firstChild",get:function(){return this.childNodes.length>0?this.childNodes[0]:null}},{key:"lastChild",get:function(){return this.childNodes.length>0?this.childNodes[this.childNodes.length-1]:null}},{key:"compareDocumentPosition",value:function(n){if(n===this)return 0;for(var i=n,a=this,s=[i],o=[a];(A=i.parentNode)!==null&&A!==void 0?A:a.parentNode;){var A;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return t.DOCUMENT_POSITION_DISCONNECTED|t.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|t.DOCUMENT_POSITION_PRECEDING;var l=s.length>o.length?s:o,c=l===s?o:s;if(l[l.length-c.length]===c[0])return l===s?t.DOCUMENT_POSITION_CONTAINED_BY|t.DOCUMENT_POSITION_FOLLOWING:t.DOCUMENT_POSITION_CONTAINS|t.DOCUMENT_POSITION_PRECEDING;for(var u=l.length-c.length,h=c.length-1;h>=0;h--){var d=c[h],f=l[u+h];if(f!==d){var g=d.parentNode.childNodes;return g.indexOf(d)<g.indexOf(f)?c===s?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING:l===s?t.DOCUMENT_POSITION_PRECEDING:t.DOCUMENT_POSITION_FOLLOWING}}return t.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(n){return this.contains(n)}},{key:"contains",value:function(n){for(var i=n;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(n){for(var i=this;n>0&&i;)i=i.parentNode,n--;return i}},{key:"forEach",value:function(n){for(var i=[this];i.length>0;){var a=i.pop(),s=n(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(n){return!!n.childNodes}}])}(SE);vr.DOCUMENT_POSITION_DISCONNECTED=1,vr.DOCUMENT_POSITION_PRECEDING=2,vr.DOCUMENT_POSITION_FOLLOWING=4,vr.DOCUMENT_POSITION_CONTAINS=8,vr.DOCUMENT_POSITION_CONTAINED_BY=16,vr.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var CT=2048,ST=function(){function r(t,e){var n=this;(0,L.Z)(this,r),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=te(),this.tmpVec3=Ct(),this.onPointerDown=function(i){var a=n.createPointerEvent(i);if(n.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")n.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var s=a.button===2;n.dispatchEvent(a,s?"rightdown":"mousedown")}var o=n.trackingData(i.pointerId);o.pressTargetsByButton[i.button]=a.composedPath(),n.freeEvent(a)},this.onPointerUp=function(i){var a=rm.now(),s=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);if(n.dispatchEvent(s,"pointerup"),s.pointerType==="touch")n.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var o=s.button===2;n.dispatchEvent(s,o?"rightup":"mouseup")}var A=n.trackingData(i.pointerId),l=n.findMountedTarget(A.pressTargetsByButton[i.button]),c=l;if(l&&!s.composedPath().includes(l)){for(var u=l;u&&!s.composedPath().includes(u);){if(s.currentTarget=u,n.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")n.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var h=s.button===2;n.notifyTarget(s,h?"rightupoutside":"mouseupoutside")}vr.isNode(u)&&(u=u.parentNode)}delete A.pressTargetsByButton[i.button],c=u}if(c){var d,f=n.clonePointerEvent(s,"click");f.target=c,f.path=[],A.clicksByButton[i.button]||(A.clicksByButton[i.button]={clickCount:0,target:f.target,timeStamp:a});var g=n.context.renderingContext.root.ownerDocument.defaultView,v=A.clicksByButton[i.button];v.target===f.target&&a-v.timeStamp<g.getConfig().dblClickSpeed?++v.clickCount:v.clickCount=1,v.target=f.target,v.timeStamp=a,f.detail=v.clickCount,(d=s.detail)!==null&&d!==void 0&&d.preventClick||(!n.context.config.useNativeClickEvent&&(f.pointerType==="mouse"||f.pointerType==="touch")&&n.dispatchEvent(f,"click"),n.dispatchEvent(f,"pointertap")),n.freeEvent(f)}n.freeEvent(s)},this.onPointerMove=function(i){var a=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0),s=a.pointerType==="mouse"||a.pointerType==="pen",o=n.trackingData(i.pointerId),A=n.findMountedTarget(o.overTargets);if(o.overTargets&&A!==a.target){var l=i.type==="mousemove"?"mouseout":"pointerout",c=n.createPointerEvent(i,l,A||void 0);if(n.dispatchEvent(c,"pointerout"),s&&n.dispatchEvent(c,"mouseout"),!a.composedPath().includes(A)){var u=n.createPointerEvent(i,"pointerleave",A||void 0);for(u.eventPhase=u.AT_TARGET;u.target&&!a.composedPath().includes(u.target);)u.currentTarget=u.target,n.notifyTarget(u),s&&n.notifyTarget(u,"mouseleave"),vr.isNode(u.target)&&(u.target=u.target.parentNode);n.freeEvent(u)}n.freeEvent(c)}if(A!==a.target){var h=i.type==="mousemove"?"mouseover":"pointerover",d=n.clonePointerEvent(a,h);n.dispatchEvent(d,"pointerover"),s&&n.dispatchEvent(d,"mouseover");for(var f=A&&vr.isNode(A)&&A.parentNode;f&&f!==(vr.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==a.target;)f=f.parentNode;var g=!f||f===(vr.isNode(n.rootTarget)&&n.rootTarget.parentNode);if(g){var v=n.clonePointerEvent(a,"pointerenter");for(v.eventPhase=v.AT_TARGET;v.target&&v.target!==A&&v.target!==(vr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)v.currentTarget=v.target,n.notifyTarget(v),s&&n.notifyTarget(v,"mouseenter"),vr.isNode(v.target)&&(v.target=v.target.parentNode);n.freeEvent(v)}n.freeEvent(d)}n.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&n.dispatchEvent(a,"touchmove"),s&&(n.dispatchEvent(a,"mousemove"),n.cursor=n.getCursor(a.target)),o.overTargets=a.composedPath(),n.freeEvent(a)},this.onPointerOut=function(i){var a=n.trackingData(i.pointerId);if(a.overTargets){var s=i.pointerType==="mouse"||i.pointerType==="pen",o=n.findMountedTarget(a.overTargets),A=n.createPointerEvent(i,"pointerout",o||void 0);n.dispatchEvent(A),s&&n.dispatchEvent(A,"mouseout");var l=n.createPointerEvent(i,"pointerleave",o||void 0);for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(vr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)l.currentTarget=l.target,n.notifyTarget(l),s&&n.notifyTarget(l,"mouseleave"),vr.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=null,n.freeEvent(A),n.freeEvent(l)}n.cursor=null},this.onPointerOver=function(i){var a=n.trackingData(i.pointerId),s=n.createPointerEvent(i),o=s.pointerType==="mouse"||s.pointerType==="pen";n.dispatchEvent(s,"pointerover"),o&&n.dispatchEvent(s,"mouseover"),s.pointerType==="mouse"&&(n.cursor=n.getCursor(s.target));var A=n.clonePointerEvent(s,"pointerenter");for(A.eventPhase=A.AT_TARGET;A.target&&A.target!==(vr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)A.currentTarget=A.target,n.notifyTarget(A),o&&n.notifyTarget(A,"mouseenter"),vr.isNode(A.target)&&(A.target=A.target.parentNode);a.overTargets=s.composedPath(),n.freeEvent(s),n.freeEvent(A)},this.onPointerUpOutside=function(i){var a=n.trackingData(i.pointerId),s=n.findMountedTarget(a.pressTargetsByButton[i.button]),o=n.createPointerEvent(i);if(s){for(var A=s;A;)o.currentTarget=A,n.notifyTarget(o,"pointerupoutside"),o.pointerType==="touch"||(o.pointerType==="mouse"||o.pointerType==="pen")&&n.notifyTarget(o,o.button===2?"rightupoutside":"mouseupoutside"),vr.isNode(A)&&(A=A.parentNode);delete a.pressTargetsByButton[i.button]}n.freeEvent(o)},this.onWheel=function(i){var a=n.createWheelEvent(i);n.dispatchEvent(a),n.freeEvent(a)},this.onClick=function(i){if(n.context.config.useNativeClickEvent){var a=n.createPointerEvent(i);n.dispatchEvent(a),n.freeEvent(a)}},this.onPointerCancel=function(i){var a=n.createPointerEvent(i,void 0,void 0,n.context.config.alwaysTriggerPointerEventOnCanvas?n.rootTarget:void 0);n.dispatchEvent(a),n.freeEvent(a)},this.globalRuntime=t,this.context=e}return(0,I.Z)(r,[{key:"init",value:function(){this.rootTarget=this.context.renderingContext.root.parentNode,this.addEventMapping("pointerdown",this.onPointerDown),this.addEventMapping("pointerup",this.onPointerUp),this.addEventMapping("pointermove",this.onPointerMove),this.addEventMapping("pointerout",this.onPointerOut),this.addEventMapping("pointerleave",this.onPointerOut),this.addEventMapping("pointercancel",this.onPointerCancel),this.addEventMapping("pointerover",this.onPointerOver),this.addEventMapping("pointerupoutside",this.onPointerUpOutside),this.addEventMapping("wheel",this.onWheel),this.addEventMapping("click",this.onClick)}},{key:"destroy",value:function(){this.mappingTable={},this.mappingState={},this.eventPool.clear()}},{key:"getScale",value:function(){var e=this.context.contextService.getBoundingClientRect(),n=1,i=1,a=this.context.contextService.getDomElement();if(a&&e){var s=a.offsetWidth,o=a.offsetHeight;s&&o&&(n=e.width/s,i=e.height/o)}return{scaleX:n,scaleY:i,bbox:e}}},{key:"client2Viewport",value:function(e){var n=this.getScale(),i=n.scaleX,a=n.scaleY,s=n.bbox;return new ii((e.x-((s==null?void 0:s.left)||0))/i,(e.y-((s==null?void 0:s.top)||0))/a)}},{key:"viewport2Client",value:function(e){var n=this.getScale(),i=n.scaleX,a=n.scaleY,s=n.bbox;return new ii((e.x+((s==null?void 0:s.left)||0))*i,(e.y+((s==null?void 0:s.top)||0))*a)}},{key:"viewport2Canvas",value:function(e){var n=e.x,i=e.y,a=this.rootTarget.defaultView,s=a.getCamera(),o=this.context.config,A=o.width,l=o.height,c=s.getPerspectiveInverse(),u=s.getWorldTransform(),h=he(this.tmpMatrix,u,c),d=de(this.tmpVec3,n/A*2-1,(1-i/l)*2-1,0);return me(d,d,h),new ii(d[0],d[1])}},{key:"canvas2Viewport",value:function(e){var n=this.rootTarget.defaultView,i=n.getCamera(),a=i.getPerspective(),s=i.getViewTransform(),o=he(this.tmpMatrix,a,s),A=de(this.tmpVec3,e.x,e.y,0);me(this.tmpVec3,this.tmpVec3,o);var l=this.context.config,c=l.width,u=l.height;return new ii((A[0]+1)/2*c,(1-(A[1]+1)/2)*u)}},{key:"setPickHandler",value:function(e){this.pickHandler=e}},{key:"addEventMapping",value:function(e,n){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:n,priority:0}),this.mappingTable[e].sort(function(i,a){return i.priority-a.priority})}},{key:"mapEvent",value:function(e){if(this.rootTarget){var n=this.mappingTable[e.type];if(n)for(var i=0,a=n.length;i<a;i++)n[i].fn(e);else console.warn("[EventService]: Event mapping not defined for ".concat(e.type))}}},{key:"dispatchEvent",value:function(e,n,i){if(!i)e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,n);else{e.eventPhase=e.AT_TARGET;var a=this.rootTarget.defaultView||null;e.currentTarget=a,this.notifyListeners(e,n)}}},{key:"propagate",value:function(e,n){if(e.target){var i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(var a=i.length-1;a>=1;a--)if(e.currentTarget=i[a],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,n),!(e.propagationStopped||e.propagationImmediatelyStopped)){var s=i.indexOf(e.currentTarget);e.eventPhase=e.BUBBLING_PHASE;for(var o=s+1;o<i.length;o++)if(e.currentTarget=i[o],this.notifyTarget(e,n),e.propagationStopped||e.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(e){var n=[e],i=this.rootTarget.defaultView||null;if(i&&i===e)return n.unshift(i.document),n;for(var a=0;a<CT&&e!==this.rootTarget;a++)vr.isNode(e)&&e.parentNode&&(n.push(e.parentNode),e=e.parentNode);return i&&n.push(i),n}},{key:"hitTest",value:function(e){var n=e.viewportX,i=e.viewportY,a=this.context.config,s=a.width,o=a.height,A=a.disableHitTesting;return n<0||i<0||n>s||i>o?null:!A&&this.pickHandler(e)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(e,n){var i,a=n==null?void 0:n.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=n.composedPath()[0]),a){if(a===e)return!0;if(e&&e.contains)return e.contains(a)}return n!=null&&n.composedPath?n.composedPath().indexOf(e)>-1:!1}},{key:"getExistedHTML",value:function(e){if(e.nativeEvent.composedPath)for(var n=0,i=e.nativeEvent.composedPath();n<i.length;n++){var a=i[n],s=this.nativeHTMLMap.get(a);if(s)return s}return null}},{key:"pickTarget",value:function(e){return this.hitTest({clientX:e.clientX,clientY:e.clientY,viewportX:e.viewportX,viewportY:e.viewportY,x:e.canvasX,y:e.canvasY})}},{key:"createPointerEvent",value:function(e,n,i,a){var s=this.allocateEvent(tf);this.copyPointerData(e,s),this.copyMouseData(e,s),this.copyData(e,s),s.nativeEvent=e.nativeEvent,s.originalEvent=e;var o=this.getExistedHTML(s),A=this.context.contextService.getDomElement();return s.target=i!=null?i:o||this.isNativeEventFromCanvas(A,s.nativeEvent)&&this.pickTarget(s)||a,typeof n=="string"&&(s.type=n),s}},{key:"createWheelEvent",value:function(e){var n=this.allocateEvent(om);this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.nativeEvent=e.nativeEvent,n.originalEvent=e;var i=this.getExistedHTML(n),a=this.context.contextService.getDomElement();return n.target=i||this.isNativeEventFromCanvas(a,n.nativeEvent)&&this.pickTarget(n),n}},{key:"trackingData",value:function(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}},{key:"cloneWheelEvent",value:function(e){var n=this.allocateEvent(om);return n.nativeEvent=e.nativeEvent,n.originalEvent=e.originalEvent,this.copyWheelData(e,n),this.copyMouseData(e,n),this.copyData(e,n),n.target=e.target,n.path=e.composedPath().slice(),n.type=e.type,n}},{key:"clonePointerEvent",value:function(e,n){var i=this.allocateEvent(tf);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=n!=null?n:i.type,i}},{key:"copyPointerData",value:function(e,n){n.pointerId=e.pointerId,n.width=e.width,n.height=e.height,n.isPrimary=e.isPrimary,n.pointerType=e.pointerType,n.pressure=e.pressure,n.tangentialPressure=e.tangentialPressure,n.tiltX=e.tiltX,n.tiltY=e.tiltY,n.twist=e.twist}},{key:"copyMouseData",value:function(e,n){n.altKey=e.altKey,n.button=e.button,n.buttons=e.buttons,n.ctrlKey=e.ctrlKey,n.metaKey=e.metaKey,n.shiftKey=e.shiftKey,n.client.copyFrom(e.client),n.movement.copyFrom(e.movement),n.canvas.copyFrom(e.canvas),n.screen.copyFrom(e.screen),n.global.copyFrom(e.global),n.offset.copyFrom(e.offset)}},{key:"copyWheelData",value:function(e,n){n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ}},{key:"copyData",value:function(e,n){n.isTrusted=e.isTrusted,n.timeStamp=rm.now(),n.type=e.type,n.detail=e.detail,n.view=e.view,n.page.copyFrom(e.page),n.viewport.copyFrom(e.viewport)}},{key:"allocateEvent",value:function(e){this.eventPool.has(e)||this.eventPool.set(e,[]);var n=this.eventPool.get(e).pop()||new e(this);return n.eventPhase=n.NONE,n.currentTarget=null,n.path=[],n.target=null,n}},{key:"freeEvent",value:function(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var n=e.constructor;this.eventPool.has(n)||this.eventPool.set(n,[]),this.eventPool.get(n).push(e)}},{key:"notifyTarget",value:function(e,n){n=n!=null?n:e.type;var i=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?"".concat(n,"capture"):n;this.notifyListeners(e,i),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,n)}},{key:"notifyListeners",value:function(e,n){var i=e.currentTarget.emitter,a=i._events[n];if(a)if("fn"in a)a.once&&i.removeListener(n,a.fn,void 0,!0),a.fn.call(e.currentTarget||a.context,e);else for(var s=0;s<a.length&&!e.propagationImmediatelyStopped;s++)a[s].once&&i.removeListener(n,a[s].fn,void 0,!0),a[s].fn.call(e.currentTarget||a[s].context,e)}},{key:"findMountedTarget",value:function(e){if(!e)return null;for(var n=e[e.length-1],i=e.length-2;i>=0;i--){var a=e[i];if(a===this.rootTarget||vr.isNode(a)&&a.parentNode===n)n=e[i];else break}return n}},{key:"getCursor",value:function(e){for(var n=e;n;){var i=GM(n)&&n.getAttribute("cursor");if(i)return i;n=vr.isNode(n)&&n.parentNode}}}])}(),Am=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"getOrCreateCanvas",value:function(e,n){if(this.canvas)return this.canvas;if(e||ae.offscreenCanvas)this.canvas=e||ae.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,H.Z)({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,H.Z)({willReadFrequently:!0},n)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(i){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,H.Z)({willReadFrequently:!0},n))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(e,n){return this.context?this.context:(this.getOrCreateCanvas(e,n),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(e){}try{return document.createElement("canvas")}catch(e){}return null}}])}(),Oc=function(r){return r[r.CAMERA_CHANGED=0]="CAMERA_CHANGED",r[r.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",r[r.NONE=2]="NONE",r}({}),MT=function(){function r(t,e){(0,L.Z)(this,r),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ta,initAsync:new iT,dirtycheck:new am,cull:new am,beginFrame:new ta,beforeRender:new ta,render:new ta,afterRender:new ta,endFrame:new ta,destroy:new ta,pick:new aT,pickSync:new am,pointerDown:new ta,pointerUp:new ta,pointerMove:new ta,pointerOut:new ta,pointerOver:new ta,pointerWheel:new ta,pointerCancel:new ta,click:new ta},this.globalRuntime=t,this.context=e}return(0,I.Z)(r,[{key:"init",value:function(e){var n=this,i=(0,H.Z)((0,H.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,n.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,e()):this.hooks.initAsync.promise().then(function(){n.inited=!0,e()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var e=this.context.config.renderer,n=e.getConfig(),i=n.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(Oc.CAMERA_CHANGED)}},{key:"render",value:function(e,n,i){var a=this,s=e.getConfig(),o=this.context.renderingContext;if(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.globalRuntime.sceneGraphService.syncHierarchy(o.root),this.globalRuntime.sceneGraphService.notifyMutationObservers(e),o.renderReasons.size&&this.inited){o.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var A=o.renderReasons.size===1&&o.renderReasons.has(Oc.CAMERA_CHANGED),l=!s.disableRenderHooks||!A;l&&this.renderDisplayObject(o.root,s,o),this.hooks.beginFrame.call(n),l&&o.renderListCurrentFrame.forEach(function(c){a.hooks.beforeRender.call(c),a.hooks.render.call(c),a.hooks.afterRender.call(c)}),this.hooks.endFrame.call(n),o.renderListCurrentFrame=[],o.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(e,n,i){var a=this,s=n.renderer.getConfig(),o=s.enableDirtyCheck,A=s.enableCulling;function l(g){var v=g.renderable,m=g.sortable,w=o?v.dirty||i.dirtyRectangleRenderingDisabled?g:null:g,C=null;w&&(C=A?a.hooks.cull.call(w,a.context.camera):w,C&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(C))),g.dirty(!1),m.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,m.dirty&&(a.sort(g,m),m.dirty=!1,m.dirtyChildren=[],m.dirtyReason=void 0)}for(var c=[e];c.length>0;){var u,h=c.pop();l(h);for(var d=((u=h.sortable)===null||u===void 0||(u=u.sorted)===null||u===void 0?void 0:u.length)>0?h.sortable.sorted:h.childNodes,f=d.length-1;f>=0;f--)c.push(d[f])}}},{key:"sort",value:function(e,n){var i,a;(n==null||(i=n.sorted)===null||i===void 0?void 0:i.length)>0&&n.dirtyReason!==mc.Z_INDEX_CHANGED?n.dirtyChildren.forEach(function(s){var o=n.sorted.indexOf(s);o>-1&&n.sorted.splice(o,1);var A=e.childNodes.indexOf(s);if(A>-1)if(n.sorted.length===0)n.sorted.push(s);else{var l=KM(n.sorted,s);n.sorted.splice(l,0,s)}}):n.sorted=e.childNodes.slice().sort(dE),((a=n.sorted)===null||a===void 0?void 0:a.length)>0&&e.childNodes.filter(function(s){return s.parsedStyle.zIndex}).length===0&&(n.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirty",value:function(){this.context.renderingContext.renderReasons.add(Oc.DISPLAY_OBJECT_CHANGED)}}])}(),TT=/\[\s*(.*)=(.*)\s*\]/,FT=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"selectOne",value:function(e,n){var i=this;if(e.startsWith("."))return n.find(function(A){return((A==null?void 0:A.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.find(function(A){return A.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?n.find(function(A){return n!==A&&(s==="name"?A.name===o:i.attributeToString(A,s)===o)}):null}return n.find(function(A){return n!==A&&A.nodeName===e})}},{key:"selectAll",value:function(e,n){var i=this;if(e.startsWith("."))return n.findAll(function(A){return n!==A&&((A==null?void 0:A.classList)||[]).indexOf(i.getIdOrClassname(e))>-1});if(e.startsWith("#"))return n.findAll(function(A){return n!==A&&A.id===i.getIdOrClassname(e)});if(e.startsWith("[")){var a=this.getAttribute(e),s=a.name,o=a.value;return s?n.findAll(function(A){return n!==A&&(s==="name"?A.name===o:i.attributeToString(A,s)===o)}):[]}return n.findAll(function(A){return n!==A&&A.nodeName===e})}},{key:"is",value:function(e,n){if(e.startsWith("."))return n.className===this.getIdOrClassname(e);if(e.startsWith("#"))return n.id===this.getIdOrClassname(e);if(e.startsWith("[")){var i=this.getAttribute(e),a=i.name,s=i.value;return a==="name"?n.name===s:this.attributeToString(n,a)===s}return n.nodeName===e}},{key:"getIdOrClassname",value:function(e){return e.substring(1)}},{key:"getAttribute",value:function(e){var n=e.match(TT),i="",a="";return n&&n.length>2&&(i=n[1].replace(/"/g,""),a=n[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(e,n){if(!e.getAttribute)return"";var i=e.getAttribute(n);return Pe(i)?"":i.toString?i.toString():""}}])}(),yn=function(r){return r.ATTR_MODIFIED="DOMAttrModified",r.INSERTED="DOMNodeInserted",r.MOUNTED="DOMNodeInsertedIntoDocument",r.REMOVED="removed",r.UNMOUNTED="DOMNodeRemovedFromDocument",r.REPARENT="reparent",r.DESTROY="destroy",r.BOUNDS_CHANGED="bounds-changed",r.CULLED="culled",r}({}),Ys=function(r){function t(e,n,i,a,s,o,A,l){var c;return(0,L.Z)(this,t),c=(0,P.Z)(this,t,[null]),c.relatedNode=n,c.prevValue=i,c.newValue=a,c.attrName=s,c.attrChange=o,c.prevParsedValue=A,c.newParsedValue=l,c.type=e,c}return(0,k.Z)(t,r),(0,I.Z)(t)}($d);Ys.ADDITION=2,Ys.MODIFICATION=1,Ys.REMOVAL=3;var OT=new Ys(yn.REPARENT,null,"","","",0,"",""),IT=vu(),ef=Ct(),LT=Gt(1,1,1),NT=te(),kT=vu(),ol=Ct(),QT=te(),Al=Er(),UT=Ct(),PT=Er(),DT=Ct(),qu=Ct(),ll=Ct(),nf=te(),ME=Er(),TE=Er(),rf=Er(),RT=function(){function r(t){(0,L.Z)(this,r),this.displayObjectDependencyMap=new WeakMap,this.runtime=t}return(0,I.Z)(r,[{key:"matches",value:function(e,n){return this.runtime.sceneGraphSelector.is(e,n)}},{key:"querySelector",value:function(e,n){return this.runtime.sceneGraphSelector.selectOne(e,n)}},{key:"querySelectorAll",value:function(e,n){return this.runtime.sceneGraphSelector.selectAll(e,n)}},{key:"attach",value:function(e,n,i){var a,s=!1;e.parentNode&&(s=e.parentNode!==n,this.detach(e));var o=e.nodeName===Vt.FRAGMENT,A=qd(n);e.parentNode=n;var l=o?e.childNodes:[e];ye(i)?l.forEach(function(g){n.childNodes.splice(i,0,g),g.parentNode=n}):l.forEach(function(g){n.childNodes.push(g),g.parentNode=n});var c=n,u=c.sortable;if((u!=null&&(a=u.sorted)!==null&&a!==void 0&&a.length||u.dirty||e.parsedStyle.zIndex)&&(u.dirtyChildren.indexOf(e)===-1&&u.dirtyChildren.push(e),u.dirty=!0,u.dirtyReason=mc.ADDED),!A){if(o)this.dirtyFragment(e);else{var h=e.transformable;h&&this.dirtyWorldTransform(e,h)}if(s){var d,f=((d=n.ownerDocument)===null||d===void 0||(d=d.defaultView)===null||d===void 0||(d=d.getConfig())===null||d===void 0||(d=d.future)===null||d===void 0?void 0:d.experimentalCancelEventPropagation)===!0;e.dispatchEvent(OT,f,f)}}}},{key:"detach",value:function(e){var n,i;if(e.parentNode){var a=e.transformable,s=e.parentNode,o=s.sortable;(o!=null&&(n=o.sorted)!==null&&n!==void 0&&n.length||(i=e.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(e)===-1&&o.dirtyChildren.push(e),o.dirty=!0,o.dirtyReason=mc.REMOVED);var A=e.parentNode.childNodes.indexOf(e);A>-1&&e.parentNode.childNodes.splice(A,1),a&&this.dirtyWorldTransform(e,a),e.parentNode=null}}},{key:"getLocalPosition",value:function(e){return e.transformable.localPosition}},{key:"getLocalRotation",value:function(e){return e.transformable.localRotation}},{key:"getLocalScale",value:function(e){return e.transformable.localScale}},{key:"getLocalSkew",value:function(e){return e.transformable.localSkew}},{key:"getLocalTransform",value:function(e){var n=e.transformable;return zs(n),n.localTransform}},{key:"setLocalPosition",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;qu[0]=n[0],qu[1]=n[1],qu[2]=(i=n[2])!==null&&i!==void 0?i:0,!Zi(s.localPosition,qu)&&(re(s.localPosition,qu),a&&this.dirtyLocalTransform(e,s))}},{key:"translateLocal",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=Gt(n,i,a));var s=e.transformable;Zi(n,ef)||(Gr(n,n,s.localRotation),ue(s.localPosition,s.localPosition,n),this.dirtyLocalTransform(e,s))}},{key:"setLocalRotation",value:function(e,n,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof n=="number"&&(n=WA(Al,n,i,a,s));var A=e.transformable;VA(A.localRotation,n),o&&this.dirtyLocalTransform(e,A)}},{key:"rotateLocal",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=Gt(n,i,a));var s=e.transformable;Gn(TE,n[0],n[1],n[2]),gu(s.localRotation,s.localRotation,TE),this.dirtyLocalTransform(e,s)}},{key:"setLocalScale",value:function(e,n){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=e.transformable;de(ol,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:s.localScale[2]),!Zi(ol,s.localScale)&&(re(s.localScale,ol),a&&this.dirtyLocalTransform(e,s))}},{key:"scaleLocal",value:function(e,n){var i,a=e.transformable;Ve(a.localScale,a.localScale,de(ol,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:1)),this.dirtyLocalTransform(e,a)}},{key:"setLocalSkew",value:function(e,n,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof n=="number"&&(n=gv(kT,n,i));var s=e.transformable;fv(s.localSkew,n),a&&this.dirtyLocalTransform(e,s)}},{key:"setLocalEulerAngles",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof n=="number"&&(n=Gt(n,i,a));var o=e.transformable;Gn(o.localRotation,n[0],n[1],n[2]),s&&this.dirtyLocalTransform(e,o)}},{key:"setLocalTransform",value:function(e,n){var i=Rn(UT,n),a=Wo(PT,n),s=ks(DT,n);this.setLocalScale(e,s,!1),this.setLocalPosition(e,i,!1),this.setLocalRotation(e,a,void 0,void 0,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"resetLocalTransform",value:function(e){this.setLocalScale(e,LT,!1),this.setLocalPosition(e,ef,!1),this.setLocalEulerAngles(e,ef,void 0,void 0,!1),this.setLocalSkew(e,IT,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"getPosition",value:function(e){var n=e.transformable;return Rn(n.position,this.getWorldTransform(e,n))}},{key:"getRotation",value:function(e){var n=e.transformable;return Wo(n.rotation,this.getWorldTransform(e,n))}},{key:"getScale",value:function(e){var n=e.transformable;return ks(n.scaling,this.getWorldTransform(e,n))}},{key:"getOrigin",value:function(e){return e.getGeometryBounds(),e.transformable.origin}},{key:"getWorldTransform",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.transformable;return!n.localDirtyFlag&&!n.dirtyFlag||(e.parentNode&&e.parentNode.transformable&&this.getWorldTransform(e.parentNode),this.internalUpdateTransform(e)),n.worldTransform}},{key:"setPosition",value:function(e,n){var i,a=e.transformable;if(ll[0]=n[0],ll[1]=n[1],ll[2]=(i=n[2])!==null&&i!==void 0?i:0,!Zi(this.getPosition(e),ll)){if(re(a.position,ll),e.parentNode===null||!e.parentNode.transformable)re(a.localPosition,ll);else{var s=e.parentNode.transformable;He(nf,s.worldTransform),on(nf,nf),me(a.localPosition,ll,nf)}this.dirtyLocalTransform(e,a)}}},{key:"translate",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=de(ol,n,i,a)),!Zi(n,ef)&&(ue(ol,this.getPosition(e),n),this.setPosition(e,ol))}},{key:"setRotation",value:function(e,n,i,a,s){var o=e.transformable;if(typeof n=="number"&&(n=td(n,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,n);else{var A=this.getRotation(e.parentNode);VA(Al,A),KA(Al,Al),Qs(o.localRotation,Al,n),Zo(o.localRotation,o.localRotation),this.dirtyLocalTransform(e,o)}}},{key:"rotate",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=Gt(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,n);else{var o=Al;Gn(o,n[0],n[1],n[2]);var A=this.getRotation(e),l=this.getRotation(e.parentNode);VA(rf,l),KA(rf,rf),Qs(o,rf,o),Qs(s.localRotation,o,A),Zo(s.localRotation,s.localRotation),this.dirtyLocalTransform(e,s)}}},{key:"setOrigin",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=[n,i,a]);var s=e.transformable;if(!(n[0]===s.origin[0]&&n[1]===s.origin[1]&&n[2]===s.origin[2])){var o=s.origin;o[0]=n[0],o[1]=n[1],o[2]=n[2]||0,this.dirtyLocalTransform(e,s)}}},{key:"setEulerAngles",value:function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof n=="number"&&(n=Gt(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.setLocalEulerAngles(e,n);else{Gn(s.localRotation,n[0],n[1],n[2]);var o=this.getRotation(e.parentNode);VA(ME,KA(Al,o)),gu(s.localRotation,s.localRotation,ME),this.dirtyLocalTransform(e,s)}}},{key:"getGeometryBounds",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=e,a=i.geometry;a.dirty&&ae.styleValueRegistry.updateGeometry(e);var s=n?a.renderBounds:a.contentBounds||null;return s||new jn}},{key:"getTransformedGeometryBounds",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(e,n);if(!jn.isEmpty(a)){var s=i||new jn;return s.setFromTransformedAABB(a,this.getWorldTransform(e)),s}return null}},{key:"getBounds",value:function(e){var n=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=a.renderable;if(!s.boundsDirty&&!i&&s.bounds)return s.bounds;if(!s.renderBoundsDirty&&i&&s.renderBounds)return s.renderBounds;var o=i?s.renderBounds:s.bounds,A=this.getTransformedGeometryBounds(e,i,o),l=e.childNodes;if(l.forEach(function(h){var d=n.getBounds(h,i);d&&(A?A.add(d):(A=o||new jn,A.update(d.center,d.halfExtents)))}),A||(A=new jn),i){var c=fE(e);if(c){var u=c.parsedStyle.clipPath.getBounds(i);A?u&&(A=u.intersection(A)):A.update(u.center,u.halfExtents)}}return i?(s.renderBounds=A,s.renderBoundsDirty=!1):(s.bounds=A,s.boundsDirty=!1),A}},{key:"getLocalBounds",value:function(e){if(e.parentNode){var n=NT;e.parentNode.transformable&&(n=on(QT,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!jn.isEmpty(i)){var a=new jn;return a.setFromTransformedAABB(i,n),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var n,i,a=this.getGeometryBounds(e);jn.isEmpty(a)||(i=new jn,i.setFromTransformedAABB(a,this.getWorldTransform(e)));var s=(n=e.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0?void 0:n.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),A=(0,U.Z)(o,2),l=A[0],c=A[1],u=i.getMax(),h=(0,U.Z)(u,2),d=h[0],f=h[1];return new cs(l+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),d-l,f-c)}return new cs((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(e){var n,i=(n=e.parentNode)===null||n===void 0?void 0:n.transformable;zs(e.transformable),sA(e.transformable,i)}},{key:"internalUpdateElement",value:function(e,n){var i,a,s,o,A=((i=e.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0||(i=i.getConfig())===null||i===void 0||(i=i.future)===null||i===void 0?void 0:i.experimentalAttributeUpdateOptimization)===!0,l=n[n.length-1],c=(l==null?void 0:l.transformDirty)||((a=e.transformable)===null||a===void 0?void 0:a.localDirtyFlag);if(e.transformable){var u;(u=e.transformable).dirtyFlag||(u.dirtyFlag=c)}if(this.internalUpdateTransform(e),c){var h;(h=e.dirty)===null||h===void 0||h.call(e,!0,!0)}var d=((s=e.renderable)===null||s===void 0?void 0:s.boundsDirty)||((o=e.renderable)===null||o===void 0?void 0:o.renderBoundsDirty);if((c||d)&&(l==null?void 0:l.shapeUpdated)===!1&&A)for(var f=n.length-1;f>=0;){var g,v,m=n[f];if(m.shapeUpdated)break;(g=(v=m.node).dirty)===null||g===void 0||g.call(v,!0,!0),m.shapeUpdated=!0,f-=1}return c}},{key:"syncHierarchy",value:function(e){for(var n,i,a=[e],s=e.parentNode?[{node:e.parentNode,transformDirty:((n=e.parentNode.transformable)===null||n===void 0?void 0:n.localDirtyFlag)||((i=e.parentNode.transformable)===null||i===void 0?void 0:i.dirtyFlag),shapeUpdated:!1}]:[];a.length>0;){for(var o=a.pop(),A=s[s.length-1];s.length>0&&o.parentNode!==A.node;)A=s.pop();var l=this.internalUpdateElement(o,s);if(o.childNodes.length>0){for(var c=o.childNodes.length-1;c>=0;c--)a.push(o.childNodes[c]);s.push({node:o,transformDirty:l,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(e,n){qd(e)||n.localDirtyFlag||(n.localDirtyFlag=!0,n.dirtyFlag||this.dirtyWorldTransform(e,n))}},{key:"dirtyWorldTransform",value:function(e,n){this.dirtyWorldInternal(e,n),this.dirtyToRoot(e,!0)}},{key:"dirtyWorldInternal",value:function(e,n){var i,a=this,s=((i=e.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0||(i=i.getConfig())===null||i===void 0||(i=i.future)===null||i===void 0?void 0:i.experimentalAttributeUpdateOptimization)===!0;n.dirtyFlag||(n.dirtyFlag=!0,e.dirty(!0,!0),s||e.childNodes.forEach(function(o){var A=o.transformable;a.dirtyWorldInternal(o,A)}))}},{key:"dirtyToRoot",value:function(e){for(var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=e,s=((n=e.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0||(n=n.getConfig())===null||n===void 0||(n=n.future)===null||n===void 0?void 0:n.experimentalAttributeUpdateOptimization)===!0;a;){var o,A;if((o=(A=a).dirty)===null||o===void 0||o.call(A,!0,!0),s)break;a=a.parentNode}i&&e.forEach(function(u){var h;(h=u.dirty)===null||h===void 0||h.call(u,!0,!0)}),this.informDependentDisplayObjects(e);var l=e.mutations||[],c=l.find(function(u){return u.type==="attributes"&&u._boundsChangeData});c?c._boundsChangeData={affectChildren:c._boundsChangeData.affectChildren||i}:(c={type:"attributes",target:e,_boundsChangeData:{affectChildren:i}},l.push(c)),e.mutations=l}},{key:"dirtyFragment",value:function(e){var n,i,a=e.transformable;a&&(a.dirtyFlag=!0,a.localDirtyFlag=!0),(n=(i=e).dirty)===null||n===void 0||n.call(i,!0,!0);for(var s=e.childNodes.length,o=0;o<s;o++)this.dirtyFragment(e.childNodes[o])}},{key:"notifyMutationObservers",value:function(e){var n=new Set;if(e.getRoot().forEach(function(a){(a.mutations||[]).forEach(function(s){s.type==="attributes"&&s._boundsChangeData&&(s._boundsChangeData.affectChildren?a.forEach(function(o){var A=(0,H.Z)({},s);A.target=o,n.add(A)}):n.add(s))}),a.mutations=void 0}),n.size>0){var i=new Vr(yn.BOUNDS_CHANGED,{detail:Array.from(n)});e.dispatchEvent(i,!0,!0)}}},{key:"updateDisplayObjectDependency",value:function(e,n,i,a){if(n&&n!==i){var s=this.displayObjectDependencyMap.get(n);if(s&&s[e]){var o=s[e].indexOf(a);s[e].splice(o,1)}}if(i){var A=this.displayObjectDependencyMap.get(i);A||(this.displayObjectDependencyMap.set(i,{}),A=this.displayObjectDependencyMap.get(i)),A[e]||(A[e]=[]),A[e].push(a)}}},{key:"informDependentDisplayObjects",value:function(e){var n,i=this,a=this.displayObjectDependencyMap.get(e);if(a){var s=(n=e.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0||(n=n.getConfig())===null||n===void 0||(n=n.future)===null||n===void 0?void 0:n.experimentalCancelEventPropagation;Object.keys(a).forEach(function(o){a[o].forEach(function(A){i.dirtyToRoot(A,!0),A.dispatchEvent(new Ys(yn.ATTR_MODIFIED,A,i,i,o,Ys.MODIFICATION,i,i),s,s),A.isCustomElement&&A.isConnected&&A.attributeChangedCallback&&A.attributeChangedCallback(o,i,i)})})}}}])}(),FE=function(){function r(t){if((0,L.Z)(this,r),t<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=t,this.cache=new Map}return(0,I.Z)(r,[{key:"get",value:function(e){if(this.cache.has(e)){var n=this.cache.get(e);return this.cache.delete(e),this.cache.set(e,n),n}}},{key:"put",value:function(e,n){if(this.cache.has(e)&&this.cache.delete(e),this.cache.set(e,n),this.cache.size>this.capacity){var i=this.cache.keys().next().value;this.cache.delete(i)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),cl={MetricsString:"|\xC9q\xC5",BaselineSymbol:"M",BaselineMultiplier:1.4,HeightMultiplier:2,Newlines:[10,13],BreakingSpaces:[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288]},OE=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,_T=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,HT=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,GT=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹓﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,KT=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,zT=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,VT=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,WT=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,ZT=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,jT=new RegExp("".concat(_T.source,"|").concat(GT.source,"|").concat(zT.source,"|").concat(WT.source)),YT=new RegExp("".concat(HT.source,"|").concat(KT.source,"|").concat(VT.source,"|").concat(ZT.source)),XT=function(){function r(t){var e=this;(0,L.Z)(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(n,i){return e.isBreakingSpace(i)?!1:!!(n&&(YT.exec(i)||jT.exec(n)))},this.trimByKinsokuShorui=function(n){var i=(0,N.Z)(n),a=i[i.length-2];if(!a)return n;var s=a[a.length-1];return i[i.length-2]=a.slice(0,-1),i[i.length-1]=s+i[i.length-1],i},this.runtime=t,this.charWidthCache=new FE(100)}return(0,I.Z)(r,[{key:"measureFont",value:function(e,n){if(this.fontMetricsCache[e])return this.fontMetricsCache[e];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(n),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(n,{willReadFrequently:!0});s.font=e;var o=cl.MetricsString+cl.BaselineSymbol,A=Math.ceil(s.measureText(o).width),l=Math.ceil(s.measureText(cl.BaselineSymbol).width),c=cl.HeightMultiplier*l;l=l*cl.BaselineMultiplier|0,a.width=A,a.height=c,s.fillStyle="#f00",s.fillRect(0,0,A,c),s.font=e,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,l);var u=s.getImageData(0,0,A||1,c||1).data,h=u.length,d=A*4,f=0,g=0,v=!1;for(f=0;f<l;++f){for(var m=0;m<d;m+=4)if(u[g+m]!==255){v=!0;break}if(!v)g+=d;else break}for(i.ascent=l-f,g=h-d,v=!1,f=c;f>l;--f){for(var w=0;w<d;w+=4)if(u[g+w]!==255){v=!0;break}if(!v)g-=d;else break}return i.descent=f-l,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[e]=i,i}},{key:"measureText",value:function(e,n,i){var a=n.fontSize,s=a===void 0?16:a,o=n.wordWrap,A=o===void 0?!1:o,l=n.lineHeight,c=n.lineWidth,u=c===void 0?1:c,h=n.textBaseline,d=h===void 0?"alphabetic":h,f=n.textAlign,g=f===void 0?"start":f,v=n.letterSpacing,m=v===void 0?0:v,w=n.textPath;n.textPathSide,n.textPathStartOffset;var C=n.leading,F=C===void 0?0:C,Q=BE(n),D=this.measureFont(Q,i);D.fontSize===0&&(D.fontSize=s,D.ascent=s);var K=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);K.font=Q,n.isOverflowing=!1;var G=A?this.wordWrap(e,n,i):e,J=G.split(/(?:\r\n|\r|\n)/),$=new Array(J.length),at=0;if(w){w.getTotalLength();for(var At=0;At<J.length;At++)K.measureText(J[At]).width+(J[At].length-1)*m}else{for(var pt=0;pt<J.length;pt++){var wt=K.measureText(J[pt]).width+(J[pt].length-1)*m;$[pt]=wt,at=Math.max(at,wt)}var bt=at+u,Rt=l||D.fontSize+u,Pt=Math.max(Rt,D.fontSize+u)+(J.length-1)*(Rt+F);Rt+=F;var xt=0;return d==="middle"?xt=-Pt/2:d==="bottom"||d==="alphabetic"||d==="ideographic"?xt=-Pt:(d==="top"||d==="hanging")&&(xt=0),{font:Q,width:bt,height:Pt,lines:J,lineWidths:$,lineHeight:Rt,maxLineWidth:at,fontProperties:D,lineMetrics:$.map(function(Ft,_t){var Xt=0;return g==="center"||g==="middle"?Xt-=Ft/2:(g==="right"||g==="end")&&(Xt-=Ft),new cs(Xt-u/2,xt+_t*Rt,Ft+u,Rt)})}}}},{key:"wordWrap",value:function(e,n,i){var a=this,s=Array.from(e);if(s.length===0)return"";var o=this,A=n.wordWrapWidth,l=A===void 0?0:A,c=n.letterSpacing,u=c===void 0?0:c,h=n.maxLines,d=h===void 0?1/0:h,f=n.textOverflow,g=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),v=l+u,m="";f==="ellipsis"?m="...":f&&f!=="clip"&&(m=f);var w=[""],C=0,F=0,Q=-1,D=BE(n),K=this.charWidthCache.get(D);K||(K=new FE(500),this.charWidthCache.put(D,K));var G=function(Ft){return a.getFromCache(Ft,u,K,g)},J=G(m);function $(xt,Ft,_t,Xt){for(;G(xt)<Xt&&Ft<s.length-1&&!o.isNewline(s[Ft+1]);)Ft+=1,xt+=s[Ft];for(;G(xt)>Xt&&Ft>=_t;)Ft-=1,xt=xt.slice(0,-1);return{lineTxt:xt,txtLastCharIndex:Ft}}function at(xt,Ft){if(!(J<=0||J>v)){if(!w[xt]){w[xt]=m;return}var _t=$(w[xt],Ft,Q+1,v-J);w[xt]=_t.lineTxt+m}}for(var At=0;At<s.length;At++){var pt=s[At],wt=s[At-1],bt=s[At+1],Rt=G(pt);if(this.isNewline(pt)){if(C+1>=d){At<s.length-1&&at(C,At-1),n.isOverflowing=!0;break}Q=At-1,C+=1,F=0,w[C]="";continue}if(Rt>v){at(C,At-1),n.isOverflowing=!0;break}if(F>0&&F+Rt>v){var Pt=$(w[C],At-1,Q+1,v);if(Pt.txtLastCharIndex!==At-1){if(w[C]=Pt.lineTxt,Pt.txtLastCharIndex===s.length-1)break;At=Pt.txtLastCharIndex+1,pt=s[At],wt=s[At-1],bt=s[At+1],Rt=G(pt)}if(C+1>=d){at(C,At-1),n.isOverflowing=!0;break}if(Q=At-1,C+=1,F=0,w[C]="",this.isBreakingSpace(pt))continue;this.canBreakInLastChar(pt)||(w=this.trimToBreakable(w),F=this.sumTextWidthByCache(w[C]||"",G)),this.shouldBreakByKinsokuShorui(pt,bt)&&(w=this.trimByKinsokuShorui(w),F+=G(wt||""))}F+=Rt,w[C]+=pt}return w.join(`
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:cl.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:cl.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var n=(0,N.Z)(e),i=n[n.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return n;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),A=a+1,l=a+(o?0:1);return n[n.length-1]+=i.slice(A,i.length),n[n.length-2]=i.slice(0,l),n}},{key:"canBreakInLastChar",value:function(e){return!(e&&OE.test(e))}},{key:"sumTextWidthByCache",value:function(e,n){return e.split("").reduce(function(i,a){return i+n(a)},0)}},{key:"findBreakableIndex",value:function(e){for(var n=e.length-1;n>=0;n--)if(!OE.test(e[n]))return n;return-1}},{key:"getFromCache",value:function(e,n,i,a){var s=i.get(e);if(typeof s!="number"){var o=e.length*n,A=a.measureText(e);s=A.width+o,i.put(e,s)}return s}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),ae={},JT=function(r){var t=new ET,e=new wT;return r={},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(r,Vt.FRAGMENT,null),Vt.CIRCLE,new vT),Vt.ELLIPSE,new pT),Vt.RECT,t),Vt.IMAGE,t),Vt.GROUP,new bT),Vt.LINE,new mT),Vt.TEXT,new BT(ae)),Vt.POLYLINE,e),Vt.POLYGON,e),(0,we.Z)((0,we.Z)((0,we.Z)(r,Vt.PATH,new yT),Vt.HTML,new xT),Vt.MESH,null)}(),qT=function(r){var t=new TM,e=new tm;return r={},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(r,oe.PERCENTAGE,null),oe.NUMBER,new NM),oe.ANGLE,new SM),oe.DEFINED_PATH,new MM),oe.PAINT,t),oe.COLOR,t),oe.FILTER,new FM),oe.LENGTH,e),oe.LENGTH_PERCENTAGE,e),oe.LENGTH_PERCENTAGE_12,new OM),(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(r,oe.LENGTH_PERCENTAGE_14,new IM),oe.COORDINATE,new tm),oe.OFFSET_DISTANCE,new kM),oe.OPACITY_VALUE,new QM),oe.PATH,new UM),oe.LIST_OF_POINTS,new PM),oe.SHADOW_BLUR,new DM),oe.TEXT,new RM),oe.TEXT_TRANSFORM,new _M),oe.TRANSFORM,new dT),(0,we.Z)((0,we.Z)((0,we.Z)(r,oe.TRANSFORM_ORIGIN,new fT),oe.Z_INDEX,new gT),oe.MARKER,new LM)}(),$T=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof M.g!="undefined"?M.g:{}};ae.CameraContribution=Gu,ae.AnimationTimeline=null,ae.EasingFunction=null,ae.offscreenCanvasCreator=new Am,ae.sceneGraphSelector=new FT,ae.sceneGraphService=new RT(ae),ae.textService=new XT(ae),ae.geometryUpdaterFactory=JT,ae.CSSPropertySyntaxFactory=qT,ae.styleValueRegistry=new xM(ae),ae.layoutRegistry=null,ae.globalThis=$T(),ae.enableStyleSyntax=!0,ae.enableSizeAttenuation=!1;var IE=0;function T5(){IE=0}var lm=new Ys(yn.INSERTED,null,"","","",0,"",""),cm=new Ys(yn.REMOVED,null,"","","",0,"",""),LE=new Vr(yn.DESTROY),tF=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.entity=IE++,e.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},e.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},e.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},e.cullable={strategy:Bp.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},e.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},e.namespaceURI="g",e.scrollLeft=0,e.scrollTop=0,e.clientTop=0,e.clientLeft=0,e.style={},e.computedStyle={},e.parsedStyle={},e.attributes={},e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"dirty",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1?arguments[1]:void 0;this.renderable.dirty=n,i!==void 0&&(this.renderable.boundsDirty=i,this.renderable.renderBoundsDirty=i,this.geometry.dirty=i)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(n){this.setAttribute("class",n)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(n){return n!==""})}},{key:"tagName",get:function(){return this.nodeName}},{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"parentElement",get:function(){return this.parentNode}},{key:"nextSibling",get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var n=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[n-1]||null}return null}},{key:"cloneNode",value:function(n){throw new Error(On)}},{key:"appendChild",value:function(n,i){var a;if(n.destroyed)throw new Error(Ld);return ae.sceneGraphService.attach(n,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!qd(this)&&n.nodeName===Vt.FRAGMENT?this.ownerDocument.defaultView.mountFragment(n):this.ownerDocument.defaultView.mountChildren(n)),this.isMutationObserved&&(lm.relatedNode=this,n.dispatchEvent(lm)),n}},{key:"insertBefore",value:function(n,i){if(!i)this.appendChild(n);else{n.parentElement&&n.parentElement.removeChild(n);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(n):this.appendChild(n,a)}return n}},{key:"replaceChild",value:function(n,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(n,a),i}},{key:"removeChild",value:function(n){var i,a,s=((i=this.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0||(i=i.getConfig().future)===null||i===void 0?void 0:i.experimentalCancelEventPropagation)===!0;return cm.relatedNode=this,n.dispatchEvent(cm,s,s),(a=n.ownerDocument)!==null&&a!==void 0&&a.defaultView&&n.ownerDocument.defaultView.unmountChildren(n),ae.sceneGraphService.detach(n),n}},{key:"removeChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var n=this.childNodes.length-1;n>=0;n--){var i=this.childNodes[n];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(n){return ae.sceneGraphService.matches(n,this)}},{key:"getElementById",value:function(n){return ae.sceneGraphService.querySelector("#".concat(n),this)}},{key:"getElementsByName",value:function(n){return ae.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)}},{key:"getElementsByClassName",value:function(n){return ae.sceneGraphService.querySelectorAll(".".concat(n),this)}},{key:"getElementsByTagName",value:function(n){return ae.sceneGraphService.querySelectorAll(n,this)}},{key:"querySelector",value:function(n){return ae.sceneGraphService.querySelector(n,this)}},{key:"querySelectorAll",value:function(n){return ae.sceneGraphService.querySelectorAll(n,this)}},{key:"closest",value:function(n){var i=this;do{if(ae.sceneGraphService.matches(n,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(n){var i=this,a=null;return this.forEach(function(s){return s!==i&&n(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(n){var i=this,a=[];return this.forEach(function(s){s!==i&&n(s)&&a.push(s)}),a}},{key:"after",value:function(){var n=this;if(this.parentNode){for(var i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];s.forEach(function(A,l){var c;return(c=n.parentNode)===null||c===void 0?void 0:c.appendChild(A,i+l+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var n,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var A=s[0],l=(0,ic.Z)(s).slice(1);this.parentNode.appendChild(A,i),(n=A).after.apply(n,(0,N.Z)(l))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return n.appendChild(o)})}},{key:"prepend",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,A){return n.appendChild(o,A)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var n,i=((n=this.ownerDocument)===null||n===void 0||(n=n.defaultView)===null||n===void 0||(n=n.getConfig().future)===null||n===void 0?void 0:n.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(LE,i,i),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return ae.sceneGraphService.getGeometryBounds(this,n)}},{key:"getTransformedGeometryBounds",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return ae.sceneGraphService.getTransformedGeometryBounds(this,n)}},{key:"getBounds",value:function(){return ae.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return ae.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return ae.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return ae.sceneGraphService.getBoundingClientRect(this)}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"computedStyleMap",value:function(){return new Map(Object.entries(this.computedStyle))}},{key:"getAttributeNames",value:function(){return Object.keys(this.attributes)}},{key:"getAttribute",value:function(n){if(typeof n!="symbol"){var i=this.attributes[n];return i}}},{key:"hasAttribute",value:function(n){return this.getAttributeNames().includes(n)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(n){this.setAttribute(n,null),delete this.attributes[n]}},{key:"setAttribute",value:function(n,i){this.attributes[n]=i}},{key:"getAttributeNS",value:function(n,i){throw new Error(On)}},{key:"getAttributeNode",value:function(n){throw new Error(On)}},{key:"getAttributeNodeNS",value:function(n,i){throw new Error(On)}},{key:"hasAttributeNS",value:function(n,i){throw new Error(On)}},{key:"removeAttributeNS",value:function(n,i){throw new Error(On)}},{key:"removeAttributeNode",value:function(n){throw new Error(On)}},{key:"setAttributeNS",value:function(n,i,a){throw new Error(On)}},{key:"setAttributeNode",value:function(n){throw new Error(On)}},{key:"setAttributeNodeNS",value:function(n){throw new Error(On)}},{key:"toggleAttribute",value:function(n,i){throw new Error(On)}}])}(vr);function Nn(r){return!!(r!=null&&r.nodeName)}var eF=ae.globalThis.Proxy?ae.globalThis.Proxy:function(){},Xs=new Ys(yn.ATTR_MODIFIED,null,null,null,null,Ys.MODIFICATION,null,null),$u=Ct(),nF=Er(),ir=function(r){function t(e){var n;return(0,L.Z)(this,t),n=(0,P.Z)(this,t),n.isCustomElement=!1,n.isMutationObserved=!1,n.activeAnimations=[],n.config=e,n.id=e.id||"",n.name=e.name||"",(e.className||e.class)&&(n.className=e.className||e.class),n.nodeName=e.type||Vt.GROUP,e.initialParsedStyle&&Object.assign(n.parsedStyle,e.initialParsedStyle),n.initAttributes(e.style),ae.enableStyleSyntax&&(n.style=new eF({setProperty:function(a,s){n.setAttribute(a,s)},getPropertyValue:function(a){return n.getAttribute(a)},removeProperty:function(a){n.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:n.getAttribute(s)},set:function(a,s,o){return n.setAttribute(s,o),!0}})),n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"destroy",value:function(){_s(t,"destroy",this,3)([]),this.getAnimations().forEach(function(n){n.cancel()})}},{key:"cloneNode",value:function(n,i){var a=(0,H.Z)({},this.attributes);for(var s in a){var o=a[s];Nn(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(n)),i&&(a[s]=i(s,o))}var A=new this.constructor((0,H.Z)((0,H.Z)({},this.config),{},{style:a}));return A.setLocalTransform(this.getLocalTransform()),n&&this.children.forEach(function(l){if(!l.style.isMarker){var c=l.cloneNode(n);A.appendChild(c)}}),A}},{key:"initAttributes",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};ae.styleValueRegistry.processProperties(this,n,i),this.dirty()}},{key:"setAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;Ye(i)||(a||i!==this.attributes[n])&&(this.internalSetAttribute(n,i,{memoize:s}),_s(t,"setAttribute",this,3)([n,i]))}},{key:"setAttributes",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.skipDispatchAttrModifiedEvent,s=a===void 0?!1:a,o,A;if(s||(o=(0,H.Z)({},this.attributes),A=(0,H.Z)({},this.parsedStyle)),ae.styleValueRegistry.processProperties(this,n,i),this.dirty(),!s)for(var l in n)this.dispatchAttrModifiedEvent(l,o[l],n[l],A[l])}},{key:"internalSetAttribute",value:function(n,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.attributes[n],o=this.parsedStyle[n];ae.styleValueRegistry.processProperties(this,(0,we.Z)({},n,i),a),this.dirty(),this.dispatchAttrModifiedEvent(n,s,i,o)}},{key:"dispatchAttrModifiedEvent",value:function(n,i,a,s){var o=this.parsedStyle[n];if(this.isConnected)if(Xs.relatedNode=this,Xs.prevValue=i,Xs.newValue=a,Xs.attrName=n,Xs.prevParsedValue=s,Xs.newParsedValue=o,this.isMutationObserved)this.dispatchEvent(Xs);else{var A,l=((A=this.ownerDocument.defaultView.getConfig().future)===null||A===void 0?void 0:A.experimentalCancelEventPropagation)===!0;Xs.target=this,this.ownerDocument.defaultView.dispatchEvent(Xs,!0,l)}if(this.isCustomElement&&this.isConnected||!this.isCustomElement){var c,u;(c=(u=this).attributeChangedCallback)===null||c===void 0||c.call(u,n,i,a,s,o)}}},{key:"getBBox",value:function(){var n=this.getBounds(),i=n.getMin(),a=(0,U.Z)(i,2),s=a[0],o=a[1],A=n.getMax(),l=(0,U.Z)(A,2),c=l[0],u=l[1];return new cs(s,o,c-s,u-o)}},{key:"setOrigin",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ae.sceneGraphService.setOrigin(this,vi(n,i,a,!1)),this}},{key:"getOrigin",value:function(){return ae.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ae.sceneGraphService.setPosition(this,vi(n,i,a,!1)),this}},{key:"setLocalPosition",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ae.sceneGraphService.setLocalPosition(this,vi(n,i,a,!1)),this}},{key:"translate",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ae.sceneGraphService.translate(this,vi(n,i,a,!1)),this}},{key:"translateLocal",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return ae.sceneGraphService.translateLocal(this,vi(n,i,a,!1)),this}},{key:"getPosition",value:function(){return ae.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return ae.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(n,i,a){return this.scaleLocal(n,i,a)}},{key:"scaleLocal",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=vi(n,i,a,!1)),ae.sceneGraphService.scaleLocal(this,n),this}},{key:"setLocalScale",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=vi(n,i,a,!1)),ae.sceneGraphService.setLocalScale(this,n),this}},{key:"getLocalScale",value:function(){return ae.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return ae.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var n=_u($u,ae.sceneGraphService.getWorldTransform(this)),i=(0,U.Z)(n,3),a=i[2];return Bi(a)}},{key:"getLocalEulerAngles",value:function(){var n=_u($u,ae.sceneGraphService.getLocalRotation(this)),i=(0,U.Z)(n,3),a=i[2];return Bi(a)}},{key:"setEulerAngles",value:function(n){return ae.sceneGraphService.setEulerAngles(this,0,0,n),this}},{key:"setLocalEulerAngles",value:function(n){return ae.sceneGraphService.setLocalEulerAngles(this,0,0,n),this}},{key:"rotateLocal",value:function(n,i,a){return Pe(i)&&Pe(a)?ae.sceneGraphService.rotateLocal(this,0,0,n):ae.sceneGraphService.rotateLocal(this,n,i,a),this}},{key:"rotate",value:function(n,i,a){return Pe(i)&&Pe(a)?ae.sceneGraphService.rotate(this,0,0,n):ae.sceneGraphService.rotate(this,n,i,a),this}},{key:"setRotation",value:function(n,i,a,s){return ae.sceneGraphService.setRotation(this,n,i,a,s),this}},{key:"setLocalRotation",value:function(n,i,a,s){return ae.sceneGraphService.setLocalRotation(this,n,i,a,s),this}},{key:"setLocalSkew",value:function(n,i){return ae.sceneGraphService.setLocalSkew(this,n,i),this}},{key:"getRotation",value:function(){return ae.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return ae.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return ae.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return ae.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return ae.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(n){return ae.sceneGraphService.setLocalTransform(this,n),this}},{key:"resetLocalTransform",value:function(){ae.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(n,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,n,i):null}},{key:"isVisible",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(n){this.style.pointerEvents=n?"auto":"none"}},{key:"isInteractive",value:function(){var n;return((n=this.parsedStyle)===null||n===void 0?void 0:n.pointerEvents)!=="none"}},{key:"isCulled",value:function(){return!!(this.cullable&&this.cullable.enable&&!this.cullable.visible)}},{key:"toFront",value:function(){return this.parentNode&&(this.style.zIndex=Math.max.apply(Math,(0,N.Z)(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,N.Z)(this.parentNode.children.map(function(n){return Number(n.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var n=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],A=a[1];return o?Br(o)?(Object.keys(o).forEach(function(l){n.setAttribute(l,o[l])}),this):a.length===2?(this.setAttribute(o,A),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(n){var i=n||this.getWorldTransform(),a=Rn($u,i),s=(0,U.Z)(a,2),o=s[0],A=s[1],l=ks($u,i),c=(0,U.Z)(l,2),u=c[0],h=c[1],d=Wo(nF,i),f=_u($u,d),g=(0,U.Z)(f,3),v=g[0],m=g[2];return yp(v||m,o,A,u,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(n){var i=Ud(n),a=(0,U.Z)(i,5),s=a[0],o=a[1],A=a[2],l=a[3],c=a[4];this.setEulerAngles(c).setPosition(s,o).setLocalScale(A,l)}},{key:"setLocalMatrix",value:function(n){var i=Ud(n),a=(0,U.Z)(i,5),s=a[0],o=a[1],A=a[2],l=a[3],c=a[4];this.setLocalEulerAngles(c).setLocalPosition(s,o).setLocalScale(A,l)}},{key:"show",value:function(){this.forEach(function(n){n.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(n){n.style.visibility="hidden"})}},{key:"getCount",value:function(){return this.childElementCount}},{key:"getParent",value:function(){return this.parentElement}},{key:"getChildren",value:function(){return this.children}},{key:"getFirst",value:function(){return this.firstElementChild}},{key:"getLast",value:function(){return this.lastElementChild}},{key:"getChildByIndex",value:function(n){return this.children[n]||null}},{key:"add",value:function(n,i){return this.appendChild(n,i)}},{key:"set",value:function(n,i){this.config[n]=i}},{key:"get",value:function(n){return this.config[n]}},{key:"moveTo",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"move",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(n,i,a),this}},{key:"setZIndex",value:function(n){return this.style.zIndex=n,this}}])}(tF);ir.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","display","draggable","droppable","fill","fillOpacity","fillRule","filter","increasedLineWidthForHitTesting","lineCap","lineDash","lineDashOffset","lineJoin","lineWidth","miterLimit","hitArea","offsetDistance","offsetPath","offsetX","offsetY","opacity","pointerEvents","shadowColor","shadowType","shadowBlur","shadowOffsetX","shadowOffsetY","stroke","strokeOpacity","strokeWidth","strokeLinecap","strokeLineJoin","strokeDasharray","strokeDashoffset","transform","transformOrigin","textTransform","visibility","zIndex"]);var Js=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.CIRCLE},e)])}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);Js.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var rF=["style"],th=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Za.Z)(n,rF);return(0,L.Z)(this,t),e=(0,P.Z)(this,t,[(0,H.Z)({style:i},a)]),e.isCustomElement=!0,e}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);th.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var eh=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.ELLIPSE},e)])}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);eh.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var iF=function(r){function t(){return(0,L.Z)(this,t),(0,P.Z)(this,t,[{type:Vt.FRAGMENT}])}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);iF.PARSED_STYLE_LIST=new Set(["class","className"]);var oi=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.GROUP},e)])}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);oi.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var aF=["style"],ul=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Za.Z)(n,aF);return(0,L.Z)(this,t),e=(0,P.Z)(this,t,[(0,H.Z)({type:Vt.HTML,style:i},a)]),e.cullable.enable=!1,e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var n=on(te(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!jn.isEmpty(i)){var a=new jn;return a.setFromTransformedAABB(i,n),a}}return this.getBounds()}}])}(ir);ul.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var nh=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.IMAGE},e)])}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);nh.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var sF=["style"],hl=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Za.Z)(n,sF);(0,L.Z)(this,t),e=(0,P.Z)(this,t,[(0,H.Z)({type:Vt.LINE,style:(0,H.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),e.markerStartAngle=0,e.markerEndAngle=0;var s=e.parsedStyle,o=s.markerStart,A=s.markerEnd;return o&&Nn(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),A&&Nn(A)&&(e.markerEndAngle=A.getLocalEulerAngles(),e.appendChild(A)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="x1"||n==="y1"||n==="x2"||n==="y2"||n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Nn(s)&&(this.markerStartAngle=0,s.remove()),o&&Nn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(s&&Nn(s)&&(this.markerEndAngle=0,s.remove()),o&&Nn(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,A=i.markerEndOffset,l=i.x1,c=i.x2,u=i.y1,h=i.y2,d=n?a:s;if(!(!d||!Nn(d))){var f=0,g,v,m,w,C,F;n?(m=l,w=u,g=c-l,v=h-u,C=o||0,F=this.markerStartAngle):(m=c,w=h,g=l-c,v=u-h,C=A||0,F=this.markerEndAngle),f=Math.atan2(v,g),d.setLocalEulerAngles(f*180/Math.PI+F),d.setLocalPosition(m+Math.cos(f)*C,w+Math.sin(f)*C)}}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,A=a.x2,l=a.y2,c=ba(s,o,A,l,n),u=c.x,h=c.y,d=me(Ct(),Gt(u,h,0),i?this.getWorldTransform():this.getLocalTransform());return new ii(d[0],d[1])}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var n=this.parsedStyle,i=n.x1,a=n.y1,s=n.x2,o=n.y2;return Bd(i,a,s,o)}}])}(ir);hl.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var oF=["style"],Pi=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Za.Z)(n,oF);(0,L.Z)(this,t),e=(0,P.Z)(this,t,[(0,H.Z)({type:Vt.PATH,style:i,initialParsedStyle:{miterLimit:4,d:(0,H.Z)({},hs)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,A=s.markerEnd,l=s.markerMid;return o&&Nn(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Nn(l)&&e.placeMarkerMid(l),A&&Nn(A)&&(e.markerEndAngle=A.getLocalEulerAngles(),e.appendChild(A)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Nn(s)&&(this.markerStartAngle=0,s.remove()),o&&Nn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Nn(s)&&(this.markerEndAngle=0,s.remove()),o&&Nn(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,A=i.markerEndOffset,l=n?a:s;if(!(!l||!Nn(l))){var c=0,u,h,d,f,g,v;if(n){var m=this.getStartTangent(),w=(0,U.Z)(m,2),C=w[0],F=w[1];d=F[0],f=F[1],u=C[0]-F[0],h=C[1]-F[1],g=o||0,v=this.markerStartAngle}else{var Q=this.getEndTangent(),D=(0,U.Z)(Q,2),K=D[0],G=D[1];d=G[0],f=G[1],u=K[0]-G[0],h=K[1]-G[1],g=A||0,v=this.markerEndAngle}c=Math.atan2(h,u),l.setLocalEulerAngles(c*180/Math.PI+v),l.setLocalPosition(d+Math.cos(c)*g,f+Math.sin(c)*g)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(c){c.remove()}),n&&Nn(n))for(var a=1;a<i.length-1;a++){var s=(0,U.Z)(i[a].currentPoint,2),o=s[0],A=s[1],l=a===1?n:n.cloneNode(!0);this.markerMidList.push(l),this.appendChild(l),l.setLocalPosition(o,A)}}},{key:"getTotalLength",value:function(){return An(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=np(a,n),o=s.x,A=s.y,l=me(Ct(),Gt(o,A,0),i?this.getWorldTransform():this.getLocalTransform());return new ii(l[0],l[1])}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(n*An(this),i)}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.d.segments,i=[];if(n.length>1){var a=n[0].currentPoint,s=n[1].currentPoint,o=n[1].startTangent;i=[],o?(i.push([a[0]-o[0],a[1]-o[1]]),i.push([a[0],a[1]])):(i.push([s[0],s[1]]),i.push([a[0],a[1]]))}return i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.d.segments,i=n.length,a=[];if(i>1){var s=n[i-2].currentPoint,o=n[i-1].currentPoint,A=n[i-1].endTangent;a=[],A?(a.push([o[0]-A[0],o[1]-A[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(ir);Pi.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var AF=["style"],dl=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Za.Z)(n,AF);(0,L.Z)(this,t),e=(0,P.Z)(this,t,[(0,H.Z)({type:Vt.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,A=s.markerEnd,l=s.markerMid;return o&&Nn(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Nn(l)&&e.placeMarkerMid(l),A&&Nn(A)&&(e.markerEndAngle=A.getLocalEulerAngles(),e.appendChild(A)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"attributeChangedCallback",value:function(n,i,a,s,o){n==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):n==="markerStartOffset"||n==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):n==="markerStart"?(s&&Nn(s)&&(this.markerStartAngle=0,s.remove()),o&&Nn(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Nn(s)&&(this.markerEndAngle=0,s.remove()),o&&Nn(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):n==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(n){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,A=i.markerEndOffset,l=i.points,c=l||{},u=c.points,h=n?a:s;if(!(!h||!Nn(h)||!u)){var d=0,f,g,v,m,w,C;if(v=u[0][0],m=u[0][1],n)f=u[1][0]-u[0][0],g=u[1][1]-u[0][1],w=o||0,C=this.markerStartAngle;else{var F=u.length;this.parsedStyle.isClosed?(f=u[F-1][0]-u[0][0],g=u[F-1][1]-u[0][1]):(v=u[F-1][0],m=u[F-1][1],f=u[F-2][0]-u[F-1][0],g=u[F-2][1]-u[F-1][1]),w=A||0,C=this.markerEndAngle}d=Math.atan2(g,f),h.setLocalEulerAngles(d*180/Math.PI+C),h.setLocalPosition(v+Math.cos(d)*w,m+Math.sin(d)*w)}}},{key:"placeMarkerMid",value:function(n){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(u){u.remove()}),this.markerMidList=[],n&&Nn(n)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var A=s[o][0],l=s[o][1],c=o===1?n:n.cloneNode(!0);this.markerMidList.push(c),this.appendChild(c),c.setLocalPosition(A,l)}}}])}(ir);dl.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var lF=["style"],af=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=(0,Za.Z)(e,lF);return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"getTotalLength",value:function(){return Xe(this)}},{key:"getPointAtLength",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(n/this.getTotalLength(),i)}},{key:"getPoint",value:function(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var s=[],o=0,A,l,c=this.getTotalLength();a.forEach(function(m,w){a[w+1]&&(A=[0,0],A[0]=o/c,l=Bd(m[0],m[1],a[w+1][0],a[w+1][1]),o+=l,A[1]=o/c,s.push(A))}),this.parsedStyle.points.segments=s}var u=0,h=0;this.parsedStyle.points.segments.forEach(function(m,w){n>=m[0]&&n<=m[1]&&(u=(n-m[0])/(m[1]-m[0]),h=w)});var d=ba(a[h][0],a[h][1],a[h+1][0],a[h+1][1],u),f=d.x,g=d.y,v=me(Ct(),Gt(f,g,0),i?this.getWorldTransform():this.getLocalTransform());return new ii(v[0],v[1])}},{key:"getStartTangent",value:function(){var n=this.parsedStyle.points.points,i=[];return i.push([n[1][0],n[1][1]]),i.push([n[0][0],n[0][1]]),i}},{key:"getEndTangent",value:function(){var n=this.parsedStyle.points.points,i=n.length-1,a=[];return a.push([n[i-1][0],n[i-1][1]]),a.push([n[i][0],n[i][1]]),a}}])}(dl);af.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(dl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var xi=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.RECT},e)])}return(0,k.Z)(t,r),(0,I.Z)(t)}(ir);xi.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var cF=["style"],fl=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=(0,Za.Z)(e,cF);return(0,L.Z)(this,t),(0,P.Z)(this,t,[(0,H.Z)({type:Vt.TEXT,style:(0,H.Z)({fill:"black"},n)},i)])}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"getComputedTextLength",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var n;return this.getGeometryBounds(),((n=this.parsedStyle.metrics)===null||n===void 0?void 0:n.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(ir);fl.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(ir.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textDecorationThickness","textPathSide","textPathStartOffset","metrics","dx","dy"]));var uF=function(){function r(){(0,L.Z)(this,r),this.registry={},this.define(Vt.CIRCLE,Js),this.define(Vt.ELLIPSE,eh),this.define(Vt.RECT,xi),this.define(Vt.IMAGE,nh),this.define(Vt.LINE,hl),this.define(Vt.GROUP,oi),this.define(Vt.PATH,Pi),this.define(Vt.POLYGON,dl),this.define(Vt.POLYLINE,af),this.define(Vt.TEXT,fl),this.define(Vt.HTML,ul)}return(0,I.Z)(r,[{key:"define",value:function(e,n){this.registry[e]=n}},{key:"get",value:function(e){return this.registry[e]}}])}(),hF={number:function(t){return new _n(t)},percent:function(t){return new _n(t,"%")},px:function(t){return new _n(t,"px")},em:function(t){return new _n(t,"em")},rem:function(t){return new _n(t,"rem")},deg:function(t){return new _n(t,"deg")},grad:function(t){return new _n(t,"grad")},rad:function(t){return new _n(t,"rad")},turn:function(t){return new _n(t,"turn")},s:function(t){return new _n(t,"s")},ms:function(t){return new _n(t,"ms")},registerProperty:function(t){var e=t.name,n=t.inherits,i=t.interpolable,a=t.initialValue,s=t.syntax;ae.styleValueRegistry.registerMetadata({n:e,inh:n,int:i,d:a,syntax:s})},registerLayout:function(t,e){ae.layoutRegistry.registerLayout(t,e)}},NE=function(r){function t(){var e;(0,L.Z)(this,t),e=(0,P.Z)(this,t),e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new ae.AnimationTimeline(e)}catch(i){}var n={};return $p.forEach(function(i){var a=i.n,s=i.inh,o=i.d;s&&o&&(n[a]=Wt(o)?o(Vt.GROUP):o)}),e.documentElement=new oi({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"children",get:function(){return this.childNodes}},{key:"childElementCount",get:function(){return this.childNodes.length}},{key:"firstElementChild",get:function(){return this.firstChild}},{key:"lastElementChild",get:function(){return this.lastChild}},{key:"createElement",value:function(n,i){if(n==="svg")return this.documentElement;var a=this.defaultView.customElements.get(n);a||(console.warn("Unsupported tagName: ",n),a=n==="tspan"?fl:oi);var s=new a(i);return s.ownerDocument=this,s}},{key:"createElementNS",value:function(n,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(n){throw new Error(On)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(n){}}},{key:"elementsFromBBox",value:function(n,i,a,s){var o=[],A=function(c){if(!(!c.isInteractive()||c.isCulled())){var u=c.parsedStyle.pointerEvents,h=u===void 0?"auto":u,d=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(h);if(!d||c.isVisible()){var f=c.getTransformedGeometryBounds(!0);f&&!jn.isEmpty(f)&&f.max[0]>=n&&f.min[0]<=a&&f.max[1]>=i&&f.min[1]<=s&&o.push(c)}c.childNodes&&c.childNodes.forEach(function(g){g instanceof ir&&A(g)})}};return A(this.documentElement),o.sort(function(l,c){return c.sortable.renderOrder-l.sortable.renderOrder}),o}},{key:"elementFromPointSync",value:function(n,i){var a=this.defaultView.canvas2Viewport({x:n,y:i}),s=a.x,o=a.y,A=this.defaultView.getConfig(),l=A.width,c=A.height;if(s<0||o<0||s>l||o>c)return null;var u=this.defaultView.viewport2Client({x:s,y:o}),h=u.x,d=u.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:n,y:i,viewportX:s,viewportY:o,clientX:h,clientY:d},picked:[]}),g=f.picked;return g&&g[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var e=(0,Wa.Z)((0,ri.Z)().mark(function i(a,s){var o,A,l,c,u,h,d,f,g,v,m;return(0,ri.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),A=o.x,l=o.y,c=this.defaultView.getConfig(),u=c.width,h=c.height,!(A<0||l<0||A>u||l>h)){w.next=1;break}return w.abrupt("return",null);case 1:return d=this.defaultView.viewport2Client({x:A,y:l}),f=d.x,g=d.y,w.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:s,viewportX:A,viewportY:l,clientX:f,clientY:g},picked:[]});case 2:return v=w.sent,m=v.picked,w.abrupt("return",m&&m[0]||this.documentElement);case 3:case"end":return w.stop()}},i,this)}));function n(i,a){return e.apply(this,arguments)}return n}()},{key:"elementsFromPointSync",value:function(n,i){var a=this.defaultView.canvas2Viewport({x:n,y:i}),s=a.x,o=a.y,A=this.defaultView.getConfig(),l=A.width,c=A.height;if(s<0||o<0||s>l||o>c)return[];var u=this.defaultView.viewport2Client({x:s,y:o}),h=u.x,d=u.y,f=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:n,y:i,viewportX:s,viewportY:o,clientX:h,clientY:d},picked:[]}),g=f.picked;return g[g.length-1]!==this.documentElement&&g.push(this.documentElement),g}},{key:"elementsFromPoint",value:function(){var e=(0,Wa.Z)((0,ri.Z)().mark(function i(a,s){var o,A,l,c,u,h,d,f,g,v,m;return(0,ri.Z)().wrap(function(w){for(;;)switch(w.prev=w.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),A=o.x,l=o.y,c=this.defaultView.getConfig(),u=c.width,h=c.height,!(A<0||l<0||A>u||l>h)){w.next=1;break}return w.abrupt("return",[]);case 1:return d=this.defaultView.viewport2Client({x:A,y:l}),f=d.x,g=d.y,w.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:s,viewportX:A,viewportY:l,clientX:f,clientY:g},picked:[]});case 2:return v=w.sent,m=v.picked,m[m.length-1]!==this.documentElement&&m.push(this.documentElement),w.abrupt("return",m);case 3:case"end":return w.stop()}},i,this)}));function n(i,a){return e.apply(this,arguments)}return n}()},{key:"appendChild",value:function(n,i){throw new Error(eA)}},{key:"insertBefore",value:function(n,i){throw new Error(eA)}},{key:"removeChild",value:function(n,i){throw new Error(eA)}},{key:"replaceChild",value:function(n,i,a){throw new Error(eA)}},{key:"append",value:function(){throw new Error(eA)}},{key:"prepend",value:function(){throw new Error(eA)}},{key:"getElementById",value:function(n){return this.documentElement.getElementById(n)}},{key:"getElementsByName",value:function(n){return this.documentElement.getElementsByName(n)}},{key:"getElementsByTagName",value:function(n){return this.documentElement.getElementsByTagName(n)}},{key:"getElementsByClassName",value:function(n){return this.documentElement.getElementsByClassName(n)}},{key:"querySelector",value:function(n){return this.documentElement.querySelector(n)}},{key:"querySelectorAll",value:function(n){return this.documentElement.querySelectorAll(n)}},{key:"find",value:function(n){return this.documentElement.find(n)}},{key:"findAll",value:function(n){return this.documentElement.findAll(n)}}])}(vr),kE=function(){function r(t){(0,L.Z)(this,r),this.strategies=t}return(0,I.Z)(r,[{key:"apply",value:function(e){var n=e.config,i=e.camera,a=e.renderingService,s=e.renderingContext,o=this.strategies;a.hooks.cull.tap(r.tag,function(A){if(A){var l,c=A.cullable;if(o.length===0?c.visible=s.unculledEntities.indexOf(A.entity)>-1:c.visible=o.every(function(h){return h.isVisible(i,A)}),!A.isCulled()&&A.isVisible())return A;var u=((l=n.future)===null||l===void 0?void 0:l.experimentalCancelEventPropagation)===!0;return A.dispatchEvent(new Vr(yn.CULLED),u,u),null}return A}),a.hooks.afterRender.tap(r.tag,function(A){A.cullable.visibilityPlaneMask=-1})}}])}();kE.tag="Culling";var QE=function(){function r(){var t=this;(0,L.Z)(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new tf(null),this.rootWheelEvent=new om(null),this.onPointerMove=function(e){var n,i=(n=t.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView;if(!(i.supportsTouchEvents&&e.pointerType==="touch")){var a=t.normalizeToPointerEvent(e,i),s=(0,Gs.Z)(a),o;try{for(s.s();!(o=s.n()).done;){var A=o.value,l=t.bootstrapEvent(t.rootPointerEvent,A,i,e);t.context.eventService.mapEvent(l)}}catch(c){s.e(c)}finally{s.f()}t.setCursor(t.context.eventService.cursor)}},this.onClick=function(e){var n,i=(n=t.context.renderingContext.root)===null||n===void 0||(n=n.ownerDocument)===null||n===void 0?void 0:n.defaultView,a=t.normalizeToPointerEvent(e,i),s=(0,Gs.Z)(a),o;try{for(s.s();!(o=s.n()).done;){var A=o.value,l=t.bootstrapEvent(t.rootPointerEvent,A,i,e);t.context.eventService.mapEvent(l)}}catch(c){s.e(c)}finally{s.f()}t.setCursor(t.context.eventService.cursor)}}return(0,I.Z)(r,[{key:"apply",value:function(e){var n=this;this.context=e;var i=e.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=n.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),A=o.picked;return A[0]||null}),i.hooks.pointerWheel.tap(r.tag,function(s){var o=n.normalizeWheelEvent(s);n.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.normalizeToPointerEvent(s,a);if(n.autoPreventDefault&&o[0].isNormalized){var A=s.cancelable||!("cancelable"in s);A&&s.preventDefault()}var l=(0,Gs.Z)(o),c;try{for(l.s();!(c=l.n()).done;){var u=c.value,h=n.bootstrapEvent(n.rootPointerEvent,u,a,s);n.context.eventService.mapEvent(h)}}catch(d){l.e(d)}finally{l.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerUp.tap(r.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=n.context.contextService.getDomElement(),A=n.context.eventService.isNativeEventFromCanvas(o,s),l=A?"":"outside",c=n.normalizeToPointerEvent(s,a),u=(0,Gs.Z)(c),h;try{for(u.s();!(h=u.n()).done;){var d=h.value,f=n.bootstrapEvent(n.rootPointerEvent,d,a,s);f.type+=l,n.context.eventService.mapEvent(f)}}catch(g){u.e(g)}finally{u.f()}n.setCursor(n.context.eventService.cursor)}}),i.hooks.pointerMove.tap(r.tag,this.onPointerMove),i.hooks.pointerOver.tap(r.tag,this.onPointerMove),i.hooks.pointerOut.tap(r.tag,this.onPointerMove),i.hooks.click.tap(r.tag,this.onClick),i.hooks.pointerCancel.tap(r.tag,function(s){var o=n.normalizeToPointerEvent(s,a),A=(0,Gs.Z)(o),l;try{for(A.s();!(l=A.n()).done;){var c=l.value,u=n.bootstrapEvent(n.rootPointerEvent,c,a,s);n.context.eventService.mapEvent(u)}}catch(h){A.e(h)}finally{A.f()}n.setCursor(n.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(e,n,i,a){e.view=i,e.originalEvent=null,e.nativeEvent=a,e.pointerId=n.pointerId,e.width=n.width,e.height=n.height,e.isPrimary=n.isPrimary,e.pointerType=n.pointerType,e.pressure=n.pressure,e.tangentialPressure=n.tangentialPressure,e.tiltX=n.tiltX,e.tiltY=n.tiltY,e.twist=n.twist,this.transferMouseData(e,n);var s=this.context.eventService.client2Viewport({x:n.clientX,y:n.clientY}),o=s.x,A=s.y;e.viewport.x=o,e.viewport.y=A;var l=this.context.eventService.viewport2Canvas(e.viewport),c=l.x,u=l.y;return e.canvas.x=c,e.canvas.y=u,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=a.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e.type.startsWith("mouse")&&(e.type=e.type.replace("mouse","pointer")),e.type.startsWith("touch")&&(e.type=jM[e.type]||e.type),e}},{key:"normalizeWheelEvent",value:function(e){var n=this.rootWheelEvent;this.transferMouseData(n,e),n.deltaMode=e.deltaMode,n.deltaX=e.deltaX,n.deltaY=e.deltaY,n.deltaZ=e.deltaZ;var i=this.context.eventService.client2Viewport({x:e.clientX,y:e.clientY}),a=i.x,s=i.y;n.viewport.x=a,n.viewport.y=s;var o=this.context.eventService.viewport2Canvas(n.viewport),A=o.x,l=o.y;return n.canvas.x=A,n.canvas.y=l,n.global.copyFrom(n.canvas),n.offset.copyFrom(n.canvas),n.nativeEvent=e,n.type=e.type,n}},{key:"transferMouseData",value:function(e,n){e.isTrusted=n.isTrusted,e.srcElement=n.srcElement,e.timeStamp=rm.now(),e.type=n.type,e.altKey=n.altKey,e.metaKey=n.metaKey,e.shiftKey=n.shiftKey,e.ctrlKey=n.ctrlKey,e.button=n.button,e.buttons=n.buttons,e.client.x=n.clientX,e.client.y=n.clientY,e.movement.x=n.movementX,e.movement.y=n.movementY,e.page.x=n.pageX,e.page.y=n.pageY,e.screen.x=n.screenX,e.screen.y=n.screenY,e.relatedTarget=null}},{key:"setCursor",value:function(e){this.context.contextService.applyCursorStyle(e||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(e,n){var i=[];if(n.isTouchEvent(e))for(var a=0;a<e.changedTouches.length;a++){var s=e.changedTouches[a];Ye(s.button)&&(s.button=0),Ye(s.buttons)&&(s.buttons=1),Ye(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),Ye(s.width)&&(s.width=s.radiusX||1),Ye(s.height)&&(s.height=s.radiusY||1),Ye(s.tiltX)&&(s.tiltX=0),Ye(s.tiltY)&&(s.tiltY=0),Ye(s.pointerType)&&(s.pointerType="touch"),Ye(s.pointerId)&&(s.pointerId=s.identifier||0),Ye(s.pressure)&&(s.pressure=s.force||.5),Ye(s.twist)&&(s.twist=0),Ye(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(n.isMouseEvent(e)){var o=e;Ye(o.isPrimary)&&(o.isPrimary=!0),Ye(o.width)&&(o.width=1),Ye(o.height)&&(o.height=1),Ye(o.tiltX)&&(o.tiltX=0),Ye(o.tiltY)&&(o.tiltY=0),Ye(o.pointerType)&&(o.pointerType="mouse"),Ye(o.pointerId)&&(o.pointerId=ZM),Ye(o.pressure)&&(o.pressure=.5),Ye(o.twist)&&(o.twist=0),Ye(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();QE.tag="Event";var dF=[Vt.CIRCLE,Vt.ELLIPSE,Vt.IMAGE,Vt.RECT,Vt.LINE,Vt.POLYLINE,Vt.POLYGON,Vt.TEXT,Vt.PATH,Vt.HTML],fF=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"isVisible",value:function(e,n){var i,a=n.cullable;if(!a.enable)return!0;var s=n.getRenderBounds();if(jn.isEmpty(s))return!1;var o=e.getFrustum(),A=(i=n.parentNode)===null||i===void 0||(i=i.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(n,s,A||tA.INDETERMINATE,o.planes),a.visible=a.visibilityPlaneMask!==tA.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,n,i,a){if(i===tA.OUTSIDE||i===tA.INSIDE)return i;for(var s=tA.INSIDE,o=dF.indexOf(e.nodeName)>-1,A=0,l=a.length;A<l;++A){var c=1<<A;if(i&c&&!(o&&(A===4||A===5))){var u=a[A],h=u.normal,d=u.distance;if(_e(h,n.getPositiveFarPoint(a[A]))+d<0)return tA.OUTSIDE;_e(h,n.getNegativeFarPoint(a[A]))+d<0&&(s|=c)}}return s}}])}(),UE=function(){function r(){(0,L.Z)(this,r),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return(0,I.Z)(r,[{key:"apply",value:function(e){var n=this,i,a=e.renderingService,s=e.renderingContext,o=s.root.ownerDocument.defaultView,A=function(f){a.dirty()},l=function(f){var g,v=f.detail;(g=n.mutationRecords).push.apply(g,(0,N.Z)(v)),a.dirty()},c=function(f){var g=f.target;ae.enableSizeAttenuation&&ae.styleValueRegistry.updateSizeAttenuation(g,o.getCamera().getZoom())},u=function(f){var g=f.target;ae.sceneGraphService.dirtyToRoot(g),a.dirty()};a.hooks.init.tap(r.tag,function(){o.addEventListener(yn.MOUNTED,c),o.addEventListener(yn.UNMOUNTED,u),o.addEventListener(yn.ATTR_MODIFIED,A),o.addEventListener(yn.BOUNDS_CHANGED,l)}),a.hooks.destroy.tap(r.tag,function(){o.removeEventListener(yn.MOUNTED,c),o.removeEventListener(yn.UNMOUNTED,u),o.removeEventListener(yn.ATTR_MODIFIED,A),o.removeEventListener(yn.BOUNDS_CHANGED,l),n.mutationRecords=[]});var h=(i=ae.globalThis.requestIdleCallback)!==null&&i!==void 0?i:im.bind(ae.globalThis);a.hooks.endFrame.tap(r.tag,function(){n.isFirstTimeRendering&&(n.isFirstTimeRendering=!1,h(function(){n.isFirstTimeRenderingFinished=!0})),n.mutationRecords=[]})}}])}();UE.tag="Prepare";function F5(r){return!!r.document}var Fa=function(r){return r.READY="ready",r.BEFORE_RENDER="beforerender",r.RERENDER="rerender",r.AFTER_RENDER="afterrender",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.RESIZE="resize",r.DIRTY_RECTANGLE="dirtyrectangle",r.RENDERER_CHANGED="rendererchanged",r}({}),PE=500,gF=.1,vF=1e3,sf=new Vr(yn.MOUNTED),of=new Vr(yn.UNMOUNTED),um=new Vr(Fa.BEFORE_RENDER),DE=new Vr(Fa.RERENDER),hm=new Vr(Fa.AFTER_RENDER),dm=function(r){function t(e){var n;(0,L.Z)(this,t),n=(0,P.Z)(this,t),n.Element=ir,n.inited=!1,n.context={};var i=e.container,a=e.canvas,s=e.renderer,o=e.width,A=e.height,l=e.background,c=e.cursor,u=e.supportsMutipleCanvasesInOneContainer,h=e.cleanUpOnDestroy,d=h===void 0?!0:h,f=e.offscreenCanvas,g=e.devicePixelRatio,v=e.requestAnimationFrame,m=e.cancelAnimationFrame,w=e.createImage,C=e.supportsTouchEvents,F=e.supportsPointerEvents,Q=e.isTouchEvent,D=e.isMouseEvent,K=e.dblClickSpeed,G=o,J=A,$=g||nm&&window.devicePixelRatio||1;return $=$>=1?Math.ceil($):1,a&&(G=o||VM(a)||a.width/$,J=A||WM(a)||a.height/$),n.customElements=new uF,n.devicePixelRatio=$,n.requestAnimationFrame=v!=null?v:im.bind(ae.globalThis),n.cancelAnimationFrame=m!=null?m:wE.bind(ae.globalThis),n.createImage=w!=null?w:function(){return new window.Image},n.supportsTouchEvents=C!=null?C:"ontouchstart"in ae.globalThis,n.supportsPointerEvents=F!=null?F:!!ae.globalThis.PointerEvent,n.isTouchEvent=Q!=null?Q:function(at){return n.supportsTouchEvents&&at instanceof ae.globalThis.TouchEvent},n.isMouseEvent=D!=null?D:function(at){return!ae.globalThis.MouseEvent||at instanceof ae.globalThis.MouseEvent&&(!n.supportsPointerEvents||!(at instanceof ae.globalThis.PointerEvent))},f&&(ae.offscreenCanvas=f),n.document=new NE,n.document.defaultView=n,u||HM(i,n,d),n.initRenderingContext((0,H.Z)((0,H.Z)({},e),{},{width:G,height:J,background:l!=null?l:"transparent",cursor:c!=null?c:"default",cleanUpOnDestroy:d,devicePixelRatio:$,requestAnimationFrame:n.requestAnimationFrame,cancelAnimationFrame:n.cancelAnimationFrame,createImage:n.createImage,supportsTouchEvents:n.supportsTouchEvents,supportsPointerEvents:n.supportsPointerEvents,isTouchEvent:n.isTouchEvent,isMouseEvent:n.isMouseEvent,dblClickSpeed:K!=null?K:200})),n.initDefaultCamera(G,J,s.clipSpaceNearZ),n.initRenderer(s,!0),n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"initRenderingContext",value:function(n){this.context.config=n,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(n,i,a){var s=this,o=new ae.CameraContribution;o.clipSpaceNearZ=a,o.setType(In.EXPLORING,pc.DEFAULT).setPosition(n/2,i/2,PE).setFocalPoint(n/2,i/2,0).setOrthographic(n/-2,n/2,i/2,i/-2,gF,vF),o.canvas=this,o.eventEmitter.on(Rd.UPDATED,function(){s.context.renderingContext.renderReasons.add(Oc.CAMERA_CHANGED),ae.enableSizeAttenuation&&s.getConfig().renderer.getConfig().enableSizeAttenuation&&s.updateSizeAttenuation()}),this.context.camera=o}},{key:"updateSizeAttenuation",value:function(){var n=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){ae.styleValueRegistry.updateSizeAttenuation(i,n)})}},{key:"getConfig",value:function(){return this.context.config}},{key:"getRoot",value:function(){return this.document.documentElement}},{key:"getCamera",value:function(){return this.context.camera}},{key:"getContextService",value:function(){return this.context.contextService}},{key:"getEventService",value:function(){return this.context.eventService}},{key:"getRenderingService",value:function(){return this.context.renderingService}},{key:"getRenderingContext",value:function(){return this.context.renderingContext}},{key:"getStats",value:function(){return this.getRenderingService().getStats()}},{key:"ready",get:function(){var n=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){n.resolveReadyPromise=function(){i(n)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var n,i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,a=arguments.length>1?arguments[1]:void 0;Ln.clearCache();var s=((n=this.getConfig().future)===null||n===void 0?void 0:n.experimentalCancelEventPropagation)===!0;a||this.dispatchEvent(new Vr(Fa.BEFORE_DESTROY),s,s),this.frameId&&this.cancelAnimationFrame(this.frameId);var o=this.getRoot();i&&(this.unmountChildren(o),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),a||this.dispatchEvent(new Vr(Fa.AFTER_DESTROY),s,s);var A=function(c){c.currentTarget=null,c.manager=null,c.target=null,c.relatedNode=null};A(sf),A(of),A(um),A(DE),A(hm),A(Xs),A(lm),A(cm),A(LE),ae.textService.clearCache()}},{key:"changeSize",value:function(n,i){this.resize(n,i)}},{key:"resize",value:function(n,i){var a,s=this.context.config;s.width=n,s.height=i,this.getContextService().resize(n,i);var o=this.context.camera,A=o.getProjectionMode();o.setPosition(n/2,i/2,PE).setFocalPoint(n/2,i/2,0),A===$i.ORTHOGRAPHIC?o.setOrthographic(n/-2,n/2,i/2,i/-2,o.getNear(),o.getFar()):o.setAspect(n/i);var l=((a=s.future)===null||a===void 0?void 0:a.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new Vr(Fa.RESIZE,{width:n,height:i}),l,l)}},{key:"appendChild",value:function(n,i){return this.document.documentElement.appendChild(n,i)}},{key:"insertBefore",value:function(n,i){return this.document.documentElement.insertBefore(n,i)}},{key:"removeChild",value:function(n){return this.document.documentElement.removeChild(n)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(n){var i,a=this;n&&(um.detail=n,hm.detail=n);var s=((i=this.getConfig().future)===null||i===void 0?void 0:i.experimentalCancelEventPropagation)===!0;this.dispatchEvent(um,s,s);var o=this.getRenderingService();o.render(this,n,function(){a.dispatchEvent(DE,s,s)}),this.dispatchEvent(hm,s,s)}},{key:"run",value:function(){var n=this,i=function(s,o){n.render(o),n.frameId=n.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!n)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new QE,new UE,new kE([new fF])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService((0,H.Z)((0,H.Z)({},ae),this.context)),this.context.renderingService=new MT(ae,this.context),this.context.eventService=new ST(ae,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(n,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(n,a)}).catch(function(s){console.error(s)})}},{key:"initRenderingService",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){var o;i.inited=!0;var A=((o=i.getConfig().future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation)===!0;a?s?i.requestAnimationFrame(function(){i.dispatchEvent(new Vr(Fa.READY),A,A)}):i.dispatchEvent(new Vr(Fa.READY),A,A):i.dispatchEvent(new Vr(Fa.RENDERER_CHANGED),A,A),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(l){var c,u;(c=(u=l).dirty)===null||c===void 0||c.call(u,!0,!0)}),i.mountChildren(i.getRoot()),n.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(n){var i=this,a=n.getPlugins();a.forEach(function(s){s.context=i.context,s.init(ae)})}},{key:"setRenderer",value:function(n){var i=this.getConfig();if(i.renderer!==n){var a=i.renderer;i.renderer=n,this.destroy(!1,!0),(0,N.Z)((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(s){s.destroy(ae)}),this.initRenderer(n)}}},{key:"setCursor",value:function(n){var i=this.getConfig();i.cursor=n,this.getContextService().applyCursorStyle(n)}},{key:"unmountChildren",value:function(n){var i=this;if(n.childNodes.forEach(function(o){i.unmountChildren(o)}),this.inited){if(n.isMutationObserved)n.dispatchEvent(of);else{var a,s=((a=this.getConfig().future)===null||a===void 0?void 0:a.experimentalCancelEventPropagation)===!0;of.target=n,this.dispatchEvent(of,!0,s)}n!==this.document.documentElement&&(n.ownerDocument=null),n.isConnected=!1}n.isCustomElement&&n.disconnectedCallback&&n.disconnectedCallback()}},{key:"mountChildren",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:qd(n);if(this.inited){if(!n.isConnected&&(n.ownerDocument=this.document,n.isConnected=!0,!a))if(n.isMutationObserved)n.dispatchEvent(sf);else{var s,o=((s=this.getConfig().future)===null||s===void 0?void 0:s.experimentalCancelEventPropagation)===!0;sf.target=n,this.dispatchEvent(sf,!0,o)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",n.nodeName);n.childNodes.forEach(function(A){i.mountChildren(A,a)}),n.isCustomElement&&n.connectedCallback&&n.connectedCallback()}},{key:"mountFragment",value:function(n){this.mountChildren(n,!1)}},{key:"client2Viewport",value:function(n){return this.getEventService().client2Viewport(n)}},{key:"viewport2Client",value:function(n){return this.getEventService().viewport2Client(n)}},{key:"viewport2Canvas",value:function(n){return this.getEventService().viewport2Canvas(n)}},{key:"canvas2Viewport",value:function(n){return this.getEventService().canvas2Viewport(n)}},{key:"getPointByClient",value:function(n,i){return this.client2Viewport({x:n,y:i})}},{key:"getClientByPoint",value:function(n,i){return this.viewport2Client({x:n,y:i})}}])}(SE),O5=0,RE=new WeakMap,_E=null,I5=null,L5=null,Af,So;function N5(r,t){return Af=new _E(r,t)}function k5(r){return So||(So=_E.copy(Af),So.oldValue=r,So)}function Q5(){Af=So=void 0}function pF(r){return r===So||r===Af}function U5(r,t){return r===t?r:So&&pF(r)?So:null}function mF(r){r.nodes.forEach(function(t){var e=RE.get(t);e&&e.forEach(function(n){n.observer===r&&n.removeTransientObservers()})})}function P5(r,t){for(var e=r;e;e=e.parentNode){var n=RE.get(e);if(n)for(var i=0;i<n.length;i++){var a=n[i],s=a.options;if(!(e!==r&&!s.subtree)){var o=t(s);o&&a.enqueue(o)}}}}var fm=!1,gm=null;function D5(r){gm.push(r),fm||(fm=!0,typeof ae.globalThis!="undefined"?ae.globalThis.setTimeout(vm):vm())}function vm(){fm=!1;var r=gm;gm=[],r.sort(function(e,n){return e.uid-n.uid});var t=!1;r.forEach(function(e){var n=e.takeRecords();mF(e),n.length&&(e.callback(n,e),t=!0)}),t&&vm()}var yF=function(){function r(){(0,L.Z)(this,r),this.cacheStore=new Map}return(0,I.Z)(r,[{key:"onRefAdded",value:function(e){}},{key:"has",value:function(e){return this.cacheStore.has(e)}},{key:"put",value:function(e,n,i){return this.cacheStore.has(e)?!1:(this.cacheStore.set(e,{value:n,counter:new Set([i.entity])}),this.onRefAdded(i),!0)}},{key:"get",value:function(e,n){var i=this.cacheStore.get(e);return i?(i.counter.has(n.entity)||(i.counter.add(n.entity),this.onRefAdded(n)),i.value):null}},{key:"update",value:function(e,n,i){var a=this.cacheStore.get(e);return a?(a.value=(0,H.Z)((0,H.Z)({},a.value),n),a.counter.has(i.entity)||(a.counter.add(i.entity),this.onRefAdded(i)),!0):!1}},{key:"release",value:function(e,n){var i=this.cacheStore.get(e);return i?(i.counter.delete(n.entity),i.counter.size<=0&&this.cacheStore.delete(e),!0):!1}},{key:"releaseRef",value:function(e){var n=this;Array.from(this.cacheStore.keys()).forEach(function(i){n.release(i,e)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),pm=[],mm=[],ym=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,null,[{key:"stop",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;r.rafId&&(e.cancelAnimationFrame(r.rafId),r.rafId=null)}},{key:"executeTask",value:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:r.api;pm.length<=0&&mm.length<=0||(mm.forEach(function(n){return n()}),mm=pm.splice(0,r.TASK_NUM_PER_FRAME),r.rafId=e.requestAnimationFrame(function(){r.executeTask(e)}))}},{key:"sliceImage",value:function(e,n,i,a){for(var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r.api,A=e.naturalWidth||e.width,l=e.naturalHeight||e.height,c=n-s,u=i-s,h=Math.ceil(A/c),d=Math.ceil(l/u),f={tileSize:[n,i],gridSize:[d,h],tiles:Array(d).fill(null).map(function(){return Array(h).fill(null)})},g=function(w){for(var C=function(D){pm.push(function(){var K=D*c,G=w*u,J=[Math.min(n,A-K),Math.min(i,l-G)],$=J[0],at=J[1],At=o.createCanvas();At.width=n,At.height=i;var pt=At.getContext("2d");pt.drawImage(e,K,G,$,at,0,0,$,at),f.tiles[w][D]={x:K,y:G,tileX:D,tileY:w,data:At},a()})},F=0;F<h;F++)C(F)},v=0;v<d;v++)g(v);return r.stop(),r.executeTask(),f}}])}();ym.TASK_NUM_PER_FRAME=10;var Oa=new yF;Oa.onRefAdded=function(t){var e=this;t.addEventListener(yn.DESTROY,function(){e.releaseRef(t)},{once:!0})};var wm=function(){function r(t,e){(0,L.Z)(this,r),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=e}return(0,I.Z)(r,[{key:"getImageSync",value:function(e,n,i){var a=gn(e)?e:e.src;if(Oa.has(a)){var s=Oa.get(a,n);if(s.img.complete)return i==null||i(s),s}return this.getOrCreateImage(e,n).then(function(o){i==null||i(o)}).catch(function(o){console.error(o)}),null}},{key:"getOrCreateImage",value:function(e,n){var i=this,a=gn(e)?e:e.src;if(!gn(e)&&!Oa.has(a)){var s={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:lf(e)};Oa.put(a,s,n)}if(Oa.has(a)){var o=Oa.get(a,n);return o.img.complete?Promise.resolve(o):new Promise(function(A,l){o.img.addEventListener("load",function(){o.size=[o.img.naturalWidth||o.img.width,o.img.naturalHeight||o.img.height],o.tileSize=lf(o.img),A(o)}),o.img.addEventListener("error",function(c){l(c)})})}return new Promise(function(A,l){var c=i.context.config.createImage();if(c){var u={img:c,size:[0,0],tileSize:lf(c)};Oa.put(a,u,n),c.onload=function(){u.size=[c.naturalWidth||c.width,c.naturalHeight||c.height],u.tileSize=lf(u.img),A(u)},c.onerror=function(h){l(h)},c.crossOrigin="Anonymous",c.src=a}})}},{key:"createDownSampledImage",value:function(){var t=(0,Wa.Z)((0,ri.Z)().mark(function n(i,a){var s,o,A,l,c,u,h,d,f,g,v,m,w,C;return(0,ri.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=1,this.getOrCreateImage(i,a);case 1:if(s=F.sent,typeof s.downSamplingRate=="undefined"){F.next=2;break}return F.abrupt("return",s);case 2:if(o=this.context.config.enableLargeImageOptimization,A=typeof o=="boolean"?{}:o,l=A.maxDownSampledImageSize,c=l===void 0?2048:l,u=A.downSamplingRateThreshold,h=u===void 0?.5:u,d=this.runtime.globalThis.createImageBitmap,f=(0,U.Z)(s.size,2),g=f[0],v=f[1],m=s.img,w=Math.min((c+c)/(g+v),Math.max(.01,Math.min(h,.5))),C=(0,H.Z)((0,H.Z)({},s),{},{downSamplingRate:w}),Oa.update(s.img.src,C,a),!d){F.next=7;break}return F.prev=3,F.next=4,d(s.img,{resizeWidth:g*w,resizeHeight:v*w});case 4:m=F.sent,F.next=6;break;case 5:F.prev=5,F.catch(3),w=1;case 6:F.next=8;break;case 7:w=1;case 8:return C=(0,H.Z)((0,H.Z)({},this.getImageSync(i,a)),{},{downSampled:m,downSamplingRate:w}),Oa.update(s.img.src,C,a),F.abrupt("return",C);case 9:case"end":return F.stop()}},n,this,[[3,5]])}));function e(n,i){return t.apply(this,arguments)}return e}()},{key:"createImageTiles",value:function(){var t=(0,Wa.Z)((0,ri.Z)().mark(function n(i,a,s,o){var A,l,c,u,h;return(0,ri.Z)().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.next=1,this.getOrCreateImage(i,o);case 1:return A=d.sent,l=o.ownerDocument.defaultView,c=l.requestAnimationFrame,u=l.cancelAnimationFrame,ym.api={requestAnimationFrame:c,cancelAnimationFrame:u,createCanvas:function(){return Am.createCanvas()}},h=(0,H.Z)((0,H.Z)({},A),ym.sliceImage(A.img,A.tileSize[0],A.tileSize[0],s)),Oa.update(A.img.src,h,o),d.abrupt("return",h);case 2:case"end":return d.stop()}},n,this)}));function e(n,i,a,s){return t.apply(this,arguments)}return e}()},{key:"releaseImage",value:function(e,n){Oa.release(gn(e)?e:e.src,n)}},{key:"releaseImageRef",value:function(e){Oa.releaseRef(e)}},{key:"getOrCreatePatternSync",value:function(e,n,i,a,s,o,A){var l=this.generatePatternKey(n);if(l&&this.patternCache[l])return this.patternCache[l];var c=n.image,u=n.repetition,h=n.transform,d,f=!1;if(gn(c)){var g=this.getImageSync(c,e,A);d=g==null?void 0:g.img}else a?(d=a,f=!0):d=c;var v=d&&i.createPattern(d,u);if(v){var m;h?m=xE(oE(h),new ir({})):m=Ie(te()),f&&Jn(m,m,[1/s,1/s,1]),v.setTransform({a:m[0],b:m[1],c:m[4],d:m[5],e:m[12]+o[0],f:m[13]+o[1]})}return l&&v&&(this.patternCache[l]=v),v}},{key:"getOrCreateGradient",value:function(e,n){var i=this.generateGradientKey(e),a=e.type,s=e.steps,o=e.min,A=e.width,l=e.height,c=e.angle,u=e.cx,h=e.cy,d=e.size;if(this.gradientCache[i])return this.gradientCache[i];var f=null;if(a===vs.LinearGradient){var g=Rp(o,A,l,c),v=g.x1,m=g.y1,w=g.x2,C=g.y2;f=n.createLinearGradient(v,m,w,C)}else if(a===vs.RadialGradient){var F=_p(o,A,l,u,h,d),Q=F.x,D=F.y,K=F.r;f=n.createRadialGradient(Q,D,0,Q,D,K)}return f&&(s.forEach(function(G){var J=G.offset,$=G.color;if(J.unit===ge.kPercentage){var at;(at=f)===null||at===void 0||at.addColorStop(J.value/100,$.toString())}}),this.gradientCache[i]=f),this.gradientCache[i]}},{key:"generateGradientKey",value:function(e){var n=e.type,i=e.min,a=e.width,s=e.height,o=e.steps,A=e.angle,l=e.cx,c=e.cy,u=e.size;return"gradient-".concat(n,"-").concat((A==null?void 0:A.toString())||0,"-").concat((l==null?void 0:l.toString())||0,"-").concat((c==null?void 0:c.toString())||0,"-").concat((u==null?void 0:u.toString())||0,"-").concat(i[0],"-").concat(i[1],"-").concat(a,"-").concat(s,"-").concat(o.map(function(h){var d=h.offset,f=h.color;return"".concat(d).concat(f)}).join("-"))}},{key:"generatePatternKey",value:function(e){var n=e.image,i=e.repetition;if(gn(n))return"pattern-".concat(n,"-").concat(i);if(n.nodeName==="rect")return"pattern-".concat(n.entity,"-").concat(i)}}])}();wm.isSupportTile=!!Am.createCanvas();function lf(r){if(!r.complete)return[0,0];var t=r.naturalWidth||r.width,e=r.naturalHeight||r.height,n=256;return[256,512].forEach(function(i){var a=Math.ceil(e/i),s=Math.ceil(t/i);a*s<1e3&&(n=i)}),[n,n]}var HE=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"apply",value:function(e){var n=e.renderingService,i=e.renderingContext,a=e.imagePool,s=i.root.ownerDocument.defaultView,o=function(u,h,d){var f=u.parsedStyle,g=f.width,v=f.height;g&&!v?u.setAttribute("height",d/h*g):!g&&v&&u.setAttribute("width",h/d*v)},A=function(u){var h=u.target,d=h.nodeName,f=h.attributes;if(d===Vt.IMAGE){var g=f.src,v=f.keepAspectRatio;a.getImageSync(g,h,function(m){var w=m.img,C=w.width,F=w.height;v&&o(h,C,F),h.dirty(),n.dirty()})}},l=function(u){var h=u.target,d=u.attrName,f=u.prevValue,g=u.newValue;h.nodeName!==Vt.IMAGE||d!=="src"||(f!==g&&a.releaseImage(f,h),gn(g)&&a.getOrCreateImage(g,h).then(function(v){var m=v.img,w=m.width,C=m.height;h.attributes.keepAspectRatio&&o(h,w,C),h.dirty(),n.dirty()}).catch(function(){}))};n.hooks.init.tap(r.tag,function(){s.addEventListener(yn.MOUNTED,A),s.addEventListener(yn.ATTR_MODIFIED,l)}),n.hooks.destroy.tap(r.tag,function(){s.removeEventListener(yn.MOUNTED,A),s.removeEventListener(yn.ATTR_MODIFIED,l)})}}])}();HE.tag="LoadImage";var wF=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="image-loader",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(n){this.context.imagePool=new wm(this.context,n),this.addRenderingPlugin(new HE)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ls),EF=Object.freeze({__proto__:null,ImagePool:wm,Plugin:wF}),BF="g-canvas-camera",GE=function(){function r(){(0,L.Z)(this,r),this.displayObjectHTMLElementMap=new WeakMap}return(0,I.Z)(r,[{key:"joinTransformMatrix",value:function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([e[0],e[1],e[4],e[5],e[12]+n[0],e[13]+n[1]].join(","),")")}},{key:"apply",value:function(e,n){var i=this,a=e.camera,s=e.renderingContext,o=e.renderingService;this.context=e;var A=s.root.ownerDocument.defaultView,l=A.context.eventService.nativeHTMLMap,c=function(m,w){w.style.transform=i.joinTransformMatrix(m.getWorldTransform(),m.getOrigin())},u=function(m){var w=m.target;if(w.nodeName===Vt.HTML){i.$camera||(i.$camera=i.createCamera(a));var C=i.getOrCreateEl(w);i.$camera.appendChild(C),Object.keys(w.attributes).forEach(function(F){i.updateAttribute(F,w)}),c(w,C),l.set(C,w)}},h=function(m){var w=m.target;if(w.nodeName===Vt.HTML&&i.$camera){var C=i.getOrCreateEl(w);C&&(C.remove(),l.delete(C))}},d=function(m){var w=m.target;if(w.nodeName===Vt.HTML){var C=m.attrName;i.updateAttribute(C,w)}},f=function(m){for(var w=m.detail,C=0;C<w.length;C++){var F=w[C],Q=F.target,D=Q.nodeName===Vt.FRAGMENT?Q.childNodes:[Q];D.forEach(function(K){if(K.nodeName===Vt.HTML){var G=i.getOrCreateEl(K);c(K,G)}})}},g=function(){if(i.$camera){var m=i.context.config,w=m.width,C=m.height;i.$camera.parentElement.style.width="".concat(w||0,"px"),i.$camera.parentElement.style.height="".concat(C||0,"px")}};o.hooks.init.tap(r.tag,function(){A.addEventListener(Fa.RESIZE,g),A.addEventListener(yn.MOUNTED,u),A.addEventListener(yn.UNMOUNTED,h),A.addEventListener(yn.ATTR_MODIFIED,d),A.addEventListener(yn.BOUNDS_CHANGED,f)}),o.hooks.endFrame.tap(r.tag,function(){i.$camera&&s.renderReasons.has(Oc.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),o.hooks.destroy.tap(r.tag,function(){i.$camera&&i.$camera.remove(),A.removeEventListener(Fa.RESIZE,g),A.removeEventListener(yn.MOUNTED,u),A.removeEventListener(yn.UNMOUNTED,h),A.removeEventListener(yn.ATTR_MODIFIED,d),A.removeEventListener(yn.BOUNDS_CHANGED,f)})}},{key:"createCamera",value:function(e){var n=this.context.config,i=n.document,a=n.width,s=n.height,o=this.context.contextService.getDomElement(),A=o.parentNode;if(A){var l=BF,c=A.querySelector("#".concat(l));if(!c){var u=(i||document).createElement("div");u.style.overflow="hidden",u.style.pointerEvents="none",u.style.position="absolute",u.style.left="0px",u.style.top="0px",u.style.width="".concat(a||0,"px"),u.style.height="".concat(s||0,"px");var h=(i||document).createElement("div");c=h,h.id=l,h.style.position="absolute",h.style.left="".concat(o.offsetLeft||0,"px"),h.style.top="".concat(o.offsetTop||0,"px"),h.style.transformOrigin="left top",h.style.transform=this.joinTransformMatrix(e.getOrthoMatrix()),h.style.pointerEvents="none",h.style.width="100%",h.style.height="100%",u.appendChild(h),A.appendChild(u)}return c}return null}},{key:"getOrCreateEl",value:function(e){var n=this.context.config.document,i=this.displayObjectHTMLElementMap.get(e);return i||(i=(n||document).createElement("div"),e.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(e,i),e.id&&(i.id=e.id),e.name&&i.setAttribute("name",e.name),e.className&&(i.className=e.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(e.getWorldTransform(),e.getOrigin())),i}},{key:"updateAttribute",value:function(e,n){var i=this.getOrCreateEl(n);switch(e){case"innerHTML":var a=n.parsedStyle.innerHTML;gn(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(n.parsedStyle.x,"px");break;case"y":i.style.top="".concat(n.parsedStyle.y,"px");break;case"transformOrigin":var s=n.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(s[0].buildCSSText(null,null,"")," ").concat(s[1].buildCSSText(null,null,""));break;case"width":var o=n.parsedStyle.width;i.style.width=ye(o)?"".concat(o,"px"):o.toString();break;case"height":var A=n.parsedStyle.height;i.style.height=ye(A)?"".concat(A,"px"):A.toString();break;case"zIndex":var l=n.parsedStyle.zIndex;i.style["z-index"]="".concat(l);break;case"visibility":var c=n.parsedStyle.visibility;i.style.visibility=c;break;case"pointerEvents":var u=n.parsedStyle.pointerEvents,h=u===void 0?"auto":u;i.style.pointerEvents=h;break;case"opacity":var d=n.parsedStyle.opacity;i.style.opacity="".concat(d);break;case"fill":var f=n.parsedStyle.fill,g="";Mc(f)?f.isNone?g="transparent":g=n.getAttribute("fill"):Array.isArray(f)?g=n.getAttribute("fill"):Bo(f),i.style.background=g;break;case"stroke":var v=n.parsedStyle.stroke,m="";Mc(v)?v.isNone?m="transparent":m=n.getAttribute("stroke"):Array.isArray(v)?m=n.getAttribute("stroke"):Bo(v),i.style["border-color"]=m,i.style["border-style"]="solid";break;case"lineWidth":var w=n.parsedStyle.lineWidth;i.style["border-width"]="".concat(w||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var C=n.style.filter;i.style.filter=C;break;default:!Pe(n.style[e])&&n.style[e]!==""&&(i.style[e]=n.style[e])}}}])}();GE.tag="HTMLRendering";var bF=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="html-renderer",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new GE)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ls),xF=Object.freeze({__proto__:null,Plugin:bF}),KE=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"apply",value:function(e,n){var i=this,a=e.renderingService,s=e.renderingContext,o=e.config;this.context=e;var A=s.root.ownerDocument.defaultView,l=function(G){a.hooks.pointerMove.call(G)},c=function(G){a.hooks.pointerUp.call(G)},u=function(G){a.hooks.pointerDown.call(G)},h=function(G){a.hooks.pointerOver.call(G)},d=function(G){a.hooks.pointerOut.call(G)},f=function(G){a.hooks.pointerCancel.call(G)},g=function(G){a.hooks.pointerWheel.call(G)},v=function(G){a.hooks.click.call(G)},m=function(G){n.globalThis.document.addEventListener("pointermove",l,!0),G.addEventListener("pointerdown",u,!0),G.addEventListener("pointerleave",d,!0),G.addEventListener("pointerover",h,!0),n.globalThis.addEventListener("pointerup",c,!0),n.globalThis.addEventListener("pointercancel",f,!0)},w=function(G){G.addEventListener("touchstart",u,!0),G.addEventListener("touchend",c,!0),G.addEventListener("touchmove",l,!0),G.addEventListener("touchcancel",f,!0)},C=function(G){n.globalThis.document.addEventListener("mousemove",l,!0),G.addEventListener("mousedown",u,!0),G.addEventListener("mouseout",d,!0),G.addEventListener("mouseover",h,!0),n.globalThis.addEventListener("mouseup",c,!0)},F=function(G){n.globalThis.document.removeEventListener("pointermove",l,!0),G.removeEventListener("pointerdown",u,!0),G.removeEventListener("pointerleave",d,!0),G.removeEventListener("pointerover",h,!0),n.globalThis.removeEventListener("pointerup",c,!0),n.globalThis.removeEventListener("pointercancel",f,!0)},Q=function(G){G.removeEventListener("touchstart",u,!0),G.removeEventListener("touchend",c,!0),G.removeEventListener("touchmove",l,!0),G.removeEventListener("touchcancel",f,!0)},D=function(G){n.globalThis.document.removeEventListener("mousemove",l,!0),G.removeEventListener("mousedown",u,!0),G.removeEventListener("mouseout",d,!0),G.removeEventListener("mouseover",h,!0),n.globalThis.removeEventListener("mouseup",c,!0)};a.hooks.init.tap(r.tag,function(){var K=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(K.style.msContentZooming="none",K.style.msTouchAction="none"):A.supportsPointerEvents&&(K.style.touchAction="none"),A.supportsPointerEvents?m(K):C(K),A.supportsTouchEvents&&w(K),o.useNativeClickEvent&&K.addEventListener("click",v,!0),K.addEventListener("wheel",g,{passive:!0,capture:!0})}),a.hooks.destroy.tap(r.tag,function(){var K=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(K.style.msContentZooming="",K.style.msTouchAction=""):A.supportsPointerEvents&&(K.style.touchAction=""),A.supportsPointerEvents?F(K):D(K),A.supportsTouchEvents&&Q(K),o.useNativeClickEvent&&K.removeEventListener("click",v,!0),K.removeEventListener("wheel",g,!0)})}}])}();KE.tag="DOMInteraction";var CF=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="dom-interaction",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new KE)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ls),SF=Object.freeze({__proto__:null,Plugin:CF}),zE=function(){function r(){(0,L.Z)(this,r)}return(0,I.Z)(r,[{key:"apply",value:function(e){var n=e.renderingService,i=e.contextService,a=e.config,s=i.getDomElement(),o=function(g){n.hooks.pointerDown.call(g)},A=function(g){n.hooks.pointerUp.call(g)},l=function(g){n.hooks.pointerMove.call(g)},c=function(g){n.hooks.pointerOver.call(g)},u=function(g){n.hooks.pointerOut.call(g)},h=function(g){n.hooks.click.call(g)},d=function(g){n.hooks.pointerCancel.call(g)};n.hooks.init.tap(r.tag,function(){s.addEventListener("touchstart",o,!0),s.addEventListener("touchend",A,!0),s.addEventListener("touchmove",l,!0),s.addEventListener("touchcancel",d,!0),s.addEventListener("mouseout",u,!0),s.addEventListener("mouseover",c,!0),a.useNativeClickEvent&&s.addEventListener("click",h,!0)}),n.hooks.destroy.tap(r.tag,function(){s.removeEventListener("touchstart",o,!0),s.removeEventListener("touchend",A,!0),s.removeEventListener("touchmove",l,!0),s.removeEventListener("touchcancel",d,!0),s.removeEventListener("mouseout",u,!0),s.removeEventListener("mouseover",c,!0),a.useNativeClickEvent&&s.removeEventListener("click",h,!0)})}}])}();zE.tag="MobileInteraction";var MF=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="mobile-interaction",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new zE)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ls),R5=Object.freeze({__proto__:null,Plugin:MF}),_5=M(64270);var Em=function(r){function t(e,n,i,a){var s;return(0,L.Z)(this,t),s=(0,P.Z)(this,t,[e]),s.currentTime=i,s.timelineTime=a,s.target=n,s.type="finish",s.bubbles=!1,s.currentTarget=n,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=i,s.timelineTime=a,s}return(0,k.Z)(t,r),(0,I.Z)(t)}($d),TF=0,FF=function(){function r(t,e){var n;(0,L.Z)(this,r),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=t,t.animation=this,this.timeline=e,this.id="".concat(TF++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((n=this.effect)===null||n===void 0?void 0:n.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return(0,I.Z)(r,[{key:"pending",get:function(){return this._startTime===null&&!this._paused&&this.playbackRate!==0||this.currentTimePending}},{key:"playState",get:function(){return this._idle?"idle":this._isFinished?"finished":this._paused?"paused":"running"}},{key:"ready",get:function(){var e=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(n,i){e.resolveReadyPromise=function(){n(e)},e.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var e=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(n,i){e.resolveFinishedPromise=function(){n(e)},e.rejectFinishedPromise=function(){i(new Error)}}),this.playState==="finished"&&this.resolveFinishedPromise()),this.finishedPromise}},{key:"currentTime",get:function(){return this.updatePromises(),this._idle||this.currentTimePending?null:this._currentTime},set:function(e){if(e=Number(e),!isNaN(e)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var n;this._startTime=Number((n=this.timeline)===null||n===void 0?void 0:n.currentTime)-e/this.playbackRate}this.currentTimePending=!1,this._currentTime!==e&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(e,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(e){if(e!==null){if(this.updatePromises(),e=Number(e),isNaN(e)||this._paused||this._idle)return;this._startTime=e,this.tickCurrentTime((Number(this.timeline.currentTime)-this._startTime)*this.playbackRate),this.timeline.applyDirtiedAnimation(this),this.updatePromises()}}},{key:"playbackRate",get:function(){return this._playbackRate},set:function(e){if(e!==this._playbackRate){this.updatePromises();var n=this.currentTime;this._playbackRate=e,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),n!==null&&(this.currentTime=n),this.updatePromises()}}},{key:"_isFinished",get:function(){return!this._idle&&(this._playbackRate>0&&Number(this._currentTime)>=this._totalDuration||this._playbackRate<0&&Number(this._currentTime)<=0)}},{key:"totalDuration",get:function(){return this._totalDuration}},{key:"_needsTick",get:function(){return this.pending||this.playState==="running"||!this._finishedFlag}},{key:"updatePromises",value:function(){var e;if((e=this.effect.target)!==null&&e!==void 0&&e.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var n=this.oldPlayState,i=this.pending?"pending":this.playState;return this.readyPromise&&i!==n&&(i==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):n==="pending"?this.resolveReadyPromise():i==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&i!==n&&(i==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):i==="finished"?this.resolveFinishedPromise():n==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=i,this.readyPromise||this.finishedPromise}},{key:"play",value:function(){this.updatePromises(),this._paused=!1,(this._isFinished||this._idle)&&(this.rewind(),this._startTime=null),this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this),this.timeline.animations.indexOf(this)===-1&&this.timeline.animations.push(this),this.updatePromises()}},{key:"pause",value:function(){this.updatePromises(),this.currentTime&&(this._holdTime=this.currentTime),!this._isFinished&&!this._paused&&!this._idle?this.currentTimePending=!0:this._idle&&(this.rewind(),this._idle=!1),this._startTime=null,this._paused=!0,this.updatePromises()}},{key:"finish",value:function(){this.updatePromises(),!this._idle&&(this.currentTime=this._playbackRate>0?this._totalDuration:0,this._startTime=this._totalDuration-this.currentTime,this.currentTimePending=!1,this.timeline.applyDirtiedAnimation(this),this.updatePromises())}},{key:"cancel",value:function(){var e=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=null,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var n=new Em(null,this,this.currentTime,null);setTimeout(function(){e.oncancel(n)})}}},{key:"reverse",value:function(){this.updatePromises();var e=this.currentTime;this.playbackRate*=-1,this.play(),e!==null&&(this.currentTime=e),this.updatePromises()}},{key:"updatePlaybackRate",value:function(e){this.playbackRate=e}},{key:"targetAnimations",value:function(){var e,n=(e=this.effect)===null||e===void 0?void 0:e.target;return n.getAnimations()}},{key:"markTarget",value:function(){var e=this.targetAnimations();e.indexOf(this)===-1&&e.push(this)}},{key:"unmarkTarget",value:function(){var e=this.targetAnimations(),n=e.indexOf(this);n!==-1&&e.splice(n,1)}},{key:"tick",value:function(e,n){!this._idle&&!this._paused&&(this._startTime===null?n&&(this.startTime=e-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((e-this._startTime)*this.playbackRate)),n&&(this.currentTimePending=!1,this.fireEvents(e))}},{key:"rewind",value:function(){if(this.playbackRate>=0)this.currentTime=0;else if(this._totalDuration<1/0)this.currentTime=this._totalDuration;else throw new Error("Unable to rewind negative playback rate animation with infinite duration")}},{key:"persist",value:function(){throw new Error(On)}},{key:"addEventListener",value:function(e,n,i){throw new Error(On)}},{key:"removeEventListener",value:function(e,n,i){throw new Error(On)}},{key:"dispatchEvent",value:function(e){throw new Error(On)}},{key:"commitStyles",value:function(){throw new Error(On)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var e;this._inEffect=!!((e=this.effect)!==null&&e!==void 0&&e.update(-1))}else{var n;this._inEffect=!!((n=this.effect)!==null&&n!==void 0&&n.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(e,n){e!==this._currentTime&&(this._currentTime=e,this._isFinished&&!n&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(e){var n=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new Em(null,this,this.currentTime,e);setTimeout(function(){n.onfinish&&n.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new Em(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])}(),OF=4,IF=.001,LF=1e-7,NF=10,rh=11,cf=1/(rh-1),kF=typeof Float32Array=="function",VE=function(t,e){return 1-3*e+3*t},WE=function(t,e){return 3*e-6*t},ZE=function(t){return 3*t},uf=function(t,e,n){return((VE(e,n)*t+WE(e,n))*t+ZE(e))*t},jE=function(t,e,n){return 3*VE(e,n)*t*t+2*WE(e,n)*t+ZE(e)},QF=function(t,e,n,i,a){var s,o,A=0;do o=e+(n-e)/2,s=uf(o,i,a)-t,s>0?n=o:e=o;while(Math.abs(s)>LF&&++A<NF);return o},UF=function(t,e,n,i){for(var a=0;a<OF;++a){var s=jE(e,n,i);if(s===0)return e;var o=uf(e,n,i)-t;e-=o/s}return e},Bm=function(t,e,n,i){if(!(t>=0&&t<=1&&n>=0&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===i)return function(A){return A};for(var a=kF?new Float32Array(rh):new Array(rh),s=0;s<rh;++s)a[s]=uf(s*cf,t,n);var o=function(l){for(var c=0,u=1,h=rh-1;u!==h&&a[u]<=l;++u)c+=cf;--u;var d=(l-a[u])/(a[u+1]-a[u]),f=c+d*cf,g=jE(f,t,n);return g>=IF?UF(l,f,t,n):g===0?f:QF(l,c,c+cf,t,n)};return function(A){return A===0||A===1?A:uf(o(A),e,i)}},PF=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},hf=function(t){return Math.pow(t,2)},df=function(t){return Math.pow(t,3)},ff=function(t){return Math.pow(t,4)},gf=function(t){return Math.pow(t,5)},vf=function(t){return Math.pow(t,6)},pf=function(t){return 1-Math.cos(t*Math.PI/2)},mf=function(t){return 1-Math.sqrt(1-t*t)},yf=function(t){return t*t*(3*t-2)},wf=function(t){for(var e,n=4;t<((e=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((e*3-2)/22-t,2)},Ef=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=(0,U.Z)(e,2),i=n[0],a=i===void 0?1:i,s=n[1],o=s===void 0?.5:s,A=hr(Number(a),1,10),l=hr(Number(o),.1,2);return t===0||t===1?t:-A*Math.pow(2,10*(t-1))*Math.sin((t-1-l/(Math.PI*2)*Math.asin(1/A))*(Math.PI*2)/l)},ih=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=(0,U.Z)(e,4),a=i[0],s=a===void 0?1:a,o=i[1],A=o===void 0?100:o,l=i[2],c=l===void 0?10:l,u=i[3],h=u===void 0?0:u;s=hr(s,.1,1e3),A=hr(A,.1,1e3),c=hr(c,.1,1e3),h=hr(h,.1,1e3);var d=Math.sqrt(A/s),f=c/(2*Math.sqrt(A*s)),g=f<1?d*Math.sqrt(1-f*f):0,v=1,m=f<1?(f*d+-h)/g:-h+d,w=n?n*t/1e3:t;return f<1?w=Math.exp(-w*f*d)*(v*Math.cos(g*w)+m*Math.sin(g*w)):w=(v+m*w)*Math.exp(-w*d),t===0||t===1?t:1-w},bm=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e,i=(0,U.Z)(n,2),a=i[0],s=a===void 0?10:a,o=i[1],A=o==="start"?Math.ceil:Math.floor;return A(hr(t,0,1)*s)/s},YE=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=(0,U.Z)(e,4),i=n[0],a=n[1],s=n[2],o=n[3];return Bm(i,a,s,o)(t)},Bf=Bm(.42,0,1,1),Xa=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-t(1-e,n,i)}},Ja=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?t(e*2,n,i)/2:1-t(e*-2+2,n,i)/2}},qa=function(t){return function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return e<.5?(1-t(1-e*2,n,i))/2:(t(e*2-1,n,i)+1)/2}},XE={steps:bm,"step-start":function(t){return bm(t,[1,"start"])},"step-end":function(t){return bm(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":YE,ease:function(t){return YE(t,[.25,.1,.25,1])},in:Bf,out:Xa(Bf),"in-out":Ja(Bf),"out-in":qa(Bf),"in-quad":hf,"out-quad":Xa(hf),"in-out-quad":Ja(hf),"out-in-quad":qa(hf),"in-cubic":df,"out-cubic":Xa(df),"in-out-cubic":Ja(df),"out-in-cubic":qa(df),"in-quart":ff,"out-quart":Xa(ff),"in-out-quart":Ja(ff),"out-in-quart":qa(ff),"in-quint":gf,"out-quint":Xa(gf),"in-out-quint":Ja(gf),"out-in-quint":qa(gf),"in-expo":vf,"out-expo":Xa(vf),"in-out-expo":Ja(vf),"out-in-expo":qa(vf),"in-sine":pf,"out-sine":Xa(pf),"in-out-sine":Ja(pf),"out-in-sine":qa(pf),"in-circ":mf,"out-circ":Xa(mf),"in-out-circ":Ja(mf),"out-in-circ":qa(mf),"in-back":yf,"out-back":Xa(yf),"in-out-back":Ja(yf),"out-in-back":qa(yf),"in-bounce":wf,"out-bounce":Xa(wf),"in-out-bounce":Ja(wf),"out-in-bounce":qa(wf),"in-elastic":Ef,"out-elastic":Xa(Ef),"in-out-elastic":Ja(Ef),"out-in-elastic":qa(Ef),spring:ih,"spring-in":ih,"spring-out":Xa(ih),"spring-in-out":Ja(ih),"spring-out-in":qa(ih)},DF=function(t){return PF(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},RF=function(t){return XE[DF(t)]||XE.linear},_F=function(t){return t},HF=1,GF=.5,JE=0;function qE(r,t){return function(e){if(e>=1)return 1;var n=1/r;return e+=t*n,e-e%n}}var bf="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",KF=new RegExp("cubic-bezier\\(".concat(bf,",").concat(bf,",").concat(bf,",").concat(bf,"\\)")),zF=/steps\(\s*(\d+)\s*\)/,VF=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function xm(r){var t=KF.exec(r);if(t)return Bm.apply(void 0,(0,N.Z)(t.slice(1).map(Number)));var e=zF.exec(r);if(e)return qE(Number(e[1]),JE);var n=VF.exec(r);return n?qE(Number(n[1]),{start:HF,middle:GF,end:JE}[n[2]]):RF(r)}function WF(r){return Math.abs(ZF(r)/(r.playbackRate||1))}function ZF(r){var t;return r.duration===0||r.iterations===0?0:(r.duration==="auto"?0:Number(r.duration))*((t=r.iterations)!==null&&t!==void 0?t:1)}var $E=0,Cm=1,xf=2,tB=3;function jF(r,t,e){if(t===null)return $E;var n=e.endTime;return t<Math.min(e.delay,n)?Cm:t>=Math.min(e.delay+r+e.endDelay,n)?xf:tB}function YF(r,t,e,n,i){switch(n){case Cm:return t==="backwards"||t==="both"?0:null;case tB:return e-i;case xf:return t==="forwards"||t==="both"?r:null;case $E:return null}}function XF(r,t,e,n,i){var a=i;return r===0?t!==Cm&&(a+=e):a+=n/r,a}function JF(r,t,e,n,i,a){var s=r===1/0?t%1:r%1;return s===0&&e===xf&&n!==0&&(i!==0||a===0)&&(s=1),s}function qF(r,t,e,n){return r===xf&&t===1/0?1/0:e===1?Math.floor(n)-1:Math.floor(n)}function $F(r,t,e){var n=r;if(r!=="normal"&&r!=="reverse"){var i=t;r==="alternate-reverse"&&(i+=1),n="normal",i!==1/0&&i%2!==0&&(n="reverse")}return n==="normal"?e:1-e}function tO(r,t,e){var n=jF(r,t,e),i=YF(r,e.fill,t,n,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,s=XF(a,n,e.iterations,i,e.iterationStart),o=JF(s,e.iterationStart,n,e.iterations,i,a),A=qF(n,e.iterations,o,s),l=$F(e.direction,A,o);return e.currentIteration=A,e.progress=l,e.easingFunction(l)}function eO(r,t,e){var n=nO(r,t),i=rO(n,e);return function(a,s){if(s!==null)i.filter(function(A){return s>=A.applyFrom&&s<A.applyTo}).forEach(function(A){var l=s-A.startOffset,c=A.endOffset-A.startOffset,u=c===0?0:l/c;a.setAttribute(A.property,A.interpolation(u),!1,!1)});else for(var o in n)eB(o)&&a.setAttribute(o,null)}}function eB(r){return r!=="offset"&&r!=="easing"&&r!=="composite"&&r!=="computedOffset"}function nO(r,t){for(var e={},n=0;n<r.length;n++)for(var i in r[n])if(eB(i)){var a={offset:r[n].offset,computedOffset:r[n].computedOffset,easing:r[n].easing,easingFunction:xm(r[n].easing)||t.easingFunction,value:r[n][i]};e[i]=e[i]||[],e[i].push(a)}return e}function rO(r,t){var e=[];for(var n in r)for(var i=r[n],a=0;a<i.length-1;a++){var s=a,o=a+1,A=i[s].computedOffset,l=i[o].computedOffset,c=A,u=l;a===0&&(c=-1/0,l===0&&(o=s)),a===i.length-2&&(u=1/0,A===1&&(s=o)),e.push({applyFrom:c,applyTo:u,startOffset:i[s].computedOffset,endOffset:i[o].computedOffset,easingFunction:i[s].easingFunction,property:n,interpolation:iO(n,i[s].value,i[o].value,t)})}return e.sort(function(h,d){return h.startOffset-d.startOffset}),e}var nB=function(t,e,n){return function(i){var a=rB(t,e,i);return ye(a)?a:n(a)}};function iO(r,t,e,n){var i=cE[r];if(i&&i.syntax&&i.int){var a=ae.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var s=a.parser,o=s?s(t,n):t,A=s?s(e,n):e,l=a.mixer(o,A,n);if(l){var c=nB.apply(void 0,(0,N.Z)(l));return function(u){return u===0?t:u===1?e:c(u)}}}}return nB(!1,!0,function(u){return u?e:t})}function rB(r,t,e){if(typeof r=="number"&&typeof t=="number")return r*(1-e)+t*e;if(typeof r=="boolean"&&typeof t=="boolean"||typeof r=="string"&&typeof t=="string")return e<.5?r:t;if(Array.isArray(r)&&Array.isArray(t)){for(var n=r.length,i=t.length,a=Math.max(n,i),s=[],o=0;o<a;o++)s.push(rB(r[o<n?o:n-1],t[o<i?o:i-1],e));return s}throw new Error("Mismatched interpolation arguments ".concat(r,":").concat(t))}var aO=function(){function r(){(0,L.Z)(this,r),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=_F,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return(0,I.Z)(r,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=xm(e),this._easing=e}}])}();function sO(r){var t=[];for(var e in r)if(!(e in["easing","offset","composite"])){var n=r[e];Array.isArray(n)||(n=[n]);for(var i=n.length,a=0;a<i;a++){if(!t[a]){var s={};"offset"in r&&(s.offset=Number(r.offset)),"easing"in r&&(s.easing=r.easing),"composite"in r&&(s.composite=r.composite),t[a]=s}n[a]!==void 0&&n[a]!==null&&(t[a][e]=n[a])}}return t.sort(function(o,A){return(o.computedOffset||0)-(A.computedOffset||0)}),t}function iB(r,t){if(r===null)return[];Array.isArray(r)||(r=sO(r));for(var e=r.map(function(A){var l={};t!=null&&t.composite&&(l.composite="auto");for(var c in A){var u=A[c];if(c==="offset"){if(u!==null){if(u=Number(u),!isFinite(u))throw new Error("Keyframe offsets must be numbers.");if(u<0||u>1)throw new Error("Keyframe offsets must be between 0 and 1.");l.computedOffset=u}}else if(c==="composite"&&["replace","add","accumulate","auto"].indexOf(u)===-1)throw new Error("".concat(u," compositing is not supported"));l[c]=u}return l.offset===void 0&&(l.offset=null),l.easing===void 0&&(l.easing=(t==null?void 0:t.easing)||"linear"),l.composite===void 0&&(l.composite="auto"),l}),n=!0,i=-1/0,a=0;a<e.length;a++){var s=e[a].offset;if(Pe(s))n=!1;else{if(s<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=s}}e=e.filter(function(A){return Number(A.offset)>=0&&Number(A.offset)<=1});function o(){var A,l=e,c=l.length;if(e[c-1].computedOffset=Number((A=e[c-1].offset)!==null&&A!==void 0?A:1),c>1){var u;e[0].computedOffset=Number((u=e[0].offset)!==null&&u!==void 0?u:0)}for(var h=0,d=Number(e[0].computedOffset),f=1;f<c;f++){var g=e[f].computedOffset;if(!Pe(g)&&!Pe(d)){for(var v=1;v<f-h;v++)e[h+v].computedOffset=d+(Number(g)-d)*v/(f-h);h=f,d=Number(g)}}}return n||o(),e}var oO="backwards|forwards|both|none".split("|"),AO="reverse|alternate|alternate-reverse".split("|");function lO(r,t){var e=new aO;return t&&(e.fill="both",e.duration="auto"),typeof r=="number"&&!isNaN(r)?e.duration=r:r!==void 0&&Object.keys(r).forEach(function(n){if(r[n]!==void 0&&r[n]!==null&&r[n]!=="auto"){if((typeof e[n]=="number"||n==="duration")&&(typeof r[n]!="number"||isNaN(r[n]))||n==="fill"&&oO.indexOf(r[n])===-1||n==="direction"&&AO.indexOf(r[n])===-1)return;e[n]=r[n]}}),e}function cO(r,t){return r=uO(r!=null?r:{duration:"auto"}),lO(r,t)}function uO(r){return typeof r=="number"&&(isNaN(r)?r={duration:"auto"}:r={duration:r}),r}var hO=function(){function r(t,e,n){var i=this;(0,L.Z)(this,r),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=cO(n,!1),this.timing.effect=this,this.timing.activeDuration=WF(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=iB(e,this.timing),this.interpolations=eO(this.normalizedKeyframes,this.timing,this.target);var a=ae.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,A){return A==="duration"?o.duration==="auto"?0:o.duration:A==="fill"?o.fill==="auto"?"none":o.fill:A==="localTime"?i.animation&&i.animation.currentTime||null:A==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:A==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[A]},set:function(){return!0}}):this.timing}return(0,I.Z)(r,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=tO(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=iB(e)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(e){var n=this;Object.keys(e||{}).forEach(function(i){n.timing[i]=e[i]})}}])}();function aB(r,t){return Number(r.id)-Number(t.id)}var dO=function(){function r(t){var e=this;(0,L.Z)(this,r),this.animations=[],this.ticking=!1,this.timelineTicking=!1,this.hasRestartedThisFrame=!1,this.animationsWithPromises=[],this.inTick=!1,this.pendingEffects=[],this.currentTime=null,this.rafId=0,this.rafCallbacks=[],this.webAnimationsNextTick=function(n){e.currentTime=n,e.discardAnimations(),e.animations.length===0?e.timelineTicking=!1:e.requestAnimationFrame(e.webAnimationsNextTick)},this.processRafCallbacks=function(n){var i=e.rafCallbacks;e.rafCallbacks=[],n<Number(e.currentTime)&&(n=Number(e.currentTime)),e.animations.sort(aB),e.animations=e.tick(n,!0,e.animations)[0],i.forEach(function(a){a[1](n)}),e.applyPendingEffects()},this.document=t}return(0,I.Z)(r,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(e,n,i){var a=new hO(e,n,i),s=new FF(a,this);return this.animations.push(s),this.restartWebAnimationsNextTick(),s.updatePromises(),s.play(),s.updatePromises(),s}},{key:"applyDirtiedAnimation",value:function(e){var n=this;if(!this.inTick){e.markTarget();var i=e.targetAnimations();i.sort(aB);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(s){var o=n.animations.indexOf(s);o!==-1&&n.animations.splice(o,1)}),this.applyPendingEffects()}}},{key:"restart",value:function(){return this.ticking||(this.ticking=!0,this.requestAnimationFrame(function(){}),this.hasRestartedThisFrame=!0),this.hasRestartedThisFrame}},{key:"destroy",value:function(){this.document.defaultView.cancelAnimationFrame(this.frameId)}},{key:"applyPendingEffects",value:function(){this.pendingEffects.forEach(function(e){e==null||e.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(e){return e.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(e){return e.playState!=="finished"&&e.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(e){var n=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([n,e]),n}},{key:"requestAnimationFrame",value:function(e){var n=this;return this.rAF(function(i){n.updateAnimationsPromises(),e(i),n.updateAnimationsPromises()})}},{key:"tick",value:function(e,n,i){var a=this,s,o;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=e,this.ticking=!1;var A=[],l=[],c=[],u=[];return i.forEach(function(h){h.tick(e,n),h._inEffect?(l.push(h.effect),h.markTarget()):(A.push(h.effect),h.unmarkTarget()),h._needsTick&&(a.ticking=!0);var d=h._inEffect||h._needsTick;h._inTimeline=d,d?c.push(h):u.push(h)}),(s=this.pendingEffects).push.apply(s,A),(o=this.pendingEffects).push.apply(o,l),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[c,u]}}])}();ae.EasingFunction=xm,ae.AnimationTimeline=dO;var fO=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.landmarks=[],e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"rotate",value:function(n,i,a){if(this.relElevation=Ks(i),this.relAzimuth=Ks(n),this.relRoll=Ks(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===In.EXPLORING){var s=sa(Er(),[1,0,0],Un((this.rotateWorld?1:-1)*this.relElevation)),o=sa(Er(),[0,1,0],Un((this.rotateWorld?1:-1)*this.relAzimuth)),A=sa(Er(),[0,0,1],Un(this.relRoll)),l=Qs(Er(),o,s);l=Qs(Er(),l,A);var c=_A(te(),l);se(this.matrix,this.matrix,[0,0,-this.distance]),he(this.matrix,this.matrix,c),se(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===In.ORBITING||this.type===In.EXPLORING?this._getPosition():this.type===In.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(n,i){var a=vi(n,i,0),s=Nt(this.position);return ue(s,s,Ht(Ct(),this.right,a[0])),ue(s,s,Ht(Ct(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(n){var i=this.forward,a=Nt(this.position),s=n*this.dollyingStep,o=this.distance+n*this.dollyingStep;return s=Math.max(Math.min(o,this.maxDistance),this.minDistance)-this.distance,a[0]+=s*i[0],a[1]+=s*i[1],a[2]+=s*i[2],this._setPosition(a),this.type===In.ORBITING||this.type===In.EXPLORING?this._getDistance():this.type===In.TRACKING&&ue(this.focalPoint,a,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(n){var i,a,s,o,A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=A.position,c=l===void 0?this.position:l,u=A.focalPoint,h=u===void 0?this.focalPoint:u,d=A.roll,f=A.zoom,g=new ae.CameraContribution;g.setType(this.type,void 0),g.setPosition(c[0],(i=c[1])!==null&&i!==void 0?i:this.position[1],(a=c[2])!==null&&a!==void 0?a:this.position[2]),g.setFocalPoint(h[0],(s=h[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=h[2])!==null&&o!==void 0?o:this.focalPoint[2]),g.setRoll(d!=null?d:this.roll),g.setZoom(f!=null?f:this.zoom);var v={name:n,matrix:Ee(g.getWorldTransform()),right:Nt(g.right),up:Nt(g.up),forward:Nt(g.forward),position:Nt(g.getPosition()),focalPoint:Nt(g.getFocalPoint()),distanceVector:Nt(g.getDistanceVector()),distance:g.getDistance(),dollyingStep:g.getDollyingStep(),azimuth:g.getAzimuth(),elevation:g.getElevation(),roll:g.getRoll(),relAzimuth:g.relAzimuth,relElevation:g.relElevation,relRoll:g.relRoll,zoom:g.getZoom()};return this.landmarks.push(v),v}},{key:"gotoLandmark",value:function(n){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=gn(n)?this.landmarks.find(function(at){return at.name===n}):n;if(s){var o=ye(a)?{duration:a}:a,A=o.easing,l=A===void 0?"linear":A,c=o.duration,u=c===void 0?100:c,h=o.easingFunction,d=h===void 0?void 0:h,f=o.onfinish,g=f===void 0?void 0:f,v=o.onframe,m=v===void 0?void 0:v,w=.01;this.cancelLandmarkAnimation();var C=s.position,F=s.focalPoint,Q=s.zoom,D=s.roll,K=d||ae.EasingFunction(l),G,J=function(){i.setFocalPoint(F),i.setPosition(C),i.setRoll(D),i.setZoom(Q),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(u===0)return J();var $=function(At){G===void 0&&(G=At);var pt=At-G;if(pt>=u){J();return}var wt=K(pt/u),bt=Ct(),Rt=Ct(),Pt=1,xt=0;rn(bt,i.focalPoint,F,wt),rn(Rt,i.position,C,wt),xt=i.roll*(1-wt)+D*wt,Pt=i.zoom*(1-wt)+Q*wt,i.setFocalPoint(bt),i.setPosition(Rt),i.setRoll(xt),i.setZoom(Pt);var Ft=ma(bt,F)+ma(Rt,C);if(Ft<=w&&Q===void 0&&D===void 0)return J();i.computeMatrix(),i.triggerUpdate(),pt<u&&(m==null||m(wt),i.landmarkAnimationID=i.canvas.requestAnimationFrame($))};this.canvas.requestAnimationFrame($)}}}])}(Gu);ae.CameraContribution=fO;var H5=null,G5=null;function sB(r,t,e){var n=r+t;return e?n*2:n}function oB(r,t){var e=t?[[r*.25,r*.25],[r*.75,r*.75]]:[[r*.5,r*.5]];return e}var gO={size:6,padding:2,backgroundColor:"transparent",opacity:1,fill:"#fff",fillOpacity:1,stroke:"transparent",strokeOpacity:1,lineWidth:0,isStagger:!0};function K5(r){var t=_objectSpread(_objectSpread({},gO),r),e=t.size,n=t.padding,i=t.isStagger,a=t.backgroundColor,s=t.backgroundOpacity,o=t.opacity,A=t.fill,l=t.fillOpacity,c=t.lineWidth,u=t.stroke,h=t.strokeOpacity,d=sB(e,n,i),f=oB(d,i),g=new Rect({style:{width:d,height:d,fill:a,opacity:1,fillOpacity:s}}),v=_createForOfIteratorHelper(f),m;try{for(v.s();!(m=v.n()).done;){var w=_slicedToArray(m.value,2),C=w[0],F=w[1],Q=new Circle({style:{opacity:o,fill:A,fillOpacity:l,cx:C,cy:F,r:e/2,lineWidth:c,stroke:u,strokeOpacity:h}});g.appendChild(Q)}}catch(D){v.e(D)}finally{v.f()}return g}var vO={spacing:5,opacity:1,backgroundColor:"transparent",backgroundOpacity:1,strokeOpacity:1,stroke:"#fff",lineWidth:2};function z5(r){var t=_objectSpread(_objectSpread({},vO),r),e=t.spacing,n=t.lineWidth,i=t.backgroundColor,a=t.backgroundOpacity,s=t.opacity,o=t.stroke,A=t.strokeOpacity,l=e+n||1,c=e+n||1,u=`
M 0 0 L `.concat(l,` 0
M 0 `).concat(c," L ").concat(l," ").concat(c,`
`),h=new Rect({style:{width:l,height:c,fill:i,opacity:1,fillOpacity:a}}),d=new Path({style:{d:u,opacity:s,stroke:o,strokeOpacity:A,fillOpacity:1,lineWidth:n}});return h.appendChild(d),h}var pO={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,fill:"#fff",fillOpacity:1,stroke:"transparent",lineWidth:0};function V5(r){var t=_objectSpread(_objectSpread({},pO),r),e=t.size,n=t.padding,i=t.isStagger,a=t.backgroundColor,s=t.backgroundOpacity,o=t.opacity,A=t.fill,l=t.fillOpacity,c=t.stroke,u=t.strokeOpacity,h=t.lineWidth,d=sB(e,n,i),f=oB(d,i),g=new Rect({style:{width:d,height:d,fill:a,opacity:1,fillOpacity:s}}),v=_createForOfIteratorHelper(f),m;try{for(v.s();!(m=v.n()).done;){var w=_slicedToArray(m.value,2),C=w[0],F=w[1],Q=new Rect({style:{opacity:o,fill:A,fillOpacity:l,x:C-e/2,y:F-e/2,width:e,height:e,lineWidth:h,stroke:c,strokeOpacity:u}});g.appendChild(Q)}}catch(D){v.e(D)}finally{v.f()}return g}var mO=["body","startHead","endHead","startHeadOffset","endHeadOffset"],yO=["body","startHead","endHead","startHeadOffset","endHeadOffset"],wO=["body","startHead","endHead","startHeadOffset","endHeadOffset"],AB=function(r){function t(e){var n;(0,L.Z)(this,t),n=(0,P.Z)(this,t,[(0,H.Z)((0,H.Z)({},e),{},{type:t.tag})]);var i=n.attributes,a=i.body,s=i.startHead,o=i.endHead;i.startHeadOffset,i.endHeadOffset;var A=(0,Za.Z)(i,mO);if(!a)throw new Error("Arrow's body is required");return n.body=a,n.appendChild(n.body),n.handleBodyAttributeChanged(n.body),s&&n.appendArrowHead(n.getArrowHeadType(s),!0),o&&n.appendArrowHead(n.getArrowHeadType(o),!1),n.applyArrowStyle(A,[n.body,n.startHead,n.endHead]),n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"handleBodyAttributeChanged",value:function(n){var i=this;n.addEventListener(yn.ATTR_MODIFIED,function(a){var s=a.attrName;s==="x1"||s==="y1"?i.startHead&&i.transformArrowHead(i.startHead,!0):(s==="x2"||s==="y2")&&i.endHead&&i.transformArrowHead(i.endHead,!1)})}},{key:"getBody",value:function(){return this.body}},{key:"getStartHead",value:function(){return this.startHead}},{key:"getEndHead",value:function(){return this.endHead}},{key:"attributeChangedCallback",value:function(n,i,a){if(n==="opacity"||n==="strokeOpacity"||n==="stroke"||n==="lineWidth"||n==="increasedLineWidthForHitTesting")this.applyArrowStyle((0,we.Z)({},n,a),[this.body,this.startHead,this.endHead]);else if(n==="startHead"||n==="endHead"){var s=n==="startHead";if(this.destroyArrowHead(s),a){var o=this.attributes;o.body,o.startHead,o.endHead,o.startHeadOffset,o.endHeadOffset;var A=(0,Za.Z)(o,yO);this.appendArrowHead(this.getArrowHeadType(a),s),this.applyArrowStyle(A,[s?this.startHead:this.endHead])}}else if(n==="body"){var l=this.attributes;l.body,l.startHead,l.endHead,l.startHeadOffset,l.endHeadOffset;var c=(0,Za.Z)(l,wO);this.body.destroy(),this.body=a,this.appendChild(this.body),this.applyArrowStyle(c,[this.body])}else n==="startHeadOffset"?this.moveArrowHeadAlongTangent(a,!0):n==="endHeadOffset"&&this.moveArrowHeadAlongTangent(a,!1)}},{key:"getArrowHeadType",value:function(n){return typeof n=="boolean"?"default":"custom"}},{key:"appendArrowHead",value:function(n,i){var a;n==="default"?a=this.createDefaultArrowHead():a=i?this.attributes.startHead:this.attributes.endHead,this.transformArrowHead(a,i),a.setAttribute("zIndex",1),i?this.startHead=a:this.endHead=a,this.appendChild(a);var s=i?this.attributes.startHeadOffset:this.attributes.endHeadOffset;s&&this.moveArrowHeadAlongTangent(s,i)}},{key:"transformArrowHead",value:function(n,i){var a=Ct(),s=0,o=0,A=0,l=0,c=0,u=this.body&&this.body.nodeName;if(u===Vt.LINE){var h=this.body.attributes,d=h.x1,f=h.x2,g=h.y1,v=h.y2;o=i?f:d,A=i?d:f,l=i?v:g,c=i?g:v}else if(u===Vt.POLYLINE){var m=this.body.attributes.points,w=m.length;o=i?m[1][0]:m[w-2][0],l=i?m[1][1]:m[w-2][1],A=i?m[0][0]:m[w-1][0],c=i?m[0][1]:m[w-1][1]}else if(u===Vt.PATH){var C=this.getTangent(this.body,i),F=(0,U.Z)(C,2),Q=F[0],D=F[1];o=Q[0],l=Q[1],A=D[0],c=D[1]}var K=o-A,G=l-c;s=Math.atan2(G,K),a=Gt(A,c,0),i?(this.startHeadPosition=a,this.startHeadRad=s):(this.endHeadPosition=a,this.endHeadRad=s),n.setLocalPosition(a),n.setLocalEulerAngles(s*180/Math.PI+n.getLocalEulerAngles())}},{key:"moveArrowHeadAlongTangent",value:function(n,i){var a=i?this.startHead:this.endHead;a&&a.setLocalPosition(ss(Ct(),i?this.startHeadPosition:this.endHeadPosition,Gt(Math.cos(i?this.startHeadRad:this.endHeadRad)*n,Math.sin(i?this.startHeadRad:this.endHeadRad)*n,0))),this.body}},{key:"destroyArrowHead",value:function(n){n&&this.startHead&&(this.startHead.destroy(),this.startHead=void 0),!n&&this.endHead&&(this.endHead.destroy(),this.endHead=void 0)}},{key:"getTangent",value:function(n,i){return i?n.getStartTangent():n.getEndTangent()}},{key:"createDefaultArrowHead",value:function(){var n=this.attributes,i=n.stroke,a=n.lineWidth,s=Math.sin,o=Math.cos,A=Math.PI,l=10*o(A/6);return new Pi({style:{d:"M".concat(l/2,",").concat(10*s(A/6)," L-").concat(l/2,",0 L").concat(l/2,",-").concat(10*s(A/6)),stroke:i,lineWidth:a,transformOrigin:"center"}})}},{key:"applyArrowStyle",value:function(n,i){var a=n.opacity,s=n.stroke,o=n.strokeOpacity,A=n.lineWidth,l=n.increasedLineWidthForHitTesting;i.forEach(function(c){c&&(Pe(a)||(c.style.opacity=a),Pe(s)||(c.style.stroke=s),Pe(o)||(c.style.strokeOpacity=o),Pe(A)||(c.style.lineWidth=A),Pe(l)||(c.style.increasedLineWidthForHitTesting=l))})}}])}(th);AB.tag="arrow",AB.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(th.PARSED_STYLE_LIST),["body","startHead","endHead","startHeadOffset","endHeadOffset","stroke","lineWidth","opacity","strokeOpacity"]));var Sm=Math.PI,EO=Sm*2,ah=Math.sin,Cf=Math.cos,BO=Math.acos,Di=Math.atan2,sh=Math.sqrt,Mm=Math.max,qs=Math.min,Ic=1e-4,bO=[{name:"sr",inherits:!1,interpolable:!0,syntax:oe.LENGTH_PERCENTAGE},{name:"sr0",inherits:!1,interpolable:!0,syntax:oe.LENGTH_PERCENTAGE},{name:"startAngle",inherits:!1,interpolable:!0,syntax:oe.ANGLE},{name:"endAngle",inherits:!1,interpolable:!0,syntax:oe.ANGLE}];bO.forEach(function(r){hF.registerProperty(r)});var ys=function(t,e,n,i){return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}};function xO(r,t,e,n,i,a,s,o){var A=e-r,l=n-t,c=s-i,u=o-a,h=u*A-c*l;if(!(h*h<Ic))return h=(c*(t-a)-u*(r-i))/h,[r+h*A,t+h*l]}function Sf(r,t,e,n,i,a,s){var o=r-e,A=t-n,l=(s?a:-a)/sh(o*o+A*A),c=l*A,u=-l*o,h=r+c,d=t+u,f=e+c,g=n+u,v=(h+f)/2,m=(d+g)/2,w=f-h,C=g-d,F=w*w+C*C,Q=i-a,D=h*g-f*d,K=(C<0?-1:1)*sh(Mm(0,Q*Q*F-D*D)),G=(D*C-w*K)/F,J=(-D*w-C*K)/F,$=(D*C+w*K)/F,at=(-D*w+C*K)/F,At=G-v,pt=J-m,wt=$-v,bt=at-m;return At*At+pt*pt>wt*wt+bt*bt&&(G=$,J=at),{cx:G,cy:J,x0:-c,y0:-u,x1:G*(i/Q-1),y1:J*(i/Q-1)}}function Mo(r,t){return t=t<0&&r>=0?t+EO:t,t-r<=Sm?0:1}var CO=function(r){function t(e){var n;return(0,L.Z)(this,t),n=(0,P.Z)(this,t,[e]),n.updatePath(),n}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"setAttribute",value:function(n,i,a){_s(t,"setAttribute",this,3)([n,i,a]),["startAngle","endAngle","sr","sr0","radius"].indexOf(n)>-1&&this.updatePath()}},{key:"updatePath",value:function(){var n=this.parsedStyle,i=n.x,a=n.y,s=n.startAngle,o=n.endAngle,A=n.sr,l=n.sr0,c=n.radius,u=this.createPath(i,a,s?Un(s):0,o?Un(o):Math.PI*2,A||0,l||0,c||[0,0,0,0]);_s(t,"setAttribute",this,3)(["d",u])}},{key:"createPath",value:function(n,i,a,s,o,A,l){if(!(o<=0)){var c=ys(n,i,o,a),u=ys(n,i,o,s),h=ys(n,i,A,a),d=ys(n,i,A,s);if(Xo(s-a,Math.PI*2)){var f=ys(n,i,o,a+Math.PI),g=ys(n,i,A,a+Math.PI),v=[["M",c.x,c.y],["A",o,o,0,1,1,f.x,f.y],["A",o,o,0,1,1,u.x,u.y],["M",h.x,h.y]];return A&&(v.push(["A",A,A,0,1,0,g.x,g.y]),v.push(["A",A,A,0,1,0,d.x,d.y])),v.push(["M",c.x,c.y]),v.push(["Z"]),v}var m=s-a,w=o*Cf(a),C=o*ah(a),F=A*Cf(s),Q=A*ah(s),D=o*Cf(s),K=o*ah(s),G=A*Cf(a),J=A*ah(a),$=(0,U.Z)(l,4),at=$[0],At=$[1],pt=$[2],wt=$[3],bt=(o-A)/2,Rt=qs(bt,at),Pt=qs(bt,At),xt=qs(bt,pt),Ft=qs(bt,wt),_t=Mm(Rt,Pt),Xt=Mm(xt,Ft),ie=_t,le=Xt;if((_t>Ic||Xt>Ic)&&m<Sm){var ve=xO(w,C,G,J,D,K,F,Q);if(ve){var xe=w-ve[0],Qe=C-ve[1],Re=D-ve[0],nn=K-ve[1],mn=1/ah(BO((xe*Re+Qe*nn)/(sh(xe*xe+Qe*Qe)*sh(Re*Re+nn*nn)))/2),sn=sh(ve[0]*ve[0]+ve[1]*ve[1]);ie=qs(_t,(o-sn)/(mn+1)),le=qs(Xt,(A-sn)/(mn-1))}}var er=Mo(a,s),kn=!0,Cn=[];if(ie>Ic){var gr=qs(at,ie),va=qs(At,ie),Hn=Sf(G,J,w,C,o,gr,kn),Bn=Sf(D,K,F,Q,o,va,kn);if(Cn.push(["M",n+Hn.cx+Hn.x0,i+Hn.cy+Hn.y0]),ie<_t&&gr===va){var Ls=Di(Hn.y0,Hn.x0),ui=Di(Bn.y0,Bn.x0);Cn.push(["A",ie,ie,0,Mo(Ls,ui),1,n+Bn.cx+Bn.x0,i+Bn.cy+Bn.y0])}else{if(gr>0){var Ki=Di(Hn.y0,Hn.x0),cn=Di(Hn.y1,Hn.x1),Tn=ys(n,i,o,cn);Cn.push(["A",gr,gr,0,Mo(Ki,cn),1,Tn.x,Tn.y])}var hn=Di(Hn.cy+Hn.y1,Hn.cx+Hn.x1),Sn=Di(Bn.cy+Bn.y1,Bn.cx+Bn.x1),Pn=ys(n,i,o,Sn);if(Cn.push(["A",o,o,0,Mo(hn,Sn),1,Pn.x,Pn.y]),va>0){var ke=Di(Bn.y1,Bn.x1),Fn=Di(Bn.y0,Bn.x0);Cn.push(["A",va,va,0,Mo(ke,Fn),1,n+Bn.cx+Bn.x0,i+Bn.cy+Bn.y0])}}}else Cn.push(["M",c.x,c.y]),Cn.push(["A",o,o,0,er,1,u.x,u.y]);if(A<Ic)Cn.push(["L",d.x,d.y]);else if(le>Ic){var En=qs(wt,le),cr=qs(pt,le),$e=Sf(F,Q,0,0,A-o,cr,kn),qe=Sf(0,0,G,J,A-o,En,kn);if(Cn.push(["L",n+$e.cx+$e.x0,i+$e.cy+$e.y0]),le<Xt&&En===cr){var pr=Di($e.y0,$e.x0),zi=Di(qe.y0,qe.x0),mr=ys(n,i,A,zi);Cn.push(["A",ie,ie,0,Mo(pr,zi),1,mr.x,mr.y])}else{if(cr>0){var Ro=Di($e.y0,$e.x0),_o=Di($e.y1,$e.x1),Ei=ys(n,i,A-o,_o);Cn.push(["A",cr,cr,0,Mo(Ro,_o),1,Ei.x,Ei.y])}var pa=Di($e.cy+$e.y1,$e.cx+$e.x1),Da=Di(qe.cy+qe.y1,qe.cx+qe.x1),Ra=ys(n,i,A,Da);if(Cn.push(["A",A,A,0,Mo(Da,pa),0,Ra.x,Ra.y]),Cn.push(["L",Ra.x,Ra.y]),En>0){var Oi=Di(qe.y1,qe.x1),_a=Di(qe.y0,qe.x0);Cn.push(["A",En,En,0,Mo(Oi,_a),1,n+qe.cx+qe.x0,i+qe.cy+qe.y0])}}}else Cn.push(["L",d.x,d.y]),Cn.push(["A",A,A,0,er,0,h.x,h.y]);return Cn.push(["Z"]),Cn}}}])}(Pi);CO.PARSED_STYLE_LIST=new Set([].concat((0,N.Z)(Pi.PARSED_STYLE_LIST),["x","y","sr","sr0","radius","startAngle","endAngle"]));var lB=function(r){return Pe(r)?"":r.toString()},SO=function(r){var t=lB(r);return t.charAt(0).toUpperCase()+t.substring(1)},Mf=SO,MO=function(r){return typeof r=="object"&&r!==null},Tm=MO,TO=function(r){return r!==null&&typeof r!="function"&&isFinite(r.length)},oh=TO,Fm=function(r,t){if(r===t)return!0;if(!r||!t||gn(r)||gn(t))return!1;if(oh(r)||oh(t)){if(r.length!==t.length)return!1;for(var e=!0,n=0;n<r.length&&(e=Fm(r[n],t[n]),!!e);n++);return e}if(Tm(r)||Tm(t)){var i=Object.keys(r),a=Object.keys(t);if(i.length!==a.length)return!1;for(var e=!0,n=0;n<i.length&&(e=Fm(r[i[n]],t[i[n]]),!!e);n++);return e}return!1},Dr=Fm;const FO={duration:500},OO={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},W5={CHANGE:"change"};var dr;(function(r){r.NodeAdded="NodeAdded",r.NodeUpdated="NodeUpdated",r.NodeRemoved="NodeRemoved",r.EdgeAdded="EdgeAdded",r.EdgeUpdated="EdgeUpdated",r.EdgeRemoved="EdgeRemoved",r.ComboAdded="ComboAdded",r.ComboUpdated="ComboUpdated",r.ComboRemoved="ComboRemoved"})(dr||(dr={}));var ua;(function(r){r.DRAW="draw",r.COLLAPSE="collapse",r.EXPAND="expand",r.TRANSFORM="transform"})(ua||(ua={}));var To;(function(r){r.CLICK="canvas:click",r.DBLCLICK="canvas:dblclick",r.POINTER_OVER="canvas:pointerover",r.POINTER_LEAVE="canvas:pointerleave",r.POINTER_ENTER="canvas:pointerenter",r.POINTER_MOVE="canvas:pointermove",r.POINTER_OUT="canvas:pointerout",r.POINTER_DOWN="canvas:pointerdown",r.POINTER_UP="canvas:pointerup",r.CONTEXT_MENU="canvas:contextmenu",r.DRAG_START="canvas:dragstart",r.DRAG="canvas:drag",r.DRAG_END="canvas:dragend",r.DRAG_ENTER="canvas:dragenter",r.DRAG_OVER="canvas:dragover",r.DRAG_LEAVE="canvas:dragleave",r.DROP="canvas:drop",r.WHEEL="canvas:wheel"})(To||(To={}));var gl;(function(r){r.CLICK="combo:click",r.DBLCLICK="combo:dblclick",r.POINTER_OVER="combo:pointerover",r.POINTER_LEAVE="combo:pointerleave",r.POINTER_ENTER="combo:pointerenter",r.POINTER_MOVE="combo:pointermove",r.POINTER_OUT="combo:pointerout",r.POINTER_DOWN="combo:pointerdown",r.POINTER_UP="combo:pointerup",r.CONTEXT_MENU="combo:contextmenu",r.DRAG_START="combo:dragstart",r.DRAG="combo:drag",r.DRAG_END="combo:dragend",r.DRAG_ENTER="combo:dragenter",r.DRAG_OVER="combo:dragover",r.DRAG_LEAVE="combo:dragleave",r.DROP="combo:drop"})(gl||(gl={}));var Yt;(function(r){r.CLICK="click",r.DBLCLICK="dblclick",r.POINTER_OVER="pointerover",r.POINTER_LEAVE="pointerleave",r.POINTER_ENTER="pointerenter",r.POINTER_MOVE="pointermove",r.POINTER_OUT="pointerout",r.POINTER_DOWN="pointerdown",r.POINTER_UP="pointerup",r.CONTEXT_MENU="contextmenu",r.DRAG_START="dragstart",r.DRAG="drag",r.DRAG_END="dragend",r.DRAG_ENTER="dragenter",r.DRAG_OVER="dragover",r.DRAG_LEAVE="dragleave",r.DROP="drop",r.KEY_DOWN="keydown",r.KEY_UP="keyup",r.WHEEL="wheel",r.PINCH="pinch"})(Yt||(Yt={}));var Lc;(function(r){r.KEY_DOWN="keydown",r.KEY_UP="keyup"})(Lc||(Lc={}));var Tf;(function(r){r.CLICK="edge:click",r.DBLCLICK="edge:dblclick",r.POINTER_OVER="edge:pointerover",r.POINTER_LEAVE="edge:pointerleave",r.POINTER_ENTER="edge:pointerenter",r.POINTER_MOVE="edge:pointermove",r.POINTER_OUT="edge:pointerout",r.POINTER_DOWN="edge:pointerdown",r.POINTER_UP="edge:pointerup",r.CONTEXT_MENU="edge:contextmenu",r.DRAG_ENTER="edge:dragenter",r.DRAG_OVER="edge:dragover",r.DRAG_LEAVE="edge:dragleave",r.DROP="edge:drop"})(Tf||(Tf={}));var Ae;(function(r){r.BEFORE_CANVAS_INIT="beforecanvasinit",r.AFTER_CANVAS_INIT="aftercanvasinit",r.BEFORE_SIZE_CHANGE="beforesizechange",r.AFTER_SIZE_CHANGE="aftersizechange",r.BEFORE_ELEMENT_CREATE="beforeelementcreate",r.AFTER_ELEMENT_CREATE="afterelementcreate",r.BEFORE_ELEMENT_UPDATE="beforeelementupdate",r.AFTER_ELEMENT_UPDATE="afterelementupdate",r.BEFORE_ELEMENT_DESTROY="beforeelementdestroy",r.AFTER_ELEMENT_DESTROY="afterelementdestroy",r.BEFORE_ELEMENT_TRANSLATE="beforeelementtranslate",r.AFTER_ELEMENT_TRANSLATE="afterelementtranslate",r.BEFORE_DRAW="beforedraw",r.AFTER_DRAW="afterdraw",r.BEFORE_RENDER="beforerender",r.AFTER_RENDER="afterrender",r.BEFORE_ANIMATE="beforeanimate",r.AFTER_ANIMATE="afteranimate",r.BEFORE_LAYOUT="beforelayout",r.AFTER_LAYOUT="afterlayout",r.BEFORE_STAGE_LAYOUT="beforestagelayout",r.AFTER_STAGE_LAYOUT="afterstagelayout",r.BEFORE_TRANSFORM="beforetransform",r.AFTER_TRANSFORM="aftertransform",r.BATCH_START="batchstart",r.BATCH_END="batchend",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.BEFORE_RENDERER_CHANGE="beforerendererchange",r.AFTER_RENDERER_CHANGE="afterrendererchange"})(Ae||(Ae={}));var fA;(function(r){r.UNDO="undo",r.REDO="redo",r.CANCEL="cancel",r.ADD="add",r.CLEAR="clear",r.CHANGE="change"})(fA||(fA={}));var $a;(function(r){r.CLICK="node:click",r.DBLCLICK="node:dblclick",r.POINTER_OVER="node:pointerover",r.POINTER_LEAVE="node:pointerleave",r.POINTER_ENTER="node:pointerenter",r.POINTER_MOVE="node:pointermove",r.POINTER_OUT="node:pointerout",r.POINTER_DOWN="node:pointerdown",r.POINTER_UP="node:pointerup",r.CONTEXT_MENU="node:contextmenu",r.DRAG_START="node:dragstart",r.DRAG="node:drag",r.DRAG_END="node:dragend",r.DRAG_ENTER="node:dragenter",r.DRAG_OVER="node:dragover",r.DRAG_LEAVE="node:dragleave",r.DROP="node:drop"})($a||($a={}));const nr="combo",Ia="tree";var Ah;(function(r){r.NODE="node",r.EDGE="edge",r.COMBO="combo",r.THEME="theme",r.PALETTE="palette",r.LAYOUT="layout",r.BEHAVIOR="behavior",r.PLUGIN="plugin",r.ANIMATION="animation",r.TRANSFORM="transform",r.SHAPE="shape"})(Ah||(Ah={}));const Om={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function Fo(r,t){var e;const n=(e=Om[r])===null||e===void 0?void 0:e[t];if(n)return n}function Z5(r){return EXTENSION_REGISTRY[r]}const IO="5.0.51",LO="G6";function Oo(r){return`[${LO} v${IO}] ${r}`}const ha={mute:!1,debug:r=>{!ha.mute&&console.debug(Oo(r))},info:r=>{!ha.mute&&console.info(Oo(r))},warn:r=>{!ha.mute&&console.warn(Oo(r))},error:r=>{!ha.mute&&console.error(Oo(r))}};function cB(r){const{theme:t}=r;if(!t)return{};const e=Fo(Ah.THEME,t);return e||(ha.warn(`The theme of ${t} is not registered.`),{})}function Im(r,t){if(Array.isArray(r)&&r.length===0)return null;const e=Array.isArray(r)?r[0]:r,n=Array.isArray(r)?r.slice(1):t||[];return new Proxy(e,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...s)=>{i[a](...s),n.forEach(o=>{var A;return(A=o[a])===null||A===void 0?void 0:A.call(o,...s)})}:a==="finished"?Promise.all([e.finished,...n.map(s=>s.finished)]):Reflect.get(i,a)},set(i,a,s){return["onframe","onfinish"].includes(a)||n.forEach(o=>{o[a]=s}),Reflect.set(i,a,s)}})}function Lm(r){const t=r.reduce((n,i)=>(Object.entries(i).forEach(([a,s])=>{n[a]===void 0?n[a]=[s]:n[a].push(s)}),n),{});Object.entries(t).forEach(([n,i])=>{(i.length!==r.length||i.some(a=>Pe(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(n)&&Dr(a,i[0])))&&delete t[n]});const e=Object.entries(t).reduce((n,[i,a])=>(a.forEach((s,o)=>{n[o]?n[o][i]=s:n[o]={[i]:s}}),n),[]);return r.length!==0&&e.length===0&&e.push({_:0},{_:0}),e}function lh(r){switch(r){case"opacity":return 1;case"x":case"y":case"z":case"zIndex":return 0;case"visibility":return"visible";case"collapsed":return!1;case"states":return[];default:return}}function uB(r,t){const{animation:e}=r;if(e===!1||t===!1)return!1;const n=Object.assign({},FO);return Br(e)&&Object.assign(n,e),Br(t)&&Object.assign(n,t),n}function NO(r){if(typeof r=="string"){const t=Fo(Ah.ANIMATION,r);return t||(ha.warn(`The animation of ${r} is not registered.`),[])}return r}function kO(r,t,e,n){var i,a;const{animation:s}=r;if(s===!1||n===!1)return[];const o=(i=r==null?void 0:r[t])===null||i===void 0?void 0:i.animation;if(o===!1)return[];const A=o==null?void 0:o[e];if(A===!1)return[];const l=(a=cB(r)[t])===null||a===void 0?void 0:a.animation,c=(h=[])=>NO(h).map(d=>Object.assign(Object.assign(Object.assign(Object.assign({},OO),Br(s)&&s),d),Br(n)&&n));if(A)return c(A);if(!l)return[];const u=l[e];return u===!1?[]:c(u)}function hB(r,t,e,n=[]){if(!n&&r===0&&t===0&&e===0)return null;if(Array.isArray(n)){let a=-1;const s=[];for(let o=0;o<n.length;o++){const A=n[o];if(A[0]==="translate"){if(A[1]===r&&A[2]===t)return null;a=o,s.push(["translate",r,t])}else if(A[0]==="translate3d"){if(A[1]===r&&A[2]===t&&A[3]===e)return null;a=o,s.push(["translate3d",r,t,e!=null?e:0])}else s.push(A)}return a===-1&&s.splice(0,0,ye(e)?["translate3d",r,t,e!=null?e:0]:["translate",r,t]),s.length===0?null:s}const i=n?n.replace(/translate(3d)?\([^)]*\)/g,""):"";return e===0?`translate(${r}, ${t})${i}`:`translate3d(${r}, ${t}, ${e})${i}`}var QO=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const UO=(r,t,e)=>{if(!e.length)return null;const[n,i]=t,a=l=>{var c;if(l){const u=r.getShape(l);if(!u)return null;const h=`get${Mf(l)}Style`,d=((c=r==null?void 0:r[h])===null||c===void 0?void 0:c.bind(r))||(v=>v),f=(d==null?void 0:d(n))||{},g=(d==null?void 0:d(i))||{};return{shape:u,fromStyle:f,toStyle:g}}else return{shape:r,fromStyle:n,toStyle:i}};let s;const o=e.map(l=>{var{fields:c,shape:u,states:h}=l,d=QO(l,["fields","shape","states"]);const f=a(u);if(!f)return null;const{shape:g,fromStyle:v,toStyle:m}=f,w=[{},{}];if(c.forEach(F=>{var Q,D;Object.assign(w[0],{[F]:(Q=v[F])!==null&&Q!==void 0?Q:lh(F)}),Object.assign(w[1],{[F]:(D=m[F])!==null&&D!==void 0?D:lh(F)})}),w.some(F=>Object.keys(F).some(Q=>["x","y","z"].includes(Q)))){const{x:F=0,y:Q=0,z:D,transform:K=""}=g.attributes||{};w.forEach(G=>{var J,$,at;G.transform=hB((J=G.x)!==null&&J!==void 0?J:F,($=G.y)!==null&&$!==void 0?$:Q,(at=G.z)!==null&&at!==void 0?at:D,K)})}const C=g.animate(Lm(w),d);return u===void 0&&(s=C),C}).filter(Boolean),A=s||(o==null?void 0:o[0]);return A?Im(A,o.filter(l=>l!==l)):null},PO=[{fields:["opacity"]}],DO=[{fields:["x","y"]}],dB=[{fields:["x","y"]}],RO=dB,fB=[{fields:["sourceNode","targetNode"]}],_O=fB,gB=[{fields:["childrenNode","x","y"]}],HO=gB,j5=[{fields:["childrenNode","x","y"]}];var GO=Object.prototype.hasOwnProperty;function KO(r,t){if(!t||!Ni(r))return{};for(var e={},n=Wt(t)?t:function(o){return o[t]},i,a=0;a<r.length;a++){var s=r[a];i=n(s),GO.call(e,i)?e[i].push(s):e[i]=[s]}return e}var Ff=KO,vB=function(r,t,e){var n,i,a,s,o=0;e||(e={});var A=function(){o=e.leading===!1?0:Date.now(),n=null,s=r.apply(i,a),n||(i=a=null)},l=function(){var c=Date.now();!o&&e.leading===!1&&(o=c);var u=t-(c-o);return i=this,a=arguments,u<=0||u>t?(n&&(clearTimeout(n),n=null),o=c,s=r.apply(i,a),n||(i=a=null)):!n&&e.trailing!==!1&&(n=setTimeout(A,u)),s};return l.cancel=function(){clearTimeout(n),o=0,n=i=a=null},l},Nm=function(r){if(typeof r!="object"||r===null)return r;var t;if(Ni(r)){t=[];for(var e=0,n=r.length;e<n;e++)typeof r[e]=="object"&&r[e]!=null?t[e]=Nm(r[e]):t[e]=r[e]}else{t={};for(var i in r)typeof r[i]=="object"&&r[i]!=null?t[i]=Nm(r[i]):t[i]=r[i]}return t},Nc=Nm;function zO(r){return"source"in r&&"target"in r}function VO(r){return r.length===2}function Y5(r){return r.length===3}function kc(r){return r instanceof Float32Array?!0:Array.isArray(r)&&(r.length===2||r.length===3)?r.every(t=>typeof t=="number"):!1}function $s(r,t,e){return r>=t&&r<=e}function La(r=0){if(Array.isArray(r)){const[t=0,e=t,n=t,i=e]=r;return[t,e,n,i]}return[r,r,r,r]}function WO(r=0){const t=La(r);return t[0]+t[2]}function X5(r=0){const t=La(r);return t[1]+t[3]}function to(r){return r.max[0]-r.min[0]}function eo(r){return r.max[1]-r.min[1]}function gA(r){return[to(r),eo(r)]}function vA(r,t){const e=kc(r)?km(r):r.getShape("key").getBounds();return t?pA(e,t):e}function km(r){const[t,e,n=0]=r,i=new jn;return i.setMinMax([t,e,n],[t,e,n]),i}function pA(r,t){const[e,n,i,a]=La(t),[s,o,A]=r.min,[l,c,u]=r.max,h=new jn;return h.setMinMax([s-a,o-e,A],[l+n,c+i,u]),h}function ch(r){if(r.length===0)return new jn;if(r.length===1)return r[0];const t=new jn;t.setMinMax(r[0].min,r[0].max);for(let e=1;e<r.length;e++){const n=r[e];t.setMinMax([Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1]),Math.min(t.min[2],n.min[2])],[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1]),Math.max(t.max[2],n.max[2])])}return t}function ZO(r,t){const[e,n]=r.min,[i,a]=r.max,[s,o]=t.min,[A,l]=t.max;return e>=s&&i<=A&&n>=o&&a<=l}function ws(r,t){return $s(r[0],t.min[0],t.max[0])&&$s(r[1],t.min[1],t.max[1])}function pB(r,t,e=!1){const{min:[n,i],max:[a,s]}=t,o=(r[1]===i||r[1]===s)&&(e||$s(r[0],n,a)),A=(r[0]===n||r[0]===a)&&(e||$s(r[1],i,s));return o||A}function jO(r,t){return!ws(r,t)}function Of(r,t){const{center:e}=t;return r[0]===e[0]&&r[1]===e[1]}function uh(r,t){const[e,n]=r,[i,a]=t.min,[s,o]=t.max,A=e-i,l=s-e,c=n-a,u=o-n,h=Math.min(A,l,c,u);return h===A?"left":h===l?"right":h===c?"top":h===u?"bottom":"left"}function vl(r,t){const e=Nc(r);if(ws(r,t))switch(uh(r,t)){case"left":e[0]=t.min[0];break;case"right":e[0]=t.max[0];break;case"top":e[1]=t.min[1];break;case"bottom":e[1]=t.max[1];break}else{const[n,i]=r,[a,s]=t.min,[o,A]=t.max;e[0]=$s(n,a,o)?n:n<a?a:o,e[1]=$s(i,s,A)?i:i<s?s:A}return e}function YO(r,t){const{center:e}=r,[n,i]=gA(r),a=t==="up"||t==="down"?e[0]:t==="right"?e[0]-n/6:e[0]+n/6,s=t==="left"||t==="right"?e[1]:t==="down"?e[1]-i/6:e[1]+i/6;return[a,s]}function XO(r,t){let[e,n]=gA(r);return[e,n]=t==="up"||t==="down"?[e,n]:[n,e],(Math.pow(n,2)-Math.pow(Math.sqrt(Math.pow(e/2,2)+Math.pow(n,2))-e/2,2))/(2*n)}function JO(r){const{min:[t,e],max:[n,i]}=r,a=[t,i],s=[n,i],o=[n,e],A=[t,e];return[[a,s],[s,o],[o,A],[A,a]]}var qO=function(t,e){var n=t.nodes,i=t.edges,a=[],s={};if(!n)throw new Error("invalid nodes data!");return n&&n.forEach(function(o,A){s[o.id]=A;var l=[];a.push(l)}),i&&i.forEach(function(o){var A=o.source,l=o.target,c=s[A],u=s[l];!c&&c!==0||!u&&u!==0||(a[c][u]=1,e||(a[u][c]=1))}),a},If=qO,$O=function(t,e){return t===e},mB=function(){function r(t,e){e===void 0&&(e=null),this.value=t,this.next=e}return r.prototype.toString=function(t){return t?t(this.value):"".concat(this.value)},r}(),tI=function(){function r(t){t===void 0&&(t=$O),this.head=null,this.tail=null,this.compare=t}return r.prototype.prepend=function(t){var e=new mB(t,this.head);return this.head=e,this.tail||(this.tail=e),this},r.prototype.append=function(t){var e=new mB(t);return this.head?(this.tail.next=e,this.tail=e,this):(this.head=e,this.tail=e,this)},r.prototype.delete=function(t){if(!this.head)return null;for(var e=null;this.head&&this.compare(this.head.value,t);)e=this.head,this.head=this.head.next;var n=this.head;if(n!==null)for(;n.next;)this.compare(n.next.value,t)?(e=n.next,n.next=n.next.next):n=n.next;return this.compare(this.tail.value,t)&&(this.tail=n),e},r.prototype.find=function(t){var e=t.value,n=e===void 0?void 0:e,i=t.callback,a=i===void 0?void 0:i;if(!this.head)return null;for(var s=this.head;s;){if(a&&a(s.value)||n!==void 0&&this.compare(s.value,n))return s;s=s.next}return null},r.prototype.deleteTail=function(){var t=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,t;for(var e=this.head;e.next;)e.next.next?e=e.next:e.next=null;return this.tail=e,t},r.prototype.deleteHead=function(){if(!this.head)return null;var t=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),t},r.prototype.fromArray=function(t){var e=this;return t.forEach(function(n){return e.append(n)}),this},r.prototype.toArray=function(){for(var t=[],e=this.head;e;)t.push(e),e=e.next;return t},r.prototype.reverse=function(){for(var t=this.head,e=null,n=null;t;)n=t.next,t.next=e,e=t,t=n;this.tail=this.head,this.head=e},r.prototype.toString=function(t){return t===void 0&&(t=void 0),this.toArray().map(function(e){return e.toString(t)}).toString()},r}(),yB=tI,eI=function(){function r(){this.linkedList=new yB}return r.prototype.isEmpty=function(){return!this.linkedList.head},r.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},r.prototype.enqueue=function(t){this.linkedList.append(t)},r.prototype.dequeue=function(){var t=this.linkedList.deleteHead();return t?t.value:null},r.prototype.toString=function(t){return this.linkedList.toString(t)},r}(),nI=eI,ts=function(t,e,n){e===void 0&&(e=[]);var i=e.filter(function(A){return A.source===t||A.target===t});if(n==="target"){var a=function(l){return l.source===t};return i.filter(a).map(function(A){return A.target})}if(n==="source"){var s=function(l){return l.target===t};return i.filter(s).map(function(A){return A.source})}var o=function(l){return l.source===t?l.target:l.source};return i.map(o)},rI=function(t,e){return e.filter(function(n){return n.source===t})},Lf=function(t,e){return e.filter(function(n){return n.source===t||n.target===t})},wB=function(t){t===void 0&&(t=0);var e="".concat(Math.random()).split(".")[1].substr(0,5),n="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(t,"-").concat(e).concat(n)};function iI(r){r===void 0&&(r={});var t=r,e=function(){},n=function(){var i={};return function(a){var s=a.next,o=s;return i[o]?!1:(i[o]=!0,!0)}}();return t.allowTraversal=r.allowTraversal||n,t.enter=r.enter||e,t.leave=r.leave||e,t}var aI=function(t,e,n,i){i===void 0&&(i=!0);var a=iI(n),s=new nI,o=t.edges,A=o===void 0?[]:o;s.enqueue(e);for(var l="",c=function(){var h=s.dequeue();a.enter({current:h,previous:l}),ts(h,A,i?"target":void 0).forEach(function(d){a.allowTraversal({previous:l,current:h,next:d})&&s.enqueue(d)}),a.leave({current:h,previous:l}),l=h};!s.isEmpty();)c()},sI=aI,oI=function(t){for(var e=t.nodes,n=e===void 0?[]:e,i=t.edges,a=i===void 0?[]:i,s=[],o={},A=[],l=function d(f){A.push(f),o[f.id]=!0;for(var g=ts(f.id,a),v=function(C){var F=g[C];if(!o[F]){var Q=n.filter(function(D){return D.id===F});Q.length>0&&d(Q[0])}},m=0;m<g.length;++m)v(m)},c=0;c<n.length;c++){var u=n[c];if(!o[u.id]){l(u);for(var h=[];A.length>0;)h.push(A.pop());s.push(h)}}return s},EB=function(t){for(var e=t.nodes,n=e===void 0?[]:e,i=t.edges,a=i===void 0?[]:i,s=[],o={},A={},l={},c=[],u=0,h=function v(m){A[m.id]=u,l[m.id]=u,u+=1,s.push(m),o[m.id]=!0;for(var w=ts(m.id,a,"target").filter(function(K){return n.map(function(G){return G.id}).indexOf(K)>-1}),C=function(G){var J=w[G];if(!A[J]&&A[J]!==0){var $=n.filter(function(at){return at.id===J});$.length>0&&v($[0]),l[m.id]=Math.min(l[m.id],l[J])}else o[J]&&(l[m.id]=Math.min(l[m.id],A[J]))},F=0;F<w.length;F++)C(F);if(l[m.id]===A[m.id]){for(var Q=[];s.length>0;){var D=s.pop();if(o[D.id]=!1,Q.push(D),D===m)break}Q.length>0&&c.push(Q)}},d=0,f=n;d<f.length;d++){var g=f[d];!A[g.id]&&A[g.id]!==0&&h(g)}return c};function BB(r,t){return t?EB(r):oI(r)}var hh=function(t){var e={},n=t.nodes,i=n===void 0?[]:n,a=t.edges,s=a===void 0?[]:a;return i.forEach(function(o){e[o.id]={degree:0,inDegree:0,outDegree:0}}),s.forEach(function(o){e[o.source].degree++,e[o.source].outDegree++,e[o.target].degree++,e[o.target].inDegree++}),e},Qm=hh,AI=function(t,e){var n=hh(t);return n[e]?hh(t)[e].inDegree:0},lI=function(t,e){var n=hh(t);return n[e]?hh(t)[e].outDegree:0};function cI(r){r===void 0&&(r={});var t=r,e=function(){},n=function(){var i={};return function(a){var s=a.next;return i[s]?!1:(i[s]=!0,!0)}}();return t.allowTraversal=r.allowTraversal||n,t.enter=r.enter||e,t.leave=r.leave||e,t}function bB(r,t,e,n,i){i===void 0&&(i=!0),n.enter({current:t,previous:e});var a=r.edges,s=a===void 0?[]:a;ts(t,s,i?"target":void 0).forEach(function(o){n.allowTraversal({previous:e,current:t,next:o})&&bB(r,o,t,n,i)}),n.leave({current:t,previous:e})}function xB(r,t,e,n){n===void 0&&(n=!0),bB(r,t,"",cI(e),n)}var uI=function(t){var e=null,n=t.nodes,i=n===void 0?[]:n,a={},s={},o={},A={};i.forEach(function(u){s[u.id]=u});for(var l={enter:function(h){var d=h.current,f=h.previous;if(o[d]){e={};for(var g=d,v=f;v!==d;)e[g]=v,g=v,v=a[v];e[g]=v}else o[d]=d,delete s[d],a[d]=f},leave:function(h){var d=h.current;A[d]=d,delete o[d]},allowTraversal:function(h){var d=h.next;return e?!1:!A[d]}};Object.keys(s).length;){var c=Object.keys(s)[0];xB(t,c,l)}return e},CB=function(t,e,n){var i,a;n===void 0&&(n=!0);for(var s=[],o=BB(t,!1),A=0,l=o;A<l.length;A++){var c=l[A];if(c.length)for(var u=c[0],h=u.id,d=[u],f=(i={},i[h]=u,i),g=(a={},a[h]=new Set,a);d.length>0;)for(var v=d.pop(),m=v.id,w=ts(m,t.edges),C=function(D){var K,G=w[D],J=t.nodes.find(function(bt){return bt.id===G});if(G===m)s.push((K={},K[G]=v,K));else if(!(G in g))f[G]=v,d.push(J),g[G]=new Set([v]);else if(!g[m].has(J)){for(var $=!0,at=[J,v],At=f[m];g[G].size&&!g[G].has(At)&&(at.push(At),At!==f[At.id]);)At=f[At.id];if(at.push(At),e&&n?($=!1,at.findIndex(function(bt){return e.indexOf(bt.id)>-1})>-1&&($=!0)):e&&!n&&at.findIndex(function(bt){return e.indexOf(bt.id)>-1})>-1&&($=!1),$){for(var pt={},wt=1;wt<at.length;wt+=1)pt[at[wt-1].id]=at[wt];at.length&&(pt[at[at.length-1].id]=at[0]),s.push(pt)}g[G].add(v)}},F=0;F<w.length;F+=1)C(F)}return s},SB=function(t,e,n){n===void 0&&(n=!0);for(var i=[],a=new Set,s=[],o=[],A={},l={},c=function(At){for(var pt=[At];pt.length>0;){var wt=pt.pop();a.has(wt)&&(a.delete(wt),s[wt.id].forEach(function(bt){pt.push(bt)}),s[wt.id].clear())}},u=function at(At,pt,wt){var bt=!1;if(e&&n===!1&&e.indexOf(At.id)>-1)return bt;i.push(At),a.add(At);for(var Rt=wt[At.id],Pt=0;Pt<Rt.length;Pt+=1){var xt=A[Rt[Pt]];if(xt===pt){for(var Ft={},_t=1;_t<i.length;_t+=1)Ft[i[_t-1].id]=i[_t];i.length&&(Ft[i[i.length-1].id]=i[0]),o.push(Ft),bt=!0}else a.has(xt)||at(xt,pt,wt)&&(bt=!0)}if(bt)c(At);else for(var Pt=0;Pt<Rt.length;Pt+=1){var xt=A[Rt[Pt]];s[xt.id].has(At)||s[xt.id].add(At)}return i.pop(),bt},h=t.nodes,d=h===void 0?[]:h,f=0;f<d.length;f+=1){var g=d[f],v=g.id;l[v]=f,A[f]=g}if(e&&n)for(var m=function(At){var pt=e[At];l[d[At].id]=l[pt],l[pt]=0,A[0]=d.find(function(wt){return wt.id===pt}),A[l[d[At].id]]=d[At]},f=0;f<e.length;f++)m(f);for(var w=function(At){for(var pt,wt,bt=1/0,Rt=0;Rt<At.length;Rt+=1)for(var Pt=At[Rt],xt=0;xt<Pt.length;xt++){var Ft=l[Pt[xt].id];Ft<bt&&(bt=Ft,wt=Rt)}for(var _t=At[wt],Xt=[],Rt=0;Rt<_t.length;Rt+=1){var ie=_t[Rt];Xt[ie.id]=[];for(var le=0,ve=ts(ie.id,t.edges,"target").filter(function(Re){return _t.map(function(nn){return nn.id}).indexOf(Re)>-1});le<ve.length;le++){var xe=ve[le];xe===ie.id&&!(n===!1&&e.indexOf(ie.id)>-1)?o.push((pt={},pt[ie.id]=ie,pt)):Xt[ie.id].push(l[xe])}}return{component:_t,adjList:Xt,minIdx:bt}},C=0;C<d.length;){var F=d.filter(function(at){return l[at.id]>=C}),Q=EB({nodes:F,edges:t.edges}).filter(function(at){return at.length>1});if(Q.length===0)break;var D=w(Q),K=D.minIdx,G=D.adjList,J=D.component;if(J.length>1){J.forEach(function(at){s[at.id]=new Set});var $=A[K];if(e&&n&&e.indexOf($.id)===-1)return o;u($,$,G),C=K+1}else break}return o},hI=function(t,e,n,i){return i===void 0&&(i=!0),e?SB(t,n,i):CB(t,n,i)},MB=uI,dI={}.toString,fI=function(r,t){return dI.call(r)==="[object "+t+"]"},Nf=fI,Um=function(r){return Nf(r,"Function")},Pm=function(r){return Array.isArray?Array.isArray(r):Nf(r,"Array")},gI=function(r){var t=typeof r;return r!==null&&t==="object"||t==="function"};function vI(r,t){if(r){var e;if(Pm(r))for(var n=0,i=r.length;n<i&&(e=t(r[n],n),e!==!1);n++);else if(gI(r)){for(var a in r)if(r.hasOwnProperty(a)&&(e=t(r[a],a),e===!1))break}}}var TB=vI,J5=Object.keys?function(r){return Object.keys(r)}:function(r){var t=[];return TB(r,function(e,n){Um(r)&&n==="prototype"||t.push(n)}),t},q5=null;function $5(r,t){var e=keys(t),n=e.length;if(isNil(r))return!n;for(var i=0;i<n;i+=1){var a=e[i];if(t[a]!==r[a]||!(a in r))return!1}return!0}var t8=null,e8=function(r){if(!isObjectLike(r)||!isType(r,"Object"))return!1;if(Object.getPrototypeOf(r)===null)return!0;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t},n8=null;function r8(r,t){if(!isArray(r))return null;var e;if(isFunction(t)&&(e=t),isPlainObject(t)&&(e=function(i){return isMatch(i,t)}),e){for(var n=0;n<r.length;n+=1)if(e(r[n]))return r[n]}return null}var i8=null,a8=function(r,t){for(var e=null,n=0;n<r.length;n++){var i=r[n],a=i[t];if(!isNil(a)){isArray(a)?e=a[0]:e=a;break}}return e},s8=null,o8=function(r){if(!isArray(r))return[];for(var t=[],e=0;e<r.length;e++)t=t.concat(r[e]);return t},A8=null,pI=function(r,t){if(t===void 0&&(t=[]),!isArray(r))t.push(r);else for(var e=0;e<r.length;e+=1)pI(r[e],t);return t},l8=null,c8=function(r){if(isArray(r))return r.reduce(function(t,e){return Math.max(t,e)},r[0])},u8=function(r){if(isArray(r))return r.reduce(function(t,e){return Math.min(t,e)},r[0])},h8=function(r){var t=r.filter(function(s){return!isNaN(s)});if(!t.length)return{min:0,max:0};if(isArray(r[0])){for(var e=[],n=0;n<r.length;n++)e=e.concat(r[n]);t=e}var i=getMax(t),a=getMin(t);return{min:a,max:i}},d8=null,FB=Array.prototype,mI=FB.splice,yI=FB.indexOf,f8=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var n=0;n<t.length;n++)for(var i=t[n],a=-1;(a=yI.call(r,i))>-1;)mI.call(r,a,1);return r},g8=null,wI=Array.prototype.splice,v8=function(t,e){if(!isArrayLike(t))return[];for(var n=t?e.length:0,i=n-1;n--;){var a=void 0,s=e[n];(n===i||s!==a)&&(a=s,wI.call(t,s,1))}return t},p8=null,m8=function(r,t,e){if(!isArray(r)&&!isPlainObject(r))return r;var n=e;return each(r,function(i,a){n=t(n,i,a)}),n},y8=null,w8=function(r,t){var e=[];if(!isArrayLike(r))return e;for(var n=-1,i=[],a=r.length;++n<a;){var s=r[n];t(s,n,r)&&(e.push(s),i.push(n))}return pullAt(r,i),e},E8=null,Dm=function(r){return Nf(r,"String")};function B8(r,t){var e;if(isFunction(t))e=function(i,a){return t(i)-t(a)};else{var n=[];isString(t)?n.push(t):isArray(t)&&(n=t),e=function(i,a){for(var s=0;s<n.length;s+=1){var o=n[s];if(i[o]>a[o])return 1;if(i[o]<a[o])return-1}return 0}}return r.sort(e),r}var b8=null;function Rm(r,t){t===void 0&&(t=new Map);var e=[];if(Array.isArray(r))for(var n=0,i=r.length;n<i;n++){var a=r[n];t.has(a)||(e.push(a),t.set(a,!0))}return e}var x8=function(r,t){for(var e=[],n={},i=0;i<r.length;i++){var a=r[i],s=a[t];if(!isNil(s)){isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var A=s[o];n[A]||(e.push(A),n[A]=!0)}}}return e};function C8(r,t){return isArray(r)||isString(r)?r[0]===t:!1}var S8=null;function M8(r,t){return isArray(r)||isString(r)?r[r.length-1]===t:!1}var T8=null,EI=Object.prototype.hasOwnProperty;function F8(r,t){if(!t||!isArray(r))return{};for(var e={},n=isFunction(t)?t:function(o){return o[t]},i,a=0;a<r.length;a++){var s=r[a];i=n(s),EI.call(e,i)?e[i].push(s):e[i]=[s]}return e}var O8=null;function I8(r,t){if(!t)return{0:r};if(!isFunction(t)){var e=isArray(t)?t:t.replace(/\s+/g,"").split("*");t=function(n){for(var i="_",a=0,s=e.length;a<s;a++)i+=n[e[a]]&&n[e[a]].toString();return i}}return groupBy(r,t)}var L8=function(r,t){if(!t)return[r];var e=groupToMap(r,t),n=[];for(var i in e)n.push(e[i]);return n},OB={};function N8(r){var t=OB[r];if(!t){for(var e=r.toString(16),n=e.length;n<6;n++)e="0"+e;t="#"+e,OB[r]=t}return t}var k8=null;function Q8(r){var t=0,e=0,n=0,i=0;return isArray(r)?r.length===1?t=e=n=i=r[0]:r.length===2?(t=n=r[0],e=i=r[1]):r.length===3?(t=r[0],e=i=r[1],n=r[2]):(t=r[0],e=r[1],n=r[2],i=r[3]):t=e=n=i=r,{r1:t,r2:e,r3:n,r4:i}}var U8=null,BI=function(r){return Nf(r,"Number")},bI=BI,P8=function(r){return isNumber(r)&&r%1!==0},D8=null,R8=function(r){return isNumber(r)&&r%2===0},_8=null,H8=Number.isInteger?Number.isInteger:function(r){return bI(r)&&r%1===0},G8=null,K8=function(r){return isNumber(r)&&r<0},z8=null,V8=function(r){return isNumber(r)&&r%2!==0},W8=null,Z8=function(r){return isNumber(r)&&r>0},j8=null,Y8=function(r,t){if(isArray(r)){for(var e,n=-1/0,i=0;i<r.length;i++){var a=r[i],s=isFunction(t)?t(a):a[t];s>n&&(e=a,n=s)}return e}},X8=function(r,t){if(isArray(r)){for(var e,n=1/0,i=0;i<r.length;i++){var a=r[i],s=isFunction(t)?t(a):a[t];s<n&&(e=a,n=s)}return e}},xI=180/Math.PI,J8=function(r){return xI*r},q8=null,CI=Math.PI/180,$8=function(r){return CI*r},t9=null,e9=null,SI=Object.values?function(r){return Object.values(r)}:function(r){var t=[];return TB(r,function(e,n){Um(r)&&n==="prototype"||t.push(e)}),t},MI=SI,n9=function(r,t){return contains(values(r),t)},TI={}.toString,r9=function(r){return TI.call(r).replace(/^\[object /,"").replace(/]$/,"")},i9=null,a9=function(r){return isType(r,"Arguments")},s9=null,o9=function(r){return isType(r,"Boolean")},A9=null,l9=function(r){return isType(r,"Date")},c9=null,u9=function(r){return isType(r,"Error")},h9=null;function d9(r){return isNumber(r)&&isFinite(r)}var FI=Object.prototype,f9=function(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||FI;return r===e},g9=null,v9=function(r){return isType(r,"RegExp")},p9=null,m9=function(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=r[0],n=1;n<r.length;n++){var i=r[n];isFunction(i)&&(i=i.prototype),mix(e.prototype,i)}},y9=null,_m=function(r){if(typeof r!="object"||r===null)return r;var t;if(Pm(r)){t=[];for(var e=0,n=r.length;e<n;e++)typeof r[e]=="object"&&r[e]!=null?t[e]=_m(r[e]):t[e]=r[e]}else{t={};for(var i in r)typeof r[i]=="object"&&r[i]!=null?t[i]=_m(r[i]):t[i]=r[i]}return t},dh=_m,OI=function(r,t){if(!Um(r))throw new TypeError("Expected a function");var e=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var a=t?t.apply(this,n):n[0],s=e.cache;if(s.has(a))return s.get(a);var o=r.apply(this,n);return s.set(a,o),o};return e.cache=new Map,e},II=5;function IB(r,t,e,n){e=e||0,n=n||II;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];a!==null&&isPlainObject(a)?(isPlainObject(r[i])||(r[i]={}),e<n?IB(r[i],a,e+1,n):r[i]=t[i]):isArray(a)?(r[i]=[],r[i]=r[i].concat(a)):a!==void 0&&(r[i]=a)}}var w9=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var n=0;n<t.length;n+=1)IB(r,t[n]);return r},E9=null,B9=function(r,t,e,n){isFunction(t)||(e=t,t=r,r=function(){});var i=Object.create?function(s,o){return Object.create(s,{constructor:{value:o}})}:function(s,o){function A(){}A.prototype=s;var l=new A;return l.constructor=o,l},a=i(t.prototype,r);return r.prototype=mix(a,r.prototype),r.superclass=i(t.prototype,t),mix(a,e),mix(r,n),r},b9=null,LI=Object.prototype.hasOwnProperty;function x9(r){if(isNil(r))return!0;if(isArrayLike(r))return!r.length;var t=getType(r);if(t==="Map"||t==="Set")return!r.size;if(isPrototype(r))return!Object.keys(r).length;for(var e in r)if(LI.call(r,e))return!1;return!0}var C9=null,NI=function(r){return typeof r=="object"&&r!==null},LB=NI,kI=function(r){return r!==null&&typeof r!="function"&&isFinite(r.length)},NB=kI,Hm=function(r,t){if(r===t)return!0;if(!r||!t||Dm(r)||Dm(t))return!1;if(NB(r)||NB(t)){if(r.length!==t.length)return!1;for(var e=!0,n=0;n<r.length&&(e=Hm(r[n],t[n]),!!e);n++);return e}if(LB(r)||LB(t)){var i=Object.keys(r),a=Object.keys(t);if(i.length!==a.length)return!1;for(var e=!0,n=0;n<i.length&&(e=Hm(r[i[n]],t[i[n]]),!!e);n++);return e}return!1},QI=Hm,S9=function(r,t,e){return isFunction(e)?!!e(r,t):isEqual(r,t)},M9=function(r,t,e){for(var n=0,i=isString(t)?t.split("."):t;r&&n<i.length;)r=r[i[n++]];return r===void 0||n<i.length?e:r},T9=function(r,t,e){var n=r,i=isString(t)?t.split("."):t;return i.forEach(function(a,s){s<i.length-1?(isObject(n[a])||(n[a]=isNumber(i[s+1])?[]:{}),n=n[a]):n[a]=e}),r},UI=Object.prototype.hasOwnProperty,F9=function(r,t){if(r===null||!isPlainObject(r))return{};var e={};return each(t,function(n){UI.call(r,n)&&(e[n]=r[n])}),e},O9=function(r,t){return reduce(r,function(e,n,i){return t.includes(i)||(e[i]=n),e},{})},kf={},I9=function(r){return r=r||"g",kf[r]?kf[r]+=1:kf[r]=1,r+kf[r]},Qf,L9=OI(function(r,t){t===void 0&&(t={});var e=t.fontSize,n=t.fontFamily,i=t.fontWeight,a=t.fontStyle,s=t.fontVariant;return Qf||(Qf=document.createElement("canvas").getContext("2d")),Qf.font=[a,s,i,e+"px",n].join(" "),Qf.measureText(Dm(r)?r:"").width},function(r,t){return t===void 0&&(t={}),(0,z.pr)([r],MI(t)).join("")}),N9=function(r,t,e,n){n===void 0&&(n="...");var i=16,a=measureTextWidth(n,e),s=isString(r)?r:toString(r),o=t,A=[],l,c;if(measureTextWidth(r,e)<=t)return r;for(;l=s.substr(0,i),c=measureTextWidth(l,e),!(c+a>o&&c>o);)if(A.push(l),o-=c,s=s.substr(i),!s)return A.join("");for(;l=s.substr(0,1),c=measureTextWidth(l,e),!(c+a>o);)if(A.push(l),o-=c,s=s.substr(1),!s)return A.join("");return""+A.join("")+n},k9=function(){function r(){this.map={}}return r.prototype.has=function(t){return this.map[t]!==void 0},r.prototype.get=function(t,e){var n=this.map[t];return n===void 0?e:n},r.prototype.set=function(t,e){this.map[t]=e},r.prototype.clear=function(){this.map={}},r.prototype.delete=function(t){delete this.map[t]},r.prototype.size=function(){return Object.keys(this.map).length},r}(),Q9=null,PI=function(t,e,n){for(var i=1/0,a,s=0;s<e.length;s++){var o=e[s].id;!n[o]&&t[o]<=i&&(i=t[o],a=e[s])}return a},DI=function(t,e,n,i){var a=t.nodes,s=a===void 0?[]:a,o=t.edges,A=o===void 0?[]:o,l=[],c={},u={},h={};s.forEach(function(C,F){var Q=C.id;l.push(Q),u[Q]=1/0,Q===e&&(u[Q]=0)});for(var d=s.length,f=function(F){var Q=PI(u,s,c),D=Q.id;if(c[D]=!0,u[D]===1/0)return"continue";var K=[];n?K=rI(D,A):K=Lf(D,A),K.forEach(function(G){var J=G.target,$=G.source,at=J===D?$:J,At=i&&G[i]?G[i]:1;u[at]>u[Q.id]+At?(u[at]=u[Q.id]+At,h[at]=[Q.id]):u[at]===u[Q.id]+At&&h[at].push(Q.id)})},g=0;g<d;g++)f(g);h[e]=[e];var v={};for(var m in u)u[m]!==1/0&&kB(e,m,h,v);var w={};for(var m in v)w[m]=v[m][0];return{length:u,path:w,allPath:v}},Uf=DI;function kB(r,t,e,n){if(r===t)return[r];if(n[t])return n[t];for(var i=[],a=0,s=e[t];a<s.length;a++){var o=s[a],A=kB(r,o,e,n);if(!A)return;for(var l=0,c=A;l<c.length;l++){var u=c[l];Pm(u)?i.push((0,z.ev)((0,z.ev)([],u,!0),[t],!1)):i.push([u,t])}}return n[t]=i,n[t]}var Gm=function(t,e,n,i,a){var s=Uf(t,e,i,a),o=s.length,A=s.path,l=s.allPath;return{length:o[n],path:A[n],allPath:l[n]}},RI=function(t,e,n,i){var a;if(e===n)return[[e]];var s=t.edges,o=s===void 0?[]:s,A=[e],l=(a={},a[e]=!0,a),c=[],u=[],h=i?ts(e,o,"target"):ts(e,o);for(c.push(h);A.length>0&&c.length>0;){var d=c[c.length-1];if(d.length){var f=d.shift();f&&(A.push(f),l[f]=!0,h=i?ts(f,o,"target"):ts(f,o),c.push(h.filter(function(m){return!l[m]})))}else{var g=A.pop();l[g]=!1,c.pop();continue}if(A[A.length-1]===n){var v=A.map(function(w){return w});u.push(v);var g=A.pop();l[g]=!1,c.pop()}}return u},_I=function(t,e){for(var n=If(t,e),i=[],a=n.length,s=0;s<a;s+=1){i[s]=[];for(var o=0;o<a;o+=1)s===o?i[s][o]=0:n[s][o]===0||!n[s][o]?i[s][o]=1/0:i[s][o]=n[s][o]}for(var A=0;A<a;A+=1)for(var s=0;s<a;s+=1)for(var o=0;o<a;o+=1)i[s][o]>i[s][A]+i[A][o]&&(i[s][o]=i[s][A]+i[A][o]);return i},Km=_I,HI=function(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n="weight"),i===void 0&&(i=1e3);var a=t.nodes,s=a===void 0?[]:a,o=t.edges,A=o===void 0?[]:o,l={},c={};s.forEach(function(F,Q){var D=wB();F.clusterId=D,l[D]={id:D,nodes:[F]},c[F.id]={node:F,idx:Q}});var u=If(t,e),h=[],d={};u.forEach(function(F,Q){var D=0,K=s[Q].id;d[K]={},F.forEach(function(G,J){if(G){D+=G;var $=s[J].id;d[K][$]=G}}),h.push(D)});for(var f=0,g=function(){var Q=!1;if(s.forEach(function(D){var K={};Object.keys(d[D.id]).forEach(function(bt){var Rt=d[D.id][bt],Pt=c[bt].node,xt=Pt.clusterId;K[xt]||(K[xt]=0),K[xt]+=Rt});var G=-1/0,J=[];if(Object.keys(K).forEach(function(bt){G<K[bt]?(G=K[bt],J=[bt]):G===K[bt]&&J.push(bt)}),!(J.length===1&&J[0]===D.clusterId)){var $=J.indexOf(D.clusterId);if($>=0&&J.splice($,1),J&&J.length){Q=!0;var at=l[D.clusterId],At=at.nodes.indexOf(D);at.nodes.splice(At,1);var pt=Math.floor(Math.random()*J.length),wt=l[J[pt]];wt.nodes.push(D),D.clusterId=wt.id}}}),!Q)return"break";f++};f<i;){var v=g();if(v==="break")break}Object.keys(l).forEach(function(F){var Q=l[F];(!Q.nodes||!Q.nodes.length)&&delete l[F]});var m=[],w={};A.forEach(function(F){var Q=F.source,D=F.target,K=F[n]||1,G=c[Q].node.clusterId,J=c[D].node.clusterId,$="".concat(G,"---").concat(J);if(w[$])w[$].weight+=K,w[$].count++;else{var at={source:G,target:J,weight:K,count:1};w[$]=at,m.push(at)}});var C=[];return Object.keys(l).forEach(function(F){C.push(l[F])}),{clusters:C,clusterEdges:m}},GI=HI,KI=function(){function r(t){this.arr=t}return r.prototype.getArr=function(){return this.arr||[]},r.prototype.add=function(t){var e,n=t.arr;if(!(!((e=this.arr)===null||e===void 0)&&e.length))return new r(n);if(!(n!=null&&n.length))return new r(this.arr);if(this.arr.length===n.length){var i=[];for(var a in this.arr)i[a]=this.arr[a]+n[a];return new r(i)}},r.prototype.subtract=function(t){var e,n=t.arr;if(!(!((e=this.arr)===null||e===void 0)&&e.length))return new r(n);if(!(n!=null&&n.length))return new r(this.arr);if(this.arr.length===n.length){var i=[];for(var a in this.arr)i[a]=this.arr[a]-n[a];return new r(i)}},r.prototype.avg=function(t){var e=[];if(t!==0)for(var n in this.arr)e[n]=this.arr[n]/t;return new r(e)},r.prototype.negate=function(){var t=[];for(var e in this.arr)t[e]=-this.arr[e];return new r(t)},r.prototype.squareEuclideanDistance=function(t){var e,n=t.arr;if(!(!((e=this.arr)===null||e===void 0)&&e.length)||!(n!=null&&n.length))return 0;if(this.arr.length===n.length){var i=0;for(var a in this.arr)i+=Math.pow(this.arr[a]-t.arr[a],2);return i}},r.prototype.euclideanDistance=function(t){var e,n=t.arr;if(!(!((e=this.arr)===null||e===void 0)&&e.length)||!(n!=null&&n.length))return 0;if(this.arr.length===n.length){var i=0;for(var a in this.arr)i+=Math.pow(this.arr[a]-t.arr[a],2);return Math.sqrt(i)}else console.error("The two vectors are unequal in length.")},r.prototype.normalize=function(){var t=[],e=dh(this.arr);e.sort(function(s,o){return s-o});var n=e[e.length-1],i=e[0];for(var a in this.arr)t[a]=(this.arr[a]-i)/(n-i);return new r(t)},r.prototype.norm2=function(){var t;if(!(!((t=this.arr)===null||t===void 0)&&t.length))return 0;var e=0;for(var n in this.arr)e+=Math.pow(this.arr[n],2);return Math.sqrt(e)},r.prototype.dot=function(t){var e,n=t.arr;if(!(!((e=this.arr)===null||e===void 0)&&e.length)||!(n!=null&&n.length))return 0;if(this.arr.length===n.length){var i=0;for(var a in this.arr)i+=this.arr[a]*t.arr[a];return i}else console.error("The two vectors are unequal in length.")},r.prototype.equal=function(t){var e,n=t.arr;if(((e=this.arr)===null||e===void 0?void 0:e.length)!==(n==null?void 0:n.length))return!1;for(var i in this.arr)if(this.arr[i]!==n[i])return!1;return!0},r}(),es=KI,zI=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,VI=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,QB=function(t,e){t===void 0&&(t=[]),e===void 0&&(e=100);var n={};t.forEach(function(a){a.properties&&Object.keys(a.properties).forEach(function(s){if(s==="id"||!"".concat(a.properties[s]).match(zI)&&!"".concat(a.properties[s]).match(VI)&&isNaN(Number(a.properties[s]))){n.hasOwnProperty(s)&&delete n[s];return}n.hasOwnProperty(s)?n[s]+=1:n[s]=1})});var i=Object.keys(n).sort(function(a,s){return n[s]-n[a]});return i.length<e?i:i.slice(0,e)},WI=function(t,e){return e.map(function(n){return t.hasOwnProperty(n)?t[n]:0})},ZI=function(t){for(var e=QB(t),n=[],i=0;i<t.length;i++)n[i]=WI(t[i].properties,e);return n},Pf=function(t,e){e===void 0&&(e=void 0);var n=[];return t.forEach(function(i){e===void 0&&n.push(i),i[e]!==void 0&&n.push(i[e])}),n},U9={getAllSortProperties:QB,getPropertyWeight:ZI,getAllProperties:Pf},Es;(function(r){r.EuclideanDistance="euclideanDistance"})(Es||(Es={}));var UB=function(t,e,n){var i=[];e!=null&&e.length?i=e:(t.forEach(function(s){i=i.concat(Object.keys(s))}),i=Rm(i));var a={};return i.forEach(function(s){var o=[];t.forEach(function(A){A[s]!==void 0&&A[s]!==""&&o.push(A[s])}),o.length&&!(n!=null&&n.includes(s))&&(a[s]=Rm(o))}),a},Df=function(t,e,n){var i=UB(t,e,n),a=[];if(!Object.keys(i).length)return a;var s=Object.values(i),o=s.every(function(A){return A.every(function(l){return typeof l=="number"})});return t.forEach(function(A,l){var c=[];Object.keys(i).forEach(function(u){var h=A[u],d=i[u],f=d.findIndex(function(m){return h===m}),g=[];if(o)g.push(h);else for(var v=0;v<d.length;v++)v===f?g.push(1):g.push(0);c=c.concat(g)}),a[l]=c}),a},zm=function(t,e,n,i){n===void 0&&(n=Es.EuclideanDistance);var a=0;switch(n){case Es.EuclideanDistance:a=new es(t).euclideanDistance(new es(e));break;default:break}return a},P9={getAllKeyValueMap:UB,oneHot:Df,getDistance:zm},PB=function(t,e,n,i){for(var a=e.length,s=2*i,o=0,A=0;A<a;A++)for(var l=t[A].clusterId,c=0;c<a;c++){var u=t[c].clusterId;if(l===u){var h=e[A][c]||0,d=n[A]||0,f=n[c]||0;o+=h-d*f/s}}return o*=1/s,o},Vm=function(t,e){t===void 0&&(t=[]);for(var n=t.length,i=new es([]),a=0;a<n;a++)i=i.add(new es(e[a]));var s=i.avg(n);s.normalize();for(var o=0,a=0;a<n;a++){var A=new es(e[a]),l=A.squareEuclideanDistance(s);o+=l}var c=[];t.forEach(function(){c.push([])});for(var a=0;a<n;a++){var A=new es(e[a]);t[a].clusterInertial=0;for(var u=0;u<n;u++){if(a===u){c[a][u]=0;continue}var h=new es(e[u]);c[a][u]=A.squareEuclideanDistance(h),t[a].clusterInertial+=c[a][u]}}for(var d=0,f=2*n*o,a=0;a<n;a++)for(var g=t[a].clusterId,u=0;u<n;u++){var v=t[u].clusterId;if(!(a===u||g!==v)){var m=t[a].clusterInertial*t[u].clusterInertial/Math.pow(f,2)-c[a][u]/f;d+=m}}return Number(d.toFixed(4))},jI=function(t,e,n,i,a,s,o,A,l){e===void 0&&(e=!1),n===void 0&&(n="weight"),i===void 0&&(i=1e-4),a===void 0&&(a=!1),s===void 0&&(s=void 0),o===void 0&&(o=[]),A===void 0&&(A=["id"]),l===void 0&&(l=1);var c=t.nodes,u=c===void 0?[]:c,h=t.edges,d=h===void 0?[]:h,f=[];if(a){u.forEach(function(Ft,_t){Ft.properties=Ft.properties||{},Ft.originIndex=_t});var g=[];u.every(function(Ft){return Ft.hasOwnProperty("nodeType")})&&(g=Array.from(new Set(u.map(function(Ft){return Ft.nodeType}))),u.forEach(function(Ft){Ft.properties.nodeType=g.findIndex(function(_t){return _t===Ft.nodeType})}));var v=Pf(u,s);f=Df(v,o,A)}var m=1,w={},C={};u.forEach(function(Ft,_t){var Xt=String(m++);Ft.clusterId=Xt,w[Xt]={id:Xt,nodes:[Ft]},C[Ft.id]={node:Ft,idx:_t}});var F=If(t,e),Q=[],D={},K=0;F.forEach(function(Ft,_t){var Xt=0,ie=u[_t].id;D[ie]={},Ft.forEach(function(le,ve){if(le){Xt+=le;var xe=u[ve].id;D[ie][xe]=le,K+=le}}),Q.push(Xt)}),K/=2;for(var G=1/0,J=1/0,$=0,at=[],At={};;){a&&u.every(function(Ft){return Ft.hasOwnProperty("properties")})?G=PB(u,F,Q,K)+Vm(u,f)*l:G=PB(u,F,Q,K),$===0&&(J=G,at=u,At=w);var pt=G>0&&G>J&&G-J<i;if(G>J&&(at=u.map(function(Ft){return{node:Ft,clusterId:Ft.clusterId}}),At=dh(w),J=G),pt||$>100)break;$++,Object.keys(w).forEach(function(Ft){var _t=0;d.forEach(function(Xt){var ie=Xt.source,le=Xt.target,ve=C[ie].node.clusterId,xe=C[le].node.clusterId;(ve===Ft&&xe!==Ft||xe===Ft&&ve!==Ft)&&(_t=_t+(Xt[n]||1))}),w[Ft].sumTot=_t}),u.forEach(function(Ft,_t){var Xt=w[Ft.clusterId],ie=0,le,ve=Q[_t]/(2*K),xe=0,Qe=Xt.nodes;Qe.forEach(function(Hn){var Bn=C[Hn.id].idx;xe+=F[_t][Bn]||0});var Re=xe-Xt.sumTot*ve,nn=Qe.filter(function(Hn){return Hn.id!==Ft.id}),mn=[];nn.forEach(function(Hn,Bn){mn[Bn]=f[Hn.originIndex]});var sn=Vm(nn,f)*l,er=D[Ft.id];if(Object.keys(er).forEach(function(Hn){var Bn=C[Hn].node,Ls=Bn.clusterId;if(Ls!==Ft.clusterId){var ui=w[Ls],Ki=ui.nodes;if(!(!Ki||!Ki.length)){var cn=0;Ki.forEach(function(Fn){var En=C[Fn.id].idx;cn+=F[_t][En]||0});var Tn=cn-ui.sumTot*ve,hn=Ki.concat([Ft]),Sn=[];hn.forEach(function(Fn,En){Sn[En]=f[Fn.originIndex]});var Pn=Vm(hn,f)*l,ke=Tn-Re;a&&(ke=Tn+Pn-(Re+sn)),ke>ie&&(ie=ke,le=ui)}}}),ie>0){le.nodes.push(Ft);var kn=Ft.clusterId;Ft.clusterId=le.id;var Cn=Xt.nodes.indexOf(Ft);Xt.nodes.splice(Cn,1);var gr=0,va=0;d.forEach(function(Hn){var Bn=Hn.source,Ls=Hn.target,ui=C[Bn].node.clusterId,Ki=C[Ls].node.clusterId;(ui===le.id&&Ki!==le.id||Ki===le.id&&ui!==le.id)&&(gr=gr+(Hn[n]||1)),(ui===kn&&Ki!==kn||Ki===kn&&ui!==kn)&&(va=va+(Hn[n]||1))}),le.sumTot=gr,Xt.sumTot=va}})}var wt={},bt=0;Object.keys(At).forEach(function(Ft){var _t=At[Ft];if(!_t.nodes||!_t.nodes.length){delete At[Ft];return}var Xt=String(bt+1);Xt!==Ft&&(_t.id=Xt,_t.nodes=_t.nodes.map(function(ie){return{id:ie.id,clusterId:Xt}}),At[Xt]=_t,wt[Ft]=Xt,delete At[Ft],bt++)}),at.forEach(function(Ft){var _t=Ft.node,Xt=Ft.clusterId;_t&&(_t.clusterId=Xt,_t.clusterId&&wt[_t.clusterId]&&(_t.clusterId=wt[_t.clusterId]))});var Rt=[],Pt={};d.forEach(function(Ft){var _t=Ft.source,Xt=Ft.target,ie=Ft[n]||1,le=C[_t].node.clusterId,ve=C[Xt].node.clusterId;if(!(!le||!ve)){var xe="".concat(le,"---").concat(ve);if(Pt[xe])Pt[xe].weight+=ie,Pt[xe].count++;else{var Qe={source:le,target:ve,weight:ie,count:1};Pt[xe]=Qe,Rt.push(Qe)}}});var xt=[];return Object.keys(At).forEach(function(Ft){xt.push(At[Ft])}),{clusters:xt,clusterEdges:Rt}},DB=jI,YI=function(t,e,n,i,a,s,o,A){return e===void 0&&(e=!1),n===void 0&&(n="weight"),i===void 0&&(i=1e-4),a===void 0&&(a=void 0),s===void 0&&(s=[]),o===void 0&&(o=["id"]),A===void 0&&(A=1),DB(t,e,n,i,!0,a,s,o,A)},XI=YI,JI=function(t,e){var n;e===void 0&&(e=1);for(var i=dh(t),a=i.nodes,s=a===void 0?[]:a,o=i.edges,A=o===void 0?[]:o,l=function(){var h=Qm({nodes:s,edges:A}),d=Object.keys(h);d.sort(function(v,m){var w,C;return((w=h[v])===null||w===void 0?void 0:w.degree)-((C=h[m])===null||C===void 0?void 0:C.degree)});var f=d[0];if(!s.length||((n=h[f])===null||n===void 0?void 0:n.degree)>=e)return"break";var g=s.findIndex(function(v){return v.id===f});s.splice(g,1),A=A.filter(function(v){return!(v.source===f||v.target===f)})};;){var c=l();if(c==="break")break}return{nodes:s,edges:A}},qI=JI,RB=function(t,e,n){var i=[];switch(t){case Es.EuclideanDistance:i=e[n];break;default:i=[];break}return i},$I=function(t,e,n,i,a,s){e===void 0&&(e=3),n===void 0&&(n=void 0),i===void 0&&(i=[]),a===void 0&&(a=["id"]),s===void 0&&(s=Es.EuclideanDistance);var o=t.nodes,A=o===void 0?[]:o,l=t.edges,c=l===void 0?[]:l,u={clusters:[{id:"0",nodes:A}],clusterEdges:[]};if(s===Es.EuclideanDistance&&!A.every(function(Xt){return Xt.hasOwnProperty(n)}))return u;var h=[],d=[];if(s===Es.EuclideanDistance&&(h=Pf(A,n),d=Df(h,i,a)),!d.length)return u;for(var f=Rm(d.map(function(Xt){return Xt.join("")})),g=Math.min(e,A.length,f.length),v=0;v<A.length;v++)A[v].originIndex=v;for(var m=[],w=[],C=[],v=0;v<g;v++)if(v===0){var F=Math.floor(Math.random()*A.length);switch(s){case Es.EuclideanDistance:m[v]=d[F];break;default:m[v]=[];break}w.push(F),C[v]=[A[F]],A[F].clusterId=String(v)}else{for(var Q=-1/0,D=0,K=function(le){if(!w.includes(le)){for(var ve=0,xe=0;xe<m.length;xe++){var Qe=0;switch(s){case Es.EuclideanDistance:Qe=zm(d[A[le].originIndex],m[xe],s);break;default:break}ve+=Qe}var Re=ve/m.length;Re>Q&&!m.find(function(nn){return QI(nn,RB(s,d,A[le].originIndex))})&&(Q=Re,D=le)}},G=0;G<A.length;G++)K(G);m[v]=RB(s,d,D),w.push(D),C[v]=[A[D]],A[D].clusterId=String(v)}for(var J=0;;){for(var v=0;v<A.length;v++){var $=0,at=1/0;if(!(J===0&&w.includes(v))){for(var At=0;At<m.length;At++){var pt=0;switch(s){case Es.EuclideanDistance:pt=zm(d[v],m[At],s);break;default:break}pt<at&&(at=pt,$=At)}if(A[v].clusterId!==void 0)for(var wt=C[Number(A[v].clusterId)].length-1;wt>=0;wt--)C[Number(A[v].clusterId)][wt].id===A[v].id&&C[Number(A[v].clusterId)].splice(wt,1);A[v].clusterId=String($),C[$].push(A[v])}}for(var bt=!1,v=0;v<C.length;v++){for(var Rt=C[v],Pt=new es([]),At=0;At<Rt.length;At++)Pt=Pt.add(new es(d[Rt[At].originIndex]));var xt=Pt.avg(Rt.length);xt.equal(new es(m[v]))||(bt=!0,m[v]=xt.getArr())}if(J++,A.every(function(Xt){return Xt.clusterId!==void 0})&&bt||J>=1e3)break}var Ft=[],_t={};return c.forEach(function(Xt){var ie,le,ve=Xt.source,xe=Xt.target,Qe=(ie=A.find(function(sn){return sn.id===ve}))===null||ie===void 0?void 0:ie.clusterId,Re=(le=A.find(function(sn){return sn.id===xe}))===null||le===void 0?void 0:le.clusterId,nn="".concat(Qe,"---").concat(Re);if(_t[nn])_t[nn].count++;else{var mn={source:Qe,target:Re,count:1};_t[nn]=mn,Ft.push(mn)}}),{clusters:C,clusterEdges:Ft}},tL=$I,eL=function(t,e){var n=new es(e),i=n.norm2(),a=new es(t),s=a.norm2(),o=n.dot(a),A=i*s,l=A?o/A:0;return l},_B=eL,nL=function(t,e,n,i,a){t===void 0&&(t=[]),n===void 0&&(n=void 0),i===void 0&&(i=[]),a===void 0&&(a=[]);var s=dh(t.filter(function(h){return h.id!==e.id})),o=t.findIndex(function(h){return h.id===e.id}),A=Pf(t,n),l=Df(A,i,a),c=l[o],u=[];return s.forEach(function(h,d){if(h.id!==e.id){var f=l[d],g=_B(f,c);u.push(g),h.cosineSimilarity=g}}),s.sort(function(h,d){return d.cosineSimilarity-h.cosineSimilarity}),{allCosineSimilarity:u,similarNodes:s}},rL=nL,iL=function(){function r(t){this.count=t.length,this.parent={};for(var e=0,n=t;e<n.length;e++){var i=n[e];this.parent[i]=i}}return r.prototype.find=function(t){for(;this.parent[t]!==t;)t=this.parent[t];return t},r.prototype.union=function(t,e){var n=this.find(t),i=this.find(e);n!==i&&(n<i?(this.parent[e]!==e&&this.union(this.parent[e],t),this.parent[e]=this.parent[t]):(this.parent[t]!==t&&this.union(this.parent[t],e),this.parent[t]=this.parent[e]))},r.prototype.connected=function(t,e){return this.find(t)===this.find(e)},r}(),aL=iL,sL=function(t,e){return t-e},oL=function(){function r(t){t===void 0&&(t=sL),this.compareFn=t,this.list=[]}return r.prototype.getLeft=function(t){return 2*t+1},r.prototype.getRight=function(t){return 2*t+2},r.prototype.getParent=function(t){return t===0?null:Math.floor((t-1)/2)},r.prototype.isEmpty=function(){return this.list.length<=0},r.prototype.top=function(){return this.isEmpty()?void 0:this.list[0]},r.prototype.delMin=function(){var t=this.top(),e=this.list.pop();return this.list.length>0&&(this.list[0]=e,this.moveDown(0)),t},r.prototype.insert=function(t){if(t!==null){this.list.push(t);var e=this.list.length-1;return this.moveUp(e),!0}return!1},r.prototype.moveUp=function(t){for(var e=this.getParent(t);t&&t>0&&this.compareFn(this.list[e],this.list[t])>0;){var n=this.list[e];this.list[e]=this.list[t],this.list[t]=n,t=e,e=this.getParent(t)}},r.prototype.moveDown=function(t){var e,n=t,i=this.getLeft(t),a=this.getRight(t),s=this.list.length;i!==null&&i<s&&this.compareFn(this.list[n],this.list[i])>0?n=i:a!==null&&a<s&&this.compareFn(this.list[n],this.list[a])>0&&(n=a),t!==n&&(e=[this.list[n],this.list[t]],this.list[t]=e[0],this.list[n]=e[1],this.moveDown(n))},r}(),AL=oL,lL=function(t,e){var n=[],i=t.nodes,a=i===void 0?[]:i,s=t.edges,o=s===void 0?[]:s;if(a.length===0)return n;var A=a[0],l=new Set;l.add(A);var c=function(v,m){return e?v.weight-m.weight:0},u=new AL(c);for(Lf(A.id,o).forEach(function(g){u.insert(g)});!u.isEmpty();){var h=u.delMin(),d=h.source,f=h.target;l.has(d)&&l.has(f)||(n.push(h),l.has(d)||(l.add(d),Lf(d,o).forEach(function(g){u.insert(g)})),l.has(f)||(l.add(f),Lf(f,o).forEach(function(g){u.insert(g)})))}return n},HB=function(t,e){var n=[],i=t.nodes,a=i===void 0?[]:i,s=t.edges,o=s===void 0?[]:s;if(a.length===0)return n;var A=o.map(function(d){return d});e&&A.sort(function(d,f){return d.weight-f.weight});for(var l=new aL(a.map(function(d){return d.id}));A.length>0;){var c=A.shift(),u=c.source,h=c.target;l.connected(u,h)||(n.push(c),l.union(u,h))}return n},cL=function(t,e,n){var i={prim:lL,kruskal:HB};return n?i[n](t,e):HB(t,e)},uL=cL,hL=function(t,e,n){typeof e!="number"&&(e=1e-6),typeof n!="number"&&(n=.85);for(var i=1,a=0,s=1e3,o=t.nodes,A=o===void 0?[]:o,l=t.edges,c=l===void 0?[]:l,u=A.length,h,d={},f={},g=0;g<u;++g){var v=A[g],m=v.id;d[m]=1/u,f[m]=1/u}for(var w=Qm(t);s>0&&i>e;){a=0;for(var g=0;g<u;++g){var v=A[g],m=v.id;if(h=0,w[v.id].inDegree===0)d[m]=0;else{for(var C=ts(m,c,"source"),F=0;F<C.length;++F){var Q=C[F],D=w[Q].outDegree;D>0&&(h+=f[Q]/D)}d[m]=n*h,a+=d[m]}}a=(1-a)/u,i=0;for(var g=0;g<u;++g){var v=A[g],m=v.id;h=d[m]+a,i+=Math.abs(h-f[m]),f[m]=h}s-=1}return f},GB=hL,dL=-1,Rf=-1,KB="-1",no="-1",zB=-1,D9="-1",VB=function(){function r(t,e,n,i){t===void 0&&(t=dL),e===void 0&&(e=Rf),n===void 0&&(n=Rf),i===void 0&&(i=KB),this.id=t,this.from=e,this.to=n,this.label=i}return r}(),fL=function(){function r(t,e){t===void 0&&(t=Rf),e===void 0&&(e=no),this.id=t,this.label=e,this.edges=[],this.edgeMap={}}return r.prototype.addEdge=function(t){this.edges.push(t),this.edgeMap[t.id]=t},r}(),WB=function(){function r(t,e,n){t===void 0&&(t=Rf),e===void 0&&(e=!0),n===void 0&&(n=!1),this.id=t,this.edgeIdAutoIncrease=e,this.edges=[],this.nodes=[],this.nodeMap={},this.edgeMap={},this.nodeLabelMap={},this.edgeLabelMap={},this.counter=0,this.directed=n}return r.prototype.getNodeNum=function(){return this.nodes.length},r.prototype.addNode=function(t,e){if(!this.nodeMap[t]){var n=new fL(t,e);this.nodes.push(n),this.nodeMap[t]=n,this.nodeLabelMap[e]||(this.nodeLabelMap[e]=[]),this.nodeLabelMap[e].push(t)}},r.prototype.addEdge=function(t,e,n,i){if((this.edgeIdAutoIncrease||t===void 0)&&(t=this.counter++),!(this.nodeMap[e]&&this.nodeMap[n]&&this.nodeMap[n].edgeMap[t])){var a=new VB(t,e,n,i);if(this.edges.push(a),this.edgeMap[t]=a,this.nodeMap[e].addEdge(a),this.edgeLabelMap[i]||(this.edgeLabelMap[i]=[]),this.edgeLabelMap[i].push(a),!this.directed){var s=new VB(t,n,e,i);this.nodeMap[n].addEdge(s),this.edgeLabelMap[i].push(s)}}},r}(),pl=function(){function r(t,e,n,i,a){this.fromNode=t,this.toNode=e,this.nodeEdgeNodeLabel={nodeLabel1:n||no,edgeLabel:i||KB,nodeLabel2:a||no}}return r.prototype.equalTo=function(t){return this.fromNode===t.formNode&&this.toNode===t.toNode&&this.nodeEdgeNodeLabel===t.nodeEdgeNodeLabel},r.prototype.notEqualTo=function(t){return!this.equalTo(t)},r}(),ZB=function(){function r(){this.rmpath=[],this.dfsEdgeList=[]}return r.prototype.equalTo=function(t){var e=this.dfsEdgeList.length,n=t.length;if(e!==n)return!1;for(var i=0;i<e;i++)if(this.dfsEdgeList[i]!==t[i])return!1;return!0},r.prototype.notEqualTo=function(t){return!this.equalTo(t)},r.prototype.pushBack=function(t,e,n,i,a){return this.dfsEdgeList.push(new pl(t,e,n,i,a)),this.dfsEdgeList},r.prototype.toGraph=function(t,e){t===void 0&&(t=zB),e===void 0&&(e=!1);var n=new WB(t,!0,e);return this.dfsEdgeList.forEach(function(i){var a=i.fromNode,s=i.toNode,o=i.nodeEdgeNodeLabel,A=o.nodeLabel1,l=o.edgeLabel,c=o.nodeLabel2;A!==no&&n.addNode(a,A),c!==no&&n.addNode(s,c),A!==no&&c!==A&&n.addEdge(void 0,a,s,l)}),n},r.prototype.buildRmpath=function(){this.rmpath=[];for(var t=void 0,e=this.dfsEdgeList.length,n=e-1;n>=0;n--){var i=this.dfsEdgeList[n],a=i.fromNode,s=i.toNode;a<s&&(t===void 0||s===t)&&(this.rmpath.push(n),t=a)}return this.rmpath},r.prototype.getNodeNum=function(){var t={};return this.dfsEdgeList.forEach(function(e){t[e.fromNode]||(t[e.fromNode]=!0),t[e.toNode]||(t[e.toNode]=!0)}),Object.keys(t).length},r}(),_f=function(){function r(t){if(this.his={},this.nodesUsed={},this.edgesUsed={},this.edges=[],!!t){for(;t;){var e=t.edge;this.edges.push(e),this.nodesUsed[e.from]=1,this.nodesUsed[e.to]=1,this.edgesUsed[e.id]=1,t=t.preNode}this.edges=this.edges.reverse()}}return r.prototype.hasNode=function(t){return this.nodesUsed[t.id]===1},r.prototype.hasEdge=function(t){return this.edgesUsed[t.id]===1},r}(),gL=function(){function r(t){var e=t.graphs,n=t.minSupport,i=n===void 0?2:n,a=t.minNodeNum,s=a===void 0?1:a,o=t.maxNodeNum,A=o===void 0?4:o,l=t.top,c=l===void 0?10:l,u=t.directed,h=u===void 0?!1:u,d=t.verbose,f=d===void 0?!1:d;this.graphs=e,this.dfsCode=new ZB,this.support=0,this.frequentSize1Subgraphs=[],this.frequentSubgraphs=[],this.minSupport=i,this.top=c,this.directed=h,this.counter=0,this.maxNodeNum=A,this.minNodeNum=s,this.verbose=f,this.maxNodeNum<this.minNodeNum&&(this.maxNodeNum=this.minNodeNum),this.reportDF=[]}return r.prototype.findForwardRootEdges=function(t,e){var n=this,i=[],a=t.nodeMap;return e.edges.forEach(function(s){(n.directed||e.label<=a[s.to].label)&&i.push(s)}),i},r.prototype.findBackwardEdge=function(t,e,n,i){if(!this.directed&&e===n)return null;for(var a=t.nodeMap,s=a[n.to],o=s.edges,A=o.length,l=0;l<A;l++){var c=o[l];if(!(i.hasEdge(c)||c.to!==e.from)){if(this.directed){if(a[e.from].label<a[n.to].label||a[e.from].label===a[n.to].label&&e.label<=c.label)return c}else if(e.label<c.label||e.label===c.label&&a[e.to].label<=a[n.to].label)return c}}return null},r.prototype.findForwardPureEdges=function(t,e,n,i){for(var a=[],s=e.to,o=t.nodeMap[s].edges,A=o.length,l=0;l<A;l++){var c=o[l],u=t.nodeMap[c.to];n<=u.label&&!i.hasNode(u)&&a.push(c)}return a},r.prototype.findForwardRmpathEdges=function(t,e,n,i){for(var a=[],s=t.nodeMap,o=s[e.to].label,A=s[e.from],l=A.edges,c=l.length,u=0;u<c;u++){var h=l[u],d=s[h.to].label;e.to===h.to||n>d||i.hasNode(s[h.to])||(e.label<h.label||e.label===h.label&&o<=d)&&a.push(h)}return a},r.prototype.getSupport=function(t){var e={};return t.forEach(function(n){e[n.graphId]||(e[n.graphId]=!0)}),Object.keys(e).length},r.prototype.findMinLabel=function(t){var e=void 0;return Object.keys(t).forEach(function(n){var i=t[n],a=i.nodeLabel1,s=i.edgeLabel,o=i.nodeLabel2;if(!e){e={nodeLabel1:a,edgeLabel:s,nodeLabel2:o};return}(a<e.nodeLabel1||a===e.nodeLabel1&&s<e.edgeLabel||a===e.nodeLabel1&&s===e.edgeLabel&&o<e.nodeLabel2)&&(e={nodeLabel1:a,edgeLabel:s,nodeLabel2:o})}),e},r.prototype.isMin=function(){var t=this,e=this.dfsCode;if(this.verbose&&console.log("isMin checking",e),e.dfsEdgeList.length===1)return!0;var n=this.directed,i=e.toGraph(zB,n),a=i.nodeMap,s=new ZB,o={};i.nodes.forEach(function(u){var h=t.findForwardRootEdges(i,u);h.forEach(function(d){var f=a[d.to],g="".concat(u.label,"-").concat(d.label,"-").concat(f.label);o[g]||(o[g]={projected:[],nodeLabel1:u.label,edgeLabel:d.label,nodeLabel2:f.label});var v={graphId:i.id,edge:d,preNode:null};o[g].projected.push(v)})});var A=this.findMinLabel(o);if(A){s.dfsEdgeList.push(new pl(0,1,A.nodeLabel1,A.edgeLabel,A.nodeLabel2));var l=function u(h){for(var d=s.buildRmpath(),f=s.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,g=s.dfsEdgeList[d[0]].toNode,v={},m=!1,w=0,C=n?-1:0,F=function(Pt){if(m)return"break";h.forEach(function(xt){var Ft=new _f(xt),_t=t.findBackwardEdge(i,Ft.edges[d[Pt]],Ft.edges[d[0]],Ft);_t&&(v[_t.label]||(v[_t.label]={projected:[],edgeLabel:_t.label}),v[_t.label].projected.push({graphId:i.id,edge:v,preNode:xt}),w=s.dfsEdgeList[d[Pt]].fromNode,m=!0)})},Q=d.length-1;Q>C;Q--){var D=F(Q);if(D==="break")break}if(m){var K=t.findMinLabel(v);s.dfsEdgeList.push(new pl(g,w,no,K.edgeLabel,no));var G=s.dfsEdgeList.length-1;return t.dfsCode.dfsEdgeList[G]!==s.dfsEdgeList[G]?!1:u(v[K.edgeLabel].projected)}var J={};m=!1;var $=0;h.forEach(function(Rt){var Pt=new _f(Rt),xt=t.findForwardPureEdges(i,Pt.edges[d[0]],f,Pt);xt.length>0&&(m=!0,$=g,xt.forEach(function(Ft){var _t="".concat(Ft.label,"-").concat(a[Ft.to].label);J[_t]||(J[_t]={projected:[],edgeLabel:Ft.label,nodeLabel2:a[Ft.to].label}),J[_t].projected.push({graphId:i.id,edge:Ft,preNode:Rt})}))});for(var at=d.length,At=function(Pt){if(m)return"break";var xt=d[Pt];h.forEach(function(Ft){var _t=new _f(Ft),Xt=t.findForwardRmpathEdges(i,_t.edges[xt],f,_t);Xt.length>0&&(m=!0,$=s.dfsEdgeList[xt].fromNode,Xt.forEach(function(ie){var le="".concat(ie.label,"-").concat(a[ie.to].label);J[le]||(J[le]={projected:[],edgeLabel:ie.label,nodeLabel2:a[ie.to].label}),J[le].projected.push({graphId:i.id,edge:ie,preNode:Ft})}))})},Q=0;Q<at;Q++){var pt=At(Q);if(pt==="break")break}if(!m)return!0;var wt=t.findMinLabel(J);s.dfsEdgeList.push(new pl($,g+1,no,wt.edgeLabel,wt.nodeLabel2));var bt=s.dfsEdgeList.length-1;return e.dfsEdgeList[bt]!==s.dfsEdgeList[bt]?!1:u(J["".concat(wt.edgeLabel,"-").concat(wt.nodeLabel2)].projected)},c="".concat(A.nodeLabel1,"-").concat(A.edgeLabel,"-").concat(A.nodeLabel2);return l(o[c].projected)}},r.prototype.report=function(){if(!(this.dfsCode.getNodeNum()<this.minNodeNum)){this.counter++;var t=this.dfsCode.toGraph(this.counter,this.directed);this.frequentSubgraphs.push(dh(t))}},r.prototype.subGraphMining=function(t){var e=this,n=this.getSupport(t);if(!(n<this.minSupport)&&this.isMin()){this.report();var i=this.dfsCode.getNodeNum(),a=this.dfsCode.buildRmpath(),s=this.dfsCode.dfsEdgeList[a[0]].toNode,o=this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,A={},l={};t.forEach(function(c){for(var u=e.graphs[c.graphId],h=u.nodeMap,d=new _f(c),f=a.length-1;f>=0;f--){var g=e.findBackwardEdge(u,d.edges[a[f]],d.edges[a[0]],d);if(g){var v="".concat(e.dfsCode.dfsEdgeList[a[f]].fromNode,"-").concat(g.label);l[v]||(l[v]={projected:[],toNodeId:e.dfsCode.dfsEdgeList[a[f]].fromNode,edgeLabel:g.label}),l[v].projected.push({graphId:c.graphId,edge:g,preNode:c})}}if(!(i>=e.maxNodeNum)){var m=e.findForwardPureEdges(u,d.edges[a[0]],o,d);m.forEach(function(C){var F="".concat(s,"-").concat(C.label,"-").concat(h[C.to].label);A[F]||(A[F]={projected:[],fromNodeId:s,edgeLabel:C.label,nodeLabel2:h[C.to].label}),A[F].projected.push({graphId:c.graphId,edge:C,preNode:c})});for(var w=function(F){var Q=e.findForwardRmpathEdges(u,d.edges[a[F]],o,d);Q.forEach(function(D){var K="".concat(e.dfsCode.dfsEdgeList[a[F]].fromNode,"-").concat(D.label,"-").concat(h[D.to].label);A[K]||(A[K]={projected:[],fromNodeId:e.dfsCode.dfsEdgeList[a[F]].fromNode,edgeLabel:D.label,nodeLabel2:h[D.to].label}),A[K].projected.push({graphId:c.graphId,edge:D,preNode:c})})},f=0;f<a.length;f++)w(f)}}),Object.keys(l).forEach(function(c){var u=l[c],h=u.toNodeId,d=u.edgeLabel;e.dfsCode.dfsEdgeList.push(new pl(s,h,"-1",d,"-1")),e.subGraphMining(l[c].projected),e.dfsCode.dfsEdgeList.pop()}),Object.keys(A).forEach(function(c){var u=A[c],h=u.fromNodeId,d=u.edgeLabel,f=u.nodeLabel2;e.dfsCode.dfsEdgeList.push(new pl(h,s+1,no,d,f)),e.subGraphMining(A[c].projected),e.dfsCode.dfsEdgeList.pop()})}},r.prototype.generate1EdgeFrequentSubGraphs=function(){var t=this.graphs,e=this.directed,n=this.minSupport,i=this.frequentSize1Subgraphs,a={},s={},o={},A={};return Object.keys(t).forEach(function(l){var c=t[l],u=c.nodeMap;c.nodes.forEach(function(h,d){var f=h.label,g="".concat(l,"-").concat(f);if(!o[g]){var v=a[f]||0;v++,a[f]=v}o[g]={graphKey:l,label:f},h.edges.forEach(function(m){var w=f,C=u[m.to].label;if(!e&&w>C){var F=C;C=w,w=F}var Q=m.label,D="".concat(l,"-").concat(w,"-").concat(Q,"-").concat(C),K="".concat(w,"-").concat(Q,"-").concat(C);if(!s[K]){var G=s[K]||0;G++,s[K]=G}A[D]={graphId:l,nodeLabel1:w,edgeLabel:Q,nodeLabel2:C}})})}),Object.keys(a).forEach(function(l){var c=a[l];if(!(c<n)){var u={nodes:[],edges:[]};u.nodes.push({id:"0",label:l}),i.push(u)}}),i},r.prototype.run=function(){var t=this;if(this.frequentSize1Subgraphs=this.generate1EdgeFrequentSubGraphs(),!(this.maxNodeNum<2)){var e=this.graphs,n=this.directed,i={};Object.keys(e).forEach(function(a){var s=e[a],o=s.nodeMap;s.nodes.forEach(function(A){var l=t.findForwardRootEdges(s,A);l.forEach(function(c){var u=o[c.to],h="".concat(A.label,"-").concat(c.label,"-").concat(u.label);i[h]||(i[h]={projected:[],nodeLabel1:A.label,edgeLabel:c.label,nodeLabel2:u.label});var d={graphId:a,edge:c,preNode:null};i[h].projected.push(d)})})}),Object.keys(i).forEach(function(a){var s=i[a],o=s.projected,A=s.nodeLabel1,l=s.edgeLabel,c=s.nodeLabel2;t.dfsCode.dfsEdgeList.push(new pl(0,1,A,l,c)),t.subGraphMining(o),t.dfsCode.dfsEdgeList.pop()})}},r}(),vL=function(t,e,n,i){var a={};return Object.keys(t).forEach(function(s,o){var A=t[s],l=new WB(o,!0,e),c={};A.nodes.forEach(function(u,h){l.addNode(h,u[n]),c[u.id]=h}),A.edges.forEach(function(u,h){var d=c[u.source],f=c[u.target];l.addEdge(-1,d,f,u[i])}),l&&l.getNodeNum()&&(a[l.id]=l)}),a},pL=function(t,e,n){var i=[];return t.forEach(function(a){var s={nodes:[],edges:[]};a.nodes.forEach(function(o){var A;s.nodes.push((A={id:"".concat(o.id)},A[e]=o.label,A))}),a.edges.forEach(function(o){var A;s.edges.push((A={source:"".concat(o.from),target:"".concat(o.to)},A[n]=o.label,A))}),i.push(s)}),i},jB="cluster",mL=function(t){var e=t.graphs,n=t.directed,i=n===void 0?!1:n,a=t.nodeLabelProp,s=a===void 0?jB:a,o=t.edgeLabelProp,A=o===void 0?jB:o,l=vL(e,i,s,A),c=t.minSupport,u=t.maxNodeNum,h=t.minNodeNum,d=t.verbose,f=t.top,g={graphs:l,minSupport:c,maxNodeNum:u,minNodeNum:h,top:f,verbose:d,directed:i},v=new gL(g);v.run();var m=pL(v.frequentSubgraphs,s,A);return m},yL=mL,YB=function(t,e,n,i){n===void 0&&(n="cluster"),i===void 0&&(i=2);var a=[],s=t.nodes;return e.forEach(function(o,A){a.push(XB(s,o,A,n,i))}),a},XB=function(t,e,n,i,a){var s=[n],o=[],A={};return e.forEach(function(l,c){if(l<=a&&n!==c){s.push(c),o.push(t[c]);var u=t[c][i];A[u]?(A[u].count++,A[u].dists.push(l)):A[u]={count:1,dists:[l]}}}),Object.keys(A).forEach(function(l){A[l].dists=A[l].dists.sort(function(c,u){return c-u})}),{nodeIdx:n,nodeId:t[n].id,nodeIdxs:s,neighbors:o,neighborNum:s.length-1,nodeLabelCountMap:A}},wL=function(t,e,n,i,a){var s=Math.ceil(n/e),o={},A=0;return i.forEach(function(l,c){for(var u=0,h=0,d=l.nodeIdxs,f=l.neighborNum-1;u<s;){for(var g=d[1+Math.floor(Math.random()*f)],v=0;(o["".concat(c,"-").concat(g)]||o["".concat(g,"-").concat(c)])&&(g=Math.floor(Math.random()*e),v++,!(v>2*e)););if(v<2*e&&(o["".concat(c,"-").concat(g)]={start:c,end:g,distance:a[c][g]},u++,A++,A>=n))return o;if(h++,h>2*e)break}if(u<s){var m=s-u;s=(s+m)/(e-c-1)}}),o},Hf=function(t,e,n,i){var a=n.nodes;return i||(i={}),Object.keys(t).forEach(function(s){var o,A;if(!(i&&i[s])){i[s]={nodes:[],edges:[]};var l=t[s],c=(o=e[l.start])===null||o===void 0?void 0:o.nodeIdxs,u=(A=e[l.end])===null||A===void 0?void 0:A.nodeIdxs;if(!(!c||!u)){var h=new Set(u),d=c.filter(function(w){return h.has(w)});if(!(!d||!d.length)){for(var f={},g=d.length,v=0;v<g;v++){var m=a[d[v]];i[s].nodes.push(m),f[m.id]=!0}n.edges.forEach(function(w){f[w.source]&&f[w.target]&&i[s].edges.push(w)})}}}}),i},Gf=function(t,e,n,i){var a,s,o={};t.nodes.forEach(function(l){o[l.id]=l});var A=0;return!(!((a=e==null?void 0:e.edges)===null||a===void 0)&&a.length)||((s=e==null?void 0:e.nodes)===null||s===void 0?void 0:s.length)<2?0:(t.edges.forEach(function(l){var c=o[l.source][n],u=o[l.target][n],h=e==null?void 0:e.nodes[0][n],d=e==null?void 0:e.nodes[1][n],f=e==null?void 0:e.edges[0][i];l[i]===f&&(c===h&&u===d||c===d&&u===h)&&A++}),A)},EL=function(t,e,n){for(var i=1/0,a=0,s=function(l){var c=t[l],u=Object.keys(c).sort(function(w,C){return c[w]-c[C]}),h=10,d=[];u.forEach(function(w,C){d[C%h]||(d[C%h]={graphs:[],totalCount:0,aveCount:0}),d[C%h].graphs.push(w),d[C%h].totalCount+=c[w]});var f=0,g=[];d.forEach(function(w){var C=w.totalCount/w.graphs.length;w.aveCount=C,g.push(C);var F=0,Q=w.length;w.graphs.forEach(function(D,K){var G=c[D];w.graphs.forEach(function(J,$){K!==$&&(F+=Math.abs(G-c[J]))})}),F/=Q*(Q-1)/2,f+=F}),f/=d.length;var v=0;g.forEach(function(w,C){g.forEach(function(F,Q){C!==Q&&(v+=Math.abs(w-F))}),v/=g.length*(g.length-1)/2});var m=v-f;i<m&&(i=m,a=l)},o=0;o<e;o++)s(o);return{structure:n[a],structureCountMap:t[a]}},JB=function(t,e){var n={},i={};return t.forEach(function(a,s){n[a.id]={idx:s,node:a,degree:0,inDegree:0,outDegree:0};var o=a[e];i[o]||(i[o]=[]),i[o].push(a)}),{nodeMap:n,nodeLabelMap:i}},qB=function(t,e,n){var i={},a={};return t.forEach(function(s,o){i["".concat(wB)]={idx:o,edge:s};var A=s[e];a[A]||(a[A]=[]),a[A].push(s);var l=n[s.source];l&&(l.degree++,l.outDegree++);var c=n[s.target];c&&(c.degree++,c.inDegree++)}),{edgeMap:i,edgeLabelMap:a}},$B=function(t,e,n){var i=e.length,a={};return e.forEach(function(s,o){for(var A=n?0:o+1,l=t[o].id,c=A;c<i;c++)if(o!==c){var u=t[c].id,h=s[c];a["".concat(l,"-").concat(u)]=h,n||(a["".concat(u,"-").concat(l)]=h)}}),a},BL=function(t,e,n,i,a,s,o,A,l,c,u){var h,d="".concat(e.id,"-").concat(n.id);if(c&&c[d])return c[d];var f=u?u[d]:void 0;if(!f){var g=(h={},h[d]={start:i[e.id].idx,end:i[n.id].idx,distance:a},h);u=Hf(g,s,t,u),f=u[d]}return Gf(f,o,A,l)},tb=function(t,e,n,i){var a,s,o,A=(a=t[e])===null||a===void 0?void 0:a.degree,l=(s=t[e])===null||s===void 0?void 0:s.inDegree,c=(o=t[e])===null||o===void 0?void 0:o.outDegree;return t[e]===void 0&&(A=1/0,l=1/0,c=1/0,i[e].forEach(function(u){var h=n[u.id].degree;A>h&&(A=h);var d=n[u.id].inDegree;l>d&&(l=d);var f=n[u.id].outDegree;c>f&&(c=f)}),t[e]={degree:A,inDegree:l,outDegree:c}),{minPatternNodeLabelDegree:A,minPatternNodeLabelInDegree:l,minPatternNodeLabelOutDegree:c}},bL=function(t,e,n,i,a,s,o){var A;if(n===void 0&&(n=!1),s===void 0&&(s="cluster"),o===void 0&&(o="cluster"),!(!t||!t.nodes)){var l=t.nodes.length;if(l){var c=Km(t,n),u=Km(e,n),h=$B(t.nodes,c,n),d=$B(e.nodes,u,n),f=JB(t.nodes,s),g=f.nodeMap,v=f.nodeLabelMap,m=JB(e.nodes,s),w=m.nodeMap,C=m.nodeLabelMap;qB(t.edges,o,g);var F=qB(e.edges,o,w).edgeLabelMap,Q=[];u==null||u.forEach(function(cn){Q=Q.concat(cn)}),a||(a=Math.max.apply(Math,(0,z.ev)((0,z.ev)([],Q,!1),[2],!1))),i||(i=a);var D=YB(t,c,s,i),K=YB(e,u,s,i),G=Math.min(100,l*(l-1)/2),J=wL(i,l,G,D,c),$=Hf(J,D,t),at=10,At=1,pt=1,wt=4,bt={graphs:$,nodeLabelProp:s,edgeLabelProp:o,minSupport:At,minNodeNum:pt,maxNodeNum:wt,directed:n},Rt=yL(bt).slice(0,at),Pt=Rt.length,xt=[];Rt.forEach(function(cn,Tn){xt[Tn]={},Object.keys($).forEach(function(hn){var Sn=$[hn],Pn=Gf(Sn,cn,s,o);xt[Tn][hn]=Pn})});var Ft=EL(xt,Pt,Rt),_t=Ft.structure,Xt=Ft.structureCountMap,ie=e.nodes[0],le=[],ve=(A=e.nodes[0])===null||A===void 0?void 0:A[s],xe=-1/0;e.nodes.forEach(function(cn){var Tn=cn[s],hn=v[Tn];(hn==null?void 0:hn.length)>xe&&(xe=hn.length,le=hn,ve=Tn,ie=cn)});var Qe={},Re={},nn={},mn={},sn={},er={};Object.keys(C).forEach(function(cn,Tn){sn[cn]=[],n&&(er[cn]=[]);var hn=-1/0,Sn=C[cn],Pn={};Sn.forEach(function($e){var qe=d["".concat(ie.id,"-").concat($e.id)];if(qe&&sn[cn].push(qe),hn<qe&&(hn=qe),Pn["".concat(ie.id,"-").concat($e.id)]={start:0,end:w[$e.id].idx,distance:qe},n){var pr=d["".concat($e.id,"-").concat(ie.id)];pr&&er[cn].push(pr)}}),sn[cn]=sn[cn].sort(function($e,qe){return $e-qe}),n&&(er[cn]=er[cn].sort(function($e,qe){return $e-qe})),Re=Hf(Pn,K,e,Re);var ke=[];if(Object.keys(Pn).forEach(function($e){if(nn[$e]){ke.push(nn[$e]);return}var qe=Re[$e];nn[$e]=Gf(qe,_t,s,o),ke.push(nn[$e])}),ke=ke.sort(function($e,qe){return qe-$e}),mn["".concat(ie.id,"-").concat(cn)]=ke,cn!==ve)for(var Fn=(le==null?void 0:le.length)||0,En=function(qe){var pr=le[qe],zi=D[g[pr.id].idx],mr=zi.nodeLabelCountMap[cn],Ro=C[cn].length;if(!mr||mr.count<Ro)return le.splice(qe,1),"continue";for(var _o=!1,Ei=0;Ei<Ro;Ei++)if(mr.dists[Ei]>sn[cn][Ei]){_o=!0;break}if(_o)return le.splice(qe,1),"continue";var pa={};zi.neighbors.forEach(function(Oi){var _a=h["".concat(pr.id,"-").concat(Oi.id)];pa["".concat(pr.id,"-").concat(Oi.id)]={start:g[pr.id].idx,end:g[Oi.id].idx,distance:_a}}),$=Hf(pa,D,t,$);var Da=[];Object.keys(pa).forEach(function(Oi){if(Xt[Oi]){Da.push(Xt[Oi]);return}var _a=$[Oi];Xt[Oi]=Gf(_a,_t,s,o),Da.push(Xt[Oi])}),Da=Da.sort(function(Oi,_a){return _a-Oi});for(var Ra=!1,Ei=0;Ei<Ro;Ei++)if(Da[Ei]<ke[Ei]){Ra=!0;break}if(Ra)return le.splice(qe,1),"continue"},cr=Fn-1;cr>=0;cr--)En(cr)});var kn=[];le==null||le.forEach(function(cn){for(var Tn=g[cn.id].idx,hn=XB(t.nodes,c[Tn],Tn,s,a),Sn=hn.neighbors,Pn=Sn.length,ke=!1,Fn=Pn-1;Fn>=0;Fn--){if(Sn.length+1<e.nodes.length){ke=!0;return}var En=Sn[Fn],cr=En[s];if(!C[cr]||!C[cr].length){Sn.splice(Fn,1);continue}if(!sn[cr]||!sn[cr].length){Sn.splice(Fn,1);continue}var $e="".concat(cn.id,"-").concat(En.id),qe=h[$e],pr=sn[cr].length-1,zi=sn[cr][pr];if(qe>zi){Sn.splice(Fn,1);continue}if(n){var mr="".concat(En.id,"-").concat(cn.id),Ro=h[mr];pr=er[cr].length-1;var _o=er[cr][pr];if(Ro>_o){Sn.splice(Fn,1);continue}}var Ei=Xt[$e]?Xt[$e]:BL(t,cn,En,g,qe,D,_t,s,o,Xt,$),pa="".concat(ie.id,"-").concat(cr),Da=mn[pa][mn[pa].length-1];if(Ei<Da){Sn.splice(Fn,1);continue}var Ra=tb(Qe,cr,w,C),Oi=Ra.minPatternNodeLabelDegree,_a=Ra.minPatternNodeLabelInDegree,Ho=Ra.minPatternNodeLabelOutDegree;if(g[En.id].degree<Oi){Sn.splice(Fn,1);continue}}ke||kn.push({nodes:[cn].concat(Sn)})});var Cn=Uf(e,ie.id,!1).length,gr={};n?(Object.keys(Cn).forEach(function(cn){var Tn=w[cn].node[s];gr[Tn]?gr[Tn].push(Cn[cn]):gr[Tn]=[Cn[cn]]}),Object.keys(gr).forEach(function(cn){gr[cn].sort(function(Tn,hn){return Tn-hn})})):gr=sn;for(var va=kn.length,Hn=function(Tn){var hn=kn[Tn],Sn=hn.nodes[0],Pn={},ke={};hn.nodes.forEach(function(ur,Ha){ke[ur.id]={idx:Ha,node:ur,degree:0,inDegree:0,outDegree:0};var hi=ur[s];Pn[hi]?Pn[hi]++:Pn[hi]=1});var Fn=[],En={};t.edges.forEach(function(ur){ke[ur.source]&&ke[ur.target]&&(Fn.push(ur),En[ur[o]]?En[ur[o]]++:En[ur[o]]=1,ke[ur.source].degree++,ke[ur.target].degree++,ke[ur.source].outDegree++,ke[ur.target].inDegree++)});for(var cr=Object.keys(F).length,$e=!1,qe=0;qe<cr;qe++){var pr=Object.keys(F)[qe];if(!En[pr]||En[pr]<F[pr].length){$e=!0;break}}if($e)return kn.splice(Tn,1),"continue";var zi=Fn.length;if(zi<e.edges.length)return kn.splice(Tn,1),"break";for(var mr=!1,Ro=function(Ha){var hi=Fn[Ha],oo=hi[o],Rl=F[oo];if(!Rl||!Rl.length)return En[oo]--,Rl&&En[oo]<Rl.length?(mr=!0,"break"):(Fn.splice(Ha,1),ke[hi.source].degree--,ke[hi.target].degree--,ke[hi.source].outDegree--,ke[hi.target].inDegree--,"continue");var nM=ke[hi.source].node[s],rM=ke[hi.target].node[s],Z1=!1;if(Rl.forEach(function(iM){var aM=w[iM.source].node,sM=w[iM.target].node;aM[s]===nM&&sM[s]===rM&&(Z1=!0),!n&&aM[s]===rM&&sM[s]===nM&&(Z1=!0)}),!Z1)return En[oo]--,Rl&&En[oo]<Rl.length?(mr=!0,"break"):(Fn.splice(Ha,1),ke[hi.source].degree--,ke[hi.target].degree--,ke[hi.source].outDegree--,ke[hi.target].inDegree--,"continue")},qe=zi-1;qe>=0;qe--){var _o=Ro(qe);if(_o==="break")break}if(mr)return kn.splice(Tn,1),"continue";hn.edges=Fn;var Ei=Uf(hn,hn.nodes[0].id,!1).length;if(Object.keys(Ei).reverse().forEach(function(ur){if(!(ur===hn.nodes[0].id||mr)){if(Ei[ur]===1/0){var Ha=ke[ur].node[s];if(Pn[Ha]--,Pn[Ha]<C[Ha].length){mr=!0;return}var hi=hn.nodes.indexOf(ke[ur].node);hn.nodes.splice(hi,1),ke[ur]=void 0;return}var oo=g[ur].node[s];if(!gr[oo]||!gr[oo].length||Ei[ur]>gr[oo][gr[oo].length-1]){var Ha=ke[ur].node[s];if(Pn[Ha]--,Pn[Ha]<C[Ha].length){mr=!0;return}var hi=hn.nodes.indexOf(ke[ur].node);hn.nodes.splice(hi,1),ke[ur]=void 0}}}),mr)return kn.splice(Tn,1),"continue";for(var pa=!0,Da=0;pa&&!mr;){pa=!1;var Ra=n?ke[Sn.id].degree<w[ie.id].degree||ke[Sn.id].inDegree<w[ie.id].inDegree||ke[Sn.id].outDegree<w[ie.id].outDegree:ke[Sn.id].degree<w[ie.id].degree;if(Ra){mr=!0;break}if(Pn[Sn[s]]<C[Sn[s]].length){mr=!0;break}for(var Oi=hn.nodes.length,_a=Oi-1;_a>=0;_a--){var Ho=hn.nodes[_a],tM=ke[Ho.id].degree,g5=ke[Ho.id].inDegree,v5=ke[Ho.id].outDegree,p5=Ho[s],W1=tb(Qe,p5,w,C),eM=W1.minPatternNodeLabelDegree,m5=W1.minPatternNodeLabelInDegree,y5=W1.minPatternNodeLabelOutDegree,w5=n?tM<eM||g5<m5||v5<y5:tM<eM;if(w5){if(Pn[Ho[s]]--,Pn[Ho[s]]<C[Ho[s]].length){mr=!0;break}hn.nodes.splice(_a,1),ke[Ho.id]=void 0,pa=!0}}if(mr||!pa&&Da!==0)break;zi=Fn.length;for(var W0=zi-1;W0>=0;W0--){var Go=Fn[W0];if(!ke[Go.source]||!ke[Go.target]){Fn.splice(W0,1);var Z0=Go[o];if(En[Z0]--,ke[Go.source]&&(ke[Go.source].degree--,ke[Go.source].outDegree--),ke[Go.target]&&(ke[Go.target].degree--,ke[Go.target].inDegree--),F[Z0]&&En[Z0]<F[Z0].length){mr=!0;break}pa=!0}}Da++}if(mr||mr||hn.nodes.length<e.nodes.length||Fn.length<e.edges.length)return kn.splice(Tn,1),"continue"},Bn=va-1;Bn>=0;Bn--){var Ls=Hn(Bn);if(Ls==="break")break}for(var ui=kn.length,Ki=function(Tn){var hn=kn[Tn],Sn={};hn.edges.forEach(function(Fn){var En="".concat(Fn.source,"-").concat(Fn.target,"-").concat(Fn.label);Sn[En]?Sn[En]++:Sn[En]=1});for(var Pn=function(En){var cr=kn[En],$e={};cr.edges.forEach(function(pr){var zi="".concat(pr.source,"-").concat(pr.target,"-").concat(pr.label);$e[zi]?$e[zi]++:$e[zi]=1});var qe=!0;Object.keys($e).length!==Object.keys(Sn).length?qe=!1:Object.keys(Sn).forEach(function(pr){$e[pr]!==Sn[pr]&&(qe=!1)}),qe&&kn.splice(En,1)},ke=ui-1;ke>Tn;ke--)Pn(ke);ui=kn.length},Bn=0;Bn<=ui-1;Bn++)Ki(Bn);return kn}}},xL=bL,CL=function(){function r(t){t===void 0&&(t=10),this.linkedList=new yB,this.maxStep=t}return Object.defineProperty(r.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),r.prototype.isEmpty=function(){return!this.linkedList.head},r.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},r.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},r.prototype.push=function(t){this.linkedList.prepend(t),this.length>this.maxStep&&this.linkedList.deleteTail()},r.prototype.pop=function(){var t=this.linkedList.deleteHead();return t?t.value:null},r.prototype.toArray=function(){return this.linkedList.toArray().map(function(t){return t.value})},r.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},r}(),SL=CL,ML=MB,R9={getAdjMatrix:If,breadthFirstSearch:sI,connectedComponent:BB,getDegree:Qm,getInDegree:AI,getOutDegree:lI,detectCycle:MB,detectDirectedCycle:ML,detectAllCycles:hI,detectAllDirectedCycle:SB,detectAllUndirectedCycle:CB,depthFirstSearch:xB,dijkstra:Uf,findAllPath:RI,findShortestPath:Gm,floydWarshall:Km,labelPropagation:GI,louvain:DB,iLouvain:XI,kCore:qI,kMeans:tL,cosineSimilarity:_B,nodesCosineSimilarity:rL,minimumSpanningTree:uL,pageRank:GB,getNeighbors:ts,Stack:SL,GADDI:xL};function Qt(r){if(r.id!==void 0)return r.id;if(r.source!==void 0&&r.target!==void 0)return`${r.source}-${r.target}`;throw new Error(Oo("The datum does not have available id."))}function Kf(r){return r.combo}function eb(r,t){const e={nodes:(r.nodes||[]).map(Qt),edges:(r.edges||[]).map(Qt),combos:(r.combos||[]).map(Qt)};return t?Object.values(e).flat():e}const nb=(r,t,e)=>{var n;switch(e.type){case"degree":{const i=new Map;return(n=r.nodes)===null||n===void 0||n.forEach(a=>{const s=t(Qt(a),e.direction).length;i.set(Qt(a),s)}),i}case"betweenness":return TL(r,e.directed,e.weightPropertyName);case"closeness":return FL(r,e.directed,e.weightPropertyName);case"eigenvector":return IL(r,e.directed);case"pagerank":return OL(r,e.epsilon,e.linkProb);default:return rb(r)}},rb=r=>{var t;const e=new Map;return(t=r.nodes)===null||t===void 0||t.forEach(n=>{e.set(Qt(n),0)}),e},TL=(r,t,e)=>{const n=rb(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(s=>{if(a!==s){const{allPath:o}=Gm(r,Qt(a),Qt(s),t,e),A=o.length;o.flat().forEach(l=>{l!==Qt(a)&&l!==Qt(s)&&n.set(l,n.get(l)+1/A)})}})}),n},FL=(r,t,e)=>{const n=new Map,{nodes:i=[]}=r;return i.forEach(a=>{const s=i.reduce((o,A)=>{if(a!==A){const{length:l}=Gm(r,Qt(a),Qt(A),t,e);o+=l}return o},0);n.set(Qt(a),1/s)}),n},OL=(r,t,e)=>{var n;const i=new Map,a=GB(r,t,e);return(n=r.nodes)===null||n===void 0||n.forEach(s=>{i.set(Qt(s),a[Qt(s)])}),i},IL=(r,t)=>{const{nodes:e=[]}=r,n=LL(r,t),i=NL(n,e.length),a=new Map;return e.forEach((s,o)=>{a.set(Qt(s),i[o])}),a},LL=(r,t)=>{const{nodes:e=[],edges:n=[]}=r,i=Array(e.length).fill(null).map(()=>Array(e.length).fill(0));return n.forEach(({source:a,target:s})=>{const o=e.findIndex(l=>Qt(l)===a),A=e.findIndex(l=>Qt(l)===s);t?i[o][A]=1:(i[o][A]=1,i[A][o]=1)}),i},NL=(r,t,e=100,n=1e-6)=>{let i=Array(t).fill(1),a=1/0;for(let s=0;s<e&&a>n;s++){const o=Array(t).fill(0);for(let l=0;l<t;l++)for(let c=0;c<t;c++)o[l]+=r[l][c]*i[c];const A=Math.sqrt(o.reduce((l,c)=>l+c*c,0));for(let l=0;l<t;l++)o[l]/=A;a=Math.sqrt(o.reduce((l,c,u)=>l+(c-i[u])*c,0)),i=o}return i};function mA(r,t,e,n=Dr){const i=new Map(r.map(h=>[e(h),h])),a=new Map(t.map(h=>[e(h),h])),s=new Set(i.keys()),o=new Set(a.keys()),A=[],l=[],c=[],u=[];return o.forEach(h=>{s.has(h)?n(i.get(h),a.get(h))?u.push(a.get(h)):l.push(a.get(h)):A.push(a.get(h))}),s.forEach(h=>{o.has(h)||c.push(i.get(h))}),{enter:A,exit:c,keep:u,update:l}}function ml(r,t,e){const n=i=>{e&&!e(i)||(i.style.visibility=t)};r.forEach(i=>{n(i)})}function kL(r,t,e){const n={},i=a=>(a in n||(n[a]=0),`${t}-${a}-${n[a]++}`);return e.map(a=>typeof a=="string"?{type:a,key:i(a)}:typeof a=="function"?a.call(r):a.key?a:Object.assign(Object.assign({},a),{key:i(a.type)}))}class Wm{constructor(t){this.extensions=[],this.extensionMap={},this.context=t}setExtensions(t){const e=kL(this.context.graph,this.category,t),{enter:n,update:i,exit:a,keep:s}=mA(this.extensions,e,o=>o.key);this.createExtensions(n),this.updateExtensions([...i,...s]),this.destroyExtensions(a),this.extensions=e}createExtension(t){const{category:e}=this,{key:n,type:i}=t,a=Fo(e,i);if(!a)return ha.warn(`The extension ${i} of ${e} is not registered.`);const s=new a(this.context,t);s.initialized=!0,this.extensionMap[n]=s}createExtensions(t){t.forEach(e=>this.createExtension(e))}updateExtension(t){const{key:e}=t,n=this.extensionMap[e];n&&n.update(t)}updateExtensions(t){t.forEach(e=>this.updateExtension(e))}destroyExtension(t){const e=this.extensionMap[t];e&&(e.initialized&&!e.destroyed&&e.destroy(),delete this.extensionMap[t])}destroyExtensions(t){t.forEach(({key:e})=>this.destroyExtension(e))}destroy(){this.destroyExtensions(this.extensions),this.context={},this.extensions=[],this.extensionMap={}}}class Zm{constructor(t,e){this.events=[],this.initialized=!1,this.destroyed=!1,this.context=t,this.options=e}update(t){this.options=Object.assign(this.options,t)}destroy(){this.context={},this.options={},this.destroyed=!0}}class Na extends Zm{}class zf extends Na{constructor(t,e){super(t,Object.assign({},zf.defaultOptions,e)),this.isOverlapping=(n,i)=>i.some(a=>n.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=n=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],n.forEach(s=>{const o=s.getShape("label").getRenderBounds();i.isInViewport(o,!0)&&!this.isOverlapping(o,this.occupiedBounds)?(a.show.push(s),this.occupiedBounds.push(pA(o,this.options.padding))):a.hide.push(s)}),a},this.hideLabelIfExceedViewport=(n,i)=>{const{exit:a}=mA(n,i,s=>s.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(n,i)=>{const{model:a}=this.context,s=a.getData(),o=a.getRelatedEdgesData.bind(a);return n.map(l=>(this.nodeCentralities.has(l.id)||(this.nodeCentralities=nb(s,o,i)),{node:l,centrality:this.nodeCentralities.get(l.id)})).sort((l,c)=>c.centrality-l.centrality).map(l=>l.node)},this.sortLabelElementsInView=n=>{const{sort:i,sortNode:a,sortCombo:s,sortEdge:o}=this.options,{model:A}=this.context;if(Wt(i))return n.sort((g,v)=>i(A.getElementDataById(g.id),A.getElementDataById(v.id)));const{node:l=[],edge:c=[],combo:u=[]}=Ff(n,g=>g.type),h=Wt(s)?u.sort((g,v)=>s(...A.getComboData([g.id,v.id]))):u,d=Wt(a)?l.sort((g,v)=>a(...A.getNodeData([g.id,v.id]))):this.sortNodesByCentrality(l,a),f=Wt(o)?c.sort((g,v)=>o(...A.getEdgeData([g.id,v.id]))):c;return[...h,...d,...f]},this.labelElementsInView=[],this.isFirstRender=!0,this.onToggleVisibility=n=>{var i;if(((i=n.data)===null||i===void 0?void 0:i.stage)==="zIndex")return;if(!this.validate(n)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const a=this.isFirstRender?this.getLabelElements():this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,a),this.labelElementsInView=a;const s=this.sortLabelElementsInView(this.labelElementsInView),{show:o,hide:A}=this.detectLabelCollision(s);for(let l=o.length-1;l>=0;l--)this.showLabel(o[l]);A.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=n=>{const i=n.getShape("label");i&&ml(i,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const i=n.getShape("label");i&&ml(i,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=vB(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.enableToggle=!0,this.toggle=n=>{this.enableToggle&&this.onToggleVisibility(n)},this.onBeforeRender=()=>{this.enableToggle=!1},this.onAfterRender=n=>{this.onToggleVisibility(n),this.enableToggle=!0},this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents(),this.onToggleVisibility({})}getLabelElements(){const{elementMap:t}=this.context.element,e=[];for(const n in t){const i=t[n];i.isVisible()&&i.getShape("label")&&e.push(i)}return e}getLabelElementsInView(){const t=this.context.viewport;return this.getLabelElements().filter(e=>t.isInViewport(e.getShape("key").getRenderBounds()))}bindEvents(){const{graph:t}=this.context;t.on(Ae.BEFORE_RENDER,this.onBeforeRender),t.on(Ae.AFTER_RENDER,this.onAfterRender),t.on(Ae.AFTER_DRAW,this.toggle),t.on(Ae.AFTER_LAYOUT,this.toggle),t.on(Ae.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Ae.BEFORE_RENDER,this.onBeforeRender),t.off(Ae.AFTER_RENDER,this.onAfterRender),t.off(Ae.AFTER_DRAW,this.toggle),t.off(Ae.AFTER_LAYOUT,this.toggle),t.off(Ae.AFTER_TRANSFORM,this.onTransform)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}zf.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var QL=function(r){if(!Tm(r)||!pd(r,"Object"))return!1;if(Object.getPrototypeOf(r)===null)return!0;for(var t=r;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(r)===t},Qc=QL,UL=5;function PL(r,t){if(Object.hasOwn)return Object.hasOwn(r,t);if(r==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(r),t)}function ib(r,t,e,n){e=e||0,n=n||UL;for(var i in t)if(PL(t,i)){var a=t[i];a!==null&&Qc(a)?(Qc(r[i])||(r[i]={}),e<n?ib(r[i],a,e+1,n):r[i]=t[i]):Ni(a)?(r[i]=[],r[i]=r[i].concat(a)):a!==void 0&&(r[i]=a)}}var DL=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var n=0;n<t.length;n+=1)ib(r,t[n]);return r},Ci=DL;const ab=[0,0,0];function tn(r,t){return r.map((e,n)=>e+t[n])}function tr(r,t){return r.map((e,n)=>e-t[n])}function Bs(r,t){return typeof t=="number"?r.map(e=>e*t):r.map((e,n)=>e*t[n])}function bs(r,t){return typeof t=="number"?r.map(e=>e/t):r.map((e,n)=>e/t[n])}function RL(r,t){return r.reduce((e,n,i)=>e+n*t[i],0)}function _L(r,t){const e=fh(r),n=fh(t);return[e[1]*n[2]-e[2]*n[1],e[2]*n[0]-e[0]*n[2],e[0]*n[1]-e[1]*n[0]]}function yA(r,t){return r.map(e=>e*t)}function lr(r,t){return Math.sqrt(r.reduce((e,n,i)=>e+Math.pow(n-t[i]||0,2),0))}function Vf(r,t){return r.reduce((e,n,i)=>e+Math.abs(n-t[i]),0)}function Io(r){const t=r.reduce((e,n)=>e+Math.pow(n,2),0);return r.map(e=>e/Math.sqrt(t))}function jm(r,t,e=!1){const n=r[0]*t[1]-r[1]*t[0];let i=Math.acos(Bs(r,t).reduce((a,s)=>a+s,0)/(lr(r,ab)*lr(t,ab)));return e&&n<0&&(i=2*Math.PI-i),i}function _9(r,t){return r.every((e,n)=>e===t[n])}function Wf(r,t=!0){return t?[-r[1],r[0]]:[r[1],-r[0]]}function Ym(r,t){return r.map(e=>e%t)}function yl(r){return[r[0],r[1]]}function fh(r){return VO(r)?[r[0],r[1],0]:r}function sb(r){const[t,e]=r;return!t&&!e?0:Math.atan2(e,t)}function ob(r,t){const[e,n]=r;if(t%360===0)return[e,n];const i=t*Math.PI/180,a=Math.cos(i),s=Math.sin(i);return[e*a-n*s,e*s+n*a]}function Ab(r,t){const[e,n]=r,[i,a]=t,s=tr(e,n),o=tr(i,a);return _L(s,o).every(A=>A===0)}function Xm(r,t,e=!1){if(Ab(r,t))return;const[n,i]=r,[a,s]=t,o=((n[0]-a[0])*(a[1]-s[1])-(n[1]-a[1])*(a[0]-s[0]))/((n[0]-i[0])*(a[1]-s[1])-(n[1]-i[1])*(a[0]-s[0])),A=s[0]-a[0]?(n[0]-a[0]+o*(i[0]-n[0]))/(s[0]-a[0]):(n[1]-a[1]+o*(i[1]-n[1]))/(s[1]-a[1]);if(!(!e&&(!$s(o,0,1)||!$s(A,0,1))))return[n[0]+o*(i[0]-n[0]),n[1]+o*(i[1]-n[1])]}function lb(r){if(Array.isArray(r))return $s(r[0],0,1)&&$s(r[1],0,1)?r:[.5,.5];const t=r.split("-"),e=t.includes("left")?0:t.includes("right")?1:.5,n=t.includes("top")?0:t.includes("bottom")?1:.5;return[e,n]}function Ai(r){const{x:t=0,y:e=0,z:n=0}=r.style||{};return[+t,+e,+n]}function HL(r){const{x:t,y:e,z:n}=r.style||{};return t!==void 0||e!==void 0||n!==void 0}function cb(r,t){const[e,n]=t,{min:i,max:a}=r;return[i[0]+e*(a[0]-i[0]),i[1]+n*(a[1]-i[1])]}function Lo(r,t="center"){const e=lb(t);return cb(r,e)}function H9(r,t){const e=parseAnchor(t);return cb(r,e)}const G9=r=>{const[t,e]=r;return{left:Math.min(t[0],e[0]),right:Math.max(t[0],e[0]),top:Math.min(t[1],e[1]),bottom:Math.max(t[1],e[1])}};function Si(r){var t;return[r.x,r.y,(t=r.z)!==null&&t!==void 0?t:0]}function xs(r){var t;return{x:r[0],y:r[1],z:(t=r[2])!==null&&t!==void 0?t:0}}function K9(r){return r.sort((t,e)=>t[0]-e[0]||t[1]-e[1])}function z9(r){const t=new Set;return r.filter(e=>{const n=e.join(",");return t.has(n)?!1:(t.add(n),!0)})}function gh(r,t=0){return r.map(e=>parseFloat(e.toFixed(t)))}function wA(r,t,e,n=!1){if(Dr(r,t))return r;const i=n?tr(r,t):tr(t,r),a=Io(i),s=[a[0]*e,a[1]*e];return tn(yl(r),s)}function ub(r,t){return r[1]===t[1]}function GL(r,t){return r[0]===t[0]}function KL(r,t){return ub(r,t)||GL(r,t)}function hb(r,t,e){return Ab([r,t],[t,e])}function db(r,t){return[2*t[0]-r[0],2*t[1]-r[1]]}function fb(r,t,e,n=!0,i=!1){for(let a=0;a<e.length;a++){let s=e[a],o=e[(a+1)%e.length];n&&(s=tn(t,s),o=tn(t,o));const A=i?db(r,t):r,l=Xm([t,A],[s,o]);if(l)return{point:l,line:[s,o]}}return{point:t,line:void 0}}function zL(r,t,e,n){const i=r[0],a=r[1];let s=!1;e===void 0&&(e=0),n===void 0&&(n=t.length);const o=n-e;for(let A=0,l=o-1;A<o;l=A++){const c=t[A+e][0],u=t[A+e][1],h=t[l+e][0],d=t[l+e][1];u>a!=d>a&&i<(h-c)*(a-u)/(d-u)+c&&(s=!s)}return s}function VL(r,t,e=!1){const n=Lo(t,"center"),i=[Lo(t,"left-top"),Lo(t,"right-top"),Lo(t,"right-bottom"),Lo(t,"left-bottom")];return fb(r,n,i,!1,e).point}function Zf(r,t,e=!1){const n=t.center,i=e?db(r,n):r,a=tr(i,t.center),s=Math.atan2(a[1],a[0]);if(isNaN(s))return n;const o=to(t)/2,A=eo(t)/2,l=n[0]+o*Math.cos(s),c=n[1]+A*Math.sin(s);return[l,c]}function WL(r,t){let e=1/0,n=[r[0],t[0]];return r.forEach(i=>{t.forEach(a=>{const s=lr(i,a);s<e&&(e=s,n=[i,a])})}),n}function ZL(r,t){let e=1/0,n=[[0,0],[0,0]];return t.forEach(i=>{const a=jL(r,i);a<e&&(e=a,n=i)}),n}function jL(r,t){const e=gb(r,t);return lr(r,e)}function gb(r,t){const[e,n]=t[0],[i,a]=t[1],[s,o]=r,A=i-e,l=a-n;if(A===0&&l===0)return[e,n];let c=((s-e)*A+(o-n)*l)/(A*A+l*l);c>1?c=1:c<0&&(c=0);const u=e+c*A,h=n+c*l;return[u,h]}function YL(r){const t=r.reduce((e,n)=>tn(e,n),[0,0]);return bs(t,r.length)}function Jm(r,t=!0){const e=YL(r);return r.sort(([n,i],[a,s])=>{const o=Math.atan2(i-e[1],n-e[0]),A=Math.atan2(s-e[1],a-e[0]);return t?A-o:o-A})}function vb(r,t){return[r,[r[0],t[1]],t,[t[0],r[1]]]}class Rr{constructor(t,e,n){if(this.phase=e,this.pointerByTouch=[],this.initialDistance=null,this.emitter=t,Rr.instance)return Rr.callbacks[this.phase].push(n),Rr.instance;this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.bindEvents(),Rr.instance=this,Rr.callbacks[this.phase].push(n)}bindEvents(){const{emitter:t}=this;t.on(Yt.POINTER_DOWN,this.onPointerDown),t.on(Yt.POINTER_MOVE,this.onPointerMove),t.on(Yt.POINTER_UP,this.onPointerUp)}updatePointerPosition(t,e,n){const i=this.pointerByTouch.findIndex(a=>a.pointerId===t);i>=0&&(this.pointerByTouch[i]={x:e,y:n,pointerId:t})}onPointerDown(t){const{x:e,y:n}=t.client||{};if(!(e===void 0||n===void 0)&&(this.pointerByTouch.push({x:e,y:n,pointerId:t.pointerId}),t.pointerType==="touch"&&this.pointerByTouch.length===2)){Rr.isPinching=!0;const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y;this.initialDistance=Math.sqrt(i*i+a*a),Rr.callbacks.pinchstart.forEach(s=>s(t,{scale:0}))}}onPointerMove(t){if(this.pointerByTouch.length!==2||this.initialDistance===null)return;const{x:e,y:n}=t.client||{};if(e===void 0||n===void 0)return;this.updatePointerPosition(t.pointerId,e,n);const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y,o=Math.sqrt(i*i+a*a)/this.initialDistance;Rr.callbacks.pinchmove.forEach(A=>A(t,{scale:(o-1)*5}))}onPointerUp(t){var e;Rr.callbacks.pinchend.forEach(n=>n(t,{scale:0})),Rr.isPinching=!1,this.initialDistance=null,this.pointerByTouch=[],(e=Rr.instance)===null||e===void 0||e.tryDestroy()}destroy(){this.emitter.off(Yt.POINTER_DOWN,this.onPointerDown),this.emitter.off(Yt.POINTER_MOVE,this.onPointerMove),this.emitter.off(Yt.POINTER_UP,this.onPointerUp),Rr.instance=null}off(t,e){const n=Rr.callbacks[t].indexOf(e);n>-1&&Rr.callbacks[t].splice(n,1),this.tryDestroy()}tryDestroy(){Object.values(Rr.callbacks).every(t=>t.length===0)&&this.destroy()}}Rr.isPinching=!1,Rr.instance=null,Rr.callbacks={pinchstart:[],pinchmove:[],pinchend:[]};const pb=r=>r.map(t=>gn(t)?t.toLocaleLowerCase():t);class EA{constructor(t){this.map=new Map,this.boundHandlePinch=()=>{},this.recordKey=new Set,this.onKeyDown=e=>{e!=null&&e.key&&(this.recordKey.add(e.key),this.trigger(e))},this.onKeyUp=e=>{e!=null&&e.key&&this.recordKey.delete(e.key)},this.onWheel=e=>{this.triggerExtendKey(Yt.WHEEL,e)},this.onDrag=e=>{this.triggerExtendKey(Yt.DRAG,e)},this.handlePinch=(e,n)=>{this.triggerExtendKey(Yt.PINCH,Object.assign(Object.assign({},e),n))},this.onFocus=()=>{this.recordKey.clear()},this.emitter=t,this.bindEvents()}bind(t,e){t.length!==0&&(t.includes(Yt.PINCH)&&!this.pinchHandler&&(this.boundHandlePinch=this.handlePinch.bind(this),this.pinchHandler=new Rr(this.emitter,"pinchmove",this.boundHandlePinch)),this.map.set(t,e))}unbind(t,e){this.map.forEach((n,i)=>{Dr(i,t)&&(!e||e===n)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(t){const e=pb(Array.from(this.recordKey)).sort(),n=pb(t).sort();return Dr(e,n)}bindEvents(){var t;const{emitter:e}=this;e.on(Yt.KEY_DOWN,this.onKeyDown),e.on(Yt.KEY_UP,this.onKeyUp),e.on(Yt.WHEEL,this.onWheel),e.on(Yt.DRAG,this.onDrag),(t=globalThis.addEventListener)===null||t===void 0||t.call(globalThis,"focus",this.onFocus)}trigger(t){this.map.forEach((e,n)=>{this.match(n)&&e(t)})}triggerExtendKey(t,e){this.map.forEach((n,i)=>{i.includes(t)&&Dr(Array.from(this.recordKey),i.filter(a=>a!==t))&&n(e)})}destroy(){var t,e;this.unbindAll(),this.emitter.off(Yt.KEY_DOWN,this.onKeyDown),this.emitter.off(Yt.KEY_UP,this.onKeyUp),this.emitter.off(Yt.WHEEL,this.onWheel),this.emitter.off(Yt.DRAG,this.onDrag),(t=this.pinchHandler)===null||t===void 0||t.off("pinchmove",this.boundHandlePinch),(e=globalThis.removeEventListener)===null||e===void 0||e.call(globalThis,"focus",this.onFocus)}}class vh extends Na{constructor(t,e){super(t,Ci({},vh.defaultOptions,e)),this.shortcut=new EA(t.graph),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.clearStates=this.clearStates.bind(this),this.bindEvents()}onPointerDown(t){if(!this.validate(t)||!this.isKeydown()||this.startPoint)return;const{canvas:e,graph:n}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/n.getZoom()),this.rectShape=new xi({id:"g6-brush-select",style:i}),e.appendChild(this.rectShape),this.startPoint=[t.canvas.x,t.canvas.y]}onPointerMove(t){var e;if(!this.startPoint)return;const{immediately:n,mode:i}=this.options;this.endPoint=jf(t,this.context.graph),(e=this.rectShape)===null||e===void 0||e.attr({x:Math.min(this.endPoint[0],this.startPoint[0]),y:Math.min(this.endPoint[1],this.startPoint[1]),width:Math.abs(this.endPoint[0]-this.startPoint[0]),height:Math.abs(this.endPoint[1]-this.startPoint[1])}),n&&i==="default"&&this.updateElementsStates(vb(this.startPoint,this.endPoint))}onPointerUp(t){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=jf(t,this.context.graph),this.updateElementsStates(vb(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:t}=this.context,e=Object.values(t.getData()).reduce((n,i)=>Object.assign({},n,i.reduce((a,s)=>{var o;const A=(o=s.states||[])===null||o===void 0?void 0:o.filter(l=>l!==this.options.state);return a[Qt(s)]=A,a},{})),{});t.setElementState(e,this.options.animation)}updateElementsStates(t){const{graph:e}=this.context,{enableElements:n,state:i,mode:a,onSelect:s}=this.options,o=this.selector(e,t,n),A={};switch(a){case"union":o.forEach(l=>{A[l]=[...e.getElementState(l),i]});break;case"diff":o.forEach(l=>{const c=e.getElementState(l);A[l]=c.includes(i)?c.filter(u=>u!==i):[...c,i]});break;case"intersect":o.forEach(l=>{const c=e.getElementState(l);A[l]=c.includes(i)?[i]:[]});break;case"default":default:o.forEach(l=>{A[l]=[i]});break}Wt(s)&&s(A),e.setElementState(A,this.options.animation)}selector(t,e,n){if(!n||n.length===0)return[];const i=[],a=t.getData();if(n.forEach(s=>{a[`${s}s`].forEach(o=>{const A=Qt(o);t.getElementVisibility(A)!=="hidden"&&zL(t.getElementPosition(A),e)&&i.push(A)})}),n.includes("edge")){const s=a.edges;s==null||s.forEach(o=>{const{source:A,target:l}=o;i.includes(A)&&i.includes(l)&&i.push(Qt(o))})}return i}clearBrush(){var t;(t=this.rectShape)===null||t===void 0||t.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:t}=this.options,e=Array.isArray(t)?t:[t];return this.shortcut.match(e.filter(n=>n!=="drag"))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}bindEvents(){const{graph:t}=this.context;t.on(Yt.POINTER_DOWN,this.onPointerDown),t.on(Yt.POINTER_MOVE,this.onPointerMove),t.on(Yt.POINTER_UP,this.onPointerUp),t.on(To.CLICK,this.clearStates)}unbindEvents(){const{graph:t}=this.context;t.off(Yt.POINTER_DOWN,this.onPointerDown),t.off(Yt.POINTER_MOVE,this.onPointerMove),t.off(Yt.POINTER_UP,this.onPointerUp),t.off(To.CLICK,this.clearStates)}update(t){this.unbindEvents(),this.options=Ci(this.options,t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}vh.defaultOptions={animation:!1,enable:!0,enableElements:["node","combo","edge"],immediately:!1,mode:"default",state:"selected",trigger:["shift"],style:{width:0,height:0,lineWidth:1,fill:"#1677FF",stroke:"#1677FF",fillOpacity:.1,zIndex:2,pointerEvents:"none"}};const jf=(r,t)=>{if((r.targetType==="node"||r.targetType==="combo")&&!(r.nativeEvent.target instanceof HTMLCanvasElement)){const[e,n]=t.getCanvasByClient([r.client.x,r.client.y]);return[e,n]}return[r.canvas.x,r.canvas.y]},No=.8,wl=["node","edge","combo"];function El(r,t,e,n,i=0){n==="TB"&&t(r,i);const a=e(r);if(a)for(const s of a)El(s,t,e,n,i+1);n==="BT"&&t(r,i)}function XL(r,t,e){const n=[[r,0]];for(;n.length;){const[i,a]=n.shift();t(i,a);const s=e(i);if(s)for(const o of s)n.push([o,a+1])}}function mb(r,t,e,n,i="both"){if(t==="combo"||t==="node")return qm(r,e,n,i);const a=r.getEdgeData(e);if(!a)return[];const s=qm(r,a.source,n-1,i),o=qm(r,a.target,n-1,i);return Array.from(new Set([...s,...o,e]))}function qm(r,t,e,n="both"){const i=new Set,a=new Set,s=new Set;return XL(t,(o,A)=>{A>e||(s.add(o),r.getRelatedEdgesData(o,n).forEach(l=>{const c=Qt(l);!a.has(c)&&A<e&&(s.add(c),a.add(c))}))},o=>r.getRelatedEdgesData(o,n).map(A=>A.source===o?A.target:A.source).filter(A=>i.has(A)?!1:(i.add(A),!0))),Array.from(s)}function $m(r){return r.states||[]}var Yf=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Xf extends Na{constructor(t,e){super(t,Object.assign({},Xf.defaultOptions,e)),this.onClickSelect=n=>Yf(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.updateState(n),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.onClickCanvas=n=>Yf(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.shortcut=new EA(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),wl.forEach(e=>{t.on(`${e}:${Yt.CLICK}`,this.onClickSelect)}),t.on(To.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:t,trigger:e}=this.options;return t&&this.shortcut.match(e)}getNeighborIds(t){const{target:e,targetType:n}=t,{graph:i}=this.context,{degree:a}=this.options;return mb(i,n,e.id,typeof a=="function"?a(t):a).filter(s=>s!==e.id)}updateState(t){return Yf(this,void 0,void 0,function*(){const{state:e,unselectedState:n,neighborState:i,animation:a}=this.options;if(!e&&!i&&!n)return;const{target:s}=t,{graph:o}=this.context,A=o.getElementData(s.id),l=$m(A).includes(e)?"unselect":"select",c={},u=this.isMultipleSelect,h=[s.id],d=this.getNeighborIds(t);if(u)if(Object.assign(c,this.getDataStates()),l==="select"){const f=(g,v)=>{g.forEach(m=>{const w=new Set(o.getElementState(m));w.add(v),w.delete(n),c[m]=Array.from(w)})};f(h,e),f(d,i),n&&Object.keys(c).forEach(g=>{const v=c[g];!v.includes(e)&&!v.includes(i)&&!v.includes(n)&&c[g].push(n)})}else{const f=c[s.id];c[s.id]=f.filter(g=>g!==e&&g!==i),f.includes(n)||c[s.id].push(n),d.forEach(g=>{c[g]=c[g].filter(v=>v!==i),c[g].includes(e)||c[g].push(n)})}else if(l==="select"){Object.assign(c,this.getClearStates(!!n));const f=(g,v)=>{g.forEach(m=>{c[m]||(c[m]=o.getElementState(m)),c[m].push(v)})};f(h,e),f(d,i),n&&Object.keys(c).forEach(g=>{!h.includes(g)&&!d.includes(g)&&c[g].push(n)})}else Object.assign(c,this.getClearStates());yield o.setElementState(c,a)})}getDataStates(){const{graph:t}=this.context,{nodes:e,edges:n,combos:i}=t.getData(),a={};return[...e,...n,...i].forEach(s=>{a[Qt(s)]=$m(s)}),a}getClearStates(t=!1){const{graph:e}=this.context,{state:n,unselectedState:i,neighborState:a}=this.options,s=new Set([n,i,a]),{nodes:o,edges:A,combos:l}=e.getData(),c={};return[...o,...A,...l].forEach(u=>{const h=$m(u),d=h.filter(f=>!s.has(f));(t||d.length!==h.length)&&(c[Qt(u)]=d)}),c}clearState(){return Yf(this,void 0,void 0,function*(){const{graph:t}=this.context;yield t.setElementState(this.getClearStates(),this.options.animation)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;wl.forEach(e=>{t.off(`${e}:${Yt.CLICK}`,this.onClickSelect)}),t.off(To.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}Xf.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function da(r){var t;return!!(!((t=r.style)===null||t===void 0)&&t.collapsed)}var Mi=function(r,t,e){for(var n=0,i=gn(t)?t.split("."):t;r&&n<i.length;)r=r[i[n++]];return r===void 0||n<i.length?e:r},ph=function(r,t,e){var n=r,i=gn(t)?t.split("."):t;return i.forEach(function(a,s){s<i.length-1?(Br(n[a])||(n[a]=ye(i[s+1])?[]:{}),n=n[a]):n[a]=e}),r},JL=function(r){var t=lB(r);return t.charAt(0).toLowerCase()+t.substring(1)},qL=JL;function mh(r,t){if(!r.startsWith(t))return!1;const e=r[t.length];return e>="A"&&e<="Z"}function yb(r,t){return`${t}${Mf(r)}`}function wb(r,t,e=!0){if(!t||!mh(r,t))return r;const n=r.slice(t.length);return e?qL(n):n}function Or(r,t){const e=Object.entries(r).reduce((n,[i,a])=>(i==="className"||i==="class"||mh(i,t)&&Object.assign(n,{[wb(i,t)]:a}),n),{});if("opacity"in r){const n=yb("opacity",t),i=r.opacity;if(n in r){const a=r[n];Object.assign(e,{opacity:i*a})}else Object.assign(e,{opacity:i})}return e}function ty(r,t){const e=t.length;return Object.keys(r).reduce((n,i)=>{if(i.startsWith(t)){const a=i.slice(e);n[a]=r[i]}return n},{})}function Eb(r,t){const e=typeof t=="string"?[t]:t,n={};return Object.keys(r).forEach(i=>{e.find(a=>i.startsWith(a))||(n[i]=r[i])}),n}function V9(r,t,e){return Object.entries(r).reduce((n,[i,a])=>(mh(i,t)?n[yb(wb(i,t,!1),e)]=a:n[i]=a,n),{})}function ka(r=0){if(typeof r=="number")return[r,r,r];const[t,e=t,n=t]=r;return[t,e,n]}var $L=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Bb(r,t){const{datum:e,graph:n}=t;return typeof r=="function"?r.call(n,e):Object.fromEntries(Object.entries(r).map(([i,a])=>typeof a=="function"?[i,a.call(n,e)]:[i,a]))}function pi(r,t){const e=(r==null?void 0:r.style)||{},n=(t==null?void 0:t.style)||{};for(const i in e)i in n||(n[i]=e[i]);return Object.assign({},r,t,{style:n})}function tN(r){const{x:t,y:e,z:n,class:i,className:a,transform:s,transformOrigin:o,zIndex:A,visibility:l}=r;return $L(r,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}function eN(r,t){const e=ka(r);let n={};return t.text&&!t.fontSize&&(n={fontSize:Math.min(...e)*.5}),t.src&&(!t.width||!t.height)&&(n={width:e[0]*.5,height:e[1]*.5}),n}function bb(r){if(r)return typeof r=="string"||typeof r=="function"||Array.isArray(r)?{type:"group",field:t=>t.id,color:r,invert:!1}:r}function nN(r,t){if(!t)return{};const{type:e,color:n,field:i,invert:a}=t,s=A=>{const l=typeof n=="string"?Fo("palette",n):n;if(typeof l=="function"){const c={};return A.forEach(([u,h])=>{c[u]=l(a?1-h:h)}),c}else if(Array.isArray(l)){const c=a?[...l].reverse():l,u={};return A.forEach(([h,d])=>{u[h]=c[d%l.length]}),u}return{}},o=(A,l)=>{var c;return typeof A=="string"?(c=l.data)===null||c===void 0?void 0:c[A]:A==null?void 0:A(l)};if(e==="group"){const A=Ff(r,h=>{if(!i)return"default";const d=o(i,h);return d?String(d):"default"}),l=Object.keys(A),c=s(l.map((h,d)=>[h,d])),u={};return Object.entries(A).forEach(([h,d])=>{d.forEach(f=>{u[Qt(f)]=c[h]})}),u}else if(e==="value"){const[A,l]=r.reduce(([u,h],d)=>{const f=o(i,d);if(typeof f!="number")throw new Error(Oo(`Palette field ${i} is not a number`));return[Math.min(u,f),Math.max(h,f)]},[1/0,-1/0]),c=l-A;return s(r.map(u=>[u.id,(o(i,u)-A)/c]))}}function xb(r){const t=typeof r=="string"?Fo("palette",r):r;if(typeof t!="function")return t}function Cb(r,t){let e=2*r;return typeof t=="string"?e=r*Number(t.replace("%",""))/100:typeof t=="number"&&(e=t),isNaN(e)&&(e=2*r),e}function Sb(r,t,e=1,n=!1){const i=n?e:1,a=(r.max[0]-r.min[0])*i;return Cb(a,t)}function rN(r,t,e=1){const n=lr(r[0],r[1])*e;return Cb(n,t)}var iN={}.toString,aN=function(r){return iN.call(r).replace(/^\[object /,"").replace(/]$/,"")},sN=aN,oN=Object.prototype,AN=function(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||oN;return r===e},lN=AN,cN=Object.prototype.hasOwnProperty;function uN(r){if(Pe(r))return!0;if(oh(r))return!r.length;var t=sN(r);if(t==="Map"||t==="Set")return!r.size;if(lN(r))return!Object.keys(r).length;for(var e in r)if(cN.call(r,e))return!1;return!0}var ro=uN;class yh extends th{constructor(t){Mb(t.style),super(t),this.shapeMap={},this.animateMap={},this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(t,e,n,i,a){var s,o,A,l,c,u,h,d;const f=this.shapeMap[t];if(n===!1){f&&((s=a==null?void 0:a.beforeDestroy)===null||s===void 0||s.call(a,f),i.removeChild(f),delete this.shapeMap[t],(o=a==null?void 0:a.afterDestroy)===null||o===void 0||o.call(a,f));return}const g=typeof e=="string"?Fo(Ah.SHAPE,e):e;if(!g)throw new Error(Oo(`Shape ${e} not found`));if(!f||f.destroyed||!(f instanceof g)){f&&((A=a==null?void 0:a.beforeDestroy)===null||A===void 0||A.call(a,f),f==null||f.destroy(),(l=a==null?void 0:a.afterDestroy)===null||l===void 0||l.call(a,f)),(c=a==null?void 0:a.beforeCreate)===null||c===void 0||c.call(a);const v=new g({className:t,style:n});return i.appendChild(v),this.shapeMap[t]=v,(u=a==null?void 0:a.afterCreate)===null||u===void 0||u.call(a,v),v}return(h=a==null?void 0:a.beforeUpdate)===null||h===void 0||h.call(a,f),py(f,n),(d=a==null?void 0:a.afterUpdate)===null||d===void 0||d.call(a,f),f}update(t={}){const e=Object.assign({},this.attributes,t);Mb(e),nQ(this,e),this.render(e,this),this.setVisibility()}bindEvents(){}getGraphicStyle(t){return tN(t)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(t,e){if(t.length===0)return null;const n=[];if(t[0].x!==void 0||t[0].y!==void 0||t[0].z!==void 0){const{x:a=0,y:s=0,z:o=0}=this.attributes;t.forEach(A=>{const{x:l=a,y:c=s,z:u=o}=A;Object.assign(A,{transform:u?[["translate3d",l,c,u]]:[["translate",l,c]]})})}const i=super.animate(t,e);if(i&&(ey(this,i),n.push(i)),Array.isArray(t)&&t.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(t[0]).some(s=>!a.includes(s))){Object.entries(this.shapeMap).forEach(([o,A])=>{const l=`get${Mf(o)}Style`,c=this[l];if(Wt(c)){const u=t.map(d=>c.call(this,Object.assign(Object.assign({},this.attributes),d))),h=A.animate(Lm(u),e);h&&(ey(A,h),n.push(h))}});const s=(o,A)=>{if(!ro(o)){const l=`get${Mf(A)}Style`,c=this[l];if(Wt(c)){const u=t.map(h=>c.call(this,Object.assign(Object.assign({},this.attributes),h)));Object.entries(u[0]).map(([h])=>{const d=u.map(g=>g[h]),f=o[h];if(f){const g=f.animate(Lm(d),e);g&&(ey(f,g),n.push(g))}})}}};this.compositeShapes.forEach(([o,A])=>{const l=ty(this.shapeMap,A);s(l,o)})}}return Im(n)}getShape(t){return this.shapeMap[t]}setVisibility(){const{visibility:t}=this.attributes;ml(this,t)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function ey(r,t){t==null||t.finished.then(()=>{const e=r.activeAnimations.findIndex(n=>n===t);e>-1&&r.activeAnimations.splice(e,1)})}function Mb(r){if(!r)return{};if("x"in r||"y"in r||"z"in r){const{x:t=0,y:e=0,z:n,transform:i}=r,a=hB(t,e,n,i);a&&(r.transform=a)}return r}var hN=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class io extends yh{constructor(t){super(pi({style:io.defaultStyleProps},t))}isTextStyle(t){return mh(t,"label")}isBackgroundStyle(t){return mh(t,"background")}getTextStyle(t){const e=this.getGraphicStyle(t),{padding:n}=e,i=hN(e,["padding"]);return Eb(i,"background")}getBackgroundStyle(t){if(t.background===!1)return!1;const e=this.getGraphicStyle(t),{wordWrap:n,wordWrapWidth:i,padding:a}=e,s=Or(e,"background"),{min:[o,A],center:[l,c],halfExtents:[u,h]}=this.shapeMap.text.getGeometryBounds(),[d,f,g,v]=La(a),m=u*2+v+f,{width:w,height:C}=s;w&&C?Object.assign(s,{x:l-Number(w)/2,y:c-Number(C)/2}):Object.assign(s,{x:o-v,y:A-d,width:n?Math.min(m,i+v+f):m,height:h*2+d+g});const{radius:F}=s;if(typeof F=="string"&&F.endsWith("%")){const Q=Number(F.replace("%",""))/100;s.radius=Math.min(+s.width,+s.height)*Q}return s}render(t=this.parsedAttributes,e=this){this.upsert("text",fl,this.getTextStyle(t),e),this.upsert("background",xi,this.getBackgroundStyle(t),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}io.defaultStyleProps={padding:0,fontSize:12,fontFamily:"system-ui, sans-serif",wordWrap:!0,maxLines:1,wordWrapWidth:128,textOverflow:"...",textBaseline:"middle",backgroundOpacity:.75,backgroundZIndex:-1,backgroundLineWidth:0};class Uc extends yh{constructor(t){super(pi({style:Uc.defaultStyleProps},t))}getBadgeStyle(t){return this.getGraphicStyle(t)}render(t=this.parsedAttributes,e=this){this.upsert("label",io,this.getBadgeStyle(t),e)}getGeometryBounds(){const t=this.getShape("label");return(t.getShape("background")||t.getShape("text")).getGeometryBounds()}}Uc.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function dN(r,t=!0){const e=[];return r.forEach((n,i)=>{e.push([i===0?"M":"L",...n])}),t&&e.push(["Z"]),e}const Tb={M:["x","y"],m:["dx","dy"],H:["x"],h:["dx"],V:["y"],v:["dy"],L:["x","y"],l:["dx","dy"],Z:[],z:[],C:["x1","y1","x2","y2","x","y"],c:["dx1","dy1","dx2","dy2","dx","dy"],S:["x2","y2","x","y"],s:["dx2","dy2","dx","dy"],Q:["x1","y1","x","y"],q:["dx1","dy1","dx","dy"],T:["x","y"],t:["dx","dy"],A:["rx","ry","rotation","large-arc","sweep","x","y"],a:["rx","ry","rotation","large-arc","sweep","dx","dy"]};function fN(r){const t=r.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),e=[];let n="",i={};for(;t.length>0;){let a=t.shift();a in Tb?n=a:t.unshift(a),i={type:n},Tb[n].forEach(A=>{a=t.shift(),i[A]=a}),n==="M"?n="L":n==="m"&&(n="l");const[s,...o]=Object.values(i);e.push([s,...o.map(Number)])}return e}function gN(r){const t=[];return(typeof r=="string"?fN(r):r).forEach(n=>{const i=n[0];if(i==="Z"){t.push(t[0]);return}if(i!=="A")for(let a=1;a<n.length;a=a+2)t.push([n[a],n[a+1],0]);else{const a=n.length;t.push([n[a-2],n[a-1],0])}}),t}const Fb=r=>{if(r.length<2)return[["M",0,0],["L",0,0]];const t=r[0],e=r[1],n=r[r.length-1],i=r[r.length-2];r.unshift(i,n),r.push(t,e);const a=[["M",n[0],n[1]]];for(let s=1;s<r.length-2;s+=1){const[o,A]=r[s-1],[l,c]=r[s],[u,h]=r[s+1],[d,f]=s!==r.length-2?r[s+2]:[u,h],g=l+(u-o)/6,v=c+(h-A)/6,m=u-(d-l)/6,w=h-(f-c)/6;a.push(["C",g,v,m,w,u,h])}return a};function vN(r,t,e,n,i,a,s){const[o,A]=Lo(r,t),l={textAlign:t==="left"?"right":t==="right"?"left":"center",textBaseline:t==="top"?"bottom":t==="bottom"?"top":"middle",transform:[["translate",o+e,A+n]]};if(t==="center"||!i)return l;const c=gN(a);if(!c||c.length<=3)return l;const u=c.map((f,g)=>{const v=f,m=c[(g+1)%c.length];return Dr(v,m)?null:[v,m]}).filter(Boolean),h=ZL([o,A],u),d=gb([o,A],h);if(d&&h&&(l.transform=[["translate",d[0]+e,d[1]+n]],s)){const f=Math.atan((h[0][1]-h[1][1])/(h[0][0]-h[1][0]));l.transform.push(["rotate",f/Math.PI*180]),l.textAlign="center",(t==="right"||t==="left")&&(f>0?l.textBaseline=t==="right"?"bottom":"top":l.textBaseline=t==="right"?"top":"bottom")}return l}var pN=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class wh extends yh{constructor(t){super(pi({style:wh.defaultStyleProps},t))}getLabelStyle(t){if(!t.label||!t.d||t.d.length===0)return!1;const e=Or(this.getGraphicStyle(t),"label"),{maxWidth:n,offsetX:i,offsetY:a,autoRotate:s,placement:o,closeToPath:A}=e,l=pN(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),c=this.shapeMap.key,u=c==null?void 0:c.getRenderBounds();return Object.assign(vN(u,o,i,a,A,t.d,s),{wordWrapWidth:Sb(u,n)},l)}getKeyStyle(t){return this.getGraphicStyle(t)}render(t,e){this.upsert("key",Pi,this.getKeyStyle(t),e),this.upsert("label",io,this.getLabelStyle(t),e)}}wh.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function mN(r){const t=[],e=n=>{n!=null&&n.children.length&&n.children.forEach(i=>{t.push(i),e(i)})};return e(r),t}function yN(r){const t=[];let e=r.parentNode;for(;e;)t.push(e),e=e.parentNode;return t}class ny extends nh{constructor(t){super(t),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},Pc=this,this.isMutationObserved=!0,this.addEventListener(yn.MOUNTED,this.onMounted),this.addEventListener(yn.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:t,clipPath:e,width:n=0,height:i=0}=this.attributes;if(t&&n&&i){const[a,s]=this.getBounds().min,o={x:a,y:s,radius:t,width:n,height:i};if(e)Object.assign(this.parsedStyle.clipPath.style,o);else{const A=new xi({style:o});this.style.clipPath=A}}else e&&(this.style.clipPath=null)}}const ry=new WeakMap;let Pc=null;const iy=r=>{if(Pc&&yN(Pc).includes(r)){const t=ry.get(r);t?t.includes(Pc)||t.push(Pc):ry.set(r,[Pc])}},ay=r=>{const t=ry.get(r);t&&t.forEach(e=>e.handleRadius())};class Ob extends yh{constructor(t){super(t)}isImage(){const{src:t}=this.attributes;return!!t}getIconStyle(t=this.attributes){const{width:e=0,height:n=0}=t,i=this.getGraphicStyle(t);return this.isImage()?Object.assign({x:-e/2,y:-n/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(t=this.attributes,e=this){this.upsert("icon",this.isImage()?ny:fl,this.getIconStyle(t),e)}}class Ib extends yh{get context(){return this.config.context}get parsedAttributes(){return this.attributes}onframe(){}animate(t,e){const n=super.animate(t,e);return n&&(n.onframe=()=>this.onframe(),n.finished.then(()=>this.onframe())),n}}var Jf=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Cs extends Ib{constructor(t){super(pi({style:Cs.defaultStyleProps},t)),this.type="node"}getSize(t=this.attributes){const{size:e}=t;return ka(e)}getKeyStyle(t){const e=this.getGraphicStyle(t);return Object.assign(Eb(e,["label","halo","icon","badge","port"]))}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=Or(this.getGraphicStyle(t),"label"),{placement:n,maxWidth:i,offsetX:a,offsetY:s}=e,o=Jf(e,["placement","maxWidth","offsetX","offsetY"]),A=this.getShape("key").getLocalBounds();return Object.assign(hx(A,n,a,s),{wordWrapWidth:Sb(A,i)},o)}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),{fill:n}=e,i=Jf(e,["fill"]),a=Or(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign(Object.assign({},i),{stroke:n}),a)}getIconStyle(t){if(t.icon===!1||!t.iconText&&!t.iconSrc)return!1;const e=Or(this.getGraphicStyle(t),"icon");return Object.assign(eN(t.size,e),e)}getBadgesStyle(t){var e;const n=ty(this.shapeMap,"badge-"),i={};if(Object.keys(n).forEach(u=>{i[u]=!1}),t.badge===!1||!(!((e=t.badges)===null||e===void 0)&&e.length))return i;const{badges:a=[],badgePalette:s,opacity:o=1}=t,A=Jf(t,["badges","badgePalette","opacity"]),l=xb(s),c=Or(this.getGraphicStyle(A),"badge");return a.forEach((u,h)=>{i[h]=Object.assign(Object.assign({backgroundFill:l?l[h%(l==null?void 0:l.length)]:void 0,opacity:o},c),this.getBadgeStyle(u))}),i}getBadgeStyle(t){const e=this.getShape("key"),{placement:n="top",offsetX:i,offsetY:a}=t,s=Jf(t,["placement","offsetX","offsetY"]),o=hx(e.getLocalBounds(),n,i,a,!0);return Object.assign(Object.assign({},o),s)}getPortsStyle(t){var e;const n=this.getPorts(),i={};if(Object.keys(n).forEach(o=>{i[o]=!1}),t.port===!1||!(!((e=t.ports)===null||e===void 0)&&e.length))return i;const a=Or(this.getGraphicStyle(t),"port"),{ports:s=[]}=t;return s.forEach((o,A)=>{const l=o.key||A,c=Object.assign(Object.assign({},a),o);if(lx(c))i[l]=!1;else{const[u,h]=this.getPortXY(t,o);i[l]=Object.assign({transform:[["translate",u,h]]},c)}}),i}getPortXY(t,e){const{placement:n="left"}=e,i=this.getShape("key");return fy(wN(this.context,i),n)}getPorts(){return ty(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return VL(t,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t),i=this.getShape("key");this.upsert("halo",i.constructor,n,e)}drawIconShape(t,e){const n=this.getIconStyle(t);this.upsert("icon",Ob,n,e),iy(this)}drawBadgeShapes(t,e){const n=this.getBadgesStyle(t);Object.keys(n).forEach(i=>{const a=n[i];this.upsert(`badge-${i}`,Uc,a,e)})}drawPortShapes(t,e){const n=this.getPortsStyle(t);Object.keys(n).forEach(i=>{const a=n[i],s=`port-${i}`;this.upsert(s,Js,a,e)})}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",io,n,e)}_drawKeyShape(t,e){return this.drawKeyShape(t,e)}render(t=this.parsedAttributes,e=this){this._drawKeyShape(t,e),this.getShape("key")&&(this.drawHaloShape(t,e),this.drawIconShape(t,e),this.drawBadgeShapes(t,e),this.drawLabelShape(t,e),this.drawPortShapes(t,e))}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&ay(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}Cs.defaultStyleProps={x:0,y:0,size:32,droppable:!0,draggable:!0,port:!0,ports:[],portZIndex:2,portLinkToCenter:!1,badge:!0,badges:[],badgeZIndex:3,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloStrokeOpacity:.25,haloPointerEvents:"none",haloZIndex:-1,icon:!0,iconZIndex:1,label:!0,labelIsBillboard:!0,labelMaxWidth:"200%",labelPlacement:"bottom",labelWordWrap:!1,labelZIndex:0};function wN(r,t){if(!r)return t.getLocalBounds();const e=r.canvas.getLayer(),n=t.cloneNode();ml(n,"hidden"),e.appendChild(n);const i=n.getLocalBounds();return n.destroy(),i}class Bl extends Cs{constructor(t){super(pi({style:Bl.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",Js,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{r:Math.min(...this.getSize(t))/2})}getIconStyle(t){const e=super.getIconStyle(t),{r:n}=this.getShape("key").attributes,i=n*2*No;return e?Object.assign({width:i,height:i},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Zf(t,n,e)}}Bl.defaultStyleProps={size:32};class qf extends Cs{constructor(t){super(t)}get parsedAttributes(){return this.attributes}drawKeyShape(t,e){return this.upsert("key",dl,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{points:this.getPoints(t)})}getIntersectPoint(t,e=!1){var n,i;const{points:a}=this.getShape("key").attributes,s=[+(((n=this.attributes)===null||n===void 0?void 0:n.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return fb(t,s,a,!0,e).point}}class EN extends qf{constructor(t){super(t)}getPoints(t){const[e,n]=this.getSize(t);return eQ(e,n)}}var BN=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class $f extends Bl{constructor(t){super(pi({style:$f.defaultStyleProps},t))}parseOuterR(){const{size:t}=this.parsedAttributes;return Math.min(...ka(t))/2}parseInnerR(){const{innerR:t}=this.parsedAttributes;return gn(t)?parseInt(t)/100*this.parseOuterR():t}drawDonutShape(t,e){const{donuts:n}=t;if(!(n!=null&&n.length))return;const i=n.map(u=>ye(u)?{value:u}:u),a=Or(this.getGraphicStyle(t),"donut"),s=xb(t.donutPalette);if(!s)return;const o=i.reduce((u,h)=>{var d;return u+((d=h.value)!==null&&d!==void 0?d:0)},0),A=this.parseOuterR(),l=this.parseInnerR();let c=0;i.forEach((u,h)=>{const{value:d=0,color:f=s[h%s.length]}=u,g=BN(u,["value","color"]),v=(o===0?1/i.length:d/o)*360;this.upsert(`round${h}`,Pi,Object.assign(Object.assign(Object.assign({},a),{d:CN(A,l,c,c+v),fill:f}),g),e),c+=v})}render(t,e=this){super.render(t,e),this.drawDonutShape(t,e)}}$f.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const tg=(r,t,e,n)=>[r+Math.sin(n)*e,t-Math.cos(n)*e],bN=(r,t,e,n)=>n<=0||e<=n?[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"]]:[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"],["M",r+n,t],["A",n,n,0,1,0,r-n,t],["A",n,n,0,1,0,r+n,t],["Z"]],xN=(r,t,e,n,i,a)=>{const[s,o]=[i/360*2*Math.PI,a/360*2*Math.PI],A=[tg(r,t,n,s),tg(r,t,e,s),tg(r,t,e,o),tg(r,t,n,o)],l=o-s>Math.PI?1:0;return[["M",A[0][0],A[0][1]],["L",A[1][0],A[1][1]],["A",e,e,0,l,1,A[2][0],A[2][1]],["L",A[3][0],A[3][1]],["A",n,n,0,l,0,A[0][0],A[0][1]],["Z"]]},CN=(r=0,t=0,e,n)=>{const[i,a]=[0,0];return Math.abs(e-n)%360<1e-6?bN(i,a,r,t):xN(i,a,r,t,e,n)};class eg extends Cs{constructor(t){super(pi({style:eg.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",eh,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getSize(t);return Object.assign(Object.assign({},e),{rx:n/2,ry:i/2})}getIconStyle(t){const e=super.getIconStyle(t),{rx:n,ry:i}=this.getShape("key").attributes,a=Math.min(+n,+i)*2*No;return e?Object.assign({width:a,height:a},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Zf(t,n,e)}}eg.defaultStyleProps={size:[45,35]};class SN extends qf{constructor(t){super(t)}getOuterR(t){return t.outerR||Math.min(...this.getSize(t))/2}getPoints(t){return rQ(this.getOuterR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getOuterR(t)*No;return e?Object.assign({width:n,height:n},e):!1}}function ao(r,t){if(!{}.hasOwnProperty.call(r,t))throw new TypeError("attempted to use private field on non-instance");return r}var MN=0;function TN(r){return"__private_"+MN+++"_"+r}var _r=TN("renderState"),Lb=function(){function r(t){(0,L.Z)(this,r),this.renderQueue=[],Object.defineProperty(this,_r,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=te(),this.dprMatrix=te(),this.tmpMat4=te(),this.vec3a=Ct(),this.vec3b=Ct(),this.vec3c=Ct(),this.vec3d=Ct(),this.canvasRendererPluginOptions=t}return(0,I.Z)(r,[{key:"apply",value:function(e,n){var i=this;this.context=e;var a=this.context,s=a.config,o=a.camera,A=a.renderingService,l=a.renderingContext,c=a.pathGeneratorFactory,u=s.renderer.getConfig().enableRenderingOptimization;s.renderer.getConfig().enableDirtyCheck=!1,s.renderer.getConfig().enableDirtyRectangleRendering=!1,this.pathGeneratorFactory=c;var h=e.contextService,d=l.root.ownerDocument.defaultView;A.hooks.init.tap(r.tag,function(){var v=h.getDPR(),m=s.width,w=s.height,C=h.getContext();i.clearRect(C,0,0,m*v,w*v,s.background)}),A.hooks.destroy.tap(r.tag,function(){i.renderQueue=[],ao(i,_r)[_r]={restoreStack:[],prevObject:null,currentContext:null}});var f=function(){var m,w=h.getContext(),C=h.getDPR(),F=s.width,Q=s.height,D=i.canvasRendererPluginOptions,K=D.dirtyObjectNumThreshold,G=D.dirtyObjectRatioThreshold,J=A.getStats(),$=J.total,at=J.rendered,At=at/$;i.clearFullScreen=i.clearFullScreenLastFrame||!((m=d.context.renderingPlugins[1])!==null&&m!==void 0&&m.isFirstTimeRenderingFinished)||A.disableDirtyRectangleRendering()||at>K&&At>G,w&&(typeof w.resetTransform=="function"?w.resetTransform():w.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(w,0,0,F*C,Q*C,s.background))},g=function(m,w){for(var C=[m];C.length>0;){var F,Q=C.pop();Q.isVisible()&&!Q.isCulled()&&(u?i.renderDisplayObjectOptimized(Q,w,i.context,ao(i,_r)[_r],n):i.renderDisplayObject(Q,w,i.context,ao(i,_r)[_r],n));for(var D=((F=Q.sortable)===null||F===void 0||(F=F.sorted)===null||F===void 0?void 0:F.length)>0?Q.sortable.sorted:Q.childNodes,K=D.length-1;K>=0;K--)C.push(D[K])}};A.hooks.endFrame.tap(r.tag,function(){if(f(),l.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}u=s.renderer.getConfig().enableRenderingOptimization,ao(i,_r)[_r]={restoreStack:[],prevObject:null,currentContext:ao(i,_r)[_r].currentContext},ao(i,_r)[_r].currentContext.clear(),i.clearFullScreenLastFrame=!1;var v=h.getContext(),m=h.getDPR();if(Dn(i.dprMatrix,[m,m,1]),he(i.vpMatrix,i.dprMatrix,o.getOrthoMatrix()),i.clearFullScreen)u?(v.save(),g(l.root,v),v.restore()):g(l.root,v);else{var w=i.safeMergeAABB(i.mergeDirtyAABBs(i.renderQueue));if(jn.isEmpty(w)){i.renderQueue=[];return}var C=i.convertAABB2Rect(w),F=C.x,Q=C.y,D=C.width,K=C.height,G=me(i.vec3a,[F,Q,0],i.vpMatrix),J=me(i.vec3b,[F+D,Q,0],i.vpMatrix),$=me(i.vec3c,[F,Q+K,0],i.vpMatrix),at=me(i.vec3d,[F+D,Q+K,0],i.vpMatrix),At=Math.min(G[0],J[0],at[0],$[0]),pt=Math.min(G[1],J[1],at[1],$[1]),wt=Math.max(G[0],J[0],at[0],$[0]),bt=Math.max(G[1],J[1],at[1],$[1]),Rt=Math.floor(At),Pt=Math.floor(pt),xt=Math.ceil(wt-At),Ft=Math.ceil(bt-pt);v.save(),i.clearRect(v,Rt,Pt,xt,Ft,s.background),v.beginPath(),v.rect(Rt,Pt,xt,Ft),v.clip(),v.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var _t=s.renderer.getConfig(),Xt=_t.enableDirtyRectangleRenderingDebug;Xt&&d.dispatchEvent(new Vr(Fa.DIRTY_RECTANGLE,{dirtyRect:{x:Rt,y:Pt,width:xt,height:Ft}}));var ie=w.getMin(),le=(0,U.Z)(ie,2),ve=le[0],xe=le[1],Qe=w.getMax(),Re=(0,U.Z)(Qe,2),nn=Re[0],mn=Re[1],sn=l.root.ownerDocument.elementsFromBBox(ve,xe,nn,mn);sn.sort(function(er,kn){return er.sortable.renderOrder-kn.sortable.renderOrder}).forEach(function(er){er&&er.isVisible()&&!er.isCulled()&&i.renderDisplayObject(er,v,i.context,ao(i,_r)[_r],n)}),v.restore(),i.renderQueue.forEach(function(er){i.saveDirtyAABB(er)}),i.renderQueue=[]}ao(i,_r)[_r].restoreStack.forEach(function(){v.restore()}),ao(i,_r)[_r].restoreStack=[]}),A.hooks.render.tap(r.tag,function(v){i.clearFullScreen||i.renderQueue.push(v)})}},{key:"clearRect",value:function(e,n,i,a,s,o){e.clearRect(n,i,a,s),o&&(e.fillStyle=o,e.fillRect(n,i,a,s))}},{key:"renderDisplayObjectOptimized",value:function(e,n,i,a,s){var o=e.nodeName,A=!1,l=!1,c=this.context.styleRendererFactory[o],u=this.pathGeneratorFactory[o],h=e.parsedStyle.clipPath;if(h){A=!a.prevObject||!Kr(h.getWorldTransform(),a.prevObject.getWorldTransform()),A&&(this.applyWorldTransform(n,h),a.prevObject=null);var d=this.pathGeneratorFactory[h.nodeName];d&&(n.save(),l=!0,n.beginPath(),d(n,h.parsedStyle),n.closePath(),n.clip())}if(c){A=!a.prevObject||!Kr(e.getWorldTransform(),a.prevObject.getWorldTransform()),A&&this.applyWorldTransform(n,e);var f=!a.prevObject;if(!f){var g=a.prevObject.nodeName;o===Vt.TEXT?f=g!==Vt.TEXT:o===Vt.IMAGE?f=g!==Vt.IMAGE:f=g===Vt.TEXT||g===Vt.IMAGE}c.applyStyleToContext(n,e,f,a),a.prevObject=e}u&&(n.beginPath(),u(n,e.parsedStyle),o!==Vt.LINE&&o!==Vt.PATH&&o!==Vt.POLYLINE&&n.closePath()),c&&c.drawToContext(n,e,ao(this,_r)[_r],this,s),l&&n.restore(),e.dirty(!1)}},{key:"renderDisplayObject",value:function(e,n,i,a,s){var o=e.nodeName,A=a.restoreStack[a.restoreStack.length-1];A&&!(e.compareDocumentPosition(A)&vr.DOCUMENT_POSITION_CONTAINS)&&(n.restore(),a.restoreStack.pop());var l=this.context.styleRendererFactory[o],c=this.pathGeneratorFactory[o],u=e.parsedStyle.clipPath;if(u){this.applyWorldTransform(n,u);var h=this.pathGeneratorFactory[u.nodeName];h&&(n.save(),a.restoreStack.push(e),n.beginPath(),h(n,u.parsedStyle),n.closePath(),n.clip())}l&&(this.applyWorldTransform(n,e),n.save(),this.applyAttributesToContext(n,e)),c&&(n.beginPath(),c(n,e.parsedStyle),o!==Vt.LINE&&o!==Vt.PATH&&o!==Vt.POLYLINE&&n.closePath()),l&&(l.render(n,e.parsedStyle,e,i,this,s),n.restore()),e.dirty(!1)}},{key:"applyAttributesToContext",value:function(e,n){var i=n.parsedStyle,a=i.stroke,s=i.fill,o=i.opacity,A=i.lineDash,l=i.lineDashOffset;A&&e.setLineDash(A),Pe(l)||(e.lineDashOffset=l),Pe(o)||(e.globalAlpha*=o),!Pe(a)&&!Array.isArray(a)&&!a.isNone&&(e.strokeStyle=n.attributes.stroke),!Pe(s)&&!Array.isArray(s)&&!s.isNone&&(e.fillStyle=n.attributes.fill)}},{key:"convertAABB2Rect",value:function(e){var n=e.getMin(),i=e.getMax(),a=Math.floor(n[0]),s=Math.floor(n[1]),o=Math.ceil(i[0]),A=Math.ceil(i[1]),l=o-a,c=A-s;return{x:a,y:s,width:l,height:c}}},{key:"mergeDirtyAABBs",value:function(e){var n=new jn;return e.forEach(function(i){var a=i.getRenderBounds();n.add(a);var s=i.renderable.dirtyRenderBounds;s&&n.add(s)}),n}},{key:"saveDirtyAABB",value:function(e){var n=e.renderable;n.dirtyRenderBounds||(n.dirtyRenderBounds=new jn);var i=e.getRenderBounds();i&&n.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(e,n,i){i?(He(this.tmpMat4,n.getLocalTransform()),he(this.tmpMat4,i,this.tmpMat4),he(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(He(this.tmpMat4,n.getWorldTransform()),he(this.tmpMat4,this.vpMatrix,this.tmpMat4)),e.setTransform(this.tmpMat4[0],this.tmpMat4[1],this.tmpMat4[4],this.tmpMat4[5],this.tmpMat4[12],this.tmpMat4[13])}},{key:"safeMergeAABB",value:function(){for(var e=new jn,n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return i.forEach(function(s){e.add(s)}),e}}])}();Lb.tag="CanvasRenderer";function ng(r,t,e,n,i,a,s){var o,A;if(r.image.nodeName==="rect"){var l=r.image.parsedStyle,c=l.width,u=l.height;A=n.contextService.getDPR();var h=n.config.offscreenCanvas;o=a.offscreenCanvasCreator.getOrCreateCanvas(h),o.width=c*A,o.height=u*A;var d=a.offscreenCanvasCreator.getOrCreateContext(h),f={restoreStack:[],prevObject:null,currentContext:new Map};r.image.forEach(function(v){i.renderDisplayObject(v,d,n,f,a)}),f.restoreStack.forEach(function(){d.restore()})}var g=s.getOrCreatePatternSync(t,r,e,o,A,t.getGeometryBounds().min,function(){t.dirty(),n.renderingService.dirty()});return g}function rg(r,t,e,n){var i;if(r.type===vs.LinearGradient||r.type===vs.RadialGradient){var a=t.getGeometryBounds(),s=a&&a.halfExtents[0]*2||1,o=a&&a.halfExtents[1]*2||1,A=a&&a.min||[0,0];i=n.getOrCreateGradient((0,H.Z)((0,H.Z)({type:r.type},r.value),{},{min:A,width:s,height:o}),e)}return i}var ig=["shadowBlur","shadowOffsetX","shadowOffsetY"],Nb=["lineCap","lineJoin","miterLimit"],Wr={globalAlpha:1,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",filter:"none",globalCompositeOperation:"source-over",strokeStyle:"#000",strokeOpacity:1,lineWidth:1,lineDash:[],lineDashOffset:0,lineCap:"butt",lineJoin:"miter",miterLimit:10,fillStyle:"#000",fillOpacity:1},kb={};function Cr(r,t,e,n){var i=n.has(t)?n.get(t):Wr[t];return i!==e&&(t==="lineDash"?r.setLineDash(e):r[t]=e,n.set(t,e)),i}var FN=function(){function r(t){(0,L.Z)(this,r),this.imagePool=t}return(0,I.Z)(r,[{key:"applyAttributesToContext",value:function(e,n){}},{key:"render",value:function(e,n,i,a,s,o){}},{key:"applyCommonStyleToContext",value:function(e,n,i,a){var s=i?kb:a.prevObject.parsedStyle,o=n.parsedStyle;(i||o.opacity!==s.opacity)&&Cr(e,"globalAlpha",Pe(o.opacity)?Wr.globalAlpha:o.opacity,a.currentContext),(i||o.blend!==s.blend)&&Cr(e,"globalCompositeOperation",Pe(o.blend)?Wr.globalCompositeOperation:o.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,n,i,a){var s=i?kb:a.prevObject.parsedStyle,o=n.parsedStyle,A=o.lineWidth,l=A===void 0?Wr.lineWidth:A,c=o.fill&&!o.fill.isNone,u=o.stroke&&!o.stroke.isNone&&l>0;if(u){if(i||n.attributes.stroke!==a.prevObject.attributes.stroke){var h=!Pe(o.stroke)&&!Array.isArray(o.stroke)&&!o.stroke.isNone?n.attributes.stroke:Wr.strokeStyle;Cr(e,"strokeStyle",h,a.currentContext)}(i||o.lineWidth!==s.lineWidth)&&Cr(e,"lineWidth",Pe(o.lineWidth)?Wr.lineWidth:o.lineWidth,a.currentContext),(i||o.lineDash!==s.lineDash)&&Cr(e,"lineDash",o.lineDash||Wr.lineDash,a.currentContext),(i||o.lineDashOffset!==s.lineDashOffset)&&Cr(e,"lineDashOffset",Pe(o.lineDashOffset)?Wr.lineDashOffset:o.lineDashOffset,a.currentContext);for(var d=0;d<Nb.length;d++){var f=Nb[d];(i||o[f]!==s[f])&&Cr(e,f,Pe(o[f])?Wr[f]:o[f],a.currentContext)}}if(c&&(i||n.attributes.fill!==a.prevObject.attributes.fill)){var g=!Pe(o.fill)&&!Array.isArray(o.fill)&&!o.fill.isNone?n.attributes.fill:Wr.fillStyle;Cr(e,"fillStyle",g,a.currentContext)}}},{key:"applyStyleToContext",value:function(e,n,i,a){var s=n.nodeName;this.applyCommonStyleToContext(e,n,i,a),s===Vt.IMAGE||this.applyStrokeFillStyleToContext(e,n,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,n,i,a){var s=n.parsedStyle;if(i){Cr(e,"shadowColor",s.shadowColor.toString(),a.currentContext);for(var o=0;o<ig.length;o++){var A=ig[o];Cr(e,A,s[A]||Wr[A],a.currentContext)}}s.filter&&s.filter.length&&Cr(e,"filter",n.attributes.filter,a.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(e,n,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n){Cr(e,"shadowColor",Wr.shadowColor,a.currentContext);for(var o=0;o<ig.length;o++){var A=ig[o];Cr(e,A,Wr[A],a.currentContext)}}if(i)if(n&&s){var l=e.filter;!Pe(l)&&l.indexOf("drop-shadow")>-1&&Cr(e,"filter",l.replace(/drop-shadow\([^)]*\)/,"").trim()||Wr.filter,a.currentContext)}else Cr(e,"filter",Wr.filter,a.currentContext)}},{key:"fillToContext",value:function(e,n,i,a,s){var o=this,A=n.parsedStyle,l=A.fill,c=A.fillRule,u=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(d){var f=Cr(e,"fillStyle",rg(d,n,e,o.imagePool),i.currentContext);u=u!=null?u:f,c?e.fill(c):e.fill()});else{if(Bo(l)){var h=ng(l,n,e,n.ownerDocument.defaultView.context,a,s,this.imagePool);h&&(e.fillStyle=h,u=!0)}c?e.fill(c):e.fill()}u!==null&&Cr(e,"fillStyle",u,i.currentContext)}},{key:"strokeToContext",value:function(e,n,i,a,s){var o=this,A=n.parsedStyle.stroke,l=null;if(Array.isArray(A)&&A.length>0)A.forEach(function(h){var d=Cr(e,"strokeStyle",rg(h,n,e,o.imagePool),i.currentContext);l=l!=null?l:d,e.stroke()});else{if(Bo(A)){var c=ng(A,n,e,n.ownerDocument.defaultView.context,a,s,this.imagePool);if(c){var u=Cr(e,"strokeStyle",c,i.currentContext);l=l!=null?l:u}}e.stroke()}l!==null&&Cr(e,"strokeStyle",l,i.currentContext)}},{key:"drawToContext",value:function(e,n,i,a,s){var o,A=n.nodeName,l=n.parsedStyle,c=l.opacity,u=c===void 0?Wr.globalAlpha:c,h=l.fillOpacity,d=h===void 0?Wr.fillOpacity:h,f=l.strokeOpacity,g=f===void 0?Wr.strokeOpacity:f,v=l.lineWidth,m=v===void 0?Wr.lineWidth:v,w=l.fill&&!l.fill.isNone,C=l.stroke&&!l.stroke.isNone&&m>0;if(!(!w&&!C)){var F=!Pe(l.shadowColor)&&l.shadowBlur>0,Q=l.shadowType==="inner",D=((o=l.fill)===null||o===void 0?void 0:o.alpha)===0,K=!!(l.filter&&l.filter.length),G=F&&C&&(A===Vt.PATH||A===Vt.LINE||A===Vt.POLYLINE||D||Q),J=null;if(w){G||this.applyShadowAndFilterStyleToContext(e,n,F,i);var $=u*d;J=Cr(e,"globalAlpha",$,i.currentContext),this.fillToContext(e,n,i,a,s),G||this.clearShadowAndFilterStyleForContext(e,F,K,i)}if(C){var at=!1,At=u*g,pt=Cr(e,"globalAlpha",At,i.currentContext);if(J=w?J:pt,G&&(this.applyShadowAndFilterStyleToContext(e,n,F,i),at=!0,Q)){var wt=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,n,i,a,s),e.globalCompositeOperation=wt,this.clearShadowAndFilterStyleForContext(e,F,K,i,!0)}this.strokeToContext(e,n,i,a,s),at&&this.clearShadowAndFilterStyleForContext(e,F,K,i)}J!==null&&Cr(e,"globalAlpha",J,i.currentContext)}}}])}(),Ss=function(r){function t(){return(0,L.Z)(this,t),(0,P.Z)(this,t,arguments)}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"render",value:function(n,i,a,s,o,A){var l=i.fill,c=i.fillRule,u=i.opacity,h=u===void 0?1:u,d=i.fillOpacity,f=d===void 0?1:d,g=i.stroke,v=i.strokeOpacity,m=v===void 0?1:v,w=i.lineWidth,C=w===void 0?1:w,F=i.lineCap,Q=i.lineJoin,D=i.shadowType,K=i.shadowColor,G=i.shadowBlur,J=i.filter,$=i.miterLimit,at=l&&!l.isNone,At=g&&!g.isNone&&C>0,pt=(l==null?void 0:l.alpha)===0,wt=!!(J&&J.length),bt=!Pe(K)&&G>0,Rt=a.nodeName,Pt=D==="inner",xt=At&&bt&&(Rt===Vt.PATH||Rt===Vt.LINE||Rt===Vt.POLYLINE||pt||Pt);at&&(n.globalAlpha=h*f,xt||ag(a,n,bt),Qb(n,a,l,c,s,o,A,this.imagePool),xt||this.clearShadowAndFilter(n,wt,bt)),At&&(n.globalAlpha=h*m,n.lineWidth=C,Pe($)||(n.miterLimit=$),Pe(F)||(n.lineCap=F),Pe(Q)||(n.lineJoin=Q),xt&&(Pt&&(n.globalCompositeOperation="source-atop"),ag(a,n,!0),Pt&&(sy(n,a,g,s,o,A,this.imagePool),n.globalCompositeOperation=Wr.globalCompositeOperation,this.clearShadowAndFilter(n,wt,!0))),sy(n,a,g,s,o,A,this.imagePool))}},{key:"clearShadowAndFilter",value:function(n,i,a){if(a&&(n.shadowColor="transparent",n.shadowBlur=0),i){var s=n.filter;!Pe(s)&&s.indexOf("drop-shadow")>-1&&(n.filter=s.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(FN);function ag(r,t,e){var n=r.parsedStyle,i=n.filter,a=n.shadowColor,s=n.shadowBlur,o=n.shadowOffsetX,A=n.shadowOffsetY;i&&i.length&&(t.filter=r.style.filter),e&&(t.shadowColor=a.toString(),t.shadowBlur=s||0,t.shadowOffsetX=o||0,t.shadowOffsetY=A||0)}function Qb(r,t,e,n,i,a,s,o){var A=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(e)?e.forEach(function(l){r.fillStyle=rg(l,t,r,o),A||(n?r.fill(n):r.fill())}):(Bo(e)&&(r.fillStyle=ng(e,t,r,i,a,s,o)),A||(n?r.fill(n):r.fill()))}function sy(r,t,e,n,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(e)?e.forEach(function(A){r.strokeStyle=rg(A,t,r,s),o||r.stroke()}):(Bo(e)&&(r.strokeStyle=ng(e,t,r,n,i,a,s)),o||r.stroke())}function ON(r,t){var e=(0,U.Z)(r,4),n=e[0],i=e[1],a=e[2],s=e[3],o=(0,U.Z)(t,4),A=o[0],l=o[1],c=o[2],u=o[3],h=Math.max(n,A),d=Math.max(i,l),f=Math.min(n+a,A+c),g=Math.min(i+s,l+u);return f<=h||g<=d?null:[h,d,f-h,g-d]}function IN(r,t){var e=me(Ct(),[r[0],r[1],0],t),n=me(Ct(),[r[0]+r[2],r[1],0],t),i=me(Ct(),[r[0],r[1]+r[3],0],t),a=me(Ct(),[r[0]+r[2],r[1]+r[3],0],t);return[Math.min(e[0],n[0],i[0],a[0]),Math.min(e[1],n[1],i[1],a[1]),Math.max(e[0],n[0],i[0],a[0])-Math.min(e[0],n[0],i[0],a[0]),Math.max(e[1],n[1],i[1],a[1])-Math.min(e[1],n[1],i[1],a[1])]}var Ub=function(r){function t(){return(0,L.Z)(this,t),(0,P.Z)(this,t,arguments)}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"renderDownSampled",value:function(n,i,a,s){var o=s.src,A=s.imageCache;if(!A.downSampled){this.imagePool.createDownSampledImage(o,a).then(function(){a.ownerDocument&&(a.dirty(),a.ownerDocument.defaultView.context.renderingService.dirty())}).catch(function(l){console.error(l)});return}n.drawImage(A.downSampled,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}},{key:"renderTile",value:function(n,i,a,s){var o=s.src,A=s.imageCache,l=s.imageRect,c=s.drawRect,u=A.size,h=n.getTransform(),d=h.a,f=h.b,g=h.c,v=h.d,m=h.e,w=h.f;if(n.resetTransform(),!(A!=null&&A.gridSize)){this.imagePool.createImageTiles(o,[],function(){a.ownerDocument&&(a.dirty(),a.ownerDocument.defaultView.context.renderingService.dirty())},a).catch(function(bt){console.error(bt)});return}for(var C=[u[0]/l[2],u[1]/l[3]],F=[A.tileSize[0]/C[0],A.tileSize[1]/C[1]],Q=[Math.floor((c[0]-l[0])/F[0]),Math.ceil((c[0]+c[2]-l[0])/F[0])],D=Q[0],K=Q[1],G=[Math.floor((c[1]-l[1])/F[1]),Math.ceil((c[1]+c[3]-l[1])/F[1])],J=G[0],$=G[1],at=J;at<=$;at++)for(var At=D;At<=K;At++){var pt=A.tiles[at][At];if(pt){var wt=[Math.floor(l[0]+pt.tileX*F[0]),Math.floor(l[1]+pt.tileY*F[1]),Math.ceil(F[0]),Math.ceil(F[1])];n.drawImage(pt.data,wt[0],wt[1],wt[2],wt[3])}}n.setTransform(d,f,g,v,m,w)}},{key:"render",value:function(n,i,a){var s=i.x,o=s===void 0?0:s,A=i.y,l=A===void 0?0:A,c=i.width,u=i.height,h=i.src,d=i.shadowColor,f=i.shadowBlur,g=this.imagePool.getImageSync(h,a),v=g==null?void 0:g.img,m=c,w=u;if(v){m||(m=v.width),w||(w=v.height);var C=!Pe(d)&&f>0;ag(a,n,C);try{var F=a.ownerDocument.defaultView.getContextService().getDomElement(),Q=F.width,D=F.height,K=n.getTransform(),G=K.a,J=K.b,$=K.c,at=K.d,At=K.e,pt=K.f,wt=je(G,$,0,0,J,at,0,0,0,0,1,0,At,pt,0,1),bt=IN([o,l,m,w],wt),Rt=ON([0,0,Q,D],bt);if(!Rt)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){t.renderFull(n,i,a,{image:v,drawRect:[o,l,m,w]});return}var Pt=bt[2]/g.size[0];if(Pt<(g.downSamplingRate||.5)){this.renderDownSampled(n,i,a,{src:h,imageCache:g,drawRect:[o,l,m,w]});return}if(!ImagePool.isSupportTile){t.renderFull(n,i,a,{image:v,drawRect:[o,l,m,w]});return}this.renderTile(n,i,a,{src:h,imageCache:g,imageRect:bt,drawRect:Rt})}catch(xt){}}}},{key:"drawToContext",value:function(n,i,a,s,o){this.render(n,i.parsedStyle,i)}}],[{key:"renderFull",value:function(n,i,a,s){n.drawImage(s.image,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}}])}(Ss),Pb=function(r){function t(){return(0,L.Z)(this,t),(0,P.Z)(this,t,arguments)}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"render",value:function(n,i,a,s,o,A){a.getBounds();var l=i.lineWidth,c=l===void 0?1:l,u=i.textAlign,h=u===void 0?"start":u,d=i.textBaseline,f=d===void 0?"alphabetic":d,g=i.lineJoin,v=g===void 0?"miter":g,m=i.miterLimit,w=m===void 0?10:m,C=i.letterSpacing,F=C===void 0?0:C,Q=i.stroke,D=i.fill,K=i.fillRule,G=i.fillOpacity,J=G===void 0?1:G,$=i.strokeOpacity,at=$===void 0?1:$,At=i.opacity,pt=At===void 0?1:At,wt=i.metrics,bt=i.x,Rt=bt===void 0?0:bt,Pt=i.y,xt=Pt===void 0?0:Pt,Ft=i.dx,_t=i.dy,Xt=i.shadowColor,ie=i.shadowBlur,le=i.textDecorationLine,ve=wt.font,xe=wt.lines,Qe=wt.height,Re=wt.lineHeight,nn=wt.lineMetrics;n.font=ve,n.lineWidth=c,n.textAlign=h==="middle"?"center":h;var mn=f;mn==="alphabetic"&&(mn="bottom"),n.lineJoin=v,Pe(w)||(n.miterLimit=w);var sn=xt;f==="middle"?sn+=-Qe/2-Re/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?sn+=-Qe:(f==="top"||f==="hanging")&&(sn+=-Re);var er=Rt+(Ft||0);sn+=_t||0,xe.length===1&&(mn==="bottom"?(mn="middle",sn-=.5*Qe):mn==="top"&&(mn="middle",sn+=.5*Qe)),n.textBaseline=mn;var kn=!Pe(Xt)&&ie>0;ag(a,n,kn);for(var Cn=0;Cn<xe.length;Cn++){var gr=c/2+er;sn+=Re,!Pe(Q)&&!Q.isNone&&c&&this.drawLetterSpacing(n,a,xe[Cn],nn[Cn],h,gr,sn,F,D,K,J,Q,at,pt,!0,s,o,A),Pe(D)||this.drawLetterSpacing(n,a,xe[Cn],nn[Cn],h,gr,sn,F,D,K,J,Q,at,pt,!1,s,o,A)}le&&le!=="none"&&this.drawTextDecorations(n,i,a,xe,Re,er,xt+(_t||0),s,o,A)}},{key:"drawLetterSpacing",value:function(n,i,a,s,o,A,l,c,u,h,d,f,g,v,m,w,C,F){if(c===0){m?this.strokeText(n,i,a,A,l,f,g,w,C,F):this.fillText(n,i,a,A,l,u,h,d,v,w,C,F);return}var Q=n.textAlign;n.textAlign="left";var D=A;o==="center"||o==="middle"?D=A-s.width/2:(o==="right"||o==="end")&&(D=A-s.width);for(var K=Array.from(a),G=n.measureText(a).width,J=0,$=0;$<K.length;++$){var at=K[$];m?this.strokeText(n,i,at,D,l,f,g,w,C,F):this.fillText(n,i,at,D,l,u,h,d,v,w,C,F),J=n.measureText(a.substring($+1)).width,D+=G-J+c,G=J}n.textAlign=Q}},{key:"fillText",value:function(n,i,a,s,o,A,l,c,u,h,d,f){Qb(n,i,A,l,h,d,f,this.imagePool,!0);var g,v=!Pe(c)&&c!==1;v&&(g=n.globalAlpha,n.globalAlpha=c*u),n.fillText(a,s,o),v&&(n.globalAlpha=g)}},{key:"strokeText",value:function(n,i,a,s,o,A,l,c,u,h){sy(n,i,A,c,u,h,this.imagePool,!0);var d,f=!Pe(l)&&l!==1;f&&(d=n.globalAlpha,n.globalAlpha=l),n.strokeText(a,s,o),f&&(n.globalAlpha=d)}},{key:"drawTextDecorations",value:function(n,i,a,s,o,A,l,c,u,h){var d=i.textDecorationLine,f=i.textDecorationColor,g=i.textDecorationStyle,v=i.textDecorationThickness,m=v===void 0?1:v,w=i.textAlign,C=w===void 0?"start":w,F=i.lineWidth,Q=F===void 0?1:F,D=i.metrics;if(!(!d||d==="none")){var K=D.lineMetrics,G=d.split(" ");switch(n.lineWidth=m,f&&(n.strokeStyle="rgba(".concat(f.r,", ").concat(f.g,", ").concat(f.b,", ").concat(f.alpha,")")),g){case"dashed":n.setLineDash([5,5]);break;case"dotted":n.setLineDash([2,2]);break;case"wavy":n.setLineDash([]);break;default:n.setLineDash([]);break}var J=l,$=i.textBaseline,at=$===void 0?"alphabetic":$;at==="middle"?J+=-D.height/2-o/2:at==="bottom"||at==="alphabetic"||at==="ideographic"?J+=-D.height:(at==="top"||at==="hanging")&&(J+=-o);for(var At=0;At<s.length;At++){J+=o;var pt=K[At];if(pt){var wt=Q/2,bt=A,Rt=A+pt.width;C==="center"||C==="middle"?(bt=A-pt.width/2,Rt=A+pt.width/2):(C==="right"||C==="end")&&(bt=A-pt.width,Rt=A),bt+=wt,Rt+=wt;var Pt=(0,Gs.Z)(G),xt;try{for(Pt.s();!(xt=Pt.n()).done;){var Ft=xt.value,_t=J;switch(Ft){case"underline":_t+=2;break;case"overline":_t-=o-2;break;case"line-through":_t-=o/2;break;default:continue}g==="wavy"?this.drawWavyLine(n,bt,Rt,_t):(n.beginPath(),n.moveTo(bt,_t),n.lineTo(Rt,_t),n.stroke())}}catch(Xt){Pt.e(Xt)}finally{Pt.f()}}}n.setLineDash([])}}},{key:"drawWavyLine",value:function(n,i,a,s){var o=2,A=10,l=Math.floor((a-i)/A);n.beginPath(),n.moveTo(i,s);for(var c=0;c<l;c++){var u=i+c*A+A/4,h=s+o,d=i+c*A+A/2,f=s;n.quadraticCurveTo(u,h,d,f);var g=i+c*A+A*3/4,v=s-o,m=i+(c+1)*A,w=s;n.quadraticCurveTo(g,v,m,w)}n.stroke()}},{key:"drawToContext",value:function(n,i,a,s,o){this.render(n,i.parsedStyle,i,i.ownerDocument.defaultView.context,s,o)}}])}(Ss),Db=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),e=(0,P.Z)(this,t),e.name="canvas-renderer",e.options=n,e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){var n,i=(0,H.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,s=new Ss(a),o=(n={},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(n,Vt.CIRCLE,s),Vt.ELLIPSE,s),Vt.RECT,s),Vt.IMAGE,new Ub(a)),Vt.TEXT,new Pb(a)),Vt.LINE,s),Vt.POLYLINE,s),Vt.POLYGON,s),Vt.PATH,s),Vt.GROUP,void 0),(0,we.Z)((0,we.Z)((0,we.Z)(n,Vt.HTML,void 0),Vt.MESH,void 0),Vt.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new Lb(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(ls),W9=Object.freeze({__proto__:null,CircleRenderer:Ss,DefaultRenderer:Ss,EllipseRenderer:Ss,ImageRenderer:Ub,LineRenderer:Ss,PathRenderer:Ss,Plugin:Db,PolygonRenderer:Ss,PolylineRenderer:Ss,RectRenderer:Ss,TextRenderer:Pb}),LN=Ct(),NN=Ct(),kN=Ct(),QN=te(),Rb=function(){function r(){var t=this;(0,L.Z)(this,r),this.isHit=function(e,n,i,a){var s=t.context.pointInPathPickerFactory[e.nodeName];if(s){var o=on(QN,i),A=me(NN,de(kN,n[0],n[1],0),o);if(s(e,new ii(A[0],A[1]),a,t.isPointInPath,t.context,t.runtime))return!0}return!1},this.isPointInPath=function(e,n){var i=t.runtime.offscreenCanvasCreator.getOrCreateContext(t.context.config.offscreenCanvas),a=t.context.pathGeneratorFactory[e.nodeName];return a&&(i.beginPath(),a(i,e.parsedStyle),i.closePath()),i.isPointInPath(n.x,n.y)}}return(0,I.Z)(r,[{key:"apply",value:function(e,n){var i,a=this,s=e.renderingService,o=e.renderingContext;this.context=e,this.runtime=n;var A=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;s.hooks.pick.tapPromise(r.tag,function(){var l=(0,Wa.Z)((0,ri.Z)().mark(function c(u){return(0,ri.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.abrupt("return",a.pick(A,u));case 1:case"end":return h.stop()}},c)}));return function(c){return l.apply(this,arguments)}}()),s.hooks.pickSync.tap(r.tag,function(l){return a.pick(A,l)})}},{key:"pick",value:function(e,n){var i=n.topmost,a=n.position,s=a.x,o=a.y,A=de(LN,s,o,0),l=e.elementsFromBBox(A[0],A[1],A[0],A[1]),c=[],u=(0,Gs.Z)(l),h;try{for(u.s();!(h=u.n()).done;){var d=h.value,f=d.getWorldTransform(),g=this.isHit(d,A,f,!1);if(g){var v=fE(d);if(v){var m=v.parsedStyle.clipPath,w=this.isHit(m,A,m.getWorldTransform(),!0);if(w){if(i)return n.picked=[d],n;c.push(d)}}else{if(i)return n.picked=[d],n;c.push(d)}}}}catch(C){u.e(C)}finally{u.f()}return n.picked=c,n}}])}();Rb.tag="CanvasPicker";function UN(r,t,e){var n=r.parsedStyle,i=n.cx,a=i===void 0?0:i,s=n.cy,o=s===void 0?0:s,A=n.r,l=n.fill,c=n.stroke,u=n.lineWidth,h=u===void 0?1:u,d=n.increasedLineWidthForHitTesting,f=d===void 0?0:d,g=n.pointerEvents,v=g===void 0?"auto":g,m=(h+f)/2,w=gi(a,o,t.x,t.y),C=sl(v,l,c),F=(0,U.Z)(C,2),Q=F[0],D=F[1];return Q&&D||e?w<=A+m:Q?w<=A:D?w>=A-m&&w<=A+m:!1}function sg(r,t,e,n){return r/(e*e)+t/(n*n)}function PN(r,t,e){var n=r.parsedStyle,i=n.cx,a=i===void 0?0:i,s=n.cy,o=s===void 0?0:s,A=n.rx,l=n.ry,c=n.fill,u=n.stroke,h=n.lineWidth,d=h===void 0?1:h,f=n.increasedLineWidthForHitTesting,g=f===void 0?0:f,v=n.pointerEvents,m=v===void 0?"auto":v,w=t.x,C=t.y,F=sl(m,c,u),Q=(0,U.Z)(F,2),D=Q[0],K=Q[1],G=(d+g)/2,J=(w-a)*(w-a),$=(C-o)*(C-o);return D&&K||e?sg(J,$,A+G,l+G)<=1:D?sg(J,$,A,l)<=1:K?sg(J,$,A-G,l-G)>=1&&sg(J,$,A+G,l+G)<=1:!1}function bl(r,t,e,n,i,a){return i>=r&&i<=r+e&&a>=t&&a<=t+n}function DN(r,t,e,n,i,a,s){var o=i/2;return bl(r-o,t-o,e,i,a,s)||bl(r+e-o,t-o,i,n,a,s)||bl(r+o,t+n-o,e,i,a,s)||bl(r-o,t+o,i,n,a,s)}function og(r,t,e,n,i,a,s,o){var A=(Math.atan2(o-t,s-r)+Math.PI*2)%(Math.PI*2),l={x:r+e*Math.cos(A),y:t+e*Math.sin(A)};return gi(l.x,l.y,s,o)<=a/2}function BA(r,t,e,n,i,a,s){var o=Math.min(r,e),A=Math.max(r,e),l=Math.min(t,n),c=Math.max(t,n),u=i/2;return a>=o-u&&a<=A+u&&s>=l-u&&s<=c+u?XA(r,t,e,n,a,s)<=i/2:!1}function _b(r,t,e,n,i){var a=r.length;if(a<2)return!1;for(var s=0;s<a-1;s++){var o=r[s][0],A=r[s][1],l=r[s+1][0],c=r[s+1][1];if(BA(o,A,l,c,t,e,n))return!0}if(i){var u=r[0],h=r[a-1];if(BA(u[0],u[1],h[0],h[1],t,e,n))return!0}return!1}var RN=1e-6;function oy(r){return Math.abs(r)<RN?0:r<0?-1:1}function _N(r,t,e){return(e[0]-r[0])*(t[1]-r[1])===(t[0]-r[0])*(e[1]-r[1])&&Math.min(r[0],t[0])<=e[0]&&e[0]<=Math.max(r[0],t[0])&&Math.min(r[1],t[1])<=e[1]&&e[1]<=Math.max(r[1],t[1])}function Hb(r,t,e){var n=!1,i=r.length;if(i<=2)return!1;for(var a=0;a<i;a++){var s=r[a],o=r[(a+1)%i];if(_N(s,o,[t,e]))return!0;oy(s[1]-e)>0!=oy(o[1]-e)>0&&oy(t-(e-s[1])*(s[0]-o[0])/(s[1]-o[1])-s[0])<0&&(n=!n)}return n}function Gb(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];if(n=Hb(a,t,e),n)break}return n}function HN(r,t,e){var n=r.parsedStyle,i=n.x1,a=n.y1,s=n.x2,o=n.y2,A=n.lineWidth,l=A===void 0?1:A,c=n.increasedLineWidthForHitTesting,u=c===void 0?0:c,h=n.pointerEvents,d=h===void 0?"auto":h,f=n.fill,g=n.stroke,v=sl(d,f,g),m=(0,U.Z)(v,2),w=m[1];return!w&&!e||!l?!1:BA(i,a,s,o,l+u,t.x,t.y)}function GN(r,t,e,n,i){for(var a=!1,s=t/2,o=0;o<r.length;o++){var A=r[o],l=A.currentPoint,c=A.params,u=A.prePoint,h=A.box;if(!(h&&!bl(h.x-s,h.y-s,h.width+t,h.height+t,e,n)))switch(A.command){case"L":case"Z":if(a=BA(u[0],u[1],l[0],l[1],t,e,n),a)return!0;break;case"Q":var d=gp(u[0],u[1],c[1],c[2],c[3],c[4],e,n);if(a=d<=t/2,a)return!0;break;case"C":var f=Nu(u[0],u[1],c[1],c[2],c[3],c[4],c[5],c[6],e,n,i);if(a=f<=t/2,a)return!0;break;case"A":A.cubicParams||(A.cubicParams=nc(u[0],u[1],c[1],c[2],c[3],c[4],c[5],c[6],c[7],void 0));for(var g=A.cubicParams,v=u,m=0;m<g.length;m+=6){var w=Nu(v[0],v[1],g[m],g[m+1],g[m+2],g[m+3],g[m+4],g[m+5],e,n,i);if(v=[g[m+4],g[m+5]],a=w<=t/2,a)return!0}break}}return a}function KN(r,t,e,n,i,a){var s=r.parsedStyle,o=s.lineWidth,A=o===void 0?1:o,l=s.increasedLineWidthForHitTesting,c=l===void 0?0:l,u=s.stroke,h=s.fill,d=s.d,f=s.pointerEvents,g=f===void 0?"auto":f,v=d.segments,m=d.hasArc,w=d.polylines,C=d.polygons,F=sl(g,(C==null?void 0:C.length)&&h,u),Q=(0,U.Z)(F,2),D=Q[0],K=Q[1],G=An(r),J=!1;return D||e?(m?J=n(r,t):J=Gb(C,t.x,t.y)||Gb(w,t.x,t.y),J):((K||e)&&(J=GN(v,A+c,t.x,t.y,G)),J)}function zN(r,t,e){var n=r.parsedStyle,i=n.stroke,a=n.fill,s=n.lineWidth,o=s===void 0?1:s,A=n.increasedLineWidthForHitTesting,l=A===void 0?0:A,c=n.points,u=n.pointerEvents,h=u===void 0?"auto":u,d=sl(h,a,i),f=(0,U.Z)(d,2),g=f[0],v=f[1],m=!1;return(v||e)&&(m=_b(c.points,o+l,t.x,t.y,!0)),!m&&(g||e)&&(m=Hb(c.points,t.x,t.y)),m}function VN(r,t,e){var n=r.parsedStyle,i=n.lineWidth,a=i===void 0?1:i,s=n.increasedLineWidthForHitTesting,o=s===void 0?0:s,A=n.points,l=n.pointerEvents,c=l===void 0?"auto":l,u=n.fill,h=n.stroke,d=sl(c,u,h),f=(0,U.Z)(d,2),g=f[1];return!g&&!e||!a?!1:_b(A.points,a+o,t.x,t.y,!1)}function WN(r,t,e,n,i){var a=r.parsedStyle,s=a.radius,o=a.fill,A=a.stroke,l=a.lineWidth,c=l===void 0?1:l,u=a.increasedLineWidthForHitTesting,h=u===void 0?0:u,d=a.x,f=d===void 0?0:d,g=a.y,v=g===void 0?0:g,m=a.width,w=a.height,C=a.pointerEvents,F=C===void 0?"auto":C,Q=sl(F,o,A),D=(0,U.Z)(Q,2),K=D[0],G=D[1],J=s&&s.some(function(pt){return pt!==0}),$=c+h;if(J){var At=!1;return(G||e)&&(At=ZN(f,v,m,w,s.map(function(pt){return hr(pt,0,Math.min(Math.abs(m)/2,Math.abs(w)/2))}),$,t.x,t.y)),!At&&(K||e)&&(At=n(r,t)),At}else{var at=$/2;if(K&&G||e)return bl(f-at,v-at,m+at,w+at,t.x,t.y);if(K)return bl(f,v,m,w,t.x,t.y);if(G)return DN(f,v,m,w,$,t.x,t.y)}return!1}function ZN(r,t,e,n,i,a,s,o){var A=(0,U.Z)(i,4),l=A[0],c=A[1],u=A[2],h=A[3];return BA(r+l,t,r+e-c,t,a,s,o)||BA(r+e,t+c,r+e,t+n-u,a,s,o)||BA(r+e-u,t+n,r+h,t+n,a,s,o)||BA(r,t+n-h,r,t+l,a,s,o)||og(r+e-c,t+c,c,1.5*Math.PI,2*Math.PI,a,s,o)||og(r+e-u,t+n-u,u,0,.5*Math.PI,a,s,o)||og(r+h,t+n-h,h,.5*Math.PI,Math.PI,a,s,o)||og(r+l,t+l,l,Math.PI,1.5*Math.PI,a,s,o)}function jN(r,t,e,n,i,a){var s=r.parsedStyle,o=s.pointerEvents,A=o===void 0?"auto":o,l=s.x,c=l===void 0?0:l,u=s.y,h=u===void 0?0:u,d=s.width,f=s.height;if(A==="non-transparent-pixel"){var g=i.config.offscreenCanvas,v=a.offscreenCanvasCreator.getOrCreateCanvas(g),m=a.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});v.width=d,v.height=f,i.defaultStyleRendererFactory[Vt.IMAGE].render(m,(0,H.Z)((0,H.Z)({},r.parsedStyle),{},{x:0,y:0}),r,void 0,void 0,void 0);var w=m.getImageData(t.x-c,t.y-h,1,1).data;return w.every(function(C){return C!==0})}return!0}function YN(r,t,e,n){var i=r.getGeometryBounds();return t.x>=i.min[0]&&t.y>=i.min[1]&&t.x<=i.max[0]&&t.y<=i.max[1]}var Kb=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="canvas-picker",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){var n,i=(n={},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(n,Vt.CIRCLE,UN),Vt.ELLIPSE,PN),Vt.RECT,WN),Vt.LINE,HN),Vt.POLYLINE,VN),Vt.POLYGON,zN),Vt.PATH,KN),Vt.TEXT,YN),Vt.GROUP,null),Vt.IMAGE,jN),(0,we.Z)((0,we.Z)(n,Vt.HTML,null),Vt.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new Rb)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(ls),Z9=Object.freeze({__proto__:null,Plugin:Kb});function XN(r,t){var e=t.cx,n=e===void 0?0:e,i=t.cy,a=i===void 0?0:i,s=t.r;r.arc(n,a,s,0,Math.PI*2,!1)}function JN(r,t){var e=t.cx,n=e===void 0?0:e,i=t.cy,a=i===void 0?0:i,s=t.rx,o=t.ry;if(r.ellipse)r.ellipse(n,a,s,o,0,0,Math.PI*2,!1);else{var A=s>o?s:o,l=s>o?1:s/o,c=s>o?o/s:1;r.save(),r.scale(l,c),r.arc(n,a,A,0,Math.PI*2)}}function qN(r,t){var e=t.x1,n=t.y1,i=t.x2,a=t.y2,s=t.markerStart,o=t.markerEnd,A=t.markerStartOffset,l=t.markerEndOffset,c=0,u=0,h=0,d=0,f=0,g,v;s&&Nn(s)&&A&&(g=i-e,v=a-n,f=Math.atan2(v,g),c=Math.cos(f)*(A||0),u=Math.sin(f)*(A||0)),o&&Nn(o)&&l&&(g=e-i,v=n-a,f=Math.atan2(v,g),h=Math.cos(f)*(l||0),d=Math.sin(f)*(l||0)),r.moveTo(e+c,n+u),r.lineTo(i+h,a+d)}function $N(r,t){var e=t.markerStart,n=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,s=t.d,o=s.absolutePath,A=s.segments,l=0,c=0,u=0,h=0,d=0,f,g;if(e&&Nn(e)&&i){var v=e.parentNode.getStartTangent(),m=(0,U.Z)(v,2),w=m[0],C=m[1];f=w[0]-C[0],g=w[1]-C[1],d=Math.atan2(g,f),l=Math.cos(d)*(i||0),c=Math.sin(d)*(i||0)}if(n&&Nn(n)&&a){var F=n.parentNode.getEndTangent(),Q=(0,U.Z)(F,2),D=Q[0],K=Q[1];f=D[0]-K[0],g=D[1]-K[1],d=Math.atan2(g,f),u=Math.cos(d)*(a||0),h=Math.sin(d)*(a||0)}for(var G=0;G<o.length;G++){var J=o[G],$=J[0],at=o[G+1],At=G===0&&(l!==0||c!==0),pt=(G===o.length-1||at&&(at[0]==="M"||at[0]==="Z"))&&u!==0&&h!==0,wt=At?[l,c]:[0,0],bt=(0,U.Z)(wt,2),Rt=bt[0],Pt=bt[1],xt=pt?[u,h]:[0,0],Ft=(0,U.Z)(xt,2),_t=Ft[0],Xt=Ft[1];switch($){case"M":r.moveTo(J[1]+Rt,J[2]+Pt);break;case"L":r.lineTo(J[1]+_t,J[2]+Xt);break;case"Q":r.quadraticCurveTo(J[1],J[2],J[3]+_t,J[4]+Xt);break;case"C":r.bezierCurveTo(J[1],J[2],J[3],J[4],J[5]+_t,J[6]+Xt);break;case"A":{var ie=A[G].arcParams,le=ie.cx,ve=ie.cy,xe=ie.rx,Qe=ie.ry,Re=ie.startAngle,nn=ie.endAngle,mn=ie.xRotation,sn=ie.sweepFlag;if(r.ellipse)r.ellipse(le,ve,xe,Qe,mn,Re,nn,!!(1-sn));else{var er=xe>Qe?xe:Qe,kn=xe>Qe?1:xe/Qe,Cn=xe>Qe?Qe/xe:1;r.translate(le,ve),r.rotate(mn),r.scale(kn,Cn),r.arc(0,0,er,Re,nn,!!(1-sn)),r.scale(1/kn,1/Cn),r.rotate(-mn),r.translate(-le,-ve)}pt&&r.lineTo(J[6]+u,J[7]+h);break}case"Z":r.closePath();break}}}function tk(r,t){var e=t.markerStart,n=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,s=t.points.points,o=s.length,A=s[0][0],l=s[0][1],c=s[o-1][0],u=s[o-1][1],h=0,d=0,f=0,g=0,v=0,m,w;e&&Nn(e)&&i&&(m=s[1][0]-s[0][0],w=s[1][1]-s[0][1],v=Math.atan2(w,m),h=Math.cos(v)*(i||0),d=Math.sin(v)*(i||0)),n&&Nn(n)&&a&&(m=s[o-1][0]-s[0][0],w=s[o-1][1]-s[0][1],v=Math.atan2(w,m),f=Math.cos(v)*(a||0),g=Math.sin(v)*(a||0)),r.moveTo(A+(h||f),l+(d||g));for(var C=1;C<o-1;C++){var F=s[C];r.lineTo(F[0],F[1])}r.lineTo(c,u)}function ek(r,t){var e=t.markerStart,n=t.markerEnd,i=t.markerStartOffset,a=t.markerEndOffset,s=t.points.points,o=s.length,A=s[0][0],l=s[0][1],c=s[o-1][0],u=s[o-1][1],h=0,d=0,f=0,g=0,v=0,m,w;e&&Nn(e)&&i&&(m=s[1][0]-s[0][0],w=s[1][1]-s[0][1],v=Math.atan2(w,m),h=Math.cos(v)*(i||0),d=Math.sin(v)*(i||0)),n&&Nn(n)&&a&&(m=s[o-2][0]-s[o-1][0],w=s[o-2][1]-s[o-1][1],v=Math.atan2(w,m),f=Math.cos(v)*(a||0),g=Math.sin(v)*(a||0)),r.moveTo(A+h,l+d);for(var C=1;C<o-1;C++){var F=s[C];r.lineTo(F[0],F[1])}r.lineTo(c+f,u+g)}function nk(r,t){var e=t.x,n=e===void 0?0:e,i=t.y,a=i===void 0?0:i,s=t.radius,o=t.width,A=t.height,l=o,c=A,u=s&&s.some(function(Q){return Q!==0});if(!u)r.rect(n,a,l,c);else{var h=o>0?1:-1,d=A>0?1:-1,f=h+d===0,g=s.map(function(Q){return hr(Q,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}),v=(0,U.Z)(g,4),m=v[0],w=v[1],C=v[2],F=v[3];r.moveTo(h*m+n,a),r.lineTo(l-h*w+n,a),w!==0&&r.arc(l-h*w+n,d*w+a,w,-d*Math.PI/2,h>0?0:Math.PI,f),r.lineTo(l+n,c-d*C+a),C!==0&&r.arc(l-h*C+n,c-d*C+a,C,h>0?0:Math.PI,d>0?Math.PI/2:1.5*Math.PI,f),r.lineTo(h*F+n,c+a),F!==0&&r.arc(h*F+n,c-d*F+a,F,d>0?Math.PI/2:-Math.PI/2,h>0?Math.PI:0,f),r.lineTo(n,d*m+a),m!==0&&r.arc(h*m+n,d*m+a,m,h>0?Math.PI:0,d>0?Math.PI*1.5:Math.PI/2,f)}}var zb=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="canvas-path-generator",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){var n,i=(n={},(0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)((0,we.Z)(n,Vt.CIRCLE,XN),Vt.ELLIPSE,JN),Vt.RECT,nk),Vt.LINE,qN),Vt.POLYLINE,ek),Vt.POLYGON,tk),Vt.PATH,$N),Vt.TEXT,void 0),Vt.GROUP,void 0),Vt.IMAGE,void 0),(0,we.Z)((0,we.Z)((0,we.Z)(n,Vt.HTML,void 0),Vt.MESH,void 0),Vt.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(ls),j9=Object.freeze({__proto__:null,Plugin:zb}),rk=function(){function r(t){(0,L.Z)(this,r),this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return(0,I.Z)(r,[{key:"init",value:function(){var e=this.canvasConfig,n=e.container,i=e.canvas;if(i)this.$canvas=i,n&&i.parentElement!==n&&n.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container;else if(n&&(this.$container=gn(n)?document.getElementById(n):n,this.$container)){var a=document.createElement("canvas");this.$container.appendChild(a),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=a}this.context=this.$canvas.getContext("2d"),this.resize(this.canvasConfig.width,this.canvasConfig.height)}},{key:"getContext",value:function(){return this.context}},{key:"getDomElement",value:function(){return this.$canvas}},{key:"getDPR",value:function(){return this.dpr}},{key:"getBoundingClientRect",value:function(){if(this.$canvas.getBoundingClientRect)return this.$canvas.getBoundingClientRect()}},{key:"destroy",value:function(){this.$container&&this.$canvas&&this.$canvas.parentNode&&this.$container.removeChild(this.$canvas)}},{key:"resize",value:function(e,n){var i=this.canvasConfig.devicePixelRatio;this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*e,this.$canvas.height=this.dpr*n,zM(this.$canvas,e,n)),this.renderingContext.renderReasons.add(Oc.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:function(){var t=(0,Wa.Z)((0,ri.Z)().mark(function n(){var i,a,s,o=arguments;return(0,ri.Z)().wrap(function(A){for(;;)switch(A.prev=A.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{},a=i.type,s=i.encoderOptions,A.abrupt("return",this.context.canvas.toDataURL(a,s));case 1:case"end":return A.stop()}},n,this)}));function e(){return t.apply(this,arguments)}return e}()}])}(),ik=function(r){function t(){var e;(0,L.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,P.Z)(this,t,[].concat(i)),e.name="canvas-context-register",e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){this.context.ContextService=rk}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(ls),Eh=function(r){function t(e){var n;return(0,L.Z)(this,t),n=(0,P.Z)(this,t,[e]),n.registerPlugin(new ik),n.registerPlugin(new EF.Plugin),n.registerPlugin(new zb),n.registerPlugin(new Db),n.registerPlugin(new SF.Plugin),n.registerPlugin(new Kb),n.registerPlugin(new xF.Plugin),n}return(0,k.Z)(t,r),(0,I.Z)(t)}(vp);function ak(r,t){if(r){var e;if(Ni(r))for(var n=0,i=r.length;n<i&&(e=t(r[n],n),e!==!1);n++);else if(Br(r)){for(var a in r)if(r.hasOwnProperty(a)&&(e=t(r[a],a),e===!1))break}}}var Vb=ak,sk=Object.prototype.hasOwnProperty,xl=function(r,t){if(r===null||!Qc(r))return{};var e={};return Vb(t,function(n){sk.call(r,n)&&(e[n]=r[n])}),e},ok=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Ag extends Cs{constructor(t){super(Object.assign(Object.assign({},t),{style:Object.assign({},Ag.defaultStyleProps,t.style)})),this.rootPointerEvent=new tf(null),this.forwardEvents=e=>{const n=this.context.canvas,i=n.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(e,i).forEach(s=>{const o=this.bootstrapEvent(this.rootPointerEvent,s,i,e);ph(n.context.eventService,"mappingTable.pointerupoutside",[]),n.context.eventService.mapEvent(o)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[Yt.CLICK,Yt.POINTER_DOWN,Yt.POINTER_MOVE,Yt.POINTER_UP,Yt.POINTER_OVER,Yt.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.drawPortShapes(t,e)}getKeyStyle(t){const e=xl(t,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:i=0}=e,a=ok(e,["dx","dy"]),[s,o]=this.getSize(t);return Object.assign(Object.assign({x:n,y:i},a),{width:s,height:o})}drawKeyShape(t,e){const n=this.getKeyStyle(t),{x:i,y:a,width:s=0,height:o=0}=n,A=this.upsert("key-container",xi,{x:i,y:a,width:s,height:o,opacity:0},e);return this.upsert("key",ul,n,A)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof Eh))return;const n=this.getDomElement();this.events.forEach(i=>{n.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(t,e,n){t==="zIndex"&&e!==n&&(this.getDomElement().style.zIndex=n)}destroy(){const t=this.getDomElement();this.events.forEach(e=>{t.removeEventListener(e,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(t,e){const n=[];if(e.isTouchEvent(t))for(let i=0;i<t.changedTouches.length;i++){const a=t.changedTouches[i];Ye(a.button)&&(a.button=0),Ye(a.buttons)&&(a.buttons=1),Ye(a.isPrimary)&&(a.isPrimary=t.touches.length===1&&t.type==="touchstart"),Ye(a.width)&&(a.width=a.radiusX||1),Ye(a.height)&&(a.height=a.radiusY||1),Ye(a.tiltX)&&(a.tiltX=0),Ye(a.tiltY)&&(a.tiltY=0),Ye(a.pointerType)&&(a.pointerType="touch"),Ye(a.pointerId)&&(a.pointerId=a.identifier||0),Ye(a.pressure)&&(a.pressure=a.force||.5),Ye(a.twist)&&(a.twist=0),Ye(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=t.type,n.push(a)}else if(e.isMouseEvent(t)){const i=t;Ye(i.isPrimary)&&(i.isPrimary=!0),Ye(i.width)&&(i.width=1),Ye(i.height)&&(i.height=1),Ye(i.tiltX)&&(i.tiltX=0),Ye(i.tiltY)&&(i.tiltY=0),Ye(i.pointerType)&&(i.pointerType="mouse"),Ye(i.pointerId)&&(i.pointerId=1),Ye(i.pressure)&&(i.pressure=.5),Ye(i.twist)&&(i.twist=0),Ye(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,n.push(i)}else n.push(t);return n}transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}bootstrapEvent(t,e,n,i){t.view=n,t.originalEvent=null,t.nativeEvent=i,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);const{x:a,y:s}=this.getViewportXY(e);t.viewport.x=a,t.viewport.y=s;const[o,A]=this.context.canvas.getCanvasByViewport([a,s]);return t.canvas.x=o,t.canvas.y=A,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=i.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t}getViewportXY(t){let e,n;const{offsetX:i,offsetY:a,clientX:s,clientY:o}=t;if(!Pe(i)&&!Pe(a))e=i,n=a;else{const A=this.eventService.client2Viewport({x:s,y:o});e=A.x,n=A.y}return{x:e,y:n}}onframe(){super.onframe();const{opacity:t}=this.attributes;this.getDomElement().style.opacity=`${t}`}}Ag.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var Wb=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class lg extends Cs{constructor(t){super(pi({style:lg.defaultStyleProps},t))}getKeyStyle(t){const[e,n]=this.getSize(t),i=super.getKeyStyle(t),{fillOpacity:a,opacity:s=a}=i,o=Wb(i,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:s},o),{width:e,height:n,x:-e/2,y:-n/2})}getBounds(){return this.getShape("key").getBounds()}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getShape("key").attributes,{fill:n,stroke:i}=e,a=Wb(e,["fill","stroke"]),s=Or(this.getGraphicStyle(t),"halo"),o=Number(s.lineWidth),[A,l]=tn(this.getSize(t),[o,o]),{lineWidth:c}=s,u={fill:"transparent",lineWidth:c/2,width:A-c/2,height:l-c/2,x:-(A-c/2)/2,y:-(l-c/2)/2};return Object.assign(Object.assign({},s),u)}getIconStyle(t){const e=super.getIconStyle(t),[n,i]=this.getSize(t);return e?Object.assign({width:n*No,height:i*No},e):!1}drawKeyShape(t,e){const n=this.upsert("key",ny,this.getKeyStyle(t),e);return iy(this),n}drawHaloShape(t,e){this.upsert("halo",xi,this.getHaloStyle(t),e)}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&ay(this)}}lg.defaultStyleProps={size:32};class Ak extends Cs{constructor(t){super(t)}getKeyStyle(t){const[e,n]=this.getSize(t);return Object.assign(Object.assign({},super.getKeyStyle(t)),{width:e,height:n,x:-e/2,y:-n/2})}getIconStyle(t){const e=super.getIconStyle(t),{width:n,height:i}=this.getShape("key").attributes;return e?Object.assign({width:n*No,height:i*No},e):!1}drawKeyShape(t,e){return this.upsert("key",xi,this.getKeyStyle(t),e)}}class lk extends qf{constructor(t){super(t)}getInnerR(t){return t.innerR||this.getOuterR(t)*3/8}getOuterR(t){return Math.min(...this.getSize(t))/2}getPoints(t){return Jk(this.getOuterR(t),this.getInnerR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getInnerR(t)*2*No;return e?Object.assign({width:n,height:n},e):!1}getPortXY(t,e){const{placement:n="top"}=e,i=this.getShape("key").getLocalBounds(),a=qk(this.getOuterR(t),this.getInnerR(t));return fy(i,n,a,!1)}}class cg extends qf{constructor(t){super(pi({style:cg.defaultStyleProps},t))}getPoints(t){const{direction:e}=t,[n,i]=this.getSize(t);return $k(n,i,e)}getPortXY(t,e){const{direction:n}=t,{placement:i="top"}=e,a=this.getShape("key").getLocalBounds(),[s,o]=this.getSize(t),A=tQ(s,o,n);return fy(a,i,A,!1)}getIconStyle(t){const{icon:e,iconText:n,iconSrc:i,direction:a}=t;if(e===!1||ro(n||i))return!1;const s=Or(this.getGraphicStyle(t),"icon"),o=this.getShape("key").getLocalBounds(),[A,l]=YO(o,a),c=XO(o,a)*2*No;return Object.assign({x:A,y:l,width:c,height:c},s)}}cg.defaultStyleProps={size:40,direction:"up"};var Zb=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Dc extends Cs{constructor(t){super(pi({style:Dc.defaultStyleProps},t)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(t){const{collapsed:e,childrenNode:n=[]}=t;return n.length===0?this.getEmptyKeySize(t):e?this.getCollapsedKeySize(t):this.getExpandedKeySize(t)}getEmptyKeySize(t){const{padding:e,collapsedSize:n}=t,[i,a,s,o]=La(e);return tn(ka(n),[o+a,i+s,0])}getCollapsedKeySize(t){return ka(t.collapsedSize)}getExpandedKeySize(t){const e=this.getContentBBox(t);return[to(e),eo(e),0]}getContentBBox(t){const{childrenNode:e=[],padding:n}=t,i=e.map(s=>this.context.element.getElement(s)).filter(Boolean);if(i.length===0){const s=new jn,{x:o=0,y:A=0,size:l}=t,[c,u]=ka(l);return s.setMinMax([o-c/2,A-u/2,0],[o+c/2,A+u/2,0]),s}const a=ch(i.map(s=>s.getBounds()));return n?pA(a,n):a}drawCollapsedMarkerShape(t,e){const n=this.getCollapsedMarkerStyle(t);this.upsert("collapsed-marker",Ob,n,e),iy(this)}getCollapsedMarkerStyle(t){if(!t.collapsed||!t.collapsedMarker)return!1;const e=Or(this.getGraphicStyle(t),"collapsedMarker"),{type:n}=e,i=Zb(e,["type"]),a=this.getShape("key"),[s,o]=Lo(a.getLocalBounds(),"center"),A=Object.assign(Object.assign({},i),{x:s,y:o});if(n){const l=this.getCollapsedMarkerText(n,t);Object.assign(A,{text:l})}return A}getCollapsedMarkerText(t,e){const{childrenData:n=[]}=e,{model:i}=this.context;return t==="descendant-count"?i.getDescendantsData(this.id).length.toString():t==="child-count"?n.length.toString():t==="node-count"?i.getDescendantsData(this.id).filter(a=>i.getElementType(Qt(a))==="node").length.toString():Wt(t)?t(n):""}getComboPosition(t){const{x:e=0,y:n=0,collapsed:i,childrenData:a=[]}=t;if(a.length===0)return[+e,+n,0];if(i){const{model:s}=this.context,o=s.getDescendantsData(this.id).filter(A=>!s.isCombo(Qt(A)));if(o.length>0&&o.some(HL)){const A=o.reduce((l,c)=>tn(l,Ai(c)),[0,0,0]);return bs(A,o.length)}return[+e,+n,0]}return this.getContentBBox(t).center}getComboStyle(t){const[e,n]=this.getComboPosition(t);return{x:e,y:n,transform:[["translate",e,n]]}}updateComboPosition(t){const e=this.getComboStyle(t);Object.assign(this.style,e);const{x:n,y:i}=e;this.context.model.syncNodeLikeDatum({id:this.id,style:{x:n,y:i}}),ay(this)}render(t,e=this){super.render(t,e),this.drawCollapsedMarkerShape(t,e)}update(t={}){super.update(t),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(this.attributes.collapsed?t:t.map(i=>{var{x:a,y:s,z:o,transform:A}=i,l=Zb(i,["x","y","z","transform"]);return l}),e);return n&&new Proxy(n,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}Dc.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class ck extends Dc{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",Js,this.getKeyStyle(t),e)}getKeyStyle(t){const{collapsed:e}=t,n=super.getKeyStyle(t),[i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},n),e&&Or(n,"collapsed")),{r:i/2})}getCollapsedKeySize(t){const[e,n]=ka(t.collapsedSize),i=Math.max(e,n)/2;return[i*2,i*2,0]}getExpandedKeySize(t){const e=this.getContentBBox(t),[n,i]=gA(e),a=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return Zf(t,n,e)}}class uk extends Dc{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",xi,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},e),t.collapsed&&Or(e,"collapsed")),{width:n,height:i,x:-n/2,y:-i/2})}}var hk=function(r,t){if(!oh(r))return r;for(var e=[],n=0;n<r.length;n++){var i=r[n];t(i,n)&&e.push(i)}return e},dk=hk,fk=function(r,t){return oh(r)?r.indexOf(t)>-1:!1},gk=fk,vk=function(r,t){return t===void 0&&(t=[]),dk(r,function(e){return!gk(t,e)})},pk=vk;const mk={padding:10};function jb(r,t,e,n,i,a){const{padding:s}=Object.assign(mk,a),o=vA(e,s),A=vA(n,s),l=[r,...i,t];let c=null;const u=[];for(let h=0,d=l.length;h<d-1;h++){const f=h+1,g=l[h],v=l[f],m=KL(g,v);let w=null;if(h===0)if(f===d-1)if(o.intersects(A))w=ly(g,v,o,A);else if(!Of(g,o)&&!Of(v,A)){const C=vl(g,o),F=vl(v,A);w=Xb(C,F,ea(C,F)),w.points.unshift(C),w.points.push(F)}else m||(w=wk(g,v,o,A));else ws(v,o)?w=ly(g,v,o,vA(v,s),c):m||(w=ug(g,v,o));else f===d-1?ws(g,A)?w=ly(g,v,vA(g,s),A,c):m||(w=Jb(g,v,A,c)):m||(w=Xb(g,v,c));w?(u.push(...w.points),c=w.direction):c=ea(g,v),f<d-1&&u.push(v)}return u.map(yl)}const yk={N:"S",S:"N",W:"E",E:"W"},Yb={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function ea(r,t){const[e,n]=r,[i,a]=t;return e===i?n>a?"N":"S":n===a?e>i?"W":"E":null}function Ay(r,t){return t==="N"||t==="S"?eo(r):to(r)}function Xb(r,t,e){const n=[r[0],t[1]],i=[t[0],r[1]],a=ea(r,n),s=ea(r,i),o=e?yk[e]:null,A=a===e||a!==o&&s!==e?n:i;return{points:[A],direction:ea(A,t)}}function ug(r,t,e){if(Of(r,e)){const n=Bh(r,t,e);return{points:[n],direction:ea(n,t)}}else{const n=vl(r,e),a=["left","right"].includes(uh(r,e))?[t[0],n[1]]:[n[0],t[1]];return{points:[a],direction:ea(a,t)}}}function Jb(r,t,e,n){const i=Of(t,e)?t:vl(t,e),a=[[i[0],r[1]],[r[0],i[1]]],s=a.filter(A=>jO(A,e)&&!pB(A,e,!0)),o=s.filter(A=>ea(A,r)!==n);if(o.length>0){const A=o.find(l=>ea(r,l)===n)||o[0];return{points:[A],direction:ea(A,t)}}else{const A=pk(a,s)[0],l=wA(t,A,Ay(e,n)/2);return{points:[Bh(l,r,e),l],direction:ea(l,t)}}}function wk(r,t,e,n){let i=ug(r,t,e);const a=fh(i.points[0]);if(ws(a,n)){i=ug(t,r,n);const s=fh(i.points[0]);if(ws(s,e)){const o=wA(r,a,Ay(e,ea(r,a))/2),A=wA(t,s,Ay(n,ea(t,s))/2),l=[(o[0]+A[0])/2,(o[1]+A[1])/2],c=ug(r,l,e),u=Jb(l,t,n,c.direction);i.points=[c.points[0],u.points[0]],i.direction=u.direction}}return i}function ly(r,t,e,n,i){const s=ch([e,n]),o=lr(t,s.center)>lr(r,s.center),[A,l]=o?[t,r]:[r,t],c=eo(s)+to(s);let u;if(i){const f=[A[0]+c*Math.cos(Yb[i]),A[1]+c*Math.sin(Yb[i])];u=wA(vl(f,s),f,.01)}else u=wA(vl(A,s),A,-.01);let h=Bh(u,l,s),d=[gh(u,2),gh(h,2)];if(Dr(gh(u),gh(h))){const f=jm(tr(u,A),[1,0,0])+Math.PI/2;h=[l[0]+c*Math.cos(f),l[1]+c*Math.sin(f),0],h=gh(wA(vl(h,s),l,-.01),2);const g=Bh(u,h,s);d=[u,g,h]}return{points:o?d.reverse():d,direction:ea(o?u:h,t)}}function Bh(r,t,e){let n=[r[0],t[1]];return ws(n,e)&&(n=[t[0],r[1]]),n}function qb(r,t,e,n,i){let A=typeof t=="number"?t:.5;t==="start"&&(A=0),t==="end"&&(A=.99);const l=Si(r.getPoint(A)),c=Si(r.getPoint(A+.01));let u=t==="start"?"left":t==="end"?"right":"center";if(ub(l,c)||!e){const[m,w]=$b(r,A,n,i);return{transform:[["translate",m,w]],textAlign:u}}let h=Math.atan2(c[1]-l[1],c[0]-l[0]);c[0]<l[0]&&(u=u==="center"?u:u==="left"?"right":"left",n*=-1,h+=Math.PI);const[f,g]=$b(r,A,n,i,h),v=[["translate",f,g],["rotate",h/Math.PI*180]];return{textAlign:u,transform:v}}function Ek(r,t,e,n,i){var a,s;const o=((a=r.badge)===null||a===void 0?void 0:a.getGeometryBounds().halfExtents[0])*2||0,A=((s=r.label)===null||s===void 0?void 0:s.getGeometryBounds().halfExtents[0])*2||0;return qb(r.key,e,!0,(A?(A/2+o/2)*(t==="suffix"?1:-1):0)+n,i)}function $b(r,t,e,n,i){const[a,s]=Si(r.getPoint(t));let o=e,A=n;return i&&(o=e*Math.cos(i)-n*Math.sin(i),A=e*Math.sin(i)+n*Math.cos(i)),[a+o,s+A]}function cy(r,t,e,n){if(Dr(r,t))return r;const i=tr(t,r),a=[r[0]+e*i[0],r[1]+e*i[1]],s=Io(Wf(i,!1));return a[0]+=n*s[0],a[1]+=n*s[1],a}function Bk(r){return ye(r)?[r,-r]:r}function bk(r){return ye(r)?[r,1-r]:r}function xk(r,t,e){return[["M",r[0],r[1]],["Q",e[0],e[1],t[0],t[1]]]}function tx(r,t,e){return[["M",r[0],r[1]],["C",e[0][0],e[0][1],e[1][0],e[1][1],t[0],t[1]]]}function uy(r,t=0,e=!1){const n=r.length-1,i=r[0],a=r[n],s=r.slice(1,n),o=[["M",i[0],i[1]]];return s.forEach((A,l)=>{const c=s[l-1]||i,u=s[l+1]||a;if(!hb(c,A,u)&&t){const[h,d]=Ck(c,A,u,t);o.push(["L",h[0],h[1]],["Q",A[0],A[1],d[0],d[1]],["L",d[0],d[1]])}else o.push(["L",A[0],A[1]])}),o.push(["L",a[0],a[1]]),e&&o.push(["Z"]),o}function Ck(r,t,e,n){const i=Vf(r,t),a=Vf(e,t),s=Math.min(n,Math.min(i,a)/2),o=[t[0]-s/i*(t[0]-r[0]),t[1]-s/i*(t[1]-r[1])],A=[t[0]-s/a*(t[0]-e[0]),t[1]-s/a*(t[1]-e[1])];return[o,A]}const Sk=r=>{const t=Math.PI/2,e=eo(r)/2,n=to(r)/2,i=Math.atan2(e,n)/2,a=Math.atan2(n,e)/2;return{top:[-t-a,-t+a],"top-right":[-t+a,-i],"right-top":[-t+a,-i],right:[-i,i],"bottom-right":[i,t-a],"right-bottom":[i,t-a],bottom:[t-a,t+a],"bottom-left":[t+a,Math.PI-i],"left-bottom":[t+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-t-a],"left-top":[Math.PI+i,-t-a]}};function ex(r,t,e,n,i){const a=vA(r),s=r.getCenter();let o=n&&xA(n),A=i&&xA(i);if(!o||!A){const l=Sk(a),c=l[t][0],u=l[t][1],[h,d]=gA(a),f=Math.max(h,d),g=tn(s,[f*Math.cos(c),f*Math.sin(c),0]),v=tn(s,[f*Math.cos(u),f*Math.sin(u),0]);o=vy(r,g),A=vy(r,v),e||([o,A]=[A,o])}return[o,A]}function Mk(r,t,e,n,i,a){const s=r.getPorts()[i||a],o=r.getPorts()[a||i];let[A,l]=ex(r,t,e,s,o);const c=Tk(r,A,l,n);return s&&(A=xh(s,c[0])),o&&(l=xh(o,c.at(-1))),tx(A,l,c)}function Tk(r,t,e,n){const i=r.getCenter();if(Dr(t,e)){const a=tr(t,i),s=[n*Math.sign(a[0])||n/2,n*Math.sign(a[1])||-n/2,0];return[tn(t,s),tn(e,Bs(s,[1,-1,1]))]}return[wA(i,t,lr(i,t)+n),wA(i,e,lr(i,e)+n)]}function Fk(r,t,e,n,i,a,s){const o=gy(r),A=o[a||s],l=o[s||a];let[c,u]=ex(r,e,n,A,l);const h=Ok(r,c,u,i);return A&&(c=xh(A,h[0])),l&&(u=xh(l,h.at(-1))),uy([c,...h,u],t)}function Ok(r,t,e,n){const i=[],a=vA(r);if(Dr(t,e))switch(uh(t,a)){case"left":i.push([t[0]-n,t[1]]),i.push([t[0]-n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"right":i.push([t[0]+n,t[1]]),i.push([t[0]+n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"top":i.push([t[0],t[1]-n]),i.push([t[0]+n,t[1]-n]),i.push([t[0]+n,t[1]]);break;case"bottom":i.push([t[0],t[1]+n]),i.push([t[0]+n,t[1]+n]),i.push([t[0]+n,t[1]]);break}else{const s=uh(t,a),o=uh(e,a);if(s===o){const A=s;let l,c;switch(A){case"left":l=Math.min(t[0],e[0])-n,i.push([l,t[1]]),i.push([l,e[1]]);break;case"right":l=Math.max(t[0],e[0])+n,i.push([l,t[1]]),i.push([l,e[1]]);break;case"top":c=Math.min(t[1],e[1])-n,i.push([t[0],c]),i.push([e[0],c]);break;case"bottom":c=Math.max(t[1],e[1])+n,i.push([t[0],c]),i.push([e[0],c]);break}}else{const A=(h,d)=>({left:[d[0]-n,d[1]],right:[d[0]+n,d[1]],top:[d[0],d[1]-n],bottom:[d[0],d[1]+n]})[h],l=A(s,t),c=A(o,e),u=Bh(l,c,a);i.push(l,u,c)}}return i}function hy(r,t){const e=new Set,n=new Set,i=new Set;return r.forEach(a=>{t(a).forEach(o=>{e.add(o),r.includes(o.source)&&r.includes(o.target)?n.add(o):i.add(o)})}),{edges:Array.from(e),internal:Array.from(n),external:Array.from(i)}}function nx(r,t){const e=[];let n=r;for(;n;){e.push(n);const i=t(Qt(n));if(i)n=i;else break}if(e.some(i=>{var a;return(a=i.style)===null||a===void 0?void 0:a.collapsed})){const i=e.reverse().findIndex(da);return e[i]||e.at(-1)}return r}function Ik(r,t){return t||(r<4?10:r===4?12:r*2.5)}const Lk=(r,t)=>{const e=Math.max(r,t)/2;return[["M",-r/2,0],["A",e,e,0,1,0,2*e-r/2,0],["A",e,e,0,1,0,-r/2,0],["Z"]]},rx=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",r/2,t/2],["Z"]],Nk=(r,t)=>[["M",-r/2,0],["L",0,-t/2],["L",r/2,0],["L",0,t/2],["Z"]],kk=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",4*r/5-r/2,0],["L",r/2,t/2],["Z"]],Qk=(r,t)=>[["M",-r/2,-t/2],["L",r/2,-t/2],["L",r/2,t/2],["L",-r/2,t/2],["Z"]],Uk=(r,t)=>{const e=r/2,n=r/7,i=r-n;return[["M",-e,0],["L",0,-t/2],["L",0,t/2],["Z"],["M",i-e,-t/2],["L",i+n-e,-t/2],["L",i+n-e,t/2],["L",i-e,t/2],["Z"]]},Pk=(r,t)=>[["M",r/2,-t/2],["L",-r/2,0],["L",r/2,0],["L",-r/2,0],["L",r/2,t/2]];var hg=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class bA extends Ib{constructor(t){super(pi({style:bA.defaultStyleProps},t)),this.type="edge"}get sourceNode(){const{sourceNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}get targetNode(){const{targetNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}getKeyStyle(t){const e=this.getGraphicStyle(t),{loop:n}=e,i=hg(e,["loop"]),{sourceNode:a,targetNode:s}=this,A={d:n&&Zk(a,s)?this.getLoopPath(t):this.getKeyPath(t)};return Pi.PARSED_STYLE_LIST.forEach(l=>{l in i&&(A[l]=i[l])}),A}getLoopPath(t){const{sourcePort:e,targetPort:n}=t,i=this.sourceNode,a=vA(i),s=Math.max(to(a),eo(a)),{placement:o,clockwise:A,dist:l=s}=Or(this.getGraphicStyle(t),"loop");return Mk(i,o,A,l,e,n)}getEndpoints(t,e=!0,n=[]){const{sourcePort:i,targetPort:a}=t,{sourceNode:s,targetNode:o}=this,[A,l]=Yk(s,o,i,a);if(!e){const d=A?xA(A):s.getCenter(),f=l?xA(l):o.getCenter();return[d,f]}const c=typeof n=="function"?n():n,u=ux(A||s,c[0]||l||o),h=ux(l||o,c[c.length-1]||A||s);return[u,h]}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),n=Or(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign({},e),n)}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=Or(this.getGraphicStyle(t),"label"),{placement:n,offsetX:i,offsetY:a,autoRotate:s,maxWidth:o}=e,A=hg(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),l=qb(this.shapeMap.key,n,s,i,a),c=this.shapeMap.key.getLocalBounds(),u=rN([c.min,c.max],o);return Object.assign({wordWrapWidth:u},l,A)}getBadgeStyle(t){if(t.badge===!1||!t.badgeText)return!1;const e=Or(t,"badge"),{offsetX:n,offsetY:i,placement:a}=e,s=hg(e,["offsetX","offsetY","placement"]);return Object.assign(s,Ek(this.shapeMap,a,t.labelPlacement,n,i))}drawArrow(t,e){var n;const i=e==="start",s=t[e==="start"?"startArrow":"endArrow"],o=this.shapeMap.key;if(s){const A=this.getArrowStyle(t,i),[l,c,u]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],h=o.parsedStyle[l];if(h)h.attr(A);else{const d=A.src?nh:Pi,f=new d({style:A});o.style[l]=f}o.style[c]=t[u]||A.width/2+ +A.lineWidth}else{const A=i?"markerStart":"markerEnd";(n=o.style[A])===null||n===void 0||n.destroy(),o.style[A]=null}}getArrowStyle(t,e){const n=this.getShape("key").attributes,i=e?"startArrow":"endArrow",a=Or(this.getGraphicStyle(t),i),{size:s,type:o}=a,A=hg(a,["size","type"]),[l,c]=ka(Ik(n.lineWidth,s)),h=(Wt(o)?o:W[o]||rx)(l,c);return Object.assign(xl(n,["stroke","strokeOpacity","fillOpacity"]),{width:l,height:c},Object.assign({},h&&{d:h,fill:o==="simple"?"":n.stroke}),A)}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",io,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);this.upsert("halo",Pi,n,e)}drawBadgeShape(t,e){const n=this.getBadgeStyle(t);this.upsert("badge",Uc,n,e)}drawSourceArrow(t){this.drawArrow(t,"start")}drawTargetArrow(t){this.drawArrow(t,"end")}drawKeyShape(t,e){const n=this.getKeyStyle(t);return this.upsert("key",Pi,n,e)}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.getShape("key")&&(this.drawSourceArrow(t),this.drawTargetArrow(t),this.drawLabelShape(t,e),this.drawHaloShape(t,e),this.drawBadgeShape(t,e))}onframe(){this.drawKeyShape(this.parsedAttributes,this),this.drawSourceArrow(this.parsedAttributes),this.drawTargetArrow(this.parsedAttributes),this.drawHaloShape(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this),this.drawBadgeShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(t,e);return n&&new Proxy(n,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}bA.defaultStyleProps={badge:!0,badgeOffsetX:0,badgeOffsetY:0,badgePlacement:"suffix",isBillboard:!0,label:!0,labelAutoRotate:!0,labelIsBillboard:!0,labelMaxWidth:"80%",labelOffsetX:4,labelOffsetY:0,labelPlacement:"center",labelTextBaseline:"middle",labelWordWrap:!1,halo:!1,haloDroppable:!1,haloLineDash:0,haloLineWidth:12,haloPointerEvents:"none",haloStrokeOpacity:.25,haloZIndex:-1,loop:!0,startArrow:!1,startArrowLineDash:0,startArrowLineJoin:"round",startArrowLineWidth:1,startArrowTransformOrigin:"center",startArrowType:"vee",endArrow:!1,endArrowLineDash:0,endArrowLineJoin:"round",endArrowLineWidth:1,endArrowTransformOrigin:"center",endArrowType:"vee",loopPlacement:"top",loopClockwise:!0};class Cl extends bA{constructor(t){super(pi({style:Cl.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t),{controlPoints:i,curvePosition:a,curveOffset:s}=t,o=this.getControlPoints(e,n,bk(a),Bk(s),i);return tx(e,n,o)}getControlPoints(t,e,n,i,a){return(a==null?void 0:a.length)===2?a:[cy(t,e,n[0],i[0]),cy(t,e,n[1],i[1])]}}Cl.defaultStyleProps={curvePosition:.5,curveOffset:20};class dg extends Cl{constructor(t){super(pi({style:dg.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[0]-t[0];return[[t[0]+a*n[0]+i[0],t[1]],[e[0]-a*n[1]+i[1],e[1]]]}}dg.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class fg extends Cl{constructor(t){super(pi({style:fg.defaultStyleProps},t))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(t){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(t);const e=Ai(this.ref),n=this.sourceNode.getIntersectPoint(e,!0),i=this.targetNode.getIntersectPoint(e);return[n,i]}toRadialCoordinate(t){const e=Ai(this.ref),n=lr(t,e),i=sb(tr(t,e));return[n,i]}getControlPoints(t,e,n,i){const[a,s]=this.toRadialCoordinate(t),[o]=this.toRadialCoordinate(e),A=o-a;return[[t[0]+(A*n[0]+i[0])*Math.cos(s),t[1]+(A*n[0]+i[0])*Math.sin(s)],[e[0]-(A*n[1]-i[0])*Math.cos(s),e[1]-(A*n[1]-i[0])*Math.sin(s)]]}}fg.defaultStyleProps={curvePosition:.5,curveOffset:20};class gg extends Cl{constructor(t){super(pi({style:gg.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[1]-t[1];return[[t[0],t[1]+a*n[0]+i[0]],[e[0],e[1]-a*n[1]+i[1]]]}}gg.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class vg extends bA{constructor(t){super(pi({style:vg.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t);return[["M",e[0],e[1]],["L",n[0],n[1]]]}}vg.defaultStyleProps={};const Dk={enableObstacleAvoidance:!1,offset:10,maxAllowedDirectionChange:Math.PI/2,maximumLoops:3e3,gridSize:5,startDirections:["top","right","bottom","left"],endDirections:["top","right","bottom","left"],directionMap:{right:{stepX:1,stepY:0},left:{stepX:-1,stepY:0},bottom:{stepX:0,stepY:1},top:{stepX:0,stepY:-1}},penalties:{0:0,90:0},distFunc:Vf},ko=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function Sl(r,t){const e=n=>Math.round(n/t);return ye(r)?e(r):r.map(e)}function Rk(r,t){const e=Math.abs(r-t);return e>Math.PI?2*Math.PI-e:e}function ix(r,t){const e=t[0]-r[0],n=t[1]-r[1];return!e&&!n?0:Math.atan2(n,e)}function ax(r,t,e,n){const i=ix(r,t),a=e[ko(r)],o=ix(a||n,r);return Rk(o,i)}const _k=(r,t)=>{const{offset:e,gridSize:n}=t,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const s=pA(a.getRenderBounds(),e);for(let o=Sl(s.min[0],n);o<=Sl(s.max[0],n);o+=1)for(let A=Sl(s.min[1],n);A<=Sl(s.max[1],n);A+=1)i[`${o}|||${A}`]=!0}),i};function sx(r,t,e){return Math.min(...t.map(n=>e(r,n)))}function Hk(r,t,e){let n=r[0],i=e(r[0],t);for(let a=0;a<r.length;a++){const s=r[a],o=e(s,t);o<i&&(n=s,i=o)}return n}const ox=(r,t,e,n)=>{if(!t)return[r];const{directionMap:i,offset:a}=n,s=pA(t.getRenderBounds(),a),o=Object.keys(i).reduce((A,l)=>{if(e.includes(l)){const c=i[l],[u,h]=gA(s),d=[r[0]+c.stepX*u,r[1]+c.stepY*h],f=JO(s);for(let g=0;g<f.length;g++){const v=Xm([r,d],f[g]);v&&pB(v,s)&&A.push(v)}}return A},[]);return ws(r,s)||o.push(r),o.map(A=>Sl(A,n.gridSize))},Gk=(r,t,e,n,i,a,s)=>{const o=[];let A=[a[0]===n[0]?n[0]:r[0]*s,a[1]===n[1]?n[1]:r[1]*s];o.unshift(A);let l=r,c=t[ko(l)];for(;c;){const d=c,f=l;ax(d,f,t,e)&&(A=[d[0]===f[0]?A[0]:d[0]*s,d[1]===f[1]?A[1]:d[1]*s],o.unshift(A)),c=t[ko(d)],l=d}const u=i.map(d=>[d[0]*s,d[1]*s]),h=Hk(u,A,Vf);return o.unshift(h),o};function Kk(r,t,e,n){const i=yl(r.getCenter()),a=yl(t.getCenter()),s=Object.assign(Dk,n),{gridSize:o}=s,A=s.enableObstacleAvoidance?e:[r,t],l=_k(A,s),c=Sl(i,o),u=Sl(a,o),h=ox(i,r,s.startDirections,s),d=ox(a,t,s.endDirections,s);h.forEach(G=>delete l[ko(G)]),d.forEach(G=>delete l[ko(G)]);const f={},g={},v={},m={},w={},C=new zk;for(let G=0;G<h.length;G++){const J=h[G],$=ko(J);f[$]=J,m[$]=0,w[$]=sx(J,d,s.distFunc),C.add({id:$,value:w[$]})}const F=d.map(G=>ko(G));let Q=s.maximumLoops,D,K=1/0;for(const[G,J]of Object.entries(f))w[G]<=K&&(K=w[G],D=J);for(;Object.keys(f).length>0&&Q>0;){const G=C.minId(!1);if(G)D=f[G];else break;const J=ko(D);if(F.includes(J))return Gk(D,v,c,a,h,u,o);delete f[J],C.remove(J),g[J]=!0;for(const $ of Object.values(s.directionMap)){const at=tn(D,[$.stepX,$.stepY]),At=ko(at);if(g[At])continue;const pt=ax(D,at,v,c);if(pt>s.maxAllowedDirectionChange||l[At])continue;f[At]||(f[At]=at);const wt=s.penalties[pt],bt=s.distFunc(D,at)+(isNaN(wt)?o:wt),Rt=m[J]+bt,Pt=m[At];Pt&&Rt>=Pt||(v[At]=D,m[At]=Rt,w[At]=Rt+sx(at,d,s.distFunc),C.add({id:At,value:w[At]}))}Q-=1}return[]}class zk{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(t,e){let n=0,i=e-1;for(;i-n>1;){const a=Math.floor((n+i)/2);if(this.arr[a].value>t.value)i=a;else if(this.arr[a].value<t.value)n=a;else{this.arr.splice(a,0,t),this.map[t.id]=!0;return}}this.arr.splice(i,0,t),this.map[t.id]=!0}add(t){delete this.map[t.id];const e=this.arr.length;if(!e||this.arr[e-1].value<t.value){this.arr.push(t),this.map[t.id]=!0;return}this._innerAdd(t,e)}remove(t){this.map[t]&&delete this.map[t]}_clearAndGetMinId(){let t;for(let e=this.arr.length-1;e>=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t}_findFirstId(){for(;this.arr.length;){const t=this.arr.shift();if(this.map[t.id])return t.id}}minId(t){return t?this._clearAndGetMinId():this._findFirstId()}}class pg extends bA{constructor(t){super(pi({style:pg.defaultStyleProps},t))}getControlPoints(t){const{router:e}=t,{sourceNode:n,targetNode:i}=this,[a,s]=this.getEndpoints(t,!1);let o=[];if(!e)o=t.controlPoints;else if(e.type==="shortest-path"){const A=this.context.element.getNodes();o=Kk(n,i,A,e),o.length||(o=jb(a,s,n,i,t.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(o=jb(a,s,n,i,t.controlPoints,e));return o}getPoints(t){const e=this.getControlPoints(t),[n,i]=this.getEndpoints(t,!0,e);return[n,...e,i]}getKeyPath(t){const e=this.getPoints(t);return uy(e,t.radius)}getLoopPath(t){const{sourcePort:e,targetPort:n,radius:i}=t,a=this.sourceNode,s=vA(a),o=Math.max(to(s),eo(s))/4,{placement:A,clockwise:l,dist:c=o}=Or(this.getGraphicStyle(t),"loop");return Fk(a,i,A,l,c,e,n)}}pg.defaultStyleProps={radius:0,controlPoints:[],router:!1};class mg extends bA{constructor(t){super(pi({style:mg.defaultStyleProps},t))}getKeyPath(t){const{curvePosition:e,curveOffset:n}=t,[i,a]=this.getEndpoints(t),s=t.controlPoint||cy(i,a,e,n);return xk(i,a,s)}}mg.defaultStyleProps={curvePosition:.5,curveOffset:30};var Vk=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function bh(r){return r instanceof Cs&&r.type==="node"}function Ax(r){return r instanceof bA}function dy(r){return r instanceof Dc}function Wk(r){return bh(r)||Ax(r)||dy(r)}function Zk(r,t){return!r||!t?!1:r===t}const jk={top:[.5,0],right:[1,.5],bottom:[.5,1],left:[0,.5],"left-top":[0,0],"top-left":[0,0],"left-bottom":[0,1],"bottom-left":[0,1],"right-top":[1,0],"top-right":[1,0],"right-bottom":[1,1],"bottom-right":[1,1],default:[.5,.5]};function fy(r,t,e=jk,n=!0){const i=[.5,.5],a=gn(t)?Mi(e,t.toLocaleLowerCase(),i):t;if(!n&&gn(t))return a;const[s,o]=a||i;return[r.min[0]+to(r)*s,r.min[1]+eo(r)*o]}function gy(r){if(!r)return{};const t=r.getPorts();return(r.attributes.ports||[]).forEach((n,i)=>{var a;const{key:s,placement:o}=n;lx(n)&&(t[a=s||i]||(t[a]=Lo(r.getShape("key").getBounds(),o)))}),t}function lx(r){const{r:t}=r;return!t||Number(t)===0}function xA(r){return kc(r)?r:r.getPosition()}function Yk(r,t,e,n){const i=cx(r,t,e,n),a=cx(t,r,n,e);return[i,a]}function cx(r,t,e,n){const i=gy(r);if(e)return i[e];const a=Object.values(i);if(a.length===0)return;const s=a.map(l=>xA(l)),o=Xk(t,n),[A]=WL(s,o);return a.find(l=>xA(l)===A)}function Xk(r,t){const e=gy(r);if(t)return[xA(e[t])];const n=Object.values(e);return n.length>0?n.map(i=>xA(i)):[r.getCenter()]}function ux(r,t){return dy(r)||bh(r)?vy(r,t):xh(r,t)}function xh(r,t){if(!r||!t)return[0,0,0];if(kc(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const e=kc(t)?t:bh(t)?t.getCenter():t.getPosition();return Zf(e,r.getBounds())}function vy(r,t){if(!r||!t)return[0,0,0];const e=kc(t)?t:bh(t)?t.getCenter():t.getPosition();return r.getIntersectPoint(e)||r.getCenter()}function hx(r,t="bottom",e=0,n=0,i=!1){const a=t.split("-"),[s,o]=Lo(r,t),[A,l]=i?["bottom","top"]:["top","bottom"],c=a.includes("top")?l:a.includes("bottom")?A:"middle",u=a.includes("left")?"right":a.includes("right")?"left":"center";return{transform:[["translate",s+e,o+n]],textBaseline:c,textAlign:u}}function Jk(r,t){return[[0,-r],[t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)],[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[0,t],[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[-t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[-t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)]]}function qk(r,t){const e={};return e.top=[0,-r],e.left=[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e["left-bottom"]=[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.bottom=[0,t],e["right-bottom"]=[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.right=e.default=[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e}function $k(r,t,e){const n=t/2,i=r/2,a={up:[[-i,n],[i,n],[0,-n]],left:[[-i,0],[i,n],[i,-n]],right:[[-i,n],[-i,-n],[i,0]],down:[[-i,-n],[i,-n],[0,n]]};return a[e]||a.up}function tQ(r,t,e){const n=t/2,i=r/2,a={};return e==="down"?(a.bottom=a.default=[0,n],a.right=[i,-n],a.left=[-i,-n]):e==="left"?(a.top=[i,-n],a.bottom=[i,n],a.left=a.default=[-i,0]):e==="right"?(a.top=[-i,-n],a.bottom=[-i,n],a.right=a.default=[i,0]):(a.left=[-i,n],a.top=a.default=[0,-n],a.right=[i,n]),a}function Y9(r,t){return[[r/2,-t/2],[r/2,t/2],[-r/2,t/2],[-r/2,-t/2]]}function eQ(r,t){return[[0,-t/2],[r/2,0],[0,t/2],[-r/2,0]]}function dx(r){return Mi(r,["style","visibility"])!=="hidden"}function nQ(r,t){const{zIndex:e,transform:n,transformOrigin:i,visibility:a,cursor:s,clipPath:o,component:A}=t,l=Vk(t,["zIndex","transform","transformOrigin","visibility","cursor","clipPath","component"]);Object.assign(r.attributes,l),n&&r.setAttribute("transform",n),ye(e)&&r.setAttribute("zIndex",e),i&&r.setAttribute("transformOrigin",i),a&&r.setAttribute("visibility",a),s&&r.setAttribute("cursor",s),o&&r.setAttribute("clipPath",o),A&&r.setAttribute("component",A)}function py(r,t){"update"in r?r.update(t):r.attr(t)}function rQ(r){return[[0,r],[r*Math.sqrt(3)/2,r/2],[r*Math.sqrt(3)/2,-r/2],[0,-r],[-r*Math.sqrt(3)/2,-r/2],[-r*Math.sqrt(3)/2,r/2]]}function iQ(r){ph(r,"__to_be_destroyed__",!0)}function Ch(r){return Mi(r,"__to_be_destroyed__",!1)}var aQ=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class yg extends Na{constructor(t,e){super(t,Object.assign({},yg.defaultOptions,e)),this.onCollapseExpand=n=>aQ(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:i}=n;if(!Wk(i))return;const a=i.id,{model:s,graph:o}=this.context,A=s.getElementDataById(a);if(!A)return!1;const{onCollapse:l,onExpand:c,animation:u,align:h}=this.options;da(A)?(yield o.expandElement(a,{animation:u,align:h}),c==null||c(a)):(yield o.collapseElement(a,{animation:u,align:h}),l==null||l(a))}),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`node:${e}`,this.onCollapseExpand),t.on(`combo:${e}`,this.onCollapseExpand)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`node:${e}`,this.onCollapseExpand),t.off(`combo:${e}`,this.onCollapseExpand)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}yg.defaultOptions={enable:!0,animation:!0,trigger:Yt.DBLCLICK,align:!0};var wg={},sQ=function(r){return r=r||"g",wg[r]?wg[r]+=1:wg[r]=1,r+wg[r]},Sh=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function CA(r,t){const{data:e,style:n}=r,i=Sh(r,["data","style"]),{data:a,style:s}=t,o=Sh(t,["data","style"]),A=Object.assign(Object.assign({},i),o);return(e||a)&&Object.assign(A,{data:Object.assign(Object.assign({},e),a)}),(n||s)&&Object.assign(A,{style:Object.assign(Object.assign({},n),s)}),A}function my(r){const{data:t,style:e}=r,i=Sh(r,["data","style"]);return t&&(i.data=Object.assign({},t)),e&&(i.style=Object.assign({},e)),i}function X9(r){return!get(r,["nodes","length"])&&!get(r,["edges","length"])&&!get(r,["combos","length"])}function Rc(r={},t={}){const{states:e=[],data:n={},style:i={},children:a=[]}=r,s=Sh(r,["states","data","style","children"]),{states:o=[],data:A={},style:l={},children:c=[]}=t,u=Sh(t,["states","data","style","children"]),h=(f,g)=>f.length!==g.length?!1:f.every((v,m)=>v===g[m]),d=(f,g)=>{const v=Object.keys(f),m=Object.keys(g);return v.length!==m.length?!1:v.every(w=>f[w]===g[w])};return!(!d(s,u)||!h(a,c)||!h(e,o)||!d(n,A)||!d(i,l))}const fx="__internal_override__";function gx(r){return r[fx]!==!1}var Eg=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};const oQ="g6-create-edge-assist-edge-id",Bg="g6-create-edge-assist-node-id";class bg extends Na{constructor(t,e){super(t,Object.assign({},bg.defaultOptions,e)),this.drop=n=>Eg(this,void 0,void 0,function*(){const{targetType:i}=n;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(n):yield this.cancelEdge()}),this.handleCreateEdge=n=>Eg(this,void 0,void 0,function*(){var i,a,s;if(!this.validate(n))return;const{graph:o,canvas:A,batch:l,element:c}=this.context,{style:u}=this.options;if(this.source){this.createEdge(n),yield this.cancelEdge();return}l.startBatch(),A.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([n.target.id])[0];const h=o.getElementData(this.source);o.addNodeData([{id:Bg,type:"circle",[fx]:!1,style:{size:1,visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=h.style)===null||i===void 0?void 0:i.x,y:(a=h.style)===null||a===void 0?void 0:a.y}}]),o.addEdgeData([{id:oQ,source:this.source,target:Bg,style:Object.assign({pointerEvents:"none"},u)}]),yield(s=c.draw({animation:!1}))===null||s===void 0?void 0:s.finished}),this.updateAssistEdge=n=>Eg(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:s}=this.context;a.translateNodeTo(Bg,[n.client.x,n.client.y]),yield(i=s.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=n=>{var i,a;const{graph:s}=this.context,{style:o,onFinish:A,onCreate:l}=this.options;if(((i=n.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const u=(a=this.getSelectedNodeIDs([n.target.id]))===null||a===void 0?void 0:a[0],h=`${this.source}-${u}-${sQ()}`,d=l({id:h,source:this.source,target:u,style:o});d&&(s.addEdgeData([d]),A(d))},this.cancelEdge=()=>Eg(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:i,element:a,batch:s}=this.context;i.removeNodeData([Bg]),this.source=void 0,yield(n=a.draw({animation:!1}))===null||n===void 0?void 0:n.finished,s.endBatch()}),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;this.unbindEvents(),e==="click"?(t.on($a.CLICK,this.handleCreateEdge),t.on(gl.CLICK,this.handleCreateEdge),t.on(To.CLICK,this.cancelEdge),t.on(Tf.CLICK,this.cancelEdge)):(t.on($a.DRAG_START,this.handleCreateEdge),t.on(gl.DRAG_START,this.handleCreateEdge),t.on(Yt.POINTER_UP,this.drop)),t.on(Yt.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;t.off($a.CLICK,this.handleCreateEdge),t.off(gl.CLICK,this.handleCreateEdge),t.off(To.CLICK,this.cancelEdge),t.off(Tf.CLICK,this.cancelEdge),t.off($a.DRAG_START,this.handleCreateEdge),t.off(gl.DRAG_START,this.handleCreateEdge),t.off(Yt.POINTER_UP,this.drop),t.off(Yt.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}bg.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};function AQ(r,t,e){var n;return function(){var i=this,a=arguments,s=function(){n=null,e||r.apply(i,a)},o=e&&!n;clearTimeout(n),n=setTimeout(s,t),o&&r.apply(i,a)}}var Mh=AQ,vx=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class xg extends Na{constructor(t,e){super(t,Object.assign({},xg.defaultOptions,e)),this.isDragging=!1,this.onDragStart=n=>{this.validate(n)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=n=>{var i,a,s,o;if(!this.isDragging||Rr.isPinching)return;const A=(a=(i=n.movement)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:n.dx,l=(o=(s=n.movement)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:n.dy;A|l&&this.translate([A,l],!1)},this.onDragEnd=()=>{var n,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},this.invokeOnFinish=Mh(()=>{var n,i;(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},300),this.shortcut=new EA(t.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if(Br(t)){const{up:e=[],down:n=[],left:i=[],right:a=[]}=t;this.shortcut.bind(e,s=>this.onTranslate([0,1],s)),this.shortcut.bind(n,s=>this.onTranslate([0,-1],s)),this.shortcut.bind(i,s=>this.onTranslate([1,0],s)),this.shortcut.bind(a,s=>this.onTranslate([-1,0],s))}else{const{graph:e}=this.context;e.on(Yt.DRAG_START,this.onDragStart),e.on(Yt.DRAG,this.onDrag),e.on(Yt.DRAG_END,this.onDragEnd)}}onTranslate(t,e){return vx(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:n}=this.options,i=n*-1;yield this.translate(Bs(t,i),this.options.animation),this.invokeOnFinish()})}translate(t,e){return vx(this,void 0,void 0,function*(){t=this.clampByDirection(t),t=this.clampByRange(t),t=this.clampByRotation(t),yield this.context.graph.translateBy(t,e)})}clampByRotation([t,e]){const n=this.context.graph.getRotation();return ob([t,e],n)}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,s]=i.getSize(),[o,A,l,c]=La(this.options.range),u=[s*o,a*A,s*l,a*c],h=pA(km(n.getCanvasCenter()),u),d=tr(n.getViewportCenter(),[t,e,0]);if(!ws(d,h)){const{min:[f,g],max:[v,m]}=h;(d[0]<f&&t>0||d[0]>v&&t<0)&&(t=0),(d[1]<g&&e>0||d[1]>m&&e<0)&&(e=0)}return[t,e]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return typeof e=="function"?e(t):!!e}unbindEvents(){this.shortcut.unbindAll();const{graph:t}=this.context;t.off(Yt.DRAG_START,this.onDragStart),t.off(Yt.DRAG,this.onDrag),t.off(Yt.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}xg.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var px=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Th extends Na{constructor(t,e){super(t,Object.assign({},Th.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>px(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:s}=this.context,o=n.target.id;this.target.forEach(A=>{const l=a.getParentData(A,nr);l&&Qt(l)===o&&a.refreshComboData(o),a.setParent(A,o,nr)}),yield(i=s==null?void 0:s.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=n=>{if(this.isDragging)return;const{type:i}=n,{canvas:a}=this.context,{cursor:s}=this.options;i===Yt.POINTER_ENTER?a.setCursor((s==null?void 0:s.grab)||"grab"):a.setCursor((s==null?void 0:s.default)||"default")},this.shortcut=new EA(t.graph),this.onDragStart=this.onDragStart.bind(this),this.onDrag=this.onDrag.bind(this),this.onDragEnd=this.onDragEnd.bind(this),this.onDrop=this.onDrop.bind(this),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.addEventListener("blur",this.onDragEnd),n.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.on(`${i}:${Yt.DRAG_START}`,this.onDragStart),t.on(`${i}:${Yt.DRAG}`,this.onDrag),t.on(`${i}:${Yt.DRAG_END}`,this.onDragEnd),t.on(`${i}:${Yt.POINTER_ENTER}`,this.setCursor),t.on(`${i}:${Yt.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(t.on(gl.DROP,this.onDrop),t.on(To.DROP,this.onDrop))}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}getDelta(t){const e=this.context.graph.getZoom();return bs([t.dx,t.dy],e)}onDragStart(t){var e;if(this.enable=this.validate(t),!this.enable)return;const{batch:n,canvas:i,graph:a}=this.context;i.setCursor(((e=this.options.cursor)===null||e===void 0?void 0:e.grabbing)||"grabbing"),this.isDragging=!0,n.startBatch();const s=t.target.id;a.getElementState(s).includes(this.options.state)?this.target=this.getSelectedNodeIDs([s]):this.target=[s],this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.options.shadow?this.moveShadow(e):this.moveElement(this.target,e)}onDragEnd(){var t,e,n;if(!this.enable)return;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:s=0,y:o=0}=this.shadow.attributes,[A,l]=tr([+s,+o],this.shadowOrigin);this.moveElement(this.target,[A,l])}this.showEdges(),(e=(t=this.options).onFinish)===null||e===void 0||e.call(t,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((n=this.options.cursor)===null||n===void 0?void 0:n.grab)||"grab"),this.isDragging=!1,this.target=[]}isKeydown(){const{trigger:t}=this.options;return t!=null&&t.length?this.shortcut.match(t):!0}validate(t){if(this.destroyed||Ch(t.target)||this.context.graph.isCollapsingExpanding||!this.isKeydown())return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}clampByRotation([t,e]){const n=this.context.graph.getRotation();return ob([t,e],n)}moveElement(t,e){return px(this,void 0,void 0,function*(){const{graph:n,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&t.forEach(s=>i.refreshComboData(s)),n.translateElementBy(Object.fromEntries(t.map(s=>[s,this.clampByRotation(e)])),!1)})}moveShadow(t){if(!this.shadow)return;const{x:e=0,y:n=0}=this.shadow.attributes,[i,a]=t;this.shadow.attr({x:+e+i,y:+n+a})}createShadow(t){const e=Or(this.options,"shadow"),n=ch(t.map(l=>this.context.element.getElement(l).getBounds())),[i,a]=n.min;this.shadowOrigin=[i,a];const[s,o]=gA(n),A={width:s,height:o,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},e),A),{visibility:"visible"})):(this.shadow=new xi({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},e),A),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:t,shadow:e}=this.options;if(t==="none"||e)return;const{graph:n}=this.context;t==="all"?this.hiddenEdges=n.getEdgeData().map(Qt):this.hiddenEdges=Array.from(new Set(this.target.map(i=>n.getRelatedEdgesData(i,t).map(Qt)).flat())),n.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.removeEventListener("blur",this.onDragEnd),n.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.off(`${i}:${Yt.DRAG_START}`,this.onDragStart),t.off(`${i}:${Yt.DRAG}`,this.onDrag),t.off(`${i}:${Yt.DRAG_END}`,this.onDragEnd),t.off(`${i}:${Yt.POINTER_ENTER}`,this.setCursor),t.off(`${i}:${Yt.POINTER_LEAVE}`,this.setCursor)}),t.off(`combo:${Yt.DROP}`,this.onDrop),t.off(`canvas:${Yt.DROP}`,this.onDrop)}destroy(){var t;this.unbindEvents(),(t=this.shadow)===null||t===void 0||t.destroy(),super.destroy()}}Th.defaultOptions={animation:!0,enable:r=>["node","combo"].includes(r.targetType),trigger:[],dropEffect:"move",state:"selected",hideEdge:"none",shadow:!1,shadowZIndex:100,shadowFill:"#F3F9FF",shadowFillOpacity:.5,shadowStroke:"#1890FF",shadowStrokeOpacity:.9,shadowLineDash:[5,5],cursor:{default:"default",grab:"grab",grabbing:"grabbing"}};var lQ="*",cQ=function(){function r(){this._events={}}return r.prototype.on=function(t,e,n){return this._events[t]||(this._events[t]=[]),this._events[t].push({callback:e,once:!!n}),this},r.prototype.once=function(t,e){return this.on(t,e,!0)},r.prototype.emit=function(t){for(var e=this,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var a=this._events[t]||[],s=this._events[lQ]||[],o=function(A){for(var l=A.length,c=0;c<l;c++)if(A[c]){var u=A[c],h=u.callback,d=u.once;d&&(A.splice(c,1),A.length===0&&delete e._events[t],l--,c--),h.apply(e,n)}};o(a),o(s)},r.prototype.off=function(t,e){if(!t)this._events={};else if(!e)delete this._events[t];else{for(var n=this._events[t]||[],i=n.length,a=0;a<i;a++)n[a].callback===e&&(n.splice(a,1),i--,a--);n.length===0&&delete this._events[t]}return this},r.prototype.getEvents=function(){return this._events},r}(),Cg=cQ;function yy(r,t,e,n){for(;r.length;){const i=r.shift();if(e(i))return!0;t.add(i.id),n(i.id).forEach(s=>{t.has(s.id)||(t.add(s.id),r.push(s))})}return!1}function Sg(r,t,e,n){if(e(r))return!0;t.add(r.id);for(const a of n(r.id))if(!t.has(a.id)&&Sg(a,t,e,n))return!0;return!1}const mx=()=>!0;class uQ{constructor(t){yr(this,"graph");yr(this,"nodeFilter");yr(this,"edgeFilter");yr(this,"cacheEnabled");yr(this,"inEdgesMap",new Map);yr(this,"outEdgesMap",new Map);yr(this,"bothEdgesMap",new Map);yr(this,"allNodesMap",new Map);yr(this,"allEdgesMap",new Map);yr(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});yr(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(t=>t.id))});yr(this,"updateCache",t=>{const e=new Set;t.forEach(n=>{const i=this.bothEdgesMap.get(n);if(i&&i.forEach(a=>e.add(a.id)),!this.hasNode(n))this.inEdgesMap.delete(n),this.outEdgesMap.delete(n),this.bothEdgesMap.delete(n),this.allNodesMap.delete(n);else{const a=this.graph.getRelatedEdges(n,"in").filter(this.edgeFilter),s=this.graph.getRelatedEdges(n,"out").filter(this.edgeFilter),o=Array.from(new Set([...a,...s]));o.forEach(A=>e.add(A.id)),this.inEdgesMap.set(n,a),this.outEdgesMap.set(n,s),this.bothEdgesMap.set(n,o),this.allNodesMap.set(n,this.graph.getNode(n))}}),e.forEach(n=>{this.hasEdge(n)?this.allEdgesMap.set(n,this.graph.getEdge(n)):this.allEdgesMap.delete(n)})});yr(this,"handleGraphChanged",t=>{const e=new Set;t.changes.forEach(n=>{switch(n.type){case"NodeAdded":e.add(n.value.id);break;case"NodeDataUpdated":e.add(n.id);break;case"EdgeAdded":e.add(n.value.source),e.add(n.value.target);break;case"EdgeUpdated":(n.propertyName==="source"||n.propertyName==="target")&&(e.add(n.oldValue),e.add(n.newValue));break;case"EdgeDataUpdated":if(t.graph.hasEdge(n.id)){const i=t.graph.getEdge(n.id);e.add(i.source),e.add(i.target)}break;case"EdgeRemoved":e.add(n.value.source),e.add(n.value.target);break;case"NodeRemoved":e.add(n.value.id);break;default:break}}),this.updateCache(e)});this.graph=t.graph;const e=t.nodeFilter||mx,n=t.edgeFilter||mx;this.nodeFilter=e,this.edgeFilter=i=>{const{source:a,target:s}=this.graph.getEdgeDetail(i.id);return!e(a)||!e(s)?!1:n(i,a,s)},t.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):t.cache==="manual"?this.cacheEnabled=!0:this.cacheEnabled=!1}startAutoCache(){this.refreshCache(),this.graph.on("changed",this.handleGraphChanged)}stopAutoCache(){this.graph.off("changed",this.handleGraphChanged)}checkNodeExistence(t){this.getNode(t)}hasNode(t){if(!this.graph.hasNode(t))return!1;const e=this.graph.getNode(t);return this.nodeFilter(e)}areNeighbors(t,e){return this.checkNodeExistence(t),this.getNeighbors(e).some(n=>n.id===t)}getNode(t){const e=this.graph.getNode(t);if(!this.nodeFilter(e))throw new Error("Node not found for id: "+t);return e}getRelatedEdges(t,e){return this.checkNodeExistence(t),this.cacheEnabled?e==="in"?this.inEdgesMap.get(t):e==="out"?this.outEdgesMap.get(t):this.bothEdgesMap.get(t):this.graph.getRelatedEdges(t,e).filter(this.edgeFilter)}getDegree(t,e){return this.getRelatedEdges(t,e).length}getSuccessors(t){const n=this.getRelatedEdges(t,"out").map(i=>this.getNode(i.target));return Array.from(new Set(n))}getPredecessors(t){const n=this.getRelatedEdges(t,"in").map(i=>this.getNode(i.source));return Array.from(new Set(n))}getNeighbors(t){const e=this.getPredecessors(t),n=this.getSuccessors(t);return Array.from(new Set([...e,...n]))}hasEdge(t){if(!this.graph.hasEdge(t))return!1;const e=this.graph.getEdge(t);return this.edgeFilter(e)}getEdge(t){const e=this.graph.getEdge(t);if(!this.edgeFilter(e))throw new Error("Edge not found for id: "+t);return e}getEdgeDetail(t){const e=this.getEdge(t);return{edge:e,source:this.getNode(e.source),target:this.getNode(e.target)}}hasTreeStructure(t){return this.graph.hasTreeStructure(t)}getRoots(t){return this.graph.getRoots(t).filter(this.nodeFilter)}getChildren(t,e){return this.checkNodeExistence(t),this.graph.getChildren(t,e).filter(this.nodeFilter)}getParent(t,e){this.checkNodeExistence(t);const n=this.graph.getParent(t,e);return!n||!this.nodeFilter(n)?null:n}getAllNodes(){return this.cacheEnabled?Array.from(this.allNodesMap.values()):this.graph.getAllNodes().filter(this.nodeFilter)}getAllEdges(){return this.cacheEnabled?Array.from(this.allEdgesMap.values()):this.graph.getAllEdges().filter(this.edgeFilter)}bfs(t,e,n="out"){const i={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[n];yy([this.getNode(t)],new Set,e,i)}dfs(t,e,n="out"){const i={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[n];Sg(this.getNode(t),new Set,e,i)}}class Hr extends Cg{constructor(e){super();yr(this,"nodeMap",new Map);yr(this,"edgeMap",new Map);yr(this,"inEdgesMap",new Map);yr(this,"outEdgesMap",new Map);yr(this,"bothEdgesMap",new Map);yr(this,"treeIndices",new Map);yr(this,"changes",[]);yr(this,"batchCount",0);yr(this,"onChanged",()=>{});yr(this,"batch",e=>{this.batchCount+=1,e(),this.batchCount-=1,this.batchCount||this.commit()});e&&(e.nodes&&this.addNodes(e.nodes),e.edges&&this.addEdges(e.edges),e.tree&&this.addTree(e.tree),e.onChanged&&(this.onChanged=e.onChanged))}commit(){const e=this.changes;this.changes=[];const n={graph:this,changes:e};this.emit("changed",n),this.onChanged(n)}reduceChanges(e){let n=[];return e.forEach(i=>{switch(i.type){case"NodeRemoved":{let a=!1;n=n.filter(s=>{if(s.type==="NodeAdded"){const o=s.value.id===i.value.id;return o&&(a=!0),!o}else{if(s.type==="NodeDataUpdated")return s.id!==i.value.id;if(s.type==="TreeStructureChanged")return s.nodeId!==i.value.id}return!0}),a||n.push(i);break}case"EdgeRemoved":{let a=!1;n=n.filter(s=>{if(s.type==="EdgeAdded"){const o=s.value.id===i.value.id;return o&&(a=!0),!o}else if(s.type==="EdgeDataUpdated"||s.type==="EdgeUpdated")return s.id!==i.value.id;return!0}),a||n.push(i);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const a=n.findIndex(o=>o.type===i.type&&o.id===i.id&&(i.propertyName===void 0||o.propertyName===i.propertyName)),s=n[a];s?i.propertyName!==void 0?s.newValue=i.newValue:(n.splice(a,1),n.push(i)):n.push(i);break}case"TreeStructureDetached":{n=n.filter(a=>a.type==="TreeStructureAttached"||a.type==="TreeStructureChanged"?a.treeKey!==i.treeKey:!0),n.push(i);break}case"TreeStructureChanged":{const a=n.find(s=>s.type==="TreeStructureChanged"&&s.treeKey===i.treeKey&&s.nodeId===i.nodeId);a?a.newParentId=i.newParentId:n.push(i);break}default:n.push(i);break}}),n}checkNodeExistence(e){this.getNode(e)}hasNode(e){return this.nodeMap.has(e)}areNeighbors(e,n){return this.getNeighbors(n).some(i=>i.id===e)}getNode(e){const n=this.nodeMap.get(e);if(!n)throw new Error("Node not found for id: "+e);return n}getRelatedEdges(e,n){if(this.checkNodeExistence(e),n==="in"){const i=this.inEdgesMap.get(e);return Array.from(i)}else if(n==="out"){const i=this.outEdgesMap.get(e);return Array.from(i)}else{const i=this.bothEdgesMap.get(e);return Array.from(i)}}getDegree(e,n){return this.getRelatedEdges(e,n).length}getSuccessors(e){const i=this.getRelatedEdges(e,"out").map(a=>this.getNode(a.target));return Array.from(new Set(i))}getPredecessors(e){const i=this.getRelatedEdges(e,"in").map(a=>this.getNode(a.source));return Array.from(new Set(i))}getNeighbors(e){const n=this.getPredecessors(e),i=this.getSuccessors(e);return Array.from(new Set([...n,...i]))}doAddNode(e){if(this.hasNode(e.id))throw new Error("Node already exists: "+e.id);this.nodeMap.set(e.id,e),this.inEdgesMap.set(e.id,new Set),this.outEdgesMap.set(e.id,new Set),this.bothEdgesMap.set(e.id,new Set),this.treeIndices.forEach(n=>{n.childrenMap.set(e.id,new Set)}),this.changes.push({type:"NodeAdded",value:e})}addNodes(e){this.batch(()=>{for(const n of e)this.doAddNode(n)})}addNode(e){this.addNodes([e])}doRemoveNode(e){const n=this.getNode(e),i=this.bothEdgesMap.get(e);i==null||i.forEach(a=>this.doRemoveEdge(a.id)),this.nodeMap.delete(e),this.treeIndices.forEach(a=>{var o,A;(o=a.childrenMap.get(e))==null||o.forEach(l=>{a.parentMap.delete(l.id)});const s=a.parentMap.get(e);s&&((A=a.childrenMap.get(s.id))==null||A.delete(n)),a.parentMap.delete(e),a.childrenMap.delete(e)}),this.bothEdgesMap.delete(e),this.inEdgesMap.delete(e),this.outEdgesMap.delete(e),this.changes.push({type:"NodeRemoved",value:n})}removeNodes(e){this.batch(()=>{e.forEach(n=>this.doRemoveNode(n))})}removeNode(e){this.removeNodes([e])}updateNodeDataProperty(e,n,i){const a=this.getNode(e);this.batch(()=>{const s=a.data[n],o=i;a.data[n]=o,this.changes.push({type:"NodeDataUpdated",id:e,propertyName:n,oldValue:s,newValue:o})})}mergeNodeData(e,n){this.batch(()=>{Object.entries(n).forEach(([i,a])=>{this.updateNodeDataProperty(e,i,a)})})}updateNodeData(...e){const n=e[0],i=this.getNode(n);if(typeof e[1]=="string"){this.updateNodeDataProperty(n,e[1],e[2]);return}let a;if(typeof e[1]=="function"){const s=e[1];a=s(i.data)}else typeof e[1]=="object"&&(a=e[1]);this.batch(()=>{const s=i.data,o=a;i.data=a,this.changes.push({type:"NodeDataUpdated",id:n,oldValue:s,newValue:o})})}checkEdgeExistence(e){if(!this.hasEdge(e))throw new Error("Edge not found for id: "+e)}hasEdge(e){return this.edgeMap.has(e)}getEdge(e){return this.checkEdgeExistence(e),this.edgeMap.get(e)}getEdgeDetail(e){const n=this.getEdge(e);return{edge:n,source:this.getNode(n.source),target:this.getNode(n.target)}}doAddEdge(e){if(this.hasEdge(e.id))throw new Error("Edge already exists: "+e.id);this.checkNodeExistence(e.source),this.checkNodeExistence(e.target),this.edgeMap.set(e.id,e);const n=this.inEdgesMap.get(e.target),i=this.outEdgesMap.get(e.source),a=this.bothEdgesMap.get(e.source),s=this.bothEdgesMap.get(e.target);n.add(e),i.add(e),a.add(e),s.add(e),this.changes.push({type:"EdgeAdded",value:e})}addEdges(e){this.batch(()=>{for(const n of e)this.doAddEdge(n)})}addEdge(e){this.addEdges([e])}doRemoveEdge(e){const n=this.getEdge(e),i=this.outEdgesMap.get(n.source),a=this.inEdgesMap.get(n.target),s=this.bothEdgesMap.get(n.source),o=this.bothEdgesMap.get(n.target);i.delete(n),a.delete(n),s.delete(n),o.delete(n),this.edgeMap.delete(e),this.changes.push({type:"EdgeRemoved",value:n})}removeEdges(e){this.batch(()=>{e.forEach(n=>this.doRemoveEdge(n))})}removeEdge(e){this.removeEdges([e])}updateEdgeSource(e,n){const i=this.getEdge(e);this.checkNodeExistence(n);const a=i.source,s=n;this.outEdgesMap.get(a).delete(i),this.bothEdgesMap.get(a).delete(i),this.outEdgesMap.get(s).add(i),this.bothEdgesMap.get(s).add(i),i.source=n,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:e,propertyName:"source",oldValue:a,newValue:s})})}updateEdgeTarget(e,n){const i=this.getEdge(e);this.checkNodeExistence(n);const a=i.target,s=n;this.inEdgesMap.get(a).delete(i),this.bothEdgesMap.get(a).delete(i),this.inEdgesMap.get(s).add(i),this.bothEdgesMap.get(s).add(i),i.target=n,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:e,propertyName:"target",oldValue:a,newValue:s})})}updateEdgeDataProperty(e,n,i){const a=this.getEdge(e);this.batch(()=>{const s=a.data[n],o=i;a.data[n]=o,this.changes.push({type:"EdgeDataUpdated",id:e,propertyName:n,oldValue:s,newValue:o})})}updateEdgeData(...e){const n=e[0],i=this.getEdge(n);if(typeof e[1]=="string"){this.updateEdgeDataProperty(n,e[1],e[2]);return}let a;if(typeof e[1]=="function"){const s=e[1];a=s(i.data)}else typeof e[1]=="object"&&(a=e[1]);this.batch(()=>{const s=i.data,o=a;i.data=a,this.changes.push({type:"EdgeDataUpdated",id:n,oldValue:s,newValue:o})})}mergeEdgeData(e,n){this.batch(()=>{Object.entries(n).forEach(([i,a])=>{this.updateEdgeDataProperty(e,i,a)})})}checkTreeExistence(e){if(!this.hasTreeStructure(e))throw new Error("Tree structure not found for treeKey: "+e)}hasTreeStructure(e){return this.treeIndices.has(e)}attachTreeStructure(e){this.treeIndices.has(e)||(this.treeIndices.set(e,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:e})}))}detachTreeStructure(e){this.checkTreeExistence(e),this.treeIndices.delete(e),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:e})})}addTree(e,n){this.batch(()=>{this.attachTreeStructure(n);const i=[],a=Array.isArray(e)?e:[e];for(;a.length;){const s=a.shift();i.push(s),s.children&&a.push(...s.children)}this.addNodes(i),i.forEach(s=>{var o;(o=s.children)==null||o.forEach(A=>{this.setParent(A.id,s.id,n)})})})}getRoots(e){return this.checkTreeExistence(e),this.getAllNodes().filter(n=>!this.getParent(n.id,e))}getChildren(e,n){this.checkNodeExistence(e),this.checkTreeExistence(n);const a=this.treeIndices.get(n).childrenMap.get(e);return Array.from(a||[])}getParent(e,n){return this.checkNodeExistence(e),this.checkTreeExistence(n),this.treeIndices.get(n).parentMap.get(e)||null}getAncestors(e,n){const i=[];let a=this.getNode(e),s;for(;s=this.getParent(a.id,n);)i.push(s),a=s;return i}setParent(e,n,i){var c,u;this.checkTreeExistence(i);const a=this.treeIndices.get(i);if(!a)return;const s=this.getNode(e),o=a.parentMap.get(e);if((o==null?void 0:o.id)===n)return;if(n==null){o&&((c=a.childrenMap.get(o.id))==null||c.delete(s)),a.parentMap.delete(e);return}const A=this.getNode(n);a.parentMap.set(e,A),o&&((u=a.childrenMap.get(o.id))==null||u.delete(s));let l=a.childrenMap.get(A.id);l||(l=new Set,a.childrenMap.set(A.id,l)),l.add(s),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:i,nodeId:e,oldParentId:o==null?void 0:o.id,newParentId:A.id})})}dfsTree(e,n,i){const a=s=>this.getChildren(s,i);return Sg(this.getNode(e),new Set,n,a)}bfsTree(e,n,i){const a=s=>this.getChildren(s,i);return yy([this.getNode(e)],new Set,n,a)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(e,n,i="out"){const a={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[i];return yy([this.getNode(e)],new Set,n,a)}dfs(e,n,i="out"){const a={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[i];return Sg(this.getNode(e),new Set,n,a)}clone(){const e=this.getAllNodes().map(a=>Y1(ru({},a),{data:ru({},a.data)})),n=this.getAllEdges().map(a=>Y1(ru({},a),{data:ru({},a.data)})),i=new Hr({nodes:e,edges:n});return this.treeIndices.forEach(({parentMap:a,childrenMap:s},o)=>{const A=new Map;a.forEach((c,u)=>{A.set(u,i.getNode(c.id))});const l=new Map;s.forEach((c,u)=>{l.set(u,new Set(Array.from(c).map(h=>i.getNode(h.id))))}),i.treeIndices.set(o,{parentMap:A,childrenMap:l})}),i}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(e){return new uQ(ru({graph:this},e))}}class Mg{constructor(t,e){this.context=t,this.options=e||{}}}var hQ=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})},dQ=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function J9(r){const{type:t}=r;return!!(["comboCombined","comboForce"].includes(t)||t==="antv-dagre"&&r.sortByCombo)}function fQ(r){const{type:t}=r;return["compact-box","mindmap","dendrogram","indented"].includes(t)}function q9(r){return isNumber(r.x)&&isNumber(r.y)}function gQ(r){return!Array.isArray(r)&&(r==null?void 0:r.preLayout)}function Tg(r){const{nodes:t,edges:e}=r,n={nodes:[],edges:[],combos:[]};return t.forEach(i=>{const a=i.data._isCombo?n.combos:n.nodes,{x:s,y:o,z:A=0}=i.data;a==null||a.push({id:i.id,style:{x:s,y:o,z:A}})}),e.forEach(i=>{const{id:a,source:s,target:o,data:{points:A=[],controlPoints:l=A.slice(1,A.length-1)}}=i;n.edges.push({id:a,source:s,target:o,style:Object.assign({},l!=null&&l.length?{controlPoints:l.map(Si)}:{})})}),n}function vQ(r,t){class e extends Mg{constructor(i,a){if(super(i,a),this.instance=new r({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const s=this.instance;this.stop=s.stop.bind(s),this.tick=o=>{const A=s.tick(o);return Tg(A)}}}execute(i,a){return hQ(this,void 0,void 0,function*(){return Tg(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions(Ci({},this.options,a))))})}transformOptions(i){if(!("onTick"in i))return i;const a=i.onTick;return i.onTick=s=>a(Tg(s)),i}graphData2LayoutModel(i){const{nodes:a=[],edges:s=[],combos:o=[]}=i,A=a.map(d=>{const f=Qt(d),{data:g,style:v,combo:m}=d,w=dQ(d,["data","style","combo"]),C={id:f,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),{data:g}),m?{parentId:m}:{}),{style:v}),w)};return v!=null&&v.x&&Object.assign(C.data,{x:v.x}),v!=null&&v.y&&Object.assign(C.data,{y:v.y}),v!=null&&v.z&&Object.assign(C.data,{z:v.z}),C}),l=new Map(A.map(d=>[d.id,d])),c=s.filter(d=>{const{source:f,target:g}=d;return l.has(f)&&l.has(g)}).map(d=>{const{source:f,target:g,data:v,style:m}=d;return{id:Qt(d),source:f,target:g,data:Object.assign({},v),style:Object.assign({},m)}}),u=o.map(d=>({id:Qt(d),data:Object.assign({_isCombo:!0},d.data),style:Object.assign({},d.style)})),h=new Hr({nodes:[...A,...u],edges:c});return t.model.model.hasTreeStructure(nr)&&(h.attachTreeStructure(nr),A.forEach(d=>{const f=t.model.model.getParent(d.id,nr);f&&h.hasNode(f.id)&&h.setParent(d.id,f.id,nr)})),h}}return e}function wy(r,t,...e){if(t in r)return r[t](...e);if("instance"in r){const n=r.instance;if(t in n)return n[t](...e)}return null}function yx(r,t){if(t in r)return r[t];if("instance"in r){const e=r.instance;if(t in e)return e[t]}return null}var pQ=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class mQ extends Th{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(t=>["d3-force","d3-force-3d"].includes(t==null?void 0:t.id))}validate(t){return this.context.layout?this.forceLayoutInstance?super.validate(t):(ha.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(t,e){return pQ(this,void 0,void 0,function*(){const n=this.forceLayoutInstance;this.context.graph.getNodeData(t).forEach((i,a)=>{const{x:s=0,y:o=0}=i.style||{};n&&wy(n,"setFixedPosition",t[a],[...tn([+s,+o],this.clampByRotation(e))])})})}onDragStart(t){if(this.enable=this.validate(t),!this.enable)return;this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const e=this.forceLayoutInstance;e&&yx(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:i=0,y:a=0}=n.style||{};e&&wy(e,"setFixedPosition",Qt(n),[+i,+a])})}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.moveElement(this.target,e)}onDragEnd(){const t=this.forceLayoutInstance;t&&yx(t,"simulation").alphaTarget(0),!this.options.fixed&&this.context.graph.getNodeData(this.target).forEach(e=>{t&&wy(t,"setFixedPosition",Qt(e),[null,null,null])})}}var wx=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Fg extends Na{constructor(t,e){super(t,Object.assign({},Fg.defaultOptions,e)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>wx(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context,{state:a,nodeFilter:s,edgeFilter:o,comboFilter:A}=this.options,l=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(s),c=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(o),u=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(A),h=this.isZoomEvent(n)?this.zoom=Math.max(.01,Math.min(n.data.scale,10)):this.zoom,d=[...l,...u];d.length>0&&d.forEach(f=>this.fixNodeLike(f,h)),this.updateRelatedEdges(),c.length>0&&c.forEach(f=>this.fixEdge(f,h))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(n,i,a)=>{var s;const o=this.cachedStyles.get(n)||[],A=((s=o.find(l=>l.shape===i))===null||s===void 0?void 0:s.style)||{};return a in A||(A[a]=i.attributes[a],this.cachedStyles.set(n,[...o.filter(l=>l.shape!==i),{shape:i,style:A}])),A[a]},this.scaleEntireElement=(n,i,a)=>{i.setLocalScale(1/a);const s=this.cachedStyles.get(n)||[];s.push({shape:i}),this.cachedStyles.set(n,s)},this.scaleSpecificShapes=(n,i,a)=>{const s=mN(n);(Array.isArray(a)?a:[a]).forEach(A=>{const{shape:l,fields:c}=A,u=typeof l=="function"?l(s):n.getShape(l);if(u){if(!c){this.scaleEntireElement(n.id,u,i);return}c.forEach(h=>{const d=this.getOriginalFieldValue(n.id,u,h);ye(d)&&(u.style[h]=d/i)})}})},this.skipIfExceedViewport=n=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(n.getRenderBounds(),!1,30))},this.fixNodeLike=(n,i)=>{const a=Qt(n),{element:s,model:o}=this.context,A=s.getElement(a);if(!A||this.skipIfExceedViewport(A))return;o.getRelatedEdgesData(a).forEach(u=>this.relatedEdgeToUpdate.add(Qt(u)));const c=this.options[A.type];if(!c){this.scaleEntireElement(a,A,i);return}this.scaleSpecificShapes(A,i,c)},this.fixEdge=(n,i)=>{const a=Qt(n),s=this.context.element.getElement(a);if(!s||this.skipIfExceedViewport(s))return;const o=this.options.edge;if(!o){s.style.transformOrigin="center",this.scaleEntireElement(a,s,i);return}this.scaleSpecificShapes(s,i,o)},this.updateRelatedEdges=()=>{const{element:n}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=n.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=n=>wx(this,void 0,void 0,function*(){var i;!((i=n.data)===null||i===void 0)&&i.firstRender||(this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}}))}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(i=>{i.forEach(({shape:a,style:s})=>{if(ro(s))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(s).forEach(([o,A])=>a.style[o]=A)}})});const{graph:t,element:e}=this.context,n=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&t.getElementType(i)==="node");if(n.length>0){const i=new Set;n.forEach(a=>{t.getRelatedEdgesData(a).forEach(s=>i.add(Qt(s)))}),i.forEach(a=>{const s=e==null?void 0:e.getElement(a);s==null||s.update({})})}}}bindEvents(){const{graph:t}=this.context;t.on(Ae.AFTER_DRAW,this.resetTransform),t.on(Ae.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:t}=this.context;t.off(Ae.AFTER_DRAW,this.resetTransform),t.off(Ae.AFTER_TRANSFORM,this.fixElementSize)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Fg.defaultOptions={enable:r=>r.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var yQ=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Og extends Na{constructor(t,e){super(t,Object.assign({},Og.defaultOptions,e)),this.focus=n=>yQ(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context;yield i.focusElement(n.target.id,this.options.animation)}),this.shortcut=new EA(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),wl.forEach(e=>{t.on(`${e}:${Yt.CLICK}`,this.focus)})}validate(t){if(this.destroyed||!this.isKeydown())return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}isKeydown(){const{trigger:t}=this.options;return t!=null&&t.length?this.shortcut.match(t):!0}unbindEvents(){const{graph:t}=this.context;wl.forEach(e=>{t.off(`${e}:${Yt.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),this.shortcut.destroy(),super.destroy()}}Og.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0,trigger:[]};class Ig extends Na{constructor(t,e){super(t,Object.assign({},Ig.defaultOptions,e)),this.isFrozen=!1,this.toggleFrozen=n=>{this.isFrozen=n.type==="dragstart"},this.hoverElement=n=>{if(!this.validate(n))return;const i=n.type===Yt.POINTER_ENTER;this.updateElementsState(n,i);const{onHover:a,onHoverEnd:s}=this.options;i?a==null||a(n):s==null||s(n)},this.updateElementsState=(n,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:s,animation:o,inactiveState:A}=this.options,l=this.getActiveIds(n),c={};if(s&&Object.assign(c,this.getElementsState(l,s,i)),A){const u=eb(a.getData(),!0).filter(h=>!l.includes(h));Object.assign(c,this.getElementsState(u,A,i))}a.setElementState(c,o)},this.getElementsState=(n,i,a)=>{const{graph:s}=this.context,o={};return n.forEach(A=>{const l=s.getElementState(A);a?o[A]=l.includes(i)?l:[...l,i]:o[A]=l.filter(c=>c!==i)}),o},this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),wl.forEach(n=>{t.on(`${n}:${Yt.POINTER_ENTER}`,this.hoverElement),t.on(`${n}:${Yt.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.addEventListener(`${Yt.DRAG_START}`,this.toggleFrozen),e.addEventListener(`${Yt.DRAG_END}`,this.toggleFrozen)}getActiveIds(t){const{graph:e}=this.context,{degree:n,direction:i}=this.options,a=t.target.id;return n?mb(e,t.targetType,a,typeof n=="function"?n(t):n,i):[a]}validate(t){if(this.destroyed||this.isFrozen||Ch(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;wl.forEach(n=>{t.off(`${n}:${Yt.POINTER_ENTER}`,this.hoverElement),t.off(`${n}:${Yt.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.removeEventListener(`${Yt.DRAG_START}`,this.toggleFrozen),e.removeEventListener(`${Yt.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}Ig.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class wQ extends vh{onPointerDown(t){if(!super.validate(t)||!super.isKeydown()||this.points)return;const{canvas:e,graph:n}=this.context;this.pathShape=new Pi({id:"g6-lasso-select",style:this.options.style}),e.appendChild(this.pathShape),this.points=[jf(t,n)]}onPointerMove(t){var e;if(!this.points)return;const{immediately:n,mode:i}=this.options;this.points.push(jf(t,this.context.graph)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",dN(this.points)),n&&i==="default"&&this.points.length>2&&super.updateElementsStates(this.points)}onPointerUp(){if(this.points){if(this.points.length<2){this.clearLasso();return}super.updateElementsStates(this.points),this.clearLasso()}}clearLasso(){var t;(t=this.pathShape)===null||t===void 0||t.remove(),this.pathShape=void 0,this.points=void 0}}class Lg extends Na{constructor(t,e){super(t,Object.assign({},Lg.defaultOptions,e)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(n,i,a)=>{n.filter(Boolean).forEach(s=>{i==="hidden"&&!s.isVisible()?this.hiddenShapes.push(s):i==="visible"&&this.hiddenShapes.includes(s)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(s),1):ml(s,i,a)})},this.filterShapes=(n,i)=>{if(Wt(i))return s=>!i(n,s);const a=i==null?void 0:i[n];return s=>s.className?!(a!=null&&a.includes(s.className)):!0},this.hideShapes=n=>{if(!this.validate(n)||!this.isVisible)return;const{element:i}=this.context,{shapes:a={}}=this.options;this.setElementsVisibility(i.getNodes(),"hidden",this.filterShapes("node",a)),this.setElementsVisibility(i.getEdges(),"hidden",this.filterShapes("edge",a)),this.setElementsVisibility(i.getCombos(),"hidden",this.filterShapes("combo",a)),this.isVisible=!1},this.showShapes=Mh(n=>{if(!this.validate(n)||this.isVisible)return;const{element:i}=this.context;this.setElementsVisibility(i.getNodes(),"visible"),this.setElementsVisibility(i.getEdges(),"visible"),this.setElementsVisibility(i.getCombos(),"visible"),this.isVisible=!0},this.options.debounce),this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(Ae.BEFORE_TRANSFORM,this.hideShapes),t.on(Ae.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:t}=this.context;t.off(Ae.BEFORE_TRANSFORM,this.hideShapes),t.off(Ae.AFTER_TRANSFORM,this.showShapes)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Lg.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};var Ex=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Ng extends Na{constructor(t,e){super(t,Object.assign({},Ng.defaultOptions,e)),this.onWheel=n=>Ex(this,void 0,void 0,function*(){this.options.preventDefault&&n.preventDefault();const i=n.deltaX,a=n.deltaY;yield this.scroll([-i,-a],n)}),this.shortcut=new EA(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t,e;const{trigger:n}=this.options;if(this.shortcut.unbindAll(),Br(n)){(t=this.graphDom)===null||t===void 0||t.removeEventListener(Yt.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:s=[],right:o=[]}=n;this.shortcut.bind(i,A=>this.scroll([0,-10],A)),this.shortcut.bind(a,A=>this.scroll([0,10],A)),this.shortcut.bind(s,A=>this.scroll([-10,0],A)),this.shortcut.bind(o,A=>this.scroll([10,0],A))}else(e=this.graphDom)===null||e===void 0||e.addEventListener(Yt.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(t){const{sensitivity:e}=this.options;return t=Bs(t,e),t=this.clampByDirection(t),t=this.clampByRange(t),t}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,s]=i.getSize(),[o,A,l,c]=La(this.options.range),u=[s*o,a*A,s*l,a*c],h=pA(km(n.getCanvasCenter()),u),d=tr(n.getViewportCenter(),[t,e,0]);if(!ws(d,h)){const{min:[f,g],max:[v,m]}=h;(d[0]<f&&t>0||d[0]>v&&t<0)&&(t=0),(d[1]<g&&e>0||d[1]>m&&e<0)&&(e=0)}return[t,e]}scroll(t,e){return Ex(this,void 0,void 0,function*(){if(!this.validate(e))return;const{onFinish:n}=this.options,i=this.context.graph,a=this.formatDisplacement(t);yield i.translateBy(a,!1),n==null||n()})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.graphDom)===null||t===void 0||t.removeEventListener(Yt.WHEEL,this.onWheel),super.destroy()}}Ng.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var Bx=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class kg extends Na{constructor(t,e){super(t,Object.assign({},kg.defaultOptions,e)),this.zoom=(n,i,a)=>Bx(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:s}=this.context;let o=this.options.origin;!o&&"viewport"in i&&(o=Si(i.viewport));const{sensitivity:A,onFinish:l}=this.options,c=1+hr(n,-50,50)*A/100,u=s.getZoom();yield s.zoomTo(u*c,a,o),l==null||l()}),this.onReset=()=>Bx(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=n=>{this.options.preventDefault&&n.preventDefault()},this.shortcut=new EA(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if(this.shortcut.unbindAll(),Array.isArray(t))if(t.includes(Yt.PINCH))this.shortcut.bind([Yt.PINCH],e=>{this.zoom(e.scale,e,!1)});else{const e=this.context.canvas.getContainer();e==null||e.addEventListener(Yt.WHEEL,this.preventDefault),this.shortcut.bind([...t,Yt.WHEEL],n=>{const{deltaX:i,deltaY:a}=n;this.zoom(-(a!=null?a:i),n,!1)})}if(typeof t=="object"){const{zoomIn:e=[],zoomOut:n=[],reset:i=[]}=t;this.shortcut.bind(e,a=>this.zoom(10,a,this.options.animation)),this.shortcut.bind(n,a=>this.zoom(-10,a,this.options.animation)),this.shortcut.bind(i,this.onReset)}}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return Wt(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.context.canvas.getContainer())===null||t===void 0||t.removeEventListener(Yt.WHEEL,this.preventDefault),super.destroy()}}kg.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};function bx(r,t,e,n="height"){const i=r[n],a=t[n];return e==="center"?(i+a)/2:r.height}const Ml=Object.assign,EQ={getId:r=>r.id||r.name,getPreH:r=>r.preH||0,getPreV:r=>r.preV||0,getHGap:r=>r.hgap||18,getVGap:r=>r.vgap||18,getChildren:r=>r.children,getHeight:r=>r.height||36,getWidth(r){const t=r.label||" ";return r.width||18*t.split("").length}};class Qg{constructor(t,e){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof Qg||"x"in t&&"y"in t&&"children"in t){const a=t;return this.data=a.data,this.id=a.id,this.x=a.x,this.y=a.y,this.width=a.width,this.height=a.height,this.depth=a.depth,this.children=a.children,this.parent=a.parent,this.hgap=a.hgap,this.vgap=a.vgap,this.preH=a.preH,void(this.preV=a.preV)}this.data=t;const n=e.getHGap(t),i=e.getVGap(t);this.preH=e.getPreH(t),this.preV=e.getPreV(t),this.width=e.getWidth(t),this.height=e.getHeight(t),this.width+=this.preH,this.height+=this.preV,this.id=e.getId(t),this.addGap(n,i)}isRoot(){return this.depth===0}isLeaf(){return this.children.length===0}addGap(t,e){this.hgap+=t,this.vgap+=e,this.width+=2*t,this.height+=2*e}eachNode(t){let e,n=[this];for(;e=n.shift();)t(e),n=e.children.concat(n)}DFTraverse(t){this.eachNode(t)}BFTraverse(t){let e,n=[this];for(;e=n.shift();)t(e),n=n.concat(e.children)}getBoundingBox(){const t={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(e=>{t.left=Math.min(t.left,e.x),t.top=Math.min(t.top,e.y),t.width=Math.max(t.width,e.x+e.width),t.height=Math.max(t.height,e.y+e.height)}),t}translate(t=0,e=0){this.eachNode(n=>{n.x+=t,n.y+=e,n.x+=n.preH,n.y+=n.preV})}right2left(){const t=this.getBoundingBox();this.eachNode(e=>{e.x=e.x-2*(e.x-t.left)-e.width}),this.translate(t.width,0)}bottom2top(){const t=this.getBoundingBox();this.eachNode(e=>{e.y=e.y-2*(e.y-t.top)-e.height}),this.translate(0,t.height)}}function Ey(r,t={},e){t=Ml({},EQ,t);const n=new Qg(r,t),i=[n];let a;if(!e&&!r.collapsed){for(;a=i.shift();)if(!a.data.collapsed){const s=t.getChildren(a.data),o=s?s.length:0;if(a.children=new Array(o),s&&o)for(let A=0;A<o;A++){const l=new Qg(s[A],t);a.children[A]=l,i.push(l),l.parent=a,l.depth=a.depth+1}}}return n}class Ug{constructor(t,e={}){this.options=e,this.rootNode=Ey(t,e)}execute(){throw new Error("please override this method")}}let BQ=class j0{constructor(t=0,e=0,n=0,i=[]){this.x=0,this.prelim=0,this.mod=0,this.shift=0,this.change=0,this.tl=null,this.tr=null,this.el=null,this.er=null,this.msel=0,this.mser=0,this.w=t||0,this.h=e||0,this.y=n||0,this.c=i||[],this.cs=i.length}static fromNode(t,e){if(!t)return null;const n=[];return t.children.forEach(i=>{const a=j0.fromNode(i,e);a&&n.push(a)}),e?new j0(t.height,t.width,t.x,n):new j0(t.width,t.height,t.y,n)}};function xx(r,t,e){e?r.y+=t:r.x+=t,r.children.forEach(n=>{xx(n,t,e)})}function Cx(r,t){let e=t?r.y:r.x;return r.children.forEach(n=>{e=Math.min(Cx(n,t),e)}),e}function bQ(r,t){xx(r,-Cx(r,t),t)}function Sx(r,t,e){e?t.y=r.x:t.x=r.x,r.c.forEach((n,i)=>{Sx(n,t.children[i],e)})}function Mx(r,t,e=0){t?(r.x=e,e+=r.width):(r.y=e,e+=r.height),r.children.forEach(n=>{Mx(n,t,e)})}function xQ(r,t={}){const e=t.isHorizontal;function n(u){u.cs===0?(u.el=u,u.er=u,u.msel=u.mser=0):(u.el=u.c[0].el,u.msel=u.c[0].msel,u.er=u.c[u.cs-1].er,u.mser=u.c[u.cs-1].mser)}function i(u,h,d){let f=u.c[h-1],g=f.mod,v=u.c[h],m=v.mod;for(;f!==null&&v!==null;){d&&A(f)>d.low&&(d=d.nxt);const w=g+f.prelim+f.w-(m+v.prelim);w>0&&(m+=w,d&&a(u,h,d.index,w));const C=A(f),F=A(v);C<=F&&(f=o(f),f!==null&&(g+=f.mod)),C>=F&&(v=s(v),v!==null&&(m+=v.mod))}!f&&v?function(w,C,F,Q){const D=w.c[0].el;D.tl=F;const K=Q-F.mod-w.c[0].msel;D.mod+=K,D.prelim-=K,w.c[0].el=w.c[C].el,w.c[0].msel=w.c[C].msel}(u,h,v,m):f&&!v&&function(w,C,F,Q){const D=w.c[C].er;D.tr=F;const K=Q-F.mod-w.c[C].mser;D.mod+=K,D.prelim-=K,w.c[C].er=w.c[C-1].er,w.c[C].mser=w.c[C-1].mser}(u,h,f,g)}function a(u,h,d,f){u.c[h].mod+=f,u.c[h].msel+=f,u.c[h].mser+=f,function(g,v,m,w){if(m!==v-1){const C=v-m;g.c[m+1].shift+=w/C,g.c[v].shift-=w/C,g.c[v].change-=w-w/C}}(u,h,d,f)}function s(u){return u.cs===0?u.tl:u.c[0]}function o(u){return u.cs===0?u.tr:u.c[u.cs-1]}function A(u){return u.y+u.h}function l(u,h,d){for(;d!==null&&u>=d.low;)d=d.nxt;return{low:u,index:h,nxt:d}}Mx(r,e);const c=BQ.fromNode(r,e);return c&&(function u(h){if(h.cs===0)return void n(h);u(h.c[0]);let d=l(A(h.c[0].el),0,null);for(let f=1;f<h.cs;++f){u(h.c[f]);const g=A(h.c[f].er);i(h,f,d),d=l(g,f,d)}(function(f){f.prelim=(f.c[0].prelim+f.c[0].mod+f.c[f.cs-1].mod+f.c[f.cs-1].prelim+f.c[f.cs-1].w)/2-f.w/2})(h),n(h)}(c),function u(h,d){d+=h.mod,h.x=h.prelim+d,function(f){let g=0,v=0;for(let m=0;m<f.cs;m++)g+=f.c[m].shift,v+=g+f.c[m].change,f.c[m].mod+=v}(h);for(let f=0;f<h.cs;f++)u(h.c[f],d)}(c,0),Sx(c,r,e),bQ(r,e)),r}function Tx(r,t){const e=Ey(r.data,t,!0),n=Ey(r.data,t,!0),i=r.children.length,a=Math.round(i/2),s=t.getSide||function(o,A){return A<a?"right":"left"};for(let o=0;o<i;o++){const A=r.children[o];s(A,o)==="right"?n.children.push(A):e.children.push(A)}return e.eachNode(o=>{o.isRoot()||(o.side="left")}),n.eachNode(o=>{o.isRoot()||(o.side="right")}),{left:e,right:n}}const SA=["LR","RL","TB","BT","H","V"],CQ=["LR","RL","H"],SQ=SA[0];function By(r,t,e){const n=t.direction||SQ;if(t.isHorizontal=(a=>CQ.indexOf(a)>-1)(n),n&&SA.indexOf(n)===-1)throw new TypeError(`Invalid direction: ${n}`);if(n===SA[0])e(r,t);else if(n===SA[1])e(r,t),r.right2left();else if(n===SA[2])e(r,t);else if(n===SA[3])e(r,t),r.bottom2top();else if(n===SA[4]||n===SA[5]){const{left:a,right:s}=Tx(r,t);e(a,t),e(s,t),t.isHorizontal?a.right2left():a.bottom2top(),s.translate(a.x-s.x,a.y-s.y),r.x=a.x,r.y=s.y;const o=r.getBoundingBox();t.isHorizontal?o.top<0&&r.translate(0,-o.top):o.left<0&&r.translate(-o.left,0)}let i=t.fixedRoot;return i===void 0&&(i=!0),i&&r.translate(-(r.x+r.width/2+r.hgap),-(r.y+r.height/2+r.vgap)),function(a,s){if(s.radial){const[o,A]=s.isHorizontal?["x","y"]:["y","x"],l={x:1/0,y:1/0},c={x:-1/0,y:-1/0};let u=0;a.DFTraverse(f=>{u++;const{x:g,y:v}=f;l.x=Math.min(l.x,g),l.y=Math.min(l.y,v),c.x=Math.max(c.x,g),c.y=Math.max(c.y,v)});const h=c[A]-l[A];if(h===0)return;const d=2*Math.PI/u;a.DFTraverse(f=>{const g=f[A],v=l[A],m=f[o],w=a[o],C=(g-v)/h*(2*Math.PI-d)+d,F=m-w;f.x=Math.cos(C)*F,f.y=Math.sin(C)*F})}}(r,t),r}class MQ extends Ug{execute(){return By(this.rootNode,this.options,xQ)}}const TQ={};function Fx(r,t){const e=Ml({},TQ,t);return new MQ(r,e).execute()}class FQ{constructor(t=0,e=[]){this.x=0,this.y=0,this.leftChild=null,this.rightChild=null,this.isLeaf=!1,this.height=t,this.children=e}}const OQ={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function Ox(r,t,e){e?(t.x=r.x,t.y=r.y):(t.x=r.y,t.y=r.x),r.children.forEach((n,i)=>{Ox(n,t.children[i],e)})}function IQ(r,t={}){const e=Ml({},OQ,t);let n=0,i=null;const a=function s(o){o.width=0,o.depth&&o.depth>n&&(n=o.depth);const A=o.children,l=A.length,c=new FQ(0,[]);return A.forEach((u,h)=>{const d=s(u);c.children.push(d),h===0&&(c.leftChild=d),h===l-1&&(c.rightChild=d)}),c.originNode=o,c.isLeaf=o.isLeaf(),c}(r);return function s(o){if(o.isLeaf||o.children.length===0)o.drawingDepth=n;else{const A=o.children.map(c=>s(c)),l=Math.min(...A);o.drawingDepth=l-1}return o.drawingDepth}(a),function s(o){o.x=o.drawingDepth*e.rankSep,o.isLeaf?(o.y=0,i&&(o.y=i.y+i.height+e.nodeSep,o.originNode.parent!==i.originNode.parent&&(o.y+=e.subTreeSep)),i=o):(o.children.forEach(A=>{s(A)}),o.y=(o.leftChild.y+o.rightChild.y)/2)}(a),Ox(a,r,e.isHorizontal),r}class LQ extends Ug{execute(){return this.rootNode.width=0,By(this.rootNode,this.options,IQ)}}const NQ={};function Ix(r,t){const e=Ml({},NQ,t);return new LQ(r,e).execute()}function Pg(r,t,e,n){let i=null;r.eachNode(a=>{(function(s,o,A,l,c){const u=(typeof A=="function"?A(s):A)*s.depth;if(!l)try{if(s.parent&&s.id===s.parent.children[0].id)return s.x+=u,void(s.y=o?o.y:0)}catch(h){}if(s.x+=u,o){if(s.y=o.y+bx(o,s,c),o.parent&&s.parent&&s.parent.id!==o.parent.id){const h=o.parent,d=h.y+bx(h,s,c);s.y=d>s.y?d:s.y}}else s.y=0})(a,i,t,e,n),i=a})}const Fh=["LR","RL","H"],kQ=Fh[0];class QQ extends Ug{execute(){const t=this.options,e=this.rootNode;t.isHorizontal=!0;const{indent:n=20,dropCap:i=!0,direction:a=kQ,align:s}=t;if(a&&Fh.indexOf(a)===-1)throw new TypeError(`Invalid direction: ${a}`);if(a===Fh[0])Pg(e,n,i,s);else if(a===Fh[1])Pg(e,n,i,s),e.right2left();else if(a===Fh[2]){const{left:o,right:A}=Tx(e,t);Pg(o,n,i,s),o.right2left(),Pg(A,n,i,s);const l=o.getBoundingBox();A.translate(l.width,0),e.x=A.x-e.width/2}return e}}const UQ={};function Lx(r,t){const e=Ml({},UQ,t);return new QQ(r,e).execute()}function Nx(r,t){let e=0;return r.children.length?r.children.forEach(n=>{e+=Nx(n,t)}):e=r.height,r._subTreeSep=t.getSubTreeSep(r.data),r.totalHeight=Math.max(r.height,e)+2*r._subTreeSep,r.totalHeight}function kx(r){const t=r.children,e=t.length;if(e){t.forEach(o=>{kx(o)});const n=t[0],i=t[e-1],a=i.y-n.y+i.height;let s=0;if(t.forEach(o=>{s+=o.totalHeight}),a>r.height)r.y=n.y+a/2-r.height/2;else if(t.length!==1||r.height>s){const o=r.y+(r.height-a)/2-n.y;t.forEach(A=>{A.translate(0,o)})}else r.y=(n.y+n.height/2+i.y+i.height/2)/2-r.height/2}}const PQ={getSubTreeSep:()=>0};function DQ(r,t={}){return t=Ml({},PQ,t),r.parent={x:0,width:0,height:0,y:0},r.BFTraverse(e=>{e.x=e.parent.x+e.parent.width}),r.parent=void 0,Nx(r,t),r.startY=0,r.y=r.totalHeight/2-r.height/2,r.eachNode(e=>{const n=e.children,i=n.length;if(i){const a=n[0];if(a.startY=e.startY+e._subTreeSep,i===1)a.y=e.y+e.height/2-a.height/2;else{a.y=a.startY+a.totalHeight/2-a.height/2;for(let s=1;s<i;s++){const o=n[s];o.startY=n[s-1].startY+n[s-1].totalHeight,o.y=o.startY+o.totalHeight/2-o.height/2}}}}),kx(r),r}class RQ extends Ug{execute(){return By(this.rootNode,this.options,DQ)}}const _Q={};function Qx(r,t){const e=Ml({},_Q,t);return new RQ(r,e).execute()}const $9={compactBox:Fx,dendrogram:Ix,indented:Lx,mindmap:Qx},tG="0.7.0",HQ=(r,t)=>{if(r!=="next"&&r!=="prev")return t},Ux=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class GQ{constructor(){const t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){const t=this.shortcut,e=t.prev;if(e&&e!==t)return Ux(e),e}enqueue(t){const e=this.shortcut;t.prev&&t.next&&Ux(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){const t=[],e=this.shortcut;let n=e.prev;for(;n!==e;)t.push(JSON.stringify(n,HQ)),n=n==null?void 0:n.prev;return`[${t.join(", ")}]`}}class KQ extends GQ{}const zQ=()=>1,VQ=(r,t)=>{var e;if(r.getAllNodes().length<=1)return[];const n=ZQ(r,t||zQ);return(e=WQ(n.graph,n.buckets,n.zeroIdx).map(a=>r.getRelatedEdges(a.v,"out").filter(({target:s})=>s===a.w)))===null||e===void 0?void 0:e.flat()},WQ=(r,t,e)=>{let n=[];const i=t[t.length-1],a=t[0];let s;for(;r.getAllNodes().length;){for(;s=a.dequeue();)by(r,t,e,s);for(;s=i.dequeue();)by(r,t,e,s);if(r.getAllNodes().length){for(let o=t.length-2;o>0;--o)if(s=t[o].dequeue(),s){n=n.concat(by(r,t,e,s,!0));break}}}return n},by=(r,t,e,n,i)=>{var a,s;const o=[];return r.hasNode(n.v)&&((a=r.getRelatedEdges(n.v,"in"))===null||a===void 0||a.forEach(A=>{const l=A.data.weight,c=r.getNode(A.source);i&&o.push({v:A.source,w:A.target,in:0,out:0}),c.data.out===void 0&&(c.data.out=0),c.data.out-=l,xy(t,e,Object.assign({v:c.id},c.data))}),(s=r.getRelatedEdges(n.v,"out"))===null||s===void 0||s.forEach(A=>{const l=A.data.weight,c=A.target,u=r.getNode(c);u.data.in===void 0&&(u.data.in=0),u.data.in-=l,xy(t,e,Object.assign({v:u.id},u.data))}),r.removeNode(n.v)),i?o:void 0},ZQ=(r,t)=>{const e=new Hr;let n=0,i=0;r.getAllNodes().forEach(A=>{e.addNode({id:A.id,data:{v:A.id,in:0,out:0}})}),r.getAllEdges().forEach(A=>{const l=e.getRelatedEdges(A.source,"out").find(u=>u.target===A.target),c=(t==null?void 0:t(A))||1;l?e.updateEdgeData(l==null?void 0:l.id,Object.assign(Object.assign({},l.data),{weight:l.data.weight+c})):e.addEdge({id:A.id,source:A.source,target:A.target,data:{weight:c}}),i=Math.max(i,e.getNode(A.source).data.out+=c),n=Math.max(n,e.getNode(A.target).data.in+=c)});const a=[],s=i+n+3;for(let A=0;A<s;A++)a.push(new KQ);const o=n+1;return e.getAllNodes().forEach(A=>{xy(a,o,Object.assign({v:A.id},e.getNode(A.id).data))}),{buckets:a,zeroIdx:o,graph:e}},xy=(r,t,e)=>{e.out?e.in?r[e.out-e.in+t].enqueue(e):r[r.length-1].enqueue(e):r[0].enqueue(e)},jQ=(r,t)=>{const n=t==="greedy"?VQ(r,(i=>a=>a.data.weight||1)(r)):YQ(r);n==null||n.forEach(i=>{const a=i.data;r.removeEdge(i.id),a.forwardName=i.data.name,a.reversed=!0,r.addEdge({id:i.id,source:i.target,target:i.source,data:Object.assign({},a)})})},YQ=r=>{const t=[],e={},n={},i=a=>{n[a]||(n[a]=!0,e[a]=!0,r.getRelatedEdges(a,"out").forEach(s=>{e[s.target]?t.push(s):i(s.target)}),delete e[a])};return r.getAllNodes().forEach(a=>i(a.id)),t},XQ=r=>{r.getAllEdges().forEach(t=>{const e=t.data;if(e.reversed){r.removeEdge(t.id);const n=e.forwardName;delete e.reversed,delete e.forwardName,r.addEdge({id:t.id,source:t.target,target:t.source,data:Object.assign(Object.assign({},e),{forwardName:n})})}})},JQ=(r,t)=>Number(r)-Number(t),_c=(r,t,e,n)=>{let i;do i=`${n}${Math.random()}`;while(r.hasNode(i));return e.dummy=t,r.addNode({id:i,data:e}),i},qQ=r=>{const t=new Hr;return r.getAllNodes().forEach(e=>{t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{const n=t.getRelatedEdges(e.source,"out").find(i=>i.target===e.target);n?t.updateEdgeData(n==null?void 0:n.id,Object.assign(Object.assign({},n.data),{weight:n.data.weight+e.data.weight||0,minlen:Math.max(n.data.minlen,e.data.minlen||1)})):t.addEdge({id:e.id,source:e.source,target:e.target,data:{weight:e.data.weight||0,minlen:e.data.minlen||1}})}),t},Px=r=>{const t=new Hr;return r.getAllNodes().forEach(e=>{r.getChildren(e.id).length||t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{t.addEdge(e)}),t},Dx=(r,t)=>r==null?void 0:r.reduce((e,n,i)=>(e[n]=t[i],e),{}),eG=r=>{const t={};return r.getAllNodes().forEach(e=>{const n={};r.getRelatedEdges(e.id,"out").forEach(i=>{n[i.target]=(n[i.target]||0)+(i.data.weight||0)}),t[e.id]=n}),t},nG=r=>{const t=r.getAllNodes(),e=t.map(n=>{const i={};return r.getRelatedEdges(n.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return Dx(t.map(n=>n.id),e)},Rx=(r,t)=>{const e=Number(r.x),n=Number(r.y),i=Number(t.x)-e,a=Number(t.y)-n;let s=Number(r.width)/2,o=Number(r.height)/2;if(!i&&!a)return{x:0,y:0};let A,l;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),A=o*i/a,l=o):(i<0&&(s=-s),A=s,l=s*a/i),{x:e+A,y:n+l}},Oh=r=>{const t=[],e=Hx(r)+1;for(let n=0;n<e;n++)t.push([]);r.getAllNodes().forEach(n=>{const i=n.data.rank;i!==void 0&&t[i]&&t[i].push(n.id)});for(let n=0;n<e;n++)t[n]=t[n].sort((i,a)=>JQ(r.getNode(i).data.order,r.getNode(a).data.order));return t},$Q=r=>{const t=r.getAllNodes().filter(n=>n.data.rank!==void 0).map(n=>n.data.rank),e=Math.min(...t);r.getAllNodes().forEach(n=>{n.data.hasOwnProperty("rank")&&e!==1/0&&(n.data.rank-=e)})},tU=(r,t=0)=>{const e=r.getAllNodes(),n=e.filter(o=>o.data.rank!==void 0).map(o=>o.data.rank),i=Math.min(...n),a=[];e.forEach(o=>{const A=(o.data.rank||0)-i;a[A]||(a[A]=[]),a[A].push(o.id)});let s=0;for(let o=0;o<a.length;o++){const A=a[o];A===void 0?o%t!==0&&(s-=1):s&&(A==null||A.forEach(l=>{const c=r.getNode(l);c&&(c.data.rank=c.data.rank||0,c.data.rank+=s)}))}},_x=(r,t,e,n)=>{const i={width:0,height:0};return ye(e)&&ye(n)&&(i.rank=e,i.order=n),_c(r,"border",i,t)},Hx=r=>{let t;return r.getAllNodes().forEach(e=>{const n=e.data.rank;n!==void 0&&(t===void 0||n>t)&&(t=n)}),t||(t=0),t},eU=(r,t)=>{const e={lhs:[],rhs:[]};return r==null||r.forEach(n=>{t(n)?e.lhs.push(n):e.rhs.push(n)}),e},Cy=(r,t)=>r.reduce((e,n)=>{const i=t(e),a=t(n);return i>a?n:e}),Gx=(r,t,e,n,i,a)=>{n.includes(t.id)||(n.push(t.id),e||a.push(t.id),i(t.id).forEach(s=>Gx(r,s,e,n,i,a)),e&&a.push(t.id))},Kx=(r,t,e,n)=>{const i=Array.isArray(t)?t:[t],a=A=>n?r.getSuccessors(A):r.getNeighbors(A),s=[],o=[];return i.forEach(A=>{if(r.hasNode(A.id))Gx(r,A,e==="post",o,a,s);else throw new Error(`Graph does not have node: ${A}`)}),s},nU=r=>{const t=e=>{const n=r.getChildren(e),i=r.getNode(e);if(n!=null&&n.length&&n.forEach(a=>t(a.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let a=i.data.minRank,s=i.data.maxRank+1;a<s;a+=1)zx(r,"borderLeft","_bl",e,i,a),zx(r,"borderRight","_br",e,i,a)}};r.getRoots().forEach(e=>t(e.id))},zx=(r,t,e,n,i,a)=>{const s={rank:a,borderType:t,width:0,height:0},o=i.data[t][a-1],A=_c(r,"border",s,e);i.data[t][a]=A,r.setParent(A,n),o&&r.addEdge({id:`e${Math.random()}`,source:o,target:A,data:{weight:1}})},rU=(r,t)=>{const e=t.toLowerCase();(e==="lr"||e==="rl")&&Vx(r)},iU=(r,t)=>{const e=t.toLowerCase();(e==="bt"||e==="rl")&&aU(r),(e==="lr"||e==="rl")&&(sU(r),Vx(r))},Vx=r=>{r.getAllNodes().forEach(t=>{Wx(t)}),r.getAllEdges().forEach(t=>{Wx(t)})},Wx=r=>{const t=r.data.width;r.data.width=r.data.height,r.data.height=t},aU=r=>{r.getAllNodes().forEach(t=>{Sy(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Sy(n)),t.data.hasOwnProperty("y")&&Sy(t.data)})},Sy=r=>{r!=null&&r.y&&(r.y=-r.y)},sU=r=>{r.getAllNodes().forEach(t=>{My(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>My(n)),t.data.hasOwnProperty("x")&&My(t.data)})},My=r=>{const t=r.x;r.x=r.y,r.y=t},oU=r=>{const t=_c(r,"root",{},"_root"),e=AU(r);let n=Math.max(...Object.values(e));Math.abs(n)===1/0&&(n=1);const i=n-1,a=2*i+1;r.getAllEdges().forEach(o=>{o.data.minlen*=a});const s=lU(r)+1;return r.getRoots().forEach(o=>{Zx(r,t,a,s,i,e,o.id)}),{nestingRoot:t,nodeRankFactor:a}},Zx=(r,t,e,n,i,a,s)=>{const o=r.getChildren(s);if(!(o!=null&&o.length)){s!==t&&r.addEdge({id:`e${Math.random()}`,source:t,target:s,data:{weight:0,minlen:e}});return}const A=_x(r,"_bt"),l=_x(r,"_bb"),c=r.getNode(s);r.setParent(A,s),c.data.borderTop=A,r.setParent(l,s),c.data.borderBottom=l,o==null||o.forEach(u=>{Zx(r,t,e,n,i,a,u.id);const h=u.data.borderTop?u.data.borderTop:u.id,d=u.data.borderBottom?u.data.borderBottom:u.id,f=u.data.borderTop?n:2*n,g=h!==d?1:i-a[s]+1;r.addEdge({id:`e${Math.random()}`,source:A,target:h,data:{minlen:g,weight:f,nestingEdge:!0}}),r.addEdge({id:`e${Math.random()}`,source:d,target:l,data:{minlen:g,weight:f,nestingEdge:!0}})}),r.getParent(s)||r.addEdge({id:`e${Math.random()}`,source:t,target:A,data:{weight:0,minlen:i+a[s]}})},AU=r=>{const t={},e=(n,i)=>{const a=r.getChildren(n);a==null||a.forEach(s=>e(s.id,i+1)),t[n]=i};return r.getRoots().forEach(n=>e(n.id,1)),t},lU=r=>{let t=0;return r.getAllEdges().forEach(e=>{t+=e.data.weight}),t},cU=(r,t)=>{t&&r.removeNode(t),r.getAllEdges().forEach(e=>{e.data.nestingEdge&&r.removeEdge(e.id)})},uU="edge",jx="edge-label",hU=(r,t)=>{r.getAllEdges().forEach(e=>dU(r,e,t))},dU=(r,t,e)=>{let n=t.source,i=r.getNode(n).data.rank;const a=t.target,s=r.getNode(a).data.rank,o=t.data.labelRank;if(s===i+1)return;r.removeEdge(t.id);let A,l,c;for(c=0,++i;i<s;++c,++i)t.data.points=[],l={originalEdge:t,width:0,height:0,rank:i},A=_c(r,uU,l,"_d"),i===o&&(l.width=t.data.width,l.height=t.data.height,l.dummy=jx,l.labelpos=t.data.labelpos),r.addEdge({id:`e${Math.random()}`,source:n,target:A,data:{weight:t.data.weight}}),c===0&&e.push(A),n=A;r.addEdge({id:`e${Math.random()}`,source:n,target:a,data:{weight:t.data.weight}})},fU=(r,t)=>{t.forEach(e=>{let n=r.getNode(e);const{data:i}=n,a=i.originalEdge;let s;a&&r.addEdge(a);let o=e;for(;n.data.dummy;)s=r.getSuccessors(o)[0],r.removeNode(o),a.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===jx&&(a.data.x=n.data.x,a.data.y=n.data.y,a.data.width=n.data.width,a.data.height=n.data.height),o=s.id,n=r.getNode(o)})},gU=(r,t,e)=>{const n={};let i;e==null||e.forEach(a=>{let s=r.getParent(a),o,A;for(;s;){if(o=r.getParent(s.id),o?(A=n[o.id],n[o.id]=s.id):(A=i,i=s.id),A&&A!==s.id){t.hasNode(A)||t.addNode({id:A,data:{}}),t.hasNode(s.id)||t.addNode({id:s.id,data:{}}),t.hasEdge(`e${A}-${s.id}`)||t.addEdge({id:`e${A}-${s.id}`,source:A,target:s.id,data:{}});return}s=o}})},vU=(r,t,e)=>{const n=pU(r),i=new Hr({tree:[{id:n,children:[],data:{}}]});return r.getAllNodes().forEach(a=>{const s=r.getParent(a.id);(a.data.rank===t||a.data.minRank<=t&&t<=a.data.maxRank)&&(i.hasNode(a.id)||i.addNode(Object.assign({},a)),s!=null&&s.id&&!i.hasNode(s==null?void 0:s.id)&&i.addNode(Object.assign({},s)),i.setParent(a.id,(s==null?void 0:s.id)||n),r.getRelatedEdges(a.id,e).forEach(o=>{const A=o.source===a.id?o.target:o.source;i.hasNode(A)||i.addNode(Object.assign({},r.getNode(A)));const l=i.getRelatedEdges(A,"out").find(({target:u})=>u===a.id),c=l!==void 0?l.data.weight:0;l?i.updateEdgeData(l.id,Object.assign(Object.assign({},l.data),{weight:o.data.weight+c})):i.addEdge({id:o.id,source:A,target:a.id,data:{weight:o.data.weight+c}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[t],borderRight:a.data.borderRight[t]})))}),i},pU=r=>{let t;for(;r.hasNode(t=`_root${Math.random()}`););return t},mU=(r,t,e)=>{const n=Dx(e,e.map((c,u)=>u)),a=t.map(c=>{const u=r.getRelatedEdges(c,"out").map(h=>({pos:n[h.target]||0,weight:h.data.weight}));return u==null?void 0:u.sort((h,d)=>h.pos-d.pos)}).flat().filter(c=>c!==void 0);let s=1;for(;s<e.length;)s<<=1;const o=2*s-1;s-=1;const A=Array(o).fill(0,0,o);let l=0;return a==null||a.forEach(c=>{if(c){let u=c.pos+s;A[u]+=c.weight;let h=0;for(;u>0;)u%2&&(h+=A[u+1]),u=u-1>>1,A[u]+=c.weight;l+=c.weight*h}}),l},Yx=(r,t)=>{let e=0;for(let n=1;n<(t==null?void 0:t.length);n+=1)e+=mU(r,t[n-1],t[n]);return e},Xx=r=>{const t={},e=r.getAllNodes(),n=e.map(l=>{var c;return(c=l.data.rank)!==null&&c!==void 0?c:-1/0}),i=Math.max(...n),a=[];for(let l=0;l<i+1;l++)a.push([]);const s=e.sort((l,c)=>r.getNode(l.id).data.rank-r.getNode(c.id).data.rank),A=s.filter(l=>r.getNode(l.id).data.fixorder!==void 0).sort((l,c)=>r.getNode(l.id).data.fixorder-r.getNode(c.id).data.fixorder);return A==null||A.forEach(l=>{isNaN(r.getNode(l.id).data.rank)||a[r.getNode(l.id).data.rank].push(l.id),t[l.id]=!0}),s==null||s.forEach(l=>r.dfsTree(l.id,c=>{if(t.hasOwnProperty(c.id))return!0;t[c.id]=!0,isNaN(c.data.rank)||a[c.data.rank].push(c.id)})),a},yU=(r,t)=>t.map(e=>{const n=r.getRelatedEdges(e,"in");if(!(n!=null&&n.length))return{v:e};const i={sum:0,weight:0};return n==null||n.forEach(a=>{const s=r.getNode(a.source);i.sum+=a.data.weight*s.data.order,i.weight+=a.data.weight}),{v:e,barycenter:i.sum/i.weight,weight:i.weight}}),wU=(r,t)=>{var e,n,i;const a={};r==null||r.forEach((o,A)=>{a[o.v]={i:A,indegree:0,in:[],out:[],vs:[o.v]};const l=a[o.v];o.barycenter!==void 0&&(l.barycenter=o.barycenter,l.weight=o.weight)}),(e=t.getAllEdges())===null||e===void 0||e.forEach(o=>{const A=a[o.source],l=a[o.target];A!==void 0&&l!==void 0&&(l.indegree++,A.out.push(a[o.target]))});const s=(i=(n=Object.values(a)).filter)===null||i===void 0?void 0:i.call(n,o=>!o.indegree);return EU(s)},EU=r=>{var t,e;const n=[],i=A=>l=>{l.merged||(l.barycenter===void 0||A.barycenter===void 0||l.barycenter>=A.barycenter)&&BU(A,l)},a=A=>l=>{l.in.push(A),--l.indegree===0&&r.push(l)};for(;r!=null&&r.length;){const A=r.pop();n.push(A),(t=A.in.reverse())===null||t===void 0||t.forEach(l=>i(A)(l)),(e=A.out)===null||e===void 0||e.forEach(l=>a(A)(l))}const s=n.filter(A=>!A.merged),o=["vs","i","barycenter","weight"];return s.map(A=>{const l={};return o==null||o.forEach(c=>{A[c]!==void 0&&(l[c]=A[c])}),l})},BU=(r,t)=>{var e;let n=0,i=0;r.weight&&(n+=r.barycenter*r.weight,i+=r.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),r.vs=(e=t.vs)===null||e===void 0?void 0:e.concat(r.vs),r.barycenter=n/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0};var bU=wU;const xU=(r,t,e,n)=>{const i=eU(r,h=>{const d=h.hasOwnProperty("fixorder")&&!isNaN(h.fixorder);return n?!d&&h.hasOwnProperty("barycenter"):d||h.hasOwnProperty("barycenter")}),a=i.lhs,s=i.rhs.sort((h,d)=>-h.i- -d.i),o=[];let A=0,l=0,c=0;a==null||a.sort(CU(!!t,!!e)),c=Jx(o,s,c),a==null||a.forEach(h=>{var d;c+=(d=h.vs)===null||d===void 0?void 0:d.length,o.push(h.vs),A+=h.barycenter*h.weight,l+=h.weight,c=Jx(o,s,c)});const u={vs:o.flat()};return l&&(u.barycenter=A/l,u.weight=l),u},Jx=(r,t,e)=>{let n=e,i;for(;t.length&&(i=t[t.length-1]).i<=n;)t.pop(),r==null||r.push(i.vs),n++;return n},CU=(r,t)=>(e,n)=>{if(e.fixorder!==void 0&&n.fixorder!==void 0)return e.fixorder-n.fixorder;if(e.barycenter<n.barycenter)return-1;if(e.barycenter>n.barycenter)return 1;if(t&&e.order!==void 0&&n.order!==void 0){if(e.order<n.order)return-1;if(e.order>n.order)return 1}return r?n.i-e.i:e.i-n.i},qx=(r,t,e,n,i,a)=>{var s,o,A,l;let c=r.getChildren(t).map(w=>w.id);const u=r.getNode(t),h=u?u.data.borderLeft:void 0,d=u?u.data.borderRight:void 0,f={};h&&(c=c==null?void 0:c.filter(w=>w!==h&&w!==d));const g=yU(r,c||[]);g==null||g.forEach(w=>{var C;if(!((C=r.getChildren(w.v))===null||C===void 0)&&C.length){const F=qx(r,w.v,e,n,a);f[w.v]=F,F.hasOwnProperty("barycenter")&&MU(w,F)}});const v=bU(g,e);SU(v,f),(s=v.filter(w=>w.vs.length>0))===null||s===void 0||s.forEach(w=>{const C=r.getNode(w.vs[0]);C&&(w.fixorder=C.data.fixorder,w.order=C.data.order)});const m=xU(v,n,i,a);if(h&&(m.vs=[h,m.vs,d].flat(),!((o=r.getPredecessors(h))===null||o===void 0)&&o.length)){const w=r.getNode(((A=r.getPredecessors(h))===null||A===void 0?void 0:A[0].id)||""),C=r.getNode(((l=r.getPredecessors(d))===null||l===void 0?void 0:l[0].id)||"");m.hasOwnProperty("barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+w.data.order+C.data.order)/(m.weight+2),m.weight+=2}return m},SU=(r,t)=>{r==null||r.forEach(e=>{var n;const i=(n=e.vs)===null||n===void 0?void 0:n.map(a=>t[a]?t[a].vs:a);e.vs=i.flat()})},MU=(r,t)=>{r.barycenter!==void 0?(r.barycenter=(r.barycenter*r.weight+t.barycenter*t.weight)/(r.weight+t.weight),r.weight+=t.weight):(r.barycenter=t.barycenter,r.weight=t.weight)},TU=(r,t)=>{const e=Hx(r),n=[],i=[];for(let c=1;c<e+1;c++)n.push(c);for(let c=e-1;c>-1;c--)i.push(c);const a=$x(r,n,"in"),s=$x(r,i,"out");let o=Xx(r);Ty(r,o);let A=Number.POSITIVE_INFINITY,l;for(let c=0,u=0;u<4;++c,++u){tC(c%2?a:s,c%4>=2,!1,t),o=Oh(r);const h=Yx(r,o);h<A&&(u=0,l=Nc(o),A=h)}o=Xx(r),Ty(r,o);for(let c=0,u=0;u<4;++c,++u){tC(c%2?a:s,c%4>=2,!0,t),o=Oh(r);const h=Yx(r,o);h<A&&(u=0,l=Nc(o),A=h)}Ty(r,l)},$x=(r,t,e)=>t.map(n=>vU(r,n,e)),tC=(r,t,e,n)=>{const i=new Hr;r==null||r.forEach(a=>{var s;const o=a.getRoots()[0].id,A=qx(a,o,i,t,e,n);for(let l=0;l<((s=A.vs)===null||s===void 0?void 0:s.length);l++){const c=a.getNode(A.vs[l]);c&&(c.data.order=l)}gU(a,i,A.vs)})},Ty=(r,t)=>{t==null||t.forEach(e=>{e==null||e.forEach((n,i)=>{r.getNode(n).data.order=i})})},FU=(r,t)=>{const n=r.getAllNodes().filter(s=>{var o;return!(!((o=r.getChildren(s.id))===null||o===void 0)&&o.length)}).map(s=>s.data.rank),i=Math.max(...n),a=[];for(let s=0;s<i+1;s++)a[s]=[];t==null||t.forEach(s=>{const o=r.getNode(s);!o||o.data.dummy||isNaN(o.data.rank)||(o.data.fixorder=a[o.data.rank].length,a[o.data.rank].push(s))})},OU=r=>{const t={};let e=0;const n=i=>{const a=e;r.getChildren(i).forEach(s=>n(s.id)),t[i]={low:a,lim:e++}};return r.getRoots().forEach(i=>n(i.id)),t},IU=(r,t,e,n)=>{var i,a;const s=[],o=[],A=Math.min(t[e].low,t[n].low),l=Math.max(t[e].lim,t[n].lim);let c,u;c=e;do c=(i=r.getParent(c))===null||i===void 0?void 0:i.id,s.push(c);while(c&&(t[c].low>A||l>t[c].lim));for(u=c,c=n;c&&c!==u;)o.push(c),c=(a=r.getParent(c))===null||a===void 0?void 0:a.id;return{lca:u,path:s.concat(o.reverse())}},LU=(r,t)=>{const e=OU(r);t.forEach(n=>{var i,a;let s=n,o=r.getNode(s);const A=o.data.originalEdge;if(!A)return;const l=IU(r,e,A.source,A.target),c=l.path,u=l.lca;let h=0,d=c[h],f=!0;for(;s!==A.target;){if(o=r.getNode(s),f){for(;d!==u&&((i=r.getNode(d))===null||i===void 0?void 0:i.data.maxRank)<o.data.rank;)h++,d=c[h];d===u&&(f=!1)}if(!f){for(;h<c.length-1&&((a=r.getNode(c[h+1]))===null||a===void 0?void 0:a.data.minRank)<=o.data.rank;)h++;d=c[h]}r.hasNode(d)&&r.setParent(s,d),s=r.getSuccessors(s)[0].id}})},eC=(r,t)=>{const e={},n=(i,a)=>{let s=0,o=0;const A=i.length,l=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((c,u)=>{var h;const d=NU(r,c),f=d?r.getNode(d.id).data.order:A;(d||c===l)&&((h=a.slice(o,u+1))===null||h===void 0||h.forEach(g=>{var v;(v=r.getPredecessors(g))===null||v===void 0||v.forEach(m=>{var w;const C=r.getNode(m.id),F=C.data.order;(F<s||f<F)&&!(C.data.dummy&&(!((w=r.getNode(g))===null||w===void 0)&&w.data.dummy))&&rC(e,m.id,g)})}),o=u+1,s=f)}),a};return t!=null&&t.length&&t.reduce(n),e},nC=(r,t)=>{const e={};function n(o,A,l,c,u){var h,d;let f;for(let g=A;g<l;g++)f=o[g],!((h=r.getNode(f))===null||h===void 0)&&h.data.dummy&&((d=r.getPredecessors(f))===null||d===void 0||d.forEach(v=>{const m=r.getNode(v.id);m.data.dummy&&(m.data.order<c||m.data.order>u)&&rC(e,v.id,f)}))}function i(o){return JSON.stringify(o.slice(1))}function a(o,A){const l=i(o);A.get(l)||(n(...o),A.set(l,!0))}const s=(o,A)=>{let l=-1,c,u=0;const h=new Map;return A==null||A.forEach((d,f)=>{var g;if(((g=r.getNode(d))===null||g===void 0?void 0:g.data.dummy)==="border"){const v=r.getPredecessors(d)||[];v.length&&(c=r.getNode(v[0].id).data.order,a([A,u,f,l,c],h),u=f,l=c)}a([A,u,A.length,c,o.length],h)}),A};return t!=null&&t.length&&t.reduce(s),e},NU=(r,t)=>{var e,n;if(!((e=r.getNode(t))===null||e===void 0)&&e.data.dummy)return(n=r.getPredecessors(t))===null||n===void 0?void 0:n.find(i=>r.getNode(i.id).data.dummy)},rC=(r,t,e)=>{let n=t,i=e;if(n>i){const s=n;n=i,i=s}let a=r[n];a||(r[n]=a={}),a[i]=!0},kU=(r,t,e)=>{let n=t,i=e;if(n>i){const a=t;n=i,i=a}return!!r[n]},iC=(r,t,e,n)=>{const i={},a={},s={};return t==null||t.forEach(o=>{o==null||o.forEach((A,l)=>{i[A]=A,a[A]=A,s[A]=l})}),t==null||t.forEach(o=>{let A=-1;o==null||o.forEach(l=>{let c=n(l).map(u=>u.id);if(c.length){c=c.sort((h,d)=>s[h]-s[d]);const u=(c.length-1)/2;for(let h=Math.floor(u),d=Math.ceil(u);h<=d;++h){const f=c[h];a[l]===l&&A<s[f]&&!kU(e,l,f)&&(a[f]=l,a[l]=i[l]=i[f],A=s[f])}}})}),{root:i,align:a}},aC=(r,t,e,n,i,a,s)=>{var o;const A={},l=QU(r,t,e,i,a,s),c=s?"borderLeft":"borderRight",u=(f,g)=>{let v=l.getAllNodes(),m=v.pop();const w={};for(;m;)w[m.id]?f(m.id):(w[m.id]=!0,v.push(m),v=v.concat(g(m.id))),m=v.pop()},h=f=>{A[f]=(l.getRelatedEdges(f,"in")||[]).reduce((g,v)=>Math.max(g,(A[v.source]||0)+v.data.weight),0)},d=f=>{const g=(l.getRelatedEdges(f,"out")||[]).reduce((m,w)=>Math.min(m,(A[w.target]||0)-w.data.weight),Number.POSITIVE_INFINITY),v=r.getNode(f);g!==Number.POSITIVE_INFINITY&&v.data.borderType!==c&&(A[f]=Math.max(A[f],g))};return u(h,l.getPredecessors.bind(l)),u(d,l.getSuccessors.bind(l)),(o=Object.values(n))===null||o===void 0||o.forEach(f=>{A[f]=A[e[f]]}),A},QU=(r,t,e,n,i,a)=>{const s=new Hr,o=UU(n,i,a);return t==null||t.forEach(A=>{let l;A==null||A.forEach(c=>{const u=e[c];if(s.hasNode(u)||s.addNode({id:u,data:{}}),l){const h=e[l],d=s.getRelatedEdges(h,"out").find(f=>f.target===u);d?s.updateEdgeData(d.id,Object.assign(Object.assign({},d.data),{weight:Math.max(o(r,c,l),d.data.weight||0)})):s.addEdge({id:`e${Math.random()}`,source:h,target:u,data:{weight:Math.max(o(r,c,l),0)}})}l=c})}),s},sC=(r,t)=>Cy(Object.values(t),e=>{var n;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(n=Object.keys(e))===null||n===void 0||n.forEach(s=>{const o=e[s],A=PU(r,s)/2;i=Math.max(o+A,i),a=Math.min(o-A,a)}),i-a});function oC(r,t){const e=Object.values(t),n=Math.min(...e),i=Math.max(...e);["u","d"].forEach(a=>{["l","r"].forEach(s=>{const o=a+s,A=r[o];let l;if(A===t)return;const c=Object.values(A);l=s==="l"?n-Math.min(...c):i-Math.max(...c),l&&(r[o]={},Object.keys(A).forEach(u=>{r[o][u]=A[u]+l}))})})}const AC=(r,t)=>{const e={};return Object.keys(r.ul).forEach(n=>{if(t)e[n]=r[t.toLowerCase()][n];else{const i=Object.values(r).map(a=>a[n]);e[n]=(i[0]+i[1])/2}}),e},rG=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=buildLayerMatrix(r),s=Object.assign(eC(r,a),nC(r,a)),o={};let A;["u","d"].forEach(c=>{A=c==="u"?a:Object.values(a).reverse(),["l","r"].forEach(u=>{u==="r"&&(A=A.map(g=>Object.values(g).reverse()));const h=(c==="u"?r.getPredecessors:r.getSuccessors).bind(r),d=iC(r,A,s,h),f=aC(r,A,d.root,d.align,n,i,u==="r");u==="r"&&Object.keys(f).forEach(g=>{f[g]=-f[g]}),o[c+u]=f})});const l=sC(r,o);return oC(o,l),AC(o,e)},UU=(r,t,e)=>(n,i,a)=>{const s=n.getNode(i),o=n.getNode(a);let A=0,l=0;if(A+=s.data.width/2,s.data.hasOwnProperty("labelpos"))switch((s.data.labelpos||"").toLowerCase()){case"l":l=-s.data.width/2;break;case"r":l=s.data.width/2;break}if(l&&(A+=e?l:-l),l=0,A+=(s.data.dummy?t:r)/2,A+=(o.data.dummy?t:r)/2,A+=o.data.width/2,o.data.labelpos)switch((o.data.labelpos||"").toLowerCase()){case"l":l=o.data.width/2;break;case"r":l=-o.data.width/2;break}return l&&(A+=e?l:-l),l=0,A},PU=(r,t)=>r.getNode(t).data.width||0,DU=(r,t)=>{const{ranksep:e=0}=t||{},n=Oh(r);let i=0;n==null||n.forEach(a=>{const s=a.map(A=>r.getNode(A).data.height),o=Math.max(...s,0);a==null||a.forEach(A=>{r.getNode(A).data.y=i+o/2}),i+=o+e})},RU=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=Oh(r),s=Object.assign(eC(r,a),nC(r,a)),o={};let A=[];["u","d"].forEach(c=>{A=c==="u"?a:Object.values(a).reverse(),["l","r"].forEach(u=>{u==="r"&&(A=A.map(g=>Object.values(g).reverse()));const h=(c==="u"?r.getPredecessors:r.getSuccessors).bind(r),d=iC(r,A,s,h),f=aC(r,A,d.root,d.align,n,i,u==="r");u==="r"&&Object.keys(f).forEach(g=>f[g]=-f[g]),o[c+u]=f})});const l=sC(r,o);return l&&oC(o,l),AC(o,e)},_U=(r,t)=>{var e;const n=Px(r);DU(n,t);const i=RU(n,t);(e=Object.keys(i))===null||e===void 0||e.forEach(a=>{n.getNode(a).data.x=i[a]})},lC=r=>{const t={},e=n=>{var i;const a=r.getNode(n);if(!a)return 0;if(t[n])return a.data.rank;t[n]=!0;let s;return(i=r.getRelatedEdges(n,"out"))===null||i===void 0||i.forEach(o=>{const A=e(o.target),l=o.data.minlen,c=A-l;c&&(s===void 0||c<s)&&(s=c)}),s||(s=0),a.data.rank=s,s};r.getAllNodes().filter(n=>r.getRelatedEdges(n.id,"in").length===0).forEach(n=>e(n.id))},HU=r=>{const t={};let e;const n=s=>{var o;const A=r.getNode(s);if(!A)return 0;if(t[s])return A.data.rank;t[s]=!0;let l;return(o=r.getRelatedEdges(s,"out"))===null||o===void 0||o.forEach(c=>{const u=n(c.target),h=c.data.minlen,d=u-h;d&&(l===void 0||d<l)&&(l=d)}),l||(l=0),(e===void 0||l<e)&&(e=l),A.data.rank=l,l};r.getAllNodes().filter(s=>r.getRelatedEdges(s.id,"in").length===0).forEach(s=>{s&&n(s.id)}),e===void 0&&(e=0);const i={},a=(s,o)=>{var A;const l=r.getNode(s),c=isNaN(l.data.layer)?o:l.data.layer;(l.data.rank===void 0||l.data.rank<c)&&(l.data.rank=c),!i[s]&&(i[s]=!0,(A=r.getRelatedEdges(s,"out"))===null||A===void 0||A.forEach(u=>{a(u.target,c+u.data.minlen)}))};r.getAllNodes().forEach(s=>{const o=s.data;o&&(isNaN(o.layer)?o.rank-=e:a(s.id,o.layer))})},MA=(r,t)=>r.getNode(t.target).data.rank-r.getNode(t.source).data.rank-t.data.minlen,GU=r=>{const t=new Hr({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;KU(t,r)<n;)i=cC(t,r),a=t.hasNode(i.source)?MA(r,i):-MA(r,i),uC(t,r,a);return t},KU=(r,t)=>{const e=n=>{t.getRelatedEdges(n,"both").forEach(i=>{const a=i.source,s=n===a?i.target:a;!r.hasNode(s)&&!MA(t,i)&&(r.addNode({id:s,data:{}}),r.addEdge({id:i.id,source:n,target:s,data:{}}),e(s))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},zU=r=>{const t=new Hr({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;VU(t,r)<n;)i=cC(t,r),a=t.hasNode(i.source)?MA(r,i):-MA(r,i),uC(t,r,a);return t},VU=(r,t)=>{const e=n=>{var i;(i=t.getRelatedEdges(n,"both"))===null||i===void 0||i.forEach(a=>{const s=a.source,o=n===s?a.target:s;!r.hasNode(o)&&(t.getNode(o).data.layer!==void 0||!MA(t,a))&&(r.addNode({id:o,data:{}}),r.addEdge({id:a.id,source:n,target:o,data:{}}),e(o))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},cC=(r,t)=>Cy(t.getAllEdges(),e=>r.hasNode(e.source)!==r.hasNode(e.target)?MA(t,e):1/0),uC=(r,t,e)=>{r.getAllNodes().forEach(n=>{const i=t.getNode(n.id);i.data.rank||(i.data.rank=0),i.data.rank+=e})},WU=r=>{const t=qQ(r);lC(t);const e=GU(t);dC(e),hC(e,t);let n,i;for(;n=YU(e);)i=XU(e,t,n),JU(e,t,n,i)},hC=(r,t)=>{let e=Kx(r,r.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(n=>{ZU(r,t,n)})},ZU=(r,t,e)=>{const i=r.getNode(e).data.parent,a=r.getRelatedEdges(e,"both").find(s=>s.target===i||s.source===i);a.data.cutvalue=jU(r,t,e)},jU=(r,t,e)=>{const i=r.getNode(e).data.parent;let a=!0,s=t.getRelatedEdges(e,"out").find(A=>A.target===i),o=0;return s||(a=!1,s=t.getRelatedEdges(i,"out").find(A=>A.target===e)),o=s.data.weight,t.getRelatedEdges(e,"both").forEach(A=>{const l=A.source===e,c=l?A.target:A.source;if(c!==i){const u=l===a,h=A.data.weight;if(o+=u?h:-h,$U(r,e,c)){const d=r.getRelatedEdges(e,"both").find(f=>f.source===c||f.target===c).data.cutvalue;o+=u?-d:d}}}),o},dC=(r,t=r.getAllNodes()[0].id)=>{fC(r,{},1,t)},fC=(r,t,e,n,i)=>{var a;const s=e;let o=e;const A=r.getNode(n);return t[n]=!0,(a=r.getNeighbors(n))===null||a===void 0||a.forEach(l=>{t[l.id]||(o=fC(r,t,o,l.id,n))}),A.data.low=s,A.data.lim=o++,i?A.data.parent=i:delete A.data.parent,o},YU=r=>r.getAllEdges().find(t=>t.data.cutvalue<0),XU=(r,t,e)=>{let n=e.source,i=e.target;t.getRelatedEdges(n,"out").find(c=>c.target===i)||(n=e.target,i=e.source);const a=r.getNode(n),s=r.getNode(i);let o=a,A=!1;a.data.lim>s.data.lim&&(o=s,A=!0);const l=t.getAllEdges().filter(c=>A===gC(r.getNode(c.source),o)&&A!==gC(r.getNode(c.target),o));return Cy(l,c=>MA(t,c))},JU=(r,t,e,n)=>{const i=r.getRelatedEdges(e.source,"both").find(a=>a.source===e.target||a.target===e.target);i&&r.removeEdge(i.id),r.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),dC(r),hC(r,t),qU(r,t)},qU=(r,t)=>{const e=r.getAllNodes().find(i=>!i.data.parent);let n=Kx(r,e,"pre",!1);n=n.slice(1),n.forEach(i=>{const a=r.getNode(i).data.parent;let s=t.getRelatedEdges(i,"out").find(A=>A.target===a),o=!1;!s&&t.hasNode(a)&&(s=t.getRelatedEdges(a,"out").find(A=>A.target===i),o=!0),t.getNode(i).data.rank=(t.hasNode(a)&&t.getNode(a).data.rank||0)+(o?s==null?void 0:s.data.minlen:-(s==null?void 0:s.data.minlen))})},$U=(r,t,e)=>r.getRelatedEdges(t,"both").find(n=>n.source===e||n.target===e),gC=(r,t)=>t.data.low<=r.data.lim&&r.data.lim<=t.data.lim,t3=(r,t)=>{switch(t){case"network-simplex":n3(r);break;case"tight-tree":vC(r);break;case"longest-path":e3(r);break;default:vC(r)}},e3=lC,vC=r=>{HU(r),zU(r)},n3=r=>{WU(r)},r3=(r,t)=>{const{edgeLabelSpace:e,keepNodeOrder:n,prevGraph:i,rankdir:a,ranksep:s}=t;!n&&i&&a3(r,i);const o=u3(r);e&&(t.ranksep=h3(o,{rankdir:a,ranksep:s}));let A;try{A=i3(o,t)}catch(l){if(l.message==="Not possible to find intersection inside of the rectangle"){console.error(`The following error may be caused by improper layer setting, please make sure your manual layer setting does not violate the graph's structure:
`,l);return}throw l}return s3(r,o),A},i3=(r,t)=>{const{acyclicer:e,ranker:n,rankdir:i="tb",nodeOrder:a,keepNodeOrder:s,align:o,nodesep:A=50,edgesep:l=20,ranksep:c=50}=t;E3(r),jQ(r,e);const{nestingRoot:u,nodeRankFactor:h}=oU(r);t3(Px(r),n),d3(r),tU(r,h),cU(r,u),$Q(r),f3(r),g3(r);const d=[];hU(r,d),LU(r,d),nU(r),s&&FU(r,a),TU(r,s),B3(r),rU(r,i),_U(r,{align:o,nodesep:A,edgesep:l,ranksep:c}),b3(r),w3(r),fU(r,d),m3(r),iU(r,i);const{width:f,height:g}=v3(r);return p3(r),y3(r),XQ(r),{width:f,height:g}},a3=(r,t)=>{r.getAllNodes().forEach(e=>{const n=r.getNode(e.id);if(t.hasNode(e.id)){const i=t.getNode(e.id);n.data.fixorder=i.data._order,delete i.data._order}else delete n.data.fixorder})},s3=(r,t)=>{r.getAllNodes().forEach(e=>{var n;const i=r.getNode(e.id);if(i){const a=t.getNode(e.id);i.data.x=a.data.x,i.data.y=a.data.y,i.data._order=a.data.order,i.data._rank=a.data.rank,!((n=t.getChildren(e.id))===null||n===void 0)&&n.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),r.getAllEdges().forEach(e=>{const n=r.getEdge(e.id),i=t.getEdge(e.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},o3=["width","height","layer","fixorder"],A3={width:0,height:0},l3=["minlen","weight","width","height","labeloffset"],c3={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Fy=["labelpos"],u3=r=>{const t=new Hr({tree:[]});return r.getAllNodes().forEach(e=>{const n=mC(r.getNode(e.id).data),i=Object.assign(Object.assign({},A3),n),a=pC(i,o3);t.hasNode(e.id)||t.addNode({id:e.id,data:Object.assign({},a)});const s=r.hasTreeStructure("combo")?r.getParent(e.id,"combo"):r.getParent(e.id);Pe(s)||(t.hasNode(s.id)||t.addNode(Object.assign({},s)),t.setParent(e.id,s.id))}),r.getAllEdges().forEach(e=>{const n=mC(r.getEdge(e.id).data),i={};Fy==null||Fy.forEach(a=>{n[a]!==void 0&&(i[a]=n[a])}),t.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},c3,pC(n,l3),i)})}),t},h3=(r,t)=>{const{ranksep:e=0,rankdir:n}=t;return r.getAllNodes().forEach(i=>{isNaN(i.data.layer)||i.data.layer||(i.data.layer=0)}),r.getAllEdges().forEach(i=>{var a;i.data.minlen*=2,((a=i.data.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(n==="TB"||n==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),e/2},d3=r=>{r.getAllEdges().forEach(t=>{if(t.data.width&&t.data.height){const e=r.getNode(t.source),n=r.getNode(t.target),i={e:t,rank:(n.data.rank-e.data.rank)/2+e.data.rank};_c(r,"edge-proxy",i,"_ep")}})},f3=r=>{let t=0;return r.getAllNodes().forEach(e=>{var n,i;e.data.borderTop&&(e.data.minRank=(n=r.getNode(e.data.borderTop))===null||n===void 0?void 0:n.data.rank,e.data.maxRank=(i=r.getNode(e.data.borderBottom))===null||i===void 0?void 0:i.data.rank,t=Math.max(t,e.data.maxRank||-1/0))}),t},g3=r=>{r.getAllNodes().forEach(t=>{t.data.dummy==="edge-proxy"&&(r.getEdge(t.data.e.id).data.labelRank=t.data.rank,r.removeNode(t.id))})},v3=(r,t)=>{let e,n=0,i,a=0;const{marginx:s=0,marginy:o=0}=t||{},A=l=>{if(!l.data)return;const c=l.data.x,u=l.data.y,h=l.data.width,d=l.data.height;!isNaN(c)&&!isNaN(h)&&(e===void 0&&(e=c-h/2),e=Math.min(e,c-h/2),n=Math.max(n,c+h/2)),!isNaN(u)&&!isNaN(d)&&(i===void 0&&(i=u-d/2),i=Math.min(i,u-d/2),a=Math.max(a,u+d/2))};return r.getAllNodes().forEach(l=>{A(l)}),r.getAllEdges().forEach(l=>{l!=null&&l.data.hasOwnProperty("x")&&A(l)}),e-=s,i-=o,r.getAllNodes().forEach(l=>{l.data.x-=e,l.data.y-=i}),r.getAllEdges().forEach(l=>{var c;(c=l.data.points)===null||c===void 0||c.forEach(u=>{u.x-=e,u.y-=i}),l.data.hasOwnProperty("x")&&(l.data.x-=e),l.data.hasOwnProperty("y")&&(l.data.y-=i)}),{width:n-e+s,height:a-i+o}},p3=r=>{r.getAllEdges().forEach(t=>{const e=r.getNode(t.source),n=r.getNode(t.target);let i,a;t.data.points?(i=t.data.points[0],a=t.data.points[t.data.points.length-1]):(t.data.points=[],i={x:n.data.x,y:n.data.y},a={x:e.data.x,y:e.data.y}),t.data.points.unshift(Rx(e.data,i)),t.data.points.push(Rx(n.data,a))})},m3=r=>{r.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch((t.data.labelpos==="l"||t.data.labelpos==="r")&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset;break}})},y3=r=>{r.getAllEdges().forEach(t=>{var e;t.data.reversed&&((e=t.data.points)===null||e===void 0||e.reverse())})},w3=r=>{r.getAllNodes().forEach(t=>{var e,n,i;if(!((e=r.getChildren(t.id))===null||e===void 0)&&e.length){const a=r.getNode(t.id),s=r.getNode(a.data.borderTop),o=r.getNode(a.data.borderBottom),A=r.getNode(a.data.borderLeft[((n=a.data.borderLeft)===null||n===void 0?void 0:n.length)-1]),l=r.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((l==null?void 0:l.data.x)-(A==null?void 0:A.data.x))||10,a.data.height=Math.abs((o==null?void 0:o.data.y)-(s==null?void 0:s.data.y))||10,a.data.x=((A==null?void 0:A.data.x)||0)+a.data.width/2,a.data.y=((s==null?void 0:s.data.y)||0)+a.data.height/2}}),r.getAllNodes().forEach(t=>{t.data.dummy==="border"&&r.removeNode(t.id)})},E3=r=>{r.getAllEdges().forEach(t=>{if(t.source===t.target){const e=r.getNode(t.source);e.data.selfEdges||(e.data.selfEdges=[]),e.data.selfEdges.push(t),r.removeEdge(t.id)}})},B3=r=>{const t=Oh(r);t==null||t.forEach(e=>{let n=0;e==null||e.forEach((i,a)=>{var s;const o=r.getNode(i);o.data.order=a+n,(s=o.data.selfEdges)===null||s===void 0||s.forEach(A=>{_c(r,"selfedge",{width:A.data.width,height:A.data.height,rank:o.data.rank,order:a+ ++n,e:A},"_se")}),delete o.data.selfEdges})})},b3=r=>{r.getAllNodes().forEach(t=>{const e=r.getNode(t.id);if(e.data.dummy==="selfedge"){const n=r.getNode(e.data.e.source),i=n.data.x+n.data.width/2,a=n.data.y,s=e.data.x-i,o=n.data.height/2;r.hasEdge(e.data.e.id)?r.updateEdgeData(e.data.e.id,e.data.e.data):r.addEdge({id:e.data.e.id,source:e.data.e.source,target:e.data.e.target,data:e.data.e.data}),r.removeNode(t.id),e.data.e.data.points=[{x:i+2*s/3,y:a-o},{x:i+5*s/6,y:a-o},{y:a,x:i+s},{x:i+5*s/6,y:a+o},{x:i+2*s/3,y:a+o}],e.data.e.data.x=e.data.x,e.data.e.data.y=e.data.y}})},pC=(r,t)=>{const e={};return t==null||t.forEach(n=>{r[n]!==void 0&&(e[n]=+r[n])}),e},mC=(r={})=>{const t={};return Object.keys(r).forEach(e=>{t[e.toLowerCase()]=r[e]}),t};function Ih(r){if(!r)return[0,0,0];if(ye(r))return[r,r,r];if(r.length===0)return[0,0,0];const[t,e=t,n=t]=r;return[t,e,n]}function Tl(r,t){let e;return Wt(t)?e=t:ye(t)?e=()=>t:e=()=>r,e}function Oy(r,t,e=!0){return!t&&t!==0?n=>{const{size:i}=n.data||{};return i?Array.isArray(i)?e?Math.max(...i)||r:i:Br(i)&&i.width&&i.height?e?Math.max(i.width,i.height)||r:[i.width,i.height]:i:r}:Wt(t)?t:ye(t)?()=>t:Array.isArray(t)?()=>e?Math.max(...t)||r:t:Br(t)&&t.width&&t.height?()=>e?Math.max(t.width,t.height)||r:[t.width,t.height]:()=>r}const Iy=(r,t,e=10)=>{let n;const i=typeof t=="function"?t:()=>t||0;return r?Array.isArray(r)?n=s=>r:Wt(r)?n=r:n=s=>r:n=s=>{var o,A,l;if(!((o=s.data)===null||o===void 0)&&o.bboxSize)return(A=s.data)===null||A===void 0?void 0:A.bboxSize;if(!((l=s.data)===null||l===void 0)&&l.size){const c=s.data.size;return Array.isArray(c)?c:Br(c)?[c.width,c.height]:c}return e},s=>{const o=n(s),A=i(s);return Math.max(...Ih(o))+A}},Ly=r=>{if(r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const t=[];return r.forEach(e=>{t.push(e)}),t.map(e=>Ly(e))}if(typeof r=="object"){const t={};return Object.keys(r).forEach(e=>{t[e]=Ly(r[e])}),t}return r},Qa=(r,t)=>{const e=Ly(r);return e.data=e.data||{},t&&(ye(e.data.x)||(e.data.x=Math.random()*t[0]),ye(e.data.y)||(e.data.y=Math.random()*t[1])),e},x3={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class C3{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},x3),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{nodeSize:a,align:s,rankdir:o="TB",ranksep:A,nodesep:l,ranksepFunc:c,nodesepFunc:u,edgeLabelSpace:h,ranker:d,nodeOrder:f,begin:g,controlPoints:v,radial:m,sortByCombo:w,preset:C}=i,F=new Hr({tree:[]}),Q=Tl(A||50,c),D=Tl(l||50,u);let K=D,G=Q;(o==="LR"||o==="RL")&&(K=Q,G=D);const J=Oy(10,a,!1),$=e.getAllNodes(),at=e.getAllEdges();$.forEach(xt=>{const Ft=Ih(J(xt)),_t=G(xt),Xt=K(xt),ie=Ft[0]+2*Xt,le=Ft[1]+2*_t,ve=xt.data.layer;ye(ve)?F.addNode({id:xt.id,data:{width:ie,height:le,layer:ve}}):F.addNode({id:xt.id,data:{width:ie,height:le}})}),w&&(F.attachTreeStructure("combo"),$.forEach(xt=>{const{parentId:Ft}=xt.data;Ft!==void 0&&F.hasNode(Ft)&&F.setParent(xt.id,Ft,"combo")})),at.forEach(xt=>{F.addEdge({id:xt.id,source:xt.source,target:xt.target,data:{weight:xt.data.weight||1}})});let At;C!=null&&C.length&&(At=new Hr({nodes:C})),r3(F,{prevGraph:At,edgeLabelSpace:h,keepNodeOrder:!!f,nodeOrder:f||[],acyclicer:"greedy",ranker:d,rankdir:o,nodesep:l,align:s});const pt=[0,0];if(g){let xt=1/0,Ft=1/0;F.getAllNodes().forEach(_t=>{xt>_t.data.x&&(xt=_t.data.x),Ft>_t.data.y&&(Ft=_t.data.y)}),F.getAllEdges().forEach(_t=>{var Xt;(Xt=_t.data.points)===null||Xt===void 0||Xt.forEach(ie=>{xt>ie.x&&(xt=ie.x),Ft>ie.y&&(Ft=ie.y)})}),pt[0]=g[0]-xt,pt[1]=g[1]-Ft}const wt=o==="LR"||o==="RL";if(!m){const xt=new Set,_t=o==="BT"||o==="RL"?(ve,xe)=>xe-ve:(ve,xe)=>ve-xe;F.getAllNodes().forEach(ve=>{ve.data.x=ve.data.x+pt[0],ve.data.y=ve.data.y+pt[1],xt.add(wt?ve.data.x:ve.data.y)});const Xt=Array.from(xt).sort(_t),ie=wt?(ve,xe)=>ve.x!==xe.x:(ve,xe)=>ve.y!==xe.y,le=wt?(ve,xe,Qe)=>{const Re=Math.max(xe.y,Qe.y),nn=Math.min(xe.y,Qe.y);return ve.filter(mn=>mn.y<=Re&&mn.y>=nn)}:(ve,xe,Qe)=>{const Re=Math.max(xe.x,Qe.x),nn=Math.min(xe.x,Qe.x);return ve.filter(mn=>mn.x<=Re&&mn.x>=nn)};F.getAllEdges().forEach((ve,xe)=>{var Qe;h&&v&&ve.data.type!=="loop"&&(ve.data.controlPoints=S3((Qe=ve.data.points)===null||Qe===void 0?void 0:Qe.map(({x:Re,y:nn})=>({x:Re+pt[0],y:nn+pt[1]})),F.getNode(ve.source),F.getNode(ve.target),Xt,wt,ie,le))})}let bt=[];bt=F.getAllNodes().map(xt=>Qa(xt));const Rt=F.getAllEdges();return t&&(bt.forEach(xt=>{e.mergeNodeData(xt.id,{x:xt.data.x,y:xt.data.y})}),Rt.forEach(xt=>{e.mergeEdgeData(xt.id,{controlPoints:xt.data.controlPoints})})),{nodes:bt,edges:Rt}})}}const S3=(r,t,e,n,i,a,s)=>{let o=(r==null?void 0:r.slice(1,r.length-1))||[];if(t&&e){let{x:A,y:l}=t.data,{x:c,y:u}=e.data;if(i&&(A=t.data.y,l=t.data.x,c=e.data.y,u=e.data.x),u!==l&&A!==c){const h=n.indexOf(l),d=n[h+1];if(d){const v=o[0],m=i?{x:(l+d)/2,y:(v==null?void 0:v.y)||c}:{x:(v==null?void 0:v.x)||c,y:(l+d)/2};(!v||a(v,m))&&o.unshift(m)}const f=n.indexOf(u),g=Math.abs(f-h);if(g===1)o=s(o,t.data,e.data),o.length||o.push(i?{x:(l+u)/2,y:A}:{x:A,y:(l+u)/2});else if(g>1){const v=n[f-1];if(v){const m=o[o.length-1],w=i?{x:(u+v)/2,y:(m==null?void 0:m.y)||c}:{x:(m==null?void 0:m.x)||A,y:(u+v)/2};(!m||a(m,w))&&o.push(w)}}}}return o},Fl=(r,t,e)=>{const n=r.getAllNodes(),i=r.getAllEdges();if(!(n!=null&&n.length))return{nodes:[],edges:i};if(n.length===1)return t&&r.mergeNodeData(n[0].id,{x:e[0],y:e[1]}),{nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:e[0],y:e[1]})})],edges:i}},M3={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class T3{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},M3),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:s,center:o,divisions:A,startAngle:l=0,endAngle:c=2*Math.PI,angleRatio:u,ordering:h,clockwise:d,nodeSpacing:f,nodeSize:g}=i,v=e.getAllNodes(),m=e.getAllEdges(),[w,C,F]=O3(a,s,o),Q=v==null?void 0:v.length;if(!Q||Q===1)return Fl(e,t,F);const D=(c-l)/Q;let{radius:K,startRadius:G,endRadius:J}=i;if(f){const wt=Tl(10,f),bt=Oy(10,g);let Rt=-1/0;v.forEach(xt=>{const Ft=bt(xt);Rt<Ft&&(Rt=Ft)});let Pt=0;v.forEach((xt,Ft)=>{Ft===0?Pt+=Rt||10:Pt+=(wt(xt)||0)+(Rt||10)}),K=Pt/(2*Math.PI)}else!K&&!G&&!J?K=Math.min(C,w)/2:!G&&J?G=J:G&&!J&&(J=G);const $=D*u;let at=[];h==="topology"?at=yC(e,v):h==="topology-directed"?at=yC(e,v,!0):h==="degree"?at=F3(e,v):at=v.map(wt=>Qa(wt));const At=Math.ceil(Q/A);for(let wt=0;wt<Q;++wt){let bt=K;!bt&&G!==null&&J!==null&&(bt=G+wt*(J-G)/(Q-1)),bt||(bt=10+wt*100/(Q-1));let Rt=l+wt%At*$+2*Math.PI/A*Math.floor(wt/At);d||(Rt=c-wt%At*$-2*Math.PI/A*Math.floor(wt/At)),at[wt].data.x=F[0]+Math.cos(Rt)*bt,at[wt].data.y=F[1]+Math.sin(Rt)*bt}return t&&at.forEach(wt=>{e.mergeNodeData(wt.id,{x:wt.data.x,y:wt.data.y})}),{nodes:at,edges:m}})}}const yC=(r,t,e=!1)=>{const n=[Qa(t[0])],i={},a=t.length;i[t[0].id]=!0;let s=0;return t.forEach((o,A)=>{if(A!==0)if((A===a-1||r.getDegree(o.id,"both")!==r.getDegree(t[A+1].id,"both")||r.areNeighbors(n[s].id,o.id))&&!i[o.id])n.push(Qa(o)),i[o.id]=!0,s++;else{const l=e?r.getSuccessors(n[s].id):r.getNeighbors(n[s].id);let c=!1;for(let h=0;h<l.length;h++){const d=l[h];if(r.getDegree(d.id)===r.getDegree(o.id)&&!i[d.id]){n.push(Qa(d)),i[d.id]=!0,c=!0;break}}let u=0;for(;!c&&(i[t[u].id]||(n.push(Qa(t[u])),i[t[u].id]=!0,c=!0),u++,u!==a););}}),n};function F3(r,t){const e=[];return t.forEach((n,i)=>{e.push(Qa(n))}),e.sort((n,i)=>r.getDegree(n.id,"both")-r.getDegree(i.id,"both")),e}const O3=(r,t,e)=>{let n=r,i=t,a=e;return!n&&typeof window!="undefined"&&(n=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[n/2,i/2]),[n,i,a]},Qo=Array.isArray,I3={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class Ny{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},I3),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:s,height:o,sortBy:A,maxLevelDiff:l,sweep:c,clockwise:u,equidistant:h,preventOverlap:d,startAngle:f=3/2*Math.PI,nodeSize:g,nodeSpacing:v}=i,m=e.getAllNodes(),w=e.getAllEdges(),C=!s&&typeof window!="undefined"?window.innerWidth:s,F=!o&&typeof window!="undefined"?window.innerHeight:o,Q=a||[C/2,F/2];if(!(m!=null&&m.length)||m.length===1)return Fl(e,t,Q);const D=[];let K,G=0;Qo(g)?K=Math.max(g[0],g[1]):Wt(g)?(K=-1/0,m.forEach(xt=>{const Ft=Math.max(...Ih(g(xt)));Ft>K&&(K=Ft)})):K=g,Qo(v)?G=Math.max(v[0],v[1]):ye(v)&&(G=v),m.forEach(xt=>{const Ft=Qa(xt);D.push(Ft);let _t=K;const{data:Xt}=Ft;Qo(Xt.size)?_t=Math.max(Xt.size[0],Xt.size[1]):ye(Xt.size)?_t=Xt.size:Br(Xt.size)&&(_t=Math.max(Xt.size.width,Xt.size.height)),K=Math.max(K,_t),Wt(v)&&(G=Math.max(v(xt),G))});const J={};D.forEach((xt,Ft)=>{J[xt.id]=Ft});let $=A;(!gn($)||D[0].data[$]===void 0)&&($="degree"),$==="degree"?D.sort((xt,Ft)=>e.getDegree(Ft.id,"both")-e.getDegree(xt.id,"both")):D.sort((xt,Ft)=>Ft.data[$]-xt.data[$]);const at=D[0],At=(l||($==="degree"?e.getDegree(at.id,"both"):at.data[$]))/4,pt=[{nodes:[]}];let wt=pt[0];D.forEach(xt=>{if(wt.nodes.length>0){const Ft=Math.abs($==="degree"?e.getDegree(wt.nodes[0].id,"both")-e.getDegree(xt.id,"both"):wt.nodes[0].data[$]-xt.data[$]);At&&Ft>=At&&(wt={nodes:[]},pt.push(wt))}wt.nodes.push(xt)});let bt=K+G;if(!d){const xt=pt.length>0&&pt[0].nodes.length>1,_t=(Math.min(C,F)/2-bt)/(pt.length+(xt?1:0));bt=Math.min(bt,_t)}let Rt=0;if(pt.forEach(xt=>{const Ft=c===void 0?2*Math.PI-2*Math.PI/xt.nodes.length:c;if(xt.dTheta=Ft/Math.max(1,xt.nodes.length-1),xt.nodes.length>1&&d){const _t=Math.cos(xt.dTheta)-Math.cos(0),Xt=Math.sin(xt.dTheta)-Math.sin(0),ie=Math.sqrt(bt*bt/(_t*_t+Xt*Xt));Rt=Math.max(ie,Rt)}xt.r=Rt,Rt+=bt}),h){let xt=0,Ft=0;for(let _t=0;_t<pt.length;_t++){const ie=(pt[_t].r||0)-Ft;xt=Math.max(xt,ie)}Ft=0,pt.forEach((_t,Xt)=>{Xt===0&&(Ft=_t.r||0),_t.r=Ft,Ft+=xt})}return pt.forEach(xt=>{const Ft=xt.dTheta||0,_t=xt.r||0;xt.nodes.forEach((Xt,ie)=>{const le=f+(u?1:-1)*Ft*ie;Xt.data.x=Q[0]+_t*Math.cos(le),Xt.data.y=Q[1]+_t*Math.sin(le)})}),t&&D.forEach(xt=>e.mergeNodeData(xt.id,{x:xt.data.x,y:xt.data.y})),{nodes:D,edges:w}})}}var ky=M(14301),L3=M(7695);const N3=.81,Qy=.1;function k3(r,t,e,n,i=2){const a=t/e,s=r.getAllNodes(),o=s.map((c,u)=>{const{nodeStrength:h,x:d,y:f,z:g,size:v}=c.data;return{x:d,y:f,z:g,size:v,index:u,id:c.id,vx:0,vy:0,vz:0,weight:a*h}}),A=(i===2?(0,ky.Z)(o,c=>c.x,c=>c.y):(0,L3.Z)(o,c=>c.x,c=>c.y,c=>c.z)).visitAfter(Q3),l=new Map;return o.forEach(c=>{l.set(c.id,c),P3(c,A,i)}),o.map((c,u)=>{const{id:h,data:d}=s[u],{mass:f=1}=d;n[h]={x:c.vx/f,y:c.vy/f,z:c.vz/f}}),n}function Q3(r){let t=0,e=0,n=0,i=0,a=0;const s=r.length;if(s){for(let o=0;o<s;o++){const A=r[o];A&&A.weight&&(t+=A.weight,e+=A.x*A.weight,n+=A.y*A.weight,i+=A.z*A.weight,a+=A.size*A.weight)}r.x=e/t,r.y=n/t,r.z=i/t,r.size=a/t,r.weight=t}else{const o=r;r.x=o.data.x,r.y=o.data.y,r.z=o.data.z,r.size=o.data.size,r.weight=o.data.weight}}const U3=(r,t,e,n,i,a,s)=>{var o;if(((o=r.data)===null||o===void 0?void 0:o.id)===a.id)return;const A=[e,n,i][s-1],l=a.x-r.x||Qy,c=a.y-r.y||Qy,u=a.z-r.z||Qy,h=[l,c,u],d=A-t;let f=0;for(let m=0;m<s;m++)f+=h[m]*h[m];const v=Math.sqrt(f)*f;if(d*d*N3<f){const m=r.weight/v;return a.vx+=l*m,a.vy+=c*m,a.vz+=u*m,!0}if(r.length)return!1;if(r.data!==a){const m=r.data.weight/v;a.vx+=l*m,a.vy+=c*m,a.vz+=u*m}};function P3(r,t,e){t.visit((n,i,a,s,o)=>U3(n,i,a,s,o,r,e))}const D3={dimensions:2,maxIteration:500,gravity:10,factor:1,edgeStrength:50,nodeStrength:1e3,coulombDisScale:.005,damping:.9,maxSpeed:200,minMovement:.4,interval:.02,linkDistance:200,clusterNodeStrength:20,preventOverlap:!0,distanceThresholdMode:"mean"};class wC{constructor(t={}){this.options=t,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},D3),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;(this.judgingDistance>this.lastOptions.minMovement||n<1)&&n<t;n++)this.runOneStep(this.lastCalcGraph,this.lastGraph,n,this.lastVelMap,this.lastOptions),this.updatePosition(this.lastGraph,this.lastCalcGraph,this.lastVelMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericForceLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),a=e.getAllNodes(),s=e.getAllEdges(),o=this.formatOptions(i,e),{dimensions:A,width:l,height:c,nodeSize:u,getMass:h,nodeStrength:d,edgeStrength:f,linkDistance:g}=o,v=a.map((G,J)=>Object.assign(Object.assign({},G),{data:Object.assign(Object.assign({},G.data),{x:ye(G.data.x)?G.data.x:Math.random()*l,y:ye(G.data.y)?G.data.y:Math.random()*c,z:ye(G.data.z)?G.data.z:Math.random()*Math.sqrt(l*c),size:u(G)||30,mass:h(G),nodeStrength:d(G)})})),m=s.map(G=>Object.assign(Object.assign({},G),{data:Object.assign(Object.assign({},G.data),{edgeStrength:f(G),linkDistance:g(G,e.getNode(G.source),e.getNode(G.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:s},{nodes:[],edges:s};const w={};a.forEach((G,J)=>{w[G.id]={x:0,y:0,z:0}});const C=new Hr({nodes:v,edges:m});this.formatCentripetal(o,C);const{maxIteration:F,minMovement:Q,onTick:D}=o;if(this.lastLayoutNodes=v,this.lastLayoutEdges=m,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=C,this.lastOptions=o,this.lastVelMap=w,typeof window=="undefined")return;let K=0;return new Promise(G=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&G({nodes:Uy(e,v),edges:s}),this.runOneStep(C,e,K,w,o),this.updatePosition(e,C,w,o),t&&v.forEach(J=>e.mergeNodeData(J.id,{x:J.data.x,y:J.data.y,z:A===3?J.data.z:void 0})),D==null||D({nodes:Uy(e,v),edges:s}),K++,(K>=F||this.judgingDistance<Q)&&(window.clearInterval(this.timeInterval),G({nodes:Uy(e,v),edges:s}))},0),this.running=!0})})}formatOptions(t,e){const n=Object.assign({},t),{width:i,height:a,getMass:s}=t;n.width=!i&&typeof window!="undefined"?window.innerWidth:i,n.height=!a&&typeof window!="undefined"?window.innerHeight:a,t.center||(n.center=[n.width/2,n.height/2]),s||(n.getMass=A=>{let l=1;ye(A==null?void 0:A.data.mass)&&(l=A==null?void 0:A.data.mass);const c=e.getDegree(A.id,"both");return!c||c<5?l:c*5*l}),n.nodeSize=Iy(t.nodeSize,t.nodeSpacing);const o=t.linkDistance?Tl(1,t.linkDistance):A=>1+n.nodeSize(e.getNode(A.source))+n.nodeSize(e.getNode(A.target));return n.linkDistance=o,n.nodeStrength=Tl(1,t.nodeStrength),n.edgeStrength=Tl(1,t.edgeStrength),n}formatCentripetal(t,e){const{dimensions:n,centripetalOptions:i,center:a,clusterNodeStrength:s,leafCluster:o,clustering:A,nodeClusterBy:l}=t,c=e.getAllNodes(),u=i||{leaf:2,single:2,others:1,center:m=>({x:a[0],y:a[1],z:n===3?a[2]:void 0})};typeof s!="function"&&(t.clusterNodeStrength=m=>s);let h,d;if(o&&l&&(h=EC(e,l),d=Array.from(new Set(c==null?void 0:c.map(m=>m.data[l])))||[],t.centripetalOptions=Object.assign(u,{single:100,leaf:m=>{const{siblingLeaves:w,sameTypeLeaves:C}=h[m.id]||{};return(C==null?void 0:C.length)===(w==null?void 0:w.length)||(d==null?void 0:d.length)===1?1:t.clusterNodeStrength(m)},others:1,center:m=>{const w=e.getDegree(m.id,"both");if(!w)return{x:100,y:100,z:0};let C;if(w===1){const{sameTypeLeaves:F=[]}=h[m.id]||{};F.length===1?C=void 0:F.length>1&&(C=BC(F))}else C=void 0;return{x:C==null?void 0:C.x,y:C==null?void 0:C.y,z:C==null?void 0:C.z}}})),A&&l){h||(h=EC(e,l)),d||(d=Array.from(new Set(c.map(w=>w.data[l])))),d=d.filter(w=>w!==void 0);const m={};d.forEach(w=>{const C=c.filter(F=>F.data[l]===w).map(F=>e.getNode(F.id));m[w]=BC(C)}),t.centripetalOptions=Object.assign(u,{single:w=>t.clusterNodeStrength(w),leaf:w=>t.clusterNodeStrength(w),others:w=>t.clusterNodeStrength(w),center:w=>{const C=m[w.data[l]];return{x:C==null?void 0:C.x,y:C==null?void 0:C.y,z:C==null?void 0:C.z}}})}const{leaf:f,single:g,others:v}=t.centripetalOptions||{};f&&typeof f!="function"&&(t.centripetalOptions.leaf=()=>f),g&&typeof g!="function"&&(t.centripetalOptions.single=()=>g),v&&typeof v!="function"&&(t.centripetalOptions.others=()=>v)}runOneStep(t,e,n,i,a){const s={},o=t.getAllNodes(),A=t.getAllEdges();if(!(o!=null&&o.length))return;const{monitor:l}=a;if(this.calRepulsive(t,s,a),A&&this.calAttractive(t,s,a),this.calGravity(t,e,s,a),this.updateVelocity(t,s,i,a),l){const c=this.calTotalEnergy(s,o);l({energy:c,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:n})}}calTotalEnergy(t,e){if(!(e!=null&&e.length))return 0;let n=0;return e.forEach((i,a)=>{const s=t[i.id].x,o=t[i.id].y,A=this.options.dimensions===3?t[i.id].z:0,l=s*s+o*o+A*A,{mass:c=1}=i.data;n+=c*l*.5}),n}calRepulsive(t,e,n){const{dimensions:i,factor:a,coulombDisScale:s}=n;k3(t,a,s*s,e,i)}calAttractive(t,e,n){const{dimensions:i,nodeSize:a}=n;t.getAllEdges().forEach((s,o)=>{const{source:A,target:l}=s,c=t.getNode(A),u=t.getNode(l);if(!c||!u)return;let h=u.data.x-c.data.x,d=u.data.y-c.data.y,f=i===3?u.data.z-c.data.z:0;!h&&!d&&(h=Math.random()*.01,d=Math.random()*.01,i===3&&!f&&(f=Math.random()*.01));const g=Math.sqrt(h*h+d*d+f*f);if(g<a(c)+a(u))return;const v=h/g,m=d/g,w=f/g,{linkDistance:C=200,edgeStrength:F=200}=s.data||{},D=(C-g)*F,K=c.data.mass||1,G=u.data.mass||1,J=1/K,$=1/G,at=v*D,At=m*D,pt=w*D;e[A].x-=at*J,e[A].y-=At*J,e[A].z-=pt*J,e[l].x+=at*$,e[l].y+=At*$,e[l].z+=pt*$})}calGravity(t,e,n,i){const{getCenter:a}=i,s=t.getAllNodes(),o=e.getAllNodes(),A=e.getAllEdges(),{width:l,height:c,center:u,gravity:h,centripetalOptions:d}=i;s&&s.forEach(f=>{const{id:g,data:v}=f,{mass:m,x:w,y:C,z:F}=v,Q=e.getNode(g);let D=0,K=0,G=0,J=h;const $=t.getDegree(g,"in"),at=t.getDegree(g,"out"),At=t.getDegree(g,"both"),pt=a==null?void 0:a(Q,At);if(pt){const[wt,bt,Rt]=pt;D=w-wt,K=C-bt,J=Rt}else D=w-u[0],K=C-u[1],G=F-u[2];if(J&&(n[g].x-=J*D/m,n[g].y-=J*K/m,n[g].z-=J*G/m),d){const{leaf:wt,single:bt,others:Rt,center:Pt}=d,{x:xt,y:Ft,z:_t,centerStrength:Xt}=(Pt==null?void 0:Pt(Q,o,A,l,c))||{x:0,y:0,z:0,centerStrength:0};if(!ye(xt)||!ye(Ft))return;const ie=(w-xt)/m,le=(C-Ft)/m,ve=(F-_t)/m;if(Xt&&(n[g].x-=Xt*ie,n[g].y-=Xt*le,n[g].z-=Xt*ve),At===0){const Qe=bt(Q);if(!Qe)return;n[g].x-=Qe*ie,n[g].y-=Qe*le,n[g].z-=Qe*ve;return}if($===0||at===0){const Qe=wt(Q,o,A);if(!Qe)return;n[g].x-=Qe*ie,n[g].y-=Qe*le,n[g].z-=Qe*ve;return}const xe=Rt(Q);if(!xe)return;n[g].x-=xe*ie,n[g].y-=xe*le,n[g].z-=xe*ve}})}updateVelocity(t,e,n,i){const{damping:a,maxSpeed:s,interval:o,dimensions:A}=i,l=t.getAllNodes();l!=null&&l.length&&l.forEach(c=>{const{id:u}=c;let h=(n[u].x+e[u].x*o)*a||.01,d=(n[u].y+e[u].y*o)*a||.01,f=A===3?(n[u].z+e[u].z*o)*a||.01:0;const g=Math.sqrt(h*h+d*d+f*f);if(g>s){const v=s/g;h=v*h,d=v*d,f=v*f}n[u]={x:h,y:d,z:f}})}updatePosition(t,e,n,i){const{distanceThresholdMode:a,interval:s,dimensions:o}=i,A=e.getAllNodes();if(!(A!=null&&A.length)){this.judgingDistance=0;return}let l=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),A.forEach(c=>{const{id:u}=c,h=t.getNode(u);if(ye(h.data.fx)&&ye(h.data.fy)){e.mergeNodeData(u,{x:h.data.fx,y:h.data.fy,z:o===3?h.data.fz:void 0});return}const d=n[u].x*s,f=n[u].y*s,g=o===3?n[u].z*s:0;e.mergeNodeData(u,{x:c.data.x+d,y:c.data.y+f,z:c.data.z+g});const v=Math.sqrt(d*d+f*f+g*g);switch(a){case"max":this.judgingDistance<v&&(this.judgingDistance=v);break;case"min":this.judgingDistance>v&&(this.judgingDistance=v);break;default:l=l+v;break}}),(!a||a==="mean")&&(this.judgingDistance=l/A.length)}}const EC=(r,t)=>{const e=r.getAllNodes();if(!(e!=null&&e.length))return{};const n={};return e.forEach((i,a)=>{r.getDegree(i.id,"both")===1&&(n[i.id]=R3(r,"leaf",i,t))}),n},R3=(r,t,e,n)=>{const i=r.getDegree(e.id,"in"),a=r.getDegree(e.id,"out");let s=e,o=[];i===0?(s=r.getSuccessors(e.id)[0],o=r.getNeighbors(s.id)):a===0&&(s=r.getPredecessors(e.id)[0],o=r.getNeighbors(s.id)),o=o.filter(l=>r.getDegree(l.id,"in")===0||r.getDegree(l.id,"out")===0);const A=_3(r,t,n,e,o);return{coreNode:s,siblingLeaves:o,sameTypeLeaves:A}},_3=(r,t,e,n,i)=>{const a=n.data[e]||"";let s=(i==null?void 0:i.filter(o=>o.data[e]===a))||[];return t==="leaf"&&(s=s.filter(o=>r.getDegree(o.id,"in")===0||r.getDegree(o.id,"out")===0)),s},BC=r=>{const t={x:0,y:0};r.forEach(n=>{const{x:i,y:a}=n.data;t.x+=i||0,t.y+=a||0});const e=r.length||1;return{x:t.x/e,y:t.y/e}},Uy=(r,t)=>t.map(e=>{const{id:n,data:i}=e,a=r.getNode(n);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var wn=M(30035);const iG=wn.XA,aG=wn.a_,sG=wn.yQ,oG=wn.Hs,AG=wn.Ec,lG=wn.dx,cG=wn.LU,uG=wn.Rm,TA=wn.y3,hG=wn.qK,dG=wn.pb,fG=wn.j,gG=wn.sO,vG=wn.BZ,pG=wn.EK,mG=wn.Db,yG=wn.Fx,wG=wn.tU,EG=wn.Ym,BG=wn.rs,bG=wn.QR,xG=wn.TB,CG=wn.oH,bC=wn.Sc,SG=wn.BN,MG=wn.it,TG=wn.$r,FG=wn.QM,OG=wn.AV;var IG=(wn.y3,wn.y3);const LG=wn.GH,NG=wn.SO,kG=wn.uZ,QG=wn.yU,UG=wn.F1,PG=wn.re,xC=r=>{const t=[],e=r.length;for(let n=0;n<e;n+=1){t[n]=[];for(let i=0;i<e;i+=1)n===i?t[n][i]=0:r[n][i]===0||!r[n][i]?t[n][i]=1/0:t[n][i]=r[n][i]}for(let n=0;n<e;n+=1)for(let i=0;i<e;i+=1)for(let a=0;a<e;a+=1)t[i][a]>t[i][n]+t[n][a]&&(t[i][a]=t[i][n]+t[n][a]);return t},CC=(r,t)=>{const{nodes:e,edges:n}=r,i=[],a={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((s,o)=>{a[s.id]=o;const A=[];i.push(A)}),n==null||n.forEach(s=>{const{source:o,target:A}=s,l=a[o],c=a[A];l===void 0||c===void 0||(i[l][c]=1,t||(i[c][l]=1))}),i},H3=(r,t)=>{const e=[];return r.forEach(n=>{const i=[];n.forEach(a=>{i.push(a*t)}),e.push(i)}),e},G3=r=>{let t=1/0,e=1/0,n=-1/0,i=-1/0;return r.forEach(a=>{let s=a.data.size;Qo(s)?s.length===1&&(s=[s[0],s[0]]):ye(s)?s=[s,s]:(s===void 0||isNaN(s))&&(s=[30,30]);const o=[s[0]/2,s[1]/2],A=a.data.x-o[0],l=a.data.x+o[0],c=a.data.y-o[1],u=a.data.y+o[1];t>A&&(t=A),e>c&&(e=c),n<l&&(n=l),i<u&&(i=u)}),{minX:t,minY:e,maxX:n,maxY:i}},SC=(r,t)=>Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)),Py=(r,t,e,n="TB",i,a={})=>{if(!(t!=null&&t.length))return;const{stopBranchFn:s,stopAllFn:o}=a;for(let A=0;A<t.length;A++){const l=t[A];if(r.hasNode(l.id)&&!(s!=null&&s(l))){if(o!=null&&o(l))return;n==="TB"&&e(l),Py(r,r.getChildren(l.id,i),e,n,i,a),n!=="TB"&&e(l)}}},K3={center:[0,0],linkDistance:50};class MC{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},K3),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a=[0,0],linkDistance:s=50}=i,o=e.getAllNodes(),A=e.getAllEdges();if(!(o!=null&&o.length)||o.length===1)return Fl(e,t,a);const l=CC({nodes:o,edges:A},!1),c=xC(l);z3(c);const u=H3(c,s),h=V3(u),d=[];return h.forEach((g,v)=>{const m=Qa(o[v]);m.data.x=g[0]+a[0],m.data.y=g[1]+a[1],d.push(m)}),t&&d.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:d,edges:A}})}}const z3=r=>{let t=-999999;r.forEach(e=>{e.forEach(n=>{n!==1/0&&t<n&&(t=n)})}),r.forEach((e,n)=>{e.forEach((i,a)=>{i===1/0&&(r[n][a]=t)})})},V3=r=>{const e=TA.mul(TA.pow(r,2),-.5),n=e.mean("row"),i=e.mean("column"),a=e.mean();e.add(a).subRowVector(n).subColumnVector(i);const s=new bC(e),o=TA.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(A=>TA.mul([A],[o]).toJSON()[0].splice(0,2))};function Dy(r){return!!r.tick&&!!r.stop}const W3={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},Z3={center:[0,0],comboPadding:10,treeKey:"combo"};class j3{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},Z3),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),n)),{center:a,treeKey:s,outerLayout:o}=i,A=e.getAllNodes().filter(G=>!G.data._isCombo),l=e.getAllNodes().filter(G=>G.data._isCombo),c=e.getAllEdges(),u=A==null?void 0:A.length;if(!u||u===1)return Fl(e,t,a);const h=[],d=new Map;A.forEach(G=>{d.set(G.id,G)});const f=new Map;l.forEach(G=>{f.set(G.id,G)});const g=new Map,v=this.getInnerGraphs(e,s,d,f,c,i,g);yield Promise.all(v);const m=new Map,w=[],C=new Map;let F=!0;e.getRoots(s).forEach(G=>{const J=g.get(G.id),$=f.get(G.id)||d.get(G.id),at={id:G.id,data:Object.assign(Object.assign({},G.data),{x:J.data.x||$.data.x,y:J.data.y||$.data.y,fx:J.data.fx||$.data.fx,fy:J.data.fy||$.data.fy,mass:J.data.mass||$.data.mass,size:J.data.size})};w.push(at),m.set(G.id,!0),!isNaN(at.data.x)&&at.data.x!==0&&!isNaN(at.data.y)&&at.data.y!==0?F=!1:(at.data.x=Math.random()*100,at.data.y=Math.random()*100),Py(e,[G],At=>{At.id!==G.id&&C.set(At.id,G.id)},"TB",s)});const Q=[];c.forEach(G=>{const J=C.get(G.source)||G.source,$=C.get(G.target)||G.target;J!==$&&m.has(J)&&m.has($)&&Q.push({id:G.id,source:J,target:$,data:{}})});let D;if(w!=null&&w.length){if(w.length===1)w[0].data.x=a[0],w[0].data.y=a[1];else{const G=new Hr({nodes:w,edges:Q}),J=o||new wC;F&&W3[J.id]&&(yield(w.length<100?new MC:new Ny).assign(G));const $=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},J.id==="force"?{gravity:1,factor:4,linkDistance:(at,At,pt)=>{const wt=Math.max(...At.data.size)||32,bt=Math.max(...pt.data.size)||32;return wt/2+bt/2+200}}:{});D=yield TC(J,G,$)}g.forEach(G=>{var J;const $=D.nodes.find(pt=>pt.id===G.id);if($){const{x:pt,y:wt}=$.data;G.data.visited=!0,G.data.x=pt,G.data.y=wt,h.push({id:G.id,data:{x:pt,y:wt}})}const{x:at,y:At}=G.data;(J=G.data.nodes)===null||J===void 0||J.forEach(pt=>{h.push({id:pt.id,data:{x:pt.data.x+at,y:pt.data.y+At}})})}),g.forEach(({data:G})=>{const{x:J,y:$,visited:at,nodes:At}=G;At==null||At.forEach(pt=>{if(!at){const wt=h.find(bt=>bt.id===pt.id);wt.data.x+=J||0,wt.data.y+=$||0}})})}return t&&h.forEach(G=>{e.mergeNodeData(G.id,{x:G.data.x,y:G.data.y})}),{nodes:h,edges:c}})}initVals(t){const e=Object.assign({},t),{nodeSize:n,spacing:i,comboPadding:a}=t;let s,o;if(ye(i)?o=()=>i:Wt(i)?o=i:o=()=>0,e.spacing=o,!n)s=l=>{const c=o(l);return l.size?Qo(l.size)?((l.size[0]>l.size[1]?l.size[0]:l.size[1])+c)/2:Br(l.size)?((l.size.width>l.size.height?l.size.width:l.size.height)+c)/2:(l.size+c)/2:32+c/2};else if(Wt(n))s=l=>{const c=n(l),u=o(l);return Qo(l.size)?((l.size[0]>l.size[1]?l.size[0]:l.size[1])+u)/2:((c||32)+u)/2};else if(Qo(n)){const c=(n[0]>n[1]?n[0]:n[1])/2;s=u=>c+o(u)/2}else{const l=n/2;s=c=>l+o(c)/2}e.nodeSize=s;let A;return ye(a)?A=()=>a:Qo(a)?A=()=>Math.max.apply(null,a):Wt(a)?A=a:A=()=>0,e.comboPadding=A,e}getInnerGraphs(t,e,n,i,a,s,o){const{nodeSize:A,comboPadding:l,spacing:c,innerLayout:u}=s,h=u||new Ny({}),d={center:[0,0],preventOverlap:!0,nodeSpacing:c},f=[],g=v=>{let m=(l==null?void 0:l(v))||10;return Qo(m)&&(m=Math.max(...m)),{size:m?[m*2,m*2]:[30,30],padding:m}};return t.getRoots(e).forEach(v=>{o.set(v.id,{id:v.id,data:{nodes:[],size:g(v).size}});let m=Promise.resolve();Py(t,[v],w=>{var C;if(!w.data._isCombo)return;const{size:F,padding:Q}=g(w);if(!(!((C=t.getChildren(w.id,e))===null||C===void 0)&&C.length))o.set(w.id,{id:w.id,data:Object.assign(Object.assign({},w.data),{size:F})});else{const D=o.get(w.id);o.set(w.id,{id:w.id,data:Object.assign({nodes:[]},D==null?void 0:D.data)});const K=new Map,G=t.getChildren(w.id,e).map(at=>{if(at.data._isCombo)return o.has(at.id)||o.set(at.id,{id:at.id,data:Object.assign({},at.data)}),K.set(at.id,!0),o.get(at.id);const At=n.get(at.id)||i.get(at.id);return K.set(at.id,!0),{id:at.id,data:Object.assign(Object.assign({},At.data),at.data)}}),J={nodes:G,edges:a.filter(at=>K.has(at.source)&&K.has(at.target))};let $=1/0;G.forEach(at=>{var At;let{size:pt}=at.data;pt||(pt=((At=o.get(at.id))===null||At===void 0?void 0:At.data.size)||(A==null?void 0:A(at))||[30,30]),ye(pt)&&(pt=[pt,pt]);const[wt,bt]=pt;$>wt&&($=wt),$>bt&&($=bt),at.data.size=pt}),m=m.then(()=>(0,z.mG)(this,void 0,void 0,function*(){const at=new Hr(J);yield TC(h,at,d,!0);const{minX:At,minY:pt,maxX:wt,maxY:bt}=G3(G),Rt={x:(wt+At)/2,y:(bt+pt)/2};J.nodes.forEach(xt=>{xt.data.x-=Rt.x,xt.data.y-=Rt.y});const Pt=[Math.max(wt-At,$)+Q*2,Math.max(bt-pt,$)+Q*2];o.get(w.id).data.size=Pt,o.get(w.id).data.nodes=G}))}return!0},"BT",e),f.push(m)}),f}}function TC(r,t,e,n){var i;return(0,z.mG)(this,void 0,void 0,function*(){return Dy(r)?(r.execute(t,e),r.stop(),r.tick((i=e.iterations)!==null&&i!==void 0?i:300)):n?yield r.assign(t,e):yield r.execute(t,e)})}function li(r){return function(){return r}}function FA(r){return(r()-.5)*1e-6}function Y3(r){return r.index}function FC(r,t){var e=r.get(t);if(!e)throw new Error("node not found: "+t);return e}function X3(r){var t=Y3,e=u,n,i=li(30),a,s,o,A,l,c=1;r==null&&(r=[]);function u(v){return 1/Math.min(o[v.source.index],o[v.target.index])}function h(v){for(var m=0,w=r.length;m<c;++m)for(var C=0,F,Q,D,K,G,J,$;C<w;++C)F=r[C],Q=F.source,D=F.target,K=D.x+D.vx-Q.x-Q.vx||FA(l),G=D.y+D.vy-Q.y-Q.vy||FA(l),J=Math.sqrt(K*K+G*G),J=(J-a[C])/J*v*n[C],K*=J,G*=J,D.vx-=K*($=A[C]),D.vy-=G*$,Q.vx+=K*($=1-$),Q.vy+=G*$}function d(){if(s){var v,m=s.length,w=r.length,C=new Map(s.map((Q,D)=>[t(Q,D,s),Q])),F;for(v=0,o=new Array(m);v<w;++v)F=r[v],F.index=v,typeof F.source!="object"&&(F.source=FC(C,F.source)),typeof F.target!="object"&&(F.target=FC(C,F.target)),o[F.source.index]=(o[F.source.index]||0)+1,o[F.target.index]=(o[F.target.index]||0)+1;for(v=0,A=new Array(w);v<w;++v)F=r[v],A[v]=o[F.source.index]/(o[F.source.index]+o[F.target.index]);n=new Array(w),f(),a=new Array(w),g()}}function f(){if(s)for(var v=0,m=r.length;v<m;++v)n[v]=+e(r[v],v,r)}function g(){if(s)for(var v=0,m=r.length;v<m;++v)a[v]=+i(r[v],v,r)}return h.initialize=function(v,m){s=v,l=m,d()},h.links=function(v){return arguments.length?(r=v,d(),h):r},h.id=function(v){return arguments.length?(t=v,h):t},h.iterations=function(v){return arguments.length?(c=+v,h):c},h.strength=function(v){return arguments.length?(e=typeof v=="function"?v:li(+v),f(),h):e},h.distance=function(v){return arguments.length?(i=typeof v=="function"?v:li(+v),g(),h):i},h}var J3=M(22497),q3=M(83833);const $3=1664525,tP=1013904223,OC=4294967296;function eP(){let r=1;return()=>(r=($3*r+tP)%OC)/OC}function nP(r){return r.x}function rP(r){return r.y}var iP=10,aP=Math.PI*(3-Math.sqrt(5));function sP(r){var t,e=1,n=.001,i=1-Math.pow(n,1/300),a=0,s=.6,o=new Map,A=(0,q3.HT)(u),l=(0,J3.Z)("tick","end"),c=eP();r==null&&(r=[]);function u(){h(),l.call("tick",t),e<n&&(A.stop(),l.call("end",t))}function h(g){var v,m=r.length,w;g===void 0&&(g=1);for(var C=0;C<g;++C)for(e+=(a-e)*i,o.forEach(function(F){F(e)}),v=0;v<m;++v)w=r[v],w.fx==null?w.x+=w.vx*=s:(w.x=w.fx,w.vx=0),w.fy==null?w.y+=w.vy*=s:(w.y=w.fy,w.vy=0);return t}function d(){for(var g=0,v=r.length,m;g<v;++g){if(m=r[g],m.index=g,m.fx!=null&&(m.x=m.fx),m.fy!=null&&(m.y=m.fy),isNaN(m.x)||isNaN(m.y)){var w=iP*Math.sqrt(.5+g),C=g*aP;m.x=w*Math.cos(C),m.y=w*Math.sin(C)}(isNaN(m.vx)||isNaN(m.vy))&&(m.vx=m.vy=0)}}function f(g){return g.initialize&&g.initialize(r,c),g}return d(),t={tick:h,restart:function(){return A.restart(u),t},stop:function(){return A.stop(),t},nodes:function(g){return arguments.length?(r=g,d(),o.forEach(f),t):r},alpha:function(g){return arguments.length?(e=+g,t):e},alphaMin:function(g){return arguments.length?(n=+g,t):n},alphaDecay:function(g){return arguments.length?(i=+g,t):+i},alphaTarget:function(g){return arguments.length?(a=+g,t):a},velocityDecay:function(g){return arguments.length?(s=1-g,t):1-s},randomSource:function(g){return arguments.length?(c=g,o.forEach(f),t):c},force:function(g,v){return arguments.length>1?(v==null?o.delete(g):o.set(g,f(v)),t):o.get(g)},find:function(g,v,m){var w=0,C=r.length,F,Q,D,K,G;for(m==null?m=1/0:m*=m,w=0;w<C;++w)K=r[w],F=g-K.x,Q=v-K.y,D=F*F+Q*Q,D<m&&(G=K,m=D);return G},on:function(g,v){return arguments.length>1?(l.on(g,v),t):l.on(g)}}}function oP(){var r,t,e,n,i=li(-30),a,s=1,o=1/0,A=.81;function l(d){var f,g=r.length,v=(0,ky.Z)(r,nP,rP).visitAfter(u);for(n=d,f=0;f<g;++f)t=r[f],v.visit(h)}function c(){if(r){var d,f=r.length,g;for(a=new Array(f),d=0;d<f;++d)g=r[d],a[g.index]=+i(g,d,r)}}function u(d){var f=0,g,v,m=0,w,C,F;if(d.length){for(w=C=F=0;F<4;++F)(g=d[F])&&(v=Math.abs(g.value))&&(f+=g.value,m+=v,w+=v*g.x,C+=v*g.y);d.x=w/m,d.y=C/m}else{g=d,g.x=g.data.x,g.y=g.data.y;do f+=a[g.data.index];while(g=g.next)}d.value=f}function h(d,f,g,v){if(!d.value)return!0;var m=d.x-t.x,w=d.y-t.y,C=v-f,F=m*m+w*w;if(C*C/A<F)return F<o&&(m===0&&(m=FA(e),F+=m*m),w===0&&(w=FA(e),F+=w*w),F<s&&(F=Math.sqrt(s*F)),t.vx+=m*d.value*n/F,t.vy+=w*d.value*n/F),!0;if(d.length||F>=o)return;(d.data!==t||d.next)&&(m===0&&(m=FA(e),F+=m*m),w===0&&(w=FA(e),F+=w*w),F<s&&(F=Math.sqrt(s*F)));do d.data!==t&&(C=a[d.data.index]*n/F,t.vx+=m*C,t.vy+=w*C);while(d=d.next)}return l.initialize=function(d,f){r=d,e=f,c()},l.strength=function(d){return arguments.length?(i=typeof d=="function"?d:li(+d),c(),l):i},l.distanceMin=function(d){return arguments.length?(s=d*d,l):Math.sqrt(s)},l.distanceMax=function(d){return arguments.length?(o=d*d,l):Math.sqrt(o)},l.theta=function(d){return arguments.length?(A=d*d,l):Math.sqrt(A)},l}function AP(r,t){var e,n=1;r==null&&(r=0),t==null&&(t=0);function i(){var a,s=e.length,o,A=0,l=0;for(a=0;a<s;++a)o=e[a],A+=o.x,l+=o.y;for(A=(A/s-r)*n,l=(l/s-t)*n,a=0;a<s;++a)o=e[a],o.x-=A,o.y-=l}return i.initialize=function(a){e=a},i.x=function(a){return arguments.length?(r=+a,i):r},i.y=function(a){return arguments.length?(t=+a,i):t},i.strength=function(a){return arguments.length?(n=+a,i):n},i}function lP(r){return r.x+r.vx}function cP(r){return r.y+r.vy}function uP(r){var t,e,n,i=1,a=1;typeof r!="function"&&(r=li(r==null?1:+r));function s(){for(var l,c=t.length,u,h,d,f,g,v,m=0;m<a;++m)for(u=(0,ky.Z)(t,lP,cP).visitAfter(o),l=0;l<c;++l)h=t[l],g=e[h.index],v=g*g,d=h.x+h.vx,f=h.y+h.vy,u.visit(w);function w(C,F,Q,D,K){var G=C.data,J=C.r,$=g+J;if(G){if(G.index>h.index){var at=d-G.x-G.vx,At=f-G.y-G.vy,pt=at*at+At*At;pt<$*$&&(at===0&&(at=FA(n),pt+=at*at),At===0&&(At=FA(n),pt+=At*At),pt=($-(pt=Math.sqrt(pt)))/pt*i,h.vx+=(at*=pt)*($=(J*=J)/(v+J)),h.vy+=(At*=pt)*$,G.vx-=at*($=1-$),G.vy-=At*$)}return}return F>d+$||D<d-$||Q>f+$||K<f-$}}function o(l){if(l.data)return l.r=e[l.data.index];for(var c=l.r=0;c<4;++c)l[c]&&l[c].r>l.r&&(l.r=l[c].r)}function A(){if(t){var l,c=t.length,u;for(e=new Array(c),l=0;l<c;++l)u=t[l],e[u.index]=+r(u,l,t)}}return s.initialize=function(l,c){t=l,n=c,A()},s.iterations=function(l){return arguments.length?(a=+l,s):a},s.strength=function(l){return arguments.length?(i=+l,s):i},s.radius=function(l){return arguments.length?(r=typeof l=="function"?l:li(+l),A(),s):r},s}function hP(r,t,e){var n,i=li(.1),a,s;typeof r!="function"&&(r=li(+r)),t==null&&(t=0),e==null&&(e=0);function o(l){for(var c=0,u=n.length;c<u;++c){var h=n[c],d=h.x-t||1e-6,f=h.y-e||1e-6,g=Math.sqrt(d*d+f*f),v=(s[c]-g)*a[c]*l/g;h.vx+=d*v,h.vy+=f*v}}function A(){if(n){var l,c=n.length;for(a=new Array(c),s=new Array(c),l=0;l<c;++l)s[l]=+r(n[l],l,n),a[l]=isNaN(s[l])?0:+i(n[l],l,n)}}return o.initialize=function(l){n=l,A()},o.strength=function(l){return arguments.length?(i=typeof l=="function"?l:li(+l),A(),o):i},o.radius=function(l){return arguments.length?(r=typeof l=="function"?l:li(+l),A(),o):r},o.x=function(l){return arguments.length?(t=+l,o):t},o.y=function(l){return arguments.length?(e=+l,o):e},o}function dP(r){var t=li(.1),e,n,i;typeof r!="function"&&(r=li(r==null?0:+r));function a(o){for(var A=0,l=e.length,c;A<l;++A)c=e[A],c.vx+=(i[A]-c.x)*n[A]*o}function s(){if(e){var o,A=e.length;for(n=new Array(A),i=new Array(A),o=0;o<A;++o)n[o]=isNaN(i[o]=+r(e[o],o,e))?0:+t(e[o],o,e)}}return a.initialize=function(o){e=o,s()},a.strength=function(o){return arguments.length?(t=typeof o=="function"?o:li(+o),s(),a):t},a.x=function(o){return arguments.length?(r=typeof o=="function"?o:li(+o),s(),a):r},a}function fP(r){var t=li(.1),e,n,i;typeof r!="function"&&(r=li(r==null?0:+r));function a(o){for(var A=0,l=e.length,c;A<l;++A)c=e[A],c.vy+=(i[A]-c.y)*n[A]*o}function s(){if(e){var o,A=e.length;for(n=new Array(A),i=new Array(A),o=0;o<A;++o)n[o]=isNaN(i[o]=+r(e[o],o,e))?0:+t(e[o],o,e)}}return a.initialize=function(o){e=o,s()},a.strength=function(o){return arguments.length?(t=typeof o=="function"?o:li(+o),s(),a):t},a.y=function(o){return arguments.length?(r=typeof o=="function"?o:li(+o),s(),a):r},a}class gP{constructor(t){this.id="d3-force",this.config={inputNodeAttrs:["x","y","vx","vy","fx","fy"],outputNodeAttrs:["x","y","vx","vy"],simulationAttrs:["alpha","alphaMin","alphaDecay","alphaTarget","velocityDecay","randomSource"]},this.forceMap={link:X3,manyBody:oP,center:AP,collide:uP,radial:hP,x:dP,y:fP},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},Ci(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){const n=this.context.nodes.find(i=>i.id===t);n&&e.forEach((i,a)=>{if(typeof i=="number"||i===null){const s=["fx","fy","fz"][a];n[s]=i}})}getOptions(t){var e,n;const i=Ci({},this.options,t);return i.collide&&((e=i.collide)===null||e===void 0?void 0:e.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(n=i.nodeSize)!==null&&n!==void 0?n:10),i.iterations===void 0&&(i.link&&i.link.iterations===void 0&&(i.iterations=i.link.iterations),i.collide&&i.collide.iterations===void 0&&(i.iterations=i.collide.iterations)),this.context.options=i,i}genericLayout(t,e,n){var i;return(0,z.mG)(this,void 0,void 0,function*(){const a=this.getOptions(n),s=e.getAllNodes().map(({id:c,data:u})=>Object.assign(Object.assign({id:c},u),xl(u.data,this.config.inputNodeAttrs))),o=e.getAllEdges().map(c=>Object.assign({},c));Object.assign(this.context,{assign:t,nodes:s,edges:o,graph:e});const A=new Promise(c=>{this.resolver=c}),l=this.setSimulation(a);return l.nodes(s),(i=l.force("link"))===null||i===void 0||i.links(o),A})}getResult(){const{assign:t,nodes:e,edges:n,graph:i}=this.context,a=e.map(o=>({id:o.id,data:Object.assign(Object.assign({},o.data),xl(o,this.config.outputNodeAttrs))})),s=n.map(({id:o,source:A,target:l,data:c})=>({id:o,source:typeof A=="object"?A.id:A,target:typeof l=="object"?l.id:l,data:c}));return t&&a.forEach(o=>i.mergeNodeData(o.id,o.data)),{nodes:a,edges:s}}initSimulation(){return sP()}setSimulation(t){const e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var n;return(n=t.onTick)===null||n===void 0?void 0:n.call(t,this.getResult())}).on("end",()=>{var n;return(n=this.resolver)===null||n===void 0?void 0:n.call(this,this.getResult())})),IC(e,this.config.simulationAttrs.map(n=>[n,t[n]])),Object.entries(this.forceMap).forEach(([n,i])=>{const a=n;if(t[n]){let s=e.force(a);s||(s=i(),e.force(a,s)),IC(s,Object.entries(t[a]))}else e.force(a,null)}),e}}const IC=(r,t)=>t.reduce((e,[n,i])=>!e[n]||i===void 0?e:e[n].call(r,i),r);var LC=M(92546),vP=M.n(LC);class Dg{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,Dg.defaultOptions,t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const{nodeSize:i}=n,a=new LC.graphlib.Graph;a.setGraph(n),a.setDefaultEdgeLabel(()=>({}));const s=e.getAllNodes(),o=e.getAllEdges();[...s,...o].some(({id:l})=>ye(l))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(l=>{const{id:c}=l,u=Object.assign({},l.data);if(i!==void 0){const[h,d]=Ih(Wt(i)?i(l):i);Object.assign(u,{width:h,height:d})}a.setNode(c.toString(),u)}),e.getAllEdges().forEach(({id:l,source:c,target:u})=>{a.setEdge(c.toString(),u.toString(),{id:l})}),vP().layout(a);const A={nodes:[],edges:[]};return a.nodes().forEach(l=>{const c=a.node(l);A.nodes.push({id:l,data:c}),t&&e.mergeNodeData(l,c)}),a.edges().forEach(l=>{const c=a.edge(l),{id:u}=c,h=(0,z._T)(c,["id"]),{v:d,w:f}=l;A.edges.push({id:u,source:d,target:f,data:h}),t&&e.mergeEdgeData(u,h)}),A})}}Dg.defaultOptions={};class Ry{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){const e=this.rx-t.rx,n=this.ry-t.ry;return Math.hypot(e,n)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){const e=t.rx-this.rx,n=t.ry-this.ry;let i=Math.hypot(e,n);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(t.degree+1)/i;this.fx+=a*e/i,this.fy+=a*n/i}in(t){return t.contains(this.rx,this.ry)}add(t){const e=this.mass+t.mass,n=(this.rx*this.mass+t.rx*t.mass)/e,i=(this.ry*this.mass+t.ry*t.mass)/e,a=this.degree+t.degree,s={rx:n,ry:i,mass:e,degree:a};return new Ry(s)}}class Hc{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){const n=this.length/2;return t<=this.xmid+n&&t>=this.xmid-n&&e<=this.ymid+n&&e>=this.ymid-n}NW(){const t=this.xmid-this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Hc(i)}NE(){const t=this.xmid+this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Hc(i)}SW(){const t=this.xmid-this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Hc(i)}SE(){const t=this.xmid+this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Hc(i)}}class Gc{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,t!=null&&(this.quad=t)}insert(t){if(this.body==null){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new Gc(this.quad.NW()),this.NE=new Gc(this.quad.NE()),this.SW=new Gc(this.quad.SW()),this.SE=new Gc(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(t){if(!(this.body==null||t===this.body))if(this._isExternal())t.addForce(this.body);else{const e=this.quad?this.quad.getLength():0,n=this.body.distanceTo(t);e/n<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t))}}}const pP={center:[0,0],width:300,height:300,kr:5,kg:1,mode:"normal",preventOverlap:!1,dissuadeHubs:!1,maxIteration:0,ks:.1,ksmax:10,tao:.1};class mP{constructor(t={}){this.options=t,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},pP),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,t,e)})}genericForceAtlas2Layout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=e.getAllEdges(),a=e.getAllNodes(),s=this.formatOptions(n,a.length),{width:o,height:A,prune:l,maxIteration:c,nodeSize:u,center:h}=s;if(!(a!=null&&a.length)||a.length===1)return Fl(e,t,h);const d=a.map(m=>Qa(m,[o,A])),f=i.filter(m=>{const{source:w,target:C}=m;return w!==C}),g=new Hr({nodes:d,edges:f}),v=this.getSizes(g,u);if(this.run(g,e,c,v,t,s),l){for(let w=0;w<f.length;w+=1){const{source:C,target:F}=f[w],Q=g.getDegree(C),D=g.getDegree(C);if(Q<=1){const K=g.getNode(F);g.mergeNodeData(C,{x:K.data.x,y:K.data.y})}else if(D<=1){const K=g.getNode(C);g.mergeNodeData(F,{x:K.data.x,y:K.data.y})}}const m=Object.assign(Object.assign({},s),{prune:!1,barnesHut:!1});this.run(g,e,100,v,t,m)}return{nodes:d,edges:i}})}getSizes(t,e){const n=t.getAllNodes(),i={};for(let a=0;a<n.length;a+=1){const s=n[a];i[s.id]=Iy(e,void 0)(s)}return i}formatOptions(t={},e){const n=Object.assign(Object.assign({},this.options),t),{center:i,width:a,height:s,barnesHut:o,prune:A,maxIteration:l,kr:c,kg:u}=n;return n.width=!a&&typeof window!="undefined"?window.innerWidth:a,n.height=!s&&typeof window!="undefined"?window.innerHeight:s,n.center=i||[n.width/2,n.height/2],o===void 0&&e>250&&(n.barnesHut=!0),A===void 0&&e>100&&(n.prune=!0),l===0&&!A?(n.maxIteration=250,e<=200&&e>100?n.maxIteration=1e3:e>200&&(n.maxIteration=1200)):l===0&&A&&(n.maxIteration=100,e<=200&&e>100?n.maxIteration=500:e>200&&(n.maxIteration=950)),c||(n.kr=50,e>100&&e<=500?n.kr=20:e>500&&(n.kr=1)),u||(n.kg=20,e>100&&e<=500?n.kg=10:e>500&&(n.kg=1)),n}run(t,e,n,i,a,s){const{kr:o,barnesHut:A,onTick:l}=s,c=t.getAllNodes();let u=0,h=n;const d={},f={},g={};for(let v=0;v<c.length;v+=1){const{data:m,id:w}=c[v];if(d[w]=[0,0],A){const C={id:v,rx:m.x,ry:m.y,mass:1,g:o,degree:t.getDegree(w)};g[w]=new Ry(C)}}for(;h>0;)u=this.oneStep(t,{iter:h,preventOverlapIters:50,krPrime:100,sg:u,forces:d,preForces:f,bodies:g,sizes:i},s),h--,l==null||l({nodes:c,edges:e.getAllEdges()});return t}oneStep(t,e,n){const{iter:i,preventOverlapIters:a,krPrime:s,sg:o,preForces:A,bodies:l,sizes:c}=e;let{forces:u}=e;const{preventOverlap:h,barnesHut:d}=n,f=t.getAllNodes();for(let g=0;g<f.length;g+=1){const{id:v}=f[g];A[v]=[...u[v]],u[v]=[0,0]}return u=this.getAttrForces(t,i,a,c,u,n),d&&(h&&i>a||!h)?u=this.getOptRepGraForces(t,u,l,n):u=this.getRepGraForces(t,i,a,u,s,c,n),this.updatePos(t,u,A,o,n)}getAttrForces(t,e,n,i,a,s){const{preventOverlap:o,dissuadeHubs:A,mode:l,prune:c}=s,u=t.getAllEdges();for(let h=0;h<u.length;h+=1){const{source:d,target:f}=u[h],g=t.getNode(d),v=t.getNode(f),m=t.getDegree(d),w=t.getDegree(f);if(c&&(m<=1||w<=1))continue;const C=[v.data.x-g.data.x,v.data.y-g.data.y];let F=Math.hypot(C[0],C[1]);F=F<1e-4?1e-4:F,C[0]=C[0]/F,C[1]=C[1]/F,o&&e<n&&(F=F-i[d]-i[f]);let Q=F,D=Q;l==="linlog"&&(Q=Math.log(1+F),D=Q),A&&(Q=F/m,D=F/w),o&&e<n&&F<=0?(Q=0,D=0):o&&e<n&&F>0&&(Q=F,D=F),a[d][0]+=Q*C[0],a[f][0]-=D*C[0],a[d][1]+=Q*C[1],a[f][1]-=D*C[1]}return a}getOptRepGraForces(t,e,n,i){const{kg:a,center:s,prune:o}=i,A=t.getAllNodes(),l=A.length;let c=9e10,u=-9e10,h=9e10,d=-9e10;for(let w=0;w<l;w+=1){const{id:C,data:F}=A[w];o&&t.getDegree(C)<=1||(n[C].setPos(F.x,F.y),F.x>=u&&(u=F.x),F.x<=c&&(c=F.x),F.y>=d&&(d=F.y),F.y<=h&&(h=F.y))}const f=Math.max(u-c,d-h),g={xmid:(u+c)/2,ymid:(d+h)/2,length:f,massCenter:s,mass:l},v=new Hc(g),m=new Gc(v);for(let w=0;w<l;w+=1){const{id:C}=A[w];o&&t.getDegree(C)<=1||n[C].in(v)&&m.insert(n[C])}for(let w=0;w<l;w+=1){const{id:C,data:F}=A[w],Q=t.getDegree(C);if(o&&Q<=1)continue;n[C].resetForce(),m.updateForce(n[C]),e[C][0]-=n[C].fx,e[C][1]-=n[C].fy;const D=[F.x-s[0],F.y-s[1]];let K=Math.hypot(D[0],D[1]);K=K<1e-4?1e-4:K,D[0]=D[0]/K,D[1]=D[1]/K;const G=a*(Q+1);e[C][0]-=G*D[0],e[C][1]-=G*D[1]}return e}getRepGraForces(t,e,n,i,a,s,o){const{preventOverlap:A,kr:l,kg:c,center:u,prune:h}=o,d=t.getAllNodes(),f=d.length;for(let g=0;g<f;g+=1){const v=d[g],m=t.getDegree(v.id);for(let Q=g+1;Q<f;Q+=1){const D=d[Q],K=t.getDegree(D.id);if(h&&(m<=1||K<=1))continue;const G=[D.data.x-v.data.x,D.data.y-v.data.y];let J=Math.hypot(G[0],G[1]);J=J<1e-4?1e-4:J,G[0]=G[0]/J,G[1]=G[1]/J,A&&e<n&&(J=J-s[v.id]-s[D.id]);let $=l*(m+1)*(K+1)/J;A&&e<n&&J<0?$=a*(m+1)*(K+1):A&&e<n&&J===0?$=0:A&&e<n&&J>0&&($=l*(m+1)*(K+1)/J),i[v.id][0]-=$*G[0],i[D.id][0]+=$*G[0],i[v.id][1]-=$*G[1],i[D.id][1]+=$*G[1]}const w=[v.data.x-u[0],v.data.y-u[1]],C=Math.hypot(w[0],w[1]);w[0]=w[0]/C,w[1]=w[1]/C;const F=c*(m+1);i[v.id][0]-=F*w[0],i[v.id][1]-=F*w[1]}return i}updatePos(t,e,n,i,a){const{ks:s,tao:o,prune:A,ksmax:l}=a,c=t.getAllNodes(),u=c.length,h=[],d=[];let f=0,g=0,v=i;for(let w=0;w<u;w+=1){const{id:C}=c[w],F=t.getDegree(C);if(A&&F<=1)continue;const Q=[e[C][0]-n[C][0],e[C][1]-n[C][1]],D=Math.hypot(Q[0],Q[1]),K=[e[C][0]+n[C][0],e[C][1]+n[C][1]],G=Math.hypot(K[0],K[1]);h[w]=D,d[w]=G/2,f+=(F+1)*h[w],g+=(F+1)*d[w]}const m=v;v=o*g/f,m!==0&&(v=v>1.5*m?1.5*m:v);for(let w=0;w<u;w+=1){const{id:C,data:F}=c[w],Q=t.getDegree(C);if(A&&Q<=1||ye(F.fx)&&ye(F.fy))continue;let D=s*v/(1+v*Math.sqrt(h[w])),K=Math.hypot(e[C][0],e[C][1]);K=K<1e-4?1e-4:K;const G=l/K;D=D>G?G:D;const J=D*e[C][0],$=D*e[C][1];t.mergeNodeData(C,{x:F.x+J,y:F.y+$})}return v}}const yP={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},wP=800;class EP{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},yP),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;n<t;n++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericFruchtermanLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(n),{dimensions:a,width:s,height:o,center:A,clustering:l,nodeClusterBy:c,maxIteration:u,onTick:h}=i,d=e.getAllNodes(),f=e.getAllEdges();if(!(d!=null&&d.length)){const C={nodes:[],edges:f};return this.lastResult=C,C}if(d.length===1){t&&e.mergeNodeData(d[0].id,{x:A[0],y:A[1],z:a===3?A[2]:void 0});const C={nodes:[Object.assign(Object.assign({},d[0]),{data:Object.assign(Object.assign({},d[0].data),{x:A[0],y:A[1],z:a===3?A[2]:void 0})})],edges:f};return this.lastResult=C,C}const g=d.map(C=>Qa(C,[s,o])),v=new Hr({nodes:g,edges:f}),m={};if(l&&g.forEach(C=>{const F=C.data[c];m[F]||(m[F]={name:F,cx:0,cy:0,count:0})}),this.lastLayoutNodes=g,this.lastLayoutEdges=f,this.lastAssign=t,this.lastGraph=v,this.lastOptions=i,this.lastClusterMap=m,typeof window=="undefined")return;let w=0;return new Promise(C=>{this.timeInterval=window.setInterval(()=>{if(!this.running){C({nodes:g,edges:f});return}this.runOneStep(v,m,i),t&&g.forEach(({id:F,data:Q})=>e.mergeNodeData(F,{x:Q.x,y:Q.y,z:a===3?Q.z:void 0})),h==null||h({nodes:g,edges:f}),w++,w>=u&&(window.clearInterval(this.timeInterval),C({nodes:g,edges:f}))},0),this.running=!0})})}formatOptions(t={}){const e=Object.assign(Object.assign({},this.options),t),{clustering:n,nodeClusterBy:i}=e,{center:a,width:s,height:o}=e;return e.width=!s&&typeof window!="undefined"?window.innerWidth:s,e.height=!o&&typeof window!="undefined"?window.innerHeight:o,e.center=a||[e.width/2,e.height/2],e.clustering=n&&!!i,e}runOneStep(t,e,n){const{dimensions:i,height:a,width:s,gravity:o,center:A,speed:l,clustering:c,nodeClusterBy:u,clusterGravity:h}=n,d=a*s,f=Math.sqrt(d)/10,g=t.getAllNodes(),v=d/(g.length+1),m=Math.sqrt(v),w={};if(this.applyCalculate(t,w,m,v),c){for(const F in e)e[F].cx=0,e[F].cy=0,e[F].count=0;g.forEach(F=>{const{data:Q}=F,D=e[Q[u]];ye(Q.x)&&(D.cx+=Q.x),ye(Q.y)&&(D.cy+=Q.y),D.count++});for(const F in e)e[F].cx/=e[F].count,e[F].cy/=e[F].count;const C=h||o;g.forEach((F,Q)=>{const{id:D,data:K}=F;if(!ye(K.x)||!ye(K.y))return;const G=e[K[u]],J=Math.sqrt((K.x-G.cx)*(K.x-G.cx)+(K.y-G.cy)*(K.y-G.cy)),$=m*C;w[D].x-=$*(K.x-G.cx)/J,w[D].y-=$*(K.y-G.cy)/J})}g.forEach((C,F)=>{const{id:Q,data:D}=C;if(!ye(D.x)||!ye(D.y))return;const K=.01*m*o;w[Q].x-=K*(D.x-A[0]),w[Q].y-=K*(D.y-A[1]),i===3&&(w[Q].z-=K*(D.z-A[2]))}),g.forEach((C,F)=>{const{id:Q,data:D}=C;if(ye(D.fx)&&ye(D.fy)){D.x=D.fx,D.y=D.fy,i===3&&(D.z=D.fz);return}if(!ye(D.x)||!ye(D.y))return;const K=Math.sqrt(w[Q].x*w[Q].x+w[Q].y*w[Q].y+(i===3?w[Q].z*w[Q].z:0));if(K>0){const G=Math.min(f*(l/wP),K);t.mergeNodeData(Q,{x:D.x+w[Q].x/K*G,y:D.y+w[Q].y/K*G,z:i===3?D.z+w[Q].z/K*G:void 0})}})}applyCalculate(t,e,n,i){this.calRepulsive(t,e,i),this.calAttractive(t,e,n)}calRepulsive(t,e,n){const i=t.getAllNodes();i.forEach(({data:a,id:s},o)=>{e[s]={x:0,y:0,z:0},i.forEach(({data:A,id:l},c)=>{if(o<=c||!ye(a.x)||!ye(A.x)||!ye(a.y)||!ye(A.y))return;let u=a.x-A.x,h=a.y-A.y,d=this.options.dimensions===3?a.z-A.z:0,f=u*u+h*h+d*d;f===0&&(f=1,u=.01,h=.01,d=.01);const g=n/f,v=u*g,m=h*g,w=d*g;e[s].x+=v,e[s].y+=m,e[l].x-=v,e[l].y-=m,this.options.dimensions===3&&(e[s].z+=w,e[l].z-=w)})})}calAttractive(t,e,n){t.getAllEdges().forEach(a=>{const{source:s,target:o}=a;if(!s||!o||s===o)return;const{data:A}=t.getNode(s),{data:l}=t.getNode(o);if(!ye(l.x)||!ye(A.x)||!ye(l.y)||!ye(A.y))return;const c=l.x-A.x,u=l.y-A.y,h=this.options.dimensions===3?l.z-A.z:0,d=Math.sqrt(c*c+u*u+h*h)/n,f=c*d,g=u*d,v=h*d;e[s].x+=f,e[s].y+=g,e[o].x-=f,e[o].y-=g,this.options.dimensions===3&&(e[s].z+=v,e[o].z-=v)})}}const BP={begin:[0,0],preventOverlap:!0,preventOverlapPadding:10,condense:!1,rows:void 0,cols:void 0,position:void 0,sortBy:"degree",nodeSize:30,width:300,height:300};class bP{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},BP),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{begin:a=[0,0],condense:s,preventOverlapPadding:o,preventOverlap:A,rows:l,cols:c,nodeSpacing:u,nodeSize:h,width:d,height:f,position:g}=i;let{sortBy:v}=i;const m=e.getAllNodes(),w=e.getAllEdges(),C=m==null?void 0:m.length;if(!C||C===1)return Fl(e,t,a);const F=m.map(bt=>Qa(bt));v!=="id"&&(!gn(v)||F[0].data[v]===void 0)&&(v="degree"),v==="degree"?F.sort((bt,Rt)=>e.getDegree(Rt.id,"both")-e.getDegree(bt.id,"both")):v==="id"?F.sort((bt,Rt)=>ye(Rt.id)&&ye(bt.id)?Rt.id-bt.id:`${bt.id}`.localeCompare(`${Rt.id}`)):F.sort((bt,Rt)=>Rt.data[v]-bt.data[v]);const Q=!d&&typeof window!="undefined"?window.innerWidth:d,D=!f&&typeof window!="undefined"?window.innerHeight:f,K=C,G={rows:l,cols:c};if(l!=null&&c!=null)G.rows=l,G.cols=c;else if(l!=null&&c==null)G.rows=l,G.cols=Math.ceil(K/G.rows);else if(l==null&&c!=null)G.cols=c,G.rows=Math.ceil(K/G.cols);else{const bt=Math.sqrt(K*D/Q);G.rows=Math.round(bt),G.cols=Math.round(Q/D*bt)}if(G.rows=Math.max(G.rows,1),G.cols=Math.max(G.cols,1),G.cols*G.rows>K){const bt=Rg(G),Rt=_g(G);(bt-1)*Rt>=K?Rg(G,bt-1):(Rt-1)*bt>=K&&_g(G,Rt-1)}else for(;G.cols*G.rows<K;){const bt=Rg(G),Rt=_g(G);(Rt+1)*bt>=K?_g(G,Rt+1):Rg(G,bt+1)}let J=s?0:Q/G.cols,$=s?0:D/G.rows;if(A||u){const bt=Tl(10,u),Rt=Oy(30,h,!1);F.forEach(Pt=>{(!Pt.data.x||!Pt.data.y)&&(Pt.data.x=0,Pt.data.y=0);const xt=e.getNode(Pt.id),[Ft,_t]=Ih(Rt(xt)||30),Xt=bt!==void 0?bt(Pt):o,ie=Ft+Xt,le=_t+Xt;J=Math.max(J,ie),$=Math.max($,le)})}const at={},At={row:0,col:0},pt={};for(let bt=0;bt<F.length;bt++){const Rt=F[bt];let Pt;if(g&&(Pt=g(e.getNode(Rt.id))),Pt&&(Pt.row!==void 0||Pt.col!==void 0)){const xt={row:Pt.row,col:Pt.col};if(xt.col===void 0)for(xt.col=0;_y(at,xt);)xt.col++;else if(xt.row===void 0)for(xt.row=0;_y(at,xt);)xt.row++;pt[Rt.id]=xt,NC(at,xt)}xP(Rt,a,J,$,pt,G,At,at)}const wt={nodes:F,edges:w};return t&&F.forEach(bt=>{e.mergeNodeData(bt.id,{x:bt.data.x,y:bt.data.y})}),wt})}}const Rg=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.min(n,i):Math.min(n,i)===r.rows?r.rows=t:r.cols=t,e},_g=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.max(n,i):Math.max(n,i)===r.rows?r.rows=t:r.cols=t,e},_y=(r,t)=>r[`c-${t.row}-${t.col}`]||!1,NC=(r,t)=>r[`c-${t.row}-${t.col}`]=!0,kC=(r,t)=>{const e=r.cols||5;t.col++,t.col>=e&&(t.col=0,t.row++)},xP=(r,t,e,n,i,a,s,o)=>{let A,l;const c=i[r.id];if(c)A=c.col*e+e/2+t[0],l=c.row*n+n/2+t[1];else{for(;_y(o,s);)kC(a,s);A=s.col*e+e/2+t[0],l=s.row*n+n/2+t[1],NC(o,s),kC(a,s)}r.data.x=A,r.data.y=l},CP=(r,t,e)=>{try{const n=TA.mul(TA.pow(t,2),-.5),i=n.mean("row"),a=n.mean("column"),s=n.mean();n.add(s).subRowVector(i).subColumnVector(a);const o=new bC(n),A=TA.sqrt(o.diagonalMatrix).diagonal();return o.leftSingularVectors.toJSON().map(l=>TA.mul([l],[A]).toJSON()[0].splice(0,r))}catch(n){const i=[];for(let a=0;a<t.length;a++){const s=Math.random()*e,o=Math.random()*e;i.push([s,o])}return i}},SP=800,MP={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},TP=(r,t)=>{const e=Object.assign(Object.assign({},MP),t),{positions:n,iterations:i,width:a,k:s,speed:o=100,strictRadial:A,focusIdx:l,radii:c=[],nodeSizeFunc:u}=e,h=r.getAllNodes(),d=[],f=a/10;for(let g=0;g<i;g++)n.forEach((v,m)=>{d[m]={x:0,y:0}}),FP(h,n,d,s,c,u),OP(n,d,o,A,l,f,a,c);return n},FP=(r,t,e,n,i,a)=>{t.forEach((s,o)=>{e[o]={x:0,y:0},t.forEach((A,l)=>{if(o===l||i[o]!==i[l])return;let c=s.x-A.x,u=s.y-A.y,h=Math.sqrt(c*c+u*u);if(h===0){h=1;const d=o>l?1:-1;c=.01*d,u=.01*d}if(h<a(r[o])/2+a(r[l])/2){const d=n*n/h;e[o].x+=c/h*d,e[o].y+=u/h*d}})})},OP=(r,t,e,n,i,a,s,o)=>{const A=a||s/10;return n&&t.forEach((l,c)=>{const u=r[c].x-r[i].x,h=r[c].y-r[i].y,d=Math.sqrt(u*u+h*h);let f=h/d,g=-u/d;const v=Math.sqrt(l.x*l.x+l.y*l.y);let m=Math.acos((f*l.x+g*l.y)/v);m>Math.PI/2&&(m-=Math.PI/2,f*=-1,g*=-1);const w=Math.cos(m)*v;l.x=f*w,l.y=g*w}),r.forEach((l,c)=>{if(c===i)return;const u=Math.sqrt(t[c].x*t[c].x+t[c].y*t[c].y);if(u>0&&c!==i){const h=Math.min(A*(e/SP),u);if(l.x+=t[c].x/u*h,l.y+=t[c].y/u*h,n){let d=l.x-r[i].x,f=l.y-r[i].y;const g=Math.sqrt(d*d+f*f);d=d/g*o[c],f=f/g*o[c],l.x=r[i].x+d,l.y=r[i].y+f}}}),r},IP={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class LP{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},IP),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:s,center:o,focusNode:A,unitRadius:l,nodeSize:c,nodeSpacing:u,strictRadial:h,preventOverlap:d,maxPreventOverlapIteration:f,sortBy:g,linkDistance:v=50,sortStrength:m=10,maxIteration:w=1e3}=i,C=e.getAllNodes(),F=e.getAllEdges(),Q=!a&&typeof window!="undefined"?window.innerWidth:a,D=!s&&typeof window!="undefined"?window.innerHeight:s,K=o||[Q/2,D/2];if(!(C!=null&&C.length)||C.length===1)return Fl(e,t,K);let G=C[0];if(gn(A)){for(let Re=0;Re<C.length;Re++)if(C[Re].id===A){G=C[Re];break}}else G=A||C[0];const J=QP(C,G.id),$=CC({nodes:C,edges:F},!1),at=xC($),At=PP(at,J);UP(at,J,At+1);const pt=at[J];let wt=Q-K[0]>K[0]?K[0]:Q-K[0],bt=D-K[1]>K[1]?K[1]:D-K[1];wt===0&&(wt=Q/2),bt===0&&(bt=D/2);const Rt=Math.min(wt,bt),Pt=Math.max(...pt),xt=[],Ft=l||Rt/Pt;pt.forEach((Re,nn)=>{xt[nn]=Re*Ft});const _t=NP(C,at,v,xt,Ft,g,m),Xt=kP(_t),ie=CP(v,_t,v);let le=ie.map(([Re,nn])=>({x:(isNaN(Re)?Math.random()*v:Re)-ie[J][0],y:(isNaN(nn)?Math.random()*v:nn)-ie[J][1]}));this.run(w,le,Xt,_t,xt,J);let ve;if(d){ve=Iy(c,u);const Re={nodes:C,nodeSizeFunc:ve,positions:le,radii:xt,height:D,width:Q,strictRadial:!!h,focusIdx:J,iterations:f||200,k:le.length/4.5};le=TP(e,Re)}const xe=[];return le.forEach((Re,nn)=>{const mn=Qa(C[nn]);mn.data.x=Re.x+K[0],mn.data.y=Re.y+K[1],xe.push(mn)}),t&&xe.forEach(Re=>e.mergeNodeData(Re.id,{x:Re.data.x,y:Re.data.y})),{nodes:xe,edges:F}})}run(t,e,n,i,a,s){for(let o=0;o<=t;o++){const A=o/t;this.oneIteration(A,e,a,i,n,s)}}oneIteration(t,e,n,i,a,s){const o=1-t;e.forEach((A,l)=>{const c=SC(A,{x:0,y:0}),u=c===0?0:1/c;if(l===s)return;let h=0,d=0,f=0;e.forEach((v,m)=>{if(l===m)return;const w=SC(A,v),C=w===0?0:1/w,F=i[m][l];f+=a[l][m],h+=a[l][m]*(v.x+F*(A.x-v.x)*C),d+=a[l][m]*(v.y+F*(A.y-v.y)*C)});const g=n[l]===0?0:1/n[l];f*=o,f+=t*g*g,h*=o,h+=t*g*A.x*u,A.x=h/f,d*=o,d+=t*g*A.y*u,A.y=d/f})}}const NP=(r,t,e,n,i,a,s)=>{if(!r)return[];const o=[];if(t){const A={};t.forEach((l,c)=>{const u=[];l.forEach((h,d)=>{var f,g;if(c===d)u.push(0);else if(n[c]===n[d])if(a==="data")u.push(h*(Math.abs(c-d)*s)/(n[c]/i));else if(a){let v,m;if(A[r[c].id])v=A[r[c].id];else{const w=(a==="id"?r[c].id:(f=r[c].data)===null||f===void 0?void 0:f[a])||0;gn(w)?v=w.charCodeAt(0):v=w,A[r[c].id]=v}if(A[r[d].id])m=A[r[d].id];else{const w=(a==="id"?r[d].id:(g=r[d].data)===null||g===void 0?void 0:g[a])||0;gn(w)?m=w.charCodeAt(0):m=w,A[r[d].id]=m}u.push(h*(Math.abs(v-m)*s)/(n[c]/i))}else u.push(h*e/(n[c]/i));else{const v=(e+i)/2;u.push(h*v)}}),o.push(u)})}return o},kP=r=>{const t=r.length,e=r[0].length,n=[];for(let i=0;i<t;i++){const a=[];for(let s=0;s<e;s++)r[i][s]!==0?a.push(1/(r[i][s]*r[i][s])):a.push(0);n.push(a)}return n},QP=(r,t)=>{let e=-1;return r.forEach((n,i)=>{n.id===t&&(e=i)}),Math.max(e,0)},UP=(r,t,e)=>{const n=r.length;for(let i=0;i<n;i++)if(r[t][i]===1/0){r[t][i]=e,r[i][t]=e;for(let a=0;a<n;a++)r[i][a]!==1/0&&r[t][a]===1/0&&(r[t][a]=e+r[i][a],r[a][t]=e+r[i][a])}for(let i=0;i<n;i++)if(i!==t){for(let a=0;a<n;a++)if(r[i][a]===1/0){let s=Math.abs(r[t][i]-r[t][a]);s=s===0?1:s,r[i][a]=s}}},PP=(r,t)=>{let e=0;for(let n=0;n<r[t].length;n++)r[t][n]!==1/0&&(e=r[t][n]>e?r[t][n]:e);return e},DP={center:[0,0],width:300,height:300};class RP{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},DP),t)}execute(t,e){return(0,z.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,z.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,n){return(0,z.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:s,height:o}=i,A=e.getAllNodes(),l=.9,c=!s&&typeof window!="undefined"?window.innerWidth:s,u=!o&&typeof window!="undefined"?window.innerHeight:o,h=a||[c/2,u/2],d=[];return A&&A.forEach(g=>{d.push({id:g.id,data:{x:(Math.random()-.5)*l*c+h[0],y:(Math.random()-.5)*l*u+h[1]}})}),t&&d.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:d,edges:e.getAllEdges()}})}}function _P(r){var t,e,n,i=r||1;function a(o,A){++t>i&&(n=e,s(1),++t),e[o]=A}function s(o){t=0,e=Object.create(null),o||(n=Object.create(null))}return s(),{clear:s,has:function(o){return e[o]!==void 0||n[o]!==void 0},get:function(o){var A=e[o];if(A!==void 0)return A;if((A=n[o])!==void 0)return a(o,A),A},set:function(o,A){e[o]!==void 0?e[o]=A:a(o,A)}}}var Hy=new Map;function Gy(r,t,e){e===void 0&&(e=128);var n=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=t?t.apply(this,i):i[0];Hy.has(r)||Hy.set(r,_P(e));var o=Hy.get(r);if(o.has(s))return o.get(s);var A=r.apply(this,i);return o.set(s,A),A};return n}var HP=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Hg extends Mg{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const t=this.context.model.getRootsData();if(!(ro(t)||t.length>2))return t[0]}formatSize(t){const e=typeof t=="function"?t:()=>t;return n=>ka(e(n))}doLayout(t,e){const{hGap:n,getRibSep:i,vGap:a,nodeSize:s,height:o}=e,{model:A}=this.context,l=this.formatSize(s);let c=l(t)[0]+i(t);const u=(C,F=0)=>{var Q;return F+=n*((C.children||[]).length+1),(Q=C.children)===null||Q===void 0||Q.forEach(D=>{var K;(K=A.getNodeLikeDatum(D).children)===null||K===void 0||K.forEach(J=>{const $=A.getNodeLikeDatum(J);F=u($,F)})}),F},h=C=>{if(C.depth===1)return c;const F=A.getParentData(C.id,"tree");if(Kc(C)){const Q=A.getParentData(F.id,"tree"),D=g(C)-g(Q);return h(F)+D*n/a}else{const Q=(F.children||[]).indexOf(C.id),D=A.getNodeData((F.children||[]).slice(Q));return d(F)-D.reduce((K,G)=>K+u(G),0)-l(F)[0]/2}},d=Gy(C=>{if(Ky(C))return l(C)[0]/2;const F=A.getParentData(C.id,"tree");if(Kc(C))return h(C)+u(C)+l(C)[0]/2;{const Q=g(C)-g(F),D=n/a;return h(C)+Q*D}},C=>C.id),f=C=>g(A.getParentData(C,"tree")),g=Gy(C=>{if(Ky(C))return o/2;if(Kc(C)){const F=A.getParentData(C.id,"tree"),Q=F.children.indexOf(C.id);if(Q===0)return f(F.id)+a;const D=A.getNodeLikeDatum(F.children[Q-1]);if(ro(D.children))return g(D)+a;const K=A.getDescendantsData(D.id);return Math.max(...K.map(G=>Kc(G)?f(G.id):g(G)))+a}else{if(ro(C.children))return f(C.id)+a;const F=A.getNodeLikeDatum(C.children.slice(-1)[0]);if(ro(F.children))return g(F)+a;const Q=A.getDescendantsData(C.id).slice(-1)[0];return(Kc(Q)?f(Q.id):g(Q))+a}},C=>C.id);let v=0;const m={nodes:[],edges:[]},w=C=>{var F;(F=C.children)===null||F===void 0||F.forEach(J=>w(A.getNodeLikeDatum(J)));const Q=g(C),D=d(C);if(m.nodes.push({id:C.id,x:D,y:Q}),Ky(C))return;const K=A.getRelatedEdgesData(C.id,"in")[0],G=[h(C),Kc(C)?Q:f(C.id)];m.edges.push({id:Qt(K),controlPoints:[G],relatedNodeId:C.id}),v=Math.max(v,D+i(C)),C.depth===1&&(c=v)};return w(t),m}placeAlterative(t,e){const n=(e.children||[]).filter((o,A)=>A%2!==0);if(n.length===0)return t;const{model:i}=this.context,a=t.nodes.find(o=>o.id===e.id).y,s=o=>{const A=i.getAncestorsData(o,"tree");if(ro(A))return!1;const l=A.length===1?o:A[A.length-2].id;return n.includes(l)};t.nodes.forEach(o=>{s(o.id)&&(o.y=2*a-o.y)}),t.edges.forEach(o=>{s(o.relatedNodeId)&&(o.controlPoints=o.controlPoints.map(A=>[A[0],2*a-A[1]]))})}rightToLeft(t,e){return t.nodes.forEach(n=>n.x=e.width-n.x),t.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[e.width-i[0],i[1]])}),t}execute(t,e){return HP(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},Hg.defaultOptions),this.options),e),{direction:i,nodeSize:a}=n,s=this.getRoot();if(!s)return t;const o=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(t.nodes||[]).map(h=>o(h)[1]))),n.hGap||(n.hGap=Math.max(...(t.nodes||[]).map(h=>o(h)[0])));let A=this.doLayout(s,n);this.placeAlterative(A,s),i==="RL"&&(A=this.rightToLeft(A,n));const{model:l}=this.context,c=[],u=[];return A.nodes.forEach(h=>{const{id:d,x:f,y:g}=h,v=l.getNodeLikeDatum(d);c.push(QC(v,{x:f,y:g}))}),A.edges.forEach(h=>{const{id:d,controlPoints:f}=h,g=l.getEdgeDatum(d);u.push(QC(g,{controlPoints:f}))}),{nodes:c,edges:u}})}}Hg.defaultOptions={direction:"RL",getRibSep:()=>60};const QC=(r,t)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),t)}),Ky=r=>r.depth===0,Kc=r=>(r.depth||(r.depth=0))%2===0;var GP=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Gg extends Mg{constructor(){super(...arguments),this.id="snake"}formatSize(t,e){const n=typeof e=="function"?e:()=>e;return t.reduce((i,a)=>{const[s,o]=ka(n(a))||[0,0];return[Math.max(i[0],s),Math.max(i[1],o)]},[0,0])}validate(t){const{nodes:e=[],edges:n=[]}=t,i={},a={},s={};e.forEach(h=>{i[h.id]=0,a[h.id]=0,s[h.id]=[]}),n.forEach(h=>{i[h.target]++,a[h.source]++,s[h.source].push(h.target)});const o=new Set,A=h=>{o.has(h)||(o.add(h),s[h].forEach(A))};if(A(e[0].id),o.size!==e.length)return!1;const l=e.filter(h=>i[h.id]===0),c=e.filter(h=>a[h.id]===0);return!(l.length!==1||c.length!==1||e.filter(h=>i[h.id]===1&&a[h.id]===1).length!==e.length-2)}execute(t,e){return GP(this,void 0,void 0,function*(){var n;if(!this.validate(t))return t;const{nodeSize:i,padding:a,sortBy:s,cols:o,colGap:A,rowGap:l,clockwise:c,width:u,height:h}=Object.assign({},Gg.defaultOptions,this.options,e),[d,f,g,v]=La(a),m=this.formatSize(t.nodes||[],i),w=Math.ceil((t.nodes||[]).length/o);let C=A||(u-v-f-o*m[0])/(o-1),F=l||(h-d-g-w*m[1])/(w-1);return(F===1/0||F<0)&&(F=0),(C===1/0||C<0)&&(C=0),{nodes:((s?(n=t.nodes)===null||n===void 0?void 0:n.sort(s):KP(t))||[]).map((K,G)=>{const J=Math.floor(G/o),$=G%o,at=c?J%2===0?$:o-1-$:J%2===0?o-1-$:$,At=v+at*(m[0]+C)+m[0]/2,pt=d+J*(m[1]+F)+m[1]/2;return{id:K.id,style:{x:At,y:pt}}})}})}}Gg.defaultOptions={padding:0,cols:5,clockwise:!0};function KP(r){const{nodes:t=[],edges:e=[]}=r,n={},i={};t.forEach(o=>{n[o.id]=0,i[o.id]=[]}),e.forEach(o=>{n[o.target]++,i[o.source].push(o.target)});const a=[],s=[];for(t.forEach(o=>{n[o.id]===0&&a.push(o.id)});a.length>0;){const o=a.shift(),A=t.find(l=>l.id===o);s.push(A),i[o].forEach(l=>{n[l]--,n[l]===0&&a.push(l)})}return s}const zP=["rgb(158, 1, 66)","rgb(213, 62, 79)","rgb(244, 109, 67)","rgb(253, 174, 97)","rgb(254, 224, 139)","rgb(255, 255, 191)","rgb(230, 245, 152)","rgb(171, 221, 164)","rgb(102, 194, 165)","rgb(50, 136, 189)","rgb(94, 79, 162)"],VP=["rgb(78, 121, 167)","rgb(242, 142, 44)","rgb(225, 87, 89)","rgb(118, 183, 178)","rgb(89, 161, 79)","rgb(237, 201, 73)","rgb(175, 122, 161)","rgb(255, 157, 167)","rgb(156, 117, 95)","rgb(186, 176, 171)"],WP=["rgb(255, 245, 235)","rgb(254, 230, 206)","rgb(253, 208, 162)","rgb(253, 174, 107)","rgb(253, 141, 60)","rgb(241, 105, 19)","rgb(217, 72, 1)","rgb(166, 54, 3)","rgb(127, 39, 4)"],ZP=["rgb(247, 252, 245)","rgb(229, 245, 224)","rgb(199, 233, 192)","rgb(161, 217, 155)","rgb(116, 196, 118)","rgb(65, 171, 93)","rgb(35, 139, 69)","rgb(0, 109, 44)","rgb(0, 68, 27)"],jP=["rgb(247, 251, 255)","rgb(222, 235, 247)","rgb(198, 219, 239)","rgb(158, 202, 225)","rgb(107, 174, 214)","rgb(66, 146, 198)","rgb(33, 113, 181)","rgb(8, 81, 156)","rgb(8, 48, 107)"];var YP=function(r,t,e){if(!Ni(r)&&!Qc(r))return r;var n=e;return Vb(r,function(i,a){n=t(n,i,a)}),n},XP=YP,zy=function(r,t){return XP(r,function(e,n,i){return t.includes(i)||(e[i]=n),e},{})};class mi extends Zm{}function zc(r,t=!0,e){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),t&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),e&&Object.assign(n.style,e),n}function Vy(r,t="div",e={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const s=document.createElement(t);return s.innerHTML=n,s.id=r,Object.assign(s.style,e),i.appendChild(s),s}var JP=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class Kg extends mi{constructor(t,e){super(t,Object.assign({},Kg.defaultOptions,e)),this.$element=zc("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return JP(this,void 0,void 0,function*(){e.update.call(this,t),Object.assign(this.$element.style,zy(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}Kg.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};function Wy(r,t,e,n,i,a){const s=r,o=t,A=e-s,l=n-o;let c=i-s,u=a-o,h=c*A+u*l,d=0;h<=0?d=0:(c=A-c,u=l-u,h=c*A+u*l,h<=0?d=0:d=h*h/(A*A+l*l));const f=c*c+u*u-d;return f<0?0:f}function OA(r,t,e,n){return(r-e)*(r-e)+(t-n)*(t-n)}function UC(r,t,e,n,i){return OA(r,t,e,n)<i*i}function qP(r){if(!Number.isFinite(r))return e=>e;if(r===0)return Math.round;const t=Math.pow(10,r);return e=>Math.round(e*t)/t}function PC(r){const t=Math.min(r.x1,r.x2),e=Math.max(r.x1,r.x2),n=Math.min(r.y1,r.y2),i=Math.max(r.y1,r.y2);return{x:t,y:n,x2:e,y2:i,width:e-t,height:i-n}}class yi{constructor(t,e,n,i){this.x1=t,this.y1=e,this.x2=n,this.y2=i}equals(t){return this.x1===t.x1&&this.y1===t.y1&&this.x2===t.x2&&this.y2===t.y2}draw(t){t.moveTo(this.x1,this.y1),t.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(t){return new yi(t.x1,t.y1,t.x2,t.y2)}cuts(t,e){if(this.y1===this.y2||e<this.y1&&e<=this.y2||e>this.y1&&e>=this.y2||t>this.x1&&t>=this.x2)return!1;if(t<this.x1&&t<=this.x2)return!0;const n=this.x1+(e-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return t<=n}distSquare(t,e){return Wy(this.x1,this.y1,this.x2,this.y2,t,e)}ptClose(t,e,n){if(this.x1<this.x2){if(t<this.x1-n||t>this.x2+n)return!1}else if(t<this.x2-n||t>this.x1+n)return!1;if(this.y1<this.y2){if(e<this.y1-n||e>this.y2+n)return!1}else if(e<this.y2-n||e>this.y1+n)return!1;return!0}}var Ir;(function(r){r[r.POINT=1]="POINT",r[r.PARALLEL=2]="PARALLEL",r[r.COINCIDENT=3]="COINCIDENT",r[r.NONE=4]="NONE"})(Ir||(Ir={}));class Zy{constructor(t,e=0,n=0){this.state=t,this.x=e,this.y=n}}function zg(r,t){const e=(t.x2-t.x1)*(r.y1-t.y1)-(t.y2-t.y1)*(r.x1-t.x1),n=(r.x2-r.x1)*(r.y1-t.y1)-(r.y2-r.y1)*(r.x1-t.x1),i=(t.y2-t.y1)*(r.x2-r.x1)-(t.x2-t.x1)*(r.y2-r.y1);if(i){const a=e/i,s=n/i;return 0<=a&&a<=1&&0<=s&&s<=1?new Zy(Ir.POINT,r.x1+a*(r.x2-r.x1),r.y1+a*(r.y2-r.y1)):new Zy(Ir.NONE)}return new Zy(e===0||n===0?Ir.COINCIDENT:Ir.PARALLEL)}function DC(r,t){const e=(t.x2-t.x1)*(r.y1-t.y1)-(t.y2-t.y1)*(r.x1-t.x1),n=(r.x2-r.x1)*(r.y1-t.y1)-(r.y2-r.y1)*(r.x1-t.x1),i=(t.y2-t.y1)*(r.x2-r.x1)-(t.x2-t.x1)*(r.y2-r.y1);if(i){const a=e/i,s=n/i;if(0<=a&&a<=1&&0<=s&&s<=1)return a}return Number.POSITIVE_INFINITY}function $P(r,t){function e(i,a,s,o){let A=DC(t,new yi(i,a,s,o));return A=Math.abs(A-.5),A>=0&&A<=1?1:0}let n=e(r.x,r.y,r.x2,r.y);return n+=e(r.x,r.y,r.x,r.y2),n>1||(n+=e(r.x,r.y2,r.x2,r.y2),n>1)?!0:(n+=e(r.x2,r.y,r.x2,r.y2),n>0)}var Lr;(function(r){r[r.LEFT=0]="LEFT",r[r.TOP=1]="TOP",r[r.RIGHT=2]="RIGHT",r[r.BOTTOM=3]="BOTTOM"})(Lr||(Lr={}));function Vg(r,t,e){const n=new Set;return r.width<=0?(n.add(Lr.LEFT),n.add(Lr.RIGHT)):t<r.x?n.add(Lr.LEFT):t>r.x+r.width&&n.add(Lr.RIGHT),r.height<=0?(n.add(Lr.TOP),n.add(Lr.BOTTOM)):e<r.y?n.add(Lr.TOP):e>r.y+r.height&&n.add(Lr.BOTTOM),n}function RC(r,t){let e=t.x1,n=t.y1;const i=t.x2,a=t.y2,s=Array.from(Vg(r,i,a));if(s.length===0)return!0;let o=Vg(r,e,n);for(;o.size!==0;){for(const A of s)if(o.has(A))return!1;if(o.has(Lr.RIGHT)||o.has(Lr.LEFT)){let A=r.x;o.has(Lr.RIGHT)&&(A+=r.width),n=n+(A-e)*(a-n)/(i-e),e=A}else{let A=r.y;o.has(Lr.BOTTOM)&&(A+=r.height),e=e+(A-n)*(i-e)/(a-n),n=A}o=Vg(r,e,n)}return!0}function tD(r,t){let e=Number.POSITIVE_INFINITY,n=0;function i(a,s,o,A){let l=DC(t,new yi(a,s,o,A));l=Math.abs(l-.5),l>=0&&l<=1&&(n++,l<e&&(e=l))}return i(r.x,r.y,r.x2,r.y),i(r.x,r.y,r.x,r.y2),n>1||(i(r.x,r.y2,r.x2,r.y2),n>1)?e:(i(r.x2,r.y,r.x2,r.y2),n===0?-1:e)}function eD(r,t){let e=0;const n=zg(r,new yi(t.x,t.y,t.x2,t.y));e+=n.state===Ir.POINT?1:0;const i=zg(r,new yi(t.x,t.y,t.x,t.y2));e+=i.state===Ir.POINT?1:0;const a=zg(r,new yi(t.x,t.y2,t.x2,t.y2));e+=a.state===Ir.POINT?1:0;const s=zg(r,new yi(t.x2,t.y,t.x2,t.y2));return e+=s.state===Ir.POINT?1:0,{top:n,left:i,bottom:a,right:s,count:e}}class Ri{constructor(t,e,n,i){this.x=t,this.y=e,this.width=n,this.height=i}get x2(){return this.x+this.width}get y2(){return this.y+this.height}get cx(){return this.x+this.width/2}get cy(){return this.y+this.height/2}get radius(){return Math.max(this.width,this.height)/2}static from(t){return new Ri(t.x,t.y,t.width,t.height)}equals(t){return this.x===t.x&&this.y===t.y&&this.width===t.width&&this.height===t.height}clone(){return new Ri(this.x,this.y,this.width,this.height)}add(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),i=Math.max(this.x2,t.x+t.width),a=Math.max(this.y2,t.y+t.height);this.x=e,this.y=n,this.width=i-e,this.height=a-n}addPoint(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),i=Math.max(this.x2,t.x),a=Math.max(this.y2,t.y);this.x=e,this.y=n,this.width=i-e,this.height=a-n}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(t){t.rect(this.x,this.y,this.width,this.height)}containsPt(t,e){return t>=this.x&&t<=this.x2&&e>=this.y&&e<=this.y2}get area(){return this.width*this.height}intersects(t){return this.area<=0||t.width<=0||t.height<=0?!1:t.x+t.width>this.x&&t.y+t.height>this.y&&t.x<this.x2&&t.y<this.y2}distSquare(t,e){if(this.containsPt(t,e))return 0;const n=Vg(this,t,e);return n.has(Lr.TOP)?n.has(Lr.LEFT)?OA(t,e,this.x,this.y):n.has(Lr.RIGHT)?OA(t,e,this.x2,this.y):(this.y-e)*(this.y-e):n.has(Lr.BOTTOM)?n.has(Lr.LEFT)?OA(t,e,this.x,this.y2):n.has(Lr.RIGHT)?OA(t,e,this.x2,this.y2):(e-this.y2)*(e-this.y2):n.has(Lr.LEFT)?(this.x-t)*(this.x-t):n.has(Lr.RIGHT)?(t-this.x2)*(t-this.x2):0}}function nD(r){if(r.length===0)return null;const t=r[0],e=new Ri(t.x,t.y,0,0);for(const n of r)e.addPoint(n);return e}class Wg{constructor(t,e,n){this.cx=t,this.cy=e,this.radius=n}get x(){return this.cx-this.radius}get x2(){return this.cx+this.radius}get width(){return this.radius*2}get y(){return this.cy-this.radius}get y2(){return this.cy+this.radius}get height(){return this.radius*2}static from(t){return new Wg(t.cx,t.cy,t.radius)}containsPt(t,e){return OA(this.cx,this.cy,t,e)<this.radius*this.radius}distSquare(t,e){const n=OA(this.cx,this.cy,t,e);if(n<this.radius*this.radius)return 0;const i=Math.sqrt(n)-this.radius;return i*i}draw(t){t.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class Ol{constructor(t,e=0,n=0,i=0,a=0,s=10,o=10,A=new Float32Array(Math.max(0,s*o)).fill(0)){this.pixelGroup=t,this.i=e,this.j=n,this.pixelX=i,this.pixelY=a,this.width=s,this.height=o,this.area=A}createSub(t,e){return new Ol(this.pixelGroup,t.x,t.y,e.x,e.y,t.width,t.height)}static fromPixelRegion(t,e){return new Ol(e,0,0,t.x,t.y,Math.ceil(t.width/e),Math.ceil(t.height/e))}copy(t,e){return new Ol(this.pixelGroup,this.scaleX(e.x),this.scaleY(e.y),e.x,e.y,t.width,t.height,t.area)}boundX(t){return t<this.i?this.i:t>=this.width?this.width-1:t}boundY(t){return t<this.j?this.j:t>=this.height?this.height-1:t}scaleX(t){return this.boundX(Math.floor((t-this.pixelX)/this.pixelGroup))}scaleY(t){return this.boundY(Math.floor((t-this.pixelY)/this.pixelGroup))}scale(t){const e=this.scaleX(t.x),n=this.scaleY(t.y),i=this.boundX(Math.ceil((t.x+t.width-this.pixelX)/this.pixelGroup)),a=this.boundY(Math.ceil((t.y+t.height-this.pixelY)/this.pixelGroup)),s=i-e,o=a-n;return new Ri(e,n,s,o)}invertScaleX(t){return Math.round(t*this.pixelGroup+this.pixelX)}invertScaleY(t){return Math.round(t*this.pixelGroup+this.pixelY)}addPadding(t,e){const n=Math.ceil(e/this.pixelGroup),i=this.boundX(t.x-n),a=this.boundY(t.y-n),s=this.boundX(t.x2+n),o=this.boundY(t.y2+n),A=s-i,l=o-a;return new Ri(i,a,A,l)}get(t,e){return t<0||e<0||t>=this.width||e>=this.height?Number.NaN:this.area[t+e*this.width]}inc(t,e,n){t<0||e<0||t>=this.width||e>=this.height||(this.area[t+e*this.width]+=n)}set(t,e,n){t<0||e<0||t>=this.width||e>=this.height||(this.area[t+e*this.width]=n)}incArea(t,e){if(t.width<=0||t.height<=0||e===0)return;const n=this.width,i=t.width,a=Math.max(0,t.i),s=Math.max(0,t.j),o=Math.min(t.i+t.width,n),A=Math.min(t.j+t.height,this.height);if(!(A<=0||o<=0||a>=n||A>=this.height))for(let l=s;l<A;l++){const c=(l-t.j)*i,u=l*n;for(let h=a;h<o;h++){const d=t.area[h-t.i+c];d!==0&&(this.area[h+u]+=e*d)}}}fill(t){this.area.fill(t)}fillArea(t,e){const n=t.x+t.y*this.width;for(let i=0;i<t.height;i++){const a=n+i*this.width;this.area.fill(e,a,a+t.width)}}fillHorizontalLine(t,e,n,i){const a=t+e*this.width;this.area.fill(i,a,a+n)}fillVerticalLine(t,e,n,i){const a=t+e*this.width;for(let s=0;s<n;s++)this.area[a+s*this.width]=i}clear(){this.area.fill(0)}toString(){let t="";for(let e=0;e<this.height;e++){const n=e*this.width;for(let i=0;i<this.width;i++){const a=this.area[n+i];t+=a.toFixed(1).padStart(6),t+=" "}t+=`
`}return t}draw(t,e=!0){if(this.width<=0||this.height<=0)return;t.save(),e&&t.translate(this.pixelX,this.pixelY);const n=this.area.reduce((s,o)=>Math.min(s,o),Number.POSITIVE_INFINITY),i=this.area.reduce((s,o)=>Math.max(s,o),Number.NEGATIVE_INFINITY),a=s=>(s-n)/(i-n);t.scale(this.pixelGroup,this.pixelGroup);for(let s=0;s<this.width;s++)for(let o=0;o<this.height;o++){const A=this.area[s+o*this.width];t.fillStyle=`rgba(0, 0, 0, ${a(A)})`,t.fillRect(s,o,1,1)}t.restore()}drawThreshold(t,e,n=!0){if(!(this.width<=0||this.height<=0)){t.save(),n&&t.translate(this.pixelX,this.pixelY),t.scale(this.pixelGroup,this.pixelGroup);for(let i=0;i<this.width;i++)for(let a=0;a<this.height;a++){const s=this.area[i+a*this.width];t.fillStyle=s>e?"black":"white",t.fillRect(i,a,1,1)}t.restore()}}}function _C(r,t){const e=n=>({x:n.x-t,y:n.y-t,width:n.width+2*t,height:n.height+2*t});return Array.isArray(r)?r.map(e):e(r)}function HC(r,t,e){return GC(Object.assign(PC(r),{distSquare:(n,i)=>Wy(r.x1,r.y1,r.x2,r.y2,n,i)}),t,e)}function GC(r,t,e){const n=_C(r,e),i=t.scale(n),a=t.createSub(i,n);return rD(a,t,e,(s,o)=>r.distSquare(s,o)),a}function rD(r,t,e,n){const i=e*e;for(let a=0;a<r.height;a++)for(let s=0;s<r.width;s++){const o=t.invertScaleX(r.i+s),A=t.invertScaleY(r.j+a),l=n(o,A);if(l===0){r.set(s,a,i);continue}if(l<i){const c=e-Math.sqrt(l);r.set(s,a,c*c)}}return r}function iD(r,t,e){const n=t.scale(r),i=t.addPadding(n,e),a=t.createSub(i,{x:r.x-e,y:r.y-e}),s=n.x-i.x,o=n.y-i.y,A=i.x2-n.x2,l=i.y2-n.y2,c=i.width-s-A,u=i.height-o-l,h=e*e;a.fillArea({x:s,y:o,width:c+1,height:u+1},h);const d=[0],f=Math.max(o,s,A,l);{const w=t.invertScaleX(n.x+n.width/2);for(let C=1;C<f;C++){const F=t.invertScaleY(n.y-C),Q=r.distSquare(w,F);if(Q<h){const D=e-Math.sqrt(Q);d.push(D*D)}else break}}const g=[],v=Math.max(s,A),m=Math.max(o,A);for(let w=1;w<v;w++){const C=t.invertScaleX(n.x-w),F=[];for(let Q=1;Q<m;Q++){const D=t.invertScaleY(n.y-Q),K=r.distSquare(C,D);if(K<h){const G=e-Math.sqrt(K);F.push(G*G)}else F.push(0)}g.push(F)}for(let w=1;w<Math.min(o,d.length);w++){const C=d[w];a.fillHorizontalLine(s,o-w,c+1,C)}for(let w=1;w<Math.min(l,d.length);w++){const C=d[w];a.fillHorizontalLine(s,o+u+w,c+1,C)}for(let w=1;w<Math.min(s,d.length);w++){const C=d[w];a.fillVerticalLine(s-w,o,u+1,C)}for(let w=1;w<Math.min(l,d.length);w++){const C=d[w];a.fillVerticalLine(s+c+w,o,u+1,C)}for(let w=1;w<s;w++){const C=g[w-1],F=s-w;for(let Q=1;Q<o;Q++)a.set(F,o-Q,C[Q-1]);for(let Q=1;Q<l;Q++)a.set(F,o+u+Q,C[Q-1])}for(let w=1;w<A;w++){const C=g[w-1],F=s+c+w;for(let Q=1;Q<o;Q++)a.set(F,o-Q,C[Q-1]);for(let Q=1;Q<l;Q++)a.set(F,o+u+Q,C[Q-1])}return a}function DG(r,t,e,n){return{x:r,y:t,width:e,height:n}}function RG(r,t,e){return{cx:r,cy:t,radius:e}}function _G(r,t,e,n){return{x1:r,y1:t,x2:e,y2:n}}function fr(r,t){return{x:r,y:t}}function aD(r,t,e,n){if(r.length===0)return[];const i=cD(r);return i.map((a,s)=>{const o=i.slice(0,s);return sD(t,a,o,e,n)}).flat()}function sD(r,t,e,n,i){const a=fr(t.cx,t.cy),s=lD(a,e,r);if(s==null)return[];const o=new yi(a.x,a.y,s.cx,s.cy),A=oD(o,r,n,i);return AD(A,r)}function oD(r,t,e,n){const i=[],a=[];a.push(r);let s=!0;for(let o=0;o<e&&s;o++)for(s=!1;!s&&a.length>0;){const A=a.pop(),l=KC(t,A),c=l?eD(A,l):null;if(!l||!c||c.count!==2){s||i.push(A);continue}let u=n,h=jg(l,u,c,!0),d=IA(h,a)||IA(h,i),f=Zg(h,t);for(;!d&&f&&u>=1;)u/=1.5,h=jg(l,u,c,!0),d=IA(h,a)||IA(h,i),f=Zg(h,t);if(h&&!d&&!f&&(a.push(new yi(A.x1,A.y1,h.x,h.y)),a.push(new yi(h.x,h.y,A.x2,A.y2)),s=!0),s)continue;u=n,h=jg(l,u,c,!1);let g=IA(h,a)||IA(h,i);for(f=Zg(h,t);!g&&f&&u>=1;)u/=1.5,h=jg(l,u,c,!1),g=IA(h,a)||IA(h,i),f=Zg(h,t);h&&!g&&(a.push(new yi(A.x1,A.y1,h.x,h.y)),a.push(new yi(h.x,h.y,A.x2,A.y2)),s=!0),s||i.push(A)}for(;a.length>0;)i.push(a.pop());return i}function AD(r,t){const e=[];for(;r.length>0;){const n=r.pop();if(r.length===0){e.push(n);break}const i=r.pop(),a=new yi(n.x1,n.y1,i.x2,i.y2);KC(t,a)?(e.push(n),r.push(i)):r.push(a)}return e}function lD(r,t,e){let n=Number.POSITIVE_INFINITY;return t.reduce((i,a)=>{const s=OA(r.x,r.y,a.cx,a.cy);if(s>n)return i;const o=new yi(r.x,r.y,a.cx,a.cy),A=uD(e,o);return s*(A+1)*(A+1)<n&&(i=a,n=s*(A+1)*(A+1)),i},null)}function cD(r){if(r.length<2)return r;let t=0,e=0;return r.forEach(n=>{t+=n.cx,e+=n.cy}),t/=r.length,e/=r.length,r.map(n=>{const i=t-n.cx,a=e-n.cy,s=i*i+a*a;return[n,s]}).sort((n,i)=>n[1]-i[1]).map(n=>n[0])}function Zg(r,t){return t.some(e=>e.containsPt(r.x,r.y))}function IA(r,t){return t.some(e=>!!(UC(e.x1,e.y1,r.x,r.y,.001)||UC(e.x2,e.y2,r.x,r.y,.001)))}function KC(r,t){let e=Number.POSITIVE_INFINITY,n=null;for(const i of r){if(!RC(i,t))continue;const a=tD(i,t);a>=0&&a<e&&(n=i,e=a)}return n}function uD(r,t){return r.reduce((e,n)=>RC(n,t)&&$P(n,t)?e+1:e,0)}function jg(r,t,e,n){const i=e.top,a=e.left,s=e.bottom,o=e.right;if(n){if(a.state===Ir.POINT){if(i.state===Ir.POINT)return fr(r.x-t,r.y-t);if(s.state===Ir.POINT)return fr(r.x-t,r.y2+t);const h=r.width*r.height;return r.width*((a.y-r.y+(o.y-r.y))*.5)<h*.5?a.y>o.y?fr(r.x-t,r.y-t):fr(r.x2+t,r.y-t):a.y<o.y?fr(r.x-t,r.y2+t):fr(r.x2+t,r.y2+t)}if(o.state===Ir.POINT){if(i.state===Ir.POINT)return fr(r.x2+t,r.y-t);if(s.state===Ir.POINT)return fr(r.x2+t,r.y2+t)}const c=r.height*r.width;return r.height*((i.x-r.x+(o.x-r.x))*.5)<c*.5?i.x>s.x?fr(r.x-t,r.y-t):fr(r.x-t,r.y2+t):i.x<s.x?fr(r.x2+t,r.y-t):fr(r.x2+t,r.y2+t)}if(a.state===Ir.POINT){if(i.state===Ir.POINT)return fr(r.x2+t,r.y2+t);if(s.state===Ir.POINT)return fr(r.x2+t,r.y-t);const c=r.height*r.width;return r.width*((a.y-r.y+(o.y-r.y))*.5)<c*.5?a.y>o.y?fr(r.x2+t,r.y2+t):fr(r.x-t,r.y2+t):a.y<o.y?fr(r.x2+t,r.y-t):fr(r.x-t,r.y-t)}if(o.state===Ir.POINT){if(i.state===Ir.POINT)return fr(r.x-t,r.y2+t);if(s.state===Ir.POINT)return fr(r.x-t,r.y-t)}const A=r.height*r.width;return r.height*((i.x-r.x+(o.x-r.x))*.5)<A*.5?i.x>s.x?fr(r.x2+t,r.y2+t):fr(r.x2+t,r.y-t):i.x<s.x?fr(r.x-t,r.y2+t):fr(r.x-t,r.y-t)}function hD(r,t,e,n){if(!(r.closed?e<r.length:e<r.length-1))return!1;const a=r.get(t),s=r.get(e+1);for(let o=t+1;o<=e;o++){const A=r.get(o);if(Wy(a.x,a.y,s.x,s.y,A.x,A.y)>n)return!1}return!0}function dD(r=0){return t=>{if(r<0||t.length<3)return t;const e=[];let n=0;const i=r*r;for(;n<t.length;){let a=n+1;for(;hD(t,n,a,i);)a++;e.push(t.get(n)),n=a}return new Il(e)}}function fD(r,t){switch(r){case-2:return(((-t+3)*t-3)*t+1)/6;case-1:return((3*t-6)*t*t+4)/6;case 0:return(((-3*t+3)*t+3)*t+1)/6;case 1:return t*t*t/6;default:throw new Error("unknown error")}}function gD(r=6){function a(s,o,A){let l=0,c=0;for(let u=-2;u<=1;u++){const h=s.get(o+u),d=fD(u,A);l+=d*h.x,c+=d*h.y}return{x:l,y:c}}return s=>{if(s.length<3)return s;const o=[],A=s.closed,l=s.length+3-1+(A?0:2);o.push(a(s,2-(A?0:2),0));for(let c=2-(A?0:2);c<l;c++)for(let u=1;u<=r;u++)o.push(a(s,c,u/r));return new Il(o)}}function vD(r=8){return t=>{let e=r,n=t.length;if(e>1)for(n=Math.floor(t.length/e);n<3&&e>1;)e-=1,n=Math.floor(t.length/e);const i=[];for(let a=0,s=0;s<n;s++,a+=e)i.push(t.get(a));return new Il(i)}}class Il{constructor(t=[],e=!0){this.points=t,this.closed=e}get(t){const e=t,n=this.points.length;return t<0?this.closed?this.get(t+n):this.points[0]:t>=n?this.closed?this.get(t-n):this.points[n-1]:this.points[e]}get length(){return this.points.length}toString(t=1/0){const e=this.points;if(e.length===0)return"";const n=typeof t=="function"?t:qP(t);let i="M";for(const a of e)i+=`${n(a.x)},${n(a.y)} L`;return i=i.slice(0,-1),this.closed&&(i+=" Z"),i}draw(t){const e=this.points;if(e.length!==0){t.beginPath(),t.moveTo(e[0].x,e[0].y);for(const n of e)t.lineTo(n.x,n.y);this.closed&&t.closePath()}}sample(t){return vD(t)(this)}simplify(t){return dD(t)(this)}bSplines(t){return gD(t)(this)}apply(t){return t(this)}containsElements(t){const e=nD(this.points);return e?t.every(n=>e.containsPt(n.cx,n.cy)&&this.withinArea(n.cx,n.cy)):!1}withinArea(t,e){if(this.length===0)return!1;let n=0;const i=this.points[0],a=new yi(i.x,i.y,i.x,i.y);for(let s=1;s<this.points.length;s++){const o=this.points[s];a.x1=a.x2,a.y1=a.y2,a.x2=o.x,a.y2=o.y,a.cuts(t,e)&&n++}return a.x1=a.x2,a.y1=a.y2,a.x2=i.x,a.y2=i.y,a.cuts(t,e)&&n++,n%2===1}}class pD{constructor(t=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=t}add(t){this.set.add(`${t.x}x${t.y}`),this.arr[this.count++]=t}contains(t){return this.set.has(`${t.x}x${t.y}`)}isFirst(t){if(this.count===0)return!1;const e=this.arr[0];return e!=null&&e.x===t.x&&e.y===t.y}path(){return new Il(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(t){return this.arr[t]}get length(){return this.count}}const Lh=0,Yg=1,Xg=2,jy=3;function mD(r,t){const e=(Math.floor(r.width)+Math.floor(r.height))*2,n=new pD(e);function i(A,l,c,u){const h=r.get(A,l);return Number.isNaN(h)?Number.NaN:h>t?c+u:c}function a(A,l){let c=Lh;return c=i(A,l,c,1),c=i(A+1,l,c,2),c=i(A,l+1,c,4),c=i(A+1,l+1,c,8),Number.isNaN(c)?-1:c}let s=Yg;function o(A,l){let c=A,u=l,h=r.invertScaleX(c),d=r.invertScaleY(u);for(let f=0;f<r.width*r.height;f++){const g={x:h,y:d};if(n.contains(g)){if(n.isFirst(g))return!0}else n.add(g);const v=a(c,u);switch(v){case-1:return!0;case 0:case 3:case 2:case 7:s=Xg;break;case 12:case 14:case 4:s=jy;break;case 6:s=s===Lh?jy:Xg;break;case 1:case 13:case 5:s=Lh;break;case 9:s=s===Xg?Lh:Yg;break;case 10:case 8:case 11:s=Yg;break;default:return console.warn("Marching squares invalid state: "+v),!0}switch(s){case Lh:u--,d-=r.pixelGroup;break;case Yg:u++,d+=r.pixelGroup;break;case jy:c--,h-=r.pixelGroup;break;case Xg:c++,h+=r.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+v),!0}}return!0}for(let A=0;A<r.width;A++)for(let l=0;l<r.height;l++){if(r.get(A,l)<=t)continue;const c=a(A,l);if(!(c<0||c===15)&&o(A,l))return n.path()}return null}const Jg={maxRoutingIterations:100,maxMarchingIterations:20,pixelGroup:4,edgeR0:10,edgeR1:20,nodeR0:15,nodeR1:50,morphBuffer:10,threshold:1,memberInfluenceFactor:1,edgeInfluenceFactor:1,nonMemberInfluenceFactor:-.8,virtualEdges:!0};function Nh(r){return r!=null&&typeof r.radius=="number"}function zC(r,t){if(Nh(r)!==Nh(t))return!1;if(Nh(r)){const n=t;return r.cx===n.cx&&r.cy===n.cy&&r.radius===n.radius}const e=t;return r.x===e.x&&r.y===e.y&&r.width===e.width&&r.height===e.height}var Ms;(function(r){r[r.MEMBERS=0]="MEMBERS",r[r.NON_MEMBERS=1]="NON_MEMBERS",r[r.EDGES=2]="EDGES"})(Ms||(Ms={}));class Yy{constructor(t={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new Ri(0,0,0,0),this.potentialArea=new Ol(1,0,0,0,0,0,0),this.o=Object.assign({},Jg,t)}pushMember(...t){if(t.length!==0){this.dirty.add(Ms.MEMBERS);for(const e of t)this.members.push({raw:e,obj:Nh(e)?Wg.from(e):Ri.from(e),area:null})}}removeMember(t){const e=this.members.findIndex(n=>zC(n.raw,t));return e<0?!1:(this.members.splice(e,1),this.dirty.add(Ms.MEMBERS),!0)}removeNonMember(t){const e=this.nonMembers.findIndex(n=>zC(n.raw,t));return e<0?!1:(this.nonMembers.splice(e,1),this.dirty.add(Ms.NON_MEMBERS),!0)}removeEdge(t){const e=this.edges.findIndex(n=>n.obj.equals(t));return e<0?!1:(this.edges.splice(e,1),this.dirty.add(Ms.NON_MEMBERS),!0)}pushNonMember(...t){if(t.length!==0){this.dirty.add(Ms.NON_MEMBERS);for(const e of t)this.nonMembers.push({raw:e,obj:Nh(e)?Wg.from(e):Ri.from(e),area:null})}}pushEdge(...t){if(t.length!==0){this.dirty.add(Ms.EDGES);for(const e of t)this.edges.push({raw:e,obj:yi.from(e),area:null})}}update(){const t=this.dirty.has(Ms.MEMBERS),e=this.dirty.has(Ms.NON_MEMBERS);let n=this.dirty.has(Ms.EDGES);this.dirty.clear();const i=this.members.map(l=>l.obj);if(this.o.virtualEdges&&(t||e)){const l=this.nonMembers.map(h=>h.obj),c=aD(i,l,this.o.maxRoutingIterations,this.o.morphBuffer),u=new Map(this.virtualEdges.map(h=>[h.obj.toString(),h.area]));this.virtualEdges=c.map(h=>{var d;return{raw:h,obj:h,area:(d=u.get(h.toString()))!==null&&d!==void 0?d:null}}),n=!0}let a=!1;if(t||n){const l=this.virtualEdges.concat(this.edges).map(d=>d.obj),c=wD(i,l),u=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,h=Ri.from(_C(c,u));h.equals(this.activeRegion)||(a=!0,this.activeRegion=h)}if(a){const l=Math.ceil(this.activeRegion.width/this.o.pixelGroup),c=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=Ol.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(u=>u.area=null),this.nonMembers.forEach(u=>u.area=null),this.edges.forEach(u=>u.area=null),this.virtualEdges.forEach(u=>u.area=null)):(l!==this.potentialArea.width||c!==this.potentialArea.height)&&(this.potentialArea=Ol.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const s=new Map,o=l=>{if(l.area){const c=`${l.obj.width}x${l.obj.height}x${l.obj instanceof Ri?"R":"C"}`;s.set(c,l.area)}},A=l=>{if(l.area)return;const c=`${l.obj.width}x${l.obj.height}x${l.obj instanceof Ri?"R":"C"}`;if(s.has(c)){const h=s.get(c);l.area=this.potentialArea.copy(h,{x:l.obj.x-this.o.nodeR1,y:l.obj.y-this.o.nodeR1});return}const u=l.obj instanceof Ri?iD(l.obj,this.potentialArea,this.o.nodeR1):GC(l.obj,this.potentialArea,this.o.nodeR1);l.area=u,s.set(c,u)};this.members.forEach(o),this.nonMembers.forEach(o),this.members.forEach(A),this.nonMembers.forEach(l=>{this.activeRegion.intersects(l.obj)?A(l):l.area=null}),this.edges.forEach(l=>{l.area||(l.area=HC(l.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(l=>{l.area||(l.area=HC(l.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(t){for(const e of this.members)e.obj.draw(t)}drawNonMembers(t){for(const e of this.nonMembers)e.obj.draw(t)}drawEdges(t){for(const e of this.edges)e.obj.draw(t)}drawPotentialArea(t,e=!0){this.potentialArea.draw(t,e)}compute(){if(this.members.length===0)return new Il([]);this.dirty.size>0&&this.update();const{o:t,potentialArea:e}=this,n=this.members.map(o=>o.area),i=this.virtualEdges.concat(this.edges).map(o=>o.area),a=this.nonMembers.filter(o=>o.area!=null).map(o=>o.area),s=this.members.map(o=>o.obj);return yD(e,n,i,a,o=>o.containsElements(s),t)}}function yD(r,t,e,n,i,a={}){const s=Object.assign({},Jg,a);let o=s.threshold,A=s.memberInfluenceFactor,l=s.edgeInfluenceFactor,c=s.nonMemberInfluenceFactor;const u=(s.nodeR0-s.nodeR1)*(s.nodeR0-s.nodeR1),h=(s.edgeR0-s.edgeR1)*(s.edgeR0-s.edgeR1);for(let d=0;d<s.maxMarchingIterations;d++){if(r.clear(),A!==0){const g=A/u;for(const v of t)r.incArea(v,g)}if(l!==0){const g=l/h;for(const v of e)r.incArea(v,g)}if(c!==0){const g=c/u;for(const v of n)r.incArea(v,g)}const f=mD(r,o);if(f&&i(f))return f;if(o*=.95,d<=s.maxMarchingIterations*.5)A*=1.2,l*=1.2;else if(c!==0&&n.length>0)c*=.8;else break}return new Il([])}function wD(r,t){if(r.length===0)return new Ri(0,0,0,0);const e=Ri.from(r[0]);for(const n of r)e.add(n);for(const n of t)e.add(PC(n));return e}function HG(r,t=[],e=[],n={}){if(r.length===0)return new Il([]);const i=new Yy(n);return i.pushMember(...r),i.pushNonMember(...t),i.pushEdge(...e),i.compute()}var ED=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class qg extends mi{constructor(t,e){super(t,Ci({},qg.defaultOptions,e)),this.path=null,this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:i}=this.parseOptions();Dr(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new wh({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=Qt(n.data);[...this.options.members,...this.options.avoidMembers].includes(i)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(i)}))},this.getPath=n=>{const{graph:i}=this.context,a=this.options.members,s=[...this.members.keys()],o=this.options.avoidMembers,A=[...this.avoidMembers.keys()];if(a.length===0&&o.length===0)return this.members.clear(),this.avoidMembers.clear(),this.path=[],this.path;if(!n&&this.path&&Dr(a,s)&&Dr(o,A))return this.path;const{enter:l=[],exit:c=[]}=mA(s,a,v=>v),{enter:u=[],exit:h=[]}=mA(A,o,v=>v);if(n){const v=a.includes(n),m=o.includes(n);v&&(c.push(n),l.push(n)),m&&(h.push(n),u.push(n))}const d=(v,m,w)=>{v.forEach(C=>{const F=w?this.members:this.avoidMembers,Q=w?"pushMember":"pushNonMember",D=w?"removeMember":"removeNonMember";if(m){let K;i.getElementType(C)==="edge"?([K]=bD(i,C),this.bubbleSets.pushEdge(K)):([K]=BD(i,C),this.bubbleSets[Q](K)),F.set(C,K)}else{const K=F.get(C);K&&(i.getElementType(C)==="edge"?this.bubbleSets.removeEdge(K):this.bubbleSets[D](K),F.delete(C))}})};d(c,!1,!0),d(l,!0,!0),d(h,!1,!1),d(u,!0,!1);const g=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=Fb(g.points.map(Si)),this.path},this.bindEvents(),this.bubbleSets=new Yy(this.options)}bindEvents(){this.context.graph.on(Ae.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(Ae.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new Yy(this.options),this.members.clear(),this.avoidMembers.clear(),this.path=null}parseOptions(){const t=this.options,{type:e,key:n,members:i,avoidMembers:a}=t,s=ED(t,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((A,l)=>(l in Jg?A.bubbleSetOptions[l]=s[l]:A.style[l]=s[l],A),{style:{},bubbleSetOptions:{}});return Object.assign({type:e,key:n,members:i,avoidMembers:a},o)}addMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n))),this.options.members=[...new Set([...this.options.members,...e])],this.drawBubbleSets()}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),this.drawBubbleSets()}updateMember(t){this.options.members=Wt(t)?t(this.options.members):t,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!e.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...e])],this.drawBubbleSets()}removeAvoidMember(t){const e=Array.isArray(t)?t:[t];this.options.avoidMembers.some(n=>e.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n)),this.drawBubbleSets())}updateAvoidMember(t){this.options.avoidMembers=Array.isArray(t)?t:[t],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(Ae.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(Ae.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape&&(this.shape.destroy(),this.shape=void 0),super.destroy()}}qg.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},Jg);const BD=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getElementRenderBounds(n);return new Ri(i.min[0],i.min[1],to(i),eo(i))}),bD=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getEdgeData(n),a=r.getElementPosition(i.source),s=r.getElementPosition(i.target);return yi.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});class GG extends null{constructor(t,e){super(t,e),this.setOptions=n=>{const i={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},a=(s,o)=>{switch(s){case"projectionMode":return o==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[o];case"aspect":return typeof o=="number"?o:this.getCanvasAspect();default:return o}};Object.entries(i).forEach(([s,o])=>{const A=n[s];if(A!==void 0){const l=a(s,A);this.context.canvas.getCamera()[o](l)}})},this.bindEvents()}update(t){this.setOptions(t),super.update(t)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[t,e]=this.context.viewport.getCanvasSize();return t/e}}function xD(r){return`
<ul class="g6-contextmenu-ul">
${r.map(t=>`<li class="g6-contextmenu-li" value="${t.value}">${t.name}</li>`).join("")}
</ul>
`}const CD=`
.g6-contextmenu {
font-size: 12px;
background-color: rgba(255, 255, 255, 0.96);
border-radius: 4px;
overflow: hidden;
box-shadow: rgba(0, 0, 0, 0.12) 0px 6px 12px 0px;
transition: visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1) 0s, left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
}
.g6-contextmenu-ul {
max-width: 256px;
min-width: 96px;
list-style: none;
padding: 0;
margin: 0;
}
.g6-contextmenu-li {
padding: 8px 12px;
cursor: pointer;
user-select: none;
}
.g6-contextmenu-li:hover {
background-color: #f5f5f5;
cursor: pointer;
}
`;var VC=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class $g extends mi{constructor(t,e){super(t,Object.assign({},$g.defaultOptions,e)),this.targetElement=null,this.onTriggerEvent=n=>{var i;(i=n.preventDefault)===null||i===void 0||i.call(n),this.show(n)},this.onMenuItemClick=n=>{const{onClick:i,trigger:a}=this.options;if(n.target instanceof HTMLElement&&n.target.className.includes("g6-contextmenu-li")){const s=n.target.getAttribute("value");i==null||i(s,n.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(e)}initElement(){this.$element=zc("contextmenu",!1,{zIndex:"99"});const{className:t}=this.options;t&&this.$element.classList.add(t),this.context.canvas.getContainer().appendChild(this.$element),Vy("g6-contextmenu-css","style",{},CD,document.head)}show(t){return VC(this,void 0,void 0,function*(){const{enable:e,offset:n}=this.options;if(typeof e=="function"&&!e(t)||!e){this.hide();return}const i=yield this.getDOMContent(t);i instanceof HTMLElement?(this.$element.innerHTML="",this.$element.appendChild(i)):this.$element.innerHTML=i;const a=this.context.graph.getCanvas().getContainer().getBoundingClientRect();this.$element.style.left=`${t.client.x-a.left+n[0]}px`,this.$element.style.top=`${t.client.y-a.top+n[1]}px`,this.$element.style.display="block",this.targetElement=t.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(t){return VC(this,void 0,void 0,function*(){const{getContent:e,getItems:n}=this.options;return n?xD(yield n(t)):yield e(t)})}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`canvas:${e}`,this.onTriggerEvent),t.on(`node:${e}`,this.onTriggerEvent),t.on(`edge:${e}`,this.onTriggerEvent),t.on(`combo:${e}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`canvas:${e}`,this.onTriggerEvent),t.off(`node:${e}`,this.onTriggerEvent),t.off(`edge:${e}`,this.onTriggerEvent),t.off(`combo:${e}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}$g.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class t0 extends mi{constructor(t,e){super(t,Object.assign({},t0.defaultOptions,e)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:n,element:i}=this.context,a=n.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:s,iterRate:o,divRate:A}=this.options;let{lambda:l,divisions:c,iterations:u}=this.options;for(let h=0;h<s;h++){for(let d=0;d<u;d++){const f={};a.forEach(g=>{var v;if(g.source===g.target)return;const m=Qt(g);f[m]=this.getEdgeForces(g,c,l);for(let w=0;w<c+1;w++)(v=this.edgePoints)[m]||(v[m]=[]),this.edgePoints[m][w]=tn(this.edgePoints[m][w],f[m][w])})}l/=2,c*=A,u*=o,this.divideEdges(c)}a.forEach(h=>{const d=Qt(h),f=i.getElement(d);f==null||f.update({d:uy(this.edgePoints[d])})})},this.bindEvents()}get nodeMap(){const t=this.context.model.getNodeData();return Object.fromEntries(t.map(e=>[Qt(e),yl(Ai(e))]))}divideEdges(t){this.context.model.getEdgeData().forEach(n=>{var i;const a=Qt(n);(i=this.edgePoints)[a]||(i[a]=[]);const s=this.nodeMap[n.source],o=this.nodeMap[n.target];if(t===1)this.edgePoints[a].push(s),this.edgePoints[a].push(bs(tn(s,o),2)),this.edgePoints[a].push(o);else{const l=(this.edgePoints[a].length===0?lr(s,o):OD(this.edgePoints[a]))/(t+1);let c=l;const u=[s];for(let h=1;h<this.edgePoints[a].length;h++){const d=this.edgePoints[a][h-1],f=this.edgePoints[a][h];let g=lr(f,d);for(;g>c;){const v=c/g,m=tn(d,Bs(tr(f,d),v));u.push(m),g-=c,c=l}c-=g}u.push(o),this.edgePoints[a]=u}})}getVectorPosition(t){const e=this.nodeMap[t.source],n=this.nodeMap[t.target],[i,a]=tr(n,e),s=lr(e,n);return{source:e,target:n,vx:i,vy:a,length:s}}measureEdgeCompatibility(t,e){const n=this.getVectorPosition(t),i=this.getVectorPosition(e),a=SD(n,i),s=MD(n,i),o=TD(n,i),A=FD(n,i);return a*s*o*A}getEdgeBundles(){const t={},e=this.options.bundleThreshold,n=this.context.model.getEdgeData();return n.forEach((i,a)=>{n.forEach((s,o)=>{var A,l;if(o<=a)return;this.measureEdgeCompatibility(i,s)>=e&&(t[A=Qt(i)]||(t[A]=[]),t[Qt(i)].push(s),t[l=Qt(s)]||(t[l]=[]),t[Qt(s)].push(i))})}),t}getSpringForce(t,e){const{pre:n,cur:i,next:a}=t;return Bs(tr(tn(n,a),Bs(i,2)),e)}getElectrostaticForce(t,e){ro(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[Qt(e)];let i=[0,0];return n==null||n.forEach(a=>{const s=this.edgePoints[Qt(a)][t],o=this.edgePoints[Qt(e)][t],A=tr(s,o),l=lr(s,o);i=tn(i,Bs(A,1/l))}),i}getEdgeForces(t,e,n){const i=this.nodeMap[t.source],a=this.nodeMap[t.target],s=this.options.K/(lr(i,a)*(e+1)),o=[[0,0]],A=Qt(t);for(let l=1;l<e;l++){const c=this.getSpringForce({pre:this.edgePoints[A][l-1],cur:this.edgePoints[A][l],next:this.edgePoints[A][l+1]||[0,0]},s),u=this.getElectrostaticForce(l,t);o.push(Bs(tn(c,u),n))}return o.push([0,0]),o}bindEvents(){const{graph:t}=this.context;t.on(Ae.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:t}=this.context;t.off(Ae.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}t0.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const SD=(r,t)=>Math.abs(RL([r.vx,r.vy],[t.vx,t.vy])/(r.length*t.length)),MD=(r,t)=>{const e=(r.length+t.length)/2;return 2/(e/Math.min(r.length,t.length)+Math.max(r.length,t.length)/e)},TD=(r,t)=>{const e=(r.length+t.length)/2,n=bs(tn(r.source,r.target),2),i=bs(tn(t.source,t.target),2);return e/(e+lr(n,i))},WC=(r,t)=>{if(t.source[0]===t.target[0])return[t.source[0],r[1]];if(t.source[1]===t.target[1])return[r[0],t.source[1]];const e=(t.source[1]-t.target[1])/(t.source[0]-t.target[0]),n=(e*e*t.source[0]+e*(r[1]-t.source[1])+r[0])/(e*e+1),i=e*(n-t.source[0])+t.source[1];return[n,i]},ZC=(r,t)=>{const e=WC(t.source,r),n=WC(t.target,r),i=bs(tn(e,n),2),a=bs(tn(r.source,r.target),2);return lr(e,n)===0?0:Math.max(0,1-2*lr(a,i)/lr(e,n))},FD=(r,t)=>Math.min(ZC(r,t),ZC(t,r)),OD=r=>{let t=0;for(let e=1;e<r.length;e++)t+=lr(r[e],r[e-1]);return t},ID={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8,zIndex:-1/0},jC=.05;class e0 extends mi{constructor(t,e){super(t,Object.assign({},e0.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Si(n.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=n=>{const i=Object.assign({},ID,this.options.style);this.isLensOn||(this.lens=new Bl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,xs(n),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:n}=this.options,{model:i}=this.context,a=i.getData();if(!n)return a;const{nodes:s,edges:o,combos:A}=a;return{nodes:s.filter(l=>n(Qt(l),"node")),edges:o.filter(l=>n(Qt(l),"edge")),combos:A.filter(l=>n(Qt(l),"combo"))}},this.getFocusElements=n=>{const{nodes:i,edges:a}=this.getFilterData(),s=i.filter(l=>lr(Ai(l),n)<this.r),o=s.map(l=>Qt(l)),A=a.filter(l=>{const{source:c,target:u}=l,h=o.includes(c),d=o.includes(u);switch(this.options.nodeType){case"both":return h&&d;case"either":return h!==d;case"source":return h&&!d;case"target":return!h&&d;default:return!1}});return{nodes:s,edges:A}},this.renderFocusElements=()=>{const{element:n,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:s,edges:o}=this.getFocusElements(a),A=new Set,l=c=>{const u=Qt(c);A.add(u);const h=n.getElement(u);if(!h)return;const d=this.shapes.get(u)||h.cloneNode();d.setPosition(h.getPosition()),d.id=h.id,this.shapes.has(u)?Object.entries(h.attributes).forEach(([v,m])=>{d.style[v]!==m&&(d.style[v]=m)}):(this.canvas.appendChild(d),this.shapes.set(u,d));const f=i.getElementType(u),g=this.getElementStyle(f,c);d.update(g)};s.forEach(l),o.forEach(l),this.shapes.forEach((c,u)=>{A.has(u)||(c.destroy(),this.shapes.delete(u))})},this.scaleRByWheel=n=>{var i;this.options.preventDefault&&n.preventDefault();const{clientX:a,clientY:s,deltaX:o,deltaY:A}=n,{graph:l,canvas:c}=this.context,u=l.getCanvasByClient([a,s]),h=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||lr(u,h)>this.r)return;const{maxR:d,minR:f}=this.options,g=o+A>0?1/(1-jC):1-jC,v=Math.min(...c.getSize())/2;this.r=Math.max(f||0,Math.min(d||v,this.r*g)),this.renderLens(h),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=n=>{var i;const a=Si(n.canvas),s=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||lr(a,s)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Si(n.canvas);this.renderLens(i),this.renderFocusElements()},this.onDragEnd=()=>{this.isLensDragging=!1},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}getElementStyle(t,e){const n=t==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof n=="function"?n(e):n}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.addEventListener(Yt.CLICK,this.onEdgeFilter),n==="pointermove"?a.addEventListener(Yt.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.addEventListener(Yt.DRAG_START,this.onDragStart),a.addEventListener(Yt.DRAG,this.onDrag),a.addEventListener(Yt.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.addEventListener(Yt.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.removeEventListener(Yt.CLICK,this.onEdgeFilter),n==="pointermove"?a.removeEventListener(Yt.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.removeEventListener(Yt.DRAG_START,this.onDragStart),a.removeEventListener(Yt.DRAG,this.onDrag),a.removeEventListener(Yt.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.removeEventListener(Yt.WHEEL,this.scaleRByWheel))}update(t){var e;this.unbindEvents(),super.update(t),this.r=(e=t.r)!==null&&e!==void 0?e:this.r,this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((t,e)=>{t.destroy(),this.shapes.delete(e)}),super.destroy()}}e0.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const LD={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},YC=.05,XC=.1;class n0 extends mi{constructor(t,e){super(t,Object.assign({},n0.defaultOptions,e)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Si(n.canvas);this.onMagnify(i)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const i=Object.assign({},LD,this.options.style);this.isLensOn||(this.lens=new Bl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,xs(n),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:n,maxD:i}=this.options;return`${Math.round((this.d-n)/(i-n)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:n}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,s=new Map,o=new Map;n.getNodeData().forEach(l=>{const c=Ai(l),u=lr(c,i);if(u>this.r)return;const h=a*u/(this.d*u+this.r),[d,f]=c,[g,v]=i,m=(d-g)/u,w=(f-v)/u,C=[g+h*m,v+h*w],F=Qt(l),Q=this.getNodeStyle(l),D=xl(n.getElementRenderStyle(F),Object.keys(Q));s.set(F,Object.assign(Object.assign({},xs(C)),Q)),o.set(F,Object.assign(Object.assign({},xs(c)),D))}),this.updateStyle(s,o)},this.getNodeStyle=n=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(n):i},this.updateStyle=(n,i)=>{const{graph:a,element:s}=this.context,{enter:o,exit:A,keep:l}=mA(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(n.keys()),h=>h),c=new Set,u=(h,d)=>{const f=s.getElement(h);f==null||f.update(d),a.getRelatedEdgesData(h).forEach(g=>{c.add(Qt(g))})};[...o,...l].forEach(h=>{u(h,n.get(h))}),A.forEach(h=>{u(h,this.prevOriginStyleMap.get(h)),this.prevOriginStyleMap.delete(h)}),c.forEach(h=>{const d=s.getElement(h);d==null||d.update({})}),this.prevMagnifiedStyleMap=n,i.forEach((h,d)=>{this.prevOriginStyleMap.has(d)||this.prevOriginStyleMap.set(d,h)})},this.isWheelValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=n,s=this.context.graph.getCanvasByClient([i,a]),o=this.lens.getCenter();return!(lr(s,o)>this.r)},this.scaleR=n=>{const{maxR:i,minR:a}=this.options,s=n?1/(1-YC):1-YC,o=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||o,this.r*s))},this.scaleD=n=>{const{maxD:i,minD:a}=this.options,s=n?this.d+XC:this.d-XC;this.d=Math.max(a,Math.min(i,s))},this.scaleRByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleR(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleD(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.isDragValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const i=Si(n.canvas),a=this.lens.getCenter();return!(lr(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=n=>{this.isDragValid(n)&&(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Si(n.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleR(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleD(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,s=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&s.addEventListener(Yt.CLICK,this.onCreateFisheye),n==="pointermove"&&s.addEventListener(Yt.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){s.addEventListener(Yt.DRAG_START,this.onDragStart),s.addEventListener(Yt.DRAG_END,this.onDragEnd);const o=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.addEventListener(Yt.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.addEventListener(Yt.WHEEL,o,{passive:!1})}}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,s=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&s.removeEventListener(Yt.CLICK,this.onCreateFisheye),n==="pointermove"&&s.removeEventListener(Yt.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){s.removeEventListener(Yt.DRAG_START,this.onDragStart),s.removeEventListener(Yt.DRAG_END,this.onDragEnd);const o=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.removeEventListener(Yt.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.removeEventListener(Yt.WHEEL,o)}}update(t){var e,n;this.unbindEvents(),super.update(t),this.r=(e=t.r)!==null&&e!==void 0?e:this.r,this.d=(n=t.d)!==null&&n!==void 0?n:this.d,this.bindEvents()}destroy(){var t;this.unbindEvents(),this.isLensOn&&((t=this.lens)===null||t===void 0||t.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}n0.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class r0 extends mi{constructor(t,e){super(t,Object.assign({},r0.defaultOptions,e)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var n,i,a,s;const o=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(o),o?(i=(n=this.options).onEnter)===null||i===void 0||i.call(n):(s=(a=this.options).onExit)===null||s===void 0||s.call(a)},this.shortcut=new EA(t.graph),this.bindEvents(),this.style=document.createElement("style"),document.head.appendChild(this.style),this.style.innerHTML=`
:not(:root):fullscreen::backdrop {
background: transparent;
}
`}bindEvents(){this.unbindEvents(),this.shortcut.unbindAll();const{request:t=[],exit:e=[]}=this.options.trigger;this.shortcut.bind(t,this.request),this.shortcut.bind(e,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(i=>{document.addEventListener(i,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(e=>{document.removeEventListener(e,this.onFullscreenChange,!1)})}setGraphSize(t=!0){var e,n;let i,a;t?(i=((e=globalThis.screen)===null||e===void 0?void 0:e.width)||0,a=((n=globalThis.screen)===null||n===void 0?void 0:n.height)||0,this.graphSize=this.context.graph.getSize()):[i,a]=this.graphSize,this.context.graph.setSize(i,a),this.context.graph.render()}request(){document.fullscreenElement||!ND()||this.$el.requestFullscreen().catch(t=>{ha.warn(`Error attempting to enable full-screen: ${t.message} (${t.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}r0.defaultOptions={trigger:{},autoFit:!0};function ND(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class i0 extends mi{constructor(t,e){super(t,Object.assign({},i0.defaultOptions,e)),this.$element=zc("grid-line",!0),this.offset=[0,0],this.currentScale=1,this.followZoom=i=>{const{data:{scale:a,origin:s}}=i;if(!a||s===void 0&&this.context.viewport===void 0)return;const o=this.currentScale;this.currentScale=a;const A=a/o,l=Bs(s||this.context.graph.getCanvasCenter(),1-A),c=this.baseSize*a,u=Bs(this.offset,A),h=Ym(u,c),d=tn(h,l);this.$element.style.backgroundSize=`${c}px ${c}px`,this.$element.style.backgroundPosition=`${d[0]}px ${d[1]}px`,this.offset=Ym(d,c)},this.followTranslate=i=>{if(!this.options.follow)return;const{data:{translate:a}}=i;a&&this.updateOffset(a)},this.onTransform=i=>{const a=this.parseFollow(this.options.follow);a.zoom&&this.followZoom(i),a.translate&&this.followTranslate(i)},this.context.canvas.getContainer().prepend(this.$element),this.baseSize=this.options.size,this.updateStyle(),this.bindEvents()}update(t){super.update(t),t.size!==void 0&&(this.baseSize=t.size),this.updateStyle()}bindEvents(){const{graph:t}=this.context;t.on(Ae.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{stroke:t,lineWidth:e,border:n,borderLineWidth:i,borderStroke:a,borderStyle:s}=this.options,o=this.baseSize*this.currentScale;Object.assign(this.$element.style,{border:n?`${i}px ${s} ${a}`:"none",backgroundImage:`linear-gradient(${t} ${e}px, transparent ${e}px), linear-gradient(90deg, ${t} ${e}px, transparent ${e}px)`,backgroundSize:`${o}px ${o}px`,backgroundRepeat:"repeat"})}updateOffset(t){const e=this.baseSize*this.currentScale;this.offset=Ym(tn(this.offset,t),e),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}parseFollow(t){var e,n;return Jo(t)?{translate:t,zoom:t}:{translate:(e=t==null?void 0:t.translate)!==null&&e!==void 0?e:!1,zoom:(n=t==null?void 0:t.zoom)!==null&&n!==void 0?n:!1}}destroy(){this.context.graph.off(Ae.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}i0.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};function Xy(r){const t={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(e=>{const{type:n,value:i}=e,a=Qt(i);if(n==="NodeAdded"||n==="EdgeAdded"||n==="ComboAdded")t.Added.set(a,e);else if(n==="NodeUpdated"||n==="EdgeUpdated"||n==="ComboUpdated")if(t.Added.has(a))t.Added.set(a,{type:n.replace("Updated","Added"),value:i});else if(t.Updated.has(a)){const{original:s}=t.Updated.get(a);t.Updated.set(a,{type:n,value:i,original:s})}else t.Removed.has(a)||t.Updated.set(a,e);else(n==="NodeRemoved"||n==="EdgeRemoved"||n==="ComboRemoved")&&(t.Added.has(a)?t.Added.delete(a):(t.Updated.has(a)&&t.Updated.delete(a),t.Removed.set(a,e)))}),[...Array.from(t.Added.values()),...Array.from(t.Updated.values()),...Array.from(t.Removed.values())]}function JC(r){const{NodeAdded:t=[],NodeUpdated:e=[],NodeRemoved:n=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:s=[],ComboAdded:o=[],ComboUpdated:A=[],ComboRemoved:l=[]}=Ff(r,c=>c.type);return{add:{nodes:t,edges:i,combos:o},update:{nodes:e,edges:a,combos:A},remove:{nodes:n,edges:s,combos:l}}}function qC(r,t){for(const e in r)Br(r[e])&&!Array.isArray(r[e])&&r[e]!==null?(t[e]||(t[e]={}),qC(r[e],t[e])):t[e]===void 0&&(t[e]=lh(e))}function kD(r,t=!1,e){const n={animation:t,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:s}=JC(Xy(r));return["nodes","edges","combos"].forEach(o=>{a[o]&&a[o].forEach(A=>{var l,c;const u=Object.assign({},A.value);let h=Object.assign({},A.original);if(e){const d=e.graph.getElementType(Qt(A.original)),f=d==="edge"?"stroke":"fill",g=e.element.getElementComputedStyle(d,A.original);h=Object.assign(Object.assign({},A.original),{style:Object.assign({[f]:g[f]},A.original.style)})}qC(u,h),(l=n.current.update)[o]||(l[o]=[]),n.current.update[o].push(u),(c=n.original.update)[o]||(c[o]=[]),n.original.update[o].push(h)}),i[o]&&i[o].forEach(A=>{var l,c;const u=Object.assign({},A.value);(l=n.current.add)[o]||(l[o]=[]),n.current.add[o].push(u),(c=n.original.remove)[o]||(c[o]=[]),n.original.remove[o].push(u)}),s[o]&&s[o].forEach(A=>{var l,c;const u=Object.assign({},A.value);(l=n.current.remove)[o]||(l[o]=[]),n.current.remove[o].push(u),(c=n.original.add)[o]||(c[o]=[]),n.original.add[o].push(u)})}),n}class a0 extends mi{constructor(t,e){super(t,Object.assign({},a0.defaultOptions,e)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var s,o,A;this.freezed=!0,(o=(s=this.options).executeCommand)===null||o===void 0||o.call(s,i);const l=a?i.original:i.current;this.context.graph.addData(l.add),this.context.graph.updateData(l.update),this.context.graph.removeData(eb(l.remove,!1)),(A=this.context.element)===null||A===void 0||A.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===Ae.AFTER_DRAW){const{dataChanges:s=[],animation:o=!0}=i.data;if(!((a=this.context.batch)===null||a===void 0)&&a.isBatching){if(!this.batchChanges)return;this.batchChanges.push(s),this.batchAnimation&&(this.batchAnimation=o);return}this.batchChanges=[s],this.batchAnimation=o}this.undoStackPush(kD(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(fA.ADD,this.undoStack[this.undoStack.length-1])}},this.initBatchCommand=i=>{const{initiate:a}=i.data;this.batchAnimation=!1,a?this.batchChanges=[]:this.undoStack.pop()||(this.batchChanges=null)},this.emitter=new Cg;const{graph:n}=this.context;n.on(Ae.AFTER_DRAW,this.addCommand),n.on(Ae.BATCH_START,this.initBatchCommand),n.on(Ae.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var t,e,n,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((e=(t=this.options).beforeAddCommand)===null||e===void 0?void 0:e.call(t,a,!1))===!1)return;this.redoStack.push(a),(i=(n=this.options).afterAddCommand)===null||i===void 0||i.call(n,a,!1),this.notify(fA.UNDO,a)}return this}redo(){const t=this.redoStack.pop();return t&&(this.executeCommand(t,!1),this.undoStackPush(t),this.notify(fA.REDO,t)),this}undoAndCancel(){const t=this.undoStack.pop();return t&&(this.executeCommand(t,!1),this.redoStack=[],this.notify(fA.CANCEL,t)),this}undoStackPush(t){var e,n,i,a;const{stackSize:s}=this.options;s!==0&&this.undoStack.length>=s&&this.undoStack.shift(),((n=(e=this.options).beforeAddCommand)===null||n===void 0?void 0:n.call(e,t,!0))!==!1&&(this.undoStack.push(t),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,t,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(fA.CLEAR,null)}notify(t,e){this.emitter.emit(t,{cmd:e}),this.emitter.emit(fA.CHANGE,{cmd:e})}on(t,e){this.emitter.on(t,e)}destroy(){const{graph:t}=this.context;t.off(Ae.AFTER_DRAW,this.addCommand),t.off(Ae.BATCH_START,this.initBatchCommand),t.off(Ae.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}a0.defaultOptions={stackSize:0};const Jy={toXy(r,t){if(!t)return[...r];const e=t[0].slice(1),n=t[1].slice(1);return r.map(i=>[i[e],i[n]])},fromXy(r,t){if(!t)return[...r];const e=t[0].slice(1),n=t[1].slice(1);return r.map(([i,a])=>({[e]:i,[n]:a}))}};class QD{constructor(t,e){this._cells=[],this._cellSize=e,this._reverseCellSize=1/e;for(const n of t){const i=this.coordToCellNum(n[0]),a=this.coordToCellNum(n[1]);this._cells[i]||(this._cells[i]=[]),this._cells[i][a]||(this._cells[i][a]=[]),this._cells[i][a].push(n)}}cellPoints(t,e){var n;return((n=this._cells[t])===null||n===void 0?void 0:n[e])||[]}rangePoints(t){const e=this.coordToCellNum(t[0]),n=this.coordToCellNum(t[1]),i=this.coordToCellNum(t[2]),a=this.coordToCellNum(t[3]),s=[];for(let o=e;o<=i;o++)for(let A=n;A<=a;A++){const l=this.cellPoints(o,A);for(const c of l)s.push(c)}return s}removePoint(t){const e=this.coordToCellNum(t[0]),n=this.coordToCellNum(t[1]),i=this._cells[e][n],a=i.findIndex(([s,o])=>s===t[0]&&o===t[1]);return a>-1&&i.splice(a,1),i}trunc(t){return Math.trunc(t)}coordToCellNum(t){return this.trunc(t*this._reverseCellSize)}extendBbox(t,e){return[t[0]-e*this._cellSize,t[1]-e*this._cellSize,t[2]+e*this._cellSize,t[3]+e*this._cellSize]}}function UD(r,t){return new QD(r,t)}const $C=+(Math.pow(2,27)+1);function s0(r,t,e){const n=r*t,i=$C*r,a=i-r,s=i-a,o=r-s,A=$C*t,l=A-t,c=A-l,u=t-c,f=n-s*c-o*c-s*u,g=o*u-f;return e?(e[0]=g,e[1]=n,e):[g,n]}function PD(r,t,e){const n=r+t,i=n-r,a=n-i,s=t-i,o=r-a;return e?(e[0]=o+s,e[1]=n,e):[o+s,n]}function DD(r,t){const e=r.length;if(e===1){const o=s0(r[0],t);return o[0]?o:[o[1]]}const n=new Array(2*e),i=[.1,.1],a=[.1,.1];let s=0;s0(r[0],t,i),i[0]&&(n[s++]=i[0]);for(let o=1;o<e;++o){s0(r[o],t,a);const A=i[1];PD(A,a[0],i),i[0]&&(n[s++]=i[0]);const l=a[1],c=i[1],u=l+c,h=u-l,d=c-h;i[1]=u,d&&(n[s++]=d)}return i[1]&&(n[s++]=i[1]),s===0&&(n[s++]=0),n.length=s,n}function RD(r,t){const e=r+t,n=e-r,i=e-n,a=t-n,o=r-i+a;return o?[o,e]:[e]}function _D(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return RD(r[0],-t[0]);const i=e+n,a=new Array(i);let s=0,o=0,A=0;const l=Math.abs;let c=r[o],u=l(c),h=-t[A],d=l(h),f,g;u<d?(g=c,o+=1,o<e&&(c=r[o],u=l(c))):(g=h,A+=1,A<n&&(h=-t[A],d=l(h))),o<e&&u<d||A>=n?(f=c,o+=1,o<e&&(c=r[o],u=l(c))):(f=h,A+=1,A<n&&(h=-t[A],d=l(h)));let v=f+g,m=v-f,w=g-m,C=w,F=v,Q,D,K,G,J;for(;o<e&&A<n;)u<d?(f=c,o+=1,o<e&&(c=r[o],u=l(c))):(f=h,A+=1,A<n&&(h=-t[A],d=l(h))),g=C,v=f+g,m=v-f,w=g-m,w&&(a[s++]=w),Q=F+v,D=Q-F,K=Q-D,G=v-D,J=F-K,C=J+G,F=Q;for(;o<e;)f=c,g=C,v=f+g,m=v-f,w=g-m,w&&(a[s++]=w),Q=F+v,D=Q-F,K=Q-D,G=v-D,J=F-K,C=J+G,F=Q,o+=1,o<e&&(c=r[o]);for(;A<n;)f=h,g=C,v=f+g,m=v-f,w=g-m,w&&(a[s++]=w),Q=F+v,D=Q-F,K=Q-D,G=v-D,J=F-K,C=J+G,F=Q,A+=1,A<n&&(h=-t[A]);return C&&(a[s++]=C),F&&(a[s++]=F),s||(a[s++]=0),a.length=s,a}function HD(r,t){const e=r+t,n=e-r,i=e-n,a=t-n,o=r-i+a;return o?[o,e]:[e]}function GD(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return HD(r[0],t[0]);const i=e+n,a=new Array(i);let s=0,o=0,A=0;const l=Math.abs;let c=r[o],u=l(c),h=t[A],d=l(h),f,g;u<d?(g=c,o+=1,o<e&&(c=r[o],u=l(c))):(g=h,A+=1,A<n&&(h=t[A],d=l(h))),o<e&&u<d||A>=n?(f=c,o+=1,o<e&&(c=r[o],u=l(c))):(f=h,A+=1,A<n&&(h=t[A],d=l(h)));let v=f+g,m=v-f,w=g-m,C=w,F=v,Q,D,K,G,J;for(;o<e&&A<n;)u<d?(f=c,o+=1,o<e&&(c=r[o],u=l(c))):(f=h,A+=1,A<n&&(h=t[A],d=l(h))),g=C,v=f+g,m=v-f,w=g-m,w&&(a[s++]=w),Q=F+v,D=Q-F,K=Q-D,G=v-D,J=F-K,C=J+G,F=Q;for(;o<e;)f=c,g=C,v=f+g,m=v-f,w=g-m,w&&(a[s++]=w),Q=F+v,D=Q-F,K=Q-D,G=v-D,J=F-K,C=J+G,F=Q,o+=1,o<e&&(c=r[o]);for(;A<n;)f=h,g=C,v=f+g,m=v-f,w=g-m,w&&(a[s++]=w),Q=F+v,D=Q-F,K=Q-D,G=v-D,J=F-K,C=J+G,F=Q,A+=1,A<n&&(h=t[A]);return C&&(a[s++]=C),F&&(a[s++]=F),s||(a[s++]=0),a.length=s,a}const t2=5,o0=11102230246251565e-32,KD=(3+16*o0)*o0,zD=(7+56*o0)*o0;function VD(r,t,e,n){return function(a,s,o){const A=r(r(t(s[1],o[0]),t(-o[1],s[0])),r(t(a[1],s[0]),t(-s[1],a[0]))),l=r(t(a[1],o[0]),t(-o[1],a[0])),c=n(A,l);return c[c.length-1]}}function WD(r,t,e,n){return function(a,s,o,A){const l=r(r(e(r(t(o[1],A[0]),t(-A[1],o[0])),s[2]),r(e(r(t(s[1],A[0]),t(-A[1],s[0])),-o[2]),e(r(t(s[1],o[0]),t(-o[1],s[0])),A[2]))),r(e(r(t(s[1],A[0]),t(-A[1],s[0])),a[2]),r(e(r(t(a[1],A[0]),t(-A[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),A[2])))),c=r(r(e(r(t(o[1],A[0]),t(-A[1],o[0])),a[2]),r(e(r(t(a[1],A[0]),t(-A[1],a[0])),-o[2]),e(r(t(a[1],o[0]),t(-o[1],a[0])),A[2]))),r(e(r(t(s[1],o[0]),t(-o[1],s[0])),a[2]),r(e(r(t(a[1],o[0]),t(-o[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),o[2])))),u=n(l,c);return u[u.length-1]}}function ZD(r,t,e,n){return function(a,s,o,A,l){const c=r(r(r(e(r(e(r(t(A[1],l[0]),t(-l[1],A[0])),o[2]),r(e(r(t(o[1],l[0]),t(-l[1],o[0])),-A[2]),e(r(t(o[1],A[0]),t(-A[1],o[0])),l[2]))),s[3]),r(e(r(e(r(t(A[1],l[0]),t(-l[1],A[0])),s[2]),r(e(r(t(s[1],l[0]),t(-l[1],s[0])),-A[2]),e(r(t(s[1],A[0]),t(-A[1],s[0])),l[2]))),-o[3]),e(r(e(r(t(o[1],l[0]),t(-l[1],o[0])),s[2]),r(e(r(t(s[1],l[0]),t(-l[1],s[0])),-o[2]),e(r(t(s[1],o[0]),t(-o[1],s[0])),l[2]))),A[3]))),r(e(r(e(r(t(o[1],A[0]),t(-A[1],o[0])),s[2]),r(e(r(t(s[1],A[0]),t(-A[1],s[0])),-o[2]),e(r(t(s[1],o[0]),t(-o[1],s[0])),A[2]))),-l[3]),r(e(r(e(r(t(A[1],l[0]),t(-l[1],A[0])),s[2]),r(e(r(t(s[1],l[0]),t(-l[1],s[0])),-A[2]),e(r(t(s[1],A[0]),t(-A[1],s[0])),l[2]))),a[3]),e(r(e(r(t(A[1],l[0]),t(-l[1],A[0])),a[2]),r(e(r(t(a[1],l[0]),t(-l[1],a[0])),-A[2]),e(r(t(a[1],A[0]),t(-A[1],a[0])),l[2]))),-s[3])))),r(r(e(r(e(r(t(s[1],l[0]),t(-l[1],s[0])),a[2]),r(e(r(t(a[1],l[0]),t(-l[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),l[2]))),A[3]),r(e(r(e(r(t(s[1],A[0]),t(-A[1],s[0])),a[2]),r(e(r(t(a[1],A[0]),t(-A[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),A[2]))),-l[3]),e(r(e(r(t(o[1],A[0]),t(-A[1],o[0])),s[2]),r(e(r(t(s[1],A[0]),t(-A[1],s[0])),-o[2]),e(r(t(s[1],o[0]),t(-o[1],s[0])),A[2]))),a[3]))),r(e(r(e(r(t(o[1],A[0]),t(-A[1],o[0])),a[2]),r(e(r(t(a[1],A[0]),t(-A[1],a[0])),-o[2]),e(r(t(a[1],o[0]),t(-o[1],a[0])),A[2]))),-s[3]),r(e(r(e(r(t(s[1],A[0]),t(-A[1],s[0])),a[2]),r(e(r(t(a[1],A[0]),t(-A[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),A[2]))),o[3]),e(r(e(r(t(s[1],o[0]),t(-o[1],s[0])),a[2]),r(e(r(t(a[1],o[0]),t(-o[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),o[2]))),-A[3]))))),u=r(r(r(e(r(e(r(t(A[1],l[0]),t(-l[1],A[0])),o[2]),r(e(r(t(o[1],l[0]),t(-l[1],o[0])),-A[2]),e(r(t(o[1],A[0]),t(-A[1],o[0])),l[2]))),a[3]),e(r(e(r(t(A[1],l[0]),t(-l[1],A[0])),a[2]),r(e(r(t(a[1],l[0]),t(-l[1],a[0])),-A[2]),e(r(t(a[1],A[0]),t(-A[1],a[0])),l[2]))),-o[3])),r(e(r(e(r(t(o[1],l[0]),t(-l[1],o[0])),a[2]),r(e(r(t(a[1],l[0]),t(-l[1],a[0])),-o[2]),e(r(t(a[1],o[0]),t(-o[1],a[0])),l[2]))),A[3]),e(r(e(r(t(o[1],A[0]),t(-A[1],o[0])),a[2]),r(e(r(t(a[1],A[0]),t(-A[1],a[0])),-o[2]),e(r(t(a[1],o[0]),t(-o[1],a[0])),A[2]))),-l[3]))),r(r(e(r(e(r(t(o[1],l[0]),t(-l[1],o[0])),s[2]),r(e(r(t(s[1],l[0]),t(-l[1],s[0])),-o[2]),e(r(t(s[1],o[0]),t(-o[1],s[0])),l[2]))),a[3]),e(r(e(r(t(o[1],l[0]),t(-l[1],o[0])),a[2]),r(e(r(t(a[1],l[0]),t(-l[1],a[0])),-o[2]),e(r(t(a[1],o[0]),t(-o[1],a[0])),l[2]))),-s[3])),r(e(r(e(r(t(s[1],l[0]),t(-l[1],s[0])),a[2]),r(e(r(t(a[1],l[0]),t(-l[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),l[2]))),o[3]),e(r(e(r(t(s[1],o[0]),t(-o[1],s[0])),a[2]),r(e(r(t(a[1],o[0]),t(-o[1],a[0])),-s[2]),e(r(t(a[1],s[0]),t(-s[1],a[0])),o[2]))),-l[3])))),h=n(c,u);return h[h.length-1]}}function A0(r){return(r===3?VD:r===4?WD:ZD)(GD,s0,DD,_D)}const jD=A0(3),YD=A0(4),Ll=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,n){const i=(t[1]-n[1])*(e[0]-n[0]),a=(t[0]-n[0])*(e[1]-n[1]),s=i-a;let o;if(i>0){if(a<=0)return s;o=i+a}else if(i<0){if(a>=0)return s;o=-(i+a)}else return s;const A=KD*o;return s>=A||s<=-A?s:jD(t,e,n)},function(t,e,n,i){const a=t[0]-i[0],s=e[0]-i[0],o=n[0]-i[0],A=t[1]-i[1],l=e[1]-i[1],c=n[1]-i[1],u=t[2]-i[2],h=e[2]-i[2],d=n[2]-i[2],f=s*c,g=o*l,v=o*A,m=a*c,w=a*l,C=s*A,F=u*(f-g)+h*(v-m)+d*(w-C),Q=(Math.abs(f)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(m))*Math.abs(h)+(Math.abs(w)+Math.abs(C))*Math.abs(d),D=zD*Q;return F>D||-F>D?F:YD(t,e,n,i)}];function XD(r){let t=Ll[r.length];return t||(t=Ll[r.length]=A0(r.length)),t.apply(void 0,...r)}function JD(r,t,e,n,i,a,s){return function(...A){switch(A.length){case 0:case 1:return 0;case 2:return n(A[0],A[1]);case 3:return i(A[0],A[1],A[2]);case 4:return a(A[0],A[1],A[2],A[3]);case 5:return s(A[0],A[1],A[2],A[3],A[4])}return r(A)}}function qD(){for(;Ll.length<=t2;)Ll.push(A0(Ll.length));const r=JD(void 0,XD,...Ll);for(let t=0;t<=t2;++t)r[t]=Ll[t];return r}var kh=qD();const e2=kh[3];function $D(r){const t=r.length;if(t<3){const o=new Array(t);for(let A=0;A<t;++A)o[A]=A;return t===2&&r[0][0]===r[1][0]&&r[0][1]===r[1][1]?[0]:o}const e=new Array(t);for(let o=0;o<t;++o)e[o]=o;e.sort((o,A)=>{const l=r[o][0]-r[A][0];return l||r[o][1]-r[A][1]});const n=[e[0],e[1]],i=[e[0],e[1]];for(let o=2;o<t;++o){const A=e[o],l=r[A];let c=n.length;for(;c>1&&e2(r[n[c-2]],r[n[c-1]],l)<=0;)c-=1,n.pop();for(n.push(A),c=i.length;c>1&&e2(r[i[c-2]],r[i[c-1]],l)>=0;)c-=1,i.pop();i.push(A)}const a=new Array(i.length+n.length-2);let s=0;for(let o=0,A=n.length;o<A;++o)a[s++]=n[o];for(let o=i.length-2;o>0;--o)a[s++]=i[o];return a}function tR(r,t,e,n){for(let i=0;i<2;++i){const a=r[i],s=t[i],[o,A]=[Math.min(a,s),Math.max(a,s)],l=e[i],c=n[i],[u,h]=[Math.min(l,c),Math.max(l,c)];if(h<o||A<u)return!1}return!0}function eR(r,t,e,n){const i=kh(r,e,n),a=kh(t,e,n);if(i>0&&a>0||i<0&&a<0)return!1;const s=kh(e,r,t),o=kh(n,r,t);return s>0&&o>0||s<0&&o<0?!1:i===0&&a===0&&s===0&&o===0?tR(r,t,e,n):!0}function nR(r){const t=[r[0]];let e=r[0];for(let n=1;n<r.length;n++){const i=r[n];(e[0]!==i[0]||e[1]!==i[1])&&t.push(i),e=i}return t}function rR(r){return r.sort(function(t,e){return t[0]-e[0]||t[1]-e[1]})}function qy(r,t){return Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2)}function n2(r,t,e){const n=[t[0]-r[0],t[1]-r[1]],i=[e[0]-r[0],e[1]-r[1]],a=qy(r,t),s=qy(r,e);return(n[0]*i[0]+n[1]*i[1])/Math.sqrt(a*s)}function r2(r,t){for(let e=0;e<t.length-1;e++){const n=[t[e],t[e+1]];if(!(r[0][0]===n[0][0]&&r[0][1]===n[0][1]||r[0][0]===n[1][0]&&r[0][1]===n[1][1])&&eR(r[0],r[1],n[0],n[1]))return!0}return!1}function iR(r){let t=1/0,e=1/0,n=-1/0,i=-1/0;for(let a=r.length-1;a>=0;a--)r[a][0]<t&&(t=r[a][0]),r[a][1]<e&&(e=r[a][1]),r[a][0]>n&&(n=r[a][0]),r[a][1]>i&&(i=r[a][1]);return[n-t,i-e]}function aR(r){return[Math.min(r[0][0],r[1][0]),Math.min(r[0][1],r[1][1]),Math.max(r[0][0],r[1][0]),Math.max(r[0][1],r[1][1])]}function sR(r,t,e){let n=null,i=a2,a=a2,s,o;for(let A=0;A<t.length;A++)s=n2(r[0],r[1],t[A]),o=n2(r[1],r[0],t[A]),s>i&&o>a&&!r2([r[0],t[A]],e)&&!r2([r[1],t[A]],e)&&(i=s,a=o,n=t[A]);return n}function i2(r,t,e,n,i){let a=!1;for(let s=0;s<r.length-1;s++){const o=[r[s],r[s+1]],A=o[0][0]+","+o[0][1]+","+o[1][0]+","+o[1][1];if(qy(o[0],o[1])<t||i.has(A))continue;let l=0,c=aR(o),u,h,d;do c=n.extendBbox(c,l),u=c[2]-c[0],h=c[3]-c[1],d=sR(o,n.rangePoints(c),r),l++;while(d===null&&(e[0]>u||e[1]>h));u>=e[0]&&h>=e[1]&&i.add(A),d!==null&&(r.splice(s+1,0,d),n.removePoint(d),a=!0)}return a?i2(r,t,e,n,i):r}function oR(r,t,e){const n=t||20,i=nR(rR(Jy.toXy(r,e)));if(i.length<4){const u=i.concat([i[0]]);return e?Jy.fromXy(u,e):u}const a=iR(i),s=[a[0]*s2,a[1]*s2],o=$D(i).reverse().map(u=>i[u]);o.push(o[0]);const A=i.filter(function(u){return o.indexOf(u)<0}),l=Math.ceil(1/(i.length/(a[0]*a[1]))),c=i2(o,Math.pow(n,2),s,UD(A,l),new Set);return e?Jy.fromXy(c,e):c}const a2=Math.cos(90/(180/Math.PI)),s2=.6;function AR(r,t,e){if(r.length===1)return lR(r[0],t,e);if(r.length===2)return o2(r,t,e);if(r.length===3){const[n,i,a]=Jm(r);if(hb(n,i,a))return o2([n,a],t,e)}switch(e){case"smooth":return uR(r,t);case"sharp":return hR(r,t);case"rounded":default:return cR(r,t)}}const lR=(r,t,e)=>{if(e==="sharp")return[["M",r[0]-t,r[1]-t],["L",r[0]+t,r[1]-t],["L",r[0]+t,r[1]+t],["L",r[0]-t,r[1]+t],["Z"]];const n=[t,t,0,0,0];return[["M",r[0],r[1]-t],["A",...n,r[0],r[1]+t],["A",...n,r[0],r[1]-t]]},o2=(r,t,e)=>{const n=[t,t,0,0,0],i=e==="sharp"?tn(r[0],yA(Io(tr(r[0],r[1])),t)):r[0],a=e==="sharp"?tn(r[1],yA(Io(tr(r[1],r[0])),t)):r[1],s=yA(Io(Wf(tr(i,a),!1)),t),o=yA(s,-1),A=tn(i,s),l=tn(a,s),c=tn(a,o),u=tn(i,o);return e==="sharp"?[["M",A[0],A[1]],["L",l[0],l[1]],["L",c[0],c[1]],["L",u[0],u[1]],["Z"]]:[["M",A[0],A[1]],["L",l[0],l[1]],["A",...n,c[0],c[1]],["L",u[0],u[1]],["A",...n,A[0],A[1]]]},cR=(r,t)=>{const e=Jm(r).map((o,A)=>{const l=(A-2+r.length)%r.length,c=(A-1+r.length)%r.length,u=(A+1)%r.length,h=r[l],d=r[c],f=r[u],g=tr(h,d),v=tr(d,o),m=tr(o,f),w=(K,G)=>jm(K,G,!0)<Math.PI,C=w(g,v),F=w(v,m),Q=K=>yA(Io(Wf(K,!1)),t),D=Q(v);return[{p:yl(C?tn(d,Q(g)):tn(d,D)),concave:C&&d},{p:yl(F?tn(o,Q(m)):tn(o,D)),concave:F&&o}]}),n=[t,t,0,0,0],i=e.findIndex((o,A)=>!e[(A-1+e.length)%e.length][0].concave&&!e[(A-1+e.length)%e.length][1].concave&&!o[0].concave&&!o[0].concave&&!o[1].concave),a=e.slice(i).concat(e.slice(0,i));let s=[];return a.flatMap((o,A)=>{const l=[],c=a[e.length-1];return A===0&&l.push(["M",...c[1].p]),o[0].concave?s.push(o[0].p,o[1].p):l.push(["A",...n,...o[0].p]),o[1].concave?s.unshift(o[1].p):l.push(["L",...o[1].p]),s.length===3&&(l.pop(),l.push(["C",...s.flat()]),s=[]),l})},uR=(r,t)=>{const e=Jm(r).map((n,i)=>{const a=r[(i+1)%r.length];return{p:n,v:Io(tr(a,n))}});return e.forEach((n,i)=>{const a=i>0?i-1:r.length-1,s=e[a].v,o=Io(tn(s,yA(n.v,jm(s,n.v,!0)<Math.PI?1:-1)));n.p=tn(n.p,yA(o,t))}),Fb(e.map(n=>n.p))},hR=(r,t)=>{const n=r.map((a,s)=>{const o=r[s===0?r.length-1:s-1],A=fh(yA(Io(Wf(tr(o,a),!1)),t));return[tn(o,A),tn(a,A)]}).flat();return n.map((a,s)=>{if(s%2===0)return null;const o=[n[(s-1)%n.length],n[s%n.length]],A=[n[(s+1)%n.length],n[(s+2)%n.length]];return Xm(o,A,!0)}).filter(Boolean).map((a,s)=>[s===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var dR=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class l0 extends mi{constructor(t,e){super(t,Object.assign({},l0.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new wh({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!Dr(this.optionsCache,this.options);this.shape.update(this.getHullStyle(n))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=n=>{this.shape&&this.options.members.includes(Qt(n.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(n=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const s=a.map(l=>i.getNodeData(l)),o=oR(s.map(Ai),this.options.concavity).slice(1).reverse(),A=o.flatMap(l=>s.filter(c=>Dr(Ai(c),l)).map(Qt));return Dr(A,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=A,this.path=AR(o,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(Ae.AFTER_RENDER,this.drawHull),this.context.graph.on(Ae.AFTER_ELEMENT_UPDATE,this.updateHullPath)}unbindEvents(){this.context.graph.off(Ae.AFTER_RENDER,this.drawHull),this.context.graph.off(Ae.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(t){const e=this.options,{members:n,padding:i,corner:a}=e,s=dR(e,["members","padding","corner"]);return Object.assign(Object.assign({},s),{d:this.getHullPath(t)})}getPadding(){const{graph:t}=this.context;return this.hullMemberIds.reduce((n,i)=>{const{halfExtents:a}=t.getElementRenderBounds(i),s=Math.max(a[0],a[1]);return Math.max(n,s)},0)+this.options.padding}addMember(t){const e=Array.isArray(t)?t:[t];this.options.members=[...new Set([...this.options.members,...e])],this.shape.update({d:this.getHullPath()})}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),e.some(n=>this.hullMemberIds.includes(n))&&this.shape.update({d:this.getHullPath()})}updateMember(t){this.options.members=Wt(t)?t(this.options.members):t,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.unbindEvents(),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}l0.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};function A2(r,t){t(r),r.children&&r.children.forEach(function(e){e&&A2(e,t)})}function Qh(r){c0(r,!0)}function Ts(r){c0(r,!1)}function c0(r,t){var e=t?"visible":"hidden";A2(r,function(n){n.attr("visibility",e)})}var fR=5,l2=function(r,t,e,n){e===void 0&&(e=0),n===void 0&&(n=fR),Object.entries(t).forEach(function(i){var a=(0,z.CR)(i,2),s=a[0],o=a[1],A=r;Object.prototype.hasOwnProperty.call(t,s)&&(o?Qc(o)?(Qc(r[s])||(A[s]={}),e<n?l2(r[s],o,e+1,n):A[s]=t[s]):Ni(o)?(A[s]=[],A[s]=A[s].concat(o)):A[s]=o:A[s]=o)})},Zr=function(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];for(var n=0;n<t.length;n+=1)l2(r,t[n]);return r},gR=function(r){(0,z.ZT)(t,r);function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=r.apply(this,(0,z.ev)([],(0,z.CR)(e),!1))||this;return i.isMutationObserved=!0,i.addEventListener(yn.INSERTED,function(){Ts(i)}),i}return t}(oi);function c2(r){var t=r.appendChild(new gR({class:"offscreen"}));return Ts(t),t}function vR(r){for(var t=r;t;){if(t.className==="offscreen")return!0;t=t.parent}return!1}function pR(){c0(this,this.attributes.visibility!=="hidden")}var Sr=function(r){(0,z.ZT)(t,r);function t(e,n){n===void 0&&(n={});var i=r.call(this,Zr({},{style:n},e))||this;return i.initialized=!1,i._defaultOptions=n,i}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=c2(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),t.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},t.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},t.prototype.attributeChangedCallback=function(e){e==="visibility"&&pR.call(this)},t.prototype.update=function(e,n){var i;return this.attr(Zr({},this.attributes,e||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,n)},t.prototype.clear=function(){this.removeChildren()},t.prototype.bindEvents=function(e,n){},t.prototype.getSubShapeStyle=function(e){var n=e.x,i=e.y,a=e.transform,s=e.transformOrigin,o=e.class,A=e.className,l=e.zIndex,c=(0,z._T)(e,["x","y","transform","transformOrigin","class","className","zIndex"]);return c},t}(th);function $y(r){return r.toString().charAt(0).toUpperCase()+r.toString().slice(1)}function mR(r){return r.toString().charAt(0).toLowerCase()+r.toString().slice(1)}function yR(r,t){return"".concat(t).concat($y(r))}function u2(r,t,e){var n;e===void 0&&(e=!0);var i=t||((n=r.match(/^([a-z][a-z0-9]+)/))===null||n===void 0?void 0:n[0])||"",a=r.replace(new RegExp("^(".concat(i,")")),"");return e?mR(a):a}function wR(r,t){Object.entries(t).forEach(function(e){var n=(0,z.CR)(e,2),i=n[0],a=n[1];(0,z.ev)([r],(0,z.CR)(r.querySelectorAll(i)),!1).filter(function(s){return s.matches(i)}).forEach(function(s){if(s){var o=s;o.style.cssText+=Object.entries(a).reduce(function(A,l){return"".concat(A).concat(l.join(":"),";")},"")}})})}var u0=function(r,t){if(!(r!=null&&r.startsWith(t)))return!1;var e=r[t.length];return e>="A"&&e<="Z"};function en(r,t,e){e===void 0&&(e=!1);var n={};return Object.entries(r).forEach(function(i){var a=(0,z.CR)(i,2),s=a[0],o=a[1];if(!(s==="className"||s==="class")){if(u0(s,"show")&&u0(u2(s,"show"),t)!==e)s===yR(t,"show")?n[s]=o:n[s.replace(new RegExp($y(t)),"")]=o;else if(!u0(s,"show")&&u0(s,t)!==e){var A=u2(s,t);A==="filter"&&typeof o=="function"||(n[A]=o)}}}),n}function Vc(r,t){return Object.entries(r).reduce(function(e,n){var i=(0,z.CR)(n,2),a=i[0],s=i[1];return a.startsWith("show")?e["show".concat(t).concat(a.slice(4))]=s:e["".concat(t).concat($y(a))]=s,e},{})}function Uo(r,t){t===void 0&&(t=["x","y","class","className"]);var e=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],n={},i={};return Object.entries(r).forEach(function(a){var s=(0,z.CR)(a,2),o=s[0],A=s[1];t.includes(o)||(e.indexOf(o)!==-1?i[o]=A:n[o]=A)}),[n,i]}var ER=function(r){if(!Ni(r))return[];for(var t=[],e=0;e<r.length;e++)t=t.concat(r[e]);return t},BR=ER,t1=function(r){(0,z.ZT)(t,r);function t(e){e===void 0&&(e={});var n=e.style,i=(0,z._T)(e,["style"]);return r.call(this,(0,z.pi)({style:(0,z.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},n)},i))||this}return Object.defineProperty(t.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=c2(this)),this._offscreen},enumerable:!1,configurable:!0}),t.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},t}(fl);function bR(r,t){var e=new Map;return r.forEach(function(n){var i=t(n);e.has(i)||e.set(i,[]),e.get(i).push(n)}),e}function xR(r){throw new Error(r)}var CR=function(){function r(i,a,s,o,A,l,c){i===void 0&&(i=null),a===void 0&&(a=null),s===void 0&&(s=null),o===void 0&&(o=null),A===void 0&&(A=[null,null,null,null,null]),l===void 0&&(l=[]),c===void 0&&(c=[]),t.add(this),this._elements=Array.from(i),this._data=a,this._parent=s,this._document=o,this._enter=A[0],this._update=A[1],this._exit=A[2],this._merge=A[3],this._split=A[4],this._transitions=l,this._facetElements=c}r.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(a,null,this._elements[0],this._document)},r.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new e(this._elements,null,this._parent,this._document,void 0,void 0,a)},r.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new e([a],null,a,this._document)},r.prototype.append=function(i){var a=this,s=typeof i=="function"?i:function(){return a.createElement(i)},o=[];if(this._data!==null){for(var A=0;A<this._data.length;A++){var l=this._data[A],c=(0,z.CR)(Array.isArray(l)?l:[l,null],2),u=c[0],h=c[1],d=s(u,A);d.__data__=u,h!==null&&(d.__fromElements__=h),this._parent.appendChild(d),o.push(d)}return new e(o,null,this._parent,this._document)}for(var A=0;A<this._elements.length;A++){var f=this._elements[A],u=f.__data__,d=s(u,A);f.appendChild(d),o.push(d)}return new e(o,null,o[0],this._document)},r.prototype.maybeAppend=function(i,a){var s=(0,z.Q_)(this,t,"m",n).call(this,i[0]==="#"?i:"#".concat(i),a);return s.attr("id",i),s},r.prototype.maybeAppendByClassName=function(i,a){var s=i.toString(),o=(0,z.Q_)(this,t,"m",n).call(this,s[0]==="."?s:".".concat(s),a);return o.attr("className",s),o},r.prototype.maybeAppendByName=function(i,a){var s=(0,z.Q_)(this,t,"m",n).call(this,'[name="'.concat(i,'"]'),a);return s.attr("name",i),s},r.prototype.data=function(i,a,s){var o,A;a===void 0&&(a=function($){return $}),s===void 0&&(s=function(){return null});for(var l=[],c=[],u=new Set(this._elements),h=[],d=new Set,f=new Map(this._elements.map(function($,at){return[a($.__data__,at),$]})),g=new Map(this._facetElements.map(function($,at){return[a($.__data__,at),$]})),v=bR(this._elements,function($){return s($.__data__)}),m=0;m<i.length;m++){var w=i[m],C=a(w,m),F=s(w,m);if(f.has(C)){var Q=f.get(C);Q.__data__=w,Q.__facet__=!1,c.push(Q),u.delete(Q),f.delete(C)}else if(g.has(C)){var Q=g.get(C);Q.__data__=w,Q.__facet__=!0,c.push(Q),g.delete(C)}else if(v.has(C)){var D=v.get(C);h.push([w,D]);try{for(var K=(o=void 0,(0,z.XA)(D)),G=K.next();!G.done;G=K.next()){var Q=G.value;u.delete(Q)}}catch($){o={error:$}}finally{try{G&&!G.done&&(A=K.return)&&A.call(K)}finally{if(o)throw o.error}}v.delete(C)}else if(f.has(F)){var Q=f.get(F);Q.__toData__?Q.__toData__.push(w):Q.__toData__=[w],d.add(Q),u.delete(Q)}else l.push(w)}var J=[new e([],l,this._parent,this._document),new e(c,null,this._parent,this._document),new e(u,null,this._parent,this._document),new e([],h,this._parent,this._document),new e(d,null,this._parent,this._document)];return new e(this._elements,null,this._parent,this._document,J)},r.prototype.merge=function(i){var a=(0,z.ev)((0,z.ev)([],(0,z.CR)(this._elements),!1),(0,z.CR)(i._elements),!1),s=(0,z.ev)((0,z.ev)([],(0,z.CR)(this._transitions),!1),(0,z.CR)(i._transitions),!1);return new e(a,null,this._parent,this._document,void 0,s)},r.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=e.registry[i];return a?new a:xR("Unknown node type: ".concat(i))},r.prototype.join=function(i,a,s,o,A){i===void 0&&(i=function(f){return f}),a===void 0&&(a=function(f){return f}),s===void 0&&(s=function(f){return f.remove()}),o===void 0&&(o=function(f){return f}),A===void 0&&(A=function(f){return f.remove()});var l=i(this._enter),c=a(this._update),u=s(this._exit),h=o(this._merge),d=A(this._split);return c.merge(l).merge(u).merge(h).merge(d)},r.prototype.remove=function(){for(var i=function(o){var A=a._elements[o],l=a._transitions[o];l?l.then(function(){return A.remove()}):A.remove()},a=this,s=0;s<this._elements.length;s++)i(s);return new e([],null,this._parent,this._document,void 0,this._transitions)},r.prototype.each=function(i){for(var a=0;a<this._elements.length;a++){var s=this._elements[a],o=s.__data__;i.call(s,o,a)}return this},r.prototype.attr=function(i,a){var s=typeof a!="function"?function(){return a}:a;return this.each(function(o,A){a!==void 0&&(this[i]=s.call(this,o,A))})},r.prototype.style=function(i,a,s){s===void 0&&(s=!0);var o=typeof a!="function"||!s?function(){return a}:a;return this.each(function(A,l){a!==void 0&&(this.style[i]=o.call(this,A,l))})},r.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(s,o){var A=this;Object.entries(i).forEach(function(l){var c=(0,z.CR)(l,2),u=c[0],h=c[1],d=typeof h!="function"||!a?function(){return h}:h;h!==void 0&&A.attr(u,d.call(A,s,o))})})},r.prototype.update=function(i,a){a===void 0&&(a=!0);var s=typeof i!="function"||!a?function(){return i}:i;return this.each(function(o,A){i&&this.update&&this.update(s.call(this,o,A))})},r.prototype.maybeUpdate=function(i,a){a===void 0&&(a=!0);var s=typeof i!="function"||!a?function(){return i}:i;return this.each(function(o,A){i&&this.update&&this.update(s.call(this,o,A))})},r.prototype.transition=function(i){var a=this._transitions,s=new Array(this._elements.length);return this.each(function(o,A){s[A]=i.call(this,o,A)}),this._transitions=BR(s),this},r.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},r.prototype.call=function(i){for(var a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];return i.call.apply(i,(0,z.ev)([this._parent,this],(0,z.CR)(a),!1)),this},r.prototype.node=function(){return this._elements[0]},r.prototype.nodes=function(){return this._elements},r.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},r.prototype.parent=function(){return this._parent};var t,e,n;return e=r,t=new WeakSet,n=function(a,s){var o=this._elements[0],A=o.querySelector(a);if(A)return new e([A],null,this._parent,this._document);var l=typeof s=="string"?this.createElement(s):s();return o.appendChild(l),new e([l],null,this._parent,this._document)},r.registry={g:oi,rect:xi,circle:Js,path:Pi,text:t1,ellipse:eh,image:nh,line:hl,polygon:dl,polyline:af,html:ul},r}();function Le(r){return new CR([r],null,r,r.ownerDocument)}function SR(r,t,e){return r.querySelector(t)?Le(r).select(t):Le(r).append(e)}var _i=function(){function r(t,e,n,i){t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=t,this.y=e,this.width=n,this.height=i}return Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),r.fromRect=function(t){return new r(t.x,t.y,t.width,t.height)},r.prototype.toJSON=function(){return{x:this.x,y:this.y,width:this.width,height:this.height,top:this.top,right:this.right,bottom:this.bottom,left:this.left}},r.prototype.isPointIn=function(t,e){return t>=this.left&&t<=this.right&&e>=this.top&&e<=this.bottom},r}();function KG(r){var t=r.getRenderBounds(),e=__read(t.min,2),n=e[0],i=e[1],a=__read(t.max,2),s=a[0],o=a[1],A=s-n,l=o-i;return new _i(n,i,A,l)}var Fs=function(r,t){var e=function(i){return"".concat(t,"-").concat(i)},n=Object.fromEntries(Object.entries(r).map(function(i){var a=(0,z.CR)(i,2),s=a[0],o=a[1],A=e(o);return[s,{name:A,class:".".concat(A),id:"#".concat(A),toString:function(){return A}}]}));return Object.assign(n,{prefix:e}),n};function h0(r){return/\S+-\S+/g.test(r)?r.split("-").map(function(t){return t[0]}):r.length>2?[r[0]]:r.split("")}function Ti(r){if(ye(r))return[r,r,r,r];if(Ni(r)){var t=r.length;if(t===1)return[r[0],r[0],r[0],r[0]];if(t===2)return[r[0],r[1],r[0],r[1]];if(t===3)return[r[0],r[1],r[2],r[1]];if(t===4)return r}return[0,0,0,0]}function fa(r,t,e,n,i){return n===void 0&&(n=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),r?e(t):(n&&i(t),null)}function Hi(r,t,e){return e?"".concat(r," ").concat(e,"legend-").concat(t):r}function zG(r,t,e){var n=r.classNamePrefix,i=n===void 0?"":n;return Hi(t.name,e,i)}var na={title:"title",item:"item",marker:"marker",label:"label",value:"value",focusIcon:"focus-icon",background:"background",ribbon:"ribbon",track:"track",selection:"selection",handle:"handle",handleMarker:"handle-marker",handleLabel:"handle-label",indicator:"indicator",prevBtn:"prev-btn",nextBtn:"next-btn",pageInfo:"page-info"},e1=Fs({text:"text"},"title");function MR(r,t){var e=r.attributes,n=e.position,i=e.spacing,a=e.inset,s=e.text,o=r.getBBox(),A=t.getBBox(),l=h0(n),c=(0,z.CR)(Ti(s?i:0),4),u=c[0],h=c[1],d=c[2],f=c[3],g=(0,z.CR)(Ti(a),4),v=g[0],m=g[1],w=g[2],C=g[3],F=(0,z.CR)([f+h,u+d],2),Q=F[0],D=F[1],K=(0,z.CR)([C+m,v+w],2),G=K[0],J=K[1];if(l[0]==="l")return new _i(o.x,o.y,A.width+o.width+Q+G,Math.max(A.height+J,o.height));if(l[0]==="t")return new _i(o.x,o.y,Math.max(A.width+G,o.width),A.height+o.height+D+J);var $=(0,z.CR)([t.attributes.width||A.width,t.attributes.height||A.height],2),at=$[0],At=$[1];return new _i(A.x,A.y,at+o.width+Q+G,At+o.height+D+J)}function TR(r,t){var e=Object.entries(t).reduce(function(n,i){var a=(0,z.CR)(i,2),s=a[0],o=a[1],A=r.node().attr(s);return A||(n[s]=o),n},{});r.styles(e)}function FR(r){var t,e,n,i,a=r,s=a.width,o=a.height,A=a.position,l=(0,z.CR)([+s/2,+o/2],2),c=l[0],u=l[1],h=(0,z.CR)([+c,+u,"center","middle"],4),d=h[0],f=h[1],g=h[2],v=h[3],m=h0(A);return m.includes("l")&&(t=(0,z.CR)([0,"start"],2),d=t[0],g=t[1]),m.includes("r")&&(e=(0,z.CR)([+s,"end"],2),d=e[0],g=e[1]),m.includes("t")&&(n=(0,z.CR)([0,"top"],2),f=n[0],v=n[1]),m.includes("b")&&(i=(0,z.CR)([+o,"bottom"],2),f=i[0],v=i[1]),{x:d,y:f,textAlign:g,textBaseline:v}}var OR=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,e,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return t.prototype.getAvailableSpace=function(){var e=this,n=this.attributes,i=n.width,a=n.height,s=n.position,o=n.spacing,A=n.inset,l=e.querySelector(e1.text.class);if(!l)return new _i(0,0,+i,+a);var c=l.getBBox(),u=c.width,h=c.height,d=(0,z.CR)(Ti(o),4),f=d[0],g=d[1],v=d[2],m=d[3],w=(0,z.CR)([0,0,+i,+a],4),C=w[0],F=w[1],Q=w[2],D=w[3],K=h0(s);if(K.includes("i"))return new _i(C,F,Q,D);K.forEach(function(Rt,Pt){var xt,Ft,_t,Xt;Rt==="t"&&(xt=(0,z.CR)(Pt===0?[h+v,+a-h-v]:[0,+a],2),F=xt[0],D=xt[1]),Rt==="r"&&(Ft=(0,z.CR)([+i-u-m],1),Q=Ft[0]),Rt==="b"&&(_t=(0,z.CR)([+a-h-f],1),D=_t[0]),Rt==="l"&&(Xt=(0,z.CR)(Pt===0?[u+g,+i-u-g]:[0,+i],2),C=Xt[0],Q=Xt[1])});var G=(0,z.CR)(Ti(A),4),J=G[0],$=G[1],at=G[2],At=G[3],pt=(0,z.CR)([At+$,J+at],2),wt=pt[0],bt=pt[1];return new _i(C+At,F+J,Q-wt,D-bt)},t.prototype.getBBox=function(){return this.title?this.title.getBBox():new _i(0,0,0,0)},t.prototype.render=function(e,n){var i=this,a=e.width,s=e.height,o=e.position,A=e.spacing,l=e.classNamePrefix,c=(0,z._T)(e,["width","height","position","spacing","classNamePrefix"]),u=(0,z.CR)(Uo(c),1),h=u[0],d=FR(e),f=d.x,g=d.y,v=d.textAlign,m=d.textBaseline;fa(!!c.text,Le(n),function(w){var C=Hi(e1.text.name,na.title,l);i.title=w.maybeAppendByClassName(e1.text,"text").attr("className",C).styles(h).call(TR,{x:f,y:g,textAlign:v,textBaseline:m}).node()})},t}(Sr),n1=function(){};function ga(r,t){return Wt(r)?r.apply(void 0,(0,z.ev)([],(0,z.CR)(t),!1)):r}function IR(r,t){return r.reduce(function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e},{})}function LR(r){return typeof r=="boolean"?!1:"enter"in r&&"update"in r&&"exit"in r}function h2(r){if(!r)return{enter:!1,update:!1,exit:!1};var t=["enter","update","exit"],e=Object.fromEntries(Object.entries(r).filter(function(n){var i=(0,z.CR)(n,1),a=i[0];return!t.includes(a)}));return Object.fromEntries(t.map(function(n){return LR(r)?r[n]===!1?[n,!1]:[n,(0,z.pi)((0,z.pi)({},r[n]),e)]:[n,e]}))}function Wc(r,t){r?r.finished.then(t):t()}function NR(r,t){r.length===0?t():Promise.all(r.map(function(e){return e==null?void 0:e.finished})).then(t)}function d2(r,t){"update"in r?r.update(t):r.attr(t)}function f2(r,t,e){if(t.length===0)return null;if(!e){var n=t.slice(-1)[0];return d2(r,{style:n}),null}return r.animate(t,e)}function kR(r,t){return!(r.nodeName!=="text"||t.nodeName!=="text"||r.attributes.text!==t.attributes.text)}function QR(r,t,e,n){if(n===void 0&&(n="destroy"),kR(r,t))return r.remove(),[null];var i=function(){n==="destroy"?r.destroy():n==="hide"&&Ts(r),t.isVisible()&&Qh(t)};if(!e)return i(),[null];var a=e.duration,s=a===void 0?0:a,o=e.delay,A=o===void 0?0:o,l=Math.ceil(+s/2),c=+s/4,u=(0,z.CR)(r.getGeometryBounds().center,2),h=u[0],d=u[1],f=(0,z.CR)(t.getGeometryBounds().center,2),g=f[0],v=f[1],m=(0,z.CR)([(h+g)/2-h,(d+v)/2-d],2),w=m[0],C=m[1],F=r.style.opacity,Q=F===void 0?1:F,D=t.style.opacity,K=D===void 0?1:D,G=r.style.transform||"",J=t.style.transform||"",$=r.animate([{opacity:Q,transform:"translate(0, 0) ".concat(G)},{opacity:0,transform:"translate(".concat(w,", ").concat(C,") ").concat(G)}],(0,z.pi)((0,z.pi)({fill:"both"},e),{duration:A+l+c})),at=t.animate([{opacity:0,transform:"translate(".concat(-w,", ").concat(-C,") ").concat(J),offset:.01},{opacity:K,transform:"translate(0, 0) ".concat(J)}],(0,z.pi)((0,z.pi)({fill:"both"},e),{duration:l+c,delay:A+l-c}));return Wc(at,i),[$,at]}function Os(r,t,e){var n={},i={};return Object.entries(t).forEach(function(a){var s=(0,z.CR)(a,2),o=s[0],A=s[1];if(!Pe(A)){var l=r.style[o]||r.parsedStyle[o]||0;l!==A&&(n[o]=l,i[o]=A)}}),e?f2(r,[n,i],(0,z.pi)({fill:"both"},e)):(d2(r,i),null)}function UR(r){var t;return((t=r[0])===null||t===void 0?void 0:t.map(function(e,n){return r.map(function(i){return i[n]})}))||[]}function r1(r,t,e){e===void 0&&(e=!1);var n=r.getBBox(),i=n.width,a=n.height,s=t/Math.max(i,a);return e&&(r.style.transform="scale(".concat(s,")")),s}var g2=function(r,t,e){return[["M",r-e,t],["A",e,e,0,1,0,r+e,t],["A",e,e,0,1,0,r-e,t],["Z"]]},PR=g2,DR=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t-e],["L",r+e,t+e],["L",r-e,t+e],["Z"]]},RR=function(r,t,e){return[["M",r-e,t],["L",r,t-e],["L",r+e,t],["L",r,t+e],["Z"]]},_R=function(r,t,e){var n=e*Math.sin(.3333333333333333*Math.PI);return[["M",r-e,t+n],["L",r,t-n],["L",r+e,t+n],["Z"]]},HR=function(r,t,e){var n=e*Math.sin(.3333333333333333*Math.PI);return[["M",r-e,t-n],["L",r+e,t-n],["L",r,t+n],["Z"]]},GR=function(r,t,e){var n=e/2*Math.sqrt(3);return[["M",r,t-e],["L",r+n,t-e/2],["L",r+n,t+e/2],["L",r,t+e],["L",r-n,t+e/2],["L",r-n,t-e/2],["Z"]]},KR=function(r,t,e){var n=e-1.5;return[["M",r-e,t-n],["L",r+e,t+n],["L",r+e,t-n],["L",r-e,t+n],["Z"]]},v2=function(r,t,e){return[["M",r,t+e],["L",r,t-e]]},zR=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t+e],["M",r+e,t-e],["L",r-e,t+e]]},VR=function(r,t,e){return[["M",r-e/2,t-e],["L",r+e/2,t-e],["M",r,t-e],["L",r,t+e],["M",r-e/2,t+e],["L",r+e/2,t+e]]},WR=function(r,t,e){return[["M",r-e,t],["L",r+e,t],["M",r,t-e],["L",r,t+e]]},ZR=function(r,t,e){return[["M",r-e,t],["L",r+e,t]]},p2=function(r,t,e){return[["M",r-e,t],["L",r+e,t]]},jR=p2,YR=function(r,t,e){return[["M",r-e,t],["A",e/2,e/2,0,1,1,r,t],["A",e/2,e/2,0,1,0,r+e,t]]},XR=function(r,t,e){return[["M",r-e-1,t-2.5],["L",r,t-2.5],["L",r,t+2.5],["L",r+e+1,t+2.5]]},JR=function(r,t,e){return[["M",r-e-1,t+2.5],["L",r,t+2.5],["L",r,t-2.5],["L",r+e+1,t-2.5]]},qR=function(r,t,e){return[["M",r-(e+1),t+2.5],["L",r-e/2,t+2.5],["L",r-e/2,t-2.5],["L",r+e/2,t-2.5],["L",r+e/2,t+2.5],["L",r+e+1,t+2.5]]};function $R(r,t){return[["M",r-5,t+2.5],["L",r-5,t],["L",r,t],["L",r,t-3],["L",r,t+3],["L",r+6.5,t+3]]}var t_=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t],["L",r-e,t+e],["Z"]]},e_=function(r,t,e){var n=e,i=e*.2,a=e*.7;return[["M",r-n,t],["A",n,n,0,1,0,r+n,t],["A",n,n,0,1,0,r-n,t],["Z"],["M",r-a,t],["L",r-i,t],["M",r+i,t],["L",r+a,t],["M",r,t-a],["L",r,t-i],["M",r,t+i],["L",r,t+a]]},ra=Fs({prevBtnGroup:"prev-btn-group",prevBtn:"prev-btn",nextBtnGroup:"next-btn-group",nextBtn:"next-btn",pageInfoGroup:"page-info-group",pageInfo:"page-info",playWindow:"play-window",contentGroup:"content-group",controller:"controller",clipPath:"clip-path"},"navigator"),n_=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,e,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:t_(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(i,a){return"".concat(i,"/").concat(a)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return n.playState="idle",n.contentGroup=n.appendChild(new oi({class:ra.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new oi({class:ra.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return Object.defineProperty(t.prototype,"defaultPage",{get:function(){var e=this.attributes.defaultPage;return hr(e,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageShape",{get:function(){var e=this.pageViews,n=(0,z.CR)(UR(e.map(function(u){var h=u.getBBox(),d=h.width,f=h.height;return[d,f]})).map(function(u){return Math.max.apply(Math,(0,z.ev)([],(0,z.CR)(u),!1))}),2),i=n[0],a=n[1],s=this.attributes,o=s.pageWidth,A=o===void 0?i:o,l=s.pageHeight,c=l===void 0?a:l;return{pageWidth:A,pageHeight:c}},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(t.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var e=r.prototype.getBBox.call(this),n=e.x,i=e.y,a=this.controllerShape,s=this.pageShape,o=s.pageWidth,A=s.pageHeight;return new _i(n,i,o+a.width,A)},t.prototype.goTo=function(e){var n=this,i=this.attributes.animate,a=this,s=a.currPage,o=a.playState,A=a.playWindow,l=a.pageViews;if(o!=="idle"||e<0||l.length<=0||e>=l.length)return null;l[s].setLocalPosition(0,0),this.prepareFollowingPage(e);var c=(0,z.CR)(this.getFollowingPageDiff(e),2),u=c[0],h=c[1];this.playState="running";var d=f2(A,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-u,", ").concat(-h,")")}],i);return Wc(d,function(){n.innerCurrPage=e,n.playState="idle",n.setVisiblePages([e]),n.updatePageInfo()}),d},t.prototype.prev=function(){var e=this.attributes.loop,n=this.pageViews.length,i=this.currPage;if(!e&&i<=0)return null;var a=e?(i-1+n)%n:hr(i-1,0,n);return this.goTo(a)},t.prototype.next=function(){var e=this.attributes.loop,n=this.pageViews.length,i=this.currPage;if(!e&&i>=n-1)return null;var a=e?(i+1)%n:hr(i+1,0,n);return this.goTo(a)},t.prototype.renderClipPath=function(e){var n=this.pageShape,i=n.pageWidth,a=n.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=e.maybeAppendByClassName(ra.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},t.prototype.setVisiblePages=function(e){this.playWindow.children.forEach(function(n,i){e.includes(i)?Qh(n):Ts(n)})},t.prototype.adjustControllerLayout=function(){var e=this,n=e.prevBtnGroup,i=e.nextBtnGroup,a=e.pageInfoGroup,s=this.attributes,o=s.orientation,A=s.controllerPadding,l=a.getBBox(),c=l.width,u=l.height,h=(0,z.CR)(o==="horizontal"?[-180,0]:[-90,90],2),d=h[0],f=h[1];n.setLocalEulerAngles(d),i.setLocalEulerAngles(f);var g=n.getBBox(),v=g.width,m=g.height,w=i.getBBox(),C=w.width,F=w.height,Q=Math.max(v,c,C),D=o==="horizontal"?{offset:[[0,0],[v/2+A,0],[v+c+A*2,0]],textAlign:"start"}:{offset:[[Q/2,-m-A],[Q/2,0],[Q/2,F+A]],textAlign:"center"},K=(0,z.CR)(D.offset,3),G=(0,z.CR)(K[0],2),J=G[0],$=G[1],at=(0,z.CR)(K[1],2),At=at[0],pt=at[1],wt=(0,z.CR)(K[2],2),bt=wt[0],Rt=wt[1],Pt=D.textAlign,xt=a.querySelector("text");xt&&(xt.style.textAlign=Pt),n.setLocalPosition(J,$),a.setLocalPosition(At,pt),i.setLocalPosition(bt,Rt)},t.prototype.updatePageInfo=function(){var e,n=this,i=n.currPage,a=n.pageViews,s=n.attributes.formatter;a.length<2||((e=this.pageInfoGroup.querySelector(ra.pageInfo.class))===null||e===void 0||e.attr("text",s(i+1,a.length)),this.adjustControllerLayout())},t.prototype.getFollowingPageDiff=function(e){var n=this.currPage;if(n===e)return[0,0];var i=this.attributes.orientation,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,A=e<n?-1:1;return i==="horizontal"?[A*s,0]:[0,A*o]},t.prototype.prepareFollowingPage=function(e){var n=this,i=n.currPage,a=n.pageViews;if(this.setVisiblePages([e,i]),e!==i){var s=(0,z.CR)(this.getFollowingPageDiff(e),2),o=s[0],A=s[1];a[e].setLocalPosition(o,A)}},t.prototype.renderController=function(e){var n=this,i=this.attributes,a=i.controllerSpacing,s=i.classNamePrefix,o=s===void 0?"":s,A=this.pageShape,l=A.pageWidth,c=A.pageHeight,u=this.pageViews.length>=2,h=e.maybeAppendByClassName(ra.controller,"g");if(c0(h.node(),u),!!u){var d=en(this.attributes,"button"),f=en(this.attributes,"pageNum"),g=(0,z.CR)(Uo(d),2),v=g[0],m=g[1],w=v.size,C=(0,z._T)(v,["size"]),F=!h.select(ra.prevBtnGroup.class).node(),Q=h.maybeAppendByClassName(ra.prevBtnGroup,"g").styles(m);this.prevBtnGroup=Q.node();var D=Q.maybeAppendByClassName(ra.prevBtn,"path");if(o){var K=Hi(ra.prevBtn.name,na.prevBtn,o);D.node().setAttribute("class",K)}var G=h.maybeAppendByClassName(ra.nextBtnGroup,"g").styles(m);this.nextBtnGroup=G.node();var J=G.maybeAppendByClassName(ra.nextBtn,"path");if(o){var $=Hi(ra.nextBtn.name,na.nextBtn,o);J.node().setAttribute("class",$)}[D,J].forEach(function(wt){wt.styles((0,z.pi)((0,z.pi)({},C),{transformOrigin:"center"})),r1(wt.node(),w,!0)});var at=h.maybeAppendByClassName(ra.pageInfoGroup,"g");this.pageInfoGroup=at.node();var At=at.maybeAppendByClassName(ra.pageInfo,"text");if(At.styles(f),o){var pt=Hi(ra.pageInfo.name,na.pageInfo,o);At.node().setAttribute("class",pt)}this.updatePageInfo(),h.node().setLocalPosition(l+a,c/2),F&&(this.prevBtnGroup.addEventListener("click",function(){n.prev()}),this.nextBtnGroup.addEventListener("click",function(){n.next()}))}},t.prototype.render=function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s;this.attr("transform","translate(".concat(a,", ").concat(o,")"));var A=Le(n);this.renderClipPath(A),this.renderController(A),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},t.prototype.bindEvents=function(){var e=this,n=Mh(function(){return e.render(e.attributes,e)},50);this.playWindow.addEventListener(yn.INSERTED,n),this.playWindow.addEventListener(yn.REMOVED,n)},t}(Sr);function r_(r){var t="default";if(Br(r)&&r instanceof Image)t="image";else if(Wt(r))t="symbol";else if(gn(r)){var e=new RegExp("data:(image|text)");r.match(e)?t="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(r)?t="url":t="symbol"}return t}function i_(r){var t=r_(r);return["base64","url","image"].includes(t)?"image":r&&t==="symbol"?"path":null}var zn=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n){var i=e.x,a=i===void 0?0:i,s=e.y,o=s===void 0?0:s,A=this.getSubShapeStyle(e),l=A.symbol,c=A.size,u=c===void 0?16:c,h=(0,z._T)(A,["symbol","size"]),d=i_(l);fa(!!d,Le(n),function(f){f.maybeAppendByClassName("marker",d).attr("className","marker ".concat(d,"-marker")).call(function(g){if(d==="image"){var v=u*2;g.styles({img:l,width:v,height:v,x:a-u,y:o-u})}else{var v=u/2,m=Wt(l)?l:t.getSymbol(l);g.styles((0,z.pi)({d:m==null?void 0:m(a,o,v)},h))}})})},t.MARKER_SYMBOL_MAP=new Map,t.registerSymbol=function(e,n){t.MARKER_SYMBOL_MAP.set(e,n)},t.getSymbol=function(e){return t.MARKER_SYMBOL_MAP.get(e)},t.getSymbols=function(){return Array.from(t.MARKER_SYMBOL_MAP.keys())},t}(Sr);zn.registerSymbol("cross",zR),zn.registerSymbol("hyphen",ZR),zn.registerSymbol("line",v2),zn.registerSymbol("plus",WR),zn.registerSymbol("tick",VR),zn.registerSymbol("circle",g2),zn.registerSymbol("point",PR),zn.registerSymbol("bowtie",KR),zn.registerSymbol("hexagon",GR),zn.registerSymbol("square",DR),zn.registerSymbol("diamond",RR),zn.registerSymbol("triangle",_R),zn.registerSymbol("triangle-down",HR),zn.registerSymbol("line",v2),zn.registerSymbol("dot",p2),zn.registerSymbol("dash",jR),zn.registerSymbol("smooth",YR),zn.registerSymbol("hv",XR),zn.registerSymbol("vh",JR),zn.registerSymbol("hvh",qR),zn.registerSymbol("vhv",$R),zn.registerSymbol("focus",e_);function VG(r,t,e){var n=Math.round((r-e)/t);return e+n*t}function a_(r,t,e){var n=1.4,i=n*e;return[["M",r-e,t-i],["L",r+e,t-i],["L",r+e,t+i],["L",r-e,t+i],["Z"]]}var m2=1.4,y2=.4;function s_(r,t,e){var n=e,i=n*m2,a=n/2,s=n/6,o=r+i*y2;return[["M",r,t],["L",o,t+a],["L",r+i,t+a],["L",r+i,t-a],["L",o,t-a],["Z"],["M",o,t+s],["L",r+i-2,t+s],["M",o,t-s],["L",r+i-2,t-s]]}function o_(r,t,e){var n=e,i=n*m2,a=n/2,s=n/6,o=t+i*y2;return[["M",r,t],["L",r-a,o],["L",r-a,t+i],["L",r+a,t+i],["L",r+a,o],["Z"],["M",r-s,o],["L",r-s,t+i-2],["M",r+s,o],["L",r+s,t+i-2]]}zn.registerSymbol("hiddenHandle",a_),zn.registerSymbol("verticalHandle",s_),zn.registerSymbol("horizontalHandle",o_);var WG=function(r,t,e){return r===void 0&&(r="horizontal"),r==="horizontal"?t:e};function ZG(r,t,e,n){var i;n===void 0&&(n=4);var a=__read(r,2),s=a[0],o=a[1],A=__read(t,2),l=A[0],c=A[1],u=__read(e,2),h=u[0],d=u[1],f=__read([l,c],2),g=f[0],v=f[1],m=v-g;return g>v&&(i=__read([v,g],2),g=i[0],v=i[1]),m>o-s?[s,o]:g<s?h===s&&d===v?[s,v]:[s,m+s]:v>o?d===o&&h===g?[g,o]:[o-m,o]:[g,v]}function i1(r,t,e){return r===void 0&&(r="horizontal"),r==="horizontal"?t:e}function jG(r){var t=r&&r.getRenderBounds();if(!t)return{width:0,height:0};var e=t.getMax(),n=t.getMin();return{width:e[0]-n[0],height:e[1]-n[1]}}function w2(r){var t=r.getLocalBounds(),e=t.min,n=t.max,i=(0,z.CR)([e,n],2),a=(0,z.CR)(i[0],2),s=a[0],o=a[1],A=(0,z.CR)(i[1],2),l=A[0],c=A[1];return{x:s,y:o,width:l-s,height:c-o,left:s,bottom:c,top:o,right:l}}function YG(r,t){var e=select(r).append("text").node();return e.attr(__assign(__assign({},t),{visibility:"hidden"})),e}function A_(r,t){var e=(0,z.CR)(r,2),n=e[0],i=e[1],a=(0,z.CR)(t,2),s=a[0],o=a[1];return n!==s&&i===o}function XG(r,t){var e=__read(r,2),n=e[0],i=e[1],a=__read(t,2),s=a[0],o=a[1];return n===s&&i!==o}function l_(r,t){var e,n,i=t.attributes;try{for(var a=(0,z.XA)(Object.entries(i)),s=a.next();!s.done;s=a.next()){var o=(0,z.CR)(s.value,2),A=o[0],l=o[1];A!=="id"&&A!=="className"&&r.attr(A,l)}}catch(c){e={error:c}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(e)throw e.error}}}function Po(r){return typeof r=="function"?r():gn(r)||ye(r)?new t1({style:{text:String(r)}}):r}function c_(r,t){return typeof r=="function"?r():gn(r)||ye(r)?new ul({style:(0,z.pi)((0,z.pi)({pointerEvents:"auto"},t),{innerHTML:r})}):r}var d0,a1;function JG(r){a1=r}var u_=Gy(function(r,t){var e=t.fontSize,n=t.fontFamily,i=t.fontWeight,a=t.fontStyle,s=t.fontVariant;return a1?a1(r,e):(d0||(d0=ae.offscreenCanvasCreator.getOrCreateContext(void 0)),d0.font=[a,s,i,"".concat(e,"px"),n].join(" "),d0.measureText(r).width)},function(r,t){return[r,Object.values(t||E2(r)).join()].join("")},4096),E2=function(r){var t=r.style.fontFamily||"sans-serif",e=r.style.fontWeight||"normal",n=r.style.fontStyle||"normal",i=r.style.fontVariant,a=r.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:t,fontWeight:e,fontStyle:n,fontVariant:i}};function B2(r){return r.nodeName==="text"?r:r.nodeName==="g"&&r.children.length===1&&r.children[0].nodeName==="text"?r.children[0]:null}function b2(r,t){var e=B2(r);e&&e.attr(t)}function s1(r,t,e){e===void 0&&(e="..."),b2(r,{wordWrap:!0,wordWrapWidth:t,maxLines:1,textOverflow:e})}function o1(r,t){for(var e in t)t.hasOwnProperty(e)&&e!=="constructor"&&t[e]!==void 0&&(r[e]=t[e])}function h_(r,t,e,n){return t&&o1(r,t),e&&o1(r,e),n&&o1(r,n),r}function d_(r){return r instanceof Element||r instanceof Document}var vn,f_="component-poptip",ln={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},x2=(vn={},vn[".".concat(ln.CONTAINER)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},vn[".".concat(ln.TEXT)]={"text-align":"center"},vn[".".concat(ln.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, -100%)"},vn[".".concat(ln.CONTAINER,"[data-position='left']")]={transform:"translate(-100%, -50%)"},vn[".".concat(ln.CONTAINER,"[data-position='right']")]={transform:"translate(0, -50%)"},vn[".".concat(ln.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},vn[".".concat(ln.CONTAINER,"[data-position='top-left']")]={transform:"translate(0,-100%)"},vn[".".concat(ln.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},vn[".".concat(ln.CONTAINER,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},vn[".".concat(ln.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},vn[".".concat(ln.CONTAINER,"[data-position='right-top']")]={transform:"translate(0, 0)"},vn[".".concat(ln.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},vn[".".concat(ln.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},vn[".".concat(ln.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},vn[".".concat(ln.ARROW)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},vn[".".concat(ln.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},vn["[data-position='top'] .".concat(ln.ARROW)]={bottom:"-2px"},vn[".".concat(ln.CONTAINER,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},vn["[data-position='left'] .".concat(ln.ARROW)]={right:"-2px"},vn[".".concat(ln.CONTAINER,"[data-position='right']")]={transform:"translate(5px, -50%)"},vn["[data-position='right'] .".concat(ln.ARROW)]={left:"-2px"},vn[".".concat(ln.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},vn["[data-position='bottom'] .".concat(ln.ARROW)]={top:"-2px"},vn[".".concat(ln.CONTAINER,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},vn["[data-position='top-left'] .".concat(ln.ARROW)]={left:"10px",bottom:"-2px"},vn[".".concat(ln.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},vn["[data-position='top-right'] .".concat(ln.ARROW)]={right:"10px",bottom:"-2px"},vn[".".concat(ln.CONTAINER,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},vn["[data-position='left-top'] .".concat(ln.ARROW)]={right:"-2px",top:"8px"},vn[".".concat(ln.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},vn["[data-position='left-bottom'] .".concat(ln.ARROW)]={right:"-2px",bottom:"8px"},vn[".".concat(ln.CONTAINER,"[data-position='right-top']")]={transform:"translate(5px, 0)"},vn["[data-position='right-top'] .".concat(ln.ARROW)]={left:"-2px",top:"8px"},vn[".".concat(ln.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},vn["[data-position='right-bottom'] .".concat(ln.ARROW)]={left:"-2px",bottom:"8px"},vn[".".concat(ln.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},vn["[data-position='bottom-left'] .".concat(ln.ARROW)]={top:"-2px",left:"8px"},vn[".".concat(ln.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},vn["[data-position='bottom-right'] .".concat(ln.ARROW)]={top:"-2px",right:"8px"},vn),g_=void 0;function v_(r,t,e,n,i,a){if(i===void 0&&(i=!1),a===void 0&&(a=!1),a)return[r,t];var s=e.getBoundingClientRect(),o=s.x,A=s.y,l=s.width,c=s.height;switch(n){case"top":return i?[o+l/2,A]:[r,A];case"left":return i?[o,A+c/2]:[o,t];case"bottom":return i?[o+l/2,A+c]:[r,A+c];case"right":return i?[o+l,A+c/2]:[o+l,t];case"top-right":case"right-top":return[o+l,A];case"left-bottom":case"bottom-left":return[o,A+c];case"right-bottom":case"bottom-right":return[o+l,A+c];case"top-left":case"left-top":default:return[o,A]}}var p_=function(r){var t;return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t||(t=r.apply(g_,e)),t}};function m_(r){var t=r&&document.getElementById(r);return t||(t=document.createElement("div"),t.setAttribute("id",r),document.body.appendChild(t)),t}function y_(r){var t=p_(m_)(r);return t}var w_=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Ci({style:{id:f_}},t.defaultOptions,e))||this;return n.visibility="visible",n.map=new Map,n.domStyles="",n.initShape(),n.render(n.attributes,n),n}return Object.defineProperty(t.prototype,"visible",{get:function(){return this.visibility==="visible"},enumerable:!1,configurable:!0}),t.prototype.render=function(e,n){this.visibility=this.style.visibility,this.updatePoptipElement()},t.prototype.update=function(e){this.attr(Ci({},this.style,e)),this.render(this.attributes,this)},t.prototype.bind=function(e,n){var i=this;if(e){var a=this.style.text,s=function(A){var l=e,c=i.style,u=a;if(n){var h=typeof n=="function"?n.call(null,A):n,d=h.html,f=h.target,g=(0,z._T)(h,["html","target"]);c=h_({},i.style,g),(f||f===!1)&&(l=f),typeof d=="string"&&(u=d)}var v=c.position,m=c.arrowPointAtCenter,w=c.follow,C=c.offset;if(l){var F=A,Q=F.clientX,D=F.clientY,K=(0,z.CR)(v_(Q,D,l,v,m,w),2),G=K[0],J=K[1];i.showTip(G,J,{text:u,position:v,offset:C})}else i.hideTip()},o=function(){i.hideTip()};e.addEventListener("mousemove",s),e.addEventListener("mouseleave",o),this.map.set(e,[s,o])}},t.prototype.unbind=function(e){if(this.map.has(e)){var n=(0,z.CR)(this.map.get(e)||[],2),i=n[0],a=n[1];i&&e.removeEventListener("mousemove",i),a&&e.removeEventListener("mouseleave",a),this.map.delete(e)}},t.prototype.clear=function(){this.container.innerHTML=""},t.prototype.destroy=function(){var e=this,n;(0,z.ev)([],(0,z.CR)(this.map.keys()),!1).forEach(function(i){return e.unbind(i)}),(n=this.container)===null||n===void 0||n.remove(),r.prototype.destroy.call(this)},t.prototype.showTip=function(e,n,i){var a=Mi(i,"text");if(!(a&&typeof a!="string")&&(this.applyStyles(),e&&n&&i)){var s=i.offset,o=i.position;if(o&&this.container.setAttribute("data-position",o),this.setOffsetPosition(e,n,s),typeof a=="string"){var A=this.container.querySelector(".".concat(ln.TEXT));A&&(A.innerHTML=a)}this.visibility="visible",this.container.style.visibility="visible"}},t.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},t.prototype.getContainer=function(){return this.container},t.prototype.getClassName=function(){var e=this.style.containerClassName;return"".concat(ln.CONTAINER).concat(e?" ".concat(e):"")},t.prototype.initShape=function(){var e=this,n=this.style.id;this.container=y_(n),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return e.showTip()}),this.container.addEventListener("mouseleave",function(){return e.hideTip()})},t.prototype.updatePoptipElement=function(){var e=this.container;this.clear();var n=this.style,i=n.id,a=n.template,s=n.text;this.container.setAttribute("id",i),this.container.className=this.getClassName();var o='<span class="'.concat(ln.ARROW,'"></span>');e.innerHTML=o,gn(a)?e.innerHTML+=a:a&&d_(a)&&e.appendChild(a),s&&(e.getElementsByClassName(ln.TEXT)[0].textContent=s),this.applyStyles(),this.container.style.visibility=this.visibility},t.prototype.applyStyles=function(){var e=Zr({},x2,this.style.domStyles),n=Object.entries(e).reduce(function(a,s){var o=(0,z.CR)(s,2),A=o[0],l=o[1],c=Object.entries(l).reduce(function(u,h){var d=(0,z.CR)(h,2),f=d[0],g=d[1];return"".concat(u).concat(f,": ").concat(g,";")},"");return"".concat(a).concat(A,"{").concat(c,"}")},"");if(this.domStyles!==n){this.domStyles=n;var i=this.container.querySelector("style");i&&this.container.removeChild(i),i=document.createElement("style"),i.innerHTML=n,this.container.appendChild(i)}},t.prototype.setOffsetPosition=function(e,n,i){i===void 0&&(i=this.style.offset);var a=(0,z.CR)(i,2),s=a[0],o=s===void 0?0:s,A=a[1],l=A===void 0?0:A;this.container.style.left="".concat(e+o,"px"),this.container.style.top="".concat(n+l,"px")},t.tag="poptip",t.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:x2,template:'<div class="'.concat(ln.TEXT,'"></div>')}},t}(Sr),jr=Fs({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),E_={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};function B_(r){var t=r.querySelector(jr.marker.class);return t?t.style:{}}var b_=function(r){(0,z.ZT)(t,r);function t(e,n){var i=r.call(this,e,{span:[1,1],marker:function(){return new Js({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return i.keyFields={},i.keyFields=n||{},i}return Object.defineProperty(t.prototype,"showValue",{get:function(){var e=this.attributes.valueText;return e?typeof e=="string"||typeof e=="number"?e!=="":typeof e=="function"?!0:e.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"actualSpace",{get:function(){var e=this.labelGroup,n=this.valueGroup,i=this.attributes,a=i.markerSize,s=i.focus,o=i.focusMarkerSize,A=e.node().getBBox(),l=A.width,c=A.height,u=n.node().getBBox(),h=u.width,d=u.height,f=s?o!=null?o:12:0;return{markerWidth:a,labelWidth:l,valueWidth:h,focusWidth:f,height:Math.max(a,c,d)}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"span",{get:function(){var e=this.attributes.span;if(!e)return[1,1];var n=(0,z.CR)(Ti(e),2),i=n[0],a=n[1],s=this.showValue?a:0,o=i+s;return[i/o,s/o]},enumerable:!1,configurable:!0}),t.prototype.setAttribute=function(e,n){r.prototype.setAttribute.call(this,e,n)},Object.defineProperty(t.prototype,"shape",{get:function(){var e,n=this.attributes,i=n.markerSize,a=n.width,s=this.actualSpace,o=s.markerWidth,A=s.focusWidth,l=s.height,c=this.actualSpace,u=c.labelWidth,h=c.valueWidth,d=(0,z.CR)(this.spacing,3),f=d[0],g=d[1],v=d[2];if(a){var m=a-i-f-g-A-v,w=(0,z.CR)(this.span,2),C=w[0],F=w[1];e=(0,z.CR)([C*m,F*m],2),u=e[0],h=e[1]}var Q=o+u+h+f+g+A+v;return{width:Q,height:l,markerWidth:o,labelWidth:u,valueWidth:h,focusWidth:A}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"spacing",{get:function(){var e=this.attributes,n=e.spacing,i=e.focus;if(!n)return[0,0,0];var a=(0,z.CR)(Ti(n),3),s=a[0],o=a[1],A=a[2];return[s,this.showValue?o:0,i?A:0]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"layout",{get:function(){var e=this.shape,n=e.markerWidth,i=e.labelWidth,a=e.valueWidth,s=e.focusWidth,o=e.width,A=e.height,l=(0,z.CR)(this.spacing,3),c=l[0],u=l[1],h=l[2];return{height:A,width:o,markerWidth:n,labelWidth:i,valueWidth:a,focusWidth:s,position:[n/2,n+c,n+i+c+u,n+i+a+c+u+h+s/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scaleSize",{get:function(){var e=B_(this.markerGroup.node()),n=this.attributes,i=n.markerSize,a=n.markerStrokeWidth,s=a===void 0?e.strokeWidth:a,o=n.markerLineWidth,A=o===void 0?e.lineWidth:o,l=n.markerStroke,c=l===void 0?e.stroke:l,u=+(s||A||(c?1:0))*Math.sqrt(2),h=this.markerGroup.node().getBBox(),d=h.width,f=h.height;return(1-u/Math.max(d,f))*i},enumerable:!1,configurable:!0}),t.prototype.renderMarker=function(e){var n=this,i=this.attributes,a=i.marker,s=i.classNamePrefix,o=en(this.attributes,"marker");this.markerGroup=e.maybeAppendByClassName(jr.markerGroup,"g").style("zIndex",0),fa(!!a,this.markerGroup,function(){var A,l=n.markerGroup.node(),c=(A=l.childNodes)===null||A===void 0?void 0:A[0],u=Hi(jr.marker.name,na.marker,s),h=typeof a=="string"?new zn({style:{symbol:a},className:u}):a();if(c)if(h.nodeName===c.nodeName)c instanceof zn?c.update((0,z.pi)((0,z.pi)({},o),{symbol:a})):(l_(c,h),Le(c).styles(o));else{if(c.remove(),!(h instanceof zn)){var f=Hi(jr.marker.name,na.marker,s);h.className=f}Le(h).styles(o),l.appendChild(h)}else{if(!(h instanceof zn)){var d=Hi(jr.marker.name,na.marker,s);h.className=d,Le(h).styles(o)}l.appendChild(h)}n.markerGroup.node().scale(1/n.markerGroup.node().getScale()[0]);var g=r1(n.markerGroup.node(),n.scaleSize,!0);n.markerGroup.node().style._transform="scale(".concat(g,")")})},t.prototype.renderLabel=function(e){var n=en(this.attributes,"label"),i=n.text,a=(0,z._T)(n,["text"]),s=this.attributes.classNamePrefix;this.labelGroup=e.maybeAppendByClassName(jr.labelGroup,"g").style("zIndex",0);var o=Hi(jr.label.name,na.label,s),A=this.labelGroup.maybeAppendByClassName(jr.label,function(){return Po(i)});A.node().setAttribute("class",o),A.styles(a)},t.prototype.renderValue=function(e){var n=this,i=en(this.attributes,"value"),a=i.text,s=(0,z._T)(i,["text"]),o=this.attributes.classNamePrefix;this.valueGroup=e.maybeAppendByClassName(jr.valueGroup,"g").style("zIndex",0),fa(this.showValue,this.valueGroup,function(){var A=Hi(jr.value.name,na.value,o),l=n.valueGroup.maybeAppendByClassName(jr.value,function(){return Po(a)});l.node().setAttribute("class",A),l.styles(s)})},t.prototype.createPoptip=function(){var e=this.attributes.poptip,n=e||{},i=n.render,a=(0,z._T)(n,["render"]),s=new w_({style:Zr(E_,a)});return this.poptipGroup=s,s},t.prototype.bindPoptip=function(e){var n=this,i=this.attributes.poptip;if(i){var a=this.poptipGroup||this.createPoptip();a.bind(e,function(){var s=n.attributes,o=s.labelText,A=s.valueText,l=s.markerFill,c=typeof o=="string"?o:o==null?void 0:o.attr("text"),u=typeof A=="string"?A:A==null?void 0:A.attr("text");if(typeof i.render=="function")return{html:i.render((0,z.pi)((0,z.pi)({},n.keyFields),{label:c,value:u,color:l}))};var h="";return(typeof c=="string"||typeof c=="number")&&(h+='<div class="component-poptip-label">'.concat(c,"</div>")),(typeof u=="string"||typeof u=="number")&&(h+='<div class="component-poptip-value">'.concat(u,"</div>")),{html:h}})}},t.prototype.renderFocus=function(e){var n=this,i=this.attributes,a=i.focus,s=i.focusMarkerSize,o=i.classNamePrefix,A={x:0,y:0,size:s,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};Ye(a)||(this.focusGroup=e.maybeAppendByClassName(jr.focusGroup,"g").style("zIndex",0),fa(a,this.focusGroup,function(){var l=Hi(jr.focus.name,na.focusIcon,o),c=new zn({style:(0,z.pi)((0,z.pi)({},A),{symbol:"focus"}),className:l}),u=new Js({style:{r:A.size/2,fill:"transparent"}}),h=n.focusGroup.node();h.appendChild(u),h.appendChild(c),c.update({opacity:0}),e.node().addEventListener("pointerenter",function(){c.update({opacity:1})}),e.node().addEventListener("pointerleave",function(){c.update({opacity:0})})}))},t.prototype.renderPoptip=function(e){var n=this,i=this.attributes.poptip;if(i){var a=e.maybeAppendByClassName(jr.value,"g").node(),s=e.maybeAppendByClassName(jr.label,"g").node();[a,s].forEach(function(o){o&&n.bindPoptip(o)})}},t.prototype.renderBackground=function(e){var n=this.shape,i=n.width,a=n.height,s=en(this.attributes,"background");this.background=e.maybeAppendByClassName(jr.backgroundGroup,"g").style("zIndex",-1);var o=this.background.maybeAppendByClassName(jr.background,"rect");o.styles((0,z.pi)({width:i,height:a},s));var A=this.attributes.classNamePrefix,l=A===void 0?"":A;if(l){var c=Hi(jr.background.name,na.background,l);o.node().setAttribute("class",c)}},t.prototype.adjustLayout=function(){var e=this.layout,n=e.labelWidth,i=e.valueWidth,a=e.height,s=(0,z.CR)(e.position,4),o=s[0],A=s[1],l=s[2],c=s[3],u=a/2;this.markerGroup.styles({transform:"translate(".concat(o,", ").concat(u,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(A,", ").concat(u,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(c,", ").concat(u,")")}),s1(this.labelGroup.select(jr.label.class).node(),Math.ceil(n)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(l,", ").concat(u,")")}),s1(this.valueGroup.select(jr.value.class).node(),Math.ceil(i)))},t.prototype.render=function(e,n){var i=Le(n),a=e.x,s=a===void 0?0:a,o=e.y,A=o===void 0?0:o;i.styles({transform:"translate(".concat(s,", ").concat(A,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.renderPoptip(i),this.renderFocus(i),this.adjustLayout()},t}(Sr),Nl=Fs({page:"item-page",navigator:"navigator",item:"item"},"items"),C2=function(r,t,e){return e===void 0&&(e=!0),r?t(r):e},x_=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,e,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:n1,mouseenter:n1,mouseleave:n1})||this;return n.navigatorShape=[0,0],n}return Object.defineProperty(t.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"grid",{get:function(){var e=this.attributes,n=e.gridRow,i=e.gridCol,a=e.data;if(!n&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return n&&i?[n,i]:n?[n,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderData",{get:function(){var e=this.attributes,n=e.data,i=e.layout,a=e.poptip,s=e.focus,o=e.focusMarkerSize,A=e.classNamePrefix,l=en(this.attributes,"item"),c=n.map(function(u,h){var d=u.id,f=d===void 0?h:d,g=u.label,v=u.value;return{id:"".concat(f),index:h,style:(0,z.pi)({layout:i,labelText:g,valueText:v,poptip:a,focus:s,focusMarkerSize:o,classNamePrefix:A},Object.fromEntries(Object.entries(l).map(function(m){var w=(0,z.CR)(m,2),C=w[0],F=w[1];return[C,ga(F,[u,h,n])]})))}});return c},enumerable:!1,configurable:!0}),t.prototype.getGridLayout=function(){var e=this,n=this.attributes,i=n.orientation,a=n.width,s=n.rowPadding,o=n.colPadding,A=(0,z.CR)(this.navigatorShape,1),l=A[0],c=(0,z.CR)(this.grid,2),u=c[0],h=c[1],d=h*u,f=0;return this.pageViews.children.map(function(g,v){var m,w,C=Math.floor(v/d),F=v%d,Q=e.ifHorizontal(h,u),D=[Math.floor(F/Q),F%Q];i==="vertical"&&D.reverse();var K=(0,z.CR)(D,2),G=K[0],J=K[1],$=(a-l-(h-1)*o)/h,at=g.getBBox().height,At=(0,z.CR)([0,0],2),pt=At[0],wt=At[1];return i==="horizontal"?(m=(0,z.CR)([f,G*(at+s)],2),pt=m[0],wt=m[1],f=J===h-1?0:f+$+o):(w=(0,z.CR)([J*($+o),f],2),pt=w[0],wt=w[1],f=G===u-1?0:f+at+s),{page:C,index:v,row:G,col:J,pageIndex:F,width:$,height:at,x:pt,y:wt}})},t.prototype.getFlexLayout=function(){var e=this.attributes,n=e.width,i=e.height,a=e.rowPadding,s=e.colPadding,o=(0,z.CR)(this.navigatorShape,1),A=o[0],l=(0,z.CR)(this.grid,2),c=l[0],u=l[1],h=(0,z.CR)([n-A,i],2),d=h[0],f=h[1],g=(0,z.CR)([0,0,0,0,0,0,0,0],8),v=g[0],m=g[1],w=g[2],C=g[3],F=g[4],Q=g[5],D=g[6],K=g[7];return this.pageViews.children.map(function(G,J){var $,at,At,pt,wt=G.getBBox(),bt=wt.width,Rt=wt.height,Pt=D===0?0:s,xt=D+Pt+bt;if(xt<=d&&C2(F,function(_t){return _t<u}))return $=(0,z.CR)([D+Pt,K,xt],3),v=$[0],m=$[1],D=$[2],{width:bt,height:Rt,x:v,y:m,page:w,index:J,pageIndex:C++,row:Q,col:F++};at=(0,z.CR)([Q+1,0,0,K+Rt+a],4),Q=at[0],F=at[1],D=at[2],K=at[3];var Ft=K+Rt;return Ft<=f&&C2(Q,function(_t){return _t<c})?(At=(0,z.CR)([D,K,bt],3),v=At[0],m=At[1],D=At[2],{width:bt,height:Rt,x:v,y:m,page:w,index:J,pageIndex:C++,row:Q,col:F++}):(pt=(0,z.CR)([0,0,bt,0,w+1,0,0,0],8),v=pt[0],m=pt[1],D=pt[2],K=pt[3],w=pt[4],C=pt[5],Q=pt[6],F=pt[7],{width:bt,height:Rt,x:v,y:m,page:w,index:J,pageIndex:C++,row:Q,col:F++})})},Object.defineProperty(t.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var e=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,n=e.call(this);return n.slice(-1)[0].page>0?(this.navigatorShape=[55,0],e.call(this)):n},enumerable:!1,configurable:!0}),t.prototype.ifHorizontal=function(e,n){var i=this.attributes.orientation;return i1(i,e,n)},t.prototype.flattenPage=function(e){e.querySelectorAll(Nl.item.class).forEach(function(n){e.appendChild(n)}),e.querySelectorAll(Nl.page.class).forEach(function(n){var i=e.removeChild(n);i.destroy()})},t.prototype.renderItems=function(e){var n=this.attributes,i=n.click,a=n.mouseenter,s=n.mouseleave,o=n.classNamePrefix;this.flattenPage(e);var A=this.dispatchCustomEvent.bind(this),l=Hi(Nl.item.name,na.item,o);Le(e).selectAll(Nl.item.class).data(this.renderData,function(c){return c.id}).join(function(c){return c.append(function(u){var h=u.style,d=(0,z._T)(u,["style"]);return new b_({style:h},d)}).attr("className",l).on("click",function(){i==null||i(this),A("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),A("itemMouseenter",{item:this})}).on("pointerleave",function(){s==null||s(this),A("itemMouseleave",{item:this})})},function(c){return c.each(function(u){var h=u.style;this.update(h)})},function(c){return c.remove()})},t.prototype.relayoutNavigator=function(){var e,n=this.attributes,i=n.layout,a=n.width,s=((e=this.pageViews.children[0])===null||e===void 0?void 0:e.getBBox().height)||0,o=(0,z.CR)(this.navigatorShape,2),A=o[0],l=o[1];this.navigator.update(i==="grid"?{pageWidth:a-A,pageHeight:s-l}:{})},t.prototype.adjustLayout=function(){var e=this,n=Object.entries(IR(this.itemsLayout,"page")).map(function(a){var s=(0,z.CR)(a,2),o=s[0],A=s[1];return{page:o,layouts:A}}),i=(0,z.ev)([],(0,z.CR)(this.navigator.getContainer().children),!1);n.forEach(function(a){var s=a.layouts,o=e.pageViews.appendChild(new oi({className:Nl.page.name}));s.forEach(function(A){var l=A.x,c=A.y,u=A.index,h=A.width,d=A.height,f=i[u];o.appendChild(f),ph(f,"__layout__",A),f.update({x:l,y:c,width:h,height:d})})}),this.relayoutNavigator()},t.prototype.renderNavigator=function(e){var n=this.attributes,i=n.orientation,a=n.classNamePrefix,s=en(this.attributes,"nav"),o=Zr({orientation:i,classNamePrefix:a},s),A=this;return e.selectAll(Nl.navigator.class).data(["nav"]).join(function(l){return l.append(function(){return new n_({style:o})}).attr("className",Nl.navigator.name).each(function(){A.navigator=this})},function(l){return l.each(function(){this.update(o)})},function(l){return l.remove()}),this.navigator},t.prototype.getBBox=function(){return this.navigator.getBBox()},t.prototype.render=function(e,n){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(Le(n));this.renderItems(a.getContainer()),this.adjustLayout()}},t.prototype.dispatchCustomEvent=function(e,n){var i=new Vr(e,{detail:n});this.dispatchEvent(i)},t}(Sr),kl=Fs({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),S2={showLabel:!0,formatter:function(r){return r.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},qG=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,e,S2)||this}return t.prototype.render=function(e,n){var i=Le(n).maybeAppendByClassName(kl.markerGroup,"g");this.renderMarker(i);var a=Le(n).maybeAppendByClassName(kl.labelGroup,"g");this.renderLabel(a)},t.prototype.renderMarker=function(e){var n=this,i=this.attributes,a=i.orientation,s=i.classNamePrefix,o=i.markerSymbol,A=o===void 0?i1(a,"horizontalHandle","verticalHandle"):o;fa(!!A,e,function(l){var c=en(n.attributes,"marker"),u=(0,z.pi)({symbol:A},c),h=Hi(kl.marker.name,na.handleMarker,s);if(n.marker=l.maybeAppendByClassName(kl.marker,function(){return new zn({style:u,className:h})}).update(u),s){var d=n.marker.node().querySelector(".marker");if(d){var f=d.getAttribute("class")||"",g=f.split(" ")[0],v=Hi(g,na.handleMarker,s);d.setAttribute("class",v)}}})},t.prototype.renderLabel=function(e){var n=this,i=this.attributes,a=i.showLabel,s=i.orientation,o=i.spacing,A=o===void 0?0:o,l=i.formatter,c=i.classNamePrefix;fa(a,e,function(u){var h,d=en(n.attributes,"label"),f=d.text,g=(0,z._T)(d,["text"]),v=((h=u.select(kl.marker.class))===null||h===void 0?void 0:h.node().getBBox())||{},m=v.width,w=m===void 0?0:m,C=v.height,F=C===void 0?0:C,Q=(0,z.CR)(i1(s,[0,F+A,"center","top"],[w+A,0,"start","middle"]),4),D=Q[0],K=Q[1],G=Q[2],J=Q[3],$=Hi(kl.label.name,na.handleLabel,c);u.maybeAppendByClassName(kl.label,"text").attr("className",$).styles((0,z.pi)((0,z.pi)({},g),{x:D,y:K,text:l(f).toString(),textAlign:G,textBaseline:J}))})},t}(Sr),M2={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},C_=Zr({},M2,{}),$G=Zr({},M2,Vc(S2,"handle"),{color:["#d0e3fa","#acc7f6","#8daaf2","#6d8eea","#4d73cd","#325bb1","#5a3e75","#8c3c79","#e23455","#e7655b"],indicatorBackgroundFill:"#262626",indicatorLabelFill:"white",indicatorLabelFontSize:12,indicatorVisibility:"hidden",labelAlign:"value",labelDirection:"positive",labelSpacing:5,showHandle:!0,showIndicator:!0,showLabel:!0,slidable:!0,titleText:"",type:"continuous"}),tK=.01,eK=.5,Ql=Fs({title:"title",html:"html",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),S_=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.update=function(e){this.attr(e)},t}(ul),M_=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,e,C_)||this}return t.prototype.renderTitle=function(e,n,i){var a=this.attributes,s=a.showTitle,o=a.titleText,A=a.classNamePrefix,l=en(this.attributes,"title"),c=(0,z.CR)(Uo(l),2),u=c[0],h=c[1];this.titleGroup=e.maybeAppendByClassName(Ql.titleGroup,"g").styles(h);var d=(0,z.pi)((0,z.pi)({width:n,height:i},u),{text:s?o:"",classNamePrefix:A});this.title=this.titleGroup.maybeAppendByClassName(Ql.title,function(){return new OR({style:d})}).update(d)},t.prototype.renderCustom=function(e){var n=this.attributes.data,i={innerHTML:this.attributes.render(n),pointerEvents:"auto"};e.maybeAppendByClassName(Ql.html,function(){return new S_({className:Ql.html.name,style:i})}).update(i)},t.prototype.renderItems=function(e,n){var i=n.x,a=n.y,s=n.width,o=n.height,A=en(this.attributes,"title",!0),l=(0,z.CR)(Uo(A),2),c=l[0],u=l[1],h=(0,z.pi)((0,z.pi)({},c),{width:s,height:o,x:0,y:0});this.itemsGroup=e.maybeAppendByClassName(Ql.itemsGroup,"g").styles((0,z.pi)((0,z.pi)({},u),{transform:"translate(".concat(i,", ").concat(a,")")}));var d=this;this.itemsGroup.selectAll(Ql.items.class).data(["items"]).join(function(f){return f.append(function(){return new x_({style:h})}).attr("className",Ql.items.name).each(function(){d.items=Le(this)})},function(f){return f.update(h)},function(f){return f.remove()})},t.prototype.adjustLayout=function(){var e=this.attributes.showTitle;if(e){var n=this.title.node().getAvailableSpace(),i=n.x,a=n.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(t.prototype,"availableSpace",{get:function(){var e=this.attributes,n=e.showTitle,i=e.width,a=e.height;return n?this.title.node().getAvailableSpace():new _i(0,0,i,a)},enumerable:!1,configurable:!0}),t.prototype.getBBox=function(){var e,n,i=(e=this.title)===null||e===void 0?void 0:e.node(),a=(n=this.items)===null||n===void 0?void 0:n.node();return!i||!a?r.prototype.getBBox.call(this):MR(i,a)},t.prototype.render=function(e,n){var i=this.attributes,a=i.width,s=i.height,o=i.x,A=o===void 0?0:o,l=i.y,c=l===void 0?0:l,u=i.classNamePrefix,h=i.render,d=Le(n),f=n.className||"legend-category";u?n.attr("className","".concat(f," ").concat(u,"legend")):n.className||n.attr("className","legend-category"),n.style.transform="translate(".concat(A,", ").concat(c,")"),h?this.renderCustom(d):(this.renderTitle(d,a,s),this.renderItems(d,this.availableSpace),this.adjustLayout())},t}(Sr);function f0(r){const{width:t,height:e,renderer:n}=r,i=T_(r),a=new dm({width:t,height:e,container:i,renderer:n||new Eh});return[i,a]}function T_(r){var t;const{container:e,className:n,graphCanvas:i}=r;if(e)return typeof e=="string"?document.getElementById(e):e;const a=zc(n,!1),{width:s,height:o,containerStyle:A}=r,[l,c]=F_(r);return Object.assign(a.style,Object.assign({position:"absolute",left:l+"px",top:c+"px",width:s+"px",height:o+"px"},A)),(t=i.getContainer())===null||t===void 0||t.appendChild(a),a}function F_(r){const{width:t,height:e,placement:n,graphCanvas:i}=r,[a,s]=i.getSize(),[o,A]=lb(n);return[o*(a-t),A*(s-e)]}var O_=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class g0 extends mi{constructor(t,e){super(t,Object.assign({},g0.defaultOptions,e)),this.typePrefix="__data__",this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:n}=this.context;n.on(Ae.AFTER_DRAW,this.createElement)},this.changeState=(n,i)=>{const{graph:a}=this.context,{typePrefix:s}=this,o=Mi(n,[s,"id"]),A=Mi(n,[s,"style","labelText"]),[l]=o.split("__"),c=this.fieldMap[l].get(A)||[];a.setElementState(Object.fromEntries(c==null?void 0:c.map(u=>[u,i])))},this.click=n=>{if(this.options.trigger==="hover")return;const i=Mi(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(n,[])):(this.selectedItems.push(i),this.changeState(n,"selected"))},this.mouseleave=n=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(n,[]))},this.mouseenter=n=>{if(this.options.trigger==="click")return;const i=Mi(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(n,"active"))},this.setFieldMap=(n,i,a)=>{if(!n)return;const s=this.fieldMap[a];if(s)if(!s.has(n))s.set(n,[i]);else{const o=s.get(n);o&&(o.push(i),s.set(n,o))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(n,i)=>{if(!n)return[];const{model:a,element:s}=this.context,{nodes:o,edges:A,combos:l}=a.getData(),c={},u=v=>Wt(n)?n(v):n,h={node:"circle",edge:"line",combo:"rect"},d={circle:"circle",ellipse:"circle",image:"bowtie",rect:"square",star:"cross",triangle:"triangle",diamond:"diamond",cubic:"dot",line:"hyphen",polyline:"hyphen",quadratic:"hv","cubic-horizontal":"hyphen","cubic-vertical":"line"},f=(v,m)=>s==null?void 0:s.getElementComputedStyle(v,m),g=(v,m)=>{v.forEach(w=>{const{id:C}=w,F=Mi(w,["data",u(w)]),Q=(s==null?void 0:s.getElementType(m,w))||"circle",D=f(m,w),K=(m==="edge"?D==null?void 0:D.stroke:D==null?void 0:D.fill)||"#1783ff";C&&F&&F.replace(/\s+/g,"")&&(this.setFieldMap(F,C,m),c[F]||(c[F]={id:`${m}__${C}`,label:F,marker:d[Q]||h[m],elementType:m,lineWidth:1,stroke:K,fill:K}))})};switch(i){case"node":g(o,"node");break;case"edge":g(A,"edge");break;case"combo":g(l,"combo");break;default:return[]}return Object.values(c)},this.createElement=()=>{if(this.draw){this.updateElement();return}const n=this.options,{width:i,height:a,nodeField:s,edgeField:o,comboField:A,trigger:l,position:c,container:u,containerStyle:h,className:d}=n,f=O_(n,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),g=this.getMarkerData(s,"node"),v=this.getMarkerData(o,"edge"),m=this.getMarkerData(A,"combo"),w=[...g,...m,...v],C=Object.assign({width:i,height:a,data:w,itemMarkerLineWidth:({lineWidth:D})=>D,itemMarker:({marker:D})=>D,itemMarkerStroke:({stroke:D})=>D,itemMarkerFill:({fill:D})=>D,gridCol:g.length},f,this.getEvents()),F=new M_({className:"legend",style:C});this.category=F,this.upsertCanvas().appendChild(F),this.draw=!0},this.bindEvents()}update(t){super.update(t),this.clear(),this.createElement()}clear(){var t,e;(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),this.canvas=void 0,this.container=void 0,this.draw=!1}updateElement(){this.category&&this.category.update({itemMarkerOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5,itemLabelOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5})}upsertCanvas(){if(this.canvas)return this.canvas;const t=this.context.canvas,[e,n]=t.getSize(),{width:i=e,height:a=n,position:s,container:o,containerStyle:A,className:l}=this.options,[c,u]=f0({width:i,height:a,graphCanvas:t,container:o,containerStyle:A,placement:s,className:"legend"});return this.container=c,l&&c.classList.add(l),this.canvas=u,this.canvas}destroy(){this.clear(),this.context.graph.off(Ae.AFTER_DRAW,this.createElement),super.destroy()}}g0.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class v0 extends mi{constructor(t,e){super(t,Object.assign({},v0.defaultOptions,e)),this.onDraw=n=>{var i;!((i=n==null?void 0:n.data)===null||i===void 0)&&i.render||this.onRender()},this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=n=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(n.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=n=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:s,movementY:o}=n,{left:A,top:l,width:c,height:u}=this.mask.style,[,,h,d]=this.maskBBox;let f=parseInt(A)+s,g=parseInt(l)+o,v=parseInt(c),m=parseInt(u);f<0&&(f=0),g<0&&(g=0),f+v>i&&(f=NA(i-v,0)),g+m>a&&(g=NA(a-m,0)),v<h&&(s>0?(f=NA(f-s,0),v=LA(v+s,i)):s<0&&(v=LA(v-s,i))),m<d&&(o>0?(g=NA(g-o,0),m=LA(m+o,a)):o<0&&(m=LA(m-o,a))),Object.assign(this.mask.style,{left:f+"px",top:g+"px",width:v+"px",height:m+"px"});const w=parseInt(A)-f,C=parseInt(l)-g;if(w===0&&C===0)return;const F=this.context.canvas.getCamera().getZoom(),Q=this.canvas.getCamera().getZoom(),D=F/Q;this.context.graph.translateBy([w*D,C*D],!1)},this.onMaskDragEnd=n=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(n.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=vB(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),"delay"in t&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=Mh(()=>{this.renderMinimap(),this.renderMask()},this.options.delay)}bindEvents(){const{graph:t}=this.context;t.on(Ae.AFTER_DRAW,this.onDraw),t.on(Ae.AFTER_RENDER,this.onRender),t.on(Ae.AFTER_ANIMATE,this.onRender),t.on(Ae.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(Ae.AFTER_DRAW,this.onDraw),t.off(Ae.AFTER_RENDER,this.onRender),t.off(Ae.AFTER_ANIMATE,this.onRender),t.off(Ae.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const t=this.getElements(),e=this.initCanvas();this.setShapes(e,t)}getElements(){const{filter:t}=this.options,{model:e,element:n}=this.context,i=e.getData(),a={nodes:i.nodes.filter(l=>n==null?void 0:n.getElement(Qt(l))),edges:i.edges.filter(l=>{const c=n==null?void 0:n.getElement(Qt(l));return c&&dx(c)}),combos:i.combos.filter(l=>n==null?void 0:n.getElement(Qt(l)))};if(!t)return a;const{nodes:s,edges:o,combos:A}=a;return{nodes:s.filter(l=>t(Qt(l),"node")),edges:o.filter(l=>t(Qt(l),"edge")),combos:A.filter(l=>t(Qt(l),"combo"))}}setShapes(t,e){const{nodes:n,edges:i,combos:a}=e,{shape:s}=this.options,{element:o}=this.context,A=(l,c)=>{const u=Qt(l),h=o==null?void 0:o.getElement(u);if(!h)return;const d=h.getShape("key");let f;if(typeof s=="string"){const g=s;f=h.getShape(g).cloneNode()}else{const g=s(u,c,h);g===h?f=g.cloneNode(!0):f=g}f.setPosition(d.getPosition()),h.style.zIndex&&(f.style.zIndex=h.style.zIndex),f.id=h.id,t.appendChild(f)};t.removeChildren(),i.forEach(l=>A(l,"edge")),a.forEach(l=>A(l,"combo")),n.forEach(l=>A(l,"node"))}initCanvas(){const{renderer:t,size:[e,n]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(e!==i||n!==a)&&this.canvas.resize(e,n),t&&this.canvas.setRenderer(t)}else{const{className:i,position:a,container:s,containerStyle:o}=this.options,[A,l]=f0({renderer:t,width:e,height:n,placement:a,className:"minimap",container:s,containerStyle:o,graphCanvas:this.context.canvas});i&&A.classList.add(i),this.container=A,this.canvas=l}return this.setCamera(),this.canvas}createLandmark(t,e,n){const i=`${t.join(",")}-${e.join(",")}-${n}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const s=this.canvas.getCamera().createLandmark(i,{position:t,focalPoint:e,zoom:n});return this.landmarkMap.set(i,s),s}setCamera(){var t;const{canvas:e}=this.context,n=(t=this.canvas)===null||t===void 0?void 0:t.getCamera();if(!n)return;const{size:[i,a],padding:s}=this.options,[o,A,l,c]=La(s),{min:u,max:h,center:d}=e.getBounds("elements"),f=h[0]-u[0],g=h[1]-u[1],v=i-c-A,m=a-o-l,w=v/f,C=m/g,F=Math.min(w,C),Q=this.createLandmark(d,d,F);n.gotoLandmark(Q,0)}get maskBBox(){const{canvas:t}=this.context,e=t.getSize(),n=t.getCanvasByViewport([0,0]),i=t.getCanvasByViewport(e),a=this.canvas.canvas2Viewport(xs(n)),s=this.canvas.canvas2Viewport(xs(i)),o=s.x-a.x,A=s.y-a.y;return[a.x,a.y,o,A]}calculateMaskBBox(){const{size:[t,e]}=this.options;let[n,i,a,s]=this.maskBBox;return n<0&&(a=LA(a+n,t),n=0),i<0&&(s=LA(s+i,e),i=0),n+a>t&&(a=NA(t-n,0)),i+s>e&&(s=NA(e-i,0)),[LA(n,t),LA(i,e),NA(a,0),NA(s,0)]}renderMask(){const{maskStyle:t}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart),this.mask.draggable=!0,this.mask.addEventListener("dragstart",e=>e.preventDefault&&e.preventDefault())),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},t),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[t,e,n,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:e+"px",left:t+"px",width:n+"px",height:i+"px"})}destroy(){var t,e,n;this.unbindEvents(),(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.mask)===null||e===void 0||e.remove(),(n=this.container)===null||n===void 0||n.remove(),super.destroy()}}v0.defaultOptions={size:[240,160],shape:"key",padding:10,position:"right-bottom",maskStyle:{border:"1px solid #ddd",background:"rgba(0, 0, 0, 0.1)"},containerStyle:{border:"1px solid #ddd",background:"#fff"},delay:128};const LA=(r,t)=>Math.min(r,t),NA=(r,t)=>Math.max(r,t);var A1=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};const l1={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class p0 extends mi{constructor(t,e){super(t,Object.assign({},p0.defaultOptions,e)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new hl({style:Object.assign(Object.assign({},l1),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new hl({style:Object.assign(Object.assign({},l1),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,i,a)=>A1(this,void 0,void 0,function*(){const{verticalX:s,horizontalY:o}=a,{tolerance:A}=this.options,{min:[l,c],max:[u,h],center:[d,f]}=i;let g=0,v=0;s!==null&&(Gi(u,s)<A&&(g=s-u),Gi(l,s)<A&&(g=s-l),Gi(d,s)<A&&(g=s-d),g!==0&&(this.isVerticalSticking=!0)),o!==null&&(Gi(h,o)<A&&(v=o-h),Gi(c,o)<A&&(v=o-c),Gi(f,o)<A&&(v=o-f),v!==0&&(this.isHorizontalSticking=!0)),(g!==0||v!==0)&&(yield this.context.graph.translateElementBy({[n]:[g,v]},!1))}),this.enableSnap=n=>{const{target:i}=n,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[s,o]=this.getDelta(n);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(s)<=a&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,-o]},!1),!1;if(this.isHorizontalSticking&&Math.abs(o)<=a)return this.context.graph.translateElementBy({[i.id]:[0,-o]},!1),!1;if(this.isVerticalSticking&&Math.abs(s)<=a)return this.context.graph.translateElementBy({[i.id]:[-s,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(n,i)=>{const{tolerance:a,shape:s}=this.options,{min:[o,A],max:[l,c],center:[u,h]}=i;let d=null,f=null,g=null,v=null,m=null,w=null;return this.getNodes().some(C=>{if(Dr(n.id,C.id))return!1;const F=T2(C,s).getRenderBounds(),{min:[Q,D],max:[K,G],center:[J,$]}=F;return d===null&&(Gi(J,u)<a?d=J:Gi(Q,o)<a||Gi(Q,l)<a?d=Q:(Gi(K,l)<a||Gi(K,o)<a)&&(d=K),d!==null&&(f=Math.min(D,A),g=Math.max(G,c))),v===null&&(Gi($,h)<a?v=$:Gi(D,A)<a||Gi(D,c)<a?v=D:(Gi(G,c)<a||Gi(G,A)<a)&&(v=G),v!==null&&(m=Math.min(Q,o),w=Math.max(K,l))),d!==null&&v!==null}),{verticalX:d,verticalMinY:f,verticalMaxY:g,horizontalY:v,horizontalMinX:m,horizontalMaxX:w}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=n=>A1(this,void 0,void 0,function*(){const{target:i}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const a=T2(i,this.options.shape).getRenderBounds(),s=this.calcSnaplineMetadata(i,a);this.hideSnapline(),(s.verticalX!==null||s.horizontalY!==null)&&this.updateSnapline(s),this.options.autoSnap&&(yield this.autoSnapToLine(i.id,a,s))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var t;const{filter:e}=this.options,i=(((t=this.context.element)===null||t===void 0?void 0:t.getNodes())||[]).filter(a=>{var s;return dx(a)&&((s=this.context.viewport)===null||s===void 0?void 0:s.isInViewport(a.getRenderBounds()))});return e?i.filter(a=>e(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(t){const{lineWidth:e}=this.options[`${t}LineStyle`];return+(e||l1.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(t){const{verticalX:e,verticalMinY:n,verticalMaxY:i,horizontalY:a,horizontalMinX:s,horizontalMaxX:o}=t,[A,l]=this.context.canvas.getSize(),{offset:c}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:c===1/0?0:s-c,y1:a,x2:c===1/0?A:o+c,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",e!==null?Object.assign(this.verticalLine.style,{x1:e,y1:c===1/0?0:n-c,x2:e,y2:c===1/0?l:i+c,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(t){const e=this.context.graph.getZoom();return bs([t.dx,t.dy],e)}bindEvents(){return A1(this,void 0,void 0,function*(){const{graph:t}=this.context;t.on($a.DRAG_START,this.onDragStart),t.on($a.DRAG,this.onDrag),t.on($a.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:t}=this.context;t.off($a.DRAG_START,this.onDragStart),t.off($a.DRAG,this.onDrag),t.off($a.DRAG_END,this.onDragEnd)}destroyElements(){var t,e;(t=this.horizontalLine)===null||t===void 0||t.destroy(),(e=this.verticalLine)===null||e===void 0||e.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}p0.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Gi=(r,t)=>Math.abs(r-t),T2=(r,t)=>typeof t=="function"?t(r):r.getShape(t);var F2=null,I_=null;function m0(r){return r instanceof Date?r:new Date(r)}function L_(r){for(var t=__read(r,2),e=t[0],n=t[1],i=F2.indexOf(e),a=F2.indexOf(n),s="",o=i;o<=a;o+=1)if(s+=I_[o],o<a){var A="-";o===2?A=" ":o>2&&(A=":"),s+=A}return s}function ia(r,t){var e={YYYY:r.getFullYear(),MM:r.getMonth()+1,DD:r.getDate(),HH:r.getHours(),mm:r.getMinutes(),ss:r.getSeconds()},n=t;return Object.keys(e).forEach(function(i){var a=e[i];n=n.replace(i,i==="YYYY"?"".concat(a):"".concat(a).padStart(2,"0"))}),n}function nK(r,t){return m0(r).getTime()-m0(t).getTime()}function rK(r,t){var e=__read([m0(r),m0(t)],2),n=e[0],i=e[1];return n.getFullYear()!==i.getFullYear()?"year":n.getMonth()!==i.getMonth()?"month":n.getDay()!==i.getDay()?"day":n.getHours()!==i.getHours()?"hour":n.getMinutes()!==i.getMinutes()?"minute":"second"}function iK(r,t){var e=new Date(r),n={year:function(i){i.setMonth(0),i.setHours(0,0,0,0)},month:function(i){i.setDate(1),i.setHours(0,0,0,0)},day:function(i){return i.setHours(0,0,0,0)},hour:function(i){return i.setMinutes(0,0,0)},minute:function(i){return i.setSeconds(0,0)},second:function(i){return i.setMilliseconds(0)}};return n[t](e),ia(e,L_(["year",t]))}function N_(r,t){if(r.length<=t)return r;for(var e=Math.floor(r.length/t),n=[],i=0;i<r.length;i+=e)n.push(r[i]);return n}var Vn={gridGroup:"grid-group",mainGroup:"main-group",lineGroup:"line-group",tickGroup:"tick-group",labelGroup:"label-group",titleGroup:"title-group",grid:"grid",line:"line",lineFirst:"line-first",lineSecond:"line-second",tick:"tick",tickItem:"tick-item",label:"label",labelItem:"label-item",title:"title"},c1={data:[],animate:{enter:!1,update:{duration:100,easing:"ease-in-out-sine",fill:"both"},exit:{duration:100,fill:"both"}},showArrow:!0,showGrid:!0,showLabel:!0,showLine:!0,showTick:!0,showTitle:!0,showTrunc:!1,dataThreshold:100,lineLineWidth:1,lineStroke:"black",crossPadding:10,titleFill:"black",titleFontSize:12,titlePosition:"lb",titleSpacing:0,titleTextAlign:"center",titleTextBaseline:"middle",lineArrow:function(){return new Pi({style:{d:[["M",10,10],["L",-10,0],["L",10,-10],["L",0,0],["L",10,10],["Z"]],fill:"black",transformOrigin:"center"}})},labelAlign:"parallel",labelDirection:"positive",labelFontSize:12,labelSpacing:0,gridConnect:"line",gridControlAngles:[],gridDirection:"positive",gridLength:0,gridType:"segment",lineArrowOffset:15,lineArrowSize:10,tickDirection:"positive",tickLength:5,tickLineWidth:1,tickStroke:"black",labelOverlap:[]},aK=Ci({},c1,{style:{type:"arc"}}),sK=Ci({},c1,{style:{}}),Je=Fs({mainGroup:Vn.mainGroup,gridGroup:Vn.gridGroup,grid:Vn.grid,lineGroup:Vn.lineGroup,line:Vn.line,tickGroup:Vn.tickGroup,tick:Vn.tick,tickItem:Vn.tickItem,labelGroup:Vn.labelGroup,label:Vn.label,labelItem:Vn.labelItem,titleGroup:Vn.titleGroup,title:Vn.title,lineFirst:Vn.lineFirst,lineSecond:Vn.lineSecond},"axis");function Do(r,t){return[r[0]*t,r[1]*t]}function Uh(r,t){return[r[0]+t[0],r[1]+t[1]]}function u1(r,t){return[r[0]-t[0],r[1]-t[1]]}function Ul(r,t){return[Math.min(r[0],t[0]),Math.min(r[1],t[1])]}function Pl(r,t){return[Math.max(r[0],t[0]),Math.max(r[1],t[1])]}function Ph(r,t){return Math.sqrt(Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2))}function O2(r){if(r[0]===0&&r[1]===0)return[0,0];var t=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2));return[r[0]/t,r[1]/t]}function oK(r,t,e){var n=__read(r,2),i=n[0],a=n[1],s=__read(t,2),o=s[0],A=s[1],l=i-o,c=a-A,u=Math.sin(e),h=Math.cos(e);return[l*h-c*u+o,l*u+c*h+A]}function k_(r,t){return t?[r[1],-r[0]]:[-r[1],r[0]]}function Zc(r){return r*Math.PI/180}function I2(r){return Number((r*180/Math.PI).toPrecision(5))}function y0(r,t){return r.style.opacity||(r.style.opacity=1),Os(r,{opacity:0},t)}var Q_=["$el","cx","cy","d","dx","dy","fill","fillOpacity","filter","fontFamily","fontSize","fontStyle","fontVariant","fontWeight","height","img","increasedLineWidthForHitTesting","innerHTML","isBillboard","billboardRotation","isSizeAttenuation","isClosed","isOverflowing","leading","letterSpacing","lineDash","lineHeight","lineWidth","markerEnd","markerEndOffset","markerMid","markerStart","markerStartOffset","maxLines","metrics","miterLimit","offsetX","offsetY","opacity","path","points","r","radius","rx","ry","shadowColor","src","stroke","strokeOpacity","text","textAlign","textBaseline","textDecorationColor","textDecorationLine","textDecorationStyle","textOverflow","textPath","textPathSide","textPathStartOffset","transform","transformOrigin","visibility","width","wordWrap","wordWrapWidth","x","x1","x2","y","y1","y2","z1","z2","zIndex"];function U_(r){return Q_.includes(r)}function L2(r){var t={};for(var e in r)U_(e)&&(t[e]=r[e]);return t}var jc=Fs({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function N2(r){return r.reduce(function(t,e,n){return t.push((0,z.ev)([n===0?"M":"L"],(0,z.CR)(e),!1)),t},[])}function P_(r,t,e){var n=t.connect,i=n===void 0?"line":n,a=t.center;if(i==="line")return N2(r);if(!a)return[];var s=Ph(r[0],a),o=e?0:1;return r.reduce(function(A,l,c){return c===0?A.push((0,z.ev)(["M"],(0,z.CR)(l),!1)):A.push((0,z.ev)(["A",s,s,0,0,o],(0,z.CR)(l),!1)),A},[])}function h1(r,t,e){return t.type==="surround"?P_(r,t,e):N2(r)}function D_(r,t,e){var n=e.type,i=e.connect,a=e.center,s=e.closed,o=s?[["Z"]]:[],A=(0,z.CR)([h1(r,e),h1(t.slice().reverse(),e,!0)],2),l=A[0],c=A[1],u=(0,z.CR)([r[0],t.slice(-1)[0]],2),h=u[0],d=u[1],f=function(w,C){return[l,w,c,C,o].flat()};if(i==="line"||n==="surround")return f([(0,z.ev)(["L"],(0,z.CR)(d),!1)],[(0,z.ev)(["L"],(0,z.CR)(h),!1)]);if(!a)throw new Error("Arc grid need to specified center");var g=(0,z.CR)([Ph(d,a),Ph(h,a)],2),v=g[0],m=g[1];return f([(0,z.ev)(["A",v,v,0,0,1],(0,z.CR)(d),!1),(0,z.ev)(["L"],(0,z.CR)(d),!1)],[(0,z.ev)(["A",m,m,0,0,0],(0,z.CR)(h),!1),(0,z.ev)(["L"],(0,z.CR)(h),!1)])}function R_(r,t,e,n){var i=e.animate,a=e.isBillboard,s=t.map(function(o,A){return{id:o.id||"grid-line-".concat(A),d:h1(o.points,e)}});return r.selectAll(jc.line.class).data(s,function(o){return o.id}).join(function(o){return o.append("path").each(function(A,l){var c=ga(L2((0,z.pi)({d:A.d},n)),[A,l,s]);this.attr((0,z.pi)({class:jc.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},c))})},function(o){return o.transition(function(A,l){var c=ga(L2((0,z.pi)({d:A.d},n)),[A,l,s]);return Os(this,c,i.update)})},function(o){return o.transition(function(){var A=this,l=y0(this,i.exit);return Wc(l,function(){return A.remove()}),l})}).transitions()}function __(r,t,e){var n=e.animate,i=e.connect,a=e.areaFill;if(t.length<2||!a||!i)return[];for(var s=Array.isArray(a)?a:[a,"transparent"],o=function(f){return s[f%s.length]},A=[],l=0;l<t.length-1;l++){var c=(0,z.CR)([t[l].points,t[l+1].points],2),u=c[0],h=c[1],d=D_(u,h,e);A.push({d,fill:o(l)})}return r.selectAll(jc.region.class).data(A,function(f,g){return g}).join(function(f){return f.append("path").each(function(g,v){var m=ga(g,[g,v,A]);this.attr(m)}).attr("className",jc.region.name)},function(f){return f.transition(function(g,v){var m=ga(g,[g,v,A]);return Os(this,m,n.update)})},function(f){return f.transition(function(){var g=this,v=y0(this,n.exit);return Wc(v,function(){return g.remove()}),v})}).transitions()}function H_(r){var t=r.data,e=t===void 0?[]:t,n=r.closed;return n?e.map(function(i){var a=i.points,s=(0,z.CR)(a,1),o=s[0];return(0,z.pi)((0,z.pi)({},i),{points:(0,z.ev)((0,z.ev)([],(0,z.CR)(a),!1),[o],!1)})}):e}var G_=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n){var i=e.type,a=e.center,s=e.areaFill,o=e.closed,A=(0,z._T)(e,["type","center","areaFill","closed"]),l=H_(e),c=Le(n).maybeAppendByClassName(jc.lineGroup,"g"),u=Le(n).maybeAppendByClassName(jc.regionGroup,"g"),h=R_(c,l,e,A),d=__(u,l,e);return(0,z.ev)((0,z.ev)([],(0,z.CR)(h),!1),(0,z.CR)(d),!1)},t}(Sr),K_=function(r,t){return function(e){return r*(1-e)+t*e}};function z_(r,t){var e=t?t.length:0,n=r?Math.min(e,r.length):0;return function(i){var a=new Array(n),s=new Array(e),o=0;for(o=0;o<n;++o)a[o]=d1(r[o],t[o]);for(;o<e;++o)s[o]=t[o];for(o=0;o<n;++o)s[o]=a[o](i);return s}}function V_(r,t){r===void 0&&(r={}),t===void 0&&(t={});var e={},n={};return Object.entries(t).forEach(function(i){var a=(0,z.CR)(i,2),s=a[0],o=a[1];s in r?e[s]=d1(r[s],o):n[s]=o}),function(i){return Object.entries(e).forEach(function(a){var s=(0,z.CR)(a,2),o=s[0],A=s[1];return n[o]=A(i)}),n}}function d1(r,t){return typeof r=="number"&&typeof t=="number"?K_(r,t):Array.isArray(r)&&Array.isArray(t)?z_(r,t):typeof r=="object"&&typeof t=="object"?V_(r,t):function(e){return r}}function W_(r,t,e,n){if(!n)return r.attr("__keyframe_data__",e),null;var i=n.duration,a=i===void 0?0:i,s=d1(t,e),o=Math.ceil(+a/16),A=new Array(o).fill(0).map(function(l,c,u){return{__keyframe_data__:s(c/(u.length-1))}});return r.animate(A,(0,z.pi)({fill:"both"},n))}function f1(r,t){var e={},n=Array.isArray(t)?t:[t];for(var i in r)n.includes(i)||(e[i]=r[i]);return e}function k2(r,t){return Object.fromEntries(Object.entries(r).map(function(e){var n=(0,z.CR)(e,2),i=n[0],a=n[1];return[i,ga(a,t)]}))}function AK(r){if(r.type==="linear"){var t=r.startPos,e=r.endPos;return __spreadArray(__spreadArray([],__read(t),!1),__read(e),!1)}var n=r.startAngle,i=r.endAngle,a=r.center,s=r.radius;return __spreadArray(__spreadArray([n,i],__read(a),!1),[s],!1)}function g1(r,t){return t&&Wt(t)?r.filter(t):r}function Q2(r,t){var e=t.startAngle,n=t.endAngle;return(n-e)*r+e}function w0(r,t){if(t.type==="linear"){var e=(0,z.CR)(t.startPos,2),n=e[0],i=e[1],a=(0,z.CR)(t.endPos,2),s=a[0],o=a[1],A=(0,z.CR)([s-n,o-i],2),l=A[0],c=A[1];return O2([l,c])}var u=Zc(Q2(r,t));return[-Math.sin(u),Math.cos(u)]}function v1(r,t,e){var n=w0(r,e);return k_(n,t!=="positive")}function Yc(r,t){return v1(r,t.labelDirection,t)}function Dh(r,t,e){return e?"".concat(r," ").concat(e,"axis-").concat(t):r}function lK(r,t,e){var n=r.classNamePrefix,i=n===void 0?"":n;return Dh(t.name,e,i)}function Ua(r,t,e,n){return n&&r.attr("className",Dh(t.name,e,n)),r}function Z_(r,t){var e=(0,z.CR)(t.startPos,2),n=e[0],i=e[1],a=(0,z.CR)(t.endPos,2),s=a[0],o=a[1],A=(0,z.CR)([s-n,o-i],2),l=A[0],c=A[1];return[n+l*r,i+c*r]}function j_(r,t){var e=t.radius,n=(0,z.CR)(t.center,2),i=n[0],a=n[1],s=Zc(Q2(r,t));return[i+e*Math.cos(s),a+e*Math.sin(s)]}function E0(r,t){return t.type==="linear"?Z_(r,t):j_(r,t)}function p1(r){return w0(0,r)[1]===0}function U2(r){return w0(0,r)[0]===0}function P2(r,t){return t-r===360}function D2(r,t,e,n,i){var a=t-r,s=(0,z.CR)([i,i],2),o=s[0],A=s[1],l=(0,z.CR)([Zc(r),Zc(t)],2),c=l[0],u=l[1],h=function($){return[e+i*Math.cos($),n+i*Math.sin($)]},d=(0,z.CR)(h(c),2),f=d[0],g=d[1],v=(0,z.CR)(h(u),2),m=v[0],w=v[1];if(P2(r,t)){var C=(u+c)/2,F=(0,z.CR)(h(C),2),Q=F[0],D=F[1];return[["M",f,g],["A",o,A,0,1,0,Q,D],["A",o,A,0,1,0,m,w]]}var K=a>180?1:0,G=r>t?0:1,J=!1;return J?"M".concat(e,",").concat(n,",L").concat(f,",").concat(g,",A").concat(o,",").concat(A,",0,").concat(K,",").concat(G,",").concat(m,",").concat(w,",L").concat(e,",").concat(n):"M".concat(f,",").concat(g,",A").concat(o,",").concat(A,",0,").concat(K,",").concat(G,",").concat(m,",").concat(w)}function Y_(r){var t=r.attributes,e=t.startAngle,n=t.endAngle,i=t.center,a=t.radius;return(0,z.ev)((0,z.ev)([e,n],(0,z.CR)(i),!1),[a],!1)}function X_(r,t,e,n){var i=t.startAngle,a=t.endAngle,s=t.center,o=t.radius,A=t.classNamePrefix;return r.selectAll(Je.line.class).data([{d:D2.apply(void 0,(0,z.ev)((0,z.ev)([i,a],(0,z.CR)(s),!1),[o],!1))}],function(l,c){return c}).join(function(l){var c=l.append("path").attr("className",Je.line.name).styles(t).styles({d:function(u){return u.d}});return Ua(c,Je.line,Vn.line,A),c},function(l){return l.transition(function(){var c=this,u=W_(this,Y_(this),(0,z.ev)((0,z.ev)([i,a],(0,z.CR)(s),!1),[o],!1),n.update);if(u){var h=function(){var d=Mi(c.attributes,"__keyframe_data__");c.style.d=D2.apply(void 0,(0,z.ev)([],(0,z.CR)(d),!1))};u.onframe=h,u.onfinish=h}return u}).styles(t)},function(l){return l.remove()}).styles(e).transitions()}function J_(r,t){var e=t.truncRange,n=t.truncShape,i=t.lineExtension}function q_(r,t,e){e===void 0&&(e=[0,0]);var n=(0,z.CR)([r,t,e],3),i=(0,z.CR)(n[0],2),a=i[0],s=i[1],o=(0,z.CR)(n[1],2),A=o[0],l=o[1],c=(0,z.CR)(n[2],2),u=c[0],h=c[1],d=(0,z.CR)([A-a,l-s],2),f=d[0],g=d[1],v=Math.sqrt(Math.pow(f,2)+Math.pow(g,2)),m=(0,z.CR)([-u/v,h/v],2),w=m[0],C=m[1];return[w*f,w*g,C*f,C*g]}function R2(r){var t=(0,z.CR)(r,2),e=(0,z.CR)(t[0],2),n=e[0],i=e[1],a=(0,z.CR)(t[1],2),s=a[0],o=a[1];return{x1:n,y1:i,x2:s,y2:o}}function $_(r,t,e,n){var i=t.showTrunc,a=t.startPos,s=t.endPos,o=t.truncRange,A=t.lineExtension,l=t.classNamePrefix,c=(0,z.CR)([a,s],2),u=(0,z.CR)(c[0],2),h=u[0],d=u[1],f=(0,z.CR)(c[1],2),g=f[0],v=f[1],m=(0,z.CR)(A?q_(a,s,A):new Array(4).fill(0),4),w=m[0],C=m[1],F=m[2],Q=m[3],D=function(Ft){return r.selectAll(Je.line.class).data(Ft,function(_t,Xt){return Xt}).join(function(_t){var Xt=_t.append("line").styles(e).transition(function(ie){return Os(this,R2(ie.line),!1)});return Xt.attr("className",function(ie){if(!l)return"".concat(Je.line.name," ").concat(ie.className);var le=Dh(Je.line.name,Vn.line,l);if(ie.className===Je.lineFirst.name){var ve=Dh(Je.lineFirst.name,Vn.lineFirst,l);return"".concat(le," ").concat(ve)}if(ie.className===Je.lineSecond.name){var ve=Dh(Je.lineSecond.name,Vn.lineSecond,l);return"".concat(le," ").concat(ve)}return le}),Xt},function(_t){return _t.styles(e).transition(function(Xt){var ie=Xt.line;return Os(this,R2(ie),n.update)})},function(_t){return _t.remove()}).transitions()};if(!i||!o)return D([{line:[[h+w,d+C],[g+F,v+Q]],className:Je.line.name}]);var K=(0,z.CR)(o,2),G=K[0],J=K[1],$=g-h,at=v-d,At=(0,z.CR)([h+$*G,d+at*G],2),pt=At[0],wt=At[1],bt=(0,z.CR)([h+$*J,d+at*J],2),Rt=bt[0],Pt=bt[1],xt=D([{line:[[h+w,d+C],[pt,wt]],className:Je.lineFirst.name},{line:[[Rt,Pt],[g+F,v+Q]],className:Je.lineSecond.name}]);return J_(r,t),xt}function t4(r,t,e,n){var i=e.showArrow,a=e.showTrunc,s=e.lineArrow,o=e.lineArrowOffset,A=e.lineArrowSize,l;if(t==="arc"?l=r.select(Je.line.class):a?l=r.select(Je.lineSecond.class):l=r.select(Je.line.class),!i||!s||e.type==="arc"&&P2(e.startAngle,e.endAngle)){var c=l.node();c&&(c.style.markerEnd=void 0);return}var u=Po(s);u.attr(n),r1(u,A,!0),l.style("markerEnd",u).style("markerEndOffset",-o)}function e4(r,t,e){var n=t.type,i,a=en(t,"line");return n==="linear"?i=$_(r,t,f1(a,"arrow"),e):i=X_(r,t,f1(a,"arrow"),e),t4(r,n,t,a),i}function n4(r,t){return v1(r,t.gridDirection,t)}function _2(r){var t=r.type,e=r.gridCenter;return t==="linear"?e:e||r.center}function r4(r,t){var e=t.gridLength;return r.map(function(n,i){var a=n.value,s=(0,z.CR)(E0(a,t),2),o=s[0],A=s[1],l=(0,z.CR)(Do(n4(a,t),e),2),c=l[0],u=l[1];return{id:i,points:[[o,A],[o+c,A+u]]}})}function i4(r,t){var e=t.gridControlAngles,n=_2(t);if(!n)throw new Error("grid center is not provide");if(r.length<2)throw new Error("Invalid grid data");if(!e||e.length===0)throw new Error("Invalid gridControlAngles");var i=(0,z.CR)(n,2),a=i[0],s=i[1];return r.map(function(o,A){var l=o.value,c=(0,z.CR)(E0(l,t),2),u=c[0],h=c[1],d=(0,z.CR)([u-a,h-s],2),f=d[0],g=d[1],v=[];return e.forEach(function(m){var w=Zc(m),C=(0,z.CR)([Math.cos(w),Math.sin(w)],2),F=C[0],Q=C[1],D=f*F-g*Q+a,K=f*Q+g*F+s;v.push([D,K])}),{points:v,id:A}})}function a4(r,t,e,n){var i=e.classNamePrefix,a=en(e,"grid"),s=a.type,o=a.areaFill,A=_2(e),l=g1(t,e.gridFilter),c=s==="segment"?r4(l,e):i4(l,e),u=(0,z.pi)((0,z.pi)({},a),{center:A,areaFill:Wt(o)?l.map(function(h,d){return ga(o,[h,d,l])}):o,animate:n,data:c});return r.selectAll(Je.grid.class).data([1]).join(function(h){var d=h.append(function(){return new G_({style:u})}).attr("className",Je.grid.name);return Ua(d,Je.grid,Vn.grid,i),d},function(h){return h.transition(function(){return this.update(u)})},function(h){return h.remove()}).transitions()}function Fi(r,t,e,n,i){return n===void 0&&(n=!0),i===void 0&&(i=!1),n&&r===t||i&&r===e?!0:r>t&&r<e}var s4=function(r){var t=new DOMParser,e=t.parseFromString(r,"text/html"),n=e.body.firstElementChild;if(console.log(n==null?void 0:n.getClientRects(),11),!n)return 0;var i=n.getAttribute("style")||"",a=Object.fromEntries(i.split(";").map(function(v){return v.trim()}).filter(function(v){return v.includes(":")}).map(function(v){var m=(0,z.CR)(v.split(":").map(function(F){return F.trim()}),2),w=m[0],C=m[1];return[w.toLowerCase(),C]})),s=function(v){if(!v)return 0;var m=v.match(/([\d.]+)px/);return m?parseFloat(m[1]):0};if(a.height)return s(a.height);var o=s(a["font-size"])||16,A=a["line-height"],l;!A||A==="normal"?l=1.2*o:A.endsWith("px")?l=s(A):/^[\d.]+$/.test(A)?l=parseFloat(A)*o:l=o;var c=s(a["padding-top"]),u=s(a["padding-bottom"]);if(a.padding){var h=a.padding.split(/\s+/).map(s);h.length===1||h.length===2?(c=h[0],u=h[0]):(h.length===3||h.length===4)&&(c=h[0],u=h[2])}var d=s(a["border-top-width"]),f=s(a["border-bottom-width"]);if(a.border){var g=a.border.match(/([\d.]+)px/);g&&(d=parseFloat(g[1]),f=parseFloat(g[1]))}if(a["border-width"]){var h=a["border-width"].split(/\s+/).map(s);h.length===1||h.length===2?(d=h[0],f=h[0]):(h.length===3||h.length===4)&&(d=h[0],f=h[2])}return l+c+u+d+f};function o4(r,t,e,n){e===void 0&&(e=2),n===void 0&&(n="top"),b2(r,{wordWrap:!0,wordWrapWidth:t,maxLines:e,textBaseline:n})}function A4(r,t,e){var n=r.getBBox(),i=n.width,a=n.height,s=(0,z.CR)([t,e].map(function(l,c){var u;return l.includes("%")?parseFloat(((u=l.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||u===void 0?void 0:u[0])||"0")/100*(c===0?i:a):l}),2),o=s[0],A=s[1];return[o,A]}function H2(r,t){if(t)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,n=t.replace(e,function(i,a,s){return"translate(".concat(A4(r,a,s),")")});r.attr("transform",n)}catch(i){}}var m1=function(){function r(t,e,n,i){this.set(t,e,n,i)}return Object.defineProperty(r.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(r.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),r.prototype.rotatedPoints=function(t,e,n){var i=this,a=i.x1,s=i.y1,o=i.x2,A=i.y2,l=Math.cos(t),c=Math.sin(t),u=e-e*l+n*c,h=n-e*c-n*l,d=[[l*a-c*A+u,c*a+l*A+h],[l*o-c*A+u,c*o+l*A+h],[l*a-c*s+u,c*a+l*s+h],[l*o-c*s+u,c*o+l*s+h]];return d},r.prototype.set=function(t,e,n,i){return n<t?(this.x2=t,this.x1=n):(this.x1=t,this.x2=n),i<e?(this.y2=e,this.y1=i):(this.y1=e,this.y2=i),this},r.prototype.defined=function(t){return this[t]!==Number.MAX_VALUE&&this[t]!==-Number.MAX_VALUE},r}();function B0(r,t){var e=r.getEulerAngles()||0;r.setEulerAngles(0);var n=r.getBounds(),i=(0,z.CR)(n.min,2),a=i[0],s=i[1],o=(0,z.CR)(n.max,2),A=o[0],l=o[1],c=r.getBBox(),u=c.width,h=c.height,d=h,f=0,g=0,v=a,m=s,w=B2(r);if(w){d-=1.5;var C=w.style.textAlign,F=w.style.textBaseline;C==="center"?v=(a+A)/2:(C==="right"||C==="end")&&(v=A),F==="middle"?m=(s+l)/2:F==="bottom"&&(m=l)}var Q=(0,z.CR)(Ti(t),4),D=Q[0],K=D===void 0?0:D,G=Q[1],J=G===void 0?0:G,$=Q[2],at=$===void 0?K:$,At=Q[3],pt=At===void 0?J:At,wt=new m1((f+=a)-pt,(g+=s)-K,f+u+J,g+d+at);return r.setEulerAngles(e),wt.rotatedPoints(Zc(e),v,m)}function Rh(r,t){return t[0]<=Math.max(r[0][0],r[1][0])&&t[0]<=Math.min(r[0][0],r[1][0])&&t[1]<=Math.max(r[0][1],r[1][1])&&t[1]<=Math.min(r[0][1],r[1][1])}function _h(r,t,e){var n=(t[1]-r[1])*(e[0]-t[0])-(t[0]-r[0])*(e[1]-t[1]);return n===0?0:n<0?2:1}function l4(r,t){var e=_h(r[0],r[1],t[0]),n=_h(r[0],r[1],t[1]),i=_h(t[0],t[1],r[0]),a=_h(t[0],t[1],r[1]);return!!(e!==n&&i!==a||e===0&&Rh(r,t[0])||n===0&&Rh(r,t[1])||i===0&&Rh(t,r[0])||a===0&&Rh(t,r[1]))}function c4(r,t){var e=r.length;if(e<3)return!1;var n=[t,[9999,t[1]]],i=0,a=0;do{var s=[r[a],r[(a+1)%e]];if(l4(s,n)){if(_h(s[0],t,s[1])===0)return Rh(s,t);i++}a=(a+1)%e}while(a!==0);return!!(i&1)}function u4(r,t){return t.every(function(e){return c4(r,e)})}function h4(r,t,e){var n=r.x1,i=r.x2,a=r.y1,s=r.y2,o=[[n,a],[i,a],[i,s],[n,s]],A=B0(t,e);return u4(o,A)}function G2(r,t){var e=(0,z.CR)(r,4),n=e[0],i=e[1],a=e[2],s=e[3],o=(0,z.CR)(t,4),A=o[0],l=o[1],c=o[2],u=o[3],h=a-n,d=s-i,f=c-A,g=u-l,v=h*g-f*d;if(v===0)return!1;var m=v>0,w=n-A,C=i-l,F=h*C-d*w;if(F<0===m)return!1;var Q=f*C-g*w;return!(Q<0===m||F>v===m||Q>v===m)}function K2(r,t){var e=[[r[0],r[1],r[2],r[3]],[r[2],r[3],r[4],r[5]],[r[4],r[5],r[6],r[7]],[r[6],r[7],r[0],r[1]]];return e.some(function(n){return G2(t,n)})}var cK={lineToLine:G2,intersectBoxLine:K2,getBounds:B0};function d4(r,t,e){var n,i,a=B0(r,e).flat(1),s=B0(t,e).flat(1),o=[[a[0],a[1],a[2],a[3]],[a[0],a[1],a[4],a[5]],[a[4],a[5],a[6],a[7]],[a[2],a[3],a[6],a[7]]];try{for(var A=(0,z.XA)(o),l=A.next();!l.done;l=A.next()){var c=l.value;if(K2(s,c))return!0}}catch(u){n={error:u}}finally{try{l&&!l.done&&(i=A.return)&&i.call(A)}finally{if(n)throw n.error}}return!1}function f4(r,t){var e=r.type,n=r.labelDirection,i=r.crossSize;if(!i)return!1;if(e==="arc"){var a=r.center,s=r.radius,o=(0,z.CR)(a,2),A=o[0],l=o[1],c=n==="negative"?0:i,u=-s-c,h=s+c,d=(0,z.CR)(Ti(t),4),f=d[0],g=d[1],v=d[2],m=d[3];return new m1(A+u-m,l+u-f,A+h+g,l+h+v)}var w=(0,z.CR)(r.startPos,2),C=w[0],F=w[1],Q=(0,z.CR)(r.endPos,2),D=Q[0],K=Q[1],G=(0,z.CR)(U2(r)?[-t,0,t,0]:[0,t,0,-t],4),J=G[0],$=G[1],at=G[2],At=G[3],pt=Yc(0,r),wt=Do(pt,i),bt=new m1(C,F,D,K);return bt.x1+=At,bt.y1+=J,bt.x2+=$+wt[0],bt.y2+=at+wt[1],bt}function b0(r,t,e){var n,i,a=t.crossPadding,s=new Set,o=null,A=f4(t,a),l=function(f){return A?h4(A,f):!0},c=function(f,g){return!f||!f.firstChild?!0:!d4(f.firstChild,g.firstChild,Ti(e))};try{for(var u=(0,z.XA)(r),h=u.next();!h.done;h=u.next()){var d=h.value;l(d)?!o||c(o,d)?o=d:(s.add(o),s.add(d)):s.add(d)}}catch(f){n={error:f}}finally{try{h&&!h.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}return Array.from(s)}function y1(r,t){return t===void 0&&(t={}),Pe(r)?0:typeof r=="number"?r:Math.floor(u_(r,t))}function g4(r,t,e,n){if(!(r.length<=0)){var i=t.suffix,a=i===void 0?"...":i,s=t.minLength,o=t.maxLength,A=o===void 0?1/0:o,l=t.step,c=l===void 0?" ":l,u=t.margin,h=u===void 0?[0,0,0,0]:u,d=E2(n.getTextShape(r[0])),f=y1(c,d),g=s?y1(s,d):f,v=y1(A,d);(Pe(v)||v===1/0)&&(v=Math.max.apply(null,r.map(function(wt){return wt.getBBox().width})));for(var m=r.slice(),w=(0,z.CR)(h,4),C=w[0],F=C===void 0?0:C,Q=w[1],D=Q===void 0?0:Q,K=w[2],G=K===void 0?F:K,J=w[3],$=J===void 0?D:J,at=function(wt){if(m.forEach(function(bt){n.ellipsis(n.getTextShape(bt),wt,a)}),m=b0(r,e,h),m.length<1)return{value:void 0}},At=v;At>g+f;At-=f){var pt=at(At);if(typeof pt=="object")return pt.value}}}var v4=function(r){return r!==void 0&&r!=null&&!Number.isNaN(r)},p4={parity:function(r,t){var e=t.seq,n=e===void 0?2:e;return r.filter(function(i,a){return a%n?(Ts(i),!1):!0})}},m4=function(r){return r.filter(v4)};function y4(r,t,e,n){var i=r.length,a=t.keepHeader,s=t.keepTail;if(!(i<=1||i===2&&a&&s)){var o=p4.parity,A=function(C){return C.forEach(n.show),C},l=2,c=r.slice(),u=r.slice(),h=Math.min.apply(Math,(0,z.ev)([1],(0,z.CR)(r.map(function(C){return C.getBBox().width})),!1));if(e.type==="linear"&&(p1(e)||U2(e))){var d=w2(r[0]).left,f=w2(r[i-1]).right,g=Math.abs(f-d)||1;l=Math.max(Math.floor(i*h/g),l)}var v,m;for(a&&(v=c.splice(0,1)[0]),s&&(m=c.splice(-1,1)[0],c.reverse()),A(c);l<r.length&&b0(m4(m?(0,z.ev)((0,z.ev)([m],(0,z.CR)(u),!1),[v],!1):(0,z.ev)([v],(0,z.CR)(u),!1)),e,t==null?void 0:t.margin).length;){if(m&&!v&&l%2===0){var w=c.splice(0,1);w.forEach(n.hide)}else if(m&&v){var w=c.splice(0,1);w.forEach(n.hide)}u=o(A(c),{seq:l}),l++}}}function w4(r,t,e,n){var i,a,s=t.optionalAngles,o=s===void 0?[0,45,90]:s,A=t.margin,l=t.recoverWhenFailed,c=l===void 0?!0:l,u=r.map(function(m){return m.getLocalEulerAngles()}),h=function(){return b0(r,e,A).length<1},d=function(m){return r.forEach(function(w,C){var F=Array.isArray(m)?m[C]:m;n.rotate(w,+F)})};try{for(var f=(0,z.XA)(o),g=f.next();!g.done;g=f.next()){var v=g.value;if(d(v),h())return}}catch(m){i={error:m}}finally{try{g&&!g.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}c&&d(u)}function E4(r){var t=r.type,e=r.labelDirection;return t==="linear"&&p1(r)?e==="negative"?"bottom":"top":"middle"}function B4(r,t,e,n,i){var a,s=t.maxLines,o=s===void 0?3:s,A=t.recoverWhenFailed,l=A===void 0?!0:A,c=t.margin,u=c===void 0?[0,0,0,0]:c,h=ga((a=t.wordWrapWidth)!==null&&a!==void 0?a:50,[i]),d=r.map(function(C){return C.attr("maxLines")||1}),f=Math.min.apply(Math,(0,z.ev)([],(0,z.CR)(d),!1)),g=function(){return b0(r,e,u).length<1},v=E4(e),m=function(C){return r.forEach(function(F,Q){var D=Array.isArray(C)?C[Q]:C;n.wrap(F,h,D,v)})};if(!(f>o)){if(e.type==="linear"&&p1(e)){if(m(o),g())return}else for(var w=f;w<=o;w++)if(m(w),g())return;l&&m(d)}}var b4=new Map([["hide",y4],["rotate",w4],["ellipsis",g4],["wrap",B4]]);function x4(r,t,e){return t.labelOverlap.length<1?!1:e==="hide"?!vR(r[0]):e==="rotate"?!r.some(function(n){var i;return!!(!((i=n.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):e==="ellipsis"||e==="wrap"?r.filter(function(n){return n.querySelector("text")}).length>=1:!0}function C4(r,t,e,n){var i=t.labelOverlap,a=i===void 0?[]:i;a.length&&a.forEach(function(s){var o=s.type,A=b4.get(o);x4(r,t,o)&&(A==null||A(r,s,t,n,e))})}function S4(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var e=function(n){return n==="positive"?-1:1};return r.reduce(function(n,i){return n*e(i)},1)}function z2(r){for(var t=r;t<0;)t+=360;return Math.round(t%360)}function w1(r,t){var e=(0,z.CR)(r,2),n=e[0],i=e[1],a=(0,z.CR)(t,2),s=a[0],o=a[1],A=(0,z.CR)([n*s+i*o,n*o-i*s],2),l=A[0],c=A[1];return Math.atan2(c,l)}function M4(r){var t=(r+360)%180;return Fi(t,-90,90)||(t+=180),t}function T4(r,t,e){var n,i=e.labelAlign,a=(n=t.style.transform)===null||n===void 0?void 0:n.includes("rotate");if(a)return t.getLocalEulerAngles();var s=0,o=Yc(r.value,e),A=w0(r.value,e);return i==="horizontal"?0:(i==="perpendicular"?s=w1([1,0],o):s=w1([A[0]<0?-1:1,0],A),M4(I2(s)))}function V2(r,t,e){var n=e.type,i=e.labelAlign,a=Yc(r,e),s=z2(t),o=z2(I2(w1([1,0],a))),A="center",l="middle";return n==="linear"?[90,270].includes(o)&&s===0?(A="center",l=a[1]===1?"top":"bottom"):!(o%180)&&[90,270].includes(s)?A="center":o===0?(Fi(s,0,90,!1,!0)||Fi(s,0,90)||Fi(s,270,360))&&(A="start"):o===90?Fi(s,0,90,!1,!0)?A="start":(Fi(s,90,180)||Fi(s,270,360))&&(A="end"):o===270?Fi(s,0,90,!1,!0)?A="end":(Fi(s,90,180)||Fi(s,270,360))&&(A="start"):o===180&&(s===90?A="start":(Fi(s,0,90)||Fi(s,270,360))&&(A="end")):i==="parallel"?Fi(o,0,180,!0)?l="top":l="bottom":i==="horizontal"?Fi(o,90,270,!1)?A="end":(Fi(o,270,360,!1)||Fi(o,0,90))&&(A="start"):i==="perpendicular"&&(Fi(o,90,270)?A="end":A="start"),{textAlign:A,textBaseline:l}}function F4(r,t,e){t.setLocalEulerAngles(r);var n=t.__data__.value,i=V2(n,r,e),a=t.querySelector(Je.labelItem.class);a&&Z2(a,i)}function W2(r,t,e){var n=e.showTick,i=e.tickLength,a=e.tickDirection,s=e.labelDirection,o=e.labelSpacing,A=t.indexOf(r),l=ga(o,[r,A,t]),c=(0,z.CR)([Yc(r.value,e),S4(s,a)],2),u=c[0],h=c[1],d=h===1?ga(n?i:0,[r,A,t]):0,f=(0,z.CR)(Uh(Do(u,l+d),E0(r.value,e)),2),g=f[0],v=f[1];return{x:g,y:v}}function O4(r,t,e,n){var i=n.labelFormatter,a=Wt(i)?function(){return Po(ga(i,[r,t,e,Yc(r.value,n)]))}:function(){return Po(r.label||"")};return a}function I4(r,t,e,n){var i=n.labelRender,a=(Mi(n,"endPos.0",400)-Mi(n,"startPos.0",0))/e.length,s=Wt(i)?ga(i,[r,t,e,Yc(r.value,n)]):r.label||"",o=s4(s)||30;return function(){return c_(s,{width:a,height:o})}}var L4={html:["fill"],text:[]};function Z2(r,t){["text","html"].includes(r.nodeName)&&r.attr(f1(t,L4[r.nodeName]))}function N4(r,t){C4(this.node().childNodes,r,t,{hide:Ts,show:Qh,rotate:function(e,n){F4(+n,e,r)},ellipsis:function(e,n,i){e&&s1(e,n||1/0,i)},wrap:function(e,n,i){e&&o4(e,n,i)},getTextShape:function(e){return e.querySelector(Je.labelItem.class)}})}function j2(r,t,e,n,i){var a=e.indexOf(t),s=i.labelRender,o=i.classNamePrefix,A=Le(r).append(s?I4(t,a,e,i):O4(t,a,e,i)).attr("className",Je.labelItem.name).node();Ua(Le(A),Je.labelItem,Vn.labelItem,o);var l=(0,z.CR)(Uo(k2(n,[t,a,e])),2),c=l[0],u=l[1],h=u.transform,d=(0,z._T)(u,["transform"]);H2(A,h);var f=T4(t,A,i);if(A.getLocalEulerAngles()||A.setLocalEulerAngles(f),Z2(A,(0,z.pi)((0,z.pi)({},V2(t.value,f,i)),c)),A.nodeName==="html"){var g=A.getBBox(),v=A.style.x||0;A.attr("x",v-g.width/2)}return r.attr(d),A}function k4(r,t,e,n,i){var a=e.classNamePrefix,s=g1(t,e.labelFilter),o=en(e,"label"),A,l=r.selectAll(Je.label.class).data(s,function(c,u){return u}).join(function(c){var u=c.append("g").attr("className",Je.label.name).transition(function(h){j2(this,h,t,o,e);var d=W2(h,t,e),f=d.x,g=d.y;return this.style.transform="translate(".concat(f,", ").concat(g,")"),null});return Ua(u,Je.label,Vn.label,a),u},function(c){return c.transition(function(u){var h=this.querySelector(Je.labelItem.class),d=j2(this,u,t,o,e),f=QR(h,d,n.update),g=W2(u,t,e),v=g.x,m=g.y,w=Os(this,{transform:"translate(".concat(v,", ").concat(m,")")},n.update);return(0,z.ev)((0,z.ev)([],(0,z.CR)(f),!1),[w],!1)})},function(c){return A=c,c.transition(function(){var u=this,h=y0(this.childNodes[0],n.exit);return Wc(h,function(){return Le(u).remove()}),h}),A}).transitions();return NR(l,function(){N4.call(r,e,i)}),l}function Y2(r,t){return v1(r,t.tickDirection,t)}function Q4(r,t){var e=(0,z.CR)(r,2),n=e[0],i=e[1];return[[0,0],[n*t,i*t]]}function U4(r,t,e,n,i){var a=i.tickLength,s=(0,z.CR)(Q4(n,ga(a,[r,t,e])),2),o=(0,z.CR)(s[0],2),A=o[0],l=o[1],c=(0,z.CR)(s[1],2),u=c[0],h=c[1];return{x1:A,x2:u,y1:l,y2:h}}function P4(r,t,e,n,i){var a=i.tickFormatter,s=i.classNamePrefix,o=Y2(t.value,i),A="line";Wt(a)&&(A=function(){return ga(a,[t,e,n,o])});var l=r.append(A).attr("className",Je.tickItem.name);return Ua(l,Je.tickItem,Vn.tickItem,s),l}function D4(r,t,e,n,i,a,s){var o=Y2(r.value,a),A=U4(r,t,e,o,a),l=A.x1,c=A.x2,u=A.y1,h=A.y2,d=(0,z.CR)(Uo(k2(s,[r,t,e,o])),2),f=d[0],g=d[1];n.node().nodeName==="line"&&n.styles((0,z.pi)({x1:l,x2:c,y1:u,y2:h},f)),i.attr(g),n.styles(f)}function X2(r,t,e,n,i,a){var s=P4(Le(this),r,t,e,n);D4(r,t,e,s,this,n,i);var o=(0,z.CR)(E0(r.value,n),2),A=o[0],l=o[1];return Os(this,{transform:"translate(".concat(A,", ").concat(l,")")},a)}function R4(r,t,e,n){var i=e.classNamePrefix,a=g1(t,e.tickFilter),s=en(e,"tick");return r.selectAll(Je.tick.class).data(a,function(o){return o.id||o.label}).join(function(o){var A=o.append("g").attr("className",Je.tick.name).transition(function(l,c){return X2.call(this,l,c,a,e,s,!1)});return Ua(A,Je.tick,Vn.tick,i),A},function(o){return o.transition(function(A,l){return this.removeChildren(),X2.call(this,A,l,a,e,s,n.update)})},function(o){return o.transition(function(){var A=this,l=y0(this.childNodes[0],n.exit);return Wc(l,function(){return A.remove()}),l})}).transitions()}function _4(r,t,e){var n=e.titlePosition,i=n===void 0?"lb":n,a=e.titleSpacing,s=h0(i),o=r.node().getLocalBounds(),A=(0,z.CR)(o.min,2),l=A[0],c=A[1],u=(0,z.CR)(o.halfExtents,2),h=u[0],d=u[1],f=(0,z.CR)(t.node().getLocalBounds().halfExtents,2),g=f[0],v=f[1],m=(0,z.CR)([l+h,c+d],2),w=m[0],C=m[1],F=(0,z.CR)(Ti(a),4),Q=F[0],D=F[1],K=F[2],G=F[3];if(["start","end"].includes(i)&&e.type==="linear"){var J=e.startPos,$=e.endPos,at=(0,z.CR)(i==="start"?[J,$]:[$,J],2),At=at[0],pt=at[1],wt=O2([-pt[0]+At[0],-pt[1]+At[1]]),bt=(0,z.CR)(Do(wt,Q),2),Rt=bt[0],Pt=bt[1];return{x:At[0]+Rt,y:At[1]+Pt}}return s.includes("t")&&(C-=d+v+Q),s.includes("r")&&(w+=h+g+D),s.includes("l")&&(w-=h+g+G),s.includes("b")&&(C+=d+v+K),{x:w,y:C}}function H4(r,t,e){var n=r.getGeometryBounds().halfExtents,i=n[1]*2;if(t==="vertical"){if(e==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(e==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function J2(r,t,e,n,i){var a=en(n,"title"),s=(0,z.CR)(Uo(a),2),o=s[0],A=s[1],l=A.transform,c=A.transformOrigin,u=(0,z._T)(A,["transform","transformOrigin"]);t.styles(u);var h=l||H4(r.node(),o.direction,o.position);r.styles((0,z.pi)((0,z.pi)({},o),{transformOrigin:c})),H2(r.node(),h);var d=_4(Le(e._offscreen||e.querySelector(Je.mainGroup.class)),t,n),f=d.x,g=d.y,v=Os(t.node(),{transform:"translate(".concat(f,", ").concat(g,")")},i);return v}function G4(r,t,e,n){var i=e.titleText,a=e.classNamePrefix;return r.selectAll(Je.title.class).data([{title:i}].filter(function(s){return!!s.title}),function(s,o){return s.title}).join(function(s){var o=s.append(function(){return Po(i)}).attr("className",Je.title.name).transition(function(){return J2(Le(this),r,t,e,n.enter)});return Ua(o,Je.title,Vn.title,a),o},function(s){return s.transition(function(){return J2(Le(this),r,t,e,n.update)})},function(s){return s.remove()}).transitions()}function q2(r,t,e,n){var i=r.showLine,a=r.showTick,s=r.showLabel,o=r.classNamePrefix,A=t.maybeAppendByClassName(Je.lineGroup,"g");Ua(A,Je.lineGroup,Vn.lineGroup,o);var l=fa(i,A,function(f){return e4(f,r,n)})||[],c=t.maybeAppendByClassName(Je.tickGroup,"g");Ua(c,Je.tickGroup,Vn.tickGroup,o);var u=fa(a,c,function(f){return R4(f,e,r,n)})||[],h=t.maybeAppendByClassName(Je.labelGroup,"g");Ua(h,Je.labelGroup,Vn.labelGroup,o);var d=fa(s,h,function(f){return k4(f,e,r,n,t.node())})||[];return(0,z.ev)((0,z.ev)((0,z.ev)([],(0,z.CR)(l),!1),(0,z.CR)(u),!1),(0,z.CR)(d),!1).filter(function(f){return!!f})}var K4=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,e,c1)||this}return t.prototype.render=function(e,n,i){var a=this,s=e.titleText,o=e.data,A=e.animate,l=e.showTitle,c=e.showGrid,u=e.dataThreshold,h=e.truncRange,d=e.classNamePrefix,f=n.className||"axis";d?n.attr("className","".concat(f," ").concat(d,"axis")):n.className||n.attr("className","axis");var g=N_(o,u).filter(function(K){var G=K.value;return!(h&&G>h[0]&&G<h[1])}),v=h2(i===void 0?A:i),m=Le(n).maybeAppendByClassName(Je.gridGroup,"g");Ua(m,Je.gridGroup,Vn.gridGroup,d);var w=fa(c,m,function(K){return a4(K,g,e,v)})||[],C=Le(n).maybeAppendByClassName(Je.mainGroup,"g");Ua(C,Je.mainGroup,Vn.mainGroup,d),s&&(!this.initialized&&v.enter||this.initialized&&v.update)&&q2(e,Le(this.offscreenGroup),g,h2(!1));var F=q2(e,Le(C.node()),g,v),Q=Le(n).maybeAppendByClassName(Je.titleGroup,"g");Ua(Q,Je.titleGroup,Vn.titleGroup,d);var D=fa(l,Q,function(K){return G4(K,a,e,v)})||[];return(0,z.ev)((0,z.ev)((0,z.ev)([],(0,z.CR)(w),!1),(0,z.CR)(F),!1),(0,z.CR)(D),!1).flat().filter(function(K){return!!K})},t}(Sr);function uK(r){var t=r.canvas,e=r.touches,n=r.offsetX,i=r.offsetY;if(t){var a=t.x,s=t.y;return[a,s]}if(e){var o=e[0],A=o.clientX,l=o.clientY;return[A,l]}return n&&i?[n,i]:[0,0]}function $2(r){var t=r.nativeEvent,e=r.touches,n=r.clientX,i=r.clientY;if(t)return[t.clientX,t.clientY];if(e){var a=e[0],s=a.clientX,o=a.clientY;return[s,o]}return typeof n=="number"&&typeof i=="number"?[n,i]:[0,0]}function E1(r,t){return+r.toPrecision(t)}function hK(r){return r.toLocaleString()}function dK(r){return r.toExponential()}function fK(r,t){return t===void 0&&(t=0),Math.abs(r)<1e3?String(r):"".concat(E1(r/1e3,t).toLocaleString(),"K")}var gK=function(r,t,e){return r<0&&Number.isFinite(r)?t:e},vK=function(r,t,e){return r>0&&Number.isFinite(r)?t:e},pK=function(r,t){return r*t},mK=function(r,t){return r/2+(t||0)/2},B1=function(r){return r};class tS{constructor(t){this.options=Ci({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Ci({},this.options,t),this.rescale(t)}rescale(t){}}function b1(r,t){return t-r?e=>(e-r)/(t-r):e=>.5}function x0(r,...t){return t.reduce((e,n)=>i=>e(n(i)),r)}function z4(r,t,e,n,i){let a=e||0,s=n||r.length;const o=i||(A=>A);for(;a<s;){const A=Math.floor((a+s)/2);o(r[A])>t?s=A:a=A+1}return a}var V4=M(75196),W4=M.n(V4);function x1(r,t,e){let n=e;return n<0&&(n+=1),n>1&&(n-=1),n<1/6?r+(t-r)*6*n:n<1/2?t:n<2/3?r+(t-r)*(2/3-n)*6:r}function Z4(r){const t=r[0]/360,e=r[1]/100,n=r[2]/100,i=r[3];if(e===0)return[n*255,n*255,n*255,i];const a=n<.5?n*(1+e):n+e-n*e,s=2*n-a,o=x1(s,a,t+1/3),A=x1(s,a,t),l=x1(s,a,t-1/3);return[o*255,A*255,l*255,i]}function eS(r){const t=W4().get(r);if(!t)return null;const{model:e,value:n}=t;return e==="rgb"?n:e==="hsl"?Z4(n):null}const C0=(r,t)=>e=>r*(1-e)+t*e,j4=(r,t)=>{const e=eS(r),n=eS(t);return e===null||n===null?e?()=>r:()=>t:i=>{const a=new Array(4);for(let c=0;c<4;c+=1){const u=e[c],h=n[c];a[c]=u*(1-i)+h*i}const[s,o,A,l]=a;return`rgba(${Math.round(s)}, ${Math.round(o)}, ${Math.round(A)}, ${l})`}},Y4=(r,t)=>typeof r=="number"&&typeof t=="number"?C0(r,t):typeof r=="string"&&typeof t=="string"?j4(r,t):()=>r,X4=(r,t)=>{const e=C0(r,t);return n=>Math.round(e(n))};function J4(r){return r===null}function nS(r){return!Ye(r)&&!J4(r)&&!Number.isNaN(r)}const C1=Math.sqrt(50),S1=Math.sqrt(10),M1=Math.sqrt(2);function S0(r,t,e){const n=(t-r)/Math.max(0,e),i=Math.floor(Math.log(n)/Math.LN10),a=n/QA(10,i);return i>=0?(a>=C1?10:a>=S1?5:a>=M1?2:1)*QA(10,i):-QA(10,-i)/(a>=C1?10:a>=S1?5:a>=M1?2:1)}function yK(r,t,e){const n=Math.abs(t-r)/Math.max(0,e);let i=QA(10,Math.floor(Math.log(n)/Math.LN10));const a=n/i;return a>=C1?i*=10:a>=S1?i*=5:a>=M1&&(i*=2),t<r?-i:i}const q4=(r,t,e=5)=>{const n=[r,t];let i=0,a=n.length-1,s=n[i],o=n[a],A;return o<s&&([s,o]=[o,s],[i,a]=[a,i]),A=S0(s,o,e),A>0?(s=Math.floor(s/A)*A,o=Math.ceil(o/A)*A,A=S0(s,o,e)):A<0&&(s=Math.ceil(s*A)/A,o=Math.floor(o*A)/A,A=S0(s,o,e)),A>0?(n[i]=Math.floor(s/A)*A,n[a]=Math.ceil(o/A)*A):A<0&&(n[i]=Math.ceil(s*A)/A,n[a]=Math.floor(o*A)/A),n};function $4(r,t){const e=t<r?t:r,n=r>t?r:t;return i=>Math.min(Math.max(e,i),n)}const tH=(r,t,e)=>{const[n,i]=r,[a,s]=t;let o,A;return n<i?(o=b1(n,i),A=e(a,s)):(o=b1(i,n),A=e(s,a)),x0(A,o)},eH=(r,t,e)=>{const n=Math.min(r.length,t.length)-1,i=new Array(n),a=new Array(n),s=r[0]>r[n],o=s?[...r].reverse():r,A=s?[...t].reverse():t;for(let l=0;l<n;l+=1)i[l]=b1(o[l],o[l+1]),a[l]=e(A[l],A[l+1]);return l=>{const c=z4(r,l,1,n)-1,u=i[c],h=a[c];return x0(h,u)(l)}},rS=(r,t,e,n)=>(Math.min(r.length,t.length)>2?eH:tH)(r,t,n?X4:e);class nH extends tS{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:C0,tickCount:5}}map(t){return nS(t)?this.output(t):this.options.unknown}invert(t){return nS(t)?this.input(t):this.options.unknown}nice(){if(!this.options.nice)return;const[t,e,n,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(t,e,n,...i)}getTicks(){const{tickMethod:t}=this.options,[e,n,i,...a]=this.getTickMethodOptions();return t(e,n,i,...a)}getTickMethodOptions(){const{domain:t,tickCount:e}=this.options,n=t[0],i=t[t.length-1];return[n,i,e]}chooseNice(){return q4}rescale(){this.nice();const[t,e]=this.chooseTransforms();this.composeOutput(t,this.chooseClamp(t)),this.composeInput(t,e,this.chooseClamp(e))}chooseClamp(t){const{clamp:e,range:n}=this.options,i=this.options.domain.map(t),a=Math.min(i.length,n.length);return e?$4(i[0],i[a-1]):B1}composeOutput(t,e){const{domain:n,range:i,round:a,interpolate:s}=this.options,o=rS(n.map(t),i,s,a);this.output=x0(o,e,t)}composeInput(t,e,n){const{domain:i,range:a}=this.options,s=rS(a,i.map(t),C0);this.input=x0(e,n,s)}}const rH=(r,t,e)=>{let n,i,a=r,s=t;if(a===s&&e>0)return[a];let o=S0(a,s,e);if(o===0||!Number.isFinite(o))return[];if(o>0){a=Math.ceil(a/o),s=Math.floor(s/o),i=new Array(n=Math.ceil(s-a+1));for(let A=0;A<n;A+=1)i[A]=(a+A)*o}else{o=-o,a=Math.ceil(a*o),s=Math.floor(s*o),i=new Array(n=Math.ceil(s-a+1));for(let A=0;A<n;A+=1)i[A]=(a+A)/o}return i};class Hh extends nH{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Y4,tickMethod:rH,tickCount:5}}chooseTransforms(){return[B1,B1]}clone(){return new Hh(this.options)}}function iS({map:r,initKey:t},e){const n=t(e);return r.has(n)?r.get(n):e}function iH({map:r,initKey:t},e){const n=t(e);return r.has(n)?r.get(n):(r.set(n,e),e)}function aH({map:r,initKey:t},e){const n=t(e);return r.has(n)&&(e=r.get(n),r.delete(n)),e}function sH(r){return typeof r=="object"?r.valueOf():r}class aS extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=sH,t!==null)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(iS({map:this.map,initKey:this.initKey},t))}has(t){return super.has(iS({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(iH({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(aH({map:this.map,initKey:this.initKey},t))}}const T1=Symbol("defaultUnknown");function sS(r,t,e){for(let n=0;n<t.length;n+=1)r.has(t[n])||r.set(e(t[n]),n)}function oS(r){const{value:t,from:e,to:n,mapper:i,notFoundReturn:a}=r;let s=i.get(t);if(s===void 0){if(a!==T1)return a;s=e.push(t)-1,i.set(t,s)}return n[s%n.length]}function AS(r){return r instanceof Date?t=>`${t}`:typeof r=="object"?t=>JSON.stringify(t):t=>t}class F1 extends tS{getDefaultOptions(){return{domain:[],range:[],unknown:T1}}constructor(t){super(t)}map(t){return this.domainIndexMap.size===0&&sS(this.domainIndexMap,this.getDomain(),this.domainKey),oS({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return this.rangeIndexMap.size===0&&sS(this.rangeIndexMap,this.getRange(),this.rangeKey),oS({value:this.rangeKey(t),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(t){const[e]=this.options.domain,[n]=this.options.range;if(this.domainKey=AS(e),this.rangeKey=AS(n),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!t||t.range)&&this.rangeIndexMap.clear(),(!t||t.domain||t.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new F1(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:t,compare:e}=this.options;return this.sortedDomain=e?[...t].sort(e):t,this.sortedDomain}}function oH(r){const t=Math.min(...r);return r.map(e=>e/t)}function AH(r,t){const e=r.length,n=t-e;return n>0?[...r,...new Array(n).fill(1)]:n<0?r.slice(0,t):r}function lH(r){return Math.round(r*1e12)/1e12}function cH(r){const{domain:t,range:e,paddingOuter:n,paddingInner:i,flex:a,round:s,align:o}=r,A=t.length,l=AH(a,A),[c,u]=e,h=u-c,d=2/A*n+1-1/A*i,f=h/d,g=f*i/A,v=f-A*g,m=oH(l),w=m.reduce((At,pt)=>At+pt),C=v/w,F=new aS(t.map((At,pt)=>{const wt=m[pt]*C;return[At,s?Math.floor(wt):wt]})),Q=new aS(t.map((At,pt)=>{const bt=m[pt]*C+g;return[At,s?Math.floor(bt):bt]})),D=Array.from(Q.values()).reduce((At,pt)=>At+pt),G=(h-(D-D/A*i))*o,J=c+G;let $=s?Math.round(J):J;const at=new Array(A);for(let At=0;At<A;At+=1){at[At]=lH($);const pt=t[At];$+=Q.get(pt)}return{valueBandWidth:F,valueStep:Q,adjustedRange:at}}function uH(r){var t;const{domain:e}=r,n=e.length;if(n===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((t=r.flex)===null||t===void 0)&&t.length))return cH(r);const{range:a,paddingOuter:s,paddingInner:o,round:A,align:l}=r;let c,u,h=a[0];const f=a[1]-h,g=s*2,v=n-o;c=f/Math.max(1,g+v),A&&(c=Math.floor(c)),h+=(f-c*(n-o))*l,u=c*(1-o),A&&(h=Math.round(h),u=Math.round(u));const m=new Array(n).fill(0).map((w,C)=>h+C*c);return{valueStep:c,valueBandWidth:u,adjustedRange:m}}class O1 extends F1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:T1,flex:[]}}constructor(t){super(t)}clone(){return new O1(this.options)}getStep(t){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:t===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(t)}getBandWidth(t){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:t===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(t)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:t,paddingInner:e}=this.options;return t>0?t:e}getPaddingOuter(){const{padding:t,paddingOuter:e}=this.options;return t>0?t:e}rescale(){super.rescale();const{align:t,domain:e,range:n,round:i,flex:a}=this.options,{adjustedRange:s,valueBandWidth:o,valueStep:A}=uH({align:t,range:n,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:e});this.valueStep=A,this.valueBandWidth=o,this.adjustedRange=s}}var hH=function(r){(0,z.ZT)(t,r);function t(e){var n=this,i=e.style,a=(0,z._T)(e,["style"]);return n=r.call(this,Ci({},{type:"column"},(0,z.pi)({style:i},a)))||this,n.columnsGroup=new oi({name:"columns"}),n.appendChild(n.columnsGroup),n.render(),n}return t.prototype.render=function(){var e=this.attributes,n=e.columns,i=e.x,a=e.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),Le(this.columnsGroup).selectAll(".column").data(n.flat()).join(function(s){return s.append("rect").attr("className","column").each(function(o){this.attr(o)})},function(s){return s.each(function(o){this.attr(o)})},function(s){return s.remove()})},t.prototype.update=function(e){this.attr(Zr({},this.attributes,e)),this.render()},t.prototype.clear=function(){this.removeChildren()},t}(ir),dH=function(r){(0,z.ZT)(t,r);function t(e){var n=this,i=e.style,a=(0,z._T)(e,["style"]);return n=r.call(this,Ci({},{type:"lines"},(0,z.pi)({style:i},a)))||this,n.linesGroup=n.appendChild(new oi),n.areasGroup=n.appendChild(new oi),n.render(),n}return t.prototype.render=function(){var e=this.attributes,n=e.lines,i=e.areas,a=e.x,s=e.y;this.style.transform="translate(".concat(a,", ").concat(s,")"),n&&this.renderLines(n),i&&this.renderAreas(i)},t.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},t.prototype.update=function(e){this.attr(Zr({},this.attributes,e)),this.render()},t.prototype.renderLines=function(e){Le(this.linesGroup).selectAll(".line").data(e).join(function(n){return n.append("path").attr("className","line").each(function(i){this.attr(i)})},function(n){return n.each(function(i){this.attr(i)})},function(n){return n.remove()})},t.prototype.renderAreas=function(e){Le(this.linesGroup).selectAll(".area").data(e).join(function(n){return n.append("path").attr("className","area").each(function(i){this.attr(i)})},function(n){return n.each(function(i){this.style(i)})},function(n){return n.remove()})},t}(ir);function fH(r,t,e,n){var i,a=[],s=!!n,o,A,l=[1/0,1/0],c=[-1/0,-1/0],u,h,d;if(s){i=(0,z.CR)(n,2),l=i[0],c=i[1];for(var f=0,g=r.length;f<g;f+=1){var v=r[f];l=Ul(l,v),c=Pl(c,v)}}for(var f=0,m=r.length;f<m;f+=1){var v=r[f];if(f===0&&!e)d=v;else if(f===m-1&&!e)h=v,a.push(d),a.push(h);else{var w=[f?f-1:m-1,f-1][e?0:1];o=r[w],A=r[e?(f+1)%m:f+1];var C=[0,0];C=u1(A,o),C=Do(C,t);var F=Ph(v,o),Q=Ph(v,A),D=F+Q;D!==0&&(F/=D,Q/=D);var K=Do(C,-F),G=Do(C,Q);h=Uh(v,K),u=Uh(v,G),u=Ul(u,Pl(A,v)),u=Pl(u,Ul(A,v)),K=u1(u,v),K=Do(K,-F/Q),h=Uh(v,K),h=Ul(h,Pl(o,v)),h=Pl(h,Ul(o,v)),G=u1(v,h),G=Do(G,Q/F),u=Uh(v,G),s&&(h=Pl(h,l),h=Ul(h,c),u=Pl(u,l),u=Ul(u,c)),a.push(d),a.push(h),d=u}}return e&&a.push(a.shift()),a}function gH(r,t,e){var n;t===void 0&&(t=!1),e===void 0&&(e=[[0,0],[1,1]]);for(var i=!!t,a=[],s=0,o=r.length;s<o;s+=2)a.push([r[s],r[s+1]]);for(var A=fH(a,.4,i,e),l=a.length,c=[],u,h,d,s=0;s<l-1;s+=1)u=A[s*2],h=A[s*2+1],d=a[s+1],c.push(["C",u[0],u[1],h[0],h[1],d[0],d[1]]);return i&&(u=A[l],h=A[l+1],n=(0,z.CR)(a,1),d=n[0],c.push(["C",u[0],u[1],h[0],h[1],d[0],d[1]])),c}function vH(r,t){var e,n=t.x,i=t.y,a=(0,z.CR)(i.getOptions().range||[0,0],2),s=a[0],o=a[1];return o>s&&(e=(0,z.CR)([s,o],2),o=e[0],s=e[1]),r.map(function(A){var l=A.map(function(c,u){return[n.map(u),hr(i.map(c),o,s)]});return l})}function Gh(r,t){t===void 0&&(t=!1);var e=t?r.length-1:0,n=r.map(function(i,a){return(0,z.ev)([a===e?"M":"L"],(0,z.CR)(i),!1)});return t?n.reverse():n}function M0(r,t){if(t===void 0&&(t=!1),r.length<=2)return Gh(r);for(var e=[],n=r.length,i=0;i<n;i+=1){var a=t?r[n-i-1]:r[i];Dr(a,e.slice(-2))||e.push.apply(e,(0,z.ev)([],(0,z.CR)(a),!1))}var s=gH(e,!1);return t?s.unshift((0,z.ev)(["M"],(0,z.CR)(r[n-1]),!1)):s.unshift((0,z.ev)(["M"],(0,z.CR)(r[0]),!1)),s}function I1(r,t,e){var n=Nc(r);return n.push(["L",t,e],["L",0,e],["Z"]),n}function pH(r,t,e,n){return r.map(function(i){return I1(t?M0(i):Gh(i),e,n)})}function mH(r,t,e){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=Gh(a),o=void 0;if(i===0)o=I1(s,t,e);else{var A=r[i-1],l=Gh(A,!0);l[0][0]="L",o=(0,z.ev)((0,z.ev)((0,z.ev)([],(0,z.CR)(s),!1),(0,z.CR)(l),!1),[["Z"]],!1)}n.push(o)}return n}function yH(r,t,e){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=M0(a),o=void 0;if(i===0)o=I1(s,t,e);else{var A=r[i-1],l=M0(A,!0),c=a[0];l[0][0]="L",o=(0,z.ev)((0,z.ev)((0,z.ev)([],(0,z.CR)(s),!1),(0,z.CR)(l),!1),[(0,z.ev)(["M"],(0,z.CR)(c),!1),["Z"]],!1)}n.push(o)}return n}var wH=function(r,t){if(Ni(r)){for(var e,n=1/0,i=0;i<r.length;i++){var a=r[i],s=Wt(t)?t(a):a[t];s<n&&(e=a,n=s)}return e}},EH=function(r,t){if(Ni(r)){for(var e,n=-1/0,i=0;i<r.length;i++){var a=r[i],s=Wt(t)?t(a):a[t];s>n&&(e=a,n=s)}return e}};function lS(r){return r.length===0?[0,0]:[$l(wH(r,function(t){return $l(t)||0})),tc(EH(r,function(t){return tc(t)||0}))]}function cS(r){for(var t=Nc(r),e=t[0].length,n=(0,z.CR)([Array(e).fill(0),Array(e).fill(0)],2),i=n[0],a=n[1],s=0;s<t.length;s+=1)for(var o=t[s],A=0;A<e;A+=1)o[A]>=0?(o[A]+=i[A],i[A]=o[A]):(o[A]+=a[A],a[A]=o[A]);return t}var BH=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,e,{type:"line",x:0,y:0,width:200,height:20,isStack:!1,color:["#83daad","#edbf45","#d2cef9","#e290b3","#6f63f4"],smooth:!0,lineLineWidth:1,areaOpacity:0,isGroup:!1,columnLineWidth:1,columnStroke:"#fff",scale:1,spacing:0})||this}return Object.defineProperty(t.prototype,"rawData",{get:function(){var e=this.attributes.data;if(!e||(e==null?void 0:e.length)===0)return[[]];var n=Nc(e);return ye(n[0])?[n]:n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.attributes.isStack?cS(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"baseline",{get:function(){var e=this.scales.y,n=(0,z.CR)(e.getOptions().domain||[0,0],2),i=n[0],a=n[1];return a<0?e.map(a):e.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"containerShape",{get:function(){var e=this.attributes,n=e.width,i=e.height;return{width:n,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"linesStyle",{get:function(){var e=this,n=this.attributes,i=n.type,a=n.isStack,s=n.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var o=en(this.attributes,"area"),A=en(this.attributes,"line"),l=this.containerShape.width,c=this.data;if(c[0].length===0)return{lines:[],areas:[]};var u=this.scales,h=u.x,d=u.y,f=vH(c,{type:"line",x:h,y:d}),g=[];if(o){var v=this.baseline;a?g=s?yH(f,l,v):mH(f,l,v):g=pH(f,s,l,v)}return{lines:f.map(function(m,w){return(0,z.pi)({stroke:e.getColor(w),d:s?M0(m):Gh(m)},A)}),areas:g.map(function(m,w){return(0,z.pi)({d:m,fill:e.getColor(w)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsStyle",{get:function(){var e=this,n=en(this.attributes,"column"),i=this.attributes,a=i.isStack,s=i.type,o=i.scale;if(s!=="column")throw new Error("columnsStyle can only be used in column type");var A=this.containerShape.height,l=this.rawData;if(!l)return{columns:[]};a&&(l=cS(l));var c=this.createScales(l),u=c.x,h=c.y,d=(0,z.CR)(lS(l),2),f=d[0],g=d[1],v=new Hh({domain:[0,g-(f>0?0:f)],range:[0,A*o]}),m=u.getBandWidth(),w=this.rawData;return{columns:l.map(function(C,F){return C.map(function(Q,D){var K=m/l.length,G=function(){return{x:u.map(D)+K*F,y:Q>=0?h.map(Q):h.map(0),width:K,height:v.map(Math.abs(Q))}},J=function(){return{x:u.map(D),y:h.map(Q),width:m,height:v.map(w[F][D])}};return(0,z.pi)((0,z.pi)({fill:e.getColor(F)},n),a?J():G())})})}},enumerable:!1,configurable:!0}),t.prototype.render=function(e,n){SR(n,".container","rect").attr("className","container").node();var i=e.type,a=e.x,s=e.y,o="spark".concat(i),A=(0,z.pi)({x:a,y:s},i==="line"?this.linesStyle:this.columnsStyle);Le(n).selectAll(".spark").data([i]).join(function(l){return l.append(function(c){return c==="line"?new dH({className:o,style:A}):new hH({className:o,style:A})}).attr("className","spark ".concat(o))},function(l){return l.update(A)},function(l){return l.remove()})},t.prototype.getColor=function(e){var n=this.attributes.color;return Ni(n)?n[e%n.length]:Wt(n)?n.call(null,e):n},t.prototype.createScales=function(e){var n,i,a=this.attributes,s=a.type,o=a.scale,A=a.range,l=A===void 0?[]:A,c=a.spacing,u=this.containerShape,h=u.width,d=u.height,f=(0,z.CR)(lS(e),2),g=f[0],v=f[1],m=new Hh({domain:[(n=l[0])!==null&&n!==void 0?n:g,(i=l[1])!==null&&i!==void 0?i:v],range:[d,d*(1-o)]});return s==="line"?{type:s,x:new Hh({domain:[0,e[0].length-1],range:[0,h]}),y:m}:{type:s,x:new O1({domain:e[0].map(function(w,C){return C}),range:[0,h],paddingInner:c,paddingOuter:c/2,align:.5}),y:m}},t.tag="sparkline",t}(Sr),uS={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},hS={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},dS={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},so=Fs({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),ns=Fs({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),bH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,n){var i=e.x,a=e.y,s=e.size,o=s===void 0?10:s,A=e.radius,l=A===void 0?o/4:A,c=e.orientation,u=e.classNamePrefix,h=(0,z._T)(e,["x","y","size","radius","orientation","classNamePrefix"]),d=o,f=d*2.4,g=u?"".concat(ns.iconRect.name," ").concat(u,"handle-icon-rect"):ns.iconRect.name,v=function(D){return u?"".concat(ns.iconLine,"-").concat(D," ").concat(u,"handle-icon-line"):"".concat(ns.iconLine,"-").concat(D)},m=Le(n).maybeAppendByClassName(ns.iconRect,"rect").attr("className",g).styles((0,z.pi)((0,z.pi)({},h),{width:d,height:f,radius:l,x:i-d/2,y:a-f/2,transformOrigin:"center"})),w=i+1/3*d-d/2,C=i+2/3*d-d/2,F=a+1/4*f-f/2,Q=a+3/4*f-f/2;m.maybeAppendByClassName("".concat(ns.iconLine,"-1"),"line").attr("className",v(1)).styles((0,z.pi)({x1:w,x2:w,y1:F,y2:Q},h)),m.maybeAppendByClassName("".concat(ns.iconLine,"-2"),"line").attr("className",v(2)).styles((0,z.pi)({x1:C,x2:C,y1:F,y2:Q},h)),c==="vertical"&&(m.node().style.transform="rotate(90)")},t}(Sr),xH=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,e,dS)||this}return t.prototype.renderLabel=function(e){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.showLabel,A=en(this.attributes,"label"),l=A.x,c=l===void 0?0:l,u=A.y,h=u===void 0?0:u,d=A.transform,f=A.transformOrigin,g=(0,z._T)(A,["x","y","transform","transformOrigin"]),v=(0,z.CR)(Uo(g,[]),2),m=v[0],w=v[1],C=Le(e).maybeAppendByClassName(ns.labelGroup,"g").styles(w),F=(0,z.pi)((0,z.pi)({},hS),m),Q=F.text,D=(0,z._T)(F,["text"]);fa(!!o,C,function(K){n.label=K.maybeAppendByClassName(ns.label,"text").styles((0,z.pi)((0,z.pi)({},D),{x:a+c,y:s+h,transform:d,transformOrigin:f,text:"".concat(Q)})),n.label.on("mousedown",function(G){G.stopPropagation()}),n.label.on("touchstart",function(G){G.stopPropagation()})})},t.prototype.renderIcon=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.orientation,o=n.type,A=n.classNamePrefix,l=(0,z.pi)((0,z.pi)({x:i,y:a,orientation:s,classNamePrefix:A},uS),en(this.attributes,"icon")),c=this.attributes.iconShape,u=c===void 0?function(){return new bH({style:l})}:c,h=Le(e).maybeAppendByClassName(ns.iconGroup,"g");h.selectAll(ns.icon.class).data([u]).join(function(d){return d.append(typeof u=="string"?u:function(){return u(o)}).attr("className",ns.icon.name)},function(d){return d.update(l)},function(d){return d.remove()})},t.prototype.render=function(e,n){this.renderIcon(n),this.renderLabel(n)},t}(Sr),CH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,e,(0,z.pi)((0,z.pi)((0,z.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(i){return i.toString()},handleSpacing:2,orientation:"horizontal",padding:0,autoFitLabel:!0,scrollable:!0,selectionFill:"#5B8FF9",selectionFillOpacity:.45,selectionZIndex:2,showHandle:!0,showLabel:!0,slidable:!0,trackFill:"#416180",trackLength:200,trackOpacity:.05,trackSize:20,trackZIndex:-1,values:[0,1],type:"range",selectionType:"select",handleIconOffset:0},Vc(dS,"handle")),Vc(uS,"handleIcon")),Vc(hS,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(i){return function(a){a.stopPropagation(),n.target=i,n.prevPos=n.getOrientVal($2(a));var s=n.availableSpace,o=s.x,A=s.y,l=n.getBBox(),c=l.x,u=l.y;n.selectionStartPos=n.getRatio(n.prevPos-n.getOrientVal([o,A])-n.getOrientVal([+c,+u])),n.selectionWidth=0,document.addEventListener("pointermove",n.onDragging),document.addEventListener("pointerup",n.onDragEnd)}},n.onDragging=function(i){var a=n.attributes,s=a.slidable,o=a.brushable,A=a.type;i.stopPropagation();var l=n.getOrientVal($2(i)),c=l-n.prevPos;if(c){var u=n.getRatio(c);switch(n.target){case"start":s&&n.setValuesOffset(u);break;case"end":s&&n.setValuesOffset(0,u);break;case"selection":s&&n.setValuesOffset(u,u);break;case"track":if(!o)return;n.selectionWidth+=u,A==="range"?n.innerSetValues([n.selectionStartPos,n.selectionStartPos+n.selectionWidth].sort(),!0):n.innerSetValues([0,n.selectionStartPos+n.selectionWidth],!0);break;default:break}n.prevPos=l}},n.onDragEnd=function(){document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointermove",n.onDragging),document.removeEventListener("pointerup",n.onDragEnd),n.target="",n.updateHandlesPosition(!1)},n.onValueChange=function(i){var a=n.attributes,s=a.onChange,o=a.type,A=o==="range"?i:i[1],l=o==="range"?n.getValues():n.getValues()[1],c=new Vr("valuechange",{detail:{oldValue:A,value:l}});n.dispatchEvent(c),s==null||s(l)},n.selectionStartPos=0,n.selectionWidth=0,n.prevPos=0,n.target="",n}return Object.defineProperty(t.prototype,"values",{get:function(){return this.attributes.values},set:function(e){this.attributes.values=this.clampValues(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sparklineStyle",{get:function(){var e=this.attributes.orientation;if(e!=="horizontal")return null;var n=en(this.attributes,"sparkline");return(0,z.pi)((0,z.pi)({zIndex:0},this.availableSpace),n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"shape",{get:function(){var e=this.attributes,n=e.trackLength,i=e.trackSize,a=(0,z.CR)(this.getOrientVal([[n,i],[i,n]]),2),s=a[0],o=a[1];return{width:s,height:o}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableSpace",{get:function(){var e=this.attributes,n=e.x,i=e.y,a=e.padding,s=(0,z.CR)(Ti(a),4),o=s[0],A=s[1],l=s[2],c=s[3],u=this.shape,h=u.width,d=u.height;return{x:c,y:o,width:h-(c+A),height:d-(o+l)}},enumerable:!1,configurable:!0}),t.prototype.getValues=function(){return this.values},t.prototype.setValues=function(e,n){e===void 0&&(e=[0,0]),n===void 0&&(n=!1),this.attributes.values=e;var i=n===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},t.prototype.updateSelectionArea=function(e){var n=this.calcSelectionArea();this.foregroundGroup.selectAll(so.selection.class).each(function(i,a){Os(this,n[a],e)})},t.prototype.updateHandlesPosition=function(e){this.attributes.showHandle&&(this.startHandle&&Os(this.startHandle,this.getHandleStyle("start"),e),this.endHandle&&Os(this.endHandle,this.getHandleStyle("end"),e))},t.prototype.innerSetValues=function(e,n){e===void 0&&(e=[0,0]),n===void 0&&(n=!1);var i=this.values,a=this.clampValues(e);this.attributes.values=a,this.setValues(a),n&&this.onValueChange(i)},t.prototype.renderTrack=function(e){var n=this.attributes,i=n.x,a=n.y,s=en(this.attributes,"track");this.trackShape=Le(e).maybeAppendByClassName(so.track,"rect").styles((0,z.pi)((0,z.pi)({x:i,y:a},this.shape),s))},t.prototype.renderBrushArea=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.brushable;this.brushArea=Le(e).maybeAppendByClassName(so.brushArea,"rect").styles((0,z.pi)({x:i,y:a,fill:"transparent",cursor:s?"crosshair":"default"},this.shape))},t.prototype.renderSparkline=function(e){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.orientation,A=Le(e).maybeAppendByClassName(so.sparklineGroup,"g");fa(o==="horizontal",A,function(l){var c=(0,z.pi)((0,z.pi)({},n.sparklineStyle),{x:a,y:s});l.maybeAppendByClassName(so.sparkline,function(){return new BH({style:c})}).update(c)})},t.prototype.renderHandles=function(){var e=this,n,i=this.attributes,a=i.showHandle,s=i.type,o=s==="range"?["start","end"]:["end"],A=a?o:[],l=this;(n=this.foregroundGroup)===null||n===void 0||n.selectAll(so.handle.class).data(A.map(function(c){return{type:c}}),function(c){return c.type}).join(function(c){return c.append(function(u){var h=u.type;return new xH({style:e.getHandleStyle(h)})}).each(function(u){var h=u.type;this.attr("class","".concat(so.handle.name," ").concat(h,"-handle"));var d="".concat(h,"Handle");l[d]=this,this.addEventListener("pointerdown",l.onDragStart(h))})},function(c){return c.each(function(u){var h=u.type;this.update(l.getHandleStyle(h))})},function(c){return c.each(function(u){var h=u.type,d="".concat(h,"Handle");l[d]=void 0}).remove()})},t.prototype.renderSelection=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.type,o=n.selectionType;this.foregroundGroup=Le(e).maybeAppendByClassName(so.foreground,"g");var A=en(this.attributes,"selection"),l=function(u){return u.style("visibility",function(h){return h.show?"visible":"hidden"}).style("cursor",function(h){return o==="select"?"grab":o==="invert"?"crosshair":"default"}).styles((0,z.pi)((0,z.pi)({},A),{transform:"translate(".concat(i,", ").concat(a,")")}))},c=this;this.foregroundGroup.selectAll(so.selection.class).data(s==="value"?[]:this.calcSelectionArea().map(function(u,h){return{style:(0,z.pi)({},u),index:h,show:o==="select"?h===1:h!==1}}),function(u){return u.index}).join(function(u){return u.append("rect").attr("className",so.selection.name).call(l).each(function(h,d){var f=this;d===1?(c.selectionShape=Le(this),this.on("pointerdown",function(g){f.attr("cursor","grabbing"),c.onDragStart("selection")(g)}),c.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),c.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),c.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){f.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){f.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){f.attr("cursor","pointer")})):this.on("pointerdown",c.onDragStart("track"))})},function(u){return u.call(l)},function(u){return u.remove()}),this.updateSelectionArea(!1),this.renderHandles()},t.prototype.render=function(e,n){this.renderTrack(n),this.renderSparkline(n),this.renderBrushArea(n),this.renderSelection(n)},t.prototype.clampValues=function(e,n){var i;n===void 0&&(n=4);var a=(0,z.CR)(this.range,2),s=a[0],o=a[1],A=(0,z.CR)(this.getValues().map(function(v){return E1(v,n)}),2),l=A[0],c=A[1],u=Array.isArray(e)?e:[l,e!=null?e:c],h=(0,z.CR)((u||[l,c]).map(function(v){return E1(v,n)}),2),d=h[0],f=h[1];if(this.attributes.type==="value")return[0,hr(f,s,o)];d>f&&(i=(0,z.CR)([f,d],2),d=i[0],f=i[1]);var g=f-d;return g>o-s?[s,o]:d<s?l===s&&c===f?[s,f]:[s,g+s]:f>o?c===o&&l===d?[d,o]:[o-g,o]:[d,f]},t.prototype.calcSelectionArea=function(e){var n=(0,z.CR)(this.clampValues(e),2),i=n[0],a=n[1],s=this.availableSpace,o=s.x,A=s.y,l=s.width,c=s.height;return this.getOrientVal([[{y:A,height:c,x:o,width:i*l},{y:A,height:c,x:i*l+o,width:(a-i)*l},{y:A,height:c,x:a*l,width:(1-a)*l}],[{x:o,width:l,y:A,height:i*c},{x:o,width:l,y:i*c+A,height:(a-i)*c},{x:o,width:l,y:a*c,height:(1-a)*c}]])},t.prototype.calcHandlePosition=function(e){var n=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,s=i.y,o=i.width,A=i.height,l=(0,z.CR)(this.clampValues(),2),c=l[0],u=l[1],h=e==="start"?-n:n,d=(e==="start"?c:u)*this.getOrientVal([o,A])+h;return{x:a+this.getOrientVal([d,o/2]),y:s+this.getOrientVal([A/2,d])}},t.prototype.inferTextStyle=function(e){var n=this.attributes.orientation;return n==="horizontal"?{}:e==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:e==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},t.prototype.calcHandleText=function(e){var n,i=this.attributes,a=i.type,s=i.orientation,o=i.formatter,A=i.autoFitLabel,l=en(this.attributes,"handle"),c=en(l,"label"),u=l.spacing,h=this.getHandleSize(),d=this.clampValues(),f=e==="start"?d[0]:d[1],g=o(f),v=new t1({style:(0,z.pi)((0,z.pi)((0,z.pi)({},c),this.inferTextStyle(e)),{text:g})}),m=v.getBBox(),w=m.width,C=m.height;if(v.destroy(),!A){if(a==="value")return{text:g,x:0,y:-C-u};var F=u+h+(s==="horizontal"?w/2:0);return n={text:g},n[s==="horizontal"?"x":"y"]=e==="start"?-F:F,n}var Q=0,D=0,K=this.availableSpace,G=K.width,J=K.height,$=this.calcSelectionArea()[1],at=$.x,At=$.y,pt=$.width,wt=$.height,bt=u+h;if(s==="horizontal"){var Rt=bt+w/2;if(e==="start"){var Pt=at-bt-w;Q=Pt>0?-Rt:Rt}else{var xt=G-at-pt-bt>w;Q=xt?Rt:-Rt}}else{var Ft=bt,_t=C+bt;e==="start"?D=At-h>C?-_t:Ft:D=J-(At+wt)-h>C?_t:-Ft}return{x:Q,y:D,text:g}},t.prototype.getHandleLabelStyle=function(e){var n=en(this.attributes,"handleLabel");return(0,z.pi)((0,z.pi)((0,z.pi)({},n),this.calcHandleText(e)),this.inferTextStyle(e))},t.prototype.getHandleIconStyle=function(){var e=this.attributes.handleIconShape,n=en(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,z.pi)({cursor:i,shape:e,size:a},n)},t.prototype.getHandleStyle=function(e){var n=this.attributes,i=n.x,a=n.y,s=n.showLabel,o=n.showLabelOnInteraction,A=n.orientation,l=this.calcHandlePosition(e),c=l.x,u=l.y,h=this.calcHandleText(e),d=s;return!s&&o&&(this.target?d=!0:d=!1),(0,z.pi)((0,z.pi)((0,z.pi)({},Vc(this.getHandleIconStyle(),"icon")),Vc((0,z.pi)((0,z.pi)({},this.getHandleLabelStyle(e)),h),"label")),{transform:"translate(".concat(c+i,", ").concat(u+a,")"),orientation:A,showLabel:d,type:e,zIndex:3})},t.prototype.getHandleSize=function(){var e=this.attributes,n=e.handleIconSize,i=e.width,a=e.height;return n||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},t.prototype.getOrientVal=function(e){var n=(0,z.CR)(e,2),i=n[0],a=n[1],s=this.attributes.orientation;return s==="horizontal"?i:a},t.prototype.setValuesOffset=function(e,n){n===void 0&&(n=0);var i=this.attributes.type,a=(0,z.CR)(this.getValues(),2),s=a[0],o=a[1],A=i==="range"?e:0,l=[s+A,o+n].sort();this.innerSetValues(l,!0)},t.prototype.getRatio=function(e){var n=this.availableSpace,i=n.width,a=n.height;return e/this.getOrientVal([i,a])},t.prototype.dispatchCustomEvent=function(e,n,i){var a=this;e.on(n,function(s){s.stopPropagation(),a.dispatchEvent(new Vr(i,{detail:s}))})},t.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var e=this.brushArea;this.dispatchCustomEvent(e,"click","trackClick"),this.dispatchCustomEvent(e,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(e,"pointerleave","trackMouseleave"),e.on("pointerdown",this.onDragStart("track"))},t.prototype.onScroll=function(e){var n=this.attributes.scrollable;if(n){var i=e.deltaX,a=e.deltaY,s=a||i,o=this.getRatio(s);this.setValuesOffset(o,o)}},t.tag="slider",t}(Sr),SH={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(r){return r.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},L1=Fs({background:"background",labelGroup:"label-group",label:"label"},"indicator"),MH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,e,SH)||this;return n.point=[0,0],n.group=n.appendChild(new oi({})),n.isMutationObserved=!0,n}return t.prototype.renderBackground=function(){if(this.label){var e=this.attributes,n=e.position,i=e.padding,a=(0,z.CR)(Ti(i),4),s=a[0],o=a[1],A=a[2],l=a[3],c=this.label.node().getLocalBounds(),u=c.min,h=c.max,d=new _i(u[0]-l,u[1]-s,h[0]+o-u[0]+l,h[1]+A-u[1]+s),f=this.getPath(n,d),g=en(this.attributes,"background");this.background=Le(this.group).maybeAppendByClassName(L1.background,"path").styles((0,z.pi)((0,z.pi)({},g),{d:f})),this.group.appendChild(this.label.node())}},t.prototype.renderLabel=function(){var e=this.attributes,n=e.formatter,i=e.labelText,a=en(this.attributes,"label"),s=(0,z.CR)(Uo(a),2),o=s[0],A=s[1],l=o.text,c=(0,z._T)(o,["text"]);if(this.label=Le(this.group).maybeAppendByClassName(L1.labelGroup,"g").styles(A),!!i){var u=this.label.maybeAppendByClassName(L1.label,function(){return Po(n(i))}).style("text",n(i).toString());u.selectAll("text").styles(c)}},t.prototype.adjustLayout=function(){var e=(0,z.CR)(this.point,2),n=e[0],i=e[1],a=this.attributes,s=a.x,o=a.y;this.group.attr("transform","translate(".concat(s-n,", ").concat(o-i,")"))},t.prototype.getPath=function(e,n){var i=this.attributes.radius,a=n.x,s=n.y,o=n.width,A=n.height,l=[["M",a+i,s],["L",a+o-i,s],["A",i,i,0,0,1,a+o,s+i],["L",a+o,s+A-i],["A",i,i,0,0,1,a+o-i,s+A],["L",a+i,s+A],["A",i,i,0,0,1,a,s+A-i],["L",a,s+i],["A",i,i,0,0,1,a+i,s],["Z"]],c={top:4,right:6,bottom:0,left:2},u=c[e],h=this.createCorner([l[u].slice(-2),l[u+1].slice(-2)]);return l.splice.apply(l,(0,z.ev)([u+1,1],(0,z.CR)(h),!1)),l[0][0]="M",l},t.prototype.createCorner=function(e,n){n===void 0&&(n=10);var i=.8,a=A_.apply(void 0,(0,z.ev)([],(0,z.CR)(e),!1)),s=(0,z.CR)(e,2),o=(0,z.CR)(s[0],2),A=o[0],l=o[1],c=(0,z.CR)(s[1],2),u=c[0],h=c[1],d=(0,z.CR)(a?[u-A,[A,u]]:[h-l,[l,h]],2),f=d[0],g=(0,z.CR)(d[1],2),v=g[0],m=g[1],w=f/2,C=f/Math.abs(f),F=n*C,Q=F/2,D=F*Math.sqrt(3)/2*i,K=(0,z.CR)([v,v+w-Q,v+w,v+w+Q,m],5),G=K[0],J=K[1],$=K[2],at=K[3],At=K[4];return a?(this.point=[$,l-D],[["L",G,l],["L",J,l],["L",$,l-D],["L",at,l],["L",At,l]]):(this.point=[A+D,$],[["L",A,G],["L",A,J],["L",A+D,$],["L",A,at],["L",A,At]])},t.prototype.applyVisibility=function(){var e=this.attributes.visibility;e==="hidden"?Ts(this):Qh(this)},t.prototype.bindEvents=function(){this.label.on(yn.BOUNDS_CHANGED,this.renderBackground)},t.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},t}(Sr),TH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},t.defaultOptions,e))||this;return n.hoverColor="#f5f5f5",n.selectedColor="#e6f7ff",n.background=n.appendChild(new xi({})),n.label=n.background.appendChild(new oi({})),n}return Object.defineProperty(t.prototype,"padding",{get:function(){return Ti(this.style.padding)},enumerable:!1,configurable:!0}),t.prototype.renderLabel=function(){var e=this.style,n=e.label,i=e.value,a=en(this.attributes,"label");Le(this.label).maybeAppend(".label",function(){return Po(n)}).attr("className","label").styles(a),this.label.attr("__data__",i)},t.prototype.renderBackground=function(){var e=this.label.getBBox(),n=(0,z.CR)(this.padding,4),i=n[0],a=n[1],s=n[2],o=n[3],A=e.width,l=e.height,c=A+o+a,u=l+i+s,h=en(this.attributes,"background"),d=this.style,f=d.width,g=f===void 0?0:f,v=d.height,m=v===void 0?0:v,w=d.selected;this.background.attr((0,z.pi)((0,z.pi)({},h),{width:Math.max(c,g),height:Math.max(u,m),fill:w?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(o,", ").concat((u-l)/2,")")})},t.prototype.render=function(){this.renderLabel(),this.renderBackground()},t.prototype.bindEvents=function(){var e=this;this.addEventListener("pointerenter",function(){e.style.selected||e.background.attr("fill",e.hoverColor)}),this.addEventListener("pointerleave",function(){e.style.selected||e.background.attr("fill",e.style.backgroundFill)});var n=this;this.addEventListener("click",function(){var i=e.style,a=i.label,s=i.value,o=i.onClick;o==null||o(s,{label:a,value:s},n)})},t.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},t}(Sr),FH=function(r){(0,z.ZT)(t,r);function t(e){var n,i,a=r.call(this,Zr({},t.defaultOptions,e))||this;a.currentValue=(n=t.defaultOptions.style)===null||n===void 0?void 0:n.defaultValue,a.isPointerInSelect=!1,a.select=a.appendChild(new xi({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new xi({className:"dropdown"}));var s=a.style.defaultValue;return s&&(!((i=a.style.options)===null||i===void 0)&&i.some(function(o){return o.value===s}))&&(a.currentValue=s),a}return t.prototype.setValue=function(e){this.currentValue=e,this.render()},t.prototype.getValue=function(){return this.currentValue},Object.defineProperty(t.prototype,"dropdownPadding",{get:function(){return Ti(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),t.prototype.renderSelect=function(){var e=this,n,i=this.style,a=i.x,s=i.y,o=i.width,A=i.height,l=i.bordered,c=i.showDropdownIcon,u=en(this.attributes,"select"),h=en(this.attributes,"placeholder");this.select.attr((0,z.pi)((0,z.pi)({x:a,y:s,width:o,height:A},u),{fill:"#fff",strokeWidth:l?1:0}));var d=this.dropdownPadding,f=10;c&&Le(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(a+o-f-d[1]-d[3],", ").concat(s+A/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var g=(n=this.style.options)===null||n===void 0?void 0:n.find(function(C){return C.value===e.currentValue}),v=(0,z.pi)({x:a+d[3]},h);Le(this.select).selectAll(".placeholder").data(g?[]:[1]).join(function(C){return C.append("text").attr("className","placeholder").styles(v).style("y",function(){var F=this.getBBox();return s+(A-F.height)/2})},function(C){return C.styles(v)},function(C){return C.remove()});var m=en(this.attributes,"optionLabel"),w=(0,z.pi)({x:a+d[3]},m);Le(this.select).selectAll(".value").data(g?[g]:[]).join(function(C){return C.append(function(F){return Po(F.label)}).attr("className","value").styles(w).style("y",function(){var F=this.getBBox();return s+(A-F.height)/2})},function(C){return C.styles(w)},function(C){return C.remove()})},t.prototype.renderDropdown=function(){var e=this,n,i,a=this.style,s=a.x,o=a.y,A=a.width,l=a.height,c=a.options,u=a.onSelect,h=a.open,d=en(this.attributes,"dropdown"),f=en(this.attributes,"option"),g=this.dropdownPadding;Le(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(c,function(w){return w.value}).join(function(w){return w.append(function(C){return new TH({className:"dropdown-item",style:(0,z.pi)((0,z.pi)((0,z.pi)({},C),f),{width:A-g[1]-g[3],selected:C.value===e.currentValue,onClick:function(F,Q,D){e.setValue(F),u==null||u(F,Q,D),e.dispatchEvent(new Vr("change",{detail:{value:F,option:Q,item:D}})),Ts(e.dropdown)}})})}).each(function(C,F){var Q,D=(Q=this.parentNode)===null||Q===void 0?void 0:Q.children,K=D.reduce(function(G,J,$){return $<F&&(G+=J.getBBox().height),G},0);this.attr("transform","translate(".concat(g[3],", ").concat(g[0]+K,")"))})},function(w){return w.update(function(C){return{selected:C.value===e.currentValue}})},function(w){return w.remove()});var v=(i=(n=this.dropdown.getElementsByClassName("dropdown-container"))===null||n===void 0?void 0:n[0])===null||i===void 0?void 0:i.getBBox(),m=d.spacing;this.dropdown.attr((0,z.pi)({transform:"translate(".concat(s,", ").concat(o+l+m,")"),width:v.width+g[1]+g[3],height:v.height+g[0]+g[2]},d)),!h&&Ts(this.dropdown)},t.prototype.render=function(){this.renderSelect(),this.renderDropdown()},t.prototype.bindEvents=function(){var e=this;this.addEventListener("click",function(n){n.stopPropagation()}),this.select.addEventListener("click",function(){e.dropdown.style.visibility==="visible"?Ts(e.dropdown):Qh(e.dropdown)}),this.addEventListener("pointerenter",function(){e.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){e.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){e.isPointerInSelect||Ts(e.dropdown)})},t.defaultOptions={style:{x:0,y:0,width:140,height:32,options:[],bordered:!0,defaultValue:"",selectRadius:8,selectStroke:"#d9d9d9",showDropdownIcon:!0,placeholderText:"\u8BF7\u9009\u62E9",placeholderFontSize:12,placeholderTextBaseline:"top",placeholderFill:"#c2c2c2",dropdownFill:"#fff",dropdownStroke:"#d9d9d9",dropdownRadius:8,dropdownShadowBlur:4,dropdownShadowColor:"rgba(0, 0, 0, 0.08)",dropdownPadding:8,dropdownSpacing:10,optionPadding:[8,12],optionFontSize:12,optionTextBaseline:"top",optionBackgroundFill:"#fff",optionBackgroundRadius:4,optionLabelFontSize:12,optionLabelTextBaseline:"top"}},t}(Sr),Is=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{backgroundOpacity:t.backgroundOpacities.default}},t.defaultOptions,e))||this;return n.showBackground=!0,n.background=n.appendChild(new xi({})),n.icon=n.appendChild(new oi({})),n}return Object.defineProperty(t.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return Ti(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconSize",{get:function(){var e=this.attributes.size,n=(0,z.CR)(this.padding,4),i=n[0],a=n[1],s=n[2],o=n[3];return Math.max(e-Math.max(o+a,i+s),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),t.prototype.renderBackground=function(){var e=this.attributes,n=e.x,i=e.y,a=e.size,s=a/2,o=en(this.attributes,"background");this.background.attr((0,z.pi)({x:n-s,y:i-s,width:a,height:a},o))},t.prototype.showIndicator=function(){if(this.label){var e=this.attributes.size,n=this.background.getBBox(),i=n.x,a=n.y;this.indicator.update({x:i+e/2,y:a-5,labelText:this.label,visibility:"visible"})}},t.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},t.prototype.connectedCallback=function(){var e;r.prototype.connectedCallback.call(this);var n=this.attributes.size,i=this.background.getBBox(),a=i.x,s=i.y,o=(e=this.ownerDocument)===null||e===void 0?void 0:e.defaultView;o&&(this.indicator=o.appendChild(new MH({style:{x:a+n/2,y:s-n/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},t.prototype.disconnectedCallback=function(){this.indicator.destroy()},t.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},t.prototype.bindEvents=function(){var e=this,n=this.attributes.onClick;if(this.addEventListener("click",function(){n==null||n(e)}),this.showBackground){var i=function(){return e.background.attr({opacity:t.backgroundOpacities.default})},a=function(){return e.background.attr({opacity:t.backgroundOpacities.hover})},s=function(){return e.background.attr({opacity:t.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){a(),e.showIndicator()}),this.addEventListener("pointerleave",function(){i(),e.hideIndicator()}),this.addEventListener("pointerdown",function(){s()}),this.addEventListener("pointerup",function(){i()})}},t.tag="IconBase",t.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},t.backgroundOpacities={default:0,hover:.8,active:1},t}(Sr),Kh=function(r,t){return t===void 0&&(t="#565758"),new Pi({style:{fill:t,d:"M ".concat(r,",").concat(r," L -").concat(r,",0 L ").concat(r,",-").concat(r," Z"),transformOrigin:"center"}})},OH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.arcPath=function(e,n,i){var a=(0,z.CR)([i,i],2),s=a[0],o=a[1],A=function(g){return[e+i*Math.cos(g),n+i*Math.sin(g)]},l=(0,z.CR)(A(-5/4*Math.PI),2),c=l[0],u=l[1],h=(0,z.CR)(A(1/4*Math.PI),2),d=h[0],f=h[1];return"M".concat(c,",").concat(u,",A").concat(s,",").concat(o,",0,1,1,").concat(d,",").concat(f)},Object.defineProperty(t.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=this.lineWidth,A=o+.5;Le(this.icon).maybeAppend(".reset","path").styles({stroke:a,lineWidth:o,d:this.arcPath(n,i,s/2-o),markerStart:Kh(A,a)})},t}(Is),IH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/2,A=s/2/Math.pow(3,.5),l=[[n,i],[n,i-A],[n-o,i],[n,i+A],[n,i],[n+o,i-A],[n+o,i+A],[n,i]];Le(this.icon).maybeAppend(".backward","polygon").styles({points:l,fill:a})},t}(Is),LH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/2,A=s/2/Math.pow(3,.5),l=[[n,i],[n,i-A],[n+o,i],[n,i+A],[n,i],[n-o,i-A],[n-o,i+A],[n,i]];Le(this.icon).maybeAppend(".forward","polygon").styles({points:l,fill:a})},t}(Is),NH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/3*Math.pow(3,.5)*.8,A=[[n+o,i],[n-o/2,i-s/2*.8],[n-o/2,i+s/2*.8],[n+o,i]];Le(this.icon).maybeAppend(".play","polygon").styles({points:A,fill:a})},t}(Is),kH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this.iconSize,o=s/3,A=[[n-o,i-s/2],[n-o,i+s/2],[n-o/2,i+s/2],[n-o/2,i-s/2],[n-o,i-s/2],[n+o/2,i-s/2],[n+o/2,i+s/2],[n+o,i+s/2],[n+o,i-s/2]];Le(this.icon).maybeAppend(".pause","polygon").styles({points:A,fill:a})},t}(Is),QH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,A=s.lineWidth,l=A;Le(this.icon).maybeAppend(".left-line","line").styles({x1:n-o/2,y1:i-o/2,x2:n-o/2,y2:i+o/2,stroke:a,lineWidth:A}),Le(this.icon).maybeAppend(".right-line","line").styles({x1:n+o/2,y1:i-o/2,x2:n+o/2,y2:i+o/2,stroke:a,lineWidth:A}),Le(this.icon).maybeAppend(".left-arrow","line").styles({x1:n,y1:i,x2:n-o/2+l*2,y2:i,stroke:a,lineWidth:A,markerEnd:Kh(A*2,a)}),Le(this.icon).maybeAppend(".right-arrow","line").styles({x1:n,y1:i,x2:n+o/2-l*2,y2:i,stroke:a,lineWidth:A,markerEnd:Kh(A*2,a)})},t}(Is),UH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,A=s.lineWidth;Le(this.icon).maybeAppend(".line","line").styles({x1:n,y1:i-o/2,x2:n,y2:i+o/2,stroke:a,lineWidth:A});var l=A;Le(this.icon).maybeAppend(".left-arrow","line").styles({x1:n-o/2-l*2,y1:i,x2:n-l*2,y2:i,stroke:a,lineWidth:A,markerEnd:Kh(A*2,a)}),Le(this.icon).maybeAppend(".right-arrow","line").styles({x1:n+o/2+l*2,y1:i,x2:n+l*2,y2:i,stroke:a,lineWidth:A,markerEnd:Kh(A*2,a)})},t}(Is),fS=function(r){return[[-r/2,-r/2],[-r/2,r/2],[r/2,r/2]]},PH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,A=s.lineWidth,l=A,c=(o-l*2-A)/4,u=(o-l*2-A)/2,h=(0,z.CR)([n-o/2+l,i+o/2-l*2],2),d=h[0],f=h[1];Le(this.icon).maybeAppend(".coordinate","polyline").styles({points:fS(o).map(function(g){var v=(0,z.CR)(g,2),m=v[0],w=v[1];return[m+n,w+i]}),stroke:a,lineWidth:A}),Le(this.icon).maybeAppend(".line","polyline").styles({points:[[d,f],[d+c,f-u],[d+c*2,f],[d+c*4,f-u*2]],stroke:a,lineWidth:A})},t}(Is),DH=function(r){(0,z.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return Object.defineProperty(t.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.data,n=this.attributes,i=n.x,a=n.y,s=n.color,o=this,A=o.iconSize,l=o.lineWidth,c=l,u=(A-c)/e.length,h=(A-c*2)/4,d=(0,z.CR)([i-A/2+c*2,a+A/2-c],2),f=d[0],g=d[1];Le(this.icon).maybeAppend(".coordinate","polyline").styles({points:fS(A).map(function(v){var m=(0,z.CR)(v,2),w=m[0],C=m[1];return[w+i,C+a]}),stroke:s,lineWidth:l}),Le(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(v,m){return{value:v,index:m}})).join(function(v){return v.append("line").attr("className","column").style("x1",function(m){var w=m.index;return f+u*w}).style("y1",g).style("x2",function(m){var w=m.index;return f+u*w}).style("y2",function(m){var w=m.value;return g-h*w}).styles({y1:g,stroke:s,lineWidth:l})})},t}(Is),RH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{color:"#d8d9d9"}},e))||this;return n.showBackground=!1,n}return t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.color,s=this,o=s.iconSize,A=s.lineWidth;Le(this.icon).maybeAppend(".split","line").styles({x1:n,y1:i-o/2,x2:n,y2:i+o/2,stroke:a,lineWidth:A})},t}(Is),N1=function(r){(0,z.ZT)(t,r);function t(){var e=r.apply(this,(0,z.ev)([],(0,z.CR)(arguments),!1))||this;return e.showBackground=!1,e}return Object.defineProperty(t.prototype,"padding",{get:function(){return Ti(0)},enumerable:!1,configurable:!0}),t.prototype.renderIcon=function(){var e=this.iconSize,n=this.attributes,i=n.x,a=n.y,s=n.speed,o=s===void 0?1:s,A=zy(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),l=hr(e,20,1/0),c=20,u=(0,z.pi)((0,z.pi)({},A),{x:i-l/2,y:a-c/2,width:l,height:c,defaultValue:o,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:e/5,placeholderFontSize:e/2,optionPadding:0,optionLabelFontSize:e/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});Le(this.icon).maybeAppend(".speed",function(){return new FH({style:u})}).attr("className","speed").each(function(){this.update(u)})},t.tag="SpeedSelect",t}(Is),k1=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,e)||this;return n.icon=n.appendChild(new oi({})),n.currentType=n.attributes.type,n}return t.prototype.getType=function(){return this.currentType},t.prototype.render=function(){var e=this,n=this.attributes,i=n.onChange,a=(0,z._T)(n,["onChange"]);Le(this.icon).selectAll(".icon").data([this.currentType]).join(function(s){return s.append(function(o){var A,l=(A=e.toggles.find(function(c){var u=(0,z.CR)(c,1),h=u[0];return h===o}))===null||A===void 0?void 0:A[1];if(!l)throw new Error("Invalid type: ".concat(o));return new l({})}).attr("className","icon").styles(a,!1).update({})},function(s){return s.styles({restStyles:a}).update({})},function(s){return s.remove()})},t.prototype.bindEvents=function(){var e=this,n=this.attributes.onChange;this.addEventListener("click",function(i){i.preventDefault(),i.stopPropagation();var a=(e.toggles.findIndex(function(o){var A=(0,z.CR)(o,1),l=A[0];return l===e.currentType})+1)%e.toggles.length,s=e.toggles[a][0];n==null||n(e.currentType),e.currentType=s,e.render()})},t.tag="ToggleIcon",t}(Sr),Q1=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{type:"play"}},e))||this;return n.toggles=[["play",NH],["pause",kH]],n}return t}(k1),U1=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{type:"range"}},e))||this;return n.toggles=[["range",QH],["value",UH]],n}return t}(k1),P1=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{type:"column"}},e))||this;return n.toggles=[["line",PH],["column",DH]],n}return t}(k1),_H={reset:OH,speed:N1,backward:IH,playPause:Q1,forward:LH,selectionType:U1,chartType:P1,split:RH},HH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},t.defaultOptions,e))||this;return n.background=n.appendChild(new xi({})),n.functions=n.appendChild(new oi({})),n}return Object.defineProperty(t.prototype,"padding",{get:function(){return Ti(this.attributes.padding)},enumerable:!1,configurable:!0}),t.prototype.renderBackground=function(){var e=this.style,n=e.x,i=e.y,a=e.width,s=e.height,o=en(this.attributes,"background");this.background.attr((0,z.pi)({x:n,y:i,width:a,height:s},o))},t.prototype.renderFunctions=function(){var e=this,n,i=this.attributes,a=i.functions,s=i.iconSize,o=i.iconSpacing,A=i.x,l=i.y,c=i.width,u=i.height,h=i.align,d=(0,z.CR)(this.padding,4),f=d[1],g=d[3],v=a.reduce(function(C,F){return C.length&&F.length?C.concat.apply(C,(0,z.ev)(["split"],(0,z.CR)(F),!1)):C.concat.apply(C,(0,z.ev)([],(0,z.CR)(F),!1))},[]),m=v.length*(s+o)-o,w={left:g+s/2,center:(c-m)/2+s/2,right:c-m-g-f+s/2}[h]||0;(n=this.speedSelect)===null||n===void 0||n.destroy(),this.functions.removeChildren(),v.forEach(function(C,F){var Q,D=_H[C],K={x:A+F*(s+o)+w,y:l+u/2,size:s};if(D===N1?(K.speed=e.attributes.speed,K.onSelect=function(J){return e.handleFunctionChange(C,{value:J})}):[Q1,U1,P1].includes(D)?(K.onChange=function(J){return e.handleFunctionChange(C,{value:J})},D===Q1&&(K.type=e.attributes.state==="play"?"pause":"play"),D===U1&&(K.type=e.attributes.selectionType==="range"?"value":"range"),D===P1&&(K.type=e.attributes.chartType==="line"?"column":"line")):K.onClick=function(){return e.handleFunctionChange(C,{value:C})},D===N1){var G=(Q=e.ownerDocument)===null||Q===void 0?void 0:Q.defaultView;G&&(e.speedSelect=new D({style:(0,z.pi)((0,z.pi)({},K),{zIndex:100})}),G.appendChild(e.speedSelect))}else e.functions.appendChild(new D({style:K}))})},t.prototype.disconnectedCallback=function(){var e;r.prototype.disconnectedCallback.call(this),(e=this.speedSelect)===null||e===void 0||e.destroy()},t.prototype.render=function(){this.renderBackground(),this.renderFunctions()},t.prototype.handleFunctionChange=function(e,n){var i=this.attributes.onChange;i==null||i(e,n)},t.defaultOptions={style:{x:0,y:0,width:300,height:40,padding:0,align:"center",iconSize:25,iconSpacing:0,speed:1,state:"pause",chartType:"line",selectionType:"range",backgroundFill:"#fbfdff",backgroundStroke:"#ebedf0",functions:[["reset","speed"],["backward","playPause","forward"],["selectionType","chartType"]]}},t}(Sr),GH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},t.defaultOptions,e))||this;return n.bindEvents(),n}return t.prototype.bindEvents=function(){var e=this;this.addEventListener("mouseenter",function(){e.attr("lineWidth",Math.ceil(+(e.style.r||0)/2))}),this.addEventListener("mouseleave",function(){e.attr("lineWidth",0)})},t.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},t}(Js),KH=function(r){(0,z.ZT)(t,r);function t(e){return r.call(this,Zr({},t.defaultOptions,e))||this}return t.prototype.renderBackground=function(){var e=this.attributes,n=e.x,i=e.y,a=e.width,s=e.height,o=en(this.attributes,"background");Le(this).maybeAppend("background","rect").attr("className","background").styles((0,z.pi)({x:n-a/2,y:i-s/2,width:a,height:s},o))},t.prototype.renderIcon=function(){var e=this.attributes,n=e.x,i=e.y,a=e.iconSize,s=en(this.attributes,"icon"),o=1,A=a/2;Le(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,z.pi)({x1:n-o,y1:i-A,x2:n-o,y2:i+A},s)),Le(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,z.pi)({x1:n+o,y1:i-A,x2:n+o,y2:i+A},s))},t.prototype.renderBorder=function(){var e=this.attributes,n=e.x,i=e.y,a=e.width,s=e.height,o=e.type,A=en(this.attributes,"border"),l=o==="start"?+a/2:-a/2;Le(this).maybeAppend("border","line").attr("className","border").styles((0,z.pi)({x1:l+n,y1:i-s/2,x2:l+n,y2:i+s/2},A))},t.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},t.defaultOptions={style:{x:0,y:0,width:10,height:50,iconSize:10,type:"start",backgroundFill:"#fff",backgroundFillOpacity:.5,iconStroke:"#9a9a9a",iconLineWidth:1,borderStroke:"#e8e8e8",borderLineWidth:1}},t}(Sr);function zH(r,t){return typeof r=="number"?gS(r):VH(r,t)}function VH(r,t){var e=new Date(r);switch(t){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(e.getHours())&&e.getMinutes()===0?ia(e,`HH:mm
YYYY-MM-DD`):ia(e,"HH:mm");case"half-day":return e.getHours()<12?`AM
`.concat(ia(e,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(e.getDate())?ia(e,`DD
YYYY-MM`):ia(e,"DD");case"week":return e.getDate()<=7?ia(e,`DD
YYYY-MM`):ia(e,"DD");case"month":return[0,6].includes(e.getMonth())?ia(e,`MM\u6708
YYYY`):ia(e,"MM\u6708");case"season":return[0].includes(e.getMonth())?ia(e,`MM\u6708
YYYY`):ia(e,"MM\u6708");case"year":return ia(e,"YYYY");default:return ia(e,"YYYY-MM-DD HH:mm")}}function gS(r){var t=String(Math.floor(r/3600)).padStart(2,"0"),e=String(Math.floor(r%3600/60)).padStart(2,"0"),n=String(Math.floor(r%60)).padStart(2,"0");return r<3600?"".concat(e,":").concat(n):"".concat(t,":").concat(e,":").concat(n)}var WH=function(r){(0,z.ZT)(t,r);function t(e){var n=r.call(this,Zr({},t.defaultOptions,e))||this;n.axis=n.appendChild(new K4({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),n.timeline=n.appendChild(new CH({style:{onChange:function(u){n.handleSliderChange(u)}}})),n.controller=n.appendChild(new HH({})),n.states={},n.handleSliderChange=function(u){var h=function(){var d=n.states.values;return Array.isArray(d)?(0,z.ev)([],(0,z.CR)(d),!1):d}();n.setBySliderValues(u),n.dispatchOnChange(h)};var i=n.attributes,a=i.selectionType,s=i.chartType,o=i.speed,A=i.state,l=i.playMode,c=i.values;return n.states={chartType:s,playMode:l,selectionType:a,speed:o,state:A},n.setByTimebarValues(c),n}return Object.defineProperty(t.prototype,"data",{get:function(){var e=this.attributes.data,n=function(i,a){return i.time<a.time?-1:i.time>a.time?1:0};return e.sort(n)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"space",{get:function(){var e=this.attributes,n=e.x,i=e.y,a=e.width,s=e.height,o=e.type,A=e.controllerHeight,l=hr(+s-A,0,+s),c=new _i(n,i+ +s-A,+a,A),u,h=0;o==="chart"?(h=35,u=new _i(n,i+l-h,+a,h)):u=new _i;var d=o==="time"?10:l,f=new _i(n,i+(o==="time"?l:l-d),+a,d-h);return{axisBBox:u,controllerBBox:c,timelineBBox:f}},enumerable:!1,configurable:!0}),t.prototype.setBySliderValues=function(e){var n,i,a=this.data,s=(0,z.CR)(Array.isArray(e)?e:[0,e],2),o=s[0],A=s[1],l=a.length,c=a[Math.floor(o*l)],u=a[Math.ceil(A*l)-(Array.isArray(e)?0:1)];this.states.values=[(n=c==null?void 0:c.time)!==null&&n!==void 0?n:a[0].time,(i=u==null?void 0:u.time)!==null&&i!==void 0?i:1/0]},t.prototype.setByTimebarValues=function(e){var n,i,a,s=this.data,o=(0,z.CR)(Array.isArray(e)?e:[void 0,e],2),A=o[0],l=o[1],c=s.find(function(h){var d=h.time;return d===A}),u=s.find(function(h){var d=h.time;return d===l});this.states.values=[(n=c==null?void 0:c.time)!==null&&n!==void 0?n:(i=s[0])===null||i===void 0?void 0:i.time,(a=u==null?void 0:u.time)!==null&&a!==void 0?a:1/0]},t.prototype.setByIndex=function(e){var n,i,a,s,o=this.data,A=(0,z.CR)(e,2),l=A[0],c=A[1];this.states.values=[(i=(n=o[l])===null||n===void 0?void 0:n.time)!==null&&i!==void 0?i:o[0].time,(s=(a=this.data[c])===null||a===void 0?void 0:a.time)!==null&&s!==void 0?s:1/0]},Object.defineProperty(t.prototype,"sliderValues",{get:function(){var e=this.states,n=e.values,i=e.selectionType,a=(0,z.CR)(Array.isArray(n)?n:[void 0,n],2),s=a[0],o=a[1],A=this.data,l=A.length,c=i==="value",u=function(){var d=A.findIndex(function(f){var g=f.time;return g===s});return c?0:d>-1?d/l:0},h=function(){if(o===1/0)return 1;var d=A.findIndex(function(f){var g=f.time;return g===o});return d>-1?d/l:c?.5:1};return[u(),h()]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){var e=this.states,n=e.values,i=e.selectionType,a=(0,z.CR)(Array.isArray(n)?n:[this.data[0].time,n],2),s=a[0],o=a[1];return i==="value"?o:[s,o]},enumerable:!1,configurable:!0}),t.prototype.getDatumByRatio=function(e){var n=this.data,i=n.length,a=Math.floor(e*(i-1));return n[a]},Object.defineProperty(t.prototype,"chartHandleIconShape",{get:function(){var e=this.states.selectionType,n=this.space.timelineBBox.height;return e==="range"?function(i){return new KH({style:{type:i,height:n,iconSize:n/6}})}:function(){return new hl({style:{x1:0,y1:-n/2,x2:0,y2:n/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),t.prototype.getChartStyle=function(e){var n=this,i=e.x,a=e.y,s=e.width,o=e.height,A=this.states,l=A.selectionType,c=A.chartType,u=this.data,h=this.attributes,d=h.type,f=h.labelFormatter,g=en(this.attributes,"chart"),v=g.type,m=(0,z._T)(g,["type"]),w=l==="range";if(d==="time")return(0,z.pi)({handleIconShape:function(){return new GH({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:w?-15:0,autoFitLabel:w,handleSpacing:w?-15:0,trackFill:"#edeeef",trackLength:s,trackOpacity:.5,trackRadius:o/2,trackSize:o/2,type:l,values:this.sliderValues,formatter:function(Q){if(f)return f(Q);var D=n.getDatumByRatio(Q).time;return typeof D=="number"?gS(D):ia(D,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},m);var C=l==="range"?5:0,F=u.map(function(Q){var D=Q.value;return D});return(0,z.pi)({handleIconOffset:C,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:F,sparklineType:c,sparklineScale:.8,trackLength:s,trackSize:o,type:l,values:this.sliderValues,transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},m)},t.prototype.renderChart=function(e){e===void 0&&(e=this.space.timelineBBox),this.timeline.update(this.getChartStyle(e))},t.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},t.prototype.getAxisStyle=function(e){var n=this.data,i=this.attributes,a=i.interval,s=i.labelFormatter,o=en(this.attributes,"axis"),A=e.x,l=e.y,c=e.width,u=(0,z.ev)((0,z.ev)([],(0,z.CR)(n),!1),[{time:0}],!1).map(function(d,f,g){var v=d.time;return{label:"".concat(v),value:f/(g.length-1),time:v}}),h=(0,z.pi)({startPos:[A,l],endPos:[A+c,l],data:u,labelFilter:function(d,f){return f<u.length-1},labelFormatter:function(d){var f=d.time;return s?s(f):zH(f,a)}},o);return h},t.prototype.renderAxis=function(e){e===void 0&&(e=this.space.axisBBox);var n=this.attributes.type;n==="chart"&&this.axis.update(this.getAxisStyle(e))},t.prototype.renderController=function(e){e===void 0&&(e=this.space.controllerBBox);var n=this.attributes.type,i=this.states,a=i.state,s=i.speed,o=i.selectionType,A=i.chartType,l=en(this.attributes,"controller"),c=this,u=(0,z.pi)((0,z.pi)((0,z.pi)({},e),{iconSize:20,speed:s,state:a,selectionType:o,chartType:A,onChange:function(h,d){var f=d.value;switch(h){case"reset":c.internalReset();break;case"speed":c.handleSpeedChange(f);break;case"backward":c.internalBackward();break;case"playPause":f==="play"?c.internalPlay():c.internalPause();break;case"forward":c.internalForward();break;case"selectionType":c.handleSelectionTypeChange(f);break;case"chartType":c.handleChartTypeChange(f);break;default:break}}}),l);n==="time"&&(u.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(u)},t.prototype.dispatchOnChange=function(e){var n=this.data,i=this.attributes.onChange,a=this.states,s=a.values,o=a.selectionType,A=(0,z.CR)(s,2),l=A[0],c=A[1],u=c===1/0?n.at(-1).time:c,h=o==="range"?[l,u]:u,d=function(f,g){return Array.isArray(f)?Array.isArray(g)?f[0]===g[0]&&(f[1]===g[1]||f[1]===1/0||g[1]===1/0):!1:Array.isArray(g)?!1:f===g};(!e||!d(e,h))&&(i==null||i(o==="range"?[l,u]:u))},t.prototype.internalReset=function(e){var n,i,a=this.states.selectionType;this.internalPause(),this.setBySliderValues(a==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),e||((i=(n=this.attributes)===null||n===void 0?void 0:n.onReset)===null||i===void 0||i.call(n),this.dispatchOnChange())},t.prototype.reset=function(){this.internalReset()},t.prototype.moveSelection=function(e,n){var i=this.data,a=i.length,s=this.states,o=s.values,A=s.selectionType,l=s.playMode,c=(0,z.CR)(o,2),u=c[0],h=c[1],d=i.findIndex(function(C){var F=C.time;return F===u}),f=i.findIndex(function(C){var F=C.time;return F===h});f===-1&&(f=a);var g=e==="backward"?-1:1,v;A==="range"?l==="acc"?(v=[d,f+g],g===-1&&d===f&&(v=[d,a])):v=[d+g,f+g]:v=[d,f+g];var m=function(C){var F=(0,z.CR)(C.sort(function(G,J){return G-J}),2),Q=F[0],D=F[1],K=function(G){return hr(G,0,a)};return D>a?A==="value"?[0,0]:l==="acc"?[K(Q),K(Q)]:[0,K(D-Q)]:Q<0?l==="acc"?[0,K(D)]:[K(Q+a-D),a]:[K(Q),K(D)]},w=m(v);return this.setByIndex(w),this.updateSelection(),w},t.prototype.internalBackward=function(e){var n,i,a=this.moveSelection("backward",e);return e||((i=(n=this.attributes)===null||n===void 0?void 0:n.onBackward)===null||i===void 0||i.call(n),this.dispatchOnChange()),a},t.prototype.backward=function(){this.internalBackward()},t.prototype.internalPlay=function(e){var n=this,i,a,s=this.data,o=this.attributes.loop,A=this.states.speed,l=A===void 0?1:A;this.playInterval=window.setInterval(function(){var c=n.internalForward();c[1]===s.length&&!o&&(n.internalPause(),n.renderController())},1e3/l),this.states.state="play",!e&&((a=(i=this.attributes)===null||i===void 0?void 0:i.onPlay)===null||a===void 0||a.call(i))},t.prototype.play=function(){this.internalPlay()},t.prototype.internalPause=function(e){var n,i;clearInterval(this.playInterval),this.states.state="pause",!e&&((i=(n=this.attributes)===null||n===void 0?void 0:n.onPause)===null||i===void 0||i.call(n))},t.prototype.pause=function(){this.internalPause()},t.prototype.internalForward=function(e){var n,i,a=this.moveSelection("forward",e);return e||((i=(n=this.attributes)===null||n===void 0?void 0:n.onForward)===null||i===void 0||i.call(n),this.dispatchOnChange()),a},t.prototype.forward=function(){this.internalForward()},t.prototype.handleSpeedChange=function(e){var n,i;this.states.speed=e;var a=this.states.state;a==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(i=(n=this.attributes)===null||n===void 0?void 0:n.onSpeedChange)===null||i===void 0||i.call(n,e)},t.prototype.handleSelectionTypeChange=function(e){var n,i;this.states.selectionType=e,this.renderChart(),(i=(n=this.attributes)===null||n===void 0?void 0:n.onSelectionTypeChange)===null||i===void 0||i.call(n,e)},t.prototype.handleChartTypeChange=function(e){var n,i;this.states.chartType=e,this.renderChart(),(i=(n=this.attributes)===null||n===void 0?void 0:n.onChartTypeChange)===null||i===void 0||i.call(n,e)},t.prototype.render=function(){var e=this.space,n=e.axisBBox,i=e.controllerBBox,a=e.timelineBBox;this.renderController(i),this.renderAxis(n),this.renderChart(a),this.states.state==="play"&&this.internalPlay()},t.prototype.destroy=function(){r.prototype.destroy.call(this),this.internalPause(!0)},t.defaultOptions={style:{x:0,y:0,axisLabelFill:"#6e6e6e",axisLabelTextAlign:"left",axisLabelTextBaseline:"top",axisLabelTransform:"translate(5, -12)",axisLineLineWidth:1,axisLineStroke:"#cacdd1",axisTickLength:15,axisTickLineWidth:1,axisTickStroke:"#cacdd1",chartShowLabel:!1,chartType:"line",controllerAlign:"center",controllerHeight:40,data:[],interval:"day",loop:!1,playMode:"acc",selectionType:"range",type:"time"}},t}(Sr);function ZH(r){return r instanceof Date}var jH=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})},YH=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const XH=["timestamp","time","date","datetime"];class T0 extends mi{get padding(){return La(this.options.padding)}constructor(t,e){super(t,Object.assign({},T0.defaultOptions,e)),this.backup(),this.upsertTimebar()}play(){var t;(t=this.timebar)===null||t===void 0||t.play()}pause(){var t;(t=this.timebar)===null||t===void 0||t.pause()}forward(){var t;(t=this.timebar)===null||t===void 0||t.forward()}backward(){var t;(t=this.timebar)===null||t===void 0||t.backward()}reset(){var t;(t=this.timebar)===null||t===void 0||t.reset()}update(t){super.update(t),this.backup(),this.upsertTimebar()}backup(){this.originalData=vS(this.context.graph.getData())}upsertTimebar(){const{canvas:t}=this.context,e=this.options,{onChange:n,timebarType:i,data:a,x:s,y:o,width:A,height:l,mode:c}=e,u=YH(e,["onChange","timebarType","data","x","y","width","height","mode"]),h=t.getSize(),[d]=this.padding;this.upsertCanvas().ready.then(()=>{var f;const g=Object.assign(Object.assign({x:h[0]/2-A/2,y:d,onChange:v=>{const m=(Ni(v)?v:[v,v]).map(w=>ZH(w)?w.getTime():w);this.options.mode==="modify"?this.filterElements(m):this.hiddenElements(m),n==null||n(m)}},u),{data:a.map(v=>ye(v)?{time:v,value:0}:v),width:A,height:l,type:i});this.timebar?this.timebar.update(g):(this.timebar=new WH({style:g}),(f=this.canvas)===null||f===void 0||f.appendChild(this.timebar))})}upsertCanvas(){if(this.canvas)return this.canvas;const{className:t,height:e,position:n}=this.options,i=this.context.canvas,[a]=i.getSize(),[s,,o]=this.padding,[A,l]=f0({width:a,height:e+s+o,graphCanvas:i,className:"timebar",placement:n});return this.container=A,t&&A.classList.add(t),this.canvas=l,this.canvas}filterElements(t){return jH(this,void 0,void 0,function*(){var e;if(!this.originalData)return;const{elementTypes:n,getTime:i}=this.options,{graph:a,element:s}=this.context,o=vS(this.originalData);n.forEach(l=>{const c=`${l}s`;o[c]=(this.originalData[c]||[]).filter(u=>{const h=i(u);return!!pS(h,t)})});const A=[...o.nodes,...o.combos].map(l=>Qt(l));o.edges=o.edges.filter(l=>{const c=l.source,u=l.target;return A.includes(c)&&A.includes(u)}),a.setData(o),yield(e=s.draw({animation:!1,silence:!0}))===null||e===void 0?void 0:e.finished})}hiddenElements(t){const{graph:e}=this.context,{elementTypes:n,getTime:i}=this.options,a=[],s=[];n.forEach(o=>{var A;const l=`${o}s`;(((A=this.originalData)===null||A===void 0?void 0:A[l])||[]).forEach(u=>{const h=Qt(u),d=i(u);pS(d,t)?s.push(h):a.push(h)})}),e.hideElement(a,!1),e.showElement(s,!1)}destroy(){var t,e,n;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(t=this.timebar)===null||t===void 0||t.destroy(),(e=this.canvas)===null||e===void 0||e.destroy(),(n=this.container)===null||n===void 0||n.remove(),this.originalData=void 0,this.container=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}T0.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>JH(r,XH,void 0),loop:!1};const vS=r=>{const{nodes:t=[],edges:e=[],combos:n=[]}=r;return{nodes:[...t],edges:[...e],combos:[...n]}},pS=(r,t)=>{if(ye(t))return r===t;const[e,n]=t;return r>=e&&r<=n},JH=(r,t,e)=>{var n;for(let i=0;i<t.length;i++){const a=t[i],s=(n=r.data)===null||n===void 0?void 0:n[a];if(s)return s}return e};var qH=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const mS={fill:"#1D2129",wordWrap:!0,maxLines:1,textOverflow:"ellipsis",textBaseline:"top",textAlign:"start",x:0},$H=Object.assign(Object.assign({},mS),{fillOpacity:.9,fontSize:16,fontWeight:"bold"}),t6=Object.assign(Object.assign({},mS),{fillOpacity:.65,fontSize:12,fontWeight:"normal"}),e6={align:"left",spacing:8,size:44,padding:[16,24,0,24]},D1="title",yS="subtitle";class n6 extends mi{get padding(){return La(this.options.padding)}constructor(t,e){const n=Object.assign({},e6,e);super(t,n),this.onRender=()=>{const i=this.updateCanvas();this.renderTitle(i)},this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(Ae.AFTER_RENDER,this.onRender),t.on(Ae.AFTER_ANIMATE,this.onRender)}unbindEvents(){const{graph:t}=this.context;t.off(Ae.AFTER_RENDER,this.onRender),t.off(Ae.AFTER_ANIMATE,this.onRender)}destroy(){var t,e;this.unbindEvents(),(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),super.destroy()}updateCanvas(){const{size:t,className:e,align:n}=this.options,[i]=this.context.canvas.getSize(),[a=0,,s=0]=this.padding,o=t+a+s;if(this.canvas){const{width:A,height:l}=this.canvas.getConfig();(i!==A||o!==l)&&this.canvas.resize(i,o)}else{const A={left:"left-top",center:"top",right:"right-top"},[l,c]=f0({width:i,height:o,placement:A[n]||A.left,className:"title-canvas",graphCanvas:this.context.canvas});e&&l.classList.add(e),this.container=l,this.canvas=c}return this.canvas}renderTitle(t){const e=new r6({options:this.options,ctx:this.context});t.removeChildren(),e.getTitle().forEach(n=>{n&&t.appendChild(n)})}}class r6{get padding(){return La(this.options.padding)}constructor(t){const{options:e,ctx:n}=t;this.options=e,this.context=n}getTitle(){const t=this.options,e=D1,n=t[e],i=yS,a=t[i],{spacing:s=44,padding:o,align:A}=t,l=qH(t,[typeof e=="symbol"?e:e+"",typeof i=="symbol"?i:i+"","spacing","padding","align"]),c=n,u=a,h=Or(l,D1),d=Or(l,yS),[f]=this.context.graph.getSize(),[g=0,v=0,,m=0]=this.padding,w=f,C=w-m-v;let F=null,Q=m,D="left";switch(A){case"left":Q=m,D="left";break;case"center":Q=w/2,D="center";break;case"right":Q=w-v,D="right";break;default:Q=m,D="left"}const K=new io({className:D1,style:Object.assign(Object.assign(Object.assign(Object.assign({},$H),{wordWrapWidth:C-5,x:Q,y:g,textAlign:D}),h),{text:c})}),G=K.getBBox();return u&&(F=new io({className:"subTitle",style:Object.assign(Object.assign(Object.assign(Object.assign({},t6),{wordWrapWidth:C-5,x:Q,y:G.height+s+g,textAlign:D}),d),{text:u})})),[K,F]}}function i6(r){const t={top:"unset",right:"unset",bottom:"unset",left:"unset"};return r.split("-").forEach(n=>{t[n]="8px"}),t.flexDirection=r.startsWith("top")||r.startsWith("bottom")?"row":"column",t}const a6=`
.g6-toolbar {
position: absolute;
z-index: 100;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
border-radius: 4px;
box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.1);
opacity: 0.65;
}
.g6-toolbar .g6-toolbar-item {
display: inline-block;
width: 16px;
height: 16px;
padding: 4px;
cursor: pointer;
box-sizing: content-box;
}
.g6-toolbar .g6-toolbar-item:hover {
background-color: #f0f0f0;
}
.g6-toolbar .g6-toolbar-item svg {
display: inline-block;
width: 100%;
height: 100%;
pointer-events: none;
}
`,s6=`
<svg>
<symbol id="zoom-in" viewBox="64 64 896 896">
<path d="M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
</symbol>
<symbol id="zoom-out" viewBox="64 64 896 896">
<path d="M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"></path>
</symbol>
<symbol id="edit" viewBox="64 64 896 896">
<path d="M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"></path>
</symbol>
<symbol id="delete" viewBox="64 64 896 896">
<path d="M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"></path>
</symbol>
<symbol id="redo" viewBox="64 64 896 896">
<path d="M758.2 839.1C851.8 765.9 912 651.9 912 523.9 912 303 733.5 124.3 512.6 124 291.4 123.7 112 302.8 112 523.9c0 125.2 57.5 236.9 147.6 310.2 3.5 2.8 8.6 2.2 11.4-1.3l39.4-50.5c2.7-3.4 2.1-8.3-1.2-11.1-8.1-6.6-15.9-13.7-23.4-21.2a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-9.3 9.3-19.1 18-29.3 26L668.2 724a8 8 0 00-14.1 3l-39.6 162.2c-1.2 5 2.6 9.9 7.7 9.9l167 .8c6.7 0 10.5-7.7 6.3-12.9l-37.3-47.9z"></path>
</symbol>
<symbol id="undo" viewBox="64 64 896 896">
<path d="M511.4 124C290.5 124.3 112 303 112 523.9c0 128 60.2 242 153.8 315.2l-37.5 48c-4.1 5.3-.3 13 6.3 12.9l167-.8c5.2 0 9-4.9 7.7-9.9L369.8 727a8 8 0 00-14.1-3L315 776.1c-10.2-8-20-16.7-29.3-26a318.64 318.64 0 01-68.6-101.7C200.4 609 192 567.1 192 523.9s8.4-85.1 25.1-124.5c16.1-38.1 39.2-72.3 68.6-101.7 29.4-29.4 63.6-52.5 101.7-68.6C426.9 212.4 468.8 204 512 204s85.1 8.4 124.5 25.1c38.1 16.1 72.3 39.2 101.7 68.6 29.4 29.4 52.5 63.6 68.6 101.7 16.7 39.4 25.1 81.3 25.1 124.5s-8.4 85.1-25.1 124.5a318.64 318.64 0 01-68.6 101.7c-7.5 7.5-15.3 14.5-23.4 21.2a7.93 7.93 0 00-1.2 11.1l39.4 50.5c2.8 3.5 7.9 4.1 11.4 1.3C854.5 760.8 912 649.1 912 523.9c0-221.1-179.4-400.2-400.6-399.9z"></path>
</symbol>
<symbol id="export" viewBox="64 64 896 896">
<path d="M880 912H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32h360c4.4 0 8 3.6 8 8v56c0 4.4-3.6 8-8 8H184v656h656V520c0-4.4 3.6-8 8-8h56c4.4 0 8 3.6 8 8v360c0 17.7-14.3 32-32 32zM770.87 199.13l-52.2-52.2a8.01 8.01 0 014.7-13.6l179.4-21c5.1-.6 9.5 3.7 8.9 8.9l-21 179.4c-.8 6.6-8.9 9.4-13.6 4.7l-52.4-52.4-256.2 256.2a8.03 8.03 0 01-11.3 0l-42.4-42.4a8.03 8.03 0 010-11.3l256.1-256.3z"></path>
</symbol>
<symbol id="auto-fit" viewBox="64 64 896 896">
<path d="M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"></path>
<path d="M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"></path>
</symbol>
<symbol id="reset" viewBox="64 64 896 896">
<path d="M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"></path>
</symbol>
<symbol id="exit-fullscreen" viewBox="0 0 1024 1024">
<path d="M418.13333333 361.43786666c0 0.2048-0.13653333 0.4096-0.13653334 0.68266667C417.99679999 362.32533333 418.13333333 362.53013333 418.13333333 362.73493333 418.13333333 371.54133333 414.44693333 379.392 408.78079999 385.39946666 408.43946666 385.7408 408.30293333 386.21866666 408.02986666 386.49173333c-1.09226667 1.09226667-2.59413333 1.77493333-3.82293333 2.73066667C398.40426666 393.65973333 391.64586666 396.8 383.93173333 396.8 383.72693333 396.8 383.59039999 396.73173333 383.38559999 396.73173333S382.97599999 396.8 382.77119999 396.8L112.29866666 396.8C92.50133333 396.8 76.79999999 381.50826666 76.79999999 362.66666666 76.66346666 343.89333333 92.63786666 328.53333333 112.16213333 328.53333333l189.44 0L87.44959999 114.51733333C73.59146666 100.59093333 73.25013333 78.5408 86.63039999 65.29706666c13.17546667-13.44853333 35.36213333-12.97066667 49.152 0.88746667l214.08426667 214.08426667L349.86666666 90.89706666C349.79839999 71.23626666 365.22666666 55.46666666 383.99999999 55.46666666 402.77333333 55.33013333 418.13333333 71.30453333 418.13333333 90.8288L418.13333333 361.43786666zM928.90453333 328.53333333l-189.44 0 214.15253333-214.08426667c13.85813333-13.9264 14.19946667-35.90826667 0.88746667-49.22026666-13.17546667-13.44853333-35.36213333-12.97066667-49.152 0.88746666l-214.08426667 214.08426667L691.26826666 90.89706666C691.26826666 71.23626666 675.83999999 55.46666666 657.06666666 55.46666666 638.29333333 55.33013333 622.93333333 71.30453333 622.93333333 90.8288l0 270.60906666c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 362.32533333 622.93333333 362.53013333 622.93333333 362.73493333 622.93333333 371.54133333 626.61973333 379.392 632.28586666 385.39946666c0.34133333 0.34133333 0.47786667 0.8192 0.8192 1.09226667 1.09226667 1.09226667 2.59413333 1.77493333 3.8912 2.73066667C642.66239999 393.65973333 649.42079999 396.8 657.13493333 396.8c0.2048 0 0.34133333-0.06826667 0.54613333-0.06826667S658.09066666 396.8 658.29546666 396.8l270.5408 0C948.56533333 396.8 964.26666666 381.50826666 964.26666666 362.66666666 964.40319999 343.89333333 948.42879999 328.53333333 928.90453333 328.53333333zM418.13333333 635.73333333c0-8.8064-3.6864-16.5888-9.35253334-22.66453333C408.43946666 612.72746666 408.30293333 612.2496 408.02986666 611.90826666 406.86933333 610.88426666 405.43573333 610.2016 404.20693333 609.24586666 398.47253333 604.80853333 391.64586666 601.6 383.93173333 601.6 383.72693333 601.6 383.59039999 601.73653333 383.38559999 601.73653333S382.97599999 601.6 382.77119999 601.6L112.29866666 601.6C92.50133333 601.6 76.79999999 616.96 76.79999999 635.73333333 76.66346666 654.50666666 92.63786666 669.86666666 112.16213333 669.86666666l189.44 0-214.15253334 214.15253334c-13.85813333 13.85813333-14.19946667 35.84-0.88746666 49.22026666 13.17546667 13.44853333 35.36213333 12.9024 49.152-0.95573333l214.08426666-214.08426667 0 189.37173334c0 19.59253333 15.42826667 35.49866667 34.2016 35.36213333C402.77333333 943.2064 418.13333333 927.232 418.13333333 907.5712L418.13333333 637.09866666c0-0.27306667-0.13653333-0.47786667-0.13653334-0.68266666C417.99679999 636.14293333 418.13333333 635.93813333 418.13333333 635.73333333zM739.46453333 669.86666666l189.44 0c19.456 0 35.49866667-15.36 35.36213333-34.13333333C964.26666666 616.96 948.56533333 601.6 928.76799999 601.6L658.29546666 601.6C658.09066666 601.6 657.88586666 601.73653333 657.68106666 601.73653333S657.33973333 601.6 657.13493333 601.6C649.42079999 601.6 642.59413333 604.80853333 636.85973333 609.24586666 635.63093333 610.2016 634.19733333 610.88426666 633.03679999 611.90826666 632.76373333 612.2496 632.62719999 612.72746666 632.28586666 613.0688 626.61973333 619.14453333 622.93333333 626.92693333 622.93333333 635.73333333c0 0.2048 0.13653333 0.4096 0.13653333 0.68266667C623.06986666 636.6208 622.93333333 636.8256 622.93333333 637.09866666l0 270.5408C622.93333333 927.232 638.29333333 943.2064 657.06666666 942.93333333c18.77333333 0.13653333 34.2016-15.70133333 34.2016-35.36213333l0-189.37173334 214.08426667 214.08426667c13.78986667 13.85813333 35.90826667 14.40426667 49.152 0.95573333 13.312-13.312 12.97066667-35.36213333-0.88746667-49.22026666L739.46453333 669.86666666z" ></path></symbol>
<symbol id="request-fullscreen" viewBox="0 0 1024 1024">
<path d="M69.818182 87.598545v273.128728a34.909091 34.909091 0 0 0 69.818182 0V163.653818l221.928727 222.021818a33.512727 33.512727 0 0 0 47.383273-47.383272L186.926545 116.363636h197.073455a34.909091 34.909091 0 0 0 0-69.818181H110.871273C85.364364 46.545455 69.818182 59.671273 69.818182 87.598545zM938.542545 46.545455H665.413818a34.909091 34.909091 0 0 0 0 69.818181h197.073455L640.465455 338.292364a33.512727 33.512727 0 0 0 47.383272 47.383272l221.928728-222.021818v197.073455a34.909091 34.909091 0 0 0 69.818181 0V87.598545c0-27.927273-15.453091-41.053091-40.96-41.05309z m-827.671272 907.636363h273.128727a34.909091 34.909091 0 0 0 0-69.818182H186.926545l222.021819-221.928727a33.512727 33.512727 0 0 0-47.383273-47.383273L139.636364 837.073455V640a34.909091 34.909091 0 0 0-69.818182 0v273.128727c0 27.927273 15.546182 41.053091 41.053091 41.053091z m868.724363-41.053091V640a34.909091 34.909091 0 0 0-69.818181 0v197.073455L687.941818 615.051636a33.512727 33.512727 0 0 0-47.383273 47.383273L862.487273 884.363636H665.413818a34.909091 34.909091 0 0 0 0 69.818182h273.128727c25.6 0 41.053091-13.125818 41.053091-41.053091z" ></path></symbol>
</svg>
`;var wS=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class F0 extends mi{constructor(t,e){super(t,Object.assign({},F0.defaultOptions,e)),this.$element=zc("toolbar",!1),this.onToolbarItemClick=i=>{const{onClick:a}=this.options;if(i.target instanceof Element&&i.target.className.includes("g6-toolbar-item")){const s=i.target.getAttribute("value");a==null||a(s,i.target)}};const n=this.context.canvas.getContainer();this.$element.style.display="flex",n.appendChild(this.$element),Vy("g6-toolbar-css","style",{},a6,document.head),Vy("g6-toolbar-svgicon","div",{display:"none"},s6),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return wS(this,void 0,void 0,function*(){e.update.call(this,t);const{className:n,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${n||""}`,Object.assign(this.$element.style,a,i6(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return wS(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(e=>{var n;return`
<div class="g6-toolbar-item" value="${e.value}" title="${(n=e.title)!==null&&n!==void 0?n:""}">
<svg aria-hidden="true" focusable="false">
<use xlink:href="#${e.id}"></use>
</svg>
</div>`}).join("")})}}F0.defaultOptions={position:"top-left"};function R1(r){var t=document.createElement("div");t.innerHTML=r;var e=t.childNodes[0];return e&&t.contains(e)&&t.removeChild(e),e}function o6(r,t){return!r||!t?r:r.replace(/\\?\{([^{}]+)\}/g,function(e,n){return e.charAt(0)==="\\"?e.slice(1):t[n]===void 0?"":t[n]})}var A6=o6,ES=function(r,t){if(t==null){r.innerHTML="";return}r.replaceChildren?Array.isArray(t)?r.replaceChildren.apply(r,(0,z.ev)([],(0,z.CR)(t),!1)):r.replaceChildren(t):(r.innerHTML="",Array.isArray(t)?t.forEach(function(e){return r.appendChild(e)}):r.appendChild(t))};function _1(r){return r===void 0&&(r=""),{CONTAINER:"".concat(r,"tooltip"),TITLE:"".concat(r,"tooltip-title"),LIST:"".concat(r,"tooltip-list"),LIST_ITEM:"".concat(r,"tooltip-list-item"),NAME:"".concat(r,"tooltip-list-item-name"),MARKER:"".concat(r,"tooltip-list-item-marker"),NAME_LABEL:"".concat(r,"tooltip-list-item-name-label"),VALUE:"".concat(r,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(r,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(r,"tooltip-crosshair-y")}}var BS={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function l6(r){var t;r===void 0&&(r="");var e=_1(r);return t={},t[".".concat(e.CONTAINER)]={position:"absolute",visibility:"visible","z-index":8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)","background-color":"rgba(255, 255, 255, 0.96)","box-shadow":"0 6px 12px 0 rgba(0, 0, 0, 0.12)","border-radius":"4px",color:"rgba(0, 0, 0, 0.65)","font-size":"12px","line-height":"20px",padding:"12px","min-width":"120px","max-width":"360px","font-family":"Roboto-Regular"},t[".".concat(e.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},t[".".concat(e.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},t[".".concat(e.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},t[".".concat(e.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},t[".".concat(e.NAME)]={display:"flex","align-items":"center","max-width":"216px"},t[".".concat(e.NAME_LABEL)]=(0,z.pi)({flex:1},BS),t[".".concat(e.VALUE)]=(0,z.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},BS),t[".".concat(e.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t[".".concat(e.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},t}var c6=function(r){(0,z.ZT)(t,r);function t(e){var n=this,i,a,s=(a=(i=e.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,o=_1(s);return n=r.call(this,e,{data:[],x:0,y:0,visibility:"visible",title:"",position:"bottom-right",offset:[5,5],enterable:!1,container:{x:0,y:0},bounding:null,template:{prefixCls:"",container:'<div class="'.concat(o.CONTAINER,'"></div>'),title:'<div class="'.concat(o.TITLE,'"></div>'),item:'<li class="'.concat(o.LIST_ITEM,`" data-index={index}>
<span class="`).concat(o.NAME,`">
<span class="`).concat(o.MARKER,`" style="background:{color}"></span>
<span class="`).concat(o.NAME_LABEL,`" title="{name}">{name}</span>
</span>
<span class="`).concat(o.VALUE,`" title="{value}">{value}</span>
</li>`)},style:l6(s)})||this,n.timestamp=-1,n.prevCustomContentKey=n.attributes.contentKey,n.initShape(),n.render(n.attributes,n),n}return Object.defineProperty(t.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),t.prototype.getContainer=function(){return this.element},Object.defineProperty(t.prototype,"elementSize",{get:function(){var e=this.element.offsetWidth,n=this.element.offsetHeight;return{width:e,height:n}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"HTMLTooltipItemsElements",{get:function(){var e=this.attributes,n=e.data,i=e.template;return n.map(function(a,s){var o=a.name,A=o===void 0?"":o,l=a.color,c=l===void 0?"black":l,u=a.index,h=(0,z._T)(a,["name","color","index"]),d=(0,z.pi)({name:A,color:c,index:u!=null?u:s},h);return R1(A6(i.item,d))})},enumerable:!1,configurable:!0}),t.prototype.render=function(e,n){this.renderHTMLTooltipElement(),this.updatePosition()},t.prototype.destroy=function(){var e;(e=this.element)===null||e===void 0||e.remove(),r.prototype.destroy.call(this)},t.prototype.show=function(e,n){var i=this;if(e!==void 0&&n!==void 0){var a=this.element.style.visibility==="hidden",s=function(){i.attributes.x=e!=null?e:i.attributes.x,i.attributes.y=n!=null?n:i.attributes.y,i.updatePosition()};a?this.closeTransition(s):s()}this.element.style.visibility="visible"},t.prototype.hide=function(e,n){e===void 0&&(e=0),n===void 0&&(n=0);var i=this.attributes.enterable;i&&this.isCursorEntered(e,n)||(this.element.style.visibility="hidden")},t.prototype.initShape=function(){var e=this.attributes.template;this.element=R1(e.container),this.id&&this.element.setAttribute("id",this.id)},t.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var e=this.attributes.content;e&&(typeof e=="string"?this.element.innerHTML=e:ES(this.element,e))}},t.prototype.renderHTMLTooltipElement=function(){var e,n,i=this.attributes,a=i.template,s=i.title,o=i.enterable,A=i.style,l=i.content,c=_1(a.prefixCls),u=this.element;if(this.element.style.pointerEvents=o?"auto":"none",l)this.renderCustomContent();else{s?(u.innerHTML=a.title,u.getElementsByClassName(c.TITLE)[0].innerHTML=s):(n=(e=u.getElementsByClassName(c.TITLE))===null||e===void 0?void 0:e[0])===null||n===void 0||n.remove();var h=this.HTMLTooltipItemsElements,d=document.createElement("ul");d.className=c.LIST,ES(d,h);var f=this.element.querySelector(".".concat(c.LIST));f?f.replaceWith(d):u.appendChild(d)}wR(u,A)},t.prototype.getRelativeOffsetFromCursor=function(e){var n=this.attributes,i=n.position,a=n.offset,s=e||i,o=s.split("-"),A={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},l=this.elementSize,c=l.width,u=l.height,h=[-c/2,-u/2];return o.forEach(function(d){var f=(0,z.CR)(h,2),g=f[0],v=f[1],m=(0,z.CR)(A[d],2),w=m[0],C=m[1];h=[g+(c/2+a[0])*w,v+(u/2+a[1])*C]}),h},t.prototype.setOffsetPosition=function(e){var n=(0,z.CR)(e,2),i=n[0],a=n[1],s=this.attributes,o=s.x,A=o===void 0?0:o,l=s.y,c=l===void 0?0:l,u=s.container,h=u.x,d=u.y;this.element.style.left="".concat(+A+h+i,"px"),this.element.style.top="".concat(+c+d+a,"px")},t.prototype.updatePosition=function(){var e=this.attributes.showDelay,n=e===void 0?60:e,i=Date.now();this.timestamp>0&&i-this.timestamp<n||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},t.prototype.autoPosition=function(e){var n=(0,z.CR)(e,2),i=n[0],a=n[1],s=this.attributes,o=s.x,A=s.y,l=s.bounding,c=s.position;if(!l)return[i,a];var u=this.element,h=u.offsetWidth,d=u.offsetHeight,f=(0,z.CR)([+o+i,+A+a],2),g=f[0],v=f[1],m={left:"right",right:"left",top:"bottom",bottom:"top"},w=l.x,C=l.y,F=l.width,Q=l.height,D={left:g<w,right:g+h>w+F,top:v<C,bottom:v+d>C+Q},K=[];c.split("-").forEach(function(J){D[J]?K.push(m[J]):K.push(J)});var G=K.join("-");return this.getRelativeOffsetFromCursor(G)},t.prototype.isCursorEntered=function(e,n){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,s=i.y,o=i.width,A=i.height;return new _i(a,s,o,A).isPointIn(e,n)}return!1},t.prototype.closeTransition=function(e){var n=this,i=this.element.style.transition;this.element.style.transition="none",e(),setTimeout(function(){n.element.style.transition=i},10)},t.tag="tooltip",t}(Sr),bS=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class O0 extends mi{constructor(t,e){super(t,Object.assign({},O0.defaultOptions,e)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=(n,i)=>{const{enable:a}=this.options;return typeof a=="function"?a(n,i):a},this.onClick=n=>{const{target:{id:i}}=n;this.currentTarget===i?this.hide(n):this.show(n)},this.onPointerMove=n=>{const{target:i}=n;!this.currentTarget||i.id===this.currentTarget||this.show(n)},this.onPointerLeave=n=>{this.hide(n)},this.onCanvasMove=n=>{this.hide(n)},this.onPointerOver=n=>{this.show(n)},this.showById=n=>bS(this,void 0,void 0,function*(){const i={target:{id:n}};yield this.show(i)}),this.getElementData=(n,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([n]);case"edge":return a.getEdgeData([n]);case"combo":return a.getComboData([n]);default:return[]}},this.show=n=>bS(this,void 0,void 0,function*(){var i,a;const{client:s,target:{id:o}}=n;if(Ch(n.target))return;const A=this.context.graph.getElementType(o),{getContent:l,title:c}=this.options,u=this.getElementData(o,A);if(!this.tooltipElement)return;if(!this.isEnable(n,u)){this.hide(n);return}let h={};if(l){if(h.content=yield l(n,u),!h.content)return}else{const g=this.context.graph.getElementRenderStyle(o),v=A==="node"?g.fill:g.stroke;h={title:c||A,data:u.map(m=>({name:"ID",value:m.id||`${m.source} -> ${m.target}`,color:v}))}}this.currentTarget=o;let d,f;if(s)d=s.x,f=s.y;else{const g=Mi(u,"0.style",{x:0,y:0});d=g.x,f=g.y}(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!0),this.tooltipElement.update(Object.assign(Object.assign(Object.assign({},this.tooltipStyleProps),{x:d,y:f,style:{".tooltip":{visibility:"visible"}}}),h))}),this.hide=n=>{var i,a,s,o,A;if(!n){(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!1),(s=this.tooltipElement)===null||s===void 0||s.hide(),this.currentTarget=null;return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:l,y:c}}=n;(A=(o=this.options).onOpenChange)===null||A===void 0||A.call(o,!1),this.tooltipElement.hide(l,c),this.currentTarget=null},this.initTooltip=()=>{var n;const i=new c6({className:"tooltip",style:this.tooltipStyleProps});return(n=this.container)===null||n===void 0||n.appendChild(i.HTMLTooltipElement),i},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerover":this.onPointerOver,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerover":this.onPointerOver,"edge:pointermove":this.onPointerMove,"combo:pointerover":this.onPointerOver,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(t){var e;this.unbindEvents(),super.update(t),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:t}=this.context,e=t.getContainer();e&&(this.container=e,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.off(n,e[n])})}bindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.on(n,e[n])})}get tooltipStyleProps(){const{canvas:t}=this.context,{center:e}=t.getBounds(),n=t.getContainer(),{top:i,left:a}=n.getBoundingClientRect(),{style:s,position:o,enterable:A,container:l={x:-a,y:-i},title:c,offset:u}=this.options,[h,d]=e,[f,g]=t.getSize();return{x:h,y:d,container:l,title:c,bounding:{x:0,y:0,width:f,height:g},position:o,enterable:A,offset:u,style:s}}destroy(){var t;this.unbindEvents(),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}O0.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var xS=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};let Xc;function CS(r,t){return Xc||(Xc=document.createElement("canvas")),Xc.width=r,Xc.height=t,Xc.getContext("2d").clearRect(0,0,r,t),Xc}function u6(r,t,e,n){return xS(this,void 0,void 0,function*(){const i=CS(r,t),a=i.getContext("2d"),{rotate:s,opacity:o,textFill:A,textFontSize:l,textFontFamily:c,textFontVariant:u,textFontWeight:h,textAlign:d,textBaseline:f}=n;return a.textAlign=d,a.textBaseline=f,a.translate(r/2,t/2),a.font=`${l}px ${c} ${u} ${h}`,s&&a.rotate(s),o&&(a.globalAlpha=o),A&&(a.fillStyle=A,a.fillText(`${e}`,0,0)),i.toDataURL()})}function h6(r,t,e,n){return xS(this,void 0,void 0,function*(){const i=CS(r,t),a=i.getContext("2d"),{rotate:s,opacity:o}=n;s&&a.rotate(s),o&&(a.globalAlpha=o);const A=new Image;return A.crossOrigin="anonymous",A.src=e,new Promise(l=>{A.onload=function(){const c=r>A.width?(r-A.width)/2:0,u=t>A.height?(t-A.height)/2:0;a.drawImage(A,0,0,A.width,A.height,c,u,r-c*2,t-u*2),l(i.toDataURL())}})})}var d6=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})},f6=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class I0 extends mi{constructor(t,e){super(t,Object.assign({},I0.defaultOptions,e)),this.$element=zc("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return d6(this,void 0,void 0,function*(){e.update.call(this,t);const n=this.options,{width:i,height:a,text:s,imageURL:o}=n,A=f6(n,["width","height","text","imageURL"]);Object.keys(A).forEach(c=>{c.startsWith("background")&&(this.$element.style[c]=t[c])});const l=o?yield h6(i,a,o,A):yield u6(i,a,s,A);this.$element.style.backgroundImage=`url(${l})`})}destroy(){super.destroy(),this.$element.remove()}}I0.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const g6=["#7E92B5","#F4664A","#FFBE3A"],v6={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},p6={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function SS(r){const{bgColor:t,textColor:e,nodeColor:n,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:s=.15,nodeHaloStrokeOpacitySelected:o=.25,nodeOpacityDisabled:A=.06,nodeIconOpacityInactive:l=.85,nodeOpacityInactive:c=.25,nodeBadgePalette:u=g6,nodePaletteOptions:h=v6,edgeColor:d,edgeColorDisabled:f,edgePaletteOptions:g=p6,comboColor:v,comboColorDisabled:m,comboStroke:w,comboStrokeDisabled:C,edgeColorInactive:F}=r;return{background:t,node:{palette:h,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:u,fill:n,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:e,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:n,portLineWidth:1,portStroke:a,portStrokeOpacity:.65,size:32,stroke:a,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:o,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:a},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:s},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:a,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:c,donutOpacity:c,fillOpacity:c,iconOpacity:l,labelFill:e,labelFillOpacity:c,strokeOpacity:c},disabled:{badgeBackgroundOpacity:.25,donutOpacity:A,fill:i,fillOpacity:A,iconFill:i,iconOpacity:.25,labelFill:e,labelFillOpacity:.25,strokeOpacity:A}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"node-expand",collapse:"node-collapse",update:[{fields:["x","y","fill","stroke"]}],translate:[{fields:["x","y"]}]}},edge:{palette:g,style:{badgeBackgroundFill:d,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,badgeBackgroundOpacity:1,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:d,strokeOpacity:1,zIndex:1},state:{selected:{halo:!0,haloStrokeOpacity:.25,labelFontSize:14,labelFontWeight:"bold",lineWidth:3},active:{halo:!0,haloStrokeOpacity:.15},highlight:{labelFontWeight:"bold",lineWidth:3},inactive:{stroke:F,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:f,fillOpacity:.45,strokeOpacity:.45,labelOpacity:.25,badgeBackgroundOpacity:.45}},animation:{enter:"fade",exit:"fade",expand:"path-in",collapse:"path-out",show:"fade",hide:"fade",update:[{fields:["sourceNode","targetNode"]},{fields:["stroke"],shape:"key"}],translate:[{fields:["sourceNode","targetNode"]}]}},combo:{style:{collapsedMarkerFill:t,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:v,halo:!1,haloLineWidth:12,haloStroke:w,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:w},state:{selected:{halo:!0,labelFontSize:14,labelFontWeight:700,lineWidth:4},active:{halo:!0},highlight:{labelFontWeight:700,lineWidth:4},inactive:{fillOpacity:.65,labelOpacity:.25,strokeOpacity:.65},disabled:{fill:m,fillOpacity:.25,labelOpacity:.25,stroke:C,strokeOpacity:.25}},animation:{enter:"fade",exit:"fade",show:"fade",hide:"fade",expand:"combo-expand",collapse:"combo-collapse",update:[{fields:["x","y"]},{fields:["fill","stroke","lineWidth"],shape:"key"}],translate:[{fields:["x","y"]}]}}}}const m6=SS({bgColor:"#000000",comboColor:"#fdfdfd",comboColorDisabled:"#d0e4ff",comboStroke:"#99add1",comboStrokeDisabled:"#969696",edgeColor:"#637088",edgeColorDisabled:"#637088",edgeColorInactive:"#D0E4FF",edgePaletteOptions:{type:"group",color:["#637088","#0F55A6","#008383","#9C5D38","#8B53A6","#4E40A6","#8F6608","#3E801D","#A65383","#175E75","#0F8248"]},nodeColor:"#1783ff",nodeColorDisabled:"#D0E4FF",nodeHaloStrokeOpacityActive:.25,nodeHaloStrokeOpacitySelected:.45,nodeIconOpacityInactive:.45,nodeOpacityDisabled:.25,nodeOpacityInactive:.45,nodeStroke:"#d0e4ff",textColor:"#ffffff"}),y6=SS({bgColor:"#ffffff",comboColor:"#99ADD1",comboColorDisabled:"#f0f0f0",comboStroke:"#99add1",comboStrokeDisabled:"#d9d9d9",edgeColor:"#99add1",edgeColorDisabled:"#d9d9d9",edgeColorInactive:"#1B324F",nodeColor:"#1783ff",nodeColorDisabled:"#1B324F",nodeHaloStrokeOpacityActive:.15,nodeHaloStrokeOpacitySelected:.25,nodeIconOpacityInactive:.85,nodeOpacityDisabled:.06,nodeOpacityInactive:.25,nodeStroke:"#000000",textColor:"#000000"});class kA extends Zm{beforeDraw(t,e){return t}afterLayout(t,e){}}class w6 extends kA{beforeDraw(t){const{model:e}=this.context,n=t.add.combos,i=a=>{const s=[];return a.forEach((o,A)=>{const c=e.getAncestorsData(A,"combo").map(u=>Qt(u)).reverse();s.push([A,o,c.length])}),new Map(s.sort(([,,o],[,,A])=>A-o).map(([o,A])=>[o,A]))};return t.add.combos=i(n),t.update.combos=i(t.update.combos),t}}function Pa(r,t,e,n,i){const a=Qt(n),s=`${e}s`,o=i?n:r.add[s].get(a)||r.update[s].get(a)||r.remove[s].get(a)||n;Object.entries(r).forEach(([A,l])=>{t===A?l[s].set(a,o):l[s].delete(a)})}function L0(r,t){return Object.keys(r).every(e=>r[e]===t[e])}class E6 extends kA{beforeDraw(t,e){if(e.stage==="visibility"||!this.context.model.model.hasTreeStructure(nr))return t;const{model:n}=this.context,{add:i,update:a}=t,s=[...t.update.combos.entries(),...t.add.combos.entries()];for(;s.length;){const[o,A]=s.pop();if(da(A)){const l=n.getDescendantsData(o),c=l.map(Qt),{internal:u,external:h}=hy(c,d=>n.getRelatedEdgesData(d));l.forEach(d=>{const f=Qt(d),g=s.findIndex(([m])=>m===f);g!==-1&&s.splice(g,1);const v=n.getElementType(f);Pa(t,"remove",v,d)}),u.forEach(d=>Pa(t,"remove","edge",d)),h.forEach(d=>{var f;const g=Qt(d);((f=this.context.element)===null||f===void 0?void 0:f.getElement(g))?a.edges.set(g,d):i.edges.set(g,d)})}else{const l=n.getChildrenData(o),c=l.map(Qt),{edges:u}=hy(c,h=>n.getRelatedEdgesData(h));[...l,...u].forEach(h=>{var d;const f=Qt(h),g=n.getElementType(f);((d=this.context.element)===null||d===void 0?void 0:d.getElement(f))?Pa(t,"update",g,h):Pa(t,"add",g,h),g==="combo"&&s.push([f,h])})}}return t}}const MS=(r,t,e,n)=>{const i=`${e}s`,a=Qt(n);!r.add[i].has(a)&&!r.update[i].has(a)&&r[t][i].set(Qt(n),n)};class B6 extends kA{getElement(t){return this.context.element.getElement(t)}handleExpand(t,e){if(MS(e,"add","node",t),da(t))return;const n=Qt(t);MS(e,"add","node",t),this.context.model.getRelatedEdgesData(n).forEach(s=>{Pa(e,"add","edge",s)}),this.context.model.getChildrenData(n).forEach(s=>{this.handleExpand(s,e)})}beforeDraw(t){const{graph:e,model:n}=this.context;if(!n.model.hasTreeStructure(Ia))return t;const{add:{nodes:i,edges:a},update:{nodes:s}}=t,o=new Map,A=new Map;i.forEach((c,u)=>{da(c)&&o.set(u,c)}),a.forEach(c=>{if(e.getElementType(c.source)!=="node")return;const u=e.getNodeData(c.source);da(u)&&o.set(c.source,u)}),s.forEach((c,u)=>{const h=this.getElement(u);if(!h)return;const d=h.attributes.collapsed;da(c)?d||o.set(u,c):d&&A.set(u,c)});const l=new Set;return o.forEach((c,u)=>{n.getDescendantsData(u).forEach(d=>{const f=Qt(d);if(l.has(f))return;Pa(t,"remove","node",d),n.getRelatedEdgesData(f).forEach(v=>{Pa(t,"remove","edge",v)}),l.add(f)})}),A.forEach((c,u)=>{if(n.getAncestorsData(u,Ia).some(da)){Pa(t,"remove","node",c);return}this.handleExpand(c,t)}),t}}const H1=new WeakMap;function bK(r,t,e){H1.has(r)||H1.set(r,{});const n=H1.get(r);if(!n[t])return n[t]=e,!0;const i=n[t];return TS(i,e)?!1:(n[t]=e,!0)}const TS=(r,t,e=2)=>{if(typeof r!="object"||typeof t!="object")return r===t;const n=Object.keys(r),i=Object.keys(t);if(n.length!==i.length)return!1;for(const a of n){const s=r[a],o=t[a];if(e>1&&typeof s=="object"&&typeof o=="object"){if(!TS(s,o,e-1))return!1}else if(s!==o)return!1}return!0};function b6(r,t,e){Om[r][t]&&ha.warn(`The extension ${t} of ${r} has been registered before, and will be overridden.`),Object.assign(Om[r],{[t]:e})}var FS=function(){function r(t){(0,L.Z)(this,r),this.dragndropPluginOptions=t}return(0,I.Z)(r,[{key:"apply",value:function(e){var n=this,i=e.renderingService,a=e.renderingContext,s=a.root.ownerDocument,o=s.defaultView,A=function(c){var u=c.target,h=u===s,d=h&&n.dragndropPluginOptions.isDocumentDraggable?s:u.closest&&u.closest("[draggable=true]");if(d){var f=!1,g=c.timeStamp,v=[c.clientX,c.clientY],m=null,w=[c.clientX,c.clientY],C=function(){var Q=(0,Wa.Z)((0,ri.Z)().mark(function D(K){var G,J,$,at,At,pt;return(0,ri.Z)().wrap(function(wt){for(;;)switch(wt.prev=wt.next){case 0:if(f){wt.next=2;break}if(G=K.timeStamp-g,J=Li([K.clientX,K.clientY],v),!(G<=n.dragndropPluginOptions.dragstartTimeThreshold||J<=n.dragndropPluginOptions.dragstartDistanceThreshold)){wt.next=1;break}return wt.abrupt("return");case 1:K.type="dragstart",d.dispatchEvent(K),f=!0;case 2:if(K.type="drag",K.dx=K.clientX-w[0],K.dy=K.clientY-w[1],d.dispatchEvent(K),w=[K.clientX,K.clientY],h){wt.next=4;break}return $=n.dragndropPluginOptions.overlap==="pointer"?[K.canvasX,K.canvasY]:u.getBounds().center,wt.next=3,s.elementsFromPoint($[0],$[1]);case 3:at=wt.sent,At=at[at.indexOf(u)+1],pt=(At==null?void 0:At.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?s:null),m!==pt&&(m&&(K.type="dragleave",K.target=m,m.dispatchEvent(K)),pt&&(K.type="dragenter",K.target=pt,pt.dispatchEvent(K)),m=pt,m&&(K.type="dragover",K.target=m,m.dispatchEvent(K)));case 4:case"end":return wt.stop()}},D)}));return function(K){return Q.apply(this,arguments)}}();o.addEventListener("pointermove",C);var F=function(D){if(f){D.detail={preventClick:!0};var K=D.clone();m&&(K.type="drop",K.target=m,m.dispatchEvent(K)),K.type="dragend",d.dispatchEvent(K),f=!1}o.removeEventListener("pointermove",C)};u.addEventListener("pointerup",F,{once:!0}),u.addEventListener("pointerupoutside",F,{once:!0})}};i.hooks.init.tap(r.tag,function(){o.addEventListener("pointerdown",A)}),i.hooks.destroy.tap(r.tag,function(){o.removeEventListener("pointerdown",A)})}}])}();FS.tag="Dragndrop";var x6=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,L.Z)(this,t),e=(0,P.Z)(this,t),e.name="dragndrop",e.options=n,e}return(0,k.Z)(t,r),(0,I.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new FS((0,H.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(n){Object.assign(this.plugins[0].dragndropPluginOptions,n)}}])}(ls),OS=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})},IS=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const LS=["main"],NS=["background","main","label","transient"];function C6(r){return r.main}class kS{getConfig(){return this.config}getLayer(t="main"){return this.extends.layers[t]||C6(this.getLayers())}getLayers(){return this.extends.layers}getRenderer(t){return this.extends.renderers[t]}getCamera(t="main"){return this.getLayer(t).getCamera()}getRoot(t="main"){return this.getLayer(t).getRoot()}getContextService(t="main"){return this.getLayer(t).getContextService()}setCursor(t){this.config.cursor=t,this.getLayer().setCursor(t)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(t){this.config={enableMultiLayer:!0},Object.assign(this.config,t);const e=this.config,{renderer:n,background:i,cursor:a,enableMultiLayer:s}=e,o=IS(e,["renderer","background","cursor","enableMultiLayer"]),A=s?NS:LS,l=QS(n,A),c=Object.fromEntries(A.map(u=>{const h=new dm(Object.assign(Object.assign({},o),{supportsMutipleCanvasesInOneContainer:s,renderer:l[u],background:s?u==="background"?i:void 0:i}));return[u,h]}));US(c),this.extends={config:this.config,renderer:n,renderers:l,layers:c}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,t])=>t.ready))}resize(t,e){Object.assign(this.extends.config,{width:t,height:e}),Object.values(this.getLayers()).forEach(n=>{const i=n.getCamera(),a=i.getPosition(),s=i.getFocalPoint();n.resize(t,e),i.setPosition(a),i.setFocalPoint(s)})}getBounds(t){return ch(Object.values(this.getLayers()).map(e=>t?e.getRoot().childNodes.find(i=>i.classList.includes(t)):e.getRoot()).filter(e=>(e==null?void 0:e.childNodes.length)>0).map(e=>e.getBounds()))}getContainer(){const t=this.extends.config.container;return typeof t=="string"?document.getElementById(t):t}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(t,e){var n;const i=((n=t.style)===null||n===void 0?void 0:n.$layer)||"main";return this.getLayer(i).appendChild(t,e)}setRenderer(t){if(t===this.extends.renderer)return;const e=QS(t,this.config.enableMultiLayer?NS:LS);this.extends.renderers=e,Object.entries(e).forEach(([n,i])=>this.getLayer(n).setRenderer(i)),US(this.getLayers())}getCanvasByViewport(t){return Si(this.getLayer().viewport2Canvas(xs(t)))}getViewportByCanvas(t){return Si(this.getLayer().canvas2Viewport(xs(t)))}getViewportByClient(t){return Si(this.getLayer().client2Viewport(xs(t)))}getClientByViewport(t){return Si(this.getLayer().viewport2Client(xs(t)))}getClientByCanvas(t){return this.getClientByViewport(this.getViewportByCanvas(t))}getCanvasByClient(t){const e=this.getLayer(),n=e.client2Viewport(xs(t));return Si(e.viewport2Canvas(n))}toDataURL(){return OS(this,arguments,void 0,function*(t={}){const e=globalThis.devicePixelRatio||1,{mode:n="viewport"}=t,i=IS(t,["mode"]);let[a,s,o,A]=[0,0,0,0];if(n==="viewport")[o,A]=this.getSize();else if(n==="overall"){const m=this.getBounds(),w=gA(m);[a,s]=m.min,[o,A]=w}const l=R1('<div id="virtual-image"></div>'),c=new dm({width:o,height:A,renderer:new Eh,devicePixelRatio:e,container:l,background:this.extends.config.background});yield c.ready,c.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),c.appendChild(this.getRoot().cloneNode(!0));const u=this.getLayer("label").getRoot().cloneNode(!0),h=c.viewport2Canvas({x:0,y:0}),d=this.getCanvasByViewport([0,0]);u.translate([d[0]-h.x,d[1]-h.y]),u.scale(1/this.getCamera().getZoom()),c.appendChild(u),c.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const f=this.getCamera(),g=c.getCamera();if(n==="viewport")g.setZoom(f.getZoom()),g.setPosition(f.getPosition()),g.setFocalPoint(f.getFocalPoint());else if(n==="overall"){const[m,w,C]=g.getPosition(),[F,Q,D]=g.getFocalPoint();g.setPosition([m+a,w+s,C]),g.setFocalPoint([F+a,Q+s,D])}const v=c.getContextService();return new Promise(m=>{c.addEventListener(Fa.RERENDER,()=>OS(this,void 0,void 0,function*(){yield new Promise(C=>setTimeout(C,300));const w=yield v.toDataURL(i);m(w)}))})})}destroy(){Object.values(this.getLayers()).forEach(t=>{t.getCamera().cancelLandmarkAnimation(),t.destroy()})}}function QS(r,t){return Object.fromEntries(t.map(e=>{const n=(r==null?void 0:r(e))||new Eh;return n instanceof Eh&&n.setConfig({enableDirtyRectangleRendering:!1}),e==="main"?n.registerPlugin(new x6({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):n.unregisterPlugin(n.getPlugin("dom-interaction")),[e,n]}))}function US(r){Object.entries(r).forEach(([t,e])=>{const n=e.getContextService().getDomElement();n!=null&&n.style&&(n.style.gridArea="1 / 1 / 2 / 2",n.style.outline="none",n.tabIndex=1,t!=="main"&&(n.style.pointerEvents="none")),n!=null&&n.parentElement&&(n.parentElement.style.display="grid",n.parentElement.style.isolation="isolate")})}const Jc=r=>r?parseInt(r):0;function S6(r){const t=getComputedStyle(r),e=r.clientWidth||Jc(t.width),n=r.clientHeight||Jc(t.height),i=Jc(t.paddingLeft)+Jc(t.paddingRight),a=Jc(t.paddingTop)+Jc(t.paddingBottom);return[e-i,n-a]}function PS(r){if(!r)return[0,0];let t=640,e=480;const[n,i]=S6(r);t=n||t,e=i||e;const a=1,s=1;return[Math.max(ye(t)?t:a,a),Math.max(ye(e)?e:s,s)]}class N0{constructor(t){this.type=t}}class Yr extends N0{constructor(t,e){super(t),this.data=e}}class rs extends N0{constructor(t,e,n,i){super(t),this.animationType=e,this.animation=n,this.data=i}}class qc extends N0{constructor(t,e,n){super(t),this.elementType=e,this.data=n}}class k0 extends N0{constructor(t,e){super(t),this.data=e}}function ci(r,t){r.emit(t.type,t)}function M6(r){if(!r)return null;if(r instanceof NE)return{type:"canvas",element:r};let t=r;for(;t;){if(bh(t))return{type:"node",element:t};if(Ax(t))return{type:"edge",element:t};if(dy(t))return{type:"combo",element:t};t=t.parentElement}return null}function DS(r){var t;return((t=r==null?void 0:r.style)===null||t===void 0?void 0:t.zIndex)||0}const $c="cachedStyle",Q0=r=>`__${r}__`;function T6(r,t){const e=Array.isArray(t)?t:[t];Mi(r,$c)||ph(r,$c,{}),e.forEach(n=>{ph(Mi(r,$c),Q0(n),r.attributes[n])})}function RS(r,t){return Mi(r,[$c,Q0(t)])}function F6(r,t){return Q0(t)in(Mi(r,$c)||{})}function xK(r,t,e){set(r,[$c,Q0(t)],e)}class O6{constructor(t){this.tasks=[],this.animations=new Set,this.context=t}getTasks(){const t=[...this.tasks];return this.tasks=[],t}add(t,e){this.tasks.push([t,e])}animate(t,e,n){var i,a,s;(i=e==null?void 0:e.before)===null||i===void 0||i.call(e);const o=this.getTasks().map(([l,c])=>{var u,h,d;const{element:f,elementType:g,stage:v}=l,m=kO(this.context.options,g,v,t);(u=c==null?void 0:c.before)===null||u===void 0||u.call(c);const w=m.length?UO(f,this.inferStyle(l,n),m):null;return w?((h=c==null?void 0:c.beforeAnimate)===null||h===void 0||h.call(c,w),w.finished.then(()=>{var C,F;(C=c==null?void 0:c.afterAnimate)===null||C===void 0||C.call(c,w),(F=c==null?void 0:c.after)===null||F===void 0||F.call(c),this.animations.delete(w)})):(d=c==null?void 0:c.after)===null||d===void 0||d.call(c),w}).filter(Boolean);o.forEach(l=>this.animations.add(l));const A=Im(o);return A?((a=e==null?void 0:e.beforeAnimate)===null||a===void 0||a.call(e,A),A.finished.then(()=>{var l,c;(l=e==null?void 0:e.afterAnimate)===null||l===void 0||l.call(e,A),(c=e==null?void 0:e.after)===null||c===void 0||c.call(e),this.release()})):(s=e==null?void 0:e.after)===null||s===void 0||s.call(e),A}inferStyle(t,e){var n,i;const{element:a,elementType:s,stage:o,originalStyle:A,updatedStyle:l={}}=t;t.modifiedStyle||(t.modifiedStyle=Object.assign(Object.assign({},A),l));const{modifiedStyle:c}=t,u={},h={};if(o==="enter")Object.assign(u,{opacity:0});else if(o==="exit")Object.assign(h,{opacity:0});else if(o==="show")Object.assign(u,{opacity:0}),Object.assign(h,{opacity:(n=RS(a,"opacity"))!==null&&n!==void 0?n:lh("opacity")});else if(o==="hide")Object.assign(u,{opacity:(i=RS(a,"opacity"))!==null&&i!==void 0?i:lh("opacity")}),Object.assign(h,{opacity:0});else if(o==="collapse"){const{collapse:d}=e||{},{target:f,descendants:g,position:v}=d;if(s==="node"){if(g.includes(a.id)){const[m,w,C]=v;Object.assign(h,{x:m,y:w,z:C})}}else if(s==="combo"){if(a.id===f||g.includes(a.id)){const[m,w]=v;Object.assign(h,{x:m,y:w,childrenNode:A.childrenNode})}}else s==="edge"&&Object.assign(h,{sourceNode:c.sourceNode,targetNode:c.targetNode})}else if(o==="expand"){const{expand:d}=e||{},{target:f,descendants:g,position:v}=d;if(s==="node"){if(a.id===f||g.includes(a.id)){const[m,w,C]=v;Object.assign(u,{x:m,y:w,z:C})}}else if(s==="combo"){if(a.id===f||g.includes(a.id)){const[m,w,C]=v;Object.assign(u,{x:m,y:w,z:C,childrenNode:c.childrenNode})}}else s==="edge"&&Object.assign(u,{sourceNode:c.sourceNode,targetNode:c.targetNode})}return[Object.keys(u).length>0?Object.assign({},A,u):A,Object.keys(h).length>0?Object.assign({},c,h):c]}stop(){this.animations.forEach(t=>t.cancel())}clear(){this.tasks=[]}release(){var t,e;const{canvas:n}=this.context,i=(e=(t=n.document)===null||t===void 0?void 0:t.timeline)===null||e===void 0?void 0:e.animationsWithPromises;i&&(n.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class I6{constructor(t){this.batchCount=0,this.context=t}emit(t){const{graph:e}=this.context;e.emit(t.type,t)}startBatch(t=!0){this.batchCount++,this.batchCount===1&&this.emit(new Yr(Ae.BATCH_START,{initiate:t}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new Yr(Ae.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class L6 extends Wm{constructor(t){super(t),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:n}=e,i=M6(n);if(!i)return;const{graph:a,canvas:s}=this.context,{type:o,element:A}=i;if("destroyed"in A&&(Ch(A)||A.destroyed))return;const{type:l,detail:c,button:u}=e,h=Object.assign(Object.assign({},e),{target:A,targetType:o,originalTarget:n});l===Yt.POINTER_MOVE&&(this.currentTarget!==A&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${Yt.POINTER_LEAVE}`,Object.assign(Object.assign({},h),{type:Yt.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),A&&(Object.assign(h,{type:Yt.POINTER_ENTER}),a.emit(`${o}:${Yt.POINTER_ENTER}`,h))),this.currentTarget=A,this.currentTargetType=o),l===Yt.CLICK&&u===2||(a.emit(`${o}:${l}`,h),a.emit(l,h)),l===Yt.CLICK&&c===2&&(Object.assign(h,{type:Yt.DBLCLICK}),a.emit(`${o}:${Yt.DBLCLICK}`,h),a.emit(Yt.DBLCLICK,h)),l===Yt.POINTER_DOWN&&u===2&&(Object.assign(h,{type:Yt.CONTEXT_MENU,preventDefault:()=>{var d;(d=s.getContainer())===null||d===void 0||d.addEventListener(Yt.CONTEXT_MENU,f=>f.preventDefault(),{once:!0})}}),a.emit(`${o}:${Yt.CONTEXT_MENU}`,h),a.emit(Yt.CONTEXT_MENU,h))},this.forwardContainerEvents=e=>{this.context.graph.emit(e.type,e)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(t){this.setExtensions(t)}forwardEvents(){const t=this.context.canvas.getContainer();t&&[Lc.KEY_DOWN,Lc.KEY_UP].forEach(n=>{t.addEventListener(n,this.forwardContainerEvents)});const e=this.context.canvas.document;e&&[Yt.CLICK,Yt.DBLCLICK,Yt.POINTER_OVER,Yt.POINTER_LEAVE,Yt.POINTER_ENTER,Yt.POINTER_MOVE,Yt.POINTER_OUT,Yt.POINTER_DOWN,Yt.POINTER_UP,Yt.CONTEXT_MENU,Yt.DRAG_START,Yt.DRAG,Yt.DRAG_END,Yt.DRAG_ENTER,Yt.DRAG_OVER,Yt.DRAG_LEAVE,Yt.DROP,Yt.WHEEL].forEach(n=>{e.addEventListener(n,this.forwardCanvasEvents)})}destroy(){const t=this.context.canvas.getContainer();t&&[Lc.KEY_DOWN,Lc.KEY_UP].forEach(e=>{t.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}function N6(r,t){t===void 0&&(t=new Map);var e=[];if(Array.isArray(r))for(var n=0,i=r.length;n<i;n++){var a=r[n];t.has(a)||(e.push(a),t.set(a,!0))}return e}var k6=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function G1(r){const{id:t=Qt(r),style:e,data:n}=r,i=k6(r,["id","style","data"]),a=Object.assign(Object.assign({},r),{style:Object.assign({},e),data:Object.assign({},n)});return zO(r)?Object.assign({id:t,data:a},i):{id:t,data:a}}function wi(r){return r.data}function Q6(r){if(r.hasTreeStructure(Ia))return;r.attachTreeStructure(Ia);const t=r.getAllEdges();for(const e of t){const{source:n,target:i}=e;r.setParent(i,n,Ia)}}class U6{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new Hr}pushChange(t){if(this.isTraceless)return;const{type:e}=t;if(e===dr.NodeUpdated||e===dr.EdgeUpdated||e===dr.ComboUpdated){const{value:n,original:i}=t;this.changes.push({value:my(n),original:my(i),type:e})}else this.changes.push({value:my(t.value),type:e})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(t){this.batchCount++,this.model.batch(t),this.batchCount--}isBatching(){return this.batchCount>0}silence(t){this.isTraceless=!0,t(),this.isTraceless=!1}isCombo(t){return this.comboIds.has(t)||this.latestRemovedComboIds.has(t)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=wi(n);return this.isCombo(Qt(i))||(t===void 0||t.includes(Qt(i)))&&e.push(i),e},[])}getEdgeDatum(t){return wi(this.model.getEdge(t))}getEdgeData(t){return this.model.getAllEdges().reduce((e,n)=>{const i=wi(n);return(t===void 0||t.includes(Qt(i)))&&e.push(i),e},[])}getComboData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=wi(n);return this.isCombo(Qt(i))&&(t===void 0||t.includes(Qt(i)))&&e.push(i),e},[])}getRootsData(t=Ia){return this.model.getRoots(t).map(wi)}getAncestorsData(t,e){const{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getAncestors(t,e).map(wi)}getDescendantsData(t){const e=this.getElementDataById(t),n=[];return El(e,i=>{i!==e&&n.push(i)},i=>this.getChildrenData(Qt(i)),"TB"),n}getParentData(t,e){const{model:n}=this;if(!e){ha.warn("The hierarchy structure key is not specified");return}if(!n.hasNode(t)||!n.hasTreeStructure(e))return;const i=n.getParent(t,e);return i?wi(i):void 0}getChildrenData(t){const e=this.getElementType(t)==="node"?Ia:nr,{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getChildren(t,e).map(wi)}getElementsDataByType(t){return t==="node"?this.getNodeData():t==="edge"?this.getEdgeData():t==="combo"?this.getComboData():[]}getElementDataById(t){return this.getElementType(t)==="edge"?this.getEdgeDatum(t):this.getNodeLikeDatum(t)}getNodeLikeDatum(t){const e=this.model.getNode(t);return wi(e)}getNodeLikeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=wi(n);return t?t.includes(Qt(i))&&e.push(i):e.push(i),e},[])}getElementDataByState(t,e){return this.getElementsDataByType(t).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(e)})}getElementState(t){var e;return((e=this.getElementDataById(t))===null||e===void 0?void 0:e.states)||[]}hasNode(t){return this.model.hasNode(t)&&!this.isCombo(t)}hasEdge(t){return this.model.hasEdge(t)}hasCombo(t){return this.model.hasNode(t)&&this.isCombo(t)}getRelatedEdgesData(t,e="both"){return this.model.getRelatedEdges(t,e).map(wi)}getNeighborNodesData(t){return this.model.getNeighbors(t).map(wi)}setData(t){const{nodes:e=[],edges:n=[],combos:i=[]}=t,{nodes:a,edges:s,combos:o}=this.getData(),A=mA(a,e,u=>Qt(u),Rc),l=mA(s,n,u=>Qt(u),Rc),c=mA(o,i,u=>Qt(u),Rc);this.batch(()=>{const u={nodes:A.enter,edges:l.enter,combos:c.enter};this.addData(u),this.computeZIndex(u,"add",!0);const h={nodes:A.update,edges:l.update,combos:c.update};this.updateData(h),this.computeZIndex(h,"update",!0);const d={nodes:A.exit.map(Qt),edges:l.exit.map(Qt),combos:c.exit.map(Qt)};this.removeData(d)})}addData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.addComboData(i),this.addNodeData(e),this.addEdgeData(n)}),this.computeZIndex(t,"add")}addNodeData(t=[]){t.length&&(this.model.addNodes(t.map(e=>(this.pushChange({value:e,type:dr.NodeAdded}),G1(e)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({nodes:t},"add"))}addEdgeData(t=[]){t.length&&(this.model.addEdges(t.map(e=>(this.pushChange({value:e,type:dr.EdgeAdded}),G1(e)))),this.computeZIndex({edges:t},"add"))}addComboData(t=[]){if(!t.length)return;const{model:e}=this;e.hasTreeStructure(nr)||e.attachTreeStructure(nr),e.addNodes(t.map(n=>(this.comboIds.add(Qt(n)),this.pushChange({value:n,type:dr.ComboAdded}),G1(n)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({combos:t},"add")}addChildrenData(t,e){const n=this.getNodeLikeDatum(t),i=e.map(Qt);this.addNodeData(e),this.updateNodeData([{id:t,children:[...n.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:t,target:a})))}computeZIndex(t,e,n=!1){!n&&this.isBatching()||this.batch(()=>{const{nodes:i=[],edges:a=[],combos:s=[]}=t;s.forEach(o=>{var A,l,c;const u=Qt(o);if(e==="add"&&ye((A=o.style)===null||A===void 0?void 0:A.zIndex)||e==="update"&&!("combo"in o))return;const h=this.getParentData(u,nr),d=h?((c=(l=h.style)===null||l===void 0?void 0:l.zIndex)!==null&&c!==void 0?c:0)+1:0;this.preventUpdateNodeLikeHierarchy(()=>{this.updateComboData([{id:u,style:{zIndex:d}}])})}),i.forEach(o=>{var A,l,c;const u=Qt(o);if(e==="add"&&ye((A=o.style)===null||A===void 0?void 0:A.zIndex)||e==="update"&&!("combo"in o)&&!("children"in o))return;let h=0;const d=this.getParentData(u,nr);if(d)h=(((l=d.style)===null||l===void 0?void 0:l.zIndex)||0)+1;else{const f=this.getParentData(u,Ia);f&&(h=((c=f==null?void 0:f.style)===null||c===void 0?void 0:c.zIndex)||0)}this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:u,style:{zIndex:h}}])})}),a.forEach(o=>{var A,l,c,u,h;if(ye((A=o.style)===null||A===void 0?void 0:A.zIndex))return;let{id:d,source:f,target:g}=o;if(!d)d=Qt(o);else{const w=this.getEdgeDatum(d);f=w.source,g=w.target}if(!f||!g)return;const v=((c=(l=this.getNodeLikeDatum(f))===null||l===void 0?void 0:l.style)===null||c===void 0?void 0:c.zIndex)||0,m=((h=(u=this.getNodeLikeDatum(g))===null||u===void 0?void 0:u.style)===null||h===void 0?void 0:h.zIndex)||0;this.updateEdgeData([{id:Qt(o),style:{zIndex:Math.max(v,m)-1}}])})})}getFrontZIndex(t){var e;const n=this.getElementType(t),i=this.getElementDataById(t),a=this.getData();if(Object.assign(a,{[`${n}s`]:a[`${n}s`].filter(s=>Qt(s)!==t)}),n==="combo"&&!da(i)){const s=new Set(this.getAncestorsData(t,nr).map(Qt));a.nodes=a.nodes.filter(o=>!s.has(Qt(o))),a.combos=a.combos.filter(o=>!s.has(Qt(o))),a.edges=a.edges.filter(({source:o,target:A})=>!s.has(o)&&!s.has(A))}return Math.max(((e=i.style)===null||e===void 0?void 0:e.zIndex)||0,0,...Object.values(a).flat().map(s=>{var o;return(((o=s==null?void 0:s.style)===null||o===void 0?void 0:o.zIndex)||0)+1}))}updateNodeLikeHierarchy(t){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:e}=this;t.forEach(n=>{const i=Qt(n),a=Kf(n);a!==void 0&&(e.hasTreeStructure(nr)||e.attachTreeStructure(nr),a===null&&this.refreshComboData(i),this.setParent(i,Kf(n),nr));const s=n.children||[];if(s.length){e.hasTreeStructure(Ia)||e.attachTreeStructure(Ia);const o=s.filter(A=>e.hasNode(A));o.forEach(A=>this.setParent(A,i,Ia)),o.length!==s.length&&this.updateNodeData([{id:i,children:o}])}})}preventUpdateNodeLikeHierarchy(t){this.enableUpdateNodeLikeHierarchy=!1,t(),this.enableUpdateNodeLikeHierarchy=!0}updateData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.updateNodeData(e),this.updateComboData(i),this.updateEdgeData(n)}),this.computeZIndex(t,"update")}updateNodeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{const n=[];t.forEach(i=>{const a=Qt(i),s=wi(e.getNode(a));if(Rc(s,i))return;const o=CA(s,i);this.pushChange({value:o,original:s,type:dr.NodeUpdated}),e.mergeNodeData(a,o),n.push(o)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({nodes:t},"update")}refreshData(){const{nodes:t,edges:e,combos:n}=this.getData();t.forEach(i=>{this.pushChange({value:i,original:i,type:dr.NodeUpdated})}),e.forEach(i=>{this.pushChange({value:i,original:i,type:dr.EdgeUpdated})}),n.forEach(i=>{this.pushChange({value:i,original:i,type:dr.ComboUpdated})})}syncNodeLikeDatum(t){const{model:e}=this,n=Qt(t);if(!e.hasNode(n))return;const i=wi(e.getNode(n)),a=CA(i,t);e.mergeNodeData(n,a)}syncEdgeDatum(t){const{model:e}=this,n=Qt(t);if(!e.hasEdge(n))return;const i=wi(e.getEdge(n)),a=CA(i,t);e.mergeEdgeData(n,a)}updateEdgeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{t.forEach(n=>{const i=Qt(n),a=wi(e.getEdge(i));if(Rc(a,n))return;n.source&&a.source!==n.source&&e.updateEdgeSource(i,n.source),n.target&&a.target!==n.target&&e.updateEdgeTarget(i,n.target);const s=CA(a,n);this.pushChange({value:s,original:a,type:dr.EdgeUpdated}),e.mergeEdgeData(i,s)})}),this.computeZIndex({edges:t},"update")}updateComboData(t=[]){if(!t.length)return;const{model:e}=this;e.batch(()=>{const n=[];t.forEach(i=>{const a=Qt(i),s=wi(e.getNode(a));if(Rc(s,i))return;const o=CA(s,i);this.pushChange({value:o,original:s,type:dr.ComboUpdated}),e.mergeNodeData(a,o),n.push(o)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({combos:t},"update")}setParent(t,e,n,i=!0){if(t===e)return;const a=this.getNodeLikeDatum(t),s=Kf(a);if(s!==e&&n===nr){const o={id:t,combo:e};this.isCombo(t)?this.syncNodeLikeDatum(o):this.syncNodeLikeDatum(o)}this.model.setParent(t,e,n),i&&n===nr&&N6([s,e]).forEach(o=>{o!==void 0&&this.refreshComboData(o)})}refreshComboData(t){const e=this.getComboData([t])[0],n=this.getAncestorsData(t,nr);e&&this.pushChange({value:e,original:e,type:dr.ComboUpdated}),n.forEach(i=>{this.pushChange({value:i,original:i,type:dr.ComboUpdated})})}getElementPosition(t){const e=this.getElementDataById(t);return Ai(e)}translateNodeLikeBy(t,e){this.isCombo(t)?this.translateComboBy(t,e):this.translateNodeBy(t,e)}translateNodeLikeTo(t,e){this.isCombo(t)?this.translateComboTo(t,e):this.translateNodeTo(t,e)}translateNodeBy(t,e){const n=this.getElementPosition(t),i=tn(n,[...e,0].slice(0,3));this.translateNodeTo(t,i)}translateNodeTo(t,e){const[n=0,i=0,a=0]=e;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:t,style:{x:n,y:i,z:a}}])})}translateComboBy(t,e){const[n=0,i=0,a=0]=e;if([n,i,a].some(isNaN)||[n,i,a].every(A=>A===0))return;const s=this.getComboData([t])[0];if(!s)return;const o=new Set;El(s,A=>{const l=Qt(A);if(o.has(l))return;o.add(l);const[c,u,h]=Ai(A),d=CA(A,{style:{x:c+n,y:u+i,z:h+a}});this.pushChange({value:d,original:A,type:this.isCombo(l)?dr.ComboUpdated:dr.NodeUpdated}),this.model.mergeNodeData(l,d)},A=>this.getChildrenData(Qt(A)),"BT")}translateComboTo(t,e){var n;if(e.some(isNaN))return;const[i=0,a=0,s=0]=e,o=(n=this.getComboData([t]))===null||n===void 0?void 0:n[0];if(!o)return;const[A,l,c]=Ai(o),u=i-A,h=a-l,d=s-c;El(o,f=>{const g=Qt(f),[v,m,w]=Ai(f),C=CA(f,{style:{x:v+u,y:m+h,z:w+d}});this.pushChange({value:C,original:f,type:this.isCombo(g)?dr.ComboUpdated:dr.NodeUpdated}),this.model.mergeNodeData(g,C)},f=>this.getChildrenData(Qt(f)),"BT")}removeData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.removeEdgeData(n),this.removeNodeData(e),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.removeEdgeData(this.getRelatedEdgesData(e).map(Qt)),this.pushChange({value:this.getNodeData([e])[0],type:dr.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(t)})}removeEdgeData(t=[]){t.length&&(t.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:dr.EdgeRemoved})),this.model.removeEdges(t))}removeComboData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:dr.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(t)})}removeNodeLikeHierarchy(t){if(this.model.hasTreeStructure(nr)){const e=Kf(this.getNodeLikeDatum(t));this.setParent(t,void 0,nr,!1),this.model.getChildren(t,nr).forEach(n=>{const i=wi(n),a=Qt(i);this.setParent(Qt(i),e,nr,!1);const s=CA(i,{id:Qt(i),combo:e});this.pushChange({value:s,original:i,type:this.isCombo(a)?dr.ComboUpdated:dr.NodeUpdated}),this.model.mergeNodeData(Qt(i),s)}),Pe(e)||this.refreshComboData(e)}}getElementType(t){if(this.model.hasNode(t))return this.isCombo(t)?"combo":"node";if(this.model.hasEdge(t))return"edge";throw new Error(Oo(`Unknown element type of id: ${t}`))}destroy(){const{model:t}=this,e=t.getAllNodes(),n=t.getAllEdges();t.removeEdges(n.map(i=>i.id)),t.removeNodes(e.map(i=>i.id)),this.context={}}}var tu=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class P6{constructor(t){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=t}init(){this.initContainer()}initContainer(){if(!this.container||this.container.destroyed){const{canvas:t}=this.context;this.container=t.appendChild(new oi({className:"elements"}))}}emit(t,e){e.silence||ci(this.context.graph,t)}forEachElementData(t){wl.forEach(e=>{const n=this.context.model.getElementsDataByType(e);t(e,n)})}getElementType(t,e){var n;const{options:i,graph:a}=this.context,s=gx(e)&&((n=i[t])===null||n===void 0?void 0:n.type)||e.type;return s?typeof s=="string"?s:s.call(a,e):t==="edge"?"line":"circle"}getTheme(t){return cB(this.context.options)[t]||{}}getThemeStyle(t){return this.getTheme(t).style||{}}getThemeStateStyle(t,e){const{state:n={}}=this.getTheme(t);return Object.assign({},...e.map(i=>n[i]||{}))}computePaletteStyle(){const{options:t}=this.context;this.paletteStyle={},this.forEachElementData((e,n)=>{var i,a;const s=Object.assign({},bb((i=this.getTheme(e))===null||i===void 0?void 0:i.palette),bb((a=t[e])===null||a===void 0?void 0:a.palette));s!=null&&s.field&&Object.assign(this.paletteStyle,nN(n,s))})}getPaletteStyle(t,e){const n=this.paletteStyle[e];return n?t==="edge"?{stroke:n}:{fill:n}:{}}computeElementDefaultStyle(t,e){var n;const{options:i}=this.context,a=((n=i[t])===null||n===void 0?void 0:n.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[Qt(e.datum)]=Bb(a,e)}computeElementsDefaultStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];(t===void 0||t.includes(Qt(o)))&&this.computeElementDefaultStyle(n,{datum:o,graph:e})}})}getDefaultStyle(t){return this.defaultStyle[t]||{}}getElementState(t){try{const{model:e}=this.context;return e.getElementState(t)}catch(e){return[]}}getElementStateStyle(t,e,n){var i,a;const{options:s}=this.context,o=((a=(i=s[t])===null||i===void 0?void 0:i.state)===null||a===void 0?void 0:a[e])||{};return Bb(o,n)}computeElementStatesStyle(t,e,n){this.stateStyle[Qt(n.datum)]=Object.assign({},...e.map(i=>this.getElementStateStyle(t,i,n)))}computeElementsStatesStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];if(t===void 0||t.includes(Qt(o))){const A=this.getElementState(Qt(o));this.computeElementStatesStyle(n,A,{datum:o,graph:e})}}})}getStateStyle(t){return this.stateStyle[t]||{}}computeStyle(t,e){t&&["translate","zIndex"].includes(t)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(e),this.computeElementsStatesStyle(e))}getElement(t){return this.elementMap[t]}getNodes(){return this.context.model.getNodeData().map(({id:t})=>this.elementMap[t])}getEdges(){return this.context.model.getEdgeData().map(t=>this.elementMap[Qt(t)])}getCombos(){return this.context.model.getComboData().map(({id:t})=>this.elementMap[t])}getElementComputedStyle(t,e){const n=Qt(e),i=this.getThemeStyle(t),a=this.getPaletteStyle(t,n),s=e.style||{},o=this.getDefaultStyle(n),A=this.getThemeStateStyle(t,this.getElementState(n)),l=this.getStateStyle(n),c=gx(e)?Object.assign({},i,a,s,o,A,l):Object.assign({},s);if(t==="combo"){const u=this.context.model.getChildrenData(n),d=!!c.collapsed?[]:u.map(Qt).filter(f=>this.getElement(f));Object.assign(c,{childrenNode:d,childrenData:u})}return c}getDrawData(t){this.init();const e=this.computeChangesAndDrawData(t);if(!e)return null;const{type:n="draw",stage:i=n}=t;return this.markDestroyElement(e.drawData),this.computeStyle(i),{type:n,stage:i,data:e}}draw(t={animation:!0}){const e=this.getDrawData(t);if(!e)return;const{data:{drawData:{add:n,update:i,remove:a}}}=e;return this.destroyElements(a,t),this.createElements(n,t),this.updateElements(i,t),this.setAnimationTask(t,e)}preLayoutDraw(){return tu(this,arguments,void 0,function*(t={animation:!0}){var e,n;const i=this.getDrawData(t);if(!i)return;const{data:{drawData:a}}=i;yield(n=(e=this.context.layout)===null||e===void 0?void 0:e.preLayout)===null||n===void 0?void 0:n.call(e,a);const{add:s,update:o,remove:A}=a;return this.destroyElements(A,t),this.createElements(s,t),this.updateElements(o,t),this.setAnimationTask(t,i)})}setAnimationTask(t,e){const{animation:n,silence:i}=t,{data:{dataChanges:a,drawData:s},stage:o,type:A}=e;return this.context.animation.animate(n,i?{}:{before:()=>this.emit(new Yr(Ae.BEFORE_DRAW,{dataChanges:a,animation:n,stage:o,render:A==="render"}),t),beforeAnimate:l=>this.emit(new rs(Ae.BEFORE_ANIMATE,ua.DRAW,l,s),t),afterAnimate:l=>this.emit(new rs(Ae.AFTER_ANIMATE,ua.DRAW,l,s),t),after:()=>this.emit(new Yr(Ae.AFTER_DRAW,{dataChanges:a,animation:n,stage:o,render:A==="render",firstRender:this.context.graph.rendered===!1}),t)})}computeChangesAndDrawData(t){const{model:e}=this.context,n=e.getChanges(),i=Xy(n);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:s=[],NodeRemoved:o=[],EdgeAdded:A=[],EdgeUpdated:l=[],EdgeRemoved:c=[],ComboAdded:u=[],ComboUpdated:h=[],ComboRemoved:d=[]}=Ff(i,Q=>Q.type),f=(Q,D)=>{const K=[];return Q.forEach(G=>{const J=Qt(G.value);this.getElement(J)?K.push(G):D.push(G)}),K},g=f(s,a),v=f(l,A),m=f(h,u),w=Q=>new Map(Q.map(D=>{const K=D.value;return[Qt(K),K]})),C={add:{nodes:w(a),edges:w(A),combos:w(u)},update:{nodes:w(g),edges:w(v),combos:w(m)},remove:{nodes:w(o),edges:w(c),combos:w(d)}},F=this.transformData(C,t);return e.clearChanges(),{dataChanges:n,drawData:F}}transformData(t,e){const n=this.context.transform.getTransformInstance();return Object.values(n).reduce((i,a)=>a.beforeDraw(i,e),t)}createElement(t,e,n){var i;const a=Qt(e);if(this.getElement(a))return;const o=this.getElementType(t,e),A=this.getElementComputedStyle(t,e),l=Fo(t,o);if(!l)return ha.warn(`The element ${o} of ${t} is not registered.`);this.emit(new qc(Ae.BEFORE_ELEMENT_CREATE,t,e),n);const c=this.container.appendChild(new l({id:a,context:this.context,style:A}));this.shapeTypeMap[a]=o,this.elementMap[a]=c;const{stage:u="enter"}=n;(i=this.context.animation)===null||i===void 0||i.add({element:c,elementType:t,stage:u,originalStyle:Object.assign({},c.attributes),updatedStyle:A},{after:()=>{var h;this.emit(new qc(Ae.AFTER_ELEMENT_CREATE,t,e),n),(h=c.onCreate)===null||h===void 0||h.call(c)}})}createElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([o,A])=>{A.forEach(l=>this.createElement(o,l,e))})}getUpdateStageStyle(t,e,n){const{stage:i="update"}=n;if(i==="translate")if(t==="node"||t==="combo"){const{style:{x:a=0,y:s=0,z:o=0}={}}=e;return{x:a,y:s,z:o}}else return{};return this.getElementComputedStyle(t,e)}updateElement(t,e,n){var i;const a=Qt(e),{stage:s="update"}=n,o=this.getElement(a);if(!o)return()=>null;this.emit(new qc(Ae.BEFORE_ELEMENT_UPDATE,t,e),n);const A=this.getElementType(t,e),l=this.getUpdateStageStyle(t,e,n);this.shapeTypeMap[a]!==A&&(o.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(t,e,{animation:!1,silence:!0}));const c=s!=="visibility"?s:l.visibility==="hidden"?"hide":"show";c==="hide"&&delete l.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:t,stage:c,originalStyle:Object.assign({},o.attributes),updatedStyle:l},{before:()=>{const u=this.elementMap[a];s!=="collapse"&&py(u,l),s==="visibility"&&(F6(u,"opacity")||T6(u,"opacity"),this.visibilityCache.set(u,c==="show"?"visible":"hidden"),c==="show"&&ml(u,"visible"))},after:()=>{var u;const h=this.elementMap[a];s==="collapse"&&py(h,l),c==="hide"&&ml(h,this.visibilityCache.get(h)),this.emit(new qc(Ae.AFTER_ELEMENT_UPDATE,t,e),n),(u=h.onUpdate)===null||u===void 0||u.call(h)}})}updateElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([o,A])=>{A.forEach(l=>this.updateElement(o,l,e))})}markDestroyElement(t){Object.values(t.remove).forEach(e=>{e.forEach(n=>{const i=Qt(n),a=this.getElement(i);a&&iQ(a)})})}destroyElement(t,e,n){var i;const{stage:a="exit"}=n,s=Qt(e),o=this.elementMap[s];if(!o)return()=>null;this.emit(new qc(Ae.BEFORE_ELEMENT_DESTROY,t,e),n),(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:t,stage:a,originalStyle:Object.assign({},o.attributes),updatedStyle:{}},{after:()=>{var A;this.clearElement(s),o.destroy(),(A=o.onDestroy)===null||A===void 0||A.call(o),this.emit(new qc(Ae.AFTER_ELEMENT_DESTROY,t,e),n)}})}destroyElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["combo",a],["edge",i],["node",n]].forEach(([o,A])=>{A.forEach(l=>this.destroyElement(o,l,e))})}clearElement(t){delete this.paletteStyle[t],delete this.defaultStyle[t],delete this.stateStyle[t],delete this.elementMap[t],delete this.shapeTypeMap[t]}alignLayoutResultToElement(t,e){var n,i;const a=(n=t.nodes)===null||n===void 0?void 0:n.find(s=>Qt(s)===e);if(a){const s=Ai(this.context.model.getNodeLikeDatum(e)),o=Ai(a),A=tr(s,o);(i=t.nodes)===null||i===void 0||i.forEach(l=>{var c,u,h;!((c=l.style)===null||c===void 0)&&c.x&&(l.style.x+=A[0]),!((u=l.style)===null||u===void 0)&&u.y&&(l.style.y+=A[1]),!((h=l.style)===null||h===void 0)&&h.z&&(l.style.z+=A[2]||0)})}}syncLayoutResult(t,e){return tu(this,void 0,void 0,function*(){const{layout:n,model:i}=this.context;if(!n)return;const a=this.context.options.layout,s=A=>Array.isArray(A)?A.map(l=>Object.assign(Object.assign({},l),{preLayout:!0})):Object.assign(Object.assign({},A),{preLayout:!0}),o=yield n.simulate(a?s(a):void 0);e&&this.alignLayoutResultToElement(o,t),i.updateData(o)})}collapseNode(t,e){return tu(this,void 0,void 0,function*(){var n;const{animation:i,align:a}=e;yield this.syncLayoutResult(t,a);const s=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!s)return;const{drawData:o}=s,{add:A,remove:l,update:c}=o;this.markDestroyElement(o);const u={animation:i,stage:"collapse",data:o};this.destroyElements(l,u),this.createElements(A,u),this.updateElements(c,u),yield(n=this.context.animation.animate(i,{beforeAnimate:h=>this.emit(new rs(Ae.BEFORE_ANIMATE,ua.COLLAPSE,h,o),u),afterAnimate:h=>this.emit(new rs(Ae.AFTER_ANIMATE,ua.COLLAPSE,h,o),u)},{collapse:{target:t,descendants:Array.from(l.nodes).map(([,h])=>Qt(h)),position:Ai(c.nodes.get(t))}}))===null||n===void 0?void 0:n.finished})}expandNode(t,e){return tu(this,void 0,void 0,function*(){var n;const{model:i}=this.context,{animation:a,align:s}=e,o=Ai(i.getNodeData([t])[0]);yield this.syncLayoutResult(t,s);const A=this.computeChangesAndDrawData({stage:"expand",animation:a});if(this.createElements(A.drawData.add,{animation:!1,stage:"expand",target:t}),this.context.animation.clear(),this.computeStyle("expand"),!A)return;const{drawData:l}=A,{update:c,add:u}=l,h={animation:a,stage:"expand",data:l};u.edges.forEach(d=>c.edges.set(Qt(d),d)),u.nodes.forEach(d=>c.nodes.set(Qt(d),d)),this.updateElements(c,h),yield(n=this.context.animation.animate(a,{beforeAnimate:d=>this.emit(new rs(Ae.BEFORE_ANIMATE,ua.EXPAND,d,l),h),afterAnimate:d=>this.emit(new rs(Ae.AFTER_ANIMATE,ua.EXPAND,d,l),h)},{expand:{target:t,descendants:Array.from(u.nodes).map(([,d])=>Qt(d)),position:o}}))===null||n===void 0?void 0:n.finished})}collapseCombo(t,e){return tu(this,void 0,void 0,function*(){var n;const{model:i,element:a}=this.context;if(i.getAncestorsData(t,nr).some(g=>da(g)))return;const s=a.getElement(t),o=s.getComboPosition(Object.assign(Object.assign({},s.attributes),{collapsed:!0})),A=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!A)return;const{dataChanges:l,drawData:c}=A;this.markDestroyElement(c);const{update:u,remove:h}=c,d={animation:e,stage:"collapse",data:c};this.destroyElements(h,d),this.updateElements(u,d);const f=g=>Array.from(g).map(([,v])=>Qt(v));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new Yr(Ae.BEFORE_DRAW,{dataChanges:l,animation:e}),d),beforeAnimate:g=>this.emit(new rs(Ae.BEFORE_ANIMATE,ua.COLLAPSE,g,c),d),afterAnimate:g=>this.emit(new rs(Ae.AFTER_ANIMATE,ua.COLLAPSE,g,c),d),after:()=>this.emit(new Yr(Ae.AFTER_DRAW,{dataChanges:l,animation:e}),d)},{collapse:{target:t,descendants:[...f(h.nodes),...f(h.combos)],position:o}}))===null||n===void 0?void 0:n.finished})}expandCombo(t,e){return tu(this,void 0,void 0,function*(){var n;const{model:i}=this.context,a=Ai(i.getComboData([t])[0]);this.computeStyle("expand");const s=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!s)return;const{dataChanges:o,drawData:A}=s,{add:l,update:c}=A,u={animation:e,stage:"expand",data:A,target:t};this.createElements(l,u),this.updateElements(c,u);const h=d=>Array.from(d).map(([,f])=>Qt(f));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new Yr(Ae.BEFORE_DRAW,{dataChanges:o,animation:e}),u),beforeAnimate:d=>this.emit(new rs(Ae.BEFORE_ANIMATE,ua.EXPAND,d,A),u),afterAnimate:d=>this.emit(new rs(Ae.AFTER_ANIMATE,ua.EXPAND,d,A),u),after:()=>this.emit(new Yr(Ae.AFTER_DRAW,{dataChanges:o,animation:e}),u)},{expand:{target:t,descendants:[...h(l.nodes),...h(l.combos)],position:a}}))===null||n===void 0?void 0:n.finished})}clear(){this.container.destroy(),this.initContainer(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={}}destroy(){this.clear(),this.container.destroy(),this.context={}}}const _S=Symbol("Comlink.proxy"),D6=Symbol("Comlink.endpoint"),HS=Symbol("Comlink.releaseProxy"),K1=Symbol("Comlink.finalizer"),U0=Symbol("Comlink.thrown"),GS=r=>typeof r=="object"&&r!==null||typeof r=="function",R6={canHandle:r=>GS(r)&&r[_S],serialize(r){const{port1:t,port2:e}=new MessageChannel;return zS(r,t),[e,[e]]},deserialize(r){return r.start(),WS(r)}},_6={canHandle:r=>GS(r)&&U0 in r,serialize({value:r}){let t;return r instanceof Error?t={isError:!0,value:{message:r.message,name:r.name,stack:r.stack}}:t={isError:!1,value:r},[t,[]]},deserialize(r){throw r.isError?Object.assign(new Error(r.value.message),r.value):r.value}},KS=new Map([["proxy",R6],["throw",_6]]);function H6(r,t){for(const e of r)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function zS(r,t=globalThis,e=["*"]){t.addEventListener("message",function n(i){if(!i||!i.data)return;if(!H6(e,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),A=(i.data.argumentList||[]).map(Dl);let l;try{const c=o.slice(0,-1).reduce((h,d)=>h[d],r),u=o.reduce((h,d)=>h[d],r);switch(s){case"GET":l=u;break;case"SET":c[o.slice(-1)[0]]=Dl(i.data.value),l=!0;break;case"APPLY":l=u.apply(c,A);break;case"CONSTRUCT":{const h=new u(...A);l=Z6(h)}break;case"ENDPOINT":{const{port1:h,port2:d}=new MessageChannel;zS(r,d),l=W6(h,[h])}break;case"RELEASE":l=void 0;break;default:return}}catch(c){l={value:c,[U0]:0}}Promise.resolve(l).catch(c=>({value:c,[U0]:0})).then(c=>{const[u,h]=_0(c);t.postMessage(Object.assign(Object.assign({},u),{id:a}),h),s==="RELEASE"&&(t.removeEventListener("message",n),VS(t),K1 in r&&typeof r[K1]=="function"&&r[K1]())}).catch(c=>{const[u,h]=_0({value:new TypeError("Unserializable return value"),[U0]:0});t.postMessage(Object.assign(Object.assign({},u),{id:a}),h)})}),t.start&&t.start()}function G6(r){return r.constructor.name==="MessagePort"}function VS(r){G6(r)&&r.close()}function WS(r,t){const e=new Map;return r.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=e.get(a.id);if(s)try{s(a)}finally{e.delete(a.id)}}),z1(r,e,[],t)}function P0(r){if(r)throw new Error("Proxy has been released and is not useable")}function ZS(r){return eu(r,new Map,{type:"RELEASE"}).then(()=>{VS(r)})}const D0=new WeakMap,R0="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const t=(D0.get(r)||0)-1;D0.set(r,t),t===0&&ZS(r)});function K6(r,t){const e=(D0.get(t)||0)+1;D0.set(t,e),R0&&R0.register(r,t,r)}function z6(r){R0&&R0.unregister(r)}function z1(r,t,e=[],n=function(){}){let i=!1;const a=new Proxy(n,{get(s,o){if(P0(i),o===HS)return()=>{z6(a),ZS(r),t.clear(),i=!0};if(o==="then"){if(e.length===0)return{then:()=>a};const A=eu(r,t,{type:"GET",path:e.map(l=>l.toString())}).then(Dl);return A.then.bind(A)}return z1(r,t,[...e,o])},set(s,o,A){P0(i);const[l,c]=_0(A);return eu(r,t,{type:"SET",path:[...e,o].map(u=>u.toString()),value:l},c).then(Dl)},apply(s,o,A){P0(i);const l=e[e.length-1];if(l===D6)return eu(r,t,{type:"ENDPOINT"}).then(Dl);if(l==="bind")return z1(r,t,e.slice(0,-1));const[c,u]=jS(A);return eu(r,t,{type:"APPLY",path:e.map(h=>h.toString()),argumentList:c},u).then(Dl)},construct(s,o){P0(i);const[A,l]=jS(o);return eu(r,t,{type:"CONSTRUCT",path:e.map(c=>c.toString()),argumentList:A},l).then(Dl)}});return K6(a,r),a}function V6(r){return Array.prototype.concat.apply([],r)}function jS(r){const t=r.map(_0);return[t.map(e=>e[0]),V6(t.map(e=>e[1]))]}const YS=new WeakMap;function W6(r,t){return YS.set(r,t),r}function Z6(r){return Object.assign(r,{[_S]:!0})}function CK(r,t=globalThis,e="*"){return{postMessage:(n,i)=>r.postMessage(n,e,i),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function _0(r){for(const[t,e]of KS)if(e.canHandle(r)){const[n,i]=e.serialize(r);return[{type:"HANDLER",name:t,value:n},i]}return[{type:"RAW",value:r},YS.get(r)||[]]}function Dl(r){switch(r.type){case"HANDLER":return KS.get(r.name).deserialize(r.value);case"RAW":return r.value}}function eu(r,t,e,n){return new Promise(i=>{const a=j6();t.set(a,i),r.start&&r.start(),r.postMessage(Object.assign({id:a},e),n)})}function j6(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class Y6 extends Cg{constructor(t,e,n){super(),this.graph=t,this.layout=e,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=WS(new Worker(new URL(M.p+M.u(1262),M.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var t;return(0,z.mG)(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const e=this.layout.options,{onTick:n}=e,i=(0,z._T)(e,["onTick"]),a={};Object.keys(i).forEach(l=>{Wt(i[l])||(a[l]=i[l])});const s={layout:{id:this.layout.id,options:a,iterations:(t=this.options)===null||t===void 0?void 0:t.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[A]=yield this.proxy.calculateLayout(s,[o]);return A})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[HS]()}isRunning(){return this.running}}var nu=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})},X6=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class J6{get presetOptions(){return{animation:!!uB(this.context.options,!0)}}get options(){const{options:t}=this.context;return t.layout}constructor(t){this.instances=[],this.context=t}getLayoutInstance(){return this.instances}preLayout(t){return nu(this,void 0,void 0,function*(){var e,n,i,a;const{graph:s,model:o}=this.context,{add:A}=t;ci(s,new Yr(Ae.BEFORE_LAYOUT,{type:"pre"}));const l=yield(e=this.context.layout)===null||e===void 0?void 0:e.simulate();(n=l==null?void 0:l.nodes)===null||n===void 0||n.forEach(c=>{const u=Qt(c),h=A.nodes.get(u);o.syncNodeLikeDatum(c),h&&Object.assign(h.style,c.style)}),(i=l==null?void 0:l.edges)===null||i===void 0||i.forEach(c=>{const u=Qt(c),h=A.edges.get(u);o.syncEdgeDatum(c),h&&Object.assign(h.style,c.style)}),(a=l==null?void 0:l.combos)===null||a===void 0||a.forEach(c=>{const u=Qt(c),h=A.combos.get(u);o.syncNodeLikeDatum(c),h&&Object.assign(h.style,c.style)}),ci(s,new Yr(Ae.AFTER_LAYOUT,{type:"pre"})),this.transformDataAfterLayout("pre",t)})}postLayout(){return nu(this,arguments,void 0,function*(t=this.options){if(!t)return;const e=Array.isArray(t)?t:[t],{graph:n}=this.context;ci(n,new Yr(Ae.BEFORE_LAYOUT,{type:"post"}));for(let i=0;i<e.length;i++){const a=e[i],s=this.getLayoutData(a),o=Object.assign(Object.assign({},this.presetOptions),a);ci(n,new Yr(Ae.BEFORE_STAGE_LAYOUT,{options:o,index:i}));const A=yield this.stepLayout(s,o,i);ci(n,new Yr(Ae.AFTER_STAGE_LAYOUT,{options:o,index:i})),a.animation||this.updateElementPosition(A,!1)}ci(n,new Yr(Ae.AFTER_LAYOUT,{type:"post"})),this.transformDataAfterLayout("post")})}transformDataAfterLayout(t,e){const n=this.context.transform.getTransformInstance();Object.values(n).forEach(i=>i.afterLayout(t,e))}simulate(){return nu(this,arguments,void 0,function*(t=this.options){if(!t)return{};const e=Array.isArray(t)?t:[t];let n={};for(let i=0;i<e.length;i++){const a=e[i],s=this.getLayoutData(a);n=yield this.stepLayout(s,Object.assign(Object.assign(Object.assign({},this.presetOptions),a),{animation:!1}),i)}return n})}stepLayout(t,e,n){return nu(this,void 0,void 0,function*(){return fQ(e)?yield this.treeLayout(t,e,n):yield this.graphLayout(t,e,n)})}graphLayout(t,e,n){return nu(this,void 0,void 0,function*(){const{animation:i,enableWorker:a,iterations:s=300}=e,o=this.initGraphLayout(e);if(!o)return{};if(this.instances[n]=o,this.instance=o,a){const l=o;return this.supervisor=new Y6(l.graphData2LayoutModel(t),l.instance,{iterations:s}),Tg(yield this.supervisor.execute())}if(Dy(o))return i?yield o.execute(t,{onTick:l=>{this.updateElementPosition(l,!1)}}):(o.execute(t),o.stop(),o.tick(s));const A=yield o.execute(t);if(i){const l=this.updateElementPosition(A,i);yield l==null?void 0:l.finished}return A})}treeLayout(t,e,n){return nu(this,void 0,void 0,function*(){const{type:i,animation:a}=e,s=Fo("layout",i);if(!s)return{};const{nodes:o=[],edges:A=[]}=t,l=new Hr({nodes:o.map(f=>({id:Qt(f),data:f.data||{}})),edges:A.map(f=>({id:Qt(f),source:f.source,target:f.target,data:f.data||{}}))});Q6(l);const c={nodes:[],edges:[]},u={nodes:[],edges:[]};l.getRoots(Ia).forEach(f=>{El(f,C=>{C.children=l.getSuccessors(C.id)},C=>l.getSuccessors(C.id),"TB");const g=s(f,e),{x:v,y:m,z:w=0}=g;El(g,C=>{const{id:F,x:Q,y:D,z:K=0}=C;c.nodes.push({id:F,style:{x:v,y:m,z:w}}),u.nodes.push({id:F,style:{x:Q,y:D,z:K}})},C=>C.children,"TB")});const d=this.inferTreeLayoutOffset(u);if(XS(u,d),a){XS(c,d),this.updateElementPosition(c,!1);const f=this.updateElementPosition(u,a);yield f==null?void 0:f.finished}return u})}inferTreeLayoutOffset(t){var e;let[n,i]=[1/0,-1/0],[a,s]=[1/0,-1/0];(e=t.nodes)===null||e===void 0||e.forEach(g=>{const{x:v=0,y:m=0}=g.style||{};n=Math.min(n,v),i=Math.max(i,v),a=Math.min(a,m),s=Math.max(s,m)});const{canvas:o}=this.context,A=o.getSize(),[l,c]=o.getCanvasByViewport([0,0]),[u,h]=o.getCanvasByViewport(A);if(n>=l&&i<=u&&a>=c&&s<=h)return[0,0];const d=(l+u)/2,f=(c+h)/2;return[d-(n+i)/2,f-(a+s)/2]}stopLayout(){this.instance&&Dy(this.instance)&&(this.instance.stop(),this.instance=void 0),this.supervisor&&(this.supervisor.stop(),this.supervisor=void 0),this.animationResult&&(this.animationResult.finish(),this.animationResult=void 0)}getLayoutData(t){const{nodeFilter:e=()=>!0,comboFilter:n=()=>!0,preLayout:i=!1,isLayoutInvisibleNodes:a=!1}=t,{nodes:s,edges:o,combos:A}=this.context.model.getData(),{element:l,model:c}=this.context,u=m=>l.getElement(m),h=i?m=>{var w;return!a&&(((w=m.style)===null||w===void 0?void 0:w.visibility)==="hidden"||c.getAncestorsData(m.id,Ia).some(da)||c.getAncestorsData(m.id,nr).some(da))?!1:e(m)}:m=>{const w=Qt(m),C=u(w);return!C||Ch(C)?!1:e(m)},d=s.filter(h),f=A.filter(n),g=new Map(d.map(m=>[Qt(m),m]));f.forEach(m=>g.set(Qt(m),m));const v=o.filter(({source:m,target:w})=>g.has(m)&&g.has(w));return{nodes:d,edges:v,combos:f}}initGraphLayout(t){var e;const{element:n,viewport:i}=this.context,{type:a,enableWorker:s,animation:o,iterations:A}=t,l=X6(t,["type","enableWorker","animation","iterations"]),[c,u]=i.getCanvasSize(),h=[c/2,u/2],d=(e=t==null?void 0:t.nodeSize)!==null&&e!==void 0?e:w=>{const C=n==null?void 0:n.getElement(w.id);return C?C.attributes.size:n==null?void 0:n.getElementComputedStyle("node",w).size},f=Fo("layout",a);if(!f)return ha.warn(`The layout of ${a} is not registered.`);const g=Object.getPrototypeOf(f.prototype)===Mg.prototype?f:vQ(f,this.context),v=new g(this.context),m={nodeSize:d,width:c,height:u,center:h};switch(v.id){case"d3-force":case"d3-force-3d":Object.assign(m,{center:{x:c/2,y:u/2,z:0}});break;default:break}return Ci(v.options,m,l),v}updateElementPosition(t,e){const{model:n,element:i}=this.context;return i?(n.updateData(t),i.draw({animation:e,silence:!0})):null}destroy(){var t;this.stopLayout(),this.context={},(t=this.supervisor)===null||t===void 0||t.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const XS=(r,t)=>{var e;const[n,i]=t;(e=r.nodes)===null||e===void 0||e.forEach(a=>{if(a.style){const{x:s=0,y:o=0}=a.style;a.style.x=s+n,a.style.y=o+i}else a.style={x:n,y:i}})};function q6(r){return[$6].reduce((e,n)=>n(e),r)}function $6(r){return!r.layout||Array.isArray(r.layout)||"preLayout"in r.layout||["antv-dagre","combo-combined","compact-box","circular","concentric","dagre","fishbone","grid","indented","mds","radial","random","snake","dendrogram","mindmap"].includes(r.layout.type)&&(r.layout.preLayout=!0),r}class t5 extends Wm{constructor(t){super(t),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(t){this.setExtensions(t)}getPluginInstance(t){const e=this.extensionMap[t];if(e)return e;ha.warn(`Cannot find the plugin ${t}, will try to find it by type.`);const n=this.extensions.find(i=>i.type===t);if(n)return this.extensionMap[n.key]}}const H0=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class e5 extends Wm{constructor(t){super(t),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(t){this.setExtensions([...H0.slice(0,H0.length-1),...t,H0[H0.length-1]])}getTransformInstance(t){return t?this.extensionMap[t]:this.extensionMap}}var zh=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class n5{get padding(){return La(this.context.options.padding)}get paddingOffset(){const[t,e,n,i]=this.padding,[a,s,o]=[(i-e)/2,(t-n)/2,0];return[a,s,o]}constructor(t){this.landmarkCounter=0,this.context=t;const[e,n]=this.paddingOffset,{zoom:i,rotation:a,x:s=e,y:o=n}=t.options;this.transform({mode:"absolute",scale:i,translate:[s,o],rotate:a},!1)}get camera(){const{canvas:t}=this.context;return new Proxy(t.getCamera(),{get:(e,n)=>{const a=Object.entries(t.getLayers()).filter(([o])=>!["main"].includes(o)).map(([,o])=>o.getCamera()),s=e[n];if(typeof s=="function")return(...o)=>{const A=s.apply(e,o);return a.forEach(l=>{l[n].apply(l,o)}),A}}})}createLandmark(t){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,t)}getAnimation(t){const e=uB(this.context.options,t);return e?xl(Object.assign({},e),["easing","duration"]):!1}getCanvasSize(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e,n]}getCanvasCenter(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e/2,n/2,0]}getViewportCenter(){const[t,e]=this.camera.getPosition();return[t,e,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(t){const{camera:e}=this,{mode:n,translate:i=[]}=t,a=this.getZoom(),s=e.getPosition(),o=e.getFocalPoint(),[A,l]=this.getCanvasCenter(),[c=0,u=0,h=0]=i,d=bs([-c,-u,-h],a);return n==="relative"?{position:tn(s,d),focalPoint:tn(o,d)}:{position:tn([A,l,s[2]],d),focalPoint:tn([A,l,o[2]],d)}}getRotateOptions(t){const{mode:e,rotate:n=0}=t;return{roll:e==="relative"?this.camera.getRoll()+n:n}}getZoomOptions(t){const{zoomRange:e}=this.context.options,n=this.camera.getZoom(),{mode:i,scale:a=1}=t;return hr(i==="relative"?n*a:a,...e)}transform(t,e){return zh(this,void 0,void 0,function*(){const{graph:n}=this.context,{translate:i,rotate:a,scale:s,origin:o}=t;this.cancelAnimation();const A=this.getAnimation(e);if(ci(n,new k0(Ae.BEFORE_TRANSFORM,t)),!a&&s&&!i&&o&&!A){this.camera.setZoomByViewportPoint(this.getZoomOptions(t),o),ci(n,new k0(Ae.AFTER_TRANSFORM,t));return}const l={};if(i&&Object.assign(l,this.getTranslateOptions(t)),ye(a)&&Object.assign(l,this.getRotateOptions(t)),ye(s)&&Object.assign(l,{zoom:this.getZoomOptions(t)}),A)return ci(n,new rs(Ae.BEFORE_ANIMATE,ua.TRANSFORM,null,t)),new Promise(c=>{this.transformResolver=c,this.camera.gotoLandmark(this.createLandmark(l),Object.assign(Object.assign({},A),{onfinish:()=>{ci(n,new rs(Ae.AFTER_ANIMATE,ua.TRANSFORM,null,t)),ci(n,new k0(Ae.AFTER_TRANSFORM,t)),this.transformResolver=void 0,c()}}))});this.camera.gotoLandmark(this.createLandmark(l),{duration:0}),ci(n,new k0(Ae.AFTER_TRANSFORM,t))})}fitView(t,e){return zh(this,void 0,void 0,function*(){const[n,i,a,s]=this.padding,{when:o="always",direction:A="both"}=t||{},[l,c]=this.context.canvas.getSize(),u=l-s-i,h=c-n-a,d=this.context.canvas.getBounds(),f=this.getBBoxInViewport(d),[g,v]=gA(f),m=A==="x"&&g>=u||A==="y"&&v>=h||A==="both"&&g>=u&&v>=h;if(o==="overflow"&&!m)return yield this.fitCenter({animation:e});const w=u/g,C=h/v,F=A==="x"?w:A==="y"?C:Math.min(w,C),Q=this.getAnimation(e);Number.isFinite(F)&&(yield this.transform({mode:"relative",scale:F,translate:tn(tr(this.getCanvasCenter(),this.getBBoxInViewport(d).center),bs(this.paddingOffset,F))},Q))})}fitCenter(t){return zh(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,t)})}focusElements(t){return zh(this,arguments,void 0,function*(e,n={}){const{element:i}=this.context;if(!i)return;const a=o=>n.shapes?o.getShape(n.shapes).getRenderBounds():o.getRenderBounds(),s=ch(e.map(o=>a(i.getElement(o))));yield this.focus(s,n)})}focus(t,e){return zh(this,void 0,void 0,function*(){const n=this.context.graph.getViewportByCanvas(t.center),i=e.position||this.getCanvasCenter(),a=tr(i,n);yield this.transform({mode:"relative",translate:tn(a,this.paddingOffset)},e.animation)})}getBBoxInViewport(t){const{min:e,max:n}=t,{graph:i}=this.context,[a,s]=i.getViewportByCanvas(e),[o,A]=i.getViewportByCanvas(n),l=new jn;return l.setMinMax([a,s,0],[o,A,0]),l}isInViewport(t,e=!1,n=0){const{graph:i}=this.context,a=this.getCanvasSize(),[s,o]=i.getCanvasByViewport([0,0]),[A,l]=i.getCanvasByViewport(a);let c=new jn;return c.setMinMax([s,o,0],[A,l,0]),n&&(c=pA(c,n)),kc(t)?ws(t,c):e?ZO(t,c):c.intersects(t)}cancelAnimation(){var t,e;!((t=this.camera.landmarks)===null||t===void 0)&&t.length&&this.camera.cancelLandmarkAnimation(),(e=this.transformResolver)===null||e===void 0||e.call(this)}}var ar=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(s){s(a)})}return new(e||(e=Promise))(function(a,s){function o(c){try{l(n.next(c))}catch(u){s(u)}}function A(c){try{l(n.throw(c))}catch(u){s(u)}}function l(c){c.done?a(c.value):i(c.value).then(o,A)}l((n=n.apply(r,t||[])).next())})};class G0 extends Cg{constructor(t){var e;super(),this.options={},this.rendered=!1,this.destroyed=!1,this.context={model:new U6},this.isCollapsingExpanding=!1,this.onResize=Mh(()=>{this.resize()},300),this._setOptions(Object.assign({},G0.defaultOptions,t),!0),this.context.graph=this,this.options.autoResize&&((e=globalThis.addEventListener)===null||e===void 0||e.call(globalThis,"resize",this.onResize))}getOptions(){return this.options}setOptions(t){this._setOptions(t,!1)}_setOptions(t,e){if(this.updateCanvas(t),Object.assign(this.options,q6(t)),e){const{data:h}=t;h&&this.addData(h);return}const{behaviors:n,combo:i,data:a,edge:s,layout:o,node:A,plugins:l,theme:c,transforms:u}=t;n&&this.setBehaviors(n),a&&this.setData(a),A&&this.setNode(A),s&&this.setEdge(s),i&&this.setCombo(i),o&&this.setLayout(o),c&&this.setTheme(c),l&&this.setPlugins(l),u&&this.setTransforms(u)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(t,e){t&&(this.options.width=t),e&&(this.options.height=e),this.resize(t,e)}setZoomRange(t){this.options.zoomRange=t}getZoomRange(){return this.options.zoomRange}setNode(t){this.options.node=t,this.context.model.refreshData()}setEdge(t){this.options.edge=t,this.context.model.refreshData()}setCombo(t){this.options.combo=t,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(t){this.options.theme=Wt(t)?t(this.getTheme()):t}setLayout(t){this.options.layout=Wt(t)?t(this.getLayout()):t}getLayout(){return this.options.layout}setBehaviors(t){var e;this.options.behaviors=Wt(t)?t(this.getBehaviors()):t,(e=this.context.behavior)===null||e===void 0||e.setBehaviors(this.options.behaviors)}updateBehavior(t){this.setBehaviors(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getBehaviors(){return this.options.behaviors||[]}setPlugins(t){var e;this.options.plugins=Wt(t)?t(this.getPlugins()):t,(e=this.context.plugin)===null||e===void 0||e.setPlugins(this.options.plugins)}updatePlugin(t){this.setPlugins(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getPlugins(){return this.options.plugins||[]}getPluginInstance(t){return this.context.plugin.getPluginInstance(t)}setTransforms(t){var e;this.options.transforms=Wt(t)?t(this.getTransforms()):t,(e=this.context.transform)===null||e===void 0||e.setTransforms(this.options.transforms)}updateTransform(t){this.setTransforms(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}hasNode(t){return this.context.model.hasNode(t)}hasEdge(t){return this.context.model.hasEdge(t)}hasCombo(t){return this.context.model.hasCombo(t)}getElementData(t){return Array.isArray(t)?t.map(e=>this.context.model.getElementDataById(e)):this.context.model.getElementDataById(t)}getNodeData(t){return t===void 0?this.context.model.getNodeData():Array.isArray(t)?this.context.model.getNodeData(t):this.context.model.getNodeLikeDatum(t)}getEdgeData(t){return t===void 0?this.context.model.getEdgeData():Array.isArray(t)?this.context.model.getEdgeData(t):this.context.model.getEdgeDatum(t)}getComboData(t){return t===void 0?this.context.model.getComboData():Array.isArray(t)?this.context.model.getComboData(t):this.context.model.getNodeLikeDatum(t)}setData(t){this.context.model.setData(Wt(t)?t(this.getData()):t)}addData(t){this.context.model.addData(Wt(t)?t(this.getData()):t)}addNodeData(t){this.context.model.addNodeData(Wt(t)?t(this.getNodeData()):t)}addEdgeData(t){this.context.model.addEdgeData(Wt(t)?t(this.getEdgeData()):t)}addComboData(t){this.context.model.addComboData(Wt(t)?t(this.getComboData()):t)}addChildrenData(t,e){this.context.model.addChildrenData(t,e)}updateData(t){this.context.model.updateData(Wt(t)?t(this.getData()):t)}updateNodeData(t){this.context.model.updateNodeData(Wt(t)?t(this.getNodeData()):t)}updateEdgeData(t){this.context.model.updateEdgeData(Wt(t)?t(this.getEdgeData()):t)}updateComboData(t){this.context.model.updateComboData(Wt(t)?t(this.getComboData()):t)}removeData(t){this.context.model.removeData(Wt(t)?t(this.getData()):t)}removeNodeData(t){this.context.model.removeNodeData(Wt(t)?t(this.getNodeData()):t)}removeEdgeData(t){this.context.model.removeEdgeData(Wt(t)?t(this.getEdgeData()):t)}removeComboData(t){this.context.model.removeComboData(Wt(t)?t(this.getComboData()):t)}getElementType(t){return this.context.model.getElementType(t)}getRelatedEdgesData(t,e="both"){return this.context.model.getRelatedEdgesData(t,e)}getNeighborNodesData(t){return this.context.model.getNeighborNodesData(t)}getAncestorsData(t,e){return this.context.model.getAncestorsData(t,e)}getParentData(t,e){return this.context.model.getParentData(t,e)}getChildrenData(t){return this.context.model.getChildrenData(t)}getDescendantsData(t){return this.context.model.getDescendantsData(t)}getElementDataByState(t,e){return this.context.model.getElementDataByState(t,e)}initCanvas(){return ar(this,void 0,void 0,function*(){var t;if(this.context.canvas)return yield this.context.canvas.ready;const{container:e="container",width:n,height:i,renderer:a,cursor:s,background:o,canvas:A,devicePixelRatio:l=(t=globalThis.devicePixelRatio)!==null&&t!==void 0?t:1}=this.options;if(e instanceof kS)this.context.canvas=e,s&&e.setCursor(s),a&&e.setRenderer(a),yield e.ready;else{const c=gn(e)?document.getElementById(e):e,u=PS(c);this.emit(Ae.BEFORE_CANVAS_INIT,{container:c,width:n,height:i});const h=Object.assign(Object.assign({},A),{container:c,width:n||u[0],height:i||u[1],background:o,renderer:a,cursor:s,devicePixelRatio:l}),d=new kS(h);this.context.canvas=d,yield d.ready,this.emit(Ae.AFTER_CANVAS_INIT,{canvas:d})}})}updateCanvas(t){var e,n;const{renderer:i,cursor:a,height:s,width:o}=t,A=this.context.canvas;A&&(i&&(this.emit(Ae.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),A.setRenderer(i),this.emit(Ae.AFTER_RENDERER_CHANGE,{renderer:i})),a&&A.setCursor(a),(ye(o)||ye(s))&&this.setSize((e=o!=null?o:this.options.width)!==null&&e!==void 0?e:0,(n=s!=null?s:this.options.height)!==null&&n!==void 0?n:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new I6(this.context)),this.context.plugin||(this.context.plugin=new t5(this.context)),this.context.viewport||(this.context.viewport=new n5(this.context)),this.context.transform||(this.context.transform=new e5(this.context)),this.context.element||(this.context.element=new P6(this.context)),this.context.animation||(this.context.animation=new O6(this.context)),this.context.layout||(this.context.layout=new J6(this.context)),this.context.behavior||(this.context.behavior=new L6(this.context))}prepare(){return ar(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed){console.error(Oo("The graph instance has been destroyed"));return}yield this.initCanvas(),this.initRuntime()})}render(){return ar(this,void 0,void 0,function*(){if(yield this.prepare(),ci(this,new Yr(Ae.BEFORE_RENDER)),this.options.layout)if(!this.rendered&&gQ(this.options.layout)){const t=yield this.context.element.preLayoutDraw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.autoFit()])}else{const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.context.layout.postLayout()]),yield this.autoFit()}else{const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.autoFit()])}this.rendered=!0,ci(this,new Yr(Ae.AFTER_RENDER))})}draw(){return ar(this,void 0,void 0,function*(){var t;yield this.prepare(),yield(t=this.context.element.draw())===null||t===void 0?void 0:t.finished})}layout(t){return ar(this,void 0,void 0,function*(){yield this.context.layout.postLayout(t)})}stopLayout(){this.context.layout.stopLayout()}clear(){return ar(this,void 0,void 0,function*(){const{model:t,element:e}=this.context;t.setData({}),t.clearChanges(),e==null||e.clear()})}destroy(){var t;ci(this,new Yr(Ae.BEFORE_DESTROY));const{layout:e,animation:n,element:i,model:a,canvas:s,behavior:o,plugin:A}=this.context;A==null||A.destroy(),o==null||o.destroy(),e==null||e.destroy(),n==null||n.destroy(),i==null||i.destroy(),a.destroy(),s==null||s.destroy(),this.options={},this.context={},this.off(),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"resize",this.onResize),this.destroyed=!0,ci(this,new Yr(Ae.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(t,e){var n;const i=PS((n=this.context.canvas)===null||n===void 0?void 0:n.getContainer()),a=[t||i[0],e||i[1]];if(!this.context.canvas)return;const s=this.context.canvas.getSize();Dr(a,s)||(ci(this,new Yr(Ae.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),ci(this,new Yr(Ae.AFTER_SIZE_CHANGE,{size:a})))}fitView(t,e){return ar(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.fitView(t,e)})}fitCenter(t){return ar(this,void 0,void 0,function*(){var e;yield(e=this.context.viewport)===null||e===void 0?void 0:e.fitCenter({animation:t})})}autoFit(){return ar(this,void 0,void 0,function*(){const{autoFit:t}=this.context.options;if(t)if(gn(t))t==="view"?yield this.fitView():t==="center"&&(yield this.fitCenter());else{const{type:e,animation:n}=t;e==="view"?yield this.fitView(t.options,n):e==="center"&&(yield this.fitCenter(n))}})}focusElement(t,e){return ar(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.focusElements(Array.isArray(t)?t:[t],{animation:e})})}zoomBy(t,e,n){return ar(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:t,origin:n},e)})}zoomTo(t,e,n){return ar(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",scale:t,origin:n},e)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(t,e,n){return ar(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:t,origin:n},e)})}rotateTo(t,e,n){return ar(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:t,origin:n},e)})}getRotation(){return this.context.viewport.getRotation()}translateBy(t,e){return ar(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:t},e)})}translateTo(t,e){return ar(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:t},e)})}getPosition(){return tr([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(t,e){return ar(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[A,l]=Br(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a];Object.entries(A).forEach(([c,u])=>this.context.model.translateNodeLikeBy(c,u)),yield(o=this.context.element.draw({animation:l,stage:"translate"}))===null||o===void 0?void 0:o.finished})}translateElementTo(t,e){return ar(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[A,l]=Br(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a];Object.entries(A).forEach(([c,u])=>this.context.model.translateNodeLikeTo(c,u)),yield(o=this.context.element.draw({animation:l,stage:"translate"}))===null||o===void 0?void 0:o.finished})}getElementPosition(t){return this.context.model.getElementPosition(t)}getElementRenderStyle(t){return zy(this.context.element.getElement(t).attributes,["context"])}setElementVisibility(t,e){return ar(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[A,l]=Br(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a],c={nodes:[],edges:[],combos:[]};Object.entries(A).forEach(([d,f])=>{const g=this.getElementType(d);c[`${g}s`].push({id:d,style:{visibility:f}})});const{model:u,element:h}=this.context;u.preventUpdateNodeLikeHierarchy(()=>{u.updateData(c)}),yield(o=h.draw({animation:l,stage:"visibility"}))===null||o===void 0?void 0:o.finished})}showElement(t,e){return ar(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"visible"])),e)})}hideElement(t,e){return ar(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"hidden"])),e)})}getElementVisibility(t){var e,n;const i=this.context.element.getElement(t);return(n=(e=i==null?void 0:i.style)===null||e===void 0?void 0:e.visibility)!==null&&n!==void 0?n:"visible"}setElementZIndex(t,e){return ar(this,void 0,void 0,function*(){var n;const i={nodes:[],edges:[],combos:[]},a=Br(t)?t:{[t]:e};Object.entries(a).forEach(([A,l])=>{const c=this.getElementType(A);i[`${c}s`].push({id:A,style:{zIndex:l}})});const{model:s,element:o}=this.context;s.preventUpdateNodeLikeHierarchy(()=>s.updateData(i)),yield(n=o.draw({animation:!1,stage:"zIndex"}))===null||n===void 0?void 0:n.finished})}frontElement(t){return ar(this,void 0,void 0,function*(){const e=Array.isArray(t)?t:[t],{model:n}=this.context,i={};e.map(a=>{const s=n.getFrontZIndex(a);if(n.getElementType(a)==="combo"){const A=n.getAncestorsData(a,nr).at(-1)||this.getComboData(a),l=[A,...n.getDescendantsData(Qt(A))],c=s-DS(A);l.forEach(h=>{i[Qt(h)]=this.getElementZIndex(Qt(h))+c});const{internal:u}=hy(l.map(Qt),h=>n.getRelatedEdgesData(h));u.forEach(h=>{const d=Qt(h);i[d]=this.getElementZIndex(d)+c})}else i[a]=s}),yield this.setElementZIndex(i)})}getElementZIndex(t){return DS(this.context.model.getElementDataById(t))}setElementState(t,e){return ar(this,arguments,void 0,function*(n,i,a=!0){var s,o;const[A,l]=Br(n)?[n,(s=i)!==null&&s!==void 0?s:!0]:[{[n]:i},a],c=h=>h?Array.isArray(h)?h:[h]:[],u={nodes:[],edges:[],combos:[]};Object.entries(A).forEach(([h,d])=>{const f=this.getElementType(h);u[`${f}s`].push({id:h,states:c(d)})}),this.updateData(u),yield(o=this.context.element.draw({animation:l,stage:"state"}))===null||o===void 0?void 0:o.finished})}getElementState(t){return this.context.model.getElementState(t)}getElementRenderBounds(t){return this.context.element.getElement(t).getRenderBounds()}collapseElement(t){return ar(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(da(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!1});const s=i.getElementType(e);yield this.frontElement(e),this.isCollapsingExpanding=!0,i.updateData(s==="node"?{nodes:[{id:e,style:{collapsed:!0}}]}:{combos:[{id:e,style:{collapsed:!0}}]}),s==="node"?yield a.collapseNode(e,n):s==="combo"&&(yield a.collapseCombo(e,!!n.animation)),this.isCollapsingExpanding=!1})}expandElement(t){return ar(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(!da(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!1});const s=i.getElementType(e);this.isCollapsingExpanding=!0,i.updateData(s==="node"?{nodes:[{id:e,style:{collapsed:!1}}]}:{combos:[{id:e,style:{collapsed:!1}}]}),s==="node"?yield a.expandNode(e,n):s==="combo"&&(yield a.expandCombo(e,!!n.animation)),this.isCollapsingExpanding=!1})}setElementCollapsibility(t,e){const n=this.getElementType(t);n==="node"?this.updateNodeData([{id:t,style:{collapsed:e}}]):n==="combo"&&this.updateComboData([{id:t,style:{collapsed:e}}])}toDataURL(){return ar(this,arguments,void 0,function*(t={}){return this.context.canvas.toDataURL(t)})}getCanvasByViewport(t){return this.context.canvas.getCanvasByViewport(t)}getViewportByCanvas(t){return this.context.canvas.getViewportByCanvas(t)}getClientByCanvas(t){return this.context.canvas.getClientByCanvas(t)}getCanvasByClient(t){return this.context.canvas.getCanvasByClient(t)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(t,e,n){return super.on(t,e,n)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}}G0.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var r5=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function i5(r,t){const{getNodeData:e=(o,A)=>{if(o.depth=A,!o.children)return o;const{children:l}=o,c=r5(o,["children"]);return Object.assign(Object.assign({},c),{children:l.map(u=>u.id)})},getEdgeData:n=(o,A)=>({source:o.id,target:A.id}),getChildren:i=o=>o.children||[]}=t||{},a=[],s=[];return El(r,(o,A)=>{a.push(e(o,A));const l=i(o);for(const c of l)s.push(n(o,c))},o=>i(o),"TB"),{nodes:a,edges:s}}class a5 extends kA{beforeDraw(t){const{add:e,update:n}=t,{model:i}=this.context;return[...e.edges.entries(),...n.edges.entries()].forEach(([,a])=>{JS(i,a)}),t}}const JS=(r,t)=>{const{source:e,target:n}=t,i=r.getElementDataById(e),a=r.getElementDataById(n),s=nx(i,u=>r.getParentData(u,nr)),o=nx(a,u=>r.getParentData(u,nr)),A=Qt(s),l=Qt(o),c={sourceNode:A,targetNode:l};return t.style?Object.assign(t.style,c):t.style=c,t},s5=(r,t,e)=>{const[n,i]=t,[a,s]=e;if(i===n)return a;const o=(r-n)/(i-n);return a+o*(s-a)},o5=(r,t,e)=>{const[n,i]=t,[a,s]=e,o=Math.log(r-n+1)/Math.log(i-n+1);return a+o*(s-a)},A5=(r,t,e,n=2)=>{const[i,a]=t,[s,o]=e,A=Math.pow((r-i)/(a-i),n);return s+A*(o-s)},l5=(r,t,e)=>{const[n,i]=t,[a,s]=e,o=Math.sqrt((r-n)/(i-n));return a+o*(s-a)};class K0 extends kA{constructor(t,e){super(t,Ci({},K0.defaultOptions,e)),this.assignSizeByCentrality=(n,i,a,s,o,A)=>{const l=[i,a],c=[s[0],o[0]],u=[s[1],o[1]],h=[s[2],o[2]],d=(f,g)=>{if(typeof A=="function")return A(f,l,g);switch(A){case"linear":return s5(f,l,g);case"log":return o5(f,l,g);case"pow":return A5(f,l,g,2);case"sqrt":return l5(f,l,g);default:return g[0]}};return[d(n,c),d(n,u),d(n,h)]}}beforeDraw(t){const{model:e}=this.context,n=e.getNodeData(),i=ka(this.options.maxSize),a=ka(this.options.minSize),s=this.getCentralities(this.options.centrality),o=s.size>0?Math.max(...s.values()):0,A=s.size>0?Math.min(...s.values()):0;return n.forEach(l=>{var c;const u=this.assignSizeByCentrality(s.get(Qt(l))||0,A,o,a,i,this.options.scale),h=(c=this.context.element)===null||c===void 0?void 0:c.getElement(Qt(l)),d={size:u};this.assignLabelStyle(d,u,l,h),(!h||!L0(d,h.attributes))&&Pa(t,h?"update":"add","node",Ci(l,{style:d}),!0)}),t}assignLabelStyle(t,e,n,i){var a;const s=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",n);if(Object.assign(t,xl(s,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const o=this.getLabelSizeByNodeSize(e,1/0,Number(t.labelFontSize));Object.assign(t,{labelFontSize:o,labelLineHeight:o+WO(t.labelPadding)})}return t}getLabelSizeByNodeSize(t,e,n){const i=Math.min(...t)/2,[a,s]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[n,e];return Math.min(s,Math.max(i,a))}getCentralities(t){const{model:e}=this.context,n=e.getData();if(typeof t=="function")return t(n);const i=e.getRelatedEdgesData.bind(e);return nb(n,i,t)}}K0.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class z0 extends kA{constructor(t,e){super(t,Object.assign({},z0.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var t;const e=Ai(this.ref),{graph:n,model:i}=this.context;(t=i.getData().nodes)===null||t===void 0||t.forEach(s=>{var o;if(Qt(s)===Qt(this.ref))return;const A=sb(tr(Ai(s),e)),l=Math.abs(A)>Math.PI/2,c=!s.children||s.children.length===0,u=Qt(s),h=(o=this.context.element)===null||o===void 0?void 0:o.getElement(u);if(!h||!h.isVisible())return;const d=ka(n.getElementRenderStyle(u).size)[0]/2,f=(c?1:-1)*(d+this.options.offset),g=[["translate",f*Math.cos(A),f*Math.sin(A)],["rotate",l?Bi(A)+180:Bi(A)]];i.updateNodeData([{id:Qt(s),style:{labelTextAlign:l===c?"right":"left",labelTextBaseline:"middle",labelTransform:g}}])}),n.draw()}}z0.defaultOptions={offset:5};const c5="quadratic",qS=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class V0 extends kA{constructor(t,e){super(t,Object.assign({},V0.defaultOptions,e)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=n=>{const{add:{edges:i},update:{nodes:a,edges:s,combos:o},remove:{edges:A}}=n,{model:l}=this.context,c=new Map,u=(f,g)=>{l.getRelatedEdgesData(g).forEach(m=>!c.has(Qt(m))&&c.set(Qt(m),m))};a.forEach(u),o.forEach(u);const h=f=>{const g=new Set(n.remove.edges.keys()),v=l.getEdgeData().filter(m=>!g.has(Qt(m))).map(m=>JS(l,m));u5(f,v,!0).forEach(m=>{const w=Qt(m);c.has(w)||c.set(w,m)})};if(A.size&&A.forEach(h),i.size&&i.forEach(h),s.size){const f=JC(Xy(l.getChanges())).update.edges;s.forEach(g=>{var v;h(g);const m=(v=f.find(w=>Qt(w.value)===Qt(g)))===null||v===void 0?void 0:v.original;m&&!V1(g,m)&&h(m)})}ro(this.options.edges)||c.forEach((f,g)=>!this.options.edges.includes(g)&&c.delete(g));const d=l.getEdgeData().map(Qt);return new Map([...c].sort((f,g)=>d.indexOf(f[0])-d.indexOf(g[0])))},this.applyBundlingStyle=(n,i,a)=>{const{edgeMap:s,reverses:o}=$S(i);s.forEach(A=>{A.forEach((l,c,u)=>{var h;const d=u.length,f=l.style||{};if(l.source===l.target){const m=qS.length;f.loopPlacement=qS[c%m],f.loopDist=Math.floor(c/m)*a+50}else if(d===1)f.curveOffset=0;else{const m=(c%2===0?1:-1)*(o[`${l.source}|${l.target}|${c}`]?-1:1);f.curveOffset=d%2===1?m*Math.ceil(c/2)*a*2:m*(Math.floor(c/2)*a*2+a)}const g=Object.assign(l,{type:c5,style:f}),v=(h=this.context.element)===null||h===void 0?void 0:h.getElement(Qt(l));(!v||!L0(g.style,v.attributes))&&Pa(n,v?"update":"add","edge",g,!0)})})},this.resetEdgeStyle=n=>{const i=n.style||{},a=this.cacheMergeStyle.get(Qt(n))||{};return Object.keys(a).forEach(s=>{Dr(i[s],a[s])&&(n[s]?i[s]=n[s]:delete i[s])}),Object.assign(n,{style:i})},this.applyMergingStyle=(n,i)=>{const{edgeMap:a,reverses:s}=$S(i);a.forEach(o=>{var A;if(o.length===1){const c=o[0],u=(A=this.context.element)===null||A===void 0?void 0:A.getElement(Qt(c)),h=this.resetEdgeStyle(c);(!u||!L0(h,u.attributes))&&Pa(n,u?"update":"add","edge",h);return}const l=o.map(({source:c,target:u,style:h={}},d)=>{const{startArrow:f,endArrow:g}=h,v={},[m,w]=s[`${c}|${u}|${d}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return Jo(f)&&(v[m]=f),Jo(g)&&(v[w]=g),v}).reduce((c,u)=>Object.assign(Object.assign({},c),u),{});o.forEach((c,u,h)=>{var d;if(u!==0){Pa(n,"remove","edge",c);return}const f=Object.assign({},Wt(this.options.style)?this.options.style(h):this.options.style,{childrenData:h});this.cacheMergeStyle.set(Qt(c),f);const g=Object.assign(Object.assign({},c),{type:"line",style:Object.assign(Object.assign(Object.assign({},c.style),l),f)}),v=(d=this.context.element)===null||d===void 0?void 0:d.getElement(Qt(c));(!v||!L0(g.style,v.attributes))&&Pa(n,v?"update":"add","edge",g,!0)})})}}beforeDraw(t){const e=this.getAffectedParallelEdges(t);return e.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(t,e,this.options.distance):this.applyMergingStyle(t,e)),t}}V0.defaultOptions={mode:"bundle",distance:15};const $S=r=>{const t=new Map,e=new Set,n={},i=new Map;for(const[a,s]of r){if(e.has(a))continue;const{source:o,target:A}=s,l=`${o}-${A}`;t.has(l)||(t.set(l,[]),i.set(l,new Set));const c=t.get(l),u=i.get(l);c&&u&&!u.has(a)&&(c.push(s),u.add(a),e.add(a));for(const[h,d]of r)if(!(e.has(h)||h===a)&&V1(s,d)){const f=t.get(l),g=i.get(l);f&&g&&!g.has(h)&&(f.push(d),g.add(h),o===d.target&&A===d.source&&(n[`${d.source}|${d.target}|${f.length-1}`]=!0),e.add(h))}}return{edgeMap:t,reverses:n}},u5=(r,t,e)=>t.filter(n=>(e||Qt(n)!==Qt(r))&&V1(n,r)),V1=(r,t)=>{const{sourceNode:e,targetNode:n}=r.style||{},{sourceNode:i,targetNode:a}=t.style||{};return e===i&&n===a||e===a&&n===i};class h5 extends kA{beforeDraw(t,e){const{stage:n}=e;if(n==="visibility")return t;const{model:i}=this.context,{update:{nodes:a,edges:s,combos:o}}=t,A=(l,c)=>{i.getRelatedEdgesData(c).forEach(h=>!s.has(Qt(h))&&s.set(Qt(h),h))};return a.forEach(A),o.forEach(A),t}}const d5={animation:{"combo-collapse":gB,"combo-expand":HO,"node-collapse":dB,"node-expand":RO,"path-in":fB,"path-out":_O,fade:PO,translate:DO},behavior:{"brush-select":vh,"click-select":Xf,"collapse-expand":yg,"create-edge":bg,"drag-canvas":xg,"drag-element-force":mQ,"drag-element":Th,"fix-element-size":Fg,"focus-element":Og,"hover-activate":Ig,"lasso-select":wQ,"auto-adapt-label":zf,"optimize-viewport-transform":Lg,"scroll-canvas":Ng,"zoom-canvas":kg},combo:{circle:ck,rect:uk},edge:{cubic:Cl,line:vg,polyline:pg,quadratic:mg,"cubic-horizontal":dg,"cubic-radial":fg,"cubic-vertical":gg},layout:{"antv-dagre":C3,"combo-combined":j3,"compact-box":Fx,"d3-force":gP,"force-atlas2":mP,circular:T3,concentric:Ny,dagre:Dg,dendrogram:Ix,fishbone:Hg,force:wC,fruchterman:EP,grid:bP,indented:Lx,mds:MC,mindmap:Qx,radial:LP,random:RP,snake:Gg},node:{circle:Bl,diamond:EN,ellipse:eg,hexagon:SN,html:Ag,image:lg,rect:Ak,star:lk,donut:$f,triangle:cg},palette:{spectral:zP,tableau:VP,oranges:WP,greens:ZP,blues:jP},theme:{dark:m6,light:y6},plugin:{"bubble-sets":qg,"edge-bundling":t0,"edge-filter-lens":e0,"grid-line":i0,background:Kg,contextmenu:$g,fisheye:n0,fullscreen:r0,history:a0,hull:l0,legend:g0,minimap:v0,snapline:p0,timebar:T0,title:n6,toolbar:F0,tooltip:O0,watermark:I0},transform:{"arrange-draw-order":w6,"collapse-expand-combo":E6,"collapse-expand-node":B6,"get-edge-actual-ends":a5,"map-node-size":K0,"place-radial-labels":z0,"process-parallel-edges":V0,"update-related-edges":h5},shape:{circle:Js,ellipse:eh,group:oi,html:ul,image:ny,line:hl,path:Pi,polygon:dl,polyline:af,rect:xi,text:fl,label:io,badge:Uc}};function f5(){Object.entries(d5).forEach(([r,t])=>{Object.entries(t).forEach(([e,n])=>{b6(r,e,n)})})}f5();const SK={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},72484:function(X,et,M){"use strict";var O=M(59301),W=M(42441),H=M(48961),L=M.n(H),I=Object.defineProperty,N=Object.defineProperties,P=Object.getOwnPropertyDescriptors,k=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,V=(it,vt,gt)=>vt in it?I(it,vt,{enumerable:!0,configurable:!0,writable:!0,value:gt}):it[vt]=gt,Y=(it,vt)=>{for(var gt in vt||(vt={}))U.call(vt,gt)&&V(it,gt,vt[gt]);if(k)for(var gt of k(vt))Z.call(vt,gt)&&V(it,gt,vt[gt]);return it},nt=(it,vt)=>N(it,P(vt));function rt(it,vt,gt=1/3,yt){let mt=it*Math.PI*2,Mt=vt*Math.PI*2;return{u:{min:-Math.PI,max:Math.PI*3,step:Math.PI/32},v:{min:0,max:Math.PI*2,step:Math.PI/20},x:function(Ct,Nt){return Ct<mt?Math.cos(mt)*(1+Math.cos(Nt)*gt):Ct>Mt?Math.cos(Mt)*(1+Math.cos(Nt)*gt):Math.cos(Ct)*(1+Math.cos(Nt)*gt)},y:function(Ct,Nt){return Ct<mt?Math.sin(mt)*(1+Math.cos(Nt)*gt):Ct>Mt?Math.sin(Mt)*(1+Math.cos(Nt)*gt):Math.sin(Ct)*(1+Math.cos(Nt)*gt)},z:function(Ct,Nt){return Ct<-Math.PI*.5?Math.sin(Ct):Ct>Math.PI*2.5?Math.sin(Ct)*yt*.1:Math.sin(Nt)>0?1*yt*.1:-1}}}function ft({pieData:it=[],internalDiameterRatio:vt=1/3}){var gt,yt,mt,Mt;const Ct=[],Nt=it==null?void 0:it.reduce((ue,Me)=>(ue||0)+((Me==null?void 0:Me.value)||0),0);let qt=0,Gt=0;const re=[];for(let ue=0;ue<(it==null?void 0:it.length);ue++){Gt=qt+(Nt==0?1:((gt=it==null?void 0:it[ue])==null?void 0:gt.value)||0);const Me={itemStyle:((yt=it==null?void 0:it[ue])==null?void 0:yt.itemStyle)||{},name:((mt=it==null?void 0:it[ue])==null?void 0:mt.name)||`name${ue}`,type:"surface",parametric:!0,parametricEquation:rt(qt/(Nt||(it==null?void 0:it.length)),Gt/(Nt||(it==null?void 0:it.length)),vt,((Mt=it==null?void 0:it[ue])==null?void 0:Mt.value)||(Nt==0?25:0)),wireframe:{show:!1},pieData:it==null?void 0:it[ue]};re.push(Me.name),Ct.push(Me),qt=Gt}return Ct.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:ue=>`${ue.value}
${ue.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...it||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:re},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:Ct}}const ct=({dataSource:it=[{name:"\u638C\u63E1\u738780%~100%",value:0,itemStyle:{color:"rgb(223,209,38)"}},{name:"\u638C\u63D0\u738760%~79%",value:0,itemStyle:{color:"rgb(6,234,230)"}},{name:"\u638C\u63A8\u738759%\u4EE5\u4E0B",value:0,itemStyle:{color:"rgb(6,110,247)"}}],className:vt="",style:gt={},legend:yt={},internalDiameterRatio:mt=1/3})=>{const[Mt,Ct]=(0,O.useState)([]),Nt=(0,O.useCallback)(re=>{const de=re.selected||{},ue=it.map(Me=>Me.name).filter(Me=>de[Me]===!1);Ct(ue)},[it]),qt=(0,O.useMemo)(()=>it.filter(re=>!Mt.includes(re.name)),[it,Mt]),Gt=(0,O.useMemo)(()=>{const re=ft({pieData:qt,internalDiameterRatio:mt}),de=it.map(Me=>Me.name),ue=it.reduce((Me,Ve)=>(Me[Ve.name]=!Mt.includes(Ve.name),Me),{});return re.legend=nt(Y(Y({},re.legend),yt),{data:de,selected:ue}),re},[qt,yt,mt,it,Mt]);return O.createElement(W.Z,{onEvents:{legendselectchanged:Nt},className:`w-full h-full ${vt}`,option:Gt,style:Y({height:"100%"},gt)})};et.Z=ct},30035:function(X,et,M){"use strict";var O,W=Object.defineProperty,H=q=>{throw TypeError(q)},L=Math.pow,I=(q,x,S)=>x in q?W(q,x,{enumerable:!0,configurable:!0,writable:!0,value:S}):q[x]=S,N=(q,x,S)=>I(q,typeof x!="symbol"?x+"":x,S),P=(q,x,S)=>x.has(q)||H("Cannot "+S),k=(q,x,S)=>(P(q,x,"read from private field"),S?S.call(q):x.get(q)),U=(q,x,S)=>x.has(q)?H("Cannot add the same private member more than once"):x instanceof WeakSet?x.add(q):x.set(q,S),Z=(q,x,S,y)=>(P(q,x,"write to private field"),y?y.call(q,S):x.set(q,S),S),V=(q,x,S)=>(P(q,x,"access private method"),S),Y,nt,rt;O={value:!0};var ft=M(34634),ct=M(34402);const it=" ".repeat(2),vt=" ".repeat(4);function gt(){return yt(this)}function yt(q,x={}){const{maxRows:S=15,maxColumns:y=10,maxNumSize:T=8,padMinus:R="auto"}=x;return`${q.constructor.name} {
${it}[
${vt}${mt(q,S,y,T,R)}
${it}]
${it}rows: ${q.rows}
${it}columns: ${q.columns}
}`}function mt(q,x,S,y,T){const{rows:R,columns:st}=q,ot=Math.min(R,x),ut=Math.min(st,S),ht=[];if(T==="auto"){T=!1;t:for(let kt=0;kt<ot;kt++)for(let Bt=0;Bt<ut;Bt++)if(q.get(kt,Bt)<0){T=!0;break t}}for(let kt=0;kt<ot;kt++){let Bt=[];for(let jt=0;jt<ut;jt++)Bt.push(Mt(q.get(kt,jt),y,T));ht.push(`${Bt.join(" ")}`)}return ut!==st&&(ht[ht.length-1]+=` ... ${st-S} more columns`),ot!==R&&ht.push(`... ${R-x} more rows`),ht.join(`
${vt}`)}function Mt(q,x,S){return(q>=0&&S?` ${Ct(q,x-1)}`:Ct(q,x)).padEnd(x)}function Ct(q,x){let S=q.toString();if(S.length<=x)return S;let y=q.toFixed(x);if(y.length>x&&(y=q.toFixed(Math.max(0,x-(y.length-x)))),y.length<=x&&!y.startsWith("0.000")&&!y.startsWith("-0.000"))return y;let T=q.toExponential(x);return T.length>x&&(T=q.toExponential(Math.max(0,x-(T.length-x)))),T.slice(0)}function Nt(q,x){q.prototype.add=function(y){return typeof y=="number"?this.addS(y):this.addM(y)},q.prototype.addS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)+y);return this},q.prototype.addM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)+y.get(T,R));return this},q.add=function(y,T){return new x(y).add(T)},q.prototype.sub=function(y){return typeof y=="number"?this.subS(y):this.subM(y)},q.prototype.subS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)-y);return this},q.prototype.subM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)-y.get(T,R));return this},q.sub=function(y,T){return new x(y).sub(T)},q.prototype.subtract=q.prototype.sub,q.prototype.subtractS=q.prototype.subS,q.prototype.subtractM=q.prototype.subM,q.subtract=q.sub,q.prototype.mul=function(y){return typeof y=="number"?this.mulS(y):this.mulM(y)},q.prototype.mulS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)*y);return this},q.prototype.mulM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)*y.get(T,R));return this},q.mul=function(y,T){return new x(y).mul(T)},q.prototype.multiply=q.prototype.mul,q.prototype.multiplyS=q.prototype.mulS,q.prototype.multiplyM=q.prototype.mulM,q.multiply=q.mul,q.prototype.div=function(y){return typeof y=="number"?this.divS(y):this.divM(y)},q.prototype.divS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)/y);return this},q.prototype.divM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)/y.get(T,R));return this},q.div=function(y,T){return new x(y).div(T)},q.prototype.divide=q.prototype.div,q.prototype.divideS=q.prototype.divS,q.prototype.divideM=q.prototype.divM,q.divide=q.div,q.prototype.mod=function(y){return typeof y=="number"?this.modS(y):this.modM(y)},q.prototype.modS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)%y);return this},q.prototype.modM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)%y.get(T,R));return this},q.mod=function(y,T){return new x(y).mod(T)},q.prototype.modulus=q.prototype.mod,q.prototype.modulusS=q.prototype.modS,q.prototype.modulusM=q.prototype.modM,q.modulus=q.mod,q.prototype.and=function(y){return typeof y=="number"?this.andS(y):this.andM(y)},q.prototype.andS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)&y);return this},q.prototype.andM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)&y.get(T,R));return this},q.and=function(y,T){return new x(y).and(T)},q.prototype.or=function(y){return typeof y=="number"?this.orS(y):this.orM(y)},q.prototype.orS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)|y);return this},q.prototype.orM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)|y.get(T,R));return this},q.or=function(y,T){return new x(y).or(T)},q.prototype.xor=function(y){return typeof y=="number"?this.xorS(y):this.xorM(y)},q.prototype.xorS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)^y);return this},q.prototype.xorM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)^y.get(T,R));return this},q.xor=function(y,T){return new x(y).xor(T)},q.prototype.leftShift=function(y){return typeof y=="number"?this.leftShiftS(y):this.leftShiftM(y)},q.prototype.leftShiftS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)<<y);return this},q.prototype.leftShiftM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)<<y.get(T,R));return this},q.leftShift=function(y,T){return new x(y).leftShift(T)},q.prototype.signPropagatingRightShift=function(y){return typeof y=="number"?this.signPropagatingRightShiftS(y):this.signPropagatingRightShiftM(y)},q.prototype.signPropagatingRightShiftS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)>>y);return this},q.prototype.signPropagatingRightShiftM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)>>y.get(T,R));return this},q.signPropagatingRightShift=function(y,T){return new x(y).signPropagatingRightShift(T)},q.prototype.rightShift=function(y){return typeof y=="number"?this.rightShiftS(y):this.rightShiftM(y)},q.prototype.rightShiftS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)>>>y);return this},q.prototype.rightShiftM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,this.get(T,R)>>>y.get(T,R));return this},q.rightShift=function(y,T){return new x(y).rightShift(T)},q.prototype.zeroFillRightShift=q.prototype.rightShift,q.prototype.zeroFillRightShiftS=q.prototype.rightShiftS,q.prototype.zeroFillRightShiftM=q.prototype.rightShiftM,q.zeroFillRightShift=q.rightShift,q.prototype.not=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,~this.get(y,T));return this},q.not=function(y){return new x(y).not()},q.prototype.abs=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.abs(this.get(y,T)));return this},q.abs=function(y){return new x(y).abs()},q.prototype.acos=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.acos(this.get(y,T)));return this},q.acos=function(y){return new x(y).acos()},q.prototype.acosh=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.acosh(this.get(y,T)));return this},q.acosh=function(y){return new x(y).acosh()},q.prototype.asin=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.asin(this.get(y,T)));return this},q.asin=function(y){return new x(y).asin()},q.prototype.asinh=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.asinh(this.get(y,T)));return this},q.asinh=function(y){return new x(y).asinh()},q.prototype.atan=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.atan(this.get(y,T)));return this},q.atan=function(y){return new x(y).atan()},q.prototype.atanh=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.atanh(this.get(y,T)));return this},q.atanh=function(y){return new x(y).atanh()},q.prototype.cbrt=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.cbrt(this.get(y,T)));return this},q.cbrt=function(y){return new x(y).cbrt()},q.prototype.ceil=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.ceil(this.get(y,T)));return this},q.ceil=function(y){return new x(y).ceil()},q.prototype.clz32=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.clz32(this.get(y,T)));return this},q.clz32=function(y){return new x(y).clz32()},q.prototype.cos=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.cos(this.get(y,T)));return this},q.cos=function(y){return new x(y).cos()},q.prototype.cosh=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.cosh(this.get(y,T)));return this},q.cosh=function(y){return new x(y).cosh()},q.prototype.exp=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.exp(this.get(y,T)));return this},q.exp=function(y){return new x(y).exp()},q.prototype.expm1=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.expm1(this.get(y,T)));return this},q.expm1=function(y){return new x(y).expm1()},q.prototype.floor=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.floor(this.get(y,T)));return this},q.floor=function(y){return new x(y).floor()},q.prototype.fround=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.fround(this.get(y,T)));return this},q.fround=function(y){return new x(y).fround()},q.prototype.log=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.log(this.get(y,T)));return this},q.log=function(y){return new x(y).log()},q.prototype.log1p=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.log1p(this.get(y,T)));return this},q.log1p=function(y){return new x(y).log1p()},q.prototype.log10=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.log10(this.get(y,T)));return this},q.log10=function(y){return new x(y).log10()},q.prototype.log2=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.log2(this.get(y,T)));return this},q.log2=function(y){return new x(y).log2()},q.prototype.round=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.round(this.get(y,T)));return this},q.round=function(y){return new x(y).round()},q.prototype.sign=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.sign(this.get(y,T)));return this},q.sign=function(y){return new x(y).sign()},q.prototype.sin=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.sin(this.get(y,T)));return this},q.sin=function(y){return new x(y).sin()},q.prototype.sinh=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.sinh(this.get(y,T)));return this},q.sinh=function(y){return new x(y).sinh()},q.prototype.sqrt=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.sqrt(this.get(y,T)));return this},q.sqrt=function(y){return new x(y).sqrt()},q.prototype.tan=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.tan(this.get(y,T)));return this},q.tan=function(y){return new x(y).tan()},q.prototype.tanh=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.tanh(this.get(y,T)));return this},q.tanh=function(y){return new x(y).tanh()},q.prototype.trunc=function(){for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.set(y,T,Math.trunc(this.get(y,T)));return this},q.trunc=function(y){return new x(y).trunc()},q.pow=function(y,T){return new x(y).pow(T)},q.prototype.pow=function(y){return typeof y=="number"?this.powS(y):this.powM(y)},q.prototype.powS=function(y){for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,L(this.get(T,R),y));return this},q.prototype.powM=function(y){if(y=x.checkMatrix(y),this.rows!==y.rows||this.columns!==y.columns)throw new RangeError("Matrices dimensions must be equal");for(let T=0;T<this.rows;T++)for(let R=0;R<this.columns;R++)this.set(T,R,L(this.get(T,R),y.get(T,R)));return this}}function qt(q,x,S){let y=S?q.rows:q.rows-1;if(x<0||x>y)throw new RangeError("Row index out of range")}function Gt(q,x,S){let y=S?q.columns:q.columns-1;if(x<0||x>y)throw new RangeError("Column index out of range")}function re(q,x){if(x.to1DArray&&(x=x.to1DArray()),x.length!==q.columns)throw new RangeError("vector size must be the same as the number of columns");return x}function de(q,x){if(x.to1DArray&&(x=x.to1DArray()),x.length!==q.rows)throw new RangeError("vector size must be the same as the number of rows");return x}function ue(q,x){if(!ft.isAnyArray(x))throw new TypeError("row indices must be an array");for(let S=0;S<x.length;S++)if(x[S]<0||x[S]>=q.rows)throw new RangeError("row indices are out of range")}function Me(q,x){if(!ft.isAnyArray(x))throw new TypeError("column indices must be an array");for(let S=0;S<x.length;S++)if(x[S]<0||x[S]>=q.columns)throw new RangeError("column indices are out of range")}function Ve(q,x,S,y,T){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(Xn("startRow",x),Xn("endRow",S),Xn("startColumn",y),Xn("endColumn",T),x>S||y>T||x<0||x>=q.rows||S<0||S>=q.rows||y<0||y>=q.columns||T<0||T>=q.columns)throw new RangeError("Submatrix indices are out of range")}function dn(q,x=0){let S=[];for(let y=0;y<q;y++)S.push(x);return S}function Xn(q,x){if(typeof x!="number")throw new TypeError(`${q} must be a number`)}function Xr(q){if(q.isEmpty())throw new Error("Empty matrix has no elements to index")}function Vi(q){let x=dn(q.rows);for(let S=0;S<q.rows;++S)for(let y=0;y<q.columns;++y)x[S]+=q.get(S,y);return x}function is(q){let x=dn(q.columns);for(let S=0;S<q.rows;++S)for(let y=0;y<q.columns;++y)x[y]+=q.get(S,y);return x}function Ao(q){let x=0;for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)x+=q.get(S,y);return x}function Ht(q){let x=dn(q.rows,1);for(let S=0;S<q.rows;++S)for(let y=0;y<q.columns;++y)x[S]*=q.get(S,y);return x}function zt(q){let x=dn(q.columns,1);for(let S=0;S<q.rows;++S)for(let y=0;y<q.columns;++y)x[y]*=q.get(S,y);return x}function Zt(q){let x=1;for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)x*=q.get(S,y);return x}function Et(q,x,S){const y=q.rows,T=q.columns,R=[];for(let st=0;st<y;st++){let ot=0,ut=0,ht=0;for(let kt=0;kt<T;kt++)ht=q.get(st,kt)-S[st],ot+=ht,ut+=ht*ht;x?R.push((ut-ot*ot/T)/(T-1)):R.push((ut-ot*ot/T)/T)}return R}function It(q,x,S){const y=q.rows,T=q.columns,R=[];for(let st=0;st<T;st++){let ot=0,ut=0,ht=0;for(let kt=0;kt<y;kt++)ht=q.get(kt,st)-S[st],ot+=ht,ut+=ht*ht;x?R.push((ut-ot*ot/y)/(y-1)):R.push((ut-ot*ot/y)/y)}return R}function Ut(q,x,S){const y=q.rows,T=q.columns,R=y*T;let st=0,ot=0,ut=0;for(let ht=0;ht<y;ht++)for(let kt=0;kt<T;kt++)ut=q.get(ht,kt)-S,st+=ut,ot+=ut*ut;return x?(ot-st*st/R)/(R-1):(ot-st*st/R)/R}function ne(q,x){for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)q.set(S,y,q.get(S,y)-x[S])}function be(q,x){for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)q.set(S,y,q.get(S,y)-x[y])}function _e(q,x){for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)q.set(S,y,q.get(S,y)-x)}function Te(q){const x=[];for(let S=0;S<q.rows;S++){let y=0;for(let T=0;T<q.columns;T++)y+=L(q.get(S,T),2)/(q.columns-1);x.push(Math.sqrt(y))}return x}function rn(q,x){for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)q.set(S,y,q.get(S,y)/x[S])}function rr(q){const x=[];for(let S=0;S<q.columns;S++){let y=0;for(let T=0;T<q.rows;T++)y+=L(q.get(T,S),2)/(q.rows-1);x.push(Math.sqrt(y))}return x}function sr(q,x){for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)q.set(S,y,q.get(S,y)/x[y])}function Ge(q){const x=q.size-1;let S=0;for(let y=0;y<q.columns;y++)for(let T=0;T<q.rows;T++)S+=L(q.get(T,y),2)/x;return Math.sqrt(S)}function Ke(q,x){for(let S=0;S<q.rows;S++)for(let y=0;y<q.columns;y++)q.set(S,y,q.get(S,y)/x)}class me{static from1DArray(x,S,y){if(x*S!==y.length)throw new RangeError("data length does not match given dimensions");let R=new pe(x,S);for(let st=0;st<x;st++)for(let ot=0;ot<S;ot++)R.set(st,ot,y[st*S+ot]);return R}static rowVector(x){let S=new pe(1,x.length);for(let y=0;y<x.length;y++)S.set(0,y,x[y]);return S}static columnVector(x){let S=new pe(x.length,1);for(let y=0;y<x.length;y++)S.set(y,0,x[y]);return S}static zeros(x,S){return new pe(x,S)}static ones(x,S){return new pe(x,S).fill(1)}static rand(x,S,y={}){if(typeof y!="object")throw new TypeError("options must be an object");const{random:T=Math.random}=y;let R=new pe(x,S);for(let st=0;st<x;st++)for(let ot=0;ot<S;ot++)R.set(st,ot,T());return R}static randInt(x,S,y={}){if(typeof y!="object")throw new TypeError("options must be an object");const{min:T=0,max:R=1e3,random:st=Math.random}=y;if(!Number.isInteger(T))throw new TypeError("min must be an integer");if(!Number.isInteger(R))throw new TypeError("max must be an integer");if(T>=R)throw new RangeError("min must be smaller than max");let ot=R-T,ut=new pe(x,S);for(let ht=0;ht<x;ht++)for(let kt=0;kt<S;kt++){let Bt=T+Math.round(st()*ot);ut.set(ht,kt,Bt)}return ut}static eye(x,S,y){S===void 0&&(S=x),y===void 0&&(y=1);let T=Math.min(x,S),R=this.zeros(x,S);for(let st=0;st<T;st++)R.set(st,st,y);return R}static diag(x,S,y){let T=x.length;S===void 0&&(S=T),y===void 0&&(y=S);let R=Math.min(T,S,y),st=this.zeros(S,y);for(let ot=0;ot<R;ot++)st.set(ot,ot,x[ot]);return st}static min(x,S){x=this.checkMatrix(x),S=this.checkMatrix(S);let y=x.rows,T=x.columns,R=new pe(y,T);for(let st=0;st<y;st++)for(let ot=0;ot<T;ot++)R.set(st,ot,Math.min(x.get(st,ot),S.get(st,ot)));return R}static max(x,S){x=this.checkMatrix(x),S=this.checkMatrix(S);let y=x.rows,T=x.columns,R=new this(y,T);for(let st=0;st<y;st++)for(let ot=0;ot<T;ot++)R.set(st,ot,Math.max(x.get(st,ot),S.get(st,ot)));return R}static checkMatrix(x){return me.isMatrix(x)?x:new pe(x)}static isMatrix(x){return x!=null&&x.klass==="Matrix"}get size(){return this.rows*this.columns}apply(x){if(typeof x!="function")throw new TypeError("callback must be a function");for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)x.call(this,S,y);return this}to1DArray(){let x=[];for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)x.push(this.get(S,y));return x}to2DArray(){let x=[];for(let S=0;S<this.rows;S++){x.push([]);for(let y=0;y<this.columns;y++)x[S].push(this.get(S,y))}return x}toJSON(){return this.to2DArray()}isRowVector(){return this.rows===1}isColumnVector(){return this.columns===1}isVector(){return this.rows===1||this.columns===1}isSquare(){return this.rows===this.columns}isEmpty(){return this.rows===0||this.columns===0}isSymmetric(){if(this.isSquare()){for(let x=0;x<this.rows;x++)for(let S=0;S<=x;S++)if(this.get(x,S)!==this.get(S,x))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let x=0;x<this.rows;x++)if(this.get(x,x)!==0)return!1;return!0}isEchelonForm(){let x=0,S=0,y=-1,T=!0,R=!1;for(;x<this.rows&&T;){for(S=0,R=!1;S<this.columns&&R===!1;)this.get(x,S)===0?S++:this.get(x,S)===1&&S>y?(R=!0,y=S):(T=!1,R=!0);x++}return T}isReducedEchelonForm(){let x=0,S=0,y=-1,T=!0,R=!1;for(;x<this.rows&&T;){for(S=0,R=!1;S<this.columns&&R===!1;)this.get(x,S)===0?S++:this.get(x,S)===1&&S>y?(R=!0,y=S):(T=!1,R=!0);for(let st=S+1;st<this.rows;st++)this.get(x,st)!==0&&(T=!1);x++}return T}echelonForm(){let x=this.clone(),S=0,y=0;for(;S<x.rows&&y<x.columns;){let T=S;for(let R=S;R<x.rows;R++)x.get(R,y)>x.get(T,y)&&(T=R);if(x.get(T,y)===0)y++;else{x.swapRows(S,T);let R=x.get(S,y);for(let st=y;st<x.columns;st++)x.set(S,st,x.get(S,st)/R);for(let st=S+1;st<x.rows;st++){let ot=x.get(st,y)/x.get(S,y);x.set(st,y,0);for(let ut=y+1;ut<x.columns;ut++)x.set(st,ut,x.get(st,ut)-x.get(S,ut)*ot)}S++,y++}}return x}reducedEchelonForm(){let x=this.echelonForm(),S=x.columns,y=x.rows,T=y-1;for(;T>=0;)if(x.maxRow(T)===0)T--;else{let R=0,st=!1;for(;R<y&&st===!1;)x.get(T,R)===1?st=!0:R++;for(let ot=0;ot<T;ot++){let ut=x.get(ot,R);for(let ht=R;ht<S;ht++){let kt=x.get(ot,ht)-ut*x.get(T,ht);x.set(ot,ht,kt)}}T--}return x}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(x={}){if(typeof x!="object")throw new TypeError("options must be an object");const{rows:S=1,columns:y=1}=x;if(!Number.isInteger(S)||S<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(y)||y<=0)throw new TypeError("columns must be a positive integer");let T=new pe(this.rows*S,this.columns*y);for(let R=0;R<S;R++)for(let st=0;st<y;st++)T.setSubMatrix(this,this.rows*R,this.columns*st);return T}fill(x){for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,x);return this}neg(){return this.mulS(-1)}getRow(x){qt(this,x);let S=[];for(let y=0;y<this.columns;y++)S.push(this.get(x,y));return S}getRowVector(x){return pe.rowVector(this.getRow(x))}setRow(x,S){qt(this,x),S=re(this,S);for(let y=0;y<this.columns;y++)this.set(x,y,S[y]);return this}swapRows(x,S){qt(this,x),qt(this,S);for(let y=0;y<this.columns;y++){let T=this.get(x,y);this.set(x,y,this.get(S,y)),this.set(S,y,T)}return this}getColumn(x){Gt(this,x);let S=[];for(let y=0;y<this.rows;y++)S.push(this.get(y,x));return S}getColumnVector(x){return pe.columnVector(this.getColumn(x))}setColumn(x,S){Gt(this,x),S=de(this,S);for(let y=0;y<this.rows;y++)this.set(y,x,S[y]);return this}swapColumns(x,S){Gt(this,x),Gt(this,S);for(let y=0;y<this.rows;y++){let T=this.get(y,x);this.set(y,x,this.get(y,S)),this.set(y,S,T)}return this}addRowVector(x){x=re(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)+x[y]);return this}subRowVector(x){x=re(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)-x[y]);return this}mulRowVector(x){x=re(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)*x[y]);return this}divRowVector(x){x=re(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)/x[y]);return this}addColumnVector(x){x=de(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)+x[S]);return this}subColumnVector(x){x=de(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)-x[S]);return this}mulColumnVector(x){x=de(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)*x[S]);return this}divColumnVector(x){x=de(this,x);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)this.set(S,y,this.get(S,y)/x[S]);return this}mulRow(x,S){qt(this,x);for(let y=0;y<this.columns;y++)this.set(x,y,this.get(x,y)*S);return this}mulColumn(x,S){Gt(this,x);for(let y=0;y<this.rows;y++)this.set(y,x,this.get(y,x)*S);return this}max(x){if(this.isEmpty())return NaN;switch(x){case"row":{const S=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)>S[y]&&(S[y]=this.get(y,T));return S}case"column":{const S=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)>S[T]&&(S[T]=this.get(y,T));return S}case void 0:{let S=this.get(0,0);for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)>S&&(S=this.get(y,T));return S}default:throw new Error(`invalid option: ${x}`)}}maxIndex(){Xr(this);let x=this.get(0,0),S=[0,0];for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)>x&&(x=this.get(y,T),S[0]=y,S[1]=T);return S}min(x){if(this.isEmpty())return NaN;switch(x){case"row":{const S=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)<S[y]&&(S[y]=this.get(y,T));return S}case"column":{const S=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)<S[T]&&(S[T]=this.get(y,T));return S}case void 0:{let S=this.get(0,0);for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)<S&&(S=this.get(y,T));return S}default:throw new Error(`invalid option: ${x}`)}}minIndex(){Xr(this);let x=this.get(0,0),S=[0,0];for(let y=0;y<this.rows;y++)for(let T=0;T<this.columns;T++)this.get(y,T)<x&&(x=this.get(y,T),S[0]=y,S[1]=T);return S}maxRow(x){if(qt(this,x),this.isEmpty())return NaN;let S=this.get(x,0);for(let y=1;y<this.columns;y++)this.get(x,y)>S&&(S=this.get(x,y));return S}maxRowIndex(x){qt(this,x),Xr(this);let S=this.get(x,0),y=[x,0];for(let T=1;T<this.columns;T++)this.get(x,T)>S&&(S=this.get(x,T),y[1]=T);return y}minRow(x){if(qt(this,x),this.isEmpty())return NaN;let S=this.get(x,0);for(let y=1;y<this.columns;y++)this.get(x,y)<S&&(S=this.get(x,y));return S}minRowIndex(x){qt(this,x),Xr(this);let S=this.get(x,0),y=[x,0];for(let T=1;T<this.columns;T++)this.get(x,T)<S&&(S=this.get(x,T),y[1]=T);return y}maxColumn(x){if(Gt(this,x),this.isEmpty())return NaN;let S=this.get(0,x);for(let y=1;y<this.rows;y++)this.get(y,x)>S&&(S=this.get(y,x));return S}maxColumnIndex(x){Gt(this,x),Xr(this);let S=this.get(0,x),y=[0,x];for(let T=1;T<this.rows;T++)this.get(T,x)>S&&(S=this.get(T,x),y[0]=T);return y}minColumn(x){if(Gt(this,x),this.isEmpty())return NaN;let S=this.get(0,x);for(let y=1;y<this.rows;y++)this.get(y,x)<S&&(S=this.get(y,x));return S}minColumnIndex(x){Gt(this,x),Xr(this);let S=this.get(0,x),y=[0,x];for(let T=1;T<this.rows;T++)this.get(T,x)<S&&(S=this.get(T,x),y[0]=T);return y}diag(){let x=Math.min(this.rows,this.columns),S=[];for(let y=0;y<x;y++)S.push(this.get(y,y));return S}norm(x="frobenius"){switch(x){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${x}`)}}cumulativeSum(){let x=0;for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)x+=this.get(S,y),this.set(S,y,x);return this}dot(x){me.isMatrix(x)&&(x=x.to1DArray());let S=this.to1DArray();if(S.length!==x.length)throw new RangeError("vectors do not have the same size");let y=0;for(let T=0;T<S.length;T++)y+=S[T]*x[T];return y}mmul(x){x=pe.checkMatrix(x);let S=this.rows,y=this.columns,T=x.columns,R=new pe(S,T),st=new Float64Array(y);for(let ot=0;ot<T;ot++){for(let ut=0;ut<y;ut++)st[ut]=x.get(ut,ot);for(let ut=0;ut<S;ut++){let ht=0;for(let kt=0;kt<y;kt++)ht+=this.get(ut,kt)*st[kt];R.set(ut,ot,ht)}}return R}mpow(x){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger(x)||x<0)throw new RangeError("Exponent must be a non-negative integer");let S=pe.eye(this.rows),y=this;for(let T=x;T>=1;T/=2)T&1&&(S=S.mmul(y)),y=y.mmul(y);return S}strassen2x2(x){x=pe.checkMatrix(x);let S=new pe(2,2);const y=this.get(0,0),T=x.get(0,0),R=this.get(0,1),st=x.get(0,1),ot=this.get(1,0),ut=x.get(1,0),ht=this.get(1,1),kt=x.get(1,1),Bt=(y+ht)*(T+kt),jt=(ot+ht)*T,ce=y*(st-kt),Kt=ht*(ut-T),$t=(y+R)*kt,Ce=(ot-y)*(T+st),St=(R-ht)*(ut+kt),te=Bt+Kt-$t+St,Ee=ce+$t,He=jt+Kt,je=Bt-jt+ce+Ce;return S.set(0,0,te),S.set(0,1,Ee),S.set(1,0,He),S.set(1,1,je),S}strassen3x3(x){x=pe.checkMatrix(x);let S=new pe(3,3);const y=this.get(0,0),T=this.get(0,1),R=this.get(0,2),st=this.get(1,0),ot=this.get(1,1),ut=this.get(1,2),ht=this.get(2,0),kt=this.get(2,1),Bt=this.get(2,2),jt=x.get(0,0),ce=x.get(0,1),Kt=x.get(0,2),$t=x.get(1,0),Ce=x.get(1,1),St=x.get(1,2),te=x.get(2,0),Ee=x.get(2,1),He=x.get(2,2),je=(y+T+R-st-ot-kt-Bt)*Ce,Wn=(y-st)*(-ce+Ce),Ie=ot*(-jt+ce+$t-Ce-St-te+He),De=(-y+st+ot)*(jt-ce+Ce),on=(st+ot)*(-jt+ce),Lt=y*jt,ee=(-y+ht+kt)*(jt-Kt+St),he=(-y+ht)*(Kt-St),se=(ht+kt)*(-jt+Kt),Jn=(y+T+R-ot-ut-ht-kt)*St,Qn=kt*(-jt+Kt+$t-Ce-St-te+Ee),Zn=(-R+kt+Bt)*(Ce+te-Ee),qn=(R-Bt)*(Ce-Ee),kr=R*te,Tr=(kt+Bt)*(-te+Ee),Dn=(-R+ot+ut)*(St+te-He),Xi=(R-ut)*(St-He),Ji=(ot+ut)*(-te+He),fn=T*$t,wr=ut*Ee,$r=st*Kt,ti=ht*ce,Rn=Bt*He,ks=Lt+kr+fn,Wo=je+De+on+Lt+Zn+kr+Tr,au=Lt+ee+se+Jn+kr+Dn+Ji,co=Wn+Ie+De+Lt+kr+Dn+Xi,uo=Wn+De+on+Lt+wr,_A=kr+Dn+Xi+Ji+$r,su=Lt+ee+he+Qn+Zn+qn+kr,Vl=Zn+qn+kr+Tr+ti,ou=Lt+ee+he+se+Rn;return S.set(0,0,ks),S.set(0,1,Wo),S.set(0,2,au),S.set(1,0,co),S.set(1,1,uo),S.set(1,2,_A),S.set(2,0,su),S.set(2,1,Vl),S.set(2,2,ou),S}mmulStrassen(x){x=pe.checkMatrix(x);let S=this.clone(),y=S.rows,T=S.columns,R=x.rows,st=x.columns;T!==R&&console.warn(`Multiplying ${y} x ${T} and ${R} x ${st} matrix: dimensions do not match.`);function ot(Bt,jt,ce){let Kt=Bt.rows,$t=Bt.columns;if(Kt===jt&&$t===ce)return Bt;{let Ce=me.zeros(jt,ce);return Ce=Ce.setSubMatrix(Bt,0,0),Ce}}let ut=Math.max(y,R),ht=Math.max(T,st);S=ot(S,ut,ht),x=ot(x,ut,ht);function kt(Bt,jt,ce,Kt){if(ce<=512||Kt<=512)return Bt.mmul(jt);ce%2===1&&Kt%2===1?(Bt=ot(Bt,ce+1,Kt+1),jt=ot(jt,ce+1,Kt+1)):ce%2===1?(Bt=ot(Bt,ce+1,Kt),jt=ot(jt,ce+1,Kt)):Kt%2===1&&(Bt=ot(Bt,ce,Kt+1),jt=ot(jt,ce,Kt+1));let $t=parseInt(Bt.rows/2,10),Ce=parseInt(Bt.columns/2,10),St=Bt.subMatrix(0,$t-1,0,Ce-1),te=jt.subMatrix(0,$t-1,0,Ce-1),Ee=Bt.subMatrix(0,$t-1,Ce,Bt.columns-1),He=jt.subMatrix(0,$t-1,Ce,jt.columns-1),je=Bt.subMatrix($t,Bt.rows-1,0,Ce-1),Wn=jt.subMatrix($t,jt.rows-1,0,Ce-1),Ie=Bt.subMatrix($t,Bt.rows-1,Ce,Bt.columns-1),De=jt.subMatrix($t,jt.rows-1,Ce,jt.columns-1),on=kt(me.add(St,Ie),me.add(te,De),$t,Ce),Lt=kt(me.add(je,Ie),te,$t,Ce),ee=kt(St,me.sub(He,De),$t,Ce),he=kt(Ie,me.sub(Wn,te),$t,Ce),se=kt(me.add(St,Ee),De,$t,Ce),Jn=kt(me.sub(je,St),me.add(te,He),$t,Ce),Qn=kt(me.sub(Ee,Ie),me.add(Wn,De),$t,Ce),Zn=me.add(on,he);Zn.sub(se),Zn.add(Qn);let qn=me.add(ee,se),kr=me.add(Lt,he),Tr=me.sub(on,Lt);Tr.add(ee),Tr.add(Jn);let Dn=me.zeros(2*Zn.rows,2*Zn.columns);return Dn=Dn.setSubMatrix(Zn,0,0),Dn=Dn.setSubMatrix(qn,Zn.rows,0),Dn=Dn.setSubMatrix(kr,0,Zn.columns),Dn=Dn.setSubMatrix(Tr,Zn.rows,Zn.columns),Dn.subMatrix(0,ce-1,0,Kt-1)}return kt(S,x,ut,ht)}scaleRows(x={}){if(typeof x!="object")throw new TypeError("options must be an object");const{min:S=0,max:y=1}=x;if(!Number.isFinite(S))throw new TypeError("min must be a number");if(!Number.isFinite(y))throw new TypeError("max must be a number");if(S>=y)throw new RangeError("min must be smaller than max");let T=new pe(this.rows,this.columns);for(let R=0;R<this.rows;R++){const st=this.getRow(R);st.length>0&&ct(st,{min:S,max:y,output:st}),T.setRow(R,st)}return T}scaleColumns(x={}){if(typeof x!="object")throw new TypeError("options must be an object");const{min:S=0,max:y=1}=x;if(!Number.isFinite(S))throw new TypeError("min must be a number");if(!Number.isFinite(y))throw new TypeError("max must be a number");if(S>=y)throw new RangeError("min must be smaller than max");let T=new pe(this.rows,this.columns);for(let R=0;R<this.columns;R++){const st=this.getColumn(R);st.length&&ct(st,{min:S,max:y,output:st}),T.setColumn(R,st)}return T}flipRows(){const x=Math.ceil(this.columns/2);for(let S=0;S<this.rows;S++)for(let y=0;y<x;y++){let T=this.get(S,y),R=this.get(S,this.columns-1-y);this.set(S,y,R),this.set(S,this.columns-1-y,T)}return this}flipColumns(){const x=Math.ceil(this.rows/2);for(let S=0;S<this.columns;S++)for(let y=0;y<x;y++){let T=this.get(y,S),R=this.get(this.rows-1-y,S);this.set(y,S,R),this.set(this.rows-1-y,S,T)}return this}kroneckerProduct(x){x=pe.checkMatrix(x);let S=this.rows,y=this.columns,T=x.rows,R=x.columns,st=new pe(S*T,y*R);for(let ot=0;ot<S;ot++)for(let ut=0;ut<y;ut++)for(let ht=0;ht<T;ht++)for(let kt=0;kt<R;kt++)st.set(T*ot+ht,R*ut+kt,this.get(ot,ut)*x.get(ht,kt));return st}kroneckerSum(x){if(x=pe.checkMatrix(x),!this.isSquare()||!x.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let S=this.rows,y=x.rows,T=this.kroneckerProduct(pe.eye(y,y)),R=pe.eye(S,S).kroneckerProduct(x);return T.add(R)}transpose(){let x=new pe(this.columns,this.rows);for(let S=0;S<this.rows;S++)for(let y=0;y<this.columns;y++)x.set(y,S,this.get(S,y));return x}sortRows(x=We){for(let S=0;S<this.rows;S++)this.setRow(S,this.getRow(S).sort(x));return this}sortColumns(x=We){for(let S=0;S<this.columns;S++)this.setColumn(S,this.getColumn(S).sort(x));return this}subMatrix(x,S,y,T){Ve(this,x,S,y,T);let R=new pe(S-x+1,T-y+1);for(let st=x;st<=S;st++)for(let ot=y;ot<=T;ot++)R.set(st-x,ot-y,this.get(st,ot));return R}subMatrixRow(x,S,y){if(S===void 0&&(S=0),y===void 0&&(y=this.columns-1),S>y||S<0||S>=this.columns||y<0||y>=this.columns)throw new RangeError("Argument out of range");let T=new pe(x.length,y-S+1);for(let R=0;R<x.length;R++)for(let st=S;st<=y;st++){if(x[R]<0||x[R]>=this.rows)throw new RangeError(`Row index out of range: ${x[R]}`);T.set(R,st-S,this.get(x[R],st))}return T}subMatrixColumn(x,S,y){if(S===void 0&&(S=0),y===void 0&&(y=this.rows-1),S>y||S<0||S>=this.rows||y<0||y>=this.rows)throw new RangeError("Argument out of range");let T=new pe(y-S+1,x.length);for(let R=0;R<x.length;R++)for(let st=S;st<=y;st++){if(x[R]<0||x[R]>=this.columns)throw new RangeError(`Column index out of range: ${x[R]}`);T.set(st-S,R,this.get(st,x[R]))}return T}setSubMatrix(x,S,y){if(x=pe.checkMatrix(x),x.isEmpty())return this;let T=S+x.rows-1,R=y+x.columns-1;Ve(this,S,T,y,R);for(let st=0;st<x.rows;st++)for(let ot=0;ot<x.columns;ot++)this.set(S+st,y+ot,x.get(st,ot));return this}selection(x,S){ue(this,x),Me(this,S);let y=new pe(x.length,S.length);for(let T=0;T<x.length;T++){let R=x[T];for(let st=0;st<S.length;st++){let ot=S[st];y.set(T,st,this.get(R,ot))}}return y}trace(){let x=Math.min(this.rows,this.columns),S=0;for(let y=0;y<x;y++)S+=this.get(y,y);return S}clone(){return this.constructor.copy(this,new pe(this.rows,this.columns))}static copy(x,S){for(const[y,T,R]of x.entries())S.set(y,T,R);return S}sum(x){switch(x){case"row":return Vi(this);case"column":return is(this);case void 0:return Ao(this);default:throw new Error(`invalid option: ${x}`)}}product(x){switch(x){case"row":return Ht(this);case"column":return zt(this);case void 0:return Zt(this);default:throw new Error(`invalid option: ${x}`)}}mean(x){const S=this.sum(x);switch(x){case"row":{for(let y=0;y<this.rows;y++)S[y]/=this.columns;return S}case"column":{for(let y=0;y<this.columns;y++)S[y]/=this.rows;return S}case void 0:return S/this.size;default:throw new Error(`invalid option: ${x}`)}}variance(x,S={}){if(typeof x=="object"&&(S=x,x=void 0),typeof S!="object")throw new TypeError("options must be an object");const{unbiased:y=!0,mean:T=this.mean(x)}=S;if(typeof y!="boolean")throw new TypeError("unbiased must be a boolean");switch(x){case"row":{if(!ft.isAnyArray(T))throw new TypeError("mean must be an array");return Et(this,y,T)}case"column":{if(!ft.isAnyArray(T))throw new TypeError("mean must be an array");return It(this,y,T)}case void 0:{if(typeof T!="number")throw new TypeError("mean must be a number");return Ut(this,y,T)}default:throw new Error(`invalid option: ${x}`)}}standardDeviation(x,S){typeof x=="object"&&(S=x,x=void 0);const y=this.variance(x,S);if(x===void 0)return Math.sqrt(y);for(let T=0;T<y.length;T++)y[T]=Math.sqrt(y[T]);return y}center(x,S={}){if(typeof x=="object"&&(S=x,x=void 0),typeof S!="object")throw new TypeError("options must be an object");const{center:y=this.mean(x)}=S;switch(x){case"row":{if(!ft.isAnyArray(y))throw new TypeError("center must be an array");return ne(this,y),this}case"column":{if(!ft.isAnyArray(y))throw new TypeError("center must be an array");return be(this,y),this}case void 0:{if(typeof y!="number")throw new TypeError("center must be a number");return _e(this,y),this}default:throw new Error(`invalid option: ${x}`)}}scale(x,S={}){if(typeof x=="object"&&(S=x,x=void 0),typeof S!="object")throw new TypeError("options must be an object");let y=S.scale;switch(x){case"row":{if(y===void 0)y=Te(this);else if(!ft.isAnyArray(y))throw new TypeError("scale must be an array");return rn(this,y),this}case"column":{if(y===void 0)y=rr(this);else if(!ft.isAnyArray(y))throw new TypeError("scale must be an array");return sr(this,y),this}case void 0:{if(y===void 0)y=Ge(this);else if(typeof y!="number")throw new TypeError("scale must be a number");return Ke(this,y),this}default:throw new Error(`invalid option: ${x}`)}}toString(x){return yt(this,x)}[Symbol.iterator](){return this.entries()}*entries(){for(let x=0;x<this.rows;x++)for(let S=0;S<this.columns;S++)yield[x,S,this.get(x,S)]}*values(){for(let x=0;x<this.rows;x++)for(let S=0;S<this.columns;S++)yield this.get(x,S)}}me.prototype.klass="Matrix",typeof Symbol!="undefined"&&(me.prototype[Symbol.for("nodejs.util.inspect.custom")]=gt);function We(q,x){return q-x}function Gr(q){return q.every(x=>typeof x=="number")}me.random=me.rand,me.randomInt=me.randInt,me.diagonal=me.diag,me.prototype.diagonal=me.prototype.diag,me.identity=me.eye,me.prototype.negate=me.prototype.neg,me.prototype.tensorProduct=me.prototype.kroneckerProduct;const Wi=class X1 extends me{constructor(x,S){if(super(),U(this,Y),N(this,"data"),X1.isMatrix(x))V(this,Y,nt).call(this,x.rows,x.columns),X1.copy(x,this);else if(Number.isInteger(x)&&x>=0)V(this,Y,nt).call(this,x,S);else if(ft.isAnyArray(x)){const y=x;if(x=y.length,S=x?y[0].length:0,typeof S!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let T=0;T<x;T++){if(y[T].length!==S)throw new RangeError("Inconsistent array dimensions");if(!Gr(y[T]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(y[T]))}this.rows=x,this.columns=S}else throw new TypeError("First argument must be a positive number or an array")}set(x,S,y){return this.data[x][S]=y,this}get(x,S){return this.data[x][S]}removeRow(x){return qt(this,x),this.data.splice(x,1),this.rows-=1,this}addRow(x,S){return S===void 0&&(S=x,x=this.rows),qt(this,x,!0),S=Float64Array.from(re(this,S)),this.data.splice(x,0,S),this.rows+=1,this}removeColumn(x){Gt(this,x);for(let S=0;S<this.rows;S++){const y=new Float64Array(this.columns-1);for(let T=0;T<x;T++)y[T]=this.data[S][T];for(let T=x+1;T<this.columns;T++)y[T-1]=this.data[S][T];this.data[S]=y}return this.columns-=1,this}addColumn(x,S){typeof S=="undefined"&&(S=x,x=this.columns),Gt(this,x,!0),S=de(this,S);for(let y=0;y<this.rows;y++){const T=new Float64Array(this.columns+1);let R=0;for(;R<x;R++)T[R]=this.data[y][R];for(T[R++]=S[y];R<this.columns+1;R++)T[R]=this.data[y][R-1];this.data[y]=T}return this.columns+=1,this}};Y=new WeakSet,nt=function(q,x){if(this.data=[],Number.isInteger(x)&&x>=0)for(let S=0;S<q;S++)this.data.push(new Float64Array(x));else throw new TypeError("nColumns must be a positive integer");this.rows=q,this.columns=x};let pe=Wi;Nt(me,pe);const Ga=class J1 extends me{constructor(x){if(super(),U(this,rt),pe.isMatrix(x)){if(!x.isSymmetric())throw new TypeError("not symmetric data");Z(this,rt,pe.copy(x,new pe(x.rows,x.rows)))}else if(Number.isInteger(x)&&x>=0)Z(this,rt,new pe(x,x));else if(Z(this,rt,new pe(x)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return k(this,rt).size}get rows(){return k(this,rt).rows}get columns(){return k(this,rt).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(x){return pe.isMatrix(x)&&x.klassType==="SymmetricMatrix"}static zeros(x){return new this(x)}static ones(x){return new this(x).fill(1)}clone(){const x=new J1(this.diagonalSize);for(const[S,y,T]of this.upperRightEntries())x.set(S,y,T);return x}toMatrix(){return new pe(this)}get(x,S){return k(this,rt).get(x,S)}set(x,S,y){return k(this,rt).set(x,S,y),k(this,rt).set(S,x,y),this}removeCross(x){return k(this,rt).removeRow(x),k(this,rt).removeColumn(x),this}addCross(x,S){S===void 0&&(S=x,x=this.diagonalSize);const y=S.slice();return y.splice(x,1),k(this,rt).addRow(x,y),k(this,rt).addColumn(x,S),this}applyMask(x){if(x.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const S=[];for(const[y,T]of x.entries())T||S.push(y);S.reverse();for(const y of S)this.removeCross(y);return this}toCompact(){const{diagonalSize:x}=this,S=new Array(x*(x+1)/2);for(let y=0,T=0,R=0;R<S.length;R++)S[R]=this.get(T,y),++y>=x&&(y=++T);return S}static fromCompact(x){const S=x.length,y=(Math.sqrt(8*S+1)-1)/2;if(!Number.isInteger(y))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(x)}`);const T=new J1(y);for(let R=0,st=0,ot=0;ot<S;ot++)T.set(R,st,x[ot]),++R>=y&&(R=++st);return T}*upperRightEntries(){for(let x=0,S=0;x<this.diagonalSize;void 0){const y=this.get(x,S);yield[x,S,y],++S>=this.diagonalSize&&(S=++x)}}*upperRightValues(){for(let x=0,S=0;x<this.diagonalSize;void 0)yield this.get(x,S),++S>=this.diagonalSize&&(S=++x)}};rt=new WeakMap;let Nr=Ga;Nr.prototype.klassType="SymmetricMatrix";class Mr extends Nr{static isDistanceMatrix(x){return Nr.isSymmetricMatrix(x)&&x.klassSubType==="DistanceMatrix"}constructor(x){if(super(x),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(x,S,y){return x===S&&(y=0),super.set(x,S,y)}addCross(x,S){return S===void 0&&(S=x,x=this.diagonalSize),S=S.slice(),S[x]=0,super.addCross(x,S)}toSymmetricMatrix(){return new Nr(this)}clone(){const x=new Mr(this.diagonalSize);for(const[S,y,T]of this.upperRightEntries())S!==y&&x.set(S,y,T);return x}toCompact(){const{diagonalSize:x}=this,S=(x-1)*x/2,y=new Array(S);for(let T=1,R=0,st=0;st<y.length;st++)y[st]=this.get(R,T),++T>=x&&(T=++R+1);return y}static fromCompact(x){const S=x.length;if(S===0)return new this(0);const y=(Math.sqrt(8*S+1)+1)/2;if(!Number.isInteger(y))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(x)}`);const T=new this(y);for(let R=1,st=0,ot=0;ot<S;ot++)T.set(R,st,x[ot]),++R>=y&&(R=++st+1);return T}}Mr.prototype.klassSubType="DistanceMatrix";class di extends me{constructor(x,S,y){super(),this.matrix=x,this.rows=S,this.columns=y}}class as extends di{constructor(x,S){Gt(x,S),super(x,x.rows,1),this.column=S}set(x,S,y){return this.matrix.set(x,this.column,y),this}get(x){return this.matrix.get(x,this.column)}}class Zi extends di{constructor(x,S){Me(x,S),super(x,x.rows,S.length),this.columnIndices=S}set(x,S,y){return this.matrix.set(x,this.columnIndices[S],y),this}get(x,S){return this.matrix.get(x,this.columnIndices[S])}}class ss extends di{constructor(x){super(x,x.rows,x.columns)}set(x,S,y){return this.matrix.set(x,this.columns-S-1,y),this}get(x,S){return this.matrix.get(x,this.columns-S-1)}}class Ii extends di{constructor(x){super(x,x.rows,x.columns)}set(x,S,y){return this.matrix.set(this.rows-x-1,S,y),this}get(x,S){return this.matrix.get(this.rows-x-1,S)}}class Jr extends di{constructor(x,S){qt(x,S),super(x,1,x.columns),this.row=S}set(x,S,y){return this.matrix.set(this.row,S,y),this}get(x,S){return this.matrix.get(this.row,S)}}class ma extends di{constructor(x,S){ue(x,S),super(x,S.length,x.columns),this.rowIndices=S}set(x,S,y){return this.matrix.set(this.rowIndices[x],S,y),this}get(x,S){return this.matrix.get(this.rowIndices[x],S)}}class ya extends di{constructor(x,S,y){ue(x,S),Me(x,y),super(x,S.length,y.length),this.rowIndices=S,this.columnIndices=y}set(x,S,y){return this.matrix.set(this.rowIndices[x],this.columnIndices[S],y),this}get(x,S){return this.matrix.get(this.rowIndices[x],this.columnIndices[S])}}class aa extends di{constructor(x,S,y,T,R){Ve(x,S,y,T,R),super(x,y-S+1,R-T+1),this.startRow=S,this.startColumn=T}set(x,S,y){return this.matrix.set(this.startRow+x,this.startColumn+S,y),this}get(x,S){return this.matrix.get(this.startRow+x,this.startColumn+S)}}class wa extends di{constructor(x){super(x,x.columns,x.rows)}set(x,S,y){return this.matrix.set(S,x,y),this}get(x,S){return this.matrix.get(S,x)}}class qr extends me{constructor(x,S={}){const{rows:y=1}=S;if(x.length%y!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=y,this.columns=x.length/y,this.data=x}set(x,S,y){let T=this._calculateIndex(x,S);return this.data[T]=y,this}get(x,S){let y=this._calculateIndex(x,S);return this.data[y]}_calculateIndex(x,S){return x*this.columns+S}}class or extends me{constructor(x){super(),this.data=x,this.rows=x.length,this.columns=x[0].length}set(x,S,y){return this.data[x][S]=y,this}get(x,S){return this.data[x][S]}}function Ko(q,x){if(ft.isAnyArray(q))return q[0]&&ft.isAnyArray(q[0])?new or(q):new qr(q,x);throw new Error("the argument is not an array")}class ji{constructor(x){x=or.checkMatrix(x);let S=x.clone(),y=S.rows,T=S.columns,R=new Float64Array(y),st=1,ot,ut,ht,kt,Bt,jt,ce,Kt,$t;for(ot=0;ot<y;ot++)R[ot]=ot;for(Kt=new Float64Array(y),ut=0;ut<T;ut++){for(ot=0;ot<y;ot++)Kt[ot]=S.get(ot,ut);for(ot=0;ot<y;ot++){for($t=Math.min(ot,ut),Bt=0,ht=0;ht<$t;ht++)Bt+=S.get(ot,ht)*Kt[ht];Kt[ot]-=Bt,S.set(ot,ut,Kt[ot])}for(kt=ut,ot=ut+1;ot<y;ot++)Math.abs(Kt[ot])>Math.abs(Kt[kt])&&(kt=ot);if(kt!==ut){for(ht=0;ht<T;ht++)jt=S.get(kt,ht),S.set(kt,ht,S.get(ut,ht)),S.set(ut,ht,jt);ce=R[kt],R[kt]=R[ut],R[ut]=ce,st=-st}if(ut<y&&S.get(ut,ut)!==0)for(ot=ut+1;ot<y;ot++)S.set(ot,ut,S.get(ot,ut)/S.get(ut,ut))}this.LU=S,this.pivotVector=R,this.pivotSign=st}isSingular(){let x=this.LU,S=x.columns;for(let y=0;y<S;y++)if(x.get(y,y)===0)return!0;return!1}solve(x){x=pe.checkMatrix(x);let S=this.LU;if(S.rows!==x.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let T=x.columns,R=x.subMatrixRow(this.pivotVector,0,T-1),st=S.columns,ot,ut,ht;for(ht=0;ht<st;ht++)for(ot=ht+1;ot<st;ot++)for(ut=0;ut<T;ut++)R.set(ot,ut,R.get(ot,ut)-R.get(ht,ut)*S.get(ot,ht));for(ht=st-1;ht>=0;ht--){for(ut=0;ut<T;ut++)R.set(ht,ut,R.get(ht,ut)/S.get(ht,ht));for(ot=0;ot<ht;ot++)for(ut=0;ut<T;ut++)R.set(ot,ut,R.get(ot,ut)-R.get(ht,ut)*S.get(ot,ht))}return R}get determinant(){let x=this.LU;if(!x.isSquare())throw new Error("Matrix must be square");let S=this.pivotSign,y=x.columns;for(let T=0;T<y;T++)S*=x.get(T,T);return S}get lowerTriangularMatrix(){let x=this.LU,S=x.rows,y=x.columns,T=new pe(S,y);for(let R=0;R<S;R++)for(let st=0;st<y;st++)R>st?T.set(R,st,x.get(R,st)):R===st?T.set(R,st,1):T.set(R,st,0);return T}get upperTriangularMatrix(){let x=this.LU,S=x.rows,y=x.columns,T=new pe(S,y);for(let R=0;R<S;R++)for(let st=0;st<y;st++)R<=st?T.set(R,st,x.get(R,st)):T.set(R,st,0);return T}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function Yi(q,x){let S=0;return Math.abs(q)>Math.abs(x)?(S=x/q,Math.abs(q)*Math.sqrt(1+S*S)):x!==0?(S=q/x,Math.abs(x)*Math.sqrt(1+S*S)):0}class lo{constructor(x){x=or.checkMatrix(x);let S=x.clone(),y=x.rows,T=x.columns,R=new Float64Array(T),st,ot,ut,ht;for(ut=0;ut<T;ut++){let kt=0;for(st=ut;st<y;st++)kt=Yi(kt,S.get(st,ut));if(kt!==0){for(S.get(ut,ut)<0&&(kt=-kt),st=ut;st<y;st++)S.set(st,ut,S.get(st,ut)/kt);for(S.set(ut,ut,S.get(ut,ut)+1),ot=ut+1;ot<T;ot++){for(ht=0,st=ut;st<y;st++)ht+=S.get(st,ut)*S.get(st,ot);for(ht=-ht/S.get(ut,ut),st=ut;st<y;st++)S.set(st,ot,S.get(st,ot)+ht*S.get(st,ut))}}R[ut]=-kt}this.QR=S,this.Rdiag=R}solve(x){x=pe.checkMatrix(x);let S=this.QR,y=S.rows;if(x.rows!==y)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let T=x.columns,R=x.clone(),st=S.columns,ot,ut,ht,kt;for(ht=0;ht<st;ht++)for(ut=0;ut<T;ut++){for(kt=0,ot=ht;ot<y;ot++)kt+=S.get(ot,ht)*R.get(ot,ut);for(kt=-kt/S.get(ht,ht),ot=ht;ot<y;ot++)R.set(ot,ut,R.get(ot,ut)+kt*S.get(ot,ht))}for(ht=st-1;ht>=0;ht--){for(ut=0;ut<T;ut++)R.set(ht,ut,R.get(ht,ut)/this.Rdiag[ht]);for(ot=0;ot<ht;ot++)for(ut=0;ut<T;ut++)R.set(ot,ut,R.get(ot,ut)-R.get(ht,ut)*S.get(ot,ht))}return R.subMatrix(0,st-1,0,T-1)}isFullRank(){let x=this.QR.columns;for(let S=0;S<x;S++)if(this.Rdiag[S]===0)return!1;return!0}get upperTriangularMatrix(){let x=this.QR,S=x.columns,y=new pe(S,S),T,R;for(T=0;T<S;T++)for(R=0;R<S;R++)T<R?y.set(T,R,x.get(T,R)):T===R?y.set(T,R,this.Rdiag[T]):y.set(T,R,0);return y}get orthogonalMatrix(){let x=this.QR,S=x.rows,y=x.columns,T=new pe(S,y),R,st,ot,ut;for(ot=y-1;ot>=0;ot--){for(R=0;R<S;R++)T.set(R,ot,0);for(T.set(ot,ot,1),st=ot;st<y;st++)if(x.get(ot,ot)!==0){for(ut=0,R=ot;R<S;R++)ut+=x.get(R,ot)*T.get(R,st);for(ut=-ut/x.get(ot,ot),R=ot;R<S;R++)T.set(R,st,T.get(R,st)+ut*x.get(R,ot))}}return T}}class Ka{constructor(x,S={}){if(x=or.checkMatrix(x),x.isEmpty())throw new Error("Matrix must be non-empty");let y=x.rows,T=x.columns;const{computeLeftSingularVectors:R=!0,computeRightSingularVectors:st=!0,autoTranspose:ot=!1}=S;let ut=!!R,ht=!!st,kt=!1,Bt;if(y<T)if(!ot)Bt=x.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{Bt=x.transpose(),y=Bt.rows,T=Bt.columns,kt=!0;let Lt=ut;ut=ht,ht=Lt}else Bt=x.clone();let jt=Math.min(y,T),ce=Math.min(y+1,T),Kt=new Float64Array(ce),$t=new pe(y,jt),Ce=new pe(T,T),St=new Float64Array(T),te=new Float64Array(y),Ee=new Float64Array(ce);for(let Lt=0;Lt<ce;Lt++)Ee[Lt]=Lt;let He=Math.min(y-1,T),je=Math.max(0,Math.min(T-2,y)),Wn=Math.max(He,je);for(let Lt=0;Lt<Wn;Lt++){if(Lt<He){Kt[Lt]=0;for(let ee=Lt;ee<y;ee++)Kt[Lt]=Yi(Kt[Lt],Bt.get(ee,Lt));if(Kt[Lt]!==0){Bt.get(Lt,Lt)<0&&(Kt[Lt]=-Kt[Lt]);for(let ee=Lt;ee<y;ee++)Bt.set(ee,Lt,Bt.get(ee,Lt)/Kt[Lt]);Bt.set(Lt,Lt,Bt.get(Lt,Lt)+1)}Kt[Lt]=-Kt[Lt]}for(let ee=Lt+1;ee<T;ee++){if(Lt<He&&Kt[Lt]!==0){let he=0;for(let se=Lt;se<y;se++)he+=Bt.get(se,Lt)*Bt.get(se,ee);he=-he/Bt.get(Lt,Lt);for(let se=Lt;se<y;se++)Bt.set(se,ee,Bt.get(se,ee)+he*Bt.get(se,Lt))}St[ee]=Bt.get(Lt,ee)}if(ut&&Lt<He)for(let ee=Lt;ee<y;ee++)$t.set(ee,Lt,Bt.get(ee,Lt));if(Lt<je){St[Lt]=0;for(let ee=Lt+1;ee<T;ee++)St[Lt]=Yi(St[Lt],St[ee]);if(St[Lt]!==0){St[Lt+1]<0&&(St[Lt]=0-St[Lt]);for(let ee=Lt+1;ee<T;ee++)St[ee]/=St[Lt];St[Lt+1]+=1}if(St[Lt]=-St[Lt],Lt+1<y&&St[Lt]!==0){for(let ee=Lt+1;ee<y;ee++)te[ee]=0;for(let ee=Lt+1;ee<y;ee++)for(let he=Lt+1;he<T;he++)te[ee]+=St[he]*Bt.get(ee,he);for(let ee=Lt+1;ee<T;ee++){let he=-St[ee]/St[Lt+1];for(let se=Lt+1;se<y;se++)Bt.set(se,ee,Bt.get(se,ee)+he*te[se])}}if(ht)for(let ee=Lt+1;ee<T;ee++)Ce.set(ee,Lt,St[ee])}}let Ie=Math.min(T,y+1);if(He<T&&(Kt[He]=Bt.get(He,He)),y<Ie&&(Kt[Ie-1]=0),je+1<Ie&&(St[je]=Bt.get(je,Ie-1)),St[Ie-1]=0,ut){for(let Lt=He;Lt<jt;Lt++){for(let ee=0;ee<y;ee++)$t.set(ee,Lt,0);$t.set(Lt,Lt,1)}for(let Lt=He-1;Lt>=0;Lt--)if(Kt[Lt]!==0){for(let ee=Lt+1;ee<jt;ee++){let he=0;for(let se=Lt;se<y;se++)he+=$t.get(se,Lt)*$t.get(se,ee);he=-he/$t.get(Lt,Lt);for(let se=Lt;se<y;se++)$t.set(se,ee,$t.get(se,ee)+he*$t.get(se,Lt))}for(let ee=Lt;ee<y;ee++)$t.set(ee,Lt,-$t.get(ee,Lt));$t.set(Lt,Lt,1+$t.get(Lt,Lt));for(let ee=0;ee<Lt-1;ee++)$t.set(ee,Lt,0)}else{for(let ee=0;ee<y;ee++)$t.set(ee,Lt,0);$t.set(Lt,Lt,1)}}if(ht)for(let Lt=T-1;Lt>=0;Lt--){if(Lt<je&&St[Lt]!==0)for(let ee=Lt+1;ee<T;ee++){let he=0;for(let se=Lt+1;se<T;se++)he+=Ce.get(se,Lt)*Ce.get(se,ee);he=-he/Ce.get(Lt+1,Lt);for(let se=Lt+1;se<T;se++)Ce.set(se,ee,Ce.get(se,ee)+he*Ce.get(se,Lt))}for(let ee=0;ee<T;ee++)Ce.set(ee,Lt,0);Ce.set(Lt,Lt,1)}let De=Ie-1,on=Number.EPSILON;for(;Ie>0;){let Lt,ee;for(Lt=Ie-2;Lt>=-1&&Lt!==-1;Lt--){const he=Number.MIN_VALUE+on*Math.abs(Kt[Lt]+Math.abs(Kt[Lt+1]));if(Math.abs(St[Lt])<=he||Number.isNaN(St[Lt])){St[Lt]=0;break}}if(Lt===Ie-2)ee=4;else{let he;for(he=Ie-1;he>=Lt&&he!==Lt;he--){let se=(he!==Ie?Math.abs(St[he]):0)+(he!==Lt+1?Math.abs(St[he-1]):0);if(Math.abs(Kt[he])<=on*se){Kt[he]=0;break}}he===Lt?ee=3:he===Ie-1?ee=1:(ee=2,Lt=he)}switch(Lt++,ee){case 1:{let he=St[Ie-2];St[Ie-2]=0;for(let se=Ie-2;se>=Lt;se--){let Jn=Yi(Kt[se],he),Qn=Kt[se]/Jn,Zn=he/Jn;if(Kt[se]=Jn,se!==Lt&&(he=-Zn*St[se-1],St[se-1]=Qn*St[se-1]),ht)for(let qn=0;qn<T;qn++)Jn=Qn*Ce.get(qn,se)+Zn*Ce.get(qn,Ie-1),Ce.set(qn,Ie-1,-Zn*Ce.get(qn,se)+Qn*Ce.get(qn,Ie-1)),Ce.set(qn,se,Jn)}break}case 2:{let he=St[Lt-1];St[Lt-1]=0;for(let se=Lt;se<Ie;se++){let Jn=Yi(Kt[se],he),Qn=Kt[se]/Jn,Zn=he/Jn;if(Kt[se]=Jn,he=-Zn*St[se],St[se]=Qn*St[se],ut)for(let qn=0;qn<y;qn++)Jn=Qn*$t.get(qn,se)+Zn*$t.get(qn,Lt-1),$t.set(qn,Lt-1,-Zn*$t.get(qn,se)+Qn*$t.get(qn,Lt-1)),$t.set(qn,se,Jn)}break}case 3:{const he=Math.max(Math.abs(Kt[Ie-1]),Math.abs(Kt[Ie-2]),Math.abs(St[Ie-2]),Math.abs(Kt[Lt]),Math.abs(St[Lt])),se=Kt[Ie-1]/he,Jn=Kt[Ie-2]/he,Qn=St[Ie-2]/he,Zn=Kt[Lt]/he,qn=St[Lt]/he,kr=((Jn+se)*(Jn-se)+Qn*Qn)/2,Tr=se*Qn*(se*Qn);let Dn=0;(kr!==0||Tr!==0)&&(kr<0?Dn=0-Math.sqrt(kr*kr+Tr):Dn=Math.sqrt(kr*kr+Tr),Dn=Tr/(kr+Dn));let Xi=(Zn+se)*(Zn-se)+Dn,Ji=Zn*qn;for(let fn=Lt;fn<Ie-1;fn++){let wr=Yi(Xi,Ji);wr===0&&(wr=Number.MIN_VALUE);let $r=Xi/wr,ti=Ji/wr;if(fn!==Lt&&(St[fn-1]=wr),Xi=$r*Kt[fn]+ti*St[fn],St[fn]=$r*St[fn]-ti*Kt[fn],Ji=ti*Kt[fn+1],Kt[fn+1]=$r*Kt[fn+1],ht)for(let Rn=0;Rn<T;Rn++)wr=$r*Ce.get(Rn,fn)+ti*Ce.get(Rn,fn+1),Ce.set(Rn,fn+1,-ti*Ce.get(Rn,fn)+$r*Ce.get(Rn,fn+1)),Ce.set(Rn,fn,wr);if(wr=Yi(Xi,Ji),wr===0&&(wr=Number.MIN_VALUE),$r=Xi/wr,ti=Ji/wr,Kt[fn]=wr,Xi=$r*St[fn]+ti*Kt[fn+1],Kt[fn+1]=-ti*St[fn]+$r*Kt[fn+1],Ji=ti*St[fn+1],St[fn+1]=$r*St[fn+1],ut&&fn<y-1)for(let Rn=0;Rn<y;Rn++)wr=$r*$t.get(Rn,fn)+ti*$t.get(Rn,fn+1),$t.set(Rn,fn+1,-ti*$t.get(Rn,fn)+$r*$t.get(Rn,fn+1)),$t.set(Rn,fn,wr)}St[Ie-2]=Xi;break}case 4:{if(Kt[Lt]<=0&&(Kt[Lt]=Kt[Lt]<0?-Kt[Lt]:0,ht))for(let he=0;he<=De;he++)Ce.set(he,Lt,-Ce.get(he,Lt));for(;Lt<De&&!(Kt[Lt]>=Kt[Lt+1]);){let he=Kt[Lt];if(Kt[Lt]=Kt[Lt+1],Kt[Lt+1]=he,ht&&Lt<T-1)for(let se=0;se<T;se++)he=Ce.get(se,Lt+1),Ce.set(se,Lt+1,Ce.get(se,Lt)),Ce.set(se,Lt,he);if(ut&&Lt<y-1)for(let se=0;se<y;se++)he=$t.get(se,Lt+1),$t.set(se,Lt+1,$t.get(se,Lt)),$t.set(se,Lt,he);Lt++}Ie--;break}}}if(kt){let Lt=Ce;Ce=$t,$t=Lt}this.m=y,this.n=T,this.s=Kt,this.U=$t,this.V=Ce}solve(x){let S=x,y=this.threshold,T=this.s.length,R=pe.zeros(T,T);for(let jt=0;jt<T;jt++)Math.abs(this.s[jt])<=y?R.set(jt,jt,0):R.set(jt,jt,1/this.s[jt]);let st=this.U,ot=this.rightSingularVectors,ut=ot.mmul(R),ht=ot.rows,kt=st.rows,Bt=pe.zeros(ht,kt);for(let jt=0;jt<ht;jt++)for(let ce=0;ce<kt;ce++){let Kt=0;for(let $t=0;$t<T;$t++)Kt+=ut.get(jt,$t)*st.get(ce,$t);Bt.set(jt,ce,Kt)}return Bt.mmul(S)}solveForDiagonal(x){return this.solve(pe.diag(x))}inverse(){let x=this.V,S=this.threshold,y=x.rows,T=x.columns,R=new pe(y,this.s.length);for(let kt=0;kt<y;kt++)for(let Bt=0;Bt<T;Bt++)Math.abs(this.s[Bt])>S&&R.set(kt,Bt,x.get(kt,Bt)/this.s[Bt]);let st=this.U,ot=st.rows,ut=st.columns,ht=new pe(y,ot);for(let kt=0;kt<y;kt++)for(let Bt=0;Bt<ot;Bt++){let jt=0;for(let ce=0;ce<ut;ce++)jt+=R.get(kt,ce)*st.get(Bt,ce);ht.set(kt,Bt,jt)}return ht}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let x=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,S=0,y=this.s;for(let T=0,R=y.length;T<R;T++)y[T]>x&&S++;return S}get diagonal(){return Array.from(this.s)}get threshold(){return Number.EPSILON/2*Math.max(this.m,this.n)*this.s[0]}get leftSingularVectors(){return this.U}get rightSingularVectors(){return this.V}get diagonalMatrix(){return pe.diag(this.s)}}function zo(q,x=!1){return q=or.checkMatrix(q),x?new Ka(q).inverse():UA(q,pe.eye(q.rows))}function UA(q,x,S=!1){return q=or.checkMatrix(q),x=or.checkMatrix(x),S?new Ka(q).solve(x):q.isSquare()?new ji(q).solve(x):new lo(q).solve(x)}function Ns(q){if(q=pe.checkMatrix(q),q.isSquare()){if(q.columns===0)return 1;let x,S,y,T;if(q.columns===2)return x=q.get(0,0),S=q.get(0,1),y=q.get(1,0),T=q.get(1,1),x*T-S*y;if(q.columns===3){let R,st,ot;return R=new ya(q,[1,2],[1,2]),st=new ya(q,[1,2],[0,2]),ot=new ya(q,[1,2],[0,1]),x=q.get(0,0),S=q.get(0,1),y=q.get(0,2),x*Ns(R)-S*Ns(st)+y*Ns(ot)}else return new ji(q).determinant}else throw Error("determinant can only be calculated for a square matrix")}function PA(q,x){let S=[];for(let y=0;y<q;y++)y!==x&&S.push(y);return S}function _l(q,x,S,y=1e-9,T=1e-9){if(q>T)return new Array(x.rows+1).fill(0);{let R=x.addRow(S,[0]);for(let st=0;st<R.rows;st++)Math.abs(R.get(st,0))<y&&R.set(st,0,0);return R.to1DArray()}}function iu(q,x={}){const{thresholdValue:S=1e-9,thresholdError:y=1e-9}=x;q=pe.checkMatrix(q);let T=q.rows,R=new pe(T,T);for(let st=0;st<T;st++){let ot=pe.columnVector(q.getRow(st)),ut=q.subMatrixRow(PA(T,st)).transpose(),kt=new Ka(ut).solve(ot),Bt=pe.sub(ot,ut.mmul(kt)).abs().max();R.setRow(st,_l(Bt,kt,st,S,y))}return R}function Vh(q,x=Number.EPSILON){if(q=pe.checkMatrix(q),q.isEmpty())return q.transpose();let S=new Ka(q,{autoTranspose:!0}),y=S.leftSingularVectors,T=S.rightSingularVectors,R=S.diagonal;for(let st=0;st<R.length;st++)Math.abs(R[st])>x?R[st]=1/R[st]:R[st]=0;return T.mmul(pe.diag(R).mmul(y.transpose()))}function Wh(q,x=q,S={}){q=new pe(q);let y=!1;if(typeof x=="object"&&!pe.isMatrix(x)&&!ft.isAnyArray(x)?(S=x,x=q,y=!0):x=new pe(x),q.rows!==x.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:T=!0}=S;T&&(q=q.center("column"),y||(x=x.center("column")));const R=q.transpose().mmul(x);for(let st=0;st<R.rows;st++)for(let ot=0;ot<R.columns;ot++)R.set(st,ot,R.get(st,ot)*(1/(q.rows-1)));return R}function Hl(q,x=q,S={}){q=new pe(q);let y=!1;if(typeof x=="object"&&!pe.isMatrix(x)&&!ft.isAnyArray(x)?(S=x,x=q,y=!0):x=new pe(x),q.rows!==x.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:T=!0,scale:R=!0}=S;T&&(q.center("column"),y||x.center("column")),R&&(q.scale("column"),y||x.scale("column"));const st=q.standardDeviation("column",{unbiased:!0}),ot=y?st:x.standardDeviation("column",{unbiased:!0}),ut=q.transpose().mmul(x);for(let ht=0;ht<ut.rows;ht++)for(let kt=0;kt<ut.columns;kt++)ut.set(ht,kt,ut.get(ht,kt)*(1/(st[ht]*ot[kt]))*(1/(q.rows-1)));return ut}class pn{constructor(x,S={}){const{assumeSymmetric:y=!1}=S;if(x=or.checkMatrix(x),!x.isSquare())throw new Error("Matrix is not a square matrix");if(x.isEmpty())throw new Error("Matrix must be non-empty");let T=x.columns,R=new pe(T,T),st=new Float64Array(T),ot=new Float64Array(T),ut=x,ht,kt,Bt=!1;if(y?Bt=!0:Bt=x.isSymmetric(),Bt){for(ht=0;ht<T;ht++)for(kt=0;kt<T;kt++)R.set(ht,kt,ut.get(ht,kt));DA(T,ot,st,R),Gl(T,ot,st,R)}else{let jt=new pe(T,T),ce=new Float64Array(T);for(kt=0;kt<T;kt++)for(ht=0;ht<T;ht++)jt.set(ht,kt,ut.get(ht,kt));Ea(T,jt,ce,R),RA(T,ot,st,R,jt)}this.n=T,this.e=ot,this.d=st,this.V=R}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let x=this.n,S=this.e,y=this.d,T=new pe(x,x),R,st;for(R=0;R<x;R++){for(st=0;st<x;st++)T.set(R,st,0);T.set(R,R,y[R]),S[R]>0?T.set(R,R+1,S[R]):S[R]<0&&T.set(R,R-1,S[R])}return T}}function DA(q,x,S,y){let T,R,st,ot,ut,ht,kt,Bt;for(ut=0;ut<q;ut++)S[ut]=y.get(q-1,ut);for(ot=q-1;ot>0;ot--){for(Bt=0,st=0,ht=0;ht<ot;ht++)Bt=Bt+Math.abs(S[ht]);if(Bt===0)for(x[ot]=S[ot-1],ut=0;ut<ot;ut++)S[ut]=y.get(ot-1,ut),y.set(ot,ut,0),y.set(ut,ot,0);else{for(ht=0;ht<ot;ht++)S[ht]/=Bt,st+=S[ht]*S[ht];for(T=S[ot-1],R=Math.sqrt(st),T>0&&(R=-R),x[ot]=Bt*R,st=st-T*R,S[ot-1]=T-R,ut=0;ut<ot;ut++)x[ut]=0;for(ut=0;ut<ot;ut++){for(T=S[ut],y.set(ut,ot,T),R=x[ut]+y.get(ut,ut)*T,ht=ut+1;ht<=ot-1;ht++)R+=y.get(ht,ut)*S[ht],x[ht]+=y.get(ht,ut)*T;x[ut]=R}for(T=0,ut=0;ut<ot;ut++)x[ut]/=st,T+=x[ut]*S[ut];for(kt=T/(st+st),ut=0;ut<ot;ut++)x[ut]-=kt*S[ut];for(ut=0;ut<ot;ut++){for(T=S[ut],R=x[ut],ht=ut;ht<=ot-1;ht++)y.set(ht,ut,y.get(ht,ut)-(T*x[ht]+R*S[ht]));S[ut]=y.get(ot-1,ut),y.set(ot,ut,0)}}S[ot]=st}for(ot=0;ot<q-1;ot++){if(y.set(q-1,ot,y.get(ot,ot)),y.set(ot,ot,1),st=S[ot+1],st!==0){for(ht=0;ht<=ot;ht++)S[ht]=y.get(ht,ot+1)/st;for(ut=0;ut<=ot;ut++){for(R=0,ht=0;ht<=ot;ht++)R+=y.get(ht,ot+1)*y.get(ht,ut);for(ht=0;ht<=ot;ht++)y.set(ht,ut,y.get(ht,ut)-R*S[ht])}}for(ht=0;ht<=ot;ht++)y.set(ht,ot+1,0)}for(ut=0;ut<q;ut++)S[ut]=y.get(q-1,ut),y.set(q-1,ut,0);y.set(q-1,q-1,1),x[0]=0}function Gl(q,x,S,y){let T,R,st,ot,ut,ht,kt,Bt,jt,ce,Kt,$t,Ce,St,te,Ee;for(st=1;st<q;st++)x[st-1]=x[st];x[q-1]=0;let He=0,je=0,Wn=Number.EPSILON;for(ht=0;ht<q;ht++){for(je=Math.max(je,Math.abs(S[ht])+Math.abs(x[ht])),kt=ht;kt<q&&!(Math.abs(x[kt])<=Wn*je);)kt++;if(kt>ht)do{for(T=S[ht],Bt=(S[ht+1]-T)/(2*x[ht]),jt=Yi(Bt,1),Bt<0&&(jt=-jt),S[ht]=x[ht]/(Bt+jt),S[ht+1]=x[ht]*(Bt+jt),ce=S[ht+1],R=T-S[ht],st=ht+2;st<q;st++)S[st]-=R;for(He=He+R,Bt=S[kt],Kt=1,$t=Kt,Ce=Kt,St=x[ht+1],te=0,Ee=0,st=kt-1;st>=ht;st--)for(Ce=$t,$t=Kt,Ee=te,T=Kt*x[st],R=Kt*Bt,jt=Yi(Bt,x[st]),x[st+1]=te*jt,te=x[st]/jt,Kt=Bt/jt,Bt=Kt*S[st]-te*T,S[st+1]=R+te*(Kt*T+te*S[st]),ut=0;ut<q;ut++)R=y.get(ut,st+1),y.set(ut,st+1,te*y.get(ut,st)+Kt*R),y.set(ut,st,Kt*y.get(ut,st)-te*R);Bt=-te*Ee*Ce*St*x[ht]/ce,x[ht]=te*Bt,S[ht]=Kt*Bt}while(Math.abs(x[ht])>Wn*je);S[ht]=S[ht]+He,x[ht]=0}for(st=0;st<q-1;st++){for(ut=st,Bt=S[st],ot=st+1;ot<q;ot++)S[ot]<Bt&&(ut=ot,Bt=S[ot]);if(ut!==st)for(S[ut]=S[st],S[st]=Bt,ot=0;ot<q;ot++)Bt=y.get(ot,st),y.set(ot,st,y.get(ot,ut)),y.set(ot,ut,Bt)}}function Ea(q,x,S,y){let T=0,R=q-1,st,ot,ut,ht,kt,Bt,jt;for(Bt=T+1;Bt<=R-1;Bt++){for(jt=0,ht=Bt;ht<=R;ht++)jt=jt+Math.abs(x.get(ht,Bt-1));if(jt!==0){for(ut=0,ht=R;ht>=Bt;ht--)S[ht]=x.get(ht,Bt-1)/jt,ut+=S[ht]*S[ht];for(ot=Math.sqrt(ut),S[Bt]>0&&(ot=-ot),ut=ut-S[Bt]*ot,S[Bt]=S[Bt]-ot,kt=Bt;kt<q;kt++){for(st=0,ht=R;ht>=Bt;ht--)st+=S[ht]*x.get(ht,kt);for(st=st/ut,ht=Bt;ht<=R;ht++)x.set(ht,kt,x.get(ht,kt)-st*S[ht])}for(ht=0;ht<=R;ht++){for(st=0,kt=R;kt>=Bt;kt--)st+=S[kt]*x.get(ht,kt);for(st=st/ut,kt=Bt;kt<=R;kt++)x.set(ht,kt,x.get(ht,kt)-st*S[kt])}S[Bt]=jt*S[Bt],x.set(Bt,Bt-1,jt*ot)}}for(ht=0;ht<q;ht++)for(kt=0;kt<q;kt++)y.set(ht,kt,ht===kt?1:0);for(Bt=R-1;Bt>=T+1;Bt--)if(x.get(Bt,Bt-1)!==0){for(ht=Bt+1;ht<=R;ht++)S[ht]=x.get(ht,Bt-1);for(kt=Bt;kt<=R;kt++){for(ot=0,ht=Bt;ht<=R;ht++)ot+=S[ht]*y.get(ht,kt);for(ot=ot/S[Bt]/x.get(Bt,Bt-1),ht=Bt;ht<=R;ht++)y.set(ht,kt,y.get(ht,kt)+ot*S[ht])}}}function RA(q,x,S,y,T){let R=q-1,st=0,ot=q-1,ut=Number.EPSILON,ht=0,kt=0,Bt=0,jt=0,ce=0,Kt=0,$t=0,Ce=0,St,te,Ee,He,je,Wn,Ie,De,on,Lt,ee,he,se,Jn,Qn;for(St=0;St<q;St++)for((St<st||St>ot)&&(S[St]=T.get(St,St),x[St]=0),te=Math.max(St-1,0);te<q;te++)kt=kt+Math.abs(T.get(St,te));for(;R>=st;){for(He=R;He>st&&(Kt=Math.abs(T.get(He-1,He-1))+Math.abs(T.get(He,He)),Kt===0&&(Kt=kt),!(Math.abs(T.get(He,He-1))<ut*Kt));)He--;if(He===R)T.set(R,R,T.get(R,R)+ht),S[R]=T.get(R,R),x[R]=0,R--,Ce=0;else if(He===R-1){if(Ie=T.get(R,R-1)*T.get(R-1,R),Bt=(T.get(R-1,R-1)-T.get(R,R))/2,jt=Bt*Bt+Ie,$t=Math.sqrt(Math.abs(jt)),T.set(R,R,T.get(R,R)+ht),T.set(R-1,R-1,T.get(R-1,R-1)+ht),De=T.get(R,R),jt>=0){for($t=Bt>=0?Bt+$t:Bt-$t,S[R-1]=De+$t,S[R]=S[R-1],$t!==0&&(S[R]=De-Ie/$t),x[R-1]=0,x[R]=0,De=T.get(R,R-1),Kt=Math.abs(De)+Math.abs($t),Bt=De/Kt,jt=$t/Kt,ce=Math.sqrt(Bt*Bt+jt*jt),Bt=Bt/ce,jt=jt/ce,te=R-1;te<q;te++)$t=T.get(R-1,te),T.set(R-1,te,jt*$t+Bt*T.get(R,te)),T.set(R,te,jt*T.get(R,te)-Bt*$t);for(St=0;St<=R;St++)$t=T.get(St,R-1),T.set(St,R-1,jt*$t+Bt*T.get(St,R)),T.set(St,R,jt*T.get(St,R)-Bt*$t);for(St=st;St<=ot;St++)$t=y.get(St,R-1),y.set(St,R-1,jt*$t+Bt*y.get(St,R)),y.set(St,R,jt*y.get(St,R)-Bt*$t)}else S[R-1]=De+Bt,S[R]=De+Bt,x[R-1]=$t,x[R]=-$t;R=R-2,Ce=0}else{if(De=T.get(R,R),on=0,Ie=0,He<R&&(on=T.get(R-1,R-1),Ie=T.get(R,R-1)*T.get(R-1,R)),Ce===10){for(ht+=De,St=st;St<=R;St++)T.set(St,St,T.get(St,St)-De);Kt=Math.abs(T.get(R,R-1))+Math.abs(T.get(R-1,R-2)),De=on=.75*Kt,Ie=-.4375*Kt*Kt}if(Ce===30&&(Kt=(on-De)/2,Kt=Kt*Kt+Ie,Kt>0)){for(Kt=Math.sqrt(Kt),on<De&&(Kt=-Kt),Kt=De-Ie/((on-De)/2+Kt),St=st;St<=R;St++)T.set(St,St,T.get(St,St)-Kt);ht+=Kt,De=on=Ie=.964}for(Ce=Ce+1,je=R-2;je>=He&&($t=T.get(je,je),ce=De-$t,Kt=on-$t,Bt=(ce*Kt-Ie)/T.get(je+1,je)+T.get(je,je+1),jt=T.get(je+1,je+1)-$t-ce-Kt,ce=T.get(je+2,je+1),Kt=Math.abs(Bt)+Math.abs(jt)+Math.abs(ce),Bt=Bt/Kt,jt=jt/Kt,ce=ce/Kt,!(je===He||Math.abs(T.get(je,je-1))*(Math.abs(jt)+Math.abs(ce))<ut*(Math.abs(Bt)*(Math.abs(T.get(je-1,je-1))+Math.abs($t)+Math.abs(T.get(je+1,je+1))))));)je--;for(St=je+2;St<=R;St++)T.set(St,St-2,0),St>je+2&&T.set(St,St-3,0);for(Ee=je;Ee<=R-1&&(Jn=Ee!==R-1,Ee!==je&&(Bt=T.get(Ee,Ee-1),jt=T.get(Ee+1,Ee-1),ce=Jn?T.get(Ee+2,Ee-1):0,De=Math.abs(Bt)+Math.abs(jt)+Math.abs(ce),De!==0&&(Bt=Bt/De,jt=jt/De,ce=ce/De)),De!==0);Ee++)if(Kt=Math.sqrt(Bt*Bt+jt*jt+ce*ce),Bt<0&&(Kt=-Kt),Kt!==0){for(Ee!==je?T.set(Ee,Ee-1,-Kt*De):He!==je&&T.set(Ee,Ee-1,-T.get(Ee,Ee-1)),Bt=Bt+Kt,De=Bt/Kt,on=jt/Kt,$t=ce/Kt,jt=jt/Bt,ce=ce/Bt,te=Ee;te<q;te++)Bt=T.get(Ee,te)+jt*T.get(Ee+1,te),Jn&&(Bt=Bt+ce*T.get(Ee+2,te),T.set(Ee+2,te,T.get(Ee+2,te)-Bt*$t)),T.set(Ee,te,T.get(Ee,te)-Bt*De),T.set(Ee+1,te,T.get(Ee+1,te)-Bt*on);for(St=0;St<=Math.min(R,Ee+3);St++)Bt=De*T.get(St,Ee)+on*T.get(St,Ee+1),Jn&&(Bt=Bt+$t*T.get(St,Ee+2),T.set(St,Ee+2,T.get(St,Ee+2)-Bt*ce)),T.set(St,Ee,T.get(St,Ee)-Bt),T.set(St,Ee+1,T.get(St,Ee+1)-Bt*jt);for(St=st;St<=ot;St++)Bt=De*y.get(St,Ee)+on*y.get(St,Ee+1),Jn&&(Bt=Bt+$t*y.get(St,Ee+2),y.set(St,Ee+2,y.get(St,Ee+2)-Bt*ce)),y.set(St,Ee,y.get(St,Ee)-Bt),y.set(St,Ee+1,y.get(St,Ee+1)-Bt*jt)}}}if(kt!==0){for(R=q-1;R>=0;R--)if(Bt=S[R],jt=x[R],jt===0)for(He=R,T.set(R,R,1),St=R-1;St>=0;St--){for(Ie=T.get(St,St)-Bt,ce=0,te=He;te<=R;te++)ce=ce+T.get(St,te)*T.get(te,R);if(x[St]<0)$t=Ie,Kt=ce;else if(He=St,x[St]===0?T.set(St,R,Ie!==0?-ce/Ie:-ce/(ut*kt)):(De=T.get(St,St+1),on=T.get(St+1,St),jt=(S[St]-Bt)*(S[St]-Bt)+x[St]*x[St],Wn=(De*Kt-$t*ce)/jt,T.set(St,R,Wn),T.set(St+1,R,Math.abs(De)>Math.abs($t)?(-ce-Ie*Wn)/De:(-Kt-on*Wn)/$t)),Wn=Math.abs(T.get(St,R)),ut*Wn*Wn>1)for(te=St;te<=R;te++)T.set(te,R,T.get(te,R)/Wn)}else if(jt<0)for(He=R-1,Math.abs(T.get(R,R-1))>Math.abs(T.get(R-1,R))?(T.set(R-1,R-1,jt/T.get(R,R-1)),T.set(R-1,R,-(T.get(R,R)-Bt)/T.get(R,R-1))):(Qn=Vo(0,-T.get(R-1,R),T.get(R-1,R-1)-Bt,jt),T.set(R-1,R-1,Qn[0]),T.set(R-1,R,Qn[1])),T.set(R,R-1,0),T.set(R,R,1),St=R-2;St>=0;St--){for(Lt=0,ee=0,te=He;te<=R;te++)Lt=Lt+T.get(St,te)*T.get(te,R-1),ee=ee+T.get(St,te)*T.get(te,R);if(Ie=T.get(St,St)-Bt,x[St]<0)$t=Ie,ce=Lt,Kt=ee;else if(He=St,x[St]===0?(Qn=Vo(-Lt,-ee,Ie,jt),T.set(St,R-1,Qn[0]),T.set(St,R,Qn[1])):(De=T.get(St,St+1),on=T.get(St+1,St),he=(S[St]-Bt)*(S[St]-Bt)+x[St]*x[St]-jt*jt,se=(S[St]-Bt)*2*jt,he===0&&se===0&&(he=ut*kt*(Math.abs(Ie)+Math.abs(jt)+Math.abs(De)+Math.abs(on)+Math.abs($t))),Qn=Vo(De*ce-$t*Lt+jt*ee,De*Kt-$t*ee-jt*Lt,he,se),T.set(St,R-1,Qn[0]),T.set(St,R,Qn[1]),Math.abs(De)>Math.abs($t)+Math.abs(jt)?(T.set(St+1,R-1,(-Lt-Ie*T.get(St,R-1)+jt*T.get(St,R))/De),T.set(St+1,R,(-ee-Ie*T.get(St,R)-jt*T.get(St,R-1))/De)):(Qn=Vo(-ce-on*T.get(St,R-1),-Kt-on*T.get(St,R),$t,jt),T.set(St+1,R-1,Qn[0]),T.set(St+1,R,Qn[1]))),Wn=Math.max(Math.abs(T.get(St,R-1)),Math.abs(T.get(St,R))),ut*Wn*Wn>1)for(te=St;te<=R;te++)T.set(te,R-1,T.get(te,R-1)/Wn),T.set(te,R,T.get(te,R)/Wn)}for(St=0;St<q;St++)if(St<st||St>ot)for(te=St;te<q;te++)y.set(St,te,T.get(St,te));for(te=q-1;te>=st;te--)for(St=st;St<=ot;St++){for($t=0,Ee=st;Ee<=Math.min(te,ot);Ee++)$t=$t+y.get(St,Ee)*T.get(Ee,te);y.set(St,te,$t)}}}function Vo(q,x,S,y){let T,R;return Math.abs(S)>Math.abs(y)?(T=y/S,R=S+T*y,[(q+T*x)/R,(x-T*q)/R]):(T=S/y,R=y+T*S,[(T*q+x)/R,(T*x-q)/R])}class Kl{constructor(x){if(x=or.checkMatrix(x),!x.isSymmetric())throw new Error("Matrix is not symmetric");let S=x,y=S.rows,T=new pe(y,y),R=!0,st,ot,ut;for(ot=0;ot<y;ot++){let ht=0;for(ut=0;ut<ot;ut++){let kt=0;for(st=0;st<ut;st++)kt+=T.get(ut,st)*T.get(ot,st);kt=(S.get(ot,ut)-kt)/T.get(ut,ut),T.set(ot,ut,kt),ht=ht+kt*kt}for(ht=S.get(ot,ot)-ht,R&&(R=ht>0),T.set(ot,ot,Math.sqrt(Math.max(ht,0))),ut=ot+1;ut<y;ut++)T.set(ot,ut,0)}this.L=T,this.positiveDefinite=R}isPositiveDefinite(){return this.positiveDefinite}solve(x){x=or.checkMatrix(x);let S=this.L,y=S.rows;if(x.rows!==y)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let T=x.columns,R=x.clone(),st,ot,ut;for(ut=0;ut<y;ut++)for(ot=0;ot<T;ot++){for(st=0;st<ut;st++)R.set(ut,ot,R.get(ut,ot)-R.get(st,ot)*S.get(ut,st));R.set(ut,ot,R.get(ut,ot)/S.get(ut,ut))}for(ut=y-1;ut>=0;ut--)for(ot=0;ot<T;ot++){for(st=ut+1;st<y;st++)R.set(ut,ot,R.get(ut,ot)-R.get(st,ot)*S.get(st,ut));R.set(ut,ot,R.get(ut,ot)/S.get(ut,ut))}return R}get lowerTriangularMatrix(){return this.L}}class zl{constructor(x,S={}){x=or.checkMatrix(x);let{Y:y}=S;const{scaleScores:T=!1,maxIterations:R=1e3,terminationCriteria:st=1e-10}=S;let ot;if(y){if(ft.isAnyArray(y)&&typeof y[0]=="number"?y=pe.columnVector(y):y=or.checkMatrix(y),y.rows!==x.rows)throw new Error("Y should have the same number of rows as X");ot=y.getColumnVector(0)}else ot=x.getColumnVector(0);let ut=1,ht,kt,Bt,jt;for(let ce=0;ce<R&&ut>st;ce++)Bt=x.transpose().mmul(ot).div(ot.transpose().mmul(ot).get(0,0)),Bt=Bt.div(Bt.norm()),ht=x.mmul(Bt).div(Bt.transpose().mmul(Bt).get(0,0)),ce>0&&(ut=ht.clone().sub(jt).pow(2).sum()),jt=ht.clone(),y?(kt=y.transpose().mmul(ht).div(ht.transpose().mmul(ht).get(0,0)),kt=kt.div(kt.norm()),ot=y.mmul(kt).div(kt.transpose().mmul(kt).get(0,0))):ot=ht;if(y){let ce=x.transpose().mmul(ht).div(ht.transpose().mmul(ht).get(0,0));ce=ce.div(ce.norm());let Kt=x.clone().sub(ht.clone().mmul(ce.transpose())),$t=ot.transpose().mmul(ht).div(ht.transpose().mmul(ht).get(0,0)),Ce=y.clone().sub(ht.clone().mulS($t.get(0,0)).mmul(kt.transpose()));this.t=ht,this.p=ce.transpose(),this.w=Bt.transpose(),this.q=kt,this.u=ot,this.s=ht.transpose().mmul(ht),this.xResidual=Kt,this.yResidual=Ce,this.betas=$t}else this.w=Bt.transpose(),this.s=ht.transpose().mmul(ht).sqrt(),T?this.t=ht.clone().div(this.s.get(0,0)):this.t=ht,this.xResidual=x.sub(ht.mmul(Bt.transpose()))}}et.XA=me,et.a_=Kl,et.yQ=Kl,et.Hs=Mr,et.Ec=pn,et.dx=pn,et.LU=ji,et.Rm=ji,et.y3=pe,et.qK=Zi,et.pb=as,et.j=ss,et.sO=Ii,et.BZ=ma,et.EK=Jr,et.Db=ya,et.Fx=aa,et.tU=wa,et.Ym=zl,et.rs=zl,et.QR=lo,et.TB=lo,et.oH=Ka,et.Sc=Ka,et.BN=Nr,et.it=qr,et.$r=or,et.QM=Hl,et.AV=Wh,O=pe,et.GH=Ns,et.SO=zo,et.uZ=iu,et.yU=Vh,et.F1=UA,et.re=Ko},45411:function(X){"use strict";X.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},75196:function(X,et,M){var O=M(45411),W=M(81683),H=Object.hasOwnProperty,L=Object.create(null);for(var I in O)H.call(O,I)&&(L[O[I]]=I);var N=X.exports={to:{},get:{}};N.get=function(U){var Z=U.substring(0,3).toLowerCase(),V,Y;switch(Z){case"hsl":V=N.get.hsl(U),Y="hsl";break;case"hwb":V=N.get.hwb(U),Y="hwb";break;default:V=N.get.rgb(U),Y="rgb";break}return V?{model:Y,value:V}:null},N.get.rgb=function(U){if(!U)return null;var Z=/^#([a-f0-9]{3,4})$/i,V=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,Y=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,nt=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,rt=/^(\w+)$/,ft=[0,0,0,1],ct,it,vt;if(ct=U.match(V)){for(vt=ct[2],ct=ct[1],it=0;it<3;it++){var gt=it*2;ft[it]=parseInt(ct.slice(gt,gt+2),16)}vt&&(ft[3]=parseInt(vt,16)/255)}else if(ct=U.match(Z)){for(ct=ct[1],vt=ct[3],it=0;it<3;it++)ft[it]=parseInt(ct[it]+ct[it],16);vt&&(ft[3]=parseInt(vt+vt,16)/255)}else if(ct=U.match(Y)){for(it=0;it<3;it++)ft[it]=parseInt(ct[it+1],0);ct[4]&&(ct[5]?ft[3]=parseFloat(ct[4])*.01:ft[3]=parseFloat(ct[4]))}else if(ct=U.match(nt)){for(it=0;it<3;it++)ft[it]=Math.round(parseFloat(ct[it+1])*2.55);ct[4]&&(ct[5]?ft[3]=parseFloat(ct[4])*.01:ft[3]=parseFloat(ct[4]))}else return(ct=U.match(rt))?ct[1]==="transparent"?[0,0,0,0]:H.call(O,ct[1])?(ft=O[ct[1]],ft[3]=1,ft):null:null;for(it=0;it<3;it++)ft[it]=P(ft[it],0,255);return ft[3]=P(ft[3],0,1),ft},N.get.hsl=function(U){if(!U)return null;var Z=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,V=U.match(Z);if(V){var Y=parseFloat(V[4]),nt=(parseFloat(V[1])%360+360)%360,rt=P(parseFloat(V[2]),0,100),ft=P(parseFloat(V[3]),0,100),ct=P(isNaN(Y)?1:Y,0,1);return[nt,rt,ft,ct]}return null},N.get.hwb=function(U){if(!U)return null;var Z=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,V=U.match(Z);if(V){var Y=parseFloat(V[4]),nt=(parseFloat(V[1])%360+360)%360,rt=P(parseFloat(V[2]),0,100),ft=P(parseFloat(V[3]),0,100),ct=P(isNaN(Y)?1:Y,0,1);return[nt,rt,ft,ct]}return null},N.to.hex=function(){var U=W(arguments);return"#"+k(U[0])+k(U[1])+k(U[2])+(U[3]<1?k(Math.round(U[3]*255)):"")},N.to.rgb=function(){var U=W(arguments);return U.length<4||U[3]===1?"rgb("+Math.round(U[0])+", "+Math.round(U[1])+", "+Math.round(U[2])+")":"rgba("+Math.round(U[0])+", "+Math.round(U[1])+", "+Math.round(U[2])+", "+U[3]+")"},N.to.rgb.percent=function(){var U=W(arguments),Z=Math.round(U[0]/255*100),V=Math.round(U[1]/255*100),Y=Math.round(U[2]/255*100);return U.length<4||U[3]===1?"rgb("+Z+"%, "+V+"%, "+Y+"%)":"rgba("+Z+"%, "+V+"%, "+Y+"%, "+U[3]+")"},N.to.hsl=function(){var U=W(arguments);return U.length<4||U[3]===1?"hsl("+U[0]+", "+U[1]+"%, "+U[2]+"%)":"hsla("+U[0]+", "+U[1]+"%, "+U[2]+"%, "+U[3]+")"},N.to.hwb=function(){var U=W(arguments),Z="";return U.length>=4&&U[3]!==1&&(Z=", "+U[3]),"hwb("+U[0]+", "+U[1]+"%, "+U[2]+"%"+Z+")"},N.to.keyword=function(U){return L[U.slice(0,3)]};function P(U,Z,V){return Math.min(Math.max(Z,U),V)}function k(U){var Z=Math.round(U).toString(16).toUpperCase();return Z.length<2?"0"+Z:Z}},92546:function(X,et,M){X.exports={graphlib:M(76626),layout:M(47194),debug:M(11303),util:{time:M(53063).time,notime:M(53063).notime},version:M(11897)}},81255:function(X,et,M){"use strict";var O=M(72361),W=M(39240);X.exports={run:H,undo:I};function H(N){var P=N.graph().acyclicer==="greedy"?W(N,k(N)):L(N);O.forEach(P,function(U){var Z=N.edge(U);N.removeEdge(U),Z.forwardName=U.name,Z.reversed=!0,N.setEdge(U.w,U.v,Z,O.uniqueId("rev"))});function k(U){return function(Z){return U.edge(Z).weight}}}function L(N){var P=[],k={},U={};function Z(V){O.has(U,V)||(U[V]=!0,k[V]=!0,O.forEach(N.outEdges(V),function(Y){O.has(k,Y.w)?P.push(Y):Z(Y.w)}),delete k[V])}return O.forEach(N.nodes(),Z),P}function I(N){O.forEach(N.edges(),function(P){var k=N.edge(P);if(k.reversed){N.removeEdge(P);var U=k.forwardName;delete k.reversed,delete k.forwardName,N.setEdge(P.w,P.v,k,U)}})}},60765:function(X,et,M){var O=M(72361),W=M(53063);X.exports=H;function H(I){function N(P){var k=I.children(P),U=I.node(P);if(k.length&&O.forEach(k,N),O.has(U,"minRank")){U.borderLeft=[],U.borderRight=[];for(var Z=U.minRank,V=U.maxRank+1;Z<V;++Z)L(I,"borderLeft","_bl",P,U,Z),L(I,"borderRight","_br",P,U,Z)}}O.forEach(I.children(),N)}function L(I,N,P,k,U,Z){var V={width:0,height:0,rank:Z,borderType:N},Y=U[N][Z-1],nt=W.addDummyNode(I,"border",V,P);U[N][Z]=nt,I.setParent(nt,k),Y&&I.setEdge(Y,nt,{weight:1})}},13257:function(X,et,M){"use strict";var O=M(72361);X.exports={adjust:W,undo:H};function W(Z){var V=Z.graph().rankdir.toLowerCase();(V==="lr"||V==="rl")&&L(Z)}function H(Z){var V=Z.graph().rankdir.toLowerCase();(V==="bt"||V==="rl")&&N(Z),(V==="lr"||V==="rl")&&(k(Z),L(Z))}function L(Z){O.forEach(Z.nodes(),function(V){I(Z.node(V))}),O.forEach(Z.edges(),function(V){I(Z.edge(V))})}function I(Z){var V=Z.width;Z.width=Z.height,Z.height=V}function N(Z){O.forEach(Z.nodes(),function(V){P(Z.node(V))}),O.forEach(Z.edges(),function(V){var Y=Z.edge(V);O.forEach(Y.points,P),O.has(Y,"y")&&P(Y)})}function P(Z){Z.y=-Z.y}function k(Z){O.forEach(Z.nodes(),function(V){U(Z.node(V))}),O.forEach(Z.edges(),function(V){var Y=Z.edge(V);O.forEach(Y.points,U),O.has(Y,"x")&&U(Y)})}function U(Z){var V=Z.x;Z.x=Z.y,Z.y=V}},21135:function(X){X.exports=et;function et(){var W={};W._next=W._prev=W,this._sentinel=W}et.prototype.dequeue=function(){var W=this._sentinel,H=W._prev;if(H!==W)return M(H),H},et.prototype.enqueue=function(W){var H=this._sentinel;W._prev&&W._next&&M(W),W._next=H._next,H._next._prev=W,H._next=W,W._prev=H},et.prototype.toString=function(){for(var W=[],H=this._sentinel,L=H._prev;L!==H;)W.push(JSON.stringify(L,O)),L=L._prev;return"["+W.join(", ")+"]"};function M(W){W._prev._next=W._next,W._next._prev=W._prev,delete W._next,delete W._prev}function O(W,H){if(W!=="_next"&&W!=="_prev")return H}},11303:function(X,et,M){var O=M(72361),W=M(53063),H=M(76626).Graph;X.exports={debugOrdering:L};function L(I){var N=W.buildLayerMatrix(I),P=new H({compound:!0,multigraph:!0}).setGraph({});return O.forEach(I.nodes(),function(k){P.setNode(k,{label:k}),P.setParent(k,"layer"+I.node(k).rank)}),O.forEach(I.edges(),function(k){P.setEdge(k.v,k.w,{},k.name)}),O.forEach(N,function(k,U){var Z="layer"+U;P.setNode(Z,{rank:"same"}),O.reduce(k,function(V,Y){return P.setEdge(V,Y,{style:"invis"}),Y})}),P}},76626:function(X,et,M){var O;try{O=M(75172)}catch(W){}O||(O=window.graphlib),X.exports=O},39240:function(X,et,M){var O=M(72361),W=M(76626).Graph,H=M(21135);X.exports=I;var L=O.constant(1);function I(Z,V){if(Z.nodeCount()<=1)return[];var Y=k(Z,V||L),nt=N(Y.graph,Y.buckets,Y.zeroIdx);return O.flatten(O.map(nt,function(rt){return Z.outEdges(rt.v,rt.w)}),!0)}function N(Z,V,Y){for(var nt=[],rt=V[V.length-1],ft=V[0],ct;Z.nodeCount();){for(;ct=ft.dequeue();)P(Z,V,Y,ct);for(;ct=rt.dequeue();)P(Z,V,Y,ct);if(Z.nodeCount()){for(var it=V.length-2;it>0;--it)if(ct=V[it].dequeue(),ct){nt=nt.concat(P(Z,V,Y,ct,!0));break}}}return nt}function P(Z,V,Y,nt,rt){var ft=rt?[]:void 0;return O.forEach(Z.inEdges(nt.v),function(ct){var it=Z.edge(ct),vt=Z.node(ct.v);rt&&ft.push({v:ct.v,w:ct.w}),vt.out-=it,U(V,Y,vt)}),O.forEach(Z.outEdges(nt.v),function(ct){var it=Z.edge(ct),vt=ct.w,gt=Z.node(vt);gt.in-=it,U(V,Y,gt)}),Z.removeNode(nt.v),ft}function k(Z,V){var Y=new W,nt=0,rt=0;O.forEach(Z.nodes(),function(it){Y.setNode(it,{v:it,in:0,out:0})}),O.forEach(Z.edges(),function(it){var vt=Y.edge(it.v,it.w)||0,gt=V(it),yt=vt+gt;Y.setEdge(it.v,it.w,yt),rt=Math.max(rt,Y.node(it.v).out+=gt),nt=Math.max(nt,Y.node(it.w).in+=gt)});var ft=O.range(rt+nt+3).map(function(){return new H}),ct=nt+1;return O.forEach(Y.nodes(),function(it){U(ft,ct,Y.node(it))}),{graph:Y,buckets:ft,zeroIdx:ct}}function U(Z,V,Y){Y.out?Y.in?Z[Y.out-Y.in+V].enqueue(Y):Z[Z.length-1].enqueue(Y):Z[0].enqueue(Y)}},47194:function(X,et,M){"use strict";var O=M(72361),W=M(81255),H=M(27163),L=M(64505),I=M(53063).normalizeRanks,N=M(71970),P=M(53063).removeEmptyRanks,k=M(31733),U=M(60765),Z=M(13257),V=M(62852),Y=M(93021),nt=M(53063),rt=M(76626).Graph;X.exports=ft;function ft(Et,It){var Ut=It&&It.debugTiming?nt.time:nt.notime;Ut("layout",function(){var ne=Ut(" buildLayoutGraph",function(){return Gt(Et)});Ut(" runLayout",function(){ct(ne,Ut)}),Ut(" updateInputGraph",function(){it(Et,ne)})})}function ct(Et,It){It(" makeSpaceForEdgeLabels",function(){re(Et)}),It(" removeSelfEdges",function(){is(Et)}),It(" acyclic",function(){W.run(Et)}),It(" nestingGraph.run",function(){k.run(Et)}),It(" rank",function(){L(nt.asNonCompoundGraph(Et))}),It(" injectEdgeLabelProxies",function(){de(Et)}),It(" removeEmptyRanks",function(){P(Et)}),It(" nestingGraph.cleanup",function(){k.cleanup(Et)}),It(" normalizeRanks",function(){I(Et)}),It(" assignRankMinMax",function(){ue(Et)}),It(" removeEdgeLabelProxies",function(){Me(Et)}),It(" normalize.run",function(){H.run(Et)}),It(" parentDummyChains",function(){N(Et)}),It(" addBorderSegments",function(){U(Et)}),It(" order",function(){V(Et)}),It(" insertSelfEdges",function(){Ao(Et)}),It(" adjustCoordinateSystem",function(){Z.adjust(Et)}),It(" position",function(){Y(Et)}),It(" positionSelfEdges",function(){Ht(Et)}),It(" removeBorderNodes",function(){Vi(Et)}),It(" normalize.undo",function(){H.undo(Et)}),It(" fixupEdgeLabelCoords",function(){Xn(Et)}),It(" undoCoordinateSystem",function(){Z.undo(Et)}),It(" translateGraph",function(){Ve(Et)}),It(" assignNodeIntersects",function(){dn(Et)}),It(" reversePoints",function(){Xr(Et)}),It(" acyclic.undo",function(){W.undo(Et)})}function it(Et,It){O.forEach(Et.nodes(),function(Ut){var ne=Et.node(Ut),be=It.node(Ut);ne&&(ne.x=be.x,ne.y=be.y,It.children(Ut).length&&(ne.width=be.width,ne.height=be.height))}),O.forEach(Et.edges(),function(Ut){var ne=Et.edge(Ut),be=It.edge(Ut);ne.points=be.points,O.has(be,"x")&&(ne.x=be.x,ne.y=be.y)}),Et.graph().width=It.graph().width,Et.graph().height=It.graph().height}var vt=["nodesep","edgesep","ranksep","marginx","marginy"],gt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},yt=["acyclicer","ranker","rankdir","align"],mt=["width","height"],Mt={width:0,height:0},Ct=["minlen","weight","width","height","labeloffset"],Nt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},qt=["labelpos"];function Gt(Et){var It=new rt({multigraph:!0,compound:!0}),Ut=Zt(Et.graph());return It.setGraph(O.merge({},gt,zt(Ut,vt),O.pick(Ut,yt))),O.forEach(Et.nodes(),function(ne){var be=Zt(Et.node(ne));It.setNode(ne,O.defaults(zt(be,mt),Mt)),It.setParent(ne,Et.parent(ne))}),O.forEach(Et.edges(),function(ne){var be=Zt(Et.edge(ne));It.setEdge(ne,O.merge({},Nt,zt(be,Ct),O.pick(be,qt)))}),It}function re(Et){var It=Et.graph();It.ranksep/=2,O.forEach(Et.edges(),function(Ut){var ne=Et.edge(Ut);ne.minlen*=2,ne.labelpos.toLowerCase()!=="c"&&(It.rankdir==="TB"||It.rankdir==="BT"?ne.width+=ne.labeloffset:ne.height+=ne.labeloffset)})}function de(Et){O.forEach(Et.edges(),function(It){var Ut=Et.edge(It);if(Ut.width&&Ut.height){var ne=Et.node(It.v),be=Et.node(It.w),_e={rank:(be.rank-ne.rank)/2+ne.rank,e:It};nt.addDummyNode(Et,"edge-proxy",_e,"_ep")}})}function ue(Et){var It=0;O.forEach(Et.nodes(),function(Ut){var ne=Et.node(Ut);ne.borderTop&&(ne.minRank=Et.node(ne.borderTop).rank,ne.maxRank=Et.node(ne.borderBottom).rank,It=O.max(It,ne.maxRank))}),Et.graph().maxRank=It}function Me(Et){O.forEach(Et.nodes(),function(It){var Ut=Et.node(It);Ut.dummy==="edge-proxy"&&(Et.edge(Ut.e).labelRank=Ut.rank,Et.removeNode(It))})}function Ve(Et){var It=Number.POSITIVE_INFINITY,Ut=0,ne=Number.POSITIVE_INFINITY,be=0,_e=Et.graph(),Te=_e.marginx||0,rn=_e.marginy||0;function rr(sr){var Ge=sr.x,Ke=sr.y,me=sr.width,We=sr.height;It=Math.min(It,Ge-me/2),Ut=Math.max(Ut,Ge+me/2),ne=Math.min(ne,Ke-We/2),be=Math.max(be,Ke+We/2)}O.forEach(Et.nodes(),function(sr){rr(Et.node(sr))}),O.forEach(Et.edges(),function(sr){var Ge=Et.edge(sr);O.has(Ge,"x")&&rr(Ge)}),It-=Te,ne-=rn,O.forEach(Et.nodes(),function(sr){var Ge=Et.node(sr);Ge.x-=It,Ge.y-=ne}),O.forEach(Et.edges(),function(sr){var Ge=Et.edge(sr);O.forEach(Ge.points,function(Ke){Ke.x-=It,Ke.y-=ne}),O.has(Ge,"x")&&(Ge.x-=It),O.has(Ge,"y")&&(Ge.y-=ne)}),_e.width=Ut-It+Te,_e.height=be-ne+rn}function dn(Et){O.forEach(Et.edges(),function(It){var Ut=Et.edge(It),ne=Et.node(It.v),be=Et.node(It.w),_e,Te;Ut.points?(_e=Ut.points[0],Te=Ut.points[Ut.points.length-1]):(Ut.points=[],_e=be,Te=ne),Ut.points.unshift(nt.intersectRect(ne,_e)),Ut.points.push(nt.intersectRect(be,Te))})}function Xn(Et){O.forEach(Et.edges(),function(It){var Ut=Et.edge(It);if(O.has(Ut,"x"))switch((Ut.labelpos==="l"||Ut.labelpos==="r")&&(Ut.width-=Ut.labeloffset),Ut.labelpos){case"l":Ut.x-=Ut.width/2+Ut.labeloffset;break;case"r":Ut.x+=Ut.width/2+Ut.labeloffset;break}})}function Xr(Et){O.forEach(Et.edges(),function(It){var Ut=Et.edge(It);Ut.reversed&&Ut.points.reverse()})}function Vi(Et){O.forEach(Et.nodes(),function(It){if(Et.children(It).length){var Ut=Et.node(It),ne=Et.node(Ut.borderTop),be=Et.node(Ut.borderBottom),_e=Et.node(O.last(Ut.borderLeft)),Te=Et.node(O.last(Ut.borderRight));Ut.width=Math.abs(Te.x-_e.x),Ut.height=Math.abs(be.y-ne.y),Ut.x=_e.x+Ut.width/2,Ut.y=ne.y+Ut.height/2}}),O.forEach(Et.nodes(),function(It){Et.node(It).dummy==="border"&&Et.removeNode(It)})}function is(Et){O.forEach(Et.edges(),function(It){if(It.v===It.w){var Ut=Et.node(It.v);Ut.selfEdges||(Ut.selfEdges=[]),Ut.selfEdges.push({e:It,label:Et.edge(It)}),Et.removeEdge(It)}})}function Ao(Et){var It=nt.buildLayerMatrix(Et);O.forEach(It,function(Ut){var ne=0;O.forEach(Ut,function(be,_e){var Te=Et.node(be);Te.order=_e+ne,O.forEach(Te.selfEdges,function(rn){nt.addDummyNode(Et,"selfedge",{width:rn.label.width,height:rn.label.height,rank:Te.rank,order:_e+ ++ne,e:rn.e,label:rn.label},"_se")}),delete Te.selfEdges})})}function Ht(Et){O.forEach(Et.nodes(),function(It){var Ut=Et.node(It);if(Ut.dummy==="selfedge"){var ne=Et.node(Ut.e.v),be=ne.x+ne.width/2,_e=ne.y,Te=Ut.x-be,rn=ne.height/2;Et.setEdge(Ut.e,Ut.label),Et.removeNode(It),Ut.label.points=[{x:be+2*Te/3,y:_e-rn},{x:be+5*Te/6,y:_e-rn},{x:be+Te,y:_e},{x:be+5*Te/6,y:_e+rn},{x:be+2*Te/3,y:_e+rn}],Ut.label.x=Ut.x,Ut.label.y=Ut.y}})}function zt(Et,It){return O.mapValues(O.pick(Et,It),Number)}function Zt(Et){var It={};return O.forEach(Et,function(Ut,ne){It[ne.toLowerCase()]=Ut}),It}},72361:function(X,et,M){var O;try{O={cloneDeep:M(20250),constant:M(13503),defaults:M(28548),each:M(76934),filter:M(64725),find:M(79785),flatten:M(40151),forEach:M(99204),forIn:M(23190),has:M(99946),isUndefined:M(16513),last:M(10611),map:M(9924),mapValues:M(70642),max:M(95987),merge:M(28440),min:M(73376),minBy:M(83296),now:M(5795),pick:M(89409),range:M(60859),reduce:M(16473),sortBy:M(351),uniqueId:M(95708),values:M(81229),zipObject:M(65441)}}catch(W){}O||(O=window._),X.exports=O},31733:function(X,et,M){var O=M(72361),W=M(53063);X.exports={run:H,cleanup:P};function H(k){var U=W.addDummyNode(k,"root",{},"_root"),Z=I(k),V=O.max(O.values(Z))-1,Y=2*V+1;k.graph().nestingRoot=U,O.forEach(k.edges(),function(rt){k.edge(rt).minlen*=Y});var nt=N(k)+1;O.forEach(k.children(),function(rt){L(k,U,Y,nt,V,Z,rt)}),k.graph().nodeRankFactor=Y}function L(k,U,Z,V,Y,nt,rt){var ft=k.children(rt);if(!ft.length){rt!==U&&k.setEdge(U,rt,{weight:0,minlen:Z});return}var ct=W.addBorderNode(k,"_bt"),it=W.addBorderNode(k,"_bb"),vt=k.node(rt);k.setParent(ct,rt),vt.borderTop=ct,k.setParent(it,rt),vt.borderBottom=it,O.forEach(ft,function(gt){L(k,U,Z,V,Y,nt,gt);var yt=k.node(gt),mt=yt.borderTop?yt.borderTop:gt,Mt=yt.borderBottom?yt.borderBottom:gt,Ct=yt.borderTop?V:2*V,Nt=mt!==Mt?1:Y-nt[rt]+1;k.setEdge(ct,mt,{weight:Ct,minlen:Nt,nestingEdge:!0}),k.setEdge(Mt,it,{weight:Ct,minlen:Nt,nestingEdge:!0})}),k.parent(rt)||k.setEdge(U,ct,{weight:0,minlen:Y+nt[rt]})}function I(k){var U={};function Z(V,Y){var nt=k.children(V);nt&&nt.length&&O.forEach(nt,function(rt){Z(rt,Y+1)}),U[V]=Y}return O.forEach(k.children(),function(V){Z(V,1)}),U}function N(k){return O.reduce(k.edges(),function(U,Z){return U+k.edge(Z).weight},0)}function P(k){var U=k.graph();k.removeNode(U.nestingRoot),delete U.nestingRoot,O.forEach(k.edges(),function(Z){var V=k.edge(Z);V.nestingEdge&&k.removeEdge(Z)})}},27163:function(X,et,M){"use strict";var O=M(72361),W=M(53063);X.exports={run:H,undo:I};function H(N){N.graph().dummyChains=[],O.forEach(N.edges(),function(P){L(N,P)})}function L(N,P){var k=P.v,U=N.node(k).rank,Z=P.w,V=N.node(Z).rank,Y=P.name,nt=N.edge(P),rt=nt.labelRank;if(V!==U+1){N.removeEdge(P);var ft,ct,it;for(it=0,++U;U<V;++it,++U)nt.points=[],ct={width:0,height:0,edgeLabel:nt,edgeObj:P,rank:U},ft=W.addDummyNode(N,"edge",ct,"_d"),U===rt&&(ct.width=nt.width,ct.height=nt.height,ct.dummy="edge-label",ct.labelpos=nt.labelpos),N.setEdge(k,ft,{weight:nt.weight},Y),it===0&&N.graph().dummyChains.push(ft),k=ft;N.setEdge(k,Z,{weight:nt.weight},Y)}}function I(N){O.forEach(N.graph().dummyChains,function(P){var k=N.node(P),U=k.edgeLabel,Z;for(N.setEdge(k.edgeObj,U);k.dummy;)Z=N.successors(P)[0],N.removeNode(P),U.points.push({x:k.x,y:k.y}),k.dummy==="edge-label"&&(U.x=k.x,U.y=k.y,U.width=k.width,U.height=k.height),P=Z,k=N.node(P)})}},52205:function(X,et,M){var O=M(72361);X.exports=W;function W(H,L,I){var N={},P;O.forEach(I,function(k){for(var U=H.parent(k),Z,V;U;){if(Z=H.parent(U),Z?(V=N[Z],N[Z]=U):(V=P,P=U),V&&V!==U){L.setEdge(V,U);return}U=Z}})}},99506:function(X,et,M){var O=M(72361);X.exports=W;function W(H,L){return O.map(L,function(I){var N=H.inEdges(I);if(N.length){var P=O.reduce(N,function(k,U){var Z=H.edge(U),V=H.node(U.v);return{sum:k.sum+Z.weight*V.order,weight:k.weight+Z.weight}},{sum:0,weight:0});return{v:I,barycenter:P.sum/P.weight,weight:P.weight}}else return{v:I}})}},59105:function(X,et,M){var O=M(72361),W=M(76626).Graph;X.exports=H;function H(I,N,P){var k=L(I),U=new W({compound:!0}).setGraph({root:k}).setDefaultNodeLabel(function(Z){return I.node(Z)});return O.forEach(I.nodes(),function(Z){var V=I.node(Z),Y=I.parent(Z);(V.rank===N||V.minRank<=N&&N<=V.maxRank)&&(U.setNode(Z),U.setParent(Z,Y||k),O.forEach(I[P](Z),function(nt){var rt=nt.v===Z?nt.w:nt.v,ft=U.edge(rt,Z),ct=O.isUndefined(ft)?0:ft.weight;U.setEdge(rt,Z,{weight:I.edge(nt).weight+ct})}),O.has(V,"minRank")&&U.setNode(Z,{borderLeft:V.borderLeft[N],borderRight:V.borderRight[N]}))}),U}function L(I){for(var N;I.hasNode(N=O.uniqueId("_root")););return N}},45456:function(X,et,M){"use strict";var O=M(72361);X.exports=W;function W(L,I){for(var N=0,P=1;P<I.length;++P)N+=H(L,I[P-1],I[P]);return N}function H(L,I,N){for(var P=O.zipObject(N,O.map(N,function(nt,rt){return rt})),k=O.flatten(O.map(I,function(nt){return O.sortBy(O.map(L.outEdges(nt),function(rt){return{pos:P[rt.w],weight:L.edge(rt).weight}}),"pos")}),!0),U=1;U<N.length;)U<<=1;var Z=2*U-1;U-=1;var V=O.map(new Array(Z),function(){return 0}),Y=0;return O.forEach(k.forEach(function(nt){var rt=nt.pos+U;V[rt]+=nt.weight;for(var ft=0;rt>0;)rt%2&&(ft+=V[rt+1]),rt=rt-1>>1,V[rt]+=nt.weight;Y+=nt.weight*ft})),Y}},62852:function(X,et,M){"use strict";var O=M(72361),W=M(18043),H=M(45456),L=M(86490),I=M(59105),N=M(52205),P=M(76626).Graph,k=M(53063);X.exports=U;function U(nt){var rt=k.maxRank(nt),ft=Z(nt,O.range(1,rt+1),"inEdges"),ct=Z(nt,O.range(rt-1,-1,-1),"outEdges"),it=W(nt);Y(nt,it);for(var vt=Number.POSITIVE_INFINITY,gt,yt=0,mt=0;mt<4;++yt,++mt){V(yt%2?ft:ct,yt%4>=2),it=k.buildLayerMatrix(nt);var Mt=H(nt,it);Mt<vt&&(mt=0,gt=O.cloneDeep(it),vt=Mt)}Y(nt,gt)}function Z(nt,rt,ft){return O.map(rt,function(ct){return I(nt,ct,ft)})}function V(nt,rt){var ft=new P;O.forEach(nt,function(ct){var it=ct.graph().root,vt=L(ct,it,ft,rt);O.forEach(vt.vs,function(gt,yt){ct.node(gt).order=yt}),N(ct,ft,vt.vs)})}function Y(nt,rt){O.forEach(rt,function(ft){O.forEach(ft,function(ct,it){nt.node(ct).order=it})})}},18043:function(X,et,M){"use strict";var O=M(72361);X.exports=W;function W(H){var L={},I=O.filter(H.nodes(),function(Z){return!H.children(Z).length}),N=O.max(O.map(I,function(Z){return H.node(Z).rank})),P=O.map(O.range(N+1),function(){return[]});function k(Z){if(!O.has(L,Z)){L[Z]=!0;var V=H.node(Z);P[V.rank].push(Z),O.forEach(H.successors(Z),k)}}var U=O.sortBy(I,function(Z){return H.node(Z).rank});return O.forEach(U,k),P}},45926:function(X,et,M){"use strict";var O=M(72361);X.exports=W;function W(I,N){var P={};O.forEach(I,function(U,Z){var V=P[U.v]={indegree:0,in:[],out:[],vs:[U.v],i:Z};O.isUndefined(U.barycenter)||(V.barycenter=U.barycenter,V.weight=U.weight)}),O.forEach(N.edges(),function(U){var Z=P[U.v],V=P[U.w];!O.isUndefined(Z)&&!O.isUndefined(V)&&(V.indegree++,Z.out.push(P[U.w]))});var k=O.filter(P,function(U){return!U.indegree});return H(k)}function H(I){var N=[];function P(Z){return function(V){V.merged||(O.isUndefined(V.barycenter)||O.isUndefined(Z.barycenter)||V.barycenter>=Z.barycenter)&&L(Z,V)}}function k(Z){return function(V){V.in.push(Z),--V.indegree===0&&I.push(V)}}for(;I.length;){var U=I.pop();N.push(U),O.forEach(U.in.reverse(),P(U)),O.forEach(U.out,k(U))}return O.map(O.filter(N,function(Z){return!Z.merged}),function(Z){return O.pick(Z,["vs","i","barycenter","weight"])})}function L(I,N){var P=0,k=0;I.weight&&(P+=I.barycenter*I.weight,k+=I.weight),N.weight&&(P+=N.barycenter*N.weight,k+=N.weight),I.vs=N.vs.concat(I.vs),I.barycenter=P/k,I.weight=k,I.i=Math.min(N.i,I.i),N.merged=!0}},86490:function(X,et,M){var O=M(72361),W=M(99506),H=M(45926),L=M(1349);X.exports=I;function I(k,U,Z,V){var Y=k.children(U),nt=k.node(U),rt=nt?nt.borderLeft:void 0,ft=nt?nt.borderRight:void 0,ct={};rt&&(Y=O.filter(Y,function(Mt){return Mt!==rt&&Mt!==ft}));var it=W(k,Y);O.forEach(it,function(Mt){if(k.children(Mt.v).length){var Ct=I(k,Mt.v,Z,V);ct[Mt.v]=Ct,O.has(Ct,"barycenter")&&P(Mt,Ct)}});var vt=H(it,Z);N(vt,ct);var gt=L(vt,V);if(rt&&(gt.vs=O.flatten([rt,gt.vs,ft],!0),k.predecessors(rt).length)){var yt=k.node(k.predecessors(rt)[0]),mt=k.node(k.predecessors(ft)[0]);O.has(gt,"barycenter")||(gt.barycenter=0,gt.weight=0),gt.barycenter=(gt.barycenter*gt.weight+yt.order+mt.order)/(gt.weight+2),gt.weight+=2}return gt}function N(k,U){O.forEach(k,function(Z){Z.vs=O.flatten(Z.vs.map(function(V){return U[V]?U[V].vs:V}),!0)})}function P(k,U){O.isUndefined(k.barycenter)?(k.barycenter=U.barycenter,k.weight=U.weight):(k.barycenter=(k.barycenter*k.weight+U.barycenter*U.weight)/(k.weight+U.weight),k.weight+=U.weight)}},1349:function(X,et,M){var O=M(72361),W=M(53063);X.exports=H;function H(N,P){var k=W.partition(N,function(ct){return O.has(ct,"barycenter")}),U=k.lhs,Z=O.sortBy(k.rhs,function(ct){return-ct.i}),V=[],Y=0,nt=0,rt=0;U.sort(I(!!P)),rt=L(V,Z,rt),O.forEach(U,function(ct){rt+=ct.vs.length,V.push(ct.vs),Y+=ct.barycenter*ct.weight,nt+=ct.weight,rt=L(V,Z,rt)});var ft={vs:O.flatten(V,!0)};return nt&&(ft.barycenter=Y/nt,ft.weight=nt),ft}function L(N,P,k){for(var U;P.length&&(U=O.last(P)).i<=k;)P.pop(),N.push(U.vs),k++;return k}function I(N){return function(P,k){return P.barycenter<k.barycenter?-1:P.barycenter>k.barycenter?1:N?k.i-P.i:P.i-k.i}}},71970:function(X,et,M){var O=M(72361);X.exports=W;function W(I){var N=L(I);O.forEach(I.graph().dummyChains,function(P){for(var k=I.node(P),U=k.edgeObj,Z=H(I,N,U.v,U.w),V=Z.path,Y=Z.lca,nt=0,rt=V[nt],ft=!0;P!==U.w;){if(k=I.node(P),ft){for(;(rt=V[nt])!==Y&&I.node(rt).maxRank<k.rank;)nt++;rt===Y&&(ft=!1)}if(!ft){for(;nt<V.length-1&&I.node(rt=V[nt+1]).minRank<=k.rank;)nt++;rt=V[nt]}I.setParent(P,rt),P=I.successors(P)[0]}})}function H(I,N,P,k){var U=[],Z=[],V=Math.min(N[P].low,N[k].low),Y=Math.max(N[P].lim,N[k].lim),nt,rt;nt=P;do nt=I.parent(nt),U.push(nt);while(nt&&(N[nt].low>V||Y>N[nt].lim));for(rt=nt,nt=k;(nt=I.parent(nt))!==rt;)Z.push(nt);return{path:U.concat(Z.reverse()),lca:rt}}function L(I){var N={},P=0;function k(U){var Z=P;O.forEach(I.children(U),k),N[U]={low:Z,lim:P++}}return O.forEach(I.children(),k),N}},92080:function(X,et,M){"use strict";var O=M(72361),W=M(76626).Graph,H=M(53063);X.exports={positionX:ft,findType1Conflicts:L,findType2Conflicts:I,addConflict:P,hasConflict:k,verticalAlignment:U,horizontalCompaction:Z,alignCoordinates:nt,findSmallestWidthAlignment:Y,balance:rt};function L(vt,gt){var yt={};function mt(Mt,Ct){var Nt=0,qt=0,Gt=Mt.length,re=O.last(Ct);return O.forEach(Ct,function(de,ue){var Me=N(vt,de),Ve=Me?vt.node(Me).order:Gt;(Me||de===re)&&(O.forEach(Ct.slice(qt,ue+1),function(dn){O.forEach(vt.predecessors(dn),function(Xn){var Xr=vt.node(Xn),Vi=Xr.order;(Vi<Nt||Ve<Vi)&&!(Xr.dummy&&vt.node(dn).dummy)&&P(yt,Xn,dn)})}),qt=ue+1,Nt=Ve)}),Ct}return O.reduce(gt,mt),yt}function I(vt,gt){var yt={};function mt(Ct,Nt,qt,Gt,re){var de;O.forEach(O.range(Nt,qt),function(ue){de=Ct[ue],vt.node(de).dummy&&O.forEach(vt.predecessors(de),function(Me){var Ve=vt.node(Me);Ve.dummy&&(Ve.order<Gt||Ve.order>re)&&P(yt,Me,de)})})}function Mt(Ct,Nt){var qt=-1,Gt,re=0;return O.forEach(Nt,function(de,ue){if(vt.node(de).dummy==="border"){var Me=vt.predecessors(de);Me.length&&(Gt=vt.node(Me[0]).order,mt(Nt,re,ue,qt,Gt),re=ue,qt=Gt)}mt(Nt,re,Nt.length,Gt,Ct.length)}),Nt}return O.reduce(gt,Mt),yt}function N(vt,gt){if(vt.node(gt).dummy)return O.find(vt.predecessors(gt),function(yt){return vt.node(yt).dummy})}function P(vt,gt,yt){if(gt>yt){var mt=gt;gt=yt,yt=mt}var Mt=vt[gt];Mt||(vt[gt]=Mt={}),Mt[yt]=!0}function k(vt,gt,yt){if(gt>yt){var mt=gt;gt=yt,yt=mt}return O.has(vt[gt],yt)}function U(vt,gt,yt,mt){var Mt={},Ct={},Nt={};return O.forEach(gt,function(qt){O.forEach(qt,function(Gt,re){Mt[Gt]=Gt,Ct[Gt]=Gt,Nt[Gt]=re})}),O.forEach(gt,function(qt){var Gt=-1;O.forEach(qt,function(re){var de=mt(re);if(de.length){de=O.sortBy(de,function(Xn){return Nt[Xn]});for(var ue=(de.length-1)/2,Me=Math.floor(ue),Ve=Math.ceil(ue);Me<=Ve;++Me){var dn=de[Me];Ct[re]===re&&Gt<Nt[dn]&&!k(yt,re,dn)&&(Ct[dn]=re,Ct[re]=Mt[re]=Mt[dn],Gt=Nt[dn])}}})}),{root:Mt,align:Ct}}function Z(vt,gt,yt,mt,Mt){var Ct={},Nt=V(vt,gt,yt,Mt),qt=Mt?"borderLeft":"borderRight";function Gt(ue,Me){for(var Ve=Nt.nodes(),dn=Ve.pop(),Xn={};dn;)Xn[dn]?ue(dn):(Xn[dn]=!0,Ve.push(dn),Ve=Ve.concat(Me(dn))),dn=Ve.pop()}function re(ue){Ct[ue]=Nt.inEdges(ue).reduce(function(Me,Ve){return Math.max(Me,Ct[Ve.v]+Nt.edge(Ve))},0)}function de(ue){var Me=Nt.outEdges(ue).reduce(function(dn,Xn){return Math.min(dn,Ct[Xn.w]-Nt.edge(Xn))},Number.POSITIVE_INFINITY),Ve=vt.node(ue);Me!==Number.POSITIVE_INFINITY&&Ve.borderType!==qt&&(Ct[ue]=Math.max(Ct[ue],Me))}return Gt(re,Nt.predecessors.bind(Nt)),Gt(de,Nt.successors.bind(Nt)),O.forEach(mt,function(ue){Ct[ue]=Ct[yt[ue]]}),Ct}function V(vt,gt,yt,mt){var Mt=new W,Ct=vt.graph(),Nt=ct(Ct.nodesep,Ct.edgesep,mt);return O.forEach(gt,function(qt){var Gt;O.forEach(qt,function(re){var de=yt[re];if(Mt.setNode(de),Gt){var ue=yt[Gt],Me=Mt.edge(ue,de);Mt.setEdge(ue,de,Math.max(Nt(vt,re,Gt),Me||0))}Gt=re})}),Mt}function Y(vt,gt){return O.minBy(O.values(gt),function(yt){var mt=Number.NEGATIVE_INFINITY,Mt=Number.POSITIVE_INFINITY;return O.forIn(yt,function(Ct,Nt){var qt=it(vt,Nt)/2;mt=Math.max(Ct+qt,mt),Mt=Math.min(Ct-qt,Mt)}),mt-Mt})}function nt(vt,gt){var yt=O.values(gt),mt=O.min(yt),Mt=O.max(yt);O.forEach(["u","d"],function(Ct){O.forEach(["l","r"],function(Nt){var qt=Ct+Nt,Gt=vt[qt],re;if(Gt!==gt){var de=O.values(Gt);re=Nt==="l"?mt-O.min(de):Mt-O.max(de),re&&(vt[qt]=O.mapValues(Gt,function(ue){return ue+re}))}})})}function rt(vt,gt){return O.mapValues(vt.ul,function(yt,mt){if(gt)return vt[gt.toLowerCase()][mt];var Mt=O.sortBy(O.map(vt,mt));return(Mt[1]+Mt[2])/2})}function ft(vt){var gt=H.buildLayerMatrix(vt),yt=O.merge(L(vt,gt),I(vt,gt)),mt={},Mt;O.forEach(["u","d"],function(Nt){Mt=Nt==="u"?gt:O.values(gt).reverse(),O.forEach(["l","r"],function(qt){qt==="r"&&(Mt=O.map(Mt,function(ue){return O.values(ue).reverse()}));var Gt=(Nt==="u"?vt.predecessors:vt.successors).bind(vt),re=U(vt,Mt,yt,Gt),de=Z(vt,Mt,re.root,re.align,qt==="r");qt==="r"&&(de=O.mapValues(de,function(ue){return-ue})),mt[Nt+qt]=de})});var Ct=Y(vt,mt);return nt(mt,Ct),rt(mt,vt.graph().align)}function ct(vt,gt,yt){return function(mt,Mt,Ct){var Nt=mt.node(Mt),qt=mt.node(Ct),Gt=0,re;if(Gt+=Nt.width/2,O.has(Nt,"labelpos"))switch(Nt.labelpos.toLowerCase()){case"l":re=-Nt.width/2;break;case"r":re=Nt.width/2;break}if(re&&(Gt+=yt?re:-re),re=0,Gt+=(Nt.dummy?gt:vt)/2,Gt+=(qt.dummy?gt:vt)/2,Gt+=qt.width/2,O.has(qt,"labelpos"))switch(qt.labelpos.toLowerCase()){case"l":re=qt.width/2;break;case"r":re=-qt.width/2;break}return re&&(Gt+=yt?re:-re),re=0,Gt}}function it(vt,gt){return vt.node(gt).width}},93021:function(X,et,M){"use strict";var O=M(72361),W=M(53063),H=M(92080).positionX;X.exports=L;function L(N){N=W.asNonCompoundGraph(N),I(N),O.forEach(H(N),function(P,k){N.node(k).x=P})}function I(N){var P=W.buildLayerMatrix(N),k=N.graph().ranksep,U=0;O.forEach(P,function(Z){var V=O.max(O.map(Z,function(Y){return N.node(Y).height}));O.forEach(Z,function(Y){N.node(Y).y=U+V/2}),U+=V+k})}},61031:function(X,et,M){"use strict";var O=M(72361),W=M(76626).Graph,H=M(2416).slack;X.exports=L;function L(k){var U=new W({directed:!1}),Z=k.nodes()[0],V=k.nodeCount();U.setNode(Z,{});for(var Y,nt;I(U,k)<V;)Y=N(U,k),nt=U.hasNode(Y.v)?H(k,Y):-H(k,Y),P(U,k,nt);return U}function I(k,U){function Z(V){O.forEach(U.nodeEdges(V),function(Y){var nt=Y.v,rt=V===nt?Y.w:nt;!k.hasNode(rt)&&!H(U,Y)&&(k.setNode(rt,{}),k.setEdge(V,rt,{}),Z(rt))})}return O.forEach(k.nodes(),Z),k.nodeCount()}function N(k,U){return O.minBy(U.edges(),function(Z){if(k.hasNode(Z.v)!==k.hasNode(Z.w))return H(U,Z)})}function P(k,U,Z){O.forEach(k.nodes(),function(V){U.node(V).rank+=Z})}},64505:function(X,et,M){"use strict";var O=M(2416),W=O.longestPath,H=M(61031),L=M(77076);X.exports=I;function I(U){switch(U.graph().ranker){case"network-simplex":k(U);break;case"tight-tree":P(U);break;case"longest-path":N(U);break;default:k(U)}}var N=W;function P(U){W(U),H(U)}function k(U){L(U)}},77076:function(X,et,M){"use strict";var O=M(72361),W=M(61031),H=M(2416).slack,L=M(2416).longestPath,I=M(76626).alg.preorder,N=M(76626).alg.postorder,P=M(53063).simplify;X.exports=k,k.initLowLimValues=Y,k.initCutValues=U,k.calcCutValue=V,k.leaveEdge=rt,k.enterEdge=ft,k.exchangeEdges=ct;function k(yt){yt=P(yt),L(yt);var mt=W(yt);Y(mt),U(mt,yt);for(var Mt,Ct;Mt=rt(mt);)Ct=ft(mt,yt,Mt),ct(mt,yt,Mt,Ct)}function U(yt,mt){var Mt=N(yt,yt.nodes());Mt=Mt.slice(0,Mt.length-1),O.forEach(Mt,function(Ct){Z(yt,mt,Ct)})}function Z(yt,mt,Mt){var Ct=yt.node(Mt),Nt=Ct.parent;yt.edge(Mt,Nt).cutvalue=V(yt,mt,Mt)}function V(yt,mt,Mt){var Ct=yt.node(Mt),Nt=Ct.parent,qt=!0,Gt=mt.edge(Mt,Nt),re=0;return Gt||(qt=!1,Gt=mt.edge(Nt,Mt)),re=Gt.weight,O.forEach(mt.nodeEdges(Mt),function(de){var ue=de.v===Mt,Me=ue?de.w:de.v;if(Me!==Nt){var Ve=ue===qt,dn=mt.edge(de).weight;if(re+=Ve?dn:-dn,vt(yt,Mt,Me)){var Xn=yt.edge(Mt,Me).cutvalue;re+=Ve?-Xn:Xn}}}),re}function Y(yt,mt){arguments.length<2&&(mt=yt.nodes()[0]),nt(yt,{},1,mt)}function nt(yt,mt,Mt,Ct,Nt){var qt=Mt,Gt=yt.node(Ct);return mt[Ct]=!0,O.forEach(yt.neighbors(Ct),function(re){O.has(mt,re)||(Mt=nt(yt,mt,Mt,re,Ct))}),Gt.low=qt,Gt.lim=Mt++,Nt?Gt.parent=Nt:delete Gt.parent,Mt}function rt(yt){return O.find(yt.edges(),function(mt){return yt.edge(mt).cutvalue<0})}function ft(yt,mt,Mt){var Ct=Mt.v,Nt=Mt.w;mt.hasEdge(Ct,Nt)||(Ct=Mt.w,Nt=Mt.v);var qt=yt.node(Ct),Gt=yt.node(Nt),re=qt,de=!1;qt.lim>Gt.lim&&(re=Gt,de=!0);var ue=O.filter(mt.edges(),function(Me){return de===gt(yt,yt.node(Me.v),re)&&de!==gt(yt,yt.node(Me.w),re)});return O.minBy(ue,function(Me){return H(mt,Me)})}function ct(yt,mt,Mt,Ct){var Nt=Mt.v,qt=Mt.w;yt.removeEdge(Nt,qt),yt.setEdge(Ct.v,Ct.w,{}),Y(yt),U(yt,mt),it(yt,mt)}function it(yt,mt){var Mt=O.find(yt.nodes(),function(Nt){return!mt.node(Nt).parent}),Ct=I(yt,Mt);Ct=Ct.slice(1),O.forEach(Ct,function(Nt){var qt=yt.node(Nt).parent,Gt=mt.edge(Nt,qt),re=!1;Gt||(Gt=mt.edge(qt,Nt),re=!0),mt.node(Nt).rank=mt.node(qt).rank+(re?Gt.minlen:-Gt.minlen)})}function vt(yt,mt,Mt){return yt.hasEdge(mt,Mt)}function gt(yt,mt,Mt){return Mt.low<=mt.lim&&mt.lim<=Mt.lim}},2416:function(X,et,M){"use strict";var O=M(72361);X.exports={longestPath:W,slack:H};function W(L){var I={};function N(P){var k=L.node(P);if(O.has(I,P))return k.rank;I[P]=!0;var U=O.min(O.map(L.outEdges(P),function(Z){return N(Z.w)-L.edge(Z).minlen}));return(U===Number.POSITIVE_INFINITY||U===void 0||U===null)&&(U=0),k.rank=U}O.forEach(L.sources(),N)}function H(L,I){return L.node(I.w).rank-L.node(I.v).rank-L.edge(I).minlen}},53063:function(X,et,M){"use strict";var O=M(72361),W=M(76626).Graph;X.exports={addDummyNode:H,simplify:L,asNonCompoundGraph:I,successorWeights:N,predecessorWeights:P,intersectRect:k,buildLayerMatrix:U,normalizeRanks:Z,removeEmptyRanks:V,addBorderNode:Y,maxRank:nt,partition:rt,time:ft,notime:ct};function H(it,vt,gt,yt){var mt;do mt=O.uniqueId(yt);while(it.hasNode(mt));return gt.dummy=vt,it.setNode(mt,gt),mt}function L(it){var vt=new W().setGraph(it.graph());return O.forEach(it.nodes(),function(gt){vt.setNode(gt,it.node(gt))}),O.forEach(it.edges(),function(gt){var yt=vt.edge(gt.v,gt.w)||{weight:0,minlen:1},mt=it.edge(gt);vt.setEdge(gt.v,gt.w,{weight:yt.weight+mt.weight,minlen:Math.max(yt.minlen,mt.minlen)})}),vt}function I(it){var vt=new W({multigraph:it.isMultigraph()}).setGraph(it.graph());return O.forEach(it.nodes(),function(gt){it.children(gt).length||vt.setNode(gt,it.node(gt))}),O.forEach(it.edges(),function(gt){vt.setEdge(gt,it.edge(gt))}),vt}function N(it){var vt=O.map(it.nodes(),function(gt){var yt={};return O.forEach(it.outEdges(gt),function(mt){yt[mt.w]=(yt[mt.w]||0)+it.edge(mt).weight}),yt});return O.zipObject(it.nodes(),vt)}function P(it){var vt=O.map(it.nodes(),function(gt){var yt={};return O.forEach(it.inEdges(gt),function(mt){yt[mt.v]=(yt[mt.v]||0)+it.edge(mt).weight}),yt});return O.zipObject(it.nodes(),vt)}function k(it,vt){var gt=it.x,yt=it.y,mt=vt.x-gt,Mt=vt.y-yt,Ct=it.width/2,Nt=it.height/2;if(!mt&&!Mt)throw new Error("Not possible to find intersection inside of the rectangle");var qt,Gt;return Math.abs(Mt)*Ct>Math.abs(mt)*Nt?(Mt<0&&(Nt=-Nt),qt=Nt*mt/Mt,Gt=Nt):(mt<0&&(Ct=-Ct),qt=Ct,Gt=Ct*Mt/mt),{x:gt+qt,y:yt+Gt}}function U(it){var vt=O.map(O.range(nt(it)+1),function(){return[]});return O.forEach(it.nodes(),function(gt){var yt=it.node(gt),mt=yt.rank;O.isUndefined(mt)||(vt[mt][yt.order]=gt)}),vt}function Z(it){var vt=O.min(O.map(it.nodes(),function(gt){return it.node(gt).rank}));O.forEach(it.nodes(),function(gt){var yt=it.node(gt);O.has(yt,"rank")&&(yt.rank-=vt)})}function V(it){var vt=O.min(O.map(it.nodes(),function(Mt){return it.node(Mt).rank})),gt=[];O.forEach(it.nodes(),function(Mt){var Ct=it.node(Mt).rank-vt;gt[Ct]||(gt[Ct]=[]),gt[Ct].push(Mt)});var yt=0,mt=it.graph().nodeRankFactor;O.forEach(gt,function(Mt,Ct){O.isUndefined(Mt)&&Ct%mt!==0?--yt:yt&&O.forEach(Mt,function(Nt){it.node(Nt).rank+=yt})})}function Y(it,vt,gt,yt){var mt={width:0,height:0};return arguments.length>=4&&(mt.rank=gt,mt.order=yt),H(it,"border",mt,vt)}function nt(it){return O.max(O.map(it.nodes(),function(vt){var gt=it.node(vt).rank;if(!O.isUndefined(gt))return gt}))}function rt(it,vt){var gt={lhs:[],rhs:[]};return O.forEach(it,function(yt){vt(yt)?gt.lhs.push(yt):gt.rhs.push(yt)}),gt}function ft(it,vt){var gt=O.now();try{return vt()}finally{console.log(it+" time: "+(O.now()-gt)+"ms")}}function ct(it,vt){return vt()}},11897:function(X){X.exports="0.8.5"},37271:function(X){"use strict";var et=Object.prototype.hasOwnProperty,M="~";function O(){}Object.create&&(O.prototype=Object.create(null),new O().__proto__||(M=!1));function W(N,P,k){this.fn=N,this.context=P,this.once=k||!1}function H(N,P,k,U,Z){if(typeof k!="function")throw new TypeError("The listener must be a function");var V=new W(k,U||N,Z),Y=M?M+P:P;return N._events[Y]?N._events[Y].fn?N._events[Y]=[N._events[Y],V]:N._events[Y].push(V):(N._events[Y]=V,N._eventsCount++),N}function L(N,P){--N._eventsCount===0?N._events=new O:delete N._events[P]}function I(){this._events=new O,this._eventsCount=0}I.prototype.eventNames=function(){var P=[],k,U;if(this._eventsCount===0)return P;for(U in k=this._events)et.call(k,U)&&P.push(M?U.slice(1):U);return Object.getOwnPropertySymbols?P.concat(Object.getOwnPropertySymbols(k)):P},I.prototype.listeners=function(P){var k=M?M+P:P,U=this._events[k];if(!U)return[];if(U.fn)return[U.fn];for(var Z=0,V=U.length,Y=new Array(V);Z<V;Z++)Y[Z]=U[Z].fn;return Y},I.prototype.listenerCount=function(P){var k=M?M+P:P,U=this._events[k];return U?U.fn?1:U.length:0},I.prototype.emit=function(P,k,U,Z,V,Y){var nt=M?M+P:P;if(!this._events[nt])return!1;var rt=this._events[nt],ft=arguments.length,ct,it;if(rt.fn){switch(rt.once&&this.removeListener(P,rt.fn,void 0,!0),ft){case 1:return rt.fn.call(rt.context),!0;case 2:return rt.fn.call(rt.context,k),!0;case 3:return rt.fn.call(rt.context,k,U),!0;case 4:return rt.fn.call(rt.context,k,U,Z),!0;case 5:return rt.fn.call(rt.context,k,U,Z,V),!0;case 6:return rt.fn.call(rt.context,k,U,Z,V,Y),!0}for(it=1,ct=new Array(ft-1);it<ft;it++)ct[it-1]=arguments[it];rt.fn.apply(rt.context,ct)}else{var vt=rt.length,gt;for(it=0;it<vt;it++)switch(rt[it].once&&this.removeListener(P,rt[it].fn,void 0,!0),ft){case 1:rt[it].fn.call(rt[it].context);break;case 2:rt[it].fn.call(rt[it].context,k);break;case 3:rt[it].fn.call(rt[it].context,k,U);break;case 4:rt[it].fn.call(rt[it].context,k,U,Z);break;default:if(!ct)for(gt=1,ct=new Array(ft-1);gt<ft;gt++)ct[gt-1]=arguments[gt];rt[it].fn.apply(rt[it].context,ct)}}return!0},I.prototype.on=function(P,k,U){return H(this,P,k,U,!1)},I.prototype.once=function(P,k,U){return H(this,P,k,U,!0)},I.prototype.removeListener=function(P,k,U,Z){var V=M?M+P:P;if(!this._events[V])return this;if(!k)return L(this,V),this;var Y=this._events[V];if(Y.fn)Y.fn===k&&(!Z||Y.once)&&(!U||Y.context===U)&&L(this,V);else{for(var nt=0,rt=[],ft=Y.length;nt<ft;nt++)(Y[nt].fn!==k||Z&&!Y[nt].once||U&&Y[nt].context!==U)&&rt.push(Y[nt]);rt.length?this._events[V]=rt.length===1?rt[0]:rt:L(this,V)}return this},I.prototype.removeAllListeners=function(P){var k;return P?(k=M?M+P:P,this._events[k]&&L(this,k)):(this._events=new O,this._eventsCount=0),this},I.prototype.off=I.prototype.removeListener,I.prototype.addListener=I.prototype.on,I.prefixed=M,I.EventEmitter=I,X.exports=I},75172:function(X,et,M){var O=M(89224);X.exports={Graph:O.Graph,json:M(17401),alg:M(54613),version:O.version}},91606:function(X,et,M){var O=M(95329);X.exports=W;function W(H){var L={},I=[],N;function P(k){O.has(L,k)||(L[k]=!0,N.push(k),O.each(H.successors(k),P),O.each(H.predecessors(k),P))}return O.each(H.nodes(),function(k){N=[],P(k),N.length&&I.push(N)}),I}},21482:function(X,et,M){var O=M(95329);X.exports=W;function W(L,I,N){O.isArray(I)||(I=[I]);var P=(L.isDirected()?L.successors:L.neighbors).bind(L),k=[],U={};return O.each(I,function(Z){if(!L.hasNode(Z))throw new Error("Graph does not have node: "+Z);H(L,Z,N==="post",U,P,k)}),k}function H(L,I,N,P,k,U){O.has(P,I)||(P[I]=!0,N||U.push(I),O.each(k(I),function(Z){H(L,Z,N,P,k,U)}),N&&U.push(I))}},40845:function(X,et,M){var O=M(13746),W=M(95329);X.exports=H;function H(L,I,N){return W.transform(L.nodes(),function(P,k){P[k]=O(L,k,I,N)},{})}},13746:function(X,et,M){var O=M(95329),W=M(36614);X.exports=L;var H=O.constant(1);function L(N,P,k,U){return I(N,String(P),k||H,U||function(Z){return N.outEdges(Z)})}function I(N,P,k,U){var Z={},V=new W,Y,nt,rt=function(ft){var ct=ft.v!==Y?ft.v:ft.w,it=Z[ct],vt=k(ft),gt=nt.distance+vt;if(vt<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+ft+" Weight: "+vt);gt<it.distance&&(it.distance=gt,it.predecessor=Y,V.decrease(ct,gt))};for(N.nodes().forEach(function(ft){var ct=ft===P?0:Number.POSITIVE_INFINITY;Z[ft]={distance:ct},V.add(ft,ct)});V.size()>0&&(Y=V.removeMin(),nt=Z[Y],nt.distance!==Number.POSITIVE_INFINITY);)U(Y).forEach(rt);return Z}},59324:function(X,et,M){var O=M(95329),W=M(94558);X.exports=H;function H(L){return O.filter(W(L),function(I){return I.length>1||I.length===1&&L.hasEdge(I[0],I[0])})}},22893:function(X,et,M){var O=M(95329);X.exports=H;var W=O.constant(1);function H(I,N,P){return L(I,N||W,P||function(k){return I.outEdges(k)})}function L(I,N,P){var k={},U=I.nodes();return U.forEach(function(Z){k[Z]={},k[Z][Z]={distance:0},U.forEach(function(V){Z!==V&&(k[Z][V]={distance:Number.POSITIVE_INFINITY})}),P(Z).forEach(function(V){var Y=V.v===Z?V.w:V.v,nt=N(V);k[Z][Y]={distance:nt,predecessor:Z}})}),U.forEach(function(Z){var V=k[Z];U.forEach(function(Y){var nt=k[Y];U.forEach(function(rt){var ft=nt[Z],ct=V[rt],it=nt[rt],vt=ft.distance+ct.distance;vt<it.distance&&(it.distance=vt,it.predecessor=ct.predecessor)})})}),k}},54613:function(X,et,M){X.exports={components:M(91606),dijkstra:M(13746),dijkstraAll:M(40845),findCycles:M(59324),floydWarshall:M(22893),isAcyclic:M(588),postorder:M(98049),preorder:M(67158),prim:M(66058),tarjan:M(94558),topsort:M(7793)}},588:function(X,et,M){var O=M(7793);X.exports=W;function W(H){try{O(H)}catch(L){if(L instanceof O.CycleException)return!1;throw L}return!0}},98049:function(X,et,M){var O=M(21482);X.exports=W;function W(H,L){return O(H,L,"post")}},67158:function(X,et,M){var O=M(21482);X.exports=W;function W(H,L){return O(H,L,"pre")}},66058:function(X,et,M){var O=M(95329),W=M(6349),H=M(36614);X.exports=L;function L(I,N){var P=new W,k={},U=new H,Z;function V(nt){var rt=nt.v===Z?nt.w:nt.v,ft=U.priority(rt);if(ft!==void 0){var ct=N(nt);ct<ft&&(k[rt]=Z,U.decrease(rt,ct))}}if(I.nodeCount()===0)return P;O.each(I.nodes(),function(nt){U.add(nt,Number.POSITIVE_INFINITY),P.setNode(nt)}),U.decrease(I.nodes()[0],0);for(var Y=!1;U.size()>0;){if(Z=U.removeMin(),O.has(k,Z))P.setEdge(Z,k[Z]);else{if(Y)throw new Error("Input graph is not connected: "+I);Y=!0}I.nodeEdges(Z).forEach(V)}return P}},94558:function(X,et,M){var O=M(95329);X.exports=W;function W(H){var L=0,I=[],N={},P=[];function k(U){var Z=N[U]={onStack:!0,lowlink:L,index:L++};if(I.push(U),H.successors(U).forEach(function(nt){O.has(N,nt)?N[nt].onStack&&(Z.lowlink=Math.min(Z.lowlink,N[nt].index)):(k(nt),Z.lowlink=Math.min(Z.lowlink,N[nt].lowlink))}),Z.lowlink===Z.index){var V=[],Y;do Y=I.pop(),N[Y].onStack=!1,V.push(Y);while(U!==Y);P.push(V)}}return H.nodes().forEach(function(U){O.has(N,U)||k(U)}),P}},7793:function(X,et,M){var O=M(95329);X.exports=W,W.CycleException=H;function W(L){var I={},N={},P=[];function k(U){if(O.has(N,U))throw new H;O.has(I,U)||(N[U]=!0,I[U]=!0,O.each(L.predecessors(U),k),delete N[U],P.push(U))}if(O.each(L.sinks(),k),O.size(I)!==L.nodeCount())throw new H;return P}function H(){}H.prototype=new Error},36614:function(X,et,M){var O=M(95329);X.exports=W;function W(){this._arr=[],this._keyIndices={}}W.prototype.size=function(){return this._arr.length},W.prototype.keys=function(){return this._arr.map(function(H){return H.key})},W.prototype.has=function(H){return O.has(this._keyIndices,H)},W.prototype.priority=function(H){var L=this._keyIndices[H];if(L!==void 0)return this._arr[L].priority},W.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},W.prototype.add=function(H,L){var I=this._keyIndices;if(H=String(H),!O.has(I,H)){var N=this._arr,P=N.length;return I[H]=P,N.push({key:H,priority:L}),this._decrease(P),!0}return!1},W.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var H=this._arr.pop();return delete this._keyIndices[H.key],this._heapify(0),H.key},W.prototype.decrease=function(H,L){var I=this._keyIndices[H];if(L>this._arr[I].priority)throw new Error("New priority is greater than current priority. Key: "+H+" Old: "+this._arr[I].priority+" New: "+L);this._arr[I].priority=L,this._decrease(I)},W.prototype._heapify=function(H){var L=this._arr,I=2*H,N=I+1,P=H;I<L.length&&(P=L[I].priority<L[P].priority?I:P,N<L.length&&(P=L[N].priority<L[P].priority?N:P),P!==H&&(this._swap(H,P),this._heapify(P)))},W.prototype._decrease=function(H){for(var L=this._arr,I=L[H].priority,N;H!==0&&(N=H>>1,!(L[N].priority<I));)this._swap(H,N),H=N},W.prototype._swap=function(H,L){var I=this._arr,N=this._keyIndices,P=I[H],k=I[L];I[H]=k,I[L]=P,N[k.key]=H,N[P.key]=L}},6349:function(X,et,M){"use strict";var O=M(95329);X.exports=I;var W="\0",H="\0",L="";function I(V){this._isDirected=O.has(V,"directed")?V.directed:!0,this._isMultigraph=O.has(V,"multigraph")?V.multigraph:!1,this._isCompound=O.has(V,"compound")?V.compound:!1,this._label=void 0,this._defaultNodeLabelFn=O.constant(void 0),this._defaultEdgeLabelFn=O.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[H]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}I.prototype._nodeCount=0,I.prototype._edgeCount=0,I.prototype.isDirected=function(){return this._isDirected},I.prototype.isMultigraph=function(){return this._isMultigraph},I.prototype.isCompound=function(){return this._isCompound},I.prototype.setGraph=function(V){return this._label=V,this},I.prototype.graph=function(){return this._label},I.prototype.setDefaultNodeLabel=function(V){return O.isFunction(V)||(V=O.constant(V)),this._defaultNodeLabelFn=V,this},I.prototype.nodeCount=function(){return this._nodeCount},I.prototype.nodes=function(){return O.keys(this._nodes)},I.prototype.sources=function(){var V=this;return O.filter(this.nodes(),function(Y){return O.isEmpty(V._in[Y])})},I.prototype.sinks=function(){var V=this;return O.filter(this.nodes(),function(Y){return O.isEmpty(V._out[Y])})},I.prototype.setNodes=function(V,Y){var nt=arguments,rt=this;return O.each(V,function(ft){nt.length>1?rt.setNode(ft,Y):rt.setNode(ft)}),this},I.prototype.setNode=function(V,Y){return O.has(this._nodes,V)?(arguments.length>1&&(this._nodes[V]=Y),this):(this._nodes[V]=arguments.length>1?Y:this._defaultNodeLabelFn(V),this._isCompound&&(this._parent[V]=H,this._children[V]={},this._children[H][V]=!0),this._in[V]={},this._preds[V]={},this._out[V]={},this._sucs[V]={},++this._nodeCount,this)},I.prototype.node=function(V){return this._nodes[V]},I.prototype.hasNode=function(V){return O.has(this._nodes,V)},I.prototype.removeNode=function(V){var Y=this;if(O.has(this._nodes,V)){var nt=function(rt){Y.removeEdge(Y._edgeObjs[rt])};delete this._nodes[V],this._isCompound&&(this._removeFromParentsChildList(V),delete this._parent[V],O.each(this.children(V),function(rt){Y.setParent(rt)}),delete this._children[V]),O.each(O.keys(this._in[V]),nt),delete this._in[V],delete this._preds[V],O.each(O.keys(this._out[V]),nt),delete this._out[V],delete this._sucs[V],--this._nodeCount}return this},I.prototype.setParent=function(V,Y){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(O.isUndefined(Y))Y=H;else{Y+="";for(var nt=Y;!O.isUndefined(nt);nt=this.parent(nt))if(nt===V)throw new Error("Setting "+Y+" as parent of "+V+" would create a cycle");this.setNode(Y)}return this.setNode(V),this._removeFromParentsChildList(V),this._parent[V]=Y,this._children[Y][V]=!0,this},I.prototype._removeFromParentsChildList=function(V){delete this._children[this._parent[V]][V]},I.prototype.parent=function(V){if(this._isCompound){var Y=this._parent[V];if(Y!==H)return Y}},I.prototype.children=function(V){if(O.isUndefined(V)&&(V=H),this._isCompound){var Y=this._children[V];if(Y)return O.keys(Y)}else{if(V===H)return this.nodes();if(this.hasNode(V))return[]}},I.prototype.predecessors=function(V){var Y=this._preds[V];if(Y)return O.keys(Y)},I.prototype.successors=function(V){var Y=this._sucs[V];if(Y)return O.keys(Y)},I.prototype.neighbors=function(V){var Y=this.predecessors(V);if(Y)return O.union(Y,this.successors(V))},I.prototype.isLeaf=function(V){var Y;return this.isDirected()?Y=this.successors(V):Y=this.neighbors(V),Y.length===0},I.prototype.filterNodes=function(V){var Y=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});Y.setGraph(this.graph());var nt=this;O.each(this._nodes,function(ct,it){V(it)&&Y.setNode(it,ct)}),O.each(this._edgeObjs,function(ct){Y.hasNode(ct.v)&&Y.hasNode(ct.w)&&Y.setEdge(ct,nt.edge(ct))});var rt={};function ft(ct){var it=nt.parent(ct);return it===void 0||Y.hasNode(it)?(rt[ct]=it,it):it in rt?rt[it]:ft(it)}return this._isCompound&&O.each(Y.nodes(),function(ct){Y.setParent(ct,ft(ct))}),Y},I.prototype.setDefaultEdgeLabel=function(V){return O.isFunction(V)||(V=O.constant(V)),this._defaultEdgeLabelFn=V,this},I.prototype.edgeCount=function(){return this._edgeCount},I.prototype.edges=function(){return O.values(this._edgeObjs)},I.prototype.setPath=function(V,Y){var nt=this,rt=arguments;return O.reduce(V,function(ft,ct){return rt.length>1?nt.setEdge(ft,ct,Y):nt.setEdge(ft,ct),ct}),this},I.prototype.setEdge=function(){var V,Y,nt,rt,ft=!1,ct=arguments[0];typeof ct=="object"&&ct!==null&&"v"in ct?(V=ct.v,Y=ct.w,nt=ct.name,arguments.length===2&&(rt=arguments[1],ft=!0)):(V=ct,Y=arguments[1],nt=arguments[3],arguments.length>2&&(rt=arguments[2],ft=!0)),V=""+V,Y=""+Y,O.isUndefined(nt)||(nt=""+nt);var it=k(this._isDirected,V,Y,nt);if(O.has(this._edgeLabels,it))return ft&&(this._edgeLabels[it]=rt),this;if(!O.isUndefined(nt)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(V),this.setNode(Y),this._edgeLabels[it]=ft?rt:this._defaultEdgeLabelFn(V,Y,nt);var vt=U(this._isDirected,V,Y,nt);return V=vt.v,Y=vt.w,Object.freeze(vt),this._edgeObjs[it]=vt,N(this._preds[Y],V),N(this._sucs[V],Y),this._in[Y][it]=vt,this._out[V][it]=vt,this._edgeCount++,this},I.prototype.edge=function(V,Y,nt){var rt=arguments.length===1?Z(this._isDirected,arguments[0]):k(this._isDirected,V,Y,nt);return this._edgeLabels[rt]},I.prototype.hasEdge=function(V,Y,nt){var rt=arguments.length===1?Z(this._isDirected,arguments[0]):k(this._isDirected,V,Y,nt);return O.has(this._edgeLabels,rt)},I.prototype.removeEdge=function(V,Y,nt){var rt=arguments.length===1?Z(this._isDirected,arguments[0]):k(this._isDirected,V,Y,nt),ft=this._edgeObjs[rt];return ft&&(V=ft.v,Y=ft.w,delete this._edgeLabels[rt],delete this._edgeObjs[rt],P(this._preds[Y],V),P(this._sucs[V],Y),delete this._in[Y][rt],delete this._out[V][rt],this._edgeCount--),this},I.prototype.inEdges=function(V,Y){var nt=this._in[V];if(nt){var rt=O.values(nt);return Y?O.filter(rt,function(ft){return ft.v===Y}):rt}},I.prototype.outEdges=function(V,Y){var nt=this._out[V];if(nt){var rt=O.values(nt);return Y?O.filter(rt,function(ft){return ft.w===Y}):rt}},I.prototype.nodeEdges=function(V,Y){var nt=this.inEdges(V,Y);if(nt)return nt.concat(this.outEdges(V,Y))};function N(V,Y){V[Y]?V[Y]++:V[Y]=1}function P(V,Y){--V[Y]||delete V[Y]}function k(V,Y,nt,rt){var ft=""+Y,ct=""+nt;if(!V&&ft>ct){var it=ft;ft=ct,ct=it}return ft+L+ct+L+(O.isUndefined(rt)?W:rt)}function U(V,Y,nt,rt){var ft=""+Y,ct=""+nt;if(!V&&ft>ct){var it=ft;ft=ct,ct=it}var vt={v:ft,w:ct};return rt&&(vt.name=rt),vt}function Z(V,Y){return k(V,Y.v,Y.w,Y.name)}},89224:function(X,et,M){X.exports={Graph:M(6349),version:M(16544)}},17401:function(X,et,M){var O=M(95329),W=M(6349);X.exports={write:H,read:N};function H(P){var k={options:{directed:P.isDirected(),multigraph:P.isMultigraph(),compound:P.isCompound()},nodes:L(P),edges:I(P)};return O.isUndefined(P.graph())||(k.value=O.clone(P.graph())),k}function L(P){return O.map(P.nodes(),function(k){var U=P.node(k),Z=P.parent(k),V={v:k};return O.isUndefined(U)||(V.value=U),O.isUndefined(Z)||(V.parent=Z),V})}function I(P){return O.map(P.edges(),function(k){var U=P.edge(k),Z={v:k.v,w:k.w};return O.isUndefined(k.name)||(Z.name=k.name),O.isUndefined(U)||(Z.value=U),Z})}function N(P){var k=new W(P.options).setGraph(P.value);return O.each(P.nodes,function(U){k.setNode(U.v,U.value),U.parent&&k.setParent(U.v,U.parent)}),O.each(P.edges,function(U){k.setEdge({v:U.v,w:U.w,name:U.name},U.value)}),k}},95329:function(X,et,M){var O;try{O={clone:M(76833),constant:M(13503),each:M(76934),filter:M(64725),has:M(99946),isArray:M(80744),isEmpty:M(61627),isFunction:M(9363),isUndefined:M(16513),keys:M(55451),map:M(9924),reduce:M(16473),size:M(40617),transform:M(91116),union:M(44065),values:M(81229)}}catch(W){}O||(O=window._),X.exports=O},16544:function(X){X.exports="2.1.8"},64270:function(X){(function(et,M){X.exports=M()})(this,function(){"use strict";var et=function(E,p){return et=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,B){b.__proto__=B}||function(b,B){for(var _ in B)Object.prototype.hasOwnProperty.call(B,_)&&(b[_]=B[_])},et(E,p)};function M(E,p){if(typeof p!="function"&&p!==null)throw new TypeError("Class extends value "+String(p)+" is not a constructor or null");et(E,p);function b(){this.constructor=E}E.prototype=p===null?Object.create(p):(b.prototype=p.prototype,new b)}var O=function(){return O=Object.assign||function(p){for(var b,B=1,_=arguments.length;B<_;B++){b=arguments[B];for(var j in b)Object.prototype.hasOwnProperty.call(b,j)&&(p[j]=b[j])}return p},O.apply(this,arguments)};function W(E,p,b,B){function _(j){return j instanceof b?j:new b(function(tt){tt(j)})}return new(b||(b=Promise))(function(j,tt){function dt(Ot){try{Tt(B.next(Ot))}catch(Dt){tt(Dt)}}function lt(Ot){try{Tt(B.throw(Ot))}catch(Dt){tt(Dt)}}function Tt(Ot){Ot.done?j(Ot.value):_(Ot.value).then(dt,lt)}Tt((B=B.apply(E,p||[])).next())})}function H(E,p){var b={label:0,sent:function(){if(j[0]&1)throw j[1];return j[1]},trys:[],ops:[]},B,_,j,tt;return tt={next:dt(0),throw:dt(1),return:dt(2)},typeof Symbol=="function"&&(tt[Symbol.iterator]=function(){return this}),tt;function dt(Tt){return function(Ot){return lt([Tt,Ot])}}function lt(Tt){if(B)throw new TypeError("Generator is already executing.");for(;b;)try{if(B=1,_&&(j=Tt[0]&2?_.return:Tt[0]?_.throw||((j=_.return)&&j.call(_),0):_.next)&&!(j=j.call(_,Tt[1])).done)return j;switch(_=0,j&&(Tt=[Tt[0]&2,j.value]),Tt[0]){case 0:case 1:j=Tt;break;case 4:return b.label++,{value:Tt[1],done:!1};case 5:b.label++,_=Tt[1],Tt=[0];continue;case 7:Tt=b.ops.pop(),b.trys.pop();continue;default:if(j=b.trys,!(j=j.length>0&&j[j.length-1])&&(Tt[0]===6||Tt[0]===2)){b=0;continue}if(Tt[0]===3&&(!j||Tt[1]>j[0]&&Tt[1]<j[3])){b.label=Tt[1];break}if(Tt[0]===6&&b.label<j[1]){b.label=j[1],j=Tt;break}if(j&&b.label<j[2]){b.label=j[2],b.ops.push(Tt);break}j[2]&&b.ops.pop(),b.trys.pop();continue}Tt=p.call(E,b)}catch(Ot){Tt=[6,Ot],_=0}finally{B=j=0}if(Tt[0]&5)throw Tt[1];return{value:Tt[0]?Tt[1]:void 0,done:!0}}}function L(E,p,b){if(b||arguments.length===2)for(var B=0,_=p.length,j;B<_;B++)(j||!(B in p))&&(j||(j=Array.prototype.slice.call(p,0,B)),j[B]=p[B]);return E.concat(j||p)}for(var I=function(){function E(p,b,B,_){this.left=p,this.top=b,this.width=B,this.height=_}return E.prototype.add=function(p,b,B,_){return new E(this.left+p,this.top+b,this.width+B,this.height+_)},E.fromClientRect=function(p,b){return new E(b.left+p.windowBounds.left,b.top+p.windowBounds.top,b.width,b.height)},E.fromDOMRectList=function(p,b){var B=Array.from(b).find(function(_){return _.width!==0});return B?new E(B.left+p.windowBounds.left,B.top+p.windowBounds.top,B.width,B.height):E.EMPTY},E.EMPTY=new E(0,0,0,0),E}(),N=function(E,p){return I.fromClientRect(E,p.getBoundingClientRect())},P=function(E){var p=E.body,b=E.documentElement;if(!p||!b)throw new Error("Unable to get document size");var B=Math.max(Math.max(p.scrollWidth,b.scrollWidth),Math.max(p.offsetWidth,b.offsetWidth),Math.max(p.clientWidth,b.clientWidth)),_=Math.max(Math.max(p.scrollHeight,b.scrollHeight),Math.max(p.offsetHeight,b.offsetHeight),Math.max(p.clientHeight,b.clientHeight));return new I(0,0,B,_)},k=function(E){for(var p=[],b=0,B=E.length;b<B;){var _=E.charCodeAt(b++);if(_>=55296&&_<=56319&&b<B){var j=E.charCodeAt(b++);(j&64512)===56320?p.push(((_&1023)<<10)+(j&1023)+65536):(p.push(_),b--)}else p.push(_)}return p},U=function(){for(var E=[],p=0;p<arguments.length;p++)E[p]=arguments[p];if(String.fromCodePoint)return String.fromCodePoint.apply(String,E);var b=E.length;if(!b)return"";for(var B=[],_=-1,j="";++_<b;){var tt=E[_];tt<=65535?B.push(tt):(tt-=65536,B.push((tt>>10)+55296,tt%1024+56320)),(_+1===b||B.length>16384)&&(j+=String.fromCharCode.apply(String,B),B.length=0)}return j},Z="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",V=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Y=0;Y<Z.length;Y++)V[Z.charCodeAt(Y)]=Y;for(var nt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",rt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ft=0;ft<nt.length;ft++)rt[nt.charCodeAt(ft)]=ft;for(var ct=function(E){var p=E.length*.75,b=E.length,B,_=0,j,tt,dt,lt;E[E.length-1]==="="&&(p--,E[E.length-2]==="="&&p--);var Tt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(p):new Array(p),Ot=Array.isArray(Tt)?Tt:new Uint8Array(Tt);for(B=0;B<b;B+=4)j=rt[E.charCodeAt(B)],tt=rt[E.charCodeAt(B+1)],dt=rt[E.charCodeAt(B+2)],lt=rt[E.charCodeAt(B+3)],Ot[_++]=j<<2|tt>>4,Ot[_++]=(tt&15)<<4|dt>>2,Ot[_++]=(dt&3)<<6|lt&63;return Tt},it=function(E){for(var p=E.length,b=[],B=0;B<p;B+=2)b.push(E[B+1]<<8|E[B]);return b},vt=function(E){for(var p=E.length,b=[],B=0;B<p;B+=4)b.push(E[B+3]<<24|E[B+2]<<16|E[B+1]<<8|E[B]);return b},gt=5,yt=11,mt=2,Mt=yt-gt,Ct=65536>>gt,Nt=1<<gt,qt=Nt-1,Gt=1024>>gt,re=Ct+Gt,de=re,ue=32,Me=de+ue,Ve=65536>>yt,dn=1<<Mt,Xn=dn-1,Xr=function(E,p,b){return E.slice?E.slice(p,b):new Uint16Array(Array.prototype.slice.call(E,p,b))},Vi=function(E,p,b){return E.slice?E.slice(p,b):new Uint32Array(Array.prototype.slice.call(E,p,b))},is=function(E,p){var b=ct(E),B=Array.isArray(b)?vt(b):new Uint32Array(b),_=Array.isArray(b)?it(b):new Uint16Array(b),j=24,tt=Xr(_,j/2,B[4]/2),dt=B[5]===2?Xr(_,(j+B[4])/2):Vi(B,Math.ceil((j+B[4])/4));return new Ao(B[0],B[1],B[2],B[3],tt,dt)},Ao=function(){function E(p,b,B,_,j,tt){this.initialValue=p,this.errorValue=b,this.highStart=B,this.highValueIndex=_,this.index=j,this.data=tt}return E.prototype.get=function(p){var b;if(p>=0){if(p<55296||p>56319&&p<=65535)return b=this.index[p>>gt],b=(b<<mt)+(p&qt),this.data[b];if(p<=65535)return b=this.index[Ct+(p-55296>>gt)],b=(b<<mt)+(p&qt),this.data[b];if(p<this.highStart)return b=Me-Ve+(p>>yt),b=this.index[b],b+=p>>gt&Xn,b=this.index[b],b=(b<<mt)+(p&qt),this.data[b];if(p<=1114111)return this.data[this.highValueIndex]}return this.errorValue},E}(),Ht="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Zt=0;Zt<Ht.length;Zt++)zt[Ht.charCodeAt(Zt)]=Zt;var Et="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",It=50,Ut=1,ne=2,be=3,_e=4,Te=5,rn=7,rr=8,sr=9,Ge=10,Ke=11,me=12,We=13,Gr=14,Wi=15,pe=16,Ga=17,Nr=18,Mr=19,di=20,as=21,Zi=22,ss=23,Ii=24,Jr=25,ma=26,ya=27,aa=28,wa=29,qr=30,or=31,Ko=32,ji=33,Yi=34,lo=35,Ka=36,zo=37,UA=38,Ns=39,PA=40,_l=41,iu=42,Vh=43,Wh=[9001,65288],Hl="!",pn="\xD7",DA="\xF7",Gl=is(Et),Ea=[qr,Ka],RA=[Ut,ne,be,Te],Vo=[Ge,rr],Kl=[ya,ma],zl=RA.concat(Vo),q=[UA,Ns,PA,Yi,lo],x=[Wi,We],S=function(E,p){p===void 0&&(p="strict");var b=[],B=[],_=[];return E.forEach(function(j,tt){var dt=Gl.get(j);if(dt>It?(_.push(!0),dt-=It):_.push(!1),["normal","auto","loose"].indexOf(p)!==-1&&[8208,8211,12316,12448].indexOf(j)!==-1)return B.push(tt),b.push(pe);if(dt===_e||dt===Ke){if(tt===0)return B.push(tt),b.push(qr);var lt=b[tt-1];return zl.indexOf(lt)===-1?(B.push(B[tt-1]),b.push(lt)):(B.push(tt),b.push(qr))}if(B.push(tt),dt===or)return b.push(p==="strict"?as:zo);if(dt===iu||dt===wa)return b.push(qr);if(dt===Vh)return j>=131072&&j<=196605||j>=196608&&j<=262141?b.push(zo):b.push(qr);b.push(dt)}),[B,b,_]},y=function(E,p,b,B){var _=B[b];if(Array.isArray(E)?E.indexOf(_)!==-1:E===_)for(var j=b;j<=B.length;){j++;var tt=B[j];if(tt===p)return!0;if(tt!==Ge)break}if(_===Ge)for(var j=b;j>0;){j--;var dt=B[j];if(Array.isArray(E)?E.indexOf(dt)!==-1:E===dt)for(var lt=b;lt<=B.length;){lt++;var tt=B[lt];if(tt===p)return!0;if(tt!==Ge)break}if(dt!==Ge)break}return!1},T=function(E,p){for(var b=E;b>=0;){var B=p[b];if(B===Ge)b--;else return B}return 0},R=function(E,p,b,B,_){if(b[B]===0)return pn;var j=B-1;if(Array.isArray(_)&&_[j]===!0)return pn;var tt=j-1,dt=j+1,lt=p[j],Tt=tt>=0?p[tt]:0,Ot=p[dt];if(lt===ne&&Ot===be)return pn;if(RA.indexOf(lt)!==-1)return Hl;if(RA.indexOf(Ot)!==-1||Vo.indexOf(Ot)!==-1)return pn;if(T(j,p)===rr)return DA;if(Gl.get(E[j])===Ke||(lt===Ko||lt===ji)&&Gl.get(E[dt])===Ke||lt===rn||Ot===rn||lt===sr||[Ge,We,Wi].indexOf(lt)===-1&&Ot===sr||[Ga,Nr,Mr,Ii,aa].indexOf(Ot)!==-1||T(j,p)===Zi||y(ss,Zi,j,p)||y([Ga,Nr],as,j,p)||y(me,me,j,p))return pn;if(lt===Ge)return DA;if(lt===ss||Ot===ss)return pn;if(Ot===pe||lt===pe)return DA;if([We,Wi,as].indexOf(Ot)!==-1||lt===Gr||Tt===Ka&&x.indexOf(lt)!==-1||lt===aa&&Ot===Ka||Ot===di||Ea.indexOf(Ot)!==-1&&lt===Jr||Ea.indexOf(lt)!==-1&&Ot===Jr||lt===ya&&[zo,Ko,ji].indexOf(Ot)!==-1||[zo,Ko,ji].indexOf(lt)!==-1&&Ot===ma||Ea.indexOf(lt)!==-1&&Kl.indexOf(Ot)!==-1||Kl.indexOf(lt)!==-1&&Ea.indexOf(Ot)!==-1||[ya,ma].indexOf(lt)!==-1&&(Ot===Jr||[Zi,Wi].indexOf(Ot)!==-1&&p[dt+1]===Jr)||[Zi,Wi].indexOf(lt)!==-1&&Ot===Jr||lt===Jr&&[Jr,aa,Ii].indexOf(Ot)!==-1)return pn;if([Jr,aa,Ii,Ga,Nr].indexOf(Ot)!==-1)for(var Dt=j;Dt>=0;){var Jt=p[Dt];if(Jt===Jr)return pn;if([aa,Ii].indexOf(Jt)!==-1)Dt--;else break}if([ya,ma].indexOf(Ot)!==-1)for(var Dt=[Ga,Nr].indexOf(lt)!==-1?tt:j;Dt>=0;){var Jt=p[Dt];if(Jt===Jr)return pn;if([aa,Ii].indexOf(Jt)!==-1)Dt--;else break}if(UA===lt&&[UA,Ns,Yi,lo].indexOf(Ot)!==-1||[Ns,Yi].indexOf(lt)!==-1&&[Ns,PA].indexOf(Ot)!==-1||[PA,lo].indexOf(lt)!==-1&&Ot===PA||q.indexOf(lt)!==-1&&[di,ma].indexOf(Ot)!==-1||q.indexOf(Ot)!==-1&&lt===ya||Ea.indexOf(lt)!==-1&&Ea.indexOf(Ot)!==-1||lt===Ii&&Ea.indexOf(Ot)!==-1||Ea.concat(Jr).indexOf(lt)!==-1&&Ot===Zi&&Wh.indexOf(E[dt])===-1||Ea.concat(Jr).indexOf(Ot)!==-1&&lt===Nr)return pn;if(lt===_l&&Ot===_l){for(var Oe=b[j],fe=1;Oe>0&&(Oe--,p[Oe]===_l);)fe++;if(fe%2!==0)return pn}return lt===Ko&&Ot===ji?pn:DA},st=function(E,p){p||(p={lineBreak:"normal",wordBreak:"normal"});var b=S(E,p.lineBreak),B=b[0],_=b[1],j=b[2];(p.wordBreak==="break-all"||p.wordBreak==="break-word")&&(_=_.map(function(dt){return[Jr,qr,iu].indexOf(dt)!==-1?zo:dt}));var tt=p.wordBreak==="keep-all"?j.map(function(dt,lt){return dt&&E[lt]>=19968&&E[lt]<=40959}):void 0;return[B,_,tt]},ot=function(){function E(p,b,B,_){this.codePoints=p,this.required=b===Hl,this.start=B,this.end=_}return E.prototype.slice=function(){return U.apply(void 0,this.codePoints.slice(this.start,this.end))},E}(),ut=function(E,p){var b=k(E),B=st(b,p),_=B[0],j=B[1],tt=B[2],dt=b.length,lt=0,Tt=0;return{next:function(){if(Tt>=dt)return{done:!0,value:null};for(var Ot=pn;Tt<dt&&(Ot=R(b,j,_,++Tt,tt))===pn;);if(Ot!==pn||Tt===dt){var Dt=new ot(b,Ot,lt,Tt);return lt=Tt,{value:Dt,done:!1}}return{done:!0,value:null}}}},ht=1,kt=2,Bt=4,jt=8,ce=10,Kt=47,$t=92,Ce=9,St=32,te=34,Ee=61,He=35,je=36,Wn=37,Ie=39,De=40,on=41,Lt=95,ee=45,he=33,se=60,Jn=62,Qn=64,Zn=91,qn=93,kr=61,Tr=123,Dn=63,Xi=125,Ji=124,fn=126,wr=128,$r=65533,ti=42,Rn=43,ks=44,Wo=58,au=59,co=46,uo=0,_A=8,su=11,Vl=14,ou=31,Y0=127,za=-1,Au=48,lu=97,cu=101,Zh=102,X0=117,J0=122,jh=65,Yh=69,uu=70,q0=85,$0=90,Kr=function(E){return E>=Au&&E<=57},tv=function(E){return E>=55296&&E<=57343},ho=function(E){return Kr(E)||E>=jh&&E<=uu||E>=lu&&E<=Zh},ev=function(E){return E>=lu&&E<=J0},Xh=function(E){return E>=jh&&E<=$0},nv=function(E){return ev(E)||Xh(E)},q1=function(E){return E>=wr},hu=function(E){return E===ce||E===Ce||E===St},Wl=function(E){return nv(E)||q1(E)||E===Lt},rv=function(E){return Wl(E)||Kr(E)||E===ee},$1=function(E){return E>=uo&&E<=_A||E===su||E>=Vl&&E<=ou||E===Y0},fo=function(E,p){return E!==$t?!1:p!==ce},du=function(E,p,b){return E===ee?Wl(p)||fo(p,b):Wl(E)?!0:!!(E===$t&&fo(E,p))},Jh=function(E,p,b){return E===Rn||E===ee?Kr(p)?!0:p===co&&Kr(b):Kr(E===co?p:E)},tw=function(E){var p=0,b=1;(E[p]===Rn||E[p]===ee)&&(E[p]===ee&&(b=-1),p++);for(var B=[];Kr(E[p]);)B.push(E[p++]);var _=B.length?parseInt(U.apply(void 0,B),10):0;E[p]===co&&p++;for(var j=[];Kr(E[p]);)j.push(E[p++]);var tt=j.length,dt=tt?parseInt(U.apply(void 0,j),10):0;(E[p]===Yh||E[p]===cu)&&p++;var lt=1;(E[p]===Rn||E[p]===ee)&&(E[p]===ee&&(lt=-1),p++);for(var Tt=[];Kr(E[p]);)Tt.push(E[p++]);var Ot=Tt.length?parseInt(U.apply(void 0,Tt),10):0;return b*(_+dt*Math.pow(10,-tt))*Math.pow(10,lt*Ot)},ew={type:2},nw={type:3},rw={type:4},iw={type:13},aw={type:8},sw={type:21},ow={type:9},Aw={type:10},lw={type:11},cw={type:12},uw={type:14},fu={type:23},hw={type:1},dw={type:25},fw={type:24},gw={type:26},vw={type:27},pw={type:28},mw={type:29},yw={type:31},qh={type:32},Er=function(){function E(){this._value=[]}return E.prototype.write=function(p){this._value=this._value.concat(k(p))},E.prototype.read=function(){for(var p=[],b=this.consumeToken();b!==qh;)p.push(b),b=this.consumeToken();return p},E.prototype.consumeToken=function(){var p=this.consumeCodePoint();switch(p){case te:return this.consumeStringToken(te);case He:var b=this.peekCodePoint(0),B=this.peekCodePoint(1),_=this.peekCodePoint(2);if(rv(b)||fo(B,_)){var j=du(b,B,_)?kt:ht,tt=this.consumeName();return{type:5,value:tt,flags:j}}break;case je:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),iw;break;case Ie:return this.consumeStringToken(Ie);case De:return ew;case on:return nw;case ti:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),uw;break;case Rn:if(Jh(p,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(p),this.consumeNumericToken();break;case ks:return rw;case ee:var dt=p,lt=this.peekCodePoint(0),Tt=this.peekCodePoint(1);if(Jh(dt,lt,Tt))return this.reconsumeCodePoint(p),this.consumeNumericToken();if(du(dt,lt,Tt))return this.reconsumeCodePoint(p),this.consumeIdentLikeToken();if(lt===ee&&Tt===Jn)return this.consumeCodePoint(),this.consumeCodePoint(),fw;break;case co:if(Jh(p,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(p),this.consumeNumericToken();break;case Kt:if(this.peekCodePoint(0)===ti)for(this.consumeCodePoint();;){var Ot=this.consumeCodePoint();if(Ot===ti&&(Ot=this.consumeCodePoint(),Ot===Kt))return this.consumeToken();if(Ot===za)return this.consumeToken()}break;case Wo:return gw;case au:return vw;case se:if(this.peekCodePoint(0)===he&&this.peekCodePoint(1)===ee&&this.peekCodePoint(2)===ee)return this.consumeCodePoint(),this.consumeCodePoint(),dw;break;case Qn:var Dt=this.peekCodePoint(0),Jt=this.peekCodePoint(1),Oe=this.peekCodePoint(2);if(du(Dt,Jt,Oe)){var tt=this.consumeName();return{type:7,value:tt}}break;case Zn:return pw;case $t:if(fo(p,this.peekCodePoint(0)))return this.reconsumeCodePoint(p),this.consumeIdentLikeToken();break;case qn:return mw;case kr:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),aw;break;case Tr:return lw;case Xi:return cw;case X0:case q0:var fe=this.peekCodePoint(0),Be=this.peekCodePoint(1);return fe===Rn&&(ho(Be)||Be===Dn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(p),this.consumeIdentLikeToken();case Ji:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),ow;if(this.peekCodePoint(0)===Ji)return this.consumeCodePoint(),sw;break;case fn:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),Aw;break;case za:return qh}return hu(p)?(this.consumeWhiteSpace(),yw):Kr(p)?(this.reconsumeCodePoint(p),this.consumeNumericToken()):Wl(p)?(this.reconsumeCodePoint(p),this.consumeIdentLikeToken()):{type:6,value:U(p)}},E.prototype.consumeCodePoint=function(){var p=this._value.shift();return typeof p=="undefined"?-1:p},E.prototype.reconsumeCodePoint=function(p){this._value.unshift(p)},E.prototype.peekCodePoint=function(p){return p>=this._value.length?-1:this._value[p]},E.prototype.consumeUnicodeRangeToken=function(){for(var p=[],b=this.consumeCodePoint();ho(b)&&p.length<6;)p.push(b),b=this.consumeCodePoint();for(var B=!1;b===Dn&&p.length<6;)p.push(b),b=this.consumeCodePoint(),B=!0;if(B){var _=parseInt(U.apply(void 0,p.map(function(lt){return lt===Dn?Au:lt})),16),j=parseInt(U.apply(void 0,p.map(function(lt){return lt===Dn?uu:lt})),16);return{type:30,start:_,end:j}}var tt=parseInt(U.apply(void 0,p),16);if(this.peekCodePoint(0)===ee&&ho(this.peekCodePoint(1))){this.consumeCodePoint(),b=this.consumeCodePoint();for(var dt=[];ho(b)&&dt.length<6;)dt.push(b),b=this.consumeCodePoint();var j=parseInt(U.apply(void 0,dt),16);return{type:30,start:tt,end:j}}else return{type:30,start:tt,end:tt}},E.prototype.consumeIdentLikeToken=function(){var p=this.consumeName();return p.toLowerCase()==="url"&&this.peekCodePoint(0)===De?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===De?(this.consumeCodePoint(),{type:19,value:p}):{type:20,value:p}},E.prototype.consumeUrlToken=function(){var p=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===za)return{type:22,value:""};var b=this.peekCodePoint(0);if(b===Ie||b===te){var B=this.consumeStringToken(this.consumeCodePoint());return B.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===za||this.peekCodePoint(0)===on)?(this.consumeCodePoint(),{type:22,value:B.value}):(this.consumeBadUrlRemnants(),fu)}for(;;){var _=this.consumeCodePoint();if(_===za||_===on)return{type:22,value:U.apply(void 0,p)};if(hu(_))return this.consumeWhiteSpace(),this.peekCodePoint(0)===za||this.peekCodePoint(0)===on?(this.consumeCodePoint(),{type:22,value:U.apply(void 0,p)}):(this.consumeBadUrlRemnants(),fu);if(_===te||_===Ie||_===De||$1(_))return this.consumeBadUrlRemnants(),fu;if(_===$t)if(fo(_,this.peekCodePoint(0)))p.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),fu;else p.push(_)}},E.prototype.consumeWhiteSpace=function(){for(;hu(this.peekCodePoint(0));)this.consumeCodePoint()},E.prototype.consumeBadUrlRemnants=function(){for(;;){var p=this.consumeCodePoint();if(p===on||p===za)return;fo(p,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},E.prototype.consumeStringSlice=function(p){for(var b=5e4,B="";p>0;){var _=Math.min(b,p);B+=U.apply(void 0,this._value.splice(0,_)),p-=_}return this._value.shift(),B},E.prototype.consumeStringToken=function(p){var b="",B=0;do{var _=this._value[B];if(_===za||_===void 0||_===p)return b+=this.consumeStringSlice(B),{type:0,value:b};if(_===ce)return this._value.splice(0,B),hw;if(_===$t){var j=this._value[B+1];j!==za&&j!==void 0&&(j===ce?(b+=this.consumeStringSlice(B),B=-1,this._value.shift()):fo(_,j)&&(b+=this.consumeStringSlice(B),b+=U(this.consumeEscapedCodePoint()),B=-1))}B++}while(!0)},E.prototype.consumeNumber=function(){var p=[],b=Bt,B=this.peekCodePoint(0);for((B===Rn||B===ee)&&p.push(this.consumeCodePoint());Kr(this.peekCodePoint(0));)p.push(this.consumeCodePoint());B=this.peekCodePoint(0);var _=this.peekCodePoint(1);if(B===co&&Kr(_))for(p.push(this.consumeCodePoint(),this.consumeCodePoint()),b=jt;Kr(this.peekCodePoint(0));)p.push(this.consumeCodePoint());B=this.peekCodePoint(0),_=this.peekCodePoint(1);var j=this.peekCodePoint(2);if((B===Yh||B===cu)&&((_===Rn||_===ee)&&Kr(j)||Kr(_)))for(p.push(this.consumeCodePoint(),this.consumeCodePoint()),b=jt;Kr(this.peekCodePoint(0));)p.push(this.consumeCodePoint());return[tw(p),b]},E.prototype.consumeNumericToken=function(){var p=this.consumeNumber(),b=p[0],B=p[1],_=this.peekCodePoint(0),j=this.peekCodePoint(1),tt=this.peekCodePoint(2);if(du(_,j,tt)){var dt=this.consumeName();return{type:15,number:b,flags:B,unit:dt}}return _===Wn?(this.consumeCodePoint(),{type:16,number:b,flags:B}):{type:17,number:b,flags:B}},E.prototype.consumeEscapedCodePoint=function(){var p=this.consumeCodePoint();if(ho(p)){for(var b=U(p);ho(this.peekCodePoint(0))&&b.length<6;)b+=U(this.consumeCodePoint());hu(this.peekCodePoint(0))&&this.consumeCodePoint();var B=parseInt(b,16);return B===0||tv(B)||B>1114111?$r:B}return p===za?$r:p},E.prototype.consumeName=function(){for(var p="";;){var b=this.consumeCodePoint();if(rv(b))p+=U(b);else if(fo(b,this.peekCodePoint(0)))p+=U(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(b),p}},E}(),iv=function(){function E(p){this._tokens=p}return E.create=function(p){var b=new Er;return b.write(p),new E(b.read())},E.parseValue=function(p){return E.create(p).parseComponentValue()},E.parseValues=function(p){return E.create(p).parseComponentValues()},E.prototype.parseComponentValue=function(){for(var p=this.consumeToken();p.type===31;)p=this.consumeToken();if(p.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(p);var b=this.consumeComponentValue();do p=this.consumeToken();while(p.type===31);if(p.type===32)return b;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},E.prototype.parseComponentValues=function(){for(var p=[];;){var b=this.consumeComponentValue();if(b.type===32)return p;p.push(b),p.push()}},E.prototype.consumeComponentValue=function(){var p=this.consumeToken();switch(p.type){case 11:case 28:case 2:return this.consumeSimpleBlock(p.type);case 19:return this.consumeFunction(p)}return p},E.prototype.consumeSimpleBlock=function(p){for(var b={type:p,values:[]},B=this.consumeToken();;){if(B.type===32||sv(B,p))return b;this.reconsumeToken(B),b.values.push(this.consumeComponentValue()),B=this.consumeToken()}},E.prototype.consumeFunction=function(p){for(var b={name:p.value,values:[],type:18};;){var B=this.consumeToken();if(B.type===32||B.type===3)return b;this.reconsumeToken(B),b.values.push(this.consumeComponentValue())}},E.prototype.consumeToken=function(){var p=this._tokens.shift();return typeof p=="undefined"?qh:p},E.prototype.reconsumeToken=function(p){this._tokens.unshift(p)},E}(),sa=function(E){return E.type===15},HA=function(E){return E.type===17},$n=function(E){return E.type===20},Qs=function(E){return E.type===0},$h=function(E,p){return $n(E)&&E.value===p},av=function(E){return E.type!==31},GA=function(E){return E.type!==31&&E.type!==4},os=function(E){var p=[],b=[];return E.forEach(function(B){if(B.type===4){if(b.length===0)throw new Error("Error parsing function args, zero tokens for arg");p.push(b),b=[];return}B.type!==31&&b.push(B)}),b.length&&p.push(b),p},sv=function(E,p){return p===11&&E.type===12||p===28&&E.type===29?!0:p===2&&E.type===3},Us=function(E){return E.type===17||E.type===15},Qr=function(E){return E.type===16||Us(E)},Zl=function(E){return E.length>1?[E[0],E[1]]:[E[0]]},fi={type:17,number:0,flags:Bt},KA={type:16,number:50,flags:Bt},go={type:16,number:100,flags:Bt},zA=function(E,p,b){var B=E[0],_=E[1];return[Gn(B,p),Gn(typeof _!="undefined"?_:B,b)]},Gn=function(E,p){if(E.type===16)return E.number/100*p;if(sa(E))switch(E.unit){case"rem":case"em":return 16*E.number;case"px":default:return E.number}return E.number},ov="deg",Av="grad",td="rad",VA="turn",WA={name:"angle",parse:function(E,p){if(p.type===15)switch(p.unit){case ov:return Math.PI*p.number/180;case Av:return Math.PI/200*p.number;case td:return p.number;case VA:return Math.PI*2*p.number}throw new Error("Unsupported angle type")}},lv=function(E){return E.type===15&&(E.unit===ov||E.unit===Av||E.unit===td||E.unit===VA)},gu=function(E){var p=E.filter($n).map(function(b){return b.value}).join(" ");switch(p){case"to bottom right":case"to right bottom":case"left top":case"top left":return[fi,fi];case"to top":case"bottom":return oa(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[fi,go];case"to right":case"left":return oa(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[go,go];case"to bottom":case"top":return oa(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[go,fi];case"to left":case"right":return oa(270)}return 0},oa=function(E){return Math.PI*E/180},Ps={name:"color",parse:function(E,p){if(p.type===18){var b=ww[p.name];if(typeof b=="undefined")throw new Error('Attempting to parse an unsupported color function "'+p.name+'"');return b(E,p.values)}if(p.type===5){if(p.value.length===3){var B=p.value.substring(0,1),_=p.value.substring(1,2),j=p.value.substring(2,3);return po(parseInt(B+B,16),parseInt(_+_,16),parseInt(j+j,16),1)}if(p.value.length===4){var B=p.value.substring(0,1),_=p.value.substring(1,2),j=p.value.substring(2,3),tt=p.value.substring(3,4);return po(parseInt(B+B,16),parseInt(_+_,16),parseInt(j+j,16),parseInt(tt+tt,16)/255)}if(p.value.length===6){var B=p.value.substring(0,2),_=p.value.substring(2,4),j=p.value.substring(4,6);return po(parseInt(B,16),parseInt(_,16),parseInt(j,16),1)}if(p.value.length===8){var B=p.value.substring(0,2),_=p.value.substring(2,4),j=p.value.substring(4,6),tt=p.value.substring(6,8);return po(parseInt(B,16),parseInt(_,16),parseInt(j,16),parseInt(tt,16)/255)}}if(p.type===20){var dt=Ds[p.value.toUpperCase()];if(typeof dt!="undefined")return dt}return Ds.TRANSPARENT}},vo=function(E){return(255&E)===0},ei=function(E){var p=255&E,b=255&E>>8,B=255&E>>16,_=255&E>>24;return p<255?"rgba("+_+","+B+","+b+","+p/255+")":"rgb("+_+","+B+","+b+")"},po=function(E,p,b,B){return(E<<24|p<<16|b<<8|Math.round(B*255)<<0)>>>0},cv=function(E,p){if(E.type===17)return E.number;if(E.type===16){var b=p===3?1:255;return p===3?E.number/100*b:Math.round(E.number/100*b)}return 0},uv=function(E,p){var b=p.filter(GA);if(b.length===3){var B=b.map(cv),_=B[0],j=B[1],tt=B[2];return po(_,j,tt,1)}if(b.length===4){var dt=b.map(cv),_=dt[0],j=dt[1],tt=dt[2],lt=dt[3];return po(_,j,tt,lt)}return 0};function Zo(E,p,b){return b<0&&(b+=1),b>=1&&(b-=1),b<1/6?(p-E)*b*6+E:b<1/2?p:b<2/3?(p-E)*6*(2/3-b)+E:E}var hv=function(E,p){var b=p.filter(GA),B=b[0],_=b[1],j=b[2],tt=b[3],dt=(B.type===17?oa(B.number):WA.parse(E,B))/(Math.PI*2),lt=Qr(_)?_.number/100:0,Tt=Qr(j)?j.number/100:0,Ot=typeof tt!="undefined"&&Qr(tt)?Gn(tt,1):1;if(lt===0)return po(Tt*255,Tt*255,Tt*255,1);var Dt=Tt<=.5?Tt*(lt+1):Tt+lt-Tt*lt,Jt=Tt*2-Dt,Oe=Zo(Jt,Dt,dt+1/3),fe=Zo(Jt,Dt,dt),Be=Zo(Jt,Dt,dt-1/3);return po(Oe*255,fe*255,Be*255,Ot)},ww={hsl:hv,hsla:hv,rgb:uv,rgba:uv},jl=function(E,p){return Ps.parse(E,iv.create(p).parseComponentValue())},Ds={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ew={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(E,p){return p.map(function(b){if($n(b))switch(b.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},vu={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},pu=function(E,p){var b=Ps.parse(E,p[0]),B=p[1];return B&&Qr(B)?{color:b,stop:B}:{color:b,stop:null}},dv=function(E,p){var b=E[0],B=E[E.length-1];b.stop===null&&(b.stop=fi),B.stop===null&&(B.stop=go);for(var _=[],j=0,tt=0;tt<E.length;tt++){var dt=E[tt].stop;if(dt!==null){var lt=Gn(dt,p);lt>j?_.push(lt):_.push(j),j=lt}else _.push(null)}for(var Tt=null,tt=0;tt<_.length;tt++){var Ot=_[tt];if(Ot===null)Tt===null&&(Tt=tt);else if(Tt!==null){for(var Dt=tt-Tt,Jt=_[Tt-1],Oe=(Ot-Jt)/(Dt+1),fe=1;fe<=Dt;fe++)_[Tt+fe-1]=Oe*fe;Tt=null}}return E.map(function(Be,an){var Ue=Be.color;return{color:Ue,stop:Math.max(Math.min(1,_[an]/p),0)}})},fv=function(E,p,b){var B=p/2,_=b/2,j=Gn(E[0],p)-B,tt=_-Gn(E[1],b);return(Math.atan2(tt,j)+Math.PI*2)%(Math.PI*2)},gv=function(E,p,b){var B=typeof E=="number"?E:fv(E,p,b),_=Math.abs(p*Math.sin(B))+Math.abs(b*Math.cos(B)),j=p/2,tt=b/2,dt=_/2,lt=Math.sin(B-Math.PI/2)*dt,Tt=Math.cos(B-Math.PI/2)*dt;return[_,j-Tt,j+Tt,tt-lt,tt+lt]},Va=function(E,p){return Math.sqrt(E*E+p*p)},vv=function(E,p,b,B,_){var j=[[0,0],[0,p],[E,0],[E,p]];return j.reduce(function(tt,dt){var lt=dt[0],Tt=dt[1],Ot=Va(b-lt,B-Tt);return(_?Ot<tt.optimumDistance:Ot>tt.optimumDistance)?{optimumCorner:dt,optimumDistance:Ot}:tt},{optimumDistance:_?1/0:-1/0,optimumCorner:null}).optimumCorner},Bw=function(E,p,b,B,_){var j=0,tt=0;switch(E.size){case 0:E.shape===0?j=tt=Math.min(Math.abs(p),Math.abs(p-B),Math.abs(b),Math.abs(b-_)):E.shape===1&&(j=Math.min(Math.abs(p),Math.abs(p-B)),tt=Math.min(Math.abs(b),Math.abs(b-_)));break;case 2:if(E.shape===0)j=tt=Math.min(Va(p,b),Va(p,b-_),Va(p-B,b),Va(p-B,b-_));else if(E.shape===1){var dt=Math.min(Math.abs(b),Math.abs(b-_))/Math.min(Math.abs(p),Math.abs(p-B)),lt=vv(B,_,p,b,!0),Tt=lt[0],Ot=lt[1];j=Va(Tt-p,(Ot-b)/dt),tt=dt*j}break;case 1:E.shape===0?j=tt=Math.max(Math.abs(p),Math.abs(p-B),Math.abs(b),Math.abs(b-_)):E.shape===1&&(j=Math.max(Math.abs(p),Math.abs(p-B)),tt=Math.max(Math.abs(b),Math.abs(b-_)));break;case 3:if(E.shape===0)j=tt=Math.max(Va(p,b),Va(p,b-_),Va(p-B,b),Va(p-B,b-_));else if(E.shape===1){var dt=Math.max(Math.abs(b),Math.abs(b-_))/Math.max(Math.abs(p),Math.abs(p-B)),Dt=vv(B,_,p,b,!1),Tt=Dt[0],Ot=Dt[1];j=Va(Tt-p,(Ot-b)/dt),tt=dt*j}break}return Array.isArray(E.size)&&(j=Gn(E.size[0],B),tt=E.size.length===2?Gn(E.size[1],_):j),[j,tt]},bw=function(E,p){var b=oa(180),B=[];return os(p).forEach(function(_,j){if(j===0){var tt=_[0];if(tt.type===20&&tt.value==="to"){b=gu(_);return}else if(lv(tt)){b=WA.parse(E,tt);return}}var dt=pu(E,_);B.push(dt)}),{angle:b,stops:B,type:1}},mu=function(E,p){var b=oa(180),B=[];return os(p).forEach(function(_,j){if(j===0){var tt=_[0];if(tt.type===20&&["top","left","right","bottom"].indexOf(tt.value)!==-1){b=gu(_);return}else if(lv(tt)){b=(WA.parse(E,tt)+oa(270))%oa(360);return}}var dt=pu(E,_);B.push(dt)}),{angle:b,stops:B,type:1}},xw=function(E,p){var b=oa(180),B=[],_=1,j=0,tt=3,dt=[];return os(p).forEach(function(lt,Tt){var Ot=lt[0];if(Tt===0){if($n(Ot)&&Ot.value==="linear"){_=1;return}else if($n(Ot)&&Ot.value==="radial"){_=2;return}}if(Ot.type===18){if(Ot.name==="from"){var Dt=Ps.parse(E,Ot.values[0]);B.push({stop:fi,color:Dt})}else if(Ot.name==="to"){var Dt=Ps.parse(E,Ot.values[0]);B.push({stop:go,color:Dt})}else if(Ot.name==="color-stop"){var Jt=Ot.values.filter(GA);if(Jt.length===2){var Dt=Ps.parse(E,Jt[1]),Oe=Jt[0];HA(Oe)&&B.push({stop:{type:16,number:Oe.number*100,flags:Oe.flags},color:Dt})}}}}),_===1?{angle:(b+oa(180))%oa(360),stops:B,type:_}:{size:tt,shape:j,stops:B,position:dt,type:_}},pv="closest-side",mv="farthest-side",yv="closest-corner",wv="farthest-corner",Ev="circle",Bv="ellipse",bv="cover",xv="contain",Cw=function(E,p){var b=0,B=3,_=[],j=[];return os(p).forEach(function(tt,dt){var lt=!0;if(dt===0){var Tt=!1;lt=tt.reduce(function(Dt,Jt){if(Tt)if($n(Jt))switch(Jt.value){case"center":return j.push(KA),Dt;case"top":case"left":return j.push(fi),Dt;case"right":case"bottom":return j.push(go),Dt}else(Qr(Jt)||Us(Jt))&&j.push(Jt);else if($n(Jt))switch(Jt.value){case Ev:return b=0,!1;case Bv:return b=1,!1;case"at":return Tt=!0,!1;case pv:return B=0,!1;case bv:case mv:return B=1,!1;case xv:case yv:return B=2,!1;case wv:return B=3,!1}else if(Us(Jt)||Qr(Jt))return Array.isArray(B)||(B=[]),B.push(Jt),!1;return Dt},lt)}if(lt){var Ot=pu(E,tt);_.push(Ot)}}),{size:B,shape:b,stops:_,position:j,type:2}},yu=function(E,p){var b=0,B=3,_=[],j=[];return os(p).forEach(function(tt,dt){var lt=!0;if(dt===0?lt=tt.reduce(function(Ot,Dt){if($n(Dt))switch(Dt.value){case"center":return j.push(KA),!1;case"top":case"left":return j.push(fi),!1;case"right":case"bottom":return j.push(go),!1}else if(Qr(Dt)||Us(Dt))return j.push(Dt),!1;return Ot},lt):dt===1&&(lt=tt.reduce(function(Ot,Dt){if($n(Dt))switch(Dt.value){case Ev:return b=0,!1;case Bv:return b=1,!1;case xv:case pv:return B=0,!1;case mv:return B=1,!1;case yv:return B=2,!1;case bv:case wv:return B=3,!1}else if(Us(Dt)||Qr(Dt))return Array.isArray(B)||(B=[]),B.push(Dt),!1;return Ot},lt)),lt){var Tt=pu(E,tt);_.push(Tt)}}),{size:B,shape:b,stops:_,position:j,type:2}},Sw=function(E){return E.type===1},Cv=function(E){return E.type===2},wu={name:"image",parse:function(E,p){if(p.type===22){var b={url:p.value,type:0};return E.cache.addImage(p.value),b}if(p.type===18){var B=Sv[p.name];if(typeof B=="undefined")throw new Error('Attempting to parse an unsupported image function "'+p.name+'"');return B(E,p.values)}throw new Error("Unsupported image type "+p.type)}};function Mw(E){return!(E.type===20&&E.value==="none")&&(E.type!==18||!!Sv[E.name])}var Sv={"linear-gradient":bw,"-moz-linear-gradient":mu,"-ms-linear-gradient":mu,"-o-linear-gradient":mu,"-webkit-linear-gradient":mu,"radial-gradient":Cw,"-moz-radial-gradient":yu,"-ms-radial-gradient":yu,"-o-radial-gradient":yu,"-webkit-radial-gradient":yu,"-webkit-gradient":xw},Tw={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(E,p){if(p.length===0)return[];var b=p[0];return b.type===20&&b.value==="none"?[]:p.filter(function(B){return GA(B)&&Mw(B)}).map(function(B){return wu.parse(E,B)})}},Fw={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(E,p){return p.map(function(b){if($n(b))switch(b.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Ow={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(E,p){return os(p).map(function(b){return b.filter(Qr)}).map(Zl)}},Iw={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(E,p){return os(p).map(function(b){return b.filter($n).map(function(B){return B.value}).join(" ")}).map(Lw)}},Lw=function(E){switch(E){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},ZA;(function(E){E.AUTO="auto",E.CONTAIN="contain",E.COVER="cover"})(ZA||(ZA={}));var Nw={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(E,p){return os(p).map(function(b){return b.filter(kw)})}},kw=function(E){return $n(E)||Qr(E)},Eu=function(E){return{name:"border-"+E+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},Qw=Eu("top"),Mv=Eu("right"),Uw=Eu("bottom"),Pw=Eu("left"),Bu=function(E){return{name:"border-radius-"+E,initialValue:"0 0",prefix:!1,type:1,parse:function(p,b){return Zl(b.filter(Qr))}}},Dw=Bu("top-left"),Rw=Bu("top-right"),_w=Bu("bottom-right"),Hw=Bu("bottom-left"),bu=function(E){return{name:"border-"+E+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(p,b){switch(b){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},Gw=bu("top"),ye=bu("right"),Li=bu("bottom"),Pe=bu("left"),gn=function(E){return{name:"border-"+E+"-width",initialValue:"0",type:0,prefix:!1,parse:function(p,b){return sa(b)?b.number:0}}},Tv=gn("top"),hr=gn("right"),z=gn("bottom"),jA=gn("left"),ed={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},nd={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(E,p){switch(p){case"rtl":return 1;case"ltr":default:return 0}}},rd={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(E,p){return p.filter($n).reduce(function(b,B){return b|id(B.value)},0)}},id=function(E){switch(E){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},ad={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(E,p){switch(p){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Fv={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(E,p){return p.type===20&&p.value==="normal"?0:p.type===17||p.type===15?p.number:0}},Yl;(function(E){E.NORMAL="normal",E.STRICT="strict"})(Yl||(Yl={}));var jo={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(E,p){switch(p){case"strict":return Yl.STRICT;case"normal":default:return Yl.NORMAL}}},Ov={name:"line-height",initialValue:"normal",prefix:!1,type:4},sd=function(E,p){return $n(E)&&E.value==="normal"?1.2*p:E.type===17?p*E.number:Qr(E)?Gn(E,p):p},Xl={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(E,p){return p.type===20&&p.value==="none"?null:wu.parse(E,p)}},Iv={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(E,p){switch(p){case"inside":return 0;case"outside":default:return 1}}},xu={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(E,p){switch(p){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Jl=function(E){return{name:"margin-"+E,initialValue:"0",prefix:!1,type:4}},Lv=Jl("top"),Nv=Jl("right"),kv=Jl("bottom"),Qv=Jl("left"),ql={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(E,p){return p.filter($n).map(function(b){switch(b.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},Rs={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(E,p){switch(p){case"break-word":return"break-word";case"normal":default:return"normal"}}},Yo=function(E){return{name:"padding-"+E,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},od=Yo("top"),Uv=Yo("right"),Pv=Yo("bottom"),Dv=Yo("left"),Ad={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(E,p){switch(p){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},Rv={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(E,p){switch(p){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},_v={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(E,p){return p.length===1&&$h(p[0],"none")?[]:os(p).map(function(b){for(var B={color:Ds.TRANSPARENT,offsetX:fi,offsetY:fi,blur:fi},_=0,j=0;j<b.length;j++){var tt=b[j];Us(tt)?(_===0?B.offsetX=tt:_===1?B.offsetY=tt:B.blur=tt,_++):B.color=Ps.parse(E,tt)}return B})}},ld={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(E,p){switch(p){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},Hv={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(E,p){if(p.type===20&&p.value==="none")return null;if(p.type===18){var b=tc[p.name];if(typeof b=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+p.name+'"');return b(p.values)}return null}},Ni=function(E){var p=E.filter(function(b){return b.type===17}).map(function(b){return b.number});return p.length===6?p:null},$l=function(E){var p=E.filter(function(lt){return lt.type===17}).map(function(lt){return lt.number}),b=p[0],B=p[1];p[2],p[3];var _=p[4],j=p[5];p[6],p[7],p[8],p[9],p[10],p[11];var tt=p[12],dt=p[13];return p[14],p[15],p.length===16?[b,B,_,j,tt,dt]:null},tc={matrix:Ni,matrix3d:$l},cd={type:16,number:50,flags:Bt},Xo=[cd,cd],Gv={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(E,p){var b=p.filter(Qr);return b.length!==2?Xo:[b[0],b[1]]}},ud={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(E,p){switch(p){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},YA;(function(E){E.NORMAL="normal",E.BREAK_ALL="break-all",E.KEEP_ALL="keep-all"})(YA||(YA={}));for(var Kv={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(E,p){switch(p){case"break-all":return YA.BREAK_ALL;case"keep-all":return YA.KEEP_ALL;case"normal":default:return YA.NORMAL}}},ec={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(E,p){if(p.type===20)return{auto:!0,order:0};if(HA(p))return{auto:!1,order:p.number};throw new Error("Invalid z-index number parsed")}},nc={name:"time",parse:function(E,p){if(p.type===15)switch(p.unit.toLowerCase()){case"s":return 1e3*p.number;case"ms":return p.number}throw new Error("Unsupported time type")}},zv={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(E,p){return HA(p)?p.number:1}},hd={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Vv={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(E,p){return p.filter($n).map(function(b){switch(b.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(b){return b!==0})}},Cu={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(E,p){var b=[],B=[];return p.forEach(function(_){switch(_.type){case 20:case 0:b.push(_.value);break;case 17:b.push(_.number.toString());break;case 4:B.push(b.join(" ")),b.length=0;break}}),b.length&&B.push(b.join(" ")),B.map(function(_){return _.indexOf(" ")===-1?_:"'"+_+"'"})}},Wv={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Zv={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(E,p){if(HA(p))return p.number;if($n(p))switch(p.value){case"bold":return 700;case"normal":default:return 400}return 400}},dd={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(E,p){return p.filter($n).map(function(b){return b.value})}},fd={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(E,p){switch(p){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Ur=function(E,p){return(E&p)!==0},jv={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(E,p){if(p.length===0)return[];var b=p[0];return b.type===20&&b.value==="none"?[]:p}},gd={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(E,p){if(p.length===0)return null;var b=p[0];if(b.type===20&&b.value==="none")return null;for(var B=[],_=p.filter(av),j=0;j<_.length;j++){var tt=_[j],dt=_[j+1];if(tt.type===20){var lt=dt&&HA(dt)?dt.number:1;B.push({counter:tt.value,increment:lt})}}return B}},Yv={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(E,p){if(p.length===0)return[];for(var b=[],B=p.filter(av),_=0;_<B.length;_++){var j=B[_],tt=B[_+1];if($n(j)&&j.value!=="none"){var dt=tt&&HA(tt)?tt.number:0;b.push({counter:j.value,reset:dt})}}return b}},Xv={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(E,p){return p.filter(sa).map(function(b){return nc.parse(E,b)})}},Jv={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(E,p){if(p.length===0)return null;var b=p[0];if(b.type===20&&b.value==="none")return null;var B=[],_=p.filter(Qs);if(_.length%2!==0)return null;for(var j=0;j<_.length;j+=2){var tt=_[j].value,dt=_[j+1].value;B.push({open:tt,close:dt})}return B}},vd=function(E,p,b){if(!E)return"";var B=E[Math.min(p,E.length-1)];return B?b?B.open:B.close:""},qv={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(E,p){return p.length===1&&$h(p[0],"none")?[]:os(p).map(function(b){for(var B={color:255,offsetX:fi,offsetY:fi,blur:fi,spread:fi,inset:!1},_=0,j=0;j<b.length;j++){var tt=b[j];$h(tt,"inset")?B.inset=!0:Us(tt)?(_===0?B.offsetX=tt:_===1?B.offsetY=tt:_===2?B.blur=tt:B.spread=tt,_++):B.color=Ps.parse(E,tt)}return B})}},Ye={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(E,p){var b=[0,1,2],B=[];return p.filter($n).forEach(function(_){switch(_.value){case"stroke":B.push(1);break;case"fill":B.push(0);break;case"markers":B.push(2);break}}),b.forEach(function(_){B.indexOf(_)===-1&&B.push(_)}),B}},$v={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},tp={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(E,p){return sa(p)?p.number:0}},pd=function(){function E(p,b){var B,_;this.animationDuration=Wt(p,Xv,b.animationDuration),this.backgroundClip=Wt(p,Ew,b.backgroundClip),this.backgroundColor=Wt(p,vu,b.backgroundColor),this.backgroundImage=Wt(p,Tw,b.backgroundImage),this.backgroundOrigin=Wt(p,Fw,b.backgroundOrigin),this.backgroundPosition=Wt(p,Ow,b.backgroundPosition),this.backgroundRepeat=Wt(p,Iw,b.backgroundRepeat),this.backgroundSize=Wt(p,Nw,b.backgroundSize),this.borderTopColor=Wt(p,Qw,b.borderTopColor),this.borderRightColor=Wt(p,Mv,b.borderRightColor),this.borderBottomColor=Wt(p,Uw,b.borderBottomColor),this.borderLeftColor=Wt(p,Pw,b.borderLeftColor),this.borderTopLeftRadius=Wt(p,Dw,b.borderTopLeftRadius),this.borderTopRightRadius=Wt(p,Rw,b.borderTopRightRadius),this.borderBottomRightRadius=Wt(p,_w,b.borderBottomRightRadius),this.borderBottomLeftRadius=Wt(p,Hw,b.borderBottomLeftRadius),this.borderTopStyle=Wt(p,Gw,b.borderTopStyle),this.borderRightStyle=Wt(p,ye,b.borderRightStyle),this.borderBottomStyle=Wt(p,Li,b.borderBottomStyle),this.borderLeftStyle=Wt(p,Pe,b.borderLeftStyle),this.borderTopWidth=Wt(p,Tv,b.borderTopWidth),this.borderRightWidth=Wt(p,hr,b.borderRightWidth),this.borderBottomWidth=Wt(p,z,b.borderBottomWidth),this.borderLeftWidth=Wt(p,jA,b.borderLeftWidth),this.boxShadow=Wt(p,qv,b.boxShadow),this.color=Wt(p,ed,b.color),this.direction=Wt(p,nd,b.direction),this.display=Wt(p,rd,b.display),this.float=Wt(p,ad,b.cssFloat),this.fontFamily=Wt(p,Cu,b.fontFamily),this.fontSize=Wt(p,Wv,b.fontSize),this.fontStyle=Wt(p,fd,b.fontStyle),this.fontVariant=Wt(p,dd,b.fontVariant),this.fontWeight=Wt(p,Zv,b.fontWeight),this.letterSpacing=Wt(p,Fv,b.letterSpacing),this.lineBreak=Wt(p,jo,b.lineBreak),this.lineHeight=Wt(p,Ov,b.lineHeight),this.listStyleImage=Wt(p,Xl,b.listStyleImage),this.listStylePosition=Wt(p,Iv,b.listStylePosition),this.listStyleType=Wt(p,xu,b.listStyleType),this.marginTop=Wt(p,Lv,b.marginTop),this.marginRight=Wt(p,Nv,b.marginRight),this.marginBottom=Wt(p,kv,b.marginBottom),this.marginLeft=Wt(p,Qv,b.marginLeft),this.opacity=Wt(p,zv,b.opacity);var j=Wt(p,ql,b.overflow);this.overflowX=j[0],this.overflowY=j[j.length>1?1:0],this.overflowWrap=Wt(p,Rs,b.overflowWrap),this.paddingTop=Wt(p,od,b.paddingTop),this.paddingRight=Wt(p,Uv,b.paddingRight),this.paddingBottom=Wt(p,Pv,b.paddingBottom),this.paddingLeft=Wt(p,Dv,b.paddingLeft),this.paintOrder=Wt(p,Ye,b.paintOrder),this.position=Wt(p,Rv,b.position),this.textAlign=Wt(p,Ad,b.textAlign),this.textDecorationColor=Wt(p,hd,(B=b.textDecorationColor)!==null&&B!==void 0?B:b.color),this.textDecorationLine=Wt(p,Vv,(_=b.textDecorationLine)!==null&&_!==void 0?_:b.textDecoration),this.textShadow=Wt(p,_v,b.textShadow),this.textTransform=Wt(p,ld,b.textTransform),this.transform=Wt(p,Hv,b.transform),this.transformOrigin=Wt(p,Gv,b.transformOrigin),this.visibility=Wt(p,ud,b.visibility),this.webkitTextStrokeColor=Wt(p,$v,b.webkitTextStrokeColor),this.webkitTextStrokeWidth=Wt(p,tp,b.webkitTextStrokeWidth),this.wordBreak=Wt(p,Kv,b.wordBreak),this.zIndex=Wt(p,ec,b.zIndex)}return E.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},E.prototype.isTransparent=function(){return vo(this.backgroundColor)},E.prototype.isTransformed=function(){return this.transform!==null},E.prototype.isPositioned=function(){return this.position!==0},E.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},E.prototype.isFloating=function(){return this.float!==0},E.prototype.isInlineLevel=function(){return Ur(this.display,4)||Ur(this.display,33554432)||Ur(this.display,268435456)||Ur(this.display,536870912)||Ur(this.display,67108864)||Ur(this.display,134217728)},E}(),ep=function(){function E(p,b){this.content=Wt(p,jv,b.content),this.quotes=Wt(p,Jv,b.quotes)}return E}(),Jo=function(){function E(p,b){this.counterIncrement=Wt(p,gd,b.counterIncrement),this.counterReset=Wt(p,Yv,b.counterReset)}return E}(),Wt=function(E,p,b){var B=new Er,_=b!==null&&typeof b!="undefined"?b.toString():p.initialValue;B.write(_);var j=new iv(B.read());switch(p.type){case 2:var tt=j.parseComponentValue();return p.parse(E,$n(tt)?tt.value:p.initialValue);case 0:return p.parse(E,j.parseComponentValue());case 1:return p.parse(E,j.parseComponentValues());case 4:return j.parseComponentValue();case 3:switch(p.format){case"angle":return WA.parse(E,j.parseComponentValue());case"color":return Ps.parse(E,j.parseComponentValue());case"image":return wu.parse(E,j.parseComponentValue());case"length":var dt=j.parseComponentValue();return Us(dt)?dt:fi;case"length-percentage":var lt=j.parseComponentValue();return Qr(lt)?lt:fi;case"time":return nc.parse(E,j.parseComponentValue())}break}},Br="data-html2canvas-debug",np=function(E){var p=E.getAttribute(Br);switch(p){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},we=function(E,p){var b=np(E);return b===1||p===b},Ba=function(){function E(p,b){if(this.context=p,this.textNodes=[],this.elements=[],this.flags=0,we(b,3))debugger;this.styles=new pd(p,window.getComputedStyle(b,null)),Ru(b)&&(this.styles.animationDuration.some(function(B){return B>0})&&(b.style.animationDuration="0s"),this.styles.transform!==null&&(b.style.transform="none")),this.bounds=N(this.context,b),we(b,4)&&(this.flags|=16)}return E}(),rp="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",rc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",_s=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),ic=0;ic<rc.length;ic++)_s[rc.charCodeAt(ic)]=ic;for(var gi=function(E){var p=E.length*.75,b=E.length,B,_=0,j,tt,dt,lt;E[E.length-1]==="="&&(p--,E[E.length-2]==="="&&p--);var Tt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(p):new Array(p),Ot=Array.isArray(Tt)?Tt:new Uint8Array(Tt);for(B=0;B<b;B+=4)j=_s[E.charCodeAt(B)],tt=_s[E.charCodeAt(B+1)],dt=_s[E.charCodeAt(B+2)],lt=_s[E.charCodeAt(B+3)],Ot[_++]=j<<2|tt>>4,Ot[_++]=(tt&15)<<4|dt>>2,Ot[_++]=(dt&3)<<6|lt&63;return Tt},ac=function(E){for(var p=E.length,b=[],B=0;B<p;B+=2)b.push(E[B+1]<<8|E[B]);return b},md=function(E){for(var p=E.length,b=[],B=0;B<p;B+=4)b.push(E[B+3]<<24|E[B+2]<<16|E[B+1]<<8|E[B]);return b},Hs=5,Su=11,Mu=2,ip=Su-Hs,yd=65536>>Hs,ap=1<<Hs,Tu=ap-1,sp=1024>>Hs,op=yd+sp,wd=op,Ed=32,Ap=wd+Ed,Kw=65536>>Su,zw=1<<ip,lp=zw-1,Fu=function(E,p,b){return E.slice?E.slice(p,b):new Uint16Array(Array.prototype.slice.call(E,p,b))},cp=function(E,p,b){return E.slice?E.slice(p,b):new Uint32Array(Array.prototype.slice.call(E,p,b))},Vw=function(E,p){var b=gi(E),B=Array.isArray(b)?md(b):new Uint32Array(b),_=Array.isArray(b)?ac(b):new Uint16Array(b),j=24,tt=Fu(_,j/2,B[4]/2),dt=B[5]===2?Fu(_,(j+B[4])/2):cp(B,Math.ceil((j+B[4])/4));return new Bd(B[0],B[1],B[2],B[3],tt,dt)},Bd=function(){function E(p,b,B,_,j,tt){this.initialValue=p,this.errorValue=b,this.highStart=B,this.highValueIndex=_,this.index=j,this.data=tt}return E.prototype.get=function(p){var b;if(p>=0){if(p<55296||p>56319&&p<=65535)return b=this.index[p>>Hs],b=(b<<Mu)+(p&Tu),this.data[b];if(p<=65535)return b=this.index[yd+(p-55296>>Hs)],b=(b<<Mu)+(p&Tu),this.data[b];if(p<this.highStart)return b=Ap-Kw+(p>>Su),b=this.index[b],b+=p>>Hs&lp,b=this.index[b],b=(b<<Mu)+(p&Tu),this.data[b];if(p<=1114111)return this.data[this.highValueIndex]}return this.errorValue},E}(),ba="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",up=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),XA=0;XA<ba.length;XA++)up[ba.charCodeAt(XA)]=XA;var Ww=1,As=2,sc=3,Ou=4,bd=5,Iu=7,xd=8,Cd=9,Lu=10,Nu=11,hp=12,dp=13,ku=14,oc=15,Sd=function(E){for(var p=[],b=0,B=E.length;b<B;){var _=E.charCodeAt(b++);if(_>=55296&&_<=56319&&b<B){var j=E.charCodeAt(b++);(j&64512)===56320?p.push(((_&1023)<<10)+(j&1023)+65536):(p.push(_),b--)}else p.push(_)}return p},Md=function(){for(var E=[],p=0;p<arguments.length;p++)E[p]=arguments[p];if(String.fromCodePoint)return String.fromCodePoint.apply(String,E);var b=E.length;if(!b)return"";for(var B=[],_=-1,j="";++_<b;){var tt=E[_];tt<=65535?B.push(tt):(tt-=65536,B.push((tt>>10)+55296,tt%1024+56320)),(_+1===b||B.length>16384)&&(j+=String.fromCharCode.apply(String,B),B.length=0)}return j},Td=Vw(rp),Aa="\xD7",Qu="\xF7",Zw=function(E){return Td.get(E)},jw=function(E,p,b){var B=b-2,_=p[B],j=p[b-1],tt=p[b];if(j===As&&tt===sc)return Aa;if(j===As||j===sc||j===Ou||tt===As||tt===sc||tt===Ou)return Qu;if(j===xd&&[xd,Cd,Nu,hp].indexOf(tt)!==-1||(j===Nu||j===Cd)&&(tt===Cd||tt===Lu)||(j===hp||j===Lu)&&tt===Lu||tt===dp||tt===bd||tt===Iu||j===Ww)return Aa;if(j===dp&&tt===ku){for(;_===bd;)_=p[--B];if(_===ku)return Aa}if(j===oc&&tt===oc){for(var dt=0;_===oc;)dt++,_=p[--B];if(dt%2===0)return Aa}return Qu},Yw=function(E){var p=Sd(E),b=p.length,B=0,_=0,j=p.map(Zw);return{next:function(){if(B>=b)return{done:!0,value:null};for(var tt=Aa;B<b&&(tt=jw(p,j,++B))===Aa;);if(tt!==Aa||B===b){var dt=Md.apply(null,p.slice(_,B));return _=B,{value:dt,done:!1}}return{done:!0,value:null}}}},Ac=function(E){for(var p=Yw(E),b=[],B;!(B=p.next()).done;)B.value&&b.push(B.value.slice());return b},Xw=function(E){var p=123;if(E.createRange){var b=E.createRange();if(b.getBoundingClientRect){var B=E.createElement("boundtest");B.style.height=p+"px",B.style.display="block",E.body.appendChild(B),b.selectNode(B);var _=b.getBoundingClientRect(),j=Math.round(_.height);if(E.body.removeChild(B),j===p)return!0}}return!1},Jw=function(E){var p=E.createElement("boundtest");p.style.width="50px",p.style.display="block",p.style.fontSize="12px",p.style.letterSpacing="0px",p.style.wordSpacing="0px",E.body.appendChild(p);var b=E.createRange();p.innerHTML=typeof"".repeat=="function"?"&#128104;".repeat(10):"";var B=p.firstChild,_=k(B.data).map(function(lt){return U(lt)}),j=0,tt={},dt=_.every(function(lt,Tt){b.setStart(B,j),b.setEnd(B,j+lt.length);var Ot=b.getBoundingClientRect();j+=lt.length;var Dt=Ot.x>tt.x||Ot.y>tt.y;return tt=Ot,Tt===0?!0:Dt});return E.body.removeChild(p),dt},qw=function(){return typeof new Image().crossOrigin!="undefined"},$w=function(){return typeof new XMLHttpRequest().responseType=="string"},tE=function(E){var p=new Image,b=E.createElement("canvas"),B=b.getContext("2d");if(!B)return!1;p.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{B.drawImage(p,0,0),b.toDataURL()}catch(_){return!1}return!0},qo=function(E){return E[0]===0&&E[1]===255&&E[2]===0&&E[3]===255},Fd=function(E){var p=E.createElement("canvas"),b=100;p.width=b,p.height=b;var B=p.getContext("2d");if(!B)return Promise.reject(!1);B.fillStyle="rgb(0, 255, 0)",B.fillRect(0,0,b,b);var _=new Image,j=p.toDataURL();_.src=j;var tt=Uu(b,b,0,0,_);return B.fillStyle="red",B.fillRect(0,0,b,b),lc(tt).then(function(dt){B.drawImage(dt,0,0);var lt=B.getImageData(0,0,b,b).data;B.fillStyle="red",B.fillRect(0,0,b,b);var Tt=E.createElement("div");return Tt.style.backgroundImage="url("+j+")",Tt.style.height=b+"px",qo(lt)?lc(Uu(b,b,0,0,Tt)):Promise.reject(!1)}).then(function(dt){return B.drawImage(dt,0,0),qo(B.getImageData(0,0,b,b).data)}).catch(function(){return!1})},Uu=function(E,p,b,B,_){var j="http://www.w3.org/2000/svg",tt=document.createElementNS(j,"svg"),dt=document.createElementNS(j,"foreignObject");return tt.setAttributeNS(null,"width",E.toString()),tt.setAttributeNS(null,"height",p.toString()),dt.setAttributeNS(null,"width","100%"),dt.setAttributeNS(null,"height","100%"),dt.setAttributeNS(null,"x",b.toString()),dt.setAttributeNS(null,"y",B.toString()),dt.setAttributeNS(null,"externalResourcesRequired","true"),tt.appendChild(dt),dt.appendChild(_),tt},lc=function(E){return new Promise(function(p,b){var B=new Image;B.onload=function(){return p(B)},B.onerror=b,B.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(E))})},ni={get SUPPORT_RANGE_BOUNDS(){var E=Xw(document);return Object.defineProperty(ni,"SUPPORT_RANGE_BOUNDS",{value:E}),E},get SUPPORT_WORD_BREAKING(){var E=ni.SUPPORT_RANGE_BOUNDS&&Jw(document);return Object.defineProperty(ni,"SUPPORT_WORD_BREAKING",{value:E}),E},get SUPPORT_SVG_DRAWING(){var E=tE(document);return Object.defineProperty(ni,"SUPPORT_SVG_DRAWING",{value:E}),E},get SUPPORT_FOREIGNOBJECT_DRAWING(){var E=typeof Array.from=="function"&&typeof window.fetch=="function"?Fd(document):Promise.resolve(!1);return Object.defineProperty(ni,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:E}),E},get SUPPORT_CORS_IMAGES(){var E=qw();return Object.defineProperty(ni,"SUPPORT_CORS_IMAGES",{value:E}),E},get SUPPORT_RESPONSE_TYPE(){var E=$w();return Object.defineProperty(ni,"SUPPORT_RESPONSE_TYPE",{value:E}),E},get SUPPORT_CORS_XHR(){var E="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ni,"SUPPORT_CORS_XHR",{value:E}),E},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var E=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ni,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:E}),E}},cc=function(){function E(p,b){this.text=p,this.bounds=b}return E}(),fp=function(E,p,b,B){var _=Za(p,b),j=[],tt=0;return _.forEach(function(dt){if(b.textDecorationLine.length||dt.trim().length>0)if(ni.SUPPORT_RANGE_BOUNDS){var lt=ri(B,tt,dt.length).getClientRects();if(lt.length>1){var Tt=Wa(dt),Ot=0;Tt.forEach(function(Jt){j.push(new cc(Jt,I.fromDOMRectList(E,ri(B,Ot+tt,Jt.length).getClientRects()))),Ot+=Jt.length})}else j.push(new cc(dt,I.fromDOMRectList(E,lt)))}else{var Dt=B.splitText(dt.length);j.push(new cc(dt,gp(E,B))),B=Dt}else ni.SUPPORT_RANGE_BOUNDS||(B=B.splitText(dt.length));tt+=dt.length}),j},gp=function(E,p){var b=p.ownerDocument;if(b){var B=b.createElement("html2canvaswrapper");B.appendChild(p.cloneNode(!0));var _=p.parentNode;if(_){_.replaceChild(B,p);var j=N(E,B);return B.firstChild&&_.replaceChild(B.firstChild,B),j}}return I.EMPTY},ri=function(E,p,b){var B=E.ownerDocument;if(!B)throw new Error("Node has no owner document");var _=B.createRange();return _.setStart(E,p),_.setEnd(E,p+b),_},Wa=function(E){if(ni.SUPPORT_NATIVE_TEXT_SEGMENTATION){var p=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(p.segment(E)).map(function(b){return b.segment})}return Ac(E)},Gs=function(E,p){if(ni.SUPPORT_NATIVE_TEXT_SEGMENTATION){var b=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(b.segment(E)).map(function(B){return B.segment})}return uc(E,p)},Za=function(E,p){return p.letterSpacing!==0?Wa(E):Gs(E,p)},Vt=[32,160,4961,65792,65793,4153,4241],uc=function(E,p){for(var b=ut(E,{lineBreak:p.lineBreak,wordBreak:p.overflowWrap==="break-word"?"break-word":p.wordBreak}),B=[],_,j=function(){if(_.value){var tt=_.value.slice(),dt=k(tt),lt="";dt.forEach(function(Tt){Vt.indexOf(Tt)===-1?lt+=U(Tt):(lt.length&&B.push(lt),B.push(U(Tt)),lt="")}),lt.length&&B.push(lt)}};!(_=b.next()).done;)j();return B},ls=function(){function E(p,b,B){this.text=vp(b.data,B.textTransform),this.textBounds=fp(p,this.text,B,b)}return E}(),vp=function(E,p){switch(p){case 1:return E.toLowerCase();case 3:return E.replace(Pu,$o);case 2:return E.toUpperCase();default:return E}},Pu=/(^|\s|:|-|\(|\))([a-z])/g,$o=function(E,p,b){return E.length>0?p+b.toUpperCase():E},Od=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _.src=B.currentSrc||B.src,_.intrinsicWidth=B.naturalWidth,_.intrinsicHeight=B.naturalHeight,_.context.cache.addImage(_.src),_}return p}(Ba),Id=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _.canvas=B,_.intrinsicWidth=B.width,_.intrinsicHeight=B.height,_}return p}(Ba),Du=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this,j=new XMLSerializer,tt=N(b,B);return B.setAttribute("width",tt.width+"px"),B.setAttribute("height",tt.height+"px"),_.svg="data:image/svg+xml,"+encodeURIComponent(j.serializeToString(B)),_.intrinsicWidth=B.width.baseVal.value,_.intrinsicHeight=B.height.baseVal.value,_.context.cache.addImage(_.svg),_}return p}(Ba),hc=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _.value=B.value,_}return p}(Ba),jn=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _.start=B.start,_.reversed=typeof B.reversed=="boolean"&&B.reversed===!0,_}return p}(Ba),pp=[{type:15,flags:0,unit:"px",number:3}],tA=[{type:16,flags:0,number:50}],mp=function(E){return E.width>E.height?new I(E.left+(E.width-E.height)/2,E.top,E.height,E.height):E.width<E.height?new I(E.left,E.top+(E.height-E.width)/2,E.width,E.width):E},ii=function(E){var p=E.type===eA?new Array(E.value.length+1).join("\u2022"):E.value;return p.length===0?E.placeholder||"":p},cs="checkbox",On="radio",eA="password",Ld=707406591,Ks=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;switch(_.type=B.type.toLowerCase(),_.checked=B.checked,_.value=ii(B),(_.type===cs||_.type===On)&&(_.styles.backgroundColor=3739148031,_.styles.borderTopColor=_.styles.borderRightColor=_.styles.borderBottomColor=_.styles.borderLeftColor=2779096575,_.styles.borderTopWidth=_.styles.borderRightWidth=_.styles.borderBottomWidth=_.styles.borderLeftWidth=1,_.styles.borderTopStyle=_.styles.borderRightStyle=_.styles.borderBottomStyle=_.styles.borderLeftStyle=1,_.styles.backgroundClip=[0],_.styles.backgroundOrigin=[0],_.bounds=mp(_.bounds)),_.type){case cs:_.styles.borderTopRightRadius=_.styles.borderTopLeftRadius=_.styles.borderBottomRightRadius=_.styles.borderBottomLeftRadius=pp;break;case On:_.styles.borderTopRightRadius=_.styles.borderTopLeftRadius=_.styles.borderBottomRightRadius=_.styles.borderBottomLeftRadius=tA;break}return _}return p}(Ba),dc=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this,j=B.options[B.selectedIndex||0];return _.value=j&&j.text||"",_}return p}(Ba),vi=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _.value=B.value,_}return p}(Ba),Nd=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;_.src=B.src,_.width=parseInt(B.width,10)||0,_.height=parseInt(B.height,10)||0,_.backgroundColor=_.styles.backgroundColor;try{if(B.contentWindow&&B.contentWindow.document&&B.contentWindow.document.documentElement){_.tree=kd(b,B.contentWindow.document.documentElement);var j=B.contentWindow.document.documentElement?jl(b,getComputedStyle(B.contentWindow.document.documentElement).backgroundColor):Ds.TRANSPARENT,tt=B.contentWindow.document.body?jl(b,getComputedStyle(B.contentWindow.document.body).backgroundColor):Ds.TRANSPARENT;_.backgroundColor=vo(j)?vo(tt)?_.styles.backgroundColor:tt:j}}catch(dt){}return _}return p}(Ba),Un=["OL","UL","MENU"],fc=function(E,p,b,B){for(var _=p.firstChild,j=void 0;_;_=j)if(j=_.nextSibling,Qd(_)&&_.data.trim().length>0)b.textNodes.push(new ls(E,_,b.styles));else if(us(_))if(pc(_)&&_.assignedNodes)_.assignedNodes().forEach(function(dt){return fc(E,dt,b,B)});else{var tt=Bi(E,_);tt.styles.isVisible()&&(eE(_,tt,B)?tt.flags|=4:nE(tt.styles)&&(tt.flags|=2),Un.indexOf(_.tagName)!==-1&&(tt.flags|=8),b.elements.push(tt),_.slot,_.shadowRoot?fc(E,_.shadowRoot,tt,B):!rA(_)&&!xa(_)&&!In(_)&&fc(E,_,tt,B))}},Bi=function(E,p){return vc(p)?new Od(E,p):nA(p)?new Id(E,p):xa(p)?new Du(E,p):_u(p)?new hc(E,p):yp(p)?new jn(E,p):wp(p)?new Ks(E,p):In(p)?new dc(E,p):rA(p)?new vi(E,p):Pd(p)?new Nd(E,p):new Ba(E,p)},kd=function(E,p){var b=Bi(E,p);return b.flags|=4,fc(E,p,b,b),b},eE=function(E,p,b){return p.styles.isPositionedWithZIndex()||p.styles.opacity<1||p.styles.isTransformed()||qi(E)&&b.styles.isTransparent()},nE=function(E){return E.isPositioned()||E.isFloating()},Qd=function(E){return E.nodeType===Node.TEXT_NODE},us=function(E){return E.nodeType===Node.ELEMENT_NODE},Ru=function(E){return us(E)&&typeof E.style!="undefined"&&!gc(E)},gc=function(E){return typeof E.className=="object"},_u=function(E){return E.tagName==="LI"},yp=function(E){return E.tagName==="OL"},wp=function(E){return E.tagName==="INPUT"},Ud=function(E){return E.tagName==="HTML"},xa=function(E){return E.tagName==="svg"},qi=function(E){return E.tagName==="BODY"},nA=function(E){return E.tagName==="CANVAS"},ze=function(E){return E.tagName==="VIDEO"},vc=function(E){return E.tagName==="IMG"},Pd=function(E){return E.tagName==="IFRAME"},Dd=function(E){return E.tagName==="STYLE"},Ep=function(E){return E.tagName==="SCRIPT"},rA=function(E){return E.tagName==="TEXTAREA"},In=function(E){return E.tagName==="SELECT"},pc=function(E){return E.tagName==="SLOT"},$i=function(E){return E.tagName.indexOf("-")>0},Rd=function(){function E(){this.counters={}}return E.prototype.getCounterValue=function(p){var b=this.counters[p];return b&&b.length?b[b.length-1]:1},E.prototype.getCounterValues=function(p){var b=this.counters[p];return b||[]},E.prototype.pop=function(p){var b=this;p.forEach(function(B){return b.counters[B].pop()})},E.prototype.parse=function(p){var b=this,B=p.counterIncrement,_=p.counterReset,j=!0;B!==null&&B.forEach(function(dt){var lt=b.counters[dt.counter];lt&&dt.increment!==0&&(j=!1,lt.length||lt.push(1),lt[Math.max(0,lt.length-1)]+=dt.increment)});var tt=[];return j&&_.forEach(function(dt){var lt=b.counters[dt.counter];tt.push(dt.counter),lt||(lt=b.counters[dt.counter]=[]),lt.push(dt.reset)}),tt},E}(),Hu={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},Gu={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u0554","\u0553","\u0552","\u0551","\u0550","\u054F","\u054E","\u054D","\u054C","\u054B","\u054A","\u0549","\u0548","\u0547","\u0546","\u0545","\u0544","\u0543","\u0542","\u0541","\u0540","\u053F","\u053E","\u053D","\u053C","\u053B","\u053A","\u0539","\u0538","\u0537","\u0536","\u0535","\u0534","\u0533","\u0532","\u0531"]},Bp={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["\u05D9\u05F3","\u05D8\u05F3","\u05D7\u05F3","\u05D6\u05F3","\u05D5\u05F3","\u05D4\u05F3","\u05D3\u05F3","\u05D2\u05F3","\u05D1\u05F3","\u05D0\u05F3","\u05EA","\u05E9","\u05E8","\u05E7","\u05E6","\u05E4","\u05E2","\u05E1","\u05E0","\u05DE","\u05DC","\u05DB","\u05D9\u05D8","\u05D9\u05D7","\u05D9\u05D6","\u05D8\u05D6","\u05D8\u05D5","\u05D9","\u05D8","\u05D7","\u05D6","\u05D5","\u05D4","\u05D3","\u05D2","\u05D1","\u05D0"]},mc={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["\u10F5","\u10F0","\u10EF","\u10F4","\u10EE","\u10ED","\u10EC","\u10EB","\u10EA","\u10E9","\u10E8","\u10E7","\u10E6","\u10E5","\u10E4","\u10F3","\u10E2","\u10E1","\u10E0","\u10DF","\u10DE","\u10DD","\u10F2","\u10DC","\u10DB","\u10DA","\u10D9","\u10D8","\u10D7","\u10F1","\u10D6","\u10D5","\u10D4","\u10D3","\u10D2","\u10D1","\u10D0"]},iA=function(E,p,b,B,_,j){return E<p||E>b?ds(E,_,j.length>0):B.integers.reduce(function(tt,dt,lt){for(;E>=dt;)E-=dt,tt+=B.values[lt];return tt},"")+j},aA=function(E,p,b,B){var _="";do b||E--,_=B(E)+_,E/=p;while(E*p>=p);return _},br=function(E,p,b,B,_){var j=b-p+1;return(E<0?"-":"")+(aA(Math.abs(E),j,B,function(tt){return U(Math.floor(tt%j)+p)})+_)},zs=function(E,p,b){b===void 0&&(b=". ");var B=p.length;return aA(Math.abs(E),B,!1,function(_){return p[Math.floor(_%B)]})+b},sA=1,hs=2,oe=4,mo=8,ja=function(E,p,b,B,_,j){if(E<-9999||E>9999)return ds(E,4,_.length>0);var tt=Math.abs(E),dt=_;if(tt===0)return p[0]+dt;for(var lt=0;tt>0&&lt<=4;lt++){var Tt=tt%10;Tt===0&&Ur(j,sA)&&dt!==""?dt=p[Tt]+dt:Tt>1||Tt===1&&lt===0||Tt===1&&lt===1&&Ur(j,hs)||Tt===1&&lt===1&&Ur(j,oe)&&E>100||Tt===1&&lt>1&&Ur(j,mo)?dt=p[Tt]+(lt>0?b[lt-1]:"")+dt:Tt===1&&lt>0&&(dt=b[lt-1]+dt),tt=Math.floor(tt/10)}return(E<0?B:"")+dt},oA="\u5341\u767E\u5343\u842C",AA="\u62FE\u4F70\u4EDF\u842C",JA="\u30DE\u30A4\u30CA\u30B9",Vs="\uB9C8\uC774\uB108\uC2A4",ds=function(E,p,b){var B=b?". ":"",_=b?"\u3001":"",j=b?", ":"",tt=b?" ":"";switch(p){case 0:return"\u2022"+tt;case 1:return"\u25E6"+tt;case 2:return"\u25FE"+tt;case 5:var dt=br(E,48,57,!0,B);return dt.length<4?"0"+dt:dt;case 4:return zs(E,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",_);case 6:return iA(E,1,3999,Hu,3,B).toLowerCase();case 7:return iA(E,1,3999,Hu,3,B);case 8:return br(E,945,969,!1,B);case 9:return br(E,97,122,!1,B);case 10:return br(E,65,90,!1,B);case 11:return br(E,1632,1641,!0,B);case 12:case 49:return iA(E,1,9999,Gu,3,B);case 35:return iA(E,1,9999,Gu,3,B).toLowerCase();case 13:return br(E,2534,2543,!0,B);case 14:case 30:return br(E,6112,6121,!0,B);case 15:return zs(E,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",_);case 16:return zs(E,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",_);case 17:case 48:return ja(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",oA,"\u8CA0",_,hs|oe|mo);case 47:return ja(E,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",AA,"\u8CA0",_,sA|hs|oe|mo);case 42:return ja(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",oA,"\u8D1F",_,hs|oe|mo);case 41:return ja(E,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",AA,"\u8D1F",_,sA|hs|oe|mo);case 26:return ja(E,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",JA,_,0);case 25:return ja(E,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",JA,_,sA|hs|oe);case 31:return ja(E,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Vs,j,sA|hs|oe);case 33:return ja(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Vs,j,0);case 32:return ja(E,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Vs,j,sA|hs|oe);case 18:return br(E,2406,2415,!0,B);case 20:return iA(E,1,19999,mc,3,B);case 21:return br(E,2790,2799,!0,B);case 22:return br(E,2662,2671,!0,B);case 22:return iA(E,1,10999,Bp,3,B);case 23:return zs(E,"\u3042\u3044\u3046\u3048\u304A\u304B\u304D\u304F\u3051\u3053\u3055\u3057\u3059\u305B\u305D\u305F\u3061\u3064\u3066\u3068\u306A\u306B\u306C\u306D\u306E\u306F\u3072\u3075\u3078\u307B\u307E\u307F\u3080\u3081\u3082\u3084\u3086\u3088\u3089\u308A\u308B\u308C\u308D\u308F\u3090\u3091\u3092\u3093");case 24:return zs(E,"\u3044\u308D\u306F\u306B\u307B\u3078\u3068\u3061\u308A\u306C\u308B\u3092\u308F\u304B\u3088\u305F\u308C\u305D\u3064\u306D\u306A\u3089\u3080\u3046\u3090\u306E\u304A\u304F\u3084\u307E\u3051\u3075\u3053\u3048\u3066\u3042\u3055\u304D\u3086\u3081\u307F\u3057\u3091\u3072\u3082\u305B\u3059");case 27:return br(E,3302,3311,!0,B);case 28:return zs(E,"\u30A2\u30A4\u30A6\u30A8\u30AA\u30AB\u30AD\u30AF\u30B1\u30B3\u30B5\u30B7\u30B9\u30BB\u30BD\u30BF\u30C1\u30C4\u30C6\u30C8\u30CA\u30CB\u30CC\u30CD\u30CE\u30CF\u30D2\u30D5\u30D8\u30DB\u30DE\u30DF\u30E0\u30E1\u30E2\u30E4\u30E6\u30E8\u30E9\u30EA\u30EB\u30EC\u30ED\u30EF\u30F0\u30F1\u30F2\u30F3",_);case 29:return zs(E,"\u30A4\u30ED\u30CF\u30CB\u30DB\u30D8\u30C8\u30C1\u30EA\u30CC\u30EB\u30F2\u30EF\u30AB\u30E8\u30BF\u30EC\u30BD\u30C4\u30CD\u30CA\u30E9\u30E0\u30A6\u30F0\u30CE\u30AA\u30AF\u30E4\u30DE\u30B1\u30D5\u30B3\u30A8\u30C6\u30A2\u30B5\u30AD\u30E6\u30E1\u30DF\u30B7\u30F1\u30D2\u30E2\u30BB\u30B9",_);case 34:return br(E,3792,3801,!0,B);case 37:return br(E,6160,6169,!0,B);case 38:return br(E,4160,4169,!0,B);case 39:return br(E,2918,2927,!0,B);case 40:return br(E,1776,1785,!0,B);case 43:return br(E,3046,3055,!0,B);case 44:return br(E,3174,3183,!0,B);case 45:return br(E,3664,3673,!0,B);case 46:return br(E,3872,3881,!0,B);case 3:default:return br(E,48,57,!0,B)}},Ca="data-html2canvas-ignore",_d=function(){function E(p,b,B){if(this.context=p,this.options=B,this.scrolledElements=[],this.referenceElement=b,this.counters=new Rd,this.quoteDepth=0,!b.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(b.ownerDocument.documentElement,!1)}return E.prototype.toIFrame=function(p,b){var B=this,_=bp(p,b);if(!_.contentWindow)return Promise.reject("Unable to find iframe window");var j=p.defaultView.pageXOffset,tt=p.defaultView.pageYOffset,dt=_.contentWindow,lt=dt.document,Tt=Sp(_).then(function(){return W(B,void 0,void 0,function(){var Ot,Dt;return H(this,function(Jt){switch(Jt.label){case 0:return this.scrolledElements.forEach(Fp),dt&&(dt.scrollTo(b.left,b.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(dt.scrollY!==b.top||dt.scrollX!==b.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(dt.scrollX-b.left,dt.scrollY-b.top,0,0))),Ot=this.options.onclone,Dt=this.clonedReferenceElement,typeof Dt=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:lt.fonts&&lt.fonts.ready?[4,lt.fonts.ready]:[3,2];case 1:Jt.sent(),Jt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,Cp(lt)]:[3,4];case 3:Jt.sent(),Jt.label=4;case 4:return typeof Ot=="function"?[2,Promise.resolve().then(function(){return Ot(lt,Dt)}).then(function(){return _})]:[2,_]}})})});return lt.open(),lt.write(Hd(document.doctype)+"<html></html>"),Tp(this.referenceElement.ownerDocument,j,tt),lt.replaceChild(lt.adoptNode(this.documentElement),lt.documentElement),lt.close(),Tt},E.prototype.createElementClone=function(p){if(we(p,2))debugger;if(nA(p))return this.createCanvasClone(p);if(ze(p))return this.createVideoClone(p);if(Dd(p))return this.createStyleClone(p);var b=p.cloneNode(!1);return vc(b)&&(vc(p)&&p.currentSrc&&p.currentSrc!==p.src&&(b.src=p.currentSrc,b.srcset=""),b.loading==="lazy"&&(b.loading="eager")),$i(b)?this.createCustomElementClone(b):b},E.prototype.createCustomElementClone=function(p){var b=document.createElement("html2canvascustomelement");return yc(p.style,b),b},E.prototype.createStyleClone=function(p){try{var b=p.sheet;if(b&&b.cssRules){var B=[].slice.call(b.cssRules,0).reduce(function(j,tt){return tt&&typeof tt.cssText=="string"?j+tt.cssText:j},""),_=p.cloneNode(!1);return _.textContent=B,_}}catch(j){if(this.context.logger.error("Unable to access cssRules property",j),j.name!=="SecurityError")throw j}return p.cloneNode(!1)},E.prototype.createCanvasClone=function(p){var b;if(this.options.inlineImages&&p.ownerDocument){var B=p.ownerDocument.createElement("img");try{return B.src=p.toDataURL(),B}catch(Tt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",p)}}var _=p.cloneNode(!1);try{_.width=p.width,_.height=p.height;var j=p.getContext("2d"),tt=_.getContext("2d");if(tt)if(!this.options.allowTaint&&j)tt.putImageData(j.getImageData(0,0,p.width,p.height),0,0);else{var dt=(b=p.getContext("webgl2"))!==null&&b!==void 0?b:p.getContext("webgl");if(dt){var lt=dt.getContextAttributes();(lt==null?void 0:lt.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",p)}tt.drawImage(p,0,0)}return _}catch(Tt){this.context.logger.info("Unable to clone canvas as it is tainted",p)}return _},E.prototype.createVideoClone=function(p){var b=p.ownerDocument.createElement("canvas");b.width=p.offsetWidth,b.height=p.offsetHeight;var B=b.getContext("2d");try{return B&&(B.drawImage(p,0,0,b.width,b.height),this.options.allowTaint||B.getImageData(0,0,b.width,b.height)),b}catch(j){this.context.logger.info("Unable to clone video as it is tainted",p)}var _=p.ownerDocument.createElement("canvas");return _.width=p.offsetWidth,_.height=p.offsetHeight,_},E.prototype.appendChildNode=function(p,b,B){(!us(b)||!Ep(b)&&!b.hasAttribute(Ca)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(b)))&&(!this.options.copyStyles||!us(b)||!Dd(b))&&p.appendChild(this.cloneNode(b,B))},E.prototype.cloneChildNodes=function(p,b,B){for(var _=this,j=p.shadowRoot?p.shadowRoot.firstChild:p.firstChild;j;j=j.nextSibling)if(us(j)&&pc(j)&&typeof j.assignedNodes=="function"){var tt=j.assignedNodes();tt.length&&tt.forEach(function(dt){return _.appendChildNode(b,dt,B)})}else this.appendChildNode(b,j,B)},E.prototype.cloneNode=function(p,b){if(Qd(p))return document.createTextNode(p.data);if(!p.ownerDocument)return p.cloneNode(!1);var B=p.ownerDocument.defaultView;if(B&&us(p)&&(Ru(p)||gc(p))){var _=this.createElementClone(p);_.style.transitionProperty="none";var j=B.getComputedStyle(p),tt=B.getComputedStyle(p,":before"),dt=B.getComputedStyle(p,":after");this.referenceElement===p&&Ru(_)&&(this.clonedReferenceElement=_),qi(_)&&Op(_);var lt=this.counters.parse(new Jo(this.context,j)),Tt=this.resolvePseudoContent(p,_,tt,qA.BEFORE);$i(p)&&(b=!0),ze(p)||this.cloneChildNodes(p,_,b),Tt&&_.insertBefore(Tt,_.firstChild);var Ot=this.resolvePseudoContent(p,_,dt,qA.AFTER);return Ot&&_.appendChild(Ot),this.counters.pop(lt),(j&&(this.options.copyStyles||gc(p))&&!Pd(p)||b)&&yc(j,_),(p.scrollTop!==0||p.scrollLeft!==0)&&this.scrolledElements.push([_,p.scrollLeft,p.scrollTop]),(rA(p)||In(p))&&(rA(_)||In(_))&&(_.value=p.value),_}return p.cloneNode(!1)},E.prototype.resolvePseudoContent=function(p,b,B,_){var j=this;if(B){var tt=B.content,dt=b.ownerDocument;if(!(!dt||!tt||tt==="none"||tt==="-moz-alt-content"||B.display==="none")){this.counters.parse(new Jo(this.context,B));var lt=new ep(this.context,B),Tt=dt.createElement("html2canvaspseudoelement");yc(B,Tt),lt.content.forEach(function(Dt){if(Dt.type===0)Tt.appendChild(dt.createTextNode(Dt.value));else if(Dt.type===22){var Jt=dt.createElement("img");Jt.src=Dt.value,Jt.style.opacity="1",Tt.appendChild(Jt)}else if(Dt.type===18){if(Dt.name==="attr"){var Oe=Dt.values.filter($n);Oe.length&&Tt.appendChild(dt.createTextNode(p.getAttribute(Oe[0].value)||""))}else if(Dt.name==="counter"){var fe=Dt.values.filter(GA),Be=fe[0],an=fe[1];if(Be&&$n(Be)){var Ue=j.counters.getCounterValue(Be.value),Ne=an&&$n(an)?xu.parse(j.context,an.value):3;Tt.appendChild(dt.createTextNode(ds(Ue,Ne,!1)))}}else if(Dt.name==="counters"){var Mn=Dt.values.filter(GA),Be=Mn[0],An=Mn[1],an=Mn[2];if(Be&&$n(Be)){var Xe=j.counters.getCounterValues(Be.value),Fe=an&&$n(an)?xu.parse(j.context,an.value):3,bn=An&&An.type===0?An.value:"",xn=Xe.map(function(ai){return ds(ai,Fe,!1)}).join(bn);Tt.appendChild(dt.createTextNode(xn))}}}else if(Dt.type===20)switch(Dt.value){case"open-quote":Tt.appendChild(dt.createTextNode(vd(lt.quotes,j.quoteDepth++,!0)));break;case"close-quote":Tt.appendChild(dt.createTextNode(vd(lt.quotes,--j.quoteDepth,!1)));break;default:Tt.appendChild(dt.createTextNode(Dt.value))}}),Tt.className=Ec+" "+lA;var Ot=_===qA.BEFORE?" "+Ec:" "+lA;return gc(b)?b.className.baseValue+=Ot:b.className+=Ot,Tt}}},E.destroy=function(p){return p.parentNode?(p.parentNode.removeChild(p),!0):!1},E}(),qA;(function(E){E[E.BEFORE=0]="BEFORE",E[E.AFTER=1]="AFTER"})(qA||(qA={}));var bp=function(E,p){var b=E.createElement("iframe");return b.className="html2canvas-container",b.style.visibility="hidden",b.style.position="fixed",b.style.left="-10000px",b.style.top="0px",b.style.border="0",b.width=p.width.toString(),b.height=p.height.toString(),b.scrolling="no",b.setAttribute(Ca,"true"),E.body.appendChild(b),b},xp=function(E){return new Promise(function(p){if(E.complete){p();return}if(!E.src){p();return}E.onload=p,E.onerror=p})},Cp=function(E){return Promise.all([].slice.call(E.images,0).map(xp))},Sp=function(E){return new Promise(function(p,b){var B=E.contentWindow;if(!B)return b("No window assigned for iframe");var _=B.document;B.onload=E.onload=function(){B.onload=E.onload=null;var j=setInterval(function(){_.body.childNodes.length>0&&_.readyState==="complete"&&(clearInterval(j),p(E))},50)}})},Mp=["all","d","content"],yc=function(E,p){for(var b=E.length-1;b>=0;b--){var B=E.item(b);Mp.indexOf(B)===-1&&p.style.setProperty(B,E.getPropertyValue(B))}return p},Hd=function(E){var p="";return E&&(p+="<!DOCTYPE ",E.name&&(p+=E.name),E.internalSubset&&(p+=E.internalSubset),E.publicId&&(p+='"'+E.publicId+'"'),E.systemId&&(p+='"'+E.systemId+'"'),p+=">"),p},Tp=function(E,p,b){E&&E.defaultView&&(p!==E.defaultView.pageXOffset||b!==E.defaultView.pageYOffset)&&E.defaultView.scrollTo(p,b)},Fp=function(E){var p=E[0],b=E[1],B=E[2];p.scrollLeft=b,p.scrollTop=B},Gd=":before",wc=":after",Ec="___html2canvas___pseudoelement_before",lA="___html2canvas___pseudoelement_after",Kd=`{
content: "" !important;
display: none !important;
}`,Op=function(E){ki(E,"."+Ec+Gd+Kd+`
.`+lA+wc+Kd)},ki=function(E,p){var b=E.ownerDocument;if(b){var B=b.createElement("style");B.textContent=p,E.appendChild(B)}},Ku=function(){function E(){}return E.getOrigin=function(p){var b=E._link;return b?(b.href=p,b.href=b.href,b.protocol+b.hostname+b.port):"about:blank"},E.isSameOrigin=function(p){return E.getOrigin(p)===E._origin},E.setContext=function(p){E._link=p.document.createElement("a"),E._origin=E.getOrigin(p.location.href)},E._origin="about:blank",E}(),Ip=function(){function E(p,b){this.context=p,this._options=b,this._cache={}}return E.prototype.addImage=function(p){var b=Promise.resolve();return this.has(p)||(zu(p)||wo(p))&&(this._cache[p]=this.loadImage(p)).catch(function(){}),b},E.prototype.match=function(p){return this._cache[p]},E.prototype.loadImage=function(p){return W(this,void 0,void 0,function(){var b,B,_,j,tt=this;return H(this,function(dt){switch(dt.label){case 0:return b=Ku.isSameOrigin(p),B=!bc(p)&&this._options.useCORS===!0&&ni.SUPPORT_CORS_IMAGES&&!b,_=!bc(p)&&!b&&!zu(p)&&typeof this._options.proxy=="string"&&ni.SUPPORT_CORS_XHR&&!B,!b&&this._options.allowTaint===!1&&!bc(p)&&!zu(p)&&!_&&!B?[2]:(j=p,_?[4,this.proxy(j)]:[3,2]);case 1:j=dt.sent(),dt.label=2;case 2:return this.context.logger.debug("Added image "+p.substring(0,256)),[4,new Promise(function(lt,Tt){var Ot=new Image;Ot.onload=function(){return lt(Ot)},Ot.onerror=Tt,(Vd(j)||B)&&(Ot.crossOrigin="anonymous"),Ot.src=j,Ot.complete===!0&&setTimeout(function(){return lt(Ot)},500),tt._options.imageTimeout>0&&setTimeout(function(){return Tt("Timed out ("+tt._options.imageTimeout+"ms) loading image")},tt._options.imageTimeout)})];case 3:return[2,dt.sent()]}})})},E.prototype.has=function(p){return typeof this._cache[p]!="undefined"},E.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},E.prototype.proxy=function(p){var b=this,B=this._options.proxy;if(!B)throw new Error("No proxy defined");var _=p.substring(0,256);return new Promise(function(j,tt){var dt=ni.SUPPORT_RESPONSE_TYPE?"blob":"text",lt=new XMLHttpRequest;lt.onload=function(){if(lt.status===200)if(dt==="text")j(lt.response);else{var Dt=new FileReader;Dt.addEventListener("load",function(){return j(Dt.result)},!1),Dt.addEventListener("error",function(Jt){return tt(Jt)},!1),Dt.readAsDataURL(lt.response)}else tt("Failed to proxy resource "+_+" with status code "+lt.status)},lt.onerror=tt;var Tt=B.indexOf("?")>-1?"&":"?";if(lt.open("GET",""+B+Tt+"url="+encodeURIComponent(p)+"&responseType="+dt),dt!=="text"&&lt instanceof XMLHttpRequest&&(lt.responseType=dt),b._options.imageTimeout){var Ot=b._options.imageTimeout;lt.timeout=Ot,lt.ontimeout=function(){return tt("Timed out ("+Ot+"ms) proxying "+_)}}lt.send()})},E}(),zd=/^data:image\/svg\+xml/i,Bc=/^data:image\/.*;base64,/i,yo=/^data:image\/.*/i,wo=function(E){return ni.SUPPORT_SVG_DRAWING||!Sa(E)},bc=function(E){return yo.test(E)},Vd=function(E){return Bc.test(E)},zu=function(E){return E.substr(0,4)==="blob"},Sa=function(E){return E.substr(-3).toLowerCase()==="svg"||zd.test(E)},Se=function(){function E(p,b){this.type=0,this.x=p,this.y=b}return E.prototype.add=function(p,b){return new E(this.x+p,this.y+b)},E}(),fs=function(E,p,b){return new Se(E.x+(p.x-E.x)*b,E.y+(p.y-E.y)*b)},cA=function(){function E(p,b,B,_){this.type=1,this.start=p,this.startControl=b,this.endControl=B,this.end=_}return E.prototype.subdivide=function(p,b){var B=fs(this.start,this.startControl,p),_=fs(this.startControl,this.endControl,p),j=fs(this.endControl,this.end,p),tt=fs(B,_,p),dt=fs(_,j,p),lt=fs(tt,dt,p);return b?new E(this.start,B,tt,lt):new E(lt,dt,j,this.end)},E.prototype.add=function(p,b){return new E(this.start.add(p,b),this.startControl.add(p,b),this.endControl.add(p,b),this.end.add(p,b))},E.prototype.reverse=function(){return new E(this.end,this.endControl,this.startControl,this.start)},E}(),Ln=function(E){return E.type===1},ge=function(){function E(p){var b=p.styles,B=p.bounds,_=zA(b.borderTopLeftRadius,B.width,B.height),j=_[0],tt=_[1],dt=zA(b.borderTopRightRadius,B.width,B.height),lt=dt[0],Tt=dt[1],Ot=zA(b.borderBottomRightRadius,B.width,B.height),Dt=Ot[0],Jt=Ot[1],Oe=zA(b.borderBottomLeftRadius,B.width,B.height),fe=Oe[0],Be=Oe[1],an=[];an.push((j+lt)/B.width),an.push((fe+Dt)/B.width),an.push((tt+Be)/B.height),an.push((Tt+Jt)/B.height);var Ue=Math.max.apply(Math,an);Ue>1&&(j/=Ue,tt/=Ue,lt/=Ue,Tt/=Ue,Dt/=Ue,Jt/=Ue,fe/=Ue,Be/=Ue);var Ne=B.width-lt,Mn=B.height-Jt,An=B.width-Dt,Xe=B.height-Be,Fe=b.borderTopWidth,bn=b.borderRightWidth,xn=b.borderBottomWidth,Ze=b.borderLeftWidth,Fr=Gn(b.paddingTop,p.bounds.width),ai=Gn(b.paddingRight,p.bounds.width),Ui=Gn(b.paddingBottom,p.bounds.width),Kn=Gn(b.paddingLeft,p.bounds.width);this.topLeftBorderDoubleOuterBox=j>0||tt>0?Ar(B.left+Ze/3,B.top+Fe/3,j-Ze/3,tt-Fe/3,un.TOP_LEFT):new Se(B.left+Ze/3,B.top+Fe/3),this.topRightBorderDoubleOuterBox=j>0||tt>0?Ar(B.left+Ne,B.top+Fe/3,lt-bn/3,Tt-Fe/3,un.TOP_RIGHT):new Se(B.left+B.width-bn/3,B.top+Fe/3),this.bottomRightBorderDoubleOuterBox=Dt>0||Jt>0?Ar(B.left+An,B.top+Mn,Dt-bn/3,Jt-xn/3,un.BOTTOM_RIGHT):new Se(B.left+B.width-bn/3,B.top+B.height-xn/3),this.bottomLeftBorderDoubleOuterBox=fe>0||Be>0?Ar(B.left+Ze/3,B.top+Xe,fe-Ze/3,Be-xn/3,un.BOTTOM_LEFT):new Se(B.left+Ze/3,B.top+B.height-xn/3),this.topLeftBorderDoubleInnerBox=j>0||tt>0?Ar(B.left+Ze*2/3,B.top+Fe*2/3,j-Ze*2/3,tt-Fe*2/3,un.TOP_LEFT):new Se(B.left+Ze*2/3,B.top+Fe*2/3),this.topRightBorderDoubleInnerBox=j>0||tt>0?Ar(B.left+Ne,B.top+Fe*2/3,lt-bn*2/3,Tt-Fe*2/3,un.TOP_RIGHT):new Se(B.left+B.width-bn*2/3,B.top+Fe*2/3),this.bottomRightBorderDoubleInnerBox=Dt>0||Jt>0?Ar(B.left+An,B.top+Mn,Dt-bn*2/3,Jt-xn*2/3,un.BOTTOM_RIGHT):new Se(B.left+B.width-bn*2/3,B.top+B.height-xn*2/3),this.bottomLeftBorderDoubleInnerBox=fe>0||Be>0?Ar(B.left+Ze*2/3,B.top+Xe,fe-Ze*2/3,Be-xn*2/3,un.BOTTOM_LEFT):new Se(B.left+Ze*2/3,B.top+B.height-xn*2/3),this.topLeftBorderStroke=j>0||tt>0?Ar(B.left+Ze/2,B.top+Fe/2,j-Ze/2,tt-Fe/2,un.TOP_LEFT):new Se(B.left+Ze/2,B.top+Fe/2),this.topRightBorderStroke=j>0||tt>0?Ar(B.left+Ne,B.top+Fe/2,lt-bn/2,Tt-Fe/2,un.TOP_RIGHT):new Se(B.left+B.width-bn/2,B.top+Fe/2),this.bottomRightBorderStroke=Dt>0||Jt>0?Ar(B.left+An,B.top+Mn,Dt-bn/2,Jt-xn/2,un.BOTTOM_RIGHT):new Se(B.left+B.width-bn/2,B.top+B.height-xn/2),this.bottomLeftBorderStroke=fe>0||Be>0?Ar(B.left+Ze/2,B.top+Xe,fe-Ze/2,Be-xn/2,un.BOTTOM_LEFT):new Se(B.left+Ze/2,B.top+B.height-xn/2),this.topLeftBorderBox=j>0||tt>0?Ar(B.left,B.top,j,tt,un.TOP_LEFT):new Se(B.left,B.top),this.topRightBorderBox=lt>0||Tt>0?Ar(B.left+Ne,B.top,lt,Tt,un.TOP_RIGHT):new Se(B.left+B.width,B.top),this.bottomRightBorderBox=Dt>0||Jt>0?Ar(B.left+An,B.top+Mn,Dt,Jt,un.BOTTOM_RIGHT):new Se(B.left+B.width,B.top+B.height),this.bottomLeftBorderBox=fe>0||Be>0?Ar(B.left,B.top+Xe,fe,Be,un.BOTTOM_LEFT):new Se(B.left,B.top+B.height),this.topLeftPaddingBox=j>0||tt>0?Ar(B.left+Ze,B.top+Fe,Math.max(0,j-Ze),Math.max(0,tt-Fe),un.TOP_LEFT):new Se(B.left+Ze,B.top+Fe),this.topRightPaddingBox=lt>0||Tt>0?Ar(B.left+Math.min(Ne,B.width-bn),B.top+Fe,Ne>B.width+bn?0:Math.max(0,lt-bn),Math.max(0,Tt-Fe),un.TOP_RIGHT):new Se(B.left+B.width-bn,B.top+Fe),this.bottomRightPaddingBox=Dt>0||Jt>0?Ar(B.left+Math.min(An,B.width-Ze),B.top+Math.min(Mn,B.height-xn),Math.max(0,Dt-bn),Math.max(0,Jt-xn),un.BOTTOM_RIGHT):new Se(B.left+B.width-bn,B.top+B.height-xn),this.bottomLeftPaddingBox=fe>0||Be>0?Ar(B.left+Ze,B.top+Math.min(Xe,B.height-xn),Math.max(0,fe-Ze),Math.max(0,Be-xn),un.BOTTOM_LEFT):new Se(B.left+Ze,B.top+B.height-xn),this.topLeftContentBox=j>0||tt>0?Ar(B.left+Ze+Kn,B.top+Fe+Fr,Math.max(0,j-(Ze+Kn)),Math.max(0,tt-(Fe+Fr)),un.TOP_LEFT):new Se(B.left+Ze+Kn,B.top+Fe+Fr),this.topRightContentBox=lt>0||Tt>0?Ar(B.left+Math.min(Ne,B.width+Ze+Kn),B.top+Fe+Fr,Ne>B.width+Ze+Kn?0:lt-Ze+Kn,Tt-(Fe+Fr),un.TOP_RIGHT):new Se(B.left+B.width-(bn+ai),B.top+Fe+Fr),this.bottomRightContentBox=Dt>0||Jt>0?Ar(B.left+Math.min(An,B.width-(Ze+Kn)),B.top+Math.min(Mn,B.height+Fe+Fr),Math.max(0,Dt-(bn+ai)),Jt-(xn+Ui),un.BOTTOM_RIGHT):new Se(B.left+B.width-(bn+ai),B.top+B.height-(xn+Ui)),this.bottomLeftContentBox=fe>0||Be>0?Ar(B.left+Ze+Kn,B.top+Xe,Math.max(0,fe-(Ze+Kn)),Be-(xn+Ui),un.BOTTOM_LEFT):new Se(B.left+Ze+Kn,B.top+B.height-(xn+Ui))}return E}(),un;(function(E){E[E.TOP_LEFT=0]="TOP_LEFT",E[E.TOP_RIGHT=1]="TOP_RIGHT",E[E.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",E[E.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(un||(un={}));var Ar=function(E,p,b,B,_){var j=4*((Math.sqrt(2)-1)/3),tt=b*j,dt=B*j,lt=E+b,Tt=p+B;switch(_){case un.TOP_LEFT:return new cA(new Se(E,Tt),new Se(E,Tt-dt),new Se(lt-tt,p),new Se(lt,p));case un.TOP_RIGHT:return new cA(new Se(E,p),new Se(E+tt,p),new Se(lt,Tt-dt),new Se(lt,Tt));case un.BOTTOM_RIGHT:return new cA(new Se(lt,p),new Se(lt,p+dt),new Se(E+tt,Tt),new Se(E,Tt));case un.BOTTOM_LEFT:default:return new cA(new Se(lt,Tt),new Se(lt-tt,Tt),new Se(E,p+dt),new Se(E,p))}},xc=function(E){return[E.topLeftBorderBox,E.topRightBorderBox,E.bottomRightBorderBox,E.bottomLeftBorderBox]},Lp=function(E){return[E.topLeftContentBox,E.topRightContentBox,E.bottomRightContentBox,E.bottomLeftContentBox]},gs=function(E){return[E.topLeftPaddingBox,E.topRightPaddingBox,E.bottomRightPaddingBox,E.bottomLeftPaddingBox]},Np=function(){function E(p,b,B){this.offsetX=p,this.offsetY=b,this.matrix=B,this.type=0,this.target=6}return E}(),Cc=function(){function E(p,b){this.path=p,this.target=b,this.type=1}return E}(),kp=function(){function E(p){this.opacity=p,this.type=2,this.target=6}return E}(),Qp=function(E){return E.type===0},Vu=function(E){return E.type===1},Wu=function(E){return E.type===2},$A=function(E,p){return E.length===p.length?E.some(function(b,B){return b===p[B]}):!1},Up=function(E,p,b,B,_){return E.map(function(j,tt){switch(tt){case 0:return j.add(p,b);case 1:return j.add(p+B,b);case 2:return j.add(p+B,b+_);case 3:return j.add(p,b+_)}return j})},vs=function(){function E(p){this.element=p,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return E}(),tl=function(){function E(p,b){if(this.container=p,this.parent=b,this.effects=[],this.curves=new ge(this.container),this.container.styles.opacity<1&&this.effects.push(new kp(this.container.styles.opacity)),this.container.styles.transform!==null){var B=this.container.bounds.left+this.container.styles.transformOrigin[0].number,_=this.container.bounds.top+this.container.styles.transformOrigin[1].number,j=this.container.styles.transform;this.effects.push(new Np(B,_,j))}if(this.container.styles.overflowX!==0){var tt=xc(this.curves),dt=gs(this.curves);$A(tt,dt)?this.effects.push(new Cc(tt,6)):(this.effects.push(new Cc(tt,2)),this.effects.push(new Cc(dt,4)))}}return E.prototype.getEffects=function(p){for(var b=[2,3].indexOf(this.container.styles.position)===-1,B=this.parent,_=this.effects.slice(0);B;){var j=B.effects.filter(function(lt){return!Vu(lt)});if(b||B.container.styles.position!==0||!B.parent){if(_.unshift.apply(_,j),b=[2,3].indexOf(B.container.styles.position)===-1,B.container.styles.overflowX!==0){var tt=xc(B.curves),dt=gs(B.curves);$A(tt,dt)||_.unshift(new Cc(dt,6))}}else _.unshift.apply(_,j);B=B.parent}return _.filter(function(lt){return Ur(lt.target,p)})},E}(),Qi=function(E,p,b,B){E.container.elements.forEach(function(_){var j=Ur(_.flags,4),tt=Ur(_.flags,2),dt=new tl(_,E);Ur(_.styles.display,2048)&&B.push(dt);var lt=Ur(_.flags,8)?[]:B;if(j||tt){var Tt=j||_.styles.isPositioned()?b:p,Ot=new vs(dt);if(_.styles.isPositioned()||_.styles.opacity<1||_.styles.isTransformed()){var Dt=_.styles.zIndex.order;if(Dt<0){var Jt=0;Tt.negativeZIndex.some(function(fe,Be){return Dt>fe.element.container.styles.zIndex.order?(Jt=Be,!1):Jt>0}),Tt.negativeZIndex.splice(Jt,0,Ot)}else if(Dt>0){var Oe=0;Tt.positiveZIndex.some(function(fe,Be){return Dt>=fe.element.container.styles.zIndex.order?(Oe=Be+1,!1):Oe>0}),Tt.positiveZIndex.splice(Oe,0,Ot)}else Tt.zeroOrAutoZIndexOrTransformedOrOpacity.push(Ot)}else _.styles.isFloating()?Tt.nonPositionedFloats.push(Ot):Tt.nonPositionedInlineLevel.push(Ot);Qi(dt,Ot,j?Ot:b,lt)}else _.styles.isInlineLevel()?p.inlineLevel.push(dt):p.nonInlineLevel.push(dt),Qi(dt,p,b,lt);Ur(_.flags,8)&&Wd(_,lt)})},Wd=function(E,p){for(var b=E instanceof jn?E.start:1,B=E instanceof jn?E.reversed:!1,_=0;_<p.length;_++){var j=p[_];j.container instanceof hc&&typeof j.container.value=="number"&&j.container.value!==0&&(b=j.container.value),j.listValue=ds(b,j.container.styles.listStyleType,!0),b+=B?-1:1}},Zu=function(E){var p=new tl(E,null),b=new vs(p),B=[];return Qi(p,b,b,B),Wd(p.container,B),b},_n=function(E,p){switch(p){case 0:return la(E.topLeftBorderBox,E.topLeftPaddingBox,E.topRightBorderBox,E.topRightPaddingBox);case 1:return la(E.topRightBorderBox,E.topRightPaddingBox,E.bottomRightBorderBox,E.bottomRightPaddingBox);case 2:return la(E.bottomRightBorderBox,E.bottomRightPaddingBox,E.bottomLeftBorderBox,E.bottomLeftPaddingBox);case 3:default:return la(E.bottomLeftBorderBox,E.bottomLeftPaddingBox,E.topLeftBorderBox,E.topLeftPaddingBox)}},Ma=function(E,p){switch(p){case 0:return la(E.topLeftBorderBox,E.topLeftBorderDoubleOuterBox,E.topRightBorderBox,E.topRightBorderDoubleOuterBox);case 1:return la(E.topRightBorderBox,E.topRightBorderDoubleOuterBox,E.bottomRightBorderBox,E.bottomRightBorderDoubleOuterBox);case 2:return la(E.bottomRightBorderBox,E.bottomRightBorderDoubleOuterBox,E.bottomLeftBorderBox,E.bottomLeftBorderDoubleOuterBox);case 3:default:return la(E.bottomLeftBorderBox,E.bottomLeftBorderDoubleOuterBox,E.topLeftBorderBox,E.topLeftBorderDoubleOuterBox)}},Eo=function(E,p){switch(p){case 0:return la(E.topLeftBorderDoubleInnerBox,E.topLeftPaddingBox,E.topRightBorderDoubleInnerBox,E.topRightPaddingBox);case 1:return la(E.topRightBorderDoubleInnerBox,E.topRightPaddingBox,E.bottomRightBorderDoubleInnerBox,E.bottomRightPaddingBox);case 2:return la(E.bottomRightBorderDoubleInnerBox,E.bottomRightPaddingBox,E.bottomLeftBorderDoubleInnerBox,E.bottomLeftPaddingBox);case 3:default:return la(E.bottomLeftBorderDoubleInnerBox,E.bottomLeftPaddingBox,E.topLeftBorderDoubleInnerBox,E.topLeftPaddingBox)}},ju=function(E,p){switch(p){case 0:return el(E.topLeftBorderStroke,E.topRightBorderStroke);case 1:return el(E.topRightBorderStroke,E.bottomRightBorderStroke);case 2:return el(E.bottomRightBorderStroke,E.bottomLeftBorderStroke);case 3:default:return el(E.bottomLeftBorderStroke,E.topLeftBorderStroke)}},el=function(E,p){var b=[];return Ln(E)?b.push(E.subdivide(.5,!1)):b.push(E),Ln(p)?b.push(p.subdivide(.5,!0)):b.push(p),b},la=function(E,p,b,B){var _=[];return Ln(E)?_.push(E.subdivide(.5,!1)):_.push(E),Ln(b)?_.push(b.subdivide(.5,!0)):_.push(b),Ln(B)?_.push(B.subdivide(.5,!0).reverse()):_.push(B),Ln(p)?_.push(p.subdivide(.5,!1).reverse()):_.push(p),_},Zd=function(E){var p=E.bounds,b=E.styles;return p.add(b.borderLeftWidth,b.borderTopWidth,-(b.borderRightWidth+b.borderLeftWidth),-(b.borderTopWidth+b.borderBottomWidth))},uA=function(E){var p=E.styles,b=E.bounds,B=Gn(p.paddingLeft,b.width),_=Gn(p.paddingRight,b.width),j=Gn(p.paddingTop,b.width),tt=Gn(p.paddingBottom,b.width);return b.add(B+p.borderLeftWidth,j+p.borderTopWidth,-(p.borderRightWidth+p.borderLeftWidth+B+_),-(p.borderTopWidth+p.borderBottomWidth+j+tt))},Pp=function(E,p){return E===0?p.bounds:E===2?uA(p):Zd(p)},jd=function(E,p){return E===0?p.bounds:E===2?uA(p):Zd(p)},Sc=function(E,p,b){var B=Pp(dA(E.styles.backgroundOrigin,p),E),_=jd(dA(E.styles.backgroundClip,p),E),j=Dp(dA(E.styles.backgroundSize,p),b,B),tt=j[0],dt=j[1],lt=zA(dA(E.styles.backgroundPosition,p),B.width-tt,B.height-dt),Tt=Rp(dA(E.styles.backgroundRepeat,p),lt,j,B,_),Ot=Math.round(B.left+lt[0]),Dt=Math.round(B.top+lt[1]);return[Tt,Ot,Dt,tt,dt]},hA=function(E){return $n(E)&&E.value===ZA.AUTO},Yn=function(E){return typeof E=="number"},Dp=function(E,p,b){var B=p[0],_=p[1],j=p[2],tt=E[0],dt=E[1];if(!tt)return[0,0];if(Qr(tt)&&dt&&Qr(dt))return[Gn(tt,b.width),Gn(dt,b.height)];var lt=Yn(j);if($n(tt)&&(tt.value===ZA.CONTAIN||tt.value===ZA.COVER)){if(Yn(j)){var Tt=b.width/b.height;return Tt<j!=(tt.value===ZA.COVER)?[b.width,b.width/j]:[b.height*j,b.height]}return[b.width,b.height]}var Ot=Yn(B),Dt=Yn(_),Jt=Ot||Dt;if(hA(tt)&&(!dt||hA(dt))){if(Ot&&Dt)return[B,_];if(!lt&&!Jt)return[b.width,b.height];if(Jt&&lt){var Oe=Ot?B:_*j,fe=Dt?_:B/j;return[Oe,fe]}var Be=Ot?B:b.width,an=Dt?_:b.height;return[Be,an]}if(lt){var Ue=0,Ne=0;return Qr(tt)?Ue=Gn(tt,b.width):Qr(dt)&&(Ne=Gn(dt,b.height)),hA(tt)?Ue=Ne*j:(!dt||hA(dt))&&(Ne=Ue/j),[Ue,Ne]}var Mn=null,An=null;if(Qr(tt)?Mn=Gn(tt,b.width):dt&&Qr(dt)&&(An=Gn(dt,b.height)),Mn!==null&&(!dt||hA(dt))&&(An=Ot&&Dt?Mn/B*_:b.height),An!==null&&hA(tt)&&(Mn=Ot&&Dt?An/_*B:b.width),Mn!==null&&An!==null)return[Mn,An];throw new Error("Unable to calculate background-size for element")},dA=function(E,p){var b=E[p];return typeof b=="undefined"?E[0]:b},Rp=function(E,p,b,B,_){var j=p[0],tt=p[1],dt=b[0],lt=b[1];switch(E){case 2:return[new Se(Math.round(B.left),Math.round(B.top+tt)),new Se(Math.round(B.left+B.width),Math.round(B.top+tt)),new Se(Math.round(B.left+B.width),Math.round(lt+B.top+tt)),new Se(Math.round(B.left),Math.round(lt+B.top+tt))];case 3:return[new Se(Math.round(B.left+j),Math.round(B.top)),new Se(Math.round(B.left+j+dt),Math.round(B.top)),new Se(Math.round(B.left+j+dt),Math.round(B.height+B.top)),new Se(Math.round(B.left+j),Math.round(B.height+B.top))];case 1:return[new Se(Math.round(B.left+j),Math.round(B.top+tt)),new Se(Math.round(B.left+j+dt),Math.round(B.top+tt)),new Se(Math.round(B.left+j+dt),Math.round(B.top+tt+lt)),new Se(Math.round(B.left+j),Math.round(B.top+tt+lt))];default:return[new Se(Math.round(_.left),Math.round(_.top)),new Se(Math.round(_.left+_.width),Math.round(_.top)),new Se(Math.round(_.left+_.width),Math.round(_.height+_.top)),new Se(Math.round(_.left),Math.round(_.height+_.top))]}},_p="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Yd="Hidden Text",Hp=function(){function E(p){this._data={},this._document=p}return E.prototype.parseMetrics=function(p,b){var B=this._document.createElement("div"),_=this._document.createElement("img"),j=this._document.createElement("span"),tt=this._document.body;B.style.visibility="hidden",B.style.fontFamily=p,B.style.fontSize=b,B.style.margin="0",B.style.padding="0",B.style.whiteSpace="nowrap",tt.appendChild(B),_.src=_p,_.width=1,_.height=1,_.style.margin="0",_.style.padding="0",_.style.verticalAlign="baseline",j.style.fontFamily=p,j.style.fontSize=b,j.style.margin="0",j.style.padding="0",j.appendChild(this._document.createTextNode(Yd)),B.appendChild(j),B.appendChild(_);var dt=_.offsetTop-j.offsetTop+2;B.removeChild(j),B.appendChild(this._document.createTextNode(Yd)),B.style.lineHeight="normal",_.style.verticalAlign="super";var lt=_.offsetTop-B.offsetTop+2;return tt.removeChild(B),{baseline:dt,middle:lt}},E.prototype.getMetrics=function(p,b){var B=p+" "+b;return typeof this._data[B]=="undefined"&&(this._data[B]=this.parseMetrics(p,b)),this._data[B]},E}(),Xd=function(){function E(p,b){this.context=p,this.options=b}return E}(),Jd=1e4,Gp=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _._activeEffects=[],_.canvas=B.canvas?B.canvas:document.createElement("canvas"),_.ctx=_.canvas.getContext("2d"),B.canvas||(_.canvas.width=Math.floor(B.width*B.scale),_.canvas.height=Math.floor(B.height*B.scale),_.canvas.style.width=B.width+"px",_.canvas.style.height=B.height+"px"),_.fontMetrics=new Hp(document),_.ctx.scale(_.options.scale,_.options.scale),_.ctx.translate(-B.x,-B.y),_.ctx.textBaseline="bottom",_._activeEffects=[],_.context.logger.debug("Canvas renderer initialized ("+B.width+"x"+B.height+") with scale "+B.scale),_}return p.prototype.applyEffects=function(b){for(var B=this;this._activeEffects.length;)this.popEffect();b.forEach(function(_){return B.applyEffect(_)})},p.prototype.applyEffect=function(b){this.ctx.save(),Wu(b)&&(this.ctx.globalAlpha=b.opacity),Qp(b)&&(this.ctx.translate(b.offsetX,b.offsetY),this.ctx.transform(b.matrix[0],b.matrix[1],b.matrix[2],b.matrix[3],b.matrix[4],b.matrix[5]),this.ctx.translate(-b.offsetX,-b.offsetY)),Vu(b)&&(this.path(b.path),this.ctx.clip()),this._activeEffects.push(b)},p.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},p.prototype.renderStack=function(b){return W(this,void 0,void 0,function(){var B;return H(this,function(_){switch(_.label){case 0:return B=b.element.container.styles,B.isVisible()?[4,this.renderStackContent(b)]:[3,2];case 1:_.sent(),_.label=2;case 2:return[2]}})})},p.prototype.renderNode=function(b){return W(this,void 0,void 0,function(){return H(this,function(B){switch(B.label){case 0:if(Ur(b.container.flags,16))debugger;return b.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(b)]:[3,3];case 1:return B.sent(),[4,this.renderNodeContent(b)];case 2:B.sent(),B.label=3;case 3:return[2]}})})},p.prototype.renderTextWithLetterSpacing=function(b,B,_){var j=this;if(B===0)this.ctx.fillText(b.text,b.bounds.left,b.bounds.top+_);else{var tt=Wa(b.text);tt.reduce(function(dt,lt){return j.ctx.fillText(lt,dt,b.bounds.top+_),dt+j.ctx.measureText(lt).width},b.bounds.left)}},p.prototype.createFontStyle=function(b){var B=b.fontVariant.filter(function(tt){return tt==="normal"||tt==="small-caps"}).join(""),_=Zp(b.fontFamily).join(", "),j=sa(b.fontSize)?""+b.fontSize.number+b.fontSize.unit:b.fontSize.number+"px";return[[b.fontStyle,B,b.fontWeight,j,_].join(" "),_,j]},p.prototype.renderTextNode=function(b,B){return W(this,void 0,void 0,function(){var _,j,tt,dt,lt,Tt,Ot,Dt,Jt=this;return H(this,function(Oe){return _=this.createFontStyle(B),j=_[0],tt=_[1],dt=_[2],this.ctx.font=j,this.ctx.direction=B.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",lt=this.fontMetrics.getMetrics(tt,dt),Tt=lt.baseline,Ot=lt.middle,Dt=B.paintOrder,b.textBounds.forEach(function(fe){Dt.forEach(function(Be){switch(Be){case 0:Jt.ctx.fillStyle=ei(B.color),Jt.renderTextWithLetterSpacing(fe,B.letterSpacing,Tt);var an=B.textShadow;an.length&&fe.text.trim().length&&(an.slice(0).reverse().forEach(function(Ue){Jt.ctx.shadowColor=ei(Ue.color),Jt.ctx.shadowOffsetX=Ue.offsetX.number*Jt.options.scale,Jt.ctx.shadowOffsetY=Ue.offsetY.number*Jt.options.scale,Jt.ctx.shadowBlur=Ue.blur.number,Jt.renderTextWithLetterSpacing(fe,B.letterSpacing,Tt)}),Jt.ctx.shadowColor="",Jt.ctx.shadowOffsetX=0,Jt.ctx.shadowOffsetY=0,Jt.ctx.shadowBlur=0),B.textDecorationLine.length&&(Jt.ctx.fillStyle=ei(B.textDecorationColor||B.color),B.textDecorationLine.forEach(function(Ue){switch(Ue){case 1:Jt.ctx.fillRect(fe.bounds.left,Math.round(fe.bounds.top+Tt),fe.bounds.width,1);break;case 2:Jt.ctx.fillRect(fe.bounds.left,Math.round(fe.bounds.top),fe.bounds.width,1);break;case 3:Jt.ctx.fillRect(fe.bounds.left,Math.ceil(fe.bounds.top+Ot),fe.bounds.width,1);break}}));break;case 1:B.webkitTextStrokeWidth&&fe.text.trim().length&&(Jt.ctx.strokeStyle=ei(B.webkitTextStrokeColor),Jt.ctx.lineWidth=B.webkitTextStrokeWidth,Jt.ctx.lineJoin=window.chrome?"miter":"round",Jt.ctx.strokeText(fe.text,fe.bounds.left,fe.bounds.top+Tt)),Jt.ctx.strokeStyle="",Jt.ctx.lineWidth=0,Jt.ctx.lineJoin="miter";break}})}),[2]})})},p.prototype.renderReplacedElement=function(b,B,_){if(_&&b.intrinsicWidth>0&&b.intrinsicHeight>0){var j=uA(b),tt=gs(B);this.path(tt),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(_,0,0,b.intrinsicWidth,b.intrinsicHeight,j.left,j.top,j.width,j.height),this.ctx.restore()}},p.prototype.renderNodeContent=function(b){return W(this,void 0,void 0,function(){var B,_,j,tt,dt,lt,Ne,Ne,Tt,Ot,Dt,Jt,An,Oe,fe,Xe,Be,an,Ue,Ne,Mn,An,Xe;return H(this,function(Fe){switch(Fe.label){case 0:this.applyEffects(b.getEffects(4)),B=b.container,_=b.curves,j=B.styles,tt=0,dt=B.textNodes,Fe.label=1;case 1:return tt<dt.length?(lt=dt[tt],[4,this.renderTextNode(lt,j)]):[3,4];case 2:Fe.sent(),Fe.label=3;case 3:return tt++,[3,1];case 4:if(!(B instanceof Od))return[3,8];Fe.label=5;case 5:return Fe.trys.push([5,7,,8]),[4,this.context.cache.match(B.src)];case 6:return Ne=Fe.sent(),this.renderReplacedElement(B,_,Ne),[3,8];case 7:return Fe.sent(),this.context.logger.error("Error loading image "+B.src),[3,8];case 8:if(B instanceof Id&&this.renderReplacedElement(B,_,B.canvas),!(B instanceof Du))return[3,12];Fe.label=9;case 9:return Fe.trys.push([9,11,,12]),[4,this.context.cache.match(B.svg)];case 10:return Ne=Fe.sent(),this.renderReplacedElement(B,_,Ne),[3,12];case 11:return Fe.sent(),this.context.logger.error("Error loading svg "+B.svg.substring(0,255)),[3,12];case 12:return B instanceof Nd&&B.tree?(Tt=new p(this.context,{scale:this.options.scale,backgroundColor:B.backgroundColor,x:0,y:0,width:B.width,height:B.height}),[4,Tt.render(B.tree)]):[3,14];case 13:Ot=Fe.sent(),B.width&&B.height&&this.ctx.drawImage(Ot,0,0,B.width,B.height,B.bounds.left,B.bounds.top,B.bounds.width,B.bounds.height),Fe.label=14;case 14:if(B instanceof Ks&&(Dt=Math.min(B.bounds.width,B.bounds.height),B.type===cs?B.checked&&(this.ctx.save(),this.path([new Se(B.bounds.left+Dt*.39363,B.bounds.top+Dt*.79),new Se(B.bounds.left+Dt*.16,B.bounds.top+Dt*.5549),new Se(B.bounds.left+Dt*.27347,B.bounds.top+Dt*.44071),new Se(B.bounds.left+Dt*.39694,B.bounds.top+Dt*.5649),new Se(B.bounds.left+Dt*.72983,B.bounds.top+Dt*.23),new Se(B.bounds.left+Dt*.84,B.bounds.top+Dt*.34085),new Se(B.bounds.left+Dt*.39363,B.bounds.top+Dt*.79)]),this.ctx.fillStyle=ei(Ld),this.ctx.fill(),this.ctx.restore()):B.type===On&&B.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(B.bounds.left+Dt/2,B.bounds.top+Dt/2,Dt/4,0,Math.PI*2,!0),this.ctx.fillStyle=ei(Ld),this.ctx.fill(),this.ctx.restore())),Kp(B)&&B.value.length){switch(Jt=this.createFontStyle(j),An=Jt[0],Oe=Jt[1],fe=this.fontMetrics.getMetrics(An,Oe).baseline,this.ctx.font=An,this.ctx.fillStyle=ei(j.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=Vp(B.styles.textAlign),Xe=uA(B),Be=0,B.styles.textAlign){case 1:Be+=Xe.width/2;break;case 2:Be+=Xe.width;break}an=Xe.add(Be,0,0,-Xe.height/2+1),this.ctx.save(),this.path([new Se(Xe.left,Xe.top),new Se(Xe.left+Xe.width,Xe.top),new Se(Xe.left+Xe.width,Xe.top+Xe.height),new Se(Xe.left,Xe.top+Xe.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new cc(B.value,an),j.letterSpacing,fe),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ur(B.styles.display,2048))return[3,20];if(B.styles.listStyleImage===null)return[3,19];if(Ue=B.styles.listStyleImage,Ue.type!==0)return[3,18];Ne=void 0,Mn=Ue.url,Fe.label=15;case 15:return Fe.trys.push([15,17,,18]),[4,this.context.cache.match(Mn)];case 16:return Ne=Fe.sent(),this.ctx.drawImage(Ne,B.bounds.left-(Ne.width+10),B.bounds.top),[3,18];case 17:return Fe.sent(),this.context.logger.error("Error loading list-style-image "+Mn),[3,18];case 18:return[3,20];case 19:b.listValue&&B.styles.listStyleType!==-1&&(An=this.createFontStyle(j)[0],this.ctx.font=An,this.ctx.fillStyle=ei(j.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Xe=new I(B.bounds.left,B.bounds.top+Gn(B.styles.paddingTop,B.bounds.width),B.bounds.width,sd(j.lineHeight,j.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new cc(b.listValue,Xe),j.letterSpacing,sd(j.lineHeight,j.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Fe.label=20;case 20:return[2]}})})},p.prototype.renderStackContent=function(b){return W(this,void 0,void 0,function(){var B,_,Ue,j,tt,Ue,dt,lt,Ue,Tt,Ot,Ue,Dt,Jt,Ue,Oe,fe,Ue,Be,an,Ue;return H(this,function(Ne){switch(Ne.label){case 0:if(Ur(b.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(b.element)];case 1:Ne.sent(),B=0,_=b.negativeZIndex,Ne.label=2;case 2:return B<_.length?(Ue=_[B],[4,this.renderStack(Ue)]):[3,5];case 3:Ne.sent(),Ne.label=4;case 4:return B++,[3,2];case 5:return[4,this.renderNodeContent(b.element)];case 6:Ne.sent(),j=0,tt=b.nonInlineLevel,Ne.label=7;case 7:return j<tt.length?(Ue=tt[j],[4,this.renderNode(Ue)]):[3,10];case 8:Ne.sent(),Ne.label=9;case 9:return j++,[3,7];case 10:dt=0,lt=b.nonPositionedFloats,Ne.label=11;case 11:return dt<lt.length?(Ue=lt[dt],[4,this.renderStack(Ue)]):[3,14];case 12:Ne.sent(),Ne.label=13;case 13:return dt++,[3,11];case 14:Tt=0,Ot=b.nonPositionedInlineLevel,Ne.label=15;case 15:return Tt<Ot.length?(Ue=Ot[Tt],[4,this.renderStack(Ue)]):[3,18];case 16:Ne.sent(),Ne.label=17;case 17:return Tt++,[3,15];case 18:Dt=0,Jt=b.inlineLevel,Ne.label=19;case 19:return Dt<Jt.length?(Ue=Jt[Dt],[4,this.renderNode(Ue)]):[3,22];case 20:Ne.sent(),Ne.label=21;case 21:return Dt++,[3,19];case 22:Oe=0,fe=b.zeroOrAutoZIndexOrTransformedOrOpacity,Ne.label=23;case 23:return Oe<fe.length?(Ue=fe[Oe],[4,this.renderStack(Ue)]):[3,26];case 24:Ne.sent(),Ne.label=25;case 25:return Oe++,[3,23];case 26:Be=0,an=b.positiveZIndex,Ne.label=27;case 27:return Be<an.length?(Ue=an[Be],[4,this.renderStack(Ue)]):[3,30];case 28:Ne.sent(),Ne.label=29;case 29:return Be++,[3,27];case 30:return[2]}})})},p.prototype.mask=function(b){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(b.slice(0).reverse()),this.ctx.closePath()},p.prototype.path=function(b){this.ctx.beginPath(),this.formatPath(b),this.ctx.closePath()},p.prototype.formatPath=function(b){var B=this;b.forEach(function(_,j){var tt=Ln(_)?_.start:_;j===0?B.ctx.moveTo(tt.x,tt.y):B.ctx.lineTo(tt.x,tt.y),Ln(_)&&B.ctx.bezierCurveTo(_.startControl.x,_.startControl.y,_.endControl.x,_.endControl.y,_.end.x,_.end.y)})},p.prototype.renderRepeat=function(b,B,_,j){this.path(b),this.ctx.fillStyle=B,this.ctx.translate(_,j),this.ctx.fill(),this.ctx.translate(-_,-j)},p.prototype.resizeImage=function(b,B,_){var j;if(b.width===B&&b.height===_)return b;var tt=(j=this.canvas.ownerDocument)!==null&&j!==void 0?j:document,dt=tt.createElement("canvas");dt.width=Math.max(1,B),dt.height=Math.max(1,_);var lt=dt.getContext("2d");return lt.drawImage(b,0,0,b.width,b.height,0,0,B,_),dt},p.prototype.renderBackgroundImage=function(b){return W(this,void 0,void 0,function(){var B,_,j,tt,dt,lt;return H(this,function(Tt){switch(Tt.label){case 0:B=b.styles.backgroundImage.length-1,_=function(Ot){var Dt,Jt,Oe,Fr,bi,si,Kn,zr,xn,fe,Fr,bi,si,Kn,zr,Be,an,Ue,Ne,Mn,An,Xe,Fe,bn,xn,Ze,Fr,ai,Ui,Kn,zr,Ws,bi,si,ps,Ta,Zs,bo,xo,Ya,Co,ms;return H(this,function(il){switch(il.label){case 0:if(Ot.type!==0)return[3,5];Dt=void 0,Jt=Ot.url,il.label=1;case 1:return il.trys.push([1,3,,4]),[4,j.context.cache.match(Jt)];case 2:return Dt=il.sent(),[3,4];case 3:return il.sent(),j.context.logger.error("Error loading background-image "+Jt),[3,4];case 4:return Dt&&(Oe=Sc(b,B,[Dt.width,Dt.height,Dt.width/Dt.height]),Fr=Oe[0],bi=Oe[1],si=Oe[2],Kn=Oe[3],zr=Oe[4],xn=j.ctx.createPattern(j.resizeImage(Dt,Kn,zr),"repeat"),j.renderRepeat(Fr,xn,bi,si)),[3,6];case 5:Sw(Ot)?(fe=Sc(b,B,[null,null,null]),Fr=fe[0],bi=fe[1],si=fe[2],Kn=fe[3],zr=fe[4],Be=gv(Ot.angle,Kn,zr),an=Be[0],Ue=Be[1],Ne=Be[2],Mn=Be[3],An=Be[4],Xe=document.createElement("canvas"),Xe.width=Kn,Xe.height=zr,Fe=Xe.getContext("2d"),bn=Fe.createLinearGradient(Ue,Mn,Ne,An),dv(Ot.stops,an).forEach(function(Tc){return bn.addColorStop(Tc.stop,ei(Tc.color))}),Fe.fillStyle=bn,Fe.fillRect(0,0,Kn,zr),Kn>0&&zr>0&&(xn=j.ctx.createPattern(Xe,"repeat"),j.renderRepeat(Fr,xn,bi,si))):Cv(Ot)&&(Ze=Sc(b,B,[null,null,null]),Fr=Ze[0],ai=Ze[1],Ui=Ze[2],Kn=Ze[3],zr=Ze[4],Ws=Ot.position.length===0?[KA]:Ot.position,bi=Gn(Ws[0],Kn),si=Gn(Ws[Ws.length-1],zr),ps=Bw(Ot,bi,si,Kn,zr),Ta=ps[0],Zs=ps[1],Ta>0&&Zs>0&&(bo=j.ctx.createRadialGradient(ai+bi,Ui+si,0,ai+bi,Ui+si,Ta),dv(Ot.stops,Ta*2).forEach(function(Tc){return bo.addColorStop(Tc.stop,ei(Tc.color))}),j.path(Fr),j.ctx.fillStyle=bo,Ta!==Zs?(xo=b.bounds.left+.5*b.bounds.width,Ya=b.bounds.top+.5*b.bounds.height,Co=Zs/Ta,ms=1/Co,j.ctx.save(),j.ctx.translate(xo,Ya),j.ctx.transform(1,0,0,Co,0,0),j.ctx.translate(-xo,-Ya),j.ctx.fillRect(ai,ms*(Ui-Ya)+Ya,Kn,zr*ms),j.ctx.restore()):j.ctx.fill())),il.label=6;case 6:return B--,[2]}})},j=this,tt=0,dt=b.styles.backgroundImage.slice(0).reverse(),Tt.label=1;case 1:return tt<dt.length?(lt=dt[tt],[5,_(lt)]):[3,4];case 2:Tt.sent(),Tt.label=3;case 3:return tt++,[3,1];case 4:return[2]}})})},p.prototype.renderSolidBorder=function(b,B,_){return W(this,void 0,void 0,function(){return H(this,function(j){return this.path(_n(_,B)),this.ctx.fillStyle=ei(b),this.ctx.fill(),[2]})})},p.prototype.renderDoubleBorder=function(b,B,_,j){return W(this,void 0,void 0,function(){var tt,dt;return H(this,function(lt){switch(lt.label){case 0:return B<3?[4,this.renderSolidBorder(b,_,j)]:[3,2];case 1:return lt.sent(),[2];case 2:return tt=Ma(j,_),this.path(tt),this.ctx.fillStyle=ei(b),this.ctx.fill(),dt=Eo(j,_),this.path(dt),this.ctx.fill(),[2]}})})},p.prototype.renderNodeBackgroundAndBorders=function(b){return W(this,void 0,void 0,function(){var B,_,j,tt,dt,lt,Tt,Ot,Dt=this;return H(this,function(Jt){switch(Jt.label){case 0:return this.applyEffects(b.getEffects(2)),B=b.container.styles,_=!vo(B.backgroundColor)||B.backgroundImage.length,j=[{style:B.borderTopStyle,color:B.borderTopColor,width:B.borderTopWidth},{style:B.borderRightStyle,color:B.borderRightColor,width:B.borderRightWidth},{style:B.borderBottomStyle,color:B.borderBottomColor,width:B.borderBottomWidth},{style:B.borderLeftStyle,color:B.borderLeftColor,width:B.borderLeftWidth}],tt=zp(dA(B.backgroundClip,0),b.curves),_||B.boxShadow.length?(this.ctx.save(),this.path(tt),this.ctx.clip(),vo(B.backgroundColor)||(this.ctx.fillStyle=ei(B.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(b.container)]):[3,2];case 1:Jt.sent(),this.ctx.restore(),B.boxShadow.slice(0).reverse().forEach(function(Oe){Dt.ctx.save();var fe=xc(b.curves),Be=Oe.inset?0:Jd,an=Up(fe,-Be+(Oe.inset?1:-1)*Oe.spread.number,(Oe.inset?1:-1)*Oe.spread.number,Oe.spread.number*(Oe.inset?-2:2),Oe.spread.number*(Oe.inset?-2:2));Oe.inset?(Dt.path(fe),Dt.ctx.clip(),Dt.mask(an)):(Dt.mask(fe),Dt.ctx.clip(),Dt.path(an)),Dt.ctx.shadowOffsetX=Oe.offsetX.number+Be,Dt.ctx.shadowOffsetY=Oe.offsetY.number,Dt.ctx.shadowColor=ei(Oe.color),Dt.ctx.shadowBlur=Oe.blur.number,Dt.ctx.fillStyle=Oe.inset?ei(Oe.color):"rgba(0,0,0,1)",Dt.ctx.fill(),Dt.ctx.restore()}),Jt.label=2;case 2:dt=0,lt=0,Tt=j,Jt.label=3;case 3:return lt<Tt.length?(Ot=Tt[lt],Ot.style!==0&&!vo(Ot.color)&&Ot.width>0?Ot.style!==2?[3,5]:[4,this.renderDashedDottedBorder(Ot.color,Ot.width,dt,b.curves,2)]:[3,11]):[3,13];case 4:return Jt.sent(),[3,11];case 5:return Ot.style!==3?[3,7]:[4,this.renderDashedDottedBorder(Ot.color,Ot.width,dt,b.curves,3)];case 6:return Jt.sent(),[3,11];case 7:return Ot.style!==4?[3,9]:[4,this.renderDoubleBorder(Ot.color,Ot.width,dt,b.curves)];case 8:return Jt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(Ot.color,dt,b.curves)];case 10:Jt.sent(),Jt.label=11;case 11:dt++,Jt.label=12;case 12:return lt++,[3,3];case 13:return[2]}})})},p.prototype.renderDashedDottedBorder=function(b,B,_,j,tt){return W(this,void 0,void 0,function(){var dt,lt,Tt,Ot,Dt,Jt,Oe,fe,Be,an,Ue,Ne,Mn,An,Xe,Fe,Xe,Fe;return H(this,function(bn){return this.ctx.save(),dt=ju(j,_),lt=_n(j,_),tt===2&&(this.path(lt),this.ctx.clip()),Ln(lt[0])?(Tt=lt[0].start.x,Ot=lt[0].start.y):(Tt=lt[0].x,Ot=lt[0].y),Ln(lt[1])?(Dt=lt[1].end.x,Jt=lt[1].end.y):(Dt=lt[1].x,Jt=lt[1].y),_===0||_===2?Oe=Math.abs(Tt-Dt):Oe=Math.abs(Ot-Jt),this.ctx.beginPath(),tt===3?this.formatPath(dt):this.formatPath(lt.slice(0,2)),fe=B<3?B*3:B*2,Be=B<3?B*2:B,tt===3&&(fe=B,Be=B),an=!0,Oe<=fe*2?an=!1:Oe<=fe*2+Be?(Ue=Oe/(2*fe+Be),fe*=Ue,Be*=Ue):(Ne=Math.floor((Oe+Be)/(fe+Be)),Mn=(Oe-Ne*fe)/(Ne-1),An=(Oe-(Ne+1)*fe)/Ne,Be=An<=0||Math.abs(Be-Mn)<Math.abs(Be-An)?Mn:An),an&&(tt===3?this.ctx.setLineDash([0,fe+Be]):this.ctx.setLineDash([fe,Be])),tt===3?(this.ctx.lineCap="round",this.ctx.lineWidth=B):this.ctx.lineWidth=B*2+1.1,this.ctx.strokeStyle=ei(b),this.ctx.stroke(),this.ctx.setLineDash([]),tt===2&&(Ln(lt[0])&&(Xe=lt[3],Fe=lt[0],this.ctx.beginPath(),this.formatPath([new Se(Xe.end.x,Xe.end.y),new Se(Fe.start.x,Fe.start.y)]),this.ctx.stroke()),Ln(lt[1])&&(Xe=lt[1],Fe=lt[2],this.ctx.beginPath(),this.formatPath([new Se(Xe.end.x,Xe.end.y),new Se(Fe.start.x,Fe.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},p.prototype.render=function(b){return W(this,void 0,void 0,function(){var B;return H(this,function(_){switch(_.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ei(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),B=Zu(b),[4,this.renderStack(B)];case 1:return _.sent(),this.applyEffects([]),[2,this.canvas]}})})},p}(Xd),Kp=function(E){return E instanceof vi||E instanceof dc?!0:E instanceof Ks&&E.type!==On&&E.type!==cs},zp=function(E,p){switch(E){case 0:return xc(p);case 2:return Lp(p);case 1:default:return gs(p)}},Vp=function(E){switch(E){case 1:return"center";case 2:return"right";case 0:default:return"left"}},Wp=["-apple-system","system-ui"],Zp=function(E){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?E.filter(function(p){return Wp.indexOf(p)===-1}):E},jp=function(E){M(p,E);function p(b,B){var _=E.call(this,b,B)||this;return _.canvas=B.canvas?B.canvas:document.createElement("canvas"),_.ctx=_.canvas.getContext("2d"),_.options=B,_.canvas.width=Math.floor(B.width*B.scale),_.canvas.height=Math.floor(B.height*B.scale),_.canvas.style.width=B.width+"px",_.canvas.style.height=B.height+"px",_.ctx.scale(_.options.scale,_.options.scale),_.ctx.translate(-B.x,-B.y),_.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+B.width+"x"+B.height+" at "+B.x+","+B.y+") with scale "+B.scale),_}return p.prototype.render=function(b){return W(this,void 0,void 0,function(){var B,_;return H(this,function(j){switch(j.label){case 0:return B=Uu(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,b),[4,rE(B)];case 1:return _=j.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ei(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(_,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},p}(Xd),rE=function(E){return new Promise(function(p,b){var B=new Image;B.onload=function(){p(B)},B.onerror=b,B.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(E))})},Bo=function(){function E(p){var b=p.id,B=p.enabled;this.id=b,this.enabled=B,this.start=Date.now()}return E.prototype.debug=function(){for(var p=[],b=0;b<arguments.length;b++)p[b]=arguments[b];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,L([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},E.prototype.getTime=function(){return Date.now()-this.start},E.prototype.info=function(){for(var p=[],b=0;b<arguments.length;b++)p[b]=arguments[b];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,L([this.id,this.getTime()+"ms"],p))},E.prototype.warn=function(){for(var p=[],b=0;b<arguments.length;b++)p[b]=arguments[b];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,L([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},E.prototype.error=function(){for(var p=[],b=0;b<arguments.length;b++)p[b]=arguments[b];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,L([this.id,this.getTime()+"ms"],p)):this.info.apply(this,p))},E.instances={},E}(),Mc=function(){function E(p,b){var B;this.windowBounds=b,this.instanceName="#"+E.instanceCount++,this.logger=new Bo({id:this.instanceName,enabled:p.logging}),this.cache=(B=p.cache)!==null&&B!==void 0?B:new Ip(this,p)}return E.instanceCount=1,E}(),nl=function(E,p){return p===void 0&&(p={}),Yp(E,p)};typeof window!="undefined"&&Ku.setContext(window);var Yp=function(E,p){return W(void 0,void 0,void 0,function(){var b,B,_,j,tt,dt,lt,Tt,Ot,Dt,Jt,Oe,fe,Be,an,Ue,Ne,Mn,An,Xe,bn,Fe,bn,xn,Ze,Fr,ai,Ui,Kn,zr,Ws,bi,si,ps,Ta,Zs,bo,xo,Ya,Co;return H(this,function(ms){switch(ms.label){case 0:if(!E||typeof E!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(b=E.ownerDocument,!b)throw new Error("Element is not attached to a Document");if(B=b.defaultView,!B)throw new Error("Document is not attached to a Window");return _={allowTaint:(xn=p.allowTaint)!==null&&xn!==void 0?xn:!1,imageTimeout:(Ze=p.imageTimeout)!==null&&Ze!==void 0?Ze:15e3,proxy:p.proxy,useCORS:(Fr=p.useCORS)!==null&&Fr!==void 0?Fr:!1},j=O({logging:(ai=p.logging)!==null&&ai!==void 0?ai:!0,cache:p.cache},_),tt={windowWidth:(Ui=p.windowWidth)!==null&&Ui!==void 0?Ui:B.innerWidth,windowHeight:(Kn=p.windowHeight)!==null&&Kn!==void 0?Kn:B.innerHeight,scrollX:(zr=p.scrollX)!==null&&zr!==void 0?zr:B.pageXOffset,scrollY:(Ws=p.scrollY)!==null&&Ws!==void 0?Ws:B.pageYOffset},dt=new I(tt.scrollX,tt.scrollY,tt.windowWidth,tt.windowHeight),lt=new Mc(j,dt),Tt=(bi=p.foreignObjectRendering)!==null&&bi!==void 0?bi:!1,Ot={allowTaint:(si=p.allowTaint)!==null&&si!==void 0?si:!1,onclone:p.onclone,ignoreElements:p.ignoreElements,inlineImages:Tt,copyStyles:Tt},lt.logger.debug("Starting document clone with size "+dt.width+"x"+dt.height+" scrolled to "+-dt.left+","+-dt.top),Dt=new _d(lt,E,Ot),Jt=Dt.clonedReferenceElement,Jt?[4,Dt.toIFrame(b,dt)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Oe=ms.sent(),fe=qi(Jt)||Ud(Jt)?P(Jt.ownerDocument):N(lt,Jt),Be=fe.width,an=fe.height,Ue=fe.left,Ne=fe.top,Mn=rl(lt,Jt,p.backgroundColor),An={canvas:p.canvas,backgroundColor:Mn,scale:(Ta=(ps=p.scale)!==null&&ps!==void 0?ps:B.devicePixelRatio)!==null&&Ta!==void 0?Ta:1,x:((Zs=p.x)!==null&&Zs!==void 0?Zs:0)+Ue,y:((bo=p.y)!==null&&bo!==void 0?bo:0)+Ne,width:(xo=p.width)!==null&&xo!==void 0?xo:Math.ceil(Be),height:(Ya=p.height)!==null&&Ya!==void 0?Ya:Math.ceil(an)},Tt?(lt.logger.debug("Document cloned, using foreign object rendering"),bn=new jp(lt,An),[4,bn.render(Jt)]):[3,3];case 2:return Xe=ms.sent(),[3,5];case 3:return lt.logger.debug("Document cloned, element located at "+Ue+","+Ne+" with size "+Be+"x"+an+" using computed rendering"),lt.logger.debug("Starting DOM parsing"),Fe=kd(lt,Jt),Mn===Fe.styles.backgroundColor&&(Fe.styles.backgroundColor=Ds.TRANSPARENT),lt.logger.debug("Starting renderer for element at "+An.x+","+An.y+" with size "+An.width+"x"+An.height),bn=new Gp(lt,An),[4,bn.render(Fe)];case 4:Xe=ms.sent(),ms.label=5;case 5:return(!((Co=p.removeContainer)!==null&&Co!==void 0)||Co)&&(_d.destroy(Oe)||lt.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),lt.logger.debug("Finished rendering"),[2,Xe]}})})},rl=function(E,p,b){var B=p.ownerDocument,_=B.documentElement?jl(E,getComputedStyle(B.documentElement).backgroundColor):Ds.TRANSPARENT,j=B.body?jl(E,getComputedStyle(B.body).backgroundColor):Ds.TRANSPARENT,tt=typeof b=="string"?jl(E,b):b===null?Ds.TRANSPARENT:4294967295;return p===B.documentElement?vo(_)?vo(j)?tt:j:_:tt};return nl})},34634:function(X,et,M){"use strict";M.r(et),M.d(et,{isAnyArray:function(){return W}});const O=Object.prototype.toString;function W(H){const L=O.call(H);return L.endsWith("Array]")&&!L.includes("Big")}},55973:function(X){X.exports=function(M){return!M||typeof M=="string"?!1:M instanceof Array||Array.isArray(M)||M.length>=0&&(M.splice instanceof Function||Object.getOwnPropertyDescriptor(M,M.length-1)&&M.constructor.name!=="String")}},15584:function(X,et,M){var O=M(73893),W=M(33152),H=O(W,"DataView");X.exports=H},97288:function(X,et,M){var O=M(73893),W=M(33152),H=O(W,"Promise");X.exports=H},23599:function(X,et,M){var O=M(73893),W=M(33152),H=O(W,"Set");X.exports=H},98924:function(X,et,M){var O=M(52166),W=M(34776),H=M(40393);function L(I){var N=-1,P=I==null?0:I.length;for(this.__data__=new O;++N<P;)this.add(I[N])}L.prototype.add=L.prototype.push=W,L.prototype.has=H,X.exports=L},26873:function(X,et,M){var O=M(73893),W=M(33152),H=O(W,"WeakMap");X.exports=H},74809:function(X){function et(M,O){for(var W=-1,H=M==null?0:M.length;++W<H&&O(M[W],W,M)!==!1;);return M}X.exports=et},86952:function(X){function et(M,O){for(var W=-1,H=M==null?0:M.length,L=0,I=[];++W<H;){var N=M[W];O(N,W,M)&&(I[L++]=N)}return I}X.exports=et},84271:function(X,et,M){var O=M(17424);function W(H,L){var I=H==null?0:H.length;return!!I&&O(H,L,0)>-1}X.exports=W},94874:function(X){function et(M,O,W){for(var H=-1,L=M==null?0:M.length;++H<L;)if(W(O,M[H]))return!0;return!1}X.exports=et},75010:function(X){function et(M,O){for(var W=-1,H=M==null?0:M.length,L=Array(H);++W<H;)L[W]=O(M[W],W,M);return L}X.exports=et},57095:function(X){function et(M,O){for(var W=-1,H=O.length,L=M.length;++W<H;)M[L+W]=O[W];return M}X.exports=et},99861:function(X){function et(M,O,W,H){var L=-1,I=M==null?0:M.length;for(H&&I&&(W=M[++L]);++L<I;)W=O(W,M[L],L,M);return W}X.exports=et},64045:function(X){function et(M,O){for(var W=-1,H=M==null?0:M.length;++W<H;)if(O(M[W],W,M))return!0;return!1}X.exports=et},26539:function(X,et,M){var O=M(22310),W=O("length");X.exports=W},91937:function(X,et,M){var O=M(95378),W=M(55451);function H(L,I){return L&&O(I,W(I),L)}X.exports=H},26680:function(X,et,M){var O=M(95378),W=M(56730);function H(L,I){return L&&O(I,W(I),L)}X.exports=H},99045:function(X,et,M){var O=M(91866),W=M(74809),H=M(60348),L=M(91937),I=M(26680),N=M(32315),P=M(47760),k=M(15168),U=M(71678),Z=M(12076),V=M(22675),Y=M(66139),nt=M(79264),rt=M(97541),ft=M(4084),ct=M(80744),it=M(57835),vt=M(41626),gt=M(20816),yt=M(65226),mt=M(55451),Mt=M(56730),Ct=1,Nt=2,qt=4,Gt="[object Arguments]",re="[object Array]",de="[object Boolean]",ue="[object Date]",Me="[object Error]",Ve="[object Function]",dn="[object GeneratorFunction]",Xn="[object Map]",Xr="[object Number]",Vi="[object Object]",is="[object RegExp]",Ao="[object Set]",Ht="[object String]",zt="[object Symbol]",Zt="[object WeakMap]",Et="[object ArrayBuffer]",It="[object DataView]",Ut="[object Float32Array]",ne="[object Float64Array]",be="[object Int8Array]",_e="[object Int16Array]",Te="[object Int32Array]",rn="[object Uint8Array]",rr="[object Uint8ClampedArray]",sr="[object Uint16Array]",Ge="[object Uint32Array]",Ke={};Ke[Gt]=Ke[re]=Ke[Et]=Ke[It]=Ke[de]=Ke[ue]=Ke[Ut]=Ke[ne]=Ke[be]=Ke[_e]=Ke[Te]=Ke[Xn]=Ke[Xr]=Ke[Vi]=Ke[is]=Ke[Ao]=Ke[Ht]=Ke[zt]=Ke[rn]=Ke[rr]=Ke[sr]=Ke[Ge]=!0,Ke[Me]=Ke[Ve]=Ke[Zt]=!1;function me(We,Gr,Wi,pe,Ga,Nr){var Mr,di=Gr&Ct,as=Gr&Nt,Zi=Gr&qt;if(Wi&&(Mr=Ga?Wi(We,pe,Ga,Nr):Wi(We)),Mr!==void 0)return Mr;if(!gt(We))return We;var ss=ct(We);if(ss){if(Mr=nt(We),!di)return P(We,Mr)}else{var Ii=Y(We),Jr=Ii==Ve||Ii==dn;if(it(We))return N(We,di);if(Ii==Vi||Ii==Gt||Jr&&!Ga){if(Mr=as||Jr?{}:ft(We),!di)return as?U(We,I(Mr,We)):k(We,L(Mr,We))}else{if(!Ke[Ii])return Ga?We:{};Mr=rt(We,Ii,di)}}Nr||(Nr=new O);var ma=Nr.get(We);if(ma)return ma;Nr.set(We,Mr),yt(We)?We.forEach(function(wa){Mr.add(me(wa,Gr,Wi,wa,We,Nr))}):vt(We)&&We.forEach(function(wa,qr){Mr.set(qr,me(wa,Gr,Wi,qr,We,Nr))});var ya=Zi?as?V:Z:as?Mt:mt,aa=ss?void 0:ya(We);return W(aa||We,function(wa,qr){aa&&(qr=wa,wa=We[qr]),H(Mr,qr,me(wa,Gr,Wi,qr,We,Nr))}),Mr}X.exports=me},44107:function(X,et,M){var O=M(1585),W=M(49164),H=W(O);X.exports=H},2659:function(X,et,M){var O=M(45029);function W(H,L,I){for(var N=-1,P=H.length;++N<P;){var k=H[N],U=L(k);if(U!=null&&(Z===void 0?U===U&&!O(U):I(U,Z)))var Z=U,V=k}return V}X.exports=W},32872:function(X,et,M){var O=M(44107);function W(H,L){var I=[];return O(H,function(N,P,k){L(N,P,k)&&I.push(N)}),I}X.exports=W},51533:function(X){function et(M,O,W,H){for(var L=M.length,I=W+(H?1:-1);H?I--:++I<L;)if(O(M[I],I,M))return I;return-1}X.exports=et},9256:function(X,et,M){var O=M(57095),W=M(88133);function H(L,I,N,P,k){var U=-1,Z=L.length;for(N||(N=W),k||(k=[]);++U<Z;){var V=L[U];I>0&&N(V)?I>1?H(V,I-1,N,P,k):O(k,V):P||(k[k.length]=V)}return k}X.exports=H},1585:function(X,et,M){var O=M(14018),W=M(55451);function H(L,I){return L&&O(L,I,W)}X.exports=H},89147:function(X,et,M){var O=M(1186),W=M(9171);function H(L,I){I=O(I,L);for(var N=0,P=I.length;L!=null&&N<P;)L=L[W(I[N++])];return N&&N==P?L:void 0}X.exports=H},75635:function(X,et,M){var O=M(57095),W=M(80744);function H(L,I,N){var P=I(L);return W(L)?P:O(P,N(L))}X.exports=H},40302:function(X){function et(M,O){return M>O}X.exports=et},3251:function(X){var et=Object.prototype,M=et.hasOwnProperty;function O(W,H){return W!=null&&M.call(W,H)}X.exports=O},62348:function(X){function et(M,O){return M!=null&&O in Object(M)}X.exports=et},17424:function(X,et,M){var O=M(51533),W=M(8373),H=M(49237);function L(I,N,P){return N===N?H(I,N,P):O(I,W,P)}X.exports=L},77295:function(X,et,M){var O=M(84412),W=M(93913);function H(L,I,N,P,k){return L===I?!0:L==null||I==null||!W(L)&&!W(I)?L!==L&&I!==I:O(L,I,N,P,H,k)}X.exports=H},84412:function(X,et,M){var O=M(91866),W=M(50401),H=M(57710),L=M(4983),I=M(66139),N=M(80744),P=M(57835),k=M(18397),U=1,Z="[object Arguments]",V="[object Array]",Y="[object Object]",nt=Object.prototype,rt=nt.hasOwnProperty;function ft(ct,it,vt,gt,yt,mt){var Mt=N(ct),Ct=N(it),Nt=Mt?V:I(ct),qt=Ct?V:I(it);Nt=Nt==Z?Y:Nt,qt=qt==Z?Y:qt;var Gt=Nt==Y,re=qt==Y,de=Nt==qt;if(de&&P(ct)){if(!P(it))return!1;Mt=!0,Gt=!1}if(de&&!Gt)return mt||(mt=new O),Mt||k(ct)?W(ct,it,vt,gt,yt,mt):H(ct,it,Nt,vt,gt,yt,mt);if(!(vt&U)){var ue=Gt&&rt.call(ct,"__wrapped__"),Me=re&&rt.call(it,"__wrapped__");if(ue||Me){var Ve=ue?ct.value():ct,dn=Me?it.value():it;return mt||(mt=new O),yt(Ve,dn,vt,gt,mt)}}return de?(mt||(mt=new O),L(ct,it,vt,gt,yt,mt)):!1}X.exports=ft},55005:function(X,et,M){var O=M(66139),W=M(93913),H="[object Map]";function L(I){return W(I)&&O(I)==H}X.exports=L},51524:function(X,et,M){var O=M(91866),W=M(77295),H=1,L=2;function I(N,P,k,U){var Z=k.length,V=Z,Y=!U;if(N==null)return!V;for(N=Object(N);Z--;){var nt=k[Z];if(Y&&nt[2]?nt[1]!==N[nt[0]]:!(nt[0]in N))return!1}for(;++Z<V;){nt=k[Z];var rt=nt[0],ft=N[rt],ct=nt[1];if(Y&&nt[2]){if(ft===void 0&&!(rt in N))return!1}else{var it=new O;if(U)var vt=U(ft,ct,rt,N,P,it);if(!(vt===void 0?W(ct,ft,H|L,U,it):vt))return!1}}return!0}X.exports=I},8373:function(X){function et(M){return M!==M}X.exports=et},38652:function(X,et,M){var O=M(66139),W=M(93913),H="[object Set]";function L(I){return W(I)&&O(I)==H}X.exports=L},95979:function(X,et,M){var O=M(17632),W=M(38933),H=M(46962),L=M(80744),I=M(35769);function N(P){return typeof P=="function"?P:P==null?H:typeof P=="object"?L(P)?W(P[0],P[1]):O(P):I(P)}X.exports=N},6019:function(X,et,M){var O=M(7975),W=M(23730),H=Object.prototype,L=H.hasOwnProperty;function I(N){if(!O(N))return W(N);var P=[];for(var k in Object(N))L.call(N,k)&&k!="constructor"&&P.push(k);return P}X.exports=I},93757:function(X){function et(M,O){return M<O}X.exports=et},65487:function(X,et,M){var O=M(44107),W=M(24665);function H(L,I){var N=-1,P=W(L)?Array(L.length):[];return O(L,function(k,U,Z){P[++N]=I(k,U,Z)}),P}X.exports=H},17632:function(X,et,M){var O=M(51524),W=M(10261),H=M(24122);function L(I){var N=W(I);return N.length==1&&N[0][2]?H(N[0][0],N[0][1]):function(P){return P===I||O(P,I,N)}}X.exports=L},38933:function(X,et,M){var O=M(77295),W=M(44231),H=M(37879),L=M(86773),I=M(88411),N=M(24122),P=M(9171),k=1,U=2;function Z(V,Y){return L(V)&&I(Y)?N(P(V),Y):function(nt){var rt=W(nt,V);return rt===void 0&&rt===Y?H(nt,V):O(Y,rt,k|U)}}X.exports=Z},58506:function(X,et,M){var O=M(75010),W=M(89147),H=M(95979),L=M(65487),I=M(33065),N=M(38342),P=M(11249),k=M(46962),U=M(80744);function Z(V,Y,nt){Y.length?Y=O(Y,function(ct){return U(ct)?function(it){return W(it,ct.length===1?ct[0]:ct)}:ct}):Y=[k];var rt=-1;Y=O(Y,N(H));var ft=L(V,function(ct,it,vt){var gt=O(Y,function(yt){return yt(ct)});return{criteria:gt,index:++rt,value:ct}});return I(ft,function(ct,it){return P(ct,it,nt)})}X.exports=Z},88832:function(X,et,M){var O=M(10867),W=M(37879);function H(L,I){return O(L,I,function(N,P){return W(L,P)})}X.exports=H},10867:function(X,et,M){var O=M(89147),W=M(36897),H=M(1186);function L(I,N,P){for(var k=-1,U=N.length,Z={};++k<U;){var V=N[k],Y=O(I,V);P(Y,V)&&W(Z,H(V,I),Y)}return Z}X.exports=L},22310:function(X){function et(M){return function(O){return O==null?void 0:O[M]}}X.exports=et},96916:function(X,et,M){var O=M(89147);function W(H){return function(L){return O(L,H)}}X.exports=W},36121:function(X){var et=Math.ceil,M=Math.max;function O(W,H,L,I){for(var N=-1,P=M(et((H-W)/(L||1)),0),k=Array(P);P--;)k[I?P:++N]=W,W+=L;return k}X.exports=O},30739:function(X){function et(M,O,W,H,L){return L(M,function(I,N,P){W=H?(H=!1,I):O(W,I,N,P)}),W}X.exports=et},36897:function(X,et,M){var O=M(60348),W=M(1186),H=M(70213),L=M(20816),I=M(9171);function N(P,k,U,Z){if(!L(P))return P;k=W(k,P);for(var V=-1,Y=k.length,nt=Y-1,rt=P;rt!=null&&++V<Y;){var ft=I(k[V]),ct=U;if(ft==="__proto__"||ft==="constructor"||ft==="prototype")return P;if(V!=nt){var it=rt[ft];ct=Z?Z(it,ft,rt):void 0,ct===void 0&&(ct=L(it)?it:H(k[V+1])?[]:{})}O(rt,ft,ct),rt=rt[ft]}return P}X.exports=N},33065:function(X){function et(M,O){var W=M.length;for(M.sort(O);W--;)M[W]=M[W].value;return M}X.exports=et},50230:function(X,et,M){var O=M(91869),W=M(75010),H=M(80744),L=M(45029),I=1/0,N=O?O.prototype:void 0,P=N?N.toString:void 0;function k(U){if(typeof U=="string")return U;if(H(U))return W(U,k)+"";if(L(U))return P?P.call(U):"";var Z=U+"";return Z=="0"&&1/U==-I?"-0":Z}X.exports=k},13927:function(X,et,M){var O=M(15333),W=/^\s+/;function H(L){return L&&L.slice(0,O(L)+1).replace(W,"")}X.exports=H},29098:function(X,et,M){var O=M(98924),W=M(84271),H=M(94874),L=M(1931),I=M(47506),N=M(79679),P=200;function k(U,Z,V){var Y=-1,nt=W,rt=U.length,ft=!0,ct=[],it=ct;if(V)ft=!1,nt=H;else if(rt>=P){var vt=Z?null:I(U);if(vt)return N(vt);ft=!1,nt=L,it=new O}else it=Z?[]:ct;t:for(;++Y<rt;){var gt=U[Y],yt=Z?Z(gt):gt;if(gt=V||gt!==0?gt:0,ft&&yt===yt){for(var mt=it.length;mt--;)if(it[mt]===yt)continue t;Z&&it.push(yt),ct.push(gt)}else nt(it,yt,V)||(it!==ct&&it.push(yt),ct.push(gt))}return ct}X.exports=k},20720:function(X,et,M){var O=M(75010);function W(H,L){return O(L,function(I){return H[I]})}X.exports=W},94484:function(X){function et(M,O,W){for(var H=-1,L=M.length,I=O.length,N={};++H<L;){var P=H<I?O[H]:void 0;W(N,M[H],P)}return N}X.exports=et},1931:function(X){function et(M,O){return M.has(O)}X.exports=et},11756:function(X,et,M){var O=M(46962);function W(H){return typeof H=="function"?H:O}X.exports=W},1186:function(X,et,M){var O=M(80744),W=M(86773),H=M(40493),L=M(44140);function I(N,P){return O(N)?N:W(N,P)?[N]:H(L(N))}X.exports=I},27984:function(X,et,M){var O=M(20188);function W(H,L){var I=L?O(H.buffer):H.buffer;return new H.constructor(I,H.byteOffset,H.byteLength)}X.exports=W},78583:function(X){var et=/\w*$/;function M(O){var W=new O.constructor(O.source,et.exec(O));return W.lastIndex=O.lastIndex,W}X.exports=M},28757:function(X,et,M){var O=M(91869),W=O?O.prototype:void 0,H=W?W.valueOf:void 0;function L(I){return H?Object(H.call(I)):{}}X.exports=L},83018:function(X,et,M){var O=M(45029);function W(H,L){if(H!==L){var I=H!==void 0,N=H===null,P=H===H,k=O(H),U=L!==void 0,Z=L===null,V=L===L,Y=O(L);if(!Z&&!Y&&!k&&H>L||k&&U&&V&&!Z&&!Y||N&&U&&V||!I&&V||!P)return 1;if(!N&&!k&&!Y&&H<L||Y&&I&&P&&!N&&!k||Z&&I&&P||!U&&P||!V)return-1}return 0}X.exports=W},11249:function(X,et,M){var O=M(83018);function W(H,L,I){for(var N=-1,P=H.criteria,k=L.criteria,U=P.length,Z=I.length;++N<U;){var V=O(P[N],k[N]);if(V){if(N>=Z)return V;var Y=I[N];return V*(Y=="desc"?-1:1)}}return H.index-L.index}X.exports=W},15168:function(X,et,M){var O=M(95378),W=M(58966);function H(L,I){return O(L,W(L),I)}X.exports=H},71678:function(X,et,M){var O=M(95378),W=M(66817);function H(L,I){return O(L,W(L),I)}X.exports=H},49164:function(X,et,M){var O=M(24665);function W(H,L){return function(I,N){if(I==null)return I;if(!O(I))return H(I,N);for(var P=I.length,k=L?P:-1,U=Object(I);(L?k--:++k<P)&&N(U[k],k,U)!==!1;);return I}}X.exports=W},19554:function(X,et,M){var O=M(95979),W=M(24665),H=M(55451);function L(I){return function(N,P,k){var U=Object(N);if(!W(N)){var Z=O(P,3);N=H(N),P=function(Y){return Z(U[Y],Y,U)}}var V=I(N,P,k);return V>-1?U[Z?N[V]:V]:void 0}}X.exports=L},76106:function(X,et,M){var O=M(36121),W=M(8138),H=M(97341);function L(I){return function(N,P,k){return k&&typeof k!="number"&&W(N,P,k)&&(P=k=void 0),N=H(N),P===void 0?(P=N,N=0):P=H(P),k=k===void 0?N<P?1:-1:H(k),O(N,P,k,I)}}X.exports=L},47506:function(X,et,M){var O=M(23599),W=M(9958),H=M(79679),L=1/0,I=O&&1/H(new O([,-0]))[1]==L?function(N){return new O(N)}:W;X.exports=I},50401:function(X,et,M){var O=M(98924),W=M(64045),H=M(1931),L=1,I=2;function N(P,k,U,Z,V,Y){var nt=U&L,rt=P.length,ft=k.length;if(rt!=ft&&!(nt&&ft>rt))return!1;var ct=Y.get(P),it=Y.get(k);if(ct&&it)return ct==k&&it==P;var vt=-1,gt=!0,yt=U&I?new O:void 0;for(Y.set(P,k),Y.set(k,P);++vt<rt;){var mt=P[vt],Mt=k[vt];if(Z)var Ct=nt?Z(Mt,mt,vt,k,P,Y):Z(mt,Mt,vt,P,k,Y);if(Ct!==void 0){if(Ct)continue;gt=!1;break}if(yt){if(!W(k,function(Nt,qt){if(!H(yt,qt)&&(mt===Nt||V(mt,Nt,U,Z,Y)))return yt.push(qt)})){gt=!1;break}}else if(!(mt===Mt||V(mt,Mt,U,Z,Y))){gt=!1;break}}return Y.delete(P),Y.delete(k),gt}X.exports=N},57710:function(X,et,M){var O=M(91869),W=M(77945),H=M(43607),L=M(50401),I=M(83383),N=M(79679),P=1,k=2,U="[object Boolean]",Z="[object Date]",V="[object Error]",Y="[object Map]",nt="[object Number]",rt="[object RegExp]",ft="[object Set]",ct="[object String]",it="[object Symbol]",vt="[object ArrayBuffer]",gt="[object DataView]",yt=O?O.prototype:void 0,mt=yt?yt.valueOf:void 0;function Mt(Ct,Nt,qt,Gt,re,de,ue){switch(qt){case gt:if(Ct.byteLength!=Nt.byteLength||Ct.byteOffset!=Nt.byteOffset)return!1;Ct=Ct.buffer,Nt=Nt.buffer;case vt:return!(Ct.byteLength!=Nt.byteLength||!de(new W(Ct),new W(Nt)));case U:case Z:case nt:return H(+Ct,+Nt);case V:return Ct.name==Nt.name&&Ct.message==Nt.message;case rt:case ct:return Ct==Nt+"";case Y:var Me=I;case ft:var Ve=Gt&P;if(Me||(Me=N),Ct.size!=Nt.size&&!Ve)return!1;var dn=ue.get(Ct);if(dn)return dn==Nt;Gt|=k,ue.set(Ct,Nt);var Xn=L(Me(Ct),Me(Nt),Gt,re,de,ue);return ue.delete(Ct),Xn;case it:if(mt)return mt.call(Ct)==mt.call(Nt)}return!1}X.exports=Mt},4983:function(X,et,M){var O=M(12076),W=1,H=Object.prototype,L=H.hasOwnProperty;function I(N,P,k,U,Z,V){var Y=k&W,nt=O(N),rt=nt.length,ft=O(P),ct=ft.length;if(rt!=ct&&!Y)return!1;for(var it=rt;it--;){var vt=nt[it];if(!(Y?vt in P:L.call(P,vt)))return!1}var gt=V.get(N),yt=V.get(P);if(gt&&yt)return gt==P&&yt==N;var mt=!0;V.set(N,P),V.set(P,N);for(var Mt=Y;++it<rt;){vt=nt[it];var Ct=N[vt],Nt=P[vt];if(U)var qt=Y?U(Nt,Ct,vt,P,N,V):U(Ct,Nt,vt,N,P,V);if(!(qt===void 0?Ct===Nt||Z(Ct,Nt,k,U,V):qt)){mt=!1;break}Mt||(Mt=vt=="constructor")}if(mt&&!Mt){var Gt=N.constructor,re=P.constructor;Gt!=re&&"constructor"in N&&"constructor"in P&&!(typeof Gt=="function"&&Gt instanceof Gt&&typeof re=="function"&&re instanceof re)&&(mt=!1)}return V.delete(N),V.delete(P),mt}X.exports=I},522:function(X,et,M){var O=M(40151),W=M(19652),H=M(71152);function L(I){return H(W(I,void 0,O),I+"")}X.exports=L},12076:function(X,et,M){var O=M(75635),W=M(58966),H=M(55451);function L(I){return O(I,H,W)}X.exports=L},22675:function(X,et,M){var O=M(75635),W=M(66817),H=M(56730);function L(I){return O(I,H,W)}X.exports=L},10261:function(X,et,M){var O=M(88411),W=M(55451);function H(L){for(var I=W(L),N=I.length;N--;){var P=I[N],k=L[P];I[N]=[P,k,O(k)]}return I}X.exports=H},58966:function(X,et,M){var O=M(86952),W=M(4134),H=Object.prototype,L=H.propertyIsEnumerable,I=Object.getOwnPropertySymbols,N=I?function(P){return P==null?[]:(P=Object(P),O(I(P),function(k){return L.call(P,k)}))}:W;X.exports=N},66817:function(X,et,M){var O=M(57095),W=M(49217),H=M(58966),L=M(4134),I=Object.getOwnPropertySymbols,N=I?function(P){for(var k=[];P;)O(k,H(P)),P=W(P);return k}:L;X.exports=N},66139:function(X,et,M){var O=M(15584),W=M(40164),H=M(97288),L=M(23599),I=M(26873),N=M(86756),P=M(63256),k="[object Map]",U="[object Object]",Z="[object Promise]",V="[object Set]",Y="[object WeakMap]",nt="[object DataView]",rt=P(O),ft=P(W),ct=P(H),it=P(L),vt=P(I),gt=N;(O&&gt(new O(new ArrayBuffer(1)))!=nt||W&&gt(new W)!=k||H&&gt(H.resolve())!=Z||L&&gt(new L)!=V||I&&gt(new I)!=Y)&&(gt=function(yt){var mt=N(yt),Mt=mt==U?yt.constructor:void 0,Ct=Mt?P(Mt):"";if(Ct)switch(Ct){case rt:return nt;case ft:return k;case ct:return Z;case it:return V;case vt:return Y}return mt}),X.exports=gt},63100:function(X,et,M){var O=M(1186),W=M(13053),H=M(80744),L=M(70213),I=M(11156),N=M(9171);function P(k,U,Z){U=O(U,k);for(var V=-1,Y=U.length,nt=!1;++V<Y;){var rt=N(U[V]);if(!(nt=k!=null&&Z(k,rt)))break;k=k[rt]}return nt||++V!=Y?nt:(Y=k==null?0:k.length,!!Y&&I(Y)&&L(rt,Y)&&(H(k)||W(k)))}X.exports=P},55015:function(X){var et="\\ud800-\\udfff",M="\\u0300-\\u036f",O="\\ufe20-\\ufe2f",W="\\u20d0-\\u20ff",H=M+O+W,L="\\ufe0e\\ufe0f",I="\\u200d",N=RegExp("["+I+et+H+L+"]");function P(k){return N.test(k)}X.exports=P},79264:function(X){var et=Object.prototype,M=et.hasOwnProperty;function O(W){var H=W.length,L=new W.constructor(H);return H&&typeof W[0]=="string"&&M.call(W,"index")&&(L.index=W.index,L.input=W.input),L}X.exports=O},97541:function(X,et,M){var O=M(20188),W=M(27984),H=M(78583),L=M(28757),I=M(78358),N="[object Boolean]",P="[object Date]",k="[object Map]",U="[object Number]",Z="[object RegExp]",V="[object Set]",Y="[object String]",nt="[object Symbol]",rt="[object ArrayBuffer]",ft="[object DataView]",ct="[object Float32Array]",it="[object Float64Array]",vt="[object Int8Array]",gt="[object Int16Array]",yt="[object Int32Array]",mt="[object Uint8Array]",Mt="[object Uint8ClampedArray]",Ct="[object Uint16Array]",Nt="[object Uint32Array]";function qt(Gt,re,de){var ue=Gt.constructor;switch(re){case rt:return O(Gt);case N:case P:return new ue(+Gt);case ft:return W(Gt,de);case ct:case it:case vt:case gt:case yt:case mt:case Mt:case Ct:case Nt:return I(Gt,de);case k:return new ue;case U:case Y:return new ue(Gt);case Z:return H(Gt);case V:return new ue;case nt:return L(Gt)}}X.exports=qt},88133:function(X,et,M){var O=M(91869),W=M(13053),H=M(80744),L=O?O.isConcatSpreadable:void 0;function I(N){return H(N)||W(N)||!!(L&&N&&N[L])}X.exports=I},86773:function(X,et,M){var O=M(80744),W=M(45029),H=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,L=/^\w*$/;function I(N,P){if(O(N))return!1;var k=typeof N;return k=="number"||k=="symbol"||k=="boolean"||N==null||W(N)?!0:L.test(N)||!H.test(N)||P!=null&&N in Object(P)}X.exports=I},88411:function(X,et,M){var O=M(20816);function W(H){return H===H&&!O(H)}X.exports=W},83383:function(X){function et(M){var O=-1,W=Array(M.size);return M.forEach(function(H,L){W[++O]=[L,H]}),W}X.exports=et},24122:function(X){function et(M,O){return function(W){return W==null?!1:W[M]===O&&(O!==void 0||M in Object(W))}}X.exports=et},26332:function(X,et,M){var O=M(52858),W=500;function H(L){var I=O(L,function(P){return N.size===W&&N.clear(),P}),N=I.cache;return I}X.exports=H},23730:function(X,et,M){var O=M(31030),W=O(Object.keys,Object);X.exports=W},34776:function(X){var et="__lodash_hash_undefined__";function M(O){return this.__data__.set(O,et),this}X.exports=M},40393:function(X){function et(M){return this.__data__.has(M)}X.exports=et},79679:function(X){function et(M){var O=-1,W=Array(M.size);return M.forEach(function(H){W[++O]=H}),W}X.exports=et},49237:function(X){function et(M,O,W){for(var H=W-1,L=M.length;++H<L;)if(M[H]===O)return H;return-1}X.exports=et},29405:function(X,et,M){var O=M(26539),W=M(55015),H=M(60844);function L(I){return W(I)?H(I):O(I)}X.exports=L},40493:function(X,et,M){var O=M(26332),W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,H=/\\(\\)?/g,L=O(function(I){var N=[];return I.charCodeAt(0)===46&&N.push(""),I.replace(W,function(P,k,U,Z){N.push(U?Z.replace(H,"$1"):k||P)}),N});X.exports=L},9171:function(X,et,M){var O=M(45029),W=1/0;function H(L){if(typeof L=="string"||O(L))return L;var I=L+"";return I=="0"&&1/L==-W?"-0":I}X.exports=H},15333:function(X){var et=/\s/;function M(O){for(var W=O.length;W--&&et.test(O.charAt(W)););return W}X.exports=M},60844:function(X){var et="\\ud800-\\udfff",M="\\u0300-\\u036f",O="\\ufe20-\\ufe2f",W="\\u20d0-\\u20ff",H=M+O+W,L="\\ufe0e\\ufe0f",I="["+et+"]",N="["+H+"]",P="\\ud83c[\\udffb-\\udfff]",k="(?:"+N+"|"+P+")",U="[^"+et+"]",Z="(?:\\ud83c[\\udde6-\\uddff]){2}",V="[\\ud800-\\udbff][\\udc00-\\udfff]",Y="\\u200d",nt=k+"?",rt="["+L+"]?",ft="(?:"+Y+"(?:"+[U,Z,V].join("|")+")"+rt+nt+")*",ct=rt+nt+ft,it="(?:"+[U+N+"?",N,Z,V,I].join("|")+")",vt=RegExp(P+"(?="+P+")|"+it+ct,"g");function gt(yt){for(var mt=vt.lastIndex=0;vt.test(yt);)++mt;return mt}X.exports=gt},76833:function(X,et,M){var O=M(99045),W=4;function H(L){return O(L,W)}X.exports=H},20250:function(X,et,M){var O=M(99045),W=1,H=4;function L(I){return O(I,W|H)}X.exports=L},28548:function(X,et,M){var O=M(92918),W=M(43607),H=M(8138),L=M(56730),I=Object.prototype,N=I.hasOwnProperty,P=O(function(k,U){k=Object(k);var Z=-1,V=U.length,Y=V>2?U[2]:void 0;for(Y&&H(U[0],U[1],Y)&&(V=1);++Z<V;)for(var nt=U[Z],rt=L(nt),ft=-1,ct=rt.length;++ft<ct;){var it=rt[ft],vt=k[it];(vt===void 0||W(vt,I[it])&&!N.call(k,it))&&(k[it]=nt[it])}return k});X.exports=P},76934:function(X,et,M){X.exports=M(99204)},64725:function(X,et,M){var O=M(86952),W=M(32872),H=M(95979),L=M(80744);function I(N,P){var k=L(N)?O:W;return k(N,H(P,3))}X.exports=I},79785:function(X,et,M){var O=M(19554),W=M(9991),H=O(W);X.exports=H},9991:function(X,et,M){var O=M(51533),W=M(95979),H=M(12824),L=Math.max;function I(N,P,k){var U=N==null?0:N.length;if(!U)return-1;var Z=k==null?0:H(k);return Z<0&&(Z=L(U+Z,0)),O(N,W(P,3),Z)}X.exports=I},40151:function(X,et,M){var O=M(9256);function W(H){var L=H==null?0:H.length;return L?O(H,1):[]}X.exports=W},99204:function(X,et,M){var O=M(74809),W=M(44107),H=M(11756),L=M(80744);function I(N,P){var k=L(N)?O:W;return k(N,H(P))}X.exports=I},23190:function(X,et,M){var O=M(14018),W=M(11756),H=M(56730);function L(I,N){return I==null?I:O(I,W(N),H)}X.exports=L},44231:function(X,et,M){var O=M(89147);function W(H,L,I){var N=H==null?void 0:O(H,L);return N===void 0?I:N}X.exports=W},99946:function(X,et,M){var O=M(3251),W=M(63100);function H(L,I){return L!=null&&W(L,I,O)}X.exports=H},37879:function(X,et,M){var O=M(62348),W=M(63100);function H(L,I){return L!=null&&W(L,I,O)}X.exports=H},61627:function(X,et,M){var O=M(6019),W=M(66139),H=M(13053),L=M(80744),I=M(24665),N=M(57835),P=M(7975),k=M(18397),U="[object Map]",Z="[object Set]",V=Object.prototype,Y=V.hasOwnProperty;function nt(rt){if(rt==null)return!0;if(I(rt)&&(L(rt)||typeof rt=="string"||typeof rt.splice=="function"||N(rt)||k(rt)||H(rt)))return!rt.length;var ft=W(rt);if(ft==U||ft==Z)return!rt.size;if(P(rt))return!O(rt).length;for(var ct in rt)if(Y.call(rt,ct))return!1;return!0}X.exports=nt},41626:function(X,et,M){var O=M(55005),W=M(38342),H=M(52495),L=H&&H.isMap,I=L?W(L):O;X.exports=I},65226:function(X,et,M){var O=M(38652),W=M(38342),H=M(52495),L=H&&H.isSet,I=L?W(L):O;X.exports=I},7941:function(X,et,M){var O=M(86756),W=M(80744),H=M(93913),L="[object String]";function I(N){return typeof N=="string"||!W(N)&&H(N)&&O(N)==L}X.exports=I},45029:function(X,et,M){var O=M(86756),W=M(93913),H="[object Symbol]";function L(I){return typeof I=="symbol"||W(I)&&O(I)==H}X.exports=L},16513:function(X){function et(M){return M===void 0}X.exports=et},55451:function(X,et,M){var O=M(63333),W=M(6019),H=M(24665);function L(I){return H(I)?O(I):W(I)}X.exports=L},10611:function(X){function et(M){var O=M==null?0:M.length;return O?M[O-1]:void 0}X.exports=et},9924:function(X,et,M){var O=M(75010),W=M(95979),H=M(65487),L=M(80744);function I(N,P){var k=L(N)?O:H;return k(N,W(P,3))}X.exports=I},70642:function(X,et,M){var O=M(42813),W=M(1585),H=M(95979);function L(I,N){var P={};return N=H(N,3),W(I,function(k,U,Z){O(P,U,N(k,U,Z))}),P}X.exports=L},95987:function(X,et,M){var O=M(2659),W=M(40302),H=M(46962);function L(I){return I&&I.length?O(I,H,W):void 0}X.exports=L},52858:function(X,et,M){var O=M(52166),W="Expected a function";function H(L,I){if(typeof L!="function"||I!=null&&typeof I!="function")throw new TypeError(W);var N=function(){var P=arguments,k=I?I.apply(this,P):P[0],U=N.cache;if(U.has(k))return U.get(k);var Z=L.apply(this,P);return N.cache=U.set(k,Z)||U,Z};return N.cache=new(H.Cache||O),N}H.Cache=O,X.exports=H},73376:function(X,et,M){var O=M(2659),W=M(93757),H=M(46962);function L(I){return I&&I.length?O(I,H,W):void 0}X.exports=L},83296:function(X,et,M){var O=M(2659),W=M(95979),H=M(93757);function L(I,N){return I&&I.length?O(I,W(N,2),H):void 0}X.exports=L},9958:function(X){function et(){}X.exports=et},5795:function(X,et,M){var O=M(33152),W=function(){return O.Date.now()};X.exports=W},89409:function(X,et,M){var O=M(88832),W=M(522),H=W(function(L,I){return L==null?{}:O(L,I)});X.exports=H},35769:function(X,et,M){var O=M(22310),W=M(96916),H=M(86773),L=M(9171);function I(N){return H(N)?O(L(N)):W(N)}X.exports=I},60859:function(X,et,M){var O=M(76106),W=O();X.exports=W},16473:function(X,et,M){var O=M(99861),W=M(44107),H=M(95979),L=M(30739),I=M(80744);function N(P,k,U){var Z=I(P)?O:L,V=arguments.length<3;return Z(P,H(k,4),U,V,W)}X.exports=N},40617:function(X,et,M){var O=M(6019),W=M(66139),H=M(24665),L=M(7941),I=M(29405),N="[object Map]",P="[object Set]";function k(U){if(U==null)return 0;if(H(U))return L(U)?I(U):U.length;var Z=W(U);return Z==N||Z==P?U.size:O(U).length}X.exports=k},351:function(X,et,M){var O=M(9256),W=M(58506),H=M(92918),L=M(8138),I=H(function(N,P){if(N==null)return[];var k=P.length;return k>1&&L(N,P[0],P[1])?P=[]:k>2&&L(P[0],P[1],P[2])&&(P=[P[0]]),W(N,O(P,1),[])});X.exports=I},4134:function(X){function et(){return[]}X.exports=et},97341:function(X,et,M){var O=M(59406),W=1/0,H=17976931348623157e292;function L(I){if(!I)return I===0?I:0;if(I=O(I),I===W||I===-W){var N=I<0?-1:1;return N*H}return I===I?I:0}X.exports=L},12824:function(X,et,M){var O=M(97341);function W(H){var L=O(H),I=L%1;return L===L?I?L-I:L:0}X.exports=W},59406:function(X,et,M){var O=M(13927),W=M(20816),H=M(45029),L=NaN,I=/^[-+]0x[0-9a-f]+$/i,N=/^0b[01]+$/i,P=/^0o[0-7]+$/i,k=parseInt;function U(Z){if(typeof Z=="number")return Z;if(H(Z))return L;if(W(Z)){var V=typeof Z.valueOf=="function"?Z.valueOf():Z;Z=W(V)?V+"":V}if(typeof Z!="string")return Z===0?Z:+Z;Z=O(Z);var Y=N.test(Z);return Y||P.test(Z)?k(Z.slice(2),Y?2:8):I.test(Z)?L:+Z}X.exports=U},44140:function(X,et,M){var O=M(50230);function W(H){return H==null?"":O(H)}X.exports=W},91116:function(X,et,M){var O=M(74809),W=M(35024),H=M(1585),L=M(95979),I=M(49217),N=M(80744),P=M(57835),k=M(9363),U=M(20816),Z=M(18397);function V(Y,nt,rt){var ft=N(Y),ct=ft||P(Y)||Z(Y);if(nt=L(nt,4),rt==null){var it=Y&&Y.constructor;ct?rt=ft?new it:[]:U(Y)?rt=k(it)?W(I(Y)):{}:rt={}}return(ct?O:H)(Y,function(vt,gt,yt){return nt(rt,vt,gt,yt)}),rt}X.exports=V},44065:function(X,et,M){var O=M(9256),W=M(92918),H=M(29098),L=M(41590),I=W(function(N){return H(O(N,1,L,!0))});X.exports=I},95708:function(X,et,M){var O=M(44140),W=0;function H(L){var I=++W;return O(L)+I}X.exports=H},81229:function(X,et,M){var O=M(20720),W=M(55451);function H(L){return L==null?[]:O(L,W(L))}X.exports=H},65441:function(X,et,M){var O=M(60348),W=M(94484);function H(L,I){return W(L||[],I||[],O)}X.exports=H},34402:function(X,et,M){"use strict";M.r(et),M.d(et,{default:function(){return L}});var O=M(34634);function W(I){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,O.isAnyArray)(I))throw new TypeError("input must be an array");if(I.length===0)throw new TypeError("input must not be empty");var P=N.fromIndex,k=P===void 0?0:P,U=N.toIndex,Z=U===void 0?I.length:U;if(k<0||k>=I.length||!Number.isInteger(k))throw new Error("fromIndex must be a positive integer smaller than length");if(Z<=k||Z>I.length||!Number.isInteger(Z))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var V=I[k],Y=k+1;Y<Z;Y++)I[Y]>V&&(V=I[Y]);return V}function H(I){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,O.isAnyArray)(I))throw new TypeError("input must be an array");if(I.length===0)throw new TypeError("input must not be empty");var P=N.fromIndex,k=P===void 0?0:P,U=N.toIndex,Z=U===void 0?I.length:U;if(k<0||k>=I.length||!Number.isInteger(k))throw new Error("fromIndex must be a positive integer smaller than length");if(Z<=k||Z>I.length||!Number.isInteger(Z))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var V=I[k],Y=k+1;Y<Z;Y++)I[Y]<V&&(V=I[Y]);return V}function L(I){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,O.isAnyArray)(I)){if(I.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var P;if(N.output!==void 0){if(!(0,O.isAnyArray)(N.output))throw new TypeError("output option must be an array if specified");P=N.output}else P=new Array(I.length);var k=H(I),U=W(I);if(k===U)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var Z=N.min,V=Z===void 0?N.autoMinMax?k:0:Z,Y=N.max,nt=Y===void 0?N.autoMinMax?U:1:Y;if(V>=nt)throw new RangeError("min option must be smaller than max option");for(var rt=(nt-V)/(U-k),ft=0;ft<I.length;ft++)P[ft]=(I[ft]-k)*rt+V;return P}},81683:function(X,et,M){"use strict";var O=M(55973),W=Array.prototype.concat,H=Array.prototype.slice,L=X.exports=function(N){for(var P=[],k=0,U=N.length;k<U;k++){var Z=N[k];O(Z)?P=W.call(P,H.call(Z)):P.push(Z)}return P};L.wrap=function(I){return function(){return I(L(arguments))}}},99755:function(X){"use strict";X.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABSCAYAAADKMvPcAAAAAXNSR0IArs4c6QAAFkdJREFUeF7NXXlsHNd5/2Z3Z3e5S3J5LClREklJlGxZtmzJUVo0boEICdI2BYICrQQ0PaJaV2JZSOO6NtC/+EfbFC36T902QBpFllxbDYXayFH1MArXQRugKIIojmQ7kSlKpMX7Wh6z3B3uvuJ7b76ZNzNvDl6ulqZI7szOfO/3ft/93lgDz+vP2ZuFHsh37YSOhkZIJ7zHN+NvHQAMMKEOrD4O8+YirCw0wNj9E9qJ2lqv389YoqP8/Z3bkoXmgpZPt+q6loa0Rtcxwy4YcBDl87/wXRMqwOr3K/OVCbN8/1zb0ZL3PPvGjDHtCvzX/r3Q1WQAfpmA9xP/bu4LRdOtrxzogN8MUuxOZXyxmimP/L52bCXqjv1sIN0De3b1mvkWTU9rhomSkrRRUqshs+8pDdk5E+UE0HUdCpDjv9+oTc3+XsMTQ7KsHFAE8zL898ECNGenoQQlG1BZyKghxjsuBEQ4gQOJoqGA+F3Ed0yAH+oj989rx8aDrvg37H/aHzGbesu6ppVMw5ZXkECgYWOi5EMEoNIFhKQosZA6ZwGKsnbpObhZG536QsPRYZKVA/rX7D/62iHfMgYlwG8EFL8/CoaK2dahCAUOaJf1832YmD+pPTXoBfVvjbe7e1OtndNgAH1zAkgMVWIYqGhRbBWQyoCinEU9Bz1QgHZoYO/lpn9yTjvK76D1s+/mdkPLI8NQgmGYBsFQ0+IozfRmqr0koCkU32aoLgDtgSL/OVKdXP585hPvE6hfK7+1e3uyvR1lxYnnspqmzVBOLElU+lUJGT8YBqb7mA2oJS+yEwHt04tQWl1c+O3Ckdsc0L9g1/tqUG8ZhGkOqGCnV3U2D1BSIT4cDigOC1VeAItAclB1AeoNY2TsxfxnRr86/73Wnlxx7xgYXE78KdQdJ9/kSMpSqsG0QPINxwMsHhc+yAU6gYqyFnUEU3x3QzP75dy+H2maxrQ/Zf/y+ATM6ggoqbsDZzy7uK6zLDDJopJzEmovwMTvJkixm0sjg9sbO/YsQjXJzZKJ7HQmnkMp/pNefoYhe2UnEyi3Gcxcbke5iUIbKgA9oBdhyJj52Ysdv7io/XH1n568q89qpO7k3dcFUpwP2aP2Dk14UbSo3EZZgCJrESqUC0EkMPFvLmsMp8PJZoEpyBcAWEwzQHKi2vdBkQNaSlTvPd98dFr7QzbwsfdhzGancEVb+FIA6iiWmP2cqUNBF8Di3wgBykUenUwSv1QMQPGcWMzEs2I4Lx6hmKj2OejRC3BIL0K+3lA53fbETe08e+XJ2zChOer+UYAZ7BBIpdC+oq0iNuE4bVZScLRmMEMcURx2WrYVQzuUiwBFtd9RbxaAnmXffPI2zHJARTi/Ra8AZvqGaNkvglJWTwrj7EtFORfu+Gg8ER49dODSZ63zUHMKus7tPKp8MZmtfLnt4ze1U+zykTswldhSQF3CKpwF2TVuEGXl9IOgtpkK5ln3JGcdaDdD1dy6rsvrSzEp6NwxHdALsCvbtvJs0+Fb2in2jSN3YH7rAF0jM4P1Iyjk8Yc29rREsjPMZkrX9U2OlTVZgKLK70w0rjzX/nO3tDPs0uEPYIaHI5uu8hFg0mHOnjgqF8Nh8AmJ64RCwiMxsX5VlxmPNp57er3oAHqyeunwPX2LALW9sNvHuhSb/xEEqCLgDok1bQgiHQyCHpFyEpghpkMAKmJRm6FPs4tPDMFcatMZGoOdwmHETP/W7NHX64TCWOl2cP8PgPoH5aiMZPCVhtM/MPdpfvZuPNZ0201ZVqFV7jtglCxUXmLoaXb58UGY0jeVoQp2knBC5Cib6XcI8cCMUOO4GuHRBnFVf3SiBrTy948PpkubA2iEV3XNbxwn5MuEFIC5HFCECQm1m/4owg+hM608W+J1hxz05SSGnmWXDt2GmXQchgbPf1hIExwj+jU9Ss39IZK3IqSyHsEaEcfpuWNjOYrI8XKj5eUzTSvPtR++pZ2sXDp0L60GlG4nV6194YSPRWr1sAdqMVMmKP1uvxfDAZFDQxm9KqlSUQJCKb93FmzT4JQEXSJZWqEE9BS78tgdmMx4GSoEFV+5atLMpFMzddBW8d6NSieCb+YDj8Cy/9ASANShqtVqtUYjBQUhtKqC5Fc+ki1T1eq5ZOO0vlqr8o+jCPxeIbJYotCp3jP5x/GfPMCyUWkwNdZW1WqanKVRO8TH0FOVbzx2Jz3vApTAxHy10dTrVX3bzR9q50KtXjCS8Y583Pir7pVqtdNQNgbd3hULJ9jbQRvWZiZ+9p2OU4vx7rK+sz7509eK5SzrdcqFpiCaHNiTyp9hLz/6AUxnZYaSwRWNs6zxz9pX3lufKPE/9bmpi00TubmHsKWBMyf+VYRdJgCqGsaAbSxf/07rF34U/y7rO7Of9SfeHj54hPfZrEK2wEjKlGxAKy8/ei8tAKXGHFXPsZKyHVrqZWi+dU07IVRqi16fW764YxYqXVjzVBW5KezCOiSykxp6zbXG2y+1f3Zhi8Tilz07+2bh/uLSPixwi2agmGoBqJUpEaDn2DcPDsFsgxdQwU5smGEronk1CdkZHUxTh5Tdyw8eBNa0Q17cSCFsGbacX4aFFS03Xy+13odFbToAUMrPHVWzZGON9Tqk5nS9oaxDWYtjO72S2bYU7U0O7SaAmauz5WWAWm0xs5hibaPl5ST2sdyASoE9AXqaXXlkGCZzKoYKQIsWqKLNKyzHWl7q2BHnWW5r2J3MmIBikwwdgmjmWdV93SlI+yRcgwfAU0WHwIQx04BhE/tYom29LkBlGyqaZYKt6AQIToV1i6gYuYfoCC0E5W1hC0xZ5bmqe6pHvLhr9capj4/FXvqiOyknPkbFSkw2gMFBFKCibMK+yyqvYOhZdunAXZjJywyVvTyt6PDBSYZEEjAss/AyRhh37KmLvjr110lgb0zqzqOFnvDWM3dQwkl5c233PaOCeOds4RQRUEs+q12NMlNPA69Gk8pzea1p5bkuEdgfGE27AcVLC1sl0ita3ZExswwrbdyeBZbcQvghgU+evGLWNEMX6kVmAK/AT7WZqY5Dian4M6MnGYc0Iv1VG6u0eFtyuyZUOUsrqzWN1F9ur7vDJgnQp9nFhz+EuUZvkw6FxC8EMw/J+XYwRq5p/Zvu6XFd1a8sXGydqRu9Fa2acHW1AsAh1UZWZrWM0VrO3r3WfaK8Fsse99zjkwONE4uwp8LMtB0jW006NDPYqHMx9Ay7/NA9mGpSqTyC2W5ma0/pf/ROv6bV4wqxnvOemnppR1mvd4ng2Un5VL0gco1c1Yu5d69pWwMmjePXh95oma6ZfRTY22ETb9JZxREnsPcD6qziKEAnFIxvaWc+ksB+Vq88JBZ+kdKrXB/ZzxxsSzXW/7H1Nz+SwP4Hw08cQbMke3nOUAKUbOg5dmn/ECw0j/F1TcJKcNtkiqUmPdBhfk37/DvrYd1aPnO8NNBWYqU9TmgSkCmRh+chUwG2FfI/7teO8RrDVr0u3L6eGUnXHyNPT/dRAnpy5dL+0Ywf0KJZEC1S6IIE1Ef/TPuNsa0SGO3omaVvHRirreRwqU3YciC+AMJapYe2qwFS83/S8infssfNlPXZ8bf3TFQW25zQSVxdLBpDlS/CTi0rvPwp9sq+cZgtiJV3FkNNEYZgUI9rdzB4zkCqnKhoq5lMGjJKadXvuk6tAOCHK/gTKrgknC1ABeZWzYYJbVEXAXQIoLYzcOqQyNJmlqqa9VQFJcikQ+SI5VLR41dhoVKBMmOsnNTSU5XFLAX3aI7IwtNyIV5gJkDPspf77kOpxQbUFCovqtEivaOlhRQ+BS8aCFpr5J8BVGgeg2ImgmtTEUwpuPd/QrRNeNJh2S6eFqNZ0gt2aBdYC42gLFlrCizQVoqgXmRJ7uBeyOGKQ9MWQ8+uvNx3P1NqwQFRcYQSf8rnaTUcBc+hgAYKLjkYa5YpsEdVotXIOBDlgiCr6EtJh2CHtfJZFxmcCPW8r7UlyrQskk+4FdBz+SyHROZIhJRC5Q/kCtBJDP0Se3XvMEy3IkvwAuQKKHB1gmchdHQ13BlQGPA8sLfA44EzpnuujQcSMJ5ekCvp4HVRAtMrXQCYvvTTfR7JJuf0fKGavVRIoOQsdChAJzH0NLuyZwzm2mSG4lCICQSs/XdgoytYeCq94bXksVC2RHGncqGvxUyZdwQbTbA3i49nksKZS3VPOxW267TutU2coXoAoGI7jXiR0DKwtIxPrdVulQ42WfJARLuDcmf/ZpjgdjNl7k4G74XRuo+iGCImWAG7JzXGMcjAyrqHQvPVd1am1JnGXP7RW9oX2dXdIzDZ7rWh1NYX+bEOmWRiKccS1Xolqh7q97Led4SXB0hkdFYGU6vVodGsmbqLoQpm0oAICmJoBjJG3VytZALiD/fkZn1zzd+xZKINUsm0zmpVUyuvmrmalsgQ0fiHJefoA/Q8e7X3LpSKY6YIm9BWyNUmtJwNK3DvP5ufn45wlOs+/Mm3+lPLB4oPr6RqWTIDYWuPZPuey2Qm/739t0bWffOID2KMfOzda33lhGgiykUbjDZ8gJ4qv9o7niwV5UxJ7MsQhZF2lqlez1z4yVYJTNf91MLl9qXK8m5h/MMMhuOEeMG7C25cW8eWxrWM5/jIQMP0kn5Qlo3CNwJ0V7pp5VlU+bPscs+kudzBvbwVsNgxFhSgg2XLr2aefnctAqznXGzSLULSyuWDthYKZefhCuRge6q1frHzs1ufy/f3J278zi8csdszcl9e13m1ybahz7Cr3aPmXKcLUBP4PhwM7Luhtf5Lev2d9WxsXQuwJ5cGtk+VzZ28++rZcyQ7A6zR2gE1FKDM0j/9u85j2OLfsteF29ebx7XkfpF6ikyJmx1ebdL5Uhyboc8YV7tHU25AaRcG3ykGRWhmueW76buDX9+i3vyFmevNtVpl7z3NSPL9R1Y86kZIsJMCarE5rAA7k9kqtMIHz2mf2JJ6aP/QUHYpObpvtFrJYLZEsnkBtRl6mv3DrmlzYZsd2OtihxuygNJOBBXrfllIsbxVeCYzt8Y8hJwkD0cqepXNmGVtAsraoDltN8IowfCGKbaztOqQCCiuHkY7ljVTLM/7SmGveNJiXFzRdVaqGjC5Wk4MG6JRh9mSC1BsI+eEytsM/SIb2DlulrbzXN7OlNy7xbBIItJPquOj0PGECxoe9WfQblNnUbBTxMK+hQ7WDJIERe5hRQMRf6JdRRX0QRri4AJlk/pJqOY8lzesbZBeledxaM6xoc+yqzs+NJe6BKAiEnRUy9l2jbkzDYZDGbmk2iuuJ72z7KTcoPOnn/7A3snlnU23GGCvr84QHPxTqimah4KZos4gXtzLc4YKQG2GPr18dces7gZUfEB8UZ7sgBmiVpEg+0GlYgMVRew4NGDDAA2HPwyA5LPy+cBNhyFJAoEjsnNMjZGC4ifP5a2Jp5+kOTag6OWxOEKZ0tnlV7om9ZUdVDqTAxZyA2IdiOMUYu3YIIJGFSKsJW1i5t13tw2uRHZKiZ1Jp8mnk5xJc2oIqrKiwmSFpJ6OdE7iKnt5KWwa2D5llnZyo+uqlbsFo4WtfjE879hChdhYhV1zv+VWRfeVFBIoNGPjBRJhbny23Jpl0g5SeRvQL7PXto2ay7vCAI3aoMrnLKCH7jf8UevrreMWvYhljhsMmsAQR6mYZOUkKR2YLIFjIILDpqXXtpXSXkCl20WorD2M2MwMYq7/ni6VVUUVLtkCrhtgP51rh43Va0aEpaValeyUnGrT4uudM5mF7mETH48h1coDZ8vDOes8j4HwEzPCMXBBPfeMd82IEC4EUNtfB4ZW8pQ6YJL9VtrQC2ygY9w0ehBQ53ETqghNbT1jq3qcHRjC8tthCf2ptIeRE2QBrQDLNVGhYEoCWcyUV/QrAT3LvlucM2Z6qUlnczSOqtureaMcUMhxgk8JpId9bpKEJxdxVT3UbnoZGsOGnmevt88ZC7sH6XlNyv3TG2Bn3NhUGpi4W5hN3AQ1l8nnU0i6N82goyviVHmNvScOPb/wevtc0gLUWp/pvr7fq0baNrrAGsD0WysFoFGOz2awW0IZlvh2U3ZIXtUQRsgpMEup51dKA20TKWMPFkeo3ucA6g8uYj9ZJnT7odqzBjIzhvmxiBPIbN+1I22nzQrrFzdrAwH9Evtea8koYSs5EtD4+9AjVFKxdTpUK1zqGWav1abJvnYsx+hFWgbSY0P5pgWPyv8Be6Nl0jD6/IAGsTO+g1HFCrZt9NhMRy39Jsbt99VX9W5RVEIbGR4FEUFWeSkOlQrMdhz6InuzMGJM7iNA8aOqOYql6pGhjF/VQ+2xy2b6LaHDvGCNsFU9EMwwWxl0zLKhUj3UBvQCu968YMztxwIvX0ooEcB2FJsZHknqGw/MGOYjTkIQGB7JtlJ2jWHvSy0Qbz30Bfbtpglj6aFBqTjiunecHD0uMwOD7CA1lxmiUHXPff3WLqpu4NhEd5hGghLA8nnid+6UpHqozdAXpr7dNJFzAJUXanEB44Qqa3zMhd9fSmC5QA+z12GrSiRWhzJTBZwKZH88agPqdUrPTA40LufhYVR550GscZ8sE8UAtc2MdkBrY6baKMSVTRW8e4H2MzWw2vQ8+7f8lFE64AU0cntKXDW3WK6yTi41i83M4PaLzyYHslM+oFJrWTNUzlDKlKwWiK3y/eyt7JAx9ShVm2ing7ASIZ418rkh7rqmn3PrCI8CJtGR1LpmqEf3jssbEpGdk8/zT4DNUMspFSFdfr73yXc13Lo8ahw6fNuc1cSGAff6O2XUt0Z2ulVSYRfjslNx33is9NpFFYiyw/CC6bb63nooLmdsyqbnX9h2aJDvLD658NqB0fpynnbbBoTO4u24YEog+Rgk38DHpgBHpPDosqVT1VOd26jY5o0JvDrkBV3+21pwIS0WSzYnBvtbj8xzQH93/Ep+Lrv68BSs8Kduh2pMnPTNuoBbucKACok1Q6KM+OwM89xes+aeJifMcdMC/8LFtrjIYlcmV+rv/tgHeBd77/vxyUvbp9OrO90LDaRZ8zw5Uc1iqxQch3UbUHM//GGPenMzi1oYjkNUHZftqHukCCQPmaxtibu0bLUwXHmv/5jYK+V6mMDx2YHCXHWuZzFZS+NtnI6fNIsK+op+tqeCGQcwF/toiYV4k/+rUHNnimV++sOzULO1zoOcLjp/RgFfWNGebZ6Z+d+RkWsnnP9DhO/pDOikfry4p3VxFfIsUUuximmdE3MfkktY/2ph5Vis/UtGHdJstZbjk2mB7fWvYu2qsGGJVKKerIGhJeurfPVy5P+fYZ1ISh9r1JN10FLV1qbC3Nd3HHUtbPYxdOO32/gVfvX29cxKcmm3gcvEPY8col44bi3Pa5mpo3s//eFWb+pd64hiPD9krZfc+Pm4DPvXhl7vmanXinJHhq+q1nVIm9m7bzzy6ZmN32nzr/BAAorDRNPzg8HHDxqwmhGlQwFmkTXMX96/tXs7NwLzAwsoDur4rX9tMzKre2jFMIYpzT3dN1/S9lt7NjYy9K357AMNKP6/koaG3zpCgHYmM7W/3PXUja2BYnOu+kADikO8MPb9DnM5qWUSZS2Xblr96q6ffyBtJ03H/wHu5An4eGwyKAAAAABJRU5ErkJggg=="},92691:function(X){"use strict";X.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABUCAYAAAB9czKDAAAAAXNSR0IArs4c6QAAD9VJREFUeF7tXWtsHFcVPrO7s4/Zlx9rx27IuiUkTeqEqk8VQYQqVYgfBYlSWS0tFQikAEKV2n8gEP7Bjz6iSK1KRalQW0RbCBIqlUBFqOIHCUIlTR8kbY1jx02J7cRO7F17Z707uzvo3MfszO7szJ19WdHuJI7t7J07957vnsc995wzErR46bouLbz7YjIg+aL+YCyglbb8LXbZ4dvDALAFAPjd/mr8CUAoKOuqulGRwaddVtWNfV/4zkYrA5aavfmTfx6N+IZ2p6PD10YBJAk0DfAP4Bd+6+Ald7Bv566rT5Zl/FkG0AuV7KWza2N/mjkvTU9XvA6tKQBmTj6X2jF+S1qTSpKmZgA0FTRQAUGwUL/DQDSerIlQbETtBU0GAoCsgCwrAHISCvk1bfT9K2ekqamyFxA8A3Dm77+Ije69ea+Wz0qaugqahl8q+aIA4OWB8tiUU6fmNisZvUxLrG1zoNC7zADISgrwq5RfV1MH7/lQ7Om0lWcAzp/944EASCE1swSaugQq4YAMaLWrn4+CExXHLYhLc4QhZGm43h37tFsEjcYry2y9IAcgJyRBVpIgJ8dBSY5DZmlufuLQD9ZEQfAEwEfHH48nxib3qpnzgF8GAETu14gfpxHUThjZmdxfT6bmwaADMNOxcV/s+USuuy8U0orpAOQEzgFyKg1ywL85cuM3ZzoCwNzJ59KBYGgkk5ljAKxS+W+IHjZpQlDRIYhIcufV7eVJrpxg6cydbZEfCAegGEqmIRDfWdl52/3viI7JEwfMv/fr6yv5tRgCoGWWQNVQ/FBK+wO+YiAQUIuaLIVCIdHnAxQAgDfHn/HC3/nPNj156L2mQ96xtx64WYrGKxQK4K8UQmVJD/O5oyKmAIyDktoH48PZ09Kehx1mUJ2UJwBmT/3yhlLuUoQDQBQvV0igrB164M/z4pS/elueevW+awKFrXHO/UQMoS4gAOyGnCzN7rnj4azIDD0B8MG/nzpQ2lgKqcgBxAKiqx9ZMCLH1m/92u/nRB56tbeZOfa9nRUtO6apKH4zKIQAFOQCCkBC8s8N3vnIusg8vQFw4skDpcJyiChhFeW/Rswxwn6RkcwtX372rMhDr/Y2Z197dJem50e1DNIAxTBZhSAnU6Ak0wCKPD9x6EdClpAnAGbfOjqZXVsIawiAhg9HY0ABRRkHX3Q0e9OXnpy92okrMv65v/0srRc2R1AP0o0oIQRZiMgBoMnzE3d3BIDHJvNri2GDA4j8TxL7NxIfy97wxZ/3BACL/3gsrWZyI7gQURR3HYBM5jyAmiG+HwpAGpTkjo39h6b/K7KCrvY2828emfCXMil11Q6ANICmdJ4DCOshAMQGToMS3rGx/64+AF0TQQgAcoDCAeghDlh888iE1pADuqQDKAeg8kclnAa55zhATamr1Bzvug6gfqDeBYByQD0ACprj3bKCDADQDE32FgdsHwDHH5vM56gZ2gcAOYB6hC0b0j4HdN7IrXIAmuNLxCVDPQLjgC7pzm3E+hxA0OUAaIwD+gB0ftFbnmAFgB7JGi7pPgd0Hg17DkBvaLLDVlBfBNmIoBoOQG8odMoZ1wegHoDMEjtEpu7oDivho5P53EKNGUq9ob20E7aIIDwTwJgoYAB0lgP6ANRbQTQwgRzIsIP5DoqgPgAGAHk1Rc4DajgAvQJa53RAH4A6DthOEUQDlHpUB2wnB5CYIHTDmo4ke04JbycA6IQi0QAMAIyH6W0AaFglj4rorA5YXwijB5AcRPQBoEqYW0EsLGUbAMDzgLGN/Xf9uCcO5RfffGYC8ldSxC1PlHA3OSC3ENZW0QVr5oBeA+DIBOTVKgA8LqgbHFDCnXAdAKgDdvUQB9gDoKArotP7gNI6uiKsHEDC8XpKBG0rABeoL4iHJpKwlHGQ470TF4S+IC6CIEODlI0Y2VSHd8IWDsCQSBYVHI6NqaFwdFkNxn1xiAMkyF9yZR0CtfWYphsefGrZGlc8Fql+xv43w9okYgr7rBqEzH9KlqN19/FO14DGzA6U6ttcYY0GSgXL/anBuL6Cn11agUpR1SV/YEd548qgcTbeLQA+Pn50Ul2v4QDmhCIeURKiOE6cUiQ5iKf8NDgjaZzR5XSo0mrSUpMHNpiGi7lwuOJRBPOwRAxQ6xYAs8ePTpY4AGwfwBPVSEwMIX6SxIvyHCo3UtpnhjVJpLrbvIPV6A6SC4HpWEhwND0xP4J8qTSzjYfpd1IEWTiAAMDsX5IvmwQgxGe5s2xQjqRkeWSEUURyylw4SqgPNqCmuI9wgUoDk9ETQBI0WJLK9gFAKM0SljFXBBOX6f81uuw/MZOkEV+YcnTtOie0sEGyJomQ3spG4QK+dVQsG5RxQ7U6AM2TIOcBXecAg1Y4VJZD6wIAmT/NaaCX7eo3wYTqBGSoyHK5DJCNyrES3lbQykaCSUj268Vy0Sdr/phWyYdoyQQRtrJfJgxq0wB5Ki0dMO262v/2AGDkBrusdiMP2Jkz7EhBICVlAWSIKvLZ3VN/qLGVrHdh8ZAPXvrGDT4tH+bJ48Yi56DzRdM8PtWH8j67zwG0RgTXA25q07s65IKC12RIwrAyMDM69eym27NmXvnWvkouF63mMJtWahtHTObEwewmACRHjIdlu1HDURu43UzSoNl5axJ8keFSJJZYiUnh3EZY9/n8IUlSg5LPvyXl8kUpoBf9uq+UrGxkY8Rby0zEWhnnvBhqlUJ9awtHcabmJQu6pwM4BzQmYrOrvtqjFQB66E0LY9AqJVTv8DIJxERE0xBtdQ6ASReIj8dZpDLfm3Xi3eeADgNAWJsrdWrmGiUBFNxncAC4LkQbHSu2sM0SL6PD9JQY8WutgupdtnqEQ0DWAStXQDgAOpMjxvcBZCeIZWpU+wIdlGytb7EMS4RkoiPBORBK/U6bb5QMO71av4isWDdpJ/C5E1+Q8RlmaIcAOHviqQOwuUoStXmSnpipV5WrvNiLwHyNJoYlxPUBFz2WBcsULatbZJTPqdsb2C+O1gCiC4TGhqbRPzY/IFiyxlOi9rm3nhgrr2XkcvFyRa8UdRVZvoUL17H4RVvjv3l/0H7ceYBIMKBjpJplZGSceCf/Lv7U2paNxiwFgpIUS0iR2A5JzUiru6YezYs8xRMAIh3223ijQB8Ab/Rqe+s+AG0nqbcO+wB4o1fbW/cBaDtJvXXoGYBzb70wlhz+9EgwFPZpuRzocqXh8Z+3odi0LuL/BV27cW/h2kXrDYJBgGIRSsXs5sBn7xauHOYJgMVTL08kd92cMmrkGO5YJ7eih01ZO72UgiT1MDrnHk2FXDfOv31x+I4H/ycyBGEAZv/128TI+Gf2UOKjz4VWS+Eu99Y2MiJDdZm/py48kJ2vrUZnF+SsAq+q01ALRPQLp5dPT05NER52uoQAQB/72swbB8v6lsyrRJEjObL9N69+syfRwyRtRtgWQM3eEGOYdFzN7MidCEkr6VJ/FSRToFW0zZHbplzrhwoBsHjypbQcHR6hsZAsMBfPQ0m9aPthuRPQvKTcW/OniLc0jcvl4KVV3xUZExdB3GOLEXLqeVeXhCsAs395OjRw7bWTWvaiVAUAD6X5YYzpeLEtMtzKOe0guHMf7k8Q42VWypgDkEpDQBnUojd/9T+SJDU0VFwBWHz/lX0AehTjYHg0sCF+LIu/3vtJptaGYz8ricTIYceXRj9ucr3u5uozHZ/OvbYsRhQdc6Gythr5/AMfNxJfjgAsnnwuJUd3TpDCRKReNK8SaFr9doPloRptdUu7qTOmCBs0sxDfrKpEunWsQV3DQdwrynKG5cSn9MzS0kfXfOWwreeyIQC6fsy/8kH0YGlrxc8BoCdO/EzcLvyDzoYopDaII3fh4K4ZCK1rIzCaAMAKr5P+wqopeDZAK+liAadyKLQ1fPu9Z+ywbgjApXde3iP55QQSv1702MkVk3XRBrHjvJ7NhG988GMhfgtj8iwCjVLGKYBUGpRUGvTs+oXYnd9ergXBFoC1d14YKIVHdhOxQ8QPFT28VnSdYGc0QGuCxEkSm7h5+S++8jlMDfQP10HmBSsocszN6O1edA97w4bBBWnQ46OVuVPLp289fNiyFOoAQJv/0unXD5aLazKpCMWKk5LzVv6OmJpJbB/h66lZt+qbXAj1atdd3FlAM5mlkKKFnHyafyNx6D5LGlcdAMTmDyZGSIFuYvlgSa4Gb8ggstW0Xltkc7FTZPeVaFhfTRK/ntTeeNK4n59jE12QpmGLamZ+4NADRl1pCwCzs0+HBjRm8xuih5ZjMcSOWdywNya1Y1cpNkUX4ruGO4rJn/qxiI2utndzTBMgCOP1ewMLAItv/24/QFnR8A0ZmAdGwq+pz8cq92ksjmHtiM3LwboW6cCZCHU2vllsi3RfF0DmZOm4d1jVG3gcjRYRC99PpaGoly8Pfu7+BezFAGD5xG9G/UNDu8w2P40ss5qvjmvQ1vfS2J5xFybuE3W1llh8UdVr6Px6lebWenWctgobxTRXyFjic2yXrsClGenGh3IEgDPHpoMjk7dPljYu+KjJycJOzFEPpGfBVWhHN04IYpkwWdHgxT31FogYEPatqmOuG715RyygvzyDY4TEMDeFiQsqodBW/PZ7zxAAVt47dj1IEKuufpb9zXZTEoAq++IZLSKVo2SW9N/tujr+9JxpZvgw8++Ck5aKJUnSKwmtXIqbE1kgieIoTfRBOZv/mALw4V9voXKfeztR7qPokUGqyOsHD7/WE68mEaStp2bLz3/3uoqqDhnyw7Q3qMQTBQLApXdfvSl/ZYGJH/ZaDnKHAnJo4PL++18kCqN/eafA8vM/vM6vbQ1ZXnjEnHX+wR0UgMUTz0xom+baB3T187yvYDixEvAN0LeGJpP0m/ex9MYdzFUmqVtSRS4kSmpmGI0ZHipv+IlSadgqRj8hAODu99wbP91b2Lgc47WQCQPwiF8eEs6jkquHcFclUd1NCbEtoe3k2SkhcdlnaLg8JnPTN46wjauSgkB8cHXw6z+hOoCCMO079/ransLmSoy6HXjjJGAKKs2ArKaferYI2gaV1UnQtm4FrCCRZ1FXCE1pJUQneQr4MzPnMbE9FL0y8NCRc9ifZSNGXs782vcnttTscNVu5q9s5d9rSe9g5omM2K2Ni6nY3oXQuDezV8P1mSSdlYOAx7aM+LIMvkj84vCDTxgRE7be0E+OPTK0CbmdoBWMkBsS/075wrodMCW+1R40Ge0tuQJ2uzXXKbUW3+9xdbe+pPhLratBCz5/IC/FlAtDU49bkgwbngdMT0/77tlzMRkJa1FtS7e8ppy+WzFM/haKNFWUv2+x4A9I+HORpZCStzaG+e8h9trI6gskeTs3RuCfN/c2SNHeWTvHt0BW30PpNpZg0F/WpNKWpqqZaw7/yvZE7P8Vipiu8V4ihQAAAABJRU5ErkJggg=="},46016:function(X){"use strict";X.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAAAXNSR0IArs4c6QAAIABJREFUeF7tfXuwJFd53+/0Y3p65r53V8vu6slDKAghg4SE3kgCSwjjOCSlKuwKxIaUE7tC4nJRJtiFbxWOE5yKqxLsuMDBGMlAkHAcwBAS7AjbvFYsK7FiV4+VWImVFkm7e++dVz/Oo7/U1z09t6enZ6Z3JcgfydRu3ZmefpzzO7/v933nO48R+P+vWggcJfLC57FvEGCXA/i2Az828C2AKEHfBn545UV4TAhBfENR664/gZOOETV3DbASGCwqwqLvoZ0YNKSBIxzYQsKBDUoIyrKhJEHZAbSyEDVdbIaEzQtX0Mkr9mIU+b5j1GxbeJlN2J0YrCY2ElJIDIAk/Ze9yMCCA+EQQtPA/TdcIDb/rwFLRN5WhJfoBLsswk4Q2lqDwIXnsnLpkX4mrYfvAZicDAaCT3FESg4hDIQGSNjoJ4QNO8EzF52D588G6MPHaS3SuNh2sCfWIKWRCAuGy8fvidIGToHlolkCFv/3GnBAiJ5/Bf73TxRYIrIj4Fylcb6KcA5x4RhIg0TzewM2I1I2EhMBNkAMFtnpcQzBTi3NmAxQB4BkYAUsh48LWImBxYALCzqx8SxCnHjlefjRPJAfPE77jMErAaxECobBlBpGJUiMgpGERCRIlAJx40sbZBkI14GADdu14DRtuK0mvv8TAfZ5ooWGwiVWgr1Gwo6BxLZTBjA7UyZYNkykQQ6lhU6iFNEMUMXMzVg7ehkNoQWEw2gCgsEUTspcSySwLAcWg50I2CnoCZS28ITcgyeuFEIV73XgBO1EgsuExopUMIpgtIBOFEygkOgYxthIkgSJVClb0/9FKbA9WC0bTtNFo+3h9I8VWCJa6ir8vSTGPrApZSCmYNoEE+oM4CEDUhNjs2dmjABlc1egIhKRznwDA5qaI7NTQzTclMmWcCFS8zQZsA0LduLAshM4FrPOwpOnNY76Gg3LxattYHcOaGygKYGOE5hIwuRgMlOZoTmYatjQsQRZAsITEG4TdqsBz3cR/liAZf0MFF4jNc4zGsayoTXBEJsVYIhSMBPbQRKwWRESBi9MRTUrvGRGDNGUw2P8mQ+JTFdHJGZQNSBcF/xGRALCNrBcF4IS2JYLyxOwVZKBLACL9ZmZnfqeBCZMYLSEJgM9ICSxRGIlSLS1raWCWSvRtRrouAmCTY0FinEus5fBbdgpsI2VNuIXFVgiEp0YL1UGl7KFEqAVGzEDSjDMCtvJGMqsTEHM3qeaVQa0yFJV+DB6OwQ6Za+A0Gob9MSC5TpAEsOymb0WLKsBhslpZBLBoHIhWDMTEtB9CcOAMjuTITtTYgr0mg6ef8cV2BBCjKKBj/4t7bEMLuglGfhNC5bfgrvURvSiAXuCqOVHuBoJlhlQTdCkoROCDhUMV4CZmrKPgcwdQEGrcvCmATqUh4y2mfaOXmXgmUF8QqrDFizHBVLGssMj2Hl0kUYgFpJBkAGaWgq/mBkSGzvbeOZtV4pgXOGzT587RJec3MIOI6ClBDUaqdW4q8DGiwJsENA+beG1UsLmOJMIipmaAEbKzPRTL5qBm4I6BkoBpSo2ngmgIw0sPIBBZmfHrOb3+d/UQtgZ2SD+OwLPwcYS8Myd1wpWp6mvP/8OXddNYIUB1IBALgDfhbu0gKdfELBs+psSlwngpcxOxYBqaGJQKW3F2YBWmTczccxnD5lZg6U5jWc1GgObsrnwnNzDG3ZCDYgG4cl3XieenwXqVw/QctfC63shZF9BhTESvpaBXW7i0FkDy6B2Fa5OFHZHGZiK2cqAxir9zGY1Yug80y1WdMS6wpsz0du6DC8/hyWj5cD2mnB8G0//g9eKJ6eB+z8fp1d3etjTDRBHYRrKJZTAai9B/NPX41tnBex9RM4VEa6RCmsJQeagyiFLWU8LzmmmFk5l2RCduZJRxfBpllBu3ZJO58A6LlyOR1sOnr/jMny/3LFYJ7Ku+j7e1FEw3QHiWEPHBGoQ7MU2tn7pDeLIGQPLoL62jxsVYYEsSKmhpMyYmrBzOhMdnWH2JTUYk4cz1eGZ1lCgJLFXt2E1Xbg+B/pNNDwHp2+9GAeK4H7pIF1gHLyqFyDaCCCjYeTXdOD4Dh5+z7XizJwXm38vwvWxwiqDGkZQJoE0zNQM0GQYvoxZ0LxQqa7pvhiAVpA2syiV9vlFw4HdsmEza9tNuJ4Lr+ni+JsuEYf4NMbgS9/DG0MNdzNAPJCQLAN8bctD8s+uwXe4EWozNtXUEFdJjd2JhZhBTRKoFNRkGE6Vvf2c2LMuoMXzpknDGGCF+HZCrwtNXnaS6VfMWA+WTXCWm3AcN2Vtw7Pw6O2Xisf/1yO0N5K4vBtBdmLE7F/SDgLBbrVw4p9fk+lybWA3+nSZSXCRIkipIBnUKElDqyRRhfgv160z8OJ1HFve6xoDas4zpoFaBWjeYMw824JgcInBdeB4rLmcuTI4pAUuijT8QQgVKigpYBIB0UxgbZ7GgfU7hawN7GBAe3oGV5GGlGz6CWTMmsp96cxRbfehK5xObVAKCL8YZl/W6SqtnSYNbgLLZ+YCTtuB02jC4U4D96Olhu5oaGlgDMevMaxGC6f+5U3iaN6Ycxl74gS1nGW80cSAsRAHMjV/xaDGQ0dVLvDM0KiKZVMALVa6CPSE2XNkXhX7Fs2+gr4TDrKEsmtn4AqC7TRg2RYsNvuYe2gGJg5AnF3zBRz7Ihx47ytEXBvYjZBuiCWWJCGWCkpLqDhJdSWNUXPhn2XOdbX0x8HS1OxLwFcyuVSB/BwGl8MwDv6TLAcMxfnjYXaLv1tZxMavXC8eLbTjbI3dDOnCQOEyoxAzW+MgTadpk4VVo+zTNIa+mIDWarhizSpCuWlmP4/tNneJLQh7mK5k82ddZbAXbVi2xMH33rHN1pkae/gwNdbOxa2cb45DSC0QG5mFVZwBmrCskieeyuQqsy+BMNPsy+CVPtfV0XKjTwW98AU7tfyja8FqO7DdFp59303iWLkYUzX2mU16LWnsjQWiiGO1JJUAkwxBrdPFnMWyMwW+CrB5GlkFVhWgdUAtnsMAew7sBVeZi7bcB+68Mx1+G3tVAstDKeEmbuawClYKrIolDCeEixFAbW8/rYtZPl7h2MrPmArWHOdVF9D55ynOnAuvCXvVAf3aLVmHoBawT27R6yDxkjhBrGPEQ7YmHAWMJKBG8F9mWRVLp5r98EGVma5CLYr3nJCnGefVcWDTmMwObdFR9oLnNnwnPParN7WOzwWWw6ukiZs5+A0lYm0goyRja3pxWUurWFbQzLEK1NThOmZfRyPr6m25cfN7s8mbZDSgOYzpXLiJshZ92E1PNHZ4oPdc53y9zNoJKXh6ky6PFPZqBlUg7kloBpVkjeT0DCc0pskFKkzoZAWVzuacOo1TbnS+JmH9tEGxwWOWjYuRwOLMlUkUpXEbD//Yymo1XWvR042dbXhtzzn6C68TTxVZOwYs5wOePInbeCS1ZxArk/ayTBQP2VqMw6v642X2lj6XzXYsbq0b5NfR0jrnVOmGDYvNfMnBsffdJp5f/zKda2zsiwNFyrgJg8u3Tru8Duy1lnAWPXhtH9EvXeV+cyqwx0/RPqlweWQQSQ6vBtA9Zuv2+H6t8aZKyTgDllZ6+5LgTdXIOedNM3sGlP8v+Nj6jVuyYJ/zrt5X1BVBAqsbuQnHrxlzgaYLu+kIe7WNxkoTzRU4f1scyhlj7A9O0VWxxGpoEIVRxladpEPWLwzQCm0+I/2ry8Ap0ccEOUuWlIdPyz70+TfjwTt52sfw9R/+hs4bDHB+SEr3wtTXpKxt2LBaTVgrlnBX2vCabfPUe65oPp5fNwKWE9jnP4uf7hvEWqYJbMnj64aHdqc4rDFyTEvVzZCMounU8dKV5/DBgoycKZMZVA72PUfbCTmH1+8Q3WK5PnqA3F4PV3f62mxpMjzizN/zdY0E1oIn3KUW3F0LjnrPNeIbE8A+eZL2DDR+SsWIujrtEGieWjMWt9Z1TjVDsZLVjuozK603xr45TK5yTmXg2fyb7OGBE+9/s/hhEdT8/Ue+SZds9vWO0wHpiFlrg7iMzNrFFuwlT6ROTCjnW796s+jzdSPGPvEsXRZIcHowlhGkNtDRcCJC2WzHnE6hJNMko46HHoFcx+zrnFOy//FLhjRnc/Zgtdvo/8Z1ODJt0twf7KeLN3p6d7dPkuUgGoZgzFoOu1Y84bY8eEu+88REovvICboxSuCqAeRAQIZx5rQqh1WqmDtF3+YF+HW1tgr4s5aP3LOTshcWXaUsHFq/mWcpTb7uPkB7eqG+9NQA8ZYk1QtgpMk6SgyssGEtN4TDTuycVef0L18pHhoxloich57Gm8MY8UCnYZZmp8WzO6qEv1ihOsBP3GN4oI7J12VyOZSbKjNDQFhXFywlfMf9/vtuE4MqUD/+CC1aA31dL4DeGiA+HZEMojQXm+QYsBysNISz2ERjxYP69VuzsCuVAp5oqwivDw3iIIIMYmhtMpF+Mcy+qpK1gXjBZp9Blt0m6+dzz4klAL77+PrN4lQVqOv3kXPpMm7ajE2jE1DcjRFvBJROl8qlIGWtgfBbsHc0RWNt0XEH9+Fr6+siSYE9coIuCDReyRebADHPvONoYF6YVRlv1gGizjkVrVH5vNJ5U88Zao5ru1ajqSzPcp9bf8v0CRn3HFTXBEqs9RVJHuLu9iE3NaUykHZzh9EOy4Hvwt7ZEs6Kj+aq7xz8lRuGU+UPPkWvijlFGCGOAdmL07Gs0cVjplyKAUffzfPQVYI4OaIyGoousmg2WEVGjnNPpXfjbmh2B9ZDjj09z+399q14eJqzuufb8asiy37ZICK5lTIVqqMytqZxbKlADOxSU7hrbTTW2s4T/+oG8cOUsYeeoisijZWORjyIoHSUjmdNDBDO09tZujYvSz8k1BgydZzTVJkptTjnALgbutR25SWbOFSVQ+VL/vwI7QkG5vUDlUYAcktCbsWkBqyt0WhC9Fg5XRc26+xyG+45i+b4r93Q/EEK7LeO09VygHasU43VoRkydlqWanjbeR6/jo5WnTMTrCnRR3bNkKGFVuIjaSfAhrXaBCVN96H1m0VUpav3HKYFE5qb+hq0EVDcZ1AlKXZYDGye6SoTzHMyB7bURGN11fnRB24Qj6XA3v8MXRv04HVCyFhDKTO9G1sn8Vw1gDcVrHkSUqEJU5lcApRlwLZUCuqyD8Bzj6wPA/gysPcQ2eY7+o1dEs1AUtwJILcGUBthQVcLFxXLwMD6Puwdjmgse8npD97uHU6B/cZjdGNgYA0iyAFPx+SIoNwVreia1mHWbBC2S3o2jmmMpSPzcQsRQMZUlxdeWOFj67cvb1QxlY996kG6Ko7NOf2hrvZ60Kfktq5OlTmVWcRyC/ZOXzRWm9T94O2N72WMPUY3dSKIrQhShhmw02LVCZ3NZaHiyXU08myBH4GaWn/moIr34srySOqCD7tF7pPrbxXPTgP17u9Er9TkXBxpkhtd1lRIdlaprupqXS36hCKwOxedwW/eKg6mwP7NY3TjIILoh5CsrzwZoXhhhTWOlXGe1o4wr2v2tXU0K8a2tm5fOIoAYJ79N2/1x5LQxcJ/+iHaLSNzdaRInuxB9mPIriLdDdM1XvnqnTHTKpOBLIilFuw1T7gvWaTBB9/ceCAD9nG6dhDAZWBZCnS2SGziVcmuOmDNOefMgC+GUGz2k6XKQXXs5PS/u307lVeu0KcO0WpicO1gYKgjKd7ieDWA7qlMV4sdgZGlVtTFGcayuxeEe47vdNffIrIZ3X99mK7iBbcMbJczWnp7xKBSR3PnO4NZVYyvY/ZV52wDv/1gVZ7eMoyJ0zwpZ6xsd+NDP4PHp8Wqf/ZtWhKeub4fQHQlxd0QaqMPyaAO8k5AoSVmES0HdseCcHe3ks0P5c7rr4/S6wY9LHYiKJ6dnAP749TI0b3nNc7Q2KHypOskS/NbMKguwVp0k60P/aw3WoldZuoXD1BrS+DGQBu7F5LkCKAzgOKeVTDsBExjaBXRRsA2hXvOonPyd94iHk0Z+9WH6bIowo6tLNzSgxJj6+ptHbDqnLNd+DwUqTb5YsPnoHpN6n74rY1HpjH1E/dR013UNw6McAd9Upsx4l4I3SHSHK/Gua7WkMKcxQwsa+yOpnD3rpkT628adhD+7mG6eCPGPl6o0C8wtq72na3ZV8pMmV4lb191DWfyhQNrqeX2fvct07uqPBrQTlKm+v2QZFdCDiTUKVUAtU5YWTqHgW21tL3Ldxurrfjov3/rwrMpY79yhPYMJC7hLhzPJ9AmnZ81MbujjjTMBKuW2W9392Zq8vBBzNQcVO9+PMKZpUm3C3AHIH4QN4ShWQgiUhsy9SdpWDWLqeUyVGmt5ShrueXau3zR2LPmHOROSAosa452cc1AIhpEmRQkJWDPJiKoYvxsB5Z/O11HR6Cl4/uwGkOmem/BI+uF5ZhFcHlY/zPfxXWBMqvM1BzUvibT68JoGxTF40SqQ6I8IvEc11pb0M7OpmjsPtT8u1HaMAX3IXrjRgwe01GDsJArqGj+OqFYWUtnevtCC0wwpPj84Zf8h5nKoLYt6rYONR6dxlQG9VP71dURWbvyFCCbf87U/owcwMiBlcxwvIwK7YZrr3rC2eEr84f/qLWfTx+NeX3+IbqyG8CPePmigWE5mFrJGSY9dk0BiAnpHC2Izbz9XLMfVm4MVNfd+vDPbu/DUiUBd+2XV6rE2ttTFG+FUL2h+Xf6maMqJlYq61s6uP0xe8f6apGwdvpwz9lhn/6Dt3mPjAH7pQfp4k6APaHkhG7arR2fAzv1AVl16gOan51N16nqNY2xfRhlFUOq1Pz9ZPN37/COzto149Pfpdf0pbkw1CQ3A8iBgtqMSc0DtXoW+LZMZbXN5MoxEO2GsHe14exc9B//j39fPDcG7F88QCuRxk/1AkiODOJhyHU2Zl/lwMaODW860+wLDM2ZmE+SsJru6d+/DU/MAvVP748vVYn98mDIVE4BnuZeVUgmZ2o9v5GBuE2fgv4roMly5AtrzReN2G7uv7dq1cxnv0PX9TTQD6H7JQdWR8xnRwR5AXOzH5+sNcv7cpKDp6s3mrBalJz6vZ/zfjAL1LsPyssjaV0YaciNXjoKIDtyNqjp8yutcrvc6Smlc2wH1toC66sjP3ln47s5CcamGH3xAF3yrMGudJl4BJPLwUz9m6u3bO/bLX6mLC2C2m64z/zeHeLpKi3lY+yo7n5AXRFLax+D2pUkN3ps/lA5U+v1/8ssZcy3h3jyNmB99Rxh7fLh7myJ4x+70x9N+BgD9i8P0epGH6/psh5pGGbtpNMZb9kq0LMHDws3FKwq91TW5fK98nH7lg8s2O6xf3uHODkL1LsewBukNOcwqCd7lAb/DGoQUdJV6Ty0sdi8zNKxEYhRVregAqW3DOxKW6Q9Lu00789lYExj8xb/zP14QyeGtRlmOQOeYTeuj9tVm+vJp4A65pwmy50e4TEq1lTfQ9JuuUc//GbRmQZqGvwf1NeGUqymieoIahaos5cobTspVeFginVmfV1aEM6uRbt399u97xfLNzHx+E/up/MiiQu5B5bLQRmI6YBus3T7nG0trRs55KAuLrl6ReGR9bdVbx3CFbnnMDXCUF8XK7GYg5qGVBK6E1HCI6tFplY746KOuigDWlVfzsFyNLDmwVlZ8h+56+3i9Exg19fJOvc2XDMIQJsKWsU1Yr0xVc+95pkDyhXIx+kXPETKdh/5SGn9VLHwnFBpLOvrewPhc/CfM5VBTceqNJIc1PpmP6mlxWfmIDeJ59IK65wWqc/+4/bBsjVVrpq5az9dtCGxLxg6sXxOaLXeqtHQSB7bVRUkPTYs1TQHlvamiHcCcrdOxHj83oplPvm9eUS139fXSSkaOai8IntLw3QLoFbLzrinH5V7hiMuyiHHrk1HWGsLcNZW/MfvfvvkNieVwN53HzkPC1wzCKFPM2sLnYWJqKSOc5oCaH6v1PNzoN3kPQLdZz7yD6d7fr7mowdouUm4NlDG7gxIcTJli7upkvQgzsapmKmTLM2bZRvYOktCy43D2sps3bng6Ht+3j1YeznSpw/QzkGIV58OIHlxR5RGB+wzt5PNeUD3wkKx7Qm87KRMHDzxR7+wsjnNSfHxT+6nHQbmmtgA00ANSwmVsSil0GuaN4mkyidwJJCzdYetH73rXUtj2pqXfYKxHAve8yCu3RqgkWbWYyjeNDHKV40M9TR7aLFHcqbd2iGoPJTiuPGOVTw6bSJFXtiPf532km2ukAmSTkQqHfuXUOlwypCpZVC3wanv7adFQXyc2er5wtrn293PvtN7eBoJJoD9wmE6vx/hVZ0AERd8QyodaXe4xuvMkiWVmjx0UGz6nPZbqqGn3Nif/IZ8lXLsl4cSelOSDEMoBnWLzT9Cwmm/Me8/mhVTALRitslUiyvIV04fZitHAqttiAt3+w/McqwTy5E+/xBu3QpgbfBoQpoJglaRGg4DF6SgnJGao6M5yAwod035Tlbb/eF/njHeP9RT1yNcpYzZGcRQmyoL/Dd60IOE9FYvi1q2vX+un9vNOqJDHedUhfTwVgsNYS+3YS86+OG972o9M0uyxoD90hG6YBDg1d0E0amBjgeBo4JIJbzGqczVOjFpuYw5S5d9N45dHP3YjPiUC80jqdrRb5CRaHY1FHdRexF4zF9vJRlTTYGpk2Y/2befcL6lOcBVVsYkqCsBExrL5va5Q7ilF2lnIJ240+FurTIBb3oAGL65Jlij0KtO6w+fknt9Nv2FZnJqx895x6Zl+/OC/fG36VyLzOt4T9meIh5G0cxUHvfnGJUzVKOBv+JkuJFHmh/oV4di254jL0suAcsLpAdPtr73tfXqafXFRhkx9s++F5xrK//yQYJoo6tlRzoqiDMJ0Ik+YVt+30BdzMAamW4NOrY/YTGQGT1gWHIek+JllL7nHvvDUg+lzBBu4Lv2y8uUsF8aaKhekIZQsqehTwXQ3O+vBnW6c5oWN6fPnmH6/JU/jAIWFxzRpM6RL7x7V2+WBEww9r89SNf3Y90+HaTDwSok0hzj+Z6b2E08wIsfPvBXtFtLdRHvhRLobC5+8SFleeDP6XooG1Z72T36Rz8jZoZS64epcUGkr9ZKrHVjqL4ilTupzZAMmz6DOopRx5jKZj+JUiWoM8As1icPrdo+rNVl/7F77xRTJ9WVwU4Ze9f3qN1U5o1bimJeHTKQxPsTkMUbKCI5+Tt3NJ/IL/zNL9EFcaz3hknWDx9Lw1XIQzou1YTVEMLZueacXjsXx4qb0uT3/cQDtAKFN4TSNJipuZ5udKH7uZ4moHC45LK4aq7cETgTHS26uuJ7BpX/L7d5dMA/9pmfz0YG6r5SYD/3IF3akzivG+h0XmiXeM9xwCNh77ac75b3O/mtL0avUMbexTNH8unjuVmVycB7ZfP09GVXOEseGqtt3onNec5J8OS7rxepWf2Xb9AFwsLlIZmkH6U9Kd3hnlQ3m0eVZ/zDsbRfBsO8hEmVk50HDidYWAK4d7W45B//wjvEiXnXVDL2Mwfp1n6grdMxGFilLErcWFjLK073/beIw1U3/e2v0vm9gT63H2bglhPIeYVYClou7GVLOIuLcBYaaCy4wvVtOLZjb8RKhRDWPt4WJTf9Uxz0RzCZnqqkr91kWwzHh0YqtX14sMzkyUAsH73armFu/k0PYsU3x/7inYsztzudBrj4+Ndp0fXMDZshxZ0IEY+185wCX/DUb+coLy+fdvEHPk+7exoXdSKV6u34pgnZVekCYILV8GAt8XRyF47nw/Et3uxOpNs5x4p49w6dh1J97klFSPqF7FRxAK92V3SOlpaBzkFdajlYWnI5CVRbUycY+18fopd1A/3yToB4qwMZs8PnuUi8K9r97v3TxuvzG/36F2lnINXLeT7pYDjvafSQwpIdnk7e5p3XhLAXmrB93jN7uEFuyF3mGAmzNCQyW5EaBv3uMOOfITRvHm5V+JTr7fhw4CRVGFTbEdaOBdJLCy12VOma2LN9iT/9Ll0RhXotdVoDqIBlIBHW2pLT+cCbxJFpN07X8n8N58dS793oAjytPC5NfywCwcxl7eIIoZnuKix4Q/J0w3IepVCCkkiCWE9ZVsZ6UhXMO9sQqlyf3Enx2NWqqzvN1cWjs9KVdYEWn9ivbhjEaJwcIO4p4m1KqCWE015wnvytW8VEt40z9lEXL1NCn9cZACdZlwdQveEUyPJUnbIGckV4xzXHy1KFvFmgSRxix5R1TbONFuowNGdjdvJ2lXMTL5t6+XjO0uUmkee2jn/5F6dPp68LaH6e+MS36c2nBtps9BEHw2igxVq46Bz51zdkcScH7X/yAPZ4hPOFZXZHESgwWUjEE3Z5dQmPgrImTluyUyxYcfpjjsk2oGfvnOpWvshSr2FtNqLjT/2P975itC9h3fvMOk98/Bvqp5/Plt7IPv/ODwB2MqvLzrMLFDu27a00LbMLFmz+6RJtwYQx8cQ53Y94rJ5DI9JsxkVQyabQsYWjNBp8vJx9ygAd51B5JWGJiKN6VMWtVZUsx6gcQuVD1m3fiXzLfeq//6LYejGALN9D/PF+uuVkR5tTARRHBPyjDCwFTRfOkg+3acO2LWEREYUKFAOal9zHhgFGwh48BZVAPKnCst2YBJ7+9DuQJoDvvLe/00oW9mqpmtzpYO3k3K5OcseUm/38XtMI6CmamzuoWTq64CUhifbTX3k3Nuf9qM8LAVz8p2/Kq7b6wt8aAsskshsQS65weFtl3m2SBASvreWENy/8YEA5OaMMpYtAeDUQ/+yJsd0Td78dz5YLzFLyrrt6a+R5e7rStJV2wPFpzvDpyelx3ZzVry+DkAf5ZAleRIw2WZ2m7z3342LoBGM/sp8u2urqCza3stXNXNl0+6MGBPuXdDNaTsRoIElYWyndzSe/UcOFJOU+17PxXB0L1Ju/AAABOklEQVRv+i++fNTbPL13bUDOjlibNkcFzGKTUOrA8vtOG10d0+rhGAabNx/nv1niRKS7FrsNu++76nTwVPtUnYzUC2HoBLAcNvl/pa7aCIWzKUnlXp1bnH9GZFTRgvmxydugvorjH33ynYv8+ysTs7/rFPKKj5J7sTVYi22nHQnRTqCbscw6DXlPTsf8MzRDuSgMBjn8o1LD13DGDDUoiVqu3ZNCdpaWljp1GrpOOc/mnLRwv/9N8jcH8uW9rrXEixyYRflruHty+tG23cCR4aa17G/MS1KfTWFYMu68F030+wtd13KsSNjkCIeMcITk300DqAHjpD/mQEaJRDWarXCXRPiJf4L4bBv4bMo675qxEYT3/+XWahA1d1LLc2VfIkoodnUS+w0/jjex9bFfHv+BsXk3/3/5+/8DKIf6sstcS3AAAAAASUVORK5CYII="},37426:function(X){"use strict";X.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAEKNJREFUeF7tnAuQFdWZx/+nH/c1M84MyAzOIBpjBYRgNujWqMFE86AUNYpbRGMqmlTMEtmEGC2yZrfUcTdhw6KbJyYQNUIFycbEVMgTDBoRMwQzBAyia5AFBKI4w7zuq1/nbJ1+3Nu3b9/b3ffeGZDNqbIGb58+ffp3/v2d7/vO6SaIWD71ezYpl0OLoCJhyIgzBtFsQrMasv+Ut+o64FvH82PFdvg1qh10rqxa/7D/lPbHOV+ErgGaQDHa1YKBxz9CfKtHRFS1Ognb2CeeZglqYLouoCUK4EYMQM1teBRQbaANAiomcWDbx8hQWCa11AsFfNGPmChNwmwiQHZLuC6lcmlV63HQE2HDDNNGlAETxrC37w6SqwVmmHNCAb95C+vWCaZOmNlooHmKKgoiYXD7J8mBMPBqqRMInDFGbtyEd4sxkKrAgyCFsfMRTEAU1ZaBqdJXQsHObMee8bLngcC57VZVzA6cp6oBDzMhBpmQeo/7zOiV7kmn2Ne/mIzUouCgcwKBL3qStcoU53o7J4sYeuyDZH/QBU7m4z2PsFkwkCz00b5JXcTB/sVkYDz6Hgx8K5uCHKZ7L35KAP8umwURSe/srYs42r+Y/PWEAP/4JtaRB870XtzQMPTE1W9xhXPg1KVwO46IE7zedxs5cvIA1wADpxZwt8k8uYDb/rPwN+A1PQCBNnzhJtYhaUWT4ijhVAGueUwKp2gQvL77RJmUvwGvScgVTwqtcK9beEoq3L5JI3aCFc5cJsUZulMOuEtRJxb4E6yDxcrdwvECzhhLAJgKoBmADCDwKaz1odeqtC0DrNZ2AegAMgCOEULG3O0E3sxCP+AaIMiNdQt5zgZAB4BuTQMbHIRycEjRaK6uGy9llohHZ5hXop2TALraidx1eiwmy5A4dABHCCGUNxQNuDufIWPolw0MfBhjnQCmvXJAzaz8njY0eDxdg8KainD482EXQ8sG3mclqqKcKvYj7a7FBexfJLmJ6VqGLPt022kXz42fBuA4IVYGMrAjBYV7E1ANBG6bkVmvHFCzd60YOh5NUu7aJw9wp1eLb5ZbPnBhvB3Aq4SQ4XDAiWXDS5hTDP3yHxoT2jPGztY0tC/pzRytTdm8d42H7UArqDyCwt0yWH1fbGp7e0wnhLx0sgCfc+h1GLff90aNGToXbH6nzUA9ZsT7hNUL/K7PNLfOnYVWALtCAVdthZd0pLEKn/uHl5SxFd8cjpCD9kC2QTfCbjca+I1XSKnrFyROB/DiSQO8b6cyuvJ7w6OV7bcPYA/kYNgV2jA9uMqlXoUv+pCUXHRNYgqAvdGBF7cYNNKGzzWBb9CqAA8/lRbNSSXA1doqh3/igLtnTbGhk2ZdwP3tdRG2bruF83taYgveJzR1dcXiMYD8dRDqM8+PZH/+rJTLZLLmKEgFN7AI/sQA96wp8hWfBnopkYBXnhDLIU9qayI3XSWmLnpXvKm9yYxcy4qmwfjDXiW7/ql05tA+anihTzxwvTw9ezID54q+5MJm+cOXJ5tmdiMly8HxhjMK+w6p+Wf20PTGzUa+ODKW2kXFFQRVsfs88HGPanQbbgN3W5SGA9+rjH51zUhJ3iGc1S5V9Y1XxJLz57U2d7YjFu58/1oZDfq2PyqZB/9bH7PSIlZ2RJQc6NUjzZqBz3+CdcCl8IInIGJoS+MCn7l9ezH61TXHIgJ3wY7x8D2F1XfKU6Z1xuqC7dxjVgP93PKBNwaGkoYDvajyiQTO1zQTJwp4qefhTIhoSsHQcoTqIB9+b3P8ip5E6tzp4JnHyOWNIai/2a5kN242snmVMUnmCTSvWZlo4MDQlo81LLSPoHAf4DZsrnAaAzE0QnSSE5YsnJS8vgfNGQ2sLQWhGnmeoeT//eUo1DsezA2LMmOCCsb/IpOFxP+WmJWJAu6sijQY+NZdytgDj45U8MPL/emisjkFrm5CaCxrwqZyylT6LR8SUtdfGk9e25sfuepSErtqjpCY/TaZp0wL5cgwjCd3qfkntlDlnpuEJsbAvrjWGBE0MFHLMEECE02VTzRwj1sYoxg5LY5D7s63n2PnrvvLteT9qeUdxTz305fhfAu4Hjrw8QdeVLehp8glc4n8lVvibV/bqKR/3geNGiBnT4HwnllxKZlQSf9+pu/eD13QGbtgJhHv+Wi85ck/KdkHN9LMiQO+jnVALHcLS5CG2TvIT6iwRXn7rcDWXcroisdGI06ajrpz5oTpNieGnCJxHWTpIqHp2p5Y8s1h0J0HoW7fqxpHjjOqKMD0DpDzz4qLl8yA3N0B6eXDUJd9Oz+SZoyWA+feScblqYyXSXEBD9r6W+uO1nqBc+xFk9JEqAyi5fMCk5Pk7GlEXH+7mY8OLKt+pYxt2JTNy4kEFbQsEzXG5GSSTqwNt4HXCjPMnvLtt9Wq8JQJkXsnlsJLbbhOFCEmJ8jmf0tMln1jzNIx+NL3laHf76GaoOWYnExQc9IseCnWjFka/NizqGco6wp85q9jHZrLpBTaDto+bJsQp37ZgLl+ePY2oC/QpFhw/YoFHOATpSETQnU+cfJ/pwjTQX7wBbHtbd2lk6W3HU3TsOBu4029mjkpizYnCngQbNdecS4sX9j2AX6MK7wUeGW4XlAObOv3oh3nwPkA6IQI738nif37J8y1xYrlJ33IfPPHuYwg5ZjATQlLUq5ugLuElv02cyolqz4TATwkbI/AS2/UNSD8QBE4D6OjF8ekmCq3/XAO21I5IbKSF5be0JZceBF8R/LP+1X1jjV0RNUYkxio5YNnTXPC2yy4hBOq8CDQQSbEx7Y4TTrAl68dK9NPNPwuO64T0nVWSlxypdD8251MeWo3M3pmE+nG95HkOZ0xkadnXzsO/amdirLu6Zzyzu4E+ex1QurxZ2h6xytprWi/be/E7sjE2HAa4BZ6YEadYC3gGF2+dqAO4ClQPUuQskL8ZTc1N3/gwniTDBD+XuePn0Pm4U2KWrLLRAEEkbGr302kf7pOaEmlZHMu+NM+Nfef6/Xh0WMZcy/JxCuc4syoEAvK9ObRfWx6/cAtS8HNSVwmZMU/Jttm+eRRshrYtt2quuJnLKfqYJ+9Mh5///lITGkrD/uHMtD+5eu5wUNH0yX58QlTeCN8cF+7rgHblwJbdyhjKzeMRbThNmhT2ZYvvvafJ0+a1lk9NfuNjUg/96pi/OgLcb6SXrFkNBhLv5Y99vrBDHUmztIU7ThMmpetYs1Cs7nEX1J83xy1VqlCF6f685/B1OjAS2FzD2Xp9ammq3tQ1Rvh5mXhcmVoZCSPH97Telp3m/3qeoVe7z2k5pat0I5bGUPuimdcOfFxAB6aXh0VGWNzt+xQ0is3GJEUbtlsS9kc+Ia7k5M72v2X0ZzuDWdBr703P8z//9ufTzTPmVb9aeADdM0Xs0eLAZA7vP9/AtwBzW/Xgc1dwM1fTnaGiSgXfHlkeHAkTn/xr4k2P/vt1c5da/Jv7noprbmzhtWW2+qKNOsQbuhToyrcBM6L7ZFQM7pMkmceSPLdt4HlvnXK2PP/C/0X94bLsXzl4fzAs3uo6lZ5lPXNSGuagb1vQIVqwAtwvdexYXNTwhcbeDp22zfMzTaBZf0WNbdzP9Mf+HTc+jJGQLnv0fzgc/1pVaZJWlj9ibC+GRn4NatZalDEFEGAqBowk/KFPrrWtiv1u6yK54cdt2Py1t3K2MpHy224L3BzvrSX1OzFBp6oeu7+Nr6dLLD0vQx132HoH/+gf+TpbcABXlyMSLHSybN6qjYS8PnrWNNoDjMkAaRaAop3slbXsZ+7hbuVsRUPhYw0U06W0EpSOTmT392fOD1EUhB8lefV11TjvXPCLTZ/6bv5wf4XqWoBzzDTRSzxVhoEvLeXCZunYZbB4P/qQMhwPyho6r/TBv5YAHDHj3SZEyv3TQQmgzxye6J1xrTqXoojjOFhGFMCXEJel3s1N9x9fIBJCcMK98cR+HseZl06xRllz2gQ6KDjnsehUcCnnk7Ezy2Ip7omQyTQyvZNSrLMeNfMRKUGuD0aXbPq8zpm9zRgNA9j7a/zmT2vMU0Gs/PjfsD5Gf4q5x5LKJNy5a9YfOg1zGaCz66lal/ziQibV3/BV+HVU7SFRQfX6o654GAkCJVg5sG9zyUx/N8XMuvy10GkOAMUCCIYX+dU9TwTaYLKZo48y+QET9mOE/CLH2LnUuaKMCOC9LXpFdY+OfBtf1TS//F4+MDHDdyy4YpAbdgxiRC+YOw3e3KY/He+pskHhNvKnJEncSSgiXEWVxSoImOCDsbrSibsHJNZggqSlbItt+HVFR64P3zeetauZXFOSYcjAA+y2d7jT90KZEaQX7IqG+kDX+Y6pivvzZXKQZsKNxQTYkHldmYw2KlSIOhxEzbhoM31Te+WCe+kWRk4P2K/XMXTI7vLVHBZL5OyUzGbiOYrb2WuRzVPpSJoVzt+de6/Crh8OugNywePKVoy1NtrBYXrOYJksrC85pgHU+GV9l1VoO6oH8hDYnHKvRILNivsT6m8AlTZU/lOb3tHZ2eMEULK34C45CF2lsFQ9GeDlN2A4zPPAH56C9D3ZzVz7w/C703xha7nCfgnUJKAA7/4pFqkiZQoDqonCydK1ioPB23FG1mYwLmHYh/zX3LzB37zDa2p6y5LTAZwgBAyWKJwnhnMxTDDrewwqo1iryt5PEvnAbfNA55+QUn/16PptCJXV3pxLdPJGjpK5wvKxa8qVY6CXKRtxQvN1jU5bAs0//8sOHhFTbJUYX3TMiGla5zlwD/50damKy4W22VZHiWE7DMH2+kQfxP44ocwk/EQrl7VekYgyKY7fbjzcuDWHmA4A2P/UVU5PBDTRkejvQms2EZb1xQft5B7Ie5SuW2JFj2alpjbu8lDlr3tFNvkk3BnB5Gnd8bj7daWaZ6ZPEgI4a+DF4Ff+gibouaL37YKA6mmOj4nuX+aewbA1d4zvdRPrqxU60ihjRArTJXacnYYFKJV+x9holefNp137Ute9DVVcMFqJgsEswW9mIwPghkUxvuaGc/k6buFwlWHR/DemzWvW83OBX3x0yYT6vu1Pt+57ZyEIzuWIeh9UoMQ4jv5O8DfLhloq3ovDTQzYeaFege0UfdS1g4DPU/Bnv415amloKfQNCnzHmTtGnCO3w0yHbooIc8/URz42WGPOQxlecO0y3sZtW1XZ8P2u6y/BoggIaXR8gCKGhjIryIHwwD21iEXrWLnMYKUF7jIcGzHEhyu9GjUcrG32jnc1L68B7MYgeQ1Y+f9HV7oXxxd5eSCb7GZTHR/GcDCQsbx65RvFfDcc2v5PGZTHq96TGp3J1480EuCA1fPzZILVrNWZuDckt/5OzwEVBBwXNMRudFKb9RVf8Ha07MQlUNUKW20ygneQ4xAEIA2qpQvUhgGhpU15NVahONMmmcwA13exyZo4go6HmbiCvKGwrQRxiPyhRPkCPg0rEvIXXsp/ufxjxCjZuD8xL9fxaYaOrrrukGP21fWoQAfvFA/CEQDjzvXrJYjcuroFLk5DH+p1UMxTbUbCjcvqorpoBX2ati9qlnZQaA8o13tOmGejCDlhznu8KEy3rxrEg739lrfrqq1lIW/vYwJP/kOWomOJqr555TN3xOlySHmqlueNOL5NxSSd4GTgsdHC6zP796nUuB5FSoULs9AJQHZGQqG61G1e3D+Dy50RqLE9NSOAAAAAElFTkSuQmCC"},19150:function(X){"use strict";X.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABGCAYAAAA3mEEuAAAAAXNSR0IArs4c6QAAEaRJREFUeF7dnHuQHMV5wL+v57Fv3UvHoUMCvYUNBpMirsiOsMSpXEiOcABLgAAXkkicwoQ4xFUJdipWGYfghMTP2I4jYqPEIUiAFQEWyIV0Fc4KihzAkiPkQgJ0Euhxx2n3HvuYR3+pnt3Zm92d3Z2ZnQ0i84dutTvzdff36+/7ur/uHoSQL9q7WYZz+7oBzE6QIApIMpiEoRSjA4DikCT+H9ZlyxZ/mcQBmQ6mmQVFTsPa584hIoVVlJuccBQEAESEsH1FHyjKhQCGFHqlnYoKXXhJYD2wJhWAxYbx9l3j7So6FBC0ba0EkZF5wLGjXRWFdoHwY1UavY0bBk+3o40tg7AsYeeKBW2D4EdRQTXkpwxMHsf1T48GLarec62D+PeBPuB8dtgVq5DnR1HNKtKqLI4EBj+MGwbzzYry83tLIGjvchnScDkAhhsT2umG7GDfChAJ03jLnmN+FN3s3tZAPPWJCwD1Oc0KCfR7K4qqV2BYMoWcyxcdxKt/EJZEaBHEwGJAngqk6HYrq1q+rTJhEWGorxAdxo27RsJqe4sgVlwJCHJYlQlFQW6VCUPx1XKZchZv3X0irLYHBmGNlnZc+xuhVMQ5UQtbaWHLsxusYxrvDC9OBAch5g7K6IdDASGEtENh7ZBp11WiDN4xeDSs9r83IISCZKUAnAqA3ASTK8CkOHCThdUwS06YIKpHcu9rEKbI4RgjEIuN4OpdBafSafNmBosOdICSnwXAYy0BCRNA2RWV8ly27PctCBPy0EPHcEXjiVAxZzXQD0AX+oLRDuU7IVRXxqAM3vV+c03IcqB1/xrXbTe9KpfEjL3gc8YeNoxGE8v3HQjhjnqM15pZghsgenJgPpi8qym8sGfiXuYcPkDQtrUqnBuZAUoMoVeewjVPZ6vb1P5greNpXLfn7abKdLmBfroqAuOFy4A1WM8I2woauSNnHT2AsABMjfSDgT3WOopdV6QMzOh90+kh2gtCFJyM/qo6MPuBQtuWLwSok15vBwSvMhuAsBbH3tw3C8DoLXeiarkc0/jZ6XlIm0GwHK574bAfxVffS9tW9QLkL6743quy/BTs1725gLDWZSbSfUDUB3LVUNytzh0zD+O67TlRzfaBsBqGabyhtdkn/cuqGaDmF5XnBWFkT+sB8gPYAcIaes/fNxN0fRZIpZSPF7CcjuNnB621jfaCkHAUb9pz3E/HrLGIrZ9IQFS/NPQJmj3hCwrWoAxs2nsMtq7sBo79gKbqarUNk4zsJP7eC2fCB1HdC5g8jp/+2estgdi2sgN0c2FFsGtFYPWzfqygMlgXQLY2FERrquPFGqyHPIAgIrHYIyi7px1GRxkc+ovFDXUiqzos+0ZrCyhDX+uB7PFeX7rXswCZU/VzHJ4V5avU4s2+ZDcAQURxABCLPckA1Th/HhEwhvcCvLwFQM/U1iuoJbi10Fa+DcKzFuqAIKJZANCvT6WN9JkDWeP0QS2XHXHfzxMFEAmhvGZUxZmoi60Wa1bQTPeYVGvcdWUU5VSXWdny+Mx5UqznciV5ydIYZDMIQw8BjL4coMd61mjABKMLCCLqBoB5E28PTRze9ZmMmc5STiOERLEyTvMQ35e+Bvt38YGJ++tcwszA+mf6ymvc82Bh+tE45PU65VSlClM9V0qzV/5dp5rsVmDHnQDZ0DdfBARg66AKBBGJ2H6ZNnZU+8U//Xa5tqGBiE8z8KN8J7QiiOK/XkFYHahzLltw0096YfQQwu77fXRxj7e25OJqQfQBwOxX/u1Tp3In9xt2FQSIZLnrT1fMt0W0G0SDpLn4qXvpVxIzr7w5BTtuKwVxj0pudltLEITwWhDzdH2q48A3F7zjLDunELpF7DIIB6QEJMCyoKrL6ZJaswZhCTF3V9YEhDp3tTL3uq/3wNADAMf2NlNv4999jYqaFVULYtHkuWORg4987GzoIErOPQiEypDiPTY42yAYMbkLF971Uh/s/xbAkR3NtFP/91AhuFvEYm1yWPnF9z9SsT3Ej0UwLe7aW+NxMbLyHpRr44IdE6oifbW266gvdBDBMbo8WWsRLYAo+ie3EZNQXV6uhFCrzmJPjyq58jDZTtZbz5dHSHVA1HFLzq9bsginFYS1J6qMpN0gSsHZtoSiQmOYnDWXpWZ/VInGZzOMdzPKjvF89iQffWPIkLPD1uqdlYrMFVFEOxKUzzQ5W/F/ASJUK3AKazMIVrICAaAQ7WL9v/kn8RkLr42qidnOYyYVzdOmTuqFEz/Pnxl6MMuNvGUdFpSKDy4aaRcIL6t0QQGVZbcIouyGLK9U6ZpsCEyPYf/H/yjWeen6lBLv9LxNRs+mefrQ1snMf33bsouowsgViAcAtp4Cu6aWh6d1SLULhA1GQBBWgHIM+1dv6UhevCzwthht+MXciWfunpgy8+QKo10gQh8ZNUgEKiFahD1ackKYe/OOLrXrA5Gglms/p505pJ14cn2azDzVWEeDUVL1T74tot2WYFcwbBDCCgSIAkXY/Ou+l0ouWtlgrNkYjz7yuqn0Liqft5g8uit3ZvcfTpCJZRiNwoaboXgG0S5rqNfksEAwRYxoEhaEhBzDzsXrohdc+0BnUEvQDv1Y006+YiZXPVyhz5HB+zPjh58pkJqnbK4qbjgKq+cHm4JohwV4SY2HAiIh5g5xZBpHpsQwkeK48NbBHkhcFGibvn54h0kvPqTBkuuZuvyLFW5NT79lntj2yTEyGAk3xRVWMapqFojeUxCNIIcGQo5jUiu6pFlXb4r2Lv2zYKdKR18j7ak/0DVukHrZDUxd9oWaYe74f3x1fPTIY4WsUSBuYkUAP29BNHMNLYNQCC1rEC5Jj6EUMVnfmq0dyTkfDRagf7LJmDr9OimqyWHuJ5k68MUaENqJfYW3d941kTOQVKZxO3g3a6s163fLNbXDHYnC/MhtBYSVeS25paTMUaIIYxGVzd9wYCYo7vmmhso6vJNr+x42gSPpoIPStQTUtT+s3BFhNTBLpx/52FiWaZyMAongbbuoZjBqQPhRVjPh9u9BJoCtg0hAUiPUohGW5CZLphbIfXc8L1b4/F3ZDMATt+haPksgGcVc00XLmXrdX7rOwE88OpA2Jk8ZHCXuHNI2K7QCxKEWsq/1Cgo62vIMwmVhyJq8JRIgc5OJkZJckKXUvKVq7/VbmscHsVQZnzndnAPfNbVXHjet2CAh4dUbZeWqjXWD/fgzG8bHTr6q84LGs8p0rHhPQQSxBN/ziDogmFKMDymKMIkpUmretZGZq7/T+HTp8H7QX/gqKWv+BmHmpQDZDGjbPq0VrQFJvfR3Jbcg7VTyxHOfnxw7ulfjqHOOGvfqntpiEUGtwNmgVi1CgLDiQzTCEgVFkrs+qPauf2JG3Z753z8kePVHBJyRvmQNKtfcx+DwdlP7+Td14AZB/xWorvn7aOWrZ2qlTTx+y0R24jU9WxAgiu7JS5z4fw1CpghLRlQmaYaUSHXJvZv2ubomXSxNDj7ILYVzgygWIfXWnYr21MaCln6Hq1KEcO2jMaWjv+mOjvEffXw8nztnmlw2s6i/NyDCDPQtWURp6CqTyZKRCEuwlCRxJneufTyl9C6ssyvwKOnP/bFJ2XFuBeVF16H22rOm5ZKW3a+oS66vmx4vD0pGjvL0U7dPEudmtjDBs8i412Fs2SKGQlgqFRUStTWoIOoPRsMtWI3DVztAdCy7L6Z+6LbaYaddlew7pD15jwbGKNdMnUATI6QrMfmp7zebj1kSpl7eqpsHvpvLl0BwZJx7nE+EAqI6JhBl4O69x+AHK3rAlPoBeNPOVEOlJRAaoYgRRYvoZAkmWxYR61mkJG/+53hDP58+yief2JQnrltD1ei6x2JK5yUe1ip00B6/I5tJv2UIizD5pHmuNLHzFSNasQgXEPi54mFGa1v+RS/2gmbOAvT4ghghL6G+iXc9PyZkWH6ZiNzXrBuMmkSwlpkqSVpKiscliZkozxz4chQW/07DXJP+5l5j/GdfKkQW3ygnl3/B00xc5KHyQ3+dz1POzHHTNLlhBgrWQUDUiwlEGRuE3dPLB1U06gNqcmZcyMXor/De4jHnlkCIWbUYvgqriMkxGeM9cnLdY1FQOhoG3snBBwuRq+5UvQRoPTsKhe0b85Q9ZeSJm5wbVqCuC6K8nDftCFiqtJ0mCAghxg2GC4gykH/4fQWMty4Echzdqp6Bi7Mj90yfHQkMQswjBIjeiMqYJktMYXIUYxLr+5CSWP0dFZRGLtOZI24Qz3QdtJ/eo2kjBw0ibubINHOazk3VMEWaY6qU/CtLcIEgfvMNwsscoQGIMpBvrYoATvUDl7rL5zuEWgr0Lnx++TDiZm7fGwiEc2ZtFAypOzKDiTgRRSYhkyR14YCsXvMlBZTA60MitwT6nq8YheEhC4KwBnvEJAK168w6LBD1rMDZZzyAcLgsFc6OFSe8CXPK7e1nvkFYPUzMrDWyArawikREtYJ2lMUlFDCQSWr3AglXPqQoHWKnv88rcwr0PX9uFM4cMUUuxbYG0nTudEtWBtYork00unxZhNd5gg8QzeoXKEYUQUynwQWIJFdZXLgoJkkxlIogSGJAEsOrbpeUD98mebIOcbjkl1u59uoTJmCOa4bJiZtmnhmcuFKMDdV5pjpW4Gy8ZxBeIRRHODXB2ovC690T0CKKIMR2Sm0qwiQyLauIRxQrXlguSpEtEKo4rC7FES9ZypQ51zDoXYSgdCLEO6x8E+hp0keOgHLyJa6/8Z+kFbLWuoRmSJzQ4JZb0gyeswL0dJAur0eEAcLLsma1Bs8LEKUDLPbikOWeJEJJUyQBI6oqDLVpGOJNyMgIldJrjHWTsCaWy0i6poOCjItsLCErQhAwmM5FfokMpIrY4AGCp2DtxxLKjv98sAgnCHvNWhYhVGWMuGUZqCosyotWgcQZMBnFtFtjZP2tuIQiJCSNMwJTJ2EJeVayCK1oCTkFyV4Q8mMNDUF4GR3V8yXnjUVYI4DSBgIBQY9hwoYR4YyRwjokFZFkpnGTRSQF0RBuSuz8UEEFzcpyWJeEROJ9qjKjgqmTygyeN5FEcLYgGEikFFfl/EJoCiKoYzcwjfe2dpjfWbQdIxZOnTsZ++UjV1uHr+2r6YmhEgirsaUtNUwvWkZMJtRIYTEpgihmmZKCUUZYMDjWTKdlVgKhkwAApkZiwpYzC0QtWEKZszi+teH5C2DobwGOPOtvXbkeKIPO4L2DJ4NyrH7OBnEJgN6z7+E5FYKbnqFzgLDPQdiWgRJhXI5gQUAxOIr/g7AQYRVVF4mD4yajPORB9HoyNAuAsIRItSWIZz3GBruYzivWRy4Y+HIXPHs/wKn94YDIq2/ifcU8URiXDUK8E2n+G0NfGzn90tfLr1r2A8K2Cmvvqx6zVvBQJ0RhETKhOMErPguLsE7zlo705kulkbAKYQ0ChuWKxObjHEQDuiOncvpv2tKRnPVbMXj0Bmui2PKF4h1UXQf9vAisWZk2CPF3ia5PRV/9x4+c1rPvWlNvLyCqz87Ze2DFAZNYLA7CVVmfozFAnaM4nC0AOSsmer/o5YJJpAqAxUxsKPNpBbb86BU3Ri4e+Ksu2L8F4OV/baYPb7+TchY/F947X0WhZYUQkeijH9D1NB/e+8DYmYM/LgQB4TwlVPwcQ+tgvF7cKV6EUtleoWPR88W3zv5qAQjgiqxnYqXTpB+8MQWjxwCevTscl2SAAWP0P7h5sHz61hu9xndV9kwiobO51oFmfcqYfPe4TpQrJ6bcRKGmT8uosyxkDVt1x31h1LyuDBXUVK+kJi8UuS60gvPQ98JxSWJkN0P+NX5m91TYTagNnOItkwA9ACA2E9d/KUp1TfQpCbLjDdYivMya/C9yuSpEvHtjdBjg2G6A4dKrH1rVnLCEXOoN/NOdE62Kcu3QYQqlbWuTkDk3BxTTW9rVC5sgFQxbrkhbZ3rfwc3by1OfINVq9EzTnRNBCqSn18ThbL4TkEeBuAJiyGr5pyDSWnwmSJmKYgLpOkRiU5BMZnBd+wDYrftf5H4s7DrfhR4AAAAASUVORK5CYII="},55303:function(X){"use strict";X.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAFIpJREFUeF7VnHt0HNV9x3/33pnZl6SVJXltyw9kGyMjBztgNwk05diFHmJIk7QElYQmYBxIUx9oCOSc0D8a9eQP2rTp6Ukf5NGWJqchB7vlD5pwTpwmuAnBGGJjbPzCdg0SRpK1eqz2OXNn7u25Mzs7M7szOyN5ZZT5w5K1d+7M/dzffO/v97u/WQS/wccAH2rLlUudhJAOpKO4zoHJTKkgrE1vS70/uw8NGotteGix3VDY/QzxIfydfL5LQtIyGkNxmcq+p2CNGIYOl9b3wKUDaEgP6/dKff4bA3wrf1DOQk+PXjQyTEGShVkGoEGorBZIAyYxnI116eMn0ZB2pcAGXWfRA+/lQ0mlUsmoxOiSgSDBt2bTAdbtalGbEASEA7DpnpIxfrh3qPRegV+UwDnnaC38ZVpTS8s4xm1uOAI2pQKpv5T4wXbOt86REJnFenz8XPfDs1ca/KICvp0PSW+D1k01I2MgXXHDM0HXrDtcShqlxpkge9IULJclWRs/1f74FEKIXwn4iwJ4Hx+Ka1DOANBuThH2WKlbQgQRU7Pnat117c0nxD5kYIxTjvilvhOl7IEdC7vAvmfAhWysh690aMAyBrAOc/i1BbARaNRF0tuPA7XGtw6226oRR4wTyKIp+dK5DQ+rC2HxVxz4XXwv+QW80g0AGQw85gZh/e6F7RUC96TU46i2bPBaGnpoOrH2hGFCphO8e/zY8s8WWwn+igG/mn8zVoK3MkChh8tCNlyHB1IjcFO75+CR1C+S9ZMavOA2ShYBXIxRMn5szRdmWqHzCw78av5QRwWkjAE4HWgpAVJSWyjnBdv7tJjT2ESyHCnyXx8UXVE1DS59Zv2fZIcQYvO1+gUBLqLBb4HaDVDJIMDxpjcXsAh6hCAkuAnTbceV9NF0+08RF2OscgNJeKJ9Fb50GH0+8M6CxtxS4AN8SMlBKQOg9TAgJJIV1A3U6/5VrdR3WC5LDJGksAU5kufjuoa4MuKEc86mlkN87MDaXZVIYxXnRW3YrJ1IIuXV4jIds85Aj62+gyi6HSF09w/taz6NGSRZ0xbgSkax7DrYnngAAAhFOd7RMXYyM1gI4zlv4MKtWwV/3sVM/5kkwy7U8LnPQD3WHajbdZ5MmHWH6XbESW0IvHwMiBGpmAQYe63vvlzQAjtn4EKfvwfaUgraMgN4UAQSzr+ZlMzR6mwbdl/U1u1WW3fDtXzcUMyhwhJo7NTKzzZEsHMCvpI/3g2grmKApHCiTVo0te5mYXs0Tfcukk1sIsz7qcmRNRZLSnz6CzAQBFiVSuTi8c33TNs0IgNfwR+9CgB6Lgu0fdcBemoOpum6HxTcNMqMT7jjvfUoklUHvCGl0ETOahejAHGITb628e63hcxEAt7Hv9ipAlnfGtheOA1hTpgL2CSStHtunk2cXz4m2LLrJtsDyTEgrMgTJ9cPDkcC3ssf7eEAwsLnfzTxt2uPapj7V3tC6tXa9f9armSeXkndPQQ+KWGLcf0ahVHxeP+nT0cCfhe/i/wS1vQjgMS8iAfcnAdJRD31Xt8n79J0wRXWHaTp/nLlOJjeSfVbqD335roO4kTtbMfnD64eLEcCLjrayr8tj8L5dRwMz4ZApAlo4pGYj78cpN0uCLZfZl7QJ9/i0Vs/qOIajgftO3G+1l3XV5huu8aKOONxLI19vP/uMTsdEBm4uEHhe/fBI8s1CitAJtHObSIlNSsJ0+0GKWmE4GuJbqqtWCQ99xEuWYizd08NfGbUfRuh0ATkeiu+Hf5BeUMdWYVirDPYwiN4FE00uzacMIuqQWjm/oUsbPYgqvrvPAfR0gc1BnXGhZl88eSmwbGmwKuAlwFAFwiPpkXhfyTpaVEjMe5hmoP99DQ8WToCJTu+b+jfaxQ+K4JzRrNF0vyMawCK4r5EKHDOuVgU1wJAYqQwrb6dm9YuieoOsdZoavOnwdlKcCZc07znxKzEoU9ToPVt7V48Q4g2I104gTd0ZOQ1bW2xLC3BY7n9cIh6nmzvOtCg3dF0W2g0wiSrsdx4u7G0u8zZisjAOecietw0Q4vwxK9+Mfm9068E1HCkAFKNA+dSHdxqEy7RKnQn3cKJ/be6fux+VfF5sENU+yTEZ/pQ11rp7zbe2rkstUT+aPZpOE+zrgs2Sl5UjwRznUnAJ+QcGz+8zUrRXn/6h71zBb4OANIfefY/xl7PjdQqlbhaDzIAuGjnOxELCDyCwXe1daADv7N76QjkyGB2H1B7799l1bYD1Bw4AMFYZ1i5tOzC+Yn6zeb+0z/sRS4LF30ZQRrOORfP+qZnh89O7/nZf+bd42gEDgCpRrJmu4jARTte8bFyz/lJgIbJdu5sLgHBvf0fin2t/+auB7I/hhfosNWJy430XSRdbTg2vffxT6793ETQbo9t4c7kyWAw8F80OeciR3LV7p8+N/r8Oyc8inbZwIU8mCBdGdwq2AboCwQ8gWV05qOPLP+X0hH4q9yhhnxNkGUjQKqRTI59esWbU0NoqOm2mltS7P6aARdiv2L5t/72HRSjnoKYKwrcNmB7gppYuN00qqUf3rkn8ys6Qh7LvlB7TILCdgKkDJiNvbFq93TUjWMBXK9JitVzM+C9FGD5mqeeGKmXxdYBt3uuWnqQrIhmcwAumkeBfnDnnqVH6Zj0Z9n9ZpzqjTktQIyxYjuD0cPrP5+LsDx4mjiSUo2a5SsB3GOh1n94TVLmAVyc0iIrdwMX3bqtG2FplhXZ2JmNuz3r11ygOxbueD8GCdbwy7ZwC66zcHJVttxBty6L34sA9W5hqqrvLMC1dA+8HIGCn8XbwB/L7q/1oCMyk1QSY60o9rGAkxXufH7rgAuKdR6J44enYHWM4xWdK7EYuIG9buUFqrKp/Ky1TqQAWNWC13d04TRucwIlF7VT46OsHJM5lJ0q4yjg3XNz1CUpEpenukh+7ODqL821m8Dp9gMeJ3DxVb/QnnMeaOHuKzh6XqVtexumZafMOfjHm29L375yY3szQ3ynWNS+dPD53OuVd4xd/b8Ve6jvgx0pWQ4sqygBZY++/OPpn2cvUDf4udASwEd5wfiUcuTsOXR7pLrBG1/amyi00bh7iyxoXCZwjXgizRYCr142larJSFKV0Y5118j/dvPHMxGeepihReOZkTeK96++ocNMz4Ycpwrj6t2/3DtTMXQu7Bwxy5uKCv3ELXt6MqlUHiF0Iexa2y88FR9VyQrEWRdmaOLkpnurznvwmX7A5yUp/hbuBZ5KpSAhyeiBjZuTX7zuw0vCBjSfz4WVb9//3axqGNwNvZXAB07sVRgu9gKgbntVxWo48J1nn4+NVEr9iDOP5SgSeffwwJ2N6dm5S4oDPCnJiEsy6iYS2n3dDYkvbNi2UMD57/38+5NUV5kNvcxkDlCKZOXNLHw7f0GaunhxOS1rGY6wJ+EWBlxMEjGgHwBcaTbL8SRENhI5eubgTYM1uzA7nx/wFIiFUlh33OBYicXx7ms3xx96301NcuTzsW3rHAqUf+zAD6byOmY5VuCVqqULaYli5X7AhzjHz5z6zjKUUJYxA/msITJgVQ+UlK2//rZM5XQ/R9gvAVp1PpGmaKtOH962zYzgLxu4sPBERxp1KnF817oNiUcGbgyukp0/bxP4H7y4b6aMwcgLKy8K6DovzwO4yPlvOPdUDyHGCsSaLCBUBsz8gW9/4QVpIjNxDTb84i5bWazwilO19Mkb/uiMyMPMH7i5YMoomZbRkhjDaXkJ/tg16+KPrLeAf/fc65Xj+Xe5hDEiCHke011rrpcHOpfWasS/f+ENejz/LgPZ9VRSDQzO+eeuukG0JRSAD770TK6CuZEvzLI8xaxi5OcMfPPw0zM6La/ktZcBmm+VBQG/7tgPlgDIIsPqc3hjWcS52jW15PSBHTv0ywJuWrcko1gsjpfGEbl19UD8y9d+0Hx9JEcpLwLllHqzguJWlibTyD3MHC3BDPXmcOxR9FbbCuD3HNw3W6EVY1LX2KyuMk3DrMyqPn3I0/Prj+zpeZ1O4Icn/4eE14k7dxcEXFxuy9G9KxmG5d5Le63bMKiR6Vx6+sDaHWaFbUuApxOYtCud+NbVa2vAT85MGCNawXTdMBIT6wziA50Zkpad7OGxXJaPa4W6bBwFqgH8dqYPp2VZvJ/J7zny3GxFV43JwqwFXMKsXNDNhTPsqEWao07yyvflrIZ9yWANF9K05di+Po7kLic7YydbrSoBhcO5w9sGa7mZ1gLP9Ma//P6bTQv/1/PH1BOFUW7KiawA0XXzp6FTdP/qLdK16Z6azPz7W0eNs+ok0ygAkWQuSIvtJiJJfNeaTdJAypKU+w79Vz5HVaOsCR2fYdOGIVI1bO7Am204ez9rZuFinKK49dljAxs4gjZnAi3tRpyPHNvyh5fcxtAy4CmeJLes36B8ZcEWzVYBfzH4YagrpbB2bYIt3O5ILKBTXdMbOdKr3ooMksSyrw3c+Xb9xVoGXEjKTT3LY1+9Ybu5aJYo5TVddhsNpUjosvtGcpTCDC3V8vCyLPxr6+iVk+biKiz8/iPPzU6XCsyycJVNGwVeKei8PofvR9SRlADgLilxL3kGkydObhoMjTRF8DOsVjZipkuIQ+H1zXe96ZdLXzDg3zh5qPyWkWOMYiSKBwxKkRJTgAFG9/b2K1s6e2teypMXjtD/y2eZUZUTXZY4qNYe9q61W+XrOzOSreGleuCGzu0wv5mONwXuU6xk20hU4OLaAyf2tskUX7VkS/eZA2iH7zdYtBT4B3ozytfe97tm4DNBS+ySpjHk9lLMUciwQUkRd/4kS0v8YrHIZRksy3Zt8vWlOklSlk0LF4tm64E3ltnV7UtGsnB7ssVC2myXqKXAt3RnlK9vtYC3+vAAF8FPoSopl2PhATWPllnUtsnmBDxs3C0Gnla+vnXnggGveSmBwINfNTq4c5e5xfbYqEvDm0iJ7XEYDBYhcMCkPd2J+9vSyjdvWnjgRV1j+bzGcpLKRHjvaPgcgIdZd1XWDLJYgEMKRFgvIs30FQAu6gMfOPKT2RzRjKII7XWN5agN3PFqgh5py8InpcdE4NPUsi1BsdeR9xS4ezB2HuWKAj/xk9lSqchmtLIhgFOxXWda+FyBe4MbbzDubAKL8S4u4CKXknYsfH2yXf7nD9+xYPnw+1/5UUHVNSMIuFkhEHC8/IkHe0wLHxahvbcixVN5VVfYaWgwcXJbuB8etljan89p0Wyw8CpwK3mVJOk4kf5p2x2dS5NWsNLK4+jMhPE3bx0q5nRHUmwLj7IDYQIvCUnxBj4e9D716osKuNjp6Uk72cKkkiBrEt3yHX3rYjLCIo2CMIjUrAwi66zrlgUKH3xzeilKgiyyinCqNCGyirX5Eb9JEnChoww4n+Uq++n429pUKW+IXIq5aLo0fL7AfYVlMVu42PFJSp1oSZzhdHoJTsYSpB2w1NGmEFniJEaSGLBhklfMxJWOzIy3LMO6VBe6b+UA+fu3XjWmNLUWymtV8AZnXOTDxU8dY6NSKbE8BaNkFNi0Vjaojq3Q3tD5fIB7M9Ze3XaeTBkMjS4eSbGAOzs+3XEgCSVBYnKMtMsKQVjCiThCSDdwLWNoArc2GnpiMTRetL4PwMwSVg+NakCqwHXGuMoMljMoE/pd0jVWKGhs1nQJrQ1lE3hIvdvLt3klxaviQd80tMiAi0IU9yZEexyRNimNOxUgmEg4QSRs7fhgxJD4KSSluqsTA5CotQEiDpE5wa4cisFlrsuM67zCixWDM0NnJYMyW07Uos4ryvyAu0N38+I+2m0trBQWkYZbxT+iHoWnrV17RYnjdkXBkqTglGRgLMlYRhgJ6OI9E1kTwGNgYAt0rArfqcqxElZCj1RVBZ3LnMqM00qZU2ZwAVtIib2JjA2Zm3v2c7Rwy7qDZMQ2ARk4MmhPNv/mgR3Rvw8lzFG4DC/FAi6qsey6lFiM4TjuQLJi4A7chhimSMEYyZggoeTmMLEFXRzMtHjnwNySFRWsKaCmf10BAVtjBhewxU9RJiFAm3IS8bAl5XHbSwl5jZBTg/Z0db9pb41FvExoMxt4YH14UA9W2ZtVY2gGQULPUymIGQwzIqE4kVAikQBGNKRUYTMsIfGqBTPrDa0XrMS/jV+nUzH/hpnCK1AGEdiIv6hM59hQTNg16w4dotXg5dseXPpqaZL8hQm82Yu4FCQdymoMzp3cNNjy76q1gQe+AdEcuPP6iZAWAV9EnpxoKAlJENWwTJWQWNCSyWStcDNGnJdqjWqwQmIyF79romjTNQvlqmRgRVg1mKDFPUUr/7HuXkz+yZ0PLXs6exq+kT0SALxavGPIkxvO0pF9gwvzVdg2cOsdn7PHp/e8+KNINdKews5aUaeMxOs/TtlyChLErp61JsAEYMqK41ZwjQq/kbt/io9LZQCsON7LXCC7DeWPr9oce+K6W5b86fCL8GJp1HeRFFVSFOjwiU2DUxEfmnk1q2ko53w9Bej4xPP7Ro+Mnwv9ovPmlbT2vYhFta5m3JXQi4t3M5NJKEEJxBNhWa71NpC9Dy/CdRSTOcfVnzPUfGKiLJSivy7Sjv731k/1jFGdDA5Xa8PrvBJJIllcyr5rvwI4L5IRT3IDF8/UwLSm8a++9LOpfReONi3pbQDuMDZ/q31eqyN3Km3tP5m5j6QzA0zTEFYULn6638FyxmK1reVMQnzvGztXkb++/tbOVakl8uD5/XC+5H2ThEh4lpRiFw9v+/3wOouIQMOaebwEzrkYkXgTOT5cmKqcmZnRJqaLRnV9C+vL//OYeIu5/l1PVyleDECv+9xTqFf9j65hJCkKr2/rd9GueAL3JTrlq9u6YiWg8PjoIThUyppSYhAwMFMme9rSE632QKIAasiucc5F4sl+114MNzADF+UC71WbUVqC/blheDJ7HPJMrwBIeWIk83ded0fucr5Z83LH0xRm9YsOFg3wfQDov8f3x0fYZAJUSSrrREK6JiGZSFQHwiQwFGroZUwoJxLlpTJVtP6CXbl6ubBacf7/A7kxJfsyNujOAAAAAElFTkSuQmCC"},22214:function(X,et,M){"use strict";M.d(et,{Z:function(){return L}});var O=M(58289),W=M(75538),H=M(85458);function L(I,N,P){return N=(0,O.Z)(N),(0,H.Z)(I,(0,W.Z)()?Reflect.construct(N,P||[],(0,O.Z)(I).constructor):N.apply(I,P))}},22497:function(X,et){"use strict";var M={value:()=>{}};function O(){for(var N=0,P=arguments.length,k={},U;N<P;++N){if(!(U=arguments[N]+"")||U in k||/[\s.]/.test(U))throw new Error("illegal type: "+U);k[U]=[]}return new W(k)}function W(N){this._=N}function H(N,P){return N.trim().split(/^|\s+/).map(function(k){var U="",Z=k.indexOf(".");if(Z>=0&&(U=k.slice(Z+1),k=k.slice(0,Z)),k&&!P.hasOwnProperty(k))throw new Error("unknown type: "+k);return{type:k,name:U}})}W.prototype=O.prototype={constructor:W,on:function(N,P){var k=this._,U=H(N+"",k),Z,V=-1,Y=U.length;if(arguments.length<2){for(;++V<Y;)if((Z=(N=U[V]).type)&&(Z=L(k[Z],N.name)))return Z;return}if(P!=null&&typeof P!="function")throw new Error("invalid callback: "+P);for(;++V<Y;)if(Z=(N=U[V]).type)k[Z]=I(k[Z],N.name,P);else if(P==null)for(Z in k)k[Z]=I(k[Z],N.name,null);return this},copy:function(){var N={},P=this._;for(var k in P)N[k]=P[k].slice();return new W(N)},call:function(N,P){if((Z=arguments.length-2)>0)for(var k=new Array(Z),U=0,Z,V;U<Z;++U)k[U]=arguments[U+2];if(!this._.hasOwnProperty(N))throw new Error("unknown type: "+N);for(V=this._[N],U=0,Z=V.length;U<Z;++U)V[U].value.apply(P,k)},apply:function(N,P,k){if(!this._.hasOwnProperty(N))throw new Error("unknown type: "+N);for(var U=this._[N],Z=0,V=U.length;Z<V;++Z)U[Z].value.apply(P,k)}};function L(N,P){for(var k=0,U=N.length,Z;k<U;++k)if((Z=N[k]).name===P)return Z.value}function I(N,P,k){for(var U=0,Z=N.length;U<Z;++U)if(N[U].name===P){N[U]=M,N=N.slice(0,U).concat(N.slice(U+1));break}return k!=null&&N.push({name:P,value:k}),N}et.Z=O},12713:function(X,et,M){"use strict";M.d(et,{H:function(){return H},Z:function(){return O}});function O(L){const I=+this._x.call(null,L),N=+this._y.call(null,L),P=+this._z.call(null,L);return W(this.cover(I,N,P),I,N,P,L)}function W(L,I,N,P,k){if(isNaN(I)||isNaN(N)||isNaN(P))return L;var U,Z=L._root,V={data:k},Y=L._x0,nt=L._y0,rt=L._z0,ft=L._x1,ct=L._y1,it=L._z1,vt,gt,yt,mt,Mt,Ct,Nt,qt,Gt,re,de;if(!Z)return L._root=V,L;for(;Z.length;)if((Nt=I>=(vt=(Y+ft)/2))?Y=vt:ft=vt,(qt=N>=(gt=(nt+ct)/2))?nt=gt:ct=gt,(Gt=P>=(yt=(rt+it)/2))?rt=yt:it=yt,U=Z,!(Z=Z[re=Gt<<2|qt<<1|Nt]))return U[re]=V,L;if(mt=+L._x.call(null,Z.data),Mt=+L._y.call(null,Z.data),Ct=+L._z.call(null,Z.data),I===mt&&N===Mt&&P===Ct)return V.next=Z,U?U[re]=V:L._root=V,L;do U=U?U[re]=new Array(8):L._root=new Array(8),(Nt=I>=(vt=(Y+ft)/2))?Y=vt:ft=vt,(qt=N>=(gt=(nt+ct)/2))?nt=gt:ct=gt,(Gt=P>=(yt=(rt+it)/2))?rt=yt:it=yt;while((re=Gt<<2|qt<<1|Nt)===(de=(Ct>=yt)<<2|(Mt>=gt)<<1|mt>=vt));return U[de]=Z,U[re]=V,L}function H(L){Array.isArray(L)||(L=Array.from(L));const I=L.length,N=new Float64Array(I),P=new Float64Array(I),k=new Float64Array(I);let U=1/0,Z=1/0,V=1/0,Y=-1/0,nt=-1/0,rt=-1/0;for(let ft=0,ct,it,vt,gt;ft<I;++ft)isNaN(it=+this._x.call(null,ct=L[ft]))||isNaN(vt=+this._y.call(null,ct))||isNaN(gt=+this._z.call(null,ct))||(N[ft]=it,P[ft]=vt,k[ft]=gt,it<U&&(U=it),it>Y&&(Y=it),vt<Z&&(Z=vt),vt>nt&&(nt=vt),gt<V&&(V=gt),gt>rt&&(rt=gt));if(U>Y||Z>nt||V>rt)return this;this.cover(U,Z,V).cover(Y,nt,rt);for(let ft=0;ft<I;++ft)W(this,N[ft],P[ft],k[ft],L[ft]);return this}},18404:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(W,H,L){if(isNaN(W=+W)||isNaN(H=+H)||isNaN(L=+L))return this;var I=this._x0,N=this._y0,P=this._z0,k=this._x1,U=this._y1,Z=this._z1;if(isNaN(I))k=(I=Math.floor(W))+1,U=(N=Math.floor(H))+1,Z=(P=Math.floor(L))+1;else{for(var V=k-I||1,Y=this._root,nt,rt;I>W||W>=k||N>H||H>=U||P>L||L>=Z;)switch(rt=(L<P)<<2|(H<N)<<1|W<I,nt=new Array(8),nt[rt]=Y,Y=nt,V*=2,rt){case 0:k=I+V,U=N+V,Z=P+V;break;case 1:I=k-V,U=N+V,Z=P+V;break;case 2:k=I+V,N=U-V,Z=P+V;break;case 3:I=k-V,N=U-V,Z=P+V;break;case 4:k=I+V,U=N+V,P=Z-V;break;case 5:I=k-V,U=N+V,P=Z-V;break;case 6:k=I+V,N=U-V,P=Z-V;break;case 7:I=k-V,N=U-V,P=Z-V;break}this._root&&this._root.length&&(this._root=Y)}return this._x0=I,this._y0=N,this._z0=P,this._x1=k,this._y1=U,this._z1=Z,this}},39894:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(){var W=[];return this.visit(function(H){if(!H.length)do W.push(H.data);while(H=H.next)}),W}},56033:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(W){return arguments.length?this.cover(+W[0][0],+W[0][1],+W[0][2]).cover(+W[1][0],+W[1][1],+W[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}},77480:function(X,et,M){"use strict";M.d(et,{Z:function(){return W}});var O=M(26805);function W(H,L,I,N){var P,k=this._x0,U=this._y0,Z=this._z0,V,Y,nt,rt,ft,ct,it=this._x1,vt=this._y1,gt=this._z1,yt=[],mt=this._root,Mt,Ct;for(mt&&yt.push(new O.Z(mt,k,U,Z,it,vt,gt)),N==null?N=1/0:(k=H-N,U=L-N,Z=I-N,it=H+N,vt=L+N,gt=I+N,N*=N);Mt=yt.pop();)if(!(!(mt=Mt.node)||(V=Mt.x0)>it||(Y=Mt.y0)>vt||(nt=Mt.z0)>gt||(rt=Mt.x1)<k||(ft=Mt.y1)<U||(ct=Mt.z1)<Z))if(mt.length){var Nt=(V+rt)/2,qt=(Y+ft)/2,Gt=(nt+ct)/2;yt.push(new O.Z(mt[7],Nt,qt,Gt,rt,ft,ct),new O.Z(mt[6],V,qt,Gt,Nt,ft,ct),new O.Z(mt[5],Nt,Y,Gt,rt,qt,ct),new O.Z(mt[4],V,Y,Gt,Nt,qt,ct),new O.Z(mt[3],Nt,qt,nt,rt,ft,Gt),new O.Z(mt[2],V,qt,nt,Nt,ft,Gt),new O.Z(mt[1],Nt,Y,nt,rt,qt,Gt),new O.Z(mt[0],V,Y,nt,Nt,qt,Gt)),(Ct=(I>=Gt)<<2|(L>=qt)<<1|H>=Nt)&&(Mt=yt[yt.length-1],yt[yt.length-1]=yt[yt.length-1-Ct],yt[yt.length-1-Ct]=Mt)}else{var re=H-+this._x.call(null,mt.data),de=L-+this._y.call(null,mt.data),ue=I-+this._z.call(null,mt.data),Me=re*re+de*de+ue*ue;if(Me<N){var Ve=Math.sqrt(N=Me);k=H-Ve,U=L-Ve,Z=I-Ve,it=H+Ve,vt=L+Ve,gt=I+Ve,P=mt.data}}return P}},72096:function(X,et,M){"use strict";M.d(et,{r:function(){return W}});const O=(H,L,I,N,P,k)=>Math.sqrt(QA(H-N,2)+QA(L-P,2)+QA(I-k,2));function W(H,L,I,N){const P=[],k=H-N,U=L-N,Z=I-N,V=H+N,Y=L+N,nt=I+N;return this.visit((rt,ft,ct,it,vt,gt,yt)=>{if(!rt.length)do{const mt=rt.data;O(H,L,I,this._x(mt),this._y(mt),this._z(mt))<=N&&P.push(mt)}while(rt=rt.next);return ft>V||ct>Y||it>nt||vt<k||gt<U||yt<Z}),P}},26805:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(W,H,L,I,N,P,k){this.node=W,this.x0=H,this.y0=L,this.z0=I,this.x1=N,this.y1=P,this.z1=k}},7695:function(X,et,M){"use strict";M.d(et,{Z:function(){return ft}});var O=M(12713),W=M(18404),H=M(39894),L=M(56033),I=M(77480),N=M(72096),P=M(36989),k=M(10325),U=M(15902),Z=M(12027),V=M(66612),Y=M(14763),nt=M(94009),rt=M(68889);function ft(gt,yt,mt,Mt){var Ct=new ct(yt==null?Y.P:yt,mt==null?nt.q:mt,Mt==null?rt.i:Mt,NaN,NaN,NaN,NaN,NaN,NaN);return gt==null?Ct:Ct.addAll(gt)}function ct(gt,yt,mt,Mt,Ct,Nt,qt,Gt,re){this._x=gt,this._y=yt,this._z=mt,this._x0=Mt,this._y0=Ct,this._z0=Nt,this._x1=qt,this._y1=Gt,this._z1=re,this._root=void 0}function it(gt){for(var yt={data:gt.data},mt=yt;gt=gt.next;)mt=mt.next={data:gt.data};return yt}var vt=ft.prototype=ct.prototype;vt.copy=function(){var gt=new ct(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),yt=this._root,mt,Mt;if(!yt)return gt;if(!yt.length)return gt._root=it(yt),gt;for(mt=[{source:yt,target:gt._root=new Array(8)}];yt=mt.pop();)for(var Ct=0;Ct<8;++Ct)(Mt=yt.source[Ct])&&(Mt.length?mt.push({source:Mt,target:yt.target[Ct]=new Array(8)}):yt.target[Ct]=it(Mt));return gt},vt.add=O.Z,vt.addAll=O.H,vt.cover=W.Z,vt.data=H.Z,vt.extent=L.Z,vt.find=I.Z,vt.findAllWithinRadius=N.r,vt.remove=P.Z,vt.removeAll=P.x,vt.root=k.Z,vt.size=U.Z,vt.visit=Z.Z,vt.visitAfter=V.Z,vt.x=Y.Z,vt.y=nt.Z,vt.z=rt.Z},36989:function(X,et,M){"use strict";M.d(et,{Z:function(){return O},x:function(){return W}});function O(H){if(isNaN(ft=+this._x.call(null,H))||isNaN(ct=+this._y.call(null,H))||isNaN(it=+this._z.call(null,H)))return this;var L,I=this._root,N,P,k,U=this._x0,Z=this._y0,V=this._z0,Y=this._x1,nt=this._y1,rt=this._z1,ft,ct,it,vt,gt,yt,mt,Mt,Ct,Nt,qt;if(!I)return this;if(I.length)for(;;){if((mt=ft>=(vt=(U+Y)/2))?U=vt:Y=vt,(Mt=ct>=(gt=(Z+nt)/2))?Z=gt:nt=gt,(Ct=it>=(yt=(V+rt)/2))?V=yt:rt=yt,L=I,!(I=I[Nt=Ct<<2|Mt<<1|mt]))return this;if(!I.length)break;(L[Nt+1&7]||L[Nt+2&7]||L[Nt+3&7]||L[Nt+4&7]||L[Nt+5&7]||L[Nt+6&7]||L[Nt+7&7])&&(N=L,qt=Nt)}for(;I.data!==H;)if(P=I,!(I=I.next))return this;return(k=I.next)&&delete I.next,P?(k?P.next=k:delete P.next,this):L?(k?L[Nt]=k:delete L[Nt],(I=L[0]||L[1]||L[2]||L[3]||L[4]||L[5]||L[6]||L[7])&&I===(L[7]||L[6]||L[5]||L[4]||L[3]||L[2]||L[1]||L[0])&&!I.length&&(N?N[qt]=I:this._root=I),this):(this._root=k,this)}function W(H){for(var L=0,I=H.length;L<I;++L)this.remove(H[L]);return this}},10325:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(){return this._root}},15902:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(){var W=0;return this.visit(function(H){if(!H.length)do++W;while(H=H.next)}),W}},12027:function(X,et,M){"use strict";M.d(et,{Z:function(){return W}});var O=M(26805);function W(H){var L=[],I,N=this._root,P,k,U,Z,V,Y,nt;for(N&&L.push(new O.Z(N,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));I=L.pop();)if(!H(N=I.node,k=I.x0,U=I.y0,Z=I.z0,V=I.x1,Y=I.y1,nt=I.z1)&&N.length){var rt=(k+V)/2,ft=(U+Y)/2,ct=(Z+nt)/2;(P=N[7])&&L.push(new O.Z(P,rt,ft,ct,V,Y,nt)),(P=N[6])&&L.push(new O.Z(P,k,ft,ct,rt,Y,nt)),(P=N[5])&&L.push(new O.Z(P,rt,U,ct,V,ft,nt)),(P=N[4])&&L.push(new O.Z(P,k,U,ct,rt,ft,nt)),(P=N[3])&&L.push(new O.Z(P,rt,ft,Z,V,Y,ct)),(P=N[2])&&L.push(new O.Z(P,k,ft,Z,rt,Y,ct)),(P=N[1])&&L.push(new O.Z(P,rt,U,Z,V,ft,ct)),(P=N[0])&&L.push(new O.Z(P,k,U,Z,rt,ft,ct))}return this}},66612:function(X,et,M){"use strict";M.d(et,{Z:function(){return W}});var O=M(26805);function W(H){var L=[],I=[],N;for(this._root&&L.push(new O.Z(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));N=L.pop();){var P=N.node;if(P.length){var k,U=N.x0,Z=N.y0,V=N.z0,Y=N.x1,nt=N.y1,rt=N.z1,ft=(U+Y)/2,ct=(Z+nt)/2,it=(V+rt)/2;(k=P[0])&&L.push(new O.Z(k,U,Z,V,ft,ct,it)),(k=P[1])&&L.push(new O.Z(k,ft,Z,V,Y,ct,it)),(k=P[2])&&L.push(new O.Z(k,U,ct,V,ft,nt,it)),(k=P[3])&&L.push(new O.Z(k,ft,ct,V,Y,nt,it)),(k=P[4])&&L.push(new O.Z(k,U,Z,it,ft,ct,rt)),(k=P[5])&&L.push(new O.Z(k,ft,Z,it,Y,ct,rt)),(k=P[6])&&L.push(new O.Z(k,U,ct,it,ft,nt,rt)),(k=P[7])&&L.push(new O.Z(k,ft,ct,it,Y,nt,rt))}I.push(N)}for(;N=I.pop();)H(N.node,N.x0,N.y0,N.z0,N.x1,N.y1,N.z1);return this}},14763:function(X,et,M){"use strict";M.d(et,{P:function(){return O},Z:function(){return W}});function O(H){return H[0]}function W(H){return arguments.length?(this._x=H,this):this._x}},94009:function(X,et,M){"use strict";M.d(et,{Z:function(){return W},q:function(){return O}});function O(H){return H[1]}function W(H){return arguments.length?(this._y=H,this):this._y}},68889:function(X,et,M){"use strict";M.d(et,{Z:function(){return W},i:function(){return O}});function O(H){return H[2]}function W(H){return arguments.length?(this._z=H,this):this._z}},60272:function(X,et,M){"use strict";M.d(et,{H:function(){return H},Z:function(){return O}});function O(L){const I=+this._x.call(null,L),N=+this._y.call(null,L);return W(this.cover(I,N),I,N,L)}function W(L,I,N,P){if(isNaN(I)||isNaN(N))return L;var k,U=L._root,Z={data:P},V=L._x0,Y=L._y0,nt=L._x1,rt=L._y1,ft,ct,it,vt,gt,yt,mt,Mt;if(!U)return L._root=Z,L;for(;U.length;)if((gt=I>=(ft=(V+nt)/2))?V=ft:nt=ft,(yt=N>=(ct=(Y+rt)/2))?Y=ct:rt=ct,k=U,!(U=U[mt=yt<<1|gt]))return k[mt]=Z,L;if(it=+L._x.call(null,U.data),vt=+L._y.call(null,U.data),I===it&&N===vt)return Z.next=U,k?k[mt]=Z:L._root=Z,L;do k=k?k[mt]=new Array(4):L._root=new Array(4),(gt=I>=(ft=(V+nt)/2))?V=ft:nt=ft,(yt=N>=(ct=(Y+rt)/2))?Y=ct:rt=ct;while((mt=yt<<1|gt)===(Mt=(vt>=ct)<<1|it>=ft));return k[Mt]=U,k[mt]=Z,L}function H(L){var I,N,P=L.length,k,U,Z=new Array(P),V=new Array(P),Y=1/0,nt=1/0,rt=-1/0,ft=-1/0;for(N=0;N<P;++N)isNaN(k=+this._x.call(null,I=L[N]))||isNaN(U=+this._y.call(null,I))||(Z[N]=k,V[N]=U,k<Y&&(Y=k),k>rt&&(rt=k),U<nt&&(nt=U),U>ft&&(ft=U));if(Y>rt||nt>ft)return this;for(this.cover(Y,nt).cover(rt,ft),N=0;N<P;++N)W(this,Z[N],V[N],L[N]);return this}},51097:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(W,H){if(isNaN(W=+W)||isNaN(H=+H))return this;var L=this._x0,I=this._y0,N=this._x1,P=this._y1;if(isNaN(L))N=(L=Math.floor(W))+1,P=(I=Math.floor(H))+1;else{for(var k=N-L||1,U=this._root,Z,V;L>W||W>=N||I>H||H>=P;)switch(V=(H<I)<<1|W<L,Z=new Array(4),Z[V]=U,U=Z,k*=2,V){case 0:N=L+k,P=I+k;break;case 1:L=N-k,P=I+k;break;case 2:N=L+k,I=P-k;break;case 3:L=N-k,I=P-k;break}this._root&&this._root.length&&(this._root=U)}return this._x0=L,this._y0=I,this._x1=N,this._y1=P,this}},58007:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(){var W=[];return this.visit(function(H){if(!H.length)do W.push(H.data);while(H=H.next)}),W}},12070:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(W){return arguments.length?this.cover(+W[0][0],+W[0][1]).cover(+W[1][0],+W[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}},47064:function(X,et,M){"use strict";M.d(et,{Z:function(){return W}});var O=M(44213);function W(H,L,I){var N,P=this._x0,k=this._y0,U,Z,V,Y,nt=this._x1,rt=this._y1,ft=[],ct=this._root,it,vt;for(ct&&ft.push(new O.Z(ct,P,k,nt,rt)),I==null?I=1/0:(P=H-I,k=L-I,nt=H+I,rt=L+I,I*=I);it=ft.pop();)if(!(!(ct=it.node)||(U=it.x0)>nt||(Z=it.y0)>rt||(V=it.x1)<P||(Y=it.y1)<k))if(ct.length){var gt=(U+V)/2,yt=(Z+Y)/2;ft.push(new O.Z(ct[3],gt,yt,V,Y),new O.Z(ct[2],U,yt,gt,Y),new O.Z(ct[1],gt,Z,V,yt),new O.Z(ct[0],U,Z,gt,yt)),(vt=(L>=yt)<<1|H>=gt)&&(it=ft[ft.length-1],ft[ft.length-1]=ft[ft.length-1-vt],ft[ft.length-1-vt]=it)}else{var mt=H-+this._x.call(null,ct.data),Mt=L-+this._y.call(null,ct.data),Ct=mt*mt+Mt*Mt;if(Ct<I){var Nt=Math.sqrt(I=Ct);P=H-Nt,k=L-Nt,nt=H+Nt,rt=L+Nt,N=ct.data}}return N}},44213:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(W,H,L,I,N){this.node=W,this.x0=H,this.y0=L,this.x1=I,this.y1=N}},14301:function(X,et,M){"use strict";M.d(et,{Z:function(){return nt}});var O=M(60272),W=M(51097),H=M(58007),L=M(12070),I=M(47064),N=M(88866),P=M(10864),k=M(68984),U=M(3715),Z=M(73607),V=M(56570),Y=M(30992);function nt(it,vt,gt){var yt=new rt(vt==null?V.P:vt,gt==null?Y.q:gt,NaN,NaN,NaN,NaN);return it==null?yt:yt.addAll(it)}function rt(it,vt,gt,yt,mt,Mt){this._x=it,this._y=vt,this._x0=gt,this._y0=yt,this._x1=mt,this._y1=Mt,this._root=void 0}function ft(it){for(var vt={data:it.data},gt=vt;it=it.next;)gt=gt.next={data:it.data};return vt}var ct=nt.prototype=rt.prototype;ct.copy=function(){var it=new rt(this._x,this._y,this._x0,this._y0,this._x1,this._y1),vt=this._root,gt,yt;if(!vt)return it;if(!vt.length)return it._root=ft(vt),it;for(gt=[{source:vt,target:it._root=new Array(4)}];vt=gt.pop();)for(var mt=0;mt<4;++mt)(yt=vt.source[mt])&&(yt.length?gt.push({source:yt,target:vt.target[mt]=new Array(4)}):vt.target[mt]=ft(yt));return it},ct.add=O.Z,ct.addAll=O.H,ct.cover=W.Z,ct.data=H.Z,ct.extent=L.Z,ct.find=I.Z,ct.remove=N.Z,ct.removeAll=N.x,ct.root=P.Z,ct.size=k.Z,ct.visit=U.Z,ct.visitAfter=Z.Z,ct.x=V.Z,ct.y=Y.Z},88866:function(X,et,M){"use strict";M.d(et,{Z:function(){return O},x:function(){return W}});function O(H){if(isNaN(nt=+this._x.call(null,H))||isNaN(rt=+this._y.call(null,H)))return this;var L,I=this._root,N,P,k,U=this._x0,Z=this._y0,V=this._x1,Y=this._y1,nt,rt,ft,ct,it,vt,gt,yt;if(!I)return this;if(I.length)for(;;){if((it=nt>=(ft=(U+V)/2))?U=ft:V=ft,(vt=rt>=(ct=(Z+Y)/2))?Z=ct:Y=ct,L=I,!(I=I[gt=vt<<1|it]))return this;if(!I.length)break;(L[gt+1&3]||L[gt+2&3]||L[gt+3&3])&&(N=L,yt=gt)}for(;I.data!==H;)if(P=I,!(I=I.next))return this;return(k=I.next)&&delete I.next,P?(k?P.next=k:delete P.next,this):L?(k?L[gt]=k:delete L[gt],(I=L[0]||L[1]||L[2]||L[3])&&I===(L[3]||L[2]||L[1]||L[0])&&!I.length&&(N?N[yt]=I:this._root=I),this):(this._root=k,this)}function W(H){for(var L=0,I=H.length;L<I;++L)this.remove(H[L]);return this}},10864:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(){return this._root}},68984:function(X,et,M){"use strict";M.d(et,{Z:function(){return O}});function O(){var W=0;return this.visit(function(H){if(!H.length)do++W;while(H=H.next)}),W}},3715:function(X,et,M){"use strict";M.d(et,{Z:function(){return W}});var O=M(44213);function W(H){var L=[],I,N=this._root,P,k,U,Z,V;for(N&&L.push(new O.Z(N,this._x0,this._y0,this._x1,this._y1));I=L.pop();)if(!H(N=I.node,k=I.x0,U=I.y0,Z=I.x1,V=I.y1)&&N.length){var Y=(k+Z)/2,nt=(U+V)/2;(P=N[3])&&L.push(new O.Z(P,Y,nt,Z,V)),(P=N[2])&&L.push(new O.Z(P,k,nt,Y,V)),(P=N[1])&&L.push(new O.Z(P,Y,U,Z,nt)),(P=N[0])&&L.push(new O.Z(P,k,U,Y,nt))}return this}},73607:function(X,et,M){"use strict";M.d(et,{Z:function(){return W}});var O=M(44213);function W(H){var L=[],I=[],N;for(this._root&&L.push(new O.Z(this._root,this._x0,this._y0,this._x1,this._y1));N=L.pop();){var P=N.node;if(P.length){var k,U=N.x0,Z=N.y0,V=N.x1,Y=N.y1,nt=(U+V)/2,rt=(Z+Y)/2;(k=P[0])&&L.push(new O.Z(k,U,Z,nt,rt)),(k=P[1])&&L.push(new O.Z(k,nt,Z,V,rt)),(k=P[2])&&L.push(new O.Z(k,U,rt,nt,Y)),(k=P[3])&&L.push(new O.Z(k,nt,rt,V,Y))}I.push(N)}for(;N=I.pop();)H(N.node,N.x0,N.y0,N.x1,N.y1);return this}},56570:function(X,et,M){"use strict";M.d(et,{P:function(){return O},Z:function(){return W}});function O(H){return H[0]}function W(H){return arguments.length?(this._x=H,this):this._x}},30992:function(X,et,M){"use strict";M.d(et,{Z:function(){return W},q:function(){return O}});function O(H){return H[1]}function W(H){return arguments.length?(this._y=H,this):this._y}},83833:function(X,et,M){"use strict";M.d(et,{HT:function(){return ft}});var O=0,W=0,H=0,L=1e3,I,N,P=0,k=0,U=0,Z=typeof performance=="object"&&performance.now?performance:Date,V=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(mt){setTimeout(mt,17)};function Y(){return k||(V(nt),k=Z.now()+U)}function nt(){k=0}function rt(){this._call=this._time=this._next=null}rt.prototype=ft.prototype={constructor:rt,restart:function(mt,Mt,Ct){if(typeof mt!="function")throw new TypeError("callback is not a function");Ct=(Ct==null?Y():+Ct)+(Mt==null?0:+Mt),!this._next&&N!==this&&(N?N._next=this:I=this,N=this),this._call=mt,this._time=Ct,yt()},stop:function(){this._call&&(this._call=null,this._time=1/0,yt())}};function ft(mt,Mt,Ct){var Nt=new rt;return Nt.restart(mt,Mt,Ct),Nt}function ct(){Y(),++O;for(var mt=I,Mt;mt;)(Mt=k-mt._time)>=0&&mt._call.call(void 0,Mt),mt=mt._next;--O}function it(){k=(P=Z.now())+U,O=W=0;try{ct()}finally{O=0,gt(),k=0}}function vt(){var mt=Z.now(),Mt=mt-P;Mt>L&&(U-=Mt,P=mt)}function gt(){for(var mt,Mt=I,Ct,Nt=1/0;Mt;)Mt._call?(Nt>Mt._time&&(Nt=Mt._time),mt=Mt,Mt=Mt._next):(Ct=Mt._next,Mt._next=null,Mt=mt?mt._next=Ct:I=Ct);N=mt,yt(Nt)}function yt(mt){if(!O){W&&(W=clearTimeout(W));var Mt=mt-k;Mt>24?(mt<1/0&&(W=setTimeout(it,mt-Z.now()-U)),H&&(H=clearInterval(H))):(H||(P=Z.now(),H=setInterval(vt,L)),O=1,V(it))}}},80813:function(X,et,M){"use strict";M.d(et,{CR:function(){return it},Jh:function(){return nt},Q_:function(){return Me},XA:function(){return ct},ZT:function(){return W},_T:function(){return L},ev:function(){return yt},mG:function(){return Y},pi:function(){return H},pr:function(){return gt}});var O=function(Ht,zt){return O=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Zt,Et){Zt.__proto__=Et}||function(Zt,Et){for(var It in Et)Object.prototype.hasOwnProperty.call(Et,It)&&(Zt[It]=Et[It])},O(Ht,zt)};function W(Ht,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Class extends value "+String(zt)+" is not a constructor or null");O(Ht,zt);function Zt(){this.constructor=Ht}Ht.prototype=zt===null?Object.create(zt):(Zt.prototype=zt.prototype,new Zt)}var H=function(){return H=Object.assign||function(zt){for(var Zt,Et=1,It=arguments.length;Et<It;Et++){Zt=arguments[Et];for(var Ut in Zt)Object.prototype.hasOwnProperty.call(Zt,Ut)&&(zt[Ut]=Zt[Ut])}return zt},H.apply(this,arguments)};function L(Ht,zt){var Zt={};for(var Et in Ht)Object.prototype.hasOwnProperty.call(Ht,Et)&&zt.indexOf(Et)<0&&(Zt[Et]=Ht[Et]);if(Ht!=null&&typeof Object.getOwnPropertySymbols=="function")for(var It=0,Et=Object.getOwnPropertySymbols(Ht);It<Et.length;It++)zt.indexOf(Et[It])<0&&Object.prototype.propertyIsEnumerable.call(Ht,Et[It])&&(Zt[Et[It]]=Ht[Et[It]]);return Zt}function I(Ht,zt,Zt,Et){var It=arguments.length,Ut=It<3?zt:Et===null?Et=Object.getOwnPropertyDescriptor(zt,Zt):Et,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ut=Reflect.decorate(Ht,zt,Zt,Et);else for(var be=Ht.length-1;be>=0;be--)(ne=Ht[be])&&(Ut=(It<3?ne(Ut):It>3?ne(zt,Zt,Ut):ne(zt,Zt))||Ut);return It>3&&Ut&&Object.defineProperty(zt,Zt,Ut),Ut}function N(Ht,zt){return function(Zt,Et){zt(Zt,Et,Ht)}}function P(Ht,zt,Zt,Et,It,Ut){function ne(Gr){if(Gr!==void 0&&typeof Gr!="function")throw new TypeError("Function expected");return Gr}for(var be=Et.kind,_e=be==="getter"?"get":be==="setter"?"set":"value",Te=!zt&&Ht?Et.static?Ht:Ht.prototype:null,rn=zt||(Te?Object.getOwnPropertyDescriptor(Te,Et.name):{}),rr,sr=!1,Ge=Zt.length-1;Ge>=0;Ge--){var Ke={};for(var me in Et)Ke[me]=me==="access"?{}:Et[me];for(var me in Et.access)Ke.access[me]=Et.access[me];Ke.addInitializer=function(Gr){if(sr)throw new TypeError("Cannot add initializers after decoration has completed");Ut.push(ne(Gr||null))};var We=(0,Zt[Ge])(be==="accessor"?{get:rn.get,set:rn.set}:rn[_e],Ke);if(be==="accessor"){if(We===void 0)continue;if(We===null||typeof We!="object")throw new TypeError("Object expected");(rr=ne(We.get))&&(rn.get=rr),(rr=ne(We.set))&&(rn.set=rr),(rr=ne(We.init))&&It.unshift(rr)}else(rr=ne(We))&&(be==="field"?It.unshift(rr):rn[_e]=rr)}Te&&Object.defineProperty(Te,Et.name,rn),sr=!0}function k(Ht,zt,Zt){for(var Et=arguments.length>2,It=0;It<zt.length;It++)Zt=Et?zt[It].call(Ht,Zt):zt[It].call(Ht);return Et?Zt:void 0}function U(Ht){return typeof Ht=="symbol"?Ht:"".concat(Ht)}function Z(Ht,zt,Zt){return typeof zt=="symbol"&&(zt=zt.description?"[".concat(zt.description,"]"):""),Object.defineProperty(Ht,"name",{configurable:!0,value:Zt?"".concat(Zt," ",zt):zt})}function V(Ht,zt){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Ht,zt)}function Y(Ht,zt,Zt,Et){function It(Ut){return Ut instanceof Zt?Ut:new Zt(function(ne){ne(Ut)})}return new(Zt||(Zt=Promise))(function(Ut,ne){function be(rn){try{Te(Et.next(rn))}catch(rr){ne(rr)}}function _e(rn){try{Te(Et.throw(rn))}catch(rr){ne(rr)}}function Te(rn){rn.done?Ut(rn.value):It(rn.value).then(be,_e)}Te((Et=Et.apply(Ht,zt||[])).next())})}function nt(Ht,zt){var Zt={label:0,sent:function(){if(Ut[0]&1)throw Ut[1];return Ut[1]},trys:[],ops:[]},Et,It,Ut,ne=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return ne.next=be(0),ne.throw=be(1),ne.return=be(2),typeof Symbol=="function"&&(ne[Symbol.iterator]=function(){return this}),ne;function be(Te){return function(rn){return _e([Te,rn])}}function _e(Te){if(Et)throw new TypeError("Generator is already executing.");for(;ne&&(ne=0,Te[0]&&(Zt=0)),Zt;)try{if(Et=1,It&&(Ut=Te[0]&2?It.return:Te[0]?It.throw||((Ut=It.return)&&Ut.call(It),0):It.next)&&!(Ut=Ut.call(It,Te[1])).done)return Ut;switch(It=0,Ut&&(Te=[Te[0]&2,Ut.value]),Te[0]){case 0:case 1:Ut=Te;break;case 4:return Zt.label++,{value:Te[1],done:!1};case 5:Zt.label++,It=Te[1],Te=[0];continue;case 7:Te=Zt.ops.pop(),Zt.trys.pop();continue;default:if(Ut=Zt.trys,!(Ut=Ut.length>0&&Ut[Ut.length-1])&&(Te[0]===6||Te[0]===2)){Zt=0;continue}if(Te[0]===3&&(!Ut||Te[1]>Ut[0]&&Te[1]<Ut[3])){Zt.label=Te[1];break}if(Te[0]===6&&Zt.label<Ut[1]){Zt.label=Ut[1],Ut=Te;break}if(Ut&&Zt.label<Ut[2]){Zt.label=Ut[2],Zt.ops.push(Te);break}Ut[2]&&Zt.ops.pop(),Zt.trys.pop();continue}Te=zt.call(Ht,Zt)}catch(rn){Te=[6,rn],It=0}finally{Et=Ut=0}if(Te[0]&5)throw Te[1];return{value:Te[0]?Te[1]:void 0,done:!0}}}var rt=Object.create?function(Ht,zt,Zt,Et){Et===void 0&&(Et=Zt);var It=Object.getOwnPropertyDescriptor(zt,Zt);(!It||("get"in It?!zt.__esModule:It.writable||It.configurable))&&(It={enumerable:!0,get:function(){return zt[Zt]}}),Object.defineProperty(Ht,Et,It)}:function(Ht,zt,Zt,Et){Et===void 0&&(Et=Zt),Ht[Et]=zt[Zt]};function ft(Ht,zt){for(var Zt in Ht)Zt!=="default"&&!Object.prototype.hasOwnProperty.call(zt,Zt)&&rt(zt,Ht,Zt)}function ct(Ht){var zt=typeof Symbol=="function"&&Symbol.iterator,Zt=zt&&Ht[zt],Et=0;if(Zt)return Zt.call(Ht);if(Ht&&typeof Ht.length=="number")return{next:function(){return Ht&&Et>=Ht.length&&(Ht=void 0),{value:Ht&&Ht[Et++],done:!Ht}}};throw new TypeError(zt?"Object is not iterable.":"Symbol.iterator is not defined.")}function it(Ht,zt){var Zt=typeof Symbol=="function"&&Ht[Symbol.iterator];if(!Zt)return Ht;var Et=Zt.call(Ht),It,Ut=[],ne;try{for(;(zt===void 0||zt-- >0)&&!(It=Et.next()).done;)Ut.push(It.value)}catch(be){ne={error:be}}finally{try{It&&!It.done&&(Zt=Et.return)&&Zt.call(Et)}finally{if(ne)throw ne.error}}return Ut}function vt(){for(var Ht=[],zt=0;zt<arguments.length;zt++)Ht=Ht.concat(it(arguments[zt]));return Ht}function gt(){for(var Ht=0,zt=0,Zt=arguments.length;zt<Zt;zt++)Ht+=arguments[zt].length;for(var Et=Array(Ht),It=0,zt=0;zt<Zt;zt++)for(var Ut=arguments[zt],ne=0,be=Ut.length;ne<be;ne++,It++)Et[It]=Ut[ne];return Et}function yt(Ht,zt,Zt){if(Zt||arguments.length===2)for(var Et=0,It=zt.length,Ut;Et<It;Et++)(Ut||!(Et in zt))&&(Ut||(Ut=Array.prototype.slice.call(zt,0,Et)),Ut[Et]=zt[Et]);return Ht.concat(Ut||Array.prototype.slice.call(zt))}function mt(Ht){return this instanceof mt?(this.v=Ht,this):new mt(Ht)}function Mt(Ht,zt,Zt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var Et=Zt.apply(Ht,zt||[]),It,Ut=[];return It=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),be("next"),be("throw"),be("return",ne),It[Symbol.asyncIterator]=function(){return this},It;function ne(Ge){return function(Ke){return Promise.resolve(Ke).then(Ge,rr)}}function be(Ge,Ke){Et[Ge]&&(It[Ge]=function(me){return new Promise(function(We,Gr){Ut.push([Ge,me,We,Gr])>1||_e(Ge,me)})},Ke&&(It[Ge]=Ke(It[Ge])))}function _e(Ge,Ke){try{Te(Et[Ge](Ke))}catch(me){sr(Ut[0][3],me)}}function Te(Ge){Ge.value instanceof mt?Promise.resolve(Ge.value.v).then(rn,rr):sr(Ut[0][2],Ge)}function rn(Ge){_e("next",Ge)}function rr(Ge){_e("throw",Ge)}function sr(Ge,Ke){Ge(Ke),Ut.shift(),Ut.length&&_e(Ut[0][0],Ut[0][1])}}function Ct(Ht){var zt,Zt;return zt={},Et("next"),Et("throw",function(It){throw It}),Et("return"),zt[Symbol.iterator]=function(){return this},zt;function Et(It,Ut){zt[It]=Ht[It]?function(ne){return(Zt=!Zt)?{value:mt(Ht[It](ne)),done:!1}:Ut?Ut(ne):ne}:Ut}}function Nt(Ht){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var zt=Ht[Symbol.asyncIterator],Zt;return zt?zt.call(Ht):(Ht=typeof ct=="function"?ct(Ht):Ht[Symbol.iterator](),Zt={},Et("next"),Et("throw"),Et("return"),Zt[Symbol.asyncIterator]=function(){return this},Zt);function Et(Ut){Zt[Ut]=Ht[Ut]&&function(ne){return new Promise(function(be,_e){ne=Ht[Ut](ne),It(be,_e,ne.done,ne.value)})}}function It(Ut,ne,be,_e){Promise.resolve(_e).then(function(Te){Ut({value:Te,done:be})},ne)}}function qt(Ht,zt){return Object.defineProperty?Object.defineProperty(Ht,"raw",{value:zt}):Ht.raw=zt,Ht}var Gt=Object.create?function(Ht,zt){Object.defineProperty(Ht,"default",{enumerable:!0,value:zt})}:function(Ht,zt){Ht.default=zt},re=function(Ht){return re=Object.getOwnPropertyNames||function(zt){var Zt=[];for(var Et in zt)Object.prototype.hasOwnProperty.call(zt,Et)&&(Zt[Zt.length]=Et);return Zt},re(Ht)};function de(Ht){if(Ht&&Ht.__esModule)return Ht;var zt={};if(Ht!=null)for(var Zt=re(Ht),Et=0;Et<Zt.length;Et++)Zt[Et]!=="default"&&rt(zt,Ht,Zt[Et]);return Gt(zt,Ht),zt}function ue(Ht){return Ht&&Ht.__esModule?Ht:{default:Ht}}function Me(Ht,zt,Zt,Et){if(Zt==="a"&&!Et)throw new TypeError("Private accessor was defined without a getter");if(typeof zt=="function"?Ht!==zt||!Et:!zt.has(Ht))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Zt==="m"?Et:Zt==="a"?Et.call(Ht):Et?Et.value:zt.get(Ht)}function Ve(Ht,zt,Zt,Et,It){if(Et==="m")throw new TypeError("Private method is not writable");if(Et==="a"&&!It)throw new TypeError("Private accessor was defined without a setter");if(typeof zt=="function"?Ht!==zt||!It:!zt.has(Ht))throw new TypeError("Cannot write private member to an object whose class did not declare it");return Et==="a"?It.call(Ht,Zt):It?It.value=Zt:zt.set(Ht,Zt),Zt}function dn(Ht,zt){if(zt===null||typeof zt!="object"&&typeof zt!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof Ht=="function"?zt===Ht:Ht.has(zt)}function Xn(Ht,zt,Zt){if(zt!=null){if(typeof zt!="object"&&typeof zt!="function")throw new TypeError("Object expected.");var Et,It;if(Zt){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");Et=zt[Symbol.asyncDispose]}if(Et===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");Et=zt[Symbol.dispose],Zt&&(It=Et)}if(typeof Et!="function")throw new TypeError("Object not disposable.");It&&(Et=function(){try{It.call(this)}catch(Ut){return Promise.reject(Ut)}}),Ht.stack.push({value:zt,dispose:Et,async:Zt})}else Zt&&Ht.stack.push({async:!0});return zt}var Xr=typeof SuppressedError=="function"?SuppressedError:function(Ht,zt,Zt){var Et=new Error(Zt);return Et.name="SuppressedError",Et.error=Ht,Et.suppressed=zt,Et};function Vi(Ht){function zt(Ut){Ht.error=Ht.hasError?new Xr(Ut,Ht.error,"An error was suppressed during disposal."):Ut,Ht.hasError=!0}var Zt,Et=0;function It(){for(;Zt=Ht.stack.pop();)try{if(!Zt.async&&Et===1)return Et=0,Ht.stack.push(Zt),Promise.resolve().then(It);if(Zt.dispose){var Ut=Zt.dispose.call(Zt.value);if(Zt.async)return Et|=2,Promise.resolve(Ut).then(It,function(ne){return zt(ne),It()})}else Et|=1}catch(ne){zt(ne)}if(Et===1)return Ht.hasError?Promise.reject(Ht.error):Promise.resolve();if(Ht.hasError)throw Ht.error}return It()}function is(Ht,zt){return typeof Ht=="string"&&/^\.\.?\//.test(Ht)?Ht.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(Zt,Et,It,Ut,ne){return Et?zt?".jsx":".js":It&&(!Ut||!ne)?Zt:It+Ut+"."+ne.toLowerCase()+"js"}):Ht}var Ao={__extends:W,__assign:H,__rest:L,__decorate:I,__param:N,__esDecorate:P,__runInitializers:k,__propKey:U,__setFunctionName:Z,__metadata:V,__awaiter:Y,__generator:nt,__createBinding:rt,__exportStar:ft,__values:ct,__read:it,__spread:vt,__spreadArrays:gt,__spreadArray:yt,__await:mt,__asyncGenerator:Mt,__asyncDelegator:Ct,__asyncValues:Nt,__makeTemplateObject:qt,__importStar:de,__importDefault:ue,__classPrivateFieldGet:Me,__classPrivateFieldSet:Ve,__classPrivateFieldIn:dn,__addDisposableResource:Xn,__disposeResources:Vi,__rewriteRelativeImportExtension:is}}}]);
}());