|
|
!(function(){var D8=Object.defineProperty,P8=Object.defineProperties;var _8=Object.getOwnPropertyDescriptors;var RM=Object.getOwnPropertySymbols;var H8=Object.prototype.hasOwnProperty,G8=Object.prototype.propertyIsEnumerable;var PA=Math.pow,hw=(X,st,T)=>st in X?D8(X,st,{enumerable:!0,configurable:!0,writable:!0,value:T}):X[st]=T,lu=(X,st)=>{for(var T in st||(st={}))H8.call(st,T)&&hw(X,T,st[T]);if(RM)for(var T of RM(st))G8.call(st,T)&&hw(X,T,st[T]);return X},dw=(X,st)=>P8(X,_8(st));var wr=(X,st,T)=>hw(X,typeof st!="symbol"?st+"":st,T);(self.webpackChunk=self.webpackChunk||[]).push([[1791],{88055:function(X,st,T){"use strict";T.d(st,{kJ:function(){return rv},RN:function(){return E8}});var I={};T.r(I),T.d(I,{add:function(){return ad},adjoint:function(){return Ft},clone:function(){return Ee},copy:function(){return He},create:function(){return $t},decompose:function(){return uu},determinant:function(){return te},equals:function(){return gv},exactEquals:function(){return Kr},frob:function(){return id},fromQuat:function(){return KA},fromQuat2:function(){return ei},fromRotation:function(){return qi},fromRotationTranslation:function(){return ti},fromRotationTranslationScale:function(){return go},fromRotationTranslationScaleOrigin:function(){return vo},fromScaling:function(){return Dn},fromTranslation:function(){return Tr},fromValues:function(){return je},fromXRotation:function(){return $i},fromYRotation:function(){return fn},fromZRotation:function(){return Er},frustum:function(){return hu},getRotation:function(){return Xo},getScaling:function(){return Ds},getTranslation:function(){return Pn},identity:function(){return Ie},invert:function(){return on},lookAt:function(){return rd},mul:function(){return po},multiply:function(){return ue},multiplyScalar:function(){return dv},multiplyScalarAndAdd:function(){return fv},ortho:function(){return gu},orthoNO:function(){return fu},orthoZO:function(){return vu},perspective:function(){return du},perspectiveFromFieldOfView:function(){return Za},perspectiveNO:function(){return Xl},perspectiveZO:function(){return cv},rotate:function(){return Qn},rotateX:function(){return jn},rotateY:function(){return qn},rotateZ:function(){return Qr},scale:function(){return Jn},set:function(){return Wn},str:function(){return hv},sub:function(){return vv},subtract:function(){return pu},targetTo:function(){return uv},translate:function(){return se},transpose:function(){return De}});var W={};T.r(W),T.d(W,{circle:function(){return AQ},diamond:function(){return lQ},rect:function(){return uQ},simple:function(){return dQ},triangle:function(){return Ex},triangleRect:function(){return hQ},vee:function(){return cQ}});var z=T(85899),P=T(38705),N=T(17212),G=T(77654),K=T(96885),_=T(39153),H=T(72190),J=T(94856),Z=J,$=1e-6,ct=typeof Float32Array!="undefined"?Float32Array:Array,ht=Math.random,Ct="zyx";function pt(r){return r>=0?Math.round(r):r%.5===0?Math.floor(r):Math.round(r)}function ut(r){ct=r}var Bt=Math.PI/180,wt=180/Math.PI;function Tt(r){return r*Bt}function kt(r){return r*wt}function _t(r,t){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:$;return Math.abs(r-t)<=e*Math.max(1,Math.abs(r),Math.abs(t))}function Ot(){var r=new ct(3);return ct!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r}function Gt(r){var t=new ct(3);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t}function ae(r){var t=r[0],e=r[1],n=r[2];return Math.sqrt(t*t+e*e+n*n)}function Wt(r,t,e){var n=new ct(3);return n[0]=r,n[1]=t,n[2]=e,n}function ie(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}function ve(r,t,e,n){return r[0]=t,r[1]=e,r[2]=n,r}function de(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r[2]=t[2]+e[2],r}function Oe(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r[2]=t[2]-e[2],r}function sn(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 Jr(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r[2]=Math.floor(t[2]),r}function ji(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 As(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 ho(r,t){return r[0]=glMatrix.round(t[0]),r[1]=glMatrix.round(t[1]),r[2]=glMatrix.round(t[2]),r}function Pt(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 jt(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 gt(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 Mt(r){var t=r[0],e=r[1],n=r[2];return t*t+e*e+n*n}function Lt(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r}function ee(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 Me(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 nn(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 or(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 ze(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 Ve(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 zr(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 Zi(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 Wa(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 kr(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 Fr(r){return r[0]=0,r[1]=0,r[2]=0,r}function fi(r){return"vec3("+r[0]+", "+r[1]+", "+r[2]+")"}function ls(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}function Yi(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)<=$*Math.max(1,Math.abs(e),Math.abs(a))&&Math.abs(n-s)<=$*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(i-o)<=$*Math.max(1,Math.abs(i),Math.abs(o))}var cs=Oe,Li=null,qr=null,Ba=jt,ba=null,la=ae,xa=null,$r=function(){var r=Ot();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 Ar(){var r=new ct(4);return ct!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0,r[3]=0),r}function jo(r){var t=new ct(4);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}function Xi(r,t,e,n){var i=new ct(4);return i[0]=r,i[1]=t,i[2]=e,i[3]=n,i}function Ji(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}function fo(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function ja(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 _A(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 Rs(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 HA(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 Vl(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 cu(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 ed(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 nd(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 Wl(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 GA(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 jl(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 Ca(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 zA(r){var t=r[0],e=r[1],n=r[2],i=r[3];return t*t+e*e+n*n+i*i}function Yo(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r[3]=-t[3],r}function Zl(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 Yl(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 Y(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]*t[3]}function C(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 w(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 M(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 k(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 nt(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}function rt(r){return"vec4("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+")"}function ot(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]&&r[3]===t[3]}function At(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 It=null,vt=null,Zt=null,ce=null,Ht=null,qt=null,Ce=null,Et=function(){var r=Ar();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 $t(){var r=new ct(16);return ct!=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 ct(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 ct(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],p=t[15],y=e*o-n*s,x=e*A-i*s,F=e*l-a*s,O=n*A-i*o,L=n*l-a*o,U=i*l-a*A,R=c*g-u*f,j=c*v-h*f,q=c*p-d*f,et=u*v-h*g,it=u*p-d*g,dt=h*p-d*v,ft=y*dt-x*it+F*et+O*q-L*j+U*R;return ft?(ft=1/ft,r[0]=(o*dt-A*it+l*et)*ft,r[1]=(i*it-n*dt-a*et)*ft,r[2]=(g*U-v*L+p*O)*ft,r[3]=(h*L-u*U-d*O)*ft,r[4]=(A*q-s*dt-l*j)*ft,r[5]=(e*dt-i*q+a*j)*ft,r[6]=(v*F-f*U-p*x)*ft,r[7]=(c*U-h*F+d*x)*ft,r[8]=(s*it-o*q+l*R)*ft,r[9]=(n*q-e*it-a*R)*ft,r[10]=(f*L-g*F+p*y)*ft,r[11]=(u*F-c*L-d*y)*ft,r[12]=(o*j-s*et-A*R)*ft,r[13]=(e*et-n*j+i*R)*ft,r[14]=(g*x-f*O-v*y)*ft,r[15]=(c*O-u*x+h*y)*ft,r):null}function Ft(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],p=t[15],y=e*o-n*s,x=e*A-i*s,F=e*l-a*s,O=n*A-i*o,L=n*l-a*o,U=i*l-a*A,R=c*g-u*f,j=c*v-h*f,q=c*p-d*f,et=u*v-h*g,it=u*p-d*g,dt=h*p-d*v;return r[0]=o*dt-A*it+l*et,r[1]=i*it-n*dt-a*et,r[2]=g*U-v*L+p*O,r[3]=h*L-u*U-d*O,r[4]=A*q-s*dt-l*j,r[5]=e*dt-i*q+a*j,r[6]=v*F-f*U-p*x,r[7]=c*U-h*F+d*x,r[8]=s*it-o*q+l*R,r[9]=n*q-e*it-a*R,r[10]=f*L-g*F+p*y,r[11]=u*F-c*L-d*y,r[12]=o*j-s*et-A*R,r[13]=e*et-n*j+i*R,r[14]=g*x-f*O-v*y,r[15]=c*O-u*x+h*y,r}function te(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],p=t*s-e*a,y=t*o-n*a,x=e*o-n*s,F=l*f-c*d,O=l*g-u*d,L=c*g-u*f,U=t*L-e*O+n*F,R=a*L-s*O+o*F,j=l*x-c*y+u*p,q=d*x-f*y+g*p;return A*U-i*R+v*j-h*q}function ue(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],p=t[14],y=t[15],x=e[0],F=e[1],O=e[2],L=e[3];return r[0]=x*n+F*o+O*u+L*g,r[1]=x*i+F*A+O*h+L*v,r[2]=x*a+F*l+O*d+L*p,r[3]=x*s+F*c+O*f+L*y,x=e[4],F=e[5],O=e[6],L=e[7],r[4]=x*n+F*o+O*u+L*g,r[5]=x*i+F*A+O*h+L*v,r[6]=x*a+F*l+O*d+L*p,r[7]=x*s+F*c+O*f+L*y,x=e[8],F=e[9],O=e[10],L=e[11],r[8]=x*n+F*o+O*u+L*g,r[9]=x*i+F*A+O*h+L*v,r[10]=x*a+F*l+O*d+L*p,r[11]=x*s+F*c+O*f+L*y,x=e[12],F=e[13],O=e[14],L=e[15],r[12]=x*n+F*o+O*u+L*g,r[13]=x*i+F*A+O*h+L*v,r[14]=x*a+F*l+O*d+L*p,r[15]=x*s+F*c+O*f+L*y,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,p;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],p=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]=p,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+p*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,p,y,x,F,O,L,U,R,j,q,et,it,dt,ft,mt;return o<$?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],p=t[6],y=t[7],x=t[8],F=t[9],O=t[10],L=t[11],U=i*i*c+l,R=a*i*c+s*A,j=s*i*c-a*A,q=i*a*c-s*A,et=a*a*c+l,it=s*a*c+i*A,dt=i*s*c+a*A,ft=a*s*c-i*A,mt=s*s*c+l,r[0]=u*U+g*R+x*j,r[1]=h*U+v*R+F*j,r[2]=d*U+p*R+O*j,r[3]=f*U+y*R+L*j,r[4]=u*q+g*et+x*it,r[5]=h*q+v*et+F*it,r[6]=d*q+p*et+O*it,r[7]=f*q+y*et+L*it,r[8]=u*dt+g*ft+x*mt,r[9]=h*dt+v*ft+F*mt,r[10]=d*dt+p*ft+O*mt,r[11]=f*dt+y*ft+L*mt,t!==r&&(r[12]=t[12],r[13]=t[13],r[14]=t[14],r[15]=t[15]),r)}function jn(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 Qr(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 qi(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<$?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 $i(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 Er(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 ti(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,p=s*A,y=s*l;return r[0]=1-(d+g),r[1]=u+y,r[2]=h-p,r[3]=0,r[4]=u-y,r[5]=1-(c+g),r[6]=f+v,r[7]=0,r[8]=h+p,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 ei(r,t){var e=new ct(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),ti(r,t,e),r}function Pn(r,t){return r[0]=t[12],r[1]=t[13],r[2]=t[14],r}function Ds(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 Xo(r,t){var e=new ct(3);Ds(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 uu(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,p=a*f,y=s*g,x=o*d,F=A*f,O=l*g,L=c*d,U=u*f,R=h*g,j=v+F+R,q=0;return j>0?(q=Math.sqrt(j+1)*2,r[3]=.25*q,r[0]=(O-U)/q,r[1]=(L-y)/q,r[2]=(p-x)/q):v>F&&v>R?(q=Math.sqrt(1+v-F-R)*2,r[3]=(O-U)/q,r[0]=.25*q,r[1]=(p+x)/q,r[2]=(L+y)/q):F>R?(q=Math.sqrt(1+F-v-R)*2,r[3]=(L-y)/q,r[0]=(p+x)/q,r[1]=.25*q,r[2]=(O+U)/q):(q=Math.sqrt(1+R-v-F)*2,r[3]=(p-x)/q,r[0]=(L+y)/q,r[1]=(O+U)/q,r[2]=.25*q),r}function go(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,p=o*A,y=o*l,x=o*c,F=n[0],O=n[1],L=n[2];return r[0]=(1-(f+v))*F,r[1]=(h+x)*F,r[2]=(d-y)*F,r[3]=0,r[4]=(h-x)*O,r[5]=(1-(u+v))*O,r[6]=(g+p)*O,r[7]=0,r[8]=(d+y)*L,r[9]=(g-p)*L,r[10]=(1-(u+f))*L,r[11]=0,r[12]=e[0],r[13]=e[1],r[14]=e[2],r[15]=1,r}function vo(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,p=o*u,y=A*l,x=A*c,F=A*u,O=n[0],L=n[1],U=n[2],R=i[0],j=i[1],q=i[2],et=(1-(g+p))*O,it=(d+F)*O,dt=(f-x)*O,ft=(d-F)*L,mt=(1-(h+p))*L,Rt=(v+y)*L,Qt=(f+x)*U,yt=(v-y)*U,xt=(1-(h+g))*U;return r[0]=et,r[1]=it,r[2]=dt,r[3]=0,r[4]=ft,r[5]=mt,r[6]=Rt,r[7]=0,r[8]=Qt,r[9]=yt,r[10]=xt,r[11]=0,r[12]=e[0]+R-(et*R+ft*j+Qt*q),r[13]=e[1]+j-(it*R+mt*j+yt*q),r[14]=e[2]+q-(dt*R+Rt*j+xt*q),r[15]=1,r}function KA(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,p=a*A;return r[0]=1-u-f,r[1]=c+p,r[2]=h-v,r[3]=0,r[4]=c-p,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 hu(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 Xl(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 du=Xl;function cv(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 fu(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 gu=fu;function vu(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 rd(r,t,e,n){var i,a,s,o,A,l,c,u,h,d,f=t[0],g=t[1],v=t[2],p=n[0],y=n[1],x=n[2],F=e[0],O=e[1],L=e[2];return Math.abs(f-F)<$&&Math.abs(g-O)<$&&Math.abs(v-L)<$?Ie(r):(c=f-F,u=g-O,h=v-L,d=1/Math.sqrt(c*c+u*u+h*h),c*=d,u*=d,h*=d,i=y*h-x*u,a=x*c-p*h,s=p*u-y*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 uv(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 hv(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 id(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 ad(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 pu(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 dv(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 fv(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 gv(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],p=r[15],y=t[0],x=t[1],F=t[2],O=t[3],L=t[4],U=t[5],R=t[6],j=t[7],q=t[8],et=t[9],it=t[10],dt=t[11],ft=t[12],mt=t[13],Rt=t[14],Qt=t[15];return Math.abs(e-y)<=$*Math.max(1,Math.abs(e),Math.abs(y))&&Math.abs(n-x)<=$*Math.max(1,Math.abs(n),Math.abs(x))&&Math.abs(i-F)<=$*Math.max(1,Math.abs(i),Math.abs(F))&&Math.abs(a-O)<=$*Math.max(1,Math.abs(a),Math.abs(O))&&Math.abs(s-L)<=$*Math.max(1,Math.abs(s),Math.abs(L))&&Math.abs(o-U)<=$*Math.max(1,Math.abs(o),Math.abs(U))&&Math.abs(A-R)<=$*Math.max(1,Math.abs(A),Math.abs(R))&&Math.abs(l-j)<=$*Math.max(1,Math.abs(l),Math.abs(j))&&Math.abs(c-q)<=$*Math.max(1,Math.abs(c),Math.abs(q))&&Math.abs(u-et)<=$*Math.max(1,Math.abs(u),Math.abs(et))&&Math.abs(h-it)<=$*Math.max(1,Math.abs(h),Math.abs(it))&&Math.abs(d-dt)<=$*Math.max(1,Math.abs(d),Math.abs(dt))&&Math.abs(f-ft)<=$*Math.max(1,Math.abs(f),Math.abs(ft))&&Math.abs(g-mt)<=$*Math.max(1,Math.abs(g),Math.abs(mt))&&Math.abs(v-Rt)<=$*Math.max(1,Math.abs(v),Math.abs(Rt))&&Math.abs(p-Qt)<=$*Math.max(1,Math.abs(p),Math.abs(Qt))}var po=ue,vv=pu;function sd(){var r=new ct(9);return ct!=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 pv(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 vw(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 mu(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 Jl(r,t,e,n,i,a,s,o,A){var l=new ct(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 mv(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 pw(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 mo(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 yu(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 od(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 mw(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 yw(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],p=e[5],y=e[6],x=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+p*l,r[4]=g*i+v*o+p*c,r[5]=g*a+v*A+p*u,r[6]=y*n+x*s+F*l,r[7]=y*i+x*o+F*c,r[8]=y*a+x*A+F*u,r}function ww(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 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=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 Bw(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 bw(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 xw(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 Cw(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 Sw(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 Mw(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,p=a*A;return r[0]=1-u-f,r[3]=c-p,r[6]=h+v,r[1]=c+p,r[4]=1-l-f,r[7]=d-g,r[2]=h-v,r[5]=d+g,r[8]=1-l-u,r}function Fw(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],p=t[15],y=e*o-n*s,x=e*A-i*s,F=e*l-a*s,O=n*A-i*o,L=n*l-a*o,U=i*l-a*A,R=c*g-u*f,j=c*v-h*f,q=c*p-d*f,et=u*v-h*g,it=u*p-d*g,dt=h*p-d*v,ft=y*dt-x*it+F*et+O*q-L*j+U*R;return ft?(ft=1/ft,r[0]=(o*dt-A*it+l*et)*ft,r[1]=(A*q-s*dt-l*j)*ft,r[2]=(s*it-o*q+l*R)*ft,r[3]=(i*it-n*dt-a*et)*ft,r[4]=(e*dt-i*q+a*j)*ft,r[5]=(n*q-e*it-a*R)*ft,r[6]=(g*U-v*L+p*O)*ft,r[7]=(v*F-f*U-p*x)*ft,r[8]=(f*L-g*F+p*y)*ft,r):null}function Tw(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 wu(r){return"mat3("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+", "+r[4]+", "+r[5]+", "+r[6]+", "+r[7]+", "+r[8]+")"}function Ow(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 Iw(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 Nw(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 Lw(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 kw(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 Qw(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 Uw(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],p=t[6],y=t[7],x=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-p)<=glMatrix.EPSILON*Math.max(1,Math.abs(A),Math.abs(p))&&Math.abs(l-y)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(y))&&Math.abs(c-x)<=glMatrix.EPSILON*Math.max(1,Math.abs(c),Math.abs(x))}var Rw=null,Ad=null;function Br(){var r=new ct(4);return ct!=Float32Array&&(r[0]=0,r[1]=0,r[2]=0),r[3]=1,r}function yv(r){return r[0]=0,r[1]=0,r[2]=0,r[3]=1,r}function ca(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 VA(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=Hs(r,t);return Math.acos(2*e*e-1)}function Ps(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 ld(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 wv(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 WA(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 us(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 Ev(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 _s(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 Ur(r,t,e){return _s(r,t),ua(r,r,e),Ev(r,r),r}function ql(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>$?(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 gi(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 jA(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 yo(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]:Ct,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 Bv(r){return"quat("+r[0]+", "+r[1]+", "+r[2]+", "+r[3]+")"}var bv=jo,cd=Xi,YA=Ji,XA=fo,xv=ja,Eu=Ps,ua=Wl,Hs=Y,wo=S,ni=Ca,Eo=null,Cv=zA,Sv=null,Jo=Yl,Mv=ot;function Dw(r,t){return Math.abs(vec4.dot(r,t))>=1-glMatrix.EPSILON}var $l=function(){var r=Ot(),t=Wt(1,0,0),e=Wt(0,1,0);return function(n,i,a){var s=_e(i,a);return s<-.999999?(Me(r,t,i),la(r)<1e-6&&Me(r,e,i),be(r,r),ca(n,r,Math.PI),n):s>.999999?(n[0]=0,n[1]=0,n[2]=0,n[3]=1,n):(Me(r,i,a),n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=1+s,Jo(n,n))}}(),Gs=function(){var r=Br(),t=Br();return function(e,n,i,a,s,o){return ql(r,n,s,o),ql(t,i,a,o),ql(e,r,t,2*o*(1-o)),e}}(),Pw=function(){var r=sd();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],Jo(t,ZA(t,r))}}();function Bu(){var r=new ct(2);return ct!=Float32Array&&(r[0]=0,r[1]=0),r}function bu(r){var t=new glMatrix.ARRAY_TYPE(2);return t[0]=r[0],t[1]=r[1],t}function Fv(r,t){var e=new glMatrix.ARRAY_TYPE(2);return e[0]=r,e[1]=t,e}function Tv(r,t){return r[0]=t[0],r[1]=t[1],r}function Ov(r,t,e){return r[0]=t,r[1]=e,r}function Ya(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function Iv(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function _w(r,t,e){return r[0]=t[0]*e[0],r[1]=t[1]*e[1],r}function Hw(r,t,e){return r[0]=t[0]/e[0],r[1]=t[1]/e[1],r}function xu(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r}function Gw(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r}function Nv(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function Lv(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}function kv(r,t){return r[0]=glMatrix.round(t[0]),r[1]=glMatrix.round(t[1]),r}function Qv(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function Uv(r,t,e,n){return r[0]=t[0]+e[0]*n,r[1]=t[1]+e[1]*n,r}function Rv(r,t){var e=t[0]-r[0],n=t[1]-r[1];return Math.sqrt(e*e+n*n)}function Dv(r,t){var e=t[0]-r[0],n=t[1]-r[1];return e*e+n*n}function Pv(r){var t=r[0],e=r[1];return Math.sqrt(t*t+e*e)}function zw(r){var t=r[0],e=r[1];return t*t+e*e}function Cu(r,t){return r[0]=-t[0],r[1]=-t[1],r}function Kw(r,t){return r[0]=1/t[0],r[1]=1/t[1],r}function _v(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 Su(r,t){return r[0]*t[0]+r[1]*t[1]}function Vw(r,t,e){var n=t[0]*e[1]-t[1]*e[0];return r[0]=r[1]=0,r[2]=n,r}function Hv(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 Ww(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 jw(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 Zw(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 Yw(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 Xw(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 JA(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 Jw(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 qw(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 Mu(r){return r[0]=0,r[1]=0,r}function $w(r){return"vec2("+r[0]+", "+r[1]+")"}function Gv(r,t){return r[0]===t[0]&&r[1]===t[1]}function tE(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 eE=null,Fu=null,nE=null,rE=null,iE=null,aE=null,Tu=null,sE=function(){var r=Bu();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 ki(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}function Re(r){return r==null}function gn(r){return typeof r=="string"}var zv=function(r,t,e){return r<t?t:r>e?e:r},dr=zv,D=T(80813),qA={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function ud(r){return Array.isArray(r)&&r.every(function(t){var e=t[0].toLowerCase();return qA[e]===t.length-1&&"achlmqstvz".includes(e)})}function hd(r){return ud(r)&&r.every(function(t){var e=t[0];return e===e.toUpperCase()})}function dd(r){return hd(r)&&r.every(function(t){var e=t[0];return"ACLMQZ".includes(e)})}var fd={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function gd(r){for(var t=r.pathValue[r.segmentStart],e=t.toLowerCase(),n=r.data;n.length>=qA[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,qA[e]))),!!qA[e]););}function Kv(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 tc(r){return r>=48&&r<=57||r===43||r===45||r===46}function qo(r){return r>=48&&r<=57}function Vv(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)),!qo(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&&qo(l)){r.err="[path-util]: Invalid path value at index ".concat(n,', "').concat(e[n],'" illegal number');return}for(;i<t&&qo(e.charCodeAt(i));)i+=1,s=!0;l=e.charCodeAt(i)}if(l===46){for(A=!0,i+=1;qo(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&&qo(e.charCodeAt(i)))for(;i<t&&qo(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 vd(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 ec(r){for(var t=r.pathValue,e=r.max;r.index<e&&vd(t.charCodeAt(r.index));)r.index+=1}function Wv(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 Ou(r){return(r|32)===97}function nc(r){var t=r.max,e=r.pathValue,n=r.index,i=e.charCodeAt(n),a=qA[e[n].toLowerCase()];if(r.segmentStart=n,!Wv(i)){r.err='[path-util]: Invalid path value "'.concat(e[n],'" is not a path command');return}if(r.index+=1,ec(r),r.data=[],!a){gd(r);return}for(;;){for(var s=a;s>0;s-=1){if(Ou(i)&&(s===3||s===4)?Kv(r):Vv(r),r.err.length)return;r.data.push(r.param),ec(r),r.index<t&&e.charCodeAt(r.index)===44&&(r.index+=1,ec(r))}if(r.index>=r.max||!tc(e.charCodeAt(r.index)))break}gd(r)}var jv=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 Zv(r){if(ud(r))return[].concat(r);var t=new jv(r);for(ec(t);t.index<t.max&&!t.err.length;)nc(t);return t.err?t.err:t.segments}function Yv(r){if(hd(r))return[].concat(r);var t=Zv(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 Xv(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 rc(r){if(dd(r))return[].concat(r);for(var t=Yv(r),e=(0,D.pi)({},fd),n=0;n<t.length;n+=1){t[n]=Xv(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 zs(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 $o(r,t,e,n,i){var a=ki([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=zs([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 pd(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 Jv(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),p=(i%360+360)%360,y=p*(f/180);if(r===o&&t===A)return{x:r,y:t};if(g===0||v===0)return $o(r,t,o,A,l).point;var x=(r-o)/2,F=(t-A)/2,O={x:h(y)*x+u(y)*F,y:-u(y)*x+h(y)*F},L=Math.pow(O.x,2)/Math.pow(g,2)+Math.pow(O.y,2)/Math.pow(v,2);L>1&&(g*=d(L),v*=d(L));var U=Math.pow(g,2)*Math.pow(v,2)-Math.pow(g,2)*Math.pow(O.y,2)-Math.pow(v,2)*Math.pow(O.x,2),R=Math.pow(g,2)*Math.pow(O.y,2)+Math.pow(v,2)*Math.pow(O.x,2),j=U/R;j=j<0?0:j;var q=(a!==s?1:-1)*d(j),et={x:q*(g*O.y/v),y:q*(-(v*O.x)/g)},it={x:h(y)*et.x-u(y)*et.y+(r+o)/2,y:u(y)*et.x+h(y)*et.y+(t+A)/2},dt={x:(O.x-et.x)/g,y:(O.y-et.y)/v},ft=pd({x:1,y:0},dt),mt={x:(-O.x-et.x)/g,y:(-O.y-et.y)/v},Rt=pd(dt,mt);!s&&Rt>0?Rt-=2*f:s&&Rt<0&&(Rt+=2*f),Rt%=2*f;var Qt=ft+Rt*l,yt=g*h(Qt),xt=v*u(Qt),Dt={x:h(y)*yt-u(y)*xt+it.x,y:u(y)*yt+h(y)*xt+it.y};return Dt}function qv(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,p=v===void 0?30:v,y=typeof l=="number",x=r,F=t,O=0,L=[x,F,O],U=[x,F],R=0,j={x:0,y:0},q=[{x,y:F}];y&&l<=0&&(j={x,y:F});for(var et=0;et<=p;et+=1){if(R=et/p,u=Jv(r,t,e,n,i,a,s,o,A,R),x=u.x,F=u.y,d&&q.push({x,y:F}),g&&(O+=ki(U,[x,F])),U=[x,F],y&&O>=l&&l>L[2]){var it=(O-l)/(O-L[2]);j={x:U[0]*(1-it)+L[0]*it,y:U[1]*(1-it)+L[1]*it}}L=[x,F,O]}return y&&l>=O&&(j={x:o,y:A}),{length:O,point:j,min:{x:Math.min.apply(null,q.map(function(dt){return dt.x})),y:Math.min.apply(null,q.map(function(dt){return dt.y}))},max:{x:Math.max.apply(null,q.map(function(dt){return dt.x})),y:Math.max.apply(null,q.map(function(dt){return dt.y}))}}}function $v(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 md(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,p=typeof A=="number",y=r,x=t,F=0,O=[y,x,F],L=[y,x],U=0,R={x:0,y:0},j=[{x:y,y:x}];p&&A<=0&&(R={x:y,y:x});for(var q=0;q<=v;q+=1){if(U=q/v,c=$v(r,t,e,n,i,a,s,o,U),y=c.x,x=c.y,h&&j.push({x:y,y:x}),f&&(F+=ki(L,[y,x])),L=[y,x],p&&F>=A&&A>O[2]){var et=(F-A)/(F-O[2]);R={x:L[0]*(1-et)+O[0]*et,y:L[1]*(1-et)+O[1]*et}}O=[y,x,F]}return p&&A>=F&&(R={x:s,y:o}),{length:F,point:R,min:{x:Math.min.apply(null,j.map(function(it){return it.x})),y:Math.min.apply(null,j.map(function(it){return it.y}))},max:{x:Math.max.apply(null,j.map(function(it){return it.x})),y:Math.max.apply(null,j.map(function(it){return it.y}))}}}function tp(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 ep(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,p=t,y=0,x=[v,p,y],F=[v,p],O=0,L={x:0,y:0},U=[{x:v,y:p}];g&&s<=0&&(L={x:v,y:p});for(var R=0;R<=f;R+=1){if(O=R/f,A=tp(r,t,e,n,i,a,O),v=A.x,p=A.y,c&&U.push({x:v,y:p}),h&&(y+=ki(F,[v,p])),F=[v,p],g&&y>=s&&s>x[2]){var j=(y-s)/(y-x[2]);L={x:F[0]*(1-j)+x[0]*j,y:F[1]*(1-j)+x[1]*j}}x=[v,p,y]}return g&&s>=y&&(L={x:i,y:a}),{length:y,point:L,min:{x:Math.min.apply(null,U.map(function(q){return q.x})),y:Math.min.apply(null,U.map(function(q){return q.y}))},max:{x:Math.max.apply(null,U.map(function(q){return q.x})),y:Math.max.apply(null,U.map(function(q){return q.y}))}}}function yd(r,t,e){for(var n,i,a,s,o,A,l=rc(r),c=typeof t=="number",u,h=[],d,f=0,g=0,v=0,p=0,y,x=[],F=[],O=0,L={x:0,y:0},U=L,R=L,j=L,q=0,et=0,it=l.length;et<it;et+=1)y=l[et],d=y[0],u=d==="M",h=u?h:[f,g].concat(y.slice(1)),u?(v=y[1],p=y[2],L={x:v,y:p},U=L,O=0,c&&t<.001&&(j=L)):d==="L"?(n=$o(h[0],h[1],h[2],h[3],(t||0)-q),O=n.length,L=n.min,U=n.max,R=n.point):d==="A"?(i=qv(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],(t||0)-q,e||{}),O=i.length,L=i.min,U=i.max,R=i.point):d==="C"?(a=md(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],(t||0)-q,e||{}),O=a.length,L=a.min,U=a.max,R=a.point):d==="Q"?(s=ep(h[0],h[1],h[2],h[3],h[4],h[5],(t||0)-q,e||{}),O=s.length,L=s.min,U=s.max,R=s.point):d==="Z"&&(h=[f,g,v,p],o=$o(h[0],h[1],h[2],h[3],(t||0)-q),O=o.length,L=o.min,U=o.max,R=o.point),c&&q<t&&q+O>=t&&(j=R),F.push(U),x.push(L),q+=O,A=d!=="Z"?y.slice(-2):[v,p],f=A[0],g=A[1];return c&&t>=q&&(j={x:f,y:g}),{length:q,point:j,min:{x:Math.min.apply(null,x.map(function(dt){return dt.x})),y:Math.min.apply(null,x.map(function(dt){return dt.y}))},max:{x:Math.max.apply(null,F.map(function(dt){return dt.x})),y:Math.max.apply(null,F.map(function(dt){return dt.y}))}}}function np(r,t){return yd(r,void 0,(0,D.pi)((0,D.pi)({},t),{bbox:!1,length:!0})).length}function Qi(r){return Array.isArray(r)}var ic=function(r){if(Qi(r))return r.reduce(function(t,e){return Math.min(t,e)},r[0])};function ac(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 wd=1e-5;function tA(r,t,e){return e===void 0&&(e=wd),r===t||Math.abs(r-t)<e}var rp=function(r,t){return(r%t+t)%t},Ed=rp;function $A(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 ip(r){return dd(r)&&r.every(function(t){var e=t[0];return"MC".includes(e)})}function sc(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 oc(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,p=Math.PI/180*(+i||0),y=[],x,F,O,L,U;if(l)F=l[0],O=l[1],L=l[2],U=l[3];else{x=sc(c,u,-p),c=x.x,u=x.y,x=sc(f,g,-p),f=x.x,g=x.y;var R=(c-f)/2,j=(u-g)/2,q=R*R/(h*h)+j*j/(d*d);q>1&&(q=Math.sqrt(q),h*=q,d*=q);var et=h*h,it=d*d,dt=(a===s?-1:1)*Math.sqrt(Math.abs((et*it-et*j*j-it*R*R)/(et*j*j+it*R*R)));L=dt*h*j/d+(c+f)/2,U=dt*-d*R/h+(u+g)/2,F=Math.asin(((u-U)/d*Math.pow(10,9)>>0)/Math.pow(10,9)),O=Math.asin(((g-U)/d*Math.pow(10,9)>>0)/Math.pow(10,9)),F=c<L?Math.PI-F:F,O=f<L?Math.PI-O:O,F<0&&(F=Math.PI*2+F),O<0&&(O=Math.PI*2+O),s&&F>O&&(F-=Math.PI*2),!s&&O>F&&(O-=Math.PI*2)}var ft=O-F;if(Math.abs(ft)>v){var mt=O,Rt=f,Qt=g;O=F+v*(s&&O>F?1:-1),f=L+h*Math.cos(O),g=U+d*Math.sin(O),y=oc(f,g,h,d,i,0,s,Rt,Qt,[O,mt,L,U])}ft=O-F;var yt=Math.cos(F),xt=Math.sin(F),Dt=Math.cos(O),Xt=Math.sin(O),ne=Math.tan(ft/4),le=4/3*h*ne,ge=4/3*d*ne,xe=[c,u],Qe=[c+le*xt,u-ge*yt],Pe=[f+le*Xt,g-ge*Dt],en=[f,g];if(Qe[0]=2*xe[0]-Qe[0],Qe[1]=2*xe[1]-Qe[1],l)return Qe.concat(Pe,en,y);y=Qe.concat(Pe,en,y);for(var mn=[],an=0,er=y.length;an<er;an+=1)mn[an]=an%2?sc(y[an-1],y[an],p).y:sc(y[an],y[an+1],p).x;return mn}function ap(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 Bd=function(r,t,e,n){var i=.5,a=zs([r,t],[e,n],i);return(0,D.ev)((0,D.ev)([],a,!0),[e,n,e,n],!1)};function sp(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(oc(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(ap(s[0],s[1],s[2],s[3],s[4],s[5]));case"L":return["C"].concat(Bd(o,A,i,a));case"Z":return o===l&&A===c?["C",o,A,l,c,l,c]:["C"].concat(Bd(o,A,l,c));default:}return r}function Iu(r,t){if(t===void 0&&(t=!1),ip(r)){var e=[].concat(r);return t?[e,[]]:e}for(var n=rc(r),i=(0,D.pi)({},fd),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=sp(n[u],i);n[u]=h,$A(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 op=50;function Ap(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=zs(e,n,t),o=zs(n,i,t),A=zs(i,a,t),l=zs(s,o,t),c=zs(o,A,t),u=zs(l,c,t);return[["C"].concat(s,l,u),["C"].concat(c,A,a)]}function bd(r){return r.map(function(t,e,n){var i=e&&n[e-1].slice(-2).concat(t.slice(1)),a=e?md(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?Ap(i):[t,t]:s=[t],{s:t,ss:s,l:a}})}function xd(r,t,e,n){if(n===void 0&&(n=0),n>op)return console.warn("Maximum recursion depth reached in equalizeSegments"),[r,t];var i=bd(r),a=bd(t),s=i.length,o=a.length,A=i.filter(function(p){return p.l}).length,l=a.filter(function(p){return p.l}).length,c=i.filter(function(p){return p.l}).reduce(function(p,y){var x=y.l;return p+x},0)/A||0,u=a.filter(function(p){return p.l}).reduce(function(p,y){var x=y.l;return p+x},0)/l||0,h=e||Math.max(s,o),d=[c,u],f=[h-s,h-o],g=0,v=[i,a].map(function(p,y){return p.l===h?p.map(function(x){return x.s}):p.map(function(x,F){return g=F&&f[y]&&x.l>=d[y],f[y]-=g?1:0,g?x.ss:[x.s]}).flat()});return v[0].length===v[1].length?v:xd(v[0],v[1],h,n+1)}function Rr(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 lp(r){var t=0,e=0,n=0;return Iu(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=Rr(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 Cd(r){return lp(r)>=0}function cp(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 up(r){return r.map(function(t){return Array.isArray(t)?[].concat(t):t})}function hp(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 Sd(r,t){var e=r.length-1,n=[],i=0,a=0,s=hp(r);return s.forEach(function(o,A){r.slice(1).forEach(function(l,c){a+=ki(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 dp=function(r){return r===void 0},Ze=dp,fp={}.toString,gp=function(r,t){return fp.call(r)==="[object "+t+"]"},Md=gp,vp=function(r){return Md(r,"Boolean")},eA=vp;function Vt(r){return typeof r=="function"}var br=function(r){var t=typeof r;return r!==null&&t==="object"||t==="function"};function pp(r,t,e){return yd(r,t,(0,D.pi)((0,D.pi)({},e),{bbox:!1,length:!0})).point}var we=T(18642),Sa=T(38882);function mp(r,t){for(;!{}.hasOwnProperty.call(r,t)&&(r=(0,Sa.Z)(r))!==null;);return r}function Ac(){return Ac=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(r,t,e){var n=mp(r,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?r:e):i.value}},Ac.apply(null,arguments)}function Ks(r,t,e,n){var i=Ac((0,Sa.Z)(1&n?r.prototype:r),t,e);return 2&n&&typeof i=="function"?function(a){return i.apply(e,a)}:i}var lc=T(13750);function vi(r,t,e,n){var i=r-e,a=t-n;return Math.sqrt(i*i+a*a)}function cc(r,t){var e=Math.min.apply(Math,(0,G.Z)(r)),n=Math.min.apply(Math,(0,G.Z)(t)),i=Math.max.apply(Math,(0,G.Z)(r)),a=Math.max.apply(Math,(0,G.Z)(t));return{x:e,y:n,width:i-e,height:a-n}}function Fd(r){return(r+Math.PI*2)%(Math.PI*2)}function Vs(r,t){var e=Math.abs(r);return t>0?e:e*-1}function Nu(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,p=0;p<4;p++){g=s*Math.cos(f),v=o*Math.sin(f);var y=(h-d)*Math.pow(Math.cos(f),3)/s,x=(d-h)*Math.pow(Math.sin(f),3)/o,F=g-y,O=v-x,L=c-y,U=u-x,R=Math.hypot(O,F),j=Math.hypot(U,L),q=R*Math.asin((F*U-O*L)/(R*j)),et=q/Math.sqrt(h+d-g*g-v*v);f+=et,f=Math.min(Math.PI/2,Math.max(0,f))}return{x:r+Vs(g,A),y:t+Vs(v,l)}}function Lu(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 yp(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 Td(r,t,e){return Math.atan(-t/r*Math.tan(e))}function wp(r,t,e){return Math.atan(t/(r*Math.tan(e)))}function ku(r,t,e,n,i,a){return e*Math.cos(i)*Math.cos(a)-n*Math.sin(i)*Math.sin(a)+r}function Ep(r,t,e,n,i,a){return e*Math.sin(i)*Math.cos(a)+n*Math.cos(i)*Math.sin(a)+t}function Bp(r,t,e,n){var i=Math.atan2(n*r,e*t);return(i+Math.PI*2)%(Math.PI*2)}function Od(r,t,e){return{x:r*Math.cos(e),y:t*Math.sin(e)}}function Id(r,t,e){var n=Math.cos(e),i=Math.sin(e);return[r*n-t*i,r*i+t*n]}function bp(r,t,e,n,i,a,s){for(var o=Td(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=ku(r,t,e,n,i,c[d]);f<A&&(A=f),f>l&&(l=f)}for(var g=wp(e,n,i),v=1/0,p=-1/0,y=[a,s],x=-Math.PI*2;x<=Math.PI*2;x+=Math.PI){var F=g+x;a<s?a<F&&F<s&&y.push(F):s<F&&F<a&&y.push(F)}for(var O=0;O<y.length;O++){var L=Ep(r,t,e,n,i,y[O]);L<v&&(v=L),L>p&&(p=L)}return{x:A,y:v,width:l-A,height:p-v}}function oE(r,t,e,n,i,a,s,o,A){var l=Id(o-r,A-t,-i),c=_slicedToArray(l,2),u=c[0],h=c[1],d=Nu(0,0,e,n,u,h),f=Bp(e,n,d.x,d.y);f<a?d=Od(e,n,a):f>s&&(d=Od(e,n,s));var g=Id(d.x,d.y,i);return{x:g[0]+r,y:g[1]+t}}function AE(r,t,e,n,i,a,s,o){var A=(s-a)*o+a,l=Lu(r,t,e,n,i,a,s,A),c=yp(r,t,e,n,i,a,s,A);return Fd(Math.atan2(c,l))}var xp=1e-4;function Qu(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,G.Z)(r.concat([d]))),i.apply(void 0,(0,G.Z)(t.concat([d])))],g=vi(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 p=0;p<32&&!(u<xp);p++){var y=s-u,x=s+u,F=[i.apply(void 0,(0,G.Z)(r.concat([y]))),i.apply(void 0,(0,G.Z)(t.concat([y])))],O=vi(A[0],A[1],F[0],F[1]);if(y>=0&&O<o)s=y,o=O;else{var L=[i.apply(void 0,(0,G.Z)(r.concat([x]))),i.apply(void 0,(0,G.Z)(t.concat([x])))],U=vi(A[0],A[1],L[0],L[1]);x<=1&&U<o?(s=x,o=U):u*=.5}}return{x:i.apply(void 0,(0,G.Z)(r.concat([s]))),y:i.apply(void 0,(0,G.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+=vi(a,s,o,A)}return e/2}function lE(r,t,e,n){return cc([r,e],[t,n])}function Nd(r,t,e,n){return vi(r,t,e,n)}function Ma(r,t,e,n,i){return{x:(1-i)*r+i*e,y:(1-i)*t+i*n}}function Sp(r,t,e,n,i,a){var s=(e-r)*(i-r)+(n-t)*(a-t);if(s<0)return vi(r,t,i,a);var o=(e-r)*(e-r)+(n-t)*(n-t);return s>o?vi(e,n,i,a):tl(r,t,e,n,i,a)}function tl(r,t,e,n,i,a){var s=[e-r,n-t];if(Gv(s,[0,0]))return Math.sqrt((i-r)*(i-r)+(a-t)*(a-t));var o=[-s[1],s[0]];_v(o,o);var A=[i-r,a-t];return Math.abs(Su(A,o))}function cE(r,t,e,n){return Math.atan2(n-t,e-r)}function hs(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 uc(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 Uu(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(tA(i,0))tA(a,0)||(A=-s/a,A>=0&&A<=1&&o.push(A));else{var u=a*a-4*i*s;tA(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 Ld(r,t,e,n,i,a,s,o,A){var l=hs(r,e,i,s,A),c=hs(t,n,a,o,A),u=Ma(r,t,e,n,A),h=Ma(e,n,i,a,A),d=Ma(i,a,s,o,A),f=Ma(u.x,u.y,h.x,h.y,A),g=Ma(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 Ru(r,t,e,n,i,a,s,o,A){if(A===0)return Cp([r,e,i,s],[t,n,a,o]);var l=Ld(r,t,e,n,i,a,s,o,.5),c=[].concat(_toConsumableArray(l[0]),[A-1]),u=[].concat(_toConsumableArray(l[1]),[A-1]);return Ru.apply(void 0,_toConsumableArray(c))+Ru.apply(void 0,_toConsumableArray(u))}function kd(r,t,e,n,i,a,s,o){for(var A=[r,s],l=[t,o],c=Uu(r,e,i,s),u=Uu(t,n,a,o),h=0;h<c.length;h++)A.push(hs(r,e,i,s,c[h]));for(var d=0;d<u.length;d++)l.push(hs(t,n,a,o,u[d]));return cc(A,l)}function Qd(r,t,e,n,i,a,s,o){return Ru(r,t,e,n,i,a,s,o,3)}function Du(r,t,e,n,i,a,s,o,A,l,c){return Qu([r,e,i,s],[t,n,a,o],A,l,hs,c)}function Pu(r,t,e,n,i,a,s,o,A,l,c){var u=Du(r,t,e,n,i,a,s,o,A,l,c);return vi(u.x,u.y,A,l)}function Mp(r,t,e,n,i,a,s,o,A){return{x:hs(r,e,i,s,A),y:hs(t,n,a,o,A)}}function Fp(r,t,e,n,i,a,s,o,A){var l=uc(r,e,i,s,A),c=uc(t,n,a,o,A);return Fd(Math.atan2(c,l))}function _u(r){for(var t=0,e=[],n=0;n<r.length-1;n++){var i=r[n],a=r[n+1],s=vi(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 hc(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+=vi(n[0],n[1],i[0],i[1])}return t}function Ud(r,t){if(t>1||t<0||r.length<2)return null;var e=_u(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=Ma(l[0],l[1],c[0],c[1],h);break}a+=u}return s}function Rd(r,t){if(t>1||t<0||r.length<2)return 0;for(var e=_u(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 Dd(r,t,e){for(var n=1/0,i=0;i<r.length-1;i++){var a=r[i],s=r[i+1],o=Sp(a[0],a[1],s[0],s[1],t,e);o<n&&(n=o)}return n}function ha(r){for(var t=[],e=[],n=0;n<r.length;n++){var i=r[n];t.push(i[0]),e.push(i[1])}return cc(t,e)}function Hu(r){return hc(r)}function uE(r,t){return Ud(r,t)}function hE(r,t,e){return Dd(r,t,e)}function dE(r,t){return Rd(r,t)}function dc(r){var t=r.slice(0);return r.length&&t.push(r[0]),t}function fE(r){return ha(r)}function gE(r){return hc(dc(r))}function vE(r,t){return Ud(dc(r),t)}function pE(r,t,e){return Dd(dc(r),t,e)}function mE(r,t){return Rd(dc(r),t)}function nA(r,t,e,n){var i=1-n;return i*i*r+2*n*i*t+n*n*e}function Pd(r,t,e){var n=r+e-2*t;if(tA(n,0))return[.5];var i=(r-t)/n;return i<=1&&i>=0?[i]:[]}function Gu(r,t,e,n,i,a,s){var o=nA(r,e,i,s),A=nA(t,n,a,s),l=Ma(r,t,e,n,s),c=Ma(e,n,i,a,s);return[[r,t,l.x,l.y,o,A],[o,A,c.x,c.y,i,a]]}function fc(r,t,e,n,i,a,s){if(s===0)return(vi(r,t,e,n)+vi(e,n,i,a)+vi(r,t,i,a))/2;var o=Gu(r,t,e,n,i,a,.5),A=o[0],l=o[1];return A.push(s-1),l.push(s-1),fc.apply(void 0,_toConsumableArray(A))+fc.apply(void 0,_toConsumableArray(l))}function ri(r,t,e,n,i,a){var s=Pd(r,e,i)[0],o=Pd(t,n,a)[0],A=[r,i],l=[t,a];return s!==void 0&&A.push(nA(r,e,i,s)),o!==void 0&&l.push(nA(t,n,a,o)),cc(A,l)}function gc(r,t,e,n,i,a){return fc(r,t,e,n,i,a,3)}function Tp(r,t,e,n,i,a,s,o){return Qu([r,e,i],[t,n,a],s,o,nA)}function Op(r,t,e,n,i,a,s,o){var A=Tp(r,t,e,n,i,a,s,o);return vi(A.x,A.y,s,o)}var ii=T(73001),Xa=T(11576),Ws=T(72054),Ja=T(42244);var Kt=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}({}),vc=function(r){return r[r.ZERO=0]="ZERO",r[r.NEGATIVE_ONE=1]="NEGATIVE_ONE",r}({}),ds=function(){function r(){(0,P.Z)(this,r),this.plugins=[]}return(0,N.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)})}}])}(),Ip=function(){function r(t){(0,P.Z)(this,r),this.clipSpaceNearZ=vc.NEGATIVE_ONE,this.plugins=[],this.config=(0,z.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},t)}return(0,N.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)}}])}(),zu=de,rA=ie,_d=As,Hd=ji,Ku=Pt,pc=cs,Zn=function(){function r(){(0,P.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,N.Z)(r,[{key:"update",value:function(e,n){rA(this.center,e),rA(this.halfExtents,n),pc(this.min,this.center,this.halfExtents),zu(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(e,n){zu(this.center,n,e),Ku(this.center,this.center,.5),pc(this.halfExtents,n,e),Ku(this.halfExtents,this.halfExtents,.5),rA(this.min,e),rA(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,p=e.center,y=p[0],x=p[1],F=p[2],O=e.halfExtents,L=O[0],U=O[1],R=O[2],j=y-L,q=y+L,et=x-U,it=x+U,dt=F-R,ft=F+R;j<u&&(u=j),q>h&&(h=q),et<d&&(d=et),it>f&&(f=it),dt<g&&(g=dt),ft>v&&(v=ft),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],p=Math.abs(A),y=Math.abs(l),x=Math.abs(c),F=Math.abs(u),O=Math.abs(h),L=Math.abs(d),U=Math.abs(f),R=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]=p*o[0]+y*o[1]+x*o[2],a[1]=F*o[0]+O*o[1]+L*o[2],a[2]=U*o[0]+R*o[1]+j*o[2],pc(this.min,i,a),zu(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=_d([0,0,0],this.getMin(),e.getMin()),a=Hd([0,0,0],this.getMax(),e.getMax());return n.setMinMax(i,a),n}},{key:"getNegativeFarPoint",value:function(e){return e.pnVertexFlag===273?rA([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?rA([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}}])}(),Np=function(){function r(t,e){(0,P.Z)(this,r),this.distance=t||0,this.normal=e||Wt(0,1,0),this.updatePNVertexFlag()}return(0,N.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/la(this.normal);Pt(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&&nn(i,e,n,o),A}}])}(),iA=function(r){return r[r.OUTSIDE=4294967295]="OUTSIDE",r[r.INSIDE=0]="INSIDE",r[r.INDETERMINATE=2147483647]="INDETERMINATE",r}({}),Lp=function(){function r(t){if((0,P.Z)(this,r),this.planes=[],t)this.planes=t;else for(var e=0;e<6;e++)this.planes.push(new Np)}return(0,N.Z)(r,[{key:"extractFromVPMatrix",value:function(e){var n=(0,H.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],p=n[13],y=n[14],x=n[15];ve(this.planes[0].normal,o-i,u-A,g-h),this.planes[0].distance=x-v,ve(this.planes[1].normal,o+i,u+A,g+h),this.planes[1].distance=x+v,ve(this.planes[2].normal,o+a,u+l,g+d),this.planes[2].distance=x+p,ve(this.planes[3].normal,o-a,u-l,g-d),this.planes[3].distance=x-p,ve(this.planes[4].normal,o-s,u-c,g-f),this.planes[4].distance=x-y,ve(this.planes[5].normal,o+s,u+c,g+f),this.planes[5].distance=x+y,this.planes.forEach(function(F){F.normalize(),F.updatePNVertexFlag()})}}])}(),ai=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,P.Z)(this,r),this.x=0,this.y=0,this.x=t,this.y=e}return(0,N.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}}])}(),fs=function(){function r(t,e,n,i){(0,P.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,N.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=Xi(e.x,e.y,0,1),a=Xi(e.x+e.width,e.y,0,1),s=Xi(e.x,e.y+e.height,0,1),o=Xi(e.x+e.width,e.y+e.height,0,1),A=Ar(),l=Ar(),c=Ar(),u=Ar();M(A,i,n),M(l,a,n),M(c,s,n),M(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.",aA="Use document.documentElement instead.",Gd="Cannot append a destroyed element.";function js(r){return r===void 0?0:r>360||r<-360?r%360:r}var mc=Ot();function pi(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?Gt(r):ie(mc,r):ye(r)?n?Wt(r,t,e):ve(mc,r,t,e):n?Wt(r[0],r[1]||t,r[2]||e):ve(mc,r[0],r[1]||t,r[2]||e)}var zd=Math.PI/180;function Un(r){return r*zd}var yc=180/Math.PI;function bi(r){return r*yc}var Kd=.9;function yE(r){return r%=400,r<0&&(r+=400),r*Kd}function wE(r){return r/360}function Vd(r){return 360*r}var gs=Math.PI/2;function Vu(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]=gs,r[1]=2*Math.atan2(n,e),r[2]=0):u<-.499995*c?(r[0]=-gs,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 wc(r,t){var e,n,i=Ds(Ot(),t),a=(0,H.Z)(i,3),s=a[0],o=a[1],A=a[2],l=Math.asin(-t[2]/s);return l<gs?l>-gs?(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 Wu(r,t){return t.length===16?wc(r,t):Vu(r,t)}function kp(r,t,e,n,i){var a=Math.cos(r),s=Math.sin(r);return Jl(n*a,i*s,0,-n*s,i*a,0,t,e,1)}function Qp(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,p=s-a,y=s*a;return o?(g=-s/p,v=-y/p):(g=-(s+a)/p,v=-2*y/p),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 Wd(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 Fa=$t(),ta=$t(),sA=Ar(),Ke=[Ot(),Ot(),Ot()],Ec=Ot();function jd(r,t,e,n,i,a){if(!Zd(Fa,r)||(He(ta,Fa),ta[3]=0,ta[7]=0,ta[11]=0,ta[15]=1,Math.abs(te(ta))<1e-8))return!1;var s=Fa[3],o=Fa[7],A=Fa[11],l=Fa[12],c=Fa[13],u=Fa[14],h=Fa[15];if(s!==0||o!==0||A!==0){sA[0]=s,sA[1]=o,sA[2]=A,sA[3]=h;var d=on(ta,ta);if(!d)return!1;De(ta,ta),M(i,sA,ta)}else i[0]=i[1]=i[2]=0,i[3]=1;if(t[0]=l,t[1]=c,t[2]=u,Up(Ke,Fa),e[0]=ae(Ke[0]),be(Ke[0],Ke[0]),n[0]=_e(Ke[0],Ke[1]),oA(Ke[1],Ke[1],Ke[0],1,-n[0]),e[1]=ae(Ke[1]),be(Ke[1],Ke[1]),n[0]/=e[1],n[1]=_e(Ke[0],Ke[2]),oA(Ke[2],Ke[2],Ke[0],1,-n[1]),n[2]=_e(Ke[1],Ke[2]),oA(Ke[2],Ke[2],Ke[1],1,-n[2]),e[2]=ae(Ke[2]),be(Ke[2],Ke[2]),n[1]/=e[2],n[2]/=e[2],Me(Ec,Ke[1],Ke[2]),_e(Ke[0],Ec)<0)for(var f=0;f<3;f++)e[f]*=-1,Ke[f][0]*=-1,Ke[f][1]*=-1,Ke[f][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+Ke[0][0]-Ke[1][1]-Ke[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-Ke[0][0]+Ke[1][1]-Ke[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-Ke[0][0]-Ke[1][1]+Ke[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+Ke[0][0]+Ke[1][1]+Ke[2][2],0)),Ke[2][1]>Ke[1][2]&&(a[0]=-a[0]),Ke[0][2]>Ke[2][0]&&(a[1]=-a[1]),Ke[1][0]>Ke[0][1]&&(a[2]=-a[2]),!0}function Zd(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 Up(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 oA(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}({}),Bc=function(r){return r[r.DEFAULT=0]="DEFAULT",r[r.ROTATIONAL=1]="ROTATIONAL",r[r.TRANSLATIONAL=2]="TRANSLATIONAL",r[r.CINEMATIC=3]="CINEMATIC",r}({}),ea=function(r){return r[r.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",r[r.PERSPECTIVE=1]="PERSPECTIVE",r}({}),Yd={UPDATED:"updated"},ju=2e-4,Zu=function(){function r(){(0,P.Z)(this,r),this.clipSpaceNearZ=vc.NEGATIVE_ONE,this.eventEmitter=new Z,this.matrix=$t(),this.right=Wt(1,0,0),this.up=Wt(0,1,0),this.forward=Wt(0,0,1),this.position=Wt(0,0,1),this.focalPoint=Wt(0,0,0),this.distanceVector=Wt(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=$t(),this.projectionMatrixInverse=$t(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=In.EXPLORING,this.trackingMode=Bc.DEFAULT,this.projectionMode=ea.PERSPECTIVE,this.frustum=new Lp,this.orthoMatrix=$t()}return(0,N.Z)(r,[{key:"isOrtho",value:function(){return this.projectionMode===ea.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($t(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(e,n){var i=Tr($t(),[e,n,0]);this.jitteredProjectionMatrix=ue($t(),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===ea.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===ea.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===ea.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===ea.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===ea.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===ea.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=Wt(l-a,c-s,0),h=_e(u,this.right)/ae(this.right),d=_e(u,this.up)/ae(this.up),f=this.getPosition(),g=(0,H.Z)(f,2),v=g[0],p=g[1],y=this.getFocalPoint(),x=(0,H.Z)(y,2),F=x[0],O=x[1];return this.setPosition(v-h,p-d),this.setFocalPoint(F-h,O-d),this}},{key:"setPerspective",value:function(e,n,i,a){var s;this.projectionMode=ea.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 Qp(this.projectionMatrix,c,c+l,o-A,o,e,this.far,this.clipSpaceNearZ===vc.ZERO),on(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(e,n,i,a,s,o){var A;this.projectionMode=ea.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 p=(this.rright-this.left)/this.view.fullWidth/this.zoom,y=(this.top-this.bottom)/this.view.fullHeight/this.zoom;d+=p*this.view.offsetX,f=d+p*this.view.width,g-=y*this.view.offsetY,v=g-y*this.view.height}return this.clipSpaceNearZ===vc.NEGATIVE_ONE?gu(this.projectionMatrix,d,f,g,v,s,o):vu(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=pi(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=Wt(0,1,0);if(this.focalPoint=pi(e,n,i),this.trackingMode===Bc.CINEMATIC){var s=Oe(Ot(),this.focalPoint,this.position);e=s[0],n=s[1],i=s[2];var o=ae(s),A=bi(Math.asin(n/o)),l=90+bi(Math.atan2(i,e)),c=$t();qn(c,c,Un(l)),jn(c,c,Un(A)),a=me(Ot(),[0,1,0],c)}return on(this.matrix,rd($t(),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<ju&&(this.distance=ju),this.dollyingStep=this.distance/100;var n=Ot();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=js(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=js(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=js(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=ca(Br(),[0,0,1],Un(this.roll));Ie(this.matrix);var n=ca(Br(),[1,0,0],Un((this.rotateWorld&&this.type!==In.TRACKING||this.type===In.TRACKING?1:-1)*this.elevation)),i=ca(Br(),[0,1,0],Un((this.rotateWorld&&this.type!==In.TRACKING||this.type===In.TRACKING?1:-1)*this.azimuth)),a=Ps(Br(),i,n);a=Ps(Br(),a,e);var s=KA($t(),a);this.type===In.ORBITING||this.type===In.EXPLORING?(se(this.matrix,this.matrix,this.focalPoint),ue(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),ue(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(e,n,i){this.position=pi(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(){ie(this.right,pi(M(Ar(),[1,0,0,0],this.matrix))),ie(this.up,pi(M(Ar(),[0,1,0,0],this.matrix))),ie(this.forward,pi(M(Ar(),[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=ae(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(){ie(this.position,pi(M(Ar(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){Ve(this.distanceVector,[0,0,-this.distance],pv(sd(),this.matrix)),de(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=Oe(Ot(),this.focalPoint,this.position),this.distance=ae(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===ea.ORTHOGRAPHIC){var e=this.position,n=ca(Br(),[0,0,1],-this.roll*Math.PI/180);vo(this.orthoMatrix,n,Wt((this.rright-this.left)/2-e[0],(this.top-this.bottom)/2-e[1],0),Wt(this.zoom,this.zoom,1),e)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var e=this.getViewTransform(),n=ue($t(),this.getPerspective(),e);this.getFrustum().extractFromVPMatrix(n),this.eventEmitter.emit(Yd.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)}}])}(),Rp=function(r){return r[r.Standard=0]="Standard",r}({}),bc=function(r){return r[r.ADDED=0]="ADDED",r[r.REMOVED=1]="REMOVED",r[r.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",r}({}),AA=Ot(),lA=$t(),xr=Br();function Zs(r){if(r.localDirtyFlag){var t=r.localSkew[0]!==0||r.localSkew[1]!==0;if(t){vo(r.localTransform,r.localRotation,r.localPosition,Wt(1,1,1),r.origin),(r.localSkew[0]!==0||r.localSkew[1]!==0)&&(Ie(lA),lA[4]=Math.tan(r.localSkew[0]),lA[1]=Math.tan(r.localSkew[1]),ue(r.localTransform,r.localTransform,lA));var e=vo(lA,XA(xr,0,0,0,1),ve(AA,1,1,1),r.localScale,r.origin);ue(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):vo(n,a,i,s,o)}r.localDirtyFlag=!1}}function cA(r,t){r.dirtyFlag&&(t?ue(r.worldTransform,t.worldTransform,r.localTransform):He(r.worldTransform,r.localTransform),r.dirtyFlag=!1)}var vs={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fs(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 Bo(r,t,e){r.prototype=t.prototype=e,e.constructor=r}function qa(r,t){var e=Object.create(r.prototype);for(var n in t)e[n]=t[n];return e}function uA(){}var hA=.7,el=1/hA,Ys="\\s*([+-]?\\d+)\\s*",ps="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ta="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Xd=/^#([0-9a-f]{3,8})$/,nl=new RegExp(`^rgb\\(${Ys},${Ys},${Ys}\\)$`),Dp=new RegExp(`^rgb\\(${Ta},${Ta},${Ta}\\)$`),Pp=new RegExp(`^rgba\\(${Ys},${Ys},${Ys},${ps}\\)$`),_p=new RegExp(`^rgba\\(${Ta},${Ta},${Ta},${ps}\\)$`),Hp=new RegExp(`^hsl\\(${ps},${Ta},${Ta}\\)$`),Gp=new RegExp(`^hsla\\(${ps},${Ta},${Ta},${ps}\\)$`),xc={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};Bo(uA,Cc,{copy(r){return Object.assign(new this.constructor,this,r)},displayable(){return this.rgb().displayable()},hex:Jd,formatHex:Jd,formatHex8:zp,formatHsl:Kp,formatRgb:qd,toString:qd});function Jd(){return this.rgb().formatHex()}function zp(){return this.rgb().formatHex8()}function Kp(){return ef(this).formatHsl()}function qd(){return this.rgb().formatRgb()}function Cc(r){var t,e;return r=(r+"").trim().toLowerCase(),(t=Xd.exec(r))?(e=t[1].length,t=parseInt(t[1],16),e===6?Sc(t):e===3?new Ui(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?dA(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?dA(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=nl.exec(r))?new Ui(t[1],t[2],t[3],1):(t=Dp.exec(r))?new Ui(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Pp.exec(r))?dA(t[1],t[2],t[3],t[4]):(t=_p.exec(r))?dA(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Hp.exec(r))?Fc(t[1],t[2]/100,t[3]/100,1):(t=Gp.exec(r))?Fc(t[1],t[2]/100,t[3]/100,t[4]):xc.hasOwnProperty(r)?Sc(xc[r]):r==="transparent"?new Ui(NaN,NaN,NaN,0):null}function Sc(r){return new Ui(r>>16&255,r>>8&255,r&255,1)}function dA(r,t,e,n){return n<=0&&(r=t=e=NaN),new Ui(r,t,e,n)}function $d(r){return r instanceof uA||(r=Cc(r)),r?(r=r.rgb(),new Ui(r.r,r.g,r.b,r.opacity)):new Ui}function Vp(r,t,e,n){return arguments.length===1?$d(r):new Ui(r,t,e,n==null?1:n)}function Ui(r,t,e,n){this.r=+r,this.g=+t,this.b=+e,this.opacity=+n}Bo(Ui,Vp,qa(uA,{brighter(r){return r=r==null?el:Math.pow(el,r),new Ui(this.r*r,this.g*r,this.b*r,this.opacity)},darker(r){return r=r==null?hA:Math.pow(hA,r),new Ui(this.r*r,this.g*r,this.b*r,this.opacity)},rgb(){return this},clamp(){return new Ui(bo(this.r),bo(this.g),bo(this.b),Mc(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:Yu,formatHex:Yu,formatHex8:Wp,formatRgb:tf,toString:tf}));function Yu(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}`}function Wp(){return`#${xo(this.r)}${xo(this.g)}${xo(this.b)}${xo((isNaN(this.opacity)?1:this.opacity)*255)}`}function tf(){const r=Mc(this.opacity);return`${r===1?"rgb(":"rgba("}${bo(this.r)}, ${bo(this.g)}, ${bo(this.b)}${r===1?")":`, ${r})`}`}function Mc(r){return isNaN(r)?1:Math.max(0,Math.min(1,r))}function bo(r){return Math.max(0,Math.min(255,Math.round(r)||0))}function xo(r){return r=bo(r),(r<16?"0":"")+r.toString(16)}function Fc(r,t,e,n){return n<=0?r=t=e=NaN:e<=0||e>=1?r=t=NaN:t<=0&&(r=NaN),new Oa(r,t,e,n)}function ef(r){if(r instanceof Oa)return new Oa(r.h,r.s,r.l,r.opacity);if(r instanceof uA||(r=Cc(r)),!r)return new Oa;if(r instanceof Oa)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 Oa(s,o,A,r.opacity)}function Xu(r,t,e,n){return arguments.length===1?ef(r):new Oa(r,t,e,n==null?1:n)}function Oa(r,t,e,n){this.h=+r,this.s=+t,this.l=+e,this.opacity=+n}Bo(Oa,Xu,qa(uA,{brighter(r){return r=r==null?el:Math.pow(el,r),new Oa(this.h,this.s,this.l*r,this.opacity)},darker(r){return r=r==null?hA:Math.pow(hA,r),new Oa(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 Ui(fA(r>=240?r-240:r+120,i,n),fA(r,i,n),fA(r<120?r+240:r-120,i,n),this.opacity)},clamp(){return new Oa(Se(this.h),ms(this.s),ms(this.l),Mc(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=Mc(this.opacity);return`${r===1?"hsl(":"hsla("}${Se(this.h)}, ${ms(this.s)*100}%, ${ms(this.l)*100}%${r===1?")":`, ${r})`}`}}));function Se(r){return r=(r||0)%360,r<0?r+360:r}function ms(r){return Math.max(0,Math.min(1,r||0))}function fA(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 Nn(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(Nn.Cache||Map),Nn.cacheList.push(e.cache),e}Nn.Cache=Map,Nn.cacheList=[],Nn.clearCache=function(){Nn.cacheList.forEach(function(r){return r.clear()})};var fe=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}({}),lr=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),Tc=function(r){return r[r.kYes=0]="kYes",r[r.kNo=1]="kNo",r}({}),jp=[{name:"em",unit_type:fe.kEms},{name:"px",unit_type:fe.kPixels},{name:"deg",unit_type:fe.kDegrees},{name:"rad",unit_type:fe.kRadians},{name:"grad",unit_type:fe.kGradians},{name:"ms",unit_type:fe.kMilliseconds},{name:"s",unit_type:fe.kSeconds},{name:"rem",unit_type:fe.kRems},{name:"turn",unit_type:fe.kTurns}],ys=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}({}),Zp=function(t){return jp.find(function(e){return e.name===t}).unit_type},Oc=function(t){return t?t==="number"?fe.kNumber:t==="percent"||t==="%"?fe.kPercentage:Zp(t):fe.kUnknown},Yp=function(t){switch(t){case fe.kNumber:case fe.kInteger:return un.kUNumber;case fe.kPercentage:return un.kUPercent;case fe.kPixels:return un.kULength;case fe.kMilliseconds:case fe.kSeconds:return un.kUTime;case fe.kDegrees:case fe.kRadians:case fe.kGradians:case fe.kTurns:return un.kUAngle;default:return un.kUOther}},Xp=function(t){switch(t){case un.kUNumber:return fe.kNumber;case un.kULength:return fe.kPixels;case un.kUPercent:return fe.kPercentage;case un.kUTime:return fe.kSeconds;case un.kUAngle:return fe.kDegrees;default:return fe.kUnknown}},Ju=function(t){var e=1;switch(t){case fe.kPixels:case fe.kDegrees:case fe.kSeconds:break;case fe.kMilliseconds:e=.001;break;case fe.kRadians:e=180/Math.PI;break;case fe.kGradians:e=.9;break;case fe.kTurns:e=360;break}return e},qu=function(t){switch(t){case fe.kNumber:case fe.kInteger:return"";case fe.kPercentage:return"%";case fe.kEms:return"em";case fe.kRems:return"rem";case fe.kPixels:return"px";case fe.kDegrees:return"deg";case fe.kRadians:return"rad";case fe.kGradians:return"grad";case fe.kMilliseconds:return"ms";case fe.kSeconds:return"s";case fe.kTurns:return"turn"}return""},rl=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"toString",value:function(){return this.buildCSSText(lr.kNo,Tc.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=ys.kUnitType&&this.getType()<=ys.kClampType}}],[{key:"isAngle",value:function(e){return e===fe.kDegrees||e===fe.kRadians||e===fe.kGradians||e===fe.kTurns}},{key:"isLength",value:function(e){return e>=fe.kEms&&e<fe.kDegrees}},{key:"isRelativeUnit",value:function(e){return e===fe.kPercentage||e===fe.kEms||e===fe.kRems}},{key:"isTime",value:function(e){return e===fe.kSeconds||e===fe.kMilliseconds}}])}(),Jp=function(r){function t(e){var n;return(0,P.Z)(this,t),n=(0,K.Z)(this,t),n.colorSpace=e,n}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"getType",value:function(){return ys.kColorType}},{key:"to",value:function(n){return this}}])}(rl),ws=function(r){return r[r.Constant=0]="Constant",r[r.LinearGradient=1]="LinearGradient",r[r.RadialGradient=2]="RadialGradient",r}({}),il=function(r){function t(e,n){var i;return(0,P.Z)(this,t),i=(0,K.Z)(this,t),i.type=e,i.value=n,i}return(0,_.Z)(t,r),(0,N.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 ys.kColorType}}])}(rl),Ri=function(r){function t(e){var n;return(0,P.Z)(this,t),n=(0,K.Z)(this,t),n.value=e,n}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"clone",value:function(){return new t(this.value)}},{key:"getType",value:function(){return ys.kKeywordType}},{key:"buildCSSText",value:function(n,i,a){return a+this.value}}])}(rl),nf=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},$u=function(t){return Xp(Yp(t))},_n=function(r){function t(e){var n,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fe.kNumber;(0,P.Z)(this,t),n=(0,K.Z)(this,t);var a;return typeof i=="string"?a=Oc(i):a=i,n.unit=a,n.value=e,n}return(0,_.Z)(t,r),(0,N.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 ys.kUnitType}},{key:"convertTo",value:function(n){if(this.unit===n)return new t(this.value,this.unit);var i=$u(this.unit);if(i!==$u(n)||i===fe.kUnknown)return null;var a=Ju(this.unit)/Ju(n);return new t(this.value*a,n)}},{key:"buildCSSText",value:function(n,i,a){var s;switch(this.unit){case fe.kUnknown:break;case fe.kInteger:s=Number(this.value).toFixed(0);break;case fe.kNumber:case fe.kPercentage:case fe.kEms:case fe.kRems:case fe.kPixels:case fe.kDegrees:case fe.kRadians:case fe.kGradians:case fe.kMilliseconds:case fe.kSeconds:case fe.kTurns:{var o=-999999,A=999999,l=this.value,c=qu(this.unit);if(l<o||l>A){var u=qu(this.unit);!Number.isFinite(l)||Number.isNaN(l)?s=nf(l,u):s=l+(u||"")}else s="".concat(l).concat(c)}}return a+=s,a}}])}(rl),Ia=new _n(0,"px");new _n(1,"px");var Co=new _n(0,"deg"),th=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,P.Z)(this,t),a=(0,K.Z)(this,t,["rgb"]),a.r=e,a.g=n,a.b=i,a.alpha=s,a.isNone=o,a}return(0,_.Z)(t,r),(0,N.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,")")}}])}(Jp),al=new Ri("unset"),da=new Ri("initial"),rf=new Ri("inherit"),gA={"":al,unset:al,initial:da,inherit:rf},qp=function(t){return gA[t]||(gA[t]=new Ri(t)),gA[t]},af=new th(0,0,0,0,!0),Ic=new th(0,0,0,0),vA=Nn(function(r,t,e,n){return new th(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]:fe.kNumber;return new _n(t,e)};new _n(50,"%");function $p(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 pA=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(Qt){throw new Error("".concat(t,": ").concat(Qt))}function n(){var Qt=i();return t.length>0&&e("Invalid input not EOF"),Qt}function i(){return x(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(Qt,yt,xt){return o(yt,function(Dt){var Xt=xt();return Xt&&(mt(r.comma)||e("Missing comma before color stops")),{type:Qt,orientation:Xt,colorStops:x(F)}})}function o(Qt,yt){var xt=mt(Qt);if(xt){mt(r.startCall)||e("Missing (");var Dt=yt(xt);return mt(r.endCall)||e("Missing )"),Dt}}function A(){return l()||c()}function l(){return ft("directional",r.sideOrCorner,1)}function c(){return ft("angular",r.angleValue,1)}function u(){var Qt,yt=h(),xt;return yt&&(Qt=[],Qt.push(yt),xt=t,mt(r.comma)&&(yt=h(),yt?Qt.push(yt):t=xt)),Qt}function h(){var Qt=d()||f();if(Qt)Qt.at=v();else{var yt=g();if(yt){Qt=yt;var xt=v();xt&&(Qt.at=xt)}else{var Dt=p();Dt&&(Qt={type:"default-radial",at:Dt})}}return Qt}function d(){var Qt=ft("shape",/^(circle)/i,0);return Qt&&(Qt.style=dt()||g()),Qt}function f(){var Qt=ft("shape",/^(ellipse)/i,0);return Qt&&(Qt.style=et()||g()),Qt}function g(){return ft("extent-keyword",r.extentKeywords,1)}function v(){if(ft("position",/^at/,0)){var Qt=p();return Qt||e("Missing positioning value"),Qt}}function p(){var Qt=y();if(Qt.x||Qt.y)return{type:"position",value:Qt}}function y(){return{x:et(),y:et()}}function x(Qt){var yt=Qt(),xt=[];if(yt)for(xt.push(yt);mt(r.comma);)yt=Qt(),yt?xt.push(yt):e("One extra comma");return xt}function F(){var Qt=O();return Qt||e("Expected color definition"),Qt.length=et(),Qt}function O(){return U()||j()||R()||L()}function L(){return ft("literal",r.literalColor,0)}function U(){return ft("hex",r.hexColor,1)}function R(){return o(r.rgbColor,function(){return{type:"rgb",value:x(q)}})}function j(){return o(r.rgbaColor,function(){return{type:"rgba",value:x(q)}})}function q(){return mt(r.number)[1]}function et(){return ft("%",r.percentageValue,1)||it()||dt()}function it(){return ft("position-keyword",r.positionKeywords,1)}function dt(){return ft("px",r.pixelValue,1)||ft("em",r.emValue,1)}function ft(Qt,yt,xt){var Dt=mt(yt);if(Dt)return{type:Qt,value:Dt[xt]}}function mt(Qt){var yt=/^[\n\r\t\s]+/.exec(t);yt&&Rt(yt[0].length);var xt=Qt.exec(t);return xt&&Rt(xt[0].length),xt}function Rt(Qt){t=t.substring(Qt)}return function(Qt){return t=Qt,n()}}();function tm(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 em(r,t,e,n,i,a){var s=n.value,o=i.value;n.unit===fe.kPercentage&&(s=n.value/100*t),i.unit===fe.kPercentage&&(o=i.value/100*e);var A=Math.max(ki([0,0],[s,o]),ki([0,e],[s,o]),ki([t,e],[s,o]),ki([t,0],[s,o]));return a&&(a instanceof _n?A=a.value:a instanceof Ri&&(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(ki([0,0],[s,o]),ki([0,e],[s,o]),ki([t,e],[s,o]),ki([t,0],[s,o]))))),{x:s+r[0],y:o+r[1],r:A}}var sf=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,nm=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,of=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Af=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function rm(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(!Re(A)&&!Re(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 im={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},am=Nn(function(r){var t;return r.type==="angular"?t=Number(r.value):t=im[r.value]||0,Yn(t,"deg")}),sm=Nn(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)}}),om=Nn(function(r){if(r.indexOf("linear")>-1||r.indexOf("radial")>-1){var t=pA(r);return t.map(function(o){var A=o.type,l=o.orientation,c=o.colorStops;rm(c);var u=c.map(function(x){return{offset:Yn(Number(x.length.value),"%"),color:$p(x)}});if(A==="linear-gradient")return new il(ws.LinearGradient,{angle:l?am(l):Co,steps:u});if(A==="radial-gradient"&&(l||(l=[{type:"shape",value:"circle"}]),l[0].type==="shape"&&l[0].value==="circle")){var h=sm(l[0].at),d=h.cx,f=h.cy,g;if(l[0].style){var v=l[0].style,p=v.type,y=v.value;p==="extent-keyword"?g=qp(y):g=Yn(y,p)}return new il(ws.RadialGradient,{cx:d,cy:f,size:g,steps:u})}})}var e=r[0];if(r[1]==="("||r[2]==="("){if(e==="l"){var n=sf.exec(r);if(n){var i,a=((i=n[2].match(Af))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new il(ws.LinearGradient,{angle:Yn(parseFloat(n[1]),"deg"),steps:a.map(function(o){var A=(0,H.Z)(o,2),l=A[0],c=A[1];return{offset:Yn(Number(l)*100,"%"),color:c}})})]}}else if(e==="r"){var s=Am(r);if(s)if(gn(s))r=s;else return[new il(ws.RadialGradient,s)]}else if(e==="p")return lm(r)}});function Am(r){var t=nm.exec(r);if(t){var e,n=((e=t[4].match(Af))===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,H.Z)(i,2),s=a[0],o=a[1];return{offset:Yn(Number(s)*100,"%"),color:o}})}}return null}function lm(r){var t=of.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 EE(r){return!!r.type&&!!r.value}function So(r){return r&&!!r.image}function Nc(r){return r&&!Re(r.r)&&!Re(r.g)&&!Re(r.b)}var sl=Nn(function(r){if(So(r))return(0,z.Z)({repetition:"repeat"},r);if(Re(r)&&(r=""),r==="transparent")return Ic;if(r==="currentColor")r="black";else if(r==="none")return af;var t=om(r);if(t)return t;var e=Cc(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),vA.apply(void 0,n)});function cm(r,t){if(!(!Nc(r)||!Nc(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(dr(n[i],0,255));return n[3]=dr(n[3],0,1),"rgba(".concat(n.join(","),")")}]}function ol(r,t){if(Re(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 ol(new RegExp("px","g"),t)},m=Nn(E),b=function(t){return ol(new RegExp("%","g"),t)};Nn(b);var B=function(t){return ye(t)||isFinite(Number(t))?Yn(Number(t)||0,"px"):ol(new RegExp("px|%|em|rem","g"),t)},Q=Nn(B),V=function(t){return ol(new RegExp("deg|rad|grad|turn","g"),t)},tt=Nn(V);function lt(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=$u(r.unit),l=r.convertTo(A),c=t.convertTo(A);return l&&c?(s=l.value,o=c.value,a=qu(r.unit)):(_n.isLength(r.unit)||_n.isLength(t.unit))&&(s=St(r,i,e),o=St(t,i,e),a="px"),[s,o,function(u){return n&&(u=Math.max(u,0)),u+a}]}function at(r){var t=0;return r.unit===fe.kDegrees?t=r.value:r.unit===fe.kRadians?t=bi(Number(r.value)):r.unit===fe.kTurns?t=Vd(Number(r.value)):r.value&&(t=r.value),t}function bt(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,G.Z)(e),(0,G.Z)(e)):e}function St(r,t,e){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(r.unit===fe.kPixels)return Number(r.value);if(r.unit===fe.kPercentage&&e){var i=e.nodeName===Kt.GROUP?e.getLocalBounds():e.getGeometryBounds();return(n?i.min[t]:0)+r.value/100*i.halfExtents[t]*2}return 0}var Ut=function(t){return ol(/deg|rad|grad|turn|px|%/g,t)},Jt=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function Te(){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 Ut(a)||sl(a)})}),t.lastIndex===r.length)return e}return[]}function he(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)},rn=Nn(Be);Nn(function(r){return gn(r)?r.split(" ").map(rn):r.map(rn)});function Ue(r,t){return[r,t,he]}function Le(r,t){return function(e,n){return[e,n,function(i){return he(dr(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=np(r.parsedStyle.d.absolutePath)),r.parsedStyle.d.totalLength}function Ye(r){return r.parsedStyle.points.totalLength===0&&(r.parsedStyle.points.totalLength=Hu(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&&We(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 We(r,t){return r[0]===t[0]&&r[1]===t[1]}function Or(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=ri(l[0],l[1],A[1],A[2],A[3],A[4]);break;case"C":c=kd(l[0],l[1],A[1],A[2],A[3],A[4],A[5],A[6]);break;case"A":var u=s.arcParams;c=bp(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=ic(e),d=ic(n),f=ac(e),g=ac(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 p=i[v],y=p.currentPoint,x=void 0;y[0]===h?(x=si(p,t),h-=x.xExtra):y[0]===f&&(x=si(p,t),f+=x.xExtra),y[1]===d?(x=si(p,t),d-=x.yExtra):y[1]===g&&(x=si(p,t),g+=x.yExtra)}return{x:h,y:d,width:f-h,height:g-d}}function si(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||tA(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 Di(r,t){return[t[0]+(t[0]-r[0]),t[1]+(t[1]-r[1])]}var zn=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},Vr=function(t,e,n,i,a,s,o,A){e=Math.abs(e),n=Math.abs(n),i=Ed(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 p=(a!==s?1:-1)*Math.sqrt(v),y={x:p*(e*h.y/n),y:p*(-(n*h.x)/e)},x={x:Math.cos(l)*y.x-Math.sin(l)*y.y+(t.x+o.x)/2,y:Math.sin(l)*y.x+Math.cos(l)*y.y+(t.y+o.y)/2},F={x:(h.x-y.x)/e,y:(h.y-y.y)/n},O=zn({x:1,y:0},F),L={x:(-h.x-y.x)/e,y:(-h.y-y.y)/n},U=zn(F,L);!s&&U>0?U-=2*Math.PI:s&&U<0&&(U+=2*Math.PI),U%=2*Math.PI;var R=O+U*A,j=e*Math.cos(R),q=n*Math.sin(R),et={x:Math.cos(l)*j-Math.sin(l)*q+x.x,y:Math.sin(l)*j+Math.cos(l)*q+x.y,ellipticalArcStartAngle:O,ellipticalArcEndAngle:O+U,ellipticalArcAngle:R,ellipticalArcCenter:x,resultantRx:e,resultantRy:n};return et};function Xs(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=Js(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]&&We(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],p=Di(v.currentPoint,f);v.command==="Q"?(c.command="Q",c.startTangent=[f[0]-p[0],f[1]-p[1]],c.endTangent=[e[0]-p[0],e[1]-p[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 y=[A[1],A[2]],x=[A[3],A[4]];c.startTangent=[f[0]-y[0],f[1]-y[1]],c.endTangent=[e[0]-x[0],e[1]-x[1]],c.startTangent[0]===0&&c.startTangent[1]===0&&(c.startTangent=[y[0]-x[0],y[1]-x[1]]),c.endTangent[0]===0&&c.endTangent[1]===0&&(c.endTangent=[x[0]-y[0],x[1]-y[1]])}else if(l==="S"){var F=t[o-1],O=Di(F.currentPoint,f),L=[A[1],A[2]];F.command==="C"?(c.command="C",c.startTangent=[f[0]-O[0],f[1]-O[1]],c.endTangent=[e[0]-L[0],e[1]-L[1]]):(c.command="SQ",c.startTangent=[f[0]-L[0],f[1]-L[1]],c.endTangent=[e[0]-L[0],e[1]-L[1]])}else if(l==="A"){var U=xi(c,0),R=U.x,j=U.y,q=xi(c,1,!1),et=q.x,it=q.y;c.startTangent=[R,j],c.endTangent=[et,it]}t.push(c)}return t}function xi(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=Vr({x:r.prePoint[0],y:r.prePoint[1]},a,o,A,!!l,!!c,{x:r.currentPoint[0],y:r.currentPoint[1]},t),h=Vr({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 oi(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function Es(r,t){return oi(r)*oi(t)?(r[0]*t[0]+r[1]*t[1])/(oi(r)*oi(t)):1}function Na(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(Es(r,t))}function Js(r,t){var e=t[1],n=t[2],i=Ed(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,p=e?g*-n*u/e:0,y=(o+l)/2+Math.cos(i)*v-Math.sin(i)*p,x=(A+c)/2+Math.sin(i)*v+Math.cos(i)*p,F=[(u-v)/e,(h-p)/n],O=[(-1*u-v)/e,(-1*h-p)/n],L=Na([1,0],F),U=Na(F,O);return Es(F,O)<=-1&&(U=Math.PI),Es(F,O)>=1&&(U=0),s===0&&U>0&&(U-=2*Math.PI),s===1&&U<0&&(U+=2*Math.PI),{cx:y,cy:x,rx:We(r,[l,c])?0:e,ry:We(r,[l,c])?0:n,startAngle:L,endAngle:L+U,xRotation:i,arcFlag:a,sweepFlag:s}}function Mo(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 Fo(r,t,e,n){return[["M",r,t],["L",e,n]]}function $a(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 To(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 Bs(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 Al(r){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:r.getLocalTransform(),e=[];switch(r.nodeName){case Kt.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=Fo(a,o,l,u);break;case Kt.CIRCLE:{var h=r.parsedStyle,d=h.r,f=d===void 0?0:d,g=h.cx,v=g===void 0?0:g,p=h.cy,y=p===void 0?0:p;e=$a(f,f,v,y);break}case Kt.ELLIPSE:{var x=r.parsedStyle,F=x.rx,O=F===void 0?0:F,L=x.ry,U=L===void 0?0:L,R=x.cx,j=R===void 0?0:R,q=x.cy,et=q===void 0?0:q;e=$a(O,U,j,et);break}case Kt.POLYLINE:case Kt.POLYGON:var it=r.parsedStyle.points;e=To(it.points,r.nodeName===Kt.POLYGON);break;case Kt.RECT:var dt=r.parsedStyle,ft=dt.width,mt=ft===void 0?0:ft,Rt=dt.height,Qt=Rt===void 0?0:Rt,yt=dt.x,xt=yt===void 0?0:yt,Dt=dt.y,Xt=Dt===void 0?0:Dt,ne=dt.radius,le=ne&&ne.some(function(xe){return xe!==0});e=Bs(mt,Qt,xt,Xt,le&&ne.map(function(xe){return clamp(xe,0,Math.min(Math.abs(mt)/2,Math.abs(Qt)/2))}));break;case Kt.PATH:var ge=r.parsedStyle.d.absolutePath;e=_toConsumableArray(ge);break}if(e.length)return Mo(e,r,t)}function Lc(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],p=_slicedToArray(v,2),y=p[0],x=p[1];switch(A){case"M":return"M ".concat(s[1]+f,",").concat(s[2]+g);case"L":return"L ".concat(s[1]+y,",").concat(s[2]+x);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+y," ").concat(s[4]+x);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+y," ").concat(s[6]+x);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 BE=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=rc(t)}catch(d){e=rc(""),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=Xs(e),A=Or(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}}},DM=Nn(BE);function bE(r){return gn(r)?DM(r):BE(r)}function PM(r,t,e){var n=r.curve,i=t.curve;(!n||n.length===0)&&(n=Iu(r.absolutePath,!1),r.curve=n),(!i||i.length===0)&&(i=Iu(t.absolutePath,!1),t.curve=i);var a=[n,i];n.length!==i.length&&(a=xd(n,i));var s=Cd(a[0])!==Cd(a[1])?cp(a[0]):up(a[0]);return[s,Sd(a[1],s),function(o){return o}]}function _M(r,t){var e;return gn(r)?e=r.split(" ").map(function(n){var i=n.split(","),a=(0,H.Z)(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):e=r,{points:e,totalLength:0,segments:[]}}function HM(r,t){return[r.points,t.points,function(e){return e}]}var Cr=null,kc=/\s*(\w+)\(([^)]*)\)/g;function fa(r){return function(t){var e=0;return r.map(function(n){return n===Cr?t[e++]:n})}}function ll(r){return r}var eh={matrix:["NNNNNN",[Cr,Cr,0,0,Cr,Cr,0,0,0,0,1,0,Cr,Cr,0,1],ll],matrix3d:["NNNNNNNNNNNNNNNN",ll],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",fa([Cr,Cr,new _n(1)]),ll],scaleX:["N",fa([Cr,new _n(1),new _n(1)]),fa([Cr,new _n(1)])],scaleY:["N",fa([new _n(1),Cr,new _n(1)]),fa([new _n(1),Cr])],scaleZ:["N",fa([new _n(1),new _n(1),Cr])],scale3d:["NNN",ll],skew:["Aa",null,ll],skewX:["A",null,fa([Cr,Co])],skewY:["A",null,fa([Co,Cr])],translate:["Tt",fa([Cr,Cr,Ia]),ll],translateX:["T",fa([Cr,Ia,Ia]),fa([Cr,Ia])],translateY:["T",fa([Ia,Cr,Ia]),fa([Ia,Cr])],translateZ:["L",fa([Ia,Ia,Cr])],translate3d:["TTL",ll]};function xE(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=eh[a];if(!o)return[];var A=s.map(function(l){return Yn(l)});t.push({t:a,d:A})}return t}function CE(r){if(Array.isArray(r))return xE(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(kc.lastIndex=0;e=kc.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=eh[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"?Co:tt(f)},N:rn,T:Q,L:m}[u.toUpperCase()](c):h={a:Co,n:A[0],t:Ia}[u],h===void 0)return[];A.push(h)}if(t.push({t:i,d:A}),kc.lastIndex===r.length)return t}return[]}function GM(r){if(Array.isArray(r))return xE(r);if(r=(r||"none").trim(),r==="none")return[];var t=[],e,n=0;for(kc.lastIndex=0;e=kc.exec(r);){if(e.index!==n)return[];n=e.index+e[0].length;var i=e[1],a=eh[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"?Co:V(f)},N:Be,T:B,L:E}[u.toUpperCase()](c):h={a:Co,n:A[0],t:Ia}[u],h===void 0)return[];A.push(h)}if(t.push({t:i,d:A}),kc.lastIndex===r.length)return t}return[]}function zM(r){var t,e,n,i;switch(r.t){case"rotateX":return i=Un(at(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(at(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(at(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(at(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(at(r.d[0])),u=Un(at(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(at(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(at(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=St(r.d[0],0,null)||0,e=St(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=St(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=St(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=St(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=St(r.d[0],0,null)||0,e=St(r.d[1],0,null)||0,n=St(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=St(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 KM(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 VM(r){return r.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:r.map(zM).reduce(KM)}function SE(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 jd(VM(r),t,e,n,i,a),[[t,e,n,a,i]]}var WM=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 p=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(p[2][1]=a[2],A=r(A,p)),a[1]&&(p[2][1]=0,p[2][0]=a[0],A=r(A,p)),a[0]&&(p[2][0]=0,p[1][0]=a[0],A=r(A,p));for(var y=0;y<3;y++)for(var x=0;x<3;x++)A[y][x]*=i[y];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 jM(r){return r.toFixed(6).replace(".000000","")}function um(r,t){var e,n;return r.decompositionPair!==t&&(r.decompositionPair=t,e=SE(r)),t.decompositionPair!==r&&(t.decompositionPair=r,n=SE(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=WM(i[0],i[1],i[2],a,i[4]),o=s.map(jM).join(",");return o}])}function ZM(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=ZM(r,t);n=dr(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 hm(r){return r.replace(/[XY]/,"")}function dm(r){return r.replace(/(X|Y|Z|3d)?$/,"3d")}var XM=function(t,e){return t==="perspective"&&e==="perspective"||(t==="matrix"||t==="matrix3d")&&(e==="matrix"||e==="matrix3d")};function JM(r,t,e){var n=!1;if(!r.length||!t.length){r.length||(n=!0,r=t,t=[]);for(var i=function(){var et=r[a],it=et.t,dt=et.d,ft=it.substring(0,5)==="scale"?1:0;t.push({t:it,d:dt.map(function(mt){return typeof mt=="number"?Yn(ft):Yn(ft,mt.unit)})})},a=0;a<r.length;a++)i()}var s=[],o=[],A=[];if(r.length!==t.length){var l=um(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=eh[u],v=eh[h],p=void 0;if(XM(u,h)){var y=um([r[c]],[t[c]]);s.push(y[0]),o.push(y[1]),A.push(["matrix",[y[2]]]);continue}else if(u===h)p=u;else if(g[2]&&v[2]&&hm(u)===hm(h))p=hm(u),d=g[2](d),f=v[2](f);else if(g[1]&&v[1]&&dm(u)===dm(h))p=dm(u),d=g[1](d),f=v[1](f);else{var x=um(r,t);s=[x[0]],o=[x[1]],A=[["matrix",[x[2]]]];break}for(var F=[],O=[],L=[],U=0;U<d.length;U++){var R=lt(d[U],f[U],e,!1,U);F[U]=R[0],O[U]=R[1],L.push(R[2])}s.push(F),o.push(O),A.push([p,L])}if(n){var j=s;s=o,o=j}return[s,o,function(q){return q.map(function(et,it){var dt=et.map(function(ft,mt){return A[it][1][mt](ft)}).join(",");return A[it][0]==="matrix"&&dt.split(",").length===16&&(A[it][0]="matrix3d"),A[it][0]==="matrix3d"&&dt.split(",").length===6&&(A[it][0]="matrix"),"".concat(A[it][0],"(").concat(dt,")")}).join(" ")}]}var qM=Nn(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:[Q(ME(t[0])),Q(ME(t[1]))]}return[Yn(r[0]||0,"px"),Yn(r[1]||0,"px")]});function ME(r){return r==="center"?"50%":r==="left"||r==="top"?"0%":r==="right"||r==="bottom"?"100%":r}var fm=[{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===Kt.PATH||t===Kt.POLYGON||t===Kt.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"}],$M=new Set(fm.filter(function(r){return!!r.l}).map(function(r){return r.n})),FE={},tF=function(){function r(t){var e=this;(0,P.Z)(this,r),this.runtime=t,fm.forEach(function(n){e.registerMetadata(n)})}return(0,N.Z)(r,[{key:"registerMetadata",value:function(e){[e.n].concat((0,G.Z)(e.a||[])).forEach(function(n){FE[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;eF(e,n);var o=!!i.forceUpdateGeometry;if(!o){for(var A in n)if($M.has(A)){o=!0;break}}var l=TE(e);l.has("fill")&&n.fill&&(e.parsedStyle.fill=sl(n.fill)),l.has("stroke")&&n.stroke&&(e.parsedStyle.stroke=sl(n.stroke)),l.has("shadowColor")&&n.shadowColor&&(e.parsedStyle.shadowColor=sl(n.shadowColor)),l.has("filter")&&n.filter&&(e.parsedStyle.filter=Te(n.filter)),l.has("radius")&&!Re(n.radius)&&(e.parsedStyle.radius=bt(n.radius,4)),l.has("lineDash")&&!Re(n.lineDash)&&(e.parsedStyle.lineDash=bt(n.lineDash,"even")),l.has("points")&&n.points&&(e.parsedStyle.points=_M(n.points)),l.has("d")&&n.d===""&&(e.parsedStyle.d=(0,z.Z)({},vs)),l.has("d")&&n.d&&(e.parsedStyle.d=bE(n.d)),l.has("textTransform")&&n.textTransform&&this.runtime.CSSPropertySyntaxFactory[oe.TEXT_TRANSFORM].calculator(null,null,{value:n.textTransform},e,null),l.has("clipPath")&&!Ze(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=CE(n.transform)),l.has("transformOrigin")&&n.transformOrigin&&(e.parsedStyle.transformOrigin=qM(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")&&!Re(n.zIndex)&&this.runtime.CSSPropertySyntaxFactory[oe.Z_INDEX].postProcessor(e),l.has("offsetDistance")&&!Re(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 Zn),a.renderBounds||(a.renderBounds=new Zn);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,p=v===void 0?0:v,y=o.hdepth,x=y===void 0?0:y,F=[Math.abs(g),Math.abs(p),x],O=s.stroke,L=s.lineWidth,U=L===void 0?1:L,R=s.increasedLineWidthForHitTesting,j=R===void 0?0:R,q=s.shadowType,et=q===void 0?"outer":q,it=s.shadowColor,dt=s.filter,ft=dt===void 0?[]:dt,mt=s.transformOrigin,Rt=[l,u,d];a.contentBounds.update(Rt,F);var Qt=n===Kt.POLYLINE||n===Kt.POLYGON||n===Kt.PATH?Math.SQRT2:.5,yt=O&&!O.isNone;if(yt){var xt=((U||0)+(j||0))*Qt;F[0]+=xt,F[1]+=xt}if(a.renderBounds.update(Rt,F),it&&et&&et!=="inner"){var Dt=a.renderBounds,Xt=Dt.min,ne=Dt.max,le=s.shadowBlur,ge=s.shadowOffsetX,xe=s.shadowOffsetY,Qe=le||0,Pe=ge||0,en=xe||0,mn=Xt[0]-Qe+Pe,an=ne[0]+Qe+Pe,er=Xt[1]-Qe+en,kn=ne[1]+Qe+en;Xt[0]=Math.min(Xt[0],mn),ne[0]=Math.max(ne[0],an),Xt[1]=Math.min(Xt[1],er),ne[1]=Math.max(ne[1],kn),a.renderBounds.setMinMax(Xt,ne)}ft.forEach(function(Bn){var Us=Bn.name,hi=Bn.params;if(Us==="blur"){var Vi=hi[0].value;a.renderBounds.update(a.renderBounds.center,de(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[Vi,Vi,0]))}else if(Us==="drop-shadow"){var cn=hi[0].value,Fn=hi[1].value,hn=hi[2].value,Sn=a.renderBounds,Rn=Sn.min,ke=Sn.max,Tn=Rn[0]-hn+cn,En=ke[0]+hn+cn,ur=Rn[1]-hn+Fn,qe=ke[1]+hn+Fn;Rn[0]=Math.min(Rn[0],Tn),ke[0]=Math.max(ke[0],En),Rn[1]=Math.min(Rn[1],ur),ke[1]=Math.max(ke[1],qe),a.renderBounds.setMinMax(Rn,ke)}}),e.geometry.dirty=!1;var Cn=g<0,vr=p<0,wa=(Cn?-1:1)*(mt?St(mt[0],0,e,!0):0),Hn=(vr?-1:1)*(mt?St(mt[1],1,e,!0):0);(wa||Hn)&&e.setOrigin(wa,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===Kt.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===Kt.CIRCLE&&e.style.rawR&&(e.style.r=e.style.rawR,delete e.style.rawR))}}])}();function eF(r,t){var e=TE(r);for(var n in t)e.has(n)&&(r.parsedStyle[n]=t[n])}function TE(r){return r.constructor.PARSED_STYLE_LIST}var nF=function(){function r(){(0,P.Z)(this,r),this.mixer=Ue}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a){return at(i)}}])}(),rF=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a,s){return i instanceof Ri&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(e,n,i,a),e==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtyToRoot(o)}),i}}])}(),iF=function(){function r(){(0,P.Z)(this,r),this.parser=sl,this.mixer=cm}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Ri?i.value==="none"?af:Ic:i}}])}(),aF=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i){return i instanceof Ri?[]:i}}])}();function OE(r){var t=r.parsedStyle,e=t.fontSize;return Re(e)?null:e}var gm=function(){function r(){(0,P.Z)(this,r),this.mixer=Ue}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a,s){if(ye(i))return i;if(_n.isRelativeUnit(i.unit)){if(i.unit===fe.kPercentage)return 0;if(i.unit===fe.kEms){if(a.parentNode){var o=OE(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===fe.kRems){var A;if(a!=null&&(A=a.ownerDocument)!==null&&A!==void 0&&A.documentElement){var l=OE(a.ownerDocument.documentElement);if(l)return l*=i.value,l}return 0}}else return i.value}}])}(),sF=function(){function r(){(0,P.Z)(this,r),this.mixer=Mn}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),oF=function(){function r(){(0,P.Z)(this,r),this.mixer=Mn}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i){return i.map(function(a){return a.value})}}])}(),AF=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a){var s;i instanceof Ri&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),lF=function(){function r(){(0,P.Z)(this,r),this.mixer=Ue}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),cF=function(){function r(){(0,P.Z)(this,r),this.mixer=Le(0,1)}return(0,N.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===Kt.LINE||s===Kt.PATH||s===Kt.POLYLINE){var o=i.getPoint(a);o&&e.setLocalPosition(o.x,o.y)}}}}])}(),uF=function(){function r(){(0,P.Z)(this,r),this.mixer=Le(0,1)}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i){return i.value}}])}(),hF=function(){function r(){(0,P.Z)(this,r),this.parser=bE,this.mixer=PM}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i){return i instanceof Ri&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new fs(0,0,0,0)}:i}}])}(),dF=(0,N.Z)(function r(){(0,P.Z)(this,r),this.mixer=HM}),fF=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.mixer=Le(0,1/0),e}return(0,_.Z)(t,r),(0,N.Z)(t)}(gm),gF=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Ri?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(e){e.nodeValue="".concat(e.parsedStyle.text)||""}}])}(),vF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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}}])}(),z8=function(t){return Object.fromEntries(Object.entries(t).filter(function(e){var n=_slicedToArray(e,2),i=n[1];return i!==void 0}))},vm=new WeakMap;function pF(r,t,e){if(r){var n=typeof r=="string"?document.getElementById(r):r;vm.has(n)&&vm.get(n).destroy(e),vm.set(n,t)}}var pm=typeof window!="undefined"&&typeof window.document!="undefined";function mF(r){return!!r.getAttribute}function yF(r,t){for(var e=0,n=r.length;e<n;){var i=e+n>>>1;IE(r[i],t)<0?e=i+1:n=i}return e}function IE(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 NE(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 LE="px";function wF(r,t,e){pm&&r.style&&(r.style.width=t+LE,r.style.height=e+LE)}function kE(r,t){if(pm)return document.defaultView.getComputedStyle(r,null).getPropertyValue(t)}function EF(r){var t=kE(r,"width");return t==="auto"?r.offsetWidth:parseFloat(t)}function BF(r){var t=kE(r,"height");return t==="auto"?r.offsetHeight:parseFloat(t)}var bF=1,xF={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},mm=typeof performance=="object"&&performance.now?performance:Date;function lf(r){return r.nodeName===Kt.FRAGMENT?!0:r.getRootNode().nodeName===Kt.FRAGMENT}function cl(){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 CF=1,SF=function(){return CF++},qs=typeof self=="object"&&self.self===self?self:typeof T.g=="object"&&T.g.global===T.g?T.g:{},MF=Date.now(),FF=function(){return qs.performance&&typeof qs.performance.now=="function"?qs.performance.now():Date.now()-MF},nh={},QE=Date.now(),TF=function(t){if(typeof t!="function")throw new TypeError("".concat(t," is not a function"));var e=Date.now(),n=e-QE,i=n>16?0:16-n,a=SF();return nh[a]=t,Object.keys(nh).length>1||setTimeout(function(){QE=e;var s=nh;nh={},Object.keys(s).forEach(function(o){return s[o](FF())})},i),a},OF=function(t){delete nh[t]},IF=["","webkit","moz","ms","o"],UE=function(t){return typeof t!="string"?TF:t===""?qs.requestAnimationFrame:qs["".concat(t,"RequestAnimationFrame")]},NF=function(t){return typeof t!="string"?OF:t===""?qs.cancelAnimationFrame:qs["".concat(t,"CancelAnimationFrame")]||qs["".concat(t,"CancelRequestAnimationFrame")]},LF=function(t,e){for(var n=0;t[n]!==void 0;){if(e(t[n]))return t[n];n+=1}},RE=LF(IF,function(r){return!!UE(r)}),ym=UE(RE),DE=NF(RE);qs.requestAnimationFrame=ym,qs.cancelAnimationFrame=DE;var kF=function(){function r(){(0,P.Z)(this,r),this.callbacks=[]}return(0,N.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)}))}}])}(),QF=function(){function r(){(0,P.Z)(this,r),this.callbacks=[]}return(0,N.Z)(r,[{key:"tapPromise",value:function(e,n){this.callbacks.push(n)}},{key:"promise",value:function(){var t=(0,Xa.Z)((0,ii.Z)().mark(function n(){var i,a,s,o,A=arguments;return(0,ii.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}()}])}(),na=function(){function r(){(0,P.Z)(this,r),this.callbacks=[]}return(0,N.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)})}}])}(),wm=function(){function r(){(0,P.Z)(this,r),this.callbacks=[]}return(0,N.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}}])}(),UF=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],RF=/([\"\'])[^\'\"]+\1/;function PE(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 _E=Nn(function(t){for(var e=PE(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();!RF.test(u)&&UF.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=PE(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)}),DF=1e-6,rh=function(t){return Math.max(t,DF)};function Em(r,t,e){return Ie(r),r[4]=Math.tan(t),r[1]=Math.tan(e),r}var Dr=$t(),PF=$t(),_F={scale:function(t){Dn(Dr,[t[0].value,t[1].value,1].map(function(e){return rh(e)}))},scaleX:function(t){Dn(Dr,[t[0].value,1,1].map(function(e){return rh(e)}))},scaleY:function(t){Dn(Dr,[1,t[0].value,1].map(function(e){return rh(e)}))},scaleZ:function(t){Dn(Dr,[1,1,t[0].value].map(function(e){return rh(e)}))},scale3d:function(t){Dn(Dr,[t[0].value,t[1].value,t[2].value].map(function(e){return rh(e)}))},translate:function(t){Tr(Dr,[t[0].value,t[1].value,0])},translateX:function(t){Tr(Dr,[t[0].value,0,0])},translateY:function(t){Tr(Dr,[0,t[0].value,0])},translateZ:function(t){Tr(Dr,[0,0,t[0].value])},translate3d:function(t){Tr(Dr,[t[0].value,t[1].value,t[2].value])},rotate:function(t){Er(Dr,Un(at(t[0])))},rotateX:function(t){$i(Dr,Un(at(t[0])))},rotateY:function(t){fn(Dr,Un(at(t[0])))},rotateZ:function(t){Er(Dr,Un(at(t[0])))},rotate3d:function(t){qi(Dr,Un(at(t[3])),[t[0].value,t[1].value,t[2].value])},skew:function(t){Em(Dr,Un(t[0].value),Un(t[1].value))},skewX:function(t){Em(Dr,Un(t[0].value),0)},skewY:function(t){Em(Dr,0,Un(t[0].value))},matrix:function(t){Wn(Dr,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(I,[Dr].concat((0,G.Z)(t.map(function(e){return e.value}))))}},HF=Wt(1,1,1),GF=Ot(),HE={translate:function(t,e){re.sceneGraphService.setLocalScale(t,HF,!1),re.sceneGraphService.setLocalEulerAngles(t,GF,void 0,void 0,!1),re.sceneGraphService.setLocalPosition(t,[e[0].value,e[1].value,0],!1),re.sceneGraphService.dirtyLocalTransform(t,t.transformable)}};function GE(r,t){if(r.length){if(r.length===1&&HE[r[0].t]){HE[r[0].t](t,r[0].d);return}for(var e=Ie(PF),n=0;n<r.length;n++){var i=r[n],a=i.t,s=i.d,o=_F[a];o&&(o(s),po(e,e,Dr))}t.setLocalTransform(e)}else t.resetLocalTransform();return t.getLocalTransform()}var zF=function(){function r(){(0,P.Z)(this,r),this.parser=GM,this.mixer=JM}return(0,N.Z)(r,[{key:"calculator",value:function(e,n,i,a){return i instanceof Ri?[]:i}},{key:"postProcessor",value:function(e){GE(e.parsedStyle.transform,e)}}])}(),KF=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"postProcessor",value:function(e){var n=e.parsedStyle.transformOrigin;n[0].unit===fe.kPixels&&n[1].unit===fe.kPixels?e.setOrigin(n[0].value,n[1].value):e.getGeometryBounds()}}])}(),VF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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=bc.Z_INDEX_CHANGED)}}}])}(),WF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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}}}])}(),jF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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}}}])}(),ZF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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}}}])}(),YF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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}}}])}(),XF=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"update",value:function(e){if(e.points&&Qi(e.points.points)){var n=e.points.points,i=Math.min.apply(Math,(0,G.Z)(n.map(function(h){return h[0]}))),a=Math.max.apply(Math,(0,G.Z)(n.map(function(h){return h[0]}))),s=Math.min.apply(Math,(0,G.Z)(n.map(function(h){return h[1]}))),o=Math.max.apply(Math,(0,G.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}}}])}(),JF=function(){function r(){(0,P.Z)(this,r)}return(0,N.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}}}])}(),qF=function(){function r(t){(0,P.Z)(this,r),this.globalRuntime=t}return(0,N.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,p=v===void 0?0:v,y=e.y,x=y===void 0?0:y;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())||{},O=F.offscreenCanvas,L=this.globalRuntime.textService.measureText(a,e,O);e.metrics=L;var U=L.width,R=L.height,j=U/2,q=R/2,et=p+j;o==="center"||o==="middle"?et+=l/2-j:(o==="right"||o==="end")&&(et+=l-j*2);var it=x-q;return u==="middle"?it+=q:u==="top"||u==="hanging"?it+=q*2:u==="alphabetic"||(u==="bottom"||u==="ideographic")&&(it+=0),d&&(et+=d),g&&(it+=g),{cx:et,cy:it,hwidth:j,hheight:q}}}])}(),$F=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"update",value:function(e,n){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),tT=function(){function r(){(0,P.Z)(this,r)}return(0,N.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 K8(r){return!!r.type}var cf=function(){function r(t){(0,P.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 ai,this.page=new ai,this.canvas=new ai,this.viewport=new ai,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=t}return(0,N.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)}}])}(),zE=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.client=new ai,e.movement=new ai,e.offset=new ai,e.global=new ai,e.screen=new ai,e}return(0,_.Z)(t,r),(0,N.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)}}])}(cf),uf=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.width=0,e.height=0,e.isPrimary=!1,e}return(0,_.Z)(t,r),(0,N.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)}}])}(zE),Bm=function(r){function t(){return(0,P.Z)(this,t),(0,K.Z)(this,t,arguments)}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(zE),Wr=function(r){function t(e,n){var i;return(0,P.Z)(this,t),i=(0,K.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,_.Z)(t,r),(0,N.Z)(t)}(cf),KE=function(){function r(){(0,P.Z)(this,r),this.emitter=new Z}return(0,N.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(eA(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=Vt(n)?n:n.handleEvent;var l=Vt(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=eA(i)?i:i==null?void 0:i.capture;s&&(e+="capture"),n=Vt(n)?n:(a=n)===null||a===void 0?void 0:a.handleEvent;var o=Vt(n)?void 0:n;return this.emitter.off(e,n,o),this}},{key:"emit",value:function(e,n){this.dispatchEvent(new Wr(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}}])}(),pr=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.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,_.Z)(t,r),(0,N.Z)(t,[{key:"textContent",get:function(){var n="";this.nodeName===Kt.TEXT&&(n+=this.style.text);var i=(0,Ws.Z)(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Kt.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===Kt.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}}])}(KE);pr.DOCUMENT_POSITION_DISCONNECTED=1,pr.DOCUMENT_POSITION_PRECEDING=2,pr.DOCUMENT_POSITION_FOLLOWING=4,pr.DOCUMENT_POSITION_CONTAINS=8,pr.DOCUMENT_POSITION_CONTAINED_BY=16,pr.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var eT=2048,nT=function(){function r(t,e){var n=this;(0,P.Z)(this,r),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=$t(),this.tmpVec3=Ot(),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=mm.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")}pr.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"),pr.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&&pr.isNode(A)&&A.parentNode;f&&f!==(pr.isNode(n.rootTarget)&&n.rootTarget.parentNode)&&f!==a.target;)f=f.parentNode;var g=!f||f===(pr.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!==(pr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)v.currentTarget=v.target,n.notifyTarget(v),s&&n.notifyTarget(v,"mouseenter"),pr.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!==(pr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)l.currentTarget=l.target,n.notifyTarget(l),s&&n.notifyTarget(l,"mouseleave"),pr.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!==(pr.isNode(n.rootTarget)&&n.rootTarget.parentNode);)A.currentTarget=A.target,n.notifyTarget(A),o&&n.notifyTarget(A,"mouseenter"),pr.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"),pr.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,N.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 ai((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 ai((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=ue(this.tmpMatrix,u,c),d=ve(this.tmpVec3,n/A*2-1,(1-i/l)*2-1,0);return me(d,d,h),new ai(d[0],d[1])}},{key:"canvas2Viewport",value:function(e){var n=this.rootTarget.defaultView,i=n.getCamera(),a=i.getPerspective(),s=i.getViewTransform(),o=ue(this.tmpMatrix,a,s),A=ve(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 ai((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<eT&&e!==this.rootTarget;a++)pr.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(uf);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(Bm);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(Bm);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(uf);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=mm.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||pr.isNode(a)&&a.parentNode===n)n=e[i];else break}return n}},{key:"getCursor",value:function(e){for(var n=e;n;){var i=mF(n)&&n.getAttribute("cursor");if(i)return i;n=pr.isNode(n)&&n.parentNode}}}])}(),bm=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"getOrCreateCanvas",value:function(e,n){if(this.canvas)return this.canvas;if(e||re.offscreenCanvas)this.canvas=e||re.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,z.Z)({willReadFrequently:!0},n));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,z.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,z.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}}])}(),Qc=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}({}),rT=function(){function r(t,e){(0,P.Z)(this,r),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new na,initAsync:new kF,dirtycheck:new wm,cull:new wm,beginFrame:new na,beforeRender:new na,render:new na,afterRender:new na,endFrame:new na,destroy:new na,pick:new QF,pickSync:new wm,pointerDown:new na,pointerUp:new na,pointerMove:new na,pointerOut:new na,pointerOver:new na,pointerWheel:new na,pointerCancel:new na,click:new na},this.globalRuntime=t,this.context=e}return(0,N.Z)(r,[{key:"init",value:function(e){var n=this,i=(0,z.Z)((0,z.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(Qc.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(Qc.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,p=g.sortable,y=o?v.dirty||i.dirtyRectangleRenderingDisabled?g:null:g,x=null;y&&(x=A?a.hooks.cull.call(y,a.context.camera):y,x&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(x))),g.dirty(!1),p.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,p.dirty&&(a.sort(g,p),p.dirty=!1,p.dirtyChildren=[],p.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!==bc.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=yF(n.sorted,s);n.sorted.splice(l,0,s)}}):n.sorted=e.childNodes.slice().sort(IE),((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(Qc.DISPLAY_OBJECT_CHANGED)}}])}(),iT=/\[\s*(.*)=(.*)\s*\]/,aT=function(){function r(){(0,P.Z)(this,r)}return(0,N.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(iT),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 Re(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}({}),$s=function(r){function t(e,n,i,a,s,o,A,l){var c;return(0,P.Z)(this,t),c=(0,K.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,_.Z)(t,r),(0,N.Z)(t)}(cf);$s.ADDITION=2,$s.MODIFICATION=1,$s.REMOVAL=3;var sT=new $s(yn.REPARENT,null,"","","",0,"",""),oT=Bu(),hf=Ot(),AT=Wt(1,1,1),lT=$t(),cT=Bu(),ul=Ot(),uT=$t(),hl=Br(),hT=Ot(),dT=Br(),fT=Ot(),ih=Ot(),dl=Ot(),df=$t(),VE=Br(),WE=Br(),ff=Br(),gT=function(){function r(t){(0,P.Z)(this,r),this.displayObjectDependencyMap=new WeakMap,this.runtime=t}return(0,N.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===Kt.FRAGMENT,A=lf(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=bc.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(sT,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=bc.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;ih[0]=n[0],ih[1]=n[1],ih[2]=(i=n[2])!==null&&i!==void 0?i:0,!Yi(s.localPosition,ih)&&(ie(s.localPosition,ih),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=Wt(n,i,a));var s=e.transformable;Yi(n,hf)||(zr(n,n,s.localRotation),de(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=XA(hl,n,i,a,s));var A=e.transformable;YA(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=Wt(n,i,a));var s=e.transformable;Gn(WE,n[0],n[1],n[2]),Eu(s.localRotation,s.localRotation,WE),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;ve(ul,n[0],n[1],(i=n[2])!==null&&i!==void 0?i:s.localScale[2]),!Yi(ul,s.localScale)&&(ie(s.localScale,ul),a&&this.dirtyLocalTransform(e,s))}},{key:"scaleLocal",value:function(e,n){var i,a=e.transformable;sn(a.localScale,a.localScale,ve(ul,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=Ov(cT,n,i));var s=e.transformable;Tv(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=Wt(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=Pn(hT,n),a=Xo(dT,n),s=Ds(fT,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,AT,!1),this.setLocalPosition(e,hf,!1),this.setLocalEulerAngles(e,hf,void 0,void 0,!1),this.setLocalSkew(e,oT,void 0,!1),this.dirtyLocalTransform(e,e.transformable)}},{key:"getPosition",value:function(e){var n=e.transformable;return Pn(n.position,this.getWorldTransform(e,n))}},{key:"getRotation",value:function(e){var n=e.transformable;return Xo(n.rotation,this.getWorldTransform(e,n))}},{key:"getScale",value:function(e){var n=e.transformable;return Ds(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(dl[0]=n[0],dl[1]=n[1],dl[2]=(i=n[2])!==null&&i!==void 0?i:0,!Yi(this.getPosition(e),dl)){if(ie(a.position,dl),e.parentNode===null||!e.parentNode.transformable)ie(a.localPosition,dl);else{var s=e.parentNode.transformable;He(df,s.worldTransform),on(df,df),me(a.localPosition,dl,df)}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=ve(ul,n,i,a)),!Yi(n,hf)&&(de(ul,this.getPosition(e),n),this.setPosition(e,ul))}},{key:"setRotation",value:function(e,n,i,a,s){var o=e.transformable;if(typeof n=="number"&&(n=cd(n,i,a,s)),e.parentNode===null||!e.parentNode.transformable)this.setLocalRotation(e,n);else{var A=this.getRotation(e.parentNode);YA(hl,A),jA(hl,hl),Ps(o.localRotation,hl,n),Jo(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=Wt(n,i,a));var s=e.transformable;if(e.parentNode===null||!e.parentNode.transformable)this.rotateLocal(e,n);else{var o=hl;Gn(o,n[0],n[1],n[2]);var A=this.getRotation(e),l=this.getRotation(e.parentNode);YA(ff,l),jA(ff,ff),Ps(o,ff,o),Ps(s.localRotation,o,A),Jo(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=Wt(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);YA(VE,jA(hl,o)),Eu(s.localRotation,s.localRotation,VE),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&&re.styleValueRegistry.updateGeometry(e);var s=n?a.renderBounds:a.contentBounds||null;return s||new Zn}},{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(!Zn.isEmpty(a)){var s=i||new Zn;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 Zn,A.update(d.center,d.halfExtents)))}),A||(A=new Zn),i){var c=NE(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=lT;e.parentNode.transformable&&(n=on(uT,this.getWorldTransform(e.parentNode)));var i=this.getBounds(e);if(!Zn.isEmpty(i)){var a=new Zn;return a.setFromTransformedAABB(i,n),a}}return this.getBounds(e)}},{key:"getBoundingClientRect",value:function(e){var n,i,a=this.getGeometryBounds(e);Zn.isEmpty(a)||(i=new Zn,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,H.Z)(o,2),l=A[0],c=A[1],u=i.getMax(),h=(0,H.Z)(u,2),d=h[0],f=h[1];return new fs(l+((s==null?void 0:s.left)||0),c+((s==null?void 0:s.top)||0),d-l,f-c)}return new fs((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),cA(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,p=n[f];if(p.shapeUpdated)break;(g=(v=p.node).dirty)===null||g===void 0||g.call(v,!0,!0),p.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){lf(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,z.Z)({},s);A.target=o,n.add(A)}):n.add(s))}),a.mutations=void 0}),n.size>0){var i=new Wr(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 $s(yn.ATTR_MODIFIED,A,i,i,o,$s.MODIFICATION,i,i),s,s),A.isCustomElement&&A.isConnected&&A.attributeChangedCallback&&A.attributeChangedCallback(o,i,i)})})}}}])}(),jE=function(){function r(t){if((0,P.Z)(this,r),t<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=t,this.cache=new Map}return(0,N.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()}}])}(),fl={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]},ZE=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,vT=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,pT=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,mT=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,yT=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,wT=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,ET=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,BT=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,bT=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,xT=new RegExp("".concat(vT.source,"|").concat(mT.source,"|").concat(wT.source,"|").concat(BT.source)),CT=new RegExp("".concat(pT.source,"|").concat(yT.source,"|").concat(ET.source,"|").concat(bT.source)),ST=function(){function r(t){var e=this;(0,P.Z)(this,r),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(n,i){return e.isBreakingSpace(i)?!1:!!(n&&(CT.exec(i)||xT.exec(n)))},this.trimByKinsokuShorui=function(n){var i=(0,G.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 jE(100)}return(0,N.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=fl.MetricsString+fl.BaselineSymbol,A=Math.ceil(s.measureText(o).width),l=Math.ceil(s.measureText(fl.BaselineSymbol).width),c=fl.HeightMultiplier*l;l=l*fl.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 p=0;p<d;p+=4)if(u[g+p]!==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 y=0;y<d;y+=4)if(u[g+y]!==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,p=v===void 0?0:v,y=n.textPath;n.textPathSide,n.textPathStartOffset;var x=n.leading,F=x===void 0?0:x,O=_E(n),L=this.measureFont(O,i);L.fontSize===0&&(L.fontSize=s,L.ascent=s);var U=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);U.font=O,n.isOverflowing=!1;var R=A?this.wordWrap(e,n,i):e,j=R.split(/(?:\r\n|\r|\n)/),q=new Array(j.length),et=0;if(y){y.getTotalLength();for(var it=0;it<j.length;it++)U.measureText(j[it]).width+(j[it].length-1)*p}else{for(var dt=0;dt<j.length;dt++){var ft=U.measureText(j[dt]).width+(j[dt].length-1)*p;q[dt]=ft,et=Math.max(et,ft)}var mt=et+u,Rt=l||L.fontSize+u,Qt=Math.max(Rt,L.fontSize+u)+(j.length-1)*(Rt+F);Rt+=F;var yt=0;return d==="middle"?yt=-Qt/2:d==="bottom"||d==="alphabetic"||d==="ideographic"?yt=-Qt:(d==="top"||d==="hanging")&&(yt=0),{font:O,width:mt,height:Qt,lines:j,lineWidths:q,lineHeight:Rt,maxLineWidth:et,fontProperties:L,lineMetrics:q.map(function(xt,Dt){var Xt=0;return g==="center"||g==="middle"?Xt-=xt/2:(g==="right"||g==="end")&&(Xt-=xt),new fs(Xt-u/2,yt+Dt*Rt,xt+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,p="";f==="ellipsis"?p="...":f&&f!=="clip"&&(p=f);var y=[""],x=0,F=0,O=-1,L=_E(n),U=this.charWidthCache.get(L);U||(U=new jE(500),this.charWidthCache.put(L,U));var R=function(xt){return a.getFromCache(xt,u,U,g)},j=R(p);function q(yt,xt,Dt,Xt){for(;R(yt)<Xt&&xt<s.length-1&&!o.isNewline(s[xt+1]);)xt+=1,yt+=s[xt];for(;R(yt)>Xt&&xt>=Dt;)xt-=1,yt=yt.slice(0,-1);return{lineTxt:yt,txtLastCharIndex:xt}}function et(yt,xt){if(!(j<=0||j>v)){if(!y[yt]){y[yt]=p;return}var Dt=q(y[yt],xt,O+1,v-j);y[yt]=Dt.lineTxt+p}}for(var it=0;it<s.length;it++){var dt=s[it],ft=s[it-1],mt=s[it+1],Rt=R(dt);if(this.isNewline(dt)){if(x+1>=d){it<s.length-1&&et(x,it-1),n.isOverflowing=!0;break}O=it-1,x+=1,F=0,y[x]="";continue}if(Rt>v){et(x,it-1),n.isOverflowing=!0;break}if(F>0&&F+Rt>v){var Qt=q(y[x],it-1,O+1,v);if(Qt.txtLastCharIndex!==it-1){if(y[x]=Qt.lineTxt,Qt.txtLastCharIndex===s.length-1)break;it=Qt.txtLastCharIndex+1,dt=s[it],ft=s[it-1],mt=s[it+1],Rt=R(dt)}if(x+1>=d){et(x,it-1),n.isOverflowing=!0;break}if(O=it-1,x+=1,F=0,y[x]="",this.isBreakingSpace(dt))continue;this.canBreakInLastChar(dt)||(y=this.trimToBreakable(y),F=this.sumTextWidthByCache(y[x]||"",R)),this.shouldBreakByKinsokuShorui(dt,mt)&&(y=this.trimByKinsokuShorui(y),F+=R(ft||""))}F+=Rt,y[x]+=dt}return y.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(e){return typeof e!="string"?!1:fl.BreakingSpaces.indexOf(e.charCodeAt(0))>=0}},{key:"isNewline",value:function(e){return typeof e!="string"?!1:fl.Newlines.indexOf(e.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(e){var n=(0,G.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&&ZE.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(!ZE.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()}}])}(),re={},MT=function(r){var t=new JF,e=new XF;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,Kt.FRAGMENT,null),Kt.CIRCLE,new WF),Kt.ELLIPSE,new jF),Kt.RECT,t),Kt.IMAGE,t),Kt.GROUP,new $F),Kt.LINE,new ZF),Kt.TEXT,new qF(re)),Kt.POLYLINE,e),Kt.POLYGON,e),(0,we.Z)((0,we.Z)((0,we.Z)(r,Kt.PATH,new YF),Kt.HTML,new tT),Kt.MESH,null)}(),FT=function(r){var t=new iF,e=new gm;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 lF),oe.ANGLE,new nF),oe.DEFINED_PATH,new rF),oe.PAINT,t),oe.COLOR,t),oe.FILTER,new aF),oe.LENGTH,e),oe.LENGTH_PERCENTAGE,e),oe.LENGTH_PERCENTAGE_12,new sF),(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 oF),oe.COORDINATE,new gm),oe.OFFSET_DISTANCE,new cF),oe.OPACITY_VALUE,new uF),oe.PATH,new hF),oe.LIST_OF_POINTS,new dF),oe.SHADOW_BLUR,new fF),oe.TEXT,new gF),oe.TEXT_TRANSFORM,new vF),oe.TRANSFORM,new zF),(0,we.Z)((0,we.Z)((0,we.Z)(r,oe.TRANSFORM_ORIGIN,new KF),oe.Z_INDEX,new VF),oe.MARKER,new AF)}(),TT=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof T.g!="undefined"?T.g:{}};re.CameraContribution=Zu,re.AnimationTimeline=null,re.EasingFunction=null,re.offscreenCanvasCreator=new bm,re.sceneGraphSelector=new aT,re.sceneGraphService=new gT(re),re.textService=new ST(re),re.geometryUpdaterFactory=MT,re.CSSPropertySyntaxFactory=FT,re.styleValueRegistry=new tF(re),re.layoutRegistry=null,re.globalThis=TT(),re.enableStyleSyntax=!0,re.enableSizeAttenuation=!1;var YE=0;function V8(){YE=0}var xm=new $s(yn.INSERTED,null,"","","",0,"",""),Cm=new $s(yn.REMOVED,null,"","","",0,"",""),XE=new Wr(yn.DESTROY),OT=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.entity=YE++,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:Rp.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,_.Z)(t,r),(0,N.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(Gd);return re.sceneGraphService.attach(n,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!lf(this)&&n.nodeName===Kt.FRAGMENT?this.ownerDocument.defaultView.mountFragment(n):this.ownerDocument.defaultView.mountChildren(n)),this.isMutationObserved&&(xm.relatedNode=this,n.dispatchEvent(xm)),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),re.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 re.sceneGraphService.matches(n,this)}},{key:"getElementById",value:function(n){return re.sceneGraphService.querySelector("#".concat(n),this)}},{key:"getElementsByName",value:function(n){return re.sceneGraphService.querySelectorAll('[name="'.concat(n,'"]'),this)}},{key:"getElementsByClassName",value:function(n){return re.sceneGraphService.querySelectorAll(".".concat(n),this)}},{key:"getElementsByTagName",value:function(n){return re.sceneGraphService.querySelectorAll(n,this)}},{key:"querySelector",value:function(n){return re.sceneGraphService.querySelector(n,this)}},{key:"querySelectorAll",value:function(n){return re.sceneGraphService.querySelectorAll(n,this)}},{key:"closest",value:function(n){var i=this;do{if(re.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,lc.Z)(s).slice(1);this.parentNode.appendChild(A,i),(n=A).after.apply(n,(0,G.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(XE,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 re.sceneGraphService.getGeometryBounds(this,n)}},{key:"getTransformedGeometryBounds",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return re.sceneGraphService.getTransformedGeometryBounds(this,n)}},{key:"getBounds",value:function(){return re.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return re.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return re.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return re.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)}}])}(pr);function Ln(r){return!!(r!=null&&r.nodeName)}var IT=re.globalThis.Proxy?re.globalThis.Proxy:function(){},to=new $s(yn.ATTR_MODIFIED,null,null,null,null,$s.MODIFICATION,null,null),ah=Ot(),NT=Br(),ir=function(r){function t(e){var n;return(0,P.Z)(this,t),n=(0,K.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||Kt.GROUP,e.initialParsedStyle&&Object.assign(n.parsedStyle,e.initialParsedStyle),n.initAttributes(e.style),re.enableStyleSyntax&&(n.style=new IT({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,_.Z)(t,r),(0,N.Z)(t,[{key:"destroy",value:function(){Ks(t,"destroy",this,3)([]),this.getAnimations().forEach(function(n){n.cancel()})}},{key:"cloneNode",value:function(n,i){var a=(0,z.Z)({},this.attributes);for(var s in a){var o=a[s];Ln(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(n)),i&&(a[s]=i(s,o))}var A=new this.constructor((0,z.Z)((0,z.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};re.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;Ze(i)||(a||i!==this.attributes[n])&&(this.internalSetAttribute(n,i,{memoize:s}),Ks(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,z.Z)({},this.attributes),A=(0,z.Z)({},this.parsedStyle)),re.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];re.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(to.relatedNode=this,to.prevValue=i,to.newValue=a,to.attrName=n,to.prevParsedValue=s,to.newParsedValue=o,this.isMutationObserved)this.dispatchEvent(to);else{var A,l=((A=this.ownerDocument.defaultView.getConfig().future)===null||A===void 0?void 0:A.experimentalCancelEventPropagation)===!0;to.target=this,this.ownerDocument.defaultView.dispatchEvent(to,!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,H.Z)(i,2),s=a[0],o=a[1],A=n.getMax(),l=(0,H.Z)(A,2),c=l[0],u=l[1];return new fs(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 re.sceneGraphService.setOrigin(this,pi(n,i,a,!1)),this}},{key:"getOrigin",value:function(){return re.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 re.sceneGraphService.setPosition(this,pi(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 re.sceneGraphService.setLocalPosition(this,pi(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 re.sceneGraphService.translate(this,pi(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 re.sceneGraphService.translateLocal(this,pi(n,i,a,!1)),this}},{key:"getPosition",value:function(){return re.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return re.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=pi(n,i,a,!1)),re.sceneGraphService.scaleLocal(this,n),this}},{key:"setLocalScale",value:function(n,i,a){return typeof n=="number"&&(i=i||n,a=a||n,n=pi(n,i,a,!1)),re.sceneGraphService.setLocalScale(this,n),this}},{key:"getLocalScale",value:function(){return re.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return re.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var n=Wu(ah,re.sceneGraphService.getWorldTransform(this)),i=(0,H.Z)(n,3),a=i[2];return bi(a)}},{key:"getLocalEulerAngles",value:function(){var n=Wu(ah,re.sceneGraphService.getLocalRotation(this)),i=(0,H.Z)(n,3),a=i[2];return bi(a)}},{key:"setEulerAngles",value:function(n){return re.sceneGraphService.setEulerAngles(this,0,0,n),this}},{key:"setLocalEulerAngles",value:function(n){return re.sceneGraphService.setLocalEulerAngles(this,0,0,n),this}},{key:"rotateLocal",value:function(n,i,a){return Re(i)&&Re(a)?re.sceneGraphService.rotateLocal(this,0,0,n):re.sceneGraphService.rotateLocal(this,n,i,a),this}},{key:"rotate",value:function(n,i,a){return Re(i)&&Re(a)?re.sceneGraphService.rotate(this,0,0,n):re.sceneGraphService.rotate(this,n,i,a),this}},{key:"setRotation",value:function(n,i,a,s){return re.sceneGraphService.setRotation(this,n,i,a,s),this}},{key:"setLocalRotation",value:function(n,i,a,s){return re.sceneGraphService.setLocalRotation(this,n,i,a,s),this}},{key:"setLocalSkew",value:function(n,i){return re.sceneGraphService.setLocalSkew(this,n,i),this}},{key:"getRotation",value:function(){return re.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return re.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return re.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return re.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return re.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(n){return re.sceneGraphService.setLocalTransform(this,n),this}},{key:"resetLocalTransform",value:function(){re.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,G.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,G.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=Pn(ah,i),s=(0,H.Z)(a,2),o=s[0],A=s[1],l=Ds(ah,i),c=(0,H.Z)(l,2),u=c[0],h=c[1],d=Xo(NT,i),f=Wu(ah,d),g=(0,H.Z)(f,3),v=g[0],p=g[2];return kp(v||p,o,A,u,h)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(n){var i=Wd(n),a=(0,H.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=Wd(n),a=(0,H.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}}])}(OT);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 eo=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.CIRCLE},e)])}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);eo.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var LT=["style"],sh=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Ja.Z)(n,LT);return(0,P.Z)(this,t),e=(0,K.Z)(this,t,[(0,z.Z)({style:i},a)]),e.isCustomElement=!0,e}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);sh.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var oh=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.ELLIPSE},e)])}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);oh.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var kT=function(r){function t(){return(0,P.Z)(this,t),(0,K.Z)(this,t,[{type:Kt.FRAGMENT}])}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);kT.PARSED_STYLE_LIST=new Set(["class","className"]);var Ai=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.GROUP},e)])}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);Ai.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var QT=["style"],gl=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Ja.Z)(n,QT);return(0,P.Z)(this,t),e=(0,K.Z)(this,t,[(0,z.Z)({type:Kt.HTML,style:i},a)]),e.cullable.enable=!1,e}return(0,_.Z)(t,r),(0,N.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($t(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Zn.isEmpty(i)){var a=new Zn;return a.setFromTransformedAABB(i,n),a}}return this.getBounds()}}])}(ir);gl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Ah=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.IMAGE},e)])}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);Ah.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var UT=["style"],vl=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Ja.Z)(n,UT);(0,P.Z)(this,t),e=(0,K.Z)(this,t,[(0,z.Z)({type:Kt.LINE,style:(0,z.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&&Ln(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),A&&Ln(A)&&(e.markerEndAngle=A.getLocalEulerAngles(),e.appendChild(A)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,_.Z)(t,r),(0,N.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&&Ln(s)&&(this.markerStartAngle=0,s.remove()),o&&Ln(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"&&(s&&Ln(s)&&(this.markerEndAngle=0,s.remove()),o&&Ln(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||!Ln(d))){var f=0,g,v,p,y,x,F;n?(p=l,y=u,g=c-l,v=h-u,x=o||0,F=this.markerStartAngle):(p=c,y=h,g=l-c,v=u-h,x=A||0,F=this.markerEndAngle),f=Math.atan2(v,g),d.setLocalEulerAngles(f*180/Math.PI+F),d.setLocalPosition(p+Math.cos(f)*x,y+Math.sin(f)*x)}}},{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=Ma(s,o,A,l,n),u=c.x,h=c.y,d=me(Ot(),Wt(u,h,0),i?this.getWorldTransform():this.getLocalTransform());return new ai(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 Nd(i,a,s,o)}}])}(ir);vl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var RT=["style"],Pi=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Ja.Z)(n,RT);(0,P.Z)(this,t),e=(0,K.Z)(this,t,[(0,z.Z)({type:Kt.PATH,style:i,initialParsedStyle:{miterLimit:4,d:(0,z.Z)({},vs)}},a)]),e.markerStartAngle=0,e.markerEndAngle=0,e.markerMidList=[];var s=e.parsedStyle,o=s.markerStart,A=s.markerEnd,l=s.markerMid;return o&&Ln(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Ln(l)&&e.placeMarkerMid(l),A&&Ln(A)&&(e.markerEndAngle=A.getLocalEulerAngles(),e.appendChild(A)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,_.Z)(t,r),(0,N.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&&Ln(s)&&(this.markerStartAngle=0,s.remove()),o&&Ln(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Ln(s)&&(this.markerEndAngle=0,s.remove()),o&&Ln(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||!Ln(l))){var c=0,u,h,d,f,g,v;if(n){var p=this.getStartTangent(),y=(0,H.Z)(p,2),x=y[0],F=y[1];d=F[0],f=F[1],u=x[0]-F[0],h=x[1]-F[1],g=o||0,v=this.markerStartAngle}else{var O=this.getEndTangent(),L=(0,H.Z)(O,2),U=L[0],R=L[1];d=R[0],f=R[1],u=U[0]-R[0],h=U[1]-R[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&&Ln(n))for(var a=1;a<i.length-1;a++){var s=(0,H.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=pp(a,n),o=s.x,A=s.y,l=me(Ot(),Wt(o,A,0),i?this.getWorldTransform():this.getLocalTransform());return new ai(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,G.Z)(ir.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var DT=["style"],pl=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=n.style,a=(0,Ja.Z)(n,DT);(0,P.Z)(this,t),e=(0,K.Z)(this,t,[(0,z.Z)({type:Kt.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&&Ln(o)&&(e.markerStartAngle=o.getLocalEulerAngles(),e.appendChild(o)),l&&Ln(l)&&e.placeMarkerMid(l),A&&Ln(A)&&(e.markerEndAngle=A.getLocalEulerAngles(),e.appendChild(A)),e.transformMarker(!0),e.transformMarker(!1),e}return(0,_.Z)(t,r),(0,N.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&&Ln(s)&&(this.markerStartAngle=0,s.remove()),o&&Ln(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):n==="markerEnd"?(s&&Ln(s)&&(this.markerEndAngle=0,s.remove()),o&&Ln(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||!Ln(h)||!u)){var d=0,f,g,v,p,y,x;if(v=u[0][0],p=u[0][1],n)f=u[1][0]-u[0][0],g=u[1][1]-u[0][1],y=o||0,x=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],p=u[F-1][1],f=u[F-2][0]-u[F-1][0],g=u[F-2][1]-u[F-1][1]),y=A||0,x=this.markerEndAngle}d=Math.atan2(g,f),h.setLocalEulerAngles(d*180/Math.PI+x),h.setLocalPosition(v+Math.cos(d)*y,p+Math.sin(d)*y)}}},{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&&Ln(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);pl.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var PT=["style"],gf=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=(0,Ja.Z)(e,PT);return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.POLYLINE,style:n,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"getTotalLength",value:function(){return Ye(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(p,y){a[y+1]&&(A=[0,0],A[0]=o/c,l=Nd(p[0],p[1],a[y+1][0],a[y+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(p,y){n>=p[0]&&n<=p[1]&&(u=(n-p[0])/(p[1]-p[0]),h=y)});var d=Ma(a[h][0],a[h][1],a[h+1][0],a[h+1][1],u),f=d.x,g=d.y,v=me(Ot(),Wt(f,g,0),i?this.getWorldTransform():this.getLocalTransform());return new ai(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}}])}(pl);gf.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(pl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var Ci=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.RECT},e)])}return(0,_.Z)(t,r),(0,N.Z)(t)}(ir);Ci.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(ir.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var _T=["style"],ml=function(r){function t(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=e.style,i=(0,Ja.Z)(e,_T);return(0,P.Z)(this,t),(0,K.Z)(this,t,[(0,z.Z)({type:Kt.TEXT,style:(0,z.Z)({fill:"black"},n)},i)])}return(0,_.Z)(t,r),(0,N.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);ml.PARSED_STYLE_LIST=new Set([].concat((0,G.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 HT=function(){function r(){(0,P.Z)(this,r),this.registry={},this.define(Kt.CIRCLE,eo),this.define(Kt.ELLIPSE,oh),this.define(Kt.RECT,Ci),this.define(Kt.IMAGE,Ah),this.define(Kt.LINE,vl),this.define(Kt.GROUP,Ai),this.define(Kt.PATH,Pi),this.define(Kt.POLYGON,pl),this.define(Kt.POLYLINE,gf),this.define(Kt.TEXT,ml),this.define(Kt.HTML,gl)}return(0,N.Z)(r,[{key:"define",value:function(e,n){this.registry[e]=n}},{key:"get",value:function(e){return this.registry[e]}}])}(),GT={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;re.styleValueRegistry.registerMetadata({n:e,inh:n,int:i,d:a,syntax:s})},registerLayout:function(t,e){re.layoutRegistry.registerLayout(t,e)}},JE=function(r){function t(){var e;(0,P.Z)(this,t),e=(0,K.Z)(this,t),e.defaultView=null,e.ownerDocument=null,e.nodeName="document";try{e.timeline=new re.AnimationTimeline(e)}catch(i){}var n={};return fm.forEach(function(i){var a=i.n,s=i.inh,o=i.d;s&&o&&(n[a]=Vt(o)?o(Kt.GROUP):o)}),e.documentElement=new Ai({id:"g-root",style:n}),e.documentElement.ownerDocument=e,e.documentElement.parentNode=e,e.childNodes=[e.documentElement],e}return(0,_.Z)(t,r),(0,N.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"?ml:Ai);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&&!Zn.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,Xa.Z)((0,ii.Z)().mark(function i(a,s){var o,A,l,c,u,h,d,f,g,v,p;return(0,ii.Z)().wrap(function(y){for(;;)switch(y.prev=y.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)){y.next=1;break}return y.abrupt("return",null);case 1:return d=this.defaultView.viewport2Client({x:A,y:l}),f=d.x,g=d.y,y.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=y.sent,p=v.picked,y.abrupt("return",p&&p[0]||this.documentElement);case 3:case"end":return y.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,Xa.Z)((0,ii.Z)().mark(function i(a,s){var o,A,l,c,u,h,d,f,g,v,p;return(0,ii.Z)().wrap(function(y){for(;;)switch(y.prev=y.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)){y.next=1;break}return y.abrupt("return",[]);case 1:return d=this.defaultView.viewport2Client({x:A,y:l}),f=d.x,g=d.y,y.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=y.sent,p=v.picked,p[p.length-1]!==this.documentElement&&p.push(this.documentElement),y.abrupt("return",p);case 3:case"end":return y.stop()}},i,this)}));function n(i,a){return e.apply(this,arguments)}return n}()},{key:"appendChild",value:function(n,i){throw new Error(aA)}},{key:"insertBefore",value:function(n,i){throw new Error(aA)}},{key:"removeChild",value:function(n,i){throw new Error(aA)}},{key:"replaceChild",value:function(n,i,a){throw new Error(aA)}},{key:"append",value:function(){throw new Error(aA)}},{key:"prepend",value:function(){throw new Error(aA)}},{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)}}])}(pr),qE=function(){function r(t){(0,P.Z)(this,r),this.strategies=t}return(0,N.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 Wr(yn.CULLED),u,u),null}return A}),a.hooks.afterRender.tap(r.tag,function(A){A.cullable.visibilityPlaneMask=-1})}}])}();qE.tag="Culling";var $E=function(){function r(){var t=this;(0,P.Z)(this,r),this.autoPreventDefault=!1,this.rootPointerEvent=new uf(null),this.rootWheelEvent=new Bm(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,Ws.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,Ws.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,N.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,Ws.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,Ws.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,Ws.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=xF[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=mm.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];Ze(s.button)&&(s.button=0),Ze(s.buttons)&&(s.buttons=1),Ze(s.isPrimary)&&(s.isPrimary=e.touches.length===1&&e.type==="touchstart"),Ze(s.width)&&(s.width=s.radiusX||1),Ze(s.height)&&(s.height=s.radiusY||1),Ze(s.tiltX)&&(s.tiltX=0),Ze(s.tiltY)&&(s.tiltY=0),Ze(s.pointerType)&&(s.pointerType="touch"),Ze(s.pointerId)&&(s.pointerId=s.identifier||0),Ze(s.pressure)&&(s.pressure=s.force||.5),Ze(s.twist)&&(s.twist=0),Ze(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=e.type,i.push(s)}else if(n.isMouseEvent(e)){var o=e;Ze(o.isPrimary)&&(o.isPrimary=!0),Ze(o.width)&&(o.width=1),Ze(o.height)&&(o.height=1),Ze(o.tiltX)&&(o.tiltX=0),Ze(o.tiltY)&&(o.tiltY=0),Ze(o.pointerType)&&(o.pointerType="mouse"),Ze(o.pointerId)&&(o.pointerId=bF),Ze(o.pressure)&&(o.pressure=.5),Ze(o.twist)&&(o.twist=0),Ze(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(e);return i}}])}();$E.tag="Event";var zT=[Kt.CIRCLE,Kt.ELLIPSE,Kt.IMAGE,Kt.RECT,Kt.LINE,Kt.POLYLINE,Kt.POLYGON,Kt.TEXT,Kt.PATH,Kt.HTML],KT=function(){function r(){(0,P.Z)(this,r)}return(0,N.Z)(r,[{key:"isVisible",value:function(e,n){var i,a=n.cullable;if(!a.enable)return!0;var s=n.getRenderBounds();if(Zn.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||iA.INDETERMINATE,o.planes),a.visible=a.visibilityPlaneMask!==iA.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(e,n,i,a){if(i===iA.OUTSIDE||i===iA.INSIDE)return i;for(var s=iA.INSIDE,o=zT.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 iA.OUTSIDE;_e(h,n.getNegativeFarPoint(a[A]))+d<0&&(s|=c)}}return s}}])}(),tB=function(){function r(){(0,P.Z)(this,r),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return(0,N.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,G.Z)(v)),a.dirty()},c=function(f){var g=f.target;re.enableSizeAttenuation&&re.styleValueRegistry.updateSizeAttenuation(g,o.getCamera().getZoom())},u=function(f){var g=f.target;re.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=re.globalThis.requestIdleCallback)!==null&&i!==void 0?i:ym.bind(re.globalThis);a.hooks.endFrame.tap(r.tag,function(){n.isFirstTimeRendering&&(n.isFirstTimeRendering=!1,h(function(){n.isFirstTimeRenderingFinished=!0})),n.mutationRecords=[]})}}])}();tB.tag="Prepare";function W8(r){return!!r.document}var La=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}({}),eB=500,VT=.1,WT=1e3,vf=new Wr(yn.MOUNTED),pf=new Wr(yn.UNMOUNTED),Sm=new Wr(La.BEFORE_RENDER),nB=new Wr(La.RERENDER),Mm=new Wr(La.AFTER_RENDER),Fm=function(r){function t(e){var n;(0,P.Z)(this,t),n=(0,K.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,p=e.cancelAnimationFrame,y=e.createImage,x=e.supportsTouchEvents,F=e.supportsPointerEvents,O=e.isTouchEvent,L=e.isMouseEvent,U=e.dblClickSpeed,R=o,j=A,q=g||pm&&window.devicePixelRatio||1;return q=q>=1?Math.ceil(q):1,a&&(R=o||EF(a)||a.width/q,j=A||BF(a)||a.height/q),n.customElements=new HT,n.devicePixelRatio=q,n.requestAnimationFrame=v!=null?v:ym.bind(re.globalThis),n.cancelAnimationFrame=p!=null?p:DE.bind(re.globalThis),n.createImage=y!=null?y:function(){return new window.Image},n.supportsTouchEvents=x!=null?x:"ontouchstart"in re.globalThis,n.supportsPointerEvents=F!=null?F:!!re.globalThis.PointerEvent,n.isTouchEvent=O!=null?O:function(et){return n.supportsTouchEvents&&et instanceof re.globalThis.TouchEvent},n.isMouseEvent=L!=null?L:function(et){return!re.globalThis.MouseEvent||et instanceof re.globalThis.MouseEvent&&(!n.supportsPointerEvents||!(et instanceof re.globalThis.PointerEvent))},f&&(re.offscreenCanvas=f),n.document=new JE,n.document.defaultView=n,u||pF(i,n,d),n.initRenderingContext((0,z.Z)((0,z.Z)({},e),{},{width:R,height:j,background:l!=null?l:"transparent",cursor:c!=null?c:"default",cleanUpOnDestroy:d,devicePixelRatio:q,requestAnimationFrame:n.requestAnimationFrame,cancelAnimationFrame:n.cancelAnimationFrame,createImage:n.createImage,supportsTouchEvents:n.supportsTouchEvents,supportsPointerEvents:n.supportsPointerEvents,isTouchEvent:n.isTouchEvent,isMouseEvent:n.isMouseEvent,dblClickSpeed:U!=null?U:200})),n.initDefaultCamera(R,j,s.clipSpaceNearZ),n.initRenderer(s,!0),n}return(0,_.Z)(t,r),(0,N.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 re.CameraContribution;o.clipSpaceNearZ=a,o.setType(In.EXPLORING,Bc.DEFAULT).setPosition(n/2,i/2,eB).setFocalPoint(n/2,i/2,0).setOrthographic(n/-2,n/2,i/2,i/-2,VT,WT),o.canvas=this,o.eventEmitter.on(Yd.UPDATED,function(){s.context.renderingContext.renderReasons.add(Qc.CAMERA_CHANGED),re.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){re.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;Nn.clearCache();var s=((n=this.getConfig().future)===null||n===void 0?void 0:n.experimentalCancelEventPropagation)===!0;a||this.dispatchEvent(new Wr(La.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 Wr(La.AFTER_DESTROY),s,s);var A=function(c){c.currentTarget=null,c.manager=null,c.target=null,c.relatedNode=null};A(vf),A(pf),A(Sm),A(nB),A(Mm),A(to),A(xm),A(Cm),A(XE),re.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,eB).setFocalPoint(n/2,i/2,0),A===ea.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 Wr(La.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&&(Sm.detail=n,Mm.detail=n);var s=((i=this.getConfig().future)===null||i===void 0?void 0:i.experimentalCancelEventPropagation)===!0;this.dispatchEvent(Sm,s,s);var o=this.getRenderingService();o.render(this,n,function(){a.dispatchEvent(nB,s,s)}),this.dispatchEvent(Mm,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 $E,new tB,new qE([new KT])),this.loadRendererContainerModule(n),this.context.contextService=new this.context.ContextService((0,z.Z)((0,z.Z)({},re),this.context)),this.context.renderingService=new rT(re,this.context),this.context.eventService=new nT(re,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 Wr(La.READY),A,A)}):i.dispatchEvent(new Wr(La.READY),A,A):i.dispatchEvent(new Wr(La.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(re)})}},{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,G.Z)((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(s){s.destroy(re)}),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(pf);else{var a,s=((a=this.getConfig().future)===null||a===void 0?void 0:a.experimentalCancelEventPropagation)===!0;pf.target=n,this.dispatchEvent(pf,!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]:lf(n);if(this.inited){if(!n.isConnected&&(n.ownerDocument=this.document,n.isConnected=!0,!a))if(n.isMutationObserved)n.dispatchEvent(vf);else{var s,o=((s=this.getConfig().future)===null||s===void 0?void 0:s.experimentalCancelEventPropagation)===!0;vf.target=n,this.dispatchEvent(vf,!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})}}])}(KE),j8=0,rB=new WeakMap,iB=null,Z8=null,Y8=null,mf,Oo;function X8(r,t){return mf=new iB(r,t)}function J8(r){return Oo||(Oo=iB.copy(mf),Oo.oldValue=r,Oo)}function q8(){mf=Oo=void 0}function jT(r){return r===Oo||r===mf}function $8(r,t){return r===t?r:Oo&&jT(r)?Oo:null}function ZT(r){r.nodes.forEach(function(t){var e=rB.get(t);e&&e.forEach(function(n){n.observer===r&&n.removeTransientObservers()})})}function tG(r,t){for(var e=r;e;e=e.parentNode){var n=rB.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 Tm=!1,Om=null;function eG(r){Om.push(r),Tm||(Tm=!0,typeof re.globalThis!="undefined"?re.globalThis.setTimeout(Im):Im())}function Im(){Tm=!1;var r=Om;Om=[],r.sort(function(e,n){return e.uid-n.uid});var t=!1;r.forEach(function(e){var n=e.takeRecords();ZT(e),n.length&&(e.callback(n,e),t=!0)}),t&&Im()}var YT=function(){function r(){(0,P.Z)(this,r),this.cacheStore=new Map}return(0,N.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,z.Z)((0,z.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()}}])}(),Nm=[],Lm=[],km=function(){function r(){(0,P.Z)(this,r)}return(0,N.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;Nm.length<=0&&Lm.length<=0||(Lm.forEach(function(n){return n()}),Lm=Nm.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(y){for(var x=function(L){Nm.push(function(){var U=L*c,R=y*u,j=[Math.min(n,A-U),Math.min(i,l-R)],q=j[0],et=j[1],it=o.createCanvas();it.width=n,it.height=i;var dt=it.getContext("2d");dt.drawImage(e,U,R,q,et,0,0,q,et),f.tiles[y][L]={x:U,y:R,tileX:L,tileY:y,data:it},a()})},F=0;F<h;F++)x(F)},v=0;v<d;v++)g(v);return r.stop(),r.executeTask(),f}}])}();km.TASK_NUM_PER_FRAME=10;var ka=new YT;ka.onRefAdded=function(t){var e=this;t.addEventListener(yn.DESTROY,function(){e.releaseRef(t)},{once:!0})};var Qm=function(){function r(t,e){(0,P.Z)(this,r),this.gradientCache={},this.patternCache={},this.context=t,this.runtime=e}return(0,N.Z)(r,[{key:"getImageSync",value:function(e,n,i){var a=gn(e)?e:e.src;if(ka.has(a)){var s=ka.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)&&!ka.has(a)){var s={img:e,size:[e.naturalWidth||e.width,e.naturalHeight||e.height],tileSize:yf(e)};ka.put(a,s,n)}if(ka.has(a)){var o=ka.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=yf(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:yf(c)};ka.put(a,u,n),c.onload=function(){u.size=[c.naturalWidth||c.width,c.naturalHeight||c.height],u.tileSize=yf(u.img),A(u)},c.onerror=function(h){l(h)},c.crossOrigin="Anonymous",c.src=a}})}},{key:"createDownSampledImage",value:function(){var t=(0,Xa.Z)((0,ii.Z)().mark(function n(i,a){var s,o,A,l,c,u,h,d,f,g,v,p,y,x;return(0,ii.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,H.Z)(s.size,2),g=f[0],v=f[1],p=s.img,y=Math.min((c+c)/(g+v),Math.max(.01,Math.min(h,.5))),x=(0,z.Z)((0,z.Z)({},s),{},{downSamplingRate:y}),ka.update(s.img.src,x,a),!d){F.next=7;break}return F.prev=3,F.next=4,d(s.img,{resizeWidth:g*y,resizeHeight:v*y});case 4:p=F.sent,F.next=6;break;case 5:F.prev=5,F.catch(3),y=1;case 6:F.next=8;break;case 7:y=1;case 8:return x=(0,z.Z)((0,z.Z)({},this.getImageSync(i,a)),{},{downSampled:p,downSamplingRate:y}),ka.update(s.img.src,x,a),F.abrupt("return",x);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,Xa.Z)((0,ii.Z)().mark(function n(i,a,s,o){var A,l,c,u,h;return(0,ii.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,km.api={requestAnimationFrame:c,cancelAnimationFrame:u,createCanvas:function(){return bm.createCanvas()}},h=(0,z.Z)((0,z.Z)({},A),km.sliceImage(A.img,A.tileSize[0],A.tileSize[0],s)),ka.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){ka.release(gn(e)?e:e.src,n)}},{key:"releaseImageRef",value:function(e){ka.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 p;h?p=GE(CE(h),new ir({})):p=Ie($t()),f&&Jn(p,p,[1/s,1/s,1]),v.setTransform({a:p[0],b:p[1],c:p[4],d:p[5],e:p[12]+o[0],f:p[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===ws.LinearGradient){var g=tm(o,A,l,c),v=g.x1,p=g.y1,y=g.x2,x=g.y2;f=n.createLinearGradient(v,p,y,x)}else if(a===ws.RadialGradient){var F=em(o,A,l,u,h,d),O=F.x,L=F.y,U=F.r;f=n.createRadialGradient(O,L,0,O,L,U)}return f&&(s.forEach(function(R){var j=R.offset,q=R.color;if(j.unit===fe.kPercentage){var et;(et=f)===null||et===void 0||et.addColorStop(j.value/100,q.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)}}])}();Qm.isSupportTile=!!bm.createCanvas();function yf(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 aB=function(){function r(){(0,P.Z)(this,r)}return(0,N.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===Kt.IMAGE){var g=f.src,v=f.keepAspectRatio;a.getImageSync(g,h,function(p){var y=p.img,x=y.width,F=y.height;v&&o(h,x,F),h.dirty(),n.dirty()})}},l=function(u){var h=u.target,d=u.attrName,f=u.prevValue,g=u.newValue;h.nodeName!==Kt.IMAGE||d!=="src"||(f!==g&&a.releaseImage(f,h),gn(g)&&a.getOrCreateImage(g,h).then(function(v){var p=v.img,y=p.width,x=p.height;h.attributes.keepAspectRatio&&o(h,y,x),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)})}}])}();aB.tag="LoadImage";var XT=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="image-loader",e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(n){this.context.imagePool=new Qm(this.context,n),this.addRenderingPlugin(new aB)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ds),JT=Object.freeze({__proto__:null,ImagePool:Qm,Plugin:XT}),qT="g-canvas-camera",sB=function(){function r(){(0,P.Z)(this,r),this.displayObjectHTMLElementMap=new WeakMap}return(0,N.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(p,y){y.style.transform=i.joinTransformMatrix(p.getWorldTransform(),p.getOrigin())},u=function(p){var y=p.target;if(y.nodeName===Kt.HTML){i.$camera||(i.$camera=i.createCamera(a));var x=i.getOrCreateEl(y);i.$camera.appendChild(x),Object.keys(y.attributes).forEach(function(F){i.updateAttribute(F,y)}),c(y,x),l.set(x,y)}},h=function(p){var y=p.target;if(y.nodeName===Kt.HTML&&i.$camera){var x=i.getOrCreateEl(y);x&&(x.remove(),l.delete(x))}},d=function(p){var y=p.target;if(y.nodeName===Kt.HTML){var x=p.attrName;i.updateAttribute(x,y)}},f=function(p){for(var y=p.detail,x=0;x<y.length;x++){var F=y[x],O=F.target,L=O.nodeName===Kt.FRAGMENT?O.childNodes:[O];L.forEach(function(U){if(U.nodeName===Kt.HTML){var R=i.getOrCreateEl(U);c(U,R)}})}},g=function(){if(i.$camera){var p=i.context.config,y=p.width,x=p.height;i.$camera.parentElement.style.width="".concat(y||0,"px"),i.$camera.parentElement.style.height="".concat(x||0,"px")}};o.hooks.init.tap(r.tag,function(){A.addEventListener(La.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(Qc.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),o.hooks.destroy.tap(r.tag,function(){i.$camera&&i.$camera.remove(),A.removeEventListener(La.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=qT,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="";Nc(f)?f.isNone?g="transparent":g=n.getAttribute("fill"):Array.isArray(f)?g=n.getAttribute("fill"):So(f),i.style.background=g;break;case"stroke":var v=n.parsedStyle.stroke,p="";Nc(v)?v.isNone?p="transparent":p=n.getAttribute("stroke"):Array.isArray(v)?p=n.getAttribute("stroke"):So(v),i.style["border-color"]=p,i.style["border-style"]="solid";break;case"lineWidth":var y=n.parsedStyle.lineWidth;i.style["border-width"]="".concat(y||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var x=n.style.filter;i.style.filter=x;break;default:!Re(n.style[e])&&n.style[e]!==""&&(i.style[e]=n.style[e])}}}])}();sB.tag="HTMLRendering";var $T=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="html-renderer",e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new sB)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ds),tO=Object.freeze({__proto__:null,Plugin:$T}),oB=function(){function r(){(0,P.Z)(this,r)}return(0,N.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(R){a.hooks.pointerMove.call(R)},c=function(R){a.hooks.pointerUp.call(R)},u=function(R){a.hooks.pointerDown.call(R)},h=function(R){a.hooks.pointerOver.call(R)},d=function(R){a.hooks.pointerOut.call(R)},f=function(R){a.hooks.pointerCancel.call(R)},g=function(R){a.hooks.pointerWheel.call(R)},v=function(R){a.hooks.click.call(R)},p=function(R){n.globalThis.document.addEventListener("pointermove",l,!0),R.addEventListener("pointerdown",u,!0),R.addEventListener("pointerleave",d,!0),R.addEventListener("pointerover",h,!0),n.globalThis.addEventListener("pointerup",c,!0),n.globalThis.addEventListener("pointercancel",f,!0)},y=function(R){R.addEventListener("touchstart",u,!0),R.addEventListener("touchend",c,!0),R.addEventListener("touchmove",l,!0),R.addEventListener("touchcancel",f,!0)},x=function(R){n.globalThis.document.addEventListener("mousemove",l,!0),R.addEventListener("mousedown",u,!0),R.addEventListener("mouseout",d,!0),R.addEventListener("mouseover",h,!0),n.globalThis.addEventListener("mouseup",c,!0)},F=function(R){n.globalThis.document.removeEventListener("pointermove",l,!0),R.removeEventListener("pointerdown",u,!0),R.removeEventListener("pointerleave",d,!0),R.removeEventListener("pointerover",h,!0),n.globalThis.removeEventListener("pointerup",c,!0),n.globalThis.removeEventListener("pointercancel",f,!0)},O=function(R){R.removeEventListener("touchstart",u,!0),R.removeEventListener("touchend",c,!0),R.removeEventListener("touchmove",l,!0),R.removeEventListener("touchcancel",f,!0)},L=function(R){n.globalThis.document.removeEventListener("mousemove",l,!0),R.removeEventListener("mousedown",u,!0),R.removeEventListener("mouseout",d,!0),R.removeEventListener("mouseover",h,!0),n.globalThis.removeEventListener("mouseup",c,!0)};a.hooks.init.tap(r.tag,function(){var U=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(U.style.msContentZooming="none",U.style.msTouchAction="none"):A.supportsPointerEvents&&(U.style.touchAction="none"),A.supportsPointerEvents?p(U):x(U),A.supportsTouchEvents&&y(U),o.useNativeClickEvent&&U.addEventListener("click",v,!0),U.addEventListener("wheel",g,{passive:!0,capture:!0})}),a.hooks.destroy.tap(r.tag,function(){var U=i.context.contextService.getDomElement();n.globalThis.navigator.msPointerEnabled?(U.style.msContentZooming="",U.style.msTouchAction=""):A.supportsPointerEvents&&(U.style.touchAction=""),A.supportsPointerEvents?F(U):L(U),A.supportsTouchEvents&&O(U),o.useNativeClickEvent&&U.removeEventListener("click",v,!0),U.removeEventListener("wheel",g,!0)})}}])}();oB.tag="DOMInteraction";var eO=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="dom-interaction",e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new oB)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ds),nO=Object.freeze({__proto__:null,Plugin:eO}),AB=function(){function r(){(0,P.Z)(this,r)}return(0,N.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)})}}])}();AB.tag="MobileInteraction";var rO=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="mobile-interaction",e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new AB)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(ds),nG=Object.freeze({__proto__:null,Plugin:rO}),rG=T(64270);var Um=function(r){function t(e,n,i,a){var s;return(0,P.Z)(this,t),s=(0,K.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,_.Z)(t,r),(0,N.Z)(t)}(cf),iO=0,aO=function(){function r(t,e){var n;(0,P.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(iO++),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,N.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 Um(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 Um(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 Um(null,this,this.currentTime,e);this.onframe(a)}this._finishedFlag=!1}}}])}(),sO=4,oO=.001,AO=1e-7,lO=10,lh=11,wf=1/(lh-1),cO=typeof Float32Array=="function",lB=function(t,e){return 1-3*e+3*t},cB=function(t,e){return 3*e-6*t},uB=function(t){return 3*t},Ef=function(t,e,n){return((lB(e,n)*t+cB(e,n))*t+uB(e))*t},hB=function(t,e,n){return 3*lB(e,n)*t*t+2*cB(e,n)*t+uB(e)},uO=function(t,e,n,i,a){var s,o,A=0;do o=e+(n-e)/2,s=Ef(o,i,a)-t,s>0?n=o:e=o;while(Math.abs(s)>AO&&++A<lO);return o},hO=function(t,e,n,i){for(var a=0;a<sO;++a){var s=hB(e,n,i);if(s===0)return e;var o=Ef(e,n,i)-t;e-=o/s}return e},Rm=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=cO?new Float32Array(lh):new Array(lh),s=0;s<lh;++s)a[s]=Ef(s*wf,t,n);var o=function(l){for(var c=0,u=1,h=lh-1;u!==h&&a[u]<=l;++u)c+=wf;--u;var d=(l-a[u])/(a[u+1]-a[u]),f=c+d*wf,g=hB(f,t,n);return g>=oO?hO(l,f,t,n):g===0?f:uO(l,c,c+wf,t,n)};return function(A){return A===0||A===1?A:Ef(o(A),e,i)}},dO=function(t){return t=t.replace(/([A-Z])/g,function(e){return"-".concat(e.toLowerCase())}),t.charAt(0)==="-"?t.substring(1):t},Bf=function(t){return Math.pow(t,2)},bf=function(t){return Math.pow(t,3)},xf=function(t){return Math.pow(t,4)},Cf=function(t){return Math.pow(t,5)},Sf=function(t){return Math.pow(t,6)},Mf=function(t){return 1-Math.cos(t*Math.PI/2)},Ff=function(t){return 1-Math.sqrt(1-t*t)},Tf=function(t){return t*t*(3*t-2)},Of=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)},If=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=(0,H.Z)(e,2),i=n[0],a=i===void 0?1:i,s=n[1],o=s===void 0?.5:s,A=dr(Number(a),1,10),l=dr(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)},ch=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0,i=(0,H.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=dr(s,.1,1e3),A=dr(A,.1,1e3),c=dr(c,.1,1e3),h=dr(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,p=f<1?(f*d+-h)/g:-h+d,y=n?n*t/1e3:t;return f<1?y=Math.exp(-y*f*d)*(v*Math.cos(g*y)+p*Math.sin(g*y)):y=(v+p*y)*Math.exp(-y*d),t===0||t===1?t:1-y},Dm=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e,i=(0,H.Z)(n,2),a=i[0],s=a===void 0?10:a,o=i[1],A=o==="start"?Math.ceil:Math.floor;return A(dr(t,0,1)*s)/s},dB=function(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=(0,H.Z)(e,4),i=n[0],a=n[1],s=n[2],o=n[3];return Rm(i,a,s,o)(t)},Nf=Rm(.42,0,1,1),ts=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)}},es=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}},ns=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}},fB={steps:Dm,"step-start":function(t){return Dm(t,[1,"start"])},"step-end":function(t){return Dm(t,[1,"end"])},linear:function(t){return t},"cubic-bezier":dB,ease:function(t){return dB(t,[.25,.1,.25,1])},in:Nf,out:ts(Nf),"in-out":es(Nf),"out-in":ns(Nf),"in-quad":Bf,"out-quad":ts(Bf),"in-out-quad":es(Bf),"out-in-quad":ns(Bf),"in-cubic":bf,"out-cubic":ts(bf),"in-out-cubic":es(bf),"out-in-cubic":ns(bf),"in-quart":xf,"out-quart":ts(xf),"in-out-quart":es(xf),"out-in-quart":ns(xf),"in-quint":Cf,"out-quint":ts(Cf),"in-out-quint":es(Cf),"out-in-quint":ns(Cf),"in-expo":Sf,"out-expo":ts(Sf),"in-out-expo":es(Sf),"out-in-expo":ns(Sf),"in-sine":Mf,"out-sine":ts(Mf),"in-out-sine":es(Mf),"out-in-sine":ns(Mf),"in-circ":Ff,"out-circ":ts(Ff),"in-out-circ":es(Ff),"out-in-circ":ns(Ff),"in-back":Tf,"out-back":ts(Tf),"in-out-back":es(Tf),"out-in-back":ns(Tf),"in-bounce":Of,"out-bounce":ts(Of),"in-out-bounce":es(Of),"out-in-bounce":ns(Of),"in-elastic":If,"out-elastic":ts(If),"in-out-elastic":es(If),"out-in-elastic":ns(If),spring:ch,"spring-in":ch,"spring-out":ts(ch),"spring-in-out":es(ch),"spring-out-in":ns(ch)},fO=function(t){return dO(t).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},gO=function(t){return fB[fO(t)]||fB.linear},vO=function(t){return t},pO=1,mO=.5,gB=0;function vB(r,t){return function(e){if(e>=1)return 1;var n=1/r;return e+=t*n,e-e%n}}var Lf="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",yO=new RegExp("cubic-bezier\\(".concat(Lf,",").concat(Lf,",").concat(Lf,",").concat(Lf,"\\)")),wO=/steps\(\s*(\d+)\s*\)/,EO=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Pm(r){var t=yO.exec(r);if(t)return Rm.apply(void 0,(0,G.Z)(t.slice(1).map(Number)));var e=wO.exec(r);if(e)return vB(Number(e[1]),gB);var n=EO.exec(r);return n?vB(Number(n[1]),{start:pO,middle:mO,end:gB}[n[2]]):gO(r)}function BO(r){return Math.abs(bO(r)/(r.playbackRate||1))}function bO(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 pB=0,_m=1,kf=2,mB=3;function xO(r,t,e){if(t===null)return pB;var n=e.endTime;return t<Math.min(e.delay,n)?_m:t>=Math.min(e.delay+r+e.endDelay,n)?kf:mB}function CO(r,t,e,n,i){switch(n){case _m:return t==="backwards"||t==="both"?0:null;case mB:return e-i;case kf:return t==="forwards"||t==="both"?r:null;case pB:return null}}function SO(r,t,e,n,i){var a=i;return r===0?t!==_m&&(a+=e):a+=n/r,a}function MO(r,t,e,n,i,a){var s=r===1/0?t%1:r%1;return s===0&&e===kf&&n!==0&&(i!==0||a===0)&&(s=1),s}function FO(r,t,e,n){return r===kf&&t===1/0?1/0:e===1?Math.floor(n)-1:Math.floor(n)}function TO(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 OO(r,t,e){var n=xO(r,t,e),i=CO(r,e.fill,t,n,e.delay);if(i===null)return null;var a=e.duration==="auto"?0:e.duration,s=SO(a,n,e.iterations,i,e.iterationStart),o=MO(s,e.iterationStart,n,e.iterations,i,a),A=FO(n,e.iterations,o,s),l=TO(e.direction,A,o);return e.currentIteration=A,e.progress=l,e.easingFunction(l)}function IO(r,t,e){var n=NO(r,t),i=LO(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)yB(o)&&a.setAttribute(o,null)}}function yB(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(yB(i)){var a={offset:r[n].offset,computedOffset:r[n].computedOffset,easing:r[n].easing,easingFunction:Pm(r[n].easing)||t.easingFunction,value:r[n][i]};e[i]=e[i]||[],e[i].push(a)}return e}function LO(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:kO(n,i[s].value,i[o].value,t)})}return e.sort(function(h,d){return h.startOffset-d.startOffset}),e}var wB=function(t,e,n){return function(i){var a=EB(t,e,i);return ye(a)?a:n(a)}};function kO(r,t,e,n){var i=FE[r];if(i&&i.syntax&&i.int){var a=re.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=wB.apply(void 0,(0,G.Z)(l));return function(u){return u===0?t:u===1?e:c(u)}}}}return wB(!1,!0,function(u){return u?e:t})}function EB(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(EB(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 QO=function(){function r(){(0,P.Z)(this,r),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=vO,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return(0,N.Z)(r,[{key:"easing",get:function(){return this._easing},set:function(e){this.easingFunction=Pm(e),this._easing=e}}])}();function UO(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 BB(r,t){if(r===null)return[];Array.isArray(r)||(r=UO(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(Re(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(!Re(g)&&!Re(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 RO="backwards|forwards|both|none".split("|"),DO="reverse|alternate|alternate-reverse".split("|");function PO(r,t){var e=new QO;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"&&RO.indexOf(r[n])===-1||n==="direction"&&DO.indexOf(r[n])===-1)return;e[n]=r[n]}}),e}function _O(r,t){return r=HO(r!=null?r:{duration:"auto"}),PO(r,t)}function HO(r){return typeof r=="number"&&(isNaN(r)?r={duration:"auto"}:r={duration:r}),r}var GO=function(){function r(t,e,n){var i=this;(0,P.Z)(this,r),this.composite="replace",this.iterationComposite="replace",this.target=t,this.timing=_O(n,!1),this.timing.effect=this,this.timing.activeDuration=BO(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=BB(e,this.timing),this.interpolations=IO(this.normalizedKeyframes,this.timing,this.target);var a=re.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,N.Z)(r,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(e){return e===null?!1:(this.timeFraction=OO(this.timing.activeDuration,e,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(e){this.normalizedKeyframes=BB(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 bB(r,t){return Number(r.id)-Number(t.id)}var zO=function(){function r(t){var e=this;(0,P.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(bB),e.animations=e.tick(n,!0,e.animations)[0],i.forEach(function(a){a[1](n)}),e.applyPendingEffects()},this.document=t}return(0,N.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 GO(e,n,i),s=new aO(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(bB);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]}}])}();re.EasingFunction=Pm,re.AnimationTimeline=zO;var KO=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.landmarks=[],e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"rotate",value:function(n,i,a){if(this.relElevation=js(i),this.relAzimuth=js(n),this.relRoll=js(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===In.EXPLORING){var s=ca(Br(),[1,0,0],Un((this.rotateWorld?1:-1)*this.relElevation)),o=ca(Br(),[0,1,0],Un((this.rotateWorld?1:-1)*this.relAzimuth)),A=ca(Br(),[0,0,1],Un(this.relRoll)),l=Ps(Br(),o,s);l=Ps(Br(),l,A);var c=KA($t(),l);se(this.matrix,this.matrix,[0,0,-this.distance]),ue(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=pi(n,i,0),s=Gt(this.position);return de(s,s,Pt(Ot(),this.right,a[0])),de(s,s,Pt(Ot(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(n){var i=this.forward,a=Gt(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&&de(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 re.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:Gt(g.right),up:Gt(g.up),forward:Gt(g.forward),position:Gt(g.getPosition()),focalPoint:Gt(g.getFocalPoint()),distanceVector:Gt(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(et){return et.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,p=v===void 0?void 0:v,y=.01;this.cancelLandmarkAnimation();var x=s.position,F=s.focalPoint,O=s.zoom,L=s.roll,U=d||re.EasingFunction(l),R,j=function(){i.setFocalPoint(F),i.setPosition(x),i.setRoll(L),i.setZoom(O),i.computeMatrix(),i.triggerUpdate(),g==null||g()};if(u===0)return j();var q=function(it){R===void 0&&(R=it);var dt=it-R;if(dt>=u){j();return}var ft=U(dt/u),mt=Ot(),Rt=Ot(),Qt=1,yt=0;nn(mt,i.focalPoint,F,ft),nn(Rt,i.position,x,ft),yt=i.roll*(1-ft)+L*ft,Qt=i.zoom*(1-ft)+O*ft,i.setFocalPoint(mt),i.setPosition(Rt),i.setRoll(yt),i.setZoom(Qt);var xt=Ba(mt,F)+Ba(Rt,x);if(xt<=y&&O===void 0&&L===void 0)return j();i.computeMatrix(),i.triggerUpdate(),dt<u&&(p==null||p(ft),i.landmarkAnimationID=i.canvas.requestAnimationFrame(q))};this.canvas.requestAnimationFrame(q)}}}])}(Zu);re.CameraContribution=KO;var iG=null,aG=null;function xB(r,t,e){var n=r+t;return e?n*2:n}function CB(r,t){var e=t?[[r*.25,r*.25],[r*.75,r*.75]]:[[r*.5,r*.5]];return e}var VO={size:6,padding:2,backgroundColor:"transparent",opacity:1,fill:"#fff",fillOpacity:1,stroke:"transparent",strokeOpacity:1,lineWidth:0,isStagger:!0};function sG(r){var t=_objectSpread(_objectSpread({},VO),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=xB(e,n,i),f=CB(d,i),g=new Rect({style:{width:d,height:d,fill:a,opacity:1,fillOpacity:s}}),v=_createForOfIteratorHelper(f),p;try{for(v.s();!(p=v.n()).done;){var y=_slicedToArray(p.value,2),x=y[0],F=y[1],O=new Circle({style:{opacity:o,fill:A,fillOpacity:l,cx:x,cy:F,r:e/2,lineWidth:c,stroke:u,strokeOpacity:h}});g.appendChild(O)}}catch(L){v.e(L)}finally{v.f()}return g}var WO={spacing:5,opacity:1,backgroundColor:"transparent",backgroundOpacity:1,strokeOpacity:1,stroke:"#fff",lineWidth:2};function oG(r){var t=_objectSpread(_objectSpread({},WO),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 jO={size:6,padding:1,isStagger:!0,backgroundColor:"transparent",opacity:1,fill:"#fff",fillOpacity:1,stroke:"transparent",lineWidth:0};function AG(r){var t=_objectSpread(_objectSpread({},jO),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=xB(e,n,i),f=CB(d,i),g=new Rect({style:{width:d,height:d,fill:a,opacity:1,fillOpacity:s}}),v=_createForOfIteratorHelper(f),p;try{for(v.s();!(p=v.n()).done;){var y=_slicedToArray(p.value,2),x=y[0],F=y[1],O=new Rect({style:{opacity:o,fill:A,fillOpacity:l,x:x-e/2,y:F-e/2,width:e,height:e,lineWidth:h,stroke:c,strokeOpacity:u}});g.appendChild(O)}}catch(L){v.e(L)}finally{v.f()}return g}var ZO=["body","startHead","endHead","startHeadOffset","endHeadOffset"],YO=["body","startHead","endHead","startHeadOffset","endHeadOffset"],XO=["body","startHead","endHead","startHeadOffset","endHeadOffset"],SB=function(r){function t(e){var n;(0,P.Z)(this,t),n=(0,K.Z)(this,t,[(0,z.Z)((0,z.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,Ja.Z)(i,ZO);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,_.Z)(t,r),(0,N.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,Ja.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,Ja.Z)(l,XO);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=Ot(),s=0,o=0,A=0,l=0,c=0,u=this.body&&this.body.nodeName;if(u===Kt.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===Kt.POLYLINE){var p=this.body.attributes.points,y=p.length;o=i?p[1][0]:p[y-2][0],l=i?p[1][1]:p[y-2][1],A=i?p[0][0]:p[y-1][0],c=i?p[0][1]:p[y-1][1]}else if(u===Kt.PATH){var x=this.getTangent(this.body,i),F=(0,H.Z)(x,2),O=F[0],L=F[1];o=O[0],l=O[1],A=L[0],c=L[1]}var U=o-A,R=l-c;s=Math.atan2(R,U),a=Wt(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(cs(Ot(),i?this.startHeadPosition:this.endHeadPosition,Wt(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&&(Re(a)||(c.style.opacity=a),Re(s)||(c.style.stroke=s),Re(o)||(c.style.strokeOpacity=o),Re(A)||(c.style.lineWidth=A),Re(l)||(c.style.increasedLineWidthForHitTesting=l))})}}])}(sh);SB.tag="arrow",SB.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(sh.PARSED_STYLE_LIST),["body","startHead","endHead","startHeadOffset","endHeadOffset","stroke","lineWidth","opacity","strokeOpacity"]));var Hm=Math.PI,JO=Hm*2,uh=Math.sin,Qf=Math.cos,qO=Math.acos,_i=Math.atan2,hh=Math.sqrt,Gm=Math.max,no=Math.min,Uc=1e-4,$O=[{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}];$O.forEach(function(r){GT.registerProperty(r)});var bs=function(t,e,n,i){return{x:t+n*Math.cos(i),y:e+n*Math.sin(i)}};function tI(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<Uc))return h=(c*(t-a)-u*(r-i))/h,[r+h*A,t+h*l]}function Uf(r,t,e,n,i,a,s){var o=r-e,A=t-n,l=(s?a:-a)/hh(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,p=(d+g)/2,y=f-h,x=g-d,F=y*y+x*x,O=i-a,L=h*g-f*d,U=(x<0?-1:1)*hh(Gm(0,O*O*F-L*L)),R=(L*x-y*U)/F,j=(-L*y-x*U)/F,q=(L*x+y*U)/F,et=(-L*y+x*U)/F,it=R-v,dt=j-p,ft=q-v,mt=et-p;return it*it+dt*dt>ft*ft+mt*mt&&(R=q,j=et),{cx:R,cy:j,x0:-c,y0:-u,x1:R*(i/O-1),y1:j*(i/O-1)}}function Io(r,t){return t=t<0&&r>=0?t+JO:t,t-r<=Hm?0:1}var eI=function(r){function t(e){var n;return(0,P.Z)(this,t),n=(0,K.Z)(this,t,[e]),n.updatePath(),n}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"setAttribute",value:function(n,i,a){Ks(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]);Ks(t,"setAttribute",this,3)(["d",u])}},{key:"createPath",value:function(n,i,a,s,o,A,l){if(!(o<=0)){var c=bs(n,i,o,a),u=bs(n,i,o,s),h=bs(n,i,A,a),d=bs(n,i,A,s);if(tA(s-a,Math.PI*2)){var f=bs(n,i,o,a+Math.PI),g=bs(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 p=s-a,y=o*Qf(a),x=o*uh(a),F=A*Qf(s),O=A*uh(s),L=o*Qf(s),U=o*uh(s),R=A*Qf(a),j=A*uh(a),q=(0,H.Z)(l,4),et=q[0],it=q[1],dt=q[2],ft=q[3],mt=(o-A)/2,Rt=no(mt,et),Qt=no(mt,it),yt=no(mt,dt),xt=no(mt,ft),Dt=Gm(Rt,Qt),Xt=Gm(yt,xt),ne=Dt,le=Xt;if((Dt>Uc||Xt>Uc)&&p<Hm){var ge=tI(y,x,R,j,L,U,F,O);if(ge){var xe=y-ge[0],Qe=x-ge[1],Pe=L-ge[0],en=U-ge[1],mn=1/uh(qO((xe*Pe+Qe*en)/(hh(xe*xe+Qe*Qe)*hh(Pe*Pe+en*en)))/2),an=hh(ge[0]*ge[0]+ge[1]*ge[1]);ne=no(Dt,(o-an)/(mn+1)),le=no(Xt,(A-an)/(mn-1))}}var er=Io(a,s),kn=!0,Cn=[];if(ne>Uc){var vr=no(et,ne),wa=no(it,ne),Hn=Uf(R,j,y,x,o,vr,kn),Bn=Uf(L,U,F,O,o,wa,kn);if(Cn.push(["M",n+Hn.cx+Hn.x0,i+Hn.cy+Hn.y0]),ne<Dt&&vr===wa){var Us=_i(Hn.y0,Hn.x0),hi=_i(Bn.y0,Bn.x0);Cn.push(["A",ne,ne,0,Io(Us,hi),1,n+Bn.cx+Bn.x0,i+Bn.cy+Bn.y0])}else{if(vr>0){var Vi=_i(Hn.y0,Hn.x0),cn=_i(Hn.y1,Hn.x1),Fn=bs(n,i,o,cn);Cn.push(["A",vr,vr,0,Io(Vi,cn),1,Fn.x,Fn.y])}var hn=_i(Hn.cy+Hn.y1,Hn.cx+Hn.x1),Sn=_i(Bn.cy+Bn.y1,Bn.cx+Bn.x1),Rn=bs(n,i,o,Sn);if(Cn.push(["A",o,o,0,Io(hn,Sn),1,Rn.x,Rn.y]),wa>0){var ke=_i(Bn.y1,Bn.x1),Tn=_i(Bn.y0,Bn.x0);Cn.push(["A",wa,wa,0,Io(ke,Tn),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<Uc)Cn.push(["L",d.x,d.y]);else if(le>Uc){var En=no(ft,le),ur=no(dt,le),qe=Uf(F,O,0,0,A-o,ur,kn),Je=Uf(0,0,R,j,A-o,En,kn);if(Cn.push(["L",n+qe.cx+qe.x0,i+qe.cy+qe.y0]),le<Xt&&En===ur){var mr=_i(qe.y0,qe.x0),Wi=_i(Je.y0,Je.x0),yr=bs(n,i,A,Wi);Cn.push(["A",ne,ne,0,Io(mr,Wi),1,yr.x,yr.y])}else{if(ur>0){var zo=_i(qe.y0,qe.x0),Ko=_i(qe.y1,qe.x1),Bi=bs(n,i,A-o,Ko);Cn.push(["A",ur,ur,0,Io(zo,Ko),1,Bi.x,Bi.y])}var Ea=_i(qe.cy+qe.y1,qe.cx+qe.x1),Ga=_i(Je.cy+Je.y1,Je.cx+Je.x1),za=bs(n,i,A,Ga);if(Cn.push(["A",A,A,0,Io(Ga,Ea),0,za.x,za.y]),Cn.push(["L",za.x,za.y]),En>0){var Ni=_i(Je.y1,Je.x1),Ka=_i(Je.y0,Je.x0);Cn.push(["A",En,En,0,Io(Ni,Ka),1,n+Je.cx+Je.x0,i+Je.cy+Je.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);eI.PARSED_STYLE_LIST=new Set([].concat((0,G.Z)(Pi.PARSED_STYLE_LIST),["x","y","sr","sr0","radius","startAngle","endAngle"]));var MB=function(r){return Re(r)?"":r.toString()},nI=function(r){var t=MB(r);return t.charAt(0).toUpperCase()+t.substring(1)},Rf=nI,rI=function(r){return typeof r=="object"&&r!==null},zm=rI,iI=function(r){return r!==null&&typeof r!="function"&&isFinite(r.length)},dh=iI,Km=function(r,t){if(r===t)return!0;if(!r||!t||gn(r)||gn(t))return!1;if(dh(r)||dh(t)){if(r.length!==t.length)return!1;for(var e=!0,n=0;n<r.length&&(e=Km(r[n],t[n]),!!e);n++);return e}if(zm(r)||zm(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=Km(r[i[n]],t[i[n]]),!!e);n++);return e}return!1},Pr=Km;const aI={duration:500},sI={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},lG={CHANGE:"change"};var fr;(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"})(fr||(fr={}));var ga;(function(r){r.DRAW="draw",r.COLLAPSE="collapse",r.EXPAND="expand",r.TRANSFORM="transform"})(ga||(ga={}));var No;(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"})(No||(No={}));var yl;(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"})(yl||(yl={}));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 Rc;(function(r){r.KEY_DOWN="keydown",r.KEY_UP="keyup"})(Rc||(Rc={}));var Df;(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"})(Df||(Df={}));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 mA;(function(r){r.UNDO="undo",r.REDO="redo",r.CANCEL="cancel",r.ADD="add",r.CLEAR="clear",r.CHANGE="change"})(mA||(mA={}));var rs;(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"})(rs||(rs={}));const nr="combo",Qa="tree";var fh;(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"})(fh||(fh={}));const Vm={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function Lo(r,t){var e;const n=(e=Vm[r])===null||e===void 0?void 0:e[t];if(n)return n}function cG(r){return EXTENSION_REGISTRY[r]}const oI="5.0.51",AI="G6";function ko(r){return`[${AI} v${oI}] ${r}`}const va={mute:!1,debug:r=>{!va.mute&&console.debug(ko(r))},info:r=>{!va.mute&&console.info(ko(r))},warn:r=>{!va.mute&&console.warn(ko(r))},error:r=>{!va.mute&&console.error(ko(r))}};function FB(r){const{theme:t}=r;if(!t)return{};const e=Lo(fh.THEME,t);return e||(va.warn(`The theme of ${t} is not registered.`),{})}function Wm(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 jm(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=>Re(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(n)&&Pr(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 gh(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 TB(r,t){const{animation:e}=r;if(e===!1||t===!1)return!1;const n=Object.assign({},aI);return br(e)&&Object.assign(n,e),br(t)&&Object.assign(n,t),n}function lI(r){if(typeof r=="string"){const t=Lo(fh.ANIMATION,r);return t||(va.warn(`The animation of ${r} is not registered.`),[])}return r}function cI(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=FB(r)[t])===null||a===void 0?void 0:a.animation,c=(h=[])=>lI(h).map(d=>Object.assign(Object.assign(Object.assign(Object.assign({},sI),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 OB(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 uI=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 hI=(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${Rf(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=uI(l,["fields","shape","states"]);const f=a(u);if(!f)return null;const{shape:g,fromStyle:v,toStyle:p}=f,y=[{},{}];if(c.forEach(F=>{var O,L;Object.assign(y[0],{[F]:(O=v[F])!==null&&O!==void 0?O:gh(F)}),Object.assign(y[1],{[F]:(L=p[F])!==null&&L!==void 0?L:gh(F)})}),y.some(F=>Object.keys(F).some(O=>["x","y","z"].includes(O)))){const{x:F=0,y:O=0,z:L,transform:U=""}=g.attributes||{};y.forEach(R=>{var j,q,et;R.transform=OB((j=R.x)!==null&&j!==void 0?j:F,(q=R.y)!==null&&q!==void 0?q:O,(et=R.z)!==null&&et!==void 0?et:L,U)})}const x=g.animate(jm(y),d);return u===void 0&&(s=x),x}).filter(Boolean),A=s||(o==null?void 0:o[0]);return A?Wm(A,o.filter(l=>l!==l)):null},dI=[{fields:["opacity"]}],fI=[{fields:["x","y"]}],IB=[{fields:["x","y"]}],gI=IB,NB=[{fields:["sourceNode","targetNode"]}],vI=NB,LB=[{fields:["childrenNode","x","y"]}],pI=LB,uG=[{fields:["childrenNode","x","y"]}];var mI=Object.prototype.hasOwnProperty;function yI(r,t){if(!t||!Qi(r))return{};for(var e={},n=Vt(t)?t:function(o){return o[t]},i,a=0;a<r.length;a++){var s=r[a];i=n(s),mI.call(e,i)?e[i].push(s):e[i]=[s]}return e}var Pf=yI,kB=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},Zm=function(r){if(typeof r!="object"||r===null)return r;var t;if(Qi(r)){t=[];for(var e=0,n=r.length;e<n;e++)typeof r[e]=="object"&&r[e]!=null?t[e]=Zm(r[e]):t[e]=r[e]}else{t={};for(var i in r)typeof r[i]=="object"&&r[i]!=null?t[i]=Zm(r[i]):t[i]=r[i]}return t},Dc=Zm;function wI(r){return"source"in r&&"target"in r}function EI(r){return r.length===2}function hG(r){return r.length===3}function Pc(r){return r instanceof Float32Array?!0:Array.isArray(r)&&(r.length===2||r.length===3)?r.every(t=>typeof t=="number"):!1}function ro(r,t,e){return r>=t&&r<=e}function Ua(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 BI(r=0){const t=Ua(r);return t[0]+t[2]}function dG(r=0){const t=Ua(r);return t[1]+t[3]}function io(r){return r.max[0]-r.min[0]}function ao(r){return r.max[1]-r.min[1]}function yA(r){return[io(r),ao(r)]}function wA(r,t){const e=Pc(r)?Ym(r):r.getShape("key").getBounds();return t?EA(e,t):e}function Ym(r){const[t,e,n=0]=r,i=new Zn;return i.setMinMax([t,e,n],[t,e,n]),i}function EA(r,t){const[e,n,i,a]=Ua(t),[s,o,A]=r.min,[l,c,u]=r.max,h=new Zn;return h.setMinMax([s-a,o-e,A],[l+n,c+i,u]),h}function vh(r){if(r.length===0)return new Zn;if(r.length===1)return r[0];const t=new Zn;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 bI(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 xs(r,t){return ro(r[0],t.min[0],t.max[0])&&ro(r[1],t.min[1],t.max[1])}function QB(r,t,e=!1){const{min:[n,i],max:[a,s]}=t,o=(r[1]===i||r[1]===s)&&(e||ro(r[0],n,a)),A=(r[0]===n||r[0]===a)&&(e||ro(r[1],i,s));return o||A}function xI(r,t){return!xs(r,t)}function _f(r,t){const{center:e}=t;return r[0]===e[0]&&r[1]===e[1]}function ph(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 wl(r,t){const e=Dc(r);if(xs(r,t))switch(ph(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]=ro(n,a,o)?n:n<a?a:o,e[1]=ro(i,s,A)?i:i<s?s:A}return e}function CI(r,t){const{center:e}=r,[n,i]=yA(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 SI(r,t){let[e,n]=yA(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 MI(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 FI=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},Hf=FI,TI=function(t,e){return t===e},UB=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}(),OI=function(){function r(t){t===void 0&&(t=TI),this.head=null,this.tail=null,this.compare=t}return r.prototype.prepend=function(t){var e=new UB(t,this.head);return this.head=e,this.tail||(this.tail=e),this},r.prototype.append=function(t){var e=new UB(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}(),RB=OI,II=function(){function r(){this.linkedList=new RB}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=II,is=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)},LI=function(t,e){return e.filter(function(n){return n.source===t})},Gf=function(t,e){return e.filter(function(n){return n.source===t||n.target===t})},DB=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 kI(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 QI=function(t,e,n,i){i===void 0&&(i=!0);var a=kI(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}),is(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()},UI=QI,RI=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=is(f.id,a),v=function(x){var F=g[x];if(!o[F]){var O=n.filter(function(L){return L.id===F});O.length>0&&d(O[0])}},p=0;p<g.length;++p)v(p)},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},PB=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(p){A[p.id]=u,l[p.id]=u,u+=1,s.push(p),o[p.id]=!0;for(var y=is(p.id,a,"target").filter(function(U){return n.map(function(R){return R.id}).indexOf(U)>-1}),x=function(R){var j=y[R];if(!A[j]&&A[j]!==0){var q=n.filter(function(et){return et.id===j});q.length>0&&v(q[0]),l[p.id]=Math.min(l[p.id],l[j])}else o[j]&&(l[p.id]=Math.min(l[p.id],A[j]))},F=0;F<y.length;F++)x(F);if(l[p.id]===A[p.id]){for(var O=[];s.length>0;){var L=s.pop();if(o[L.id]=!1,O.push(L),L===p)break}O.length>0&&c.push(O)}},d=0,f=n;d<f.length;d++){var g=f[d];!A[g.id]&&A[g.id]!==0&&h(g)}return c};function _B(r,t){return t?PB(r):RI(r)}var mh=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},Xm=mh,DI=function(t,e){var n=mh(t);return n[e]?mh(t)[e].inDegree:0},PI=function(t,e){var n=mh(t);return n[e]?mh(t)[e].outDegree:0};function _I(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 HB(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;is(t,s,i?"target":void 0).forEach(function(o){n.allowTraversal({previous:e,current:t,next:o})&&HB(r,o,t,n,i)}),n.leave({current:t,previous:e})}function GB(r,t,e,n){n===void 0&&(n=!0),HB(r,t,"",_I(e),n)}var HI=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];GB(t,c,l)}return e},zB=function(t,e,n){var i,a;n===void 0&&(n=!0);for(var s=[],o=_B(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(),p=v.id,y=is(p,t.edges),x=function(L){var U,R=y[L],j=t.nodes.find(function(mt){return mt.id===R});if(R===p)s.push((U={},U[R]=v,U));else if(!(R in g))f[R]=v,d.push(j),g[R]=new Set([v]);else if(!g[p].has(j)){for(var q=!0,et=[j,v],it=f[p];g[R].size&&!g[R].has(it)&&(et.push(it),it!==f[it.id]);)it=f[it.id];if(et.push(it),e&&n?(q=!1,et.findIndex(function(mt){return e.indexOf(mt.id)>-1})>-1&&(q=!0)):e&&!n&&et.findIndex(function(mt){return e.indexOf(mt.id)>-1})>-1&&(q=!1),q){for(var dt={},ft=1;ft<et.length;ft+=1)dt[et[ft-1].id]=et[ft];et.length&&(dt[et[et.length-1].id]=et[0]),s.push(dt)}g[R].add(v)}},F=0;F<y.length;F+=1)x(F)}return s},KB=function(t,e,n){n===void 0&&(n=!0);for(var i=[],a=new Set,s=[],o=[],A={},l={},c=function(it){for(var dt=[it];dt.length>0;){var ft=dt.pop();a.has(ft)&&(a.delete(ft),s[ft.id].forEach(function(mt){dt.push(mt)}),s[ft.id].clear())}},u=function et(it,dt,ft){var mt=!1;if(e&&n===!1&&e.indexOf(it.id)>-1)return mt;i.push(it),a.add(it);for(var Rt=ft[it.id],Qt=0;Qt<Rt.length;Qt+=1){var yt=A[Rt[Qt]];if(yt===dt){for(var xt={},Dt=1;Dt<i.length;Dt+=1)xt[i[Dt-1].id]=i[Dt];i.length&&(xt[i[i.length-1].id]=i[0]),o.push(xt),mt=!0}else a.has(yt)||et(yt,dt,ft)&&(mt=!0)}if(mt)c(it);else for(var Qt=0;Qt<Rt.length;Qt+=1){var yt=A[Rt[Qt]];s[yt.id].has(it)||s[yt.id].add(it)}return i.pop(),mt},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 p=function(it){var dt=e[it];l[d[it].id]=l[dt],l[dt]=0,A[0]=d.find(function(ft){return ft.id===dt}),A[l[d[it].id]]=d[it]},f=0;f<e.length;f++)p(f);for(var y=function(it){for(var dt,ft,mt=1/0,Rt=0;Rt<it.length;Rt+=1)for(var Qt=it[Rt],yt=0;yt<Qt.length;yt++){var xt=l[Qt[yt].id];xt<mt&&(mt=xt,ft=Rt)}for(var Dt=it[ft],Xt=[],Rt=0;Rt<Dt.length;Rt+=1){var ne=Dt[Rt];Xt[ne.id]=[];for(var le=0,ge=is(ne.id,t.edges,"target").filter(function(Pe){return Dt.map(function(en){return en.id}).indexOf(Pe)>-1});le<ge.length;le++){var xe=ge[le];xe===ne.id&&!(n===!1&&e.indexOf(ne.id)>-1)?o.push((dt={},dt[ne.id]=ne,dt)):Xt[ne.id].push(l[xe])}}return{component:Dt,adjList:Xt,minIdx:mt}},x=0;x<d.length;){var F=d.filter(function(et){return l[et.id]>=x}),O=PB({nodes:F,edges:t.edges}).filter(function(et){return et.length>1});if(O.length===0)break;var L=y(O),U=L.minIdx,R=L.adjList,j=L.component;if(j.length>1){j.forEach(function(et){s[et.id]=new Set});var q=A[U];if(e&&n&&e.indexOf(q.id)===-1)return o;u(q,q,R),x=U+1}else break}return o},GI=function(t,e,n,i){return i===void 0&&(i=!0),e?KB(t,n,i):zB(t,n,i)},VB=HI,zI={}.toString,KI=function(r,t){return zI.call(r)==="[object "+t+"]"},zf=KI,Jm=function(r){return zf(r,"Function")},qm=function(r){return Array.isArray?Array.isArray(r):zf(r,"Array")},VI=function(r){var t=typeof r;return r!==null&&t==="object"||t==="function"};function WI(r,t){if(r){var e;if(qm(r))for(var n=0,i=r.length;n<i&&(e=t(r[n],n),e!==!1);n++);else if(VI(r)){for(var a in r)if(r.hasOwnProperty(a)&&(e=t(r[a],a),e===!1))break}}}var WB=WI,fG=Object.keys?function(r){return Object.keys(r)}:function(r){var t=[];return WB(r,function(e,n){Jm(r)&&n==="prototype"||t.push(n)}),t},gG=null;function vG(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 pG=null,mG=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},yG=null;function wG(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 EG=null,BG=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},bG=null,xG=function(r){if(!isArray(r))return[];for(var t=[],e=0;e<r.length;e++)t=t.concat(r[e]);return t},CG=null,jI=function(r,t){if(t===void 0&&(t=[]),!isArray(r))t.push(r);else for(var e=0;e<r.length;e+=1)jI(r[e],t);return t},SG=null,MG=function(r){if(isArray(r))return r.reduce(function(t,e){return Math.max(t,e)},r[0])},FG=function(r){if(isArray(r))return r.reduce(function(t,e){return Math.min(t,e)},r[0])},TG=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}},OG=null,jB=Array.prototype,ZI=jB.splice,YI=jB.indexOf,IG=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;)ZI.call(r,a,1);return r},NG=null,XI=Array.prototype.splice,LG=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,XI.call(t,s,1))}return t},kG=null,QG=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},UG=null,RG=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},DG=null,$m=function(r){return zf(r,"String")};function PG(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 _G=null;function ty(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 HG=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 GG(r,t){return isArray(r)||isString(r)?r[0]===t:!1}var zG=null;function KG(r,t){return isArray(r)||isString(r)?r[r.length-1]===t:!1}var VG=null,JI=Object.prototype.hasOwnProperty;function WG(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),JI.call(e,i)?e[i].push(s):e[i]=[s]}return e}var jG=null;function ZG(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 YG=function(r,t){if(!t)return[r];var e=groupToMap(r,t),n=[];for(var i in e)n.push(e[i]);return n},ZB={};function XG(r){var t=ZB[r];if(!t){for(var e=r.toString(16),n=e.length;n<6;n++)e="0"+e;t="#"+e,ZB[r]=t}return t}var JG=null;function qG(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 $G=null,qI=function(r){return zf(r,"Number")},$I=qI,t9=function(r){return isNumber(r)&&r%1!==0},e9=null,n9=function(r){return isNumber(r)&&r%2===0},r9=null,i9=Number.isInteger?Number.isInteger:function(r){return $I(r)&&r%1===0},a9=null,s9=function(r){return isNumber(r)&&r<0},o9=null,A9=function(r){return isNumber(r)&&r%2!==0},l9=null,c9=function(r){return isNumber(r)&&r>0},u9=null,h9=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}},d9=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}},tN=180/Math.PI,f9=function(r){return tN*r},g9=null,eN=Math.PI/180,v9=function(r){return eN*r},p9=null,m9=null,nN=Object.values?function(r){return Object.values(r)}:function(r){var t=[];return WB(r,function(e,n){Jm(r)&&n==="prototype"||t.push(e)}),t},rN=nN,y9=function(r,t){return contains(values(r),t)},iN={}.toString,w9=function(r){return iN.call(r).replace(/^\[object /,"").replace(/]$/,"")},E9=null,B9=function(r){return isType(r,"Arguments")},b9=null,x9=function(r){return isType(r,"Boolean")},C9=null,S9=function(r){return isType(r,"Date")},M9=null,F9=function(r){return isType(r,"Error")},T9=null;function O9(r){return isNumber(r)&&isFinite(r)}var aN=Object.prototype,I9=function(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||aN;return r===e},N9=null,L9=function(r){return isType(r,"RegExp")},k9=null,Q9=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)}},U9=null,ey=function(r){if(typeof r!="object"||r===null)return r;var t;if(qm(r)){t=[];for(var e=0,n=r.length;e<n;e++)typeof r[e]=="object"&&r[e]!=null?t[e]=ey(r[e]):t[e]=r[e]}else{t={};for(var i in r)typeof r[i]=="object"&&r[i]!=null?t[i]=ey(r[i]):t[i]=r[i]}return t},yh=ey,sN=function(r,t){if(!Jm(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},oN=5;function YB(r,t,e,n){e=e||0,n=n||oN;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];a!==null&&isPlainObject(a)?(isPlainObject(r[i])||(r[i]={}),e<n?YB(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 R9=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)YB(r,t[n]);return r},D9=null,P9=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},_9=null,AN=Object.prototype.hasOwnProperty;function H9(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(AN.call(r,e))return!1;return!0}var G9=null,lN=function(r){return typeof r=="object"&&r!==null},XB=lN,cN=function(r){return r!==null&&typeof r!="function"&&isFinite(r.length)},JB=cN,ny=function(r,t){if(r===t)return!0;if(!r||!t||$m(r)||$m(t))return!1;if(JB(r)||JB(t)){if(r.length!==t.length)return!1;for(var e=!0,n=0;n<r.length&&(e=ny(r[n],t[n]),!!e);n++);return e}if(XB(r)||XB(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=ny(r[i[n]],t[i[n]]),!!e);n++);return e}return!1},uN=ny,z9=function(r,t,e){return isFunction(e)?!!e(r,t):isEqual(r,t)},K9=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},V9=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},hN=Object.prototype.hasOwnProperty,W9=function(r,t){if(r===null||!isPlainObject(r))return{};var e={};return each(t,function(n){hN.call(r,n)&&(e[n]=r[n])}),e},j9=function(r,t){return reduce(r,function(e,n,i){return t.includes(i)||(e[i]=n),e},{})},Kf={},Z9=function(r){return r=r||"g",Kf[r]?Kf[r]+=1:Kf[r]=1,r+Kf[r]},Vf,Y9=sN(function(r,t){t===void 0&&(t={});var e=t.fontSize,n=t.fontFamily,i=t.fontWeight,a=t.fontStyle,s=t.fontVariant;return Vf||(Vf=document.createElement("canvas").getContext("2d")),Vf.font=[a,s,i,e+"px",n].join(" "),Vf.measureText($m(r)?r:"").width},function(r,t){return t===void 0&&(t={}),(0,D.pr)([r],rN(t)).join("")}),X9=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},J9=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,dN=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},fN=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(x,F){var O=x.id;l.push(O),u[O]=1/0,O===e&&(u[O]=0)});for(var d=s.length,f=function(F){var O=dN(u,s,c),L=O.id;if(c[L]=!0,u[L]===1/0)return"continue";var U=[];n?U=LI(L,A):U=Gf(L,A),U.forEach(function(R){var j=R.target,q=R.source,et=j===L?q:j,it=i&&R[i]?R[i]:1;u[et]>u[O.id]+it?(u[et]=u[O.id]+it,h[et]=[O.id]):u[et]===u[O.id]+it&&h[et].push(O.id)})},g=0;g<d;g++)f(g);h[e]=[e];var v={};for(var p in u)u[p]!==1/0&&qB(e,p,h,v);var y={};for(var p in v)y[p]=v[p][0];return{length:u,path:y,allPath:v}},Wf=fN;function qB(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=qB(r,o,e,n);if(!A)return;for(var l=0,c=A;l<c.length;l++){var u=c[l];qm(u)?i.push((0,D.ev)((0,D.ev)([],u,!0),[t],!1)):i.push([u,t])}}return n[t]=i,n[t]}var ry=function(t,e,n,i,a){var s=Wf(t,e,i,a),o=s.length,A=s.path,l=s.allPath;return{length:o[n],path:A[n],allPath:l[n]}},gN=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?is(e,o,"target"):is(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?is(f,o,"target"):is(f,o),c.push(h.filter(function(p){return!l[p]})))}else{var g=A.pop();l[g]=!1,c.pop();continue}if(A[A.length-1]===n){var v=A.map(function(y){return y});u.push(v);var g=A.pop();l[g]=!1,c.pop()}}return u},vN=function(t,e){for(var n=Hf(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},iy=vN,pN=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,O){var L=DB();F.clusterId=L,l[L]={id:L,nodes:[F]},c[F.id]={node:F,idx:O}});var u=Hf(t,e),h=[],d={};u.forEach(function(F,O){var L=0,U=s[O].id;d[U]={},F.forEach(function(R,j){if(R){L+=R;var q=s[j].id;d[U][q]=R}}),h.push(L)});for(var f=0,g=function(){var O=!1;if(s.forEach(function(L){var U={};Object.keys(d[L.id]).forEach(function(mt){var Rt=d[L.id][mt],Qt=c[mt].node,yt=Qt.clusterId;U[yt]||(U[yt]=0),U[yt]+=Rt});var R=-1/0,j=[];if(Object.keys(U).forEach(function(mt){R<U[mt]?(R=U[mt],j=[mt]):R===U[mt]&&j.push(mt)}),!(j.length===1&&j[0]===L.clusterId)){var q=j.indexOf(L.clusterId);if(q>=0&&j.splice(q,1),j&&j.length){O=!0;var et=l[L.clusterId],it=et.nodes.indexOf(L);et.nodes.splice(it,1);var dt=Math.floor(Math.random()*j.length),ft=l[j[dt]];ft.nodes.push(L),L.clusterId=ft.id}}}),!O)return"break";f++};f<i;){var v=g();if(v==="break")break}Object.keys(l).forEach(function(F){var O=l[F];(!O.nodes||!O.nodes.length)&&delete l[F]});var p=[],y={};A.forEach(function(F){var O=F.source,L=F.target,U=F[n]||1,R=c[O].node.clusterId,j=c[L].node.clusterId,q="".concat(R,"---").concat(j);if(y[q])y[q].weight+=U,y[q].count++;else{var et={source:R,target:j,weight:U,count:1};y[q]=et,p.push(et)}});var x=[];return Object.keys(l).forEach(function(F){x.push(l[F])}),{clusters:x,clusterEdges:p}},mN=pN,yN=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=yh(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}(),as=yN,wN=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,EN=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,$B=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(wN)&&!"".concat(a.properties[s]).match(EN)&&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)},BN=function(t,e){return e.map(function(n){return t.hasOwnProperty(n)?t[n]:0})},bN=function(t){for(var e=$B(t),n=[],i=0;i<t.length;i++)n[i]=BN(t[i].properties,e);return n},jf=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},$9={getAllSortProperties:$B,getPropertyWeight:bN,getAllProperties:jf},Cs;(function(r){r.EuclideanDistance="euclideanDistance"})(Cs||(Cs={}));var tb=function(t,e,n){var i=[];e!=null&&e.length?i=e:(t.forEach(function(s){i=i.concat(Object.keys(s))}),i=ty(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]=ty(o))}),a},Zf=function(t,e,n){var i=tb(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(p){return h===p}),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},ay=function(t,e,n,i){n===void 0&&(n=Cs.EuclideanDistance);var a=0;switch(n){case Cs.EuclideanDistance:a=new as(t).euclideanDistance(new as(e));break;default:break}return a},tz={getAllKeyValueMap:tb,oneHot:Zf,getDistance:ay},eb=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},sy=function(t,e){t===void 0&&(t=[]);for(var n=t.length,i=new as([]),a=0;a<n;a++)i=i.add(new as(e[a]));var s=i.avg(n);s.normalize();for(var o=0,a=0;a<n;a++){var A=new as(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 as(e[a]);t[a].clusterInertial=0;for(var u=0;u<n;u++){if(a===u){c[a][u]=0;continue}var h=new as(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 p=t[a].clusterInertial*t[u].clusterInertial/Math.pow(f,2)-c[a][u]/f;d+=p}}return Number(d.toFixed(4))},xN=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(xt,Dt){xt.properties=xt.properties||{},xt.originIndex=Dt});var g=[];u.every(function(xt){return xt.hasOwnProperty("nodeType")})&&(g=Array.from(new Set(u.map(function(xt){return xt.nodeType}))),u.forEach(function(xt){xt.properties.nodeType=g.findIndex(function(Dt){return Dt===xt.nodeType})}));var v=jf(u,s);f=Zf(v,o,A)}var p=1,y={},x={};u.forEach(function(xt,Dt){var Xt=String(p++);xt.clusterId=Xt,y[Xt]={id:Xt,nodes:[xt]},x[xt.id]={node:xt,idx:Dt}});var F=Hf(t,e),O=[],L={},U=0;F.forEach(function(xt,Dt){var Xt=0,ne=u[Dt].id;L[ne]={},xt.forEach(function(le,ge){if(le){Xt+=le;var xe=u[ge].id;L[ne][xe]=le,U+=le}}),O.push(Xt)}),U/=2;for(var R=1/0,j=1/0,q=0,et=[],it={};;){a&&u.every(function(xt){return xt.hasOwnProperty("properties")})?R=eb(u,F,O,U)+sy(u,f)*l:R=eb(u,F,O,U),q===0&&(j=R,et=u,it=y);var dt=R>0&&R>j&&R-j<i;if(R>j&&(et=u.map(function(xt){return{node:xt,clusterId:xt.clusterId}}),it=yh(y),j=R),dt||q>100)break;q++,Object.keys(y).forEach(function(xt){var Dt=0;d.forEach(function(Xt){var ne=Xt.source,le=Xt.target,ge=x[ne].node.clusterId,xe=x[le].node.clusterId;(ge===xt&&xe!==xt||xe===xt&&ge!==xt)&&(Dt=Dt+(Xt[n]||1))}),y[xt].sumTot=Dt}),u.forEach(function(xt,Dt){var Xt=y[xt.clusterId],ne=0,le,ge=O[Dt]/(2*U),xe=0,Qe=Xt.nodes;Qe.forEach(function(Hn){var Bn=x[Hn.id].idx;xe+=F[Dt][Bn]||0});var Pe=xe-Xt.sumTot*ge,en=Qe.filter(function(Hn){return Hn.id!==xt.id}),mn=[];en.forEach(function(Hn,Bn){mn[Bn]=f[Hn.originIndex]});var an=sy(en,f)*l,er=L[xt.id];if(Object.keys(er).forEach(function(Hn){var Bn=x[Hn].node,Us=Bn.clusterId;if(Us!==xt.clusterId){var hi=y[Us],Vi=hi.nodes;if(!(!Vi||!Vi.length)){var cn=0;Vi.forEach(function(Tn){var En=x[Tn.id].idx;cn+=F[Dt][En]||0});var Fn=cn-hi.sumTot*ge,hn=Vi.concat([xt]),Sn=[];hn.forEach(function(Tn,En){Sn[En]=f[Tn.originIndex]});var Rn=sy(hn,f)*l,ke=Fn-Pe;a&&(ke=Fn+Rn-(Pe+an)),ke>ne&&(ne=ke,le=hi)}}}),ne>0){le.nodes.push(xt);var kn=xt.clusterId;xt.clusterId=le.id;var Cn=Xt.nodes.indexOf(xt);Xt.nodes.splice(Cn,1);var vr=0,wa=0;d.forEach(function(Hn){var Bn=Hn.source,Us=Hn.target,hi=x[Bn].node.clusterId,Vi=x[Us].node.clusterId;(hi===le.id&&Vi!==le.id||Vi===le.id&&hi!==le.id)&&(vr=vr+(Hn[n]||1)),(hi===kn&&Vi!==kn||Vi===kn&&hi!==kn)&&(wa=wa+(Hn[n]||1))}),le.sumTot=vr,Xt.sumTot=wa}})}var ft={},mt=0;Object.keys(it).forEach(function(xt){var Dt=it[xt];if(!Dt.nodes||!Dt.nodes.length){delete it[xt];return}var Xt=String(mt+1);Xt!==xt&&(Dt.id=Xt,Dt.nodes=Dt.nodes.map(function(ne){return{id:ne.id,clusterId:Xt}}),it[Xt]=Dt,ft[xt]=Xt,delete it[xt],mt++)}),et.forEach(function(xt){var Dt=xt.node,Xt=xt.clusterId;Dt&&(Dt.clusterId=Xt,Dt.clusterId&&ft[Dt.clusterId]&&(Dt.clusterId=ft[Dt.clusterId]))});var Rt=[],Qt={};d.forEach(function(xt){var Dt=xt.source,Xt=xt.target,ne=xt[n]||1,le=x[Dt].node.clusterId,ge=x[Xt].node.clusterId;if(!(!le||!ge)){var xe="".concat(le,"---").concat(ge);if(Qt[xe])Qt[xe].weight+=ne,Qt[xe].count++;else{var Qe={source:le,target:ge,weight:ne,count:1};Qt[xe]=Qe,Rt.push(Qe)}}});var yt=[];return Object.keys(it).forEach(function(xt){yt.push(it[xt])}),{clusters:yt,clusterEdges:Rt}},nb=xN,CN=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),nb(t,e,n,i,!0,a,s,o,A)},SN=CN,MN=function(t,e){var n;e===void 0&&(e=1);for(var i=yh(t),a=i.nodes,s=a===void 0?[]:a,o=i.edges,A=o===void 0?[]:o,l=function(){var h=Xm({nodes:s,edges:A}),d=Object.keys(h);d.sort(function(v,p){var y,x;return((y=h[v])===null||y===void 0?void 0:y.degree)-((x=h[p])===null||x===void 0?void 0:x.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}},FN=MN,rb=function(t,e,n){var i=[];switch(t){case Cs.EuclideanDistance:i=e[n];break;default:i=[];break}return i},TN=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=Cs.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===Cs.EuclideanDistance&&!A.every(function(Xt){return Xt.hasOwnProperty(n)}))return u;var h=[],d=[];if(s===Cs.EuclideanDistance&&(h=jf(A,n),d=Zf(h,i,a)),!d.length)return u;for(var f=ty(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 p=[],y=[],x=[],v=0;v<g;v++)if(v===0){var F=Math.floor(Math.random()*A.length);switch(s){case Cs.EuclideanDistance:p[v]=d[F];break;default:p[v]=[];break}y.push(F),x[v]=[A[F]],A[F].clusterId=String(v)}else{for(var O=-1/0,L=0,U=function(le){if(!y.includes(le)){for(var ge=0,xe=0;xe<p.length;xe++){var Qe=0;switch(s){case Cs.EuclideanDistance:Qe=ay(d[A[le].originIndex],p[xe],s);break;default:break}ge+=Qe}var Pe=ge/p.length;Pe>O&&!p.find(function(en){return uN(en,rb(s,d,A[le].originIndex))})&&(O=Pe,L=le)}},R=0;R<A.length;R++)U(R);p[v]=rb(s,d,L),y.push(L),x[v]=[A[L]],A[L].clusterId=String(v)}for(var j=0;;){for(var v=0;v<A.length;v++){var q=0,et=1/0;if(!(j===0&&y.includes(v))){for(var it=0;it<p.length;it++){var dt=0;switch(s){case Cs.EuclideanDistance:dt=ay(d[v],p[it],s);break;default:break}dt<et&&(et=dt,q=it)}if(A[v].clusterId!==void 0)for(var ft=x[Number(A[v].clusterId)].length-1;ft>=0;ft--)x[Number(A[v].clusterId)][ft].id===A[v].id&&x[Number(A[v].clusterId)].splice(ft,1);A[v].clusterId=String(q),x[q].push(A[v])}}for(var mt=!1,v=0;v<x.length;v++){for(var Rt=x[v],Qt=new as([]),it=0;it<Rt.length;it++)Qt=Qt.add(new as(d[Rt[it].originIndex]));var yt=Qt.avg(Rt.length);yt.equal(new as(p[v]))||(mt=!0,p[v]=yt.getArr())}if(j++,A.every(function(Xt){return Xt.clusterId!==void 0})&&mt||j>=1e3)break}var xt=[],Dt={};return c.forEach(function(Xt){var ne,le,ge=Xt.source,xe=Xt.target,Qe=(ne=A.find(function(an){return an.id===ge}))===null||ne===void 0?void 0:ne.clusterId,Pe=(le=A.find(function(an){return an.id===xe}))===null||le===void 0?void 0:le.clusterId,en="".concat(Qe,"---").concat(Pe);if(Dt[en])Dt[en].count++;else{var mn={source:Qe,target:Pe,count:1};Dt[en]=mn,xt.push(mn)}}),{clusters:x,clusterEdges:xt}},ON=TN,IN=function(t,e){var n=new as(e),i=n.norm2(),a=new as(t),s=a.norm2(),o=n.dot(a),A=i*s,l=A?o/A:0;return l},ib=IN,NN=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=yh(t.filter(function(h){return h.id!==e.id})),o=t.findIndex(function(h){return h.id===e.id}),A=jf(t,n),l=Zf(A,i,a),c=l[o],u=[];return s.forEach(function(h,d){if(h.id!==e.id){var f=l[d],g=ib(f,c);u.push(g),h.cosineSimilarity=g}}),s.sort(function(h,d){return d.cosineSimilarity-h.cosineSimilarity}),{allCosineSimilarity:u,similarNodes:s}},LN=NN,kN=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}(),QN=kN,UN=function(t,e){return t-e},RN=function(){function r(t){t===void 0&&(t=UN),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}(),DN=RN,PN=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,p){return e?v.weight-p.weight:0},u=new DN(c);for(Gf(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),Gf(d,o).forEach(function(g){u.insert(g)})),l.has(f)||(l.add(f),Gf(f,o).forEach(function(g){u.insert(g)})))}return n},ab=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 QN(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},_N=function(t,e,n){var i={prim:PN,kruskal:ab};return n?i[n](t,e):ab(t,e)},HN=_N,GN=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],p=v.id;d[p]=1/u,f[p]=1/u}for(var y=Xm(t);s>0&&i>e;){a=0;for(var g=0;g<u;++g){var v=A[g],p=v.id;if(h=0,y[v.id].inDegree===0)d[p]=0;else{for(var x=is(p,c,"source"),F=0;F<x.length;++F){var O=x[F],L=y[O].outDegree;L>0&&(h+=f[O]/L)}d[p]=n*h,a+=d[p]}}a=(1-a)/u,i=0;for(var g=0;g<u;++g){var v=A[g],p=v.id;h=d[p]+a,i+=Math.abs(h-f[p]),f[p]=h}s-=1}return f},sb=GN,zN=-1,Yf=-1,ob="-1",so="-1",Ab=-1,ez="-1",lb=function(){function r(t,e,n,i){t===void 0&&(t=zN),e===void 0&&(e=Yf),n===void 0&&(n=Yf),i===void 0&&(i=ob),this.id=t,this.from=e,this.to=n,this.label=i}return r}(),KN=function(){function r(t,e){t===void 0&&(t=Yf),e===void 0&&(e=so),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}(),cb=function(){function r(t,e,n){t===void 0&&(t=Yf),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 KN(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 lb(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 lb(t,n,e,i);this.nodeMap[n].addEdge(s),this.edgeLabelMap[i].push(s)}}},r}(),El=function(){function r(t,e,n,i,a){this.fromNode=t,this.toNode=e,this.nodeEdgeNodeLabel={nodeLabel1:n||so,edgeLabel:i||ob,nodeLabel2:a||so}}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}(),ub=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 El(t,e,n,i,a)),this.dfsEdgeList},r.prototype.toGraph=function(t,e){t===void 0&&(t=Ab),e===void 0&&(e=!1);var n=new cb(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!==so&&n.addNode(a,A),c!==so&&n.addNode(s,c),A!==so&&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}(),Xf=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}(),VN=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 ub,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(Ab,n),a=i.nodeMap,s=new ub,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 El(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={},p=!1,y=0,x=n?-1:0,F=function(Qt){if(p)return"break";h.forEach(function(yt){var xt=new Xf(yt),Dt=t.findBackwardEdge(i,xt.edges[d[Qt]],xt.edges[d[0]],xt);Dt&&(v[Dt.label]||(v[Dt.label]={projected:[],edgeLabel:Dt.label}),v[Dt.label].projected.push({graphId:i.id,edge:v,preNode:yt}),y=s.dfsEdgeList[d[Qt]].fromNode,p=!0)})},O=d.length-1;O>x;O--){var L=F(O);if(L==="break")break}if(p){var U=t.findMinLabel(v);s.dfsEdgeList.push(new El(g,y,so,U.edgeLabel,so));var R=s.dfsEdgeList.length-1;return t.dfsCode.dfsEdgeList[R]!==s.dfsEdgeList[R]?!1:u(v[U.edgeLabel].projected)}var j={};p=!1;var q=0;h.forEach(function(Rt){var Qt=new Xf(Rt),yt=t.findForwardPureEdges(i,Qt.edges[d[0]],f,Qt);yt.length>0&&(p=!0,q=g,yt.forEach(function(xt){var Dt="".concat(xt.label,"-").concat(a[xt.to].label);j[Dt]||(j[Dt]={projected:[],edgeLabel:xt.label,nodeLabel2:a[xt.to].label}),j[Dt].projected.push({graphId:i.id,edge:xt,preNode:Rt})}))});for(var et=d.length,it=function(Qt){if(p)return"break";var yt=d[Qt];h.forEach(function(xt){var Dt=new Xf(xt),Xt=t.findForwardRmpathEdges(i,Dt.edges[yt],f,Dt);Xt.length>0&&(p=!0,q=s.dfsEdgeList[yt].fromNode,Xt.forEach(function(ne){var le="".concat(ne.label,"-").concat(a[ne.to].label);j[le]||(j[le]={projected:[],edgeLabel:ne.label,nodeLabel2:a[ne.to].label}),j[le].projected.push({graphId:i.id,edge:ne,preNode:xt})}))})},O=0;O<et;O++){var dt=it(O);if(dt==="break")break}if(!p)return!0;var ft=t.findMinLabel(j);s.dfsEdgeList.push(new El(q,g+1,so,ft.edgeLabel,ft.nodeLabel2));var mt=s.dfsEdgeList.length-1;return e.dfsEdgeList[mt]!==s.dfsEdgeList[mt]?!1:u(j["".concat(ft.edgeLabel,"-").concat(ft.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(yh(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 Xf(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 p=e.findForwardPureEdges(u,d.edges[a[0]],o,d);p.forEach(function(x){var F="".concat(s,"-").concat(x.label,"-").concat(h[x.to].label);A[F]||(A[F]={projected:[],fromNodeId:s,edgeLabel:x.label,nodeLabel2:h[x.to].label}),A[F].projected.push({graphId:c.graphId,edge:x,preNode:c})});for(var y=function(F){var O=e.findForwardRmpathEdges(u,d.edges[a[F]],o,d);O.forEach(function(L){var U="".concat(e.dfsCode.dfsEdgeList[a[F]].fromNode,"-").concat(L.label,"-").concat(h[L.to].label);A[U]||(A[U]={projected:[],fromNodeId:e.dfsCode.dfsEdgeList[a[F]].fromNode,edgeLabel:L.label,nodeLabel2:h[L.to].label}),A[U].projected.push({graphId:c.graphId,edge:L,preNode:c})})},f=0;f<a.length;f++)y(f)}}),Object.keys(l).forEach(function(c){var u=l[c],h=u.toNodeId,d=u.edgeLabel;e.dfsCode.dfsEdgeList.push(new El(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 El(h,s+1,so,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(p){var y=f,x=u[p.to].label;if(!e&&y>x){var F=x;x=y,y=F}var O=p.label,L="".concat(l,"-").concat(y,"-").concat(O,"-").concat(x),U="".concat(y,"-").concat(O,"-").concat(x);if(!s[U]){var R=s[U]||0;R++,s[U]=R}A[L]={graphId:l,nodeLabel1:y,edgeLabel:O,nodeLabel2:x}})})}),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 El(0,1,A,l,c)),t.subGraphMining(o),t.dfsCode.dfsEdgeList.pop()})}},r}(),WN=function(t,e,n,i){var a={};return Object.keys(t).forEach(function(s,o){var A=t[s],l=new cb(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},jN=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},hb="cluster",ZN=function(t){var e=t.graphs,n=t.directed,i=n===void 0?!1:n,a=t.nodeLabelProp,s=a===void 0?hb:a,o=t.edgeLabelProp,A=o===void 0?hb:o,l=WN(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 VN(g);v.run();var p=jN(v.frequentSubgraphs,s,A);return p},YN=ZN,db=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(fb(s,o,A,n,i))}),a},fb=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}},XN=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 p=s-u;s=(s+p)/(e-c-1)}}),o},Jf=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(y){return h.has(y)});if(!(!d||!d.length)){for(var f={},g=d.length,v=0;v<g;v++){var p=a[d[v]];i[s].nodes.push(p),f[p.id]=!0}n.edges.forEach(function(y){f[y.source]&&f[y.target]&&i[s].edges.push(y)})}}}}),i},qf=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)},JN=function(t,e,n){for(var i=1/0,a=0,s=function(l){var c=t[l],u=Object.keys(c).sort(function(y,x){return c[y]-c[x]}),h=10,d=[];u.forEach(function(y,x){d[x%h]||(d[x%h]={graphs:[],totalCount:0,aveCount:0}),d[x%h].graphs.push(y),d[x%h].totalCount+=c[y]});var f=0,g=[];d.forEach(function(y){var x=y.totalCount/y.graphs.length;y.aveCount=x,g.push(x);var F=0,O=y.length;y.graphs.forEach(function(L,U){var R=c[L];y.graphs.forEach(function(j,q){U!==q&&(F+=Math.abs(R-c[j]))})}),F/=O*(O-1)/2,f+=F}),f/=d.length;var v=0;g.forEach(function(y,x){g.forEach(function(F,O){x!==O&&(v+=Math.abs(y-F))}),v/=g.length*(g.length-1)/2});var p=v-f;i<p&&(i=p,a=l)},o=0;o<e;o++)s(o);return{structure:n[a],structureCountMap:t[a]}},gb=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}},vb=function(t,e,n){var i={},a={};return t.forEach(function(s,o){i["".concat(DB)]={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}},pb=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},qN=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=Jf(g,s,t,u),f=u[d]}return qf(f,o,A,l)},mb=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}},$N=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=iy(t,n),u=iy(e,n),h=pb(t.nodes,c,n),d=pb(e.nodes,u,n),f=gb(t.nodes,s),g=f.nodeMap,v=f.nodeLabelMap,p=gb(e.nodes,s),y=p.nodeMap,x=p.nodeLabelMap;vb(t.edges,o,g);var F=vb(e.edges,o,y).edgeLabelMap,O=[];u==null||u.forEach(function(cn){O=O.concat(cn)}),a||(a=Math.max.apply(Math,(0,D.ev)((0,D.ev)([],O,!1),[2],!1))),i||(i=a);var L=db(t,c,s,i),U=db(e,u,s,i),R=Math.min(100,l*(l-1)/2),j=XN(i,l,R,L,c),q=Jf(j,L,t),et=10,it=1,dt=1,ft=4,mt={graphs:q,nodeLabelProp:s,edgeLabelProp:o,minSupport:it,minNodeNum:dt,maxNodeNum:ft,directed:n},Rt=YN(mt).slice(0,et),Qt=Rt.length,yt=[];Rt.forEach(function(cn,Fn){yt[Fn]={},Object.keys(q).forEach(function(hn){var Sn=q[hn],Rn=qf(Sn,cn,s,o);yt[Fn][hn]=Rn})});var xt=JN(yt,Qt,Rt),Dt=xt.structure,Xt=xt.structureCountMap,ne=e.nodes[0],le=[],ge=(A=e.nodes[0])===null||A===void 0?void 0:A[s],xe=-1/0;e.nodes.forEach(function(cn){var Fn=cn[s],hn=v[Fn];(hn==null?void 0:hn.length)>xe&&(xe=hn.length,le=hn,ge=Fn,ne=cn)});var Qe={},Pe={},en={},mn={},an={},er={};Object.keys(x).forEach(function(cn,Fn){an[cn]=[],n&&(er[cn]=[]);var hn=-1/0,Sn=x[cn],Rn={};Sn.forEach(function(qe){var Je=d["".concat(ne.id,"-").concat(qe.id)];if(Je&&an[cn].push(Je),hn<Je&&(hn=Je),Rn["".concat(ne.id,"-").concat(qe.id)]={start:0,end:y[qe.id].idx,distance:Je},n){var mr=d["".concat(qe.id,"-").concat(ne.id)];mr&&er[cn].push(mr)}}),an[cn]=an[cn].sort(function(qe,Je){return qe-Je}),n&&(er[cn]=er[cn].sort(function(qe,Je){return qe-Je})),Pe=Jf(Rn,U,e,Pe);var ke=[];if(Object.keys(Rn).forEach(function(qe){if(en[qe]){ke.push(en[qe]);return}var Je=Pe[qe];en[qe]=qf(Je,Dt,s,o),ke.push(en[qe])}),ke=ke.sort(function(qe,Je){return Je-qe}),mn["".concat(ne.id,"-").concat(cn)]=ke,cn!==ge)for(var Tn=(le==null?void 0:le.length)||0,En=function(Je){var mr=le[Je],Wi=L[g[mr.id].idx],yr=Wi.nodeLabelCountMap[cn],zo=x[cn].length;if(!yr||yr.count<zo)return le.splice(Je,1),"continue";for(var Ko=!1,Bi=0;Bi<zo;Bi++)if(yr.dists[Bi]>an[cn][Bi]){Ko=!0;break}if(Ko)return le.splice(Je,1),"continue";var Ea={};Wi.neighbors.forEach(function(Ni){var Ka=h["".concat(mr.id,"-").concat(Ni.id)];Ea["".concat(mr.id,"-").concat(Ni.id)]={start:g[mr.id].idx,end:g[Ni.id].idx,distance:Ka}}),q=Jf(Ea,L,t,q);var Ga=[];Object.keys(Ea).forEach(function(Ni){if(Xt[Ni]){Ga.push(Xt[Ni]);return}var Ka=q[Ni];Xt[Ni]=qf(Ka,Dt,s,o),Ga.push(Xt[Ni])}),Ga=Ga.sort(function(Ni,Ka){return Ka-Ni});for(var za=!1,Bi=0;Bi<zo;Bi++)if(Ga[Bi]<ke[Bi]){za=!0;break}if(za)return le.splice(Je,1),"continue"},ur=Tn-1;ur>=0;ur--)En(ur)});var kn=[];le==null||le.forEach(function(cn){for(var Fn=g[cn.id].idx,hn=fb(t.nodes,c[Fn],Fn,s,a),Sn=hn.neighbors,Rn=Sn.length,ke=!1,Tn=Rn-1;Tn>=0;Tn--){if(Sn.length+1<e.nodes.length){ke=!0;return}var En=Sn[Tn],ur=En[s];if(!x[ur]||!x[ur].length){Sn.splice(Tn,1);continue}if(!an[ur]||!an[ur].length){Sn.splice(Tn,1);continue}var qe="".concat(cn.id,"-").concat(En.id),Je=h[qe],mr=an[ur].length-1,Wi=an[ur][mr];if(Je>Wi){Sn.splice(Tn,1);continue}if(n){var yr="".concat(En.id,"-").concat(cn.id),zo=h[yr];mr=er[ur].length-1;var Ko=er[ur][mr];if(zo>Ko){Sn.splice(Tn,1);continue}}var Bi=Xt[qe]?Xt[qe]:qN(t,cn,En,g,Je,L,Dt,s,o,Xt,q),Ea="".concat(ne.id,"-").concat(ur),Ga=mn[Ea][mn[Ea].length-1];if(Bi<Ga){Sn.splice(Tn,1);continue}var za=mb(Qe,ur,y,x),Ni=za.minPatternNodeLabelDegree,Ka=za.minPatternNodeLabelInDegree,Vo=za.minPatternNodeLabelOutDegree;if(g[En.id].degree<Ni){Sn.splice(Tn,1);continue}}ke||kn.push({nodes:[cn].concat(Sn)})});var Cn=Wf(e,ne.id,!1).length,vr={};n?(Object.keys(Cn).forEach(function(cn){var Fn=y[cn].node[s];vr[Fn]?vr[Fn].push(Cn[cn]):vr[Fn]=[Cn[cn]]}),Object.keys(vr).forEach(function(cn){vr[cn].sort(function(Fn,hn){return Fn-hn})})):vr=an;for(var wa=kn.length,Hn=function(Fn){var hn=kn[Fn],Sn=hn.nodes[0],Rn={},ke={};hn.nodes.forEach(function(hr,Va){ke[hr.id]={idx:Va,node:hr,degree:0,inDegree:0,outDegree:0};var di=hr[s];Rn[di]?Rn[di]++:Rn[di]=1});var Tn=[],En={};t.edges.forEach(function(hr){ke[hr.source]&&ke[hr.target]&&(Tn.push(hr),En[hr[o]]?En[hr[o]]++:En[hr[o]]=1,ke[hr.source].degree++,ke[hr.target].degree++,ke[hr.source].outDegree++,ke[hr.target].inDegree++)});for(var ur=Object.keys(F).length,qe=!1,Je=0;Je<ur;Je++){var mr=Object.keys(F)[Je];if(!En[mr]||En[mr]<F[mr].length){qe=!0;break}}if(qe)return kn.splice(Fn,1),"continue";var Wi=Tn.length;if(Wi<e.edges.length)return kn.splice(Fn,1),"break";for(var yr=!1,zo=function(Va){var di=Tn[Va],uo=di[o],Kl=F[uo];if(!Kl||!Kl.length)return En[uo]--,Kl&&En[uo]<Kl.length?(yr=!0,"break"):(Tn.splice(Va,1),ke[di.source].degree--,ke[di.target].degree--,ke[di.source].outDegree--,ke[di.target].inDegree--,"continue");var NM=ke[di.source].node[s],LM=ke[di.target].node[s],uw=!1;if(Kl.forEach(function(kM){var QM=y[kM.source].node,UM=y[kM.target].node;QM[s]===NM&&UM[s]===LM&&(uw=!0),!n&&QM[s]===LM&&UM[s]===NM&&(uw=!0)}),!uw)return En[uo]--,Kl&&En[uo]<Kl.length?(yr=!0,"break"):(Tn.splice(Va,1),ke[di.source].degree--,ke[di.target].degree--,ke[di.source].outDegree--,ke[di.target].inDegree--,"continue")},Je=Wi-1;Je>=0;Je--){var Ko=zo(Je);if(Ko==="break")break}if(yr)return kn.splice(Fn,1),"continue";hn.edges=Tn;var Bi=Wf(hn,hn.nodes[0].id,!1).length;if(Object.keys(Bi).reverse().forEach(function(hr){if(!(hr===hn.nodes[0].id||yr)){if(Bi[hr]===1/0){var Va=ke[hr].node[s];if(Rn[Va]--,Rn[Va]<x[Va].length){yr=!0;return}var di=hn.nodes.indexOf(ke[hr].node);hn.nodes.splice(di,1),ke[hr]=void 0;return}var uo=g[hr].node[s];if(!vr[uo]||!vr[uo].length||Bi[hr]>vr[uo][vr[uo].length-1]){var Va=ke[hr].node[s];if(Rn[Va]--,Rn[Va]<x[Va].length){yr=!0;return}var di=hn.nodes.indexOf(ke[hr].node);hn.nodes.splice(di,1),ke[hr]=void 0}}}),yr)return kn.splice(Fn,1),"continue";for(var Ea=!0,Ga=0;Ea&&!yr;){Ea=!1;var za=n?ke[Sn.id].degree<y[ne.id].degree||ke[Sn.id].inDegree<y[ne.id].inDegree||ke[Sn.id].outDegree<y[ne.id].outDegree:ke[Sn.id].degree<y[ne.id].degree;if(za){yr=!0;break}if(Rn[Sn[s]]<x[Sn[s]].length){yr=!0;break}for(var Ni=hn.nodes.length,Ka=Ni-1;Ka>=0;Ka--){var Vo=hn.nodes[Ka],OM=ke[Vo.id].degree,N8=ke[Vo.id].inDegree,L8=ke[Vo.id].outDegree,k8=Vo[s],cw=mb(Qe,k8,y,x),IM=cw.minPatternNodeLabelDegree,Q8=cw.minPatternNodeLabelInDegree,U8=cw.minPatternNodeLabelOutDegree,R8=n?OM<IM||N8<Q8||L8<U8:OM<IM;if(R8){if(Rn[Vo[s]]--,Rn[Vo[s]]<x[Vo[s]].length){yr=!0;break}hn.nodes.splice(Ka,1),ke[Vo.id]=void 0,Ea=!0}}if(yr||!Ea&&Ga!==0)break;Wi=Tn.length;for(var ov=Wi-1;ov>=0;ov--){var Wo=Tn[ov];if(!ke[Wo.source]||!ke[Wo.target]){Tn.splice(ov,1);var Av=Wo[o];if(En[Av]--,ke[Wo.source]&&(ke[Wo.source].degree--,ke[Wo.source].outDegree--),ke[Wo.target]&&(ke[Wo.target].degree--,ke[Wo.target].inDegree--),F[Av]&&En[Av]<F[Av].length){yr=!0;break}Ea=!0}}Ga++}if(yr||yr||hn.nodes.length<e.nodes.length||Tn.length<e.edges.length)return kn.splice(Fn,1),"continue"},Bn=wa-1;Bn>=0;Bn--){var Us=Hn(Bn);if(Us==="break")break}for(var hi=kn.length,Vi=function(Fn){var hn=kn[Fn],Sn={};hn.edges.forEach(function(Tn){var En="".concat(Tn.source,"-").concat(Tn.target,"-").concat(Tn.label);Sn[En]?Sn[En]++:Sn[En]=1});for(var Rn=function(En){var ur=kn[En],qe={};ur.edges.forEach(function(mr){var Wi="".concat(mr.source,"-").concat(mr.target,"-").concat(mr.label);qe[Wi]?qe[Wi]++:qe[Wi]=1});var Je=!0;Object.keys(qe).length!==Object.keys(Sn).length?Je=!1:Object.keys(Sn).forEach(function(mr){qe[mr]!==Sn[mr]&&(Je=!1)}),Je&&kn.splice(En,1)},ke=hi-1;ke>Fn;ke--)Rn(ke);hi=kn.length},Bn=0;Bn<=hi-1;Bn++)Vi(Bn);return kn}}},tL=$N,eL=function(){function r(t){t===void 0&&(t=10),this.linkedList=new RB,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}(),nL=eL,rL=VB,nz={getAdjMatrix:Hf,breadthFirstSearch:UI,connectedComponent:_B,getDegree:Xm,getInDegree:DI,getOutDegree:PI,detectCycle:VB,detectDirectedCycle:rL,detectAllCycles:GI,detectAllDirectedCycle:KB,detectAllUndirectedCycle:zB,depthFirstSearch:GB,dijkstra:Wf,findAllPath:gN,findShortestPath:ry,floydWarshall:iy,labelPropagation:mN,louvain:nb,iLouvain:SN,kCore:FN,kMeans:ON,cosineSimilarity:ib,nodesCosineSimilarity:LN,minimumSpanningTree:HN,pageRank:sb,getNeighbors:is,Stack:nL,GADDI:tL};function Nt(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(ko("The datum does not have available id."))}function $f(r){return r.combo}function yb(r,t){const e={nodes:(r.nodes||[]).map(Nt),edges:(r.edges||[]).map(Nt),combos:(r.combos||[]).map(Nt)};return t?Object.values(e).flat():e}const wb=(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(Nt(a),e.direction).length;i.set(Nt(a),s)}),i}case"betweenness":return iL(r,e.directed,e.weightPropertyName);case"closeness":return aL(r,e.directed,e.weightPropertyName);case"eigenvector":return oL(r,e.directed);case"pagerank":return sL(r,e.epsilon,e.linkProb);default:return Eb(r)}},Eb=r=>{var t;const e=new Map;return(t=r.nodes)===null||t===void 0||t.forEach(n=>{e.set(Nt(n),0)}),e},iL=(r,t,e)=>{const n=Eb(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(s=>{if(a!==s){const{allPath:o}=ry(r,Nt(a),Nt(s),t,e),A=o.length;o.flat().forEach(l=>{l!==Nt(a)&&l!==Nt(s)&&n.set(l,n.get(l)+1/A)})}})}),n},aL=(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}=ry(r,Nt(a),Nt(A),t,e);o+=l}return o},0);n.set(Nt(a),1/s)}),n},sL=(r,t,e)=>{var n;const i=new Map,a=sb(r,t,e);return(n=r.nodes)===null||n===void 0||n.forEach(s=>{i.set(Nt(s),a[Nt(s)])}),i},oL=(r,t)=>{const{nodes:e=[]}=r,n=AL(r,t),i=lL(n,e.length),a=new Map;return e.forEach((s,o)=>{a.set(Nt(s),i[o])}),a},AL=(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=>Nt(l)===a),A=e.findIndex(l=>Nt(l)===s);t?i[o][A]=1:(i[o][A]=1,i[A][o]=1)}),i},lL=(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 BA(r,t,e,n=Pr){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 Bl(r,t,e){const n=i=>{e&&!e(i)||(i.style.visibility=t)};r.forEach(i=>{n(i)})}function cL(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 oy{constructor(t){this.extensions=[],this.extensionMap={},this.context=t}setExtensions(t){const e=cL(this.context.graph,this.category,t),{enter:n,update:i,exit:a,keep:s}=BA(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=Lo(e,i);if(!a)return va.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 Ay{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 Ra extends Ay{}class tg extends Ra{constructor(t,e){super(t,Object.assign({},tg.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(EA(o,this.options.padding))):a.hide.push(s)}),a},this.hideLabelIfExceedViewport=(n,i)=>{const{exit:a}=BA(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=wb(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(Vt(i))return n.sort((g,v)=>i(A.getElementDataById(g.id),A.getElementDataById(v.id)));const{node:l=[],edge:c=[],combo:u=[]}=Pf(n,g=>g.type),h=Vt(s)?u.sort((g,v)=>s(...A.getComboData([g.id,v.id]))):u,d=Vt(a)?l.sort((g,v)=>a(...A.getNodeData([g.id,v.id]))):this.sortNodesByCentrality(l,a),f=Vt(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&&Bl(i,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const i=n.getShape("label");i&&Bl(i,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=kB(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 Vt(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}tg.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var uL=function(r){if(!zm(r)||!Md(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},_c=uL,hL=5;function dL(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 Bb(r,t,e,n){e=e||0,n=n||hL;for(var i in t)if(dL(t,i)){var a=t[i];a!==null&&_c(a)?(_c(r[i])||(r[i]={}),e<n?Bb(r[i],a,e+1,n):r[i]=t[i]):Qi(a)?(r[i]=[],r[i]=r[i].concat(a)):a!==void 0&&(r[i]=a)}}var fL=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)Bb(r,t[n]);return r},Si=fL;const bb=[0,0,0];function $e(r,t){return r.map((e,n)=>e+t[n])}function tr(r,t){return r.map((e,n)=>e-t[n])}function Ss(r,t){return typeof t=="number"?r.map(e=>e*t):r.map((e,n)=>e*t[n])}function Ms(r,t){return typeof t=="number"?r.map(e=>e/t):r.map((e,n)=>e/t[n])}function gL(r,t){return r.reduce((e,n,i)=>e+n*t[i],0)}function vL(r,t){const e=wh(r),n=wh(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 bA(r,t){return r.map(e=>e*t)}function cr(r,t){return Math.sqrt(r.reduce((e,n,i)=>e+Math.pow(n-t[i]||0,2),0))}function eg(r,t){return r.reduce((e,n,i)=>e+Math.abs(n-t[i]),0)}function Qo(r){const t=r.reduce((e,n)=>e+Math.pow(n,2),0);return r.map(e=>e/Math.sqrt(t))}function ly(r,t,e=!1){const n=r[0]*t[1]-r[1]*t[0];let i=Math.acos(Ss(r,t).reduce((a,s)=>a+s,0)/(cr(r,bb)*cr(t,bb)));return e&&n<0&&(i=2*Math.PI-i),i}function rz(r,t){return r.every((e,n)=>e===t[n])}function ng(r,t=!0){return t?[-r[1],r[0]]:[r[1],-r[0]]}function cy(r,t){return r.map(e=>e%t)}function bl(r){return[r[0],r[1]]}function wh(r){return EI(r)?[r[0],r[1],0]:r}function xb(r){const[t,e]=r;return!t&&!e?0:Math.atan2(e,t)}function Cb(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 Sb(r,t){const[e,n]=r,[i,a]=t,s=tr(e,n),o=tr(i,a);return vL(s,o).every(A=>A===0)}function uy(r,t,e=!1){if(Sb(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&&(!ro(o,0,1)||!ro(A,0,1))))return[n[0]+o*(i[0]-n[0]),n[1]+o*(i[1]-n[1])]}function Mb(r){if(Array.isArray(r))return ro(r[0],0,1)&&ro(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 li(r){const{x:t=0,y:e=0,z:n=0}=r.style||{};return[+t,+e,+n]}function pL(r){const{x:t,y:e,z:n}=r.style||{};return t!==void 0||e!==void 0||n!==void 0}function Fb(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 Uo(r,t="center"){const e=Mb(t);return Fb(r,e)}function iz(r,t){const e=parseAnchor(t);return Fb(r,e)}const az=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 Mi(r){var t;return[r.x,r.y,(t=r.z)!==null&&t!==void 0?t:0]}function Fs(r){var t;return{x:r[0],y:r[1],z:(t=r[2])!==null&&t!==void 0?t:0}}function sz(r){return r.sort((t,e)=>t[0]-e[0]||t[1]-e[1])}function oz(r){const t=new Set;return r.filter(e=>{const n=e.join(",");return t.has(n)?!1:(t.add(n),!0)})}function Eh(r,t=0){return r.map(e=>parseFloat(e.toFixed(t)))}function xA(r,t,e,n=!1){if(Pr(r,t))return r;const i=n?tr(r,t):tr(t,r),a=Qo(i),s=[a[0]*e,a[1]*e];return $e(bl(r),s)}function Tb(r,t){return r[1]===t[1]}function mL(r,t){return r[0]===t[0]}function yL(r,t){return Tb(r,t)||mL(r,t)}function Ob(r,t,e){return Sb([r,t],[t,e])}function Ib(r,t){return[2*t[0]-r[0],2*t[1]-r[1]]}function Nb(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=$e(t,s),o=$e(t,o));const A=i?Ib(r,t):r,l=uy([t,A],[s,o]);if(l)return{point:l,line:[s,o]}}return{point:t,line:void 0}}function wL(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 EL(r,t,e=!1){const n=Uo(t,"center"),i=[Uo(t,"left-top"),Uo(t,"right-top"),Uo(t,"right-bottom"),Uo(t,"left-bottom")];return Nb(r,n,i,!1,e).point}function rg(r,t,e=!1){const n=t.center,i=e?Ib(r,n):r,a=tr(i,t.center),s=Math.atan2(a[1],a[0]);if(isNaN(s))return n;const o=io(t)/2,A=ao(t)/2,l=n[0]+o*Math.cos(s),c=n[1]+A*Math.sin(s);return[l,c]}function BL(r,t){let e=1/0,n=[r[0],t[0]];return r.forEach(i=>{t.forEach(a=>{const s=cr(i,a);s<e&&(e=s,n=[i,a])})}),n}function bL(r,t){let e=1/0,n=[[0,0],[0,0]];return t.forEach(i=>{const a=xL(r,i);a<e&&(e=a,n=i)}),n}function xL(r,t){const e=Lb(r,t);return cr(r,e)}function Lb(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 CL(r){const t=r.reduce((e,n)=>$e(e,n),[0,0]);return Ms(t,r.length)}function hy(r,t=!0){const e=CL(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 kb(r,t){return[r,[r[0],t[1]],t,[t[0],r[1]]]}class _r{constructor(t,e,n){if(this.phase=e,this.pointerByTouch=[],this.initialDistance=null,this.emitter=t,_r.instance)return _r.callbacks[this.phase].push(n),_r.instance;this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.bindEvents(),_r.instance=this,_r.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)){_r.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),_r.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;_r.callbacks.pinchmove.forEach(A=>A(t,{scale:(o-1)*5}))}onPointerUp(t){var e;_r.callbacks.pinchend.forEach(n=>n(t,{scale:0})),_r.isPinching=!1,this.initialDistance=null,this.pointerByTouch=[],(e=_r.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),_r.instance=null}off(t,e){const n=_r.callbacks[t].indexOf(e);n>-1&&_r.callbacks[t].splice(n,1),this.tryDestroy()}tryDestroy(){Object.values(_r.callbacks).every(t=>t.length===0)&&this.destroy()}}_r.isPinching=!1,_r.instance=null,_r.callbacks={pinchstart:[],pinchmove:[],pinchend:[]};const Qb=r=>r.map(t=>gn(t)?t.toLocaleLowerCase():t);class CA{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 _r(this.emitter,"pinchmove",this.boundHandlePinch)),this.map.set(t,e))}unbind(t,e){this.map.forEach((n,i)=>{Pr(i,t)&&(!e||e===n)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(t){const e=Qb(Array.from(this.recordKey)).sort(),n=Qb(t).sort();return Pr(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)&&Pr(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 Bh extends Ra{constructor(t,e){super(t,Si({},Bh.defaultOptions,e)),this.shortcut=new CA(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 Ci({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=ig(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(kb(this.startPoint,this.endPoint))}onPointerUp(t){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=ig(t,this.context.graph),this.updateElementsStates(kb(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[Nt(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}Vt(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=Nt(o);t.getElementVisibility(A)!=="hidden"&&wL(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(Nt(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 Vt(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(No.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(No.CLICK,this.clearStates)}update(t){this.unbindEvents(),this.options=Si(this.options,t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Bh.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 ig=(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]},Ro=.8,xl=["node","edge","combo"];function Cl(r,t,e,n,i=0){n==="TB"&&t(r,i);const a=e(r);if(a)for(const s of a)Cl(s,t,e,n,i+1);n==="BT"&&t(r,i)}function SL(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 Ub(r,t,e,n,i="both"){if(t==="combo"||t==="node")return dy(r,e,n,i);const a=r.getEdgeData(e);if(!a)return[];const s=dy(r,a.source,n-1,i),o=dy(r,a.target,n-1,i);return Array.from(new Set([...s,...o,e]))}function dy(r,t,e,n="both"){const i=new Set,a=new Set,s=new Set;return SL(t,(o,A)=>{A>e||(s.add(o),r.getRelatedEdgesData(o,n).forEach(l=>{const c=Nt(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 fy(r){return r.states||[]}var ag=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 sg extends Ra{constructor(t,e){super(t,Object.assign({},sg.defaultOptions,e)),this.onClickSelect=n=>ag(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=>ag(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 CA(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),xl.forEach(e=>{t.on(`${e}:${Yt.CLICK}`,this.onClickSelect)}),t.on(No.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 Ub(i,n,e.id,typeof a=="function"?a(t):a).filter(s=>s!==e.id)}updateState(t){return ag(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=fy(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(p=>{const y=new Set(o.getElementState(p));y.add(v),y.delete(n),c[p]=Array.from(y)})};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(p=>{c[p]||(c[p]=o.getElementState(p)),c[p].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[Nt(s)]=fy(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=fy(u),d=h.filter(f=>!s.has(f));(t||d.length!==h.length)&&(c[Nt(u)]=d)}),c}clearState(){return ag(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 Vt(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;xl.forEach(e=>{t.off(`${e}:${Yt.CLICK}`,this.onClickSelect)}),t.off(No.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}sg.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function pa(r){var t;return!!(!((t=r.style)===null||t===void 0)&&t.collapsed)}var Fi=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},bh=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},ML=function(r){var t=MB(r);return t.charAt(0).toLowerCase()+t.substring(1)},FL=ML;function xh(r,t){if(!r.startsWith(t))return!1;const e=r[t.length];return e>="A"&&e<="Z"}function Rb(r,t){return`${t}${Rf(r)}`}function Db(r,t,e=!0){if(!t||!xh(r,t))return r;const n=r.slice(t.length);return e?FL(n):n}function Ir(r,t){const e=Object.entries(r).reduce((n,[i,a])=>(i==="className"||i==="class"||xh(i,t)&&Object.assign(n,{[Db(i,t)]:a}),n),{});if("opacity"in r){const n=Rb("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 gy(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 Pb(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 Az(r,t,e){return Object.entries(r).reduce((n,[i,a])=>(xh(i,t)?n[Rb(Db(i,t,!1),e)]=a:n[i]=a,n),{})}function Da(r=0){if(typeof r=="number")return[r,r,r];const[t,e=t,n=t]=r;return[t,e,n]}var TL=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 _b(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 mi(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 OL(r){const{x:t,y:e,z:n,class:i,className:a,transform:s,transformOrigin:o,zIndex:A,visibility:l}=r;return TL(r,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}function IL(r,t){const e=Da(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 Hb(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 NL(r,t){if(!t)return{};const{type:e,color:n,field:i,invert:a}=t,s=A=>{const l=typeof n=="string"?Lo("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=Pf(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[Nt(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(ko(`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 Gb(r){const t=typeof r=="string"?Lo("palette",r):r;if(typeof t!="function")return t}function zb(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 Kb(r,t,e=1,n=!1){const i=n?e:1,a=(r.max[0]-r.min[0])*i;return zb(a,t)}function LL(r,t,e=1){const n=cr(r[0],r[1])*e;return zb(n,t)}var kL={}.toString,QL=function(r){return kL.call(r).replace(/^\[object /,"").replace(/]$/,"")},UL=QL,RL=Object.prototype,DL=function(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||RL;return r===e},PL=DL,_L=Object.prototype.hasOwnProperty;function HL(r){if(Re(r))return!0;if(dh(r))return!r.length;var t=UL(r);if(t==="Map"||t==="Set")return!r.size;if(PL(r))return!Object.keys(r).length;for(var e in r)if(_L.call(r,e))return!1;return!0}var oo=HL;class Ch extends sh{constructor(t){Vb(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"?Lo(fh.SHAPE,e):e;if(!g)throw new Error(ko(`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),Ny(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);Vb(e),NQ(this,e),this.render(e,this),this.setVisibility()}bindEvents(){}getGraphicStyle(t){return OL(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&&(vy(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${Rf(o)}Style`,c=this[l];if(Vt(c)){const u=t.map(d=>c.call(this,Object.assign(Object.assign({},this.attributes),d))),h=A.animate(jm(u),e);h&&(vy(A,h),n.push(h))}});const s=(o,A)=>{if(!oo(o)){const l=`get${Rf(A)}Style`,c=this[l];if(Vt(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(jm(d),e);g&&(vy(f,g),n.push(g))}})}}};this.compositeShapes.forEach(([o,A])=>{const l=gy(this.shapeMap,A);s(l,o)})}}return Wm(n)}getShape(t){return this.shapeMap[t]}setVisibility(){const{visibility:t}=this.attributes;Bl(this,t)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function vy(r,t){t==null||t.finished.then(()=>{const e=r.activeAnimations.findIndex(n=>n===t);e>-1&&r.activeAnimations.splice(e,1)})}function Vb(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=OB(t,e,n,i);a&&(r.transform=a)}return r}var GL=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 Ao extends Ch{constructor(t){super(mi({style:Ao.defaultStyleProps},t))}isTextStyle(t){return xh(t,"label")}isBackgroundStyle(t){return xh(t,"background")}getTextStyle(t){const e=this.getGraphicStyle(t),{padding:n}=e,i=GL(e,["padding"]);return Pb(i,"background")}getBackgroundStyle(t){if(t.background===!1)return!1;const e=this.getGraphicStyle(t),{wordWrap:n,wordWrapWidth:i,padding:a}=e,s=Ir(e,"background"),{min:[o,A],center:[l,c],halfExtents:[u,h]}=this.shapeMap.text.getGeometryBounds(),[d,f,g,v]=Ua(a),p=u*2+v+f,{width:y,height:x}=s;y&&x?Object.assign(s,{x:l-Number(y)/2,y:c-Number(x)/2}):Object.assign(s,{x:o-v,y:A-d,width:n?Math.min(p,i+v+f):p,height:h*2+d+g});const{radius:F}=s;if(typeof F=="string"&&F.endsWith("%")){const O=Number(F.replace("%",""))/100;s.radius=Math.min(+s.width,+s.height)*O}return s}render(t=this.parsedAttributes,e=this){this.upsert("text",ml,this.getTextStyle(t),e),this.upsert("background",Ci,this.getBackgroundStyle(t),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}Ao.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 Hc extends Ch{constructor(t){super(mi({style:Hc.defaultStyleProps},t))}getBadgeStyle(t){return this.getGraphicStyle(t)}render(t=this.parsedAttributes,e=this){this.upsert("label",Ao,this.getBadgeStyle(t),e)}getGeometryBounds(){const t=this.getShape("label");return(t.getShape("background")||t.getShape("text")).getGeometryBounds()}}Hc.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function zL(r,t=!0){const e=[];return r.forEach((n,i)=>{e.push([i===0?"M":"L",...n])}),t&&e.push(["Z"]),e}const Wb={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 KL(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 Wb?n=a:t.unshift(a),i={type:n},Wb[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 VL(r){const t=[];return(typeof r=="string"?KL(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 jb=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,p=u-(d-l)/6,y=h-(f-c)/6;a.push(["C",g,v,p,y,u,h])}return a};function WL(r,t,e,n,i,a,s){const[o,A]=Uo(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=VL(a);if(!c||c.length<=3)return l;const u=c.map((f,g)=>{const v=f,p=c[(g+1)%c.length];return Pr(v,p)?null:[v,p]}).filter(Boolean),h=bL([o,A],u),d=Lb([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 jL=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 Sh extends Ch{constructor(t){super(mi({style:Sh.defaultStyleProps},t))}getLabelStyle(t){if(!t.label||!t.d||t.d.length===0)return!1;const e=Ir(this.getGraphicStyle(t),"label"),{maxWidth:n,offsetX:i,offsetY:a,autoRotate:s,placement:o,closeToPath:A}=e,l=jL(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),c=this.shapeMap.key,u=c==null?void 0:c.getRenderBounds();return Object.assign(WL(u,o,i,a,A,t.d,s),{wordWrapWidth:Kb(u,n)},l)}getKeyStyle(t){return this.getGraphicStyle(t)}render(t,e){this.upsert("key",Pi,this.getKeyStyle(t),e),this.upsert("label",Ao,this.getLabelStyle(t),e)}}Sh.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function ZL(r){const t=[],e=n=>{n!=null&&n.children.length&&n.children.forEach(i=>{t.push(i),e(i)})};return e(r),t}function YL(r){const t=[];let e=r.parentNode;for(;e;)t.push(e),e=e.parentNode;return t}class py extends Ah{constructor(t){super(t),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},Gc=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 Ci({style:o});this.style.clipPath=A}}else e&&(this.style.clipPath=null)}}const my=new WeakMap;let Gc=null;const yy=r=>{if(Gc&&YL(Gc).includes(r)){const t=my.get(r);t?t.includes(Gc)||t.push(Gc):my.set(r,[Gc])}},wy=r=>{const t=my.get(r);t&&t.forEach(e=>e.handleRadius())};class Zb extends Ch{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()?py:ml,this.getIconStyle(t),e)}}class Yb extends Ch{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 og=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 Ts extends Yb{constructor(t){super(mi({style:Ts.defaultStyleProps},t)),this.type="node"}getSize(t=this.attributes){const{size:e}=t;return Da(e)}getKeyStyle(t){const e=this.getGraphicStyle(t);return Object.assign(Pb(e,["label","halo","icon","badge","port"]))}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=Ir(this.getGraphicStyle(t),"label"),{placement:n,maxWidth:i,offsetX:a,offsetY:s}=e,o=og(e,["placement","maxWidth","offsetX","offsetY"]),A=this.getShape("key").getLocalBounds();return Object.assign(Ox(A,n,a,s),{wordWrapWidth:Kb(A,i)},o)}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),{fill:n}=e,i=og(e,["fill"]),a=Ir(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=Ir(this.getGraphicStyle(t),"icon");return Object.assign(IL(t.size,e),e)}getBadgesStyle(t){var e;const n=gy(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=og(t,["badges","badgePalette","opacity"]),l=Gb(s),c=Ir(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=og(t,["placement","offsetX","offsetY"]),o=Ox(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=Ir(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(Mx(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 Ty(XL(this.context,i),n)}getPorts(){return gy(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return EL(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",Zb,n,e),yy(this)}drawBadgeShapes(t,e){const n=this.getBadgesStyle(t);Object.keys(n).forEach(i=>{const a=n[i];this.upsert(`badge-${i}`,Hc,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,eo,a,e)})}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",Ao,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)&&wy(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}Ts.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 XL(r,t){if(!r)return t.getLocalBounds();const e=r.canvas.getLayer(),n=t.cloneNode();Bl(n,"hidden"),e.appendChild(n);const i=n.getLocalBounds();return n.destroy(),i}class Sl extends Ts{constructor(t){super(mi({style:Sl.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",eo,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*Ro;return e?Object.assign({width:i,height:i},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return rg(t,n,e)}}Sl.defaultStyleProps={size:32};class Ag extends Ts{constructor(t){super(t)}get parsedAttributes(){return this.attributes}drawKeyShape(t,e){return this.upsert("key",pl,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 Nb(t,s,a,!0,e).point}}class JL extends Ag{constructor(t){super(t)}getPoints(t){const[e,n]=this.getSize(t);return IQ(e,n)}}var qL=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 Sl{constructor(t){super(mi({style:lg.defaultStyleProps},t))}parseOuterR(){const{size:t}=this.parsedAttributes;return Math.min(...Da(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=Ir(this.getGraphicStyle(t),"donut"),s=Gb(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=qL(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:ek(A,l,c,c+v),fill:f}),g),e),c+=v})}render(t,e=this){super.render(t,e),this.drawDonutShape(t,e)}}lg.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const cg=(r,t,e,n)=>[r+Math.sin(n)*e,t-Math.cos(n)*e],$L=(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"]],tk=(r,t,e,n,i,a)=>{const[s,o]=[i/360*2*Math.PI,a/360*2*Math.PI],A=[cg(r,t,n,s),cg(r,t,e,s),cg(r,t,e,o),cg(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"]]},ek=(r=0,t=0,e,n)=>{const[i,a]=[0,0];return Math.abs(e-n)%360<1e-6?$L(i,a,r,t):tk(i,a,r,t,e,n)};class ug extends Ts{constructor(t){super(mi({style:ug.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",oh,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*Ro;return e?Object.assign({width:a,height:a},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return rg(t,n,e)}}ug.defaultStyleProps={size:[45,35]};class nk extends Ag{constructor(t){super(t)}getOuterR(t){return t.outerR||Math.min(...this.getSize(t))/2}getPoints(t){return LQ(this.getOuterR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getOuterR(t)*Ro;return e?Object.assign({width:n,height:n},e):!1}}function lo(r,t){if(!{}.hasOwnProperty.call(r,t))throw new TypeError("attempted to use private field on non-instance");return r}var rk=0;function ik(r){return"__private_"+rk+++"_"+r}var Hr=ik("renderState"),Xb=function(){function r(t){(0,P.Z)(this,r),this.renderQueue=[],Object.defineProperty(this,Hr,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=$t(),this.dprMatrix=$t(),this.tmpMat4=$t(),this.vec3a=Ot(),this.vec3b=Ot(),this.vec3c=Ot(),this.vec3d=Ot(),this.canvasRendererPluginOptions=t}return(0,N.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(),p=s.width,y=s.height,x=h.getContext();i.clearRect(x,0,0,p*v,y*v,s.background)}),A.hooks.destroy.tap(r.tag,function(){i.renderQueue=[],lo(i,Hr)[Hr]={restoreStack:[],prevObject:null,currentContext:null}});var f=function(){var p,y=h.getContext(),x=h.getDPR(),F=s.width,O=s.height,L=i.canvasRendererPluginOptions,U=L.dirtyObjectNumThreshold,R=L.dirtyObjectRatioThreshold,j=A.getStats(),q=j.total,et=j.rendered,it=et/q;i.clearFullScreen=i.clearFullScreenLastFrame||!((p=d.context.renderingPlugins[1])!==null&&p!==void 0&&p.isFirstTimeRenderingFinished)||A.disableDirtyRectangleRendering()||et>U&&it>R,y&&(typeof y.resetTransform=="function"?y.resetTransform():y.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(y,0,0,F*x,O*x,s.background))},g=function(p,y){for(var x=[p];x.length>0;){var F,O=x.pop();O.isVisible()&&!O.isCulled()&&(u?i.renderDisplayObjectOptimized(O,y,i.context,lo(i,Hr)[Hr],n):i.renderDisplayObject(O,y,i.context,lo(i,Hr)[Hr],n));for(var L=((F=O.sortable)===null||F===void 0||(F=F.sorted)===null||F===void 0?void 0:F.length)>0?O.sortable.sorted:O.childNodes,U=L.length-1;U>=0;U--)x.push(L[U])}};A.hooks.endFrame.tap(r.tag,function(){if(f(),l.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}u=s.renderer.getConfig().enableRenderingOptimization,lo(i,Hr)[Hr]={restoreStack:[],prevObject:null,currentContext:lo(i,Hr)[Hr].currentContext},lo(i,Hr)[Hr].currentContext.clear(),i.clearFullScreenLastFrame=!1;var v=h.getContext(),p=h.getDPR();if(Dn(i.dprMatrix,[p,p,1]),ue(i.vpMatrix,i.dprMatrix,o.getOrthoMatrix()),i.clearFullScreen)u?(v.save(),g(l.root,v),v.restore()):g(l.root,v);else{var y=i.safeMergeAABB(i.mergeDirtyAABBs(i.renderQueue));if(Zn.isEmpty(y)){i.renderQueue=[];return}var x=i.convertAABB2Rect(y),F=x.x,O=x.y,L=x.width,U=x.height,R=me(i.vec3a,[F,O,0],i.vpMatrix),j=me(i.vec3b,[F+L,O,0],i.vpMatrix),q=me(i.vec3c,[F,O+U,0],i.vpMatrix),et=me(i.vec3d,[F+L,O+U,0],i.vpMatrix),it=Math.min(R[0],j[0],et[0],q[0]),dt=Math.min(R[1],j[1],et[1],q[1]),ft=Math.max(R[0],j[0],et[0],q[0]),mt=Math.max(R[1],j[1],et[1],q[1]),Rt=Math.floor(it),Qt=Math.floor(dt),yt=Math.ceil(ft-it),xt=Math.ceil(mt-dt);v.save(),i.clearRect(v,Rt,Qt,yt,xt,s.background),v.beginPath(),v.rect(Rt,Qt,yt,xt),v.clip(),v.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var Dt=s.renderer.getConfig(),Xt=Dt.enableDirtyRectangleRenderingDebug;Xt&&d.dispatchEvent(new Wr(La.DIRTY_RECTANGLE,{dirtyRect:{x:Rt,y:Qt,width:yt,height:xt}}));var ne=y.getMin(),le=(0,H.Z)(ne,2),ge=le[0],xe=le[1],Qe=y.getMax(),Pe=(0,H.Z)(Qe,2),en=Pe[0],mn=Pe[1],an=l.root.ownerDocument.elementsFromBBox(ge,xe,en,mn);an.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,lo(i,Hr)[Hr],n)}),v.restore(),i.renderQueue.forEach(function(er){i.saveDirtyAABB(er)}),i.renderQueue=[]}lo(i,Hr)[Hr].restoreStack.forEach(function(){v.restore()}),lo(i,Hr)[Hr].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===Kt.TEXT?f=g!==Kt.TEXT:o===Kt.IMAGE?f=g!==Kt.IMAGE:f=g===Kt.TEXT||g===Kt.IMAGE}c.applyStyleToContext(n,e,f,a),a.prevObject=e}u&&(n.beginPath(),u(n,e.parsedStyle),o!==Kt.LINE&&o!==Kt.PATH&&o!==Kt.POLYLINE&&n.closePath()),c&&c.drawToContext(n,e,lo(this,Hr)[Hr],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)&pr.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!==Kt.LINE&&o!==Kt.PATH&&o!==Kt.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),Re(l)||(e.lineDashOffset=l),Re(o)||(e.globalAlpha*=o),!Re(a)&&!Array.isArray(a)&&!a.isNone&&(e.strokeStyle=n.attributes.stroke),!Re(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 Zn;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 Zn);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()),ue(this.tmpMat4,i,this.tmpMat4),ue(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(He(this.tmpMat4,n.getWorldTransform()),ue(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 Zn,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}}])}();Xb.tag="CanvasRenderer";function hg(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 dg(r,t,e,n){var i;if(r.type===ws.LinearGradient||r.type===ws.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,z.Z)((0,z.Z)({type:r.type},r.value),{},{min:A,width:s,height:o}),e)}return i}var fg=["shadowBlur","shadowOffsetX","shadowOffsetY"],Jb=["lineCap","lineJoin","miterLimit"],jr={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},qb={};function Sr(r,t,e,n){var i=n.has(t)?n.get(t):jr[t];return i!==e&&(t==="lineDash"?r.setLineDash(e):r[t]=e,n.set(t,e)),i}var ak=function(){function r(t){(0,P.Z)(this,r),this.imagePool=t}return(0,N.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?qb:a.prevObject.parsedStyle,o=n.parsedStyle;(i||o.opacity!==s.opacity)&&Sr(e,"globalAlpha",Re(o.opacity)?jr.globalAlpha:o.opacity,a.currentContext),(i||o.blend!==s.blend)&&Sr(e,"globalCompositeOperation",Re(o.blend)?jr.globalCompositeOperation:o.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(e,n,i,a){var s=i?qb:a.prevObject.parsedStyle,o=n.parsedStyle,A=o.lineWidth,l=A===void 0?jr.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=!Re(o.stroke)&&!Array.isArray(o.stroke)&&!o.stroke.isNone?n.attributes.stroke:jr.strokeStyle;Sr(e,"strokeStyle",h,a.currentContext)}(i||o.lineWidth!==s.lineWidth)&&Sr(e,"lineWidth",Re(o.lineWidth)?jr.lineWidth:o.lineWidth,a.currentContext),(i||o.lineDash!==s.lineDash)&&Sr(e,"lineDash",o.lineDash||jr.lineDash,a.currentContext),(i||o.lineDashOffset!==s.lineDashOffset)&&Sr(e,"lineDashOffset",Re(o.lineDashOffset)?jr.lineDashOffset:o.lineDashOffset,a.currentContext);for(var d=0;d<Jb.length;d++){var f=Jb[d];(i||o[f]!==s[f])&&Sr(e,f,Re(o[f])?jr[f]:o[f],a.currentContext)}}if(c&&(i||n.attributes.fill!==a.prevObject.attributes.fill)){var g=!Re(o.fill)&&!Array.isArray(o.fill)&&!o.fill.isNone?n.attributes.fill:jr.fillStyle;Sr(e,"fillStyle",g,a.currentContext)}}},{key:"applyStyleToContext",value:function(e,n,i,a){var s=n.nodeName;this.applyCommonStyleToContext(e,n,i,a),s===Kt.IMAGE||this.applyStrokeFillStyleToContext(e,n,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(e,n,i,a){var s=n.parsedStyle;if(i){Sr(e,"shadowColor",s.shadowColor.toString(),a.currentContext);for(var o=0;o<fg.length;o++){var A=fg[o];Sr(e,A,s[A]||jr[A],a.currentContext)}}s.filter&&s.filter.length&&Sr(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){Sr(e,"shadowColor",jr.shadowColor,a.currentContext);for(var o=0;o<fg.length;o++){var A=fg[o];Sr(e,A,jr[A],a.currentContext)}}if(i)if(n&&s){var l=e.filter;!Re(l)&&l.indexOf("drop-shadow")>-1&&Sr(e,"filter",l.replace(/drop-shadow\([^)]*\)/,"").trim()||jr.filter,a.currentContext)}else Sr(e,"filter",jr.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=Sr(e,"fillStyle",dg(d,n,e,o.imagePool),i.currentContext);u=u!=null?u:f,c?e.fill(c):e.fill()});else{if(So(l)){var h=hg(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&&Sr(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=Sr(e,"strokeStyle",dg(h,n,e,o.imagePool),i.currentContext);l=l!=null?l:d,e.stroke()});else{if(So(A)){var c=hg(A,n,e,n.ownerDocument.defaultView.context,a,s,this.imagePool);if(c){var u=Sr(e,"strokeStyle",c,i.currentContext);l=l!=null?l:u}}e.stroke()}l!==null&&Sr(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?jr.globalAlpha:c,h=l.fillOpacity,d=h===void 0?jr.fillOpacity:h,f=l.strokeOpacity,g=f===void 0?jr.strokeOpacity:f,v=l.lineWidth,p=v===void 0?jr.lineWidth:v,y=l.fill&&!l.fill.isNone,x=l.stroke&&!l.stroke.isNone&&p>0;if(!(!y&&!x)){var F=!Re(l.shadowColor)&&l.shadowBlur>0,O=l.shadowType==="inner",L=((o=l.fill)===null||o===void 0?void 0:o.alpha)===0,U=!!(l.filter&&l.filter.length),R=F&&x&&(A===Kt.PATH||A===Kt.LINE||A===Kt.POLYLINE||L||O),j=null;if(y){R||this.applyShadowAndFilterStyleToContext(e,n,F,i);var q=u*d;j=Sr(e,"globalAlpha",q,i.currentContext),this.fillToContext(e,n,i,a,s),R||this.clearShadowAndFilterStyleForContext(e,F,U,i)}if(x){var et=!1,it=u*g,dt=Sr(e,"globalAlpha",it,i.currentContext);if(j=y?j:dt,R&&(this.applyShadowAndFilterStyleToContext(e,n,F,i),et=!0,O)){var ft=e.globalCompositeOperation;e.globalCompositeOperation="source-atop",this.strokeToContext(e,n,i,a,s),e.globalCompositeOperation=ft,this.clearShadowAndFilterStyleForContext(e,F,U,i,!0)}this.strokeToContext(e,n,i,a,s),et&&this.clearShadowAndFilterStyleForContext(e,F,U,i)}j!==null&&Sr(e,"globalAlpha",j,i.currentContext)}}}])}(),Os=function(r){function t(){return(0,P.Z)(this,t),(0,K.Z)(this,t,arguments)}return(0,_.Z)(t,r),(0,N.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,p=v===void 0?1:v,y=i.lineWidth,x=y===void 0?1:y,F=i.lineCap,O=i.lineJoin,L=i.shadowType,U=i.shadowColor,R=i.shadowBlur,j=i.filter,q=i.miterLimit,et=l&&!l.isNone,it=g&&!g.isNone&&x>0,dt=(l==null?void 0:l.alpha)===0,ft=!!(j&&j.length),mt=!Re(U)&&R>0,Rt=a.nodeName,Qt=L==="inner",yt=it&&mt&&(Rt===Kt.PATH||Rt===Kt.LINE||Rt===Kt.POLYLINE||dt||Qt);et&&(n.globalAlpha=h*f,yt||gg(a,n,mt),$b(n,a,l,c,s,o,A,this.imagePool),yt||this.clearShadowAndFilter(n,ft,mt)),it&&(n.globalAlpha=h*p,n.lineWidth=x,Re(q)||(n.miterLimit=q),Re(F)||(n.lineCap=F),Re(O)||(n.lineJoin=O),yt&&(Qt&&(n.globalCompositeOperation="source-atop"),gg(a,n,!0),Qt&&(Ey(n,a,g,s,o,A,this.imagePool),n.globalCompositeOperation=jr.globalCompositeOperation,this.clearShadowAndFilter(n,ft,!0))),Ey(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;!Re(s)&&s.indexOf("drop-shadow")>-1&&(n.filter=s.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(ak);function gg(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 $b(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=dg(l,t,r,o),A||(n?r.fill(n):r.fill())}):(So(e)&&(r.fillStyle=hg(e,t,r,i,a,s,o)),A||(n?r.fill(n):r.fill()))}function Ey(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=dg(A,t,r,s),o||r.stroke()}):(So(e)&&(r.strokeStyle=hg(e,t,r,n,i,a,s)),o||r.stroke())}function sk(r,t){var e=(0,H.Z)(r,4),n=e[0],i=e[1],a=e[2],s=e[3],o=(0,H.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 ok(r,t){var e=me(Ot(),[r[0],r[1],0],t),n=me(Ot(),[r[0]+r[2],r[1],0],t),i=me(Ot(),[r[0],r[1]+r[3],0],t),a=me(Ot(),[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 tx=function(r){function t(){return(0,P.Z)(this,t),(0,K.Z)(this,t,arguments)}return(0,_.Z)(t,r),(0,N.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,p=h.e,y=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(mt){console.error(mt)});return}for(var x=[u[0]/l[2],u[1]/l[3]],F=[A.tileSize[0]/x[0],A.tileSize[1]/x[1]],O=[Math.floor((c[0]-l[0])/F[0]),Math.ceil((c[0]+c[2]-l[0])/F[0])],L=O[0],U=O[1],R=[Math.floor((c[1]-l[1])/F[1]),Math.ceil((c[1]+c[3]-l[1])/F[1])],j=R[0],q=R[1],et=j;et<=q;et++)for(var it=L;it<=U;it++){var dt=A.tiles[et][it];if(dt){var ft=[Math.floor(l[0]+dt.tileX*F[0]),Math.floor(l[1]+dt.tileY*F[1]),Math.ceil(F[0]),Math.ceil(F[1])];n.drawImage(dt.data,ft[0],ft[1],ft[2],ft[3])}}n.setTransform(d,f,g,v,p,y)}},{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,p=c,y=u;if(v){p||(p=v.width),y||(y=v.height);var x=!Re(d)&&f>0;gg(a,n,x);try{var F=a.ownerDocument.defaultView.getContextService().getDomElement(),O=F.width,L=F.height,U=n.getTransform(),R=U.a,j=U.b,q=U.c,et=U.d,it=U.e,dt=U.f,ft=je(R,q,0,0,j,et,0,0,0,0,1,0,it,dt,0,1),mt=ok([o,l,p,y],ft),Rt=sk([0,0,O,L],mt);if(!Rt)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){t.renderFull(n,i,a,{image:v,drawRect:[o,l,p,y]});return}var Qt=mt[2]/g.size[0];if(Qt<(g.downSamplingRate||.5)){this.renderDownSampled(n,i,a,{src:h,imageCache:g,drawRect:[o,l,p,y]});return}if(!ImagePool.isSupportTile){t.renderFull(n,i,a,{image:v,drawRect:[o,l,p,y]});return}this.renderTile(n,i,a,{src:h,imageCache:g,imageRect:mt,drawRect:Rt})}catch(yt){}}}},{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]))}}])}(Os),ex=function(r){function t(){return(0,P.Z)(this,t),(0,K.Z)(this,t,arguments)}return(0,_.Z)(t,r),(0,N.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,p=i.miterLimit,y=p===void 0?10:p,x=i.letterSpacing,F=x===void 0?0:x,O=i.stroke,L=i.fill,U=i.fillRule,R=i.fillOpacity,j=R===void 0?1:R,q=i.strokeOpacity,et=q===void 0?1:q,it=i.opacity,dt=it===void 0?1:it,ft=i.metrics,mt=i.x,Rt=mt===void 0?0:mt,Qt=i.y,yt=Qt===void 0?0:Qt,xt=i.dx,Dt=i.dy,Xt=i.shadowColor,ne=i.shadowBlur,le=i.textDecorationLine,ge=ft.font,xe=ft.lines,Qe=ft.height,Pe=ft.lineHeight,en=ft.lineMetrics;n.font=ge,n.lineWidth=c,n.textAlign=h==="middle"?"center":h;var mn=f;mn==="alphabetic"&&(mn="bottom"),n.lineJoin=v,Re(y)||(n.miterLimit=y);var an=yt;f==="middle"?an+=-Qe/2-Pe/2:f==="bottom"||f==="alphabetic"||f==="ideographic"?an+=-Qe:(f==="top"||f==="hanging")&&(an+=-Pe);var er=Rt+(xt||0);an+=Dt||0,xe.length===1&&(mn==="bottom"?(mn="middle",an-=.5*Qe):mn==="top"&&(mn="middle",an+=.5*Qe)),n.textBaseline=mn;var kn=!Re(Xt)&&ne>0;gg(a,n,kn);for(var Cn=0;Cn<xe.length;Cn++){var vr=c/2+er;an+=Pe,!Re(O)&&!O.isNone&&c&&this.drawLetterSpacing(n,a,xe[Cn],en[Cn],h,vr,an,F,L,U,j,O,et,dt,!0,s,o,A),Re(L)||this.drawLetterSpacing(n,a,xe[Cn],en[Cn],h,vr,an,F,L,U,j,O,et,dt,!1,s,o,A)}le&&le!=="none"&&this.drawTextDecorations(n,i,a,xe,Pe,er,yt+(Dt||0),s,o,A)}},{key:"drawLetterSpacing",value:function(n,i,a,s,o,A,l,c,u,h,d,f,g,v,p,y,x,F){if(c===0){p?this.strokeText(n,i,a,A,l,f,g,y,x,F):this.fillText(n,i,a,A,l,u,h,d,v,y,x,F);return}var O=n.textAlign;n.textAlign="left";var L=A;o==="center"||o==="middle"?L=A-s.width/2:(o==="right"||o==="end")&&(L=A-s.width);for(var U=Array.from(a),R=n.measureText(a).width,j=0,q=0;q<U.length;++q){var et=U[q];p?this.strokeText(n,i,et,L,l,f,g,y,x,F):this.fillText(n,i,et,L,l,u,h,d,v,y,x,F),j=n.measureText(a.substring(q+1)).width,L+=R-j+c,R=j}n.textAlign=O}},{key:"fillText",value:function(n,i,a,s,o,A,l,c,u,h,d,f){$b(n,i,A,l,h,d,f,this.imagePool,!0);var g,v=!Re(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){Ey(n,i,A,c,u,h,this.imagePool,!0);var d,f=!Re(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,p=v===void 0?1:v,y=i.textAlign,x=y===void 0?"start":y,F=i.lineWidth,O=F===void 0?1:F,L=i.metrics;if(!(!d||d==="none")){var U=L.lineMetrics,R=d.split(" ");switch(n.lineWidth=p,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,q=i.textBaseline,et=q===void 0?"alphabetic":q;et==="middle"?j+=-L.height/2-o/2:et==="bottom"||et==="alphabetic"||et==="ideographic"?j+=-L.height:(et==="top"||et==="hanging")&&(j+=-o);for(var it=0;it<s.length;it++){j+=o;var dt=U[it];if(dt){var ft=O/2,mt=A,Rt=A+dt.width;x==="center"||x==="middle"?(mt=A-dt.width/2,Rt=A+dt.width/2):(x==="right"||x==="end")&&(mt=A-dt.width,Rt=A),mt+=ft,Rt+=ft;var Qt=(0,Ws.Z)(R),yt;try{for(Qt.s();!(yt=Qt.n()).done;){var xt=yt.value,Dt=j;switch(xt){case"underline":Dt+=2;break;case"overline":Dt-=o-2;break;case"line-through":Dt-=o/2;break;default:continue}g==="wavy"?this.drawWavyLine(n,mt,Rt,Dt):(n.beginPath(),n.moveTo(mt,Dt),n.lineTo(Rt,Dt),n.stroke())}}catch(Xt){Qt.e(Xt)}finally{Qt.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,p=i+(c+1)*A,y=s;n.quadraticCurveTo(g,v,p,y)}n.stroke()}},{key:"drawToContext",value:function(n,i,a,s,o){this.render(n,i.parsedStyle,i,i.ownerDocument.defaultView.context,s,o)}}])}(Os),nx=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),e=(0,K.Z)(this,t),e.name="canvas-renderer",e.options=n,e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(){var n,i=(0,z.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,s=new Os(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,Kt.CIRCLE,s),Kt.ELLIPSE,s),Kt.RECT,s),Kt.IMAGE,new tx(a)),Kt.TEXT,new ex(a)),Kt.LINE,s),Kt.POLYLINE,s),Kt.POLYGON,s),Kt.PATH,s),Kt.GROUP,void 0),(0,we.Z)((0,we.Z)((0,we.Z)(n,Kt.HTML,void 0),Kt.MESH,void 0),Kt.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new Xb(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(ds),lz=Object.freeze({__proto__:null,CircleRenderer:Os,DefaultRenderer:Os,EllipseRenderer:Os,ImageRenderer:tx,LineRenderer:Os,PathRenderer:Os,Plugin:nx,PolygonRenderer:Os,PolylineRenderer:Os,RectRenderer:Os,TextRenderer:ex}),Ak=Ot(),lk=Ot(),ck=Ot(),uk=$t(),rx=function(){function r(){var t=this;(0,P.Z)(this,r),this.isHit=function(e,n,i,a){var s=t.context.pointInPathPickerFactory[e.nodeName];if(s){var o=on(uk,i),A=me(lk,ve(ck,n[0],n[1],0),o);if(s(e,new ai(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,N.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,Xa.Z)((0,ii.Z)().mark(function c(u){return(0,ii.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=ve(Ak,s,o,0),l=e.elementsFromBBox(A[0],A[1],A[0],A[1]),c=[],u=(0,Ws.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=NE(d);if(v){var p=v.parsedStyle.clipPath,y=this.isHit(p,A,p.getWorldTransform(),!0);if(y){if(i)return n.picked=[d],n;c.push(d)}}else{if(i)return n.picked=[d],n;c.push(d)}}}}catch(x){u.e(x)}finally{u.f()}return n.picked=c,n}}])}();rx.tag="CanvasPicker";function hk(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,p=(h+f)/2,y=vi(a,o,t.x,t.y),x=cl(v,l,c),F=(0,H.Z)(x,2),O=F[0],L=F[1];return O&&L||e?y<=A+p:O?y<=A:L?y>=A-p&&y<=A+p:!1}function vg(r,t,e,n){return r/(e*e)+t/(n*n)}function dk(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,p=v===void 0?"auto":v,y=t.x,x=t.y,F=cl(p,c,u),O=(0,H.Z)(F,2),L=O[0],U=O[1],R=(d+g)/2,j=(y-a)*(y-a),q=(x-o)*(x-o);return L&&U||e?vg(j,q,A+R,l+R)<=1:L?vg(j,q,A,l)<=1:U?vg(j,q,A-R,l-R)>=1&&vg(j,q,A+R,l+R)<=1:!1}function Ml(r,t,e,n,i,a){return i>=r&&i<=r+e&&a>=t&&a<=t+n}function fk(r,t,e,n,i,a,s){var o=i/2;return Ml(r-o,t-o,e,i,a,s)||Ml(r+e-o,t-o,i,n,a,s)||Ml(r+o,t+n-o,e,i,a,s)||Ml(r-o,t+o,i,n,a,s)}function pg(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 vi(l.x,l.y,s,o)<=a/2}function SA(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?tl(r,t,e,n,a,s)<=i/2:!1}function ix(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(SA(o,A,l,c,t,e,n))return!0}if(i){var u=r[0],h=r[a-1];if(SA(u[0],u[1],h[0],h[1],t,e,n))return!0}return!1}var gk=1e-6;function By(r){return Math.abs(r)<gk?0:r<0?-1:1}function vk(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 ax(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(vk(s,o,[t,e]))return!0;By(s[1]-e)>0!=By(o[1]-e)>0&&By(t-(e-s[1])*(s[0]-o[0])/(s[1]-o[1])-s[0])<0&&(n=!n)}return n}function sx(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];if(n=ax(a,t,e),n)break}return n}function pk(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=cl(d,f,g),p=(0,H.Z)(v,2),y=p[1];return!y&&!e||!l?!1:SA(i,a,s,o,l+u,t.x,t.y)}function mk(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&&!Ml(h.x-s,h.y-s,h.width+t,h.height+t,e,n)))switch(A.command){case"L":case"Z":if(a=SA(u[0],u[1],l[0],l[1],t,e,n),a)return!0;break;case"Q":var d=Op(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=Pu(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=oc(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,p=0;p<g.length;p+=6){var y=Pu(v[0],v[1],g[p],g[p+1],g[p+2],g[p+3],g[p+4],g[p+5],e,n,i);if(v=[g[p+4],g[p+5]],a=y<=t/2,a)return!0}break}}return a}function yk(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,p=d.hasArc,y=d.polylines,x=d.polygons,F=cl(g,(x==null?void 0:x.length)&&h,u),O=(0,H.Z)(F,2),L=O[0],U=O[1],R=An(r),j=!1;return L||e?(p?j=n(r,t):j=sx(x,t.x,t.y)||sx(y,t.x,t.y),j):((U||e)&&(j=mk(v,A+c,t.x,t.y,R)),j)}function wk(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=cl(h,a,i),f=(0,H.Z)(d,2),g=f[0],v=f[1],p=!1;return(v||e)&&(p=ix(c.points,o+l,t.x,t.y,!0)),!p&&(g||e)&&(p=ax(c.points,t.x,t.y)),p}function Ek(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=cl(c,u,h),f=(0,H.Z)(d,2),g=f[1];return!g&&!e||!a?!1:ix(A.points,a+o,t.x,t.y,!1)}function Bk(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,p=a.width,y=a.height,x=a.pointerEvents,F=x===void 0?"auto":x,O=cl(F,o,A),L=(0,H.Z)(O,2),U=L[0],R=L[1],j=s&&s.some(function(dt){return dt!==0}),q=c+h;if(j){var it=!1;return(R||e)&&(it=bk(f,v,p,y,s.map(function(dt){return dr(dt,0,Math.min(Math.abs(p)/2,Math.abs(y)/2))}),q,t.x,t.y)),!it&&(U||e)&&(it=n(r,t)),it}else{var et=q/2;if(U&&R||e)return Ml(f-et,v-et,p+et,y+et,t.x,t.y);if(U)return Ml(f,v,p,y,t.x,t.y);if(R)return fk(f,v,p,y,q,t.x,t.y)}return!1}function bk(r,t,e,n,i,a,s,o){var A=(0,H.Z)(i,4),l=A[0],c=A[1],u=A[2],h=A[3];return SA(r+l,t,r+e-c,t,a,s,o)||SA(r+e,t+c,r+e,t+n-u,a,s,o)||SA(r+e-u,t+n,r+h,t+n,a,s,o)||SA(r,t+n-h,r,t+l,a,s,o)||pg(r+e-c,t+c,c,1.5*Math.PI,2*Math.PI,a,s,o)||pg(r+e-u,t+n-u,u,0,.5*Math.PI,a,s,o)||pg(r+h,t+n-h,h,.5*Math.PI,Math.PI,a,s,o)||pg(r+l,t+l,l,Math.PI,1.5*Math.PI,a,s,o)}function xk(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),p=a.offscreenCanvasCreator.getOrCreateContext(g,{willReadFrequently:!0});v.width=d,v.height=f,i.defaultStyleRendererFactory[Kt.IMAGE].render(p,(0,z.Z)((0,z.Z)({},r.parsedStyle),{},{x:0,y:0}),r,void 0,void 0,void 0);var y=p.getImageData(t.x-c,t.y-h,1,1).data;return y.every(function(x){return x!==0})}return!0}function Ck(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 ox=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="canvas-picker",e}return(0,_.Z)(t,r),(0,N.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,Kt.CIRCLE,hk),Kt.ELLIPSE,dk),Kt.RECT,Bk),Kt.LINE,pk),Kt.POLYLINE,Ek),Kt.POLYGON,wk),Kt.PATH,yk),Kt.TEXT,Ck),Kt.GROUP,null),Kt.IMAGE,xk),(0,we.Z)((0,we.Z)(n,Kt.HTML,null),Kt.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new rx)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(ds),cz=Object.freeze({__proto__:null,Plugin:ox});function Sk(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 Mk(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 Fk(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&&Ln(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&&Ln(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 Tk(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&&Ln(e)&&i){var v=e.parentNode.getStartTangent(),p=(0,H.Z)(v,2),y=p[0],x=p[1];f=y[0]-x[0],g=y[1]-x[1],d=Math.atan2(g,f),l=Math.cos(d)*(i||0),c=Math.sin(d)*(i||0)}if(n&&Ln(n)&&a){var F=n.parentNode.getEndTangent(),O=(0,H.Z)(F,2),L=O[0],U=O[1];f=L[0]-U[0],g=L[1]-U[1],d=Math.atan2(g,f),u=Math.cos(d)*(a||0),h=Math.sin(d)*(a||0)}for(var R=0;R<o.length;R++){var j=o[R],q=j[0],et=o[R+1],it=R===0&&(l!==0||c!==0),dt=(R===o.length-1||et&&(et[0]==="M"||et[0]==="Z"))&&u!==0&&h!==0,ft=it?[l,c]:[0,0],mt=(0,H.Z)(ft,2),Rt=mt[0],Qt=mt[1],yt=dt?[u,h]:[0,0],xt=(0,H.Z)(yt,2),Dt=xt[0],Xt=xt[1];switch(q){case"M":r.moveTo(j[1]+Rt,j[2]+Qt);break;case"L":r.lineTo(j[1]+Dt,j[2]+Xt);break;case"Q":r.quadraticCurveTo(j[1],j[2],j[3]+Dt,j[4]+Xt);break;case"C":r.bezierCurveTo(j[1],j[2],j[3],j[4],j[5]+Dt,j[6]+Xt);break;case"A":{var ne=A[R].arcParams,le=ne.cx,ge=ne.cy,xe=ne.rx,Qe=ne.ry,Pe=ne.startAngle,en=ne.endAngle,mn=ne.xRotation,an=ne.sweepFlag;if(r.ellipse)r.ellipse(le,ge,xe,Qe,mn,Pe,en,!!(1-an));else{var er=xe>Qe?xe:Qe,kn=xe>Qe?1:xe/Qe,Cn=xe>Qe?Qe/xe:1;r.translate(le,ge),r.rotate(mn),r.scale(kn,Cn),r.arc(0,0,er,Pe,en,!!(1-an)),r.scale(1/kn,1/Cn),r.rotate(-mn),r.translate(-le,-ge)}dt&&r.lineTo(j[6]+u,j[7]+h);break}case"Z":r.closePath();break}}}function Ok(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,p,y;e&&Ln(e)&&i&&(p=s[1][0]-s[0][0],y=s[1][1]-s[0][1],v=Math.atan2(y,p),h=Math.cos(v)*(i||0),d=Math.sin(v)*(i||0)),n&&Ln(n)&&a&&(p=s[o-1][0]-s[0][0],y=s[o-1][1]-s[0][1],v=Math.atan2(y,p),f=Math.cos(v)*(a||0),g=Math.sin(v)*(a||0)),r.moveTo(A+(h||f),l+(d||g));for(var x=1;x<o-1;x++){var F=s[x];r.lineTo(F[0],F[1])}r.lineTo(c,u)}function Ik(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,p,y;e&&Ln(e)&&i&&(p=s[1][0]-s[0][0],y=s[1][1]-s[0][1],v=Math.atan2(y,p),h=Math.cos(v)*(i||0),d=Math.sin(v)*(i||0)),n&&Ln(n)&&a&&(p=s[o-2][0]-s[o-1][0],y=s[o-2][1]-s[o-1][1],v=Math.atan2(y,p),f=Math.cos(v)*(a||0),g=Math.sin(v)*(a||0)),r.moveTo(A+h,l+d);for(var x=1;x<o-1;x++){var F=s[x];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(O){return O!==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(O){return dr(O,0,Math.min(Math.abs(l)/2,Math.abs(c)/2))}),v=(0,H.Z)(g,4),p=v[0],y=v[1],x=v[2],F=v[3];r.moveTo(h*p+n,a),r.lineTo(l-h*y+n,a),y!==0&&r.arc(l-h*y+n,d*y+a,y,-d*Math.PI/2,h>0?0:Math.PI,f),r.lineTo(l+n,c-d*x+a),x!==0&&r.arc(l-h*x+n,c-d*x+a,x,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*p+a),p!==0&&r.arc(h*p+n,d*p+a,p,h>0?Math.PI:0,d>0?Math.PI*1.5:Math.PI/2,f)}}var Ax=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="canvas-path-generator",e}return(0,_.Z)(t,r),(0,N.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,Kt.CIRCLE,Sk),Kt.ELLIPSE,Mk),Kt.RECT,Nk),Kt.LINE,Fk),Kt.POLYLINE,Ik),Kt.POLYGON,Ok),Kt.PATH,Tk),Kt.TEXT,void 0),Kt.GROUP,void 0),Kt.IMAGE,void 0),(0,we.Z)((0,we.Z)((0,we.Z)(n,Kt.HTML,void 0),Kt.MESH,void 0),Kt.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(ds),uz=Object.freeze({__proto__:null,Plugin:Ax}),Lk=function(){function r(t){(0,P.Z)(this,r),this.renderingContext=t.renderingContext,this.canvasConfig=t.config}return(0,N.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,wF(this.$canvas,e,n)),this.renderingContext.renderReasons.add(Qc.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(e){this.$container&&this.$container.style&&(this.$container.style.cursor=e)}},{key:"toDataURL",value:function(){var t=(0,Xa.Z)((0,ii.Z)().mark(function n(){var i,a,s,o=arguments;return(0,ii.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}()}])}(),kk=function(r){function t(){var e;(0,P.Z)(this,t);for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return e=(0,K.Z)(this,t,[].concat(i)),e.name="canvas-context-register",e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(){this.context.ContextService=Lk}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(ds),Mh=function(r){function t(e){var n;return(0,P.Z)(this,t),n=(0,K.Z)(this,t,[e]),n.registerPlugin(new kk),n.registerPlugin(new JT.Plugin),n.registerPlugin(new Ax),n.registerPlugin(new nx),n.registerPlugin(new nO.Plugin),n.registerPlugin(new ox),n.registerPlugin(new tO.Plugin),n}return(0,_.Z)(t,r),(0,N.Z)(t)}(Ip);function Qk(r,t){if(r){var e;if(Qi(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 lx=Qk,Uk=Object.prototype.hasOwnProperty,Fl=function(r,t){if(r===null||!_c(r))return{};var e={};return lx(t,function(n){Uk.call(r,n)&&(e[n]=r[n])}),e},Rk=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 mg extends Ts{constructor(t){super(Object.assign(Object.assign({},t),{style:Object.assign({},mg.defaultStyleProps,t.style)})),this.rootPointerEvent=new uf(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);bh(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=Fl(t,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:i=0}=e,a=Rk(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",Ci,{x:i,y:a,width:s,height:o,opacity:0},e);return this.upsert("key",gl,n,A)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof Mh))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];Ze(a.button)&&(a.button=0),Ze(a.buttons)&&(a.buttons=1),Ze(a.isPrimary)&&(a.isPrimary=t.touches.length===1&&t.type==="touchstart"),Ze(a.width)&&(a.width=a.radiusX||1),Ze(a.height)&&(a.height=a.radiusY||1),Ze(a.tiltX)&&(a.tiltX=0),Ze(a.tiltY)&&(a.tiltY=0),Ze(a.pointerType)&&(a.pointerType="touch"),Ze(a.pointerId)&&(a.pointerId=a.identifier||0),Ze(a.pressure)&&(a.pressure=a.force||.5),Ze(a.twist)&&(a.twist=0),Ze(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=t.type,n.push(a)}else if(e.isMouseEvent(t)){const i=t;Ze(i.isPrimary)&&(i.isPrimary=!0),Ze(i.width)&&(i.width=1),Ze(i.height)&&(i.height=1),Ze(i.tiltX)&&(i.tiltX=0),Ze(i.tiltY)&&(i.tiltY=0),Ze(i.pointerType)&&(i.pointerType="mouse"),Ze(i.pointerId)&&(i.pointerId=1),Ze(i.pressure)&&(i.pressure=.5),Ze(i.twist)&&(i.twist=0),Ze(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(!Re(i)&&!Re(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}`}}mg.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var cx=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 yg extends Ts{constructor(t){super(mi({style:yg.defaultStyleProps},t))}getKeyStyle(t){const[e,n]=this.getSize(t),i=super.getKeyStyle(t),{fillOpacity:a,opacity:s=a}=i,o=cx(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=cx(e,["fill","stroke"]),s=Ir(this.getGraphicStyle(t),"halo"),o=Number(s.lineWidth),[A,l]=$e(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*Ro,height:i*Ro},e):!1}drawKeyShape(t,e){const n=this.upsert("key",py,this.getKeyStyle(t),e);return yy(this),n}drawHaloShape(t,e){this.upsert("halo",Ci,this.getHaloStyle(t),e)}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&wy(this)}}yg.defaultStyleProps={size:32};class Dk extends Ts{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*Ro,height:i*Ro},e):!1}drawKeyShape(t,e){return this.upsert("key",Ci,this.getKeyStyle(t),e)}}class Pk extends Ag{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 MQ(this.getOuterR(t),this.getInnerR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getInnerR(t)*2*Ro;return e?Object.assign({width:n,height:n},e):!1}getPortXY(t,e){const{placement:n="top"}=e,i=this.getShape("key").getLocalBounds(),a=FQ(this.getOuterR(t),this.getInnerR(t));return Ty(i,n,a,!1)}}class wg extends Ag{constructor(t){super(mi({style:wg.defaultStyleProps},t))}getPoints(t){const{direction:e}=t,[n,i]=this.getSize(t);return TQ(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=OQ(s,o,n);return Ty(a,i,A,!1)}getIconStyle(t){const{icon:e,iconText:n,iconSrc:i,direction:a}=t;if(e===!1||oo(n||i))return!1;const s=Ir(this.getGraphicStyle(t),"icon"),o=this.getShape("key").getLocalBounds(),[A,l]=CI(o,a),c=SI(o,a)*2*Ro;return Object.assign({x:A,y:l,width:c,height:c},s)}}wg.defaultStyleProps={size:40,direction:"up"};var ux=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 zc extends Ts{constructor(t){super(mi({style:zc.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]=Ua(e);return $e(Da(n),[o+a,i+s,0])}getCollapsedKeySize(t){return Da(t.collapsedSize)}getExpandedKeySize(t){const e=this.getContentBBox(t);return[io(e),ao(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 Zn,{x:o=0,y:A=0,size:l}=t,[c,u]=Da(l);return s.setMinMax([o-c/2,A-u/2,0],[o+c/2,A+u/2,0]),s}const a=vh(i.map(s=>s.getBounds()));return n?EA(a,n):a}drawCollapsedMarkerShape(t,e){const n=this.getCollapsedMarkerStyle(t);this.upsert("collapsed-marker",Zb,n,e),yy(this)}getCollapsedMarkerStyle(t){if(!t.collapsed||!t.collapsedMarker)return!1;const e=Ir(this.getGraphicStyle(t),"collapsedMarker"),{type:n}=e,i=ux(e,["type"]),a=this.getShape("key"),[s,o]=Uo(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(Nt(a))==="node").length.toString():Vt(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(Nt(A)));if(o.length>0&&o.some(pL)){const A=o.reduce((l,c)=>$e(l,li(c)),[0,0,0]);return Ms(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}}),wy(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=ux(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))})}}zc.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class _k extends zc{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",eo,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&&Ir(n,"collapsed")),{r:i/2})}getCollapsedKeySize(t){const[e,n]=Da(t.collapsedSize),i=Math.max(e,n)/2;return[i*2,i*2,0]}getExpandedKeySize(t){const e=this.getContentBBox(t),[n,i]=yA(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 rg(t,n,e)}}class Hk extends zc{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",Ci,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&&Ir(e,"collapsed")),{width:n,height:i,x:-n/2,y:-i/2})}}var Gk=function(r,t){if(!dh(r))return r;for(var e=[],n=0;n<r.length;n++){var i=r[n];t(i,n)&&e.push(i)}return e},zk=Gk,Kk=function(r,t){return dh(r)?r.indexOf(t)>-1:!1},Vk=Kk,Wk=function(r,t){return t===void 0&&(t=[]),zk(r,function(e){return!Vk(t,e)})},jk=Wk;const Zk={padding:10};function hx(r,t,e,n,i,a){const{padding:s}=Object.assign(Zk,a),o=wA(e,s),A=wA(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],p=yL(g,v);let y=null;if(h===0)if(f===d-1)if(o.intersects(A))y=xy(g,v,o,A);else if(!_f(g,o)&&!_f(v,A)){const x=wl(g,o),F=wl(v,A);y=fx(x,F,ra(x,F)),y.points.unshift(x),y.points.push(F)}else p||(y=Xk(g,v,o,A));else xs(v,o)?y=xy(g,v,o,wA(v,s),c):p||(y=Eg(g,v,o));else f===d-1?xs(g,A)?y=xy(g,v,wA(g,s),A,c):p||(y=gx(g,v,A,c)):p||(y=fx(g,v,c));y?(u.push(...y.points),c=y.direction):c=ra(g,v),f<d-1&&u.push(v)}return u.map(bl)}const Yk={N:"S",S:"N",W:"E",E:"W"},dx={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function ra(r,t){const[e,n]=r,[i,a]=t;return e===i?n>a?"N":"S":n===a?e>i?"W":"E":null}function by(r,t){return t==="N"||t==="S"?ao(r):io(r)}function fx(r,t,e){const n=[r[0],t[1]],i=[t[0],r[1]],a=ra(r,n),s=ra(r,i),o=e?Yk[e]:null,A=a===e||a!==o&&s!==e?n:i;return{points:[A],direction:ra(A,t)}}function Eg(r,t,e){if(_f(r,e)){const n=Fh(r,t,e);return{points:[n],direction:ra(n,t)}}else{const n=wl(r,e),a=["left","right"].includes(ph(r,e))?[t[0],n[1]]:[n[0],t[1]];return{points:[a],direction:ra(a,t)}}}function gx(r,t,e,n){const i=_f(t,e)?t:wl(t,e),a=[[i[0],r[1]],[r[0],i[1]]],s=a.filter(A=>xI(A,e)&&!QB(A,e,!0)),o=s.filter(A=>ra(A,r)!==n);if(o.length>0){const A=o.find(l=>ra(r,l)===n)||o[0];return{points:[A],direction:ra(A,t)}}else{const A=jk(a,s)[0],l=xA(t,A,by(e,n)/2);return{points:[Fh(l,r,e),l],direction:ra(l,t)}}}function Xk(r,t,e,n){let i=Eg(r,t,e);const a=wh(i.points[0]);if(xs(a,n)){i=Eg(t,r,n);const s=wh(i.points[0]);if(xs(s,e)){const o=xA(r,a,by(e,ra(r,a))/2),A=xA(t,s,by(n,ra(t,s))/2),l=[(o[0]+A[0])/2,(o[1]+A[1])/2],c=Eg(r,l,e),u=gx(l,t,n,c.direction);i.points=[c.points[0],u.points[0]],i.direction=u.direction}}return i}function xy(r,t,e,n,i){const s=vh([e,n]),o=cr(t,s.center)>cr(r,s.center),[A,l]=o?[t,r]:[r,t],c=ao(s)+io(s);let u;if(i){const f=[A[0]+c*Math.cos(dx[i]),A[1]+c*Math.sin(dx[i])];u=xA(wl(f,s),f,.01)}else u=xA(wl(A,s),A,-.01);let h=Fh(u,l,s),d=[Eh(u,2),Eh(h,2)];if(Pr(Eh(u),Eh(h))){const f=ly(tr(u,A),[1,0,0])+Math.PI/2;h=[l[0]+c*Math.cos(f),l[1]+c*Math.sin(f),0],h=Eh(xA(wl(h,s),l,-.01),2);const g=Fh(u,h,s);d=[u,g,h]}return{points:o?d.reverse():d,direction:ra(o?u:h,t)}}function Fh(r,t,e){let n=[r[0],t[1]];return xs(n,e)&&(n=[t[0],r[1]]),n}function vx(r,t,e,n,i){let A=typeof t=="number"?t:.5;t==="start"&&(A=0),t==="end"&&(A=.99);const l=Mi(r.getPoint(A)),c=Mi(r.getPoint(A+.01));let u=t==="start"?"left":t==="end"?"right":"center";if(Tb(l,c)||!e){const[p,y]=px(r,A,n,i);return{transform:[["translate",p,y]],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]=px(r,A,n,i,h),v=[["translate",f,g],["rotate",h/Math.PI*180]];return{textAlign:u,transform:v}}function Jk(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 vx(r.key,e,!0,(A?(A/2+o/2)*(t==="suffix"?1:-1):0)+n,i)}function px(r,t,e,n,i){const[a,s]=Mi(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(Pr(r,t))return r;const i=tr(t,r),a=[r[0]+e*i[0],r[1]+e*i[1]],s=Qo(ng(i,!1));return a[0]+=n*s[0],a[1]+=n*s[1],a}function qk(r){return ye(r)?[r,-r]:r}function $k(r){return ye(r)?[r,1-r]:r}function tQ(r,t,e){return[["M",r[0],r[1]],["Q",e[0],e[1],t[0],t[1]]]}function mx(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 Sy(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(!Ob(c,A,u)&&t){const[h,d]=eQ(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 eQ(r,t,e,n){const i=eg(r,t),a=eg(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 nQ=r=>{const t=Math.PI/2,e=ao(r)/2,n=io(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 yx(r,t,e,n,i){const a=wA(r),s=r.getCenter();let o=n&&FA(n),A=i&&FA(i);if(!o||!A){const l=nQ(a),c=l[t][0],u=l[t][1],[h,d]=yA(a),f=Math.max(h,d),g=$e(s,[f*Math.cos(c),f*Math.sin(c),0]),v=$e(s,[f*Math.cos(u),f*Math.sin(u),0]);o=Iy(r,g),A=Iy(r,v),e||([o,A]=[A,o])}return[o,A]}function rQ(r,t,e,n,i,a){const s=r.getPorts()[i||a],o=r.getPorts()[a||i];let[A,l]=yx(r,t,e,s,o);const c=iQ(r,A,l,n);return s&&(A=Oh(s,c[0])),o&&(l=Oh(o,c.at(-1))),mx(A,l,c)}function iQ(r,t,e,n){const i=r.getCenter();if(Pr(t,e)){const a=tr(t,i),s=[n*Math.sign(a[0])||n/2,n*Math.sign(a[1])||-n/2,0];return[$e(t,s),$e(e,Ss(s,[1,-1,1]))]}return[xA(i,t,cr(i,t)+n),xA(i,e,cr(i,e)+n)]}function aQ(r,t,e,n,i,a,s){const o=Oy(r),A=o[a||s],l=o[s||a];let[c,u]=yx(r,e,n,A,l);const h=sQ(r,c,u,i);return A&&(c=Oh(A,h[0])),l&&(u=Oh(l,h.at(-1))),Sy([c,...h,u],t)}function sQ(r,t,e,n){const i=[],a=wA(r);if(Pr(t,e))switch(ph(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=ph(t,a),o=ph(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=Fh(l,c,a);i.push(l,u,c)}}return i}function My(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 wx(r,t){const e=[];let n=r;for(;n;){e.push(n);const i=t(Nt(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(pa);return e[i]||e.at(-1)}return r}function oQ(r,t){return t||(r<4?10:r===4?12:r*2.5)}const AQ=(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"]]},Ex=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",r/2,t/2],["Z"]],lQ=(r,t)=>[["M",-r/2,0],["L",0,-t/2],["L",r/2,0],["L",0,t/2],["Z"]],cQ=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",4*r/5-r/2,0],["L",r/2,t/2],["Z"]],uQ=(r,t)=>[["M",-r/2,-t/2],["L",r/2,-t/2],["L",r/2,t/2],["L",-r/2,t/2],["Z"]],hQ=(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"]]},dQ=(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 Bg=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 MA extends Yb{constructor(t){super(mi({style:MA.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=Bg(e,["loop"]),{sourceNode:a,targetNode:s}=this,A={d:n&&bQ(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=wA(i),s=Math.max(io(a),ao(a)),{placement:o,clockwise:A,dist:l=s}=Ir(this.getGraphicStyle(t),"loop");return rQ(i,o,A,l,e,n)}getEndpoints(t,e=!0,n=[]){const{sourcePort:i,targetPort:a}=t,{sourceNode:s,targetNode:o}=this,[A,l]=CQ(s,o,i,a);if(!e){const d=A?FA(A):s.getCenter(),f=l?FA(l):o.getCenter();return[d,f]}const c=typeof n=="function"?n():n,u=Tx(A||s,c[0]||l||o),h=Tx(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=Ir(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign({},e),n)}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=Ir(this.getGraphicStyle(t),"label"),{placement:n,offsetX:i,offsetY:a,autoRotate:s,maxWidth:o}=e,A=Bg(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),l=vx(this.shapeMap.key,n,s,i,a),c=this.shapeMap.key.getLocalBounds(),u=LL([c.min,c.max],o);return Object.assign({wordWrapWidth:u},l,A)}getBadgeStyle(t){if(t.badge===!1||!t.badgeText)return!1;const e=Ir(t,"badge"),{offsetX:n,offsetY:i,placement:a}=e,s=Bg(e,["offsetX","offsetY","placement"]);return Object.assign(s,Jk(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?Ah: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=Ir(this.getGraphicStyle(t),i),{size:s,type:o}=a,A=Bg(a,["size","type"]),[l,c]=Da(oQ(n.lineWidth,s)),h=(Vt(o)?o:W[o]||Ex)(l,c);return Object.assign(Fl(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",Ao,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",Hc,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))})}}MA.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 Tl extends MA{constructor(t){super(mi({style:Tl.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t),{controlPoints:i,curvePosition:a,curveOffset:s}=t,o=this.getControlPoints(e,n,$k(a),qk(s),i);return mx(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])]}}Tl.defaultStyleProps={curvePosition:.5,curveOffset:20};class bg extends Tl{constructor(t){super(mi({style:bg.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]]]}}bg.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class xg extends Tl{constructor(t){super(mi({style:xg.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=li(this.ref),n=this.sourceNode.getIntersectPoint(e,!0),i=this.targetNode.getIntersectPoint(e);return[n,i]}toRadialCoordinate(t){const e=li(this.ref),n=cr(t,e),i=xb(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)]]}}xg.defaultStyleProps={curvePosition:.5,curveOffset:20};class Cg extends Tl{constructor(t){super(mi({style:Cg.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]]]}}Cg.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class Sg extends MA{constructor(t){super(mi({style:Sg.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t);return[["M",e[0],e[1]],["L",n[0],n[1]]]}}Sg.defaultStyleProps={};const fQ={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:eg},Do=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function Ol(r,t){const e=n=>Math.round(n/t);return ye(r)?e(r):r.map(e)}function gQ(r,t){const e=Math.abs(r-t);return e>Math.PI?2*Math.PI-e:e}function Bx(r,t){const e=t[0]-r[0],n=t[1]-r[1];return!e&&!n?0:Math.atan2(n,e)}function bx(r,t,e,n){const i=Bx(r,t),a=e[Do(r)],o=Bx(a||n,r);return gQ(o,i)}const vQ=(r,t)=>{const{offset:e,gridSize:n}=t,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const s=EA(a.getRenderBounds(),e);for(let o=Ol(s.min[0],n);o<=Ol(s.max[0],n);o+=1)for(let A=Ol(s.min[1],n);A<=Ol(s.max[1],n);A+=1)i[`${o}|||${A}`]=!0}),i};function xx(r,t,e){return Math.min(...t.map(n=>e(r,n)))}function pQ(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 Cx=(r,t,e,n)=>{if(!t)return[r];const{directionMap:i,offset:a}=n,s=EA(t.getRenderBounds(),a),o=Object.keys(i).reduce((A,l)=>{if(e.includes(l)){const c=i[l],[u,h]=yA(s),d=[r[0]+c.stepX*u,r[1]+c.stepY*h],f=MI(s);for(let g=0;g<f.length;g++){const v=uy([r,d],f[g]);v&&QB(v,s)&&A.push(v)}}return A},[]);return xs(r,s)||o.push(r),o.map(A=>Ol(A,n.gridSize))},mQ=(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[Do(l)];for(;c;){const d=c,f=l;bx(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[Do(d)],l=d}const u=i.map(d=>[d[0]*s,d[1]*s]),h=pQ(u,A,eg);return o.unshift(h),o};function yQ(r,t,e,n){const i=bl(r.getCenter()),a=bl(t.getCenter()),s=Object.assign(fQ,n),{gridSize:o}=s,A=s.enableObstacleAvoidance?e:[r,t],l=vQ(A,s),c=Ol(i,o),u=Ol(a,o),h=Cx(i,r,s.startDirections,s),d=Cx(a,t,s.endDirections,s);h.forEach(R=>delete l[Do(R)]),d.forEach(R=>delete l[Do(R)]);const f={},g={},v={},p={},y={},x=new wQ;for(let R=0;R<h.length;R++){const j=h[R],q=Do(j);f[q]=j,p[q]=0,y[q]=xx(j,d,s.distFunc),x.add({id:q,value:y[q]})}const F=d.map(R=>Do(R));let O=s.maximumLoops,L,U=1/0;for(const[R,j]of Object.entries(f))y[R]<=U&&(U=y[R],L=j);for(;Object.keys(f).length>0&&O>0;){const R=x.minId(!1);if(R)L=f[R];else break;const j=Do(L);if(F.includes(j))return mQ(L,v,c,a,h,u,o);delete f[j],x.remove(j),g[j]=!0;for(const q of Object.values(s.directionMap)){const et=$e(L,[q.stepX,q.stepY]),it=Do(et);if(g[it])continue;const dt=bx(L,et,v,c);if(dt>s.maxAllowedDirectionChange||l[it])continue;f[it]||(f[it]=et);const ft=s.penalties[dt],mt=s.distFunc(L,et)+(isNaN(ft)?o:ft),Rt=p[j]+mt,Qt=p[it];Qt&&Rt>=Qt||(v[it]=L,p[it]=Rt,y[it]=Rt+xx(et,d,s.distFunc),x.add({id:it,value:y[it]}))}O-=1}return[]}class wQ{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 Mg extends MA{constructor(t){super(mi({style:Mg.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=yQ(n,i,A,e),o.length||(o=hx(a,s,n,i,t.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(o=hx(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 Sy(e,t.radius)}getLoopPath(t){const{sourcePort:e,targetPort:n,radius:i}=t,a=this.sourceNode,s=wA(a),o=Math.max(io(s),ao(s))/4,{placement:A,clockwise:l,dist:c=o}=Ir(this.getGraphicStyle(t),"loop");return aQ(a,i,A,l,c,e,n)}}Mg.defaultStyleProps={radius:0,controlPoints:[],router:!1};class Fg extends MA{constructor(t){super(mi({style:Fg.defaultStyleProps},t))}getKeyPath(t){const{curvePosition:e,curveOffset:n}=t,[i,a]=this.getEndpoints(t),s=t.controlPoint||Cy(i,a,e,n);return tQ(i,a,s)}}Fg.defaultStyleProps={curvePosition:.5,curveOffset:30};var EQ=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 Th(r){return r instanceof Ts&&r.type==="node"}function Sx(r){return r instanceof MA}function Fy(r){return r instanceof zc}function BQ(r){return Th(r)||Sx(r)||Fy(r)}function bQ(r,t){return!r||!t?!1:r===t}const xQ={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 Ty(r,t,e=xQ,n=!0){const i=[.5,.5],a=gn(t)?Fi(e,t.toLocaleLowerCase(),i):t;if(!n&&gn(t))return a;const[s,o]=a||i;return[r.min[0]+io(r)*s,r.min[1]+ao(r)*o]}function Oy(r){if(!r)return{};const t=r.getPorts();return(r.attributes.ports||[]).forEach((n,i)=>{var a;const{key:s,placement:o}=n;Mx(n)&&(t[a=s||i]||(t[a]=Uo(r.getShape("key").getBounds(),o)))}),t}function Mx(r){const{r:t}=r;return!t||Number(t)===0}function FA(r){return Pc(r)?r:r.getPosition()}function CQ(r,t,e,n){const i=Fx(r,t,e,n),a=Fx(t,r,n,e);return[i,a]}function Fx(r,t,e,n){const i=Oy(r);if(e)return i[e];const a=Object.values(i);if(a.length===0)return;const s=a.map(l=>FA(l)),o=SQ(t,n),[A]=BL(s,o);return a.find(l=>FA(l)===A)}function SQ(r,t){const e=Oy(r);if(t)return[FA(e[t])];const n=Object.values(e);return n.length>0?n.map(i=>FA(i)):[r.getCenter()]}function Tx(r,t){return Fy(r)||Th(r)?Iy(r,t):Oh(r,t)}function Oh(r,t){if(!r||!t)return[0,0,0];if(Pc(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const e=Pc(t)?t:Th(t)?t.getCenter():t.getPosition();return rg(e,r.getBounds())}function Iy(r,t){if(!r||!t)return[0,0,0];const e=Pc(t)?t:Th(t)?t.getCenter():t.getPosition();return r.getIntersectPoint(e)||r.getCenter()}function Ox(r,t="bottom",e=0,n=0,i=!1){const a=t.split("-"),[s,o]=Uo(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 MQ(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 FQ(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 TQ(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 OQ(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 hz(r,t){return[[r/2,-t/2],[r/2,t/2],[-r/2,t/2],[-r/2,-t/2]]}function IQ(r,t){return[[0,-t/2],[r/2,0],[0,t/2],[-r/2,0]]}function Ix(r){return Fi(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=EQ(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 Ny(r,t){"update"in r?r.update(t):r.attr(t)}function LQ(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 kQ(r){bh(r,"__to_be_destroyed__",!0)}function Ih(r){return Fi(r,"__to_be_destroyed__",!1)}var QQ=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 Tg extends Ra{constructor(t,e){super(t,Object.assign({},Tg.defaultOptions,e)),this.onCollapseExpand=n=>QQ(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:i}=n;if(!BQ(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;pa(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 Vt(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Tg.defaultOptions={enable:!0,animation:!0,trigger:Yt.DBLCLICK,align:!0};var Og={},UQ=function(r){return r=r||"g",Og[r]?Og[r]+=1:Og[r]=1,r+Og[r]},Nh=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 TA(r,t){const{data:e,style:n}=r,i=Nh(r,["data","style"]),{data:a,style:s}=t,o=Nh(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 Ly(r){const{data:t,style:e}=r,i=Nh(r,["data","style"]);return t&&(i.data=Object.assign({},t)),e&&(i.style=Object.assign({},e)),i}function dz(r){return!get(r,["nodes","length"])&&!get(r,["edges","length"])&&!get(r,["combos","length"])}function Kc(r={},t={}){const{states:e=[],data:n={},style:i={},children:a=[]}=r,s=Nh(r,["states","data","style","children"]),{states:o=[],data:A={},style:l={},children:c=[]}=t,u=Nh(t,["states","data","style","children"]),h=(f,g)=>f.length!==g.length?!1:f.every((v,p)=>v===g[p]),d=(f,g)=>{const v=Object.keys(f),p=Object.keys(g);return v.length!==p.length?!1:v.every(y=>f[y]===g[y])};return!(!d(s,u)||!h(a,c)||!h(e,o)||!d(n,A)||!d(i,l))}const Nx="__internal_override__";function Lx(r){return r[Nx]!==!1}var Ig=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 RQ="g6-create-edge-assist-edge-id",Ng="g6-create-edge-assist-node-id";class Lg extends Ra{constructor(t,e){super(t,Object.assign({},Lg.defaultOptions,e)),this.drop=n=>Ig(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=>Ig(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:Ng,type:"circle",[Nx]:!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:RQ,source:this.source,target:Ng,style:Object.assign({pointerEvents:"none"},u)}]),yield(s=c.draw({animation:!1}))===null||s===void 0?void 0:s.finished}),this.updateAssistEdge=n=>Ig(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:s}=this.context;a.translateNodeTo(Ng,[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}-${UQ()}`,d=l({id:h,source:this.source,target:u,style:o});d&&(s.addEdgeData([d]),A(d))},this.cancelEdge=()=>Ig(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:i,element:a,batch:s}=this.context;i.removeNodeData([Ng]),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(rs.CLICK,this.handleCreateEdge),t.on(yl.CLICK,this.handleCreateEdge),t.on(No.CLICK,this.cancelEdge),t.on(Df.CLICK,this.cancelEdge)):(t.on(rs.DRAG_START,this.handleCreateEdge),t.on(yl.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 Vt(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;t.off(rs.CLICK,this.handleCreateEdge),t.off(yl.CLICK,this.handleCreateEdge),t.off(No.CLICK,this.cancelEdge),t.off(Df.CLICK,this.cancelEdge),t.off(rs.DRAG_START,this.handleCreateEdge),t.off(yl.DRAG_START,this.handleCreateEdge),t.off(Yt.POINTER_UP,this.drop),t.off(Yt.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}Lg.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};function DQ(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 Lh=DQ,kx=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 Ra{constructor(t,e){super(t,Object.assign({},kg.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||_r.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=Lh(()=>{var n,i;(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},300),this.shortcut=new CA(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 kx(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:n}=this.options,i=n*-1;yield this.translate(Ss(t,i),this.options.animation),this.invokeOnFinish()})}translate(t,e){return kx(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 Cb([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]=Ua(this.options.range),u=[s*o,a*A,s*l,a*c],h=EA(Ym(n.getCanvasCenter()),u),d=tr(n.getViewportCenter(),[t,e,0]);if(!xs(d,h)){const{min:[f,g],max:[v,p]}=h;(d[0]<f&&t>0||d[0]>v&&t<0)&&(t=0),(d[1]<g&&e>0||d[1]>p&&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()}}kg.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var Qx=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 kh extends Ra{constructor(t,e){super(t,Object.assign({},kh.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>Qx(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&&Nt(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 CA(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(yl.DROP,this.onDrop),t.on(No.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 Ms([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||Ih(t.target)||this.context.graph.isCollapsingExpanding||!this.isKeydown())return!1;const{enable:e}=this.options;return Vt(e)?e(t):!!e}clampByRotation([t,e]){const n=this.context.graph.getRotation();return Cb([t,e],n)}moveElement(t,e){return Qx(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=Ir(this.options,"shadow"),n=vh(t.map(l=>this.context.element.getElement(l).getBounds())),[i,a]=n.min;this.shadowOrigin=[i,a];const[s,o]=yA(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 Ci({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(Nt):this.hiddenEdges=Array.from(new Set(this.target.map(i=>n.getRelatedEdgesData(i,t).map(Nt)).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()}}kh.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 PQ="*",_Q=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[PQ]||[],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}(),Qg=_Q;function ky(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 Ug(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)&&Ug(a,t,e,n))return!0;return!1}const Ux=()=>!0;class HQ{constructor(t){wr(this,"graph");wr(this,"nodeFilter");wr(this,"edgeFilter");wr(this,"cacheEnabled");wr(this,"inEdgesMap",new Map);wr(this,"outEdgesMap",new Map);wr(this,"bothEdgesMap",new Map);wr(this,"allNodesMap",new Map);wr(this,"allEdgesMap",new Map);wr(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});wr(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(t=>t.id))});wr(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)})});wr(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||Ux,n=t.edgeFilter||Ux;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];ky([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];Ug(this.getNode(t),new Set,e,i)}}class Gr extends Qg{constructor(e){super();wr(this,"nodeMap",new Map);wr(this,"edgeMap",new Map);wr(this,"inEdgesMap",new Map);wr(this,"outEdgesMap",new Map);wr(this,"bothEdgesMap",new Map);wr(this,"treeIndices",new Map);wr(this,"changes",[]);wr(this,"batchCount",0);wr(this,"onChanged",()=>{});wr(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 Ug(this.getNode(e),new Set,n,a)}bfsTree(e,n,i){const a=s=>this.getChildren(s,i);return ky([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 ky([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 Ug(this.getNode(e),new Set,n,a)}clone(){const e=this.getAllNodes().map(a=>dw(lu({},a),{data:lu({},a.data)})),n=this.getAllEdges().map(a=>dw(lu({},a),{data:lu({},a.data)})),i=new Gr({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 HQ(lu({graph:this},e))}}class Rg{constructor(t,e){this.context=t,this.options=e||{}}}var GQ=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())})},zQ=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 fz(r){const{type:t}=r;return!!(["comboCombined","comboForce"].includes(t)||t==="antv-dagre"&&r.sortByCombo)}function KQ(r){const{type:t}=r;return["compact-box","mindmap","dendrogram","indented"].includes(t)}function gz(r){return isNumber(r.x)&&isNumber(r.y)}function VQ(r){return!Array.isArray(r)&&(r==null?void 0:r.preLayout)}function Dg(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(Mi)}:{})})}),n}function WQ(r,t){class e extends Rg{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 Dg(A)}}}execute(i,a){return GQ(this,void 0,void 0,function*(){return Dg(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions(Si({},this.options,a))))})}transformOptions(i){if(!("onTick"in i))return i;const a=i.onTick;return i.onTick=s=>a(Dg(s)),i}graphData2LayoutModel(i){const{nodes:a=[],edges:s=[],combos:o=[]}=i,A=a.map(d=>{const f=Nt(d),{data:g,style:v,combo:p}=d,y=zQ(d,["data","style","combo"]),x={id:f,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},g),{data:g}),p?{parentId:p}:{}),{style:v}),y)};return v!=null&&v.x&&Object.assign(x.data,{x:v.x}),v!=null&&v.y&&Object.assign(x.data,{y:v.y}),v!=null&&v.z&&Object.assign(x.data,{z:v.z}),x}),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:p}=d;return{id:Nt(d),source:f,target:g,data:Object.assign({},v),style:Object.assign({},p)}}),u=o.map(d=>({id:Nt(d),data:Object.assign({_isCombo:!0},d.data),style:Object.assign({},d.style)})),h=new Gr({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 Qy(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 Rx(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 jQ=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 ZQ extends kh{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):(va.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(t,e){return jQ(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&&Qy(n,"setFixedPosition",t[a],[...$e([+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&&Rx(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:i=0,y:a=0}=n.style||{};e&&Qy(e,"setFixedPosition",Nt(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&&Rx(t,"simulation").alphaTarget(0),!this.options.fixed&&this.context.graph.getNodeData(this.target).forEach(e=>{t&&Qy(t,"setFixedPosition",Nt(e),[null,null,null])})}}var Dx=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 Pg extends Ra{constructor(t,e){super(t,Object.assign({},Pg.defaultOptions,e)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>Dx(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=ZL(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=Nt(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(Nt(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=Nt(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=>Dx(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(oo(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(Nt(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 Vt(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Pg.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 _g extends Ra{constructor(t,e){super(t,Object.assign({},_g.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 CA(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),xl.forEach(e=>{t.on(`${e}:${Yt.CLICK}`,this.focus)})}validate(t){if(this.destroyed||!this.isKeydown())return!1;const{enable:e}=this.options;return Vt(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;xl.forEach(e=>{t.off(`${e}:${Yt.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),this.shortcut.destroy(),super.destroy()}}_g.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0,trigger:[]};class Hg extends Ra{constructor(t,e){super(t,Object.assign({},Hg.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=yb(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(),xl.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?Ub(e,t.targetType,a,typeof n=="function"?n(t):n,i):[a]}validate(t){if(this.destroyed||this.isFrozen||Ih(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return Vt(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;xl.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()}}Hg.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class XQ extends Bh{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=[ig(t,n)]}onPointerMove(t){var e;if(!this.points)return;const{immediately:n,mode:i}=this.options;this.points.push(ig(t,this.context.graph)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",zL(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 Gg extends Ra{constructor(t,e){super(t,Object.assign({},Gg.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):Bl(s,i,a)})},this.filterShapes=(n,i)=>{if(Vt(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=Lh(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 Vt(e)?e(t):!!e}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Gg.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};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 zg extends Ra{constructor(t,e){super(t,Object.assign({},zg.defaultOptions,e)),this.onWheel=n=>Px(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 CA(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=Ss(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]=Ua(this.options.range),u=[s*o,a*A,s*l,a*c],h=EA(Ym(n.getCanvasCenter()),u),d=tr(n.getViewportCenter(),[t,e,0]);if(!xs(d,h)){const{min:[f,g],max:[v,p]}=h;(d[0]<f&&t>0||d[0]>v&&t<0)&&(t=0),(d[1]<g&&e>0||d[1]>p&&e<0)&&(e=0)}return[t,e]}scroll(t,e){return Px(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 Vt(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()}}zg.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var _x=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 Ra{constructor(t,e){super(t,Object.assign({},Kg.defaultOptions,e)),this.zoom=(n,i,a)=>_x(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=Mi(i.viewport));const{sensitivity:A,onFinish:l}=this.options,c=1+dr(n,-50,50)*A/100,u=s.getZoom();yield s.zoomTo(u*c,a,o),l==null||l()}),this.onReset=()=>_x(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 CA(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 Vt(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 Hx(r,t,e,n="height"){const i=r[n],a=t[n];return e==="center"?(i+a)/2:r.height}const Il=Object.assign,JQ={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 Vg{constructor(t,e){if(this.x=0,this.y=0,this.depth=0,this.children=[],this.hgap=0,this.vgap=0,t instanceof Vg||"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 Uy(r,t={},e){t=Il({},JQ,t);const n=new Vg(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 Vg(s[A],t);a.children[A]=l,i.push(l),l.parent=a,l.depth=a.depth+1}}}return n}class Wg{constructor(t,e={}){this.options=e,this.rootNode=Uy(t,e)}execute(){throw new Error("please override this method")}}let qQ=class lv{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=lv.fromNode(i,e);a&&n.push(a)}),e?new lv(t.height,t.width,t.x,n):new lv(t.width,t.height,t.y,n)}};function Gx(r,t,e){e?r.y+=t:r.x+=t,r.children.forEach(n=>{Gx(n,t,e)})}function zx(r,t){let e=t?r.y:r.x;return r.children.forEach(n=>{e=Math.min(zx(n,t),e)}),e}function $Q(r,t){Gx(r,-zx(r,t),t)}function Kx(r,t,e){e?t.y=r.x:t.x=r.x,r.c.forEach((n,i)=>{Kx(n,t.children[i],e)})}function Vx(r,t,e=0){t?(r.x=e,e+=r.width):(r.y=e,e+=r.height),r.children.forEach(n=>{Vx(n,t,e)})}function t3(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],p=v.mod;for(;f!==null&&v!==null;){d&&A(f)>d.low&&(d=d.nxt);const y=g+f.prelim+f.w-(p+v.prelim);y>0&&(p+=y,d&&a(u,h,d.index,y));const x=A(f),F=A(v);x<=F&&(f=o(f),f!==null&&(g+=f.mod)),x>=F&&(v=s(v),v!==null&&(p+=v.mod))}!f&&v?function(y,x,F,O){const L=y.c[0].el;L.tl=F;const U=O-F.mod-y.c[0].msel;L.mod+=U,L.prelim-=U,y.c[0].el=y.c[x].el,y.c[0].msel=y.c[x].msel}(u,h,v,p):f&&!v&&function(y,x,F,O){const L=y.c[x].er;L.tr=F;const U=O-F.mod-y.c[x].mser;L.mod+=U,L.prelim-=U,y.c[x].er=y.c[x-1].er,y.c[x].mser=y.c[x-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,p,y){if(p!==v-1){const x=v-p;g.c[p+1].shift+=y/x,g.c[v].shift-=y/x,g.c[v].change-=y-y/x}}(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}}Vx(r,e);const c=qQ.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 p=0;p<f.cs;p++)g+=f.c[p].shift,v+=g+f.c[p].change,f.c[p].mod+=v}(h);for(let f=0;f<h.cs;f++)u(h.c[f],d)}(c,0),Kx(c,r,e),$Q(r,e)),r}function Wx(r,t){const e=Uy(r.data,t,!0),n=Uy(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 OA=["LR","RL","TB","BT","H","V"],e3=["LR","RL","H"],n3=OA[0];function Ry(r,t,e){const n=t.direction||n3;if(t.isHorizontal=(a=>e3.indexOf(a)>-1)(n),n&&OA.indexOf(n)===-1)throw new TypeError(`Invalid direction: ${n}`);if(n===OA[0])e(r,t);else if(n===OA[1])e(r,t),r.right2left();else if(n===OA[2])e(r,t);else if(n===OA[3])e(r,t),r.bottom2top();else if(n===OA[4]||n===OA[5]){const{left:a,right:s}=Wx(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],p=f[o],y=a[o],x=(g-v)/h*(2*Math.PI-d)+d,F=p-y;f.x=Math.cos(x)*F,f.y=Math.sin(x)*F})}}(r,t),r}class r3 extends Wg{execute(){return Ry(this.rootNode,this.options,t3)}}const i3={};function jx(r,t){const e=Il({},i3,t);return new r3(r,e).execute()}class a3{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 s3={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function Zx(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)=>{Zx(n,t.children[i],e)})}function o3(r,t={}){const e=Il({},s3,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 a3(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),Zx(a,r,e.isHorizontal),r}class A3 extends Wg{execute(){return this.rootNode.width=0,Ry(this.rootNode,this.options,o3)}}const l3={};function Yx(r,t){const e=Il({},l3,t);return new A3(r,e).execute()}function jg(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+Hx(o,s,c),o.parent&&s.parent&&s.parent.id!==o.parent.id){const h=o.parent,d=h.y+Hx(h,s,c);s.y=d>s.y?d:s.y}}else s.y=0})(a,i,t,e,n),i=a})}const Qh=["LR","RL","H"],c3=Qh[0];class u3 extends Wg{execute(){const t=this.options,e=this.rootNode;t.isHorizontal=!0;const{indent:n=20,dropCap:i=!0,direction:a=c3,align:s}=t;if(a&&Qh.indexOf(a)===-1)throw new TypeError(`Invalid direction: ${a}`);if(a===Qh[0])jg(e,n,i,s);else if(a===Qh[1])jg(e,n,i,s),e.right2left();else if(a===Qh[2]){const{left:o,right:A}=Wx(e,t);jg(o,n,i,s),o.right2left(),jg(A,n,i,s);const l=o.getBoundingBox();A.translate(l.width,0),e.x=A.x-e.width/2}return e}}const h3={};function Xx(r,t){const e=Il({},h3,t);return new u3(r,e).execute()}function Jx(r,t){let e=0;return r.children.length?r.children.forEach(n=>{e+=Jx(n,t)}):e=r.height,r._subTreeSep=t.getSubTreeSep(r.data),r.totalHeight=Math.max(r.height,e)+2*r._subTreeSep,r.totalHeight}function qx(r){const t=r.children,e=t.length;if(e){t.forEach(o=>{qx(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 d3={getSubTreeSep:()=>0};function f3(r,t={}){return t=Il({},d3,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,Jx(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}}}}),qx(r),r}class g3 extends Wg{execute(){return Ry(this.rootNode,this.options,f3)}}const v3={};function $x(r,t){const e=Il({},v3,t);return new g3(r,e).execute()}const vz={compactBox:jx,dendrogram:Yx,indented:Xx,mindmap:$x},pz="0.7.0",p3=(r,t)=>{if(r!=="next"&&r!=="prev")return t},tC=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class m3{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 tC(e),e}enqueue(t){const e=this.shortcut;t.prev&&t.next&&tC(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,p3)),n=n==null?void 0:n.prev;return`[${t.join(", ")}]`}}class y3 extends m3{}const w3=()=>1,E3=(r,t)=>{var e;if(r.getAllNodes().length<=1)return[];const n=b3(r,t||w3);return(e=B3(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()},B3=(r,t,e)=>{let n=[];const i=t[t.length-1],a=t[0];let s;for(;r.getAllNodes().length;){for(;s=a.dequeue();)Dy(r,t,e,s);for(;s=i.dequeue();)Dy(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(Dy(r,t,e,s,!0));break}}}return n},Dy=(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,Py(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,Py(t,e,Object.assign({v:u.id},u.data))}),r.removeNode(n.v)),i?o:void 0},b3=(r,t)=>{const e=new Gr;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 y3);const o=n+1;return e.getAllNodes().forEach(A=>{Py(a,o,Object.assign({v:A.id},e.getNode(A.id).data))}),{buckets:a,zeroIdx:o,graph:e}},Py=(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)},x3=(r,t)=>{const n=t==="greedy"?E3(r,(i=>a=>a.data.weight||1)(r)):C3(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)})})},C3=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},S3=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})})}})},M3=(r,t)=>Number(r)-Number(t),Vc=(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},F3=r=>{const t=new Gr;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},eC=r=>{const t=new Gr;return r.getAllNodes().forEach(e=>{r.getChildren(e.id).length||t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{t.addEdge(e)}),t},nC=(r,t)=>r==null?void 0:r.reduce((e,n,i)=>(e[n]=t[i],e),{}),mz=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},yz=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 nC(t.map(n=>n.id),e)},rC=(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}},Uh=r=>{const t=[],e=aC(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)=>M3(r.getNode(i).data.order,r.getNode(a).data.order));return t},T3=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)})},O3=(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)}))}},iC=(r,t,e,n)=>{const i={width:0,height:0};return ye(e)&&ye(n)&&(i.rank=e,i.order=n),Vc(r,"border",i,t)},aC=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},I3=(r,t)=>{const e={lhs:[],rhs:[]};return r==null||r.forEach(n=>{t(n)?e.lhs.push(n):e.rhs.push(n)}),e},_y=(r,t)=>r.reduce((e,n)=>{const i=t(e),a=t(n);return i>a?n:e}),sC=(r,t,e,n,i,a)=>{n.includes(t.id)||(n.push(t.id),e||a.push(t.id),i(t.id).forEach(s=>sC(r,s,e,n,i,a)),e&&a.push(t.id))},oC=(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))sC(r,A,e==="post",o,a,s);else throw new Error(`Graph does not have node: ${A}`)}),s},N3=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)AC(r,"borderLeft","_bl",e,i,a),AC(r,"borderRight","_br",e,i,a)}};r.getRoots().forEach(e=>t(e.id))},AC=(r,t,e,n,i,a)=>{const s={rank:a,borderType:t,width:0,height:0},o=i.data[t][a-1],A=Vc(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}})},L3=(r,t)=>{const e=t.toLowerCase();(e==="lr"||e==="rl")&&lC(r)},k3=(r,t)=>{const e=t.toLowerCase();(e==="bt"||e==="rl")&&Q3(r),(e==="lr"||e==="rl")&&(U3(r),lC(r))},lC=r=>{r.getAllNodes().forEach(t=>{cC(t)}),r.getAllEdges().forEach(t=>{cC(t)})},cC=r=>{const t=r.data.width;r.data.width=r.data.height,r.data.height=t},Q3=r=>{r.getAllNodes().forEach(t=>{Hy(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Hy(n)),t.data.hasOwnProperty("y")&&Hy(t.data)})},Hy=r=>{r!=null&&r.y&&(r.y=-r.y)},U3=r=>{r.getAllNodes().forEach(t=>{Gy(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Gy(n)),t.data.hasOwnProperty("x")&&Gy(t.data)})},Gy=r=>{const t=r.x;r.x=r.y,r.y=t},R3=r=>{const t=Vc(r,"root",{},"_root"),e=D3(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=P3(r)+1;return r.getRoots().forEach(o=>{uC(r,t,a,s,i,e,o.id)}),{nestingRoot:t,nodeRankFactor:a}},uC=(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=iC(r,"_bt"),l=iC(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=>{uC(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]}})},D3=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},P3=r=>{let t=0;return r.getAllEdges().forEach(e=>{t+=e.data.weight}),t},_3=(r,t)=>{t&&r.removeNode(t),r.getAllEdges().forEach(e=>{e.data.nestingEdge&&r.removeEdge(e.id)})},H3="edge",hC="edge-label",G3=(r,t)=>{r.getAllEdges().forEach(e=>z3(r,e,t))},z3=(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=Vc(r,H3,l,"_d"),i===o&&(l.width=t.data.width,l.height=t.data.height,l.dummy=hC,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}})},K3=(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===hC&&(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)})},V3=(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}})},W3=(r,t,e)=>{const n=j3(r),i=new Gr({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},j3=r=>{let t;for(;r.hasNode(t=`_root${Math.random()}`););return t},Z3=(r,t,e)=>{const n=nC(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},dC=(r,t)=>{let e=0;for(let n=1;n<(t==null?void 0:t.length);n+=1)e+=Z3(r,t[n-1],t[n]);return e},fC=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},Y3=(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}}),X3=(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 J3(s)},J3=r=>{var t,e;const n=[],i=A=>l=>{l.merged||(l.barycenter===void 0||A.barycenter===void 0||l.barycenter>=A.barycenter)&&q3(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})},q3=(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 $3=X3;const tU=(r,t,e,n)=>{const i=I3(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(eU(!!t,!!e)),c=gC(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=gC(o,s,c)});const u={vs:o.flat()};return l&&(u.barycenter=A/l,u.weight=l),u},gC=(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},eU=(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},vC=(r,t,e,n,i,a)=>{var s,o,A,l;let c=r.getChildren(t).map(y=>y.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(y=>y!==h&&y!==d));const g=Y3(r,c||[]);g==null||g.forEach(y=>{var x;if(!((x=r.getChildren(y.v))===null||x===void 0)&&x.length){const F=vC(r,y.v,e,n,a);f[y.v]=F,F.hasOwnProperty("barycenter")&&rU(y,F)}});const v=$3(g,e);nU(v,f),(s=v.filter(y=>y.vs.length>0))===null||s===void 0||s.forEach(y=>{const x=r.getNode(y.vs[0]);x&&(y.fixorder=x.data.fixorder,y.order=x.data.order)});const p=tU(v,n,i,a);if(h&&(p.vs=[h,p.vs,d].flat(),!((o=r.getPredecessors(h))===null||o===void 0)&&o.length)){const y=r.getNode(((A=r.getPredecessors(h))===null||A===void 0?void 0:A[0].id)||""),x=r.getNode(((l=r.getPredecessors(d))===null||l===void 0?void 0:l[0].id)||"");p.hasOwnProperty("barycenter")||(p.barycenter=0,p.weight=0),p.barycenter=(p.barycenter*p.weight+y.data.order+x.data.order)/(p.weight+2),p.weight+=2}return p},nU=(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()})},rU=(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)},iU=(r,t)=>{const e=aC(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=pC(r,n,"in"),s=pC(r,i,"out");let o=fC(r);zy(r,o);let A=Number.POSITIVE_INFINITY,l;for(let c=0,u=0;u<4;++c,++u){mC(c%2?a:s,c%4>=2,!1,t),o=Uh(r);const h=dC(r,o);h<A&&(u=0,l=Dc(o),A=h)}o=fC(r),zy(r,o);for(let c=0,u=0;u<4;++c,++u){mC(c%2?a:s,c%4>=2,!0,t),o=Uh(r);const h=dC(r,o);h<A&&(u=0,l=Dc(o),A=h)}zy(r,l)},pC=(r,t,e)=>t.map(n=>W3(r,n,e)),mC=(r,t,e,n)=>{const i=new Gr;r==null||r.forEach(a=>{var s;const o=a.getRoots()[0].id,A=vC(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)}V3(a,i,A.vs)})},zy=(r,t)=>{t==null||t.forEach(e=>{e==null||e.forEach((n,i)=>{r.getNode(n).data.order=i})})},aU=(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))})},sU=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},oU=(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())}},AU=(r,t)=>{const e=sU(r);t.forEach(n=>{var i,a;let s=n,o=r.getNode(s);const A=o.data.originalEdge;if(!A)return;const l=oU(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}})},yC=(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=lU(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(p=>{var y;const x=r.getNode(p.id),F=x.data.order;(F<s||f<F)&&!(x.data.dummy&&(!((y=r.getNode(g))===null||y===void 0)&&y.data.dummy))&&EC(e,p.id,g)})}),o=u+1,s=f)}),a};return t!=null&&t.length&&t.reduce(n),e},wC=(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 p=r.getNode(v.id);p.data.dummy&&(p.data.order<c||p.data.order>u)&&EC(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},lU=(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)},EC=(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},cU=(r,t,e)=>{let n=t,i=e;if(n>i){const a=t;n=i,i=a}return!!r[n]},BC=(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]&&!cU(e,l,f)&&(a[f]=l,a[l]=i[l]=i[f],A=s[f])}}})}),{root:i,align:a}},bC=(r,t,e,n,i,a,s)=>{var o;const A={},l=uU(r,t,e,i,a,s),c=s?"borderLeft":"borderRight",u=(f,g)=>{let v=l.getAllNodes(),p=v.pop();const y={};for(;p;)y[p.id]?f(p.id):(y[p.id]=!0,v.push(p),v=v.concat(g(p.id))),p=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((p,y)=>Math.min(p,(A[y.target]||0)-y.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},uU=(r,t,e,n,i,a)=>{const s=new Gr,o=hU(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},xC=(r,t)=>_y(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=dU(r,s)/2;i=Math.max(o+A,i),a=Math.min(o-A,a)}),i-a});function CC(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 SC=(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},wz=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=buildLayerMatrix(r),s=Object.assign(yC(r,a),wC(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=BC(r,A,s,h),f=bC(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=xC(r,o);return CC(o,l),SC(o,e)},hU=(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},dU=(r,t)=>r.getNode(t).data.width||0,fU=(r,t)=>{const{ranksep:e=0}=t||{},n=Uh(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})},gU=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=Uh(r),s=Object.assign(yC(r,a),wC(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=BC(r,A,s,h),f=bC(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=xC(r,o);return l&&CC(o,l),SC(o,e)},vU=(r,t)=>{var e;const n=eC(r);fU(n,t);const i=gU(n,t);(e=Object.keys(i))===null||e===void 0||e.forEach(a=>{n.getNode(a).data.x=i[a]})},MC=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))},pU=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))})},IA=(r,t)=>r.getNode(t.target).data.rank-r.getNode(t.source).data.rank-t.data.minlen,mU=r=>{const t=new Gr({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;yU(t,r)<n;)i=FC(t,r),a=t.hasNode(i.source)?IA(r,i):-IA(r,i),TC(t,r,a);return t},yU=(r,t)=>{const e=n=>{t.getRelatedEdges(n,"both").forEach(i=>{const a=i.source,s=n===a?i.target:a;!r.hasNode(s)&&!IA(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},wU=r=>{const t=new Gr({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;EU(t,r)<n;)i=FC(t,r),a=t.hasNode(i.source)?IA(r,i):-IA(r,i),TC(t,r,a);return t},EU=(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||!IA(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},FC=(r,t)=>_y(t.getAllEdges(),e=>r.hasNode(e.source)!==r.hasNode(e.target)?IA(t,e):1/0),TC=(r,t,e)=>{r.getAllNodes().forEach(n=>{const i=t.getNode(n.id);i.data.rank||(i.data.rank=0),i.data.rank+=e})},BU=r=>{const t=F3(r);MC(t);const e=mU(t);IC(e),OC(e,t);let n,i;for(;n=CU(e);)i=SU(e,t,n),MU(e,t,n,i)},OC=(r,t)=>{let e=oC(r,r.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(n=>{bU(r,t,n)})},bU=(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=xU(r,t,e)},xU=(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,TU(r,e,c)){const d=r.getRelatedEdges(e,"both").find(f=>f.source===c||f.target===c).data.cutvalue;o+=u?-d:d}}}),o},IC=(r,t=r.getAllNodes()[0].id)=>{NC(r,{},1,t)},NC=(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=NC(r,t,o,l.id,n))}),A.data.low=s,A.data.lim=o++,i?A.data.parent=i:delete A.data.parent,o},CU=r=>r.getAllEdges().find(t=>t.data.cutvalue<0),SU=(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===LC(r.getNode(c.source),o)&&A!==LC(r.getNode(c.target),o));return _y(l,c=>IA(t,c))},MU=(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:{}}),IC(r),OC(r,t),FU(r,t)},FU=(r,t)=>{const e=r.getAllNodes().find(i=>!i.data.parent);let n=oC(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))})},TU=(r,t,e)=>r.getRelatedEdges(t,"both").find(n=>n.source===e||n.target===e),LC=(r,t)=>t.data.low<=r.data.lim&&r.data.lim<=t.data.lim,OU=(r,t)=>{switch(t){case"network-simplex":NU(r);break;case"tight-tree":kC(r);break;case"longest-path":IU(r);break;default:kC(r)}},IU=MC,kC=r=>{pU(r),wU(r)},NU=r=>{BU(r)},LU=(r,t)=>{const{edgeLabelSpace:e,keepNodeOrder:n,prevGraph:i,rankdir:a,ranksep:s}=t;!n&&i&&QU(r,i);const o=HU(r);e&&(t.ranksep=GU(o,{rankdir:a,ranksep:s}));let A;try{A=kU(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 UU(r,o),A},kU=(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;JU(r),x3(r,e);const{nestingRoot:u,nodeRankFactor:h}=R3(r);OU(eC(r),n),zU(r),O3(r,h),_3(r,u),T3(r),KU(r),VU(r);const d=[];G3(r,d),AU(r,d),N3(r),s&&aU(r,a),iU(r,s),qU(r),L3(r,i),vU(r,{align:o,nodesep:A,edgesep:l,ranksep:c}),$U(r),XU(r),K3(r,d),ZU(r),k3(r,i);const{width:f,height:g}=WU(r);return jU(r),YU(r),S3(r),{width:f,height:g}},QU=(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})},UU=(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)})},RU=["width","height","layer","fixorder"],DU={width:0,height:0},PU=["minlen","weight","width","height","labeloffset"],_U={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Ky=["labelpos"],HU=r=>{const t=new Gr({tree:[]});return r.getAllNodes().forEach(e=>{const n=UC(r.getNode(e.id).data),i=Object.assign(Object.assign({},DU),n),a=QC(i,RU);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);Re(s)||(t.hasNode(s.id)||t.addNode(Object.assign({},s)),t.setParent(e.id,s.id))}),r.getAllEdges().forEach(e=>{const n=UC(r.getEdge(e.id).data),i={};Ky==null||Ky.forEach(a=>{n[a]!==void 0&&(i[a]=n[a])}),t.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},_U,QC(n,PU),i)})}),t},GU=(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},zU=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};Vc(r,"edge-proxy",i,"_ep")}})},KU=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},VU=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))})},WU=(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}},jU=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(rC(e.data,i)),t.data.points.push(rC(n.data,a))})},ZU=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}})},YU=r=>{r.getAllEdges().forEach(t=>{var e;t.data.reversed&&((e=t.data.points)===null||e===void 0||e.reverse())})},XU=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)})},JU=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)}})},qU=r=>{const t=Uh(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=>{Vc(r,"selfedge",{width:A.data.width,height:A.data.height,rank:o.data.rank,order:a+ ++n,e:A},"_se")}),delete o.data.selfEdges})})},$U=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}})},QC=(r,t)=>{const e={};return t==null||t.forEach(n=>{r[n]!==void 0&&(e[n]=+r[n])}),e},UC=(r={})=>{const t={};return Object.keys(r).forEach(e=>{t[e.toLowerCase()]=r[e]}),t};function Rh(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 Nl(r,t){let e;return Vt(t)?e=t:ye(t)?e=()=>t:e=()=>r,e}function Vy(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}:Vt(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 Wy=(r,t,e=10)=>{let n;const i=typeof t=="function"?t:()=>t||0;return r?Array.isArray(r)?n=s=>r:Vt(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(...Rh(o))+A}},jy=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=>jy(e))}if(typeof r=="object"){const t={};return Object.keys(r).forEach(e=>{t[e]=jy(r[e])}),t}return r},Pa=(r,t)=>{const e=jy(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},tR={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class eR{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},tR),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,n){return(0,D.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:p,sortByCombo:y,preset:x}=i,F=new Gr({tree:[]}),O=Nl(A||50,c),L=Nl(l||50,u);let U=L,R=O;(o==="LR"||o==="RL")&&(U=O,R=L);const j=Vy(10,a,!1),q=e.getAllNodes(),et=e.getAllEdges();q.forEach(yt=>{const xt=Rh(j(yt)),Dt=R(yt),Xt=U(yt),ne=xt[0]+2*Xt,le=xt[1]+2*Dt,ge=yt.data.layer;ye(ge)?F.addNode({id:yt.id,data:{width:ne,height:le,layer:ge}}):F.addNode({id:yt.id,data:{width:ne,height:le}})}),y&&(F.attachTreeStructure("combo"),q.forEach(yt=>{const{parentId:xt}=yt.data;xt!==void 0&&F.hasNode(xt)&&F.setParent(yt.id,xt,"combo")})),et.forEach(yt=>{F.addEdge({id:yt.id,source:yt.source,target:yt.target,data:{weight:yt.data.weight||1}})});let it;x!=null&&x.length&&(it=new Gr({nodes:x})),LU(F,{prevGraph:it,edgeLabelSpace:h,keepNodeOrder:!!f,nodeOrder:f||[],acyclicer:"greedy",ranker:d,rankdir:o,nodesep:l,align:s});const dt=[0,0];if(g){let yt=1/0,xt=1/0;F.getAllNodes().forEach(Dt=>{yt>Dt.data.x&&(yt=Dt.data.x),xt>Dt.data.y&&(xt=Dt.data.y)}),F.getAllEdges().forEach(Dt=>{var Xt;(Xt=Dt.data.points)===null||Xt===void 0||Xt.forEach(ne=>{yt>ne.x&&(yt=ne.x),xt>ne.y&&(xt=ne.y)})}),dt[0]=g[0]-yt,dt[1]=g[1]-xt}const ft=o==="LR"||o==="RL";if(!p){const yt=new Set,Dt=o==="BT"||o==="RL"?(ge,xe)=>xe-ge:(ge,xe)=>ge-xe;F.getAllNodes().forEach(ge=>{ge.data.x=ge.data.x+dt[0],ge.data.y=ge.data.y+dt[1],yt.add(ft?ge.data.x:ge.data.y)});const Xt=Array.from(yt).sort(Dt),ne=ft?(ge,xe)=>ge.x!==xe.x:(ge,xe)=>ge.y!==xe.y,le=ft?(ge,xe,Qe)=>{const Pe=Math.max(xe.y,Qe.y),en=Math.min(xe.y,Qe.y);return ge.filter(mn=>mn.y<=Pe&&mn.y>=en)}:(ge,xe,Qe)=>{const Pe=Math.max(xe.x,Qe.x),en=Math.min(xe.x,Qe.x);return ge.filter(mn=>mn.x<=Pe&&mn.x>=en)};F.getAllEdges().forEach((ge,xe)=>{var Qe;h&&v&&ge.data.type!=="loop"&&(ge.data.controlPoints=nR((Qe=ge.data.points)===null||Qe===void 0?void 0:Qe.map(({x:Pe,y:en})=>({x:Pe+dt[0],y:en+dt[1]})),F.getNode(ge.source),F.getNode(ge.target),Xt,ft,ne,le))})}let mt=[];mt=F.getAllNodes().map(yt=>Pa(yt));const Rt=F.getAllEdges();return t&&(mt.forEach(yt=>{e.mergeNodeData(yt.id,{x:yt.data.x,y:yt.data.y})}),Rt.forEach(yt=>{e.mergeEdgeData(yt.id,{controlPoints:yt.data.controlPoints})})),{nodes:mt,edges:Rt}})}}const nR=(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],p=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,p))&&o.unshift(p)}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 p=o[o.length-1],y=i?{x:(u+v)/2,y:(p==null?void 0:p.y)||c}:{x:(p==null?void 0:p.x)||A,y:(u+v)/2};(!p||a(p,y))&&o.push(y)}}}}return o},Ll=(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}},rR={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class iR{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},rR),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,n){return(0,D.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(),p=e.getAllEdges(),[y,x,F]=sR(a,s,o),O=v==null?void 0:v.length;if(!O||O===1)return Ll(e,t,F);const L=(c-l)/O;let{radius:U,startRadius:R,endRadius:j}=i;if(f){const ft=Nl(10,f),mt=Vy(10,g);let Rt=-1/0;v.forEach(yt=>{const xt=mt(yt);Rt<xt&&(Rt=xt)});let Qt=0;v.forEach((yt,xt)=>{xt===0?Qt+=Rt||10:Qt+=(ft(yt)||0)+(Rt||10)}),U=Qt/(2*Math.PI)}else!U&&!R&&!j?U=Math.min(x,y)/2:!R&&j?R=j:R&&!j&&(j=R);const q=L*u;let et=[];h==="topology"?et=RC(e,v):h==="topology-directed"?et=RC(e,v,!0):h==="degree"?et=aR(e,v):et=v.map(ft=>Pa(ft));const it=Math.ceil(O/A);for(let ft=0;ft<O;++ft){let mt=U;!mt&&R!==null&&j!==null&&(mt=R+ft*(j-R)/(O-1)),mt||(mt=10+ft*100/(O-1));let Rt=l+ft%it*q+2*Math.PI/A*Math.floor(ft/it);d||(Rt=c-ft%it*q-2*Math.PI/A*Math.floor(ft/it)),et[ft].data.x=F[0]+Math.cos(Rt)*mt,et[ft].data.y=F[1]+Math.sin(Rt)*mt}return t&&et.forEach(ft=>{e.mergeNodeData(ft.id,{x:ft.data.x,y:ft.data.y})}),{nodes:et,edges:p}})}}const RC=(r,t,e=!1)=>{const n=[Pa(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(Pa(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(Pa(d)),i[d.id]=!0,c=!0;break}}let u=0;for(;!c&&(i[t[u].id]||(n.push(Pa(t[u])),i[t[u].id]=!0,c=!0),u++,u!==a););}}),n};function aR(r,t){const e=[];return t.forEach((n,i)=>{e.push(Pa(n))}),e.sort((n,i)=>r.getDegree(n.id,"both")-r.getDegree(i.id,"both")),e}const sR=(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]},Po=Array.isArray,oR={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class Zy{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},oR),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,n){return(0,D.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,p=e.getAllNodes(),y=e.getAllEdges(),x=!s&&typeof window!="undefined"?window.innerWidth:s,F=!o&&typeof window!="undefined"?window.innerHeight:o,O=a||[x/2,F/2];if(!(p!=null&&p.length)||p.length===1)return Ll(e,t,O);const L=[];let U,R=0;Po(g)?U=Math.max(g[0],g[1]):Vt(g)?(U=-1/0,p.forEach(yt=>{const xt=Math.max(...Rh(g(yt)));xt>U&&(U=xt)})):U=g,Po(v)?R=Math.max(v[0],v[1]):ye(v)&&(R=v),p.forEach(yt=>{const xt=Pa(yt);L.push(xt);let Dt=U;const{data:Xt}=xt;Po(Xt.size)?Dt=Math.max(Xt.size[0],Xt.size[1]):ye(Xt.size)?Dt=Xt.size:br(Xt.size)&&(Dt=Math.max(Xt.size.width,Xt.size.height)),U=Math.max(U,Dt),Vt(v)&&(R=Math.max(v(yt),R))});const j={};L.forEach((yt,xt)=>{j[yt.id]=xt});let q=A;(!gn(q)||L[0].data[q]===void 0)&&(q="degree"),q==="degree"?L.sort((yt,xt)=>e.getDegree(xt.id,"both")-e.getDegree(yt.id,"both")):L.sort((yt,xt)=>xt.data[q]-yt.data[q]);const et=L[0],it=(l||(q==="degree"?e.getDegree(et.id,"both"):et.data[q]))/4,dt=[{nodes:[]}];let ft=dt[0];L.forEach(yt=>{if(ft.nodes.length>0){const xt=Math.abs(q==="degree"?e.getDegree(ft.nodes[0].id,"both")-e.getDegree(yt.id,"both"):ft.nodes[0].data[q]-yt.data[q]);it&&xt>=it&&(ft={nodes:[]},dt.push(ft))}ft.nodes.push(yt)});let mt=U+R;if(!d){const yt=dt.length>0&&dt[0].nodes.length>1,Dt=(Math.min(x,F)/2-mt)/(dt.length+(yt?1:0));mt=Math.min(mt,Dt)}let Rt=0;if(dt.forEach(yt=>{const xt=c===void 0?2*Math.PI-2*Math.PI/yt.nodes.length:c;if(yt.dTheta=xt/Math.max(1,yt.nodes.length-1),yt.nodes.length>1&&d){const Dt=Math.cos(yt.dTheta)-Math.cos(0),Xt=Math.sin(yt.dTheta)-Math.sin(0),ne=Math.sqrt(mt*mt/(Dt*Dt+Xt*Xt));Rt=Math.max(ne,Rt)}yt.r=Rt,Rt+=mt}),h){let yt=0,xt=0;for(let Dt=0;Dt<dt.length;Dt++){const ne=(dt[Dt].r||0)-xt;yt=Math.max(yt,ne)}xt=0,dt.forEach((Dt,Xt)=>{Xt===0&&(xt=Dt.r||0),Dt.r=xt,xt+=yt})}return dt.forEach(yt=>{const xt=yt.dTheta||0,Dt=yt.r||0;yt.nodes.forEach((Xt,ne)=>{const le=f+(u?1:-1)*xt*ne;Xt.data.x=O[0]+Dt*Math.cos(le),Xt.data.y=O[1]+Dt*Math.sin(le)})}),t&&L.forEach(yt=>e.mergeNodeData(yt.id,{x:yt.data.x,y:yt.data.y})),{nodes:L,edges:y}})}}function AR(r){const t=+this._x.call(null,r),e=+this._y.call(null,r);return DC(this.cover(t,e),t,e,r)}function DC(r,t,e,n){if(isNaN(t)||isNaN(e))return r;var i,a=r._root,s={data:n},o=r._x0,A=r._y0,l=r._x1,c=r._y1,u,h,d,f,g,v,p,y;if(!a)return r._root=s,r;for(;a.length;)if((g=t>=(u=(o+l)/2))?o=u:l=u,(v=e>=(h=(A+c)/2))?A=h:c=h,i=a,!(a=a[p=v<<1|g]))return i[p]=s,r;if(d=+r._x.call(null,a.data),f=+r._y.call(null,a.data),t===d&&e===f)return s.next=a,i?i[p]=s:r._root=s,r;do i=i?i[p]=new Array(4):r._root=new Array(4),(g=t>=(u=(o+l)/2))?o=u:l=u,(v=e>=(h=(A+c)/2))?A=h:c=h;while((p=v<<1|g)===(y=(f>=h)<<1|d>=u));return i[y]=a,i[p]=s,r}function lR(r){var t,e,n=r.length,i,a,s=new Array(n),o=new Array(n),A=1/0,l=1/0,c=-1/0,u=-1/0;for(e=0;e<n;++e)isNaN(i=+this._x.call(null,t=r[e]))||isNaN(a=+this._y.call(null,t))||(s[e]=i,o[e]=a,i<A&&(A=i),i>c&&(c=i),a<l&&(l=a),a>u&&(u=a));if(A>c||l>u)return this;for(this.cover(A,l).cover(c,u),e=0;e<n;++e)DC(this,s[e],o[e],r[e]);return this}function cR(r,t){if(isNaN(r=+r)||isNaN(t=+t))return this;var e=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(e))i=(e=Math.floor(r))+1,a=(n=Math.floor(t))+1;else{for(var s=i-e||1,o=this._root,A,l;e>r||r>=i||n>t||t>=a;)switch(l=(t<n)<<1|r<e,A=new Array(4),A[l]=o,o=A,s*=2,l){case 0:i=e+s,a=n+s;break;case 1:e=i-s,a=n+s;break;case 2:i=e+s,n=a-s;break;case 3:e=i-s,n=a-s;break}this._root&&this._root.length&&(this._root=o)}return this._x0=e,this._y0=n,this._x1=i,this._y1=a,this}function uR(){var r=[];return this.visit(function(t){if(!t.length)do r.push(t.data);while(t=t.next)}),r}function hR(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function ia(r,t,e,n,i){this.node=r,this.x0=t,this.y0=e,this.x1=n,this.y1=i}function dR(r,t,e){var n,i=this._x0,a=this._y0,s,o,A,l,c=this._x1,u=this._y1,h=[],d=this._root,f,g;for(d&&h.push(new ia(d,i,a,c,u)),e==null?e=1/0:(i=r-e,a=t-e,c=r+e,u=t+e,e*=e);f=h.pop();)if(!(!(d=f.node)||(s=f.x0)>c||(o=f.y0)>u||(A=f.x1)<i||(l=f.y1)<a))if(d.length){var v=(s+A)/2,p=(o+l)/2;h.push(new ia(d[3],v,p,A,l),new ia(d[2],s,p,v,l),new ia(d[1],v,o,A,p),new ia(d[0],s,o,v,p)),(g=(t>=p)<<1|r>=v)&&(f=h[h.length-1],h[h.length-1]=h[h.length-1-g],h[h.length-1-g]=f)}else{var y=r-+this._x.call(null,d.data),x=t-+this._y.call(null,d.data),F=y*y+x*x;if(F<e){var O=Math.sqrt(e=F);i=r-O,a=t-O,c=r+O,u=t+O,n=d.data}}return n}function fR(r){if(isNaN(c=+this._x.call(null,r))||isNaN(u=+this._y.call(null,r)))return this;var t,e=this._root,n,i,a,s=this._x0,o=this._y0,A=this._x1,l=this._y1,c,u,h,d,f,g,v,p;if(!e)return this;if(e.length)for(;;){if((f=c>=(h=(s+A)/2))?s=h:A=h,(g=u>=(d=(o+l)/2))?o=d:l=d,t=e,!(e=e[v=g<<1|f]))return this;if(!e.length)break;(t[v+1&3]||t[v+2&3]||t[v+3&3])&&(n=t,p=v)}for(;e.data!==r;)if(i=e,!(e=e.next))return this;return(a=e.next)&&delete e.next,i?(a?i.next=a:delete i.next,this):t?(a?t[v]=a:delete t[v],(e=t[0]||t[1]||t[2]||t[3])&&e===(t[3]||t[2]||t[1]||t[0])&&!e.length&&(n?n[p]=e:this._root=e),this):(this._root=a,this)}function gR(r){for(var t=0,e=r.length;t<e;++t)this.remove(r[t]);return this}function vR(){return this._root}function pR(){var r=0;return this.visit(function(t){if(!t.length)do++r;while(t=t.next)}),r}function mR(r){var t=[],e,n=this._root,i,a,s,o,A;for(n&&t.push(new ia(n,this._x0,this._y0,this._x1,this._y1));e=t.pop();)if(!r(n=e.node,a=e.x0,s=e.y0,o=e.x1,A=e.y1)&&n.length){var l=(a+o)/2,c=(s+A)/2;(i=n[3])&&t.push(new ia(i,l,c,o,A)),(i=n[2])&&t.push(new ia(i,a,c,l,A)),(i=n[1])&&t.push(new ia(i,l,s,o,c)),(i=n[0])&&t.push(new ia(i,a,s,l,c))}return this}function yR(r){var t=[],e=[],n;for(this._root&&t.push(new ia(this._root,this._x0,this._y0,this._x1,this._y1));n=t.pop();){var i=n.node;if(i.length){var a,s=n.x0,o=n.y0,A=n.x1,l=n.y1,c=(s+A)/2,u=(o+l)/2;(a=i[0])&&t.push(new ia(a,s,o,c,u)),(a=i[1])&&t.push(new ia(a,c,o,A,u)),(a=i[2])&&t.push(new ia(a,s,u,c,l)),(a=i[3])&&t.push(new ia(a,c,u,A,l))}e.push(n)}for(;n=e.pop();)r(n.node,n.x0,n.y0,n.x1,n.y1);return this}function wR(r){return r[0]}function ER(r){return arguments.length?(this._x=r,this):this._x}function BR(r){return r[1]}function bR(r){return arguments.length?(this._y=r,this):this._y}function Zg(r,t,e){var n=new Yy(t==null?wR:t,e==null?BR:e,NaN,NaN,NaN,NaN);return r==null?n:n.addAll(r)}function Yy(r,t,e,n,i,a){this._x=r,this._y=t,this._x0=e,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function PC(r){for(var t={data:r.data},e=t;r=r.next;)e=e.next={data:r.data};return t}var aa=Zg.prototype=Yy.prototype;aa.copy=function(){var r=new Yy(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,e,n;if(!t)return r;if(!t.length)return r._root=PC(t),r;for(e=[{source:t,target:r._root=new Array(4)}];t=e.pop();)for(var i=0;i<4;++i)(n=t.source[i])&&(n.length?e.push({source:n,target:t.target[i]=new Array(4)}):t.target[i]=PC(n));return r},aa.add=AR,aa.addAll=lR,aa.cover=cR,aa.data=uR,aa.extent=hR,aa.find=dR,aa.remove=fR,aa.removeAll=gR,aa.root=vR,aa.size=pR,aa.visit=mR,aa.visitAfter=yR,aa.x=ER,aa.y=bR;function xR(r){const t=+this._x.call(null,r),e=+this._y.call(null,r),n=+this._z.call(null,r);return _C(this.cover(t,e,n),t,e,n,r)}function _C(r,t,e,n,i){if(isNaN(t)||isNaN(e)||isNaN(n))return r;var a,s=r._root,o={data:i},A=r._x0,l=r._y0,c=r._z0,u=r._x1,h=r._y1,d=r._z1,f,g,v,p,y,x,F,O,L,U,R;if(!s)return r._root=o,r;for(;s.length;)if((F=t>=(f=(A+u)/2))?A=f:u=f,(O=e>=(g=(l+h)/2))?l=g:h=g,(L=n>=(v=(c+d)/2))?c=v:d=v,a=s,!(s=s[U=L<<2|O<<1|F]))return a[U]=o,r;if(p=+r._x.call(null,s.data),y=+r._y.call(null,s.data),x=+r._z.call(null,s.data),t===p&&e===y&&n===x)return o.next=s,a?a[U]=o:r._root=o,r;do a=a?a[U]=new Array(8):r._root=new Array(8),(F=t>=(f=(A+u)/2))?A=f:u=f,(O=e>=(g=(l+h)/2))?l=g:h=g,(L=n>=(v=(c+d)/2))?c=v:d=v;while((U=L<<2|O<<1|F)===(R=(x>=v)<<2|(y>=g)<<1|p>=f));return a[R]=s,a[U]=o,r}function CR(r){Array.isArray(r)||(r=Array.from(r));const t=r.length,e=new Float64Array(t),n=new Float64Array(t),i=new Float64Array(t);let a=1/0,s=1/0,o=1/0,A=-1/0,l=-1/0,c=-1/0;for(let u=0,h,d,f,g;u<t;++u)isNaN(d=+this._x.call(null,h=r[u]))||isNaN(f=+this._y.call(null,h))||isNaN(g=+this._z.call(null,h))||(e[u]=d,n[u]=f,i[u]=g,d<a&&(a=d),d>A&&(A=d),f<s&&(s=f),f>l&&(l=f),g<o&&(o=g),g>c&&(c=g));if(a>A||s>l||o>c)return this;this.cover(a,s,o).cover(A,l,c);for(let u=0;u<t;++u)_C(this,e[u],n[u],i[u],r[u]);return this}function SR(r,t,e){if(isNaN(r=+r)||isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,i=this._y0,a=this._z0,s=this._x1,o=this._y1,A=this._z1;if(isNaN(n))s=(n=Math.floor(r))+1,o=(i=Math.floor(t))+1,A=(a=Math.floor(e))+1;else{for(var l=s-n||1,c=this._root,u,h;n>r||r>=s||i>t||t>=o||a>e||e>=A;)switch(h=(e<a)<<2|(t<i)<<1|r<n,u=new Array(8),u[h]=c,c=u,l*=2,h){case 0:s=n+l,o=i+l,A=a+l;break;case 1:n=s-l,o=i+l,A=a+l;break;case 2:s=n+l,i=o-l,A=a+l;break;case 3:n=s-l,i=o-l,A=a+l;break;case 4:s=n+l,o=i+l,a=A-l;break;case 5:n=s-l,o=i+l,a=A-l;break;case 6:s=n+l,i=o-l,a=A-l;break;case 7:n=s-l,i=o-l,a=A-l;break}this._root&&this._root.length&&(this._root=c)}return this._x0=n,this._y0=i,this._z0=a,this._x1=s,this._y1=o,this._z1=A,this}function MR(){var r=[];return this.visit(function(t){if(!t.length)do r.push(t.data);while(t=t.next)}),r}function FR(r){return arguments.length?this.cover(+r[0][0],+r[0][1],+r[0][2]).cover(+r[1][0],+r[1][1],+r[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function ar(r,t,e,n,i,a,s){this.node=r,this.x0=t,this.y0=e,this.z0=n,this.x1=i,this.y1=a,this.z1=s}function TR(r,t,e,n){var i,a=this._x0,s=this._y0,o=this._z0,A,l,c,u,h,d,f=this._x1,g=this._y1,v=this._z1,p=[],y=this._root,x,F;for(y&&p.push(new ar(y,a,s,o,f,g,v)),n==null?n=1/0:(a=r-n,s=t-n,o=e-n,f=r+n,g=t+n,v=e+n,n*=n);x=p.pop();)if(!(!(y=x.node)||(A=x.x0)>f||(l=x.y0)>g||(c=x.z0)>v||(u=x.x1)<a||(h=x.y1)<s||(d=x.z1)<o))if(y.length){var O=(A+u)/2,L=(l+h)/2,U=(c+d)/2;p.push(new ar(y[7],O,L,U,u,h,d),new ar(y[6],A,L,U,O,h,d),new ar(y[5],O,l,U,u,L,d),new ar(y[4],A,l,U,O,L,d),new ar(y[3],O,L,c,u,h,U),new ar(y[2],A,L,c,O,h,U),new ar(y[1],O,l,c,u,L,U),new ar(y[0],A,l,c,O,L,U)),(F=(e>=U)<<2|(t>=L)<<1|r>=O)&&(x=p[p.length-1],p[p.length-1]=p[p.length-1-F],p[p.length-1-F]=x)}else{var R=r-+this._x.call(null,y.data),j=t-+this._y.call(null,y.data),q=e-+this._z.call(null,y.data),et=R*R+j*j+q*q;if(et<n){var it=Math.sqrt(n=et);a=r-it,s=t-it,o=e-it,f=r+it,g=t+it,v=e+it,i=y.data}}return i}const OR=(r,t,e,n,i,a)=>Math.sqrt(PA(r-n,2)+PA(t-i,2)+PA(e-a,2));function IR(r,t,e,n){const i=[],a=r-n,s=t-n,o=e-n,A=r+n,l=t+n,c=e+n;return this.visit((u,h,d,f,g,v,p)=>{if(!u.length)do{const y=u.data;OR(r,t,e,this._x(y),this._y(y),this._z(y))<=n&&i.push(y)}while(u=u.next);return h>A||d>l||f>c||g<a||v<s||p<o}),i}function NR(r){if(isNaN(h=+this._x.call(null,r))||isNaN(d=+this._y.call(null,r))||isNaN(f=+this._z.call(null,r)))return this;var t,e=this._root,n,i,a,s=this._x0,o=this._y0,A=this._z0,l=this._x1,c=this._y1,u=this._z1,h,d,f,g,v,p,y,x,F,O,L;if(!e)return this;if(e.length)for(;;){if((y=h>=(g=(s+l)/2))?s=g:l=g,(x=d>=(v=(o+c)/2))?o=v:c=v,(F=f>=(p=(A+u)/2))?A=p:u=p,t=e,!(e=e[O=F<<2|x<<1|y]))return this;if(!e.length)break;(t[O+1&7]||t[O+2&7]||t[O+3&7]||t[O+4&7]||t[O+5&7]||t[O+6&7]||t[O+7&7])&&(n=t,L=O)}for(;e.data!==r;)if(i=e,!(e=e.next))return this;return(a=e.next)&&delete e.next,i?(a?i.next=a:delete i.next,this):t?(a?t[O]=a:delete t[O],(e=t[0]||t[1]||t[2]||t[3]||t[4]||t[5]||t[6]||t[7])&&e===(t[7]||t[6]||t[5]||t[4]||t[3]||t[2]||t[1]||t[0])&&!e.length&&(n?n[L]=e:this._root=e),this):(this._root=a,this)}function LR(r){for(var t=0,e=r.length;t<e;++t)this.remove(r[t]);return this}function kR(){return this._root}function QR(){var r=0;return this.visit(function(t){if(!t.length)do++r;while(t=t.next)}),r}function UR(r){var t=[],e,n=this._root,i,a,s,o,A,l,c;for(n&&t.push(new ar(n,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));e=t.pop();)if(!r(n=e.node,a=e.x0,s=e.y0,o=e.z0,A=e.x1,l=e.y1,c=e.z1)&&n.length){var u=(a+A)/2,h=(s+l)/2,d=(o+c)/2;(i=n[7])&&t.push(new ar(i,u,h,d,A,l,c)),(i=n[6])&&t.push(new ar(i,a,h,d,u,l,c)),(i=n[5])&&t.push(new ar(i,u,s,d,A,h,c)),(i=n[4])&&t.push(new ar(i,a,s,d,u,h,c)),(i=n[3])&&t.push(new ar(i,u,h,o,A,l,d)),(i=n[2])&&t.push(new ar(i,a,h,o,u,l,d)),(i=n[1])&&t.push(new ar(i,u,s,o,A,h,d)),(i=n[0])&&t.push(new ar(i,a,s,o,u,h,d))}return this}function RR(r){var t=[],e=[],n;for(this._root&&t.push(new ar(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));n=t.pop();){var i=n.node;if(i.length){var a,s=n.x0,o=n.y0,A=n.z0,l=n.x1,c=n.y1,u=n.z1,h=(s+l)/2,d=(o+c)/2,f=(A+u)/2;(a=i[0])&&t.push(new ar(a,s,o,A,h,d,f)),(a=i[1])&&t.push(new ar(a,h,o,A,l,d,f)),(a=i[2])&&t.push(new ar(a,s,d,A,h,c,f)),(a=i[3])&&t.push(new ar(a,h,d,A,l,c,f)),(a=i[4])&&t.push(new ar(a,s,o,f,h,d,u)),(a=i[5])&&t.push(new ar(a,h,o,f,l,d,u)),(a=i[6])&&t.push(new ar(a,s,d,f,h,c,u)),(a=i[7])&&t.push(new ar(a,h,d,f,l,c,u))}e.push(n)}for(;n=e.pop();)r(n.node,n.x0,n.y0,n.z0,n.x1,n.y1,n.z1);return this}function DR(r){return r[0]}function PR(r){return arguments.length?(this._x=r,this):this._x}function _R(r){return r[1]}function HR(r){return arguments.length?(this._y=r,this):this._y}function GR(r){return r[2]}function zR(r){return arguments.length?(this._z=r,this):this._z}function HC(r,t,e,n){var i=new Xy(t==null?DR:t,e==null?_R:e,n==null?GR:n,NaN,NaN,NaN,NaN,NaN,NaN);return r==null?i:i.addAll(r)}function Xy(r,t,e,n,i,a,s,o,A){this._x=r,this._y=t,this._z=e,this._x0=n,this._y0=i,this._z0=a,this._x1=s,this._y1=o,this._z1=A,this._root=void 0}function GC(r){for(var t={data:r.data},e=t;r=r.next;)e=e.next={data:r.data};return t}var Ti=HC.prototype=Xy.prototype;Ti.copy=function(){var r=new Xy(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),t=this._root,e,n;if(!t)return r;if(!t.length)return r._root=GC(t),r;for(e=[{source:t,target:r._root=new Array(8)}];t=e.pop();)for(var i=0;i<8;++i)(n=t.source[i])&&(n.length?e.push({source:n,target:t.target[i]=new Array(8)}):t.target[i]=GC(n));return r},Ti.add=xR,Ti.addAll=CR,Ti.cover=SR,Ti.data=MR,Ti.extent=FR,Ti.find=TR,Ti.findAllWithinRadius=IR,Ti.remove=NR,Ti.removeAll=LR,Ti.root=kR,Ti.size=QR,Ti.visit=UR,Ti.visitAfter=RR,Ti.x=PR,Ti.y=HR,Ti.z=zR;const KR=.81,Jy=.1;function VR(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?Zg(o,c=>c.x,c=>c.y):HC(o,c=>c.x,c=>c.y,c=>c.z)).visitAfter(WR),l=new Map;return o.forEach(c=>{l.set(c.id,c),ZR(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 WR(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 jR=(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||Jy,c=a.y-r.y||Jy,u=a.z-r.z||Jy,h=[l,c,u],d=A-t;let f=0;for(let p=0;p<s;p++)f+=h[p]*h[p];const v=Math.sqrt(f)*f;if(d*d*KR<f){const p=r.weight/v;return a.vx+=l*p,a.vy+=c*p,a.vz+=u*p,!0}if(r.length)return!1;if(r.data!==a){const p=r.data.weight/v;a.vx+=l*p,a.vy+=c*p,a.vz+=u*p}};function ZR(r,t,e){t.visit((n,i,a,s,o)=>jR(n,i,a,s,o,r,e))}const YR={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 zC{constructor(t={}){this.options=t,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},YR),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,t,e)})}assign(t,e){return(0,D.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,D.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((R,j)=>Object.assign(Object.assign({},R),{data:Object.assign(Object.assign({},R.data),{x:ye(R.data.x)?R.data.x:Math.random()*l,y:ye(R.data.y)?R.data.y:Math.random()*c,z:ye(R.data.z)?R.data.z:Math.random()*Math.sqrt(l*c),size:u(R)||30,mass:h(R),nodeStrength:d(R)})})),p=s.map(R=>Object.assign(Object.assign({},R),{data:Object.assign(Object.assign({},R.data),{edgeStrength:f(R),linkDistance:g(R,e.getNode(R.source),e.getNode(R.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:s},{nodes:[],edges:s};const y={};a.forEach((R,j)=>{y[R.id]={x:0,y:0,z:0}});const x=new Gr({nodes:v,edges:p});this.formatCentripetal(o,x);const{maxIteration:F,minMovement:O,onTick:L}=o;if(this.lastLayoutNodes=v,this.lastLayoutEdges=p,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=x,this.lastOptions=o,this.lastVelMap=y,typeof window=="undefined")return;let U=0;return new Promise(R=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&R({nodes:qy(e,v),edges:s}),this.runOneStep(x,e,U,y,o),this.updatePosition(e,x,y,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})),L==null||L({nodes:qy(e,v),edges:s}),U++,(U>=F||this.judgingDistance<O)&&(window.clearInterval(this.timeInterval),R({nodes:qy(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=Wy(t.nodeSize,t.nodeSpacing);const o=t.linkDistance?Nl(1,t.linkDistance):A=>1+n.nodeSize(e.getNode(A.source))+n.nodeSize(e.getNode(A.target));return n.linkDistance=o,n.nodeStrength=Nl(1,t.nodeStrength),n.edgeStrength=Nl(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:p=>({x:a[0],y:a[1],z:n===3?a[2]:void 0})};typeof s!="function"&&(t.clusterNodeStrength=p=>s);let h,d;if(o&&l&&(h=KC(e,l),d=Array.from(new Set(c==null?void 0:c.map(p=>p.data[l])))||[],t.centripetalOptions=Object.assign(u,{single:100,leaf:p=>{const{siblingLeaves:y,sameTypeLeaves:x}=h[p.id]||{};return(x==null?void 0:x.length)===(y==null?void 0:y.length)||(d==null?void 0:d.length)===1?1:t.clusterNodeStrength(p)},others:1,center:p=>{const y=e.getDegree(p.id,"both");if(!y)return{x:100,y:100,z:0};let x;if(y===1){const{sameTypeLeaves:F=[]}=h[p.id]||{};F.length===1?x=void 0:F.length>1&&(x=VC(F))}else x=void 0;return{x:x==null?void 0:x.x,y:x==null?void 0:x.y,z:x==null?void 0:x.z}}})),A&&l){h||(h=KC(e,l)),d||(d=Array.from(new Set(c.map(y=>y.data[l])))),d=d.filter(y=>y!==void 0);const p={};d.forEach(y=>{const x=c.filter(F=>F.data[l]===y).map(F=>e.getNode(F.id));p[y]=VC(x)}),t.centripetalOptions=Object.assign(u,{single:y=>t.clusterNodeStrength(y),leaf:y=>t.clusterNodeStrength(y),others:y=>t.clusterNodeStrength(y),center:y=>{const x=p[y.data[l]];return{x:x==null?void 0:x.x,y:x==null?void 0:x.y,z:x==null?void 0:x.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;VR(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,p=d/g,y=f/g,{linkDistance:x=200,edgeStrength:F=200}=s.data||{},L=(x-g)*F,U=c.data.mass||1,R=u.data.mass||1,j=1/U,q=1/R,et=v*L,it=p*L,dt=y*L;e[A].x-=et*j,e[A].y-=it*j,e[A].z-=dt*j,e[l].x+=et*q,e[l].y+=it*q,e[l].z+=dt*q})}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:p,x:y,y:x,z:F}=v,O=e.getNode(g);let L=0,U=0,R=0,j=h;const q=t.getDegree(g,"in"),et=t.getDegree(g,"out"),it=t.getDegree(g,"both"),dt=a==null?void 0:a(O,it);if(dt){const[ft,mt,Rt]=dt;L=y-ft,U=x-mt,j=Rt}else L=y-u[0],U=x-u[1],R=F-u[2];if(j&&(n[g].x-=j*L/p,n[g].y-=j*U/p,n[g].z-=j*R/p),d){const{leaf:ft,single:mt,others:Rt,center:Qt}=d,{x:yt,y:xt,z:Dt,centerStrength:Xt}=(Qt==null?void 0:Qt(O,o,A,l,c))||{x:0,y:0,z:0,centerStrength:0};if(!ye(yt)||!ye(xt))return;const ne=(y-yt)/p,le=(x-xt)/p,ge=(F-Dt)/p;if(Xt&&(n[g].x-=Xt*ne,n[g].y-=Xt*le,n[g].z-=Xt*ge),it===0){const Qe=mt(O);if(!Qe)return;n[g].x-=Qe*ne,n[g].y-=Qe*le,n[g].z-=Qe*ge;return}if(q===0||et===0){const Qe=ft(O,o,A);if(!Qe)return;n[g].x-=Qe*ne,n[g].y-=Qe*le,n[g].z-=Qe*ge;return}const xe=Rt(O);if(!xe)return;n[g].x-=xe*ne,n[g].y-=xe*le,n[g].z-=xe*ge}})}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 KC=(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]=XR(r,"leaf",i,t))}),n},XR=(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=JR(r,t,n,e,o);return{coreNode:s,siblingLeaves:o,sameTypeLeaves:A}},JR=(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},VC=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}},qy=(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=T(18086);const Ez=wn.XA,Bz=wn.a_,bz=wn.yQ,xz=wn.Hs,Cz=wn.Ec,Sz=wn.dx,Mz=wn.LU,Fz=wn.Rm,NA=wn.y3,Tz=wn.qK,Oz=wn.pb,Iz=wn.j,Nz=wn.sO,Lz=wn.BZ,kz=wn.EK,Qz=wn.Db,Uz=wn.Fx,Rz=wn.tU,Dz=wn.Ym,Pz=wn.rs,_z=wn.QR,Hz=wn.TB,Gz=wn.oH,WC=wn.Sc,zz=wn.BN,Kz=wn.it,Vz=wn.$r,Wz=wn.QM,jz=wn.AV;var Zz=(wn.y3,wn.y3);const Yz=wn.GH,Xz=wn.SO,Jz=wn.uZ,qz=wn.yU,$z=wn.F1,tK=wn.re,jC=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},ZC=(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},qR=(r,t)=>{const e=[];return r.forEach(n=>{const i=[];n.forEach(a=>{i.push(a*t)}),e.push(i)}),e},$R=r=>{let t=1/0,e=1/0,n=-1/0,i=-1/0;return r.forEach(a=>{let s=a.data.size;Po(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}},YC=(r,t)=>Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)),$y=(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),$y(r,r.getChildren(l.id,i),e,n,i,a),n!=="TB"&&e(l)}}},tD={center:[0,0],linkDistance:50};class XC{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},tD),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,n){return(0,D.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 Ll(e,t,a);const l=ZC({nodes:o,edges:A},!1),c=jC(l);eD(c);const u=qR(c,s),h=nD(u),d=[];return h.forEach((g,v)=>{const p=Pa(o[v]);p.data.x=g[0]+a[0],p.data.y=g[1]+a[1],d.push(p)}),t&&d.forEach(g=>e.mergeNodeData(g.id,{x:g.data.x,y:g.data.y})),{nodes:d,edges:A}})}}const eD=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)})})},nD=r=>{const e=NA.mul(NA.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 WC(e),o=NA.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(A=>NA.mul([A],[o]).toJSON()[0].splice(0,2))};function t1(r){return!!r.tick&&!!r.stop}const rD={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},iD={center:[0,0],comboPadding:10,treeKey:"combo"};class aD{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},iD),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,n){return(0,D.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(R=>!R.data._isCombo),l=e.getAllNodes().filter(R=>R.data._isCombo),c=e.getAllEdges(),u=A==null?void 0:A.length;if(!u||u===1)return Ll(e,t,a);const h=[],d=new Map;A.forEach(R=>{d.set(R.id,R)});const f=new Map;l.forEach(R=>{f.set(R.id,R)});const g=new Map,v=this.getInnerGraphs(e,s,d,f,c,i,g);yield Promise.all(v);const p=new Map,y=[],x=new Map;let F=!0;e.getRoots(s).forEach(R=>{const j=g.get(R.id),q=f.get(R.id)||d.get(R.id),et={id:R.id,data:Object.assign(Object.assign({},R.data),{x:j.data.x||q.data.x,y:j.data.y||q.data.y,fx:j.data.fx||q.data.fx,fy:j.data.fy||q.data.fy,mass:j.data.mass||q.data.mass,size:j.data.size})};y.push(et),p.set(R.id,!0),!isNaN(et.data.x)&&et.data.x!==0&&!isNaN(et.data.y)&&et.data.y!==0?F=!1:(et.data.x=Math.random()*100,et.data.y=Math.random()*100),$y(e,[R],it=>{it.id!==R.id&&x.set(it.id,R.id)},"TB",s)});const O=[];c.forEach(R=>{const j=x.get(R.source)||R.source,q=x.get(R.target)||R.target;j!==q&&p.has(j)&&p.has(q)&&O.push({id:R.id,source:j,target:q,data:{}})});let L;if(y!=null&&y.length){if(y.length===1)y[0].data.x=a[0],y[0].data.y=a[1];else{const R=new Gr({nodes:y,edges:O}),j=o||new zC;F&&rD[j.id]&&(yield(y.length<100?new XC:new Zy).assign(R));const q=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},j.id==="force"?{gravity:1,factor:4,linkDistance:(et,it,dt)=>{const ft=Math.max(...it.data.size)||32,mt=Math.max(...dt.data.size)||32;return ft/2+mt/2+200}}:{});L=yield JC(j,R,q)}g.forEach(R=>{var j;const q=L.nodes.find(dt=>dt.id===R.id);if(q){const{x:dt,y:ft}=q.data;R.data.visited=!0,R.data.x=dt,R.data.y=ft,h.push({id:R.id,data:{x:dt,y:ft}})}const{x:et,y:it}=R.data;(j=R.data.nodes)===null||j===void 0||j.forEach(dt=>{h.push({id:dt.id,data:{x:dt.data.x+et,y:dt.data.y+it}})})}),g.forEach(({data:R})=>{const{x:j,y:q,visited:et,nodes:it}=R;it==null||it.forEach(dt=>{if(!et){const ft=h.find(mt=>mt.id===dt.id);ft.data.x+=j||0,ft.data.y+=q||0}})})}return t&&h.forEach(R=>{e.mergeNodeData(R.id,{x:R.data.x,y:R.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:Vt(i)?o=i:o=()=>0,e.spacing=o,!n)s=l=>{const c=o(l);return l.size?Po(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(Vt(n))s=l=>{const c=n(l),u=o(l);return Po(l.size)?((l.size[0]>l.size[1]?l.size[0]:l.size[1])+u)/2:((c||32)+u)/2};else if(Po(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:Po(a)?A=()=>Math.max.apply(null,a):Vt(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 Zy({}),d={center:[0,0],preventOverlap:!0,nodeSpacing:c},f=[],g=v=>{let p=(l==null?void 0:l(v))||10;return Po(p)&&(p=Math.max(...p)),{size:p?[p*2,p*2]:[30,30],padding:p}};return t.getRoots(e).forEach(v=>{o.set(v.id,{id:v.id,data:{nodes:[],size:g(v).size}});let p=Promise.resolve();$y(t,[v],y=>{var x;if(!y.data._isCombo)return;const{size:F,padding:O}=g(y);if(!(!((x=t.getChildren(y.id,e))===null||x===void 0)&&x.length))o.set(y.id,{id:y.id,data:Object.assign(Object.assign({},y.data),{size:F})});else{const L=o.get(y.id);o.set(y.id,{id:y.id,data:Object.assign({nodes:[]},L==null?void 0:L.data)});const U=new Map,R=t.getChildren(y.id,e).map(et=>{if(et.data._isCombo)return o.has(et.id)||o.set(et.id,{id:et.id,data:Object.assign({},et.data)}),U.set(et.id,!0),o.get(et.id);const it=n.get(et.id)||i.get(et.id);return U.set(et.id,!0),{id:et.id,data:Object.assign(Object.assign({},it.data),et.data)}}),j={nodes:R,edges:a.filter(et=>U.has(et.source)&&U.has(et.target))};let q=1/0;R.forEach(et=>{var it;let{size:dt}=et.data;dt||(dt=((it=o.get(et.id))===null||it===void 0?void 0:it.data.size)||(A==null?void 0:A(et))||[30,30]),ye(dt)&&(dt=[dt,dt]);const[ft,mt]=dt;q>ft&&(q=ft),q>mt&&(q=mt),et.data.size=dt}),p=p.then(()=>(0,D.mG)(this,void 0,void 0,function*(){const et=new Gr(j);yield JC(h,et,d,!0);const{minX:it,minY:dt,maxX:ft,maxY:mt}=$R(R),Rt={x:(ft+it)/2,y:(mt+dt)/2};j.nodes.forEach(yt=>{yt.data.x-=Rt.x,yt.data.y-=Rt.y});const Qt=[Math.max(ft-it,q)+O*2,Math.max(mt-dt,q)+O*2];o.get(y.id).data.size=Qt,o.get(y.id).data.nodes=R}))}return!0},"BT",e),f.push(p)}),f}}function JC(r,t,e,n){var i;return(0,D.mG)(this,void 0,void 0,function*(){return t1(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 ci(r){return function(){return r}}function LA(r){return(r()-.5)*1e-6}function sD(r){return r.index}function qC(r,t){var e=r.get(t);if(!e)throw new Error("node not found: "+t);return e}function oD(r){var t=sD,e=u,n,i=ci(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 p=0,y=r.length;p<c;++p)for(var x=0,F,O,L,U,R,j,q;x<y;++x)F=r[x],O=F.source,L=F.target,U=L.x+L.vx-O.x-O.vx||LA(l),R=L.y+L.vy-O.y-O.vy||LA(l),j=Math.sqrt(U*U+R*R),j=(j-a[x])/j*v*n[x],U*=j,R*=j,L.vx-=U*(q=A[x]),L.vy-=R*q,O.vx+=U*(q=1-q),O.vy+=R*q}function d(){if(s){var v,p=s.length,y=r.length,x=new Map(s.map((O,L)=>[t(O,L,s),O])),F;for(v=0,o=new Array(p);v<y;++v)F=r[v],F.index=v,typeof F.source!="object"&&(F.source=qC(x,F.source)),typeof F.target!="object"&&(F.target=qC(x,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(y);v<y;++v)F=r[v],A[v]=o[F.source.index]/(o[F.source.index]+o[F.target.index]);n=new Array(y),f(),a=new Array(y),g()}}function f(){if(s)for(var v=0,p=r.length;v<p;++v)n[v]=+e(r[v],v,r)}function g(){if(s)for(var v=0,p=r.length;v<p;++v)a[v]=+i(r[v],v,r)}return h.initialize=function(v,p){s=v,l=p,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:ci(+v),f(),h):e},h.distance=function(v){return arguments.length?(i=typeof v=="function"?v:ci(+v),g(),h):i},h}var AD={value:()=>{}};function $C(){for(var r=0,t=arguments.length,e={},n;r<t;++r){if(!(n=arguments[r]+"")||n in e||/[\s.]/.test(n))throw new Error("illegal type: "+n);e[n]=[]}return new Yg(e)}function Yg(r){this._=r}function lD(r,t){return r.trim().split(/^|\s+/).map(function(e){var n="",i=e.indexOf(".");if(i>=0&&(n=e.slice(i+1),e=e.slice(0,i)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}Yg.prototype=$C.prototype={constructor:Yg,on:function(r,t){var e=this._,n=lD(r+"",e),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(r=n[a]).type)&&(i=cD(e[i],r.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<s;)if(i=(r=n[a]).type)e[i]=t2(e[i],r.name,t);else if(t==null)for(i in e)e[i]=t2(e[i],r.name,null);return this},copy:function(){var r={},t=this._;for(var e in t)r[e]=t[e].slice();return new Yg(r)},call:function(r,t){if((i=arguments.length-2)>0)for(var e=new Array(i),n=0,i,a;n<i;++n)e[n]=arguments[n+2];if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(a=this._[r],n=0,i=a.length;n<i;++n)a[n].value.apply(t,e)},apply:function(r,t,e){if(!this._.hasOwnProperty(r))throw new Error("unknown type: "+r);for(var n=this._[r],i=0,a=n.length;i<a;++i)n[i].value.apply(t,e)}};function cD(r,t){for(var e=0,n=r.length,i;e<n;++e)if((i=r[e]).name===t)return i.value}function t2(r,t,e){for(var n=0,i=r.length;n<i;++n)if(r[n].name===t){r[n]=AD,r=r.slice(0,n).concat(r.slice(n+1));break}return e!=null&&r.push({name:t,value:e}),r}var uD=$C,Wc=0,Dh=0,Ph=0,e2=1e3,Xg,_h,Jg=0,kl=0,qg=0,Hh=typeof performance=="object"&&performance.now?performance:Date,n2=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(r){setTimeout(r,17)};function r2(){return kl||(n2(hD),kl=Hh.now()+qg)}function hD(){kl=0}function e1(){this._call=this._time=this._next=null}e1.prototype=i2.prototype={constructor:e1,restart:function(r,t,e){if(typeof r!="function")throw new TypeError("callback is not a function");e=(e==null?r2():+e)+(t==null?0:+t),!this._next&&_h!==this&&(_h?_h._next=this:Xg=this,_h=this),this._call=r,this._time=e,n1()},stop:function(){this._call&&(this._call=null,this._time=1/0,n1())}};function i2(r,t,e){var n=new e1;return n.restart(r,t,e),n}function dD(){r2(),++Wc;for(var r=Xg,t;r;)(t=kl-r._time)>=0&&r._call.call(void 0,t),r=r._next;--Wc}function a2(){kl=(Jg=Hh.now())+qg,Wc=Dh=0;try{dD()}finally{Wc=0,gD(),kl=0}}function fD(){var r=Hh.now(),t=r-Jg;t>e2&&(qg-=t,Jg=r)}function gD(){for(var r,t=Xg,e,n=1/0;t;)t._call?(n>t._time&&(n=t._time),r=t,t=t._next):(e=t._next,t._next=null,t=r?r._next=e:Xg=e);_h=r,n1(n)}function n1(r){if(!Wc){Dh&&(Dh=clearTimeout(Dh));var t=r-kl;t>24?(r<1/0&&(Dh=setTimeout(a2,r-Hh.now()-qg)),Ph&&(Ph=clearInterval(Ph))):(Ph||(Jg=Hh.now(),Ph=setInterval(fD,e2)),Wc=1,n2(a2))}}const vD=1664525,pD=1013904223,s2=4294967296;function mD(){let r=1;return()=>(r=(vD*r+pD)%s2)/s2}function yD(r){return r.x}function wD(r){return r.y}var ED=10,BD=Math.PI*(3-Math.sqrt(5));function bD(r){var t,e=1,n=.001,i=1-Math.pow(n,1/300),a=0,s=.6,o=new Map,A=i2(u),l=uD("tick","end"),c=mD();r==null&&(r=[]);function u(){h(),l.call("tick",t),e<n&&(A.stop(),l.call("end",t))}function h(g){var v,p=r.length,y;g===void 0&&(g=1);for(var x=0;x<g;++x)for(e+=(a-e)*i,o.forEach(function(F){F(e)}),v=0;v<p;++v)y=r[v],y.fx==null?y.x+=y.vx*=s:(y.x=y.fx,y.vx=0),y.fy==null?y.y+=y.vy*=s:(y.y=y.fy,y.vy=0);return t}function d(){for(var g=0,v=r.length,p;g<v;++g){if(p=r[g],p.index=g,p.fx!=null&&(p.x=p.fx),p.fy!=null&&(p.y=p.fy),isNaN(p.x)||isNaN(p.y)){var y=ED*Math.sqrt(.5+g),x=g*BD;p.x=y*Math.cos(x),p.y=y*Math.sin(x)}(isNaN(p.vx)||isNaN(p.vy))&&(p.vx=p.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,p){var y=0,x=r.length,F,O,L,U,R;for(p==null?p=1/0:p*=p,y=0;y<x;++y)U=r[y],F=g-U.x,O=v-U.y,L=F*F+O*O,L<p&&(R=U,p=L);return R},on:function(g,v){return arguments.length>1?(l.on(g,v),t):l.on(g)}}}function xD(){var r,t,e,n,i=ci(-30),a,s=1,o=1/0,A=.81;function l(d){var f,g=r.length,v=Zg(r,yD,wD).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,p=0,y,x,F;if(d.length){for(y=x=F=0;F<4;++F)(g=d[F])&&(v=Math.abs(g.value))&&(f+=g.value,p+=v,y+=v*g.x,x+=v*g.y);d.x=y/p,d.y=x/p}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 p=d.x-t.x,y=d.y-t.y,x=v-f,F=p*p+y*y;if(x*x/A<F)return F<o&&(p===0&&(p=LA(e),F+=p*p),y===0&&(y=LA(e),F+=y*y),F<s&&(F=Math.sqrt(s*F)),t.vx+=p*d.value*n/F,t.vy+=y*d.value*n/F),!0;if(d.length||F>=o)return;(d.data!==t||d.next)&&(p===0&&(p=LA(e),F+=p*p),y===0&&(y=LA(e),F+=y*y),F<s&&(F=Math.sqrt(s*F)));do d.data!==t&&(x=a[d.data.index]*n/F,t.vx+=p*x,t.vy+=y*x);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:ci(+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 CD(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 SD(r){return r.x+r.vx}function MD(r){return r.y+r.vy}function FD(r){var t,e,n,i=1,a=1;typeof r!="function"&&(r=ci(r==null?1:+r));function s(){for(var l,c=t.length,u,h,d,f,g,v,p=0;p<a;++p)for(u=Zg(t,SD,MD).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(y);function y(x,F,O,L,U){var R=x.data,j=x.r,q=g+j;if(R){if(R.index>h.index){var et=d-R.x-R.vx,it=f-R.y-R.vy,dt=et*et+it*it;dt<q*q&&(et===0&&(et=LA(n),dt+=et*et),it===0&&(it=LA(n),dt+=it*it),dt=(q-(dt=Math.sqrt(dt)))/dt*i,h.vx+=(et*=dt)*(q=(j*=j)/(v+j)),h.vy+=(it*=dt)*q,R.vx-=et*(q=1-q),R.vy-=it*q)}return}return F>d+q||L<d-q||O>f+q||U<f-q}}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:ci(+l),A(),s):r},s}function TD(r,t,e){var n,i=ci(.1),a,s;typeof r!="function"&&(r=ci(+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:ci(+l),A(),o):i},o.radius=function(l){return arguments.length?(r=typeof l=="function"?l:ci(+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 OD(r){var t=ci(.1),e,n,i;typeof r!="function"&&(r=ci(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:ci(+o),s(),a):t},a.x=function(o){return arguments.length?(r=typeof o=="function"?o:ci(+o),s(),a):r},a}function ID(r){var t=ci(.1),e,n,i;typeof r!="function"&&(r=ci(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:ci(+o),s(),a):t},a.y=function(o){return arguments.length?(r=typeof o=="function"?o:ci(+o),s(),a):r},a}class ND{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:oD,manyBody:xD,center:CD,collide:FD,radial:TD,x:OD,y:ID},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},Si(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,D.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=Si({},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,D.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),Fl(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),Fl(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 bD()}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())})),o2(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)),o2(s,Object.entries(t[a]))}else e.force(a,null)}),e}}const o2=(r,t)=>t.reduce((e,[n,i])=>!e[n]||i===void 0?e:e[n].call(r,i),r);var A2=T(92546),LD=T.n(A2);class $g{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,$g.defaultOptions,t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,D.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,D.mG)(this,void 0,void 0,function*(){const{nodeSize:i}=n,a=new A2.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]=Rh(Vt(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})}),LD().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,D._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})}}$g.defaultOptions={};class r1{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 r1(s)}}class jc{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 jc(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 jc(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 jc(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 jc(i)}}class Zc{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 Zc(this.quad.NW()),this.NE=new Zc(this.quad.NE()),this.SW=new Zc(this.quad.SW()),this.SE=new Zc(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 kD={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 QD{constructor(t={}){this.options=t,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},kD),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,t,e)})}genericForceAtlas2Layout(t,e,n){return(0,D.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 Ll(e,t,h);const d=a.map(p=>Pa(p,[o,A])),f=i.filter(p=>{const{source:y,target:x}=p;return y!==x}),g=new Gr({nodes:d,edges:f}),v=this.getSizes(g,u);if(this.run(g,e,c,v,t,s),l){for(let y=0;y<f.length;y+=1){const{source:x,target:F}=f[y],O=g.getDegree(x),L=g.getDegree(x);if(O<=1){const U=g.getNode(F);g.mergeNodeData(x,{x:U.data.x,y:U.data.y})}else if(L<=1){const U=g.getNode(x);g.mergeNodeData(F,{x:U.data.x,y:U.data.y})}}const p=Object.assign(Object.assign({},s),{prune:!1,barnesHut:!1});this.run(g,e,100,v,t,p)}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]=Wy(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:p,id:y}=c[v];if(d[y]=[0,0],A){const x={id:v,rx:p.x,ry:p.y,mass:1,g:o,degree:t.getDegree(y)};g[y]=new r1(x)}}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),p=t.getDegree(d),y=t.getDegree(f);if(c&&(p<=1||y<=1))continue;const x=[v.data.x-g.data.x,v.data.y-g.data.y];let F=Math.hypot(x[0],x[1]);F=F<1e-4?1e-4:F,x[0]=x[0]/F,x[1]=x[1]/F,o&&e<n&&(F=F-i[d]-i[f]);let O=F,L=O;l==="linlog"&&(O=Math.log(1+F),L=O),A&&(O=F/p,L=F/y),o&&e<n&&F<=0?(O=0,L=0):o&&e<n&&F>0&&(O=F,L=F),a[d][0]+=O*x[0],a[f][0]-=L*x[0],a[d][1]+=O*x[1],a[f][1]-=L*x[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 y=0;y<l;y+=1){const{id:x,data:F}=A[y];o&&t.getDegree(x)<=1||(n[x].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 jc(g),p=new Zc(v);for(let y=0;y<l;y+=1){const{id:x}=A[y];o&&t.getDegree(x)<=1||n[x].in(v)&&p.insert(n[x])}for(let y=0;y<l;y+=1){const{id:x,data:F}=A[y],O=t.getDegree(x);if(o&&O<=1)continue;n[x].resetForce(),p.updateForce(n[x]),e[x][0]-=n[x].fx,e[x][1]-=n[x].fy;const L=[F.x-s[0],F.y-s[1]];let U=Math.hypot(L[0],L[1]);U=U<1e-4?1e-4:U,L[0]=L[0]/U,L[1]=L[1]/U;const R=a*(O+1);e[x][0]-=R*L[0],e[x][1]-=R*L[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],p=t.getDegree(v.id);for(let O=g+1;O<f;O+=1){const L=d[O],U=t.getDegree(L.id);if(h&&(p<=1||U<=1))continue;const R=[L.data.x-v.data.x,L.data.y-v.data.y];let j=Math.hypot(R[0],R[1]);j=j<1e-4?1e-4:j,R[0]=R[0]/j,R[1]=R[1]/j,A&&e<n&&(j=j-s[v.id]-s[L.id]);let q=l*(p+1)*(U+1)/j;A&&e<n&&j<0?q=a*(p+1)*(U+1):A&&e<n&&j===0?q=0:A&&e<n&&j>0&&(q=l*(p+1)*(U+1)/j),i[v.id][0]-=q*R[0],i[L.id][0]+=q*R[0],i[v.id][1]-=q*R[1],i[L.id][1]+=q*R[1]}const y=[v.data.x-u[0],v.data.y-u[1]],x=Math.hypot(y[0],y[1]);y[0]=y[0]/x,y[1]=y[1]/x;const F=c*(p+1);i[v.id][0]-=F*y[0],i[v.id][1]-=F*y[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 y=0;y<u;y+=1){const{id:x}=c[y],F=t.getDegree(x);if(A&&F<=1)continue;const O=[e[x][0]-n[x][0],e[x][1]-n[x][1]],L=Math.hypot(O[0],O[1]),U=[e[x][0]+n[x][0],e[x][1]+n[x][1]],R=Math.hypot(U[0],U[1]);h[y]=L,d[y]=R/2,f+=(F+1)*h[y],g+=(F+1)*d[y]}const p=v;v=o*g/f,p!==0&&(v=v>1.5*p?1.5*p:v);for(let y=0;y<u;y+=1){const{id:x,data:F}=c[y],O=t.getDegree(x);if(A&&O<=1||ye(F.fx)&&ye(F.fy))continue;let L=s*v/(1+v*Math.sqrt(h[y])),U=Math.hypot(e[x][0],e[x][1]);U=U<1e-4?1e-4:U;const R=l/U;L=L>R?R:L;const j=L*e[x][0],q=L*e[x][1];t.mergeNodeData(x,{x:F.x+j,y:F.y+q})}return v}}const UD={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},RD=800;class DD{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},UD),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,D.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,D.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 x={nodes:[],edges:f};return this.lastResult=x,x}if(d.length===1){t&&e.mergeNodeData(d[0].id,{x:A[0],y:A[1],z:a===3?A[2]:void 0});const x={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=x,x}const g=d.map(x=>Pa(x,[s,o])),v=new Gr({nodes:g,edges:f}),p={};if(l&&g.forEach(x=>{const F=x.data[c];p[F]||(p[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=p,typeof window=="undefined")return;let y=0;return new Promise(x=>{this.timeInterval=window.setInterval(()=>{if(!this.running){x({nodes:g,edges:f});return}this.runOneStep(v,p,i),t&&g.forEach(({id:F,data:O})=>e.mergeNodeData(F,{x:O.x,y:O.y,z:a===3?O.z:void 0})),h==null||h({nodes:g,edges:f}),y++,y>=u&&(window.clearInterval(this.timeInterval),x({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),p=Math.sqrt(v),y={};if(this.applyCalculate(t,y,p,v),c){for(const F in e)e[F].cx=0,e[F].cy=0,e[F].count=0;g.forEach(F=>{const{data:O}=F,L=e[O[u]];ye(O.x)&&(L.cx+=O.x),ye(O.y)&&(L.cy+=O.y),L.count++});for(const F in e)e[F].cx/=e[F].count,e[F].cy/=e[F].count;const x=h||o;g.forEach((F,O)=>{const{id:L,data:U}=F;if(!ye(U.x)||!ye(U.y))return;const R=e[U[u]],j=Math.sqrt((U.x-R.cx)*(U.x-R.cx)+(U.y-R.cy)*(U.y-R.cy)),q=p*x;y[L].x-=q*(U.x-R.cx)/j,y[L].y-=q*(U.y-R.cy)/j})}g.forEach((x,F)=>{const{id:O,data:L}=x;if(!ye(L.x)||!ye(L.y))return;const U=.01*p*o;y[O].x-=U*(L.x-A[0]),y[O].y-=U*(L.y-A[1]),i===3&&(y[O].z-=U*(L.z-A[2]))}),g.forEach((x,F)=>{const{id:O,data:L}=x;if(ye(L.fx)&&ye(L.fy)){L.x=L.fx,L.y=L.fy,i===3&&(L.z=L.fz);return}if(!ye(L.x)||!ye(L.y))return;const U=Math.sqrt(y[O].x*y[O].x+y[O].y*y[O].y+(i===3?y[O].z*y[O].z:0));if(U>0){const R=Math.min(f*(l/RD),U);t.mergeNodeData(O,{x:L.x+y[O].x/U*R,y:L.y+y[O].y/U*R,z:i===3?L.z+y[O].z/U*R: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,p=h*g,y=d*g;e[s].x+=v,e[s].y+=p,e[l].x-=v,e[l].y-=p,this.options.dimensions===3&&(e[s].z+=y,e[l].z-=y)})})}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 PD={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 _D{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},PD),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,n){return(0,D.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 p=e.getAllNodes(),y=e.getAllEdges(),x=p==null?void 0:p.length;if(!x||x===1)return Ll(e,t,a);const F=p.map(mt=>Pa(mt));v!=="id"&&(!gn(v)||F[0].data[v]===void 0)&&(v="degree"),v==="degree"?F.sort((mt,Rt)=>e.getDegree(Rt.id,"both")-e.getDegree(mt.id,"both")):v==="id"?F.sort((mt,Rt)=>ye(Rt.id)&&ye(mt.id)?Rt.id-mt.id:`${mt.id}`.localeCompare(`${Rt.id}`)):F.sort((mt,Rt)=>Rt.data[v]-mt.data[v]);const O=!d&&typeof window!="undefined"?window.innerWidth:d,L=!f&&typeof window!="undefined"?window.innerHeight:f,U=x,R={rows:l,cols:c};if(l!=null&&c!=null)R.rows=l,R.cols=c;else if(l!=null&&c==null)R.rows=l,R.cols=Math.ceil(U/R.rows);else if(l==null&&c!=null)R.cols=c,R.rows=Math.ceil(U/R.cols);else{const mt=Math.sqrt(U*L/O);R.rows=Math.round(mt),R.cols=Math.round(O/L*mt)}if(R.rows=Math.max(R.rows,1),R.cols=Math.max(R.cols,1),R.cols*R.rows>U){const mt=t0(R),Rt=e0(R);(mt-1)*Rt>=U?t0(R,mt-1):(Rt-1)*mt>=U&&e0(R,Rt-1)}else for(;R.cols*R.rows<U;){const mt=t0(R),Rt=e0(R);(Rt+1)*mt>=U?e0(R,Rt+1):t0(R,mt+1)}let j=s?0:O/R.cols,q=s?0:L/R.rows;if(A||u){const mt=Nl(10,u),Rt=Vy(30,h,!1);F.forEach(Qt=>{(!Qt.data.x||!Qt.data.y)&&(Qt.data.x=0,Qt.data.y=0);const yt=e.getNode(Qt.id),[xt,Dt]=Rh(Rt(yt)||30),Xt=mt!==void 0?mt(Qt):o,ne=xt+Xt,le=Dt+Xt;j=Math.max(j,ne),q=Math.max(q,le)})}const et={},it={row:0,col:0},dt={};for(let mt=0;mt<F.length;mt++){const Rt=F[mt];let Qt;if(g&&(Qt=g(e.getNode(Rt.id))),Qt&&(Qt.row!==void 0||Qt.col!==void 0)){const yt={row:Qt.row,col:Qt.col};if(yt.col===void 0)for(yt.col=0;i1(et,yt);)yt.col++;else if(yt.row===void 0)for(yt.row=0;i1(et,yt);)yt.row++;dt[Rt.id]=yt,l2(et,yt)}HD(Rt,a,j,q,dt,R,it,et)}const ft={nodes:F,edges:y};return t&&F.forEach(mt=>{e.mergeNodeData(mt.id,{x:mt.data.x,y:mt.data.y})}),ft})}}const t0=(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},e0=(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},i1=(r,t)=>r[`c-${t.row}-${t.col}`]||!1,l2=(r,t)=>r[`c-${t.row}-${t.col}`]=!0,c2=(r,t)=>{const e=r.cols||5;t.col++,t.col>=e&&(t.col=0,t.row++)},HD=(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(;i1(o,s);)c2(a,s);A=s.col*e+e/2+t[0],l=s.row*n+n/2+t[1],l2(o,s),c2(a,s)}r.data.x=A,r.data.y=l},GD=(r,t,e)=>{try{const n=NA.mul(NA.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 WC(n),A=NA.sqrt(o.diagonalMatrix).diagonal();return o.leftSingularVectors.toJSON().map(l=>NA.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}},zD=800,KD={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},VD=(r,t)=>{const e=Object.assign(Object.assign({},KD),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,p)=>{d[p]={x:0,y:0}}),WD(h,n,d,s,c,u),jD(n,d,o,A,l,f,a,c);return n},WD=(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}})})},jD=(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 p=Math.acos((f*l.x+g*l.y)/v);p>Math.PI/2&&(p-=Math.PI/2,f*=-1,g*=-1);const y=Math.cos(p)*v;l.x=f*y,l.y=g*y}),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/zD),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},ZD={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class YD{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},ZD),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,n){return(0,D.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:p=10,maxIteration:y=1e3}=i,x=e.getAllNodes(),F=e.getAllEdges(),O=!a&&typeof window!="undefined"?window.innerWidth:a,L=!s&&typeof window!="undefined"?window.innerHeight:s,U=o||[O/2,L/2];if(!(x!=null&&x.length)||x.length===1)return Ll(e,t,U);let R=x[0];if(gn(A)){for(let Pe=0;Pe<x.length;Pe++)if(x[Pe].id===A){R=x[Pe];break}}else R=A||x[0];const j=qD(x,R.id),q=ZC({nodes:x,edges:F},!1),et=jC(q),it=tP(et,j);$D(et,j,it+1);const dt=et[j];let ft=O-U[0]>U[0]?U[0]:O-U[0],mt=L-U[1]>U[1]?U[1]:L-U[1];ft===0&&(ft=O/2),mt===0&&(mt=L/2);const Rt=Math.min(ft,mt),Qt=Math.max(...dt),yt=[],xt=l||Rt/Qt;dt.forEach((Pe,en)=>{yt[en]=Pe*xt});const Dt=XD(x,et,v,yt,xt,g,p),Xt=JD(Dt),ne=GD(v,Dt,v);let le=ne.map(([Pe,en])=>({x:(isNaN(Pe)?Math.random()*v:Pe)-ne[j][0],y:(isNaN(en)?Math.random()*v:en)-ne[j][1]}));this.run(y,le,Xt,Dt,yt,j);let ge;if(d){ge=Wy(c,u);const Pe={nodes:x,nodeSizeFunc:ge,positions:le,radii:yt,height:L,width:O,strictRadial:!!h,focusIdx:j,iterations:f||200,k:le.length/4.5};le=VD(e,Pe)}const xe=[];return le.forEach((Pe,en)=>{const mn=Pa(x[en]);mn.data.x=Pe.x+U[0],mn.data.y=Pe.y+U[1],xe.push(mn)}),t&&xe.forEach(Pe=>e.mergeNodeData(Pe.id,{x:Pe.data.x,y:Pe.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=YC(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,p)=>{if(l===p)return;const y=YC(A,v),x=y===0?0:1/y,F=i[p][l];f+=a[l][p],h+=a[l][p]*(v.x+F*(A.x-v.x)*x),d+=a[l][p]*(v.y+F*(A.y-v.y)*x)});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 XD=(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,p;if(A[r[c].id])v=A[r[c].id];else{const y=(a==="id"?r[c].id:(f=r[c].data)===null||f===void 0?void 0:f[a])||0;gn(y)?v=y.charCodeAt(0):v=y,A[r[c].id]=v}if(A[r[d].id])p=A[r[d].id];else{const y=(a==="id"?r[d].id:(g=r[d].data)===null||g===void 0?void 0:g[a])||0;gn(y)?p=y.charCodeAt(0):p=y,A[r[d].id]=p}u.push(h*(Math.abs(v-p)*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},JD=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},qD=(r,t)=>{let e=-1;return r.forEach((n,i)=>{n.id===t&&(e=i)}),Math.max(e,0)},$D=(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}}},tP=(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},eP={center:[0,0],width:300,height:300};class nP{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},eP),t)}execute(t,e){return(0,D.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,D.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,n){return(0,D.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 rP(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 a1=new Map;function s1(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];a1.has(r)||a1.set(r,rP(e));var o=a1.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 iP=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 n0 extends Rg{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const t=this.context.model.getRootsData();if(!(oo(t)||t.length>2))return t[0]}formatSize(t){const e=typeof t=="function"?t:()=>t;return n=>Da(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=(x,F=0)=>{var O;return F+=n*((x.children||[]).length+1),(O=x.children)===null||O===void 0||O.forEach(L=>{var U;(U=A.getNodeLikeDatum(L).children)===null||U===void 0||U.forEach(j=>{const q=A.getNodeLikeDatum(j);F=u(q,F)})}),F},h=x=>{if(x.depth===1)return c;const F=A.getParentData(x.id,"tree");if(Yc(x)){const O=A.getParentData(F.id,"tree"),L=g(x)-g(O);return h(F)+L*n/a}else{const O=(F.children||[]).indexOf(x.id),L=A.getNodeData((F.children||[]).slice(O));return d(F)-L.reduce((U,R)=>U+u(R),0)-l(F)[0]/2}},d=s1(x=>{if(o1(x))return l(x)[0]/2;const F=A.getParentData(x.id,"tree");if(Yc(x))return h(x)+u(x)+l(x)[0]/2;{const O=g(x)-g(F),L=n/a;return h(x)+O*L}},x=>x.id),f=x=>g(A.getParentData(x,"tree")),g=s1(x=>{if(o1(x))return o/2;if(Yc(x)){const F=A.getParentData(x.id,"tree"),O=F.children.indexOf(x.id);if(O===0)return f(F.id)+a;const L=A.getNodeLikeDatum(F.children[O-1]);if(oo(L.children))return g(L)+a;const U=A.getDescendantsData(L.id);return Math.max(...U.map(R=>Yc(R)?f(R.id):g(R)))+a}else{if(oo(x.children))return f(x.id)+a;const F=A.getNodeLikeDatum(x.children.slice(-1)[0]);if(oo(F.children))return g(F)+a;const O=A.getDescendantsData(x.id).slice(-1)[0];return(Yc(O)?f(O.id):g(O))+a}},x=>x.id);let v=0;const p={nodes:[],edges:[]},y=x=>{var F;(F=x.children)===null||F===void 0||F.forEach(j=>y(A.getNodeLikeDatum(j)));const O=g(x),L=d(x);if(p.nodes.push({id:x.id,x:L,y:O}),o1(x))return;const U=A.getRelatedEdgesData(x.id,"in")[0],R=[h(x),Yc(x)?O:f(x.id)];p.edges.push({id:Nt(U),controlPoints:[R],relatedNodeId:x.id}),v=Math.max(v,L+i(x)),x.depth===1&&(c=v)};return y(t),p}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(oo(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 iP(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},n0.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(u2(v,{x:f,y:g}))}),A.edges.forEach(h=>{const{id:d,controlPoints:f}=h,g=l.getEdgeDatum(d);u.push(u2(g,{controlPoints:f}))}),{nodes:c,edges:u}})}}n0.defaultOptions={direction:"RL",getRibSep:()=>60};const u2=(r,t)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),t)}),o1=r=>r.depth===0,Yc=r=>(r.depth||(r.depth=0))%2===0;var aP=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 r0 extends Rg{constructor(){super(...arguments),this.id="snake"}formatSize(t,e){const n=typeof e=="function"?e:()=>e;return t.reduce((i,a)=>{const[s,o]=Da(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 aP(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({},r0.defaultOptions,this.options,e),[d,f,g,v]=Ua(a),p=this.formatSize(t.nodes||[],i),y=Math.ceil((t.nodes||[]).length/o);let x=A||(u-v-f-o*p[0])/(o-1),F=l||(h-d-g-y*p[1])/(y-1);return(F===1/0||F<0)&&(F=0),(x===1/0||x<0)&&(x=0),{nodes:((s?(n=t.nodes)===null||n===void 0?void 0:n.sort(s):sP(t))||[]).map((U,R)=>{const j=Math.floor(R/o),q=R%o,et=c?j%2===0?q:o-1-q:j%2===0?o-1-q:q,it=v+et*(p[0]+x)+p[0]/2,dt=d+j*(p[1]+F)+p[1]/2;return{id:U.id,style:{x:it,y:dt}}})}})}}r0.defaultOptions={padding:0,cols:5,clockwise:!0};function sP(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 oP=["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)"],AP=["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)"],lP=["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)"],cP=["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)"],uP=["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 hP=function(r,t,e){if(!Qi(r)&&!_c(r))return r;var n=e;return lx(r,function(i,a){n=t(n,i,a)}),n},dP=hP,A1=function(r,t){return dP(r,function(e,n,i){return t.includes(i)||(e[i]=n),e},{})};class yi extends Ay{}function Xc(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 l1(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 fP=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 i0 extends yi{constructor(t,e){super(t,Object.assign({},i0.defaultOptions,e)),this.$element=Xc("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return fP(this,void 0,void 0,function*(){e.update.call(this,t),Object.assign(this.$element.style,A1(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}i0.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};function c1(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 kA(r,t,e,n){return(r-e)*(r-e)+(t-n)*(t-n)}function h2(r,t,e,n,i){return kA(r,t,e,n)<i*i}function gP(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 d2(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 wi{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 wi(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 c1(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 Nr;(function(r){r[r.POINT=1]="POINT",r[r.PARALLEL=2]="PARALLEL",r[r.COINCIDENT=3]="COINCIDENT",r[r.NONE=4]="NONE"})(Nr||(Nr={}));class u1{constructor(t,e=0,n=0){this.state=t,this.x=e,this.y=n}}function a0(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 u1(Nr.POINT,r.x1+a*(r.x2-r.x1),r.y1+a*(r.y2-r.y1)):new u1(Nr.NONE)}return new u1(e===0||n===0?Nr.COINCIDENT:Nr.PARALLEL)}function f2(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 vP(r,t){function e(i,a,s,o){let A=f2(t,new wi(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 s0(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 g2(r,t){let e=t.x1,n=t.y1;const i=t.x2,a=t.y2,s=Array.from(s0(r,i,a));if(s.length===0)return!0;let o=s0(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=s0(r,e,n)}return!0}function pP(r,t){let e=Number.POSITIVE_INFINITY,n=0;function i(a,s,o,A){let l=f2(t,new wi(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 mP(r,t){let e=0;const n=a0(r,new wi(t.x,t.y,t.x2,t.y));e+=n.state===Nr.POINT?1:0;const i=a0(r,new wi(t.x,t.y,t.x,t.y2));e+=i.state===Nr.POINT?1:0;const a=a0(r,new wi(t.x,t.y2,t.x2,t.y2));e+=a.state===Nr.POINT?1:0;const s=a0(r,new wi(t.x2,t.y,t.x2,t.y2));return e+=s.state===Nr.POINT?1:0,{top:n,left:i,bottom:a,right:s,count:e}}class Hi{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 Hi(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 Hi(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=s0(this,t,e);return n.has(Lr.TOP)?n.has(Lr.LEFT)?kA(t,e,this.x,this.y):n.has(Lr.RIGHT)?kA(t,e,this.x2,this.y):(this.y-e)*(this.y-e):n.has(Lr.BOTTOM)?n.has(Lr.LEFT)?kA(t,e,this.x,this.y2):n.has(Lr.RIGHT)?kA(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 yP(r){if(r.length===0)return null;const t=r[0],e=new Hi(t.x,t.y,0,0);for(const n of r)e.addPoint(n);return e}class o0{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 o0(t.cx,t.cy,t.radius)}containsPt(t,e){return kA(this.cx,this.cy,t,e)<this.radius*this.radius}distSquare(t,e){const n=kA(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 Ql{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 Ql(this.pixelGroup,t.x,t.y,e.x,e.y,t.width,t.height)}static fromPixelRegion(t,e){return new Ql(e,0,0,t.x,t.y,Math.ceil(t.width/e),Math.ceil(t.height/e))}copy(t,e){return new Ql(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 Hi(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 Hi(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 v2(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 p2(r,t,e){return m2(Object.assign(d2(r),{distSquare:(n,i)=>c1(r.x1,r.y1,r.x2,r.y2,n,i)}),t,e)}function m2(r,t,e){const n=v2(r,e),i=t.scale(n),a=t.createSub(i,n);return wP(a,t,e,(s,o)=>r.distSquare(s,o)),a}function wP(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 EP(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 y=t.invertScaleX(n.x+n.width/2);for(let x=1;x<f;x++){const F=t.invertScaleY(n.y-x),O=r.distSquare(y,F);if(O<h){const L=e-Math.sqrt(O);d.push(L*L)}else break}}const g=[],v=Math.max(s,A),p=Math.max(o,A);for(let y=1;y<v;y++){const x=t.invertScaleX(n.x-y),F=[];for(let O=1;O<p;O++){const L=t.invertScaleY(n.y-O),U=r.distSquare(x,L);if(U<h){const R=e-Math.sqrt(U);F.push(R*R)}else F.push(0)}g.push(F)}for(let y=1;y<Math.min(o,d.length);y++){const x=d[y];a.fillHorizontalLine(s,o-y,c+1,x)}for(let y=1;y<Math.min(l,d.length);y++){const x=d[y];a.fillHorizontalLine(s,o+u+y,c+1,x)}for(let y=1;y<Math.min(s,d.length);y++){const x=d[y];a.fillVerticalLine(s-y,o,u+1,x)}for(let y=1;y<Math.min(l,d.length);y++){const x=d[y];a.fillVerticalLine(s+c+y,o,u+1,x)}for(let y=1;y<s;y++){const x=g[y-1],F=s-y;for(let O=1;O<o;O++)a.set(F,o-O,x[O-1]);for(let O=1;O<l;O++)a.set(F,o+u+O,x[O-1])}for(let y=1;y<A;y++){const x=g[y-1],F=s+c+y;for(let O=1;O<o;O++)a.set(F,o-O,x[O-1]);for(let O=1;O<l;O++)a.set(F,o+u+O,x[O-1])}return a}function eK(r,t,e,n){return{x:r,y:t,width:e,height:n}}function nK(r,t,e){return{cx:r,cy:t,radius:e}}function rK(r,t,e,n){return{x1:r,y1:t,x2:e,y2:n}}function gr(r,t){return{x:r,y:t}}function BP(r,t,e,n){if(r.length===0)return[];const i=MP(r);return i.map((a,s)=>{const o=i.slice(0,s);return bP(t,a,o,e,n)}).flat()}function bP(r,t,e,n,i){const a=gr(t.cx,t.cy),s=SP(a,e,r);if(s==null)return[];const o=new wi(a.x,a.y,s.cx,s.cy),A=xP(o,r,n,i);return CP(A,r)}function xP(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=y2(t,A),c=l?mP(A,l):null;if(!l||!c||c.count!==2){s||i.push(A);continue}let u=n,h=l0(l,u,c,!0),d=QA(h,a)||QA(h,i),f=A0(h,t);for(;!d&&f&&u>=1;)u/=1.5,h=l0(l,u,c,!0),d=QA(h,a)||QA(h,i),f=A0(h,t);if(h&&!d&&!f&&(a.push(new wi(A.x1,A.y1,h.x,h.y)),a.push(new wi(h.x,h.y,A.x2,A.y2)),s=!0),s)continue;u=n,h=l0(l,u,c,!1);let g=QA(h,a)||QA(h,i);for(f=A0(h,t);!g&&f&&u>=1;)u/=1.5,h=l0(l,u,c,!1),g=QA(h,a)||QA(h,i),f=A0(h,t);h&&!g&&(a.push(new wi(A.x1,A.y1,h.x,h.y)),a.push(new wi(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 CP(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 wi(n.x1,n.y1,i.x2,i.y2);y2(t,a)?(e.push(n),r.push(i)):r.push(a)}return e}function SP(r,t,e){let n=Number.POSITIVE_INFINITY;return t.reduce((i,a)=>{const s=kA(r.x,r.y,a.cx,a.cy);if(s>n)return i;const o=new wi(r.x,r.y,a.cx,a.cy),A=FP(e,o);return s*(A+1)*(A+1)<n&&(i=a,n=s*(A+1)*(A+1)),i},null)}function MP(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 A0(r,t){return t.some(e=>e.containsPt(r.x,r.y))}function QA(r,t){return t.some(e=>!!(h2(e.x1,e.y1,r.x,r.y,.001)||h2(e.x2,e.y2,r.x,r.y,.001)))}function y2(r,t){let e=Number.POSITIVE_INFINITY,n=null;for(const i of r){if(!g2(i,t))continue;const a=pP(i,t);a>=0&&a<e&&(n=i,e=a)}return n}function FP(r,t){return r.reduce((e,n)=>g2(n,t)&&vP(n,t)?e+1:e,0)}function l0(r,t,e,n){const i=e.top,a=e.left,s=e.bottom,o=e.right;if(n){if(a.state===Nr.POINT){if(i.state===Nr.POINT)return gr(r.x-t,r.y-t);if(s.state===Nr.POINT)return gr(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?gr(r.x-t,r.y-t):gr(r.x2+t,r.y-t):a.y<o.y?gr(r.x-t,r.y2+t):gr(r.x2+t,r.y2+t)}if(o.state===Nr.POINT){if(i.state===Nr.POINT)return gr(r.x2+t,r.y-t);if(s.state===Nr.POINT)return gr(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?gr(r.x-t,r.y-t):gr(r.x-t,r.y2+t):i.x<s.x?gr(r.x2+t,r.y-t):gr(r.x2+t,r.y2+t)}if(a.state===Nr.POINT){if(i.state===Nr.POINT)return gr(r.x2+t,r.y2+t);if(s.state===Nr.POINT)return gr(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?gr(r.x2+t,r.y2+t):gr(r.x-t,r.y2+t):a.y<o.y?gr(r.x2+t,r.y-t):gr(r.x-t,r.y-t)}if(o.state===Nr.POINT){if(i.state===Nr.POINT)return gr(r.x-t,r.y2+t);if(s.state===Nr.POINT)return gr(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?gr(r.x2+t,r.y2+t):gr(r.x2+t,r.y-t):i.x<s.x?gr(r.x-t,r.y2+t):gr(r.x-t,r.y-t)}function TP(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(c1(a.x,a.y,s.x,s.y,A.x,A.y)>n)return!1}return!0}function OP(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(;TP(t,n,a,i);)a++;e.push(t.get(n)),n=a}return new Ul(e)}}function IP(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 NP(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=IP(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 Ul(o)}}function LP(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 Ul(i)}}class Ul{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:gP(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 LP(t)(this)}simplify(t){return OP(t)(this)}bSplines(t){return NP(t)(this)}apply(t){return t(this)}containsElements(t){const e=yP(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 wi(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 kP{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 Ul(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 Gh=0,c0=1,u0=2,h1=3;function QP(r,t){const e=(Math.floor(r.width)+Math.floor(r.height))*2,n=new kP(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=Gh;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=c0;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=u0;break;case 12:case 14:case 4:s=h1;break;case 6:s=s===Gh?h1:u0;break;case 1:case 13:case 5:s=Gh;break;case 9:s=s===u0?Gh:c0;break;case 10:case 8:case 11:s=c0;break;default:return console.warn("Marching squares invalid state: "+v),!0}switch(s){case Gh:u--,d-=r.pixelGroup;break;case c0:u++,d+=r.pixelGroup;break;case h1:c--,h-=r.pixelGroup;break;case u0: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 h0={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 zh(r){return r!=null&&typeof r.radius=="number"}function w2(r,t){if(zh(r)!==zh(t))return!1;if(zh(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 Is;(function(r){r[r.MEMBERS=0]="MEMBERS",r[r.NON_MEMBERS=1]="NON_MEMBERS",r[r.EDGES=2]="EDGES"})(Is||(Is={}));class d1{constructor(t={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new Hi(0,0,0,0),this.potentialArea=new Ql(1,0,0,0,0,0,0),this.o=Object.assign({},h0,t)}pushMember(...t){if(t.length!==0){this.dirty.add(Is.MEMBERS);for(const e of t)this.members.push({raw:e,obj:zh(e)?o0.from(e):Hi.from(e),area:null})}}removeMember(t){const e=this.members.findIndex(n=>w2(n.raw,t));return e<0?!1:(this.members.splice(e,1),this.dirty.add(Is.MEMBERS),!0)}removeNonMember(t){const e=this.nonMembers.findIndex(n=>w2(n.raw,t));return e<0?!1:(this.nonMembers.splice(e,1),this.dirty.add(Is.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(Is.NON_MEMBERS),!0)}pushNonMember(...t){if(t.length!==0){this.dirty.add(Is.NON_MEMBERS);for(const e of t)this.nonMembers.push({raw:e,obj:zh(e)?o0.from(e):Hi.from(e),area:null})}}pushEdge(...t){if(t.length!==0){this.dirty.add(Is.EDGES);for(const e of t)this.edges.push({raw:e,obj:wi.from(e),area:null})}}update(){const t=this.dirty.has(Is.MEMBERS),e=this.dirty.has(Is.NON_MEMBERS);let n=this.dirty.has(Is.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=BP(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=RP(i,l),u=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,h=Hi.from(v2(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=Ql.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=Ql.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 Hi?"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 Hi?"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 Hi?EP(l.obj,this.potentialArea,this.o.nodeR1):m2(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=p2(l.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(l=>{l.area||(l.area=p2(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 Ul([]);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 UP(e,n,i,a,o=>o.containsElements(s),t)}}function UP(r,t,e,n,i,a={}){const s=Object.assign({},h0,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=QP(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 Ul([])}function RP(r,t){if(r.length===0)return new Hi(0,0,0,0);const e=Hi.from(r[0]);for(const n of r)e.add(n);for(const n of t)e.add(d2(n));return e}function iK(r,t=[],e=[],n={}){if(r.length===0)return new Ul([]);const i=new d1(n);return i.pushMember(...r),i.pushNonMember(...t),i.pushEdge(...e),i.compute()}var DP=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 d0 extends yi{constructor(t,e){super(t,Si({},d0.defaultOptions,e)),this.path=null,this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:i}=this.parseOptions();Pr(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 Sh({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=Nt(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&&Pr(a,s)&&Pr(o,A))return this.path;const{enter:l=[],exit:c=[]}=BA(s,a,v=>v),{enter:u=[],exit:h=[]}=BA(A,o,v=>v);if(n){const v=a.includes(n),p=o.includes(n);v&&(c.push(n),l.push(n)),p&&(h.push(n),u.push(n))}const d=(v,p,y)=>{v.forEach(x=>{const F=y?this.members:this.avoidMembers,O=y?"pushMember":"pushNonMember",L=y?"removeMember":"removeNonMember";if(p){let U;i.getElementType(x)==="edge"?([U]=_P(i,x),this.bubbleSets.pushEdge(U)):([U]=PP(i,x),this.bubbleSets[O](U)),F.set(x,U)}else{const U=F.get(x);U&&(i.getElementType(x)==="edge"?this.bubbleSets.removeEdge(U):this.bubbleSets[L](U),F.delete(x))}})};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=jb(g.points.map(Mi)),this.path},this.bindEvents(),this.bubbleSets=new d1(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 d1(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=DP(t,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((A,l)=>(l in h0?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=Vt(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()}}d0.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},h0);const PP=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getElementRenderBounds(n);return new Hi(i.min[0],i.min[1],io(i),ao(i))}),_P=(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 wi.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});class aK 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 HP(r){return`
|
|
|
<ul class="g6-contextmenu-ul">
|
|
|
${r.map(t=>`<li class="g6-contextmenu-li" value="${t.value}">${t.name}</li>`).join("")}
|
|
|
</ul>
|
|
|
`}const GP=`
|
|
|
.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 E2=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 yi{constructor(t,e){super(t,Object.assign({},f0.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=Xc("contextmenu",!1,{zIndex:"99"});const{className:t}=this.options;t&&this.$element.classList.add(t),this.context.canvas.getContainer().appendChild(this.$element),l1("g6-contextmenu-css","style",{},GP,document.head)}show(t){return E2(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 E2(this,void 0,void 0,function*(){const{getContent:e,getItems:n}=this.options;return n?HP(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)}}f0.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class g0 extends yi{constructor(t,e){super(t,Object.assign({},g0.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 p=Nt(g);f[p]=this.getEdgeForces(g,c,l);for(let y=0;y<c+1;y++)(v=this.edgePoints)[p]||(v[p]=[]),this.edgePoints[p][y]=$e(this.edgePoints[p][y],f[p][y])})}l/=2,c*=A,u*=o,this.divideEdges(c)}a.forEach(h=>{const d=Nt(h),f=i.getElement(d);f==null||f.update({d:Sy(this.edgePoints[d])})})},this.bindEvents()}get nodeMap(){const t=this.context.model.getNodeData();return Object.fromEntries(t.map(e=>[Nt(e),bl(li(e))]))}divideEdges(t){this.context.model.getEdgeData().forEach(n=>{var i;const a=Nt(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(Ms($e(s,o),2)),this.edgePoints[a].push(o);else{const l=(this.edgePoints[a].length===0?cr(s,o):jP(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=cr(f,d);for(;g>c;){const v=c/g,p=$e(d,Ss(tr(f,d),v));u.push(p),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=cr(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=zP(n,i),s=KP(n,i),o=VP(n,i),A=WP(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=Nt(i)]||(t[A]=[]),t[Nt(i)].push(s),t[l=Nt(s)]||(t[l]=[]),t[Nt(s)].push(i))})}),t}getSpringForce(t,e){const{pre:n,cur:i,next:a}=t;return Ss(tr($e(n,a),Ss(i,2)),e)}getElectrostaticForce(t,e){oo(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[Nt(e)];let i=[0,0];return n==null||n.forEach(a=>{const s=this.edgePoints[Nt(a)][t],o=this.edgePoints[Nt(e)][t],A=tr(s,o),l=cr(s,o);i=$e(i,Ss(A,1/l))}),i}getEdgeForces(t,e,n){const i=this.nodeMap[t.source],a=this.nodeMap[t.target],s=this.options.K/(cr(i,a)*(e+1)),o=[[0,0]],A=Nt(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(Ss($e(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()}}g0.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const zP=(r,t)=>Math.abs(gL([r.vx,r.vy],[t.vx,t.vy])/(r.length*t.length)),KP=(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)},VP=(r,t)=>{const e=(r.length+t.length)/2,n=Ms($e(r.source,r.target),2),i=Ms($e(t.source,t.target),2);return e/(e+cr(n,i))},B2=(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]},b2=(r,t)=>{const e=B2(t.source,r),n=B2(t.target,r),i=Ms($e(e,n),2),a=Ms($e(r.source,r.target),2);return cr(e,n)===0?0:Math.max(0,1-2*cr(a,i)/cr(e,n))},WP=(r,t)=>Math.min(b2(r,t),b2(t,r)),jP=r=>{let t=0;for(let e=1;e<r.length;e++)t+=cr(r[e],r[e-1]);return t},ZP={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8,zIndex:-1/0},x2=.05;class v0 extends yi{constructor(t,e){super(t,Object.assign({},v0.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Mi(n.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=n=>{const i=Object.assign({},ZP,this.options.style);this.isLensOn||(this.lens=new Sl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Fs(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(Nt(l),"node")),edges:o.filter(l=>n(Nt(l),"edge")),combos:A.filter(l=>n(Nt(l),"combo"))}},this.getFocusElements=n=>{const{nodes:i,edges:a}=this.getFilterData(),s=i.filter(l=>cr(li(l),n)<this.r),o=s.map(l=>Nt(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=Nt(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,p])=>{d.style[v]!==p&&(d.style[v]=p)}):(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||cr(u,h)>this.r)return;const{maxR:d,minR:f}=this.options,g=o+A>0?1/(1-x2):1-x2,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=Mi(n.canvas),s=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||cr(a,s)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Mi(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()}}v0.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const YP={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},C2=.05,S2=.1;class p0 extends yi{constructor(t,e){super(t,Object.assign({},p0.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=Mi(n.canvas);this.onMagnify(i)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const i=Object.assign({},YP,this.options.style);this.isLensOn||(this.lens=new Sl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Fs(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=li(l),u=cr(c,i);if(u>this.r)return;const h=a*u/(this.d*u+this.r),[d,f]=c,[g,v]=i,p=(d-g)/u,y=(f-v)/u,x=[g+h*p,v+h*y],F=Nt(l),O=this.getNodeStyle(l),L=Fl(n.getElementRenderStyle(F),Object.keys(O));s.set(F,Object.assign(Object.assign({},Fs(x)),O)),o.set(F,Object.assign(Object.assign({},Fs(c)),L))}),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}=BA(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(Nt(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!(cr(s,o)>this.r)},this.scaleR=n=>{const{maxR:i,minR:a}=this.options,s=n?1/(1-C2):1-C2,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+S2:this.d-S2;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=Mi(n.canvas),a=this.lens.getCenter();return!(cr(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=Mi(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()}}p0.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class m0 extends yi{constructor(t,e){super(t,Object.assign({},m0.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 CA(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||!XP()||this.$el.requestFullscreen().catch(t=>{va.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()}}m0.defaultOptions={trigger:{},autoFit:!0};function XP(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class y0 extends yi{constructor(t,e){super(t,Object.assign({},y0.defaultOptions,e)),this.$element=Xc("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=Ss(s||this.context.graph.getCanvasCenter(),1-A),c=this.baseSize*a,u=Ss(this.offset,A),h=cy(u,c),d=$e(h,l);this.$element.style.backgroundSize=`${c}px ${c}px`,this.$element.style.backgroundPosition=`${d[0]}px ${d[1]}px`,this.offset=cy(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=cy($e(this.offset,t),e),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}parseFollow(t){var e,n;return eA(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()}}y0.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};function f1(r){const t={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(e=>{const{type:n,value:i}=e,a=Nt(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 M2(r){const{NodeAdded:t=[],NodeUpdated:e=[],NodeRemoved:n=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:s=[],ComboAdded:o=[],ComboUpdated:A=[],ComboRemoved:l=[]}=Pf(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 F2(r,t){for(const e in r)br(r[e])&&!Array.isArray(r[e])&&r[e]!==null?(t[e]||(t[e]={}),F2(r[e],t[e])):t[e]===void 0&&(t[e]=gh(e))}function JP(r,t=!1,e){const n={animation:t,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:s}=M2(f1(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(Nt(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)})}F2(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 w0 extends yi{constructor(t,e){super(t,Object.assign({},w0.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(yb(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(JP(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(mA.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 Qg;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(mA.UNDO,a)}return this}redo(){const t=this.redoStack.pop();return t&&(this.executeCommand(t,!1),this.undoStackPush(t),this.notify(mA.REDO,t)),this}undoAndCancel(){const t=this.undoStack.pop();return t&&(this.executeCommand(t,!1),this.redoStack=[],this.notify(mA.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(mA.CLEAR,null)}notify(t,e){this.emitter.emit(t,{cmd:e}),this.emitter.emit(mA.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=[]}}w0.defaultOptions={stackSize:0};const g1={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 qP{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 $P(r,t){return new qP(r,t)}const T2=+(Math.pow(2,27)+1);function E0(r,t,e){const n=r*t,i=T2*r,a=i-r,s=i-a,o=r-s,A=T2*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 t4(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 e4(r,t){const e=r.length;if(e===1){const o=E0(r[0],t);return o[0]?o:[o[1]]}const n=new Array(2*e),i=[.1,.1],a=[.1,.1];let s=0;E0(r[0],t,i),i[0]&&(n[s++]=i[0]);for(let o=1;o<e;++o){E0(r[o],t,a);const A=i[1];t4(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 n4(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 r4(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return n4(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,p=v-f,y=g-p,x=y,F=v,O,L,U,R,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=x,v=f+g,p=v-f,y=g-p,y&&(a[s++]=y),O=F+v,L=O-F,U=O-L,R=v-L,j=F-U,x=j+R,F=O;for(;o<e;)f=c,g=x,v=f+g,p=v-f,y=g-p,y&&(a[s++]=y),O=F+v,L=O-F,U=O-L,R=v-L,j=F-U,x=j+R,F=O,o+=1,o<e&&(c=r[o]);for(;A<n;)f=h,g=x,v=f+g,p=v-f,y=g-p,y&&(a[s++]=y),O=F+v,L=O-F,U=O-L,R=v-L,j=F-U,x=j+R,F=O,A+=1,A<n&&(h=-t[A]);return x&&(a[s++]=x),F&&(a[s++]=F),s||(a[s++]=0),a.length=s,a}function i4(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 a4(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return i4(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,p=v-f,y=g-p,x=y,F=v,O,L,U,R,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=x,v=f+g,p=v-f,y=g-p,y&&(a[s++]=y),O=F+v,L=O-F,U=O-L,R=v-L,j=F-U,x=j+R,F=O;for(;o<e;)f=c,g=x,v=f+g,p=v-f,y=g-p,y&&(a[s++]=y),O=F+v,L=O-F,U=O-L,R=v-L,j=F-U,x=j+R,F=O,o+=1,o<e&&(c=r[o]);for(;A<n;)f=h,g=x,v=f+g,p=v-f,y=g-p,y&&(a[s++]=y),O=F+v,L=O-F,U=O-L,R=v-L,j=F-U,x=j+R,F=O,A+=1,A<n&&(h=t[A]);return x&&(a[s++]=x),F&&(a[s++]=F),s||(a[s++]=0),a.length=s,a}const O2=5,B0=11102230246251565e-32,s4=(3+16*B0)*B0,o4=(7+56*B0)*B0;function A4(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 l4(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 c4(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 b0(r){return(r===3?A4:r===4?l4:c4)(a4,E0,e4,r4)}const u4=b0(3),h4=b0(4),Rl=[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=s4*o;return s>=A||s<=-A?s:u4(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,p=a*c,y=a*l,x=s*A,F=u*(f-g)+h*(v-p)+d*(y-x),O=(Math.abs(f)+Math.abs(g))*Math.abs(u)+(Math.abs(v)+Math.abs(p))*Math.abs(h)+(Math.abs(y)+Math.abs(x))*Math.abs(d),L=o4*O;return F>L||-F>L?F:h4(t,e,n,i)}];function d4(r){let t=Rl[r.length];return t||(t=Rl[r.length]=b0(r.length)),t.apply(void 0,...r)}function f4(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 g4(){for(;Rl.length<=O2;)Rl.push(b0(Rl.length));const r=f4(void 0,d4,...Rl);for(let t=0;t<=O2;++t)r[t]=Rl[t];return r}var Kh=g4();const I2=Kh[3];function v4(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&&I2(r[n[c-2]],r[n[c-1]],l)<=0;)c-=1,n.pop();for(n.push(A),c=i.length;c>1&&I2(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 p4(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 m4(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?p4(r,t,e,n):!0}function y4(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 w4(r){return r.sort(function(t,e){return t[0]-e[0]||t[1]-e[1]})}function v1(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=v1(r,t),s=v1(r,e);return(n[0]*i[0]+n[1]*i[1])/Math.sqrt(a*s)}function L2(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])&&m4(r[0],r[1],n[0],n[1]))return!0}return!1}function E4(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 B4(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 b4(r,t,e){let n=null,i=Q2,a=Q2,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&&!L2([r[0],t[A]],e)&&!L2([r[1],t[A]],e)&&(i=s,a=o,n=t[A]);return n}function k2(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(v1(o[0],o[1])<t||i.has(A))continue;let l=0,c=B4(o),u,h,d;do c=n.extendBbox(c,l),u=c[2]-c[0],h=c[3]-c[1],d=b4(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?k2(r,t,e,n,i):r}function x4(r,t,e){const n=t||20,i=y4(w4(g1.toXy(r,e)));if(i.length<4){const u=i.concat([i[0]]);return e?g1.fromXy(u,e):u}const a=E4(i),s=[a[0]*U2,a[1]*U2],o=v4(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=k2(o,Math.pow(n,2),s,$P(A,l),new Set);return e?g1.fromXy(c,e):c}const Q2=Math.cos(90/(180/Math.PI)),U2=.6;function C4(r,t,e){if(r.length===1)return S4(r[0],t,e);if(r.length===2)return R2(r,t,e);if(r.length===3){const[n,i,a]=hy(r);if(Ob(n,i,a))return R2([n,a],t,e)}switch(e){case"smooth":return F4(r,t);case"sharp":return T4(r,t);case"rounded":default:return M4(r,t)}}const S4=(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]]},R2=(r,t,e)=>{const n=[t,t,0,0,0],i=e==="sharp"?$e(r[0],bA(Qo(tr(r[0],r[1])),t)):r[0],a=e==="sharp"?$e(r[1],bA(Qo(tr(r[1],r[0])),t)):r[1],s=bA(Qo(ng(tr(i,a),!1)),t),o=bA(s,-1),A=$e(i,s),l=$e(a,s),c=$e(a,o),u=$e(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]]]},M4=(r,t)=>{const e=hy(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),p=tr(o,f),y=(U,R)=>ly(U,R,!0)<Math.PI,x=y(g,v),F=y(v,p),O=U=>bA(Qo(ng(U,!1)),t),L=O(v);return[{p:bl(x?$e(d,O(g)):$e(d,L)),concave:x&&d},{p:bl(F?$e(o,O(p)):$e(o,L)),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})},F4=(r,t)=>{const e=hy(r).map((n,i)=>{const a=r[(i+1)%r.length];return{p:n,v:Qo(tr(a,n))}});return e.forEach((n,i)=>{const a=i>0?i-1:r.length-1,s=e[a].v,o=Qo($e(s,bA(n.v,ly(s,n.v,!0)<Math.PI?1:-1)));n.p=$e(n.p,bA(o,t))}),jb(e.map(n=>n.p))},T4=(r,t)=>{const n=r.map((a,s)=>{const o=r[s===0?r.length-1:s-1],A=wh(bA(Qo(ng(tr(o,a),!1)),t));return[$e(o,A),$e(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 uy(o,A,!0)}).filter(Boolean).map((a,s)=>[s===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var O4=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 x0 extends yi{constructor(t,e){super(t,Object.assign({},x0.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new Sh({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!Pr(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(Nt(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=x4(s.map(li),this.options.concavity).slice(1).reverse(),A=o.flatMap(l=>s.filter(c=>Pr(li(c),l)).map(Nt));return Pr(A,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=A,this.path=C4(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=O4(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=Vt(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()}}x0.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};function D2(r,t){t(r),r.children&&r.children.forEach(function(e){e&&D2(e,t)})}function Vh(r){C0(r,!0)}function Ns(r){C0(r,!1)}function C0(r,t){var e=t?"visible":"hidden";D2(r,function(n){n.attr("visibility",e)})}var I4=5,P2=function(r,t,e,n){e===void 0&&(e=0),n===void 0&&(n=I4),Object.entries(t).forEach(function(i){var a=(0,D.CR)(i,2),s=a[0],o=a[1],A=r;Object.prototype.hasOwnProperty.call(t,s)&&(o?_c(o)?(_c(r[s])||(A[s]={}),e<n?P2(r[s],o,e+1,n):A[s]=t[s]):Qi(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)P2(r,t[n]);return r},N4=function(r){(0,D.ZT)(t,r);function t(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var i=r.apply(this,(0,D.ev)([],(0,D.CR)(e),!1))||this;return i.isMutationObserved=!0,i.addEventListener(yn.INSERTED,function(){Ns(i)}),i}return t}(Ai);function _2(r){var t=r.appendChild(new N4({class:"offscreen"}));return Ns(t),t}function L4(r){for(var t=r;t;){if(t.className==="offscreen")return!0;t=t.parent}return!1}function k4(){C0(this,this.attributes.visibility!=="hidden")}var Mr=function(r){(0,D.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=_2(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"&&k4.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,D._T)(e,["x","y","transform","transformOrigin","class","className","zIndex"]);return c},t}(sh);function p1(r){return r.toString().charAt(0).toUpperCase()+r.toString().slice(1)}function Q4(r){return r.toString().charAt(0).toLowerCase()+r.toString().slice(1)}function U4(r,t){return"".concat(t).concat(p1(r))}function H2(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?Q4(a):a}function R4(r,t){Object.entries(t).forEach(function(e){var n=(0,D.CR)(e,2),i=n[0],a=n[1];(0,D.ev)([r],(0,D.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 S0=function(r,t){if(!(r!=null&&r.startsWith(t)))return!1;var e=r[t.length];return e>="A"&&e<="Z"};function tn(r,t,e){e===void 0&&(e=!1);var n={};return Object.entries(r).forEach(function(i){var a=(0,D.CR)(i,2),s=a[0],o=a[1];if(!(s==="className"||s==="class")){if(S0(s,"show")&&S0(H2(s,"show"),t)!==e)s===U4(t,"show")?n[s]=o:n[s.replace(new RegExp(p1(t)),"")]=o;else if(!S0(s,"show")&&S0(s,t)!==e){var A=H2(s,t);A==="filter"&&typeof o=="function"||(n[A]=o)}}}),n}function Jc(r,t){return Object.entries(r).reduce(function(e,n){var i=(0,D.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(p1(a))]=s,e},{})}function _o(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,D.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 D4=function(r){if(!Qi(r))return[];for(var t=[],e=0;e<r.length;e++)t=t.concat(r[e]);return t},P4=D4,m1=function(r){(0,D.ZT)(t,r);function t(e){e===void 0&&(e={});var n=e.style,i=(0,D._T)(e,["style"]);return r.call(this,(0,D.pi)({style:(0,D.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=_2(this)),this._offscreen},enumerable:!1,configurable:!0}),t.prototype.disconnectedCallback=function(){var e;(e=this._offscreen)===null||e===void 0||e.destroy()},t}(ml);function _4(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 H4(r){throw new Error(r)}var G4=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,D.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,D.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,D.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,D.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(q){return q}),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(q,et){return[a(q.__data__,et),q]})),g=new Map(this._facetElements.map(function(q,et){return[a(q.__data__,et),q]})),v=_4(this._elements,function(q){return s(q.__data__)}),p=0;p<i.length;p++){var y=i[p],x=a(y,p),F=s(y,p);if(f.has(x)){var O=f.get(x);O.__data__=y,O.__facet__=!1,c.push(O),u.delete(O),f.delete(x)}else if(g.has(x)){var O=g.get(x);O.__data__=y,O.__facet__=!0,c.push(O),g.delete(x)}else if(v.has(x)){var L=v.get(x);h.push([y,L]);try{for(var U=(o=void 0,(0,D.XA)(L)),R=U.next();!R.done;R=U.next()){var O=R.value;u.delete(O)}}catch(q){o={error:q}}finally{try{R&&!R.done&&(A=U.return)&&A.call(U)}finally{if(o)throw o.error}}v.delete(x)}else if(f.has(F)){var O=f.get(F);O.__toData__?O.__toData__.push(y):O.__toData__=[y],d.add(O),u.delete(O)}else l.push(y)}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,D.ev)((0,D.ev)([],(0,D.CR)(this._elements),!1),(0,D.CR)(i._elements),!1),s=(0,D.ev)((0,D.ev)([],(0,D.CR)(this._transitions),!1),(0,D.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:H4("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,D.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=P4(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,D.ev)([this._parent,this],(0,D.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:Ai,rect:Ci,circle:eo,path:Pi,text:m1,ellipse:oh,image:Ah,line:vl,polygon:pl,polyline:gf,html:gl},r}();function Ne(r){return new G4([r],null,r,r.ownerDocument)}function z4(r,t,e){return r.querySelector(t)?Ne(r).select(t):Ne(r).append(e)}var Gi=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 sK(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 Gi(n,i,A,l)}var Ls=function(r,t){var e=function(i){return"".concat(t,"-").concat(i)},n=Object.fromEntries(Object.entries(r).map(function(i){var a=(0,D.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 M0(r){return/\S+-\S+/g.test(r)?r.split("-").map(function(t){return t[0]}):r.length>2?[r[0]]:r.split("")}function Oi(r){if(ye(r))return[r,r,r,r];if(Qi(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 ma(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 zi(r,t,e){return e?"".concat(r," ").concat(e,"legend-").concat(t):r}function oK(r,t,e){var n=r.classNamePrefix,i=n===void 0?"":n;return zi(t.name,e,i)}var sa={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"},y1=Ls({text:"text"},"title");function K4(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=M0(n),c=(0,D.CR)(Oi(s?i:0),4),u=c[0],h=c[1],d=c[2],f=c[3],g=(0,D.CR)(Oi(a),4),v=g[0],p=g[1],y=g[2],x=g[3],F=(0,D.CR)([f+h,u+d],2),O=F[0],L=F[1],U=(0,D.CR)([x+p,v+y],2),R=U[0],j=U[1];if(l[0]==="l")return new Gi(o.x,o.y,A.width+o.width+O+R,Math.max(A.height+j,o.height));if(l[0]==="t")return new Gi(o.x,o.y,Math.max(A.width+R,o.width),A.height+o.height+L+j);var q=(0,D.CR)([t.attributes.width||A.width,t.attributes.height||A.height],2),et=q[0],it=q[1];return new Gi(A.x,A.y,et+o.width+O+R,it+o.height+L+j)}function V4(r,t){var e=Object.entries(t).reduce(function(n,i){var a=(0,D.CR)(i,2),s=a[0],o=a[1],A=r.node().attr(s);return A||(n[s]=o),n},{});r.styles(e)}function W4(r){var t,e,n,i,a=r,s=a.width,o=a.height,A=a.position,l=(0,D.CR)([+s/2,+o/2],2),c=l[0],u=l[1],h=(0,D.CR)([+c,+u,"center","middle"],4),d=h[0],f=h[1],g=h[2],v=h[3],p=M0(A);return p.includes("l")&&(t=(0,D.CR)([0,"start"],2),d=t[0],g=t[1]),p.includes("r")&&(e=(0,D.CR)([+s,"end"],2),d=e[0],g=e[1]),p.includes("t")&&(n=(0,D.CR)([0,"top"],2),f=n[0],v=n[1]),p.includes("b")&&(i=(0,D.CR)([+o,"bottom"],2),f=i[0],v=i[1]),{x:d,y:f,textAlign:g,textBaseline:v}}var j4=function(r){(0,D.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(y1.text.class);if(!l)return new Gi(0,0,+i,+a);var c=l.getBBox(),u=c.width,h=c.height,d=(0,D.CR)(Oi(o),4),f=d[0],g=d[1],v=d[2],p=d[3],y=(0,D.CR)([0,0,+i,+a],4),x=y[0],F=y[1],O=y[2],L=y[3],U=M0(s);if(U.includes("i"))return new Gi(x,F,O,L);U.forEach(function(Rt,Qt){var yt,xt,Dt,Xt;Rt==="t"&&(yt=(0,D.CR)(Qt===0?[h+v,+a-h-v]:[0,+a],2),F=yt[0],L=yt[1]),Rt==="r"&&(xt=(0,D.CR)([+i-u-p],1),O=xt[0]),Rt==="b"&&(Dt=(0,D.CR)([+a-h-f],1),L=Dt[0]),Rt==="l"&&(Xt=(0,D.CR)(Qt===0?[u+g,+i-u-g]:[0,+i],2),x=Xt[0],O=Xt[1])});var R=(0,D.CR)(Oi(A),4),j=R[0],q=R[1],et=R[2],it=R[3],dt=(0,D.CR)([it+q,j+et],2),ft=dt[0],mt=dt[1];return new Gi(x+it,F+j,O-ft,L-mt)},t.prototype.getBBox=function(){return this.title?this.title.getBBox():new Gi(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,D._T)(e,["width","height","position","spacing","classNamePrefix"]),u=(0,D.CR)(_o(c),1),h=u[0],d=W4(e),f=d.x,g=d.y,v=d.textAlign,p=d.textBaseline;ma(!!c.text,Ne(n),function(y){var x=zi(y1.text.name,sa.title,l);i.title=y.maybeAppendByClassName(y1.text,"text").attr("className",x).styles(h).call(V4,{x:f,y:g,textAlign:v,textBaseline:p}).node()})},t}(Mr),w1=function(){};function ya(r,t){return Vt(r)?r.apply(void 0,(0,D.ev)([],(0,D.CR)(t),!1)):r}function Z4(r,t){return r.reduce(function(e,n){return(e[n[t]]=e[n[t]]||[]).push(n),e},{})}function Y4(r){return typeof r=="boolean"?!1:"enter"in r&&"update"in r&&"exit"in r}function G2(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,D.CR)(n,1),a=i[0];return!t.includes(a)}));return Object.fromEntries(t.map(function(n){return Y4(r)?r[n]===!1?[n,!1]:[n,(0,D.pi)((0,D.pi)({},r[n]),e)]:[n,e]}))}function qc(r,t){r?r.finished.then(t):t()}function X4(r,t){r.length===0?t():Promise.all(r.map(function(e){return e==null?void 0:e.finished})).then(t)}function z2(r,t){"update"in r?r.update(t):r.attr(t)}function K2(r,t,e){if(t.length===0)return null;if(!e){var n=t.slice(-1)[0];return z2(r,{style:n}),null}return r.animate(t,e)}function J4(r,t){return!(r.nodeName!=="text"||t.nodeName!=="text"||r.attributes.text!==t.attributes.text)}function q4(r,t,e,n){if(n===void 0&&(n="destroy"),J4(r,t))return r.remove(),[null];var i=function(){n==="destroy"?r.destroy():n==="hide"&&Ns(r),t.isVisible()&&Vh(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,D.CR)(r.getGeometryBounds().center,2),h=u[0],d=u[1],f=(0,D.CR)(t.getGeometryBounds().center,2),g=f[0],v=f[1],p=(0,D.CR)([(h+g)/2-h,(d+v)/2-d],2),y=p[0],x=p[1],F=r.style.opacity,O=F===void 0?1:F,L=t.style.opacity,U=L===void 0?1:L,R=r.style.transform||"",j=t.style.transform||"",q=r.animate([{opacity:O,transform:"translate(0, 0) ".concat(R)},{opacity:0,transform:"translate(".concat(y,", ").concat(x,") ").concat(R)}],(0,D.pi)((0,D.pi)({fill:"both"},e),{duration:A+l+c})),et=t.animate([{opacity:0,transform:"translate(".concat(-y,", ").concat(-x,") ").concat(j),offset:.01},{opacity:U,transform:"translate(0, 0) ".concat(j)}],(0,D.pi)((0,D.pi)({fill:"both"},e),{duration:l+c,delay:A+l-c}));return qc(et,i),[q,et]}function ks(r,t,e){var n={},i={};return Object.entries(t).forEach(function(a){var s=(0,D.CR)(a,2),o=s[0],A=s[1];if(!Re(A)){var l=r.style[o]||r.parsedStyle[o]||0;l!==A&&(n[o]=l,i[o]=A)}}),e?K2(r,[n,i],(0,D.pi)({fill:"both"},e)):(z2(r,i),null)}function $4(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 E1(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 V2=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"]]},t_=V2,e_=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"]]},n_=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"]]},i_=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"]]},a_=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"]]},s_=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"]]},W2=function(r,t,e){return[["M",r,t+e],["L",r,t-e]]},o_=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]]},A_=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]]},l_=function(r,t,e){return[["M",r-e,t],["L",r+e,t],["M",r,t-e],["L",r,t+e]]},c_=function(r,t,e){return[["M",r-e,t],["L",r+e,t]]},j2=function(r,t,e){return[["M",r-e,t],["L",r+e,t]]},u_=j2,h_=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]]},d_=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]]},f_=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]]},g_=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 v_(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 p_=function(r,t,e){return[["M",r-e,t-e],["L",r+e,t],["L",r-e,t+e],["Z"]]},m_=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]]},oa=Ls({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"),y_=function(r){(0,D.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:p_(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 Ai({class:oa.contentGroup.name})),n.playWindow=n.contentGroup.appendChild(new Ai({class:oa.playWindow.name})),n.innerCurrPage=n.defaultPage,n}return Object.defineProperty(t.prototype,"defaultPage",{get:function(){var e=this.attributes.defaultPage;return dr(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,D.CR)($4(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,D.ev)([],(0,D.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 Gi(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,D.CR)(this.getFollowingPageDiff(e),2),u=c[0],h=c[1];this.playState="running";var d=K2(A,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-u,", ").concat(-h,")")}],i);return qc(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:dr(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:dr(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(oa.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)?Vh(n):Ns(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,D.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,p=g.height,y=i.getBBox(),x=y.width,F=y.height,O=Math.max(v,c,x),L=o==="horizontal"?{offset:[[0,0],[v/2+A,0],[v+c+A*2,0]],textAlign:"start"}:{offset:[[O/2,-p-A],[O/2,0],[O/2,F+A]],textAlign:"center"},U=(0,D.CR)(L.offset,3),R=(0,D.CR)(U[0],2),j=R[0],q=R[1],et=(0,D.CR)(U[1],2),it=et[0],dt=et[1],ft=(0,D.CR)(U[2],2),mt=ft[0],Rt=ft[1],Qt=L.textAlign,yt=a.querySelector("text");yt&&(yt.style.textAlign=Qt),n.setLocalPosition(j,q),a.setLocalPosition(it,dt),i.setLocalPosition(mt,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(oa.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,D.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(oa.controller,"g");if(C0(h.node(),u),!!u){var d=tn(this.attributes,"button"),f=tn(this.attributes,"pageNum"),g=(0,D.CR)(_o(d),2),v=g[0],p=g[1],y=v.size,x=(0,D._T)(v,["size"]),F=!h.select(oa.prevBtnGroup.class).node(),O=h.maybeAppendByClassName(oa.prevBtnGroup,"g").styles(p);this.prevBtnGroup=O.node();var L=O.maybeAppendByClassName(oa.prevBtn,"path");if(o){var U=zi(oa.prevBtn.name,sa.prevBtn,o);L.node().setAttribute("class",U)}var R=h.maybeAppendByClassName(oa.nextBtnGroup,"g").styles(p);this.nextBtnGroup=R.node();var j=R.maybeAppendByClassName(oa.nextBtn,"path");if(o){var q=zi(oa.nextBtn.name,sa.nextBtn,o);j.node().setAttribute("class",q)}[L,j].forEach(function(ft){ft.styles((0,D.pi)((0,D.pi)({},x),{transformOrigin:"center"})),E1(ft.node(),y,!0)});var et=h.maybeAppendByClassName(oa.pageInfoGroup,"g");this.pageInfoGroup=et.node();var it=et.maybeAppendByClassName(oa.pageInfo,"text");if(it.styles(f),o){var dt=zi(oa.pageInfo.name,sa.pageInfo,o);it.node().setAttribute("class",dt)}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=Ne(n);this.renderClipPath(A),this.renderController(A),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},t.prototype.bindEvents=function(){var e=this,n=Lh(function(){return e.render(e.attributes,e)},50);this.playWindow.addEventListener(yn.INSERTED,n),this.playWindow.addEventListener(yn.REMOVED,n)},t}(Mr);function w_(r){var t="default";if(br(r)&&r instanceof Image)t="image";else if(Vt(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 E_(r){var t=w_(r);return["base64","url","image"].includes(t)?"image":r&&t==="symbol"?"path":null}var Kn=function(r){(0,D.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,D._T)(A,["symbol","size"]),d=E_(l);ma(!!d,Ne(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,p=Vt(l)?l:t.getSymbol(l);g.styles((0,D.pi)({d:p==null?void 0:p(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}(Mr);Kn.registerSymbol("cross",o_),Kn.registerSymbol("hyphen",c_),Kn.registerSymbol("line",W2),Kn.registerSymbol("plus",l_),Kn.registerSymbol("tick",A_),Kn.registerSymbol("circle",V2),Kn.registerSymbol("point",t_),Kn.registerSymbol("bowtie",s_),Kn.registerSymbol("hexagon",a_),Kn.registerSymbol("square",e_),Kn.registerSymbol("diamond",n_),Kn.registerSymbol("triangle",r_),Kn.registerSymbol("triangle-down",i_),Kn.registerSymbol("line",W2),Kn.registerSymbol("dot",j2),Kn.registerSymbol("dash",u_),Kn.registerSymbol("smooth",h_),Kn.registerSymbol("hv",d_),Kn.registerSymbol("vh",f_),Kn.registerSymbol("hvh",g_),Kn.registerSymbol("vhv",v_),Kn.registerSymbol("focus",m_);function AK(r,t,e){var n=Math.round((r-e)/t);return e+n*t}function B_(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 Z2=1.4,Y2=.4;function b_(r,t,e){var n=e,i=n*Z2,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 x_(r,t,e){var n=e,i=n*Z2,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]]}Kn.registerSymbol("hiddenHandle",B_),Kn.registerSymbol("verticalHandle",b_),Kn.registerSymbol("horizontalHandle",x_);var lK=function(r,t,e){return r===void 0&&(r="horizontal"),r==="horizontal"?t:e};function cK(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],p=v-g;return g>v&&(i=__read([v,g],2),g=i[0],v=i[1]),p>o-s?[s,o]:g<s?h===s&&d===v?[s,v]:[s,p+s]:v>o?d===o&&h===g?[g,o]:[o-p,o]:[g,v]}function B1(r,t,e){return r===void 0&&(r="horizontal"),r==="horizontal"?t:e}function uK(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 X2(r){var t=r.getLocalBounds(),e=t.min,n=t.max,i=(0,D.CR)([e,n],2),a=(0,D.CR)(i[0],2),s=a[0],o=a[1],A=(0,D.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 hK(r,t){var e=select(r).append("text").node();return e.attr(__assign(__assign({},t),{visibility:"hidden"})),e}function C_(r,t){var e=(0,D.CR)(r,2),n=e[0],i=e[1],a=(0,D.CR)(t,2),s=a[0],o=a[1];return n!==s&&i===o}function dK(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 S_(r,t){var e,n,i=t.attributes;try{for(var a=(0,D.XA)(Object.entries(i)),s=a.next();!s.done;s=a.next()){var o=(0,D.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 Ho(r){return typeof r=="function"?r():gn(r)||ye(r)?new m1({style:{text:String(r)}}):r}function M_(r,t){return typeof r=="function"?r():gn(r)||ye(r)?new gl({style:(0,D.pi)((0,D.pi)({pointerEvents:"auto"},t),{innerHTML:r})}):r}var F0,b1;function fK(r){b1=r}var F_=s1(function(r,t){var e=t.fontSize,n=t.fontFamily,i=t.fontWeight,a=t.fontStyle,s=t.fontVariant;return b1?b1(r,e):(F0||(F0=re.offscreenCanvasCreator.getOrCreateContext(void 0)),F0.font=[a,s,i,"".concat(e,"px"),n].join(" "),F0.measureText(r).width)},function(r,t){return[r,Object.values(t||J2(r)).join()].join("")},4096),J2=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 q2(r){return r.nodeName==="text"?r:r.nodeName==="g"&&r.children.length===1&&r.children[0].nodeName==="text"?r.children[0]:null}function $2(r,t){var e=q2(r);e&&e.attr(t)}function x1(r,t,e){e===void 0&&(e="..."),$2(r,{wordWrap:!0,wordWrapWidth:t,maxLines:1,textOverflow:e})}function C1(r,t){for(var e in t)t.hasOwnProperty(e)&&e!=="constructor"&&t[e]!==void 0&&(r[e]=t[e])}function T_(r,t,e,n){return t&&C1(r,t),e&&C1(r,e),n&&C1(r,n),r}function O_(r){return r instanceof Element||r instanceof Document}var vn,I_="component-poptip",ln={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},tS=(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),N_=void 0;function L_(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 k_=function(r){var t;return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t||(t=r.apply(N_,e)),t}};function Q_(r){var t=r&&document.getElementById(r);return t||(t=document.createElement("div"),t.setAttribute("id",r),document.body.appendChild(t)),t}function U_(r){var t=k_(Q_)(r);return t}var R_=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,Si({style:{id:I_}},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(Si({},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,D._T)(h,["html","target"]);c=T_({},i.style,g),(f||f===!1)&&(l=f),typeof d=="string"&&(u=d)}var v=c.position,p=c.arrowPointAtCenter,y=c.follow,x=c.offset;if(l){var F=A,O=F.clientX,L=F.clientY,U=(0,D.CR)(L_(O,L,l,v,p,y),2),R=U[0],j=U[1];i.showTip(R,j,{text:u,position:v,offset:x})}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,D.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,D.ev)([],(0,D.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=Fi(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=U_(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&&O_(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({},tS,this.style.domStyles),n=Object.entries(e).reduce(function(a,s){var o=(0,D.CR)(s,2),A=o[0],l=o[1],c=Object.entries(l).reduce(function(u,h){var d=(0,D.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,D.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:tS,template:'<div class="'.concat(ln.TEXT,'"></div>')}},t}(Mr),Yr=Ls({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"),D_={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 P_(r){var t=r.querySelector(Yr.marker.class);return t?t.style:{}}var __=function(r){(0,D.ZT)(t,r);function t(e,n){var i=r.call(this,e,{span:[1,1],marker:function(){return new eo({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,D.CR)(Oi(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,D.CR)(this.spacing,3),f=d[0],g=d[1],v=d[2];if(a){var p=a-i-f-g-A-v,y=(0,D.CR)(this.span,2),x=y[0],F=y[1];e=(0,D.CR)([x*p,F*p],2),u=e[0],h=e[1]}var O=o+u+h+f+g+A+v;return{width:O,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,D.CR)(Oi(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,D.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=P_(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=tn(this.attributes,"marker");this.markerGroup=e.maybeAppendByClassName(Yr.markerGroup,"g").style("zIndex",0),ma(!!a,this.markerGroup,function(){var A,l=n.markerGroup.node(),c=(A=l.childNodes)===null||A===void 0?void 0:A[0],u=zi(Yr.marker.name,sa.marker,s),h=typeof a=="string"?new Kn({style:{symbol:a},className:u}):a();if(c)if(h.nodeName===c.nodeName)c instanceof Kn?c.update((0,D.pi)((0,D.pi)({},o),{symbol:a})):(S_(c,h),Ne(c).styles(o));else{if(c.remove(),!(h instanceof Kn)){var f=zi(Yr.marker.name,sa.marker,s);h.className=f}Ne(h).styles(o),l.appendChild(h)}else{if(!(h instanceof Kn)){var d=zi(Yr.marker.name,sa.marker,s);h.className=d,Ne(h).styles(o)}l.appendChild(h)}n.markerGroup.node().scale(1/n.markerGroup.node().getScale()[0]);var g=E1(n.markerGroup.node(),n.scaleSize,!0);n.markerGroup.node().style._transform="scale(".concat(g,")")})},t.prototype.renderLabel=function(e){var n=tn(this.attributes,"label"),i=n.text,a=(0,D._T)(n,["text"]),s=this.attributes.classNamePrefix;this.labelGroup=e.maybeAppendByClassName(Yr.labelGroup,"g").style("zIndex",0);var o=zi(Yr.label.name,sa.label,s),A=this.labelGroup.maybeAppendByClassName(Yr.label,function(){return Ho(i)});A.node().setAttribute("class",o),A.styles(a)},t.prototype.renderValue=function(e){var n=this,i=tn(this.attributes,"value"),a=i.text,s=(0,D._T)(i,["text"]),o=this.attributes.classNamePrefix;this.valueGroup=e.maybeAppendByClassName(Yr.valueGroup,"g").style("zIndex",0),ma(this.showValue,this.valueGroup,function(){var A=zi(Yr.value.name,sa.value,o),l=n.valueGroup.maybeAppendByClassName(Yr.value,function(){return Ho(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,D._T)(n,["render"]),s=new R_({style:Zr(D_,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,D.pi)((0,D.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};Ze(a)||(this.focusGroup=e.maybeAppendByClassName(Yr.focusGroup,"g").style("zIndex",0),ma(a,this.focusGroup,function(){var l=zi(Yr.focus.name,sa.focusIcon,o),c=new Kn({style:(0,D.pi)((0,D.pi)({},A),{symbol:"focus"}),className:l}),u=new eo({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(Yr.value,"g").node(),s=e.maybeAppendByClassName(Yr.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=tn(this.attributes,"background");this.background=e.maybeAppendByClassName(Yr.backgroundGroup,"g").style("zIndex",-1);var o=this.background.maybeAppendByClassName(Yr.background,"rect");o.styles((0,D.pi)({width:i,height:a},s));var A=this.attributes.classNamePrefix,l=A===void 0?"":A;if(l){var c=zi(Yr.background.name,sa.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,D.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,")")}),x1(this.labelGroup.select(Yr.label.class).node(),Math.ceil(n)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(l,", ").concat(u,")")}),x1(this.valueGroup.select(Yr.value.class).node(),Math.ceil(i)))},t.prototype.render=function(e,n){var i=Ne(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}(Mr),Dl=Ls({page:"item-page",navigator:"navigator",item:"item"},"items"),eS=function(r,t,e){return e===void 0&&(e=!0),r?t(r):e},H_=function(r){(0,D.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:w1,mouseenter:w1,mouseleave:w1})||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=tn(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,D.pi)({layout:i,labelText:g,valueText:v,poptip:a,focus:s,focusMarkerSize:o,classNamePrefix:A},Object.fromEntries(Object.entries(l).map(function(p){var y=(0,D.CR)(p,2),x=y[0],F=y[1];return[x,ya(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,D.CR)(this.navigatorShape,1),l=A[0],c=(0,D.CR)(this.grid,2),u=c[0],h=c[1],d=h*u,f=0;return this.pageViews.children.map(function(g,v){var p,y,x=Math.floor(v/d),F=v%d,O=e.ifHorizontal(h,u),L=[Math.floor(F/O),F%O];i==="vertical"&&L.reverse();var U=(0,D.CR)(L,2),R=U[0],j=U[1],q=(a-l-(h-1)*o)/h,et=g.getBBox().height,it=(0,D.CR)([0,0],2),dt=it[0],ft=it[1];return i==="horizontal"?(p=(0,D.CR)([f,R*(et+s)],2),dt=p[0],ft=p[1],f=j===h-1?0:f+q+o):(y=(0,D.CR)([j*(q+o),f],2),dt=y[0],ft=y[1],f=R===u-1?0:f+et+s),{page:x,index:v,row:R,col:j,pageIndex:F,width:q,height:et,x:dt,y:ft}})},t.prototype.getFlexLayout=function(){var e=this.attributes,n=e.width,i=e.height,a=e.rowPadding,s=e.colPadding,o=(0,D.CR)(this.navigatorShape,1),A=o[0],l=(0,D.CR)(this.grid,2),c=l[0],u=l[1],h=(0,D.CR)([n-A,i],2),d=h[0],f=h[1],g=(0,D.CR)([0,0,0,0,0,0,0,0],8),v=g[0],p=g[1],y=g[2],x=g[3],F=g[4],O=g[5],L=g[6],U=g[7];return this.pageViews.children.map(function(R,j){var q,et,it,dt,ft=R.getBBox(),mt=ft.width,Rt=ft.height,Qt=L===0?0:s,yt=L+Qt+mt;if(yt<=d&&eS(F,function(Dt){return Dt<u}))return q=(0,D.CR)([L+Qt,U,yt],3),v=q[0],p=q[1],L=q[2],{width:mt,height:Rt,x:v,y:p,page:y,index:j,pageIndex:x++,row:O,col:F++};et=(0,D.CR)([O+1,0,0,U+Rt+a],4),O=et[0],F=et[1],L=et[2],U=et[3];var xt=U+Rt;return xt<=f&&eS(O,function(Dt){return Dt<c})?(it=(0,D.CR)([L,U,mt],3),v=it[0],p=it[1],L=it[2],{width:mt,height:Rt,x:v,y:p,page:y,index:j,pageIndex:x++,row:O,col:F++}):(dt=(0,D.CR)([0,0,mt,0,y+1,0,0,0],8),v=dt[0],p=dt[1],L=dt[2],U=dt[3],y=dt[4],x=dt[5],O=dt[6],F=dt[7],{width:mt,height:Rt,x:v,y:p,page:y,index:j,pageIndex:x++,row:O,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 B1(i,e,n)},t.prototype.flattenPage=function(e){e.querySelectorAll(Dl.item.class).forEach(function(n){e.appendChild(n)}),e.querySelectorAll(Dl.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=zi(Dl.item.name,sa.item,o);Ne(e).selectAll(Dl.item.class).data(this.renderData,function(c){return c.id}).join(function(c){return c.append(function(u){var h=u.style,d=(0,D._T)(u,["style"]);return new __({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,D.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(Z4(this.itemsLayout,"page")).map(function(a){var s=(0,D.CR)(a,2),o=s[0],A=s[1];return{page:o,layouts:A}}),i=(0,D.ev)([],(0,D.CR)(this.navigator.getContainer().children),!1);n.forEach(function(a){var s=a.layouts,o=e.pageViews.appendChild(new Ai({className:Dl.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),bh(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=tn(this.attributes,"nav"),o=Zr({orientation:i,classNamePrefix:a},s),A=this;return e.selectAll(Dl.navigator.class).data(["nav"]).join(function(l){return l.append(function(){return new y_({style:o})}).attr("className",Dl.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(Ne(n));this.renderItems(a.getContainer()),this.adjustLayout()}},t.prototype.dispatchCustomEvent=function(e,n){var i=new Wr(e,{detail:n});this.dispatchEvent(i)},t}(Mr),Pl=Ls({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),nS={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},gK=function(r){(0,D.ZT)(t,r);function t(e){return r.call(this,e,nS)||this}return t.prototype.render=function(e,n){var i=Ne(n).maybeAppendByClassName(Pl.markerGroup,"g");this.renderMarker(i);var a=Ne(n).maybeAppendByClassName(Pl.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?B1(a,"horizontalHandle","verticalHandle"):o;ma(!!A,e,function(l){var c=tn(n.attributes,"marker"),u=(0,D.pi)({symbol:A},c),h=zi(Pl.marker.name,sa.handleMarker,s);if(n.marker=l.maybeAppendByClassName(Pl.marker,function(){return new Kn({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=zi(g,sa.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;ma(a,e,function(u){var h,d=tn(n.attributes,"label"),f=d.text,g=(0,D._T)(d,["text"]),v=((h=u.select(Pl.marker.class))===null||h===void 0?void 0:h.node().getBBox())||{},p=v.width,y=p===void 0?0:p,x=v.height,F=x===void 0?0:x,O=(0,D.CR)(B1(s,[0,F+A,"center","top"],[y+A,0,"start","middle"]),4),L=O[0],U=O[1],R=O[2],j=O[3],q=zi(Pl.label.name,sa.handleLabel,c);u.maybeAppendByClassName(Pl.label,"text").attr("className",q).styles((0,D.pi)((0,D.pi)({},g),{x:L,y:U,text:l(f).toString(),textAlign:R,textBaseline:j}))})},t}(Mr),rS={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},G_=Zr({},rS,{}),vK=Zr({},rS,Jc(nS,"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"}),pK=.01,mK=.5,_l=Ls({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"),z_=function(r){(0,D.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.update=function(e){this.attr(e)},t}(gl),K_=function(r){(0,D.ZT)(t,r);function t(e){return r.call(this,e,G_)||this}return t.prototype.renderTitle=function(e,n,i){var a=this.attributes,s=a.showTitle,o=a.titleText,A=a.classNamePrefix,l=tn(this.attributes,"title"),c=(0,D.CR)(_o(l),2),u=c[0],h=c[1];this.titleGroup=e.maybeAppendByClassName(_l.titleGroup,"g").styles(h);var d=(0,D.pi)((0,D.pi)({width:n,height:i},u),{text:s?o:"",classNamePrefix:A});this.title=this.titleGroup.maybeAppendByClassName(_l.title,function(){return new j4({style:d})}).update(d)},t.prototype.renderCustom=function(e){var n=this.attributes.data,i={innerHTML:this.attributes.render(n),pointerEvents:"auto"};e.maybeAppendByClassName(_l.html,function(){return new z_({className:_l.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=tn(this.attributes,"title",!0),l=(0,D.CR)(_o(A),2),c=l[0],u=l[1],h=(0,D.pi)((0,D.pi)({},c),{width:s,height:o,x:0,y:0});this.itemsGroup=e.maybeAppendByClassName(_l.itemsGroup,"g").styles((0,D.pi)((0,D.pi)({},u),{transform:"translate(".concat(i,", ").concat(a,")")}));var d=this;this.itemsGroup.selectAll(_l.items.class).data(["items"]).join(function(f){return f.append(function(){return new H_({style:h})}).attr("className",_l.items.name).each(function(){d.items=Ne(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 Gi(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):K4(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=Ne(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}(Mr);function T0(r){const{width:t,height:e,renderer:n}=r,i=V_(r),a=new Fm({width:t,height:e,container:i,renderer:n||new Mh});return[i,a]}function V_(r){var t;const{container:e,className:n,graphCanvas:i}=r;if(e)return typeof e=="string"?document.getElementById(e):e;const a=Xc(n,!1),{width:s,height:o,containerStyle:A}=r,[l,c]=W_(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 W_(r){const{width:t,height:e,placement:n,graphCanvas:i}=r,[a,s]=i.getSize(),[o,A]=Mb(n);return[o*(a-t),A*(s-e)]}var j_=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 O0 extends yi{constructor(t,e){super(t,Object.assign({},O0.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=Fi(n,[s,"id"]),A=Fi(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=Fi(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=Fi(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=>Vt(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,p)=>s==null?void 0:s.getElementComputedStyle(v,p),g=(v,p)=>{v.forEach(y=>{const{id:x}=y,F=Fi(y,["data",u(y)]),O=(s==null?void 0:s.getElementType(p,y))||"circle",L=f(p,y),U=(p==="edge"?L==null?void 0:L.stroke:L==null?void 0:L.fill)||"#1783ff";x&&F&&F.replace(/\s+/g,"")&&(this.setFieldMap(F,x,p),c[F]||(c[F]={id:`${p}__${x}`,label:F,marker:d[O]||h[p],elementType:p,lineWidth:1,stroke:U,fill:U}))})};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=j_(n,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),g=this.getMarkerData(s,"node"),v=this.getMarkerData(o,"edge"),p=this.getMarkerData(A,"combo"),y=[...g,...p,...v],x=Object.assign({width:i,height:a,data:y,itemMarkerLineWidth:({lineWidth:L})=>L,itemMarker:({marker:L})=>L,itemMarkerStroke:({stroke:L})=>L,itemMarkerFill:({fill:L})=>L,gridCol:g.length},f,this.getEvents()),F=new K_({className:"legend",style:x});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]=T0({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()}}O0.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class I0 extends yi{constructor(t,e){super(t,Object.assign({},I0.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),p=parseInt(u);f<0&&(f=0),g<0&&(g=0),f+v>i&&(f=RA(i-v,0)),g+p>a&&(g=RA(a-p,0)),v<h&&(s>0?(f=RA(f-s,0),v=UA(v+s,i)):s<0&&(v=UA(v-s,i))),p<d&&(o>0?(g=RA(g-o,0),p=UA(p+o,a)):o<0&&(p=UA(p-o,a))),Object.assign(this.mask.style,{left:f+"px",top:g+"px",width:v+"px",height:p+"px"});const y=parseInt(A)-f,x=parseInt(l)-g;if(y===0&&x===0)return;const F=this.context.canvas.getCamera().getZoom(),O=this.canvas.getCamera().getZoom(),L=F/O;this.context.graph.translateBy([y*L,x*L],!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=kB(()=>{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=Lh(()=>{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(Nt(l))),edges:i.edges.filter(l=>{const c=n==null?void 0:n.getElement(Nt(l));return c&&Ix(c)}),combos:i.combos.filter(l=>n==null?void 0:n.getElement(Nt(l)))};if(!t)return a;const{nodes:s,edges:o,combos:A}=a;return{nodes:s.filter(l=>t(Nt(l),"node")),edges:o.filter(l=>t(Nt(l),"edge")),combos:A.filter(l=>t(Nt(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=Nt(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]=T0({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]=Ua(s),{min:u,max:h,center:d}=e.getBounds("elements"),f=h[0]-u[0],g=h[1]-u[1],v=i-c-A,p=a-o-l,y=v/f,x=p/g,F=Math.min(y,x),O=this.createLandmark(d,d,F);n.gotoLandmark(O,0)}get maskBBox(){const{canvas:t}=this.context,e=t.getSize(),n=t.getCanvasByViewport([0,0]),i=t.getCanvasByViewport(e),a=this.canvas.canvas2Viewport(Fs(n)),s=this.canvas.canvas2Viewport(Fs(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=UA(a+n,t),n=0),i<0&&(s=UA(s+i,e),i=0),n+a>t&&(a=RA(t-n,0)),i+s>e&&(s=RA(e-i,0)),[UA(n,t),UA(i,e),RA(a,0),RA(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()}}I0.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 UA=(r,t)=>Math.min(r,t),RA=(r,t)=>Math.max(r,t);var S1=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 M1={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class N0 extends yi{constructor(t,e){super(t,Object.assign({},N0.defaultOptions,e)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new vl({style:Object.assign(Object.assign({},M1),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new vl({style:Object.assign(Object.assign({},M1),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,i,a)=>S1(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&&(Ki(u,s)<A&&(g=s-u),Ki(l,s)<A&&(g=s-l),Ki(d,s)<A&&(g=s-d),g!==0&&(this.isVerticalSticking=!0)),o!==null&&(Ki(h,o)<A&&(v=o-h),Ki(c,o)<A&&(v=o-c),Ki(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,p=null,y=null;return this.getNodes().some(x=>{if(Pr(n.id,x.id))return!1;const F=iS(x,s).getRenderBounds(),{min:[O,L],max:[U,R],center:[j,q]}=F;return d===null&&(Ki(j,u)<a?d=j:Ki(O,o)<a||Ki(O,l)<a?d=O:(Ki(U,l)<a||Ki(U,o)<a)&&(d=U),d!==null&&(f=Math.min(L,A),g=Math.max(R,c))),v===null&&(Ki(q,h)<a?v=q:Ki(L,A)<a||Ki(L,c)<a?v=L:(Ki(R,c)<a||Ki(R,A)<a)&&(v=R),v!==null&&(p=Math.min(O,o),y=Math.max(U,l))),d!==null&&v!==null}),{verticalX:d,verticalMinY:f,verticalMaxY:g,horizontalY:v,horizontalMinX:p,horizontalMaxX:y}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=n=>S1(this,void 0,void 0,function*(){const{target:i}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const a=iS(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 Ix(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||M1.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 Ms([t.dx,t.dy],e)}bindEvents(){return S1(this,void 0,void 0,function*(){const{graph:t}=this.context;t.on(rs.DRAG_START,this.onDragStart),t.on(rs.DRAG,this.onDrag),t.on(rs.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:t}=this.context;t.off(rs.DRAG_START,this.onDragStart),t.off(rs.DRAG,this.onDrag),t.off(rs.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()}}N0.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Ki=(r,t)=>Math.abs(r-t),iS=(r,t)=>typeof t=="function"?t(r):r.getShape(t);var aS=null,Z_=null;function L0(r){return r instanceof Date?r:new Date(r)}function Y_(r){for(var t=__read(r,2),e=t[0],n=t[1],i=aS.indexOf(e),a=aS.indexOf(n),s="",o=i;o<=a;o+=1)if(s+=Z_[o],o<a){var A="-";o===2?A=" ":o>2&&(A=":"),s+=A}return s}function Aa(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 yK(r,t){return L0(r).getTime()-L0(t).getTime()}function wK(r,t){var e=__read([L0(r),L0(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 EK(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),Aa(e,Y_(["year",t]))}function X_(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"},F1={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:[]},BK=Si({},F1,{style:{type:"arc"}}),bK=Si({},F1,{style:{}}),Xe=Ls({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 Go(r,t){return[r[0]*t,r[1]*t]}function Wh(r,t){return[r[0]+t[0],r[1]+t[1]]}function T1(r,t){return[r[0]-t[0],r[1]-t[1]]}function Hl(r,t){return[Math.min(r[0],t[0]),Math.min(r[1],t[1])]}function Gl(r,t){return[Math.max(r[0],t[0]),Math.max(r[1],t[1])]}function jh(r,t){return Math.sqrt(Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2))}function sS(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 xK(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 J_(r,t){return t?[r[1],-r[0]]:[-r[1],r[0]]}function $c(r){return r*Math.PI/180}function oS(r){return Number((r*180/Math.PI).toPrecision(5))}function k0(r,t){return r.style.opacity||(r.style.opacity=1),ks(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 $_(r){return q_.includes(r)}function AS(r){var t={};for(var e in r)$_(e)&&(t[e]=r[e]);return t}var tu=Ls({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function lS(r){return r.reduce(function(t,e,n){return t.push((0,D.ev)([n===0?"M":"L"],(0,D.CR)(e),!1)),t},[])}function tH(r,t,e){var n=t.connect,i=n===void 0?"line":n,a=t.center;if(i==="line")return lS(r);if(!a)return[];var s=jh(r[0],a),o=e?0:1;return r.reduce(function(A,l,c){return c===0?A.push((0,D.ev)(["M"],(0,D.CR)(l),!1)):A.push((0,D.ev)(["A",s,s,0,0,o],(0,D.CR)(l),!1)),A},[])}function O1(r,t,e){return t.type==="surround"?tH(r,t,e):lS(r)}function eH(r,t,e){var n=e.type,i=e.connect,a=e.center,s=e.closed,o=s?[["Z"]]:[],A=(0,D.CR)([O1(r,e),O1(t.slice().reverse(),e,!0)],2),l=A[0],c=A[1],u=(0,D.CR)([r[0],t.slice(-1)[0]],2),h=u[0],d=u[1],f=function(y,x){return[l,y,c,x,o].flat()};if(i==="line"||n==="surround")return f([(0,D.ev)(["L"],(0,D.CR)(d),!1)],[(0,D.ev)(["L"],(0,D.CR)(h),!1)]);if(!a)throw new Error("Arc grid need to specified center");var g=(0,D.CR)([jh(d,a),jh(h,a)],2),v=g[0],p=g[1];return f([(0,D.ev)(["A",v,v,0,0,1],(0,D.CR)(d),!1),(0,D.ev)(["L"],(0,D.CR)(d),!1)],[(0,D.ev)(["A",p,p,0,0,0],(0,D.CR)(h),!1),(0,D.ev)(["L"],(0,D.CR)(h),!1)])}function nH(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:O1(o.points,e)}});return r.selectAll(tu.line.class).data(s,function(o){return o.id}).join(function(o){return o.append("path").each(function(A,l){var c=ya(AS((0,D.pi)({d:A.d},n)),[A,l,s]);this.attr((0,D.pi)({class:tu.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},c))})},function(o){return o.transition(function(A,l){var c=ya(AS((0,D.pi)({d:A.d},n)),[A,l,s]);return ks(this,c,i.update)})},function(o){return o.transition(function(){var A=this,l=k0(this,i.exit);return qc(l,function(){return A.remove()}),l})}).transitions()}function rH(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,D.CR)([t[l].points,t[l+1].points],2),u=c[0],h=c[1],d=eH(u,h,e);A.push({d,fill:o(l)})}return r.selectAll(tu.region.class).data(A,function(f,g){return g}).join(function(f){return f.append("path").each(function(g,v){var p=ya(g,[g,v,A]);this.attr(p)}).attr("className",tu.region.name)},function(f){return f.transition(function(g,v){var p=ya(g,[g,v,A]);return ks(this,p,n.update)})},function(f){return f.transition(function(){var g=this,v=k0(this,n.exit);return qc(v,function(){return g.remove()}),v})}).transitions()}function iH(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,D.CR)(a,1),o=s[0];return(0,D.pi)((0,D.pi)({},i),{points:(0,D.ev)((0,D.ev)([],(0,D.CR)(a),!1),[o],!1)})}):e}var aH=function(r){(0,D.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,D._T)(e,["type","center","areaFill","closed"]),l=iH(e),c=Ne(n).maybeAppendByClassName(tu.lineGroup,"g"),u=Ne(n).maybeAppendByClassName(tu.regionGroup,"g"),h=nH(c,l,e,A),d=rH(u,l,e);return(0,D.ev)((0,D.ev)([],(0,D.CR)(h),!1),(0,D.CR)(d),!1)},t}(Mr),sH=function(r,t){return function(e){return r*(1-e)+t*e}};function oH(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]=I1(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 AH(r,t){r===void 0&&(r={}),t===void 0&&(t={});var e={},n={};return Object.entries(t).forEach(function(i){var a=(0,D.CR)(i,2),s=a[0],o=a[1];s in r?e[s]=I1(r[s],o):n[s]=o}),function(i){return Object.entries(e).forEach(function(a){var s=(0,D.CR)(a,2),o=s[0],A=s[1];return n[o]=A(i)}),n}}function I1(r,t){return typeof r=="number"&&typeof t=="number"?sH(r,t):Array.isArray(r)&&Array.isArray(t)?oH(r,t):typeof r=="object"&&typeof t=="object"?AH(r,t):function(e){return r}}function lH(r,t,e,n){if(!n)return r.attr("__keyframe_data__",e),null;var i=n.duration,a=i===void 0?0:i,s=I1(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,D.pi)({fill:"both"},n))}function N1(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 cS(r,t){return Object.fromEntries(Object.entries(r).map(function(e){var n=(0,D.CR)(e,2),i=n[0],a=n[1];return[i,ya(a,t)]}))}function CK(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 L1(r,t){return t&&Vt(t)?r.filter(t):r}function uS(r,t){var e=t.startAngle,n=t.endAngle;return(n-e)*r+e}function Q0(r,t){if(t.type==="linear"){var e=(0,D.CR)(t.startPos,2),n=e[0],i=e[1],a=(0,D.CR)(t.endPos,2),s=a[0],o=a[1],A=(0,D.CR)([s-n,o-i],2),l=A[0],c=A[1];return sS([l,c])}var u=$c(uS(r,t));return[-Math.sin(u),Math.cos(u)]}function k1(r,t,e){var n=Q0(r,e);return J_(n,t!=="positive")}function eu(r,t){return k1(r,t.labelDirection,t)}function Zh(r,t,e){return e?"".concat(r," ").concat(e,"axis-").concat(t):r}function SK(r,t,e){var n=r.classNamePrefix,i=n===void 0?"":n;return Zh(t.name,e,i)}function _a(r,t,e,n){return n&&r.attr("className",Zh(t.name,e,n)),r}function cH(r,t){var e=(0,D.CR)(t.startPos,2),n=e[0],i=e[1],a=(0,D.CR)(t.endPos,2),s=a[0],o=a[1],A=(0,D.CR)([s-n,o-i],2),l=A[0],c=A[1];return[n+l*r,i+c*r]}function uH(r,t){var e=t.radius,n=(0,D.CR)(t.center,2),i=n[0],a=n[1],s=$c(uS(r,t));return[i+e*Math.cos(s),a+e*Math.sin(s)]}function U0(r,t){return t.type==="linear"?cH(r,t):uH(r,t)}function Q1(r){return Q0(0,r)[1]===0}function hS(r){return Q0(0,r)[0]===0}function dS(r,t){return t-r===360}function fS(r,t,e,n,i){var a=t-r,s=(0,D.CR)([i,i],2),o=s[0],A=s[1],l=(0,D.CR)([$c(r),$c(t)],2),c=l[0],u=l[1],h=function(q){return[e+i*Math.cos(q),n+i*Math.sin(q)]},d=(0,D.CR)(h(c),2),f=d[0],g=d[1],v=(0,D.CR)(h(u),2),p=v[0],y=v[1];if(dS(r,t)){var x=(u+c)/2,F=(0,D.CR)(h(x),2),O=F[0],L=F[1];return[["M",f,g],["A",o,A,0,1,0,O,L],["A",o,A,0,1,0,p,y]]}var U=a>180?1:0,R=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(U,",").concat(R,",").concat(p,",").concat(y,",L").concat(e,",").concat(n):"M".concat(f,",").concat(g,",A").concat(o,",").concat(A,",0,").concat(U,",").concat(R,",").concat(p,",").concat(y)}function hH(r){var t=r.attributes,e=t.startAngle,n=t.endAngle,i=t.center,a=t.radius;return(0,D.ev)((0,D.ev)([e,n],(0,D.CR)(i),!1),[a],!1)}function dH(r,t,e,n){var i=t.startAngle,a=t.endAngle,s=t.center,o=t.radius,A=t.classNamePrefix;return r.selectAll(Xe.line.class).data([{d:fS.apply(void 0,(0,D.ev)((0,D.ev)([i,a],(0,D.CR)(s),!1),[o],!1))}],function(l,c){return c}).join(function(l){var c=l.append("path").attr("className",Xe.line.name).styles(t).styles({d:function(u){return u.d}});return _a(c,Xe.line,Vn.line,A),c},function(l){return l.transition(function(){var c=this,u=lH(this,hH(this),(0,D.ev)((0,D.ev)([i,a],(0,D.CR)(s),!1),[o],!1),n.update);if(u){var h=function(){var d=Fi(c.attributes,"__keyframe_data__");c.style.d=fS.apply(void 0,(0,D.ev)([],(0,D.CR)(d),!1))};u.onframe=h,u.onfinish=h}return u}).styles(t)},function(l){return l.remove()}).styles(e).transitions()}function fH(r,t){var e=t.truncRange,n=t.truncShape,i=t.lineExtension}function gH(r,t,e){e===void 0&&(e=[0,0]);var n=(0,D.CR)([r,t,e],3),i=(0,D.CR)(n[0],2),a=i[0],s=i[1],o=(0,D.CR)(n[1],2),A=o[0],l=o[1],c=(0,D.CR)(n[2],2),u=c[0],h=c[1],d=(0,D.CR)([A-a,l-s],2),f=d[0],g=d[1],v=Math.sqrt(Math.pow(f,2)+Math.pow(g,2)),p=(0,D.CR)([-u/v,h/v],2),y=p[0],x=p[1];return[y*f,y*g,x*f,x*g]}function gS(r){var t=(0,D.CR)(r,2),e=(0,D.CR)(t[0],2),n=e[0],i=e[1],a=(0,D.CR)(t[1],2),s=a[0],o=a[1];return{x1:n,y1:i,x2:s,y2:o}}function vH(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,D.CR)([a,s],2),u=(0,D.CR)(c[0],2),h=u[0],d=u[1],f=(0,D.CR)(c[1],2),g=f[0],v=f[1],p=(0,D.CR)(A?gH(a,s,A):new Array(4).fill(0),4),y=p[0],x=p[1],F=p[2],O=p[3],L=function(xt){return r.selectAll(Xe.line.class).data(xt,function(Dt,Xt){return Xt}).join(function(Dt){var Xt=Dt.append("line").styles(e).transition(function(ne){return ks(this,gS(ne.line),!1)});return Xt.attr("className",function(ne){if(!l)return"".concat(Xe.line.name," ").concat(ne.className);var le=Zh(Xe.line.name,Vn.line,l);if(ne.className===Xe.lineFirst.name){var ge=Zh(Xe.lineFirst.name,Vn.lineFirst,l);return"".concat(le," ").concat(ge)}if(ne.className===Xe.lineSecond.name){var ge=Zh(Xe.lineSecond.name,Vn.lineSecond,l);return"".concat(le," ").concat(ge)}return le}),Xt},function(Dt){return Dt.styles(e).transition(function(Xt){var ne=Xt.line;return ks(this,gS(ne),n.update)})},function(Dt){return Dt.remove()}).transitions()};if(!i||!o)return L([{line:[[h+y,d+x],[g+F,v+O]],className:Xe.line.name}]);var U=(0,D.CR)(o,2),R=U[0],j=U[1],q=g-h,et=v-d,it=(0,D.CR)([h+q*R,d+et*R],2),dt=it[0],ft=it[1],mt=(0,D.CR)([h+q*j,d+et*j],2),Rt=mt[0],Qt=mt[1],yt=L([{line:[[h+y,d+x],[dt,ft]],className:Xe.lineFirst.name},{line:[[Rt,Qt],[g+F,v+O]],className:Xe.lineSecond.name}]);return fH(r,t),yt}function pH(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(Xe.line.class):a?l=r.select(Xe.lineSecond.class):l=r.select(Xe.line.class),!i||!s||e.type==="arc"&&dS(e.startAngle,e.endAngle)){var c=l.node();c&&(c.style.markerEnd=void 0);return}var u=Ho(s);u.attr(n),E1(u,A,!0),l.style("markerEnd",u).style("markerEndOffset",-o)}function mH(r,t,e){var n=t.type,i,a=tn(t,"line");return n==="linear"?i=vH(r,t,N1(a,"arrow"),e):i=dH(r,t,N1(a,"arrow"),e),pH(r,n,t,a),i}function yH(r,t){return k1(r,t.gridDirection,t)}function vS(r){var t=r.type,e=r.gridCenter;return t==="linear"?e:e||r.center}function wH(r,t){var e=t.gridLength;return r.map(function(n,i){var a=n.value,s=(0,D.CR)(U0(a,t),2),o=s[0],A=s[1],l=(0,D.CR)(Go(yH(a,t),e),2),c=l[0],u=l[1];return{id:i,points:[[o,A],[o+c,A+u]]}})}function EH(r,t){var e=t.gridControlAngles,n=vS(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,D.CR)(n,2),a=i[0],s=i[1];return r.map(function(o,A){var l=o.value,c=(0,D.CR)(U0(l,t),2),u=c[0],h=c[1],d=(0,D.CR)([u-a,h-s],2),f=d[0],g=d[1],v=[];return e.forEach(function(p){var y=$c(p),x=(0,D.CR)([Math.cos(y),Math.sin(y)],2),F=x[0],O=x[1],L=f*F-g*O+a,U=f*O+g*F+s;v.push([L,U])}),{points:v,id:A}})}function BH(r,t,e,n){var i=e.classNamePrefix,a=tn(e,"grid"),s=a.type,o=a.areaFill,A=vS(e),l=L1(t,e.gridFilter),c=s==="segment"?wH(l,e):EH(l,e),u=(0,D.pi)((0,D.pi)({},a),{center:A,areaFill:Vt(o)?l.map(function(h,d){return ya(o,[h,d,l])}):o,animate:n,data:c});return r.selectAll(Xe.grid.class).data([1]).join(function(h){var d=h.append(function(){return new aH({style:u})}).attr("className",Xe.grid.name);return _a(d,Xe.grid,Vn.grid,i),d},function(h){return h.transition(function(){return this.update(u)})},function(h){return h.remove()}).transitions()}function Ii(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 bH=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 p=(0,D.CR)(v.split(":").map(function(F){return F.trim()}),2),y=p[0],x=p[1];return[y.toLowerCase(),x]})),s=function(v){if(!v)return 0;var p=v.match(/([\d.]+)px/);return p?parseFloat(p[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 xH(r,t,e,n){e===void 0&&(e=2),n===void 0&&(n="top"),$2(r,{wordWrap:!0,wordWrapWidth:t,maxLines:e,textBaseline:n})}function CH(r,t,e){var n=r.getBBox(),i=n.width,a=n.height,s=(0,D.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 pS(r,t){if(t)try{var e=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,n=t.replace(e,function(i,a,s){return"translate(".concat(CH(r,a,s),")")});r.attr("transform",n)}catch(i){}}var U1=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 R0(r,t){var e=r.getEulerAngles()||0;r.setEulerAngles(0);var n=r.getBounds(),i=(0,D.CR)(n.min,2),a=i[0],s=i[1],o=(0,D.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,p=s,y=q2(r);if(y){d-=1.5;var x=y.style.textAlign,F=y.style.textBaseline;x==="center"?v=(a+A)/2:(x==="right"||x==="end")&&(v=A),F==="middle"?p=(s+l)/2:F==="bottom"&&(p=l)}var O=(0,D.CR)(Oi(t),4),L=O[0],U=L===void 0?0:L,R=O[1],j=R===void 0?0:R,q=O[2],et=q===void 0?U:q,it=O[3],dt=it===void 0?j:it,ft=new U1((f+=a)-dt,(g+=s)-U,f+u+j,g+d+et);return r.setEulerAngles(e),ft.rotatedPoints($c(e),v,p)}function Yh(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 Xh(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 SH(r,t){var e=Xh(r[0],r[1],t[0]),n=Xh(r[0],r[1],t[1]),i=Xh(t[0],t[1],r[0]),a=Xh(t[0],t[1],r[1]);return!!(e!==n&&i!==a||e===0&&Yh(r,t[0])||n===0&&Yh(r,t[1])||i===0&&Yh(t,r[0])||a===0&&Yh(t,r[1]))}function MH(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(SH(s,n)){if(Xh(s[0],t,s[1])===0)return Yh(s,t);i++}a=(a+1)%e}while(a!==0);return!!(i&1)}function FH(r,t){return t.every(function(e){return MH(r,e)})}function TH(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=R0(t,e);return FH(o,A)}function mS(r,t){var e=(0,D.CR)(r,4),n=e[0],i=e[1],a=e[2],s=e[3],o=(0,D.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 p=v>0,y=n-A,x=i-l,F=h*x-d*y;if(F<0===p)return!1;var O=f*x-g*y;return!(O<0===p||F>v===p||O>v===p)}function yS(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 mS(t,n)})}var MK={lineToLine:mS,intersectBoxLine:yS,getBounds:R0};function OH(r,t,e){var n,i,a=R0(r,e).flat(1),s=R0(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,D.XA)(o),l=A.next();!l.done;l=A.next()){var c=l.value;if(yS(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 IH(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,D.CR)(a,2),A=o[0],l=o[1],c=n==="negative"?0:i,u=-s-c,h=s+c,d=(0,D.CR)(Oi(t),4),f=d[0],g=d[1],v=d[2],p=d[3];return new U1(A+u-p,l+u-f,A+h+g,l+h+v)}var y=(0,D.CR)(r.startPos,2),x=y[0],F=y[1],O=(0,D.CR)(r.endPos,2),L=O[0],U=O[1],R=(0,D.CR)(hS(r)?[-t,0,t,0]:[0,t,0,-t],4),j=R[0],q=R[1],et=R[2],it=R[3],dt=eu(0,r),ft=Go(dt,i),mt=new U1(x,F,L,U);return mt.x1+=it,mt.y1+=j,mt.x2+=q+ft[0],mt.y2+=et+ft[1],mt}function D0(r,t,e){var n,i,a=t.crossPadding,s=new Set,o=null,A=IH(t,a),l=function(f){return A?TH(A,f):!0},c=function(f,g){return!f||!f.firstChild?!0:!OH(f.firstChild,g.firstChild,Oi(e))};try{for(var u=(0,D.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 R1(r,t){return t===void 0&&(t={}),Re(r)?0:typeof r=="number"?r:Math.floor(F_(r,t))}function NH(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=J2(n.getTextShape(r[0])),f=R1(c,d),g=s?R1(s,d):f,v=R1(A,d);(Re(v)||v===1/0)&&(v=Math.max.apply(null,r.map(function(ft){return ft.getBBox().width})));for(var p=r.slice(),y=(0,D.CR)(h,4),x=y[0],F=x===void 0?0:x,O=y[1],L=O===void 0?0:O,U=y[2],R=U===void 0?F:U,j=y[3],q=j===void 0?L:j,et=function(ft){if(p.forEach(function(mt){n.ellipsis(n.getTextShape(mt),ft,a)}),p=D0(r,e,h),p.length<1)return{value:void 0}},it=v;it>g+f;it-=f){var dt=et(it);if(typeof dt=="object")return dt.value}}}var LH=function(r){return r!==void 0&&r!=null&&!Number.isNaN(r)},kH={parity:function(r,t){var e=t.seq,n=e===void 0?2:e;return r.filter(function(i,a){return a%n?(Ns(i),!1):!0})}},QH=function(r){return r.filter(LH)};function UH(r,t,e,n){var i=r.length,a=t.keepHeader,s=t.keepTail;if(!(i<=1||i===2&&a&&s)){var o=kH.parity,A=function(x){return x.forEach(n.show),x},l=2,c=r.slice(),u=r.slice(),h=Math.min.apply(Math,(0,D.ev)([1],(0,D.CR)(r.map(function(x){return x.getBBox().width})),!1));if(e.type==="linear"&&(Q1(e)||hS(e))){var d=X2(r[0]).left,f=X2(r[i-1]).right,g=Math.abs(f-d)||1;l=Math.max(Math.floor(i*h/g),l)}var v,p;for(a&&(v=c.splice(0,1)[0]),s&&(p=c.splice(-1,1)[0],c.reverse()),A(c);l<r.length&&D0(QH(p?(0,D.ev)((0,D.ev)([p],(0,D.CR)(u),!1),[v],!1):(0,D.ev)([v],(0,D.CR)(u),!1)),e,t==null?void 0:t.margin).length;){if(p&&!v&&l%2===0){var y=c.splice(0,1);y.forEach(n.hide)}else if(p&&v){var y=c.splice(0,1);y.forEach(n.hide)}u=o(A(c),{seq:l}),l++}}}function RH(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(p){return p.getLocalEulerAngles()}),h=function(){return D0(r,e,A).length<1},d=function(p){return r.forEach(function(y,x){var F=Array.isArray(p)?p[x]:p;n.rotate(y,+F)})};try{for(var f=(0,D.XA)(o),g=f.next();!g.done;g=f.next()){var v=g.value;if(d(v),h())return}}catch(p){i={error:p}}finally{try{g&&!g.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}c&&d(u)}function DH(r){var t=r.type,e=r.labelDirection;return t==="linear"&&Q1(r)?e==="negative"?"bottom":"top":"middle"}function PH(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=ya((a=t.wordWrapWidth)!==null&&a!==void 0?a:50,[i]),d=r.map(function(x){return x.attr("maxLines")||1}),f=Math.min.apply(Math,(0,D.ev)([],(0,D.CR)(d),!1)),g=function(){return D0(r,e,u).length<1},v=DH(e),p=function(x){return r.forEach(function(F,O){var L=Array.isArray(x)?x[O]:x;n.wrap(F,h,L,v)})};if(!(f>o)){if(e.type==="linear"&&Q1(e)){if(p(o),g())return}else for(var y=f;y<=o;y++)if(p(y),g())return;l&&p(d)}}var _H=new Map([["hide",UH],["rotate",RH],["ellipsis",NH],["wrap",PH]]);function HH(r,t,e){return t.labelOverlap.length<1?!1:e==="hide"?!L4(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 GH(r,t,e,n){var i=t.labelOverlap,a=i===void 0?[]:i;a.length&&a.forEach(function(s){var o=s.type,A=_H.get(o);HH(r,t,o)&&(A==null||A(r,s,t,n,e))})}function zH(){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 wS(r){for(var t=r;t<0;)t+=360;return Math.round(t%360)}function D1(r,t){var e=(0,D.CR)(r,2),n=e[0],i=e[1],a=(0,D.CR)(t,2),s=a[0],o=a[1],A=(0,D.CR)([n*s+i*o,n*o-i*s],2),l=A[0],c=A[1];return Math.atan2(c,l)}function KH(r){var t=(r+360)%180;return Ii(t,-90,90)||(t+=180),t}function VH(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=eu(r.value,e),A=Q0(r.value,e);return i==="horizontal"?0:(i==="perpendicular"?s=D1([1,0],o):s=D1([A[0]<0?-1:1,0],A),KH(oS(s)))}function ES(r,t,e){var n=e.type,i=e.labelAlign,a=eu(r,e),s=wS(t),o=wS(oS(D1([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?(Ii(s,0,90,!1,!0)||Ii(s,0,90)||Ii(s,270,360))&&(A="start"):o===90?Ii(s,0,90,!1,!0)?A="start":(Ii(s,90,180)||Ii(s,270,360))&&(A="end"):o===270?Ii(s,0,90,!1,!0)?A="end":(Ii(s,90,180)||Ii(s,270,360))&&(A="start"):o===180&&(s===90?A="start":(Ii(s,0,90)||Ii(s,270,360))&&(A="end")):i==="parallel"?Ii(o,0,180,!0)?l="top":l="bottom":i==="horizontal"?Ii(o,90,270,!1)?A="end":(Ii(o,270,360,!1)||Ii(o,0,90))&&(A="start"):i==="perpendicular"&&(Ii(o,90,270)?A="end":A="start"),{textAlign:A,textBaseline:l}}function WH(r,t,e){t.setLocalEulerAngles(r);var n=t.__data__.value,i=ES(n,r,e),a=t.querySelector(Xe.labelItem.class);a&&bS(a,i)}function BS(r,t,e){var n=e.showTick,i=e.tickLength,a=e.tickDirection,s=e.labelDirection,o=e.labelSpacing,A=t.indexOf(r),l=ya(o,[r,A,t]),c=(0,D.CR)([eu(r.value,e),zH(s,a)],2),u=c[0],h=c[1],d=h===1?ya(n?i:0,[r,A,t]):0,f=(0,D.CR)(Wh(Go(u,l+d),U0(r.value,e)),2),g=f[0],v=f[1];return{x:g,y:v}}function jH(r,t,e,n){var i=n.labelFormatter,a=Vt(i)?function(){return Ho(ya(i,[r,t,e,eu(r.value,n)]))}:function(){return Ho(r.label||"")};return a}function ZH(r,t,e,n){var i=n.labelRender,a=(Fi(n,"endPos.0",400)-Fi(n,"startPos.0",0))/e.length,s=Vt(i)?ya(i,[r,t,e,eu(r.value,n)]):r.label||"",o=bH(s)||30;return function(){return M_(s,{width:a,height:o})}}var YH={html:["fill"],text:[]};function bS(r,t){["text","html"].includes(r.nodeName)&&r.attr(N1(t,YH[r.nodeName]))}function XH(r,t){GH(this.node().childNodes,r,t,{hide:Ns,show:Vh,rotate:function(e,n){WH(+n,e,r)},ellipsis:function(e,n,i){e&&x1(e,n||1/0,i)},wrap:function(e,n,i){e&&xH(e,n,i)},getTextShape:function(e){return e.querySelector(Xe.labelItem.class)}})}function xS(r,t,e,n,i){var a=e.indexOf(t),s=i.labelRender,o=i.classNamePrefix,A=Ne(r).append(s?ZH(t,a,e,i):jH(t,a,e,i)).attr("className",Xe.labelItem.name).node();_a(Ne(A),Xe.labelItem,Vn.labelItem,o);var l=(0,D.CR)(_o(cS(n,[t,a,e])),2),c=l[0],u=l[1],h=u.transform,d=(0,D._T)(u,["transform"]);pS(A,h);var f=VH(t,A,i);if(A.getLocalEulerAngles()||A.setLocalEulerAngles(f),bS(A,(0,D.pi)((0,D.pi)({},ES(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 JH(r,t,e,n,i){var a=e.classNamePrefix,s=L1(t,e.labelFilter),o=tn(e,"label"),A,l=r.selectAll(Xe.label.class).data(s,function(c,u){return u}).join(function(c){var u=c.append("g").attr("className",Xe.label.name).transition(function(h){xS(this,h,t,o,e);var d=BS(h,t,e),f=d.x,g=d.y;return this.style.transform="translate(".concat(f,", ").concat(g,")"),null});return _a(u,Xe.label,Vn.label,a),u},function(c){return c.transition(function(u){var h=this.querySelector(Xe.labelItem.class),d=xS(this,u,t,o,e),f=q4(h,d,n.update),g=BS(u,t,e),v=g.x,p=g.y,y=ks(this,{transform:"translate(".concat(v,", ").concat(p,")")},n.update);return(0,D.ev)((0,D.ev)([],(0,D.CR)(f),!1),[y],!1)})},function(c){return A=c,c.transition(function(){var u=this,h=k0(this.childNodes[0],n.exit);return qc(h,function(){return Ne(u).remove()}),h}),A}).transitions();return X4(l,function(){XH.call(r,e,i)}),l}function CS(r,t){return k1(r,t.tickDirection,t)}function qH(r,t){var e=(0,D.CR)(r,2),n=e[0],i=e[1];return[[0,0],[n*t,i*t]]}function $H(r,t,e,n,i){var a=i.tickLength,s=(0,D.CR)(qH(n,ya(a,[r,t,e])),2),o=(0,D.CR)(s[0],2),A=o[0],l=o[1],c=(0,D.CR)(s[1],2),u=c[0],h=c[1];return{x1:A,x2:u,y1:l,y2:h}}function t6(r,t,e,n,i){var a=i.tickFormatter,s=i.classNamePrefix,o=CS(t.value,i),A="line";Vt(a)&&(A=function(){return ya(a,[t,e,n,o])});var l=r.append(A).attr("className",Xe.tickItem.name);return _a(l,Xe.tickItem,Vn.tickItem,s),l}function e6(r,t,e,n,i,a,s){var o=CS(r.value,a),A=$H(r,t,e,o,a),l=A.x1,c=A.x2,u=A.y1,h=A.y2,d=(0,D.CR)(_o(cS(s,[r,t,e,o])),2),f=d[0],g=d[1];n.node().nodeName==="line"&&n.styles((0,D.pi)({x1:l,x2:c,y1:u,y2:h},f)),i.attr(g),n.styles(f)}function SS(r,t,e,n,i,a){var s=t6(Ne(this),r,t,e,n);e6(r,t,e,s,this,n,i);var o=(0,D.CR)(U0(r.value,n),2),A=o[0],l=o[1];return ks(this,{transform:"translate(".concat(A,", ").concat(l,")")},a)}function n6(r,t,e,n){var i=e.classNamePrefix,a=L1(t,e.tickFilter),s=tn(e,"tick");return r.selectAll(Xe.tick.class).data(a,function(o){return o.id||o.label}).join(function(o){var A=o.append("g").attr("className",Xe.tick.name).transition(function(l,c){return SS.call(this,l,c,a,e,s,!1)});return _a(A,Xe.tick,Vn.tick,i),A},function(o){return o.transition(function(A,l){return this.removeChildren(),SS.call(this,A,l,a,e,s,n.update)})},function(o){return o.transition(function(){var A=this,l=k0(this.childNodes[0],n.exit);return qc(l,function(){return A.remove()}),l})}).transitions()}function r6(r,t,e){var n=e.titlePosition,i=n===void 0?"lb":n,a=e.titleSpacing,s=M0(i),o=r.node().getLocalBounds(),A=(0,D.CR)(o.min,2),l=A[0],c=A[1],u=(0,D.CR)(o.halfExtents,2),h=u[0],d=u[1],f=(0,D.CR)(t.node().getLocalBounds().halfExtents,2),g=f[0],v=f[1],p=(0,D.CR)([l+h,c+d],2),y=p[0],x=p[1],F=(0,D.CR)(Oi(a),4),O=F[0],L=F[1],U=F[2],R=F[3];if(["start","end"].includes(i)&&e.type==="linear"){var j=e.startPos,q=e.endPos,et=(0,D.CR)(i==="start"?[j,q]:[q,j],2),it=et[0],dt=et[1],ft=sS([-dt[0]+it[0],-dt[1]+it[1]]),mt=(0,D.CR)(Go(ft,O),2),Rt=mt[0],Qt=mt[1];return{x:it[0]+Rt,y:it[1]+Qt}}return s.includes("t")&&(x-=d+v+O),s.includes("r")&&(y+=h+g+L),s.includes("l")&&(y-=h+g+R),s.includes("b")&&(x+=d+v+U),{x:y,y:x}}function i6(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 MS(r,t,e,n,i){var a=tn(n,"title"),s=(0,D.CR)(_o(a),2),o=s[0],A=s[1],l=A.transform,c=A.transformOrigin,u=(0,D._T)(A,["transform","transformOrigin"]);t.styles(u);var h=l||i6(r.node(),o.direction,o.position);r.styles((0,D.pi)((0,D.pi)({},o),{transformOrigin:c})),pS(r.node(),h);var d=r6(Ne(e._offscreen||e.querySelector(Xe.mainGroup.class)),t,n),f=d.x,g=d.y,v=ks(t.node(),{transform:"translate(".concat(f,", ").concat(g,")")},i);return v}function a6(r,t,e,n){var i=e.titleText,a=e.classNamePrefix;return r.selectAll(Xe.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 Ho(i)}).attr("className",Xe.title.name).transition(function(){return MS(Ne(this),r,t,e,n.enter)});return _a(o,Xe.title,Vn.title,a),o},function(s){return s.transition(function(){return MS(Ne(this),r,t,e,n.update)})},function(s){return s.remove()}).transitions()}function FS(r,t,e,n){var i=r.showLine,a=r.showTick,s=r.showLabel,o=r.classNamePrefix,A=t.maybeAppendByClassName(Xe.lineGroup,"g");_a(A,Xe.lineGroup,Vn.lineGroup,o);var l=ma(i,A,function(f){return mH(f,r,n)})||[],c=t.maybeAppendByClassName(Xe.tickGroup,"g");_a(c,Xe.tickGroup,Vn.tickGroup,o);var u=ma(a,c,function(f){return n6(f,e,r,n)})||[],h=t.maybeAppendByClassName(Xe.labelGroup,"g");_a(h,Xe.labelGroup,Vn.labelGroup,o);var d=ma(s,h,function(f){return JH(f,e,r,n,t.node())})||[];return(0,D.ev)((0,D.ev)((0,D.ev)([],(0,D.CR)(l),!1),(0,D.CR)(u),!1),(0,D.CR)(d),!1).filter(function(f){return!!f})}var s6=function(r){(0,D.ZT)(t,r);function t(e){return r.call(this,e,F1)||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=X_(o,u).filter(function(U){var R=U.value;return!(h&&R>h[0]&&R<h[1])}),v=G2(i===void 0?A:i),p=Ne(n).maybeAppendByClassName(Xe.gridGroup,"g");_a(p,Xe.gridGroup,Vn.gridGroup,d);var y=ma(c,p,function(U){return BH(U,g,e,v)})||[],x=Ne(n).maybeAppendByClassName(Xe.mainGroup,"g");_a(x,Xe.mainGroup,Vn.mainGroup,d),s&&(!this.initialized&&v.enter||this.initialized&&v.update)&&FS(e,Ne(this.offscreenGroup),g,G2(!1));var F=FS(e,Ne(x.node()),g,v),O=Ne(n).maybeAppendByClassName(Xe.titleGroup,"g");_a(O,Xe.titleGroup,Vn.titleGroup,d);var L=ma(l,O,function(U){return a6(U,a,e,v)})||[];return(0,D.ev)((0,D.ev)((0,D.ev)([],(0,D.CR)(y),!1),(0,D.CR)(F),!1),(0,D.CR)(L),!1).flat().filter(function(U){return!!U})},t}(Mr);function FK(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 TS(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 P1(r,t){return+r.toPrecision(t)}function TK(r){return r.toLocaleString()}function OK(r){return r.toExponential()}function IK(r,t){return t===void 0&&(t=0),Math.abs(r)<1e3?String(r):"".concat(P1(r/1e3,t).toLocaleString(),"K")}var NK=function(r,t,e){return r<0&&Number.isFinite(r)?t:e},LK=function(r,t,e){return r>0&&Number.isFinite(r)?t:e},kK=function(r,t){return r*t},QK=function(r,t){return r/2+(t||0)/2},_1=function(r){return r};class OS{constructor(t){this.options=Si({},this.getDefaultOptions()),this.update(t)}getOptions(){return this.options}update(t={}){this.options=Si({},this.options,t),this.rescale(t)}rescale(t){}}function H1(r,t){return t-r?e=>(e-r)/(t-r):e=>.5}function P0(r,...t){return t.reduce((e,n)=>i=>e(n(i)),r)}function o6(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 A6=T(75196),l6=T.n(A6);function G1(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 c6(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=G1(s,a,t+1/3),A=G1(s,a,t),l=G1(s,a,t-1/3);return[o*255,A*255,l*255,i]}function IS(r){const t=l6().get(r);if(!t)return null;const{model:e,value:n}=t;return e==="rgb"?n:e==="hsl"?c6(n):null}const _0=(r,t)=>e=>r*(1-e)+t*e,u6=(r,t)=>{const e=IS(r),n=IS(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})`}},h6=(r,t)=>typeof r=="number"&&typeof t=="number"?_0(r,t):typeof r=="string"&&typeof t=="string"?u6(r,t):()=>r,d6=(r,t)=>{const e=_0(r,t);return n=>Math.round(e(n))};function f6(r){return r===null}function NS(r){return!Ze(r)&&!f6(r)&&!Number.isNaN(r)}const z1=Math.sqrt(50),K1=Math.sqrt(10),V1=Math.sqrt(2);function H0(r,t,e){const n=(t-r)/Math.max(0,e),i=Math.floor(Math.log(n)/Math.LN10),a=n/PA(10,i);return i>=0?(a>=z1?10:a>=K1?5:a>=V1?2:1)*PA(10,i):-PA(10,-i)/(a>=z1?10:a>=K1?5:a>=V1?2:1)}function UK(r,t,e){const n=Math.abs(t-r)/Math.max(0,e);let i=PA(10,Math.floor(Math.log(n)/Math.LN10));const a=n/i;return a>=z1?i*=10:a>=K1?i*=5:a>=V1&&(i*=2),t<r?-i:i}const g6=(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=H0(s,o,e),A>0?(s=Math.floor(s/A)*A,o=Math.ceil(o/A)*A,A=H0(s,o,e)):A<0&&(s=Math.ceil(s*A)/A,o=Math.floor(o*A)/A,A=H0(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 v6(r,t){const e=t<r?t:r,n=r>t?r:t;return i=>Math.min(Math.max(e,i),n)}const p6=(r,t,e)=>{const[n,i]=r,[a,s]=t;let o,A;return n<i?(o=H1(n,i),A=e(a,s)):(o=H1(i,n),A=e(s,a)),P0(A,o)},m6=(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]=H1(o[l],o[l+1]),a[l]=e(A[l],A[l+1]);return l=>{const c=o6(r,l,1,n)-1,u=i[c],h=a[c];return P0(h,u)(l)}},LS=(r,t,e,n)=>(Math.min(r.length,t.length)>2?m6:p6)(r,t,n?d6:e);class y6 extends OS{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:_0,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 g6}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?v6(i[0],i[a-1]):_1}composeOutput(t,e){const{domain:n,range:i,round:a,interpolate:s}=this.options,o=LS(n.map(t),i,s,a);this.output=P0(o,e,t)}composeInput(t,e,n){const{domain:i,range:a}=this.options,s=LS(a,i.map(t),_0);this.input=P0(e,n,s)}}const w6=(r,t,e)=>{let n,i,a=r,s=t;if(a===s&&e>0)return[a];let o=H0(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 Jh extends y6{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:h6,tickMethod:w6,tickCount:5}}chooseTransforms(){return[_1,_1]}clone(){return new Jh(this.options)}}function kS({map:r,initKey:t},e){const n=t(e);return r.has(n)?r.get(n):e}function E6({map:r,initKey:t},e){const n=t(e);return r.has(n)?r.get(n):(r.set(n,e),e)}function B6({map:r,initKey:t},e){const n=t(e);return r.has(n)&&(e=r.get(n),r.delete(n)),e}function b6(r){return typeof r=="object"?r.valueOf():r}class QS extends Map{constructor(t){if(super(),this.map=new Map,this.initKey=b6,t!==null)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(kS({map:this.map,initKey:this.initKey},t))}has(t){return super.has(kS({map:this.map,initKey:this.initKey},t))}set(t,e){return super.set(E6({map:this.map,initKey:this.initKey},t),e)}delete(t){return super.delete(B6({map:this.map,initKey:this.initKey},t))}}const W1=Symbol("defaultUnknown");function US(r,t,e){for(let n=0;n<t.length;n+=1)r.has(t[n])||r.set(e(t[n]),n)}function RS(r){const{value:t,from:e,to:n,mapper:i,notFoundReturn:a}=r;let s=i.get(t);if(s===void 0){if(a!==W1)return a;s=e.push(t)-1,i.set(t,s)}return n[s%n.length]}function DS(r){return r instanceof Date?t=>`${t}`:typeof r=="object"?t=>JSON.stringify(t):t=>t}class j1 extends OS{getDefaultOptions(){return{domain:[],range:[],unknown:W1}}constructor(t){super(t)}map(t){return this.domainIndexMap.size===0&&US(this.domainIndexMap,this.getDomain(),this.domainKey),RS({value:this.domainKey(t),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(t){return this.rangeIndexMap.size===0&&US(this.rangeIndexMap,this.getRange(),this.rangeKey),RS({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=DS(e),this.rangeKey=DS(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 j1(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 x6(r){const t=Math.min(...r);return r.map(e=>e/t)}function C6(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 S6(r){return Math.round(r*1e12)/1e12}function M6(r){const{domain:t,range:e,paddingOuter:n,paddingInner:i,flex:a,round:s,align:o}=r,A=t.length,l=C6(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,p=x6(l),y=p.reduce((it,dt)=>it+dt),x=v/y,F=new QS(t.map((it,dt)=>{const ft=p[dt]*x;return[it,s?Math.floor(ft):ft]})),O=new QS(t.map((it,dt)=>{const mt=p[dt]*x+g;return[it,s?Math.floor(mt):mt]})),L=Array.from(O.values()).reduce((it,dt)=>it+dt),R=(h-(L-L/A*i))*o,j=c+R;let q=s?Math.round(j):j;const et=new Array(A);for(let it=0;it<A;it+=1){et[it]=S6(q);const dt=t[it];q+=O.get(dt)}return{valueBandWidth:F,valueStep:O,adjustedRange:et}}function F6(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 M6(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 p=new Array(n).fill(0).map((y,x)=>h+x*c);return{valueStep:c,valueBandWidth:u,adjustedRange:p}}class Z1 extends j1{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:W1,flex:[]}}constructor(t){super(t)}clone(){return new Z1(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}=F6({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 T6=function(r){(0,D.ZT)(t,r);function t(e){var n=this,i=e.style,a=(0,D._T)(e,["style"]);return n=r.call(this,Si({},{type:"column"},(0,D.pi)({style:i},a)))||this,n.columnsGroup=new Ai({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,")"),Ne(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),O6=function(r){(0,D.ZT)(t,r);function t(e){var n=this,i=e.style,a=(0,D._T)(e,["style"]);return n=r.call(this,Si({},{type:"lines"},(0,D.pi)({style:i},a)))||this,n.linesGroup=n.appendChild(new Ai),n.areasGroup=n.appendChild(new Ai),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){Ne(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){Ne(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 I6(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,D.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=Hl(l,v),c=Gl(c,v)}}for(var f=0,p=r.length;f<p;f+=1){var v=r[f];if(f===0&&!e)d=v;else if(f===p-1&&!e)h=v,a.push(d),a.push(h);else{var y=[f?f-1:p-1,f-1][e?0:1];o=r[y],A=r[e?(f+1)%p:f+1];var x=[0,0];x=T1(A,o),x=Go(x,t);var F=jh(v,o),O=jh(v,A),L=F+O;L!==0&&(F/=L,O/=L);var U=Go(x,-F),R=Go(x,O);h=Wh(v,U),u=Wh(v,R),u=Hl(u,Gl(A,v)),u=Gl(u,Hl(A,v)),U=T1(u,v),U=Go(U,-F/O),h=Wh(v,U),h=Hl(h,Gl(o,v)),h=Gl(h,Hl(o,v)),R=T1(v,h),R=Go(R,O/F),u=Wh(v,R),s&&(h=Gl(h,l),h=Hl(h,c),u=Gl(u,l),u=Hl(u,c)),a.push(d),a.push(h),d=u}}return e&&a.push(a.shift()),a}function N6(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=I6(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,D.CR)(a,1),d=n[0],c.push(["C",u[0],u[1],h[0],h[1],d[0],d[1]])),c}function L6(r,t){var e,n=t.x,i=t.y,a=(0,D.CR)(i.getOptions().range||[0,0],2),s=a[0],o=a[1];return o>s&&(e=(0,D.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),dr(i.map(c),o,s)]});return l})}function qh(r,t){t===void 0&&(t=!1);var e=t?r.length-1:0,n=r.map(function(i,a){return(0,D.ev)([a===e?"M":"L"],(0,D.CR)(i),!1)});return t?n.reverse():n}function G0(r,t){if(t===void 0&&(t=!1),r.length<=2)return qh(r);for(var e=[],n=r.length,i=0;i<n;i+=1){var a=t?r[n-i-1]:r[i];Pr(a,e.slice(-2))||e.push.apply(e,(0,D.ev)([],(0,D.CR)(a),!1))}var s=N6(e,!1);return t?s.unshift((0,D.ev)(["M"],(0,D.CR)(r[n-1]),!1)):s.unshift((0,D.ev)(["M"],(0,D.CR)(r[0]),!1)),s}function Y1(r,t,e){var n=Dc(r);return n.push(["L",t,e],["L",0,e],["Z"]),n}function k6(r,t,e,n){return r.map(function(i){return Y1(t?G0(i):qh(i),e,n)})}function Q6(r,t,e){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=qh(a),o=void 0;if(i===0)o=Y1(s,t,e);else{var A=r[i-1],l=qh(A,!0);l[0][0]="L",o=(0,D.ev)((0,D.ev)((0,D.ev)([],(0,D.CR)(s),!1),(0,D.CR)(l),!1),[["Z"]],!1)}n.push(o)}return n}function U6(r,t,e){for(var n=[],i=r.length-1;i>=0;i-=1){var a=r[i],s=G0(a),o=void 0;if(i===0)o=Y1(s,t,e);else{var A=r[i-1],l=G0(A,!0),c=a[0];l[0][0]="L",o=(0,D.ev)((0,D.ev)((0,D.ev)([],(0,D.CR)(s),!1),(0,D.CR)(l),!1),[(0,D.ev)(["M"],(0,D.CR)(c),!1),["Z"]],!1)}n.push(o)}return n}var R6=function(r,t){if(Qi(r)){for(var e,n=1/0,i=0;i<r.length;i++){var a=r[i],s=Vt(t)?t(a):a[t];s<n&&(e=a,n=s)}return e}},D6=function(r,t){if(Qi(r)){for(var e,n=-1/0,i=0;i<r.length;i++){var a=r[i],s=Vt(t)?t(a):a[t];s>n&&(e=a,n=s)}return e}};function PS(r){return r.length===0?[0,0]:[ic(R6(r,function(t){return ic(t)||0})),ac(D6(r,function(t){return ac(t)||0}))]}function _S(r){for(var t=Dc(r),e=t[0].length,n=(0,D.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 P6=function(r){(0,D.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=Dc(e);return ye(n[0])?[n]:n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"data",{get:function(){return this.attributes.isStack?_S(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,D.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=tn(this.attributes,"area"),A=tn(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=L6(c,{type:"line",x:h,y:d}),g=[];if(o){var v=this.baseline;a?g=s?U6(f,l,v):Q6(f,l,v):g=k6(f,s,l,v)}return{lines:f.map(function(p,y){return(0,D.pi)({stroke:e.getColor(y),d:s?G0(p):qh(p)},A)}),areas:g.map(function(p,y){return(0,D.pi)({d:p,fill:e.getColor(y)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"columnsStyle",{get:function(){var e=this,n=tn(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=_S(l));var c=this.createScales(l),u=c.x,h=c.y,d=(0,D.CR)(PS(l),2),f=d[0],g=d[1],v=new Jh({domain:[0,g-(f>0?0:f)],range:[0,A*o]}),p=u.getBandWidth(),y=this.rawData;return{columns:l.map(function(x,F){return x.map(function(O,L){var U=p/l.length,R=function(){return{x:u.map(L)+U*F,y:O>=0?h.map(O):h.map(0),width:U,height:v.map(Math.abs(O))}},j=function(){return{x:u.map(L),y:h.map(O),width:p,height:v.map(y[F][L])}};return(0,D.pi)((0,D.pi)({fill:e.getColor(F)},n),a?j():R())})})}},enumerable:!1,configurable:!0}),t.prototype.render=function(e,n){z4(n,".container","rect").attr("className","container").node();var i=e.type,a=e.x,s=e.y,o="spark".concat(i),A=(0,D.pi)({x:a,y:s},i==="line"?this.linesStyle:this.columnsStyle);Ne(n).selectAll(".spark").data([i]).join(function(l){return l.append(function(c){return c==="line"?new O6({className:o,style:A}):new T6({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 Qi(n)?n[e%n.length]:Vt(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,D.CR)(PS(e),2),g=f[0],v=f[1],p=new Jh({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 Jh({domain:[0,e[0].length-1],range:[0,h]}),y:p}:{type:s,x:new Z1({domain:e[0].map(function(y,x){return x}),range:[0,h],paddingInner:c,paddingOuter:c/2,align:.5}),y:p}},t.tag="sparkline",t}(Mr),HS={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},GS={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},zS={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},co=Ls({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),ss=Ls({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),_6=function(r){(0,D.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,D._T)(e,["x","y","size","radius","orientation","classNamePrefix"]),d=o,f=d*2.4,g=u?"".concat(ss.iconRect.name," ").concat(u,"handle-icon-rect"):ss.iconRect.name,v=function(L){return u?"".concat(ss.iconLine,"-").concat(L," ").concat(u,"handle-icon-line"):"".concat(ss.iconLine,"-").concat(L)},p=Ne(n).maybeAppendByClassName(ss.iconRect,"rect").attr("className",g).styles((0,D.pi)((0,D.pi)({},h),{width:d,height:f,radius:l,x:i-d/2,y:a-f/2,transformOrigin:"center"})),y=i+1/3*d-d/2,x=i+2/3*d-d/2,F=a+1/4*f-f/2,O=a+3/4*f-f/2;p.maybeAppendByClassName("".concat(ss.iconLine,"-1"),"line").attr("className",v(1)).styles((0,D.pi)({x1:y,x2:y,y1:F,y2:O},h)),p.maybeAppendByClassName("".concat(ss.iconLine,"-2"),"line").attr("className",v(2)).styles((0,D.pi)({x1:x,x2:x,y1:F,y2:O},h)),c==="vertical"&&(p.node().style.transform="rotate(90)")},t}(Mr),H6=function(r){(0,D.ZT)(t,r);function t(e){return r.call(this,e,zS)||this}return t.prototype.renderLabel=function(e){var n=this,i=this.attributes,a=i.x,s=i.y,o=i.showLabel,A=tn(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,D._T)(A,["x","y","transform","transformOrigin"]),v=(0,D.CR)(_o(g,[]),2),p=v[0],y=v[1],x=Ne(e).maybeAppendByClassName(ss.labelGroup,"g").styles(y),F=(0,D.pi)((0,D.pi)({},GS),p),O=F.text,L=(0,D._T)(F,["text"]);ma(!!o,x,function(U){n.label=U.maybeAppendByClassName(ss.label,"text").styles((0,D.pi)((0,D.pi)({},L),{x:a+c,y:s+h,transform:d,transformOrigin:f,text:"".concat(O)})),n.label.on("mousedown",function(R){R.stopPropagation()}),n.label.on("touchstart",function(R){R.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,D.pi)((0,D.pi)({x:i,y:a,orientation:s,classNamePrefix:A},HS),tn(this.attributes,"icon")),c=this.attributes.iconShape,u=c===void 0?function(){return new _6({style:l})}:c,h=Ne(e).maybeAppendByClassName(ss.iconGroup,"g");h.selectAll(ss.icon.class).data([u]).join(function(d){return d.append(typeof u=="string"?u:function(){return u(o)}).attr("className",ss.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}(Mr),G6=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,e,(0,D.pi)((0,D.pi)((0,D.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},Jc(zS,"handle")),Jc(HS,"handleIcon")),Jc(GS,"handleLabel")))||this;return n.range=[0,1],n.onDragStart=function(i){return function(a){a.stopPropagation(),n.target=i,n.prevPos=n.getOrientVal(TS(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(TS(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 Wr("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=tn(this.attributes,"sparkline");return(0,D.pi)((0,D.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,D.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,D.CR)(Oi(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(co.selection.class).each(function(i,a){ks(this,n[a],e)})},t.prototype.updateHandlesPosition=function(e){this.attributes.showHandle&&(this.startHandle&&ks(this.startHandle,this.getHandleStyle("start"),e),this.endHandle&&ks(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=tn(this.attributes,"track");this.trackShape=Ne(e).maybeAppendByClassName(co.track,"rect").styles((0,D.pi)((0,D.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=Ne(e).maybeAppendByClassName(co.brushArea,"rect").styles((0,D.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=Ne(e).maybeAppendByClassName(co.sparklineGroup,"g");ma(o==="horizontal",A,function(l){var c=(0,D.pi)((0,D.pi)({},n.sparklineStyle),{x:a,y:s});l.maybeAppendByClassName(co.sparkline,function(){return new P6({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(co.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 H6({style:e.getHandleStyle(h)})}).each(function(u){var h=u.type;this.attr("class","".concat(co.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=Ne(e).maybeAppendByClassName(co.foreground,"g");var A=tn(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,D.pi)((0,D.pi)({},A),{transform:"translate(".concat(i,", ").concat(a,")")}))},c=this;this.foregroundGroup.selectAll(co.selection.class).data(s==="value"?[]:this.calcSelectionArea().map(function(u,h){return{style:(0,D.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",co.selection.name).call(l).each(function(h,d){var f=this;d===1?(c.selectionShape=Ne(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,D.CR)(this.range,2),s=a[0],o=a[1],A=(0,D.CR)(this.getValues().map(function(v){return P1(v,n)}),2),l=A[0],c=A[1],u=Array.isArray(e)?e:[l,e!=null?e:c],h=(0,D.CR)((u||[l,c]).map(function(v){return P1(v,n)}),2),d=h[0],f=h[1];if(this.attributes.type==="value")return[0,dr(f,s,o)];d>f&&(i=(0,D.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,D.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,D.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=tn(this.attributes,"handle"),c=tn(l,"label"),u=l.spacing,h=this.getHandleSize(),d=this.clampValues(),f=e==="start"?d[0]:d[1],g=o(f),v=new m1({style:(0,D.pi)((0,D.pi)((0,D.pi)({},c),this.inferTextStyle(e)),{text:g})}),p=v.getBBox(),y=p.width,x=p.height;if(v.destroy(),!A){if(a==="value")return{text:g,x:0,y:-x-u};var F=u+h+(s==="horizontal"?y/2:0);return n={text:g},n[s==="horizontal"?"x":"y"]=e==="start"?-F:F,n}var O=0,L=0,U=this.availableSpace,R=U.width,j=U.height,q=this.calcSelectionArea()[1],et=q.x,it=q.y,dt=q.width,ft=q.height,mt=u+h;if(s==="horizontal"){var Rt=mt+y/2;if(e==="start"){var Qt=et-mt-y;O=Qt>0?-Rt:Rt}else{var yt=R-et-dt-mt>y;O=yt?Rt:-Rt}}else{var xt=mt,Dt=x+mt;e==="start"?L=it-h>x?-Dt:xt:L=j-(it+ft)-h>x?Dt:-xt}return{x:O,y:L,text:g}},t.prototype.getHandleLabelStyle=function(e){var n=tn(this.attributes,"handleLabel");return(0,D.pi)((0,D.pi)((0,D.pi)({},n),this.calcHandleText(e)),this.inferTextStyle(e))},t.prototype.getHandleIconStyle=function(){var e=this.attributes.handleIconShape,n=tn(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,D.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,D.pi)((0,D.pi)((0,D.pi)({},Jc(this.getHandleIconStyle(),"icon")),Jc((0,D.pi)((0,D.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,D.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,D.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 Wr(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}(Mr),z6={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},X1=Ls({background:"background",labelGroup:"label-group",label:"label"},"indicator"),K6=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,e,z6)||this;return n.point=[0,0],n.group=n.appendChild(new Ai({})),n.isMutationObserved=!0,n}return t.prototype.renderBackground=function(){if(this.label){var e=this.attributes,n=e.position,i=e.padding,a=(0,D.CR)(Oi(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 Gi(u[0]-l,u[1]-s,h[0]+o-u[0]+l,h[1]+A-u[1]+s),f=this.getPath(n,d),g=tn(this.attributes,"background");this.background=Ne(this.group).maybeAppendByClassName(X1.background,"path").styles((0,D.pi)((0,D.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=tn(this.attributes,"label"),s=(0,D.CR)(_o(a),2),o=s[0],A=s[1],l=o.text,c=(0,D._T)(o,["text"]);if(this.label=Ne(this.group).maybeAppendByClassName(X1.labelGroup,"g").styles(A),!!i){var u=this.label.maybeAppendByClassName(X1.label,function(){return Ho(n(i))}).style("text",n(i).toString());u.selectAll("text").styles(c)}},t.prototype.adjustLayout=function(){var e=(0,D.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,D.ev)([u+1,1],(0,D.CR)(h),!1)),l[0][0]="M",l},t.prototype.createCorner=function(e,n){n===void 0&&(n=10);var i=.8,a=C_.apply(void 0,(0,D.ev)([],(0,D.CR)(e),!1)),s=(0,D.CR)(e,2),o=(0,D.CR)(s[0],2),A=o[0],l=o[1],c=(0,D.CR)(s[1],2),u=c[0],h=c[1],d=(0,D.CR)(a?[u-A,[A,u]]:[h-l,[l,h]],2),f=d[0],g=(0,D.CR)(d[1],2),v=g[0],p=g[1],y=f/2,x=f/Math.abs(f),F=n*x,O=F/2,L=F*Math.sqrt(3)/2*i,U=(0,D.CR)([v,v+y-O,v+y,v+y+O,p],5),R=U[0],j=U[1],q=U[2],et=U[3],it=U[4];return a?(this.point=[q,l-L],[["L",R,l],["L",j,l],["L",q,l-L],["L",et,l],["L",it,l]]):(this.point=[A+L,q],[["L",A,R],["L",A,j],["L",A+L,q],["L",A,et],["L",A,it]])},t.prototype.applyVisibility=function(){var e=this.attributes.visibility;e==="hidden"?Ns(this):Vh(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}(Mr),V6=function(r){(0,D.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 Ci({})),n.label=n.background.appendChild(new Ai({})),n}return Object.defineProperty(t.prototype,"padding",{get:function(){return Oi(this.style.padding)},enumerable:!1,configurable:!0}),t.prototype.renderLabel=function(){var e=this.style,n=e.label,i=e.value,a=tn(this.attributes,"label");Ne(this.label).maybeAppend(".label",function(){return Ho(n)}).attr("className","label").styles(a),this.label.attr("__data__",i)},t.prototype.renderBackground=function(){var e=this.label.getBBox(),n=(0,D.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=tn(this.attributes,"background"),d=this.style,f=d.width,g=f===void 0?0:f,v=d.height,p=v===void 0?0:v,y=d.selected;this.background.attr((0,D.pi)((0,D.pi)({},h),{width:Math.max(c,g),height:Math.max(u,p),fill:y?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}(Mr),W6=function(r){(0,D.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 Ci({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new Ci({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 Oi(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=tn(this.attributes,"select"),h=tn(this.attributes,"placeholder");this.select.attr((0,D.pi)((0,D.pi)({x:a,y:s,width:o,height:A},u),{fill:"#fff",strokeWidth:l?1:0}));var d=this.dropdownPadding,f=10;c&&Ne(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(x){return x.value===e.currentValue}),v=(0,D.pi)({x:a+d[3]},h);Ne(this.select).selectAll(".placeholder").data(g?[]:[1]).join(function(x){return x.append("text").attr("className","placeholder").styles(v).style("y",function(){var F=this.getBBox();return s+(A-F.height)/2})},function(x){return x.styles(v)},function(x){return x.remove()});var p=tn(this.attributes,"optionLabel"),y=(0,D.pi)({x:a+d[3]},p);Ne(this.select).selectAll(".value").data(g?[g]:[]).join(function(x){return x.append(function(F){return Ho(F.label)}).attr("className","value").styles(y).style("y",function(){var F=this.getBBox();return s+(A-F.height)/2})},function(x){return x.styles(y)},function(x){return x.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=tn(this.attributes,"dropdown"),f=tn(this.attributes,"option"),g=this.dropdownPadding;Ne(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(c,function(y){return y.value}).join(function(y){return y.append(function(x){return new V6({className:"dropdown-item",style:(0,D.pi)((0,D.pi)((0,D.pi)({},x),f),{width:A-g[1]-g[3],selected:x.value===e.currentValue,onClick:function(F,O,L){e.setValue(F),u==null||u(F,O,L),e.dispatchEvent(new Wr("change",{detail:{value:F,option:O,item:L}})),Ns(e.dropdown)}})})}).each(function(x,F){var O,L=(O=this.parentNode)===null||O===void 0?void 0:O.children,U=L.reduce(function(R,j,q){return q<F&&(R+=j.getBBox().height),R},0);this.attr("transform","translate(".concat(g[3],", ").concat(g[0]+U,")"))})},function(y){return y.update(function(x){return{selected:x.value===e.currentValue}})},function(y){return y.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(),p=d.spacing;this.dropdown.attr((0,D.pi)({transform:"translate(".concat(s,", ").concat(o+l+p,")"),width:v.width+g[1]+g[3],height:v.height+g[0]+g[2]},d)),!h&&Ns(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"?Ns(e.dropdown):Vh(e.dropdown)}),this.addEventListener("pointerenter",function(){e.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){e.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){e.isPointerInSelect||Ns(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}(Mr),Qs=function(r){(0,D.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 Ci({})),n.icon=n.appendChild(new Ai({})),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 Oi(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconSize",{get:function(){var e=this.attributes.size,n=(0,D.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=tn(this.attributes,"background");this.background.attr((0,D.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 K6({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}(Mr),$h=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"}})},j6=function(r){(0,D.ZT)(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.arcPath=function(e,n,i){var a=(0,D.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,D.CR)(A(-5/4*Math.PI),2),c=l[0],u=l[1],h=(0,D.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;Ne(this.icon).maybeAppend(".reset","path").styles({stroke:a,lineWidth:o,d:this.arcPath(n,i,s/2-o),markerStart:$h(A,a)})},t}(Qs),Z6=function(r){(0,D.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]];Ne(this.icon).maybeAppend(".backward","polygon").styles({points:l,fill:a})},t}(Qs),Y6=function(r){(0,D.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]];Ne(this.icon).maybeAppend(".forward","polygon").styles({points:l,fill:a})},t}(Qs),X6=function(r){(0,D.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]];Ne(this.icon).maybeAppend(".play","polygon").styles({points:A,fill:a})},t}(Qs),J6=function(r){(0,D.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]];Ne(this.icon).maybeAppend(".pause","polygon").styles({points:A,fill:a})},t}(Qs),q6=function(r){(0,D.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;Ne(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}),Ne(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}),Ne(this.icon).maybeAppend(".left-arrow","line").styles({x1:n,y1:i,x2:n-o/2+l*2,y2:i,stroke:a,lineWidth:A,markerEnd:$h(A*2,a)}),Ne(this.icon).maybeAppend(".right-arrow","line").styles({x1:n,y1:i,x2:n+o/2-l*2,y2:i,stroke:a,lineWidth:A,markerEnd:$h(A*2,a)})},t}(Qs),$6=function(r){(0,D.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;Ne(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;Ne(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:$h(A*2,a)}),Ne(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:$h(A*2,a)})},t}(Qs),KS=function(r){return[[-r/2,-r/2],[-r/2,r/2],[r/2,r/2]]},t5=function(r){(0,D.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,D.CR)([n-o/2+l,i+o/2-l*2],2),d=h[0],f=h[1];Ne(this.icon).maybeAppend(".coordinate","polyline").styles({points:KS(o).map(function(g){var v=(0,D.CR)(g,2),p=v[0],y=v[1];return[p+n,y+i]}),stroke:a,lineWidth:A}),Ne(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}(Qs),e5=function(r){(0,D.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,D.CR)([i-A/2+c*2,a+A/2-c],2),f=d[0],g=d[1];Ne(this.icon).maybeAppend(".coordinate","polyline").styles({points:KS(A).map(function(v){var p=(0,D.CR)(v,2),y=p[0],x=p[1];return[y+i,x+a]}),stroke:s,lineWidth:l}),Ne(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(v,p){return{value:v,index:p}})).join(function(v){return v.append("line").attr("className","column").style("x1",function(p){var y=p.index;return f+u*y}).style("y1",g).style("x2",function(p){var y=p.index;return f+u*y}).style("y2",function(p){var y=p.value;return g-h*y}).styles({y1:g,stroke:s,lineWidth:l})})},t}(Qs),n5=function(r){(0,D.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;Ne(this.icon).maybeAppend(".split","line").styles({x1:n,y1:i-o/2,x2:n,y2:i+o/2,stroke:a,lineWidth:A})},t}(Qs),J1=function(r){(0,D.ZT)(t,r);function t(){var e=r.apply(this,(0,D.ev)([],(0,D.CR)(arguments),!1))||this;return e.showBackground=!1,e}return Object.defineProperty(t.prototype,"padding",{get:function(){return Oi(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=A1(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),l=dr(e,20,1/0),c=20,u=(0,D.pi)((0,D.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}]});Ne(this.icon).maybeAppend(".speed",function(){return new W6({style:u})}).attr("className","speed").each(function(){this.update(u)})},t.tag="SpeedSelect",t}(Qs),q1=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,e)||this;return n.icon=n.appendChild(new Ai({})),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,D._T)(n,["onChange"]);Ne(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,D.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,D.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}(Mr),$1=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{type:"play"}},e))||this;return n.toggles=[["play",X6],["pause",J6]],n}return t}(q1),tw=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{type:"range"}},e))||this;return n.toggles=[["range",q6],["value",$6]],n}return t}(q1),ew=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,Zr({},{style:{type:"column"}},e))||this;return n.toggles=[["line",t5],["column",e5]],n}return t}(q1),r5={reset:j6,speed:J1,backward:Z6,playPause:$1,forward:Y6,selectionType:tw,chartType:ew,split:n5},i5=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,Zr({},t.defaultOptions,e))||this;return n.background=n.appendChild(new Ci({})),n.functions=n.appendChild(new Ai({})),n}return Object.defineProperty(t.prototype,"padding",{get:function(){return Oi(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=tn(this.attributes,"background");this.background.attr((0,D.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,D.CR)(this.padding,4),f=d[1],g=d[3],v=a.reduce(function(x,F){return x.length&&F.length?x.concat.apply(x,(0,D.ev)(["split"],(0,D.CR)(F),!1)):x.concat.apply(x,(0,D.ev)([],(0,D.CR)(F),!1))},[]),p=v.length*(s+o)-o,y={left:g+s/2,center:(c-p)/2+s/2,right:c-p-g-f+s/2}[h]||0;(n=this.speedSelect)===null||n===void 0||n.destroy(),this.functions.removeChildren(),v.forEach(function(x,F){var O,L=r5[x],U={x:A+F*(s+o)+y,y:l+u/2,size:s};if(L===J1?(U.speed=e.attributes.speed,U.onSelect=function(j){return e.handleFunctionChange(x,{value:j})}):[$1,tw,ew].includes(L)?(U.onChange=function(j){return e.handleFunctionChange(x,{value:j})},L===$1&&(U.type=e.attributes.state==="play"?"pause":"play"),L===tw&&(U.type=e.attributes.selectionType==="range"?"value":"range"),L===ew&&(U.type=e.attributes.chartType==="line"?"column":"line")):U.onClick=function(){return e.handleFunctionChange(x,{value:x})},L===J1){var R=(O=e.ownerDocument)===null||O===void 0?void 0:O.defaultView;R&&(e.speedSelect=new L({style:(0,D.pi)((0,D.pi)({},U),{zIndex:100})}),R.appendChild(e.speedSelect))}else e.functions.appendChild(new L({style:U}))})},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}(Mr),a5=function(r){(0,D.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}(eo),s5=function(r){(0,D.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=tn(this.attributes,"background");Ne(this).maybeAppend("background","rect").attr("className","background").styles((0,D.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=tn(this.attributes,"icon"),o=1,A=a/2;Ne(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,D.pi)({x1:n-o,y1:i-A,x2:n-o,y2:i+A},s)),Ne(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,D.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=tn(this.attributes,"border"),l=o==="start"?+a/2:-a/2;Ne(this).maybeAppend("border","line").attr("className","border").styles((0,D.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}(Mr);function o5(r,t){return typeof r=="number"?VS(r):A5(r,t)}function A5(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?Aa(e,`HH:mm
|
|
|
YYYY-MM-DD`):Aa(e,"HH:mm");case"half-day":return e.getHours()<12?`AM
|
|
|
`.concat(Aa(e,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(e.getDate())?Aa(e,`DD
|
|
|
YYYY-MM`):Aa(e,"DD");case"week":return e.getDate()<=7?Aa(e,`DD
|
|
|
YYYY-MM`):Aa(e,"DD");case"month":return[0,6].includes(e.getMonth())?Aa(e,`MM\u6708
|
|
|
YYYY`):Aa(e,"MM\u6708");case"season":return[0].includes(e.getMonth())?Aa(e,`MM\u6708
|
|
|
YYYY`):Aa(e,"MM\u6708");case"year":return Aa(e,"YYYY");default:return Aa(e,"YYYY-MM-DD HH:mm")}}function VS(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 l5=function(r){(0,D.ZT)(t,r);function t(e){var n=r.call(this,Zr({},t.defaultOptions,e))||this;n.axis=n.appendChild(new s6({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),n.timeline=n.appendChild(new G6({style:{onChange:function(u){n.handleSliderChange(u)}}})),n.controller=n.appendChild(new i5({})),n.states={},n.handleSliderChange=function(u){var h=function(){var d=n.states.values;return Array.isArray(d)?(0,D.ev)([],(0,D.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=dr(+s-A,0,+s),c=new Gi(n,i+ +s-A,+a,A),u,h=0;o==="chart"?(h=35,u=new Gi(n,i+l-h,+a,h)):u=new Gi;var d=o==="time"?10:l,f=new Gi(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,D.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,D.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,D.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,D.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,D.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 s5({style:{type:i,height:n,iconSize:n/6}})}:function(){return new vl({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=tn(this.attributes,"chart"),v=g.type,p=(0,D._T)(g,["type"]),y=l==="range";if(d==="time")return(0,D.pi)({handleIconShape:function(){return new a5({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:y?-15:0,autoFitLabel:y,handleSpacing:y?-15:0,trackFill:"#edeeef",trackLength:s,trackOpacity:.5,trackRadius:o/2,trackSize:o/2,type:l,values:this.sliderValues,formatter:function(O){if(f)return f(O);var L=n.getDatumByRatio(O).time;return typeof L=="number"?VS(L):Aa(L,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},p);var x=l==="range"?5:0,F=u.map(function(O){var L=O.value;return L});return(0,D.pi)({handleIconOffset:x,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},p)},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=tn(this.attributes,"axis"),A=e.x,l=e.y,c=e.width,u=(0,D.ev)((0,D.ev)([],(0,D.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,D.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):o5(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=tn(this.attributes,"controller"),c=this,u=(0,D.pi)((0,D.pi)((0,D.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,D.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,D.CR)(o,2),u=c[0],h=c[1],d=i.findIndex(function(x){var F=x.time;return F===u}),f=i.findIndex(function(x){var F=x.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 p=function(x){var F=(0,D.CR)(x.sort(function(R,j){return R-j}),2),O=F[0],L=F[1],U=function(R){return dr(R,0,a)};return L>a?A==="value"?[0,0]:l==="acc"?[U(O),U(O)]:[0,U(L-O)]:O<0?l==="acc"?[0,U(L)]:[U(O+a-L),a]:[U(O),U(L)]},y=p(v);return this.setByIndex(y),this.updateSelection(),y},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}(Mr);function c5(r){return r instanceof Date}var u5=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())})},h5=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 d5=["timestamp","time","date","datetime"];class z0 extends yi{get padding(){return Ua(this.options.padding)}constructor(t,e){super(t,Object.assign({},z0.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=WS(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=h5(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 p=(Qi(v)?v:[v,v]).map(y=>c5(y)?y.getTime():y);this.options.mode==="modify"?this.filterElements(p):this.hiddenElements(p),n==null||n(p)}},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 l5({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]=T0({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 u5(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=WS(this.originalData);n.forEach(l=>{const c=`${l}s`;o[c]=(this.originalData[c]||[]).filter(u=>{const h=i(u);return!!jS(h,t)})});const A=[...o.nodes,...o.combos].map(l=>Nt(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=Nt(u),d=i(u);jS(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()}}z0.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>f5(r,d5,void 0),loop:!1};const WS=r=>{const{nodes:t=[],edges:e=[],combos:n=[]}=r;return{nodes:[...t],edges:[...e],combos:[...n]}},jS=(r,t)=>{if(ye(t))return r===t;const[e,n]=t;return r>=e&&r<=n},f5=(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 g5=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 ZS={fill:"#1D2129",wordWrap:!0,maxLines:1,textOverflow:"ellipsis",textBaseline:"top",textAlign:"start",x:0},v5=Object.assign(Object.assign({},ZS),{fillOpacity:.9,fontSize:16,fontWeight:"bold"}),p5=Object.assign(Object.assign({},ZS),{fillOpacity:.65,fontSize:12,fontWeight:"normal"}),m5={align:"left",spacing:8,size:44,padding:[16,24,0,24]},nw="title",YS="subtitle";class y5 extends yi{get padding(){return Ua(this.options.padding)}constructor(t,e){const n=Object.assign({},m5,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]=T0({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 w5({options:this.options,ctx:this.context});t.removeChildren(),e.getTitle().forEach(n=>{n&&t.appendChild(n)})}}class w5{get padding(){return Ua(this.options.padding)}constructor(t){const{options:e,ctx:n}=t;this.options=e,this.context=n}getTitle(){const t=this.options,e=nw,n=t[e],i=YS,a=t[i],{spacing:s=44,padding:o,align:A}=t,l=g5(t,[typeof e=="symbol"?e:e+"",typeof i=="symbol"?i:i+"","spacing","padding","align"]),c=n,u=a,h=Ir(l,nw),d=Ir(l,YS),[f]=this.context.graph.getSize(),[g=0,v=0,,p=0]=this.padding,y=f,x=y-p-v;let F=null,O=p,L="left";switch(A){case"left":O=p,L="left";break;case"center":O=y/2,L="center";break;case"right":O=y-v,L="right";break;default:O=p,L="left"}const U=new Ao({className:nw,style:Object.assign(Object.assign(Object.assign(Object.assign({},v5),{wordWrapWidth:x-5,x:O,y:g,textAlign:L}),h),{text:c})}),R=U.getBBox();return u&&(F=new Ao({className:"subTitle",style:Object.assign(Object.assign(Object.assign(Object.assign({},p5),{wordWrapWidth:x-5,x:O,y:R.height+s+g,textAlign:L}),d),{text:u})})),[U,F]}}function E5(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 B5=`
|
|
|
.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;
|
|
|
}
|
|
|
`,b5=`
|
|
|
<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 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())})};class K0 extends yi{constructor(t,e){super(t,Object.assign({},K0.defaultOptions,e)),this.$element=Xc("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),l1("g6-toolbar-css","style",{},B5,document.head),l1("g6-toolbar-svgicon","div",{display:"none"},b5),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return XS(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,E5(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return XS(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("")})}}K0.defaultOptions={position:"top-left"};function rw(r){var t=document.createElement("div");t.innerHTML=r;var e=t.childNodes[0];return e&&t.contains(e)&&t.removeChild(e),e}function x5(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 C5=x5,JS=function(r,t){if(t==null){r.innerHTML="";return}r.replaceChildren?Array.isArray(t)?r.replaceChildren.apply(r,(0,D.ev)([],(0,D.CR)(t),!1)):r.replaceChildren(t):(r.innerHTML="",Array.isArray(t)?t.forEach(function(e){return r.appendChild(e)}):r.appendChild(t))};function iw(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 qS={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function S5(r){var t;r===void 0&&(r="");var e=iw(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,D.pi)({flex:1},qS),t[".".concat(e.VALUE)]=(0,D.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},qS),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 M5=function(r){(0,D.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=iw(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:S5(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,D._T)(a,["name","color","index"]),d=(0,D.pi)({name:A,color:c,index:u!=null?u:s},h);return rw(C5(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=rw(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:JS(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=iw(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,JS(d,h);var f=this.element.querySelector(".".concat(c.LIST));f?f.replaceWith(d):u.appendChild(d)}R4(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,D.CR)(h,2),g=f[0],v=f[1],p=(0,D.CR)(A[d],2),y=p[0],x=p[1];h=[g+(c/2+a[0])*y,v+(u/2+a[1])*x]}),h},t.prototype.setOffsetPosition=function(e){var n=(0,D.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,D.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,D.CR)([+o+i,+A+a],2),g=f[0],v=f[1],p={left:"right",right:"left",top:"bottom",bottom:"top"},y=l.x,x=l.y,F=l.width,O=l.height,L={left:g<y,right:g+h>y+F,top:v<x,bottom:v+d>x+O},U=[];c.split("-").forEach(function(j){L[j]?U.push(p[j]):U.push(j)});var R=U.join("-");return this.getRelativeOffsetFromCursor(R)},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 Gi(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}(Mr),$S=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 V0 extends yi{constructor(t,e){super(t,Object.assign({},V0.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=>$S(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=>$S(this,void 0,void 0,function*(){var i,a;const{client:s,target:{id:o}}=n;if(Ih(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(p=>({name:"ID",value:p.id||`${p.source} -> ${p.target}`,color:v}))}}this.currentTarget=o;let d,f;if(s)d=s.x,f=s.y;else{const g=Fi(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 M5({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()}}V0.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var tM=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 nu;function eM(r,t){return nu||(nu=document.createElement("canvas")),nu.width=r,nu.height=t,nu.getContext("2d").clearRect(0,0,r,t),nu}function F5(r,t,e,n){return tM(this,void 0,void 0,function*(){const i=eM(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 T5(r,t,e,n){return tM(this,void 0,void 0,function*(){const i=eM(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 O5=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())})},I5=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 W0 extends yi{constructor(t,e){super(t,Object.assign({},W0.defaultOptions,e)),this.$element=Xc("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return O5(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=I5(n,["width","height","text","imageURL"]);Object.keys(A).forEach(c=>{c.startsWith("background")&&(this.$element.style[c]=t[c])});const l=o?yield T5(i,a,o,A):yield F5(i,a,s,A);this.$element.style.backgroundImage=`url(${l})`})}destroy(){super.destroy(),this.$element.remove()}}W0.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const N5=["#7E92B5","#F4664A","#FFBE3A"],L5={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},k5={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function nM(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=N5,nodePaletteOptions:h=L5,edgeColor:d,edgeColorDisabled:f,edgePaletteOptions:g=k5,comboColor:v,comboColorDisabled:p,comboStroke:y,comboStrokeDisabled:x,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:y,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:y},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:p,fillOpacity:.25,labelOpacity:.25,stroke:x,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 Q5=nM({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"}),U5=nM({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 DA extends Ay{beforeDraw(t,e){return t}afterLayout(t,e){}}class R5 extends DA{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=>Nt(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 Ha(r,t,e,n,i){const a=Nt(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 j0(r,t){return Object.keys(r).every(e=>r[e]===t[e])}class D5 extends DA{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(pa(A)){const l=n.getDescendantsData(o),c=l.map(Nt),{internal:u,external:h}=My(c,d=>n.getRelatedEdgesData(d));l.forEach(d=>{const f=Nt(d),g=s.findIndex(([p])=>p===f);g!==-1&&s.splice(g,1);const v=n.getElementType(f);Ha(t,"remove",v,d)}),u.forEach(d=>Ha(t,"remove","edge",d)),h.forEach(d=>{var f;const g=Nt(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(Nt),{edges:u}=My(c,h=>n.getRelatedEdgesData(h));[...l,...u].forEach(h=>{var d;const f=Nt(h),g=n.getElementType(f);((d=this.context.element)===null||d===void 0?void 0:d.getElement(f))?Ha(t,"update",g,h):Ha(t,"add",g,h),g==="combo"&&s.push([f,h])})}}return t}}const rM=(r,t,e,n)=>{const i=`${e}s`,a=Nt(n);!r.add[i].has(a)&&!r.update[i].has(a)&&r[t][i].set(Nt(n),n)};class P5 extends DA{getElement(t){return this.context.element.getElement(t)}handleExpand(t,e){if(rM(e,"add","node",t),pa(t))return;const n=Nt(t);rM(e,"add","node",t),this.context.model.getRelatedEdgesData(n).forEach(s=>{Ha(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(Qa))return t;const{add:{nodes:i,edges:a},update:{nodes:s}}=t,o=new Map,A=new Map;i.forEach((c,u)=>{pa(c)&&o.set(u,c)}),a.forEach(c=>{if(e.getElementType(c.source)!=="node")return;const u=e.getNodeData(c.source);pa(u)&&o.set(c.source,u)}),s.forEach((c,u)=>{const h=this.getElement(u);if(!h)return;const d=h.attributes.collapsed;pa(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=Nt(d);if(l.has(f))return;Ha(t,"remove","node",d),n.getRelatedEdgesData(f).forEach(v=>{Ha(t,"remove","edge",v)}),l.add(f)})}),A.forEach((c,u)=>{if(n.getAncestorsData(u,Qa).some(pa)){Ha(t,"remove","node",c);return}this.handleExpand(c,t)}),t}}const aw=new WeakMap;function _K(r,t,e){aw.has(r)||aw.set(r,{});const n=aw.get(r);if(!n[t])return n[t]=e,!0;const i=n[t];return iM(i,e)?!1:(n[t]=e,!0)}const iM=(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(!iM(s,o,e-1))return!1}else if(s!==o)return!1}return!0};function _5(r,t,e){Vm[r][t]&&va.warn(`The extension ${t} of ${r} has been registered before, and will be overridden.`),Object.assign(Vm[r],{[t]:e})}var aM=function(){function r(t){(0,P.Z)(this,r),this.dragndropPluginOptions=t}return(0,N.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],p=null,y=[c.clientX,c.clientY],x=function(){var O=(0,Xa.Z)((0,ii.Z)().mark(function L(U){var R,j,q,et,it,dt;return(0,ii.Z)().wrap(function(ft){for(;;)switch(ft.prev=ft.next){case 0:if(f){ft.next=2;break}if(R=U.timeStamp-g,j=ki([U.clientX,U.clientY],v),!(R<=n.dragndropPluginOptions.dragstartTimeThreshold||j<=n.dragndropPluginOptions.dragstartDistanceThreshold)){ft.next=1;break}return ft.abrupt("return");case 1:U.type="dragstart",d.dispatchEvent(U),f=!0;case 2:if(U.type="drag",U.dx=U.clientX-y[0],U.dy=U.clientY-y[1],d.dispatchEvent(U),y=[U.clientX,U.clientY],h){ft.next=4;break}return q=n.dragndropPluginOptions.overlap==="pointer"?[U.canvasX,U.canvasY]:u.getBounds().center,ft.next=3,s.elementsFromPoint(q[0],q[1]);case 3:et=ft.sent,it=et[et.indexOf(u)+1],dt=(it==null?void 0:it.closest("[droppable=true]"))||(n.dragndropPluginOptions.isDocumentDroppable?s:null),p!==dt&&(p&&(U.type="dragleave",U.target=p,p.dispatchEvent(U)),dt&&(U.type="dragenter",U.target=dt,dt.dispatchEvent(U)),p=dt,p&&(U.type="dragover",U.target=p,p.dispatchEvent(U)));case 4:case"end":return ft.stop()}},L)}));return function(U){return O.apply(this,arguments)}}();o.addEventListener("pointermove",x);var F=function(L){if(f){L.detail={preventClick:!0};var U=L.clone();p&&(U.type="drop",U.target=p,p.dispatchEvent(U)),U.type="dragend",d.dispatchEvent(U),f=!1}o.removeEventListener("pointermove",x)};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)})}}])}();aM.tag="Dragndrop";var H5=function(r){function t(){var e,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,P.Z)(this,t),e=(0,K.Z)(this,t),e.name="dragndrop",e.options=n,e}return(0,_.Z)(t,r),(0,N.Z)(t,[{key:"init",value:function(){this.addRenderingPlugin(new aM((0,z.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)}}])}(ds),sM=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())})},oM=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 AM=["main"],lM=["background","main","label","transient"];function G5(r){return r.main}class cM{getConfig(){return this.config}getLayer(t="main"){return this.extends.layers[t]||G5(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=oM(e,["renderer","background","cursor","enableMultiLayer"]),A=s?lM:AM,l=uM(n,A),c=Object.fromEntries(A.map(u=>{const h=new Fm(Object.assign(Object.assign({},o),{supportsMutipleCanvasesInOneContainer:s,renderer:l[u],background:s?u==="background"?i:void 0:i}));return[u,h]}));hM(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 vh(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=uM(t,this.config.enableMultiLayer?lM:AM);this.extends.renderers=e,Object.entries(e).forEach(([n,i])=>this.getLayer(n).setRenderer(i)),hM(this.getLayers())}getCanvasByViewport(t){return Mi(this.getLayer().viewport2Canvas(Fs(t)))}getViewportByCanvas(t){return Mi(this.getLayer().canvas2Viewport(Fs(t)))}getViewportByClient(t){return Mi(this.getLayer().client2Viewport(Fs(t)))}getClientByViewport(t){return Mi(this.getLayer().viewport2Client(Fs(t)))}getClientByCanvas(t){return this.getClientByViewport(this.getViewportByCanvas(t))}getCanvasByClient(t){const e=this.getLayer(),n=e.client2Viewport(Fs(t));return Mi(e.viewport2Canvas(n))}toDataURL(){return sM(this,arguments,void 0,function*(t={}){const e=globalThis.devicePixelRatio||1,{mode:n="viewport"}=t,i=oM(t,["mode"]);let[a,s,o,A]=[0,0,0,0];if(n==="viewport")[o,A]=this.getSize();else if(n==="overall"){const p=this.getBounds(),y=yA(p);[a,s]=p.min,[o,A]=y}const l=rw('<div id="virtual-image"></div>'),c=new Fm({width:o,height:A,renderer:new Mh,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[p,y,x]=g.getPosition(),[F,O,L]=g.getFocalPoint();g.setPosition([p+a,y+s,x]),g.setFocalPoint([F+a,O+s,L])}const v=c.getContextService();return new Promise(p=>{c.addEventListener(La.RERENDER,()=>sM(this,void 0,void 0,function*(){yield new Promise(x=>setTimeout(x,300));const y=yield v.toDataURL(i);p(y)}))})})}destroy(){Object.values(this.getLayers()).forEach(t=>{t.getCamera().cancelLandmarkAnimation(),t.destroy()})}}function uM(r,t){return Object.fromEntries(t.map(e=>{const n=(r==null?void 0:r(e))||new Mh;return n instanceof Mh&&n.setConfig({enableDirtyRectangleRendering:!1}),e==="main"?n.registerPlugin(new H5({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):n.unregisterPlugin(n.getPlugin("dom-interaction")),[e,n]}))}function hM(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 ru=r=>r?parseInt(r):0;function z5(r){const t=getComputedStyle(r),e=r.clientWidth||ru(t.width),n=r.clientHeight||ru(t.height),i=ru(t.paddingLeft)+ru(t.paddingRight),a=ru(t.paddingTop)+ru(t.paddingBottom);return[e-i,n-a]}function dM(r){if(!r)return[0,0];let t=640,e=480;const[n,i]=z5(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 Z0{constructor(t){this.type=t}}class Xr extends Z0{constructor(t,e){super(t),this.data=e}}class os extends Z0{constructor(t,e,n,i){super(t),this.animationType=e,this.animation=n,this.data=i}}class iu extends Z0{constructor(t,e,n){super(t),this.elementType=e,this.data=n}}class Y0 extends Z0{constructor(t,e){super(t),this.data=e}}function ui(r,t){r.emit(t.type,t)}function K5(r){if(!r)return null;if(r instanceof JE)return{type:"canvas",element:r};let t=r;for(;t;){if(Th(t))return{type:"node",element:t};if(Sx(t))return{type:"edge",element:t};if(Fy(t))return{type:"combo",element:t};t=t.parentElement}return null}function fM(r){var t;return((t=r==null?void 0:r.style)===null||t===void 0?void 0:t.zIndex)||0}const au="cachedStyle",X0=r=>`__${r}__`;function V5(r,t){const e=Array.isArray(t)?t:[t];Fi(r,au)||bh(r,au,{}),e.forEach(n=>{bh(Fi(r,au),X0(n),r.attributes[n])})}function gM(r,t){return Fi(r,[au,X0(t)])}function W5(r,t){return X0(t)in(Fi(r,au)||{})}function HK(r,t,e){set(r,[au,X0(t)],e)}class j5{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,p=cI(this.context.options,g,v,t);(u=c==null?void 0:c.before)===null||u===void 0||u.call(c);const y=p.length?hI(f,this.inferStyle(l,n),p):null;return y?((h=c==null?void 0:c.beforeAnimate)===null||h===void 0||h.call(c,y),y.finished.then(()=>{var x,F;(x=c==null?void 0:c.afterAnimate)===null||x===void 0||x.call(c,y),(F=c==null?void 0:c.after)===null||F===void 0||F.call(c),this.animations.delete(y)})):(d=c==null?void 0:c.after)===null||d===void 0||d.call(c),y}).filter(Boolean);o.forEach(l=>this.animations.add(l));const A=Wm(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=gM(a,"opacity"))!==null&&n!==void 0?n:gh("opacity")});else if(o==="hide")Object.assign(u,{opacity:(i=gM(a,"opacity"))!==null&&i!==void 0?i:gh("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[p,y,x]=v;Object.assign(h,{x:p,y,z:x})}}else if(s==="combo"){if(a.id===f||g.includes(a.id)){const[p,y]=v;Object.assign(h,{x:p,y,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[p,y,x]=v;Object.assign(u,{x:p,y,z:x})}}else if(s==="combo"){if(a.id===f||g.includes(a.id)){const[p,y,x]=v;Object.assign(u,{x:p,y,z:x,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 Z5{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 Xr(Ae.BATCH_START,{initiate:t}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new Xr(Ae.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class Y5 extends oy{constructor(t){super(t),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:n}=e,i=K5(n);if(!i)return;const{graph:a,canvas:s}=this.context,{type:o,element:A}=i;if("destroyed"in A&&(Ih(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&&[Rc.KEY_DOWN,Rc.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&&[Rc.KEY_DOWN,Rc.KEY_UP].forEach(e=>{t.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}function X5(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 J5=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 sw(r){const{id:t=Nt(r),style:e,data:n}=r,i=J5(r,["id","style","data"]),a=Object.assign(Object.assign({},r),{style:Object.assign({},e),data:Object.assign({},n)});return wI(r)?Object.assign({id:t,data:a},i):{id:t,data:a}}function Ei(r){return r.data}function q5(r){if(r.hasTreeStructure(Qa))return;r.attachTreeStructure(Qa);const t=r.getAllEdges();for(const e of t){const{source:n,target:i}=e;r.setParent(i,n,Qa)}}class $5{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new Gr}pushChange(t){if(this.isTraceless)return;const{type:e}=t;if(e===fr.NodeUpdated||e===fr.EdgeUpdated||e===fr.ComboUpdated){const{value:n,original:i}=t;this.changes.push({value:Ly(n),original:Ly(i),type:e})}else this.changes.push({value:Ly(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=Ei(n);return this.isCombo(Nt(i))||(t===void 0||t.includes(Nt(i)))&&e.push(i),e},[])}getEdgeDatum(t){return Ei(this.model.getEdge(t))}getEdgeData(t){return this.model.getAllEdges().reduce((e,n)=>{const i=Ei(n);return(t===void 0||t.includes(Nt(i)))&&e.push(i),e},[])}getComboData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ei(n);return this.isCombo(Nt(i))&&(t===void 0||t.includes(Nt(i)))&&e.push(i),e},[])}getRootsData(t=Qa){return this.model.getRoots(t).map(Ei)}getAncestorsData(t,e){const{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getAncestors(t,e).map(Ei)}getDescendantsData(t){const e=this.getElementDataById(t),n=[];return Cl(e,i=>{i!==e&&n.push(i)},i=>this.getChildrenData(Nt(i)),"TB"),n}getParentData(t,e){const{model:n}=this;if(!e){va.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?Ei(i):void 0}getChildrenData(t){const e=this.getElementType(t)==="node"?Qa:nr,{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getChildren(t,e).map(Ei)}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 Ei(e)}getNodeLikeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ei(n);return t?t.includes(Nt(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(Ei)}getNeighborNodesData(t){return this.model.getNeighbors(t).map(Ei)}setData(t){const{nodes:e=[],edges:n=[],combos:i=[]}=t,{nodes:a,edges:s,combos:o}=this.getData(),A=BA(a,e,u=>Nt(u),Kc),l=BA(s,n,u=>Nt(u),Kc),c=BA(o,i,u=>Nt(u),Kc);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(Nt),edges:l.exit.map(Nt),combos:c.exit.map(Nt)};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:fr.NodeAdded}),sw(e)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({nodes:t},"add"))}addEdgeData(t=[]){t.length&&(this.model.addEdges(t.map(e=>(this.pushChange({value:e,type:fr.EdgeAdded}),sw(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(Nt(n)),this.pushChange({value:n,type:fr.ComboAdded}),sw(n)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({combos:t},"add")}addChildrenData(t,e){const n=this.getNodeLikeDatum(t),i=e.map(Nt);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=Nt(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=Nt(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,Qa);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=Nt(o);else{const y=this.getEdgeDatum(d);f=y.source,g=y.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,p=((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:Nt(o),style:{zIndex:Math.max(v,p)-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=>Nt(s)!==t)}),n==="combo"&&!pa(i)){const s=new Set(this.getAncestorsData(t,nr).map(Nt));a.nodes=a.nodes.filter(o=>!s.has(Nt(o))),a.combos=a.combos.filter(o=>!s.has(Nt(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=Nt(n),a=$f(n);a!==void 0&&(e.hasTreeStructure(nr)||e.attachTreeStructure(nr),a===null&&this.refreshComboData(i),this.setParent(i,$f(n),nr));const s=n.children||[];if(s.length){e.hasTreeStructure(Qa)||e.attachTreeStructure(Qa);const o=s.filter(A=>e.hasNode(A));o.forEach(A=>this.setParent(A,i,Qa)),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=Nt(i),s=Ei(e.getNode(a));if(Kc(s,i))return;const o=TA(s,i);this.pushChange({value:o,original:s,type:fr.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:fr.NodeUpdated})}),e.forEach(i=>{this.pushChange({value:i,original:i,type:fr.EdgeUpdated})}),n.forEach(i=>{this.pushChange({value:i,original:i,type:fr.ComboUpdated})})}syncNodeLikeDatum(t){const{model:e}=this,n=Nt(t);if(!e.hasNode(n))return;const i=Ei(e.getNode(n)),a=TA(i,t);e.mergeNodeData(n,a)}syncEdgeDatum(t){const{model:e}=this,n=Nt(t);if(!e.hasEdge(n))return;const i=Ei(e.getEdge(n)),a=TA(i,t);e.mergeEdgeData(n,a)}updateEdgeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{t.forEach(n=>{const i=Nt(n),a=Ei(e.getEdge(i));if(Kc(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=TA(a,n);this.pushChange({value:s,original:a,type:fr.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=Nt(i),s=Ei(e.getNode(a));if(Kc(s,i))return;const o=TA(s,i);this.pushChange({value:o,original:s,type:fr.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=$f(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&&X5([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:fr.ComboUpdated}),n.forEach(i=>{this.pushChange({value:i,original:i,type:fr.ComboUpdated})})}getElementPosition(t){const e=this.getElementDataById(t);return li(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=$e(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;Cl(s,A=>{const l=Nt(A);if(o.has(l))return;o.add(l);const[c,u,h]=li(A),d=TA(A,{style:{x:c+n,y:u+i,z:h+a}});this.pushChange({value:d,original:A,type:this.isCombo(l)?fr.ComboUpdated:fr.NodeUpdated}),this.model.mergeNodeData(l,d)},A=>this.getChildrenData(Nt(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]=li(o),u=i-A,h=a-l,d=s-c;Cl(o,f=>{const g=Nt(f),[v,p,y]=li(f),x=TA(f,{style:{x:v+u,y:p+h,z:y+d}});this.pushChange({value:x,original:f,type:this.isCombo(g)?fr.ComboUpdated:fr.NodeUpdated}),this.model.mergeNodeData(g,x)},f=>this.getChildrenData(Nt(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(Nt)),this.pushChange({value:this.getNodeData([e])[0],type:fr.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(t)})}removeEdgeData(t=[]){t.length&&(t.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:fr.EdgeRemoved})),this.model.removeEdges(t))}removeComboData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:fr.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(t)})}removeNodeLikeHierarchy(t){if(this.model.hasTreeStructure(nr)){const e=$f(this.getNodeLikeDatum(t));this.setParent(t,void 0,nr,!1),this.model.getChildren(t,nr).forEach(n=>{const i=Ei(n),a=Nt(i);this.setParent(Nt(i),e,nr,!1);const s=TA(i,{id:Nt(i),combo:e});this.pushChange({value:s,original:i,type:this.isCombo(a)?fr.ComboUpdated:fr.NodeUpdated}),this.model.mergeNodeData(Nt(i),s)}),Re(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(ko(`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 su=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 t8{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 Ai({className:"elements"}))}}emit(t,e){e.silence||ui(this.context.graph,t)}forEachElementData(t){xl.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=Lx(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 FB(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({},Hb((i=this.getTheme(e))===null||i===void 0?void 0:i.palette),Hb((a=t[e])===null||a===void 0?void 0:a.palette));s!=null&&s.field&&Object.assign(this.paletteStyle,NL(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[Nt(e.datum)]=_b(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(Nt(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 _b(o,n)}computeElementStatesStyle(t,e,n){this.stateStyle[Nt(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(Nt(o))){const A=this.getElementState(Nt(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[Nt(t)])}getCombos(){return this.context.model.getComboData().map(({id:t})=>this.elementMap[t])}getElementComputedStyle(t,e){const n=Nt(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=Lx(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(Nt).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 su(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 Xr(Ae.BEFORE_DRAW,{dataChanges:a,animation:n,stage:o,render:A==="render"}),t),beforeAnimate:l=>this.emit(new os(Ae.BEFORE_ANIMATE,ga.DRAW,l,s),t),afterAnimate:l=>this.emit(new os(Ae.AFTER_ANIMATE,ga.DRAW,l,s),t),after:()=>this.emit(new Xr(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=f1(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=[]}=Pf(i,O=>O.type),f=(O,L)=>{const U=[];return O.forEach(R=>{const j=Nt(R.value);this.getElement(j)?U.push(R):L.push(R)}),U},g=f(s,a),v=f(l,A),p=f(h,u),y=O=>new Map(O.map(L=>{const U=L.value;return[Nt(U),U]})),x={add:{nodes:y(a),edges:y(A),combos:y(u)},update:{nodes:y(g),edges:y(v),combos:y(p)},remove:{nodes:y(o),edges:y(c),combos:y(d)}},F=this.transformData(x,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=Nt(e);if(this.getElement(a))return;const o=this.getElementType(t,e),A=this.getElementComputedStyle(t,e),l=Lo(t,o);if(!l)return va.warn(`The element ${o} of ${t} is not registered.`);this.emit(new iu(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 iu(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=Nt(e),{stage:s="update"}=n,o=this.getElement(a);if(!o)return()=>null;this.emit(new iu(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"&&Ny(u,l),s==="visibility"&&(W5(u,"opacity")||V5(u,"opacity"),this.visibilityCache.set(u,c==="show"?"visible":"hidden"),c==="show"&&Bl(u,"visible"))},after:()=>{var u;const h=this.elementMap[a];s==="collapse"&&Ny(h,l),c==="hide"&&Bl(h,this.visibilityCache.get(h)),this.emit(new iu(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=Nt(n),a=this.getElement(i);a&&kQ(a)})})}destroyElement(t,e,n){var i;const{stage:a="exit"}=n,s=Nt(e),o=this.elementMap[s];if(!o)return()=>null;this.emit(new iu(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 iu(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=>Nt(s)===e);if(a){const s=li(this.context.model.getNodeLikeDatum(e)),o=li(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 su(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 su(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 os(Ae.BEFORE_ANIMATE,ga.COLLAPSE,h,o),u),afterAnimate:h=>this.emit(new os(Ae.AFTER_ANIMATE,ga.COLLAPSE,h,o),u)},{collapse:{target:t,descendants:Array.from(l.nodes).map(([,h])=>Nt(h)),position:li(c.nodes.get(t))}}))===null||n===void 0?void 0:n.finished})}expandNode(t,e){return su(this,void 0,void 0,function*(){var n;const{model:i}=this.context,{animation:a,align:s}=e,o=li(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(Nt(d),d)),u.nodes.forEach(d=>c.nodes.set(Nt(d),d)),this.updateElements(c,h),yield(n=this.context.animation.animate(a,{beforeAnimate:d=>this.emit(new os(Ae.BEFORE_ANIMATE,ga.EXPAND,d,l),h),afterAnimate:d=>this.emit(new os(Ae.AFTER_ANIMATE,ga.EXPAND,d,l),h)},{expand:{target:t,descendants:Array.from(u.nodes).map(([,d])=>Nt(d)),position:o}}))===null||n===void 0?void 0:n.finished})}collapseCombo(t,e){return su(this,void 0,void 0,function*(){var n;const{model:i,element:a}=this.context;if(i.getAncestorsData(t,nr).some(g=>pa(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])=>Nt(v));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new Xr(Ae.BEFORE_DRAW,{dataChanges:l,animation:e}),d),beforeAnimate:g=>this.emit(new os(Ae.BEFORE_ANIMATE,ga.COLLAPSE,g,c),d),afterAnimate:g=>this.emit(new os(Ae.AFTER_ANIMATE,ga.COLLAPSE,g,c),d),after:()=>this.emit(new Xr(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 su(this,void 0,void 0,function*(){var n;const{model:i}=this.context,a=li(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])=>Nt(f));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new Xr(Ae.BEFORE_DRAW,{dataChanges:o,animation:e}),u),beforeAnimate:d=>this.emit(new os(Ae.BEFORE_ANIMATE,ga.EXPAND,d,A),u),afterAnimate:d=>this.emit(new os(Ae.AFTER_ANIMATE,ga.EXPAND,d,A),u),after:()=>this.emit(new Xr(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 vM=Symbol("Comlink.proxy"),e8=Symbol("Comlink.endpoint"),pM=Symbol("Comlink.releaseProxy"),ow=Symbol("Comlink.finalizer"),J0=Symbol("Comlink.thrown"),mM=r=>typeof r=="object"&&r!==null||typeof r=="function",n8={canHandle:r=>mM(r)&&r[vM],serialize(r){const{port1:t,port2:e}=new MessageChannel;return wM(r,t),[e,[e]]},deserialize(r){return r.start(),BM(r)}},r8={canHandle:r=>mM(r)&&J0 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}},yM=new Map([["proxy",n8],["throw",r8]]);function i8(r,t){for(const e of r)if(t===e||e==="*"||e instanceof RegExp&&e.test(t))return!0;return!1}function wM(r,t=globalThis,e=["*"]){t.addEventListener("message",function n(i){if(!i||!i.data)return;if(!i8(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(zl);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]]=zl(i.data.value),l=!0;break;case"APPLY":l=u.apply(c,A);break;case"CONSTRUCT":{const h=new u(...A);l=c8(h)}break;case"ENDPOINT":{const{port1:h,port2:d}=new MessageChannel;wM(r,d),l=l8(h,[h])}break;case"RELEASE":l=void 0;break;default:return}}catch(c){l={value:c,[J0]:0}}Promise.resolve(l).catch(c=>({value:c,[J0]:0})).then(c=>{const[u,h]=ev(c);t.postMessage(Object.assign(Object.assign({},u),{id:a}),h),s==="RELEASE"&&(t.removeEventListener("message",n),EM(t),ow in r&&typeof r[ow]=="function"&&r[ow]())}).catch(c=>{const[u,h]=ev({value:new TypeError("Unserializable return value"),[J0]:0});t.postMessage(Object.assign(Object.assign({},u),{id:a}),h)})}),t.start&&t.start()}function a8(r){return r.constructor.name==="MessagePort"}function EM(r){a8(r)&&r.close()}function BM(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)}}),Aw(r,e,[],t)}function q0(r){if(r)throw new Error("Proxy has been released and is not useable")}function bM(r){return ou(r,new Map,{type:"RELEASE"}).then(()=>{EM(r)})}const $0=new WeakMap,tv="FinalizationRegistry"in globalThis&&new FinalizationRegistry(r=>{const t=($0.get(r)||0)-1;$0.set(r,t),t===0&&bM(r)});function s8(r,t){const e=($0.get(t)||0)+1;$0.set(t,e),tv&&tv.register(r,t,r)}function o8(r){tv&&tv.unregister(r)}function Aw(r,t,e=[],n=function(){}){let i=!1;const a=new Proxy(n,{get(s,o){if(q0(i),o===pM)return()=>{o8(a),bM(r),t.clear(),i=!0};if(o==="then"){if(e.length===0)return{then:()=>a};const A=ou(r,t,{type:"GET",path:e.map(l=>l.toString())}).then(zl);return A.then.bind(A)}return Aw(r,t,[...e,o])},set(s,o,A){q0(i);const[l,c]=ev(A);return ou(r,t,{type:"SET",path:[...e,o].map(u=>u.toString()),value:l},c).then(zl)},apply(s,o,A){q0(i);const l=e[e.length-1];if(l===e8)return ou(r,t,{type:"ENDPOINT"}).then(zl);if(l==="bind")return Aw(r,t,e.slice(0,-1));const[c,u]=xM(A);return ou(r,t,{type:"APPLY",path:e.map(h=>h.toString()),argumentList:c},u).then(zl)},construct(s,o){q0(i);const[A,l]=xM(o);return ou(r,t,{type:"CONSTRUCT",path:e.map(c=>c.toString()),argumentList:A},l).then(zl)}});return s8(a,r),a}function A8(r){return Array.prototype.concat.apply([],r)}function xM(r){const t=r.map(ev);return[t.map(e=>e[0]),A8(t.map(e=>e[1]))]}const CM=new WeakMap;function l8(r,t){return CM.set(r,t),r}function c8(r){return Object.assign(r,{[vM]:!0})}function GK(r,t=globalThis,e="*"){return{postMessage:(n,i)=>r.postMessage(n,e,i),addEventListener:t.addEventListener.bind(t),removeEventListener:t.removeEventListener.bind(t)}}function ev(r){for(const[t,e]of yM)if(e.canHandle(r)){const[n,i]=e.serialize(r);return[{type:"HANDLER",name:t,value:n},i]}return[{type:"RAW",value:r},CM.get(r)||[]]}function zl(r){switch(r.type){case"HANDLER":return yM.get(r.name).deserialize(r.value);case"RAW":return r.value}}function ou(r,t,e,n){return new Promise(i=>{const a=u8();t.set(a,i),r.start&&r.start(),r.postMessage(Object.assign({id:a},e),n)})}function u8(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class h8 extends Qg{constructor(t,e,n){super(),this.graph=t,this.layout=e,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=BM(new Worker(new URL(T.p+T.u(1009),T.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var t;return(0,D.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,D._T)(e,["onTick"]),a={};Object.keys(i).forEach(l=>{Vt(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[pM]()}isRunning(){return this.running}}var Au=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())})},d8=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 f8{get presetOptions(){return{animation:!!TB(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 Au(this,void 0,void 0,function*(){var e,n,i,a;const{graph:s,model:o}=this.context,{add:A}=t;ui(s,new Xr(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=Nt(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=Nt(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=Nt(c),h=A.combos.get(u);o.syncNodeLikeDatum(c),h&&Object.assign(h.style,c.style)}),ui(s,new Xr(Ae.AFTER_LAYOUT,{type:"pre"})),this.transformDataAfterLayout("pre",t)})}postLayout(){return Au(this,arguments,void 0,function*(t=this.options){if(!t)return;const e=Array.isArray(t)?t:[t],{graph:n}=this.context;ui(n,new Xr(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);ui(n,new Xr(Ae.BEFORE_STAGE_LAYOUT,{options:o,index:i}));const A=yield this.stepLayout(s,o,i);ui(n,new Xr(Ae.AFTER_STAGE_LAYOUT,{options:o,index:i})),a.animation||this.updateElementPosition(A,!1)}ui(n,new Xr(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 Au(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 Au(this,void 0,void 0,function*(){return KQ(e)?yield this.treeLayout(t,e,n):yield this.graphLayout(t,e,n)})}graphLayout(t,e,n){return Au(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 h8(l.graphData2LayoutModel(t),l.instance,{iterations:s}),Dg(yield this.supervisor.execute())}if(t1(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 Au(this,void 0,void 0,function*(){const{type:i,animation:a}=e,s=Lo("layout",i);if(!s)return{};const{nodes:o=[],edges:A=[]}=t,l=new Gr({nodes:o.map(f=>({id:Nt(f),data:f.data||{}})),edges:A.map(f=>({id:Nt(f),source:f.source,target:f.target,data:f.data||{}}))});q5(l);const c={nodes:[],edges:[]},u={nodes:[],edges:[]};l.getRoots(Qa).forEach(f=>{Cl(f,x=>{x.children=l.getSuccessors(x.id)},x=>l.getSuccessors(x.id),"TB");const g=s(f,e),{x:v,y:p,z:y=0}=g;Cl(g,x=>{const{id:F,x:O,y:L,z:U=0}=x;c.nodes.push({id:F,style:{x:v,y:p,z:y}}),u.nodes.push({id:F,style:{x:O,y:L,z:U}})},x=>x.children,"TB")});const d=this.inferTreeLayoutOffset(u);if(SM(u,d),a){SM(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:p=0}=g.style||{};n=Math.min(n,v),i=Math.max(i,v),a=Math.min(a,p),s=Math.max(s,p)});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&&t1(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=p=>l.getElement(p),h=i?p=>{var y;return!a&&(((y=p.style)===null||y===void 0?void 0:y.visibility)==="hidden"||c.getAncestorsData(p.id,Qa).some(pa)||c.getAncestorsData(p.id,nr).some(pa))?!1:e(p)}:p=>{const y=Nt(p),x=u(y);return!x||Ih(x)?!1:e(p)},d=s.filter(h),f=A.filter(n),g=new Map(d.map(p=>[Nt(p),p]));f.forEach(p=>g.set(Nt(p),p));const v=o.filter(({source:p,target:y})=>g.has(p)&&g.has(y));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=d8(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:y=>{const x=n==null?void 0:n.getElement(y.id);return x?x.attributes.size:n==null?void 0:n.getElementComputedStyle("node",y).size},f=Lo("layout",a);if(!f)return va.warn(`The layout of ${a} is not registered.`);const g=Object.getPrototypeOf(f.prototype)===Rg.prototype?f:WQ(f,this.context),v=new g(this.context),p={nodeSize:d,width:c,height:u,center:h};switch(v.id){case"d3-force":case"d3-force-3d":Object.assign(p,{center:{x:c/2,y:u/2,z:0}});break;default:break}return Si(v.options,p,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 SM=(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 g8(r){return[v8].reduce((e,n)=>n(e),r)}function v8(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 p8 extends oy{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;va.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 nv=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class m8 extends oy{constructor(t){super(t),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(t){this.setExtensions([...nv.slice(0,nv.length-1),...t,nv[nv.length-1]])}getTransformInstance(t){return t?this.extensionMap[t]:this.extensionMap}}var td=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 y8{get padding(){return Ua(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=TB(this.context.options,t);return e?Fl(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=Ms([-c,-u,-h],a);return n==="relative"?{position:$e(s,d),focalPoint:$e(o,d)}:{position:$e([A,l,s[2]],d),focalPoint:$e([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 dr(i==="relative"?n*a:a,...e)}transform(t,e){return td(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(ui(n,new Y0(Ae.BEFORE_TRANSFORM,t)),!a&&s&&!i&&o&&!A){this.camera.setZoomByViewportPoint(this.getZoomOptions(t),o),ui(n,new Y0(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 ui(n,new os(Ae.BEFORE_ANIMATE,ga.TRANSFORM,null,t)),new Promise(c=>{this.transformResolver=c,this.camera.gotoLandmark(this.createLandmark(l),Object.assign(Object.assign({},A),{onfinish:()=>{ui(n,new os(Ae.AFTER_ANIMATE,ga.TRANSFORM,null,t)),ui(n,new Y0(Ae.AFTER_TRANSFORM,t)),this.transformResolver=void 0,c()}}))});this.camera.gotoLandmark(this.createLandmark(l),{duration:0}),ui(n,new Y0(Ae.AFTER_TRANSFORM,t))})}fitView(t,e){return td(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]=yA(f),p=A==="x"&&g>=u||A==="y"&&v>=h||A==="both"&&g>=u&&v>=h;if(o==="overflow"&&!p)return yield this.fitCenter({animation:e});const y=u/g,x=h/v,F=A==="x"?y:A==="y"?x:Math.min(y,x),O=this.getAnimation(e);Number.isFinite(F)&&(yield this.transform({mode:"relative",scale:F,translate:$e(tr(this.getCanvasCenter(),this.getBBoxInViewport(d).center),Ms(this.paddingOffset,F))},O))})}fitCenter(t){return td(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,t)})}focusElements(t){return td(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=vh(e.map(o=>a(i.getElement(o))));yield this.focus(s,n)})}focus(t,e){return td(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:$e(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 Zn;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 Zn;return c.setMinMax([s,o,0],[A,l,0]),n&&(c=EA(c,n)),Pc(t)?xs(t,c):e?bI(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 sr=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 rv extends Qg{constructor(t){var e;super(),this.options={},this.rendered=!1,this.destroyed=!1,this.context={model:new $5},this.isCollapsingExpanding=!1,this.onResize=Lh(()=>{this.resize()},300),this._setOptions(Object.assign({},rv.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,g8(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=Vt(t)?t(this.getTheme()):t}setLayout(t){this.options.layout=Vt(t)?t(this.getLayout()):t}getLayout(){return this.options.layout}setBehaviors(t){var e;this.options.behaviors=Vt(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=Vt(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=Vt(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(Vt(t)?t(this.getData()):t)}addData(t){this.context.model.addData(Vt(t)?t(this.getData()):t)}addNodeData(t){this.context.model.addNodeData(Vt(t)?t(this.getNodeData()):t)}addEdgeData(t){this.context.model.addEdgeData(Vt(t)?t(this.getEdgeData()):t)}addComboData(t){this.context.model.addComboData(Vt(t)?t(this.getComboData()):t)}addChildrenData(t,e){this.context.model.addChildrenData(t,e)}updateData(t){this.context.model.updateData(Vt(t)?t(this.getData()):t)}updateNodeData(t){this.context.model.updateNodeData(Vt(t)?t(this.getNodeData()):t)}updateEdgeData(t){this.context.model.updateEdgeData(Vt(t)?t(this.getEdgeData()):t)}updateComboData(t){this.context.model.updateComboData(Vt(t)?t(this.getComboData()):t)}removeData(t){this.context.model.removeData(Vt(t)?t(this.getData()):t)}removeNodeData(t){this.context.model.removeNodeData(Vt(t)?t(this.getNodeData()):t)}removeEdgeData(t){this.context.model.removeEdgeData(Vt(t)?t(this.getEdgeData()):t)}removeComboData(t){this.context.model.removeComboData(Vt(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 sr(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 cM)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=dM(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 cM(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 Z5(this.context)),this.context.plugin||(this.context.plugin=new p8(this.context)),this.context.viewport||(this.context.viewport=new y8(this.context)),this.context.transform||(this.context.transform=new m8(this.context)),this.context.element||(this.context.element=new t8(this.context)),this.context.animation||(this.context.animation=new j5(this.context)),this.context.layout||(this.context.layout=new f8(this.context)),this.context.behavior||(this.context.behavior=new Y5(this.context))}prepare(){return sr(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed){console.error(ko("The graph instance has been destroyed"));return}yield this.initCanvas(),this.initRuntime()})}render(){return sr(this,void 0,void 0,function*(){if(yield this.prepare(),ui(this,new Xr(Ae.BEFORE_RENDER)),this.options.layout)if(!this.rendered&&VQ(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,ui(this,new Xr(Ae.AFTER_RENDER))})}draw(){return sr(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 sr(this,void 0,void 0,function*(){yield this.context.layout.postLayout(t)})}stopLayout(){this.context.layout.stopLayout()}clear(){return sr(this,void 0,void 0,function*(){const{model:t,element:e}=this.context;t.setData({}),t.clearChanges(),e==null||e.clear()})}destroy(){var t;ui(this,new Xr(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,ui(this,new Xr(Ae.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(t,e){var n;const i=dM((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();Pr(a,s)||(ui(this,new Xr(Ae.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),ui(this,new Xr(Ae.AFTER_SIZE_CHANGE,{size:a})))}fitView(t,e){return sr(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 sr(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 sr(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 sr(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 sr(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:t,origin:n},e)})}zoomTo(t,e,n){return sr(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 sr(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:t,origin:n},e)})}rotateTo(t,e,n){return sr(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 sr(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:t},e)})}translateTo(t,e){return sr(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 sr(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 sr(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 A1(this.context.element.getElement(t).attributes,["context"])}setElementVisibility(t,e){return sr(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 sr(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 sr(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 sr(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 sr(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(Nt(A))],c=s-fM(A);l.forEach(h=>{i[Nt(h)]=this.getElementZIndex(Nt(h))+c});const{internal:u}=My(l.map(Nt),h=>n.getRelatedEdgesData(h));u.forEach(h=>{const d=Nt(h);i[d]=this.getElementZIndex(d)+c})}else i[a]=s}),yield this.setElementZIndex(i)})}getElementZIndex(t){return fM(this.context.model.getElementDataById(t))}setElementState(t,e){return sr(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 sr(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(pa(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 sr(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(!pa(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 sr(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)}}rv.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var w8=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 E8(r,t){const{getNodeData:e=(o,A)=>{if(o.depth=A,!o.children)return o;const{children:l}=o,c=w8(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 Cl(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 B8 extends DA{beforeDraw(t){const{add:e,update:n}=t,{model:i}=this.context;return[...e.edges.entries(),...n.edges.entries()].forEach(([,a])=>{MM(i,a)}),t}}const MM=(r,t)=>{const{source:e,target:n}=t,i=r.getElementDataById(e),a=r.getElementDataById(n),s=wx(i,u=>r.getParentData(u,nr)),o=wx(a,u=>r.getParentData(u,nr)),A=Nt(s),l=Nt(o),c={sourceNode:A,targetNode:l};return t.style?Object.assign(t.style,c):t.style=c,t},b8=(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)},x8=(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)},C8=(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)},S8=(r,t,e)=>{const[n,i]=t,[a,s]=e,o=Math.sqrt((r-n)/(i-n));return a+o*(s-a)};class iv extends DA{constructor(t,e){super(t,Si({},iv.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 b8(f,l,g);case"log":return x8(f,l,g);case"pow":return C8(f,l,g,2);case"sqrt":return S8(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=Da(this.options.maxSize),a=Da(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(Nt(l))||0,A,o,a,i,this.options.scale),h=(c=this.context.element)===null||c===void 0?void 0:c.getElement(Nt(l)),d={size:u};this.assignLabelStyle(d,u,l,h),(!h||!j0(d,h.attributes))&&Ha(t,h?"update":"add","node",Si(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,Fl(s,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const o=this.getLabelSizeByNodeSize(e,1/0,Number(t.labelFontSize));Object.assign(t,{labelFontSize:o,labelLineHeight:o+BI(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 wb(n,i,t)}}iv.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class av extends DA{constructor(t,e){super(t,Object.assign({},av.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var t;const e=li(this.ref),{graph:n,model:i}=this.context;(t=i.getData().nodes)===null||t===void 0||t.forEach(s=>{var o;if(Nt(s)===Nt(this.ref))return;const A=xb(tr(li(s),e)),l=Math.abs(A)>Math.PI/2,c=!s.children||s.children.length===0,u=Nt(s),h=(o=this.context.element)===null||o===void 0?void 0:o.getElement(u);if(!h||!h.isVisible())return;const d=Da(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:Nt(s),style:{labelTextAlign:l===c?"right":"left",labelTextBaseline:"middle",labelTransform:g}}])}),n.draw()}}av.defaultOptions={offset:5};const M8="quadratic",FM=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class sv extends DA{constructor(t,e){super(t,Object.assign({},sv.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(p=>!c.has(Nt(p))&&c.set(Nt(p),p))};a.forEach(u),o.forEach(u);const h=f=>{const g=new Set(n.remove.edges.keys()),v=l.getEdgeData().filter(p=>!g.has(Nt(p))).map(p=>MM(l,p));F8(f,v,!0).forEach(p=>{const y=Nt(p);c.has(y)||c.set(y,p)})};if(A.size&&A.forEach(h),i.size&&i.forEach(h),s.size){const f=M2(f1(l.getChanges())).update.edges;s.forEach(g=>{var v;h(g);const p=(v=f.find(y=>Nt(y.value)===Nt(g)))===null||v===void 0?void 0:v.original;p&&!lw(g,p)&&h(p)})}oo(this.options.edges)||c.forEach((f,g)=>!this.options.edges.includes(g)&&c.delete(g));const d=l.getEdgeData().map(Nt);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}=TM(i);s.forEach(A=>{A.forEach((l,c,u)=>{var h;const d=u.length,f=l.style||{};if(l.source===l.target){const p=FM.length;f.loopPlacement=FM[c%p],f.loopDist=Math.floor(c/p)*a+50}else if(d===1)f.curveOffset=0;else{const p=(c%2===0?1:-1)*(o[`${l.source}|${l.target}|${c}`]?-1:1);f.curveOffset=d%2===1?p*Math.ceil(c/2)*a*2:p*(Math.floor(c/2)*a*2+a)}const g=Object.assign(l,{type:M8,style:f}),v=(h=this.context.element)===null||h===void 0?void 0:h.getElement(Nt(l));(!v||!j0(g.style,v.attributes))&&Ha(n,v?"update":"add","edge",g,!0)})})},this.resetEdgeStyle=n=>{const i=n.style||{},a=this.cacheMergeStyle.get(Nt(n))||{};return Object.keys(a).forEach(s=>{Pr(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}=TM(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(Nt(c)),h=this.resetEdgeStyle(c);(!u||!j0(h,u.attributes))&&Ha(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={},[p,y]=s[`${c}|${u}|${d}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return eA(f)&&(v[p]=f),eA(g)&&(v[y]=g),v}).reduce((c,u)=>Object.assign(Object.assign({},c),u),{});o.forEach((c,u,h)=>{var d;if(u!==0){Ha(n,"remove","edge",c);return}const f=Object.assign({},Vt(this.options.style)?this.options.style(h):this.options.style,{childrenData:h});this.cacheMergeStyle.set(Nt(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(Nt(c));(!v||!j0(g.style,v.attributes))&&Ha(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}}sv.defaultOptions={mode:"bundle",distance:15};const TM=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)&&lw(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}},F8=(r,t,e)=>t.filter(n=>(e||Nt(n)!==Nt(r))&&lw(n,r)),lw=(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 T8 extends DA{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(Nt(h))&&s.set(Nt(h),h))};return a.forEach(A),o.forEach(A),t}}const O8={animation:{"combo-collapse":LB,"combo-expand":pI,"node-collapse":IB,"node-expand":gI,"path-in":NB,"path-out":vI,fade:dI,translate:fI},behavior:{"brush-select":Bh,"click-select":sg,"collapse-expand":Tg,"create-edge":Lg,"drag-canvas":kg,"drag-element-force":ZQ,"drag-element":kh,"fix-element-size":Pg,"focus-element":_g,"hover-activate":Hg,"lasso-select":XQ,"auto-adapt-label":tg,"optimize-viewport-transform":Gg,"scroll-canvas":zg,"zoom-canvas":Kg},combo:{circle:_k,rect:Hk},edge:{cubic:Tl,line:Sg,polyline:Mg,quadratic:Fg,"cubic-horizontal":bg,"cubic-radial":xg,"cubic-vertical":Cg},layout:{"antv-dagre":eR,"combo-combined":aD,"compact-box":jx,"d3-force":ND,"force-atlas2":QD,circular:iR,concentric:Zy,dagre:$g,dendrogram:Yx,fishbone:n0,force:zC,fruchterman:DD,grid:_D,indented:Xx,mds:XC,mindmap:$x,radial:YD,random:nP,snake:r0},node:{circle:Sl,diamond:JL,ellipse:ug,hexagon:nk,html:mg,image:yg,rect:Dk,star:Pk,donut:lg,triangle:wg},palette:{spectral:oP,tableau:AP,oranges:lP,greens:cP,blues:uP},theme:{dark:Q5,light:U5},plugin:{"bubble-sets":d0,"edge-bundling":g0,"edge-filter-lens":v0,"grid-line":y0,background:i0,contextmenu:f0,fisheye:p0,fullscreen:m0,history:w0,hull:x0,legend:O0,minimap:I0,snapline:N0,timebar:z0,title:y5,toolbar:K0,tooltip:V0,watermark:W0},transform:{"arrange-draw-order":R5,"collapse-expand-combo":D5,"collapse-expand-node":P5,"get-edge-actual-ends":B8,"map-node-size":iv,"place-radial-labels":av,"process-parallel-edges":sv,"update-related-edges":T8},shape:{circle:eo,ellipse:oh,group:Ai,html:gl,image:py,line:vl,path:Pi,polygon:pl,polyline:gf,rect:Ci,text:ml,label:Ao,badge:Hc}};function I8(){Object.entries(O8).forEach(([r,t])=>{Object.entries(t).forEach(([e,n])=>{_5(r,e,n)})})}I8();const zK={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},32446:function(X,st,T){"use strict";var I=T(59301),W=T(42441),z=T(48961),P=T.n(z),N=Object.defineProperty,G=Object.defineProperties,K=Object.getOwnPropertyDescriptors,_=Object.getOwnPropertySymbols,H=Object.prototype.hasOwnProperty,J=Object.prototype.propertyIsEnumerable,Z=(ut,Bt,wt)=>Bt in ut?N(ut,Bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ut[Bt]=wt,$=(ut,Bt)=>{for(var wt in Bt||(Bt={}))H.call(Bt,wt)&&Z(ut,wt,Bt[wt]);if(_)for(var wt of _(Bt))J.call(Bt,wt)&&Z(ut,wt,Bt[wt]);return ut},ct=(ut,Bt)=>G(ut,K(Bt));function ht(ut,Bt,wt=1/3,Tt){let kt=ut*Math.PI*2,_t=Bt*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(Ot,Gt){return Ot<kt?Math.cos(kt)*(1+Math.cos(Gt)*wt):Ot>_t?Math.cos(_t)*(1+Math.cos(Gt)*wt):Math.cos(Ot)*(1+Math.cos(Gt)*wt)},y:function(Ot,Gt){return Ot<kt?Math.sin(kt)*(1+Math.cos(Gt)*wt):Ot>_t?Math.sin(_t)*(1+Math.cos(Gt)*wt):Math.sin(Ot)*(1+Math.cos(Gt)*wt)},z:function(Ot,Gt){return Ot<-Math.PI*.5?Math.sin(Ot):Ot>Math.PI*2.5?Math.sin(Ot)*Tt*.1:Math.sin(Gt)>0?1*Tt*.1:-1}}}function Ct({pieData:ut=[],internalDiameterRatio:Bt=1/3}){var wt,Tt,kt,_t;const Ot=[],Gt=ut==null?void 0:ut.reduce((de,Oe)=>(de||0)+((Oe==null?void 0:Oe.value)||0),0);let ae=0,Wt=0;const ie=[];for(let de=0;de<(ut==null?void 0:ut.length);de++){Wt=ae+(Gt==0?1:((wt=ut==null?void 0:ut[de])==null?void 0:wt.value)||0);const Oe={itemStyle:((Tt=ut==null?void 0:ut[de])==null?void 0:Tt.itemStyle)||{},name:((kt=ut==null?void 0:ut[de])==null?void 0:kt.name)||`name${de}`,type:"surface",parametric:!0,parametricEquation:ht(ae/(Gt||(ut==null?void 0:ut.length)),Wt/(Gt||(ut==null?void 0:ut.length)),Bt,((_t=ut==null?void 0:ut[de])==null?void 0:_t.value)||(Gt==0?25:0)),wireframe:{show:!1},pieData:ut==null?void 0:ut[de]};ie.push(Oe.name),Ot.push(Oe),ae=Wt}return Ot.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:de=>`${de.value}
|
|
|
|
|
|
${de.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...ut||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:ie},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:Ot}}const pt=({dataSource:ut=[{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:Bt="",style:wt={},legend:Tt={},internalDiameterRatio:kt=1/3})=>{const[_t,Ot]=(0,I.useState)([]),Gt=(0,I.useCallback)(ie=>{const ve=ie.selected||{},de=ut.map(Oe=>Oe.name).filter(Oe=>ve[Oe]===!1);Ot(de)},[ut]),ae=(0,I.useMemo)(()=>ut.filter(ie=>!_t.includes(ie.name)),[ut,_t]),Wt=(0,I.useMemo)(()=>{const ie=Ct({pieData:ae,internalDiameterRatio:kt}),ve=ut.map(Oe=>Oe.name),de=ut.reduce((Oe,sn)=>(Oe[sn.name]=!_t.includes(sn.name),Oe),{});return ie.legend=ct($($({},ie.legend),Tt),{data:ve,selected:de}),ie},[ae,Tt,kt,ut,_t]);return I.createElement(W.Z,{onEvents:{legendselectchanged:Gt},className:`w-full h-full ${Bt}`,option:Wt,style:$({height:"100%"},wt)})};st.Z=pt},18086:function(X,st,T){"use strict";var I,W=Object.defineProperty,z=Y=>{throw TypeError(Y)},P=Math.pow,N=(Y,C,S)=>C in Y?W(Y,C,{enumerable:!0,configurable:!0,writable:!0,value:S}):Y[C]=S,G=(Y,C,S)=>N(Y,typeof C!="symbol"?C+"":C,S),K=(Y,C,S)=>C.has(Y)||z("Cannot "+S),_=(Y,C,S)=>(K(Y,C,"read from private field"),S?S.call(Y):C.get(Y)),H=(Y,C,S)=>C.has(Y)?z("Cannot add the same private member more than once"):C instanceof WeakSet?C.add(Y):C.set(Y,S),J=(Y,C,S,w)=>(K(Y,C,"write to private field"),w?w.call(Y,S):C.set(Y,S),S),Z=(Y,C,S)=>(K(Y,C,"access private method"),S),$,ct,ht;I={value:!0};var Ct=T(34634),pt=T(34402);const ut=" ".repeat(2),Bt=" ".repeat(4);function wt(){return Tt(this)}function Tt(Y,C={}){const{maxRows:S=15,maxColumns:w=10,maxNumSize:M=8,padMinus:k="auto"}=C;return`${Y.constructor.name} {
|
|
|
${ut}[
|
|
|
${Bt}${kt(Y,S,w,M,k)}
|
|
|
${ut}]
|
|
|
${ut}rows: ${Y.rows}
|
|
|
${ut}columns: ${Y.columns}
|
|
|
}`}function kt(Y,C,S,w,M){const{rows:k,columns:nt}=Y,rt=Math.min(k,C),ot=Math.min(nt,S),At=[];if(M==="auto"){M=!1;t:for(let It=0;It<rt;It++)for(let vt=0;vt<ot;vt++)if(Y.get(It,vt)<0){M=!0;break t}}for(let It=0;It<rt;It++){let vt=[];for(let Zt=0;Zt<ot;Zt++)vt.push(_t(Y.get(It,Zt),w,M));At.push(`${vt.join(" ")}`)}return ot!==nt&&(At[At.length-1]+=` ... ${nt-S} more columns`),rt!==k&&At.push(`... ${k-C} more rows`),At.join(`
|
|
|
${Bt}`)}function _t(Y,C,S){return(Y>=0&&S?` ${Ot(Y,C-1)}`:Ot(Y,C)).padEnd(C)}function Ot(Y,C){let S=Y.toString();if(S.length<=C)return S;let w=Y.toFixed(C);if(w.length>C&&(w=Y.toFixed(Math.max(0,C-(w.length-C)))),w.length<=C&&!w.startsWith("0.000")&&!w.startsWith("-0.000"))return w;let M=Y.toExponential(C);return M.length>C&&(M=Y.toExponential(Math.max(0,C-(M.length-C)))),M.slice(0)}function Gt(Y,C){Y.prototype.add=function(w){return typeof w=="number"?this.addS(w):this.addM(w)},Y.prototype.addS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)+w);return this},Y.prototype.addM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)+w.get(M,k));return this},Y.add=function(w,M){return new C(w).add(M)},Y.prototype.sub=function(w){return typeof w=="number"?this.subS(w):this.subM(w)},Y.prototype.subS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)-w);return this},Y.prototype.subM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)-w.get(M,k));return this},Y.sub=function(w,M){return new C(w).sub(M)},Y.prototype.subtract=Y.prototype.sub,Y.prototype.subtractS=Y.prototype.subS,Y.prototype.subtractM=Y.prototype.subM,Y.subtract=Y.sub,Y.prototype.mul=function(w){return typeof w=="number"?this.mulS(w):this.mulM(w)},Y.prototype.mulS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)*w);return this},Y.prototype.mulM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)*w.get(M,k));return this},Y.mul=function(w,M){return new C(w).mul(M)},Y.prototype.multiply=Y.prototype.mul,Y.prototype.multiplyS=Y.prototype.mulS,Y.prototype.multiplyM=Y.prototype.mulM,Y.multiply=Y.mul,Y.prototype.div=function(w){return typeof w=="number"?this.divS(w):this.divM(w)},Y.prototype.divS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)/w);return this},Y.prototype.divM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)/w.get(M,k));return this},Y.div=function(w,M){return new C(w).div(M)},Y.prototype.divide=Y.prototype.div,Y.prototype.divideS=Y.prototype.divS,Y.prototype.divideM=Y.prototype.divM,Y.divide=Y.div,Y.prototype.mod=function(w){return typeof w=="number"?this.modS(w):this.modM(w)},Y.prototype.modS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)%w);return this},Y.prototype.modM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)%w.get(M,k));return this},Y.mod=function(w,M){return new C(w).mod(M)},Y.prototype.modulus=Y.prototype.mod,Y.prototype.modulusS=Y.prototype.modS,Y.prototype.modulusM=Y.prototype.modM,Y.modulus=Y.mod,Y.prototype.and=function(w){return typeof w=="number"?this.andS(w):this.andM(w)},Y.prototype.andS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)&w);return this},Y.prototype.andM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)&w.get(M,k));return this},Y.and=function(w,M){return new C(w).and(M)},Y.prototype.or=function(w){return typeof w=="number"?this.orS(w):this.orM(w)},Y.prototype.orS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)|w);return this},Y.prototype.orM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)|w.get(M,k));return this},Y.or=function(w,M){return new C(w).or(M)},Y.prototype.xor=function(w){return typeof w=="number"?this.xorS(w):this.xorM(w)},Y.prototype.xorS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)^w);return this},Y.prototype.xorM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)^w.get(M,k));return this},Y.xor=function(w,M){return new C(w).xor(M)},Y.prototype.leftShift=function(w){return typeof w=="number"?this.leftShiftS(w):this.leftShiftM(w)},Y.prototype.leftShiftS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)<<w);return this},Y.prototype.leftShiftM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)<<w.get(M,k));return this},Y.leftShift=function(w,M){return new C(w).leftShift(M)},Y.prototype.signPropagatingRightShift=function(w){return typeof w=="number"?this.signPropagatingRightShiftS(w):this.signPropagatingRightShiftM(w)},Y.prototype.signPropagatingRightShiftS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)>>w);return this},Y.prototype.signPropagatingRightShiftM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)>>w.get(M,k));return this},Y.signPropagatingRightShift=function(w,M){return new C(w).signPropagatingRightShift(M)},Y.prototype.rightShift=function(w){return typeof w=="number"?this.rightShiftS(w):this.rightShiftM(w)},Y.prototype.rightShiftS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)>>>w);return this},Y.prototype.rightShiftM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,this.get(M,k)>>>w.get(M,k));return this},Y.rightShift=function(w,M){return new C(w).rightShift(M)},Y.prototype.zeroFillRightShift=Y.prototype.rightShift,Y.prototype.zeroFillRightShiftS=Y.prototype.rightShiftS,Y.prototype.zeroFillRightShiftM=Y.prototype.rightShiftM,Y.zeroFillRightShift=Y.rightShift,Y.prototype.not=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,~this.get(w,M));return this},Y.not=function(w){return new C(w).not()},Y.prototype.abs=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.abs(this.get(w,M)));return this},Y.abs=function(w){return new C(w).abs()},Y.prototype.acos=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.acos(this.get(w,M)));return this},Y.acos=function(w){return new C(w).acos()},Y.prototype.acosh=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.acosh(this.get(w,M)));return this},Y.acosh=function(w){return new C(w).acosh()},Y.prototype.asin=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.asin(this.get(w,M)));return this},Y.asin=function(w){return new C(w).asin()},Y.prototype.asinh=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.asinh(this.get(w,M)));return this},Y.asinh=function(w){return new C(w).asinh()},Y.prototype.atan=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.atan(this.get(w,M)));return this},Y.atan=function(w){return new C(w).atan()},Y.prototype.atanh=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.atanh(this.get(w,M)));return this},Y.atanh=function(w){return new C(w).atanh()},Y.prototype.cbrt=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.cbrt(this.get(w,M)));return this},Y.cbrt=function(w){return new C(w).cbrt()},Y.prototype.ceil=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.ceil(this.get(w,M)));return this},Y.ceil=function(w){return new C(w).ceil()},Y.prototype.clz32=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.clz32(this.get(w,M)));return this},Y.clz32=function(w){return new C(w).clz32()},Y.prototype.cos=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.cos(this.get(w,M)));return this},Y.cos=function(w){return new C(w).cos()},Y.prototype.cosh=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.cosh(this.get(w,M)));return this},Y.cosh=function(w){return new C(w).cosh()},Y.prototype.exp=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.exp(this.get(w,M)));return this},Y.exp=function(w){return new C(w).exp()},Y.prototype.expm1=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.expm1(this.get(w,M)));return this},Y.expm1=function(w){return new C(w).expm1()},Y.prototype.floor=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.floor(this.get(w,M)));return this},Y.floor=function(w){return new C(w).floor()},Y.prototype.fround=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.fround(this.get(w,M)));return this},Y.fround=function(w){return new C(w).fround()},Y.prototype.log=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.log(this.get(w,M)));return this},Y.log=function(w){return new C(w).log()},Y.prototype.log1p=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.log1p(this.get(w,M)));return this},Y.log1p=function(w){return new C(w).log1p()},Y.prototype.log10=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.log10(this.get(w,M)));return this},Y.log10=function(w){return new C(w).log10()},Y.prototype.log2=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.log2(this.get(w,M)));return this},Y.log2=function(w){return new C(w).log2()},Y.prototype.round=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.round(this.get(w,M)));return this},Y.round=function(w){return new C(w).round()},Y.prototype.sign=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.sign(this.get(w,M)));return this},Y.sign=function(w){return new C(w).sign()},Y.prototype.sin=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.sin(this.get(w,M)));return this},Y.sin=function(w){return new C(w).sin()},Y.prototype.sinh=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.sinh(this.get(w,M)));return this},Y.sinh=function(w){return new C(w).sinh()},Y.prototype.sqrt=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.sqrt(this.get(w,M)));return this},Y.sqrt=function(w){return new C(w).sqrt()},Y.prototype.tan=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.tan(this.get(w,M)));return this},Y.tan=function(w){return new C(w).tan()},Y.prototype.tanh=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.tanh(this.get(w,M)));return this},Y.tanh=function(w){return new C(w).tanh()},Y.prototype.trunc=function(){for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.set(w,M,Math.trunc(this.get(w,M)));return this},Y.trunc=function(w){return new C(w).trunc()},Y.pow=function(w,M){return new C(w).pow(M)},Y.prototype.pow=function(w){return typeof w=="number"?this.powS(w):this.powM(w)},Y.prototype.powS=function(w){for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,P(this.get(M,k),w));return this},Y.prototype.powM=function(w){if(w=C.checkMatrix(w),this.rows!==w.rows||this.columns!==w.columns)throw new RangeError("Matrices dimensions must be equal");for(let M=0;M<this.rows;M++)for(let k=0;k<this.columns;k++)this.set(M,k,P(this.get(M,k),w.get(M,k)));return this}}function ae(Y,C,S){let w=S?Y.rows:Y.rows-1;if(C<0||C>w)throw new RangeError("Row index out of range")}function Wt(Y,C,S){let w=S?Y.columns:Y.columns-1;if(C<0||C>w)throw new RangeError("Column index out of range")}function ie(Y,C){if(C.to1DArray&&(C=C.to1DArray()),C.length!==Y.columns)throw new RangeError("vector size must be the same as the number of columns");return C}function ve(Y,C){if(C.to1DArray&&(C=C.to1DArray()),C.length!==Y.rows)throw new RangeError("vector size must be the same as the number of rows");return C}function de(Y,C){if(!Ct.isAnyArray(C))throw new TypeError("row indices must be an array");for(let S=0;S<C.length;S++)if(C[S]<0||C[S]>=Y.rows)throw new RangeError("row indices are out of range")}function Oe(Y,C){if(!Ct.isAnyArray(C))throw new TypeError("column indices must be an array");for(let S=0;S<C.length;S++)if(C[S]<0||C[S]>=Y.columns)throw new RangeError("column indices are out of range")}function sn(Y,C,S,w,M){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(Xn("startRow",C),Xn("endRow",S),Xn("startColumn",w),Xn("endColumn",M),C>S||w>M||C<0||C>=Y.rows||S<0||S>=Y.rows||w<0||w>=Y.columns||M<0||M>=Y.columns)throw new RangeError("Submatrix indices are out of range")}function dn(Y,C=0){let S=[];for(let w=0;w<Y;w++)S.push(C);return S}function Xn(Y,C){if(typeof C!="number")throw new TypeError(`${Y} must be a number`)}function Jr(Y){if(Y.isEmpty())throw new Error("Empty matrix has no elements to index")}function ji(Y){let C=dn(Y.rows);for(let S=0;S<Y.rows;++S)for(let w=0;w<Y.columns;++w)C[S]+=Y.get(S,w);return C}function As(Y){let C=dn(Y.columns);for(let S=0;S<Y.rows;++S)for(let w=0;w<Y.columns;++w)C[w]+=Y.get(S,w);return C}function ho(Y){let C=0;for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)C+=Y.get(S,w);return C}function Pt(Y){let C=dn(Y.rows,1);for(let S=0;S<Y.rows;++S)for(let w=0;w<Y.columns;++w)C[S]*=Y.get(S,w);return C}function zt(Y){let C=dn(Y.columns,1);for(let S=0;S<Y.rows;++S)for(let w=0;w<Y.columns;++w)C[w]*=Y.get(S,w);return C}function jt(Y){let C=1;for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)C*=Y.get(S,w);return C}function gt(Y,C,S){const w=Y.rows,M=Y.columns,k=[];for(let nt=0;nt<w;nt++){let rt=0,ot=0,At=0;for(let It=0;It<M;It++)At=Y.get(nt,It)-S[nt],rt+=At,ot+=At*At;C?k.push((ot-rt*rt/M)/(M-1)):k.push((ot-rt*rt/M)/M)}return k}function Mt(Y,C,S){const w=Y.rows,M=Y.columns,k=[];for(let nt=0;nt<M;nt++){let rt=0,ot=0,At=0;for(let It=0;It<w;It++)At=Y.get(It,nt)-S[nt],rt+=At,ot+=At*At;C?k.push((ot-rt*rt/w)/(w-1)):k.push((ot-rt*rt/w)/w)}return k}function Lt(Y,C,S){const w=Y.rows,M=Y.columns,k=w*M;let nt=0,rt=0,ot=0;for(let At=0;At<w;At++)for(let It=0;It<M;It++)ot=Y.get(At,It)-S,nt+=ot,rt+=ot*ot;return C?(rt-nt*nt/k)/(k-1):(rt-nt*nt/k)/k}function ee(Y,C){for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)Y.set(S,w,Y.get(S,w)-C[S])}function be(Y,C){for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)Y.set(S,w,Y.get(S,w)-C[w])}function _e(Y,C){for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)Y.set(S,w,Y.get(S,w)-C)}function Me(Y){const C=[];for(let S=0;S<Y.rows;S++){let w=0;for(let M=0;M<Y.columns;M++)w+=P(Y.get(S,M),2)/(Y.columns-1);C.push(Math.sqrt(w))}return C}function nn(Y,C){for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)Y.set(S,w,Y.get(S,w)/C[S])}function rr(Y){const C=[];for(let S=0;S<Y.columns;S++){let w=0;for(let M=0;M<Y.rows;M++)w+=P(Y.get(M,S),2)/(Y.rows-1);C.push(Math.sqrt(w))}return C}function or(Y,C){for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)Y.set(S,w,Y.get(S,w)/C[w])}function Ge(Y){const C=Y.size-1;let S=0;for(let w=0;w<Y.columns;w++)for(let M=0;M<Y.rows;M++)S+=P(Y.get(M,w),2)/C;return Math.sqrt(S)}function ze(Y,C){for(let S=0;S<Y.rows;S++)for(let w=0;w<Y.columns;w++)Y.set(S,w,Y.get(S,w)/C)}class me{static from1DArray(C,S,w){if(C*S!==w.length)throw new RangeError("data length does not match given dimensions");let k=new pe(C,S);for(let nt=0;nt<C;nt++)for(let rt=0;rt<S;rt++)k.set(nt,rt,w[nt*S+rt]);return k}static rowVector(C){let S=new pe(1,C.length);for(let w=0;w<C.length;w++)S.set(0,w,C[w]);return S}static columnVector(C){let S=new pe(C.length,1);for(let w=0;w<C.length;w++)S.set(w,0,C[w]);return S}static zeros(C,S){return new pe(C,S)}static ones(C,S){return new pe(C,S).fill(1)}static rand(C,S,w={}){if(typeof w!="object")throw new TypeError("options must be an object");const{random:M=Math.random}=w;let k=new pe(C,S);for(let nt=0;nt<C;nt++)for(let rt=0;rt<S;rt++)k.set(nt,rt,M());return k}static randInt(C,S,w={}){if(typeof w!="object")throw new TypeError("options must be an object");const{min:M=0,max:k=1e3,random:nt=Math.random}=w;if(!Number.isInteger(M))throw new TypeError("min must be an integer");if(!Number.isInteger(k))throw new TypeError("max must be an integer");if(M>=k)throw new RangeError("min must be smaller than max");let rt=k-M,ot=new pe(C,S);for(let At=0;At<C;At++)for(let It=0;It<S;It++){let vt=M+Math.round(nt()*rt);ot.set(At,It,vt)}return ot}static eye(C,S,w){S===void 0&&(S=C),w===void 0&&(w=1);let M=Math.min(C,S),k=this.zeros(C,S);for(let nt=0;nt<M;nt++)k.set(nt,nt,w);return k}static diag(C,S,w){let M=C.length;S===void 0&&(S=M),w===void 0&&(w=S);let k=Math.min(M,S,w),nt=this.zeros(S,w);for(let rt=0;rt<k;rt++)nt.set(rt,rt,C[rt]);return nt}static min(C,S){C=this.checkMatrix(C),S=this.checkMatrix(S);let w=C.rows,M=C.columns,k=new pe(w,M);for(let nt=0;nt<w;nt++)for(let rt=0;rt<M;rt++)k.set(nt,rt,Math.min(C.get(nt,rt),S.get(nt,rt)));return k}static max(C,S){C=this.checkMatrix(C),S=this.checkMatrix(S);let w=C.rows,M=C.columns,k=new this(w,M);for(let nt=0;nt<w;nt++)for(let rt=0;rt<M;rt++)k.set(nt,rt,Math.max(C.get(nt,rt),S.get(nt,rt)));return k}static checkMatrix(C){return me.isMatrix(C)?C:new pe(C)}static isMatrix(C){return C!=null&&C.klass==="Matrix"}get size(){return this.rows*this.columns}apply(C){if(typeof C!="function")throw new TypeError("callback must be a function");for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)C.call(this,S,w);return this}to1DArray(){let C=[];for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)C.push(this.get(S,w));return C}to2DArray(){let C=[];for(let S=0;S<this.rows;S++){C.push([]);for(let w=0;w<this.columns;w++)C[S].push(this.get(S,w))}return C}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 C=0;C<this.rows;C++)for(let S=0;S<=C;S++)if(this.get(C,S)!==this.get(S,C))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let C=0;C<this.rows;C++)if(this.get(C,C)!==0)return!1;return!0}isEchelonForm(){let C=0,S=0,w=-1,M=!0,k=!1;for(;C<this.rows&&M;){for(S=0,k=!1;S<this.columns&&k===!1;)this.get(C,S)===0?S++:this.get(C,S)===1&&S>w?(k=!0,w=S):(M=!1,k=!0);C++}return M}isReducedEchelonForm(){let C=0,S=0,w=-1,M=!0,k=!1;for(;C<this.rows&&M;){for(S=0,k=!1;S<this.columns&&k===!1;)this.get(C,S)===0?S++:this.get(C,S)===1&&S>w?(k=!0,w=S):(M=!1,k=!0);for(let nt=S+1;nt<this.rows;nt++)this.get(C,nt)!==0&&(M=!1);C++}return M}echelonForm(){let C=this.clone(),S=0,w=0;for(;S<C.rows&&w<C.columns;){let M=S;for(let k=S;k<C.rows;k++)C.get(k,w)>C.get(M,w)&&(M=k);if(C.get(M,w)===0)w++;else{C.swapRows(S,M);let k=C.get(S,w);for(let nt=w;nt<C.columns;nt++)C.set(S,nt,C.get(S,nt)/k);for(let nt=S+1;nt<C.rows;nt++){let rt=C.get(nt,w)/C.get(S,w);C.set(nt,w,0);for(let ot=w+1;ot<C.columns;ot++)C.set(nt,ot,C.get(nt,ot)-C.get(S,ot)*rt)}S++,w++}}return C}reducedEchelonForm(){let C=this.echelonForm(),S=C.columns,w=C.rows,M=w-1;for(;M>=0;)if(C.maxRow(M)===0)M--;else{let k=0,nt=!1;for(;k<w&&nt===!1;)C.get(M,k)===1?nt=!0:k++;for(let rt=0;rt<M;rt++){let ot=C.get(rt,k);for(let At=k;At<S;At++){let It=C.get(rt,At)-ot*C.get(M,At);C.set(rt,At,It)}}M--}return C}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(C={}){if(typeof C!="object")throw new TypeError("options must be an object");const{rows:S=1,columns:w=1}=C;if(!Number.isInteger(S)||S<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(w)||w<=0)throw new TypeError("columns must be a positive integer");let M=new pe(this.rows*S,this.columns*w);for(let k=0;k<S;k++)for(let nt=0;nt<w;nt++)M.setSubMatrix(this,this.rows*k,this.columns*nt);return M}fill(C){for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,C);return this}neg(){return this.mulS(-1)}getRow(C){ae(this,C);let S=[];for(let w=0;w<this.columns;w++)S.push(this.get(C,w));return S}getRowVector(C){return pe.rowVector(this.getRow(C))}setRow(C,S){ae(this,C),S=ie(this,S);for(let w=0;w<this.columns;w++)this.set(C,w,S[w]);return this}swapRows(C,S){ae(this,C),ae(this,S);for(let w=0;w<this.columns;w++){let M=this.get(C,w);this.set(C,w,this.get(S,w)),this.set(S,w,M)}return this}getColumn(C){Wt(this,C);let S=[];for(let w=0;w<this.rows;w++)S.push(this.get(w,C));return S}getColumnVector(C){return pe.columnVector(this.getColumn(C))}setColumn(C,S){Wt(this,C),S=ve(this,S);for(let w=0;w<this.rows;w++)this.set(w,C,S[w]);return this}swapColumns(C,S){Wt(this,C),Wt(this,S);for(let w=0;w<this.rows;w++){let M=this.get(w,C);this.set(w,C,this.get(w,S)),this.set(w,S,M)}return this}addRowVector(C){C=ie(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)+C[w]);return this}subRowVector(C){C=ie(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)-C[w]);return this}mulRowVector(C){C=ie(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)*C[w]);return this}divRowVector(C){C=ie(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)/C[w]);return this}addColumnVector(C){C=ve(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)+C[S]);return this}subColumnVector(C){C=ve(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)-C[S]);return this}mulColumnVector(C){C=ve(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)*C[S]);return this}divColumnVector(C){C=ve(this,C);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)this.set(S,w,this.get(S,w)/C[S]);return this}mulRow(C,S){ae(this,C);for(let w=0;w<this.columns;w++)this.set(C,w,this.get(C,w)*S);return this}mulColumn(C,S){Wt(this,C);for(let w=0;w<this.rows;w++)this.set(w,C,this.get(w,C)*S);return this}max(C){if(this.isEmpty())return NaN;switch(C){case"row":{const S=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)>S[w]&&(S[w]=this.get(w,M));return S}case"column":{const S=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)>S[M]&&(S[M]=this.get(w,M));return S}case void 0:{let S=this.get(0,0);for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)>S&&(S=this.get(w,M));return S}default:throw new Error(`invalid option: ${C}`)}}maxIndex(){Jr(this);let C=this.get(0,0),S=[0,0];for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)>C&&(C=this.get(w,M),S[0]=w,S[1]=M);return S}min(C){if(this.isEmpty())return NaN;switch(C){case"row":{const S=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)<S[w]&&(S[w]=this.get(w,M));return S}case"column":{const S=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)<S[M]&&(S[M]=this.get(w,M));return S}case void 0:{let S=this.get(0,0);for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)<S&&(S=this.get(w,M));return S}default:throw new Error(`invalid option: ${C}`)}}minIndex(){Jr(this);let C=this.get(0,0),S=[0,0];for(let w=0;w<this.rows;w++)for(let M=0;M<this.columns;M++)this.get(w,M)<C&&(C=this.get(w,M),S[0]=w,S[1]=M);return S}maxRow(C){if(ae(this,C),this.isEmpty())return NaN;let S=this.get(C,0);for(let w=1;w<this.columns;w++)this.get(C,w)>S&&(S=this.get(C,w));return S}maxRowIndex(C){ae(this,C),Jr(this);let S=this.get(C,0),w=[C,0];for(let M=1;M<this.columns;M++)this.get(C,M)>S&&(S=this.get(C,M),w[1]=M);return w}minRow(C){if(ae(this,C),this.isEmpty())return NaN;let S=this.get(C,0);for(let w=1;w<this.columns;w++)this.get(C,w)<S&&(S=this.get(C,w));return S}minRowIndex(C){ae(this,C),Jr(this);let S=this.get(C,0),w=[C,0];for(let M=1;M<this.columns;M++)this.get(C,M)<S&&(S=this.get(C,M),w[1]=M);return w}maxColumn(C){if(Wt(this,C),this.isEmpty())return NaN;let S=this.get(0,C);for(let w=1;w<this.rows;w++)this.get(w,C)>S&&(S=this.get(w,C));return S}maxColumnIndex(C){Wt(this,C),Jr(this);let S=this.get(0,C),w=[0,C];for(let M=1;M<this.rows;M++)this.get(M,C)>S&&(S=this.get(M,C),w[0]=M);return w}minColumn(C){if(Wt(this,C),this.isEmpty())return NaN;let S=this.get(0,C);for(let w=1;w<this.rows;w++)this.get(w,C)<S&&(S=this.get(w,C));return S}minColumnIndex(C){Wt(this,C),Jr(this);let S=this.get(0,C),w=[0,C];for(let M=1;M<this.rows;M++)this.get(M,C)<S&&(S=this.get(M,C),w[0]=M);return w}diag(){let C=Math.min(this.rows,this.columns),S=[];for(let w=0;w<C;w++)S.push(this.get(w,w));return S}norm(C="frobenius"){switch(C){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${C}`)}}cumulativeSum(){let C=0;for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)C+=this.get(S,w),this.set(S,w,C);return this}dot(C){me.isMatrix(C)&&(C=C.to1DArray());let S=this.to1DArray();if(S.length!==C.length)throw new RangeError("vectors do not have the same size");let w=0;for(let M=0;M<S.length;M++)w+=S[M]*C[M];return w}mmul(C){C=pe.checkMatrix(C);let S=this.rows,w=this.columns,M=C.columns,k=new pe(S,M),nt=new Float64Array(w);for(let rt=0;rt<M;rt++){for(let ot=0;ot<w;ot++)nt[ot]=C.get(ot,rt);for(let ot=0;ot<S;ot++){let At=0;for(let It=0;It<w;It++)At+=this.get(ot,It)*nt[It];k.set(ot,rt,At)}}return k}mpow(C){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger(C)||C<0)throw new RangeError("Exponent must be a non-negative integer");let S=pe.eye(this.rows),w=this;for(let M=C;M>=1;M/=2)M&1&&(S=S.mmul(w)),w=w.mmul(w);return S}strassen2x2(C){C=pe.checkMatrix(C);let S=new pe(2,2);const w=this.get(0,0),M=C.get(0,0),k=this.get(0,1),nt=C.get(0,1),rt=this.get(1,0),ot=C.get(1,0),At=this.get(1,1),It=C.get(1,1),vt=(w+At)*(M+It),Zt=(rt+At)*M,ce=w*(nt-It),Ht=At*(ot-M),qt=(w+k)*It,Ce=(rt-w)*(M+nt),Et=(k-At)*(ot+It),$t=vt+Ht-qt+Et,Ee=ce+qt,He=Zt+Ht,je=vt-Zt+ce+Ce;return S.set(0,0,$t),S.set(0,1,Ee),S.set(1,0,He),S.set(1,1,je),S}strassen3x3(C){C=pe.checkMatrix(C);let S=new pe(3,3);const w=this.get(0,0),M=this.get(0,1),k=this.get(0,2),nt=this.get(1,0),rt=this.get(1,1),ot=this.get(1,2),At=this.get(2,0),It=this.get(2,1),vt=this.get(2,2),Zt=C.get(0,0),ce=C.get(0,1),Ht=C.get(0,2),qt=C.get(1,0),Ce=C.get(1,1),Et=C.get(1,2),$t=C.get(2,0),Ee=C.get(2,1),He=C.get(2,2),je=(w+M+k-nt-rt-It-vt)*Ce,Wn=(w-nt)*(-ce+Ce),Ie=rt*(-Zt+ce+qt-Ce-Et-$t+He),De=(-w+nt+rt)*(Zt-ce+Ce),on=(nt+rt)*(-Zt+ce),Ft=w*Zt,te=(-w+At+It)*(Zt-Ht+Et),ue=(-w+At)*(Ht-Et),se=(At+It)*(-Zt+Ht),Jn=(w+M+k-rt-ot-At-It)*Et,Qn=It*(-Zt+Ht+qt-Ce-Et-$t+Ee),jn=(-k+It+vt)*(Ce+$t-Ee),qn=(k-vt)*(Ce-Ee),Qr=k*$t,Tr=(It+vt)*(-$t+Ee),Dn=(-k+rt+ot)*(Et+$t-He),qi=(k-ot)*(Et-He),$i=(rt+ot)*(-$t+He),fn=M*qt,Er=ot*Ee,ti=nt*Ht,ei=At*ce,Pn=vt*He,Ds=Ft+Qr+fn,Xo=je+De+on+Ft+jn+Qr+Tr,uu=Ft+te+se+Jn+Qr+Dn+$i,go=Wn+Ie+De+Ft+Qr+Dn+qi,vo=Wn+De+on+Ft+Er,KA=Qr+Dn+qi+$i+ti,hu=Ft+te+ue+Qn+jn+qn+Qr,Xl=jn+qn+Qr+Tr+ei,du=Ft+te+ue+se+Pn;return S.set(0,0,Ds),S.set(0,1,Xo),S.set(0,2,uu),S.set(1,0,go),S.set(1,1,vo),S.set(1,2,KA),S.set(2,0,hu),S.set(2,1,Xl),S.set(2,2,du),S}mmulStrassen(C){C=pe.checkMatrix(C);let S=this.clone(),w=S.rows,M=S.columns,k=C.rows,nt=C.columns;M!==k&&console.warn(`Multiplying ${w} x ${M} and ${k} x ${nt} matrix: dimensions do not match.`);function rt(vt,Zt,ce){let Ht=vt.rows,qt=vt.columns;if(Ht===Zt&&qt===ce)return vt;{let Ce=me.zeros(Zt,ce);return Ce=Ce.setSubMatrix(vt,0,0),Ce}}let ot=Math.max(w,k),At=Math.max(M,nt);S=rt(S,ot,At),C=rt(C,ot,At);function It(vt,Zt,ce,Ht){if(ce<=512||Ht<=512)return vt.mmul(Zt);ce%2===1&&Ht%2===1?(vt=rt(vt,ce+1,Ht+1),Zt=rt(Zt,ce+1,Ht+1)):ce%2===1?(vt=rt(vt,ce+1,Ht),Zt=rt(Zt,ce+1,Ht)):Ht%2===1&&(vt=rt(vt,ce,Ht+1),Zt=rt(Zt,ce,Ht+1));let qt=parseInt(vt.rows/2,10),Ce=parseInt(vt.columns/2,10),Et=vt.subMatrix(0,qt-1,0,Ce-1),$t=Zt.subMatrix(0,qt-1,0,Ce-1),Ee=vt.subMatrix(0,qt-1,Ce,vt.columns-1),He=Zt.subMatrix(0,qt-1,Ce,Zt.columns-1),je=vt.subMatrix(qt,vt.rows-1,0,Ce-1),Wn=Zt.subMatrix(qt,Zt.rows-1,0,Ce-1),Ie=vt.subMatrix(qt,vt.rows-1,Ce,vt.columns-1),De=Zt.subMatrix(qt,Zt.rows-1,Ce,Zt.columns-1),on=It(me.add(Et,Ie),me.add($t,De),qt,Ce),Ft=It(me.add(je,Ie),$t,qt,Ce),te=It(Et,me.sub(He,De),qt,Ce),ue=It(Ie,me.sub(Wn,$t),qt,Ce),se=It(me.add(Et,Ee),De,qt,Ce),Jn=It(me.sub(je,Et),me.add($t,He),qt,Ce),Qn=It(me.sub(Ee,Ie),me.add(Wn,De),qt,Ce),jn=me.add(on,ue);jn.sub(se),jn.add(Qn);let qn=me.add(te,se),Qr=me.add(Ft,ue),Tr=me.sub(on,Ft);Tr.add(te),Tr.add(Jn);let Dn=me.zeros(2*jn.rows,2*jn.columns);return Dn=Dn.setSubMatrix(jn,0,0),Dn=Dn.setSubMatrix(qn,jn.rows,0),Dn=Dn.setSubMatrix(Qr,0,jn.columns),Dn=Dn.setSubMatrix(Tr,jn.rows,jn.columns),Dn.subMatrix(0,ce-1,0,Ht-1)}return It(S,C,ot,At)}scaleRows(C={}){if(typeof C!="object")throw new TypeError("options must be an object");const{min:S=0,max:w=1}=C;if(!Number.isFinite(S))throw new TypeError("min must be a number");if(!Number.isFinite(w))throw new TypeError("max must be a number");if(S>=w)throw new RangeError("min must be smaller than max");let M=new pe(this.rows,this.columns);for(let k=0;k<this.rows;k++){const nt=this.getRow(k);nt.length>0&&pt(nt,{min:S,max:w,output:nt}),M.setRow(k,nt)}return M}scaleColumns(C={}){if(typeof C!="object")throw new TypeError("options must be an object");const{min:S=0,max:w=1}=C;if(!Number.isFinite(S))throw new TypeError("min must be a number");if(!Number.isFinite(w))throw new TypeError("max must be a number");if(S>=w)throw new RangeError("min must be smaller than max");let M=new pe(this.rows,this.columns);for(let k=0;k<this.columns;k++){const nt=this.getColumn(k);nt.length&&pt(nt,{min:S,max:w,output:nt}),M.setColumn(k,nt)}return M}flipRows(){const C=Math.ceil(this.columns/2);for(let S=0;S<this.rows;S++)for(let w=0;w<C;w++){let M=this.get(S,w),k=this.get(S,this.columns-1-w);this.set(S,w,k),this.set(S,this.columns-1-w,M)}return this}flipColumns(){const C=Math.ceil(this.rows/2);for(let S=0;S<this.columns;S++)for(let w=0;w<C;w++){let M=this.get(w,S),k=this.get(this.rows-1-w,S);this.set(w,S,k),this.set(this.rows-1-w,S,M)}return this}kroneckerProduct(C){C=pe.checkMatrix(C);let S=this.rows,w=this.columns,M=C.rows,k=C.columns,nt=new pe(S*M,w*k);for(let rt=0;rt<S;rt++)for(let ot=0;ot<w;ot++)for(let At=0;At<M;At++)for(let It=0;It<k;It++)nt.set(M*rt+At,k*ot+It,this.get(rt,ot)*C.get(At,It));return nt}kroneckerSum(C){if(C=pe.checkMatrix(C),!this.isSquare()||!C.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let S=this.rows,w=C.rows,M=this.kroneckerProduct(pe.eye(w,w)),k=pe.eye(S,S).kroneckerProduct(C);return M.add(k)}transpose(){let C=new pe(this.columns,this.rows);for(let S=0;S<this.rows;S++)for(let w=0;w<this.columns;w++)C.set(w,S,this.get(S,w));return C}sortRows(C=Ve){for(let S=0;S<this.rows;S++)this.setRow(S,this.getRow(S).sort(C));return this}sortColumns(C=Ve){for(let S=0;S<this.columns;S++)this.setColumn(S,this.getColumn(S).sort(C));return this}subMatrix(C,S,w,M){sn(this,C,S,w,M);let k=new pe(S-C+1,M-w+1);for(let nt=C;nt<=S;nt++)for(let rt=w;rt<=M;rt++)k.set(nt-C,rt-w,this.get(nt,rt));return k}subMatrixRow(C,S,w){if(S===void 0&&(S=0),w===void 0&&(w=this.columns-1),S>w||S<0||S>=this.columns||w<0||w>=this.columns)throw new RangeError("Argument out of range");let M=new pe(C.length,w-S+1);for(let k=0;k<C.length;k++)for(let nt=S;nt<=w;nt++){if(C[k]<0||C[k]>=this.rows)throw new RangeError(`Row index out of range: ${C[k]}`);M.set(k,nt-S,this.get(C[k],nt))}return M}subMatrixColumn(C,S,w){if(S===void 0&&(S=0),w===void 0&&(w=this.rows-1),S>w||S<0||S>=this.rows||w<0||w>=this.rows)throw new RangeError("Argument out of range");let M=new pe(w-S+1,C.length);for(let k=0;k<C.length;k++)for(let nt=S;nt<=w;nt++){if(C[k]<0||C[k]>=this.columns)throw new RangeError(`Column index out of range: ${C[k]}`);M.set(nt-S,k,this.get(nt,C[k]))}return M}setSubMatrix(C,S,w){if(C=pe.checkMatrix(C),C.isEmpty())return this;let M=S+C.rows-1,k=w+C.columns-1;sn(this,S,M,w,k);for(let nt=0;nt<C.rows;nt++)for(let rt=0;rt<C.columns;rt++)this.set(S+nt,w+rt,C.get(nt,rt));return this}selection(C,S){de(this,C),Oe(this,S);let w=new pe(C.length,S.length);for(let M=0;M<C.length;M++){let k=C[M];for(let nt=0;nt<S.length;nt++){let rt=S[nt];w.set(M,nt,this.get(k,rt))}}return w}trace(){let C=Math.min(this.rows,this.columns),S=0;for(let w=0;w<C;w++)S+=this.get(w,w);return S}clone(){return this.constructor.copy(this,new pe(this.rows,this.columns))}static copy(C,S){for(const[w,M,k]of C.entries())S.set(w,M,k);return S}sum(C){switch(C){case"row":return ji(this);case"column":return As(this);case void 0:return ho(this);default:throw new Error(`invalid option: ${C}`)}}product(C){switch(C){case"row":return Pt(this);case"column":return zt(this);case void 0:return jt(this);default:throw new Error(`invalid option: ${C}`)}}mean(C){const S=this.sum(C);switch(C){case"row":{for(let w=0;w<this.rows;w++)S[w]/=this.columns;return S}case"column":{for(let w=0;w<this.columns;w++)S[w]/=this.rows;return S}case void 0:return S/this.size;default:throw new Error(`invalid option: ${C}`)}}variance(C,S={}){if(typeof C=="object"&&(S=C,C=void 0),typeof S!="object")throw new TypeError("options must be an object");const{unbiased:w=!0,mean:M=this.mean(C)}=S;if(typeof w!="boolean")throw new TypeError("unbiased must be a boolean");switch(C){case"row":{if(!Ct.isAnyArray(M))throw new TypeError("mean must be an array");return gt(this,w,M)}case"column":{if(!Ct.isAnyArray(M))throw new TypeError("mean must be an array");return Mt(this,w,M)}case void 0:{if(typeof M!="number")throw new TypeError("mean must be a number");return Lt(this,w,M)}default:throw new Error(`invalid option: ${C}`)}}standardDeviation(C,S){typeof C=="object"&&(S=C,C=void 0);const w=this.variance(C,S);if(C===void 0)return Math.sqrt(w);for(let M=0;M<w.length;M++)w[M]=Math.sqrt(w[M]);return w}center(C,S={}){if(typeof C=="object"&&(S=C,C=void 0),typeof S!="object")throw new TypeError("options must be an object");const{center:w=this.mean(C)}=S;switch(C){case"row":{if(!Ct.isAnyArray(w))throw new TypeError("center must be an array");return ee(this,w),this}case"column":{if(!Ct.isAnyArray(w))throw new TypeError("center must be an array");return be(this,w),this}case void 0:{if(typeof w!="number")throw new TypeError("center must be a number");return _e(this,w),this}default:throw new Error(`invalid option: ${C}`)}}scale(C,S={}){if(typeof C=="object"&&(S=C,C=void 0),typeof S!="object")throw new TypeError("options must be an object");let w=S.scale;switch(C){case"row":{if(w===void 0)w=Me(this);else if(!Ct.isAnyArray(w))throw new TypeError("scale must be an array");return nn(this,w),this}case"column":{if(w===void 0)w=rr(this);else if(!Ct.isAnyArray(w))throw new TypeError("scale must be an array");return or(this,w),this}case void 0:{if(w===void 0)w=Ge(this);else if(typeof w!="number")throw new TypeError("scale must be a number");return ze(this,w),this}default:throw new Error(`invalid option: ${C}`)}}toString(C){return Tt(this,C)}[Symbol.iterator](){return this.entries()}*entries(){for(let C=0;C<this.rows;C++)for(let S=0;S<this.columns;S++)yield[C,S,this.get(C,S)]}*values(){for(let C=0;C<this.rows;C++)for(let S=0;S<this.columns;S++)yield this.get(C,S)}}me.prototype.klass="Matrix",typeof Symbol!="undefined"&&(me.prototype[Symbol.for("nodejs.util.inspect.custom")]=wt);function Ve(Y,C){return Y-C}function zr(Y){return Y.every(C=>typeof C=="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 Zi=class fw extends me{constructor(C,S){if(super(),H(this,$),G(this,"data"),fw.isMatrix(C))Z(this,$,ct).call(this,C.rows,C.columns),fw.copy(C,this);else if(Number.isInteger(C)&&C>=0)Z(this,$,ct).call(this,C,S);else if(Ct.isAnyArray(C)){const w=C;if(C=w.length,S=C?w[0].length:0,typeof S!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let M=0;M<C;M++){if(w[M].length!==S)throw new RangeError("Inconsistent array dimensions");if(!zr(w[M]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(w[M]))}this.rows=C,this.columns=S}else throw new TypeError("First argument must be a positive number or an array")}set(C,S,w){return this.data[C][S]=w,this}get(C,S){return this.data[C][S]}removeRow(C){return ae(this,C),this.data.splice(C,1),this.rows-=1,this}addRow(C,S){return S===void 0&&(S=C,C=this.rows),ae(this,C,!0),S=Float64Array.from(ie(this,S)),this.data.splice(C,0,S),this.rows+=1,this}removeColumn(C){Wt(this,C);for(let S=0;S<this.rows;S++){const w=new Float64Array(this.columns-1);for(let M=0;M<C;M++)w[M]=this.data[S][M];for(let M=C+1;M<this.columns;M++)w[M-1]=this.data[S][M];this.data[S]=w}return this.columns-=1,this}addColumn(C,S){typeof S=="undefined"&&(S=C,C=this.columns),Wt(this,C,!0),S=ve(this,S);for(let w=0;w<this.rows;w++){const M=new Float64Array(this.columns+1);let k=0;for(;k<C;k++)M[k]=this.data[w][k];for(M[k++]=S[w];k<this.columns+1;k++)M[k]=this.data[w][k-1];this.data[w]=M}return this.columns+=1,this}};$=new WeakSet,ct=function(Y,C){if(this.data=[],Number.isInteger(C)&&C>=0)for(let S=0;S<Y;S++)this.data.push(new Float64Array(C));else throw new TypeError("nColumns must be a positive integer");this.rows=Y,this.columns=C};let pe=Zi;Gt(me,pe);const Wa=class gw extends me{constructor(C){if(super(),H(this,ht),pe.isMatrix(C)){if(!C.isSymmetric())throw new TypeError("not symmetric data");J(this,ht,pe.copy(C,new pe(C.rows,C.rows)))}else if(Number.isInteger(C)&&C>=0)J(this,ht,new pe(C,C));else if(J(this,ht,new pe(C)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return _(this,ht).size}get rows(){return _(this,ht).rows}get columns(){return _(this,ht).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(C){return pe.isMatrix(C)&&C.klassType==="SymmetricMatrix"}static zeros(C){return new this(C)}static ones(C){return new this(C).fill(1)}clone(){const C=new gw(this.diagonalSize);for(const[S,w,M]of this.upperRightEntries())C.set(S,w,M);return C}toMatrix(){return new pe(this)}get(C,S){return _(this,ht).get(C,S)}set(C,S,w){return _(this,ht).set(C,S,w),_(this,ht).set(S,C,w),this}removeCross(C){return _(this,ht).removeRow(C),_(this,ht).removeColumn(C),this}addCross(C,S){S===void 0&&(S=C,C=this.diagonalSize);const w=S.slice();return w.splice(C,1),_(this,ht).addRow(C,w),_(this,ht).addColumn(C,S),this}applyMask(C){if(C.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const S=[];for(const[w,M]of C.entries())M||S.push(w);S.reverse();for(const w of S)this.removeCross(w);return this}toCompact(){const{diagonalSize:C}=this,S=new Array(C*(C+1)/2);for(let w=0,M=0,k=0;k<S.length;k++)S[k]=this.get(M,w),++w>=C&&(w=++M);return S}static fromCompact(C){const S=C.length,w=(Math.sqrt(8*S+1)-1)/2;if(!Number.isInteger(w))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(C)}`);const M=new gw(w);for(let k=0,nt=0,rt=0;rt<S;rt++)M.set(k,nt,C[rt]),++k>=w&&(k=++nt);return M}*upperRightEntries(){for(let C=0,S=0;C<this.diagonalSize;void 0){const w=this.get(C,S);yield[C,S,w],++S>=this.diagonalSize&&(S=++C)}}*upperRightValues(){for(let C=0,S=0;C<this.diagonalSize;void 0)yield this.get(C,S),++S>=this.diagonalSize&&(S=++C)}};ht=new WeakMap;let kr=Wa;kr.prototype.klassType="SymmetricMatrix";class Fr extends kr{static isDistanceMatrix(C){return kr.isSymmetricMatrix(C)&&C.klassSubType==="DistanceMatrix"}constructor(C){if(super(C),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(C,S,w){return C===S&&(w=0),super.set(C,S,w)}addCross(C,S){return S===void 0&&(S=C,C=this.diagonalSize),S=S.slice(),S[C]=0,super.addCross(C,S)}toSymmetricMatrix(){return new kr(this)}clone(){const C=new Fr(this.diagonalSize);for(const[S,w,M]of this.upperRightEntries())S!==w&&C.set(S,w,M);return C}toCompact(){const{diagonalSize:C}=this,S=(C-1)*C/2,w=new Array(S);for(let M=1,k=0,nt=0;nt<w.length;nt++)w[nt]=this.get(k,M),++M>=C&&(M=++k+1);return w}static fromCompact(C){const S=C.length;if(S===0)return new this(0);const w=(Math.sqrt(8*S+1)+1)/2;if(!Number.isInteger(w))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(C)}`);const M=new this(w);for(let k=1,nt=0,rt=0;rt<S;rt++)M.set(k,nt,C[rt]),++k>=w&&(k=++nt+1);return M}}Fr.prototype.klassSubType="DistanceMatrix";class fi extends me{constructor(C,S,w){super(),this.matrix=C,this.rows=S,this.columns=w}}class ls extends fi{constructor(C,S){Wt(C,S),super(C,C.rows,1),this.column=S}set(C,S,w){return this.matrix.set(C,this.column,w),this}get(C){return this.matrix.get(C,this.column)}}class Yi extends fi{constructor(C,S){Oe(C,S),super(C,C.rows,S.length),this.columnIndices=S}set(C,S,w){return this.matrix.set(C,this.columnIndices[S],w),this}get(C,S){return this.matrix.get(C,this.columnIndices[S])}}class cs extends fi{constructor(C){super(C,C.rows,C.columns)}set(C,S,w){return this.matrix.set(C,this.columns-S-1,w),this}get(C,S){return this.matrix.get(C,this.columns-S-1)}}class Li extends fi{constructor(C){super(C,C.rows,C.columns)}set(C,S,w){return this.matrix.set(this.rows-C-1,S,w),this}get(C,S){return this.matrix.get(this.rows-C-1,S)}}class qr extends fi{constructor(C,S){ae(C,S),super(C,1,C.columns),this.row=S}set(C,S,w){return this.matrix.set(this.row,S,w),this}get(C,S){return this.matrix.get(this.row,S)}}class Ba extends fi{constructor(C,S){de(C,S),super(C,S.length,C.columns),this.rowIndices=S}set(C,S,w){return this.matrix.set(this.rowIndices[C],S,w),this}get(C,S){return this.matrix.get(this.rowIndices[C],S)}}class ba extends fi{constructor(C,S,w){de(C,S),Oe(C,w),super(C,S.length,w.length),this.rowIndices=S,this.columnIndices=w}set(C,S,w){return this.matrix.set(this.rowIndices[C],this.columnIndices[S],w),this}get(C,S){return this.matrix.get(this.rowIndices[C],this.columnIndices[S])}}class la extends fi{constructor(C,S,w,M,k){sn(C,S,w,M,k),super(C,w-S+1,k-M+1),this.startRow=S,this.startColumn=M}set(C,S,w){return this.matrix.set(this.startRow+C,this.startColumn+S,w),this}get(C,S){return this.matrix.get(this.startRow+C,this.startColumn+S)}}class xa extends fi{constructor(C){super(C,C.columns,C.rows)}set(C,S,w){return this.matrix.set(S,C,w),this}get(C,S){return this.matrix.get(S,C)}}class $r extends me{constructor(C,S={}){const{rows:w=1}=S;if(C.length%w!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=w,this.columns=C.length/w,this.data=C}set(C,S,w){let M=this._calculateIndex(C,S);return this.data[M]=w,this}get(C,S){let w=this._calculateIndex(C,S);return this.data[w]}_calculateIndex(C,S){return C*this.columns+S}}class Ar extends me{constructor(C){super(),this.data=C,this.rows=C.length,this.columns=C[0].length}set(C,S,w){return this.data[C][S]=w,this}get(C,S){return this.data[C][S]}}function jo(Y,C){if(Ct.isAnyArray(Y))return Y[0]&&Ct.isAnyArray(Y[0])?new Ar(Y):new $r(Y,C);throw new Error("the argument is not an array")}class Xi{constructor(C){C=Ar.checkMatrix(C);let S=C.clone(),w=S.rows,M=S.columns,k=new Float64Array(w),nt=1,rt,ot,At,It,vt,Zt,ce,Ht,qt;for(rt=0;rt<w;rt++)k[rt]=rt;for(Ht=new Float64Array(w),ot=0;ot<M;ot++){for(rt=0;rt<w;rt++)Ht[rt]=S.get(rt,ot);for(rt=0;rt<w;rt++){for(qt=Math.min(rt,ot),vt=0,At=0;At<qt;At++)vt+=S.get(rt,At)*Ht[At];Ht[rt]-=vt,S.set(rt,ot,Ht[rt])}for(It=ot,rt=ot+1;rt<w;rt++)Math.abs(Ht[rt])>Math.abs(Ht[It])&&(It=rt);if(It!==ot){for(At=0;At<M;At++)Zt=S.get(It,At),S.set(It,At,S.get(ot,At)),S.set(ot,At,Zt);ce=k[It],k[It]=k[ot],k[ot]=ce,nt=-nt}if(ot<w&&S.get(ot,ot)!==0)for(rt=ot+1;rt<w;rt++)S.set(rt,ot,S.get(rt,ot)/S.get(ot,ot))}this.LU=S,this.pivotVector=k,this.pivotSign=nt}isSingular(){let C=this.LU,S=C.columns;for(let w=0;w<S;w++)if(C.get(w,w)===0)return!0;return!1}solve(C){C=pe.checkMatrix(C);let S=this.LU;if(S.rows!==C.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let M=C.columns,k=C.subMatrixRow(this.pivotVector,0,M-1),nt=S.columns,rt,ot,At;for(At=0;At<nt;At++)for(rt=At+1;rt<nt;rt++)for(ot=0;ot<M;ot++)k.set(rt,ot,k.get(rt,ot)-k.get(At,ot)*S.get(rt,At));for(At=nt-1;At>=0;At--){for(ot=0;ot<M;ot++)k.set(At,ot,k.get(At,ot)/S.get(At,At));for(rt=0;rt<At;rt++)for(ot=0;ot<M;ot++)k.set(rt,ot,k.get(rt,ot)-k.get(At,ot)*S.get(rt,At))}return k}get determinant(){let C=this.LU;if(!C.isSquare())throw new Error("Matrix must be square");let S=this.pivotSign,w=C.columns;for(let M=0;M<w;M++)S*=C.get(M,M);return S}get lowerTriangularMatrix(){let C=this.LU,S=C.rows,w=C.columns,M=new pe(S,w);for(let k=0;k<S;k++)for(let nt=0;nt<w;nt++)k>nt?M.set(k,nt,C.get(k,nt)):k===nt?M.set(k,nt,1):M.set(k,nt,0);return M}get upperTriangularMatrix(){let C=this.LU,S=C.rows,w=C.columns,M=new pe(S,w);for(let k=0;k<S;k++)for(let nt=0;nt<w;nt++)k<=nt?M.set(k,nt,C.get(k,nt)):M.set(k,nt,0);return M}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function Ji(Y,C){let S=0;return Math.abs(Y)>Math.abs(C)?(S=C/Y,Math.abs(Y)*Math.sqrt(1+S*S)):C!==0?(S=Y/C,Math.abs(C)*Math.sqrt(1+S*S)):0}class fo{constructor(C){C=Ar.checkMatrix(C);let S=C.clone(),w=C.rows,M=C.columns,k=new Float64Array(M),nt,rt,ot,At;for(ot=0;ot<M;ot++){let It=0;for(nt=ot;nt<w;nt++)It=Ji(It,S.get(nt,ot));if(It!==0){for(S.get(ot,ot)<0&&(It=-It),nt=ot;nt<w;nt++)S.set(nt,ot,S.get(nt,ot)/It);for(S.set(ot,ot,S.get(ot,ot)+1),rt=ot+1;rt<M;rt++){for(At=0,nt=ot;nt<w;nt++)At+=S.get(nt,ot)*S.get(nt,rt);for(At=-At/S.get(ot,ot),nt=ot;nt<w;nt++)S.set(nt,rt,S.get(nt,rt)+At*S.get(nt,ot))}}k[ot]=-It}this.QR=S,this.Rdiag=k}solve(C){C=pe.checkMatrix(C);let S=this.QR,w=S.rows;if(C.rows!==w)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let M=C.columns,k=C.clone(),nt=S.columns,rt,ot,At,It;for(At=0;At<nt;At++)for(ot=0;ot<M;ot++){for(It=0,rt=At;rt<w;rt++)It+=S.get(rt,At)*k.get(rt,ot);for(It=-It/S.get(At,At),rt=At;rt<w;rt++)k.set(rt,ot,k.get(rt,ot)+It*S.get(rt,At))}for(At=nt-1;At>=0;At--){for(ot=0;ot<M;ot++)k.set(At,ot,k.get(At,ot)/this.Rdiag[At]);for(rt=0;rt<At;rt++)for(ot=0;ot<M;ot++)k.set(rt,ot,k.get(rt,ot)-k.get(At,ot)*S.get(rt,At))}return k.subMatrix(0,nt-1,0,M-1)}isFullRank(){let C=this.QR.columns;for(let S=0;S<C;S++)if(this.Rdiag[S]===0)return!1;return!0}get upperTriangularMatrix(){let C=this.QR,S=C.columns,w=new pe(S,S),M,k;for(M=0;M<S;M++)for(k=0;k<S;k++)M<k?w.set(M,k,C.get(M,k)):M===k?w.set(M,k,this.Rdiag[M]):w.set(M,k,0);return w}get orthogonalMatrix(){let C=this.QR,S=C.rows,w=C.columns,M=new pe(S,w),k,nt,rt,ot;for(rt=w-1;rt>=0;rt--){for(k=0;k<S;k++)M.set(k,rt,0);for(M.set(rt,rt,1),nt=rt;nt<w;nt++)if(C.get(rt,rt)!==0){for(ot=0,k=rt;k<S;k++)ot+=C.get(k,rt)*M.get(k,nt);for(ot=-ot/C.get(rt,rt),k=rt;k<S;k++)M.set(k,nt,M.get(k,nt)+ot*C.get(k,rt))}}return M}}class ja{constructor(C,S={}){if(C=Ar.checkMatrix(C),C.isEmpty())throw new Error("Matrix must be non-empty");let w=C.rows,M=C.columns;const{computeLeftSingularVectors:k=!0,computeRightSingularVectors:nt=!0,autoTranspose:rt=!1}=S;let ot=!!k,At=!!nt,It=!1,vt;if(w<M)if(!rt)vt=C.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{vt=C.transpose(),w=vt.rows,M=vt.columns,It=!0;let Ft=ot;ot=At,At=Ft}else vt=C.clone();let Zt=Math.min(w,M),ce=Math.min(w+1,M),Ht=new Float64Array(ce),qt=new pe(w,Zt),Ce=new pe(M,M),Et=new Float64Array(M),$t=new Float64Array(w),Ee=new Float64Array(ce);for(let Ft=0;Ft<ce;Ft++)Ee[Ft]=Ft;let He=Math.min(w-1,M),je=Math.max(0,Math.min(M-2,w)),Wn=Math.max(He,je);for(let Ft=0;Ft<Wn;Ft++){if(Ft<He){Ht[Ft]=0;for(let te=Ft;te<w;te++)Ht[Ft]=Ji(Ht[Ft],vt.get(te,Ft));if(Ht[Ft]!==0){vt.get(Ft,Ft)<0&&(Ht[Ft]=-Ht[Ft]);for(let te=Ft;te<w;te++)vt.set(te,Ft,vt.get(te,Ft)/Ht[Ft]);vt.set(Ft,Ft,vt.get(Ft,Ft)+1)}Ht[Ft]=-Ht[Ft]}for(let te=Ft+1;te<M;te++){if(Ft<He&&Ht[Ft]!==0){let ue=0;for(let se=Ft;se<w;se++)ue+=vt.get(se,Ft)*vt.get(se,te);ue=-ue/vt.get(Ft,Ft);for(let se=Ft;se<w;se++)vt.set(se,te,vt.get(se,te)+ue*vt.get(se,Ft))}Et[te]=vt.get(Ft,te)}if(ot&&Ft<He)for(let te=Ft;te<w;te++)qt.set(te,Ft,vt.get(te,Ft));if(Ft<je){Et[Ft]=0;for(let te=Ft+1;te<M;te++)Et[Ft]=Ji(Et[Ft],Et[te]);if(Et[Ft]!==0){Et[Ft+1]<0&&(Et[Ft]=0-Et[Ft]);for(let te=Ft+1;te<M;te++)Et[te]/=Et[Ft];Et[Ft+1]+=1}if(Et[Ft]=-Et[Ft],Ft+1<w&&Et[Ft]!==0){for(let te=Ft+1;te<w;te++)$t[te]=0;for(let te=Ft+1;te<w;te++)for(let ue=Ft+1;ue<M;ue++)$t[te]+=Et[ue]*vt.get(te,ue);for(let te=Ft+1;te<M;te++){let ue=-Et[te]/Et[Ft+1];for(let se=Ft+1;se<w;se++)vt.set(se,te,vt.get(se,te)+ue*$t[se])}}if(At)for(let te=Ft+1;te<M;te++)Ce.set(te,Ft,Et[te])}}let Ie=Math.min(M,w+1);if(He<M&&(Ht[He]=vt.get(He,He)),w<Ie&&(Ht[Ie-1]=0),je+1<Ie&&(Et[je]=vt.get(je,Ie-1)),Et[Ie-1]=0,ot){for(let Ft=He;Ft<Zt;Ft++){for(let te=0;te<w;te++)qt.set(te,Ft,0);qt.set(Ft,Ft,1)}for(let Ft=He-1;Ft>=0;Ft--)if(Ht[Ft]!==0){for(let te=Ft+1;te<Zt;te++){let ue=0;for(let se=Ft;se<w;se++)ue+=qt.get(se,Ft)*qt.get(se,te);ue=-ue/qt.get(Ft,Ft);for(let se=Ft;se<w;se++)qt.set(se,te,qt.get(se,te)+ue*qt.get(se,Ft))}for(let te=Ft;te<w;te++)qt.set(te,Ft,-qt.get(te,Ft));qt.set(Ft,Ft,1+qt.get(Ft,Ft));for(let te=0;te<Ft-1;te++)qt.set(te,Ft,0)}else{for(let te=0;te<w;te++)qt.set(te,Ft,0);qt.set(Ft,Ft,1)}}if(At)for(let Ft=M-1;Ft>=0;Ft--){if(Ft<je&&Et[Ft]!==0)for(let te=Ft+1;te<M;te++){let ue=0;for(let se=Ft+1;se<M;se++)ue+=Ce.get(se,Ft)*Ce.get(se,te);ue=-ue/Ce.get(Ft+1,Ft);for(let se=Ft+1;se<M;se++)Ce.set(se,te,Ce.get(se,te)+ue*Ce.get(se,Ft))}for(let te=0;te<M;te++)Ce.set(te,Ft,0);Ce.set(Ft,Ft,1)}let De=Ie-1,on=Number.EPSILON;for(;Ie>0;){let Ft,te;for(Ft=Ie-2;Ft>=-1&&Ft!==-1;Ft--){const ue=Number.MIN_VALUE+on*Math.abs(Ht[Ft]+Math.abs(Ht[Ft+1]));if(Math.abs(Et[Ft])<=ue||Number.isNaN(Et[Ft])){Et[Ft]=0;break}}if(Ft===Ie-2)te=4;else{let ue;for(ue=Ie-1;ue>=Ft&&ue!==Ft;ue--){let se=(ue!==Ie?Math.abs(Et[ue]):0)+(ue!==Ft+1?Math.abs(Et[ue-1]):0);if(Math.abs(Ht[ue])<=on*se){Ht[ue]=0;break}}ue===Ft?te=3:ue===Ie-1?te=1:(te=2,Ft=ue)}switch(Ft++,te){case 1:{let ue=Et[Ie-2];Et[Ie-2]=0;for(let se=Ie-2;se>=Ft;se--){let Jn=Ji(Ht[se],ue),Qn=Ht[se]/Jn,jn=ue/Jn;if(Ht[se]=Jn,se!==Ft&&(ue=-jn*Et[se-1],Et[se-1]=Qn*Et[se-1]),At)for(let qn=0;qn<M;qn++)Jn=Qn*Ce.get(qn,se)+jn*Ce.get(qn,Ie-1),Ce.set(qn,Ie-1,-jn*Ce.get(qn,se)+Qn*Ce.get(qn,Ie-1)),Ce.set(qn,se,Jn)}break}case 2:{let ue=Et[Ft-1];Et[Ft-1]=0;for(let se=Ft;se<Ie;se++){let Jn=Ji(Ht[se],ue),Qn=Ht[se]/Jn,jn=ue/Jn;if(Ht[se]=Jn,ue=-jn*Et[se],Et[se]=Qn*Et[se],ot)for(let qn=0;qn<w;qn++)Jn=Qn*qt.get(qn,se)+jn*qt.get(qn,Ft-1),qt.set(qn,Ft-1,-jn*qt.get(qn,se)+Qn*qt.get(qn,Ft-1)),qt.set(qn,se,Jn)}break}case 3:{const ue=Math.max(Math.abs(Ht[Ie-1]),Math.abs(Ht[Ie-2]),Math.abs(Et[Ie-2]),Math.abs(Ht[Ft]),Math.abs(Et[Ft])),se=Ht[Ie-1]/ue,Jn=Ht[Ie-2]/ue,Qn=Et[Ie-2]/ue,jn=Ht[Ft]/ue,qn=Et[Ft]/ue,Qr=((Jn+se)*(Jn-se)+Qn*Qn)/2,Tr=se*Qn*(se*Qn);let Dn=0;(Qr!==0||Tr!==0)&&(Qr<0?Dn=0-Math.sqrt(Qr*Qr+Tr):Dn=Math.sqrt(Qr*Qr+Tr),Dn=Tr/(Qr+Dn));let qi=(jn+se)*(jn-se)+Dn,$i=jn*qn;for(let fn=Ft;fn<Ie-1;fn++){let Er=Ji(qi,$i);Er===0&&(Er=Number.MIN_VALUE);let ti=qi/Er,ei=$i/Er;if(fn!==Ft&&(Et[fn-1]=Er),qi=ti*Ht[fn]+ei*Et[fn],Et[fn]=ti*Et[fn]-ei*Ht[fn],$i=ei*Ht[fn+1],Ht[fn+1]=ti*Ht[fn+1],At)for(let Pn=0;Pn<M;Pn++)Er=ti*Ce.get(Pn,fn)+ei*Ce.get(Pn,fn+1),Ce.set(Pn,fn+1,-ei*Ce.get(Pn,fn)+ti*Ce.get(Pn,fn+1)),Ce.set(Pn,fn,Er);if(Er=Ji(qi,$i),Er===0&&(Er=Number.MIN_VALUE),ti=qi/Er,ei=$i/Er,Ht[fn]=Er,qi=ti*Et[fn]+ei*Ht[fn+1],Ht[fn+1]=-ei*Et[fn]+ti*Ht[fn+1],$i=ei*Et[fn+1],Et[fn+1]=ti*Et[fn+1],ot&&fn<w-1)for(let Pn=0;Pn<w;Pn++)Er=ti*qt.get(Pn,fn)+ei*qt.get(Pn,fn+1),qt.set(Pn,fn+1,-ei*qt.get(Pn,fn)+ti*qt.get(Pn,fn+1)),qt.set(Pn,fn,Er)}Et[Ie-2]=qi;break}case 4:{if(Ht[Ft]<=0&&(Ht[Ft]=Ht[Ft]<0?-Ht[Ft]:0,At))for(let ue=0;ue<=De;ue++)Ce.set(ue,Ft,-Ce.get(ue,Ft));for(;Ft<De&&!(Ht[Ft]>=Ht[Ft+1]);){let ue=Ht[Ft];if(Ht[Ft]=Ht[Ft+1],Ht[Ft+1]=ue,At&&Ft<M-1)for(let se=0;se<M;se++)ue=Ce.get(se,Ft+1),Ce.set(se,Ft+1,Ce.get(se,Ft)),Ce.set(se,Ft,ue);if(ot&&Ft<w-1)for(let se=0;se<w;se++)ue=qt.get(se,Ft+1),qt.set(se,Ft+1,qt.get(se,Ft)),qt.set(se,Ft,ue);Ft++}Ie--;break}}}if(It){let Ft=Ce;Ce=qt,qt=Ft}this.m=w,this.n=M,this.s=Ht,this.U=qt,this.V=Ce}solve(C){let S=C,w=this.threshold,M=this.s.length,k=pe.zeros(M,M);for(let Zt=0;Zt<M;Zt++)Math.abs(this.s[Zt])<=w?k.set(Zt,Zt,0):k.set(Zt,Zt,1/this.s[Zt]);let nt=this.U,rt=this.rightSingularVectors,ot=rt.mmul(k),At=rt.rows,It=nt.rows,vt=pe.zeros(At,It);for(let Zt=0;Zt<At;Zt++)for(let ce=0;ce<It;ce++){let Ht=0;for(let qt=0;qt<M;qt++)Ht+=ot.get(Zt,qt)*nt.get(ce,qt);vt.set(Zt,ce,Ht)}return vt.mmul(S)}solveForDiagonal(C){return this.solve(pe.diag(C))}inverse(){let C=this.V,S=this.threshold,w=C.rows,M=C.columns,k=new pe(w,this.s.length);for(let It=0;It<w;It++)for(let vt=0;vt<M;vt++)Math.abs(this.s[vt])>S&&k.set(It,vt,C.get(It,vt)/this.s[vt]);let nt=this.U,rt=nt.rows,ot=nt.columns,At=new pe(w,rt);for(let It=0;It<w;It++)for(let vt=0;vt<rt;vt++){let Zt=0;for(let ce=0;ce<ot;ce++)Zt+=k.get(It,ce)*nt.get(vt,ce);At.set(It,vt,Zt)}return At}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let C=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,S=0,w=this.s;for(let M=0,k=w.length;M<k;M++)w[M]>C&&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(Y,C=!1){return Y=Ar.checkMatrix(Y),C?new ja(Y).inverse():_A(Y,pe.eye(Y.rows))}function _A(Y,C,S=!1){return Y=Ar.checkMatrix(Y),C=Ar.checkMatrix(C),S?new ja(Y).solve(C):Y.isSquare()?new Xi(Y).solve(C):new fo(Y).solve(C)}function Rs(Y){if(Y=pe.checkMatrix(Y),Y.isSquare()){if(Y.columns===0)return 1;let C,S,w,M;if(Y.columns===2)return C=Y.get(0,0),S=Y.get(0,1),w=Y.get(1,0),M=Y.get(1,1),C*M-S*w;if(Y.columns===3){let k,nt,rt;return k=new ba(Y,[1,2],[1,2]),nt=new ba(Y,[1,2],[0,2]),rt=new ba(Y,[1,2],[0,1]),C=Y.get(0,0),S=Y.get(0,1),w=Y.get(0,2),C*Rs(k)-S*Rs(nt)+w*Rs(rt)}else return new Xi(Y).determinant}else throw Error("determinant can only be calculated for a square matrix")}function HA(Y,C){let S=[];for(let w=0;w<Y;w++)w!==C&&S.push(w);return S}function Vl(Y,C,S,w=1e-9,M=1e-9){if(Y>M)return new Array(C.rows+1).fill(0);{let k=C.addRow(S,[0]);for(let nt=0;nt<k.rows;nt++)Math.abs(k.get(nt,0))<w&&k.set(nt,0,0);return k.to1DArray()}}function cu(Y,C={}){const{thresholdValue:S=1e-9,thresholdError:w=1e-9}=C;Y=pe.checkMatrix(Y);let M=Y.rows,k=new pe(M,M);for(let nt=0;nt<M;nt++){let rt=pe.columnVector(Y.getRow(nt)),ot=Y.subMatrixRow(HA(M,nt)).transpose(),It=new ja(ot).solve(rt),vt=pe.sub(rt,ot.mmul(It)).abs().max();k.setRow(nt,Vl(vt,It,nt,S,w))}return k}function ed(Y,C=Number.EPSILON){if(Y=pe.checkMatrix(Y),Y.isEmpty())return Y.transpose();let S=new ja(Y,{autoTranspose:!0}),w=S.leftSingularVectors,M=S.rightSingularVectors,k=S.diagonal;for(let nt=0;nt<k.length;nt++)Math.abs(k[nt])>C?k[nt]=1/k[nt]:k[nt]=0;return M.mmul(pe.diag(k).mmul(w.transpose()))}function nd(Y,C=Y,S={}){Y=new pe(Y);let w=!1;if(typeof C=="object"&&!pe.isMatrix(C)&&!Ct.isAnyArray(C)?(S=C,C=Y,w=!0):C=new pe(C),Y.rows!==C.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:M=!0}=S;M&&(Y=Y.center("column"),w||(C=C.center("column")));const k=Y.transpose().mmul(C);for(let nt=0;nt<k.rows;nt++)for(let rt=0;rt<k.columns;rt++)k.set(nt,rt,k.get(nt,rt)*(1/(Y.rows-1)));return k}function Wl(Y,C=Y,S={}){Y=new pe(Y);let w=!1;if(typeof C=="object"&&!pe.isMatrix(C)&&!Ct.isAnyArray(C)?(S=C,C=Y,w=!0):C=new pe(C),Y.rows!==C.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:M=!0,scale:k=!0}=S;M&&(Y.center("column"),w||C.center("column")),k&&(Y.scale("column"),w||C.scale("column"));const nt=Y.standardDeviation("column",{unbiased:!0}),rt=w?nt:C.standardDeviation("column",{unbiased:!0}),ot=Y.transpose().mmul(C);for(let At=0;At<ot.rows;At++)for(let It=0;It<ot.columns;It++)ot.set(At,It,ot.get(At,It)*(1/(nt[At]*rt[It]))*(1/(Y.rows-1)));return ot}class pn{constructor(C,S={}){const{assumeSymmetric:w=!1}=S;if(C=Ar.checkMatrix(C),!C.isSquare())throw new Error("Matrix is not a square matrix");if(C.isEmpty())throw new Error("Matrix must be non-empty");let M=C.columns,k=new pe(M,M),nt=new Float64Array(M),rt=new Float64Array(M),ot=C,At,It,vt=!1;if(w?vt=!0:vt=C.isSymmetric(),vt){for(At=0;At<M;At++)for(It=0;It<M;It++)k.set(At,It,ot.get(At,It));GA(M,rt,nt,k),jl(M,rt,nt,k)}else{let Zt=new pe(M,M),ce=new Float64Array(M);for(It=0;It<M;It++)for(At=0;At<M;At++)Zt.set(At,It,ot.get(At,It));Ca(M,Zt,ce,k),zA(M,rt,nt,k,Zt)}this.n=M,this.e=rt,this.d=nt,this.V=k}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let C=this.n,S=this.e,w=this.d,M=new pe(C,C),k,nt;for(k=0;k<C;k++){for(nt=0;nt<C;nt++)M.set(k,nt,0);M.set(k,k,w[k]),S[k]>0?M.set(k,k+1,S[k]):S[k]<0&&M.set(k,k-1,S[k])}return M}}function GA(Y,C,S,w){let M,k,nt,rt,ot,At,It,vt;for(ot=0;ot<Y;ot++)S[ot]=w.get(Y-1,ot);for(rt=Y-1;rt>0;rt--){for(vt=0,nt=0,At=0;At<rt;At++)vt=vt+Math.abs(S[At]);if(vt===0)for(C[rt]=S[rt-1],ot=0;ot<rt;ot++)S[ot]=w.get(rt-1,ot),w.set(rt,ot,0),w.set(ot,rt,0);else{for(At=0;At<rt;At++)S[At]/=vt,nt+=S[At]*S[At];for(M=S[rt-1],k=Math.sqrt(nt),M>0&&(k=-k),C[rt]=vt*k,nt=nt-M*k,S[rt-1]=M-k,ot=0;ot<rt;ot++)C[ot]=0;for(ot=0;ot<rt;ot++){for(M=S[ot],w.set(ot,rt,M),k=C[ot]+w.get(ot,ot)*M,At=ot+1;At<=rt-1;At++)k+=w.get(At,ot)*S[At],C[At]+=w.get(At,ot)*M;C[ot]=k}for(M=0,ot=0;ot<rt;ot++)C[ot]/=nt,M+=C[ot]*S[ot];for(It=M/(nt+nt),ot=0;ot<rt;ot++)C[ot]-=It*S[ot];for(ot=0;ot<rt;ot++){for(M=S[ot],k=C[ot],At=ot;At<=rt-1;At++)w.set(At,ot,w.get(At,ot)-(M*C[At]+k*S[At]));S[ot]=w.get(rt-1,ot),w.set(rt,ot,0)}}S[rt]=nt}for(rt=0;rt<Y-1;rt++){if(w.set(Y-1,rt,w.get(rt,rt)),w.set(rt,rt,1),nt=S[rt+1],nt!==0){for(At=0;At<=rt;At++)S[At]=w.get(At,rt+1)/nt;for(ot=0;ot<=rt;ot++){for(k=0,At=0;At<=rt;At++)k+=w.get(At,rt+1)*w.get(At,ot);for(At=0;At<=rt;At++)w.set(At,ot,w.get(At,ot)-k*S[At])}}for(At=0;At<=rt;At++)w.set(At,rt+1,0)}for(ot=0;ot<Y;ot++)S[ot]=w.get(Y-1,ot),w.set(Y-1,ot,0);w.set(Y-1,Y-1,1),C[0]=0}function jl(Y,C,S,w){let M,k,nt,rt,ot,At,It,vt,Zt,ce,Ht,qt,Ce,Et,$t,Ee;for(nt=1;nt<Y;nt++)C[nt-1]=C[nt];C[Y-1]=0;let He=0,je=0,Wn=Number.EPSILON;for(At=0;At<Y;At++){for(je=Math.max(je,Math.abs(S[At])+Math.abs(C[At])),It=At;It<Y&&!(Math.abs(C[It])<=Wn*je);)It++;if(It>At)do{for(M=S[At],vt=(S[At+1]-M)/(2*C[At]),Zt=Ji(vt,1),vt<0&&(Zt=-Zt),S[At]=C[At]/(vt+Zt),S[At+1]=C[At]*(vt+Zt),ce=S[At+1],k=M-S[At],nt=At+2;nt<Y;nt++)S[nt]-=k;for(He=He+k,vt=S[It],Ht=1,qt=Ht,Ce=Ht,Et=C[At+1],$t=0,Ee=0,nt=It-1;nt>=At;nt--)for(Ce=qt,qt=Ht,Ee=$t,M=Ht*C[nt],k=Ht*vt,Zt=Ji(vt,C[nt]),C[nt+1]=$t*Zt,$t=C[nt]/Zt,Ht=vt/Zt,vt=Ht*S[nt]-$t*M,S[nt+1]=k+$t*(Ht*M+$t*S[nt]),ot=0;ot<Y;ot++)k=w.get(ot,nt+1),w.set(ot,nt+1,$t*w.get(ot,nt)+Ht*k),w.set(ot,nt,Ht*w.get(ot,nt)-$t*k);vt=-$t*Ee*Ce*Et*C[At]/ce,C[At]=$t*vt,S[At]=Ht*vt}while(Math.abs(C[At])>Wn*je);S[At]=S[At]+He,C[At]=0}for(nt=0;nt<Y-1;nt++){for(ot=nt,vt=S[nt],rt=nt+1;rt<Y;rt++)S[rt]<vt&&(ot=rt,vt=S[rt]);if(ot!==nt)for(S[ot]=S[nt],S[nt]=vt,rt=0;rt<Y;rt++)vt=w.get(rt,nt),w.set(rt,nt,w.get(rt,ot)),w.set(rt,ot,vt)}}function Ca(Y,C,S,w){let M=0,k=Y-1,nt,rt,ot,At,It,vt,Zt;for(vt=M+1;vt<=k-1;vt++){for(Zt=0,At=vt;At<=k;At++)Zt=Zt+Math.abs(C.get(At,vt-1));if(Zt!==0){for(ot=0,At=k;At>=vt;At--)S[At]=C.get(At,vt-1)/Zt,ot+=S[At]*S[At];for(rt=Math.sqrt(ot),S[vt]>0&&(rt=-rt),ot=ot-S[vt]*rt,S[vt]=S[vt]-rt,It=vt;It<Y;It++){for(nt=0,At=k;At>=vt;At--)nt+=S[At]*C.get(At,It);for(nt=nt/ot,At=vt;At<=k;At++)C.set(At,It,C.get(At,It)-nt*S[At])}for(At=0;At<=k;At++){for(nt=0,It=k;It>=vt;It--)nt+=S[It]*C.get(At,It);for(nt=nt/ot,It=vt;It<=k;It++)C.set(At,It,C.get(At,It)-nt*S[It])}S[vt]=Zt*S[vt],C.set(vt,vt-1,Zt*rt)}}for(At=0;At<Y;At++)for(It=0;It<Y;It++)w.set(At,It,At===It?1:0);for(vt=k-1;vt>=M+1;vt--)if(C.get(vt,vt-1)!==0){for(At=vt+1;At<=k;At++)S[At]=C.get(At,vt-1);for(It=vt;It<=k;It++){for(rt=0,At=vt;At<=k;At++)rt+=S[At]*w.get(At,It);for(rt=rt/S[vt]/C.get(vt,vt-1),At=vt;At<=k;At++)w.set(At,It,w.get(At,It)+rt*S[At])}}}function zA(Y,C,S,w,M){let k=Y-1,nt=0,rt=Y-1,ot=Number.EPSILON,At=0,It=0,vt=0,Zt=0,ce=0,Ht=0,qt=0,Ce=0,Et,$t,Ee,He,je,Wn,Ie,De,on,Ft,te,ue,se,Jn,Qn;for(Et=0;Et<Y;Et++)for((Et<nt||Et>rt)&&(S[Et]=M.get(Et,Et),C[Et]=0),$t=Math.max(Et-1,0);$t<Y;$t++)It=It+Math.abs(M.get(Et,$t));for(;k>=nt;){for(He=k;He>nt&&(Ht=Math.abs(M.get(He-1,He-1))+Math.abs(M.get(He,He)),Ht===0&&(Ht=It),!(Math.abs(M.get(He,He-1))<ot*Ht));)He--;if(He===k)M.set(k,k,M.get(k,k)+At),S[k]=M.get(k,k),C[k]=0,k--,Ce=0;else if(He===k-1){if(Ie=M.get(k,k-1)*M.get(k-1,k),vt=(M.get(k-1,k-1)-M.get(k,k))/2,Zt=vt*vt+Ie,qt=Math.sqrt(Math.abs(Zt)),M.set(k,k,M.get(k,k)+At),M.set(k-1,k-1,M.get(k-1,k-1)+At),De=M.get(k,k),Zt>=0){for(qt=vt>=0?vt+qt:vt-qt,S[k-1]=De+qt,S[k]=S[k-1],qt!==0&&(S[k]=De-Ie/qt),C[k-1]=0,C[k]=0,De=M.get(k,k-1),Ht=Math.abs(De)+Math.abs(qt),vt=De/Ht,Zt=qt/Ht,ce=Math.sqrt(vt*vt+Zt*Zt),vt=vt/ce,Zt=Zt/ce,$t=k-1;$t<Y;$t++)qt=M.get(k-1,$t),M.set(k-1,$t,Zt*qt+vt*M.get(k,$t)),M.set(k,$t,Zt*M.get(k,$t)-vt*qt);for(Et=0;Et<=k;Et++)qt=M.get(Et,k-1),M.set(Et,k-1,Zt*qt+vt*M.get(Et,k)),M.set(Et,k,Zt*M.get(Et,k)-vt*qt);for(Et=nt;Et<=rt;Et++)qt=w.get(Et,k-1),w.set(Et,k-1,Zt*qt+vt*w.get(Et,k)),w.set(Et,k,Zt*w.get(Et,k)-vt*qt)}else S[k-1]=De+vt,S[k]=De+vt,C[k-1]=qt,C[k]=-qt;k=k-2,Ce=0}else{if(De=M.get(k,k),on=0,Ie=0,He<k&&(on=M.get(k-1,k-1),Ie=M.get(k,k-1)*M.get(k-1,k)),Ce===10){for(At+=De,Et=nt;Et<=k;Et++)M.set(Et,Et,M.get(Et,Et)-De);Ht=Math.abs(M.get(k,k-1))+Math.abs(M.get(k-1,k-2)),De=on=.75*Ht,Ie=-.4375*Ht*Ht}if(Ce===30&&(Ht=(on-De)/2,Ht=Ht*Ht+Ie,Ht>0)){for(Ht=Math.sqrt(Ht),on<De&&(Ht=-Ht),Ht=De-Ie/((on-De)/2+Ht),Et=nt;Et<=k;Et++)M.set(Et,Et,M.get(Et,Et)-Ht);At+=Ht,De=on=Ie=.964}for(Ce=Ce+1,je=k-2;je>=He&&(qt=M.get(je,je),ce=De-qt,Ht=on-qt,vt=(ce*Ht-Ie)/M.get(je+1,je)+M.get(je,je+1),Zt=M.get(je+1,je+1)-qt-ce-Ht,ce=M.get(je+2,je+1),Ht=Math.abs(vt)+Math.abs(Zt)+Math.abs(ce),vt=vt/Ht,Zt=Zt/Ht,ce=ce/Ht,!(je===He||Math.abs(M.get(je,je-1))*(Math.abs(Zt)+Math.abs(ce))<ot*(Math.abs(vt)*(Math.abs(M.get(je-1,je-1))+Math.abs(qt)+Math.abs(M.get(je+1,je+1))))));)je--;for(Et=je+2;Et<=k;Et++)M.set(Et,Et-2,0),Et>je+2&&M.set(Et,Et-3,0);for(Ee=je;Ee<=k-1&&(Jn=Ee!==k-1,Ee!==je&&(vt=M.get(Ee,Ee-1),Zt=M.get(Ee+1,Ee-1),ce=Jn?M.get(Ee+2,Ee-1):0,De=Math.abs(vt)+Math.abs(Zt)+Math.abs(ce),De!==0&&(vt=vt/De,Zt=Zt/De,ce=ce/De)),De!==0);Ee++)if(Ht=Math.sqrt(vt*vt+Zt*Zt+ce*ce),vt<0&&(Ht=-Ht),Ht!==0){for(Ee!==je?M.set(Ee,Ee-1,-Ht*De):He!==je&&M.set(Ee,Ee-1,-M.get(Ee,Ee-1)),vt=vt+Ht,De=vt/Ht,on=Zt/Ht,qt=ce/Ht,Zt=Zt/vt,ce=ce/vt,$t=Ee;$t<Y;$t++)vt=M.get(Ee,$t)+Zt*M.get(Ee+1,$t),Jn&&(vt=vt+ce*M.get(Ee+2,$t),M.set(Ee+2,$t,M.get(Ee+2,$t)-vt*qt)),M.set(Ee,$t,M.get(Ee,$t)-vt*De),M.set(Ee+1,$t,M.get(Ee+1,$t)-vt*on);for(Et=0;Et<=Math.min(k,Ee+3);Et++)vt=De*M.get(Et,Ee)+on*M.get(Et,Ee+1),Jn&&(vt=vt+qt*M.get(Et,Ee+2),M.set(Et,Ee+2,M.get(Et,Ee+2)-vt*ce)),M.set(Et,Ee,M.get(Et,Ee)-vt),M.set(Et,Ee+1,M.get(Et,Ee+1)-vt*Zt);for(Et=nt;Et<=rt;Et++)vt=De*w.get(Et,Ee)+on*w.get(Et,Ee+1),Jn&&(vt=vt+qt*w.get(Et,Ee+2),w.set(Et,Ee+2,w.get(Et,Ee+2)-vt*ce)),w.set(Et,Ee,w.get(Et,Ee)-vt),w.set(Et,Ee+1,w.get(Et,Ee+1)-vt*Zt)}}}if(It!==0){for(k=Y-1;k>=0;k--)if(vt=S[k],Zt=C[k],Zt===0)for(He=k,M.set(k,k,1),Et=k-1;Et>=0;Et--){for(Ie=M.get(Et,Et)-vt,ce=0,$t=He;$t<=k;$t++)ce=ce+M.get(Et,$t)*M.get($t,k);if(C[Et]<0)qt=Ie,Ht=ce;else if(He=Et,C[Et]===0?M.set(Et,k,Ie!==0?-ce/Ie:-ce/(ot*It)):(De=M.get(Et,Et+1),on=M.get(Et+1,Et),Zt=(S[Et]-vt)*(S[Et]-vt)+C[Et]*C[Et],Wn=(De*Ht-qt*ce)/Zt,M.set(Et,k,Wn),M.set(Et+1,k,Math.abs(De)>Math.abs(qt)?(-ce-Ie*Wn)/De:(-Ht-on*Wn)/qt)),Wn=Math.abs(M.get(Et,k)),ot*Wn*Wn>1)for($t=Et;$t<=k;$t++)M.set($t,k,M.get($t,k)/Wn)}else if(Zt<0)for(He=k-1,Math.abs(M.get(k,k-1))>Math.abs(M.get(k-1,k))?(M.set(k-1,k-1,Zt/M.get(k,k-1)),M.set(k-1,k,-(M.get(k,k)-vt)/M.get(k,k-1))):(Qn=Yo(0,-M.get(k-1,k),M.get(k-1,k-1)-vt,Zt),M.set(k-1,k-1,Qn[0]),M.set(k-1,k,Qn[1])),M.set(k,k-1,0),M.set(k,k,1),Et=k-2;Et>=0;Et--){for(Ft=0,te=0,$t=He;$t<=k;$t++)Ft=Ft+M.get(Et,$t)*M.get($t,k-1),te=te+M.get(Et,$t)*M.get($t,k);if(Ie=M.get(Et,Et)-vt,C[Et]<0)qt=Ie,ce=Ft,Ht=te;else if(He=Et,C[Et]===0?(Qn=Yo(-Ft,-te,Ie,Zt),M.set(Et,k-1,Qn[0]),M.set(Et,k,Qn[1])):(De=M.get(Et,Et+1),on=M.get(Et+1,Et),ue=(S[Et]-vt)*(S[Et]-vt)+C[Et]*C[Et]-Zt*Zt,se=(S[Et]-vt)*2*Zt,ue===0&&se===0&&(ue=ot*It*(Math.abs(Ie)+Math.abs(Zt)+Math.abs(De)+Math.abs(on)+Math.abs(qt))),Qn=Yo(De*ce-qt*Ft+Zt*te,De*Ht-qt*te-Zt*Ft,ue,se),M.set(Et,k-1,Qn[0]),M.set(Et,k,Qn[1]),Math.abs(De)>Math.abs(qt)+Math.abs(Zt)?(M.set(Et+1,k-1,(-Ft-Ie*M.get(Et,k-1)+Zt*M.get(Et,k))/De),M.set(Et+1,k,(-te-Ie*M.get(Et,k)-Zt*M.get(Et,k-1))/De)):(Qn=Yo(-ce-on*M.get(Et,k-1),-Ht-on*M.get(Et,k),qt,Zt),M.set(Et+1,k-1,Qn[0]),M.set(Et+1,k,Qn[1]))),Wn=Math.max(Math.abs(M.get(Et,k-1)),Math.abs(M.get(Et,k))),ot*Wn*Wn>1)for($t=Et;$t<=k;$t++)M.set($t,k-1,M.get($t,k-1)/Wn),M.set($t,k,M.get($t,k)/Wn)}for(Et=0;Et<Y;Et++)if(Et<nt||Et>rt)for($t=Et;$t<Y;$t++)w.set(Et,$t,M.get(Et,$t));for($t=Y-1;$t>=nt;$t--)for(Et=nt;Et<=rt;Et++){for(qt=0,Ee=nt;Ee<=Math.min($t,rt);Ee++)qt=qt+w.get(Et,Ee)*M.get(Ee,$t);w.set(Et,$t,qt)}}}function Yo(Y,C,S,w){let M,k;return Math.abs(S)>Math.abs(w)?(M=w/S,k=S+M*w,[(Y+M*C)/k,(C-M*Y)/k]):(M=S/w,k=w+M*S,[(M*Y+C)/k,(M*C-Y)/k])}class Zl{constructor(C){if(C=Ar.checkMatrix(C),!C.isSymmetric())throw new Error("Matrix is not symmetric");let S=C,w=S.rows,M=new pe(w,w),k=!0,nt,rt,ot;for(rt=0;rt<w;rt++){let At=0;for(ot=0;ot<rt;ot++){let It=0;for(nt=0;nt<ot;nt++)It+=M.get(ot,nt)*M.get(rt,nt);It=(S.get(rt,ot)-It)/M.get(ot,ot),M.set(rt,ot,It),At=At+It*It}for(At=S.get(rt,rt)-At,k&&(k=At>0),M.set(rt,rt,Math.sqrt(Math.max(At,0))),ot=rt+1;ot<w;ot++)M.set(rt,ot,0)}this.L=M,this.positiveDefinite=k}isPositiveDefinite(){return this.positiveDefinite}solve(C){C=Ar.checkMatrix(C);let S=this.L,w=S.rows;if(C.rows!==w)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let M=C.columns,k=C.clone(),nt,rt,ot;for(ot=0;ot<w;ot++)for(rt=0;rt<M;rt++){for(nt=0;nt<ot;nt++)k.set(ot,rt,k.get(ot,rt)-k.get(nt,rt)*S.get(ot,nt));k.set(ot,rt,k.get(ot,rt)/S.get(ot,ot))}for(ot=w-1;ot>=0;ot--)for(rt=0;rt<M;rt++){for(nt=ot+1;nt<w;nt++)k.set(ot,rt,k.get(ot,rt)-k.get(nt,rt)*S.get(nt,ot));k.set(ot,rt,k.get(ot,rt)/S.get(ot,ot))}return k}get lowerTriangularMatrix(){return this.L}}class Yl{constructor(C,S={}){C=Ar.checkMatrix(C);let{Y:w}=S;const{scaleScores:M=!1,maxIterations:k=1e3,terminationCriteria:nt=1e-10}=S;let rt;if(w){if(Ct.isAnyArray(w)&&typeof w[0]=="number"?w=pe.columnVector(w):w=Ar.checkMatrix(w),w.rows!==C.rows)throw new Error("Y should have the same number of rows as X");rt=w.getColumnVector(0)}else rt=C.getColumnVector(0);let ot=1,At,It,vt,Zt;for(let ce=0;ce<k&&ot>nt;ce++)vt=C.transpose().mmul(rt).div(rt.transpose().mmul(rt).get(0,0)),vt=vt.div(vt.norm()),At=C.mmul(vt).div(vt.transpose().mmul(vt).get(0,0)),ce>0&&(ot=At.clone().sub(Zt).pow(2).sum()),Zt=At.clone(),w?(It=w.transpose().mmul(At).div(At.transpose().mmul(At).get(0,0)),It=It.div(It.norm()),rt=w.mmul(It).div(It.transpose().mmul(It).get(0,0))):rt=At;if(w){let ce=C.transpose().mmul(At).div(At.transpose().mmul(At).get(0,0));ce=ce.div(ce.norm());let Ht=C.clone().sub(At.clone().mmul(ce.transpose())),qt=rt.transpose().mmul(At).div(At.transpose().mmul(At).get(0,0)),Ce=w.clone().sub(At.clone().mulS(qt.get(0,0)).mmul(It.transpose()));this.t=At,this.p=ce.transpose(),this.w=vt.transpose(),this.q=It,this.u=rt,this.s=At.transpose().mmul(At),this.xResidual=Ht,this.yResidual=Ce,this.betas=qt}else this.w=vt.transpose(),this.s=At.transpose().mmul(At).sqrt(),M?this.t=At.clone().div(this.s.get(0,0)):this.t=At,this.xResidual=C.sub(At.mmul(vt.transpose()))}}st.XA=me,st.a_=Zl,st.yQ=Zl,st.Hs=Fr,st.Ec=pn,st.dx=pn,st.LU=Xi,st.Rm=Xi,st.y3=pe,st.qK=Yi,st.pb=ls,st.j=cs,st.sO=Li,st.BZ=Ba,st.EK=qr,st.Db=ba,st.Fx=la,st.tU=xa,st.Ym=Yl,st.rs=Yl,st.QR=fo,st.TB=fo,st.oH=ja,st.Sc=ja,st.BN=kr,st.it=$r,st.$r=Ar,st.QM=Wl,st.AV=nd,I=pe,st.GH=Rs,st.SO=Zo,st.uZ=cu,st.yU=ed,st.F1=_A,st.re=jo},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,st,T){var I=T(45411),W=T(81683),z=Object.hasOwnProperty,P=Object.create(null);for(var N in I)z.call(I,N)&&(P[I[N]]=N);var G=X.exports={to:{},get:{}};G.get=function(H){var J=H.substring(0,3).toLowerCase(),Z,$;switch(J){case"hsl":Z=G.get.hsl(H),$="hsl";break;case"hwb":Z=G.get.hwb(H),$="hwb";break;default:Z=G.get.rgb(H),$="rgb";break}return Z?{model:$,value:Z}:null},G.get.rgb=function(H){if(!H)return null;var J=/^#([a-f0-9]{3,4})$/i,Z=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,$=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ct=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,ht=/^(\w+)$/,Ct=[0,0,0,1],pt,ut,Bt;if(pt=H.match(Z)){for(Bt=pt[2],pt=pt[1],ut=0;ut<3;ut++){var wt=ut*2;Ct[ut]=parseInt(pt.slice(wt,wt+2),16)}Bt&&(Ct[3]=parseInt(Bt,16)/255)}else if(pt=H.match(J)){for(pt=pt[1],Bt=pt[3],ut=0;ut<3;ut++)Ct[ut]=parseInt(pt[ut]+pt[ut],16);Bt&&(Ct[3]=parseInt(Bt+Bt,16)/255)}else if(pt=H.match($)){for(ut=0;ut<3;ut++)Ct[ut]=parseInt(pt[ut+1],0);pt[4]&&(pt[5]?Ct[3]=parseFloat(pt[4])*.01:Ct[3]=parseFloat(pt[4]))}else if(pt=H.match(ct)){for(ut=0;ut<3;ut++)Ct[ut]=Math.round(parseFloat(pt[ut+1])*2.55);pt[4]&&(pt[5]?Ct[3]=parseFloat(pt[4])*.01:Ct[3]=parseFloat(pt[4]))}else return(pt=H.match(ht))?pt[1]==="transparent"?[0,0,0,0]:z.call(I,pt[1])?(Ct=I[pt[1]],Ct[3]=1,Ct):null:null;for(ut=0;ut<3;ut++)Ct[ut]=K(Ct[ut],0,255);return Ct[3]=K(Ct[3],0,1),Ct},G.get.hsl=function(H){if(!H)return null;var J=/^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*)?\)$/,Z=H.match(J);if(Z){var $=parseFloat(Z[4]),ct=(parseFloat(Z[1])%360+360)%360,ht=K(parseFloat(Z[2]),0,100),Ct=K(parseFloat(Z[3]),0,100),pt=K(isNaN($)?1:$,0,1);return[ct,ht,Ct,pt]}return null},G.get.hwb=function(H){if(!H)return null;var J=/^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*)?\)$/,Z=H.match(J);if(Z){var $=parseFloat(Z[4]),ct=(parseFloat(Z[1])%360+360)%360,ht=K(parseFloat(Z[2]),0,100),Ct=K(parseFloat(Z[3]),0,100),pt=K(isNaN($)?1:$,0,1);return[ct,ht,Ct,pt]}return null},G.to.hex=function(){var H=W(arguments);return"#"+_(H[0])+_(H[1])+_(H[2])+(H[3]<1?_(Math.round(H[3]*255)):"")},G.to.rgb=function(){var H=W(arguments);return H.length<4||H[3]===1?"rgb("+Math.round(H[0])+", "+Math.round(H[1])+", "+Math.round(H[2])+")":"rgba("+Math.round(H[0])+", "+Math.round(H[1])+", "+Math.round(H[2])+", "+H[3]+")"},G.to.rgb.percent=function(){var H=W(arguments),J=Math.round(H[0]/255*100),Z=Math.round(H[1]/255*100),$=Math.round(H[2]/255*100);return H.length<4||H[3]===1?"rgb("+J+"%, "+Z+"%, "+$+"%)":"rgba("+J+"%, "+Z+"%, "+$+"%, "+H[3]+")"},G.to.hsl=function(){var H=W(arguments);return H.length<4||H[3]===1?"hsl("+H[0]+", "+H[1]+"%, "+H[2]+"%)":"hsla("+H[0]+", "+H[1]+"%, "+H[2]+"%, "+H[3]+")"},G.to.hwb=function(){var H=W(arguments),J="";return H.length>=4&&H[3]!==1&&(J=", "+H[3]),"hwb("+H[0]+", "+H[1]+"%, "+H[2]+"%"+J+")"},G.to.keyword=function(H){return P[H.slice(0,3)]};function K(H,J,Z){return Math.min(Math.max(J,H),Z)}function _(H){var J=Math.round(H).toString(16).toUpperCase();return J.length<2?"0"+J:J}},92546:function(X,st,T){X.exports={graphlib:T(76626),layout:T(47194),debug:T(11303),util:{time:T(53063).time,notime:T(53063).notime},version:T(11897)}},81255:function(X,st,T){"use strict";var I=T(72361),W=T(39240);X.exports={run:z,undo:N};function z(G){var K=G.graph().acyclicer==="greedy"?W(G,_(G)):P(G);I.forEach(K,function(H){var J=G.edge(H);G.removeEdge(H),J.forwardName=H.name,J.reversed=!0,G.setEdge(H.w,H.v,J,I.uniqueId("rev"))});function _(H){return function(J){return H.edge(J).weight}}}function P(G){var K=[],_={},H={};function J(Z){I.has(H,Z)||(H[Z]=!0,_[Z]=!0,I.forEach(G.outEdges(Z),function($){I.has(_,$.w)?K.push($):J($.w)}),delete _[Z])}return I.forEach(G.nodes(),J),K}function N(G){I.forEach(G.edges(),function(K){var _=G.edge(K);if(_.reversed){G.removeEdge(K);var H=_.forwardName;delete _.reversed,delete _.forwardName,G.setEdge(K.w,K.v,_,H)}})}},60765:function(X,st,T){var I=T(72361),W=T(53063);X.exports=z;function z(N){function G(K){var _=N.children(K),H=N.node(K);if(_.length&&I.forEach(_,G),I.has(H,"minRank")){H.borderLeft=[],H.borderRight=[];for(var J=H.minRank,Z=H.maxRank+1;J<Z;++J)P(N,"borderLeft","_bl",K,H,J),P(N,"borderRight","_br",K,H,J)}}I.forEach(N.children(),G)}function P(N,G,K,_,H,J){var Z={width:0,height:0,rank:J,borderType:G},$=H[G][J-1],ct=W.addDummyNode(N,"border",Z,K);H[G][J]=ct,N.setParent(ct,_),$&&N.setEdge($,ct,{weight:1})}},13257:function(X,st,T){"use strict";var I=T(72361);X.exports={adjust:W,undo:z};function W(J){var Z=J.graph().rankdir.toLowerCase();(Z==="lr"||Z==="rl")&&P(J)}function z(J){var Z=J.graph().rankdir.toLowerCase();(Z==="bt"||Z==="rl")&&G(J),(Z==="lr"||Z==="rl")&&(_(J),P(J))}function P(J){I.forEach(J.nodes(),function(Z){N(J.node(Z))}),I.forEach(J.edges(),function(Z){N(J.edge(Z))})}function N(J){var Z=J.width;J.width=J.height,J.height=Z}function G(J){I.forEach(J.nodes(),function(Z){K(J.node(Z))}),I.forEach(J.edges(),function(Z){var $=J.edge(Z);I.forEach($.points,K),I.has($,"y")&&K($)})}function K(J){J.y=-J.y}function _(J){I.forEach(J.nodes(),function(Z){H(J.node(Z))}),I.forEach(J.edges(),function(Z){var $=J.edge(Z);I.forEach($.points,H),I.has($,"x")&&H($)})}function H(J){var Z=J.x;J.x=J.y,J.y=Z}},21135:function(X){X.exports=st;function st(){var W={};W._next=W._prev=W,this._sentinel=W}st.prototype.dequeue=function(){var W=this._sentinel,z=W._prev;if(z!==W)return T(z),z},st.prototype.enqueue=function(W){var z=this._sentinel;W._prev&&W._next&&T(W),W._next=z._next,z._next._prev=W,z._next=W,W._prev=z},st.prototype.toString=function(){for(var W=[],z=this._sentinel,P=z._prev;P!==z;)W.push(JSON.stringify(P,I)),P=P._prev;return"["+W.join(", ")+"]"};function T(W){W._prev._next=W._next,W._next._prev=W._prev,delete W._next,delete W._prev}function I(W,z){if(W!=="_next"&&W!=="_prev")return z}},11303:function(X,st,T){var I=T(72361),W=T(53063),z=T(76626).Graph;X.exports={debugOrdering:P};function P(N){var G=W.buildLayerMatrix(N),K=new z({compound:!0,multigraph:!0}).setGraph({});return I.forEach(N.nodes(),function(_){K.setNode(_,{label:_}),K.setParent(_,"layer"+N.node(_).rank)}),I.forEach(N.edges(),function(_){K.setEdge(_.v,_.w,{},_.name)}),I.forEach(G,function(_,H){var J="layer"+H;K.setNode(J,{rank:"same"}),I.reduce(_,function(Z,$){return K.setEdge(Z,$,{style:"invis"}),$})}),K}},76626:function(X,st,T){var I;try{I=T(75172)}catch(W){}I||(I=window.graphlib),X.exports=I},39240:function(X,st,T){var I=T(72361),W=T(76626).Graph,z=T(21135);X.exports=N;var P=I.constant(1);function N(J,Z){if(J.nodeCount()<=1)return[];var $=_(J,Z||P),ct=G($.graph,$.buckets,$.zeroIdx);return I.flatten(I.map(ct,function(ht){return J.outEdges(ht.v,ht.w)}),!0)}function G(J,Z,$){for(var ct=[],ht=Z[Z.length-1],Ct=Z[0],pt;J.nodeCount();){for(;pt=Ct.dequeue();)K(J,Z,$,pt);for(;pt=ht.dequeue();)K(J,Z,$,pt);if(J.nodeCount()){for(var ut=Z.length-2;ut>0;--ut)if(pt=Z[ut].dequeue(),pt){ct=ct.concat(K(J,Z,$,pt,!0));break}}}return ct}function K(J,Z,$,ct,ht){var Ct=ht?[]:void 0;return I.forEach(J.inEdges(ct.v),function(pt){var ut=J.edge(pt),Bt=J.node(pt.v);ht&&Ct.push({v:pt.v,w:pt.w}),Bt.out-=ut,H(Z,$,Bt)}),I.forEach(J.outEdges(ct.v),function(pt){var ut=J.edge(pt),Bt=pt.w,wt=J.node(Bt);wt.in-=ut,H(Z,$,wt)}),J.removeNode(ct.v),Ct}function _(J,Z){var $=new W,ct=0,ht=0;I.forEach(J.nodes(),function(ut){$.setNode(ut,{v:ut,in:0,out:0})}),I.forEach(J.edges(),function(ut){var Bt=$.edge(ut.v,ut.w)||0,wt=Z(ut),Tt=Bt+wt;$.setEdge(ut.v,ut.w,Tt),ht=Math.max(ht,$.node(ut.v).out+=wt),ct=Math.max(ct,$.node(ut.w).in+=wt)});var Ct=I.range(ht+ct+3).map(function(){return new z}),pt=ct+1;return I.forEach($.nodes(),function(ut){H(Ct,pt,$.node(ut))}),{graph:$,buckets:Ct,zeroIdx:pt}}function H(J,Z,$){$.out?$.in?J[$.out-$.in+Z].enqueue($):J[J.length-1].enqueue($):J[0].enqueue($)}},47194:function(X,st,T){"use strict";var I=T(72361),W=T(81255),z=T(27163),P=T(64505),N=T(53063).normalizeRanks,G=T(71970),K=T(53063).removeEmptyRanks,_=T(31733),H=T(60765),J=T(13257),Z=T(62852),$=T(93021),ct=T(53063),ht=T(76626).Graph;X.exports=Ct;function Ct(gt,Mt){var Lt=Mt&&Mt.debugTiming?ct.time:ct.notime;Lt("layout",function(){var ee=Lt(" buildLayoutGraph",function(){return Wt(gt)});Lt(" runLayout",function(){pt(ee,Lt)}),Lt(" updateInputGraph",function(){ut(gt,ee)})})}function pt(gt,Mt){Mt(" makeSpaceForEdgeLabels",function(){ie(gt)}),Mt(" removeSelfEdges",function(){As(gt)}),Mt(" acyclic",function(){W.run(gt)}),Mt(" nestingGraph.run",function(){_.run(gt)}),Mt(" rank",function(){P(ct.asNonCompoundGraph(gt))}),Mt(" injectEdgeLabelProxies",function(){ve(gt)}),Mt(" removeEmptyRanks",function(){K(gt)}),Mt(" nestingGraph.cleanup",function(){_.cleanup(gt)}),Mt(" normalizeRanks",function(){N(gt)}),Mt(" assignRankMinMax",function(){de(gt)}),Mt(" removeEdgeLabelProxies",function(){Oe(gt)}),Mt(" normalize.run",function(){z.run(gt)}),Mt(" parentDummyChains",function(){G(gt)}),Mt(" addBorderSegments",function(){H(gt)}),Mt(" order",function(){Z(gt)}),Mt(" insertSelfEdges",function(){ho(gt)}),Mt(" adjustCoordinateSystem",function(){J.adjust(gt)}),Mt(" position",function(){$(gt)}),Mt(" positionSelfEdges",function(){Pt(gt)}),Mt(" removeBorderNodes",function(){ji(gt)}),Mt(" normalize.undo",function(){z.undo(gt)}),Mt(" fixupEdgeLabelCoords",function(){Xn(gt)}),Mt(" undoCoordinateSystem",function(){J.undo(gt)}),Mt(" translateGraph",function(){sn(gt)}),Mt(" assignNodeIntersects",function(){dn(gt)}),Mt(" reversePoints",function(){Jr(gt)}),Mt(" acyclic.undo",function(){W.undo(gt)})}function ut(gt,Mt){I.forEach(gt.nodes(),function(Lt){var ee=gt.node(Lt),be=Mt.node(Lt);ee&&(ee.x=be.x,ee.y=be.y,Mt.children(Lt).length&&(ee.width=be.width,ee.height=be.height))}),I.forEach(gt.edges(),function(Lt){var ee=gt.edge(Lt),be=Mt.edge(Lt);ee.points=be.points,I.has(be,"x")&&(ee.x=be.x,ee.y=be.y)}),gt.graph().width=Mt.graph().width,gt.graph().height=Mt.graph().height}var Bt=["nodesep","edgesep","ranksep","marginx","marginy"],wt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Tt=["acyclicer","ranker","rankdir","align"],kt=["width","height"],_t={width:0,height:0},Ot=["minlen","weight","width","height","labeloffset"],Gt={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ae=["labelpos"];function Wt(gt){var Mt=new ht({multigraph:!0,compound:!0}),Lt=jt(gt.graph());return Mt.setGraph(I.merge({},wt,zt(Lt,Bt),I.pick(Lt,Tt))),I.forEach(gt.nodes(),function(ee){var be=jt(gt.node(ee));Mt.setNode(ee,I.defaults(zt(be,kt),_t)),Mt.setParent(ee,gt.parent(ee))}),I.forEach(gt.edges(),function(ee){var be=jt(gt.edge(ee));Mt.setEdge(ee,I.merge({},Gt,zt(be,Ot),I.pick(be,ae)))}),Mt}function ie(gt){var Mt=gt.graph();Mt.ranksep/=2,I.forEach(gt.edges(),function(Lt){var ee=gt.edge(Lt);ee.minlen*=2,ee.labelpos.toLowerCase()!=="c"&&(Mt.rankdir==="TB"||Mt.rankdir==="BT"?ee.width+=ee.labeloffset:ee.height+=ee.labeloffset)})}function ve(gt){I.forEach(gt.edges(),function(Mt){var Lt=gt.edge(Mt);if(Lt.width&&Lt.height){var ee=gt.node(Mt.v),be=gt.node(Mt.w),_e={rank:(be.rank-ee.rank)/2+ee.rank,e:Mt};ct.addDummyNode(gt,"edge-proxy",_e,"_ep")}})}function de(gt){var Mt=0;I.forEach(gt.nodes(),function(Lt){var ee=gt.node(Lt);ee.borderTop&&(ee.minRank=gt.node(ee.borderTop).rank,ee.maxRank=gt.node(ee.borderBottom).rank,Mt=I.max(Mt,ee.maxRank))}),gt.graph().maxRank=Mt}function Oe(gt){I.forEach(gt.nodes(),function(Mt){var Lt=gt.node(Mt);Lt.dummy==="edge-proxy"&&(gt.edge(Lt.e).labelRank=Lt.rank,gt.removeNode(Mt))})}function sn(gt){var Mt=Number.POSITIVE_INFINITY,Lt=0,ee=Number.POSITIVE_INFINITY,be=0,_e=gt.graph(),Me=_e.marginx||0,nn=_e.marginy||0;function rr(or){var Ge=or.x,ze=or.y,me=or.width,Ve=or.height;Mt=Math.min(Mt,Ge-me/2),Lt=Math.max(Lt,Ge+me/2),ee=Math.min(ee,ze-Ve/2),be=Math.max(be,ze+Ve/2)}I.forEach(gt.nodes(),function(or){rr(gt.node(or))}),I.forEach(gt.edges(),function(or){var Ge=gt.edge(or);I.has(Ge,"x")&&rr(Ge)}),Mt-=Me,ee-=nn,I.forEach(gt.nodes(),function(or){var Ge=gt.node(or);Ge.x-=Mt,Ge.y-=ee}),I.forEach(gt.edges(),function(or){var Ge=gt.edge(or);I.forEach(Ge.points,function(ze){ze.x-=Mt,ze.y-=ee}),I.has(Ge,"x")&&(Ge.x-=Mt),I.has(Ge,"y")&&(Ge.y-=ee)}),_e.width=Lt-Mt+Me,_e.height=be-ee+nn}function dn(gt){I.forEach(gt.edges(),function(Mt){var Lt=gt.edge(Mt),ee=gt.node(Mt.v),be=gt.node(Mt.w),_e,Me;Lt.points?(_e=Lt.points[0],Me=Lt.points[Lt.points.length-1]):(Lt.points=[],_e=be,Me=ee),Lt.points.unshift(ct.intersectRect(ee,_e)),Lt.points.push(ct.intersectRect(be,Me))})}function Xn(gt){I.forEach(gt.edges(),function(Mt){var Lt=gt.edge(Mt);if(I.has(Lt,"x"))switch((Lt.labelpos==="l"||Lt.labelpos==="r")&&(Lt.width-=Lt.labeloffset),Lt.labelpos){case"l":Lt.x-=Lt.width/2+Lt.labeloffset;break;case"r":Lt.x+=Lt.width/2+Lt.labeloffset;break}})}function Jr(gt){I.forEach(gt.edges(),function(Mt){var Lt=gt.edge(Mt);Lt.reversed&&Lt.points.reverse()})}function ji(gt){I.forEach(gt.nodes(),function(Mt){if(gt.children(Mt).length){var Lt=gt.node(Mt),ee=gt.node(Lt.borderTop),be=gt.node(Lt.borderBottom),_e=gt.node(I.last(Lt.borderLeft)),Me=gt.node(I.last(Lt.borderRight));Lt.width=Math.abs(Me.x-_e.x),Lt.height=Math.abs(be.y-ee.y),Lt.x=_e.x+Lt.width/2,Lt.y=ee.y+Lt.height/2}}),I.forEach(gt.nodes(),function(Mt){gt.node(Mt).dummy==="border"&>.removeNode(Mt)})}function As(gt){I.forEach(gt.edges(),function(Mt){if(Mt.v===Mt.w){var Lt=gt.node(Mt.v);Lt.selfEdges||(Lt.selfEdges=[]),Lt.selfEdges.push({e:Mt,label:gt.edge(Mt)}),gt.removeEdge(Mt)}})}function ho(gt){var Mt=ct.buildLayerMatrix(gt);I.forEach(Mt,function(Lt){var ee=0;I.forEach(Lt,function(be,_e){var Me=gt.node(be);Me.order=_e+ee,I.forEach(Me.selfEdges,function(nn){ct.addDummyNode(gt,"selfedge",{width:nn.label.width,height:nn.label.height,rank:Me.rank,order:_e+ ++ee,e:nn.e,label:nn.label},"_se")}),delete Me.selfEdges})})}function Pt(gt){I.forEach(gt.nodes(),function(Mt){var Lt=gt.node(Mt);if(Lt.dummy==="selfedge"){var ee=gt.node(Lt.e.v),be=ee.x+ee.width/2,_e=ee.y,Me=Lt.x-be,nn=ee.height/2;gt.setEdge(Lt.e,Lt.label),gt.removeNode(Mt),Lt.label.points=[{x:be+2*Me/3,y:_e-nn},{x:be+5*Me/6,y:_e-nn},{x:be+Me,y:_e},{x:be+5*Me/6,y:_e+nn},{x:be+2*Me/3,y:_e+nn}],Lt.label.x=Lt.x,Lt.label.y=Lt.y}})}function zt(gt,Mt){return I.mapValues(I.pick(gt,Mt),Number)}function jt(gt){var Mt={};return I.forEach(gt,function(Lt,ee){Mt[ee.toLowerCase()]=Lt}),Mt}},72361:function(X,st,T){var I;try{I={cloneDeep:T(44187),constant:T(46221),defaults:T(34981),each:T(61475),filter:T(3130),find:T(48835),flatten:T(1332),forEach:T(47177),forIn:T(59946),has:T(64760),isUndefined:T(68408),last:T(47522),map:T(81426),mapValues:T(60032),max:T(18038),merge:T(55056),min:T(60169),minBy:T(13604),now:T(76308),pick:T(72333),range:T(69235),reduce:T(9695),sortBy:T(35020),uniqueId:T(69624),values:T(72834),zipObject:T(79261)}}catch(W){}I||(I=window._),X.exports=I},31733:function(X,st,T){var I=T(72361),W=T(53063);X.exports={run:z,cleanup:K};function z(_){var H=W.addDummyNode(_,"root",{},"_root"),J=N(_),Z=I.max(I.values(J))-1,$=2*Z+1;_.graph().nestingRoot=H,I.forEach(_.edges(),function(ht){_.edge(ht).minlen*=$});var ct=G(_)+1;I.forEach(_.children(),function(ht){P(_,H,$,ct,Z,J,ht)}),_.graph().nodeRankFactor=$}function P(_,H,J,Z,$,ct,ht){var Ct=_.children(ht);if(!Ct.length){ht!==H&&_.setEdge(H,ht,{weight:0,minlen:J});return}var pt=W.addBorderNode(_,"_bt"),ut=W.addBorderNode(_,"_bb"),Bt=_.node(ht);_.setParent(pt,ht),Bt.borderTop=pt,_.setParent(ut,ht),Bt.borderBottom=ut,I.forEach(Ct,function(wt){P(_,H,J,Z,$,ct,wt);var Tt=_.node(wt),kt=Tt.borderTop?Tt.borderTop:wt,_t=Tt.borderBottom?Tt.borderBottom:wt,Ot=Tt.borderTop?Z:2*Z,Gt=kt!==_t?1:$-ct[ht]+1;_.setEdge(pt,kt,{weight:Ot,minlen:Gt,nestingEdge:!0}),_.setEdge(_t,ut,{weight:Ot,minlen:Gt,nestingEdge:!0})}),_.parent(ht)||_.setEdge(H,pt,{weight:0,minlen:$+ct[ht]})}function N(_){var H={};function J(Z,$){var ct=_.children(Z);ct&&ct.length&&I.forEach(ct,function(ht){J(ht,$+1)}),H[Z]=$}return I.forEach(_.children(),function(Z){J(Z,1)}),H}function G(_){return I.reduce(_.edges(),function(H,J){return H+_.edge(J).weight},0)}function K(_){var H=_.graph();_.removeNode(H.nestingRoot),delete H.nestingRoot,I.forEach(_.edges(),function(J){var Z=_.edge(J);Z.nestingEdge&&_.removeEdge(J)})}},27163:function(X,st,T){"use strict";var I=T(72361),W=T(53063);X.exports={run:z,undo:N};function z(G){G.graph().dummyChains=[],I.forEach(G.edges(),function(K){P(G,K)})}function P(G,K){var _=K.v,H=G.node(_).rank,J=K.w,Z=G.node(J).rank,$=K.name,ct=G.edge(K),ht=ct.labelRank;if(Z!==H+1){G.removeEdge(K);var Ct,pt,ut;for(ut=0,++H;H<Z;++ut,++H)ct.points=[],pt={width:0,height:0,edgeLabel:ct,edgeObj:K,rank:H},Ct=W.addDummyNode(G,"edge",pt,"_d"),H===ht&&(pt.width=ct.width,pt.height=ct.height,pt.dummy="edge-label",pt.labelpos=ct.labelpos),G.setEdge(_,Ct,{weight:ct.weight},$),ut===0&&G.graph().dummyChains.push(Ct),_=Ct;G.setEdge(_,J,{weight:ct.weight},$)}}function N(G){I.forEach(G.graph().dummyChains,function(K){var _=G.node(K),H=_.edgeLabel,J;for(G.setEdge(_.edgeObj,H);_.dummy;)J=G.successors(K)[0],G.removeNode(K),H.points.push({x:_.x,y:_.y}),_.dummy==="edge-label"&&(H.x=_.x,H.y=_.y,H.width=_.width,H.height=_.height),K=J,_=G.node(K)})}},52205:function(X,st,T){var I=T(72361);X.exports=W;function W(z,P,N){var G={},K;I.forEach(N,function(_){for(var H=z.parent(_),J,Z;H;){if(J=z.parent(H),J?(Z=G[J],G[J]=H):(Z=K,K=H),Z&&Z!==H){P.setEdge(Z,H);return}H=J}})}},99506:function(X,st,T){var I=T(72361);X.exports=W;function W(z,P){return I.map(P,function(N){var G=z.inEdges(N);if(G.length){var K=I.reduce(G,function(_,H){var J=z.edge(H),Z=z.node(H.v);return{sum:_.sum+J.weight*Z.order,weight:_.weight+J.weight}},{sum:0,weight:0});return{v:N,barycenter:K.sum/K.weight,weight:K.weight}}else return{v:N}})}},59105:function(X,st,T){var I=T(72361),W=T(76626).Graph;X.exports=z;function z(N,G,K){var _=P(N),H=new W({compound:!0}).setGraph({root:_}).setDefaultNodeLabel(function(J){return N.node(J)});return I.forEach(N.nodes(),function(J){var Z=N.node(J),$=N.parent(J);(Z.rank===G||Z.minRank<=G&&G<=Z.maxRank)&&(H.setNode(J),H.setParent(J,$||_),I.forEach(N[K](J),function(ct){var ht=ct.v===J?ct.w:ct.v,Ct=H.edge(ht,J),pt=I.isUndefined(Ct)?0:Ct.weight;H.setEdge(ht,J,{weight:N.edge(ct).weight+pt})}),I.has(Z,"minRank")&&H.setNode(J,{borderLeft:Z.borderLeft[G],borderRight:Z.borderRight[G]}))}),H}function P(N){for(var G;N.hasNode(G=I.uniqueId("_root")););return G}},45456:function(X,st,T){"use strict";var I=T(72361);X.exports=W;function W(P,N){for(var G=0,K=1;K<N.length;++K)G+=z(P,N[K-1],N[K]);return G}function z(P,N,G){for(var K=I.zipObject(G,I.map(G,function(ct,ht){return ht})),_=I.flatten(I.map(N,function(ct){return I.sortBy(I.map(P.outEdges(ct),function(ht){return{pos:K[ht.w],weight:P.edge(ht).weight}}),"pos")}),!0),H=1;H<G.length;)H<<=1;var J=2*H-1;H-=1;var Z=I.map(new Array(J),function(){return 0}),$=0;return I.forEach(_.forEach(function(ct){var ht=ct.pos+H;Z[ht]+=ct.weight;for(var Ct=0;ht>0;)ht%2&&(Ct+=Z[ht+1]),ht=ht-1>>1,Z[ht]+=ct.weight;$+=ct.weight*Ct})),$}},62852:function(X,st,T){"use strict";var I=T(72361),W=T(18043),z=T(45456),P=T(86490),N=T(59105),G=T(52205),K=T(76626).Graph,_=T(53063);X.exports=H;function H(ct){var ht=_.maxRank(ct),Ct=J(ct,I.range(1,ht+1),"inEdges"),pt=J(ct,I.range(ht-1,-1,-1),"outEdges"),ut=W(ct);$(ct,ut);for(var Bt=Number.POSITIVE_INFINITY,wt,Tt=0,kt=0;kt<4;++Tt,++kt){Z(Tt%2?Ct:pt,Tt%4>=2),ut=_.buildLayerMatrix(ct);var _t=z(ct,ut);_t<Bt&&(kt=0,wt=I.cloneDeep(ut),Bt=_t)}$(ct,wt)}function J(ct,ht,Ct){return I.map(ht,function(pt){return N(ct,pt,Ct)})}function Z(ct,ht){var Ct=new K;I.forEach(ct,function(pt){var ut=pt.graph().root,Bt=P(pt,ut,Ct,ht);I.forEach(Bt.vs,function(wt,Tt){pt.node(wt).order=Tt}),G(pt,Ct,Bt.vs)})}function $(ct,ht){I.forEach(ht,function(Ct){I.forEach(Ct,function(pt,ut){ct.node(pt).order=ut})})}},18043:function(X,st,T){"use strict";var I=T(72361);X.exports=W;function W(z){var P={},N=I.filter(z.nodes(),function(J){return!z.children(J).length}),G=I.max(I.map(N,function(J){return z.node(J).rank})),K=I.map(I.range(G+1),function(){return[]});function _(J){if(!I.has(P,J)){P[J]=!0;var Z=z.node(J);K[Z.rank].push(J),I.forEach(z.successors(J),_)}}var H=I.sortBy(N,function(J){return z.node(J).rank});return I.forEach(H,_),K}},45926:function(X,st,T){"use strict";var I=T(72361);X.exports=W;function W(N,G){var K={};I.forEach(N,function(H,J){var Z=K[H.v]={indegree:0,in:[],out:[],vs:[H.v],i:J};I.isUndefined(H.barycenter)||(Z.barycenter=H.barycenter,Z.weight=H.weight)}),I.forEach(G.edges(),function(H){var J=K[H.v],Z=K[H.w];!I.isUndefined(J)&&!I.isUndefined(Z)&&(Z.indegree++,J.out.push(K[H.w]))});var _=I.filter(K,function(H){return!H.indegree});return z(_)}function z(N){var G=[];function K(J){return function(Z){Z.merged||(I.isUndefined(Z.barycenter)||I.isUndefined(J.barycenter)||Z.barycenter>=J.barycenter)&&P(J,Z)}}function _(J){return function(Z){Z.in.push(J),--Z.indegree===0&&N.push(Z)}}for(;N.length;){var H=N.pop();G.push(H),I.forEach(H.in.reverse(),K(H)),I.forEach(H.out,_(H))}return I.map(I.filter(G,function(J){return!J.merged}),function(J){return I.pick(J,["vs","i","barycenter","weight"])})}function P(N,G){var K=0,_=0;N.weight&&(K+=N.barycenter*N.weight,_+=N.weight),G.weight&&(K+=G.barycenter*G.weight,_+=G.weight),N.vs=G.vs.concat(N.vs),N.barycenter=K/_,N.weight=_,N.i=Math.min(G.i,N.i),G.merged=!0}},86490:function(X,st,T){var I=T(72361),W=T(99506),z=T(45926),P=T(1349);X.exports=N;function N(_,H,J,Z){var $=_.children(H),ct=_.node(H),ht=ct?ct.borderLeft:void 0,Ct=ct?ct.borderRight:void 0,pt={};ht&&($=I.filter($,function(_t){return _t!==ht&&_t!==Ct}));var ut=W(_,$);I.forEach(ut,function(_t){if(_.children(_t.v).length){var Ot=N(_,_t.v,J,Z);pt[_t.v]=Ot,I.has(Ot,"barycenter")&&K(_t,Ot)}});var Bt=z(ut,J);G(Bt,pt);var wt=P(Bt,Z);if(ht&&(wt.vs=I.flatten([ht,wt.vs,Ct],!0),_.predecessors(ht).length)){var Tt=_.node(_.predecessors(ht)[0]),kt=_.node(_.predecessors(Ct)[0]);I.has(wt,"barycenter")||(wt.barycenter=0,wt.weight=0),wt.barycenter=(wt.barycenter*wt.weight+Tt.order+kt.order)/(wt.weight+2),wt.weight+=2}return wt}function G(_,H){I.forEach(_,function(J){J.vs=I.flatten(J.vs.map(function(Z){return H[Z]?H[Z].vs:Z}),!0)})}function K(_,H){I.isUndefined(_.barycenter)?(_.barycenter=H.barycenter,_.weight=H.weight):(_.barycenter=(_.barycenter*_.weight+H.barycenter*H.weight)/(_.weight+H.weight),_.weight+=H.weight)}},1349:function(X,st,T){var I=T(72361),W=T(53063);X.exports=z;function z(G,K){var _=W.partition(G,function(pt){return I.has(pt,"barycenter")}),H=_.lhs,J=I.sortBy(_.rhs,function(pt){return-pt.i}),Z=[],$=0,ct=0,ht=0;H.sort(N(!!K)),ht=P(Z,J,ht),I.forEach(H,function(pt){ht+=pt.vs.length,Z.push(pt.vs),$+=pt.barycenter*pt.weight,ct+=pt.weight,ht=P(Z,J,ht)});var Ct={vs:I.flatten(Z,!0)};return ct&&(Ct.barycenter=$/ct,Ct.weight=ct),Ct}function P(G,K,_){for(var H;K.length&&(H=I.last(K)).i<=_;)K.pop(),G.push(H.vs),_++;return _}function N(G){return function(K,_){return K.barycenter<_.barycenter?-1:K.barycenter>_.barycenter?1:G?_.i-K.i:K.i-_.i}}},71970:function(X,st,T){var I=T(72361);X.exports=W;function W(N){var G=P(N);I.forEach(N.graph().dummyChains,function(K){for(var _=N.node(K),H=_.edgeObj,J=z(N,G,H.v,H.w),Z=J.path,$=J.lca,ct=0,ht=Z[ct],Ct=!0;K!==H.w;){if(_=N.node(K),Ct){for(;(ht=Z[ct])!==$&&N.node(ht).maxRank<_.rank;)ct++;ht===$&&(Ct=!1)}if(!Ct){for(;ct<Z.length-1&&N.node(ht=Z[ct+1]).minRank<=_.rank;)ct++;ht=Z[ct]}N.setParent(K,ht),K=N.successors(K)[0]}})}function z(N,G,K,_){var H=[],J=[],Z=Math.min(G[K].low,G[_].low),$=Math.max(G[K].lim,G[_].lim),ct,ht;ct=K;do ct=N.parent(ct),H.push(ct);while(ct&&(G[ct].low>Z||$>G[ct].lim));for(ht=ct,ct=_;(ct=N.parent(ct))!==ht;)J.push(ct);return{path:H.concat(J.reverse()),lca:ht}}function P(N){var G={},K=0;function _(H){var J=K;I.forEach(N.children(H),_),G[H]={low:J,lim:K++}}return I.forEach(N.children(),_),G}},92080:function(X,st,T){"use strict";var I=T(72361),W=T(76626).Graph,z=T(53063);X.exports={positionX:Ct,findType1Conflicts:P,findType2Conflicts:N,addConflict:K,hasConflict:_,verticalAlignment:H,horizontalCompaction:J,alignCoordinates:ct,findSmallestWidthAlignment:$,balance:ht};function P(Bt,wt){var Tt={};function kt(_t,Ot){var Gt=0,ae=0,Wt=_t.length,ie=I.last(Ot);return I.forEach(Ot,function(ve,de){var Oe=G(Bt,ve),sn=Oe?Bt.node(Oe).order:Wt;(Oe||ve===ie)&&(I.forEach(Ot.slice(ae,de+1),function(dn){I.forEach(Bt.predecessors(dn),function(Xn){var Jr=Bt.node(Xn),ji=Jr.order;(ji<Gt||sn<ji)&&!(Jr.dummy&&Bt.node(dn).dummy)&&K(Tt,Xn,dn)})}),ae=de+1,Gt=sn)}),Ot}return I.reduce(wt,kt),Tt}function N(Bt,wt){var Tt={};function kt(Ot,Gt,ae,Wt,ie){var ve;I.forEach(I.range(Gt,ae),function(de){ve=Ot[de],Bt.node(ve).dummy&&I.forEach(Bt.predecessors(ve),function(Oe){var sn=Bt.node(Oe);sn.dummy&&(sn.order<Wt||sn.order>ie)&&K(Tt,Oe,ve)})})}function _t(Ot,Gt){var ae=-1,Wt,ie=0;return I.forEach(Gt,function(ve,de){if(Bt.node(ve).dummy==="border"){var Oe=Bt.predecessors(ve);Oe.length&&(Wt=Bt.node(Oe[0]).order,kt(Gt,ie,de,ae,Wt),ie=de,ae=Wt)}kt(Gt,ie,Gt.length,Wt,Ot.length)}),Gt}return I.reduce(wt,_t),Tt}function G(Bt,wt){if(Bt.node(wt).dummy)return I.find(Bt.predecessors(wt),function(Tt){return Bt.node(Tt).dummy})}function K(Bt,wt,Tt){if(wt>Tt){var kt=wt;wt=Tt,Tt=kt}var _t=Bt[wt];_t||(Bt[wt]=_t={}),_t[Tt]=!0}function _(Bt,wt,Tt){if(wt>Tt){var kt=wt;wt=Tt,Tt=kt}return I.has(Bt[wt],Tt)}function H(Bt,wt,Tt,kt){var _t={},Ot={},Gt={};return I.forEach(wt,function(ae){I.forEach(ae,function(Wt,ie){_t[Wt]=Wt,Ot[Wt]=Wt,Gt[Wt]=ie})}),I.forEach(wt,function(ae){var Wt=-1;I.forEach(ae,function(ie){var ve=kt(ie);if(ve.length){ve=I.sortBy(ve,function(Xn){return Gt[Xn]});for(var de=(ve.length-1)/2,Oe=Math.floor(de),sn=Math.ceil(de);Oe<=sn;++Oe){var dn=ve[Oe];Ot[ie]===ie&&Wt<Gt[dn]&&!_(Tt,ie,dn)&&(Ot[dn]=ie,Ot[ie]=_t[ie]=_t[dn],Wt=Gt[dn])}}})}),{root:_t,align:Ot}}function J(Bt,wt,Tt,kt,_t){var Ot={},Gt=Z(Bt,wt,Tt,_t),ae=_t?"borderLeft":"borderRight";function Wt(de,Oe){for(var sn=Gt.nodes(),dn=sn.pop(),Xn={};dn;)Xn[dn]?de(dn):(Xn[dn]=!0,sn.push(dn),sn=sn.concat(Oe(dn))),dn=sn.pop()}function ie(de){Ot[de]=Gt.inEdges(de).reduce(function(Oe,sn){return Math.max(Oe,Ot[sn.v]+Gt.edge(sn))},0)}function ve(de){var Oe=Gt.outEdges(de).reduce(function(dn,Xn){return Math.min(dn,Ot[Xn.w]-Gt.edge(Xn))},Number.POSITIVE_INFINITY),sn=Bt.node(de);Oe!==Number.POSITIVE_INFINITY&&sn.borderType!==ae&&(Ot[de]=Math.max(Ot[de],Oe))}return Wt(ie,Gt.predecessors.bind(Gt)),Wt(ve,Gt.successors.bind(Gt)),I.forEach(kt,function(de){Ot[de]=Ot[Tt[de]]}),Ot}function Z(Bt,wt,Tt,kt){var _t=new W,Ot=Bt.graph(),Gt=pt(Ot.nodesep,Ot.edgesep,kt);return I.forEach(wt,function(ae){var Wt;I.forEach(ae,function(ie){var ve=Tt[ie];if(_t.setNode(ve),Wt){var de=Tt[Wt],Oe=_t.edge(de,ve);_t.setEdge(de,ve,Math.max(Gt(Bt,ie,Wt),Oe||0))}Wt=ie})}),_t}function $(Bt,wt){return I.minBy(I.values(wt),function(Tt){var kt=Number.NEGATIVE_INFINITY,_t=Number.POSITIVE_INFINITY;return I.forIn(Tt,function(Ot,Gt){var ae=ut(Bt,Gt)/2;kt=Math.max(Ot+ae,kt),_t=Math.min(Ot-ae,_t)}),kt-_t})}function ct(Bt,wt){var Tt=I.values(wt),kt=I.min(Tt),_t=I.max(Tt);I.forEach(["u","d"],function(Ot){I.forEach(["l","r"],function(Gt){var ae=Ot+Gt,Wt=Bt[ae],ie;if(Wt!==wt){var ve=I.values(Wt);ie=Gt==="l"?kt-I.min(ve):_t-I.max(ve),ie&&(Bt[ae]=I.mapValues(Wt,function(de){return de+ie}))}})})}function ht(Bt,wt){return I.mapValues(Bt.ul,function(Tt,kt){if(wt)return Bt[wt.toLowerCase()][kt];var _t=I.sortBy(I.map(Bt,kt));return(_t[1]+_t[2])/2})}function Ct(Bt){var wt=z.buildLayerMatrix(Bt),Tt=I.merge(P(Bt,wt),N(Bt,wt)),kt={},_t;I.forEach(["u","d"],function(Gt){_t=Gt==="u"?wt:I.values(wt).reverse(),I.forEach(["l","r"],function(ae){ae==="r"&&(_t=I.map(_t,function(de){return I.values(de).reverse()}));var Wt=(Gt==="u"?Bt.predecessors:Bt.successors).bind(Bt),ie=H(Bt,_t,Tt,Wt),ve=J(Bt,_t,ie.root,ie.align,ae==="r");ae==="r"&&(ve=I.mapValues(ve,function(de){return-de})),kt[Gt+ae]=ve})});var Ot=$(Bt,kt);return ct(kt,Ot),ht(kt,Bt.graph().align)}function pt(Bt,wt,Tt){return function(kt,_t,Ot){var Gt=kt.node(_t),ae=kt.node(Ot),Wt=0,ie;if(Wt+=Gt.width/2,I.has(Gt,"labelpos"))switch(Gt.labelpos.toLowerCase()){case"l":ie=-Gt.width/2;break;case"r":ie=Gt.width/2;break}if(ie&&(Wt+=Tt?ie:-ie),ie=0,Wt+=(Gt.dummy?wt:Bt)/2,Wt+=(ae.dummy?wt:Bt)/2,Wt+=ae.width/2,I.has(ae,"labelpos"))switch(ae.labelpos.toLowerCase()){case"l":ie=ae.width/2;break;case"r":ie=-ae.width/2;break}return ie&&(Wt+=Tt?ie:-ie),ie=0,Wt}}function ut(Bt,wt){return Bt.node(wt).width}},93021:function(X,st,T){"use strict";var I=T(72361),W=T(53063),z=T(92080).positionX;X.exports=P;function P(G){G=W.asNonCompoundGraph(G),N(G),I.forEach(z(G),function(K,_){G.node(_).x=K})}function N(G){var K=W.buildLayerMatrix(G),_=G.graph().ranksep,H=0;I.forEach(K,function(J){var Z=I.max(I.map(J,function($){return G.node($).height}));I.forEach(J,function($){G.node($).y=H+Z/2}),H+=Z+_})}},61031:function(X,st,T){"use strict";var I=T(72361),W=T(76626).Graph,z=T(2416).slack;X.exports=P;function P(_){var H=new W({directed:!1}),J=_.nodes()[0],Z=_.nodeCount();H.setNode(J,{});for(var $,ct;N(H,_)<Z;)$=G(H,_),ct=H.hasNode($.v)?z(_,$):-z(_,$),K(H,_,ct);return H}function N(_,H){function J(Z){I.forEach(H.nodeEdges(Z),function($){var ct=$.v,ht=Z===ct?$.w:ct;!_.hasNode(ht)&&!z(H,$)&&(_.setNode(ht,{}),_.setEdge(Z,ht,{}),J(ht))})}return I.forEach(_.nodes(),J),_.nodeCount()}function G(_,H){return I.minBy(H.edges(),function(J){if(_.hasNode(J.v)!==_.hasNode(J.w))return z(H,J)})}function K(_,H,J){I.forEach(_.nodes(),function(Z){H.node(Z).rank+=J})}},64505:function(X,st,T){"use strict";var I=T(2416),W=I.longestPath,z=T(61031),P=T(77076);X.exports=N;function N(H){switch(H.graph().ranker){case"network-simplex":_(H);break;case"tight-tree":K(H);break;case"longest-path":G(H);break;default:_(H)}}var G=W;function K(H){W(H),z(H)}function _(H){P(H)}},77076:function(X,st,T){"use strict";var I=T(72361),W=T(61031),z=T(2416).slack,P=T(2416).longestPath,N=T(76626).alg.preorder,G=T(76626).alg.postorder,K=T(53063).simplify;X.exports=_,_.initLowLimValues=$,_.initCutValues=H,_.calcCutValue=Z,_.leaveEdge=ht,_.enterEdge=Ct,_.exchangeEdges=pt;function _(Tt){Tt=K(Tt),P(Tt);var kt=W(Tt);$(kt),H(kt,Tt);for(var _t,Ot;_t=ht(kt);)Ot=Ct(kt,Tt,_t),pt(kt,Tt,_t,Ot)}function H(Tt,kt){var _t=G(Tt,Tt.nodes());_t=_t.slice(0,_t.length-1),I.forEach(_t,function(Ot){J(Tt,kt,Ot)})}function J(Tt,kt,_t){var Ot=Tt.node(_t),Gt=Ot.parent;Tt.edge(_t,Gt).cutvalue=Z(Tt,kt,_t)}function Z(Tt,kt,_t){var Ot=Tt.node(_t),Gt=Ot.parent,ae=!0,Wt=kt.edge(_t,Gt),ie=0;return Wt||(ae=!1,Wt=kt.edge(Gt,_t)),ie=Wt.weight,I.forEach(kt.nodeEdges(_t),function(ve){var de=ve.v===_t,Oe=de?ve.w:ve.v;if(Oe!==Gt){var sn=de===ae,dn=kt.edge(ve).weight;if(ie+=sn?dn:-dn,Bt(Tt,_t,Oe)){var Xn=Tt.edge(_t,Oe).cutvalue;ie+=sn?-Xn:Xn}}}),ie}function $(Tt,kt){arguments.length<2&&(kt=Tt.nodes()[0]),ct(Tt,{},1,kt)}function ct(Tt,kt,_t,Ot,Gt){var ae=_t,Wt=Tt.node(Ot);return kt[Ot]=!0,I.forEach(Tt.neighbors(Ot),function(ie){I.has(kt,ie)||(_t=ct(Tt,kt,_t,ie,Ot))}),Wt.low=ae,Wt.lim=_t++,Gt?Wt.parent=Gt:delete Wt.parent,_t}function ht(Tt){return I.find(Tt.edges(),function(kt){return Tt.edge(kt).cutvalue<0})}function Ct(Tt,kt,_t){var Ot=_t.v,Gt=_t.w;kt.hasEdge(Ot,Gt)||(Ot=_t.w,Gt=_t.v);var ae=Tt.node(Ot),Wt=Tt.node(Gt),ie=ae,ve=!1;ae.lim>Wt.lim&&(ie=Wt,ve=!0);var de=I.filter(kt.edges(),function(Oe){return ve===wt(Tt,Tt.node(Oe.v),ie)&&ve!==wt(Tt,Tt.node(Oe.w),ie)});return I.minBy(de,function(Oe){return z(kt,Oe)})}function pt(Tt,kt,_t,Ot){var Gt=_t.v,ae=_t.w;Tt.removeEdge(Gt,ae),Tt.setEdge(Ot.v,Ot.w,{}),$(Tt),H(Tt,kt),ut(Tt,kt)}function ut(Tt,kt){var _t=I.find(Tt.nodes(),function(Gt){return!kt.node(Gt).parent}),Ot=N(Tt,_t);Ot=Ot.slice(1),I.forEach(Ot,function(Gt){var ae=Tt.node(Gt).parent,Wt=kt.edge(Gt,ae),ie=!1;Wt||(Wt=kt.edge(ae,Gt),ie=!0),kt.node(Gt).rank=kt.node(ae).rank+(ie?Wt.minlen:-Wt.minlen)})}function Bt(Tt,kt,_t){return Tt.hasEdge(kt,_t)}function wt(Tt,kt,_t){return _t.low<=kt.lim&&kt.lim<=_t.lim}},2416:function(X,st,T){"use strict";var I=T(72361);X.exports={longestPath:W,slack:z};function W(P){var N={};function G(K){var _=P.node(K);if(I.has(N,K))return _.rank;N[K]=!0;var H=I.min(I.map(P.outEdges(K),function(J){return G(J.w)-P.edge(J).minlen}));return(H===Number.POSITIVE_INFINITY||H===void 0||H===null)&&(H=0),_.rank=H}I.forEach(P.sources(),G)}function z(P,N){return P.node(N.w).rank-P.node(N.v).rank-P.edge(N).minlen}},53063:function(X,st,T){"use strict";var I=T(72361),W=T(76626).Graph;X.exports={addDummyNode:z,simplify:P,asNonCompoundGraph:N,successorWeights:G,predecessorWeights:K,intersectRect:_,buildLayerMatrix:H,normalizeRanks:J,removeEmptyRanks:Z,addBorderNode:$,maxRank:ct,partition:ht,time:Ct,notime:pt};function z(ut,Bt,wt,Tt){var kt;do kt=I.uniqueId(Tt);while(ut.hasNode(kt));return wt.dummy=Bt,ut.setNode(kt,wt),kt}function P(ut){var Bt=new W().setGraph(ut.graph());return I.forEach(ut.nodes(),function(wt){Bt.setNode(wt,ut.node(wt))}),I.forEach(ut.edges(),function(wt){var Tt=Bt.edge(wt.v,wt.w)||{weight:0,minlen:1},kt=ut.edge(wt);Bt.setEdge(wt.v,wt.w,{weight:Tt.weight+kt.weight,minlen:Math.max(Tt.minlen,kt.minlen)})}),Bt}function N(ut){var Bt=new W({multigraph:ut.isMultigraph()}).setGraph(ut.graph());return I.forEach(ut.nodes(),function(wt){ut.children(wt).length||Bt.setNode(wt,ut.node(wt))}),I.forEach(ut.edges(),function(wt){Bt.setEdge(wt,ut.edge(wt))}),Bt}function G(ut){var Bt=I.map(ut.nodes(),function(wt){var Tt={};return I.forEach(ut.outEdges(wt),function(kt){Tt[kt.w]=(Tt[kt.w]||0)+ut.edge(kt).weight}),Tt});return I.zipObject(ut.nodes(),Bt)}function K(ut){var Bt=I.map(ut.nodes(),function(wt){var Tt={};return I.forEach(ut.inEdges(wt),function(kt){Tt[kt.v]=(Tt[kt.v]||0)+ut.edge(kt).weight}),Tt});return I.zipObject(ut.nodes(),Bt)}function _(ut,Bt){var wt=ut.x,Tt=ut.y,kt=Bt.x-wt,_t=Bt.y-Tt,Ot=ut.width/2,Gt=ut.height/2;if(!kt&&!_t)throw new Error("Not possible to find intersection inside of the rectangle");var ae,Wt;return Math.abs(_t)*Ot>Math.abs(kt)*Gt?(_t<0&&(Gt=-Gt),ae=Gt*kt/_t,Wt=Gt):(kt<0&&(Ot=-Ot),ae=Ot,Wt=Ot*_t/kt),{x:wt+ae,y:Tt+Wt}}function H(ut){var Bt=I.map(I.range(ct(ut)+1),function(){return[]});return I.forEach(ut.nodes(),function(wt){var Tt=ut.node(wt),kt=Tt.rank;I.isUndefined(kt)||(Bt[kt][Tt.order]=wt)}),Bt}function J(ut){var Bt=I.min(I.map(ut.nodes(),function(wt){return ut.node(wt).rank}));I.forEach(ut.nodes(),function(wt){var Tt=ut.node(wt);I.has(Tt,"rank")&&(Tt.rank-=Bt)})}function Z(ut){var Bt=I.min(I.map(ut.nodes(),function(_t){return ut.node(_t).rank})),wt=[];I.forEach(ut.nodes(),function(_t){var Ot=ut.node(_t).rank-Bt;wt[Ot]||(wt[Ot]=[]),wt[Ot].push(_t)});var Tt=0,kt=ut.graph().nodeRankFactor;I.forEach(wt,function(_t,Ot){I.isUndefined(_t)&&Ot%kt!==0?--Tt:Tt&&I.forEach(_t,function(Gt){ut.node(Gt).rank+=Tt})})}function $(ut,Bt,wt,Tt){var kt={width:0,height:0};return arguments.length>=4&&(kt.rank=wt,kt.order=Tt),z(ut,"border",kt,Bt)}function ct(ut){return I.max(I.map(ut.nodes(),function(Bt){var wt=ut.node(Bt).rank;if(!I.isUndefined(wt))return wt}))}function ht(ut,Bt){var wt={lhs:[],rhs:[]};return I.forEach(ut,function(Tt){Bt(Tt)?wt.lhs.push(Tt):wt.rhs.push(Tt)}),wt}function Ct(ut,Bt){var wt=I.now();try{return Bt()}finally{console.log(ut+" time: "+(I.now()-wt)+"ms")}}function pt(ut,Bt){return Bt()}},11897:function(X){X.exports="0.8.5"},94856:function(X){"use strict";var st=Object.prototype.hasOwnProperty,T="~";function I(){}Object.create&&(I.prototype=Object.create(null),new I().__proto__||(T=!1));function W(G,K,_){this.fn=G,this.context=K,this.once=_||!1}function z(G,K,_,H,J){if(typeof _!="function")throw new TypeError("The listener must be a function");var Z=new W(_,H||G,J),$=T?T+K:K;return G._events[$]?G._events[$].fn?G._events[$]=[G._events[$],Z]:G._events[$].push(Z):(G._events[$]=Z,G._eventsCount++),G}function P(G,K){--G._eventsCount===0?G._events=new I:delete G._events[K]}function N(){this._events=new I,this._eventsCount=0}N.prototype.eventNames=function(){var K=[],_,H;if(this._eventsCount===0)return K;for(H in _=this._events)st.call(_,H)&&K.push(T?H.slice(1):H);return Object.getOwnPropertySymbols?K.concat(Object.getOwnPropertySymbols(_)):K},N.prototype.listeners=function(K){var _=T?T+K:K,H=this._events[_];if(!H)return[];if(H.fn)return[H.fn];for(var J=0,Z=H.length,$=new Array(Z);J<Z;J++)$[J]=H[J].fn;return $},N.prototype.listenerCount=function(K){var _=T?T+K:K,H=this._events[_];return H?H.fn?1:H.length:0},N.prototype.emit=function(K,_,H,J,Z,$){var ct=T?T+K:K;if(!this._events[ct])return!1;var ht=this._events[ct],Ct=arguments.length,pt,ut;if(ht.fn){switch(ht.once&&this.removeListener(K,ht.fn,void 0,!0),Ct){case 1:return ht.fn.call(ht.context),!0;case 2:return ht.fn.call(ht.context,_),!0;case 3:return ht.fn.call(ht.context,_,H),!0;case 4:return ht.fn.call(ht.context,_,H,J),!0;case 5:return ht.fn.call(ht.context,_,H,J,Z),!0;case 6:return ht.fn.call(ht.context,_,H,J,Z,$),!0}for(ut=1,pt=new Array(Ct-1);ut<Ct;ut++)pt[ut-1]=arguments[ut];ht.fn.apply(ht.context,pt)}else{var Bt=ht.length,wt;for(ut=0;ut<Bt;ut++)switch(ht[ut].once&&this.removeListener(K,ht[ut].fn,void 0,!0),Ct){case 1:ht[ut].fn.call(ht[ut].context);break;case 2:ht[ut].fn.call(ht[ut].context,_);break;case 3:ht[ut].fn.call(ht[ut].context,_,H);break;case 4:ht[ut].fn.call(ht[ut].context,_,H,J);break;default:if(!pt)for(wt=1,pt=new Array(Ct-1);wt<Ct;wt++)pt[wt-1]=arguments[wt];ht[ut].fn.apply(ht[ut].context,pt)}}return!0},N.prototype.on=function(K,_,H){return z(this,K,_,H,!1)},N.prototype.once=function(K,_,H){return z(this,K,_,H,!0)},N.prototype.removeListener=function(K,_,H,J){var Z=T?T+K:K;if(!this._events[Z])return this;if(!_)return P(this,Z),this;var $=this._events[Z];if($.fn)$.fn===_&&(!J||$.once)&&(!H||$.context===H)&&P(this,Z);else{for(var ct=0,ht=[],Ct=$.length;ct<Ct;ct++)($[ct].fn!==_||J&&!$[ct].once||H&&$[ct].context!==H)&&ht.push($[ct]);ht.length?this._events[Z]=ht.length===1?ht[0]:ht:P(this,Z)}return this},N.prototype.removeAllListeners=function(K){var _;return K?(_=T?T+K:K,this._events[_]&&P(this,_)):(this._events=new I,this._eventsCount=0),this},N.prototype.off=N.prototype.removeListener,N.prototype.addListener=N.prototype.on,N.prefixed=T,N.EventEmitter=N,X.exports=N},75172:function(X,st,T){var I=T(89224);X.exports={Graph:I.Graph,json:T(17401),alg:T(54613),version:I.version}},91606:function(X,st,T){var I=T(95329);X.exports=W;function W(z){var P={},N=[],G;function K(_){I.has(P,_)||(P[_]=!0,G.push(_),I.each(z.successors(_),K),I.each(z.predecessors(_),K))}return I.each(z.nodes(),function(_){G=[],K(_),G.length&&N.push(G)}),N}},21482:function(X,st,T){var I=T(95329);X.exports=W;function W(P,N,G){I.isArray(N)||(N=[N]);var K=(P.isDirected()?P.successors:P.neighbors).bind(P),_=[],H={};return I.each(N,function(J){if(!P.hasNode(J))throw new Error("Graph does not have node: "+J);z(P,J,G==="post",H,K,_)}),_}function z(P,N,G,K,_,H){I.has(K,N)||(K[N]=!0,G||H.push(N),I.each(_(N),function(J){z(P,J,G,K,_,H)}),G&&H.push(N))}},40845:function(X,st,T){var I=T(13746),W=T(95329);X.exports=z;function z(P,N,G){return W.transform(P.nodes(),function(K,_){K[_]=I(P,_,N,G)},{})}},13746:function(X,st,T){var I=T(95329),W=T(36614);X.exports=P;var z=I.constant(1);function P(G,K,_,H){return N(G,String(K),_||z,H||function(J){return G.outEdges(J)})}function N(G,K,_,H){var J={},Z=new W,$,ct,ht=function(Ct){var pt=Ct.v!==$?Ct.v:Ct.w,ut=J[pt],Bt=_(Ct),wt=ct.distance+Bt;if(Bt<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+Ct+" Weight: "+Bt);wt<ut.distance&&(ut.distance=wt,ut.predecessor=$,Z.decrease(pt,wt))};for(G.nodes().forEach(function(Ct){var pt=Ct===K?0:Number.POSITIVE_INFINITY;J[Ct]={distance:pt},Z.add(Ct,pt)});Z.size()>0&&($=Z.removeMin(),ct=J[$],ct.distance!==Number.POSITIVE_INFINITY);)H($).forEach(ht);return J}},59324:function(X,st,T){var I=T(95329),W=T(94558);X.exports=z;function z(P){return I.filter(W(P),function(N){return N.length>1||N.length===1&&P.hasEdge(N[0],N[0])})}},22893:function(X,st,T){var I=T(95329);X.exports=z;var W=I.constant(1);function z(N,G,K){return P(N,G||W,K||function(_){return N.outEdges(_)})}function P(N,G,K){var _={},H=N.nodes();return H.forEach(function(J){_[J]={},_[J][J]={distance:0},H.forEach(function(Z){J!==Z&&(_[J][Z]={distance:Number.POSITIVE_INFINITY})}),K(J).forEach(function(Z){var $=Z.v===J?Z.w:Z.v,ct=G(Z);_[J][$]={distance:ct,predecessor:J}})}),H.forEach(function(J){var Z=_[J];H.forEach(function($){var ct=_[$];H.forEach(function(ht){var Ct=ct[J],pt=Z[ht],ut=ct[ht],Bt=Ct.distance+pt.distance;Bt<ut.distance&&(ut.distance=Bt,ut.predecessor=pt.predecessor)})})}),_}},54613:function(X,st,T){X.exports={components:T(91606),dijkstra:T(13746),dijkstraAll:T(40845),findCycles:T(59324),floydWarshall:T(22893),isAcyclic:T(588),postorder:T(98049),preorder:T(67158),prim:T(66058),tarjan:T(94558),topsort:T(7793)}},588:function(X,st,T){var I=T(7793);X.exports=W;function W(z){try{I(z)}catch(P){if(P instanceof I.CycleException)return!1;throw P}return!0}},98049:function(X,st,T){var I=T(21482);X.exports=W;function W(z,P){return I(z,P,"post")}},67158:function(X,st,T){var I=T(21482);X.exports=W;function W(z,P){return I(z,P,"pre")}},66058:function(X,st,T){var I=T(95329),W=T(6349),z=T(36614);X.exports=P;function P(N,G){var K=new W,_={},H=new z,J;function Z(ct){var ht=ct.v===J?ct.w:ct.v,Ct=H.priority(ht);if(Ct!==void 0){var pt=G(ct);pt<Ct&&(_[ht]=J,H.decrease(ht,pt))}}if(N.nodeCount()===0)return K;I.each(N.nodes(),function(ct){H.add(ct,Number.POSITIVE_INFINITY),K.setNode(ct)}),H.decrease(N.nodes()[0],0);for(var $=!1;H.size()>0;){if(J=H.removeMin(),I.has(_,J))K.setEdge(J,_[J]);else{if($)throw new Error("Input graph is not connected: "+N);$=!0}N.nodeEdges(J).forEach(Z)}return K}},94558:function(X,st,T){var I=T(95329);X.exports=W;function W(z){var P=0,N=[],G={},K=[];function _(H){var J=G[H]={onStack:!0,lowlink:P,index:P++};if(N.push(H),z.successors(H).forEach(function(ct){I.has(G,ct)?G[ct].onStack&&(J.lowlink=Math.min(J.lowlink,G[ct].index)):(_(ct),J.lowlink=Math.min(J.lowlink,G[ct].lowlink))}),J.lowlink===J.index){var Z=[],$;do $=N.pop(),G[$].onStack=!1,Z.push($);while(H!==$);K.push(Z)}}return z.nodes().forEach(function(H){I.has(G,H)||_(H)}),K}},7793:function(X,st,T){var I=T(95329);X.exports=W,W.CycleException=z;function W(P){var N={},G={},K=[];function _(H){if(I.has(G,H))throw new z;I.has(N,H)||(G[H]=!0,N[H]=!0,I.each(P.predecessors(H),_),delete G[H],K.push(H))}if(I.each(P.sinks(),_),I.size(N)!==P.nodeCount())throw new z;return K}function z(){}z.prototype=new Error},36614:function(X,st,T){var I=T(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(z){return z.key})},W.prototype.has=function(z){return I.has(this._keyIndices,z)},W.prototype.priority=function(z){var P=this._keyIndices[z];if(P!==void 0)return this._arr[P].priority},W.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},W.prototype.add=function(z,P){var N=this._keyIndices;if(z=String(z),!I.has(N,z)){var G=this._arr,K=G.length;return N[z]=K,G.push({key:z,priority:P}),this._decrease(K),!0}return!1},W.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var z=this._arr.pop();return delete this._keyIndices[z.key],this._heapify(0),z.key},W.prototype.decrease=function(z,P){var N=this._keyIndices[z];if(P>this._arr[N].priority)throw new Error("New priority is greater than current priority. Key: "+z+" Old: "+this._arr[N].priority+" New: "+P);this._arr[N].priority=P,this._decrease(N)},W.prototype._heapify=function(z){var P=this._arr,N=2*z,G=N+1,K=z;N<P.length&&(K=P[N].priority<P[K].priority?N:K,G<P.length&&(K=P[G].priority<P[K].priority?G:K),K!==z&&(this._swap(z,K),this._heapify(K)))},W.prototype._decrease=function(z){for(var P=this._arr,N=P[z].priority,G;z!==0&&(G=z>>1,!(P[G].priority<N));)this._swap(z,G),z=G},W.prototype._swap=function(z,P){var N=this._arr,G=this._keyIndices,K=N[z],_=N[P];N[z]=_,N[P]=K,G[_.key]=z,G[K.key]=P}},6349:function(X,st,T){"use strict";var I=T(95329);X.exports=N;var W="\0",z="\0",P="";function N(Z){this._isDirected=I.has(Z,"directed")?Z.directed:!0,this._isMultigraph=I.has(Z,"multigraph")?Z.multigraph:!1,this._isCompound=I.has(Z,"compound")?Z.compound:!1,this._label=void 0,this._defaultNodeLabelFn=I.constant(void 0),this._defaultEdgeLabelFn=I.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[z]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}N.prototype._nodeCount=0,N.prototype._edgeCount=0,N.prototype.isDirected=function(){return this._isDirected},N.prototype.isMultigraph=function(){return this._isMultigraph},N.prototype.isCompound=function(){return this._isCompound},N.prototype.setGraph=function(Z){return this._label=Z,this},N.prototype.graph=function(){return this._label},N.prototype.setDefaultNodeLabel=function(Z){return I.isFunction(Z)||(Z=I.constant(Z)),this._defaultNodeLabelFn=Z,this},N.prototype.nodeCount=function(){return this._nodeCount},N.prototype.nodes=function(){return I.keys(this._nodes)},N.prototype.sources=function(){var Z=this;return I.filter(this.nodes(),function($){return I.isEmpty(Z._in[$])})},N.prototype.sinks=function(){var Z=this;return I.filter(this.nodes(),function($){return I.isEmpty(Z._out[$])})},N.prototype.setNodes=function(Z,$){var ct=arguments,ht=this;return I.each(Z,function(Ct){ct.length>1?ht.setNode(Ct,$):ht.setNode(Ct)}),this},N.prototype.setNode=function(Z,$){return I.has(this._nodes,Z)?(arguments.length>1&&(this._nodes[Z]=$),this):(this._nodes[Z]=arguments.length>1?$:this._defaultNodeLabelFn(Z),this._isCompound&&(this._parent[Z]=z,this._children[Z]={},this._children[z][Z]=!0),this._in[Z]={},this._preds[Z]={},this._out[Z]={},this._sucs[Z]={},++this._nodeCount,this)},N.prototype.node=function(Z){return this._nodes[Z]},N.prototype.hasNode=function(Z){return I.has(this._nodes,Z)},N.prototype.removeNode=function(Z){var $=this;if(I.has(this._nodes,Z)){var ct=function(ht){$.removeEdge($._edgeObjs[ht])};delete this._nodes[Z],this._isCompound&&(this._removeFromParentsChildList(Z),delete this._parent[Z],I.each(this.children(Z),function(ht){$.setParent(ht)}),delete this._children[Z]),I.each(I.keys(this._in[Z]),ct),delete this._in[Z],delete this._preds[Z],I.each(I.keys(this._out[Z]),ct),delete this._out[Z],delete this._sucs[Z],--this._nodeCount}return this},N.prototype.setParent=function(Z,$){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(I.isUndefined($))$=z;else{$+="";for(var ct=$;!I.isUndefined(ct);ct=this.parent(ct))if(ct===Z)throw new Error("Setting "+$+" as parent of "+Z+" would create a cycle");this.setNode($)}return this.setNode(Z),this._removeFromParentsChildList(Z),this._parent[Z]=$,this._children[$][Z]=!0,this},N.prototype._removeFromParentsChildList=function(Z){delete this._children[this._parent[Z]][Z]},N.prototype.parent=function(Z){if(this._isCompound){var $=this._parent[Z];if($!==z)return $}},N.prototype.children=function(Z){if(I.isUndefined(Z)&&(Z=z),this._isCompound){var $=this._children[Z];if($)return I.keys($)}else{if(Z===z)return this.nodes();if(this.hasNode(Z))return[]}},N.prototype.predecessors=function(Z){var $=this._preds[Z];if($)return I.keys($)},N.prototype.successors=function(Z){var $=this._sucs[Z];if($)return I.keys($)},N.prototype.neighbors=function(Z){var $=this.predecessors(Z);if($)return I.union($,this.successors(Z))},N.prototype.isLeaf=function(Z){var $;return this.isDirected()?$=this.successors(Z):$=this.neighbors(Z),$.length===0},N.prototype.filterNodes=function(Z){var $=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});$.setGraph(this.graph());var ct=this;I.each(this._nodes,function(pt,ut){Z(ut)&&$.setNode(ut,pt)}),I.each(this._edgeObjs,function(pt){$.hasNode(pt.v)&&$.hasNode(pt.w)&&$.setEdge(pt,ct.edge(pt))});var ht={};function Ct(pt){var ut=ct.parent(pt);return ut===void 0||$.hasNode(ut)?(ht[pt]=ut,ut):ut in ht?ht[ut]:Ct(ut)}return this._isCompound&&I.each($.nodes(),function(pt){$.setParent(pt,Ct(pt))}),$},N.prototype.setDefaultEdgeLabel=function(Z){return I.isFunction(Z)||(Z=I.constant(Z)),this._defaultEdgeLabelFn=Z,this},N.prototype.edgeCount=function(){return this._edgeCount},N.prototype.edges=function(){return I.values(this._edgeObjs)},N.prototype.setPath=function(Z,$){var ct=this,ht=arguments;return I.reduce(Z,function(Ct,pt){return ht.length>1?ct.setEdge(Ct,pt,$):ct.setEdge(Ct,pt),pt}),this},N.prototype.setEdge=function(){var Z,$,ct,ht,Ct=!1,pt=arguments[0];typeof pt=="object"&&pt!==null&&"v"in pt?(Z=pt.v,$=pt.w,ct=pt.name,arguments.length===2&&(ht=arguments[1],Ct=!0)):(Z=pt,$=arguments[1],ct=arguments[3],arguments.length>2&&(ht=arguments[2],Ct=!0)),Z=""+Z,$=""+$,I.isUndefined(ct)||(ct=""+ct);var ut=_(this._isDirected,Z,$,ct);if(I.has(this._edgeLabels,ut))return Ct&&(this._edgeLabels[ut]=ht),this;if(!I.isUndefined(ct)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(Z),this.setNode($),this._edgeLabels[ut]=Ct?ht:this._defaultEdgeLabelFn(Z,$,ct);var Bt=H(this._isDirected,Z,$,ct);return Z=Bt.v,$=Bt.w,Object.freeze(Bt),this._edgeObjs[ut]=Bt,G(this._preds[$],Z),G(this._sucs[Z],$),this._in[$][ut]=Bt,this._out[Z][ut]=Bt,this._edgeCount++,this},N.prototype.edge=function(Z,$,ct){var ht=arguments.length===1?J(this._isDirected,arguments[0]):_(this._isDirected,Z,$,ct);return this._edgeLabels[ht]},N.prototype.hasEdge=function(Z,$,ct){var ht=arguments.length===1?J(this._isDirected,arguments[0]):_(this._isDirected,Z,$,ct);return I.has(this._edgeLabels,ht)},N.prototype.removeEdge=function(Z,$,ct){var ht=arguments.length===1?J(this._isDirected,arguments[0]):_(this._isDirected,Z,$,ct),Ct=this._edgeObjs[ht];return Ct&&(Z=Ct.v,$=Ct.w,delete this._edgeLabels[ht],delete this._edgeObjs[ht],K(this._preds[$],Z),K(this._sucs[Z],$),delete this._in[$][ht],delete this._out[Z][ht],this._edgeCount--),this},N.prototype.inEdges=function(Z,$){var ct=this._in[Z];if(ct){var ht=I.values(ct);return $?I.filter(ht,function(Ct){return Ct.v===$}):ht}},N.prototype.outEdges=function(Z,$){var ct=this._out[Z];if(ct){var ht=I.values(ct);return $?I.filter(ht,function(Ct){return Ct.w===$}):ht}},N.prototype.nodeEdges=function(Z,$){var ct=this.inEdges(Z,$);if(ct)return ct.concat(this.outEdges(Z,$))};function G(Z,$){Z[$]?Z[$]++:Z[$]=1}function K(Z,$){--Z[$]||delete Z[$]}function _(Z,$,ct,ht){var Ct=""+$,pt=""+ct;if(!Z&&Ct>pt){var ut=Ct;Ct=pt,pt=ut}return Ct+P+pt+P+(I.isUndefined(ht)?W:ht)}function H(Z,$,ct,ht){var Ct=""+$,pt=""+ct;if(!Z&&Ct>pt){var ut=Ct;Ct=pt,pt=ut}var Bt={v:Ct,w:pt};return ht&&(Bt.name=ht),Bt}function J(Z,$){return _(Z,$.v,$.w,$.name)}},89224:function(X,st,T){X.exports={Graph:T(6349),version:T(16544)}},17401:function(X,st,T){var I=T(95329),W=T(6349);X.exports={write:z,read:G};function z(K){var _={options:{directed:K.isDirected(),multigraph:K.isMultigraph(),compound:K.isCompound()},nodes:P(K),edges:N(K)};return I.isUndefined(K.graph())||(_.value=I.clone(K.graph())),_}function P(K){return I.map(K.nodes(),function(_){var H=K.node(_),J=K.parent(_),Z={v:_};return I.isUndefined(H)||(Z.value=H),I.isUndefined(J)||(Z.parent=J),Z})}function N(K){return I.map(K.edges(),function(_){var H=K.edge(_),J={v:_.v,w:_.w};return I.isUndefined(_.name)||(J.name=_.name),I.isUndefined(H)||(J.value=H),J})}function G(K){var _=new W(K.options).setGraph(K.value);return I.each(K.nodes,function(H){_.setNode(H.v,H.value),H.parent&&_.setParent(H.v,H.parent)}),I.each(K.edges,function(H){_.setEdge({v:H.v,w:H.w,name:H.name},H.value)}),_}},95329:function(X,st,T){var I;try{I={clone:T(40633),constant:T(46221),each:T(61475),filter:T(3130),has:T(64760),isArray:T(41594),isEmpty:T(74336),isFunction:T(92581),isUndefined:T(68408),keys:T(66357),map:T(81426),reduce:T(9695),size:T(24727),transform:T(61477),union:T(99477),values:T(72834)}}catch(W){}I||(I=window._),X.exports=I},16544:function(X){X.exports="2.1.8"},64270:function(X){(function(st,T){X.exports=T()})(this,function(){"use strict";var st=function(E,m){return st=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,B){b.__proto__=B}||function(b,B){for(var Q in B)Object.prototype.hasOwnProperty.call(B,Q)&&(b[Q]=B[Q])},st(E,m)};function T(E,m){if(typeof m!="function"&&m!==null)throw new TypeError("Class extends value "+String(m)+" is not a constructor or null");st(E,m);function b(){this.constructor=E}E.prototype=m===null?Object.create(m):(b.prototype=m.prototype,new b)}var I=function(){return I=Object.assign||function(m){for(var b,B=1,Q=arguments.length;B<Q;B++){b=arguments[B];for(var V in b)Object.prototype.hasOwnProperty.call(b,V)&&(m[V]=b[V])}return m},I.apply(this,arguments)};function W(E,m,b,B){function Q(V){return V instanceof b?V:new b(function(tt){tt(V)})}return new(b||(b=Promise))(function(V,tt){function lt(St){try{bt(B.next(St))}catch(Ut){tt(Ut)}}function at(St){try{bt(B.throw(St))}catch(Ut){tt(Ut)}}function bt(St){St.done?V(St.value):Q(St.value).then(lt,at)}bt((B=B.apply(E,m||[])).next())})}function z(E,m){var b={label:0,sent:function(){if(V[0]&1)throw V[1];return V[1]},trys:[],ops:[]},B,Q,V,tt;return tt={next:lt(0),throw:lt(1),return:lt(2)},typeof Symbol=="function"&&(tt[Symbol.iterator]=function(){return this}),tt;function lt(bt){return function(St){return at([bt,St])}}function at(bt){if(B)throw new TypeError("Generator is already executing.");for(;b;)try{if(B=1,Q&&(V=bt[0]&2?Q.return:bt[0]?Q.throw||((V=Q.return)&&V.call(Q),0):Q.next)&&!(V=V.call(Q,bt[1])).done)return V;switch(Q=0,V&&(bt=[bt[0]&2,V.value]),bt[0]){case 0:case 1:V=bt;break;case 4:return b.label++,{value:bt[1],done:!1};case 5:b.label++,Q=bt[1],bt=[0];continue;case 7:bt=b.ops.pop(),b.trys.pop();continue;default:if(V=b.trys,!(V=V.length>0&&V[V.length-1])&&(bt[0]===6||bt[0]===2)){b=0;continue}if(bt[0]===3&&(!V||bt[1]>V[0]&&bt[1]<V[3])){b.label=bt[1];break}if(bt[0]===6&&b.label<V[1]){b.label=V[1],V=bt;break}if(V&&b.label<V[2]){b.label=V[2],b.ops.push(bt);break}V[2]&&b.ops.pop(),b.trys.pop();continue}bt=m.call(E,b)}catch(St){bt=[6,St],Q=0}finally{B=V=0}if(bt[0]&5)throw bt[1];return{value:bt[0]?bt[1]:void 0,done:!0}}}function P(E,m,b){if(b||arguments.length===2)for(var B=0,Q=m.length,V;B<Q;B++)(V||!(B in m))&&(V||(V=Array.prototype.slice.call(m,0,B)),V[B]=m[B]);return E.concat(V||m)}for(var N=function(){function E(m,b,B,Q){this.left=m,this.top=b,this.width=B,this.height=Q}return E.prototype.add=function(m,b,B,Q){return new E(this.left+m,this.top+b,this.width+B,this.height+Q)},E.fromClientRect=function(m,b){return new E(b.left+m.windowBounds.left,b.top+m.windowBounds.top,b.width,b.height)},E.fromDOMRectList=function(m,b){var B=Array.from(b).find(function(Q){return Q.width!==0});return B?new E(B.left+m.windowBounds.left,B.top+m.windowBounds.top,B.width,B.height):E.EMPTY},E.EMPTY=new E(0,0,0,0),E}(),G=function(E,m){return N.fromClientRect(E,m.getBoundingClientRect())},K=function(E){var m=E.body,b=E.documentElement;if(!m||!b)throw new Error("Unable to get document size");var B=Math.max(Math.max(m.scrollWidth,b.scrollWidth),Math.max(m.offsetWidth,b.offsetWidth),Math.max(m.clientWidth,b.clientWidth)),Q=Math.max(Math.max(m.scrollHeight,b.scrollHeight),Math.max(m.offsetHeight,b.offsetHeight),Math.max(m.clientHeight,b.clientHeight));return new N(0,0,B,Q)},_=function(E){for(var m=[],b=0,B=E.length;b<B;){var Q=E.charCodeAt(b++);if(Q>=55296&&Q<=56319&&b<B){var V=E.charCodeAt(b++);(V&64512)===56320?m.push(((Q&1023)<<10)+(V&1023)+65536):(m.push(Q),b--)}else m.push(Q)}return m},H=function(){for(var E=[],m=0;m<arguments.length;m++)E[m]=arguments[m];if(String.fromCodePoint)return String.fromCodePoint.apply(String,E);var b=E.length;if(!b)return"";for(var B=[],Q=-1,V="";++Q<b;){var tt=E[Q];tt<=65535?B.push(tt):(tt-=65536,B.push((tt>>10)+55296,tt%1024+56320)),(Q+1===b||B.length>16384)&&(V+=String.fromCharCode.apply(String,B),B.length=0)}return V},J="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Z=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),$=0;$<J.length;$++)Z[J.charCodeAt($)]=$;for(var ct="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),Ct=0;Ct<ct.length;Ct++)ht[ct.charCodeAt(Ct)]=Ct;for(var pt=function(E){var m=E.length*.75,b=E.length,B,Q=0,V,tt,lt,at;E[E.length-1]==="="&&(m--,E[E.length-2]==="="&&m--);var bt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(m):new Array(m),St=Array.isArray(bt)?bt:new Uint8Array(bt);for(B=0;B<b;B+=4)V=ht[E.charCodeAt(B)],tt=ht[E.charCodeAt(B+1)],lt=ht[E.charCodeAt(B+2)],at=ht[E.charCodeAt(B+3)],St[Q++]=V<<2|tt>>4,St[Q++]=(tt&15)<<4|lt>>2,St[Q++]=(lt&3)<<6|at&63;return bt},ut=function(E){for(var m=E.length,b=[],B=0;B<m;B+=2)b.push(E[B+1]<<8|E[B]);return b},Bt=function(E){for(var m=E.length,b=[],B=0;B<m;B+=4)b.push(E[B+3]<<24|E[B+2]<<16|E[B+1]<<8|E[B]);return b},wt=5,Tt=11,kt=2,_t=Tt-wt,Ot=65536>>wt,Gt=1<<wt,ae=Gt-1,Wt=1024>>wt,ie=Ot+Wt,ve=ie,de=32,Oe=ve+de,sn=65536>>Tt,dn=1<<_t,Xn=dn-1,Jr=function(E,m,b){return E.slice?E.slice(m,b):new Uint16Array(Array.prototype.slice.call(E,m,b))},ji=function(E,m,b){return E.slice?E.slice(m,b):new Uint32Array(Array.prototype.slice.call(E,m,b))},As=function(E,m){var b=pt(E),B=Array.isArray(b)?Bt(b):new Uint32Array(b),Q=Array.isArray(b)?ut(b):new Uint16Array(b),V=24,tt=Jr(Q,V/2,B[4]/2),lt=B[5]===2?Jr(Q,(V+B[4])/2):ji(B,Math.ceil((V+B[4])/4));return new ho(B[0],B[1],B[2],B[3],tt,lt)},ho=function(){function E(m,b,B,Q,V,tt){this.initialValue=m,this.errorValue=b,this.highStart=B,this.highValueIndex=Q,this.index=V,this.data=tt}return E.prototype.get=function(m){var b;if(m>=0){if(m<55296||m>56319&&m<=65535)return b=this.index[m>>wt],b=(b<<kt)+(m&ae),this.data[b];if(m<=65535)return b=this.index[Ot+(m-55296>>wt)],b=(b<<kt)+(m&ae),this.data[b];if(m<this.highStart)return b=Oe-sn+(m>>Tt),b=this.index[b],b+=m>>wt&Xn,b=this.index[b],b=(b<<kt)+(m&ae),this.data[b];if(m<=1114111)return this.data[this.highValueIndex]}return this.errorValue},E}(),Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",zt=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),jt=0;jt<Pt.length;jt++)zt[Pt.charCodeAt(jt)]=jt;var gt="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==",Mt=50,Lt=1,ee=2,be=3,_e=4,Me=5,nn=7,rr=8,or=9,Ge=10,ze=11,me=12,Ve=13,zr=14,Zi=15,pe=16,Wa=17,kr=18,Fr=19,fi=20,ls=21,Yi=22,cs=23,Li=24,qr=25,Ba=26,ba=27,la=28,xa=29,$r=30,Ar=31,jo=32,Xi=33,Ji=34,fo=35,ja=36,Zo=37,_A=38,Rs=39,HA=40,Vl=41,cu=42,ed=43,nd=[9001,65288],Wl="!",pn="\xD7",GA="\xF7",jl=As(gt),Ca=[$r,ja],zA=[Lt,ee,be,Me],Yo=[Ge,rr],Zl=[ba,Ba],Yl=zA.concat(Yo),Y=[_A,Rs,HA,Ji,fo],C=[Zi,Ve],S=function(E,m){m===void 0&&(m="strict");var b=[],B=[],Q=[];return E.forEach(function(V,tt){var lt=jl.get(V);if(lt>Mt?(Q.push(!0),lt-=Mt):Q.push(!1),["normal","auto","loose"].indexOf(m)!==-1&&[8208,8211,12316,12448].indexOf(V)!==-1)return B.push(tt),b.push(pe);if(lt===_e||lt===ze){if(tt===0)return B.push(tt),b.push($r);var at=b[tt-1];return Yl.indexOf(at)===-1?(B.push(B[tt-1]),b.push(at)):(B.push(tt),b.push($r))}if(B.push(tt),lt===Ar)return b.push(m==="strict"?ls:Zo);if(lt===cu||lt===xa)return b.push($r);if(lt===ed)return V>=131072&&V<=196605||V>=196608&&V<=262141?b.push(Zo):b.push($r);b.push(lt)}),[B,b,Q]},w=function(E,m,b,B){var Q=B[b];if(Array.isArray(E)?E.indexOf(Q)!==-1:E===Q)for(var V=b;V<=B.length;){V++;var tt=B[V];if(tt===m)return!0;if(tt!==Ge)break}if(Q===Ge)for(var V=b;V>0;){V--;var lt=B[V];if(Array.isArray(E)?E.indexOf(lt)!==-1:E===lt)for(var at=b;at<=B.length;){at++;var tt=B[at];if(tt===m)return!0;if(tt!==Ge)break}if(lt!==Ge)break}return!1},M=function(E,m){for(var b=E;b>=0;){var B=m[b];if(B===Ge)b--;else return B}return 0},k=function(E,m,b,B,Q){if(b[B]===0)return pn;var V=B-1;if(Array.isArray(Q)&&Q[V]===!0)return pn;var tt=V-1,lt=V+1,at=m[V],bt=tt>=0?m[tt]:0,St=m[lt];if(at===ee&&St===be)return pn;if(zA.indexOf(at)!==-1)return Wl;if(zA.indexOf(St)!==-1||Yo.indexOf(St)!==-1)return pn;if(M(V,m)===rr)return GA;if(jl.get(E[V])===ze||(at===jo||at===Xi)&&jl.get(E[lt])===ze||at===nn||St===nn||at===or||[Ge,Ve,Zi].indexOf(at)===-1&&St===or||[Wa,kr,Fr,Li,la].indexOf(St)!==-1||M(V,m)===Yi||w(cs,Yi,V,m)||w([Wa,kr],ls,V,m)||w(me,me,V,m))return pn;if(at===Ge)return GA;if(at===cs||St===cs)return pn;if(St===pe||at===pe)return GA;if([Ve,Zi,ls].indexOf(St)!==-1||at===zr||bt===ja&&C.indexOf(at)!==-1||at===la&&St===ja||St===fi||Ca.indexOf(St)!==-1&&at===qr||Ca.indexOf(at)!==-1&&St===qr||at===ba&&[Zo,jo,Xi].indexOf(St)!==-1||[Zo,jo,Xi].indexOf(at)!==-1&&St===Ba||Ca.indexOf(at)!==-1&&Zl.indexOf(St)!==-1||Zl.indexOf(at)!==-1&&Ca.indexOf(St)!==-1||[ba,Ba].indexOf(at)!==-1&&(St===qr||[Yi,Zi].indexOf(St)!==-1&&m[lt+1]===qr)||[Yi,Zi].indexOf(at)!==-1&&St===qr||at===qr&&[qr,la,Li].indexOf(St)!==-1)return pn;if([qr,la,Li,Wa,kr].indexOf(St)!==-1)for(var Ut=V;Ut>=0;){var Jt=m[Ut];if(Jt===qr)return pn;if([la,Li].indexOf(Jt)!==-1)Ut--;else break}if([ba,Ba].indexOf(St)!==-1)for(var Ut=[Wa,kr].indexOf(at)!==-1?tt:V;Ut>=0;){var Jt=m[Ut];if(Jt===qr)return pn;if([la,Li].indexOf(Jt)!==-1)Ut--;else break}if(_A===at&&[_A,Rs,Ji,fo].indexOf(St)!==-1||[Rs,Ji].indexOf(at)!==-1&&[Rs,HA].indexOf(St)!==-1||[HA,fo].indexOf(at)!==-1&&St===HA||Y.indexOf(at)!==-1&&[fi,Ba].indexOf(St)!==-1||Y.indexOf(St)!==-1&&at===ba||Ca.indexOf(at)!==-1&&Ca.indexOf(St)!==-1||at===Li&&Ca.indexOf(St)!==-1||Ca.concat(qr).indexOf(at)!==-1&&St===Yi&&nd.indexOf(E[lt])===-1||Ca.concat(qr).indexOf(St)!==-1&&at===kr)return pn;if(at===Vl&&St===Vl){for(var Te=b[V],he=1;Te>0&&(Te--,m[Te]===Vl);)he++;if(he%2!==0)return pn}return at===jo&&St===Xi?pn:GA},nt=function(E,m){m||(m={lineBreak:"normal",wordBreak:"normal"});var b=S(E,m.lineBreak),B=b[0],Q=b[1],V=b[2];(m.wordBreak==="break-all"||m.wordBreak==="break-word")&&(Q=Q.map(function(lt){return[qr,$r,cu].indexOf(lt)!==-1?Zo:lt}));var tt=m.wordBreak==="keep-all"?V.map(function(lt,at){return lt&&E[at]>=19968&&E[at]<=40959}):void 0;return[B,Q,tt]},rt=function(){function E(m,b,B,Q){this.codePoints=m,this.required=b===Wl,this.start=B,this.end=Q}return E.prototype.slice=function(){return H.apply(void 0,this.codePoints.slice(this.start,this.end))},E}(),ot=function(E,m){var b=_(E),B=nt(b,m),Q=B[0],V=B[1],tt=B[2],lt=b.length,at=0,bt=0;return{next:function(){if(bt>=lt)return{done:!0,value:null};for(var St=pn;bt<lt&&(St=k(b,V,Q,++bt,tt))===pn;);if(St!==pn||bt===lt){var Ut=new rt(b,St,at,bt);return at=bt,{value:Ut,done:!1}}return{done:!0,value:null}}}},At=1,It=2,vt=4,Zt=8,ce=10,Ht=47,qt=92,Ce=9,Et=32,$t=34,Ee=61,He=35,je=36,Wn=37,Ie=39,De=40,on=41,Ft=95,te=45,ue=33,se=60,Jn=62,Qn=64,jn=91,qn=93,Qr=61,Tr=123,Dn=63,qi=125,$i=124,fn=126,Er=128,ti=65533,ei=42,Pn=43,Ds=44,Xo=58,uu=59,go=46,vo=0,KA=8,hu=11,Xl=14,du=31,cv=127,Za=-1,fu=48,gu=97,vu=101,rd=102,uv=117,hv=122,id=65,ad=69,pu=70,dv=85,fv=90,Kr=function(E){return E>=fu&&E<=57},gv=function(E){return E>=55296&&E<=57343},po=function(E){return Kr(E)||E>=id&&E<=pu||E>=gu&&E<=rd},vv=function(E){return E>=gu&&E<=hv},sd=function(E){return E>=id&&E<=fv},pv=function(E){return vv(E)||sd(E)},vw=function(E){return E>=Er},mu=function(E){return E===ce||E===Ce||E===Et},Jl=function(E){return pv(E)||vw(E)||E===Ft},mv=function(E){return Jl(E)||Kr(E)||E===te},pw=function(E){return E>=vo&&E<=KA||E===hu||E>=Xl&&E<=du||E===cv},mo=function(E,m){return E!==qt?!1:m!==ce},yu=function(E,m,b){return E===te?Jl(m)||mo(m,b):Jl(E)?!0:!!(E===qt&&mo(E,m))},od=function(E,m,b){return E===Pn||E===te?Kr(m)?!0:m===go&&Kr(b):Kr(E===go?m:E)},mw=function(E){var m=0,b=1;(E[m]===Pn||E[m]===te)&&(E[m]===te&&(b=-1),m++);for(var B=[];Kr(E[m]);)B.push(E[m++]);var Q=B.length?parseInt(H.apply(void 0,B),10):0;E[m]===go&&m++;for(var V=[];Kr(E[m]);)V.push(E[m++]);var tt=V.length,lt=tt?parseInt(H.apply(void 0,V),10):0;(E[m]===ad||E[m]===vu)&&m++;var at=1;(E[m]===Pn||E[m]===te)&&(E[m]===te&&(at=-1),m++);for(var bt=[];Kr(E[m]);)bt.push(E[m++]);var St=bt.length?parseInt(H.apply(void 0,bt),10):0;return b*(Q+lt*Math.pow(10,-tt))*Math.pow(10,at*St)},yw={type:2},ww={type:3},Ew={type:4},Bw={type:13},bw={type:8},xw={type:21},Cw={type:9},Sw={type:10},Mw={type:11},Fw={type:12},Tw={type:14},wu={type:23},Ow={type:1},Iw={type:25},Nw={type:24},Lw={type:26},kw={type:27},Qw={type:28},Uw={type:29},Rw={type:31},Ad={type:32},Br=function(){function E(){this._value=[]}return E.prototype.write=function(m){this._value=this._value.concat(_(m))},E.prototype.read=function(){for(var m=[],b=this.consumeToken();b!==Ad;)m.push(b),b=this.consumeToken();return m},E.prototype.consumeToken=function(){var m=this.consumeCodePoint();switch(m){case $t:return this.consumeStringToken($t);case He:var b=this.peekCodePoint(0),B=this.peekCodePoint(1),Q=this.peekCodePoint(2);if(mv(b)||mo(B,Q)){var V=yu(b,B,Q)?It:At,tt=this.consumeName();return{type:5,value:tt,flags:V}}break;case je:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),Bw;break;case Ie:return this.consumeStringToken(Ie);case De:return yw;case on:return ww;case ei:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),Tw;break;case Pn:if(od(m,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(m),this.consumeNumericToken();break;case Ds:return Ew;case te:var lt=m,at=this.peekCodePoint(0),bt=this.peekCodePoint(1);if(od(lt,at,bt))return this.reconsumeCodePoint(m),this.consumeNumericToken();if(yu(lt,at,bt))return this.reconsumeCodePoint(m),this.consumeIdentLikeToken();if(at===te&&bt===Jn)return this.consumeCodePoint(),this.consumeCodePoint(),Nw;break;case go:if(od(m,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(m),this.consumeNumericToken();break;case Ht:if(this.peekCodePoint(0)===ei)for(this.consumeCodePoint();;){var St=this.consumeCodePoint();if(St===ei&&(St=this.consumeCodePoint(),St===Ht))return this.consumeToken();if(St===Za)return this.consumeToken()}break;case Xo:return Lw;case uu:return kw;case se:if(this.peekCodePoint(0)===ue&&this.peekCodePoint(1)===te&&this.peekCodePoint(2)===te)return this.consumeCodePoint(),this.consumeCodePoint(),Iw;break;case Qn:var Ut=this.peekCodePoint(0),Jt=this.peekCodePoint(1),Te=this.peekCodePoint(2);if(yu(Ut,Jt,Te)){var tt=this.consumeName();return{type:7,value:tt}}break;case jn:return Qw;case qt:if(mo(m,this.peekCodePoint(0)))return this.reconsumeCodePoint(m),this.consumeIdentLikeToken();break;case qn:return Uw;case Qr:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),bw;break;case Tr:return Mw;case qi:return Fw;case uv:case dv:var he=this.peekCodePoint(0),Be=this.peekCodePoint(1);return he===Pn&&(po(Be)||Be===Dn)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(m),this.consumeIdentLikeToken();case $i:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),Cw;if(this.peekCodePoint(0)===$i)return this.consumeCodePoint(),xw;break;case fn:if(this.peekCodePoint(0)===Ee)return this.consumeCodePoint(),Sw;break;case Za:return Ad}return mu(m)?(this.consumeWhiteSpace(),Rw):Kr(m)?(this.reconsumeCodePoint(m),this.consumeNumericToken()):Jl(m)?(this.reconsumeCodePoint(m),this.consumeIdentLikeToken()):{type:6,value:H(m)}},E.prototype.consumeCodePoint=function(){var m=this._value.shift();return typeof m=="undefined"?-1:m},E.prototype.reconsumeCodePoint=function(m){this._value.unshift(m)},E.prototype.peekCodePoint=function(m){return m>=this._value.length?-1:this._value[m]},E.prototype.consumeUnicodeRangeToken=function(){for(var m=[],b=this.consumeCodePoint();po(b)&&m.length<6;)m.push(b),b=this.consumeCodePoint();for(var B=!1;b===Dn&&m.length<6;)m.push(b),b=this.consumeCodePoint(),B=!0;if(B){var Q=parseInt(H.apply(void 0,m.map(function(at){return at===Dn?fu:at})),16),V=parseInt(H.apply(void 0,m.map(function(at){return at===Dn?pu:at})),16);return{type:30,start:Q,end:V}}var tt=parseInt(H.apply(void 0,m),16);if(this.peekCodePoint(0)===te&&po(this.peekCodePoint(1))){this.consumeCodePoint(),b=this.consumeCodePoint();for(var lt=[];po(b)&<.length<6;)lt.push(b),b=this.consumeCodePoint();var V=parseInt(H.apply(void 0,lt),16);return{type:30,start:tt,end:V}}else return{type:30,start:tt,end:tt}},E.prototype.consumeIdentLikeToken=function(){var m=this.consumeName();return m.toLowerCase()==="url"&&this.peekCodePoint(0)===De?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===De?(this.consumeCodePoint(),{type:19,value:m}):{type:20,value:m}},E.prototype.consumeUrlToken=function(){var m=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Za)return{type:22,value:""};var b=this.peekCodePoint(0);if(b===Ie||b===$t){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(),wu)}for(;;){var Q=this.consumeCodePoint();if(Q===Za||Q===on)return{type:22,value:H.apply(void 0,m)};if(mu(Q))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Za||this.peekCodePoint(0)===on?(this.consumeCodePoint(),{type:22,value:H.apply(void 0,m)}):(this.consumeBadUrlRemnants(),wu);if(Q===$t||Q===Ie||Q===De||pw(Q))return this.consumeBadUrlRemnants(),wu;if(Q===qt)if(mo(Q,this.peekCodePoint(0)))m.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),wu;else m.push(Q)}},E.prototype.consumeWhiteSpace=function(){for(;mu(this.peekCodePoint(0));)this.consumeCodePoint()},E.prototype.consumeBadUrlRemnants=function(){for(;;){var m=this.consumeCodePoint();if(m===on||m===Za)return;mo(m,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},E.prototype.consumeStringSlice=function(m){for(var b=5e4,B="";m>0;){var Q=Math.min(b,m);B+=H.apply(void 0,this._value.splice(0,Q)),m-=Q}return this._value.shift(),B},E.prototype.consumeStringToken=function(m){var b="",B=0;do{var Q=this._value[B];if(Q===Za||Q===void 0||Q===m)return b+=this.consumeStringSlice(B),{type:0,value:b};if(Q===ce)return this._value.splice(0,B),Ow;if(Q===qt){var V=this._value[B+1];V!==Za&&V!==void 0&&(V===ce?(b+=this.consumeStringSlice(B),B=-1,this._value.shift()):mo(Q,V)&&(b+=this.consumeStringSlice(B),b+=H(this.consumeEscapedCodePoint()),B=-1))}B++}while(!0)},E.prototype.consumeNumber=function(){var m=[],b=vt,B=this.peekCodePoint(0);for((B===Pn||B===te)&&m.push(this.consumeCodePoint());Kr(this.peekCodePoint(0));)m.push(this.consumeCodePoint());B=this.peekCodePoint(0);var Q=this.peekCodePoint(1);if(B===go&&Kr(Q))for(m.push(this.consumeCodePoint(),this.consumeCodePoint()),b=Zt;Kr(this.peekCodePoint(0));)m.push(this.consumeCodePoint());B=this.peekCodePoint(0),Q=this.peekCodePoint(1);var V=this.peekCodePoint(2);if((B===ad||B===vu)&&((Q===Pn||Q===te)&&Kr(V)||Kr(Q)))for(m.push(this.consumeCodePoint(),this.consumeCodePoint()),b=Zt;Kr(this.peekCodePoint(0));)m.push(this.consumeCodePoint());return[mw(m),b]},E.prototype.consumeNumericToken=function(){var m=this.consumeNumber(),b=m[0],B=m[1],Q=this.peekCodePoint(0),V=this.peekCodePoint(1),tt=this.peekCodePoint(2);if(yu(Q,V,tt)){var lt=this.consumeName();return{type:15,number:b,flags:B,unit:lt}}return Q===Wn?(this.consumeCodePoint(),{type:16,number:b,flags:B}):{type:17,number:b,flags:B}},E.prototype.consumeEscapedCodePoint=function(){var m=this.consumeCodePoint();if(po(m)){for(var b=H(m);po(this.peekCodePoint(0))&&b.length<6;)b+=H(this.consumeCodePoint());mu(this.peekCodePoint(0))&&this.consumeCodePoint();var B=parseInt(b,16);return B===0||gv(B)||B>1114111?ti:B}return m===Za?ti:m},E.prototype.consumeName=function(){for(var m="";;){var b=this.consumeCodePoint();if(mv(b))m+=H(b);else if(mo(b,this.peekCodePoint(0)))m+=H(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(b),m}},E}(),yv=function(){function E(m){this._tokens=m}return E.create=function(m){var b=new Br;return b.write(m),new E(b.read())},E.parseValue=function(m){return E.create(m).parseComponentValue()},E.parseValues=function(m){return E.create(m).parseComponentValues()},E.prototype.parseComponentValue=function(){for(var m=this.consumeToken();m.type===31;)m=this.consumeToken();if(m.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(m);var b=this.consumeComponentValue();do m=this.consumeToken();while(m.type===31);if(m.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 m=[];;){var b=this.consumeComponentValue();if(b.type===32)return m;m.push(b),m.push()}},E.prototype.consumeComponentValue=function(){var m=this.consumeToken();switch(m.type){case 11:case 28:case 2:return this.consumeSimpleBlock(m.type);case 19:return this.consumeFunction(m)}return m},E.prototype.consumeSimpleBlock=function(m){for(var b={type:m,values:[]},B=this.consumeToken();;){if(B.type===32||Ev(B,m))return b;this.reconsumeToken(B),b.values.push(this.consumeComponentValue()),B=this.consumeToken()}},E.prototype.consumeFunction=function(m){for(var b={name:m.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 m=this._tokens.shift();return typeof m=="undefined"?Ad:m},E.prototype.reconsumeToken=function(m){this._tokens.unshift(m)},E}(),ca=function(E){return E.type===15},VA=function(E){return E.type===17},$n=function(E){return E.type===20},Ps=function(E){return E.type===0},ld=function(E,m){return $n(E)&&E.value===m},wv=function(E){return E.type!==31},WA=function(E){return E.type!==31&&E.type!==4},us=function(E){var m=[],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");m.push(b),b=[];return}B.type!==31&&b.push(B)}),b.length&&m.push(b),m},Ev=function(E,m){return m===11&&E.type===12||m===28&&E.type===29?!0:m===2&&E.type===3},_s=function(E){return E.type===17||E.type===15},Ur=function(E){return E.type===16||_s(E)},ql=function(E){return E.length>1?[E[0],E[1]]:[E[0]]},gi={type:17,number:0,flags:vt},jA={type:16,number:50,flags:vt},yo={type:16,number:100,flags:vt},ZA=function(E,m,b){var B=E[0],Q=E[1];return[Gn(B,m),Gn(typeof Q!="undefined"?Q:B,b)]},Gn=function(E,m){if(E.type===16)return E.number/100*m;if(ca(E))switch(E.unit){case"rem":case"em":return 16*E.number;case"px":default:return E.number}return E.number},Bv="deg",bv="grad",cd="rad",YA="turn",XA={name:"angle",parse:function(E,m){if(m.type===15)switch(m.unit){case Bv:return Math.PI*m.number/180;case bv:return Math.PI/200*m.number;case cd:return m.number;case YA:return Math.PI*2*m.number}throw new Error("Unsupported angle type")}},xv=function(E){return E.type===15&&(E.unit===Bv||E.unit===bv||E.unit===cd||E.unit===YA)},Eu=function(E){var m=E.filter($n).map(function(b){return b.value}).join(" ");switch(m){case"to bottom right":case"to right bottom":case"left top":case"top left":return[gi,gi];case"to top":case"bottom":return ua(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[gi,yo];case"to right":case"left":return ua(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[yo,yo];case"to bottom":case"top":return ua(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[yo,gi];case"to left":case"right":return ua(270)}return 0},ua=function(E){return Math.PI*E/180},Hs={name:"color",parse:function(E,m){if(m.type===18){var b=Dw[m.name];if(typeof b=="undefined")throw new Error('Attempting to parse an unsupported color function "'+m.name+'"');return b(E,m.values)}if(m.type===5){if(m.value.length===3){var B=m.value.substring(0,1),Q=m.value.substring(1,2),V=m.value.substring(2,3);return Eo(parseInt(B+B,16),parseInt(Q+Q,16),parseInt(V+V,16),1)}if(m.value.length===4){var B=m.value.substring(0,1),Q=m.value.substring(1,2),V=m.value.substring(2,3),tt=m.value.substring(3,4);return Eo(parseInt(B+B,16),parseInt(Q+Q,16),parseInt(V+V,16),parseInt(tt+tt,16)/255)}if(m.value.length===6){var B=m.value.substring(0,2),Q=m.value.substring(2,4),V=m.value.substring(4,6);return Eo(parseInt(B,16),parseInt(Q,16),parseInt(V,16),1)}if(m.value.length===8){var B=m.value.substring(0,2),Q=m.value.substring(2,4),V=m.value.substring(4,6),tt=m.value.substring(6,8);return Eo(parseInt(B,16),parseInt(Q,16),parseInt(V,16),parseInt(tt,16)/255)}}if(m.type===20){var lt=Gs[m.value.toUpperCase()];if(typeof lt!="undefined")return lt}return Gs.TRANSPARENT}},wo=function(E){return(255&E)===0},ni=function(E){var m=255&E,b=255&E>>8,B=255&E>>16,Q=255&E>>24;return m<255?"rgba("+Q+","+B+","+b+","+m/255+")":"rgb("+Q+","+B+","+b+")"},Eo=function(E,m,b,B){return(E<<24|m<<16|b<<8|Math.round(B*255)<<0)>>>0},Cv=function(E,m){if(E.type===17)return E.number;if(E.type===16){var b=m===3?1:255;return m===3?E.number/100*b:Math.round(E.number/100*b)}return 0},Sv=function(E,m){var b=m.filter(WA);if(b.length===3){var B=b.map(Cv),Q=B[0],V=B[1],tt=B[2];return Eo(Q,V,tt,1)}if(b.length===4){var lt=b.map(Cv),Q=lt[0],V=lt[1],tt=lt[2],at=lt[3];return Eo(Q,V,tt,at)}return 0};function Jo(E,m,b){return b<0&&(b+=1),b>=1&&(b-=1),b<1/6?(m-E)*b*6+E:b<1/2?m:b<2/3?(m-E)*6*(2/3-b)+E:E}var Mv=function(E,m){var b=m.filter(WA),B=b[0],Q=b[1],V=b[2],tt=b[3],lt=(B.type===17?ua(B.number):XA.parse(E,B))/(Math.PI*2),at=Ur(Q)?Q.number/100:0,bt=Ur(V)?V.number/100:0,St=typeof tt!="undefined"&&Ur(tt)?Gn(tt,1):1;if(at===0)return Eo(bt*255,bt*255,bt*255,1);var Ut=bt<=.5?bt*(at+1):bt+at-bt*at,Jt=bt*2-Ut,Te=Jo(Jt,Ut,lt+1/3),he=Jo(Jt,Ut,lt),Be=Jo(Jt,Ut,lt-1/3);return Eo(Te*255,he*255,Be*255,St)},Dw={hsl:Mv,hsla:Mv,rgb:Sv,rgba:Sv},$l=function(E,m){return Hs.parse(E,yv.create(m).parseComponentValue())},Gs={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},Pw={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(E,m){return m.map(function(b){if($n(b))switch(b.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Bu={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},bu=function(E,m){var b=Hs.parse(E,m[0]),B=m[1];return B&&Ur(B)?{color:b,stop:B}:{color:b,stop:null}},Fv=function(E,m){var b=E[0],B=E[E.length-1];b.stop===null&&(b.stop=gi),B.stop===null&&(B.stop=yo);for(var Q=[],V=0,tt=0;tt<E.length;tt++){var lt=E[tt].stop;if(lt!==null){var at=Gn(lt,m);at>V?Q.push(at):Q.push(V),V=at}else Q.push(null)}for(var bt=null,tt=0;tt<Q.length;tt++){var St=Q[tt];if(St===null)bt===null&&(bt=tt);else if(bt!==null){for(var Ut=tt-bt,Jt=Q[bt-1],Te=(St-Jt)/(Ut+1),he=1;he<=Ut;he++)Q[bt+he-1]=Te*he;bt=null}}return E.map(function(Be,rn){var Ue=Be.color;return{color:Ue,stop:Math.max(Math.min(1,Q[rn]/m),0)}})},Tv=function(E,m,b){var B=m/2,Q=b/2,V=Gn(E[0],m)-B,tt=Q-Gn(E[1],b);return(Math.atan2(tt,V)+Math.PI*2)%(Math.PI*2)},Ov=function(E,m,b){var B=typeof E=="number"?E:Tv(E,m,b),Q=Math.abs(m*Math.sin(B))+Math.abs(b*Math.cos(B)),V=m/2,tt=b/2,lt=Q/2,at=Math.sin(B-Math.PI/2)*lt,bt=Math.cos(B-Math.PI/2)*lt;return[Q,V-bt,V+bt,tt-at,tt+at]},Ya=function(E,m){return Math.sqrt(E*E+m*m)},Iv=function(E,m,b,B,Q){var V=[[0,0],[0,m],[E,0],[E,m]];return V.reduce(function(tt,lt){var at=lt[0],bt=lt[1],St=Ya(b-at,B-bt);return(Q?St<tt.optimumDistance:St>tt.optimumDistance)?{optimumCorner:lt,optimumDistance:St}:tt},{optimumDistance:Q?1/0:-1/0,optimumCorner:null}).optimumCorner},_w=function(E,m,b,B,Q){var V=0,tt=0;switch(E.size){case 0:E.shape===0?V=tt=Math.min(Math.abs(m),Math.abs(m-B),Math.abs(b),Math.abs(b-Q)):E.shape===1&&(V=Math.min(Math.abs(m),Math.abs(m-B)),tt=Math.min(Math.abs(b),Math.abs(b-Q)));break;case 2:if(E.shape===0)V=tt=Math.min(Ya(m,b),Ya(m,b-Q),Ya(m-B,b),Ya(m-B,b-Q));else if(E.shape===1){var lt=Math.min(Math.abs(b),Math.abs(b-Q))/Math.min(Math.abs(m),Math.abs(m-B)),at=Iv(B,Q,m,b,!0),bt=at[0],St=at[1];V=Ya(bt-m,(St-b)/lt),tt=lt*V}break;case 1:E.shape===0?V=tt=Math.max(Math.abs(m),Math.abs(m-B),Math.abs(b),Math.abs(b-Q)):E.shape===1&&(V=Math.max(Math.abs(m),Math.abs(m-B)),tt=Math.max(Math.abs(b),Math.abs(b-Q)));break;case 3:if(E.shape===0)V=tt=Math.max(Ya(m,b),Ya(m,b-Q),Ya(m-B,b),Ya(m-B,b-Q));else if(E.shape===1){var lt=Math.max(Math.abs(b),Math.abs(b-Q))/Math.max(Math.abs(m),Math.abs(m-B)),Ut=Iv(B,Q,m,b,!1),bt=Ut[0],St=Ut[1];V=Ya(bt-m,(St-b)/lt),tt=lt*V}break}return Array.isArray(E.size)&&(V=Gn(E.size[0],B),tt=E.size.length===2?Gn(E.size[1],Q):V),[V,tt]},Hw=function(E,m){var b=ua(180),B=[];return us(m).forEach(function(Q,V){if(V===0){var tt=Q[0];if(tt.type===20&&tt.value==="to"){b=Eu(Q);return}else if(xv(tt)){b=XA.parse(E,tt);return}}var lt=bu(E,Q);B.push(lt)}),{angle:b,stops:B,type:1}},xu=function(E,m){var b=ua(180),B=[];return us(m).forEach(function(Q,V){if(V===0){var tt=Q[0];if(tt.type===20&&["top","left","right","bottom"].indexOf(tt.value)!==-1){b=Eu(Q);return}else if(xv(tt)){b=(XA.parse(E,tt)+ua(270))%ua(360);return}}var lt=bu(E,Q);B.push(lt)}),{angle:b,stops:B,type:1}},Gw=function(E,m){var b=ua(180),B=[],Q=1,V=0,tt=3,lt=[];return us(m).forEach(function(at,bt){var St=at[0];if(bt===0){if($n(St)&&St.value==="linear"){Q=1;return}else if($n(St)&&St.value==="radial"){Q=2;return}}if(St.type===18){if(St.name==="from"){var Ut=Hs.parse(E,St.values[0]);B.push({stop:gi,color:Ut})}else if(St.name==="to"){var Ut=Hs.parse(E,St.values[0]);B.push({stop:yo,color:Ut})}else if(St.name==="color-stop"){var Jt=St.values.filter(WA);if(Jt.length===2){var Ut=Hs.parse(E,Jt[1]),Te=Jt[0];VA(Te)&&B.push({stop:{type:16,number:Te.number*100,flags:Te.flags},color:Ut})}}}}),Q===1?{angle:(b+ua(180))%ua(360),stops:B,type:Q}:{size:tt,shape:V,stops:B,position:lt,type:Q}},Nv="closest-side",Lv="farthest-side",kv="closest-corner",Qv="farthest-corner",Uv="circle",Rv="ellipse",Dv="cover",Pv="contain",zw=function(E,m){var b=0,B=3,Q=[],V=[];return us(m).forEach(function(tt,lt){var at=!0;if(lt===0){var bt=!1;at=tt.reduce(function(Ut,Jt){if(bt)if($n(Jt))switch(Jt.value){case"center":return V.push(jA),Ut;case"top":case"left":return V.push(gi),Ut;case"right":case"bottom":return V.push(yo),Ut}else(Ur(Jt)||_s(Jt))&&V.push(Jt);else if($n(Jt))switch(Jt.value){case Uv:return b=0,!1;case Rv:return b=1,!1;case"at":return bt=!0,!1;case Nv:return B=0,!1;case Dv:case Lv:return B=1,!1;case Pv:case kv:return B=2,!1;case Qv:return B=3,!1}else if(_s(Jt)||Ur(Jt))return Array.isArray(B)||(B=[]),B.push(Jt),!1;return Ut},at)}if(at){var St=bu(E,tt);Q.push(St)}}),{size:B,shape:b,stops:Q,position:V,type:2}},Cu=function(E,m){var b=0,B=3,Q=[],V=[];return us(m).forEach(function(tt,lt){var at=!0;if(lt===0?at=tt.reduce(function(St,Ut){if($n(Ut))switch(Ut.value){case"center":return V.push(jA),!1;case"top":case"left":return V.push(gi),!1;case"right":case"bottom":return V.push(yo),!1}else if(Ur(Ut)||_s(Ut))return V.push(Ut),!1;return St},at):lt===1&&(at=tt.reduce(function(St,Ut){if($n(Ut))switch(Ut.value){case Uv:return b=0,!1;case Rv:return b=1,!1;case Pv:case Nv:return B=0,!1;case Lv:return B=1,!1;case kv:return B=2,!1;case Dv:case Qv:return B=3,!1}else if(_s(Ut)||Ur(Ut))return Array.isArray(B)||(B=[]),B.push(Ut),!1;return St},at)),at){var bt=bu(E,tt);Q.push(bt)}}),{size:B,shape:b,stops:Q,position:V,type:2}},Kw=function(E){return E.type===1},_v=function(E){return E.type===2},Su={name:"image",parse:function(E,m){if(m.type===22){var b={url:m.value,type:0};return E.cache.addImage(m.value),b}if(m.type===18){var B=Hv[m.name];if(typeof B=="undefined")throw new Error('Attempting to parse an unsupported image function "'+m.name+'"');return B(E,m.values)}throw new Error("Unsupported image type "+m.type)}};function Vw(E){return!(E.type===20&&E.value==="none")&&(E.type!==18||!!Hv[E.name])}var Hv={"linear-gradient":Hw,"-moz-linear-gradient":xu,"-ms-linear-gradient":xu,"-o-linear-gradient":xu,"-webkit-linear-gradient":xu,"radial-gradient":zw,"-moz-radial-gradient":Cu,"-ms-radial-gradient":Cu,"-o-radial-gradient":Cu,"-webkit-radial-gradient":Cu,"-webkit-gradient":Gw},Ww={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(E,m){if(m.length===0)return[];var b=m[0];return b.type===20&&b.value==="none"?[]:m.filter(function(B){return WA(B)&&Vw(B)}).map(function(B){return Su.parse(E,B)})}},jw={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(E,m){return m.map(function(b){if($n(b))switch(b.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Zw={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(E,m){return us(m).map(function(b){return b.filter(Ur)}).map(ql)}},Yw={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(E,m){return us(m).map(function(b){return b.filter($n).map(function(B){return B.value}).join(" ")}).map(Xw)}},Xw=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}},JA;(function(E){E.AUTO="auto",E.CONTAIN="contain",E.COVER="cover"})(JA||(JA={}));var Jw={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(E,m){return us(m).map(function(b){return b.filter(qw)})}},qw=function(E){return $n(E)||Ur(E)},Mu=function(E){return{name:"border-"+E+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},$w=Mu("top"),Gv=Mu("right"),tE=Mu("bottom"),eE=Mu("left"),Fu=function(E){return{name:"border-radius-"+E,initialValue:"0 0",prefix:!1,type:1,parse:function(m,b){return ql(b.filter(Ur))}}},nE=Fu("top-left"),rE=Fu("top-right"),iE=Fu("bottom-right"),aE=Fu("bottom-left"),Tu=function(E){return{name:"border-"+E+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(m,b){switch(b){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},sE=Tu("top"),ye=Tu("right"),ki=Tu("bottom"),Re=Tu("left"),gn=function(E){return{name:"border-"+E+"-width",initialValue:"0",type:0,prefix:!1,parse:function(m,b){return ca(b)?b.number:0}}},zv=gn("top"),dr=gn("right"),D=gn("bottom"),qA=gn("left"),ud={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},hd={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(E,m){switch(m){case"rtl":return 1;case"ltr":default:return 0}}},dd={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(E,m){return m.filter($n).reduce(function(b,B){return b|fd(B.value)},0)}},fd=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},gd={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(E,m){switch(m){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},Kv={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(E,m){return m.type===20&&m.value==="normal"?0:m.type===17||m.type===15?m.number:0}},tc;(function(E){E.NORMAL="normal",E.STRICT="strict"})(tc||(tc={}));var qo={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(E,m){switch(m){case"strict":return tc.STRICT;case"normal":default:return tc.NORMAL}}},Vv={name:"line-height",initialValue:"normal",prefix:!1,type:4},vd=function(E,m){return $n(E)&&E.value==="normal"?1.2*m:E.type===17?m*E.number:Ur(E)?Gn(E,m):m},ec={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(E,m){return m.type===20&&m.value==="none"?null:Su.parse(E,m)}},Wv={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(E,m){switch(m){case"inside":return 0;case"outside":default:return 1}}},Ou={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(E,m){switch(m){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}}},nc=function(E){return{name:"margin-"+E,initialValue:"0",prefix:!1,type:4}},jv=nc("top"),Zv=nc("right"),Yv=nc("bottom"),Xv=nc("left"),rc={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(E,m){return m.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}})}},zs={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(E,m){switch(m){case"break-word":return"break-word";case"normal":default:return"normal"}}},$o=function(E){return{name:"padding-"+E,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},pd=$o("top"),Jv=$o("right"),qv=$o("bottom"),$v=$o("left"),md={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(E,m){switch(m){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},tp={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(E,m){switch(m){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},ep={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(E,m){return m.length===1&&ld(m[0],"none")?[]:us(m).map(function(b){for(var B={color:Gs.TRANSPARENT,offsetX:gi,offsetY:gi,blur:gi},Q=0,V=0;V<b.length;V++){var tt=b[V];_s(tt)?(Q===0?B.offsetX=tt:Q===1?B.offsetY=tt:B.blur=tt,Q++):B.color=Hs.parse(E,tt)}return B})}},yd={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(E,m){switch(m){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},np={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(E,m){if(m.type===20&&m.value==="none")return null;if(m.type===18){var b=ac[m.name];if(typeof b=="undefined")throw new Error('Attempting to parse an unsupported transform function "'+m.name+'"');return b(m.values)}return null}},Qi=function(E){var m=E.filter(function(b){return b.type===17}).map(function(b){return b.number});return m.length===6?m:null},ic=function(E){var m=E.filter(function(at){return at.type===17}).map(function(at){return at.number}),b=m[0],B=m[1];m[2],m[3];var Q=m[4],V=m[5];m[6],m[7],m[8],m[9],m[10],m[11];var tt=m[12],lt=m[13];return m[14],m[15],m.length===16?[b,B,Q,V,tt,lt]:null},ac={matrix:Qi,matrix3d:ic},wd={type:16,number:50,flags:vt},tA=[wd,wd],rp={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(E,m){var b=m.filter(Ur);return b.length!==2?tA:[b[0],b[1]]}},Ed={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(E,m){switch(m){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},$A;(function(E){E.NORMAL="normal",E.BREAK_ALL="break-all",E.KEEP_ALL="keep-all"})($A||($A={}));for(var ip={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(E,m){switch(m){case"break-all":return $A.BREAK_ALL;case"keep-all":return $A.KEEP_ALL;case"normal":default:return $A.NORMAL}}},sc={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(E,m){if(m.type===20)return{auto:!0,order:0};if(VA(m))return{auto:!1,order:m.number};throw new Error("Invalid z-index number parsed")}},oc={name:"time",parse:function(E,m){if(m.type===15)switch(m.unit.toLowerCase()){case"s":return 1e3*m.number;case"ms":return m.number}throw new Error("Unsupported time type")}},ap={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(E,m){return VA(m)?m.number:1}},Bd={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},sp={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(E,m){return m.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})}},Iu={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(E,m){var b=[],B=[];return m.forEach(function(Q){switch(Q.type){case 20:case 0:b.push(Q.value);break;case 17:b.push(Q.number.toString());break;case 4:B.push(b.join(" ")),b.length=0;break}}),b.length&&B.push(b.join(" ")),B.map(function(Q){return Q.indexOf(" ")===-1?Q:"'"+Q+"'"})}},op={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},Ap={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(E,m){if(VA(m))return m.number;if($n(m))switch(m.value){case"bold":return 700;case"normal":default:return 400}return 400}},bd={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(E,m){return m.filter($n).map(function(b){return b.value})}},xd={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(E,m){switch(m){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Rr=function(E,m){return(E&m)!==0},lp={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(E,m){if(m.length===0)return[];var b=m[0];return b.type===20&&b.value==="none"?[]:m}},Cd={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(E,m){if(m.length===0)return null;var b=m[0];if(b.type===20&&b.value==="none")return null;for(var B=[],Q=m.filter(wv),V=0;V<Q.length;V++){var tt=Q[V],lt=Q[V+1];if(tt.type===20){var at=lt&&VA(lt)?lt.number:1;B.push({counter:tt.value,increment:at})}}return B}},cp={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(E,m){if(m.length===0)return[];for(var b=[],B=m.filter(wv),Q=0;Q<B.length;Q++){var V=B[Q],tt=B[Q+1];if($n(V)&&V.value!=="none"){var lt=tt&&VA(tt)?tt.number:0;b.push({counter:V.value,reset:lt})}}return b}},up={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(E,m){return m.filter(ca).map(function(b){return oc.parse(E,b)})}},hp={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(E,m){if(m.length===0)return null;var b=m[0];if(b.type===20&&b.value==="none")return null;var B=[],Q=m.filter(Ps);if(Q.length%2!==0)return null;for(var V=0;V<Q.length;V+=2){var tt=Q[V].value,lt=Q[V+1].value;B.push({open:tt,close:lt})}return B}},Sd=function(E,m,b){if(!E)return"";var B=E[Math.min(m,E.length-1)];return B?b?B.open:B.close:""},dp={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(E,m){return m.length===1&&ld(m[0],"none")?[]:us(m).map(function(b){for(var B={color:255,offsetX:gi,offsetY:gi,blur:gi,spread:gi,inset:!1},Q=0,V=0;V<b.length;V++){var tt=b[V];ld(tt,"inset")?B.inset=!0:_s(tt)?(Q===0?B.offsetX=tt:Q===1?B.offsetY=tt:Q===2?B.blur=tt:B.spread=tt,Q++):B.color=Hs.parse(E,tt)}return B})}},Ze={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(E,m){var b=[0,1,2],B=[];return m.filter($n).forEach(function(Q){switch(Q.value){case"stroke":B.push(1);break;case"fill":B.push(0);break;case"markers":B.push(2);break}}),b.forEach(function(Q){B.indexOf(Q)===-1&&B.push(Q)}),B}},fp={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},gp={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(E,m){return ca(m)?m.number:0}},Md=function(){function E(m,b){var B,Q;this.animationDuration=Vt(m,up,b.animationDuration),this.backgroundClip=Vt(m,Pw,b.backgroundClip),this.backgroundColor=Vt(m,Bu,b.backgroundColor),this.backgroundImage=Vt(m,Ww,b.backgroundImage),this.backgroundOrigin=Vt(m,jw,b.backgroundOrigin),this.backgroundPosition=Vt(m,Zw,b.backgroundPosition),this.backgroundRepeat=Vt(m,Yw,b.backgroundRepeat),this.backgroundSize=Vt(m,Jw,b.backgroundSize),this.borderTopColor=Vt(m,$w,b.borderTopColor),this.borderRightColor=Vt(m,Gv,b.borderRightColor),this.borderBottomColor=Vt(m,tE,b.borderBottomColor),this.borderLeftColor=Vt(m,eE,b.borderLeftColor),this.borderTopLeftRadius=Vt(m,nE,b.borderTopLeftRadius),this.borderTopRightRadius=Vt(m,rE,b.borderTopRightRadius),this.borderBottomRightRadius=Vt(m,iE,b.borderBottomRightRadius),this.borderBottomLeftRadius=Vt(m,aE,b.borderBottomLeftRadius),this.borderTopStyle=Vt(m,sE,b.borderTopStyle),this.borderRightStyle=Vt(m,ye,b.borderRightStyle),this.borderBottomStyle=Vt(m,ki,b.borderBottomStyle),this.borderLeftStyle=Vt(m,Re,b.borderLeftStyle),this.borderTopWidth=Vt(m,zv,b.borderTopWidth),this.borderRightWidth=Vt(m,dr,b.borderRightWidth),this.borderBottomWidth=Vt(m,D,b.borderBottomWidth),this.borderLeftWidth=Vt(m,qA,b.borderLeftWidth),this.boxShadow=Vt(m,dp,b.boxShadow),this.color=Vt(m,ud,b.color),this.direction=Vt(m,hd,b.direction),this.display=Vt(m,dd,b.display),this.float=Vt(m,gd,b.cssFloat),this.fontFamily=Vt(m,Iu,b.fontFamily),this.fontSize=Vt(m,op,b.fontSize),this.fontStyle=Vt(m,xd,b.fontStyle),this.fontVariant=Vt(m,bd,b.fontVariant),this.fontWeight=Vt(m,Ap,b.fontWeight),this.letterSpacing=Vt(m,Kv,b.letterSpacing),this.lineBreak=Vt(m,qo,b.lineBreak),this.lineHeight=Vt(m,Vv,b.lineHeight),this.listStyleImage=Vt(m,ec,b.listStyleImage),this.listStylePosition=Vt(m,Wv,b.listStylePosition),this.listStyleType=Vt(m,Ou,b.listStyleType),this.marginTop=Vt(m,jv,b.marginTop),this.marginRight=Vt(m,Zv,b.marginRight),this.marginBottom=Vt(m,Yv,b.marginBottom),this.marginLeft=Vt(m,Xv,b.marginLeft),this.opacity=Vt(m,ap,b.opacity);var V=Vt(m,rc,b.overflow);this.overflowX=V[0],this.overflowY=V[V.length>1?1:0],this.overflowWrap=Vt(m,zs,b.overflowWrap),this.paddingTop=Vt(m,pd,b.paddingTop),this.paddingRight=Vt(m,Jv,b.paddingRight),this.paddingBottom=Vt(m,qv,b.paddingBottom),this.paddingLeft=Vt(m,$v,b.paddingLeft),this.paintOrder=Vt(m,Ze,b.paintOrder),this.position=Vt(m,tp,b.position),this.textAlign=Vt(m,md,b.textAlign),this.textDecorationColor=Vt(m,Bd,(B=b.textDecorationColor)!==null&&B!==void 0?B:b.color),this.textDecorationLine=Vt(m,sp,(Q=b.textDecorationLine)!==null&&Q!==void 0?Q:b.textDecoration),this.textShadow=Vt(m,ep,b.textShadow),this.textTransform=Vt(m,yd,b.textTransform),this.transform=Vt(m,np,b.transform),this.transformOrigin=Vt(m,rp,b.transformOrigin),this.visibility=Vt(m,Ed,b.visibility),this.webkitTextStrokeColor=Vt(m,fp,b.webkitTextStrokeColor),this.webkitTextStrokeWidth=Vt(m,gp,b.webkitTextStrokeWidth),this.wordBreak=Vt(m,ip,b.wordBreak),this.zIndex=Vt(m,sc,b.zIndex)}return E.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},E.prototype.isTransparent=function(){return wo(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 Rr(this.display,4)||Rr(this.display,33554432)||Rr(this.display,268435456)||Rr(this.display,536870912)||Rr(this.display,67108864)||Rr(this.display,134217728)},E}(),vp=function(){function E(m,b){this.content=Vt(m,lp,b.content),this.quotes=Vt(m,hp,b.quotes)}return E}(),eA=function(){function E(m,b){this.counterIncrement=Vt(m,Cd,b.counterIncrement),this.counterReset=Vt(m,cp,b.counterReset)}return E}(),Vt=function(E,m,b){var B=new Br,Q=b!==null&&typeof b!="undefined"?b.toString():m.initialValue;B.write(Q);var V=new yv(B.read());switch(m.type){case 2:var tt=V.parseComponentValue();return m.parse(E,$n(tt)?tt.value:m.initialValue);case 0:return m.parse(E,V.parseComponentValue());case 1:return m.parse(E,V.parseComponentValues());case 4:return V.parseComponentValue();case 3:switch(m.format){case"angle":return XA.parse(E,V.parseComponentValue());case"color":return Hs.parse(E,V.parseComponentValue());case"image":return Su.parse(E,V.parseComponentValue());case"length":var lt=V.parseComponentValue();return _s(lt)?lt:gi;case"length-percentage":var at=V.parseComponentValue();return Ur(at)?at:gi;case"time":return oc.parse(E,V.parseComponentValue())}break}},br="data-html2canvas-debug",pp=function(E){var m=E.getAttribute(br);switch(m){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},we=function(E,m){var b=pp(E);return b===1||m===b},Sa=function(){function E(m,b){if(this.context=m,this.textNodes=[],this.elements=[],this.flags=0,we(b,3))debugger;this.styles=new Md(m,window.getComputedStyle(b,null)),Vu(b)&&(this.styles.animationDuration.some(function(B){return B>0})&&(b.style.animationDuration="0s"),this.styles.transform!==null&&(b.style.transform="none")),this.bounds=G(this.context,b),we(b,4)&&(this.flags|=16)}return E}(),mp="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Ac="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ks=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),lc=0;lc<Ac.length;lc++)Ks[Ac.charCodeAt(lc)]=lc;for(var vi=function(E){var m=E.length*.75,b=E.length,B,Q=0,V,tt,lt,at;E[E.length-1]==="="&&(m--,E[E.length-2]==="="&&m--);var bt=typeof ArrayBuffer!="undefined"&&typeof Uint8Array!="undefined"&&typeof Uint8Array.prototype.slice!="undefined"?new ArrayBuffer(m):new Array(m),St=Array.isArray(bt)?bt:new Uint8Array(bt);for(B=0;B<b;B+=4)V=Ks[E.charCodeAt(B)],tt=Ks[E.charCodeAt(B+1)],lt=Ks[E.charCodeAt(B+2)],at=Ks[E.charCodeAt(B+3)],St[Q++]=V<<2|tt>>4,St[Q++]=(tt&15)<<4|lt>>2,St[Q++]=(lt&3)<<6|at&63;return bt},cc=function(E){for(var m=E.length,b=[],B=0;B<m;B+=2)b.push(E[B+1]<<8|E[B]);return b},Fd=function(E){for(var m=E.length,b=[],B=0;B<m;B+=4)b.push(E[B+3]<<24|E[B+2]<<16|E[B+1]<<8|E[B]);return b},Vs=5,Nu=11,Lu=2,yp=Nu-Vs,Td=65536>>Vs,wp=1<<Vs,ku=wp-1,Ep=1024>>Vs,Bp=Td+Ep,Od=Bp,Id=32,bp=Od+Id,oE=65536>>Nu,AE=1<<yp,xp=AE-1,Qu=function(E,m,b){return E.slice?E.slice(m,b):new Uint16Array(Array.prototype.slice.call(E,m,b))},Cp=function(E,m,b){return E.slice?E.slice(m,b):new Uint32Array(Array.prototype.slice.call(E,m,b))},lE=function(E,m){var b=vi(E),B=Array.isArray(b)?Fd(b):new Uint32Array(b),Q=Array.isArray(b)?cc(b):new Uint16Array(b),V=24,tt=Qu(Q,V/2,B[4]/2),lt=B[5]===2?Qu(Q,(V+B[4])/2):Cp(B,Math.ceil((V+B[4])/4));return new Nd(B[0],B[1],B[2],B[3],tt,lt)},Nd=function(){function E(m,b,B,Q,V,tt){this.initialValue=m,this.errorValue=b,this.highStart=B,this.highValueIndex=Q,this.index=V,this.data=tt}return E.prototype.get=function(m){var b;if(m>=0){if(m<55296||m>56319&&m<=65535)return b=this.index[m>>Vs],b=(b<<Lu)+(m&ku),this.data[b];if(m<=65535)return b=this.index[Td+(m-55296>>Vs)],b=(b<<Lu)+(m&ku),this.data[b];if(m<this.highStart)return b=bp-oE+(m>>Nu),b=this.index[b],b+=m>>Vs&xp,b=this.index[b],b=(b<<Lu)+(m&ku),this.data[b];if(m<=1114111)return this.data[this.highValueIndex]}return this.errorValue},E}(),Ma="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Sp=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),tl=0;tl<Ma.length;tl++)Sp[Ma.charCodeAt(tl)]=tl;var cE=1,hs=2,uc=3,Uu=4,Ld=5,Ru=7,kd=8,Qd=9,Du=10,Pu=11,Mp=12,Fp=13,_u=14,hc=15,Ud=function(E){for(var m=[],b=0,B=E.length;b<B;){var Q=E.charCodeAt(b++);if(Q>=55296&&Q<=56319&&b<B){var V=E.charCodeAt(b++);(V&64512)===56320?m.push(((Q&1023)<<10)+(V&1023)+65536):(m.push(Q),b--)}else m.push(Q)}return m},Rd=function(){for(var E=[],m=0;m<arguments.length;m++)E[m]=arguments[m];if(String.fromCodePoint)return String.fromCodePoint.apply(String,E);var b=E.length;if(!b)return"";for(var B=[],Q=-1,V="";++Q<b;){var tt=E[Q];tt<=65535?B.push(tt):(tt-=65536,B.push((tt>>10)+55296,tt%1024+56320)),(Q+1===b||B.length>16384)&&(V+=String.fromCharCode.apply(String,B),B.length=0)}return V},Dd=lE(mp),ha="\xD7",Hu="\xF7",uE=function(E){return Dd.get(E)},hE=function(E,m,b){var B=b-2,Q=m[B],V=m[b-1],tt=m[b];if(V===hs&&tt===uc)return ha;if(V===hs||V===uc||V===Uu||tt===hs||tt===uc||tt===Uu)return Hu;if(V===kd&&[kd,Qd,Pu,Mp].indexOf(tt)!==-1||(V===Pu||V===Qd)&&(tt===Qd||tt===Du)||(V===Mp||V===Du)&&tt===Du||tt===Fp||tt===Ld||tt===Ru||V===cE)return ha;if(V===Fp&&tt===_u){for(;Q===Ld;)Q=m[--B];if(Q===_u)return ha}if(V===hc&&tt===hc){for(var lt=0;Q===hc;)lt++,Q=m[--B];if(lt%2===0)return ha}return Hu},dE=function(E){var m=Ud(E),b=m.length,B=0,Q=0,V=m.map(uE);return{next:function(){if(B>=b)return{done:!0,value:null};for(var tt=ha;B<b&&(tt=hE(m,V,++B))===ha;);if(tt!==ha||B===b){var lt=Rd.apply(null,m.slice(Q,B));return Q=B,{value:lt,done:!1}}return{done:!0,value:null}}}},dc=function(E){for(var m=dE(E),b=[],B;!(B=m.next()).done;)B.value&&b.push(B.value.slice());return b},fE=function(E){var m=123;if(E.createRange){var b=E.createRange();if(b.getBoundingClientRect){var B=E.createElement("boundtest");B.style.height=m+"px",B.style.display="block",E.body.appendChild(B),b.selectNode(B);var Q=b.getBoundingClientRect(),V=Math.round(Q.height);if(E.body.removeChild(B),V===m)return!0}}return!1},gE=function(E){var m=E.createElement("boundtest");m.style.width="50px",m.style.display="block",m.style.fontSize="12px",m.style.letterSpacing="0px",m.style.wordSpacing="0px",E.body.appendChild(m);var b=E.createRange();m.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var B=m.firstChild,Q=_(B.data).map(function(at){return H(at)}),V=0,tt={},lt=Q.every(function(at,bt){b.setStart(B,V),b.setEnd(B,V+at.length);var St=b.getBoundingClientRect();V+=at.length;var Ut=St.x>tt.x||St.y>tt.y;return tt=St,bt===0?!0:Ut});return E.body.removeChild(m),lt},vE=function(){return typeof new Image().crossOrigin!="undefined"},pE=function(){return typeof new XMLHttpRequest().responseType=="string"},mE=function(E){var m=new Image,b=E.createElement("canvas"),B=b.getContext("2d");if(!B)return!1;m.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{B.drawImage(m,0,0),b.toDataURL()}catch(Q){return!1}return!0},nA=function(E){return E[0]===0&&E[1]===255&&E[2]===0&&E[3]===255},Pd=function(E){var m=E.createElement("canvas"),b=100;m.width=b,m.height=b;var B=m.getContext("2d");if(!B)return Promise.reject(!1);B.fillStyle="rgb(0, 255, 0)",B.fillRect(0,0,b,b);var Q=new Image,V=m.toDataURL();Q.src=V;var tt=Gu(b,b,0,0,Q);return B.fillStyle="red",B.fillRect(0,0,b,b),fc(tt).then(function(lt){B.drawImage(lt,0,0);var at=B.getImageData(0,0,b,b).data;B.fillStyle="red",B.fillRect(0,0,b,b);var bt=E.createElement("div");return bt.style.backgroundImage="url("+V+")",bt.style.height=b+"px",nA(at)?fc(Gu(b,b,0,0,bt)):Promise.reject(!1)}).then(function(lt){return B.drawImage(lt,0,0),nA(B.getImageData(0,0,b,b).data)}).catch(function(){return!1})},Gu=function(E,m,b,B,Q){var V="http://www.w3.org/2000/svg",tt=document.createElementNS(V,"svg"),lt=document.createElementNS(V,"foreignObject");return tt.setAttributeNS(null,"width",E.toString()),tt.setAttributeNS(null,"height",m.toString()),lt.setAttributeNS(null,"width","100%"),lt.setAttributeNS(null,"height","100%"),lt.setAttributeNS(null,"x",b.toString()),lt.setAttributeNS(null,"y",B.toString()),lt.setAttributeNS(null,"externalResourcesRequired","true"),tt.appendChild(lt),lt.appendChild(Q),tt},fc=function(E){return new Promise(function(m,b){var B=new Image;B.onload=function(){return m(B)},B.onerror=b,B.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(E))})},ri={get SUPPORT_RANGE_BOUNDS(){var E=fE(document);return Object.defineProperty(ri,"SUPPORT_RANGE_BOUNDS",{value:E}),E},get SUPPORT_WORD_BREAKING(){var E=ri.SUPPORT_RANGE_BOUNDS&&gE(document);return Object.defineProperty(ri,"SUPPORT_WORD_BREAKING",{value:E}),E},get SUPPORT_SVG_DRAWING(){var E=mE(document);return Object.defineProperty(ri,"SUPPORT_SVG_DRAWING",{value:E}),E},get SUPPORT_FOREIGNOBJECT_DRAWING(){var E=typeof Array.from=="function"&&typeof window.fetch=="function"?Pd(document):Promise.resolve(!1);return Object.defineProperty(ri,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:E}),E},get SUPPORT_CORS_IMAGES(){var E=vE();return Object.defineProperty(ri,"SUPPORT_CORS_IMAGES",{value:E}),E},get SUPPORT_RESPONSE_TYPE(){var E=pE();return Object.defineProperty(ri,"SUPPORT_RESPONSE_TYPE",{value:E}),E},get SUPPORT_CORS_XHR(){var E="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ri,"SUPPORT_CORS_XHR",{value:E}),E},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var E=!!(typeof Intl!="undefined"&&Intl.Segmenter);return Object.defineProperty(ri,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:E}),E}},gc=function(){function E(m,b){this.text=m,this.bounds=b}return E}(),Tp=function(E,m,b,B){var Q=Ja(m,b),V=[],tt=0;return Q.forEach(function(lt){if(b.textDecorationLine.length||lt.trim().length>0)if(ri.SUPPORT_RANGE_BOUNDS){var at=ii(B,tt,lt.length).getClientRects();if(at.length>1){var bt=Xa(lt),St=0;bt.forEach(function(Jt){V.push(new gc(Jt,N.fromDOMRectList(E,ii(B,St+tt,Jt.length).getClientRects()))),St+=Jt.length})}else V.push(new gc(lt,N.fromDOMRectList(E,at)))}else{var Ut=B.splitText(lt.length);V.push(new gc(lt,Op(E,B))),B=Ut}else ri.SUPPORT_RANGE_BOUNDS||(B=B.splitText(lt.length));tt+=lt.length}),V},Op=function(E,m){var b=m.ownerDocument;if(b){var B=b.createElement("html2canvaswrapper");B.appendChild(m.cloneNode(!0));var Q=m.parentNode;if(Q){Q.replaceChild(B,m);var V=G(E,B);return B.firstChild&&Q.replaceChild(B.firstChild,B),V}}return N.EMPTY},ii=function(E,m,b){var B=E.ownerDocument;if(!B)throw new Error("Node has no owner document");var Q=B.createRange();return Q.setStart(E,m),Q.setEnd(E,m+b),Q},Xa=function(E){if(ri.SUPPORT_NATIVE_TEXT_SEGMENTATION){var m=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(m.segment(E)).map(function(b){return b.segment})}return dc(E)},Ws=function(E,m){if(ri.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 vc(E,m)},Ja=function(E,m){return m.letterSpacing!==0?Xa(E):Ws(E,m)},Kt=[32,160,4961,65792,65793,4153,4241],vc=function(E,m){for(var b=ot(E,{lineBreak:m.lineBreak,wordBreak:m.overflowWrap==="break-word"?"break-word":m.wordBreak}),B=[],Q,V=function(){if(Q.value){var tt=Q.value.slice(),lt=_(tt),at="";lt.forEach(function(bt){Kt.indexOf(bt)===-1?at+=H(bt):(at.length&&B.push(at),B.push(H(bt)),at="")}),at.length&&B.push(at)}};!(Q=b.next()).done;)V();return B},ds=function(){function E(m,b,B){this.text=Ip(b.data,B.textTransform),this.textBounds=Tp(m,this.text,B,b)}return E}(),Ip=function(E,m){switch(m){case 1:return E.toLowerCase();case 3:return E.replace(zu,rA);case 2:return E.toUpperCase();default:return E}},zu=/(^|\s|:|-|\(|\))([a-z])/g,rA=function(E,m,b){return E.length>0?m+b.toUpperCase():E},_d=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q.src=B.currentSrc||B.src,Q.intrinsicWidth=B.naturalWidth,Q.intrinsicHeight=B.naturalHeight,Q.context.cache.addImage(Q.src),Q}return m}(Sa),Hd=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q.canvas=B,Q.intrinsicWidth=B.width,Q.intrinsicHeight=B.height,Q}return m}(Sa),Ku=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this,V=new XMLSerializer,tt=G(b,B);return B.setAttribute("width",tt.width+"px"),B.setAttribute("height",tt.height+"px"),Q.svg="data:image/svg+xml,"+encodeURIComponent(V.serializeToString(B)),Q.intrinsicWidth=B.width.baseVal.value,Q.intrinsicHeight=B.height.baseVal.value,Q.context.cache.addImage(Q.svg),Q}return m}(Sa),pc=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q.value=B.value,Q}return m}(Sa),Zn=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q.start=B.start,Q.reversed=typeof B.reversed=="boolean"&&B.reversed===!0,Q}return m}(Sa),Np=[{type:15,flags:0,unit:"px",number:3}],iA=[{type:16,flags:0,number:50}],Lp=function(E){return E.width>E.height?new N(E.left+(E.width-E.height)/2,E.top,E.height,E.height):E.width<E.height?new N(E.left,E.top+(E.height-E.width)/2,E.width,E.width):E},ai=function(E){var m=E.type===aA?new Array(E.value.length+1).join("\u2022"):E.value;return m.length===0?E.placeholder||"":m},fs="checkbox",On="radio",aA="password",Gd=707406591,js=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;switch(Q.type=B.type.toLowerCase(),Q.checked=B.checked,Q.value=ai(B),(Q.type===fs||Q.type===On)&&(Q.styles.backgroundColor=3739148031,Q.styles.borderTopColor=Q.styles.borderRightColor=Q.styles.borderBottomColor=Q.styles.borderLeftColor=2779096575,Q.styles.borderTopWidth=Q.styles.borderRightWidth=Q.styles.borderBottomWidth=Q.styles.borderLeftWidth=1,Q.styles.borderTopStyle=Q.styles.borderRightStyle=Q.styles.borderBottomStyle=Q.styles.borderLeftStyle=1,Q.styles.backgroundClip=[0],Q.styles.backgroundOrigin=[0],Q.bounds=Lp(Q.bounds)),Q.type){case fs:Q.styles.borderTopRightRadius=Q.styles.borderTopLeftRadius=Q.styles.borderBottomRightRadius=Q.styles.borderBottomLeftRadius=Np;break;case On:Q.styles.borderTopRightRadius=Q.styles.borderTopLeftRadius=Q.styles.borderBottomRightRadius=Q.styles.borderBottomLeftRadius=iA;break}return Q}return m}(Sa),mc=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this,V=B.options[B.selectedIndex||0];return Q.value=V&&V.text||"",Q}return m}(Sa),pi=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q.value=B.value,Q}return m}(Sa),zd=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;Q.src=B.src,Q.width=parseInt(B.width,10)||0,Q.height=parseInt(B.height,10)||0,Q.backgroundColor=Q.styles.backgroundColor;try{if(B.contentWindow&&B.contentWindow.document&&B.contentWindow.document.documentElement){Q.tree=Kd(b,B.contentWindow.document.documentElement);var V=B.contentWindow.document.documentElement?$l(b,getComputedStyle(B.contentWindow.document.documentElement).backgroundColor):Gs.TRANSPARENT,tt=B.contentWindow.document.body?$l(b,getComputedStyle(B.contentWindow.document.body).backgroundColor):Gs.TRANSPARENT;Q.backgroundColor=wo(V)?wo(tt)?Q.styles.backgroundColor:tt:V}}catch(lt){}return Q}return m}(Sa),Un=["OL","UL","MENU"],yc=function(E,m,b,B){for(var Q=m.firstChild,V=void 0;Q;Q=V)if(V=Q.nextSibling,Vd(Q)&&Q.data.trim().length>0)b.textNodes.push(new ds(E,Q,b.styles));else if(gs(Q))if(Bc(Q)&&Q.assignedNodes)Q.assignedNodes().forEach(function(lt){return yc(E,lt,b,B)});else{var tt=bi(E,Q);tt.styles.isVisible()&&(yE(Q,tt,B)?tt.flags|=4:wE(tt.styles)&&(tt.flags|=2),Un.indexOf(Q.tagName)!==-1&&(tt.flags|=8),b.elements.push(tt),Q.slot,Q.shadowRoot?yc(E,Q.shadowRoot,tt,B):!oA(Q)&&!Fa(Q)&&!In(Q)&&yc(E,Q,tt,B))}},bi=function(E,m){return Ec(m)?new _d(E,m):sA(m)?new Hd(E,m):Fa(m)?new Ku(E,m):Wu(m)?new pc(E,m):kp(m)?new Zn(E,m):Qp(m)?new js(E,m):In(m)?new mc(E,m):oA(m)?new pi(E,m):jd(m)?new zd(E,m):new Sa(E,m)},Kd=function(E,m){var b=bi(E,m);return b.flags|=4,yc(E,m,b,b),b},yE=function(E,m,b){return m.styles.isPositionedWithZIndex()||m.styles.opacity<1||m.styles.isTransformed()||ta(E)&&b.styles.isTransparent()},wE=function(E){return E.isPositioned()||E.isFloating()},Vd=function(E){return E.nodeType===Node.TEXT_NODE},gs=function(E){return E.nodeType===Node.ELEMENT_NODE},Vu=function(E){return gs(E)&&typeof E.style!="undefined"&&!wc(E)},wc=function(E){return typeof E.className=="object"},Wu=function(E){return E.tagName==="LI"},kp=function(E){return E.tagName==="OL"},Qp=function(E){return E.tagName==="INPUT"},Wd=function(E){return E.tagName==="HTML"},Fa=function(E){return E.tagName==="svg"},ta=function(E){return E.tagName==="BODY"},sA=function(E){return E.tagName==="CANVAS"},Ke=function(E){return E.tagName==="VIDEO"},Ec=function(E){return E.tagName==="IMG"},jd=function(E){return E.tagName==="IFRAME"},Zd=function(E){return E.tagName==="STYLE"},Up=function(E){return E.tagName==="SCRIPT"},oA=function(E){return E.tagName==="TEXTAREA"},In=function(E){return E.tagName==="SELECT"},Bc=function(E){return E.tagName==="SLOT"},ea=function(E){return E.tagName.indexOf("-")>0},Yd=function(){function E(){this.counters={}}return E.prototype.getCounterValue=function(m){var b=this.counters[m];return b&&b.length?b[b.length-1]:1},E.prototype.getCounterValues=function(m){var b=this.counters[m];return b||[]},E.prototype.pop=function(m){var b=this;m.forEach(function(B){return b.counters[B].pop()})},E.prototype.parse=function(m){var b=this,B=m.counterIncrement,Q=m.counterReset,V=!0;B!==null&&B.forEach(function(lt){var at=b.counters[lt.counter];at&<.increment!==0&&(V=!1,at.length||at.push(1),at[Math.max(0,at.length-1)]+=lt.increment)});var tt=[];return V&&Q.forEach(function(lt){var at=b.counters[lt.counter];tt.push(lt.counter),at||(at=b.counters[lt.counter]=[]),at.push(lt.reset)}),tt},E}(),ju={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"]},Zu={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"]},Rp={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"]},bc={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"]},AA=function(E,m,b,B,Q,V){return E<m||E>b?ps(E,Q,V.length>0):B.integers.reduce(function(tt,lt,at){for(;E>=lt;)E-=lt,tt+=B.values[at];return tt},"")+V},lA=function(E,m,b,B){var Q="";do b||E--,Q=B(E)+Q,E/=m;while(E*m>=m);return Q},xr=function(E,m,b,B,Q){var V=b-m+1;return(E<0?"-":"")+(lA(Math.abs(E),V,B,function(tt){return H(Math.floor(tt%V)+m)})+Q)},Zs=function(E,m,b){b===void 0&&(b=". ");var B=m.length;return lA(Math.abs(E),B,!1,function(Q){return m[Math.floor(Q%B)]})+b},cA=1,vs=2,oe=4,Bo=8,qa=function(E,m,b,B,Q,V){if(E<-9999||E>9999)return ps(E,4,Q.length>0);var tt=Math.abs(E),lt=Q;if(tt===0)return m[0]+lt;for(var at=0;tt>0&&at<=4;at++){var bt=tt%10;bt===0&&Rr(V,cA)&<!==""?lt=m[bt]+lt:bt>1||bt===1&&at===0||bt===1&&at===1&&Rr(V,vs)||bt===1&&at===1&&Rr(V,oe)&&E>100||bt===1&&at>1&&Rr(V,Bo)?lt=m[bt]+(at>0?b[at-1]:"")+lt:bt===1&&at>0&&(lt=b[at-1]+lt),tt=Math.floor(tt/10)}return(E<0?B:"")+lt},uA="\u5341\u767E\u5343\u842C",hA="\u62FE\u4F70\u4EDF\u842C",el="\u30DE\u30A4\u30CA\u30B9",Ys="\uB9C8\uC774\uB108\uC2A4",ps=function(E,m,b){var B=b?". ":"",Q=b?"\u3001":"",V=b?", ":"",tt=b?" ":"";switch(m){case 0:return"\u2022"+tt;case 1:return"\u25E6"+tt;case 2:return"\u25FE"+tt;case 5:var lt=xr(E,48,57,!0,B);return lt.length<4?"0"+lt:lt;case 4:return Zs(E,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",Q);case 6:return AA(E,1,3999,ju,3,B).toLowerCase();case 7:return AA(E,1,3999,ju,3,B);case 8:return xr(E,945,969,!1,B);case 9:return xr(E,97,122,!1,B);case 10:return xr(E,65,90,!1,B);case 11:return xr(E,1632,1641,!0,B);case 12:case 49:return AA(E,1,9999,Zu,3,B);case 35:return AA(E,1,9999,Zu,3,B).toLowerCase();case 13:return xr(E,2534,2543,!0,B);case 14:case 30:return xr(E,6112,6121,!0,B);case 15:return Zs(E,"\u5B50\u4E11\u5BC5\u536F\u8FB0\u5DF3\u5348\u672A\u7533\u9149\u620C\u4EA5",Q);case 16:return Zs(E,"\u7532\u4E59\u4E19\u4E01\u620A\u5DF1\u5E9A\u8F9B\u58EC\u7678",Q);case 17:case 48:return qa(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",uA,"\u8CA0",Q,vs|oe|Bo);case 47:return qa(E,"\u96F6\u58F9\u8CB3\u53C3\u8086\u4F0D\u9678\u67D2\u634C\u7396",hA,"\u8CA0",Q,cA|vs|oe|Bo);case 42:return qa(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D",uA,"\u8D1F",Q,vs|oe|Bo);case 41:return qa(E,"\u96F6\u58F9\u8D30\u53C1\u8086\u4F0D\u9646\u67D2\u634C\u7396",hA,"\u8D1F",Q,cA|vs|oe|Bo);case 26:return qa(E,"\u3007\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u4E07",el,Q,0);case 25:return qa(E,"\u96F6\u58F1\u5F10\u53C2\u56DB\u4F0D\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343\u4E07",el,Q,cA|vs|oe);case 31:return qa(E,"\uC601\uC77C\uC774\uC0BC\uC0AC\uC624\uC721\uCE60\uD314\uAD6C","\uC2ED\uBC31\uCC9C\uB9CC",Ys,V,cA|vs|oe);case 33:return qa(E,"\u96F6\u4E00\u4E8C\u4E09\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u5341\u767E\u5343\u842C",Ys,V,0);case 32:return qa(E,"\u96F6\u58F9\u8CB3\u53C3\u56DB\u4E94\u516D\u4E03\u516B\u4E5D","\u62FE\u767E\u5343",Ys,V,cA|vs|oe);case 18:return xr(E,2406,2415,!0,B);case 20:return AA(E,1,19999,bc,3,B);case 21:return xr(E,2790,2799,!0,B);case 22:return xr(E,2662,2671,!0,B);case 22:return AA(E,1,10999,Rp,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 xr(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",Q);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",Q);case 34:return xr(E,3792,3801,!0,B);case 37:return xr(E,6160,6169,!0,B);case 38:return xr(E,4160,4169,!0,B);case 39:return xr(E,2918,2927,!0,B);case 40:return xr(E,1776,1785,!0,B);case 43:return xr(E,3046,3055,!0,B);case 44:return xr(E,3174,3183,!0,B);case 45:return xr(E,3664,3673,!0,B);case 46:return xr(E,3872,3881,!0,B);case 3:default:return xr(E,48,57,!0,B)}},Ta="data-html2canvas-ignore",Xd=function(){function E(m,b,B){if(this.context=m,this.options=B,this.scrolledElements=[],this.referenceElement=b,this.counters=new Yd,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(m,b){var B=this,Q=Dp(m,b);if(!Q.contentWindow)return Promise.reject("Unable to find iframe window");var V=m.defaultView.pageXOffset,tt=m.defaultView.pageYOffset,lt=Q.contentWindow,at=lt.document,bt=Hp(Q).then(function(){return W(B,void 0,void 0,function(){var St,Ut;return z(this,function(Jt){switch(Jt.label){case 0:return this.scrolledElements.forEach(Kp),lt&&(lt.scrollTo(b.left,b.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(lt.scrollY!==b.top||lt.scrollX!==b.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(lt.scrollX-b.left,lt.scrollY-b.top,0,0))),St=this.options.onclone,Ut=this.clonedReferenceElement,typeof Ut=="undefined"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:at.fonts&&at.fonts.ready?[4,at.fonts.ready]:[3,2];case 1:Jt.sent(),Jt.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,_p(at)]:[3,4];case 3:Jt.sent(),Jt.label=4;case 4:return typeof St=="function"?[2,Promise.resolve().then(function(){return St(at,Ut)}).then(function(){return Q})]:[2,Q]}})})});return at.open(),at.write(Jd(document.doctype)+"<html></html>"),zp(this.referenceElement.ownerDocument,V,tt),at.replaceChild(at.adoptNode(this.documentElement),at.documentElement),at.close(),bt},E.prototype.createElementClone=function(m){if(we(m,2))debugger;if(sA(m))return this.createCanvasClone(m);if(Ke(m))return this.createVideoClone(m);if(Zd(m))return this.createStyleClone(m);var b=m.cloneNode(!1);return Ec(b)&&(Ec(m)&&m.currentSrc&&m.currentSrc!==m.src&&(b.src=m.currentSrc,b.srcset=""),b.loading==="lazy"&&(b.loading="eager")),ea(b)?this.createCustomElementClone(b):b},E.prototype.createCustomElementClone=function(m){var b=document.createElement("html2canvascustomelement");return xc(m.style,b),b},E.prototype.createStyleClone=function(m){try{var b=m.sheet;if(b&&b.cssRules){var B=[].slice.call(b.cssRules,0).reduce(function(V,tt){return tt&&typeof tt.cssText=="string"?V+tt.cssText:V},""),Q=m.cloneNode(!1);return Q.textContent=B,Q}}catch(V){if(this.context.logger.error("Unable to access cssRules property",V),V.name!=="SecurityError")throw V}return m.cloneNode(!1)},E.prototype.createCanvasClone=function(m){var b;if(this.options.inlineImages&&m.ownerDocument){var B=m.ownerDocument.createElement("img");try{return B.src=m.toDataURL(),B}catch(bt){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",m)}}var Q=m.cloneNode(!1);try{Q.width=m.width,Q.height=m.height;var V=m.getContext("2d"),tt=Q.getContext("2d");if(tt)if(!this.options.allowTaint&&V)tt.putImageData(V.getImageData(0,0,m.width,m.height),0,0);else{var lt=(b=m.getContext("webgl2"))!==null&&b!==void 0?b:m.getContext("webgl");if(lt){var at=lt.getContextAttributes();(at==null?void 0:at.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",m)}tt.drawImage(m,0,0)}return Q}catch(bt){this.context.logger.info("Unable to clone canvas as it is tainted",m)}return Q},E.prototype.createVideoClone=function(m){var b=m.ownerDocument.createElement("canvas");b.width=m.offsetWidth,b.height=m.offsetHeight;var B=b.getContext("2d");try{return B&&(B.drawImage(m,0,0,b.width,b.height),this.options.allowTaint||B.getImageData(0,0,b.width,b.height)),b}catch(V){this.context.logger.info("Unable to clone video as it is tainted",m)}var Q=m.ownerDocument.createElement("canvas");return Q.width=m.offsetWidth,Q.height=m.offsetHeight,Q},E.prototype.appendChildNode=function(m,b,B){(!gs(b)||!Up(b)&&!b.hasAttribute(Ta)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(b)))&&(!this.options.copyStyles||!gs(b)||!Zd(b))&&m.appendChild(this.cloneNode(b,B))},E.prototype.cloneChildNodes=function(m,b,B){for(var Q=this,V=m.shadowRoot?m.shadowRoot.firstChild:m.firstChild;V;V=V.nextSibling)if(gs(V)&&Bc(V)&&typeof V.assignedNodes=="function"){var tt=V.assignedNodes();tt.length&&tt.forEach(function(lt){return Q.appendChildNode(b,lt,B)})}else this.appendChildNode(b,V,B)},E.prototype.cloneNode=function(m,b){if(Vd(m))return document.createTextNode(m.data);if(!m.ownerDocument)return m.cloneNode(!1);var B=m.ownerDocument.defaultView;if(B&&gs(m)&&(Vu(m)||wc(m))){var Q=this.createElementClone(m);Q.style.transitionProperty="none";var V=B.getComputedStyle(m),tt=B.getComputedStyle(m,":before"),lt=B.getComputedStyle(m,":after");this.referenceElement===m&&Vu(Q)&&(this.clonedReferenceElement=Q),ta(Q)&&Vp(Q);var at=this.counters.parse(new eA(this.context,V)),bt=this.resolvePseudoContent(m,Q,tt,nl.BEFORE);ea(m)&&(b=!0),Ke(m)||this.cloneChildNodes(m,Q,b),bt&&Q.insertBefore(bt,Q.firstChild);var St=this.resolvePseudoContent(m,Q,lt,nl.AFTER);return St&&Q.appendChild(St),this.counters.pop(at),(V&&(this.options.copyStyles||wc(m))&&!jd(m)||b)&&xc(V,Q),(m.scrollTop!==0||m.scrollLeft!==0)&&this.scrolledElements.push([Q,m.scrollLeft,m.scrollTop]),(oA(m)||In(m))&&(oA(Q)||In(Q))&&(Q.value=m.value),Q}return m.cloneNode(!1)},E.prototype.resolvePseudoContent=function(m,b,B,Q){var V=this;if(B){var tt=B.content,lt=b.ownerDocument;if(!(!lt||!tt||tt==="none"||tt==="-moz-alt-content"||B.display==="none")){this.counters.parse(new eA(this.context,B));var at=new vp(this.context,B),bt=lt.createElement("html2canvaspseudoelement");xc(B,bt),at.content.forEach(function(Ut){if(Ut.type===0)bt.appendChild(lt.createTextNode(Ut.value));else if(Ut.type===22){var Jt=lt.createElement("img");Jt.src=Ut.value,Jt.style.opacity="1",bt.appendChild(Jt)}else if(Ut.type===18){if(Ut.name==="attr"){var Te=Ut.values.filter($n);Te.length&&bt.appendChild(lt.createTextNode(m.getAttribute(Te[0].value)||""))}else if(Ut.name==="counter"){var he=Ut.values.filter(WA),Be=he[0],rn=he[1];if(Be&&$n(Be)){var Ue=V.counters.getCounterValue(Be.value),Le=rn&&$n(rn)?Ou.parse(V.context,rn.value):3;bt.appendChild(lt.createTextNode(ps(Ue,Le,!1)))}}else if(Ut.name==="counters"){var Mn=Ut.values.filter(WA),Be=Mn[0],An=Mn[1],rn=Mn[2];if(Be&&$n(Be)){var Ye=V.counters.getCounterValues(Be.value),Fe=rn&&$n(rn)?Ou.parse(V.context,rn.value):3,bn=An&&An.type===0?An.value:"",xn=Ye.map(function(si){return ps(si,Fe,!1)}).join(bn);bt.appendChild(lt.createTextNode(xn))}}}else if(Ut.type===20)switch(Ut.value){case"open-quote":bt.appendChild(lt.createTextNode(Sd(at.quotes,V.quoteDepth++,!0)));break;case"close-quote":bt.appendChild(lt.createTextNode(Sd(at.quotes,--V.quoteDepth,!1)));break;default:bt.appendChild(lt.createTextNode(Ut.value))}}),bt.className=Sc+" "+dA;var St=Q===nl.BEFORE?" "+Sc:" "+dA;return wc(b)?b.className.baseValue+=St:b.className+=St,bt}}},E.destroy=function(m){return m.parentNode?(m.parentNode.removeChild(m),!0):!1},E}(),nl;(function(E){E[E.BEFORE=0]="BEFORE",E[E.AFTER=1]="AFTER"})(nl||(nl={}));var Dp=function(E,m){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=m.width.toString(),b.height=m.height.toString(),b.scrolling="no",b.setAttribute(Ta,"true"),E.body.appendChild(b),b},Pp=function(E){return new Promise(function(m){if(E.complete){m();return}if(!E.src){m();return}E.onload=m,E.onerror=m})},_p=function(E){return Promise.all([].slice.call(E.images,0).map(Pp))},Hp=function(E){return new Promise(function(m,b){var B=E.contentWindow;if(!B)return b("No window assigned for iframe");var Q=B.document;B.onload=E.onload=function(){B.onload=E.onload=null;var V=setInterval(function(){Q.body.childNodes.length>0&&Q.readyState==="complete"&&(clearInterval(V),m(E))},50)}})},Gp=["all","d","content"],xc=function(E,m){for(var b=E.length-1;b>=0;b--){var B=E.item(b);Gp.indexOf(B)===-1&&m.style.setProperty(B,E.getPropertyValue(B))}return m},Jd=function(E){var m="";return E&&(m+="<!DOCTYPE ",E.name&&(m+=E.name),E.internalSubset&&(m+=E.internalSubset),E.publicId&&(m+='"'+E.publicId+'"'),E.systemId&&(m+='"'+E.systemId+'"'),m+=">"),m},zp=function(E,m,b){E&&E.defaultView&&(m!==E.defaultView.pageXOffset||b!==E.defaultView.pageYOffset)&&E.defaultView.scrollTo(m,b)},Kp=function(E){var m=E[0],b=E[1],B=E[2];m.scrollLeft=b,m.scrollTop=B},qd=":before",Cc=":after",Sc="___html2canvas___pseudoelement_before",dA="___html2canvas___pseudoelement_after",$d=`{
|
|
|
content: "" !important;
|
|
|
display: none !important;
|
|
|
}`,Vp=function(E){Ui(E,"."+Sc+qd+$d+`
|
|
|
.`+dA+Cc+$d)},Ui=function(E,m){var b=E.ownerDocument;if(b){var B=b.createElement("style");B.textContent=m,E.appendChild(B)}},Yu=function(){function E(){}return E.getOrigin=function(m){var b=E._link;return b?(b.href=m,b.href=b.href,b.protocol+b.hostname+b.port):"about:blank"},E.isSameOrigin=function(m){return E.getOrigin(m)===E._origin},E.setContext=function(m){E._link=m.document.createElement("a"),E._origin=E.getOrigin(m.location.href)},E._origin="about:blank",E}(),Wp=function(){function E(m,b){this.context=m,this._options=b,this._cache={}}return E.prototype.addImage=function(m){var b=Promise.resolve();return this.has(m)||(Xu(m)||xo(m))&&(this._cache[m]=this.loadImage(m)).catch(function(){}),b},E.prototype.match=function(m){return this._cache[m]},E.prototype.loadImage=function(m){return W(this,void 0,void 0,function(){var b,B,Q,V,tt=this;return z(this,function(lt){switch(lt.label){case 0:return b=Yu.isSameOrigin(m),B=!Fc(m)&&this._options.useCORS===!0&&ri.SUPPORT_CORS_IMAGES&&!b,Q=!Fc(m)&&!b&&!Xu(m)&&typeof this._options.proxy=="string"&&ri.SUPPORT_CORS_XHR&&!B,!b&&this._options.allowTaint===!1&&!Fc(m)&&!Xu(m)&&!Q&&!B?[2]:(V=m,Q?[4,this.proxy(V)]:[3,2]);case 1:V=lt.sent(),lt.label=2;case 2:return this.context.logger.debug("Added image "+m.substring(0,256)),[4,new Promise(function(at,bt){var St=new Image;St.onload=function(){return at(St)},St.onerror=bt,(ef(V)||B)&&(St.crossOrigin="anonymous"),St.src=V,St.complete===!0&&setTimeout(function(){return at(St)},500),tt._options.imageTimeout>0&&setTimeout(function(){return bt("Timed out ("+tt._options.imageTimeout+"ms) loading image")},tt._options.imageTimeout)})];case 3:return[2,lt.sent()]}})})},E.prototype.has=function(m){return typeof this._cache[m]!="undefined"},E.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},E.prototype.proxy=function(m){var b=this,B=this._options.proxy;if(!B)throw new Error("No proxy defined");var Q=m.substring(0,256);return new Promise(function(V,tt){var lt=ri.SUPPORT_RESPONSE_TYPE?"blob":"text",at=new XMLHttpRequest;at.onload=function(){if(at.status===200)if(lt==="text")V(at.response);else{var Ut=new FileReader;Ut.addEventListener("load",function(){return V(Ut.result)},!1),Ut.addEventListener("error",function(Jt){return tt(Jt)},!1),Ut.readAsDataURL(at.response)}else tt("Failed to proxy resource "+Q+" with status code "+at.status)},at.onerror=tt;var bt=B.indexOf("?")>-1?"&":"?";if(at.open("GET",""+B+bt+"url="+encodeURIComponent(m)+"&responseType="+lt),lt!=="text"&&at instanceof XMLHttpRequest&&(at.responseType=lt),b._options.imageTimeout){var St=b._options.imageTimeout;at.timeout=St,at.ontimeout=function(){return tt("Timed out ("+St+"ms) proxying "+Q)}}at.send()})},E}(),tf=/^data:image\/svg\+xml/i,Mc=/^data:image\/.*;base64,/i,bo=/^data:image\/.*/i,xo=function(E){return ri.SUPPORT_SVG_DRAWING||!Oa(E)},Fc=function(E){return bo.test(E)},ef=function(E){return Mc.test(E)},Xu=function(E){return E.substr(0,4)==="blob"},Oa=function(E){return E.substr(-3).toLowerCase()==="svg"||tf.test(E)},Se=function(){function E(m,b){this.type=0,this.x=m,this.y=b}return E.prototype.add=function(m,b){return new E(this.x+m,this.y+b)},E}(),ms=function(E,m,b){return new Se(E.x+(m.x-E.x)*b,E.y+(m.y-E.y)*b)},fA=function(){function E(m,b,B,Q){this.type=1,this.start=m,this.startControl=b,this.endControl=B,this.end=Q}return E.prototype.subdivide=function(m,b){var B=ms(this.start,this.startControl,m),Q=ms(this.startControl,this.endControl,m),V=ms(this.endControl,this.end,m),tt=ms(B,Q,m),lt=ms(Q,V,m),at=ms(tt,lt,m);return b?new E(this.start,B,tt,at):new E(at,lt,V,this.end)},E.prototype.add=function(m,b){return new E(this.start.add(m,b),this.startControl.add(m,b),this.endControl.add(m,b),this.end.add(m,b))},E.prototype.reverse=function(){return new E(this.end,this.endControl,this.startControl,this.start)},E}(),Nn=function(E){return E.type===1},fe=function(){function E(m){var b=m.styles,B=m.bounds,Q=ZA(b.borderTopLeftRadius,B.width,B.height),V=Q[0],tt=Q[1],lt=ZA(b.borderTopRightRadius,B.width,B.height),at=lt[0],bt=lt[1],St=ZA(b.borderBottomRightRadius,B.width,B.height),Ut=St[0],Jt=St[1],Te=ZA(b.borderBottomLeftRadius,B.width,B.height),he=Te[0],Be=Te[1],rn=[];rn.push((V+at)/B.width),rn.push((he+Ut)/B.width),rn.push((tt+Be)/B.height),rn.push((bt+Jt)/B.height);var Ue=Math.max.apply(Math,rn);Ue>1&&(V/=Ue,tt/=Ue,at/=Ue,bt/=Ue,Ut/=Ue,Jt/=Ue,he/=Ue,Be/=Ue);var Le=B.width-at,Mn=B.height-Jt,An=B.width-Ut,Ye=B.height-Be,Fe=b.borderTopWidth,bn=b.borderRightWidth,xn=b.borderBottomWidth,We=b.borderLeftWidth,Or=Gn(b.paddingTop,m.bounds.width),si=Gn(b.paddingRight,m.bounds.width),Di=Gn(b.paddingBottom,m.bounds.width),zn=Gn(b.paddingLeft,m.bounds.width);this.topLeftBorderDoubleOuterBox=V>0||tt>0?lr(B.left+We/3,B.top+Fe/3,V-We/3,tt-Fe/3,un.TOP_LEFT):new Se(B.left+We/3,B.top+Fe/3),this.topRightBorderDoubleOuterBox=V>0||tt>0?lr(B.left+Le,B.top+Fe/3,at-bn/3,bt-Fe/3,un.TOP_RIGHT):new Se(B.left+B.width-bn/3,B.top+Fe/3),this.bottomRightBorderDoubleOuterBox=Ut>0||Jt>0?lr(B.left+An,B.top+Mn,Ut-bn/3,Jt-xn/3,un.BOTTOM_RIGHT):new Se(B.left+B.width-bn/3,B.top+B.height-xn/3),this.bottomLeftBorderDoubleOuterBox=he>0||Be>0?lr(B.left+We/3,B.top+Ye,he-We/3,Be-xn/3,un.BOTTOM_LEFT):new Se(B.left+We/3,B.top+B.height-xn/3),this.topLeftBorderDoubleInnerBox=V>0||tt>0?lr(B.left+We*2/3,B.top+Fe*2/3,V-We*2/3,tt-Fe*2/3,un.TOP_LEFT):new Se(B.left+We*2/3,B.top+Fe*2/3),this.topRightBorderDoubleInnerBox=V>0||tt>0?lr(B.left+Le,B.top+Fe*2/3,at-bn*2/3,bt-Fe*2/3,un.TOP_RIGHT):new Se(B.left+B.width-bn*2/3,B.top+Fe*2/3),this.bottomRightBorderDoubleInnerBox=Ut>0||Jt>0?lr(B.left+An,B.top+Mn,Ut-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=he>0||Be>0?lr(B.left+We*2/3,B.top+Ye,he-We*2/3,Be-xn*2/3,un.BOTTOM_LEFT):new Se(B.left+We*2/3,B.top+B.height-xn*2/3),this.topLeftBorderStroke=V>0||tt>0?lr(B.left+We/2,B.top+Fe/2,V-We/2,tt-Fe/2,un.TOP_LEFT):new Se(B.left+We/2,B.top+Fe/2),this.topRightBorderStroke=V>0||tt>0?lr(B.left+Le,B.top+Fe/2,at-bn/2,bt-Fe/2,un.TOP_RIGHT):new Se(B.left+B.width-bn/2,B.top+Fe/2),this.bottomRightBorderStroke=Ut>0||Jt>0?lr(B.left+An,B.top+Mn,Ut-bn/2,Jt-xn/2,un.BOTTOM_RIGHT):new Se(B.left+B.width-bn/2,B.top+B.height-xn/2),this.bottomLeftBorderStroke=he>0||Be>0?lr(B.left+We/2,B.top+Ye,he-We/2,Be-xn/2,un.BOTTOM_LEFT):new Se(B.left+We/2,B.top+B.height-xn/2),this.topLeftBorderBox=V>0||tt>0?lr(B.left,B.top,V,tt,un.TOP_LEFT):new Se(B.left,B.top),this.topRightBorderBox=at>0||bt>0?lr(B.left+Le,B.top,at,bt,un.TOP_RIGHT):new Se(B.left+B.width,B.top),this.bottomRightBorderBox=Ut>0||Jt>0?lr(B.left+An,B.top+Mn,Ut,Jt,un.BOTTOM_RIGHT):new Se(B.left+B.width,B.top+B.height),this.bottomLeftBorderBox=he>0||Be>0?lr(B.left,B.top+Ye,he,Be,un.BOTTOM_LEFT):new Se(B.left,B.top+B.height),this.topLeftPaddingBox=V>0||tt>0?lr(B.left+We,B.top+Fe,Math.max(0,V-We),Math.max(0,tt-Fe),un.TOP_LEFT):new Se(B.left+We,B.top+Fe),this.topRightPaddingBox=at>0||bt>0?lr(B.left+Math.min(Le,B.width-bn),B.top+Fe,Le>B.width+bn?0:Math.max(0,at-bn),Math.max(0,bt-Fe),un.TOP_RIGHT):new Se(B.left+B.width-bn,B.top+Fe),this.bottomRightPaddingBox=Ut>0||Jt>0?lr(B.left+Math.min(An,B.width-We),B.top+Math.min(Mn,B.height-xn),Math.max(0,Ut-bn),Math.max(0,Jt-xn),un.BOTTOM_RIGHT):new Se(B.left+B.width-bn,B.top+B.height-xn),this.bottomLeftPaddingBox=he>0||Be>0?lr(B.left+We,B.top+Math.min(Ye,B.height-xn),Math.max(0,he-We),Math.max(0,Be-xn),un.BOTTOM_LEFT):new Se(B.left+We,B.top+B.height-xn),this.topLeftContentBox=V>0||tt>0?lr(B.left+We+zn,B.top+Fe+Or,Math.max(0,V-(We+zn)),Math.max(0,tt-(Fe+Or)),un.TOP_LEFT):new Se(B.left+We+zn,B.top+Fe+Or),this.topRightContentBox=at>0||bt>0?lr(B.left+Math.min(Le,B.width+We+zn),B.top+Fe+Or,Le>B.width+We+zn?0:at-We+zn,bt-(Fe+Or),un.TOP_RIGHT):new Se(B.left+B.width-(bn+si),B.top+Fe+Or),this.bottomRightContentBox=Ut>0||Jt>0?lr(B.left+Math.min(An,B.width-(We+zn)),B.top+Math.min(Mn,B.height+Fe+Or),Math.max(0,Ut-(bn+si)),Jt-(xn+Di),un.BOTTOM_RIGHT):new Se(B.left+B.width-(bn+si),B.top+B.height-(xn+Di)),this.bottomLeftContentBox=he>0||Be>0?lr(B.left+We+zn,B.top+Ye,Math.max(0,he-(We+zn)),Be-(xn+Di),un.BOTTOM_LEFT):new Se(B.left+We+zn,B.top+B.height-(xn+Di))}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 lr=function(E,m,b,B,Q){var V=4*((Math.sqrt(2)-1)/3),tt=b*V,lt=B*V,at=E+b,bt=m+B;switch(Q){case un.TOP_LEFT:return new fA(new Se(E,bt),new Se(E,bt-lt),new Se(at-tt,m),new Se(at,m));case un.TOP_RIGHT:return new fA(new Se(E,m),new Se(E+tt,m),new Se(at,bt-lt),new Se(at,bt));case un.BOTTOM_RIGHT:return new fA(new Se(at,m),new Se(at,m+lt),new Se(E+tt,bt),new Se(E,bt));case un.BOTTOM_LEFT:default:return new fA(new Se(at,bt),new Se(at-tt,bt),new Se(E,m+lt),new Se(E,m))}},Tc=function(E){return[E.topLeftBorderBox,E.topRightBorderBox,E.bottomRightBorderBox,E.bottomLeftBorderBox]},jp=function(E){return[E.topLeftContentBox,E.topRightContentBox,E.bottomRightContentBox,E.bottomLeftContentBox]},ys=function(E){return[E.topLeftPaddingBox,E.topRightPaddingBox,E.bottomRightPaddingBox,E.bottomLeftPaddingBox]},Zp=function(){function E(m,b,B){this.offsetX=m,this.offsetY=b,this.matrix=B,this.type=0,this.target=6}return E}(),Oc=function(){function E(m,b){this.path=m,this.target=b,this.type=1}return E}(),Yp=function(){function E(m){this.opacity=m,this.type=2,this.target=6}return E}(),Xp=function(E){return E.type===0},Ju=function(E){return E.type===1},qu=function(E){return E.type===2},rl=function(E,m){return E.length===m.length?E.some(function(b,B){return b===m[B]}):!1},Jp=function(E,m,b,B,Q){return E.map(function(V,tt){switch(tt){case 0:return V.add(m,b);case 1:return V.add(m+B,b);case 2:return V.add(m+B,b+Q);case 3:return V.add(m,b+Q)}return V})},ws=function(){function E(m){this.element=m,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return E}(),il=function(){function E(m,b){if(this.container=m,this.parent=b,this.effects=[],this.curves=new fe(this.container),this.container.styles.opacity<1&&this.effects.push(new Yp(this.container.styles.opacity)),this.container.styles.transform!==null){var B=this.container.bounds.left+this.container.styles.transformOrigin[0].number,Q=this.container.bounds.top+this.container.styles.transformOrigin[1].number,V=this.container.styles.transform;this.effects.push(new Zp(B,Q,V))}if(this.container.styles.overflowX!==0){var tt=Tc(this.curves),lt=ys(this.curves);rl(tt,lt)?this.effects.push(new Oc(tt,6)):(this.effects.push(new Oc(tt,2)),this.effects.push(new Oc(lt,4)))}}return E.prototype.getEffects=function(m){for(var b=[2,3].indexOf(this.container.styles.position)===-1,B=this.parent,Q=this.effects.slice(0);B;){var V=B.effects.filter(function(at){return!Ju(at)});if(b||B.container.styles.position!==0||!B.parent){if(Q.unshift.apply(Q,V),b=[2,3].indexOf(B.container.styles.position)===-1,B.container.styles.overflowX!==0){var tt=Tc(B.curves),lt=ys(B.curves);rl(tt,lt)||Q.unshift(new Oc(lt,6))}}else Q.unshift.apply(Q,V);B=B.parent}return Q.filter(function(at){return Rr(at.target,m)})},E}(),Ri=function(E,m,b,B){E.container.elements.forEach(function(Q){var V=Rr(Q.flags,4),tt=Rr(Q.flags,2),lt=new il(Q,E);Rr(Q.styles.display,2048)&&B.push(lt);var at=Rr(Q.flags,8)?[]:B;if(V||tt){var bt=V||Q.styles.isPositioned()?b:m,St=new ws(lt);if(Q.styles.isPositioned()||Q.styles.opacity<1||Q.styles.isTransformed()){var Ut=Q.styles.zIndex.order;if(Ut<0){var Jt=0;bt.negativeZIndex.some(function(he,Be){return Ut>he.element.container.styles.zIndex.order?(Jt=Be,!1):Jt>0}),bt.negativeZIndex.splice(Jt,0,St)}else if(Ut>0){var Te=0;bt.positiveZIndex.some(function(he,Be){return Ut>=he.element.container.styles.zIndex.order?(Te=Be+1,!1):Te>0}),bt.positiveZIndex.splice(Te,0,St)}else bt.zeroOrAutoZIndexOrTransformedOrOpacity.push(St)}else Q.styles.isFloating()?bt.nonPositionedFloats.push(St):bt.nonPositionedInlineLevel.push(St);Ri(lt,St,V?St:b,at)}else Q.styles.isInlineLevel()?m.inlineLevel.push(lt):m.nonInlineLevel.push(lt),Ri(lt,m,b,at);Rr(Q.flags,8)&&nf(Q,at)})},nf=function(E,m){for(var b=E instanceof Zn?E.start:1,B=E instanceof Zn?E.reversed:!1,Q=0;Q<m.length;Q++){var V=m[Q];V.container instanceof pc&&typeof V.container.value=="number"&&V.container.value!==0&&(b=V.container.value),V.listValue=ps(b,V.container.styles.listStyleType,!0),b+=B?-1:1}},$u=function(E){var m=new il(E,null),b=new ws(m),B=[];return Ri(m,b,b,B),nf(m.container,B),b},_n=function(E,m){switch(m){case 0:return da(E.topLeftBorderBox,E.topLeftPaddingBox,E.topRightBorderBox,E.topRightPaddingBox);case 1:return da(E.topRightBorderBox,E.topRightPaddingBox,E.bottomRightBorderBox,E.bottomRightPaddingBox);case 2:return da(E.bottomRightBorderBox,E.bottomRightPaddingBox,E.bottomLeftBorderBox,E.bottomLeftPaddingBox);case 3:default:return da(E.bottomLeftBorderBox,E.bottomLeftPaddingBox,E.topLeftBorderBox,E.topLeftPaddingBox)}},Ia=function(E,m){switch(m){case 0:return da(E.topLeftBorderBox,E.topLeftBorderDoubleOuterBox,E.topRightBorderBox,E.topRightBorderDoubleOuterBox);case 1:return da(E.topRightBorderBox,E.topRightBorderDoubleOuterBox,E.bottomRightBorderBox,E.bottomRightBorderDoubleOuterBox);case 2:return da(E.bottomRightBorderBox,E.bottomRightBorderDoubleOuterBox,E.bottomLeftBorderBox,E.bottomLeftBorderDoubleOuterBox);case 3:default:return da(E.bottomLeftBorderBox,E.bottomLeftBorderDoubleOuterBox,E.topLeftBorderBox,E.topLeftBorderDoubleOuterBox)}},Co=function(E,m){switch(m){case 0:return da(E.topLeftBorderDoubleInnerBox,E.topLeftPaddingBox,E.topRightBorderDoubleInnerBox,E.topRightPaddingBox);case 1:return da(E.topRightBorderDoubleInnerBox,E.topRightPaddingBox,E.bottomRightBorderDoubleInnerBox,E.bottomRightPaddingBox);case 2:return da(E.bottomRightBorderDoubleInnerBox,E.bottomRightPaddingBox,E.bottomLeftBorderDoubleInnerBox,E.bottomLeftPaddingBox);case 3:default:return da(E.bottomLeftBorderDoubleInnerBox,E.bottomLeftPaddingBox,E.topLeftBorderDoubleInnerBox,E.topLeftPaddingBox)}},th=function(E,m){switch(m){case 0:return al(E.topLeftBorderStroke,E.topRightBorderStroke);case 1:return al(E.topRightBorderStroke,E.bottomRightBorderStroke);case 2:return al(E.bottomRightBorderStroke,E.bottomLeftBorderStroke);case 3:default:return al(E.bottomLeftBorderStroke,E.topLeftBorderStroke)}},al=function(E,m){var b=[];return Nn(E)?b.push(E.subdivide(.5,!1)):b.push(E),Nn(m)?b.push(m.subdivide(.5,!0)):b.push(m),b},da=function(E,m,b,B){var Q=[];return Nn(E)?Q.push(E.subdivide(.5,!1)):Q.push(E),Nn(b)?Q.push(b.subdivide(.5,!0)):Q.push(b),Nn(B)?Q.push(B.subdivide(.5,!0).reverse()):Q.push(B),Nn(m)?Q.push(m.subdivide(.5,!1).reverse()):Q.push(m),Q},rf=function(E){var m=E.bounds,b=E.styles;return m.add(b.borderLeftWidth,b.borderTopWidth,-(b.borderRightWidth+b.borderLeftWidth),-(b.borderTopWidth+b.borderBottomWidth))},gA=function(E){var m=E.styles,b=E.bounds,B=Gn(m.paddingLeft,b.width),Q=Gn(m.paddingRight,b.width),V=Gn(m.paddingTop,b.width),tt=Gn(m.paddingBottom,b.width);return b.add(B+m.borderLeftWidth,V+m.borderTopWidth,-(m.borderRightWidth+m.borderLeftWidth+B+Q),-(m.borderTopWidth+m.borderBottomWidth+V+tt))},qp=function(E,m){return E===0?m.bounds:E===2?gA(m):rf(m)},af=function(E,m){return E===0?m.bounds:E===2?gA(m):rf(m)},Ic=function(E,m,b){var B=qp(pA(E.styles.backgroundOrigin,m),E),Q=af(pA(E.styles.backgroundClip,m),E),V=$p(pA(E.styles.backgroundSize,m),b,B),tt=V[0],lt=V[1],at=ZA(pA(E.styles.backgroundPosition,m),B.width-tt,B.height-lt),bt=tm(pA(E.styles.backgroundRepeat,m),at,V,B,Q),St=Math.round(B.left+at[0]),Ut=Math.round(B.top+at[1]);return[bt,St,Ut,tt,lt]},vA=function(E){return $n(E)&&E.value===JA.AUTO},Yn=function(E){return typeof E=="number"},$p=function(E,m,b){var B=m[0],Q=m[1],V=m[2],tt=E[0],lt=E[1];if(!tt)return[0,0];if(Ur(tt)&<&&Ur(lt))return[Gn(tt,b.width),Gn(lt,b.height)];var at=Yn(V);if($n(tt)&&(tt.value===JA.CONTAIN||tt.value===JA.COVER)){if(Yn(V)){var bt=b.width/b.height;return bt<V!=(tt.value===JA.COVER)?[b.width,b.width/V]:[b.height*V,b.height]}return[b.width,b.height]}var St=Yn(B),Ut=Yn(Q),Jt=St||Ut;if(vA(tt)&&(!lt||vA(lt))){if(St&&Ut)return[B,Q];if(!at&&!Jt)return[b.width,b.height];if(Jt&&at){var Te=St?B:Q*V,he=Ut?Q:B/V;return[Te,he]}var Be=St?B:b.width,rn=Ut?Q:b.height;return[Be,rn]}if(at){var Ue=0,Le=0;return Ur(tt)?Ue=Gn(tt,b.width):Ur(lt)&&(Le=Gn(lt,b.height)),vA(tt)?Ue=Le*V:(!lt||vA(lt))&&(Le=Ue/V),[Ue,Le]}var Mn=null,An=null;if(Ur(tt)?Mn=Gn(tt,b.width):lt&&Ur(lt)&&(An=Gn(lt,b.height)),Mn!==null&&(!lt||vA(lt))&&(An=St&&Ut?Mn/B*Q:b.height),An!==null&&vA(tt)&&(Mn=St&&Ut?An/Q*B:b.width),Mn!==null&&An!==null)return[Mn,An];throw new Error("Unable to calculate background-size for element")},pA=function(E,m){var b=E[m];return typeof b=="undefined"?E[0]:b},tm=function(E,m,b,B,Q){var V=m[0],tt=m[1],lt=b[0],at=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(at+B.top+tt)),new Se(Math.round(B.left),Math.round(at+B.top+tt))];case 3:return[new Se(Math.round(B.left+V),Math.round(B.top)),new Se(Math.round(B.left+V+lt),Math.round(B.top)),new Se(Math.round(B.left+V+lt),Math.round(B.height+B.top)),new Se(Math.round(B.left+V),Math.round(B.height+B.top))];case 1:return[new Se(Math.round(B.left+V),Math.round(B.top+tt)),new Se(Math.round(B.left+V+lt),Math.round(B.top+tt)),new Se(Math.round(B.left+V+lt),Math.round(B.top+tt+at)),new Se(Math.round(B.left+V),Math.round(B.top+tt+at))];default:return[new Se(Math.round(Q.left),Math.round(Q.top)),new Se(Math.round(Q.left+Q.width),Math.round(Q.top)),new Se(Math.round(Q.left+Q.width),Math.round(Q.height+Q.top)),new Se(Math.round(Q.left),Math.round(Q.height+Q.top))]}},em="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",sf="Hidden Text",nm=function(){function E(m){this._data={},this._document=m}return E.prototype.parseMetrics=function(m,b){var B=this._document.createElement("div"),Q=this._document.createElement("img"),V=this._document.createElement("span"),tt=this._document.body;B.style.visibility="hidden",B.style.fontFamily=m,B.style.fontSize=b,B.style.margin="0",B.style.padding="0",B.style.whiteSpace="nowrap",tt.appendChild(B),Q.src=em,Q.width=1,Q.height=1,Q.style.margin="0",Q.style.padding="0",Q.style.verticalAlign="baseline",V.style.fontFamily=m,V.style.fontSize=b,V.style.margin="0",V.style.padding="0",V.appendChild(this._document.createTextNode(sf)),B.appendChild(V),B.appendChild(Q);var lt=Q.offsetTop-V.offsetTop+2;B.removeChild(V),B.appendChild(this._document.createTextNode(sf)),B.style.lineHeight="normal",Q.style.verticalAlign="super";var at=Q.offsetTop-B.offsetTop+2;return tt.removeChild(B),{baseline:lt,middle:at}},E.prototype.getMetrics=function(m,b){var B=m+" "+b;return typeof this._data[B]=="undefined"&&(this._data[B]=this.parseMetrics(m,b)),this._data[B]},E}(),of=function(){function E(m,b){this.context=m,this.options=b}return E}(),Af=1e4,rm=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q._activeEffects=[],Q.canvas=B.canvas?B.canvas:document.createElement("canvas"),Q.ctx=Q.canvas.getContext("2d"),B.canvas||(Q.canvas.width=Math.floor(B.width*B.scale),Q.canvas.height=Math.floor(B.height*B.scale),Q.canvas.style.width=B.width+"px",Q.canvas.style.height=B.height+"px"),Q.fontMetrics=new nm(document),Q.ctx.scale(Q.options.scale,Q.options.scale),Q.ctx.translate(-B.x,-B.y),Q.ctx.textBaseline="bottom",Q._activeEffects=[],Q.context.logger.debug("Canvas renderer initialized ("+B.width+"x"+B.height+") with scale "+B.scale),Q}return m.prototype.applyEffects=function(b){for(var B=this;this._activeEffects.length;)this.popEffect();b.forEach(function(Q){return B.applyEffect(Q)})},m.prototype.applyEffect=function(b){this.ctx.save(),qu(b)&&(this.ctx.globalAlpha=b.opacity),Xp(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)),Ju(b)&&(this.path(b.path),this.ctx.clip()),this._activeEffects.push(b)},m.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},m.prototype.renderStack=function(b){return W(this,void 0,void 0,function(){var B;return z(this,function(Q){switch(Q.label){case 0:return B=b.element.container.styles,B.isVisible()?[4,this.renderStackContent(b)]:[3,2];case 1:Q.sent(),Q.label=2;case 2:return[2]}})})},m.prototype.renderNode=function(b){return W(this,void 0,void 0,function(){return z(this,function(B){switch(B.label){case 0:if(Rr(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]}})})},m.prototype.renderTextWithLetterSpacing=function(b,B,Q){var V=this;if(B===0)this.ctx.fillText(b.text,b.bounds.left,b.bounds.top+Q);else{var tt=Xa(b.text);tt.reduce(function(lt,at){return V.ctx.fillText(at,lt,b.bounds.top+Q),lt+V.ctx.measureText(at).width},b.bounds.left)}},m.prototype.createFontStyle=function(b){var B=b.fontVariant.filter(function(tt){return tt==="normal"||tt==="small-caps"}).join(""),Q=Am(b.fontFamily).join(", "),V=ca(b.fontSize)?""+b.fontSize.number+b.fontSize.unit:b.fontSize.number+"px";return[[b.fontStyle,B,b.fontWeight,V,Q].join(" "),Q,V]},m.prototype.renderTextNode=function(b,B){return W(this,void 0,void 0,function(){var Q,V,tt,lt,at,bt,St,Ut,Jt=this;return z(this,function(Te){return Q=this.createFontStyle(B),V=Q[0],tt=Q[1],lt=Q[2],this.ctx.font=V,this.ctx.direction=B.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",at=this.fontMetrics.getMetrics(tt,lt),bt=at.baseline,St=at.middle,Ut=B.paintOrder,b.textBounds.forEach(function(he){Ut.forEach(function(Be){switch(Be){case 0:Jt.ctx.fillStyle=ni(B.color),Jt.renderTextWithLetterSpacing(he,B.letterSpacing,bt);var rn=B.textShadow;rn.length&&he.text.trim().length&&(rn.slice(0).reverse().forEach(function(Ue){Jt.ctx.shadowColor=ni(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(he,B.letterSpacing,bt)}),Jt.ctx.shadowColor="",Jt.ctx.shadowOffsetX=0,Jt.ctx.shadowOffsetY=0,Jt.ctx.shadowBlur=0),B.textDecorationLine.length&&(Jt.ctx.fillStyle=ni(B.textDecorationColor||B.color),B.textDecorationLine.forEach(function(Ue){switch(Ue){case 1:Jt.ctx.fillRect(he.bounds.left,Math.round(he.bounds.top+bt),he.bounds.width,1);break;case 2:Jt.ctx.fillRect(he.bounds.left,Math.round(he.bounds.top),he.bounds.width,1);break;case 3:Jt.ctx.fillRect(he.bounds.left,Math.ceil(he.bounds.top+St),he.bounds.width,1);break}}));break;case 1:B.webkitTextStrokeWidth&&he.text.trim().length&&(Jt.ctx.strokeStyle=ni(B.webkitTextStrokeColor),Jt.ctx.lineWidth=B.webkitTextStrokeWidth,Jt.ctx.lineJoin=window.chrome?"miter":"round",Jt.ctx.strokeText(he.text,he.bounds.left,he.bounds.top+bt)),Jt.ctx.strokeStyle="",Jt.ctx.lineWidth=0,Jt.ctx.lineJoin="miter";break}})}),[2]})})},m.prototype.renderReplacedElement=function(b,B,Q){if(Q&&b.intrinsicWidth>0&&b.intrinsicHeight>0){var V=gA(b),tt=ys(B);this.path(tt),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(Q,0,0,b.intrinsicWidth,b.intrinsicHeight,V.left,V.top,V.width,V.height),this.ctx.restore()}},m.prototype.renderNodeContent=function(b){return W(this,void 0,void 0,function(){var B,Q,V,tt,lt,at,Le,Le,bt,St,Ut,Jt,An,Te,he,Ye,Be,rn,Ue,Le,Mn,An,Ye;return z(this,function(Fe){switch(Fe.label){case 0:this.applyEffects(b.getEffects(4)),B=b.container,Q=b.curves,V=B.styles,tt=0,lt=B.textNodes,Fe.label=1;case 1:return tt<lt.length?(at=lt[tt],[4,this.renderTextNode(at,V)]):[3,4];case 2:Fe.sent(),Fe.label=3;case 3:return tt++,[3,1];case 4:if(!(B instanceof _d))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 Le=Fe.sent(),this.renderReplacedElement(B,Q,Le),[3,8];case 7:return Fe.sent(),this.context.logger.error("Error loading image "+B.src),[3,8];case 8:if(B instanceof Hd&&this.renderReplacedElement(B,Q,B.canvas),!(B instanceof Ku))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 Le=Fe.sent(),this.renderReplacedElement(B,Q,Le),[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 zd&&B.tree?(bt=new m(this.context,{scale:this.options.scale,backgroundColor:B.backgroundColor,x:0,y:0,width:B.width,height:B.height}),[4,bt.render(B.tree)]):[3,14];case 13:St=Fe.sent(),B.width&&B.height&&this.ctx.drawImage(St,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 js&&(Ut=Math.min(B.bounds.width,B.bounds.height),B.type===fs?B.checked&&(this.ctx.save(),this.path([new Se(B.bounds.left+Ut*.39363,B.bounds.top+Ut*.79),new Se(B.bounds.left+Ut*.16,B.bounds.top+Ut*.5549),new Se(B.bounds.left+Ut*.27347,B.bounds.top+Ut*.44071),new Se(B.bounds.left+Ut*.39694,B.bounds.top+Ut*.5649),new Se(B.bounds.left+Ut*.72983,B.bounds.top+Ut*.23),new Se(B.bounds.left+Ut*.84,B.bounds.top+Ut*.34085),new Se(B.bounds.left+Ut*.39363,B.bounds.top+Ut*.79)]),this.ctx.fillStyle=ni(Gd),this.ctx.fill(),this.ctx.restore()):B.type===On&&B.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(B.bounds.left+Ut/2,B.bounds.top+Ut/2,Ut/4,0,Math.PI*2,!0),this.ctx.fillStyle=ni(Gd),this.ctx.fill(),this.ctx.restore())),im(B)&&B.value.length){switch(Jt=this.createFontStyle(V),An=Jt[0],Te=Jt[1],he=this.fontMetrics.getMetrics(An,Te).baseline,this.ctx.font=An,this.ctx.fillStyle=ni(V.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=sm(B.styles.textAlign),Ye=gA(B),Be=0,B.styles.textAlign){case 1:Be+=Ye.width/2;break;case 2:Be+=Ye.width;break}rn=Ye.add(Be,0,0,-Ye.height/2+1),this.ctx.save(),this.path([new Se(Ye.left,Ye.top),new Se(Ye.left+Ye.width,Ye.top),new Se(Ye.left+Ye.width,Ye.top+Ye.height),new Se(Ye.left,Ye.top+Ye.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new gc(B.value,rn),V.letterSpacing,he),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Rr(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];Le=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 Le=Fe.sent(),this.ctx.drawImage(Le,B.bounds.left-(Le.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(V)[0],this.ctx.font=An,this.ctx.fillStyle=ni(V.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",Ye=new N(B.bounds.left,B.bounds.top+Gn(B.styles.paddingTop,B.bounds.width),B.bounds.width,vd(V.lineHeight,V.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new gc(b.listValue,Ye),V.letterSpacing,vd(V.lineHeight,V.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),Fe.label=20;case 20:return[2]}})})},m.prototype.renderStackContent=function(b){return W(this,void 0,void 0,function(){var B,Q,Ue,V,tt,Ue,lt,at,Ue,bt,St,Ue,Ut,Jt,Ue,Te,he,Ue,Be,rn,Ue;return z(this,function(Le){switch(Le.label){case 0:if(Rr(b.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(b.element)];case 1:Le.sent(),B=0,Q=b.negativeZIndex,Le.label=2;case 2:return B<Q.length?(Ue=Q[B],[4,this.renderStack(Ue)]):[3,5];case 3:Le.sent(),Le.label=4;case 4:return B++,[3,2];case 5:return[4,this.renderNodeContent(b.element)];case 6:Le.sent(),V=0,tt=b.nonInlineLevel,Le.label=7;case 7:return V<tt.length?(Ue=tt[V],[4,this.renderNode(Ue)]):[3,10];case 8:Le.sent(),Le.label=9;case 9:return V++,[3,7];case 10:lt=0,at=b.nonPositionedFloats,Le.label=11;case 11:return lt<at.length?(Ue=at[lt],[4,this.renderStack(Ue)]):[3,14];case 12:Le.sent(),Le.label=13;case 13:return lt++,[3,11];case 14:bt=0,St=b.nonPositionedInlineLevel,Le.label=15;case 15:return bt<St.length?(Ue=St[bt],[4,this.renderStack(Ue)]):[3,18];case 16:Le.sent(),Le.label=17;case 17:return bt++,[3,15];case 18:Ut=0,Jt=b.inlineLevel,Le.label=19;case 19:return Ut<Jt.length?(Ue=Jt[Ut],[4,this.renderNode(Ue)]):[3,22];case 20:Le.sent(),Le.label=21;case 21:return Ut++,[3,19];case 22:Te=0,he=b.zeroOrAutoZIndexOrTransformedOrOpacity,Le.label=23;case 23:return Te<he.length?(Ue=he[Te],[4,this.renderStack(Ue)]):[3,26];case 24:Le.sent(),Le.label=25;case 25:return Te++,[3,23];case 26:Be=0,rn=b.positiveZIndex,Le.label=27;case 27:return Be<rn.length?(Ue=rn[Be],[4,this.renderStack(Ue)]):[3,30];case 28:Le.sent(),Le.label=29;case 29:return Be++,[3,27];case 30:return[2]}})})},m.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()},m.prototype.path=function(b){this.ctx.beginPath(),this.formatPath(b),this.ctx.closePath()},m.prototype.formatPath=function(b){var B=this;b.forEach(function(Q,V){var tt=Nn(Q)?Q.start:Q;V===0?B.ctx.moveTo(tt.x,tt.y):B.ctx.lineTo(tt.x,tt.y),Nn(Q)&&B.ctx.bezierCurveTo(Q.startControl.x,Q.startControl.y,Q.endControl.x,Q.endControl.y,Q.end.x,Q.end.y)})},m.prototype.renderRepeat=function(b,B,Q,V){this.path(b),this.ctx.fillStyle=B,this.ctx.translate(Q,V),this.ctx.fill(),this.ctx.translate(-Q,-V)},m.prototype.resizeImage=function(b,B,Q){var V;if(b.width===B&&b.height===Q)return b;var tt=(V=this.canvas.ownerDocument)!==null&&V!==void 0?V:document,lt=tt.createElement("canvas");lt.width=Math.max(1,B),lt.height=Math.max(1,Q);var at=lt.getContext("2d");return at.drawImage(b,0,0,b.width,b.height,0,0,B,Q),lt},m.prototype.renderBackgroundImage=function(b){return W(this,void 0,void 0,function(){var B,Q,V,tt,lt,at;return z(this,function(bt){switch(bt.label){case 0:B=b.styles.backgroundImage.length-1,Q=function(St){var Ut,Jt,Te,Or,xi,oi,zn,Vr,xn,he,Or,xi,oi,zn,Vr,Be,rn,Ue,Le,Mn,An,Ye,Fe,bn,xn,We,Or,si,Di,zn,Vr,Xs,xi,oi,Es,Na,Js,Mo,Fo,$a,To,Bs;return z(this,function(Al){switch(Al.label){case 0:if(St.type!==0)return[3,5];Ut=void 0,Jt=St.url,Al.label=1;case 1:return Al.trys.push([1,3,,4]),[4,V.context.cache.match(Jt)];case 2:return Ut=Al.sent(),[3,4];case 3:return Al.sent(),V.context.logger.error("Error loading background-image "+Jt),[3,4];case 4:return Ut&&(Te=Ic(b,B,[Ut.width,Ut.height,Ut.width/Ut.height]),Or=Te[0],xi=Te[1],oi=Te[2],zn=Te[3],Vr=Te[4],xn=V.ctx.createPattern(V.resizeImage(Ut,zn,Vr),"repeat"),V.renderRepeat(Or,xn,xi,oi)),[3,6];case 5:Kw(St)?(he=Ic(b,B,[null,null,null]),Or=he[0],xi=he[1],oi=he[2],zn=he[3],Vr=he[4],Be=Ov(St.angle,zn,Vr),rn=Be[0],Ue=Be[1],Le=Be[2],Mn=Be[3],An=Be[4],Ye=document.createElement("canvas"),Ye.width=zn,Ye.height=Vr,Fe=Ye.getContext("2d"),bn=Fe.createLinearGradient(Ue,Mn,Le,An),Fv(St.stops,rn).forEach(function(Lc){return bn.addColorStop(Lc.stop,ni(Lc.color))}),Fe.fillStyle=bn,Fe.fillRect(0,0,zn,Vr),zn>0&&Vr>0&&(xn=V.ctx.createPattern(Ye,"repeat"),V.renderRepeat(Or,xn,xi,oi))):_v(St)&&(We=Ic(b,B,[null,null,null]),Or=We[0],si=We[1],Di=We[2],zn=We[3],Vr=We[4],Xs=St.position.length===0?[jA]:St.position,xi=Gn(Xs[0],zn),oi=Gn(Xs[Xs.length-1],Vr),Es=_w(St,xi,oi,zn,Vr),Na=Es[0],Js=Es[1],Na>0&&Js>0&&(Mo=V.ctx.createRadialGradient(si+xi,Di+oi,0,si+xi,Di+oi,Na),Fv(St.stops,Na*2).forEach(function(Lc){return Mo.addColorStop(Lc.stop,ni(Lc.color))}),V.path(Or),V.ctx.fillStyle=Mo,Na!==Js?(Fo=b.bounds.left+.5*b.bounds.width,$a=b.bounds.top+.5*b.bounds.height,To=Js/Na,Bs=1/To,V.ctx.save(),V.ctx.translate(Fo,$a),V.ctx.transform(1,0,0,To,0,0),V.ctx.translate(-Fo,-$a),V.ctx.fillRect(si,Bs*(Di-$a)+$a,zn,Vr*Bs),V.ctx.restore()):V.ctx.fill())),Al.label=6;case 6:return B--,[2]}})},V=this,tt=0,lt=b.styles.backgroundImage.slice(0).reverse(),bt.label=1;case 1:return tt<lt.length?(at=lt[tt],[5,Q(at)]):[3,4];case 2:bt.sent(),bt.label=3;case 3:return tt++,[3,1];case 4:return[2]}})})},m.prototype.renderSolidBorder=function(b,B,Q){return W(this,void 0,void 0,function(){return z(this,function(V){return this.path(_n(Q,B)),this.ctx.fillStyle=ni(b),this.ctx.fill(),[2]})})},m.prototype.renderDoubleBorder=function(b,B,Q,V){return W(this,void 0,void 0,function(){var tt,lt;return z(this,function(at){switch(at.label){case 0:return B<3?[4,this.renderSolidBorder(b,Q,V)]:[3,2];case 1:return at.sent(),[2];case 2:return tt=Ia(V,Q),this.path(tt),this.ctx.fillStyle=ni(b),this.ctx.fill(),lt=Co(V,Q),this.path(lt),this.ctx.fill(),[2]}})})},m.prototype.renderNodeBackgroundAndBorders=function(b){return W(this,void 0,void 0,function(){var B,Q,V,tt,lt,at,bt,St,Ut=this;return z(this,function(Jt){switch(Jt.label){case 0:return this.applyEffects(b.getEffects(2)),B=b.container.styles,Q=!wo(B.backgroundColor)||B.backgroundImage.length,V=[{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=am(pA(B.backgroundClip,0),b.curves),Q||B.boxShadow.length?(this.ctx.save(),this.path(tt),this.ctx.clip(),wo(B.backgroundColor)||(this.ctx.fillStyle=ni(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(Te){Ut.ctx.save();var he=Tc(b.curves),Be=Te.inset?0:Af,rn=Jp(he,-Be+(Te.inset?1:-1)*Te.spread.number,(Te.inset?1:-1)*Te.spread.number,Te.spread.number*(Te.inset?-2:2),Te.spread.number*(Te.inset?-2:2));Te.inset?(Ut.path(he),Ut.ctx.clip(),Ut.mask(rn)):(Ut.mask(he),Ut.ctx.clip(),Ut.path(rn)),Ut.ctx.shadowOffsetX=Te.offsetX.number+Be,Ut.ctx.shadowOffsetY=Te.offsetY.number,Ut.ctx.shadowColor=ni(Te.color),Ut.ctx.shadowBlur=Te.blur.number,Ut.ctx.fillStyle=Te.inset?ni(Te.color):"rgba(0,0,0,1)",Ut.ctx.fill(),Ut.ctx.restore()}),Jt.label=2;case 2:lt=0,at=0,bt=V,Jt.label=3;case 3:return at<bt.length?(St=bt[at],St.style!==0&&!wo(St.color)&&St.width>0?St.style!==2?[3,5]:[4,this.renderDashedDottedBorder(St.color,St.width,lt,b.curves,2)]:[3,11]):[3,13];case 4:return Jt.sent(),[3,11];case 5:return St.style!==3?[3,7]:[4,this.renderDashedDottedBorder(St.color,St.width,lt,b.curves,3)];case 6:return Jt.sent(),[3,11];case 7:return St.style!==4?[3,9]:[4,this.renderDoubleBorder(St.color,St.width,lt,b.curves)];case 8:return Jt.sent(),[3,11];case 9:return[4,this.renderSolidBorder(St.color,lt,b.curves)];case 10:Jt.sent(),Jt.label=11;case 11:lt++,Jt.label=12;case 12:return at++,[3,3];case 13:return[2]}})})},m.prototype.renderDashedDottedBorder=function(b,B,Q,V,tt){return W(this,void 0,void 0,function(){var lt,at,bt,St,Ut,Jt,Te,he,Be,rn,Ue,Le,Mn,An,Ye,Fe,Ye,Fe;return z(this,function(bn){return this.ctx.save(),lt=th(V,Q),at=_n(V,Q),tt===2&&(this.path(at),this.ctx.clip()),Nn(at[0])?(bt=at[0].start.x,St=at[0].start.y):(bt=at[0].x,St=at[0].y),Nn(at[1])?(Ut=at[1].end.x,Jt=at[1].end.y):(Ut=at[1].x,Jt=at[1].y),Q===0||Q===2?Te=Math.abs(bt-Ut):Te=Math.abs(St-Jt),this.ctx.beginPath(),tt===3?this.formatPath(lt):this.formatPath(at.slice(0,2)),he=B<3?B*3:B*2,Be=B<3?B*2:B,tt===3&&(he=B,Be=B),rn=!0,Te<=he*2?rn=!1:Te<=he*2+Be?(Ue=Te/(2*he+Be),he*=Ue,Be*=Ue):(Le=Math.floor((Te+Be)/(he+Be)),Mn=(Te-Le*he)/(Le-1),An=(Te-(Le+1)*he)/Le,Be=An<=0||Math.abs(Be-Mn)<Math.abs(Be-An)?Mn:An),rn&&(tt===3?this.ctx.setLineDash([0,he+Be]):this.ctx.setLineDash([he,Be])),tt===3?(this.ctx.lineCap="round",this.ctx.lineWidth=B):this.ctx.lineWidth=B*2+1.1,this.ctx.strokeStyle=ni(b),this.ctx.stroke(),this.ctx.setLineDash([]),tt===2&&(Nn(at[0])&&(Ye=at[3],Fe=at[0],this.ctx.beginPath(),this.formatPath([new Se(Ye.end.x,Ye.end.y),new Se(Fe.start.x,Fe.start.y)]),this.ctx.stroke()),Nn(at[1])&&(Ye=at[1],Fe=at[2],this.ctx.beginPath(),this.formatPath([new Se(Ye.end.x,Ye.end.y),new Se(Fe.start.x,Fe.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},m.prototype.render=function(b){return W(this,void 0,void 0,function(){var B;return z(this,function(Q){switch(Q.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=ni(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),B=$u(b),[4,this.renderStack(B)];case 1:return Q.sent(),this.applyEffects([]),[2,this.canvas]}})})},m}(of),im=function(E){return E instanceof pi||E instanceof mc?!0:E instanceof js&&E.type!==On&&E.type!==fs},am=function(E,m){switch(E){case 0:return Tc(m);case 2:return jp(m);case 1:default:return ys(m)}},sm=function(E){switch(E){case 1:return"center";case 2:return"right";case 0:default:return"left"}},om=["-apple-system","system-ui"],Am=function(E){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?E.filter(function(m){return om.indexOf(m)===-1}):E},lm=function(E){T(m,E);function m(b,B){var Q=E.call(this,b,B)||this;return Q.canvas=B.canvas?B.canvas:document.createElement("canvas"),Q.ctx=Q.canvas.getContext("2d"),Q.options=B,Q.canvas.width=Math.floor(B.width*B.scale),Q.canvas.height=Math.floor(B.height*B.scale),Q.canvas.style.width=B.width+"px",Q.canvas.style.height=B.height+"px",Q.ctx.scale(Q.options.scale,Q.options.scale),Q.ctx.translate(-B.x,-B.y),Q.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+B.width+"x"+B.height+" at "+B.x+","+B.y+") with scale "+B.scale),Q}return m.prototype.render=function(b){return W(this,void 0,void 0,function(){var B,Q;return z(this,function(V){switch(V.label){case 0:return B=Gu(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,b),[4,EE(B)];case 1:return Q=V.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=ni(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(Q,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},m}(of),EE=function(E){return new Promise(function(m,b){var B=new Image;B.onload=function(){m(B)},B.onerror=b,B.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(E))})},So=function(){function E(m){var b=m.id,B=m.enabled;this.id=b,this.enabled=B,this.start=Date.now()}return E.prototype.debug=function(){for(var m=[],b=0;b<arguments.length;b++)m[b]=arguments[b];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,P([this.id,this.getTime()+"ms"],m)):this.info.apply(this,m))},E.prototype.getTime=function(){return Date.now()-this.start},E.prototype.info=function(){for(var m=[],b=0;b<arguments.length;b++)m[b]=arguments[b];this.enabled&&typeof window!="undefined"&&window.console&&typeof console.info=="function"&&console.info.apply(console,P([this.id,this.getTime()+"ms"],m))},E.prototype.warn=function(){for(var m=[],b=0;b<arguments.length;b++)m[b]=arguments[b];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,P([this.id,this.getTime()+"ms"],m)):this.info.apply(this,m))},E.prototype.error=function(){for(var m=[],b=0;b<arguments.length;b++)m[b]=arguments[b];this.enabled&&(typeof window!="undefined"&&window.console&&typeof console.error=="function"?console.error.apply(console,P([this.id,this.getTime()+"ms"],m)):this.info.apply(this,m))},E.instances={},E}(),Nc=function(){function E(m,b){var B;this.windowBounds=b,this.instanceName="#"+E.instanceCount++,this.logger=new So({id:this.instanceName,enabled:m.logging}),this.cache=(B=m.cache)!==null&&B!==void 0?B:new Wp(this,m)}return E.instanceCount=1,E}(),sl=function(E,m){return m===void 0&&(m={}),cm(E,m)};typeof window!="undefined"&&Yu.setContext(window);var cm=function(E,m){return W(void 0,void 0,void 0,function(){var b,B,Q,V,tt,lt,at,bt,St,Ut,Jt,Te,he,Be,rn,Ue,Le,Mn,An,Ye,bn,Fe,bn,xn,We,Or,si,Di,zn,Vr,Xs,xi,oi,Es,Na,Js,Mo,Fo,$a,To;return z(this,function(Bs){switch(Bs.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 Q={allowTaint:(xn=m.allowTaint)!==null&&xn!==void 0?xn:!1,imageTimeout:(We=m.imageTimeout)!==null&&We!==void 0?We:15e3,proxy:m.proxy,useCORS:(Or=m.useCORS)!==null&&Or!==void 0?Or:!1},V=I({logging:(si=m.logging)!==null&&si!==void 0?si:!0,cache:m.cache},Q),tt={windowWidth:(Di=m.windowWidth)!==null&&Di!==void 0?Di:B.innerWidth,windowHeight:(zn=m.windowHeight)!==null&&zn!==void 0?zn:B.innerHeight,scrollX:(Vr=m.scrollX)!==null&&Vr!==void 0?Vr:B.pageXOffset,scrollY:(Xs=m.scrollY)!==null&&Xs!==void 0?Xs:B.pageYOffset},lt=new N(tt.scrollX,tt.scrollY,tt.windowWidth,tt.windowHeight),at=new Nc(V,lt),bt=(xi=m.foreignObjectRendering)!==null&&xi!==void 0?xi:!1,St={allowTaint:(oi=m.allowTaint)!==null&&oi!==void 0?oi:!1,onclone:m.onclone,ignoreElements:m.ignoreElements,inlineImages:bt,copyStyles:bt},at.logger.debug("Starting document clone with size "+lt.width+"x"+lt.height+" scrolled to "+-lt.left+","+-lt.top),Ut=new Xd(at,E,St),Jt=Ut.clonedReferenceElement,Jt?[4,Ut.toIFrame(b,lt)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return Te=Bs.sent(),he=ta(Jt)||Wd(Jt)?K(Jt.ownerDocument):G(at,Jt),Be=he.width,rn=he.height,Ue=he.left,Le=he.top,Mn=ol(at,Jt,m.backgroundColor),An={canvas:m.canvas,backgroundColor:Mn,scale:(Na=(Es=m.scale)!==null&&Es!==void 0?Es:B.devicePixelRatio)!==null&&Na!==void 0?Na:1,x:((Js=m.x)!==null&&Js!==void 0?Js:0)+Ue,y:((Mo=m.y)!==null&&Mo!==void 0?Mo:0)+Le,width:(Fo=m.width)!==null&&Fo!==void 0?Fo:Math.ceil(Be),height:($a=m.height)!==null&&$a!==void 0?$a:Math.ceil(rn)},bt?(at.logger.debug("Document cloned, using foreign object rendering"),bn=new lm(at,An),[4,bn.render(Jt)]):[3,3];case 2:return Ye=Bs.sent(),[3,5];case 3:return at.logger.debug("Document cloned, element located at "+Ue+","+Le+" with size "+Be+"x"+rn+" using computed rendering"),at.logger.debug("Starting DOM parsing"),Fe=Kd(at,Jt),Mn===Fe.styles.backgroundColor&&(Fe.styles.backgroundColor=Gs.TRANSPARENT),at.logger.debug("Starting renderer for element at "+An.x+","+An.y+" with size "+An.width+"x"+An.height),bn=new rm(at,An),[4,bn.render(Fe)];case 4:Ye=Bs.sent(),Bs.label=5;case 5:return(!((To=m.removeContainer)!==null&&To!==void 0)||To)&&(Xd.destroy(Te)||at.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),at.logger.debug("Finished rendering"),[2,Ye]}})})},ol=function(E,m,b){var B=m.ownerDocument,Q=B.documentElement?$l(E,getComputedStyle(B.documentElement).backgroundColor):Gs.TRANSPARENT,V=B.body?$l(E,getComputedStyle(B.body).backgroundColor):Gs.TRANSPARENT,tt=typeof b=="string"?$l(E,b):b===null?Gs.TRANSPARENT:4294967295;return m===B.documentElement?wo(Q)?wo(V)?tt:V:Q:tt};return sl})},34634:function(X,st,T){"use strict";T.r(st),T.d(st,{isAnyArray:function(){return W}});const I=Object.prototype.toString;function W(z){const P=I.call(z);return P.endsWith("Array]")&&!P.includes("Big")}},55973:function(X){X.exports=function(T){return!T||typeof T=="string"?!1:T instanceof Array||Array.isArray(T)||T.length>=0&&(T.splice instanceof Function||Object.getOwnPropertyDescriptor(T,T.length-1)&&T.constructor.name!=="String")}},23346:function(X,st,T){var I=T(93454),W=T(40911),z=I(W,"DataView");X.exports=z},22477:function(X,st,T){var I=T(93454),W=T(40911),z=I(W,"Promise");X.exports=z},73230:function(X,st,T){var I=T(93454),W=T(40911),z=I(W,"Set");X.exports=z},66643:function(X,st,T){var I=T(97800),W=T(81685),z=T(1324);function P(N){var G=-1,K=N==null?0:N.length;for(this.__data__=new I;++G<K;)this.add(N[G])}P.prototype.add=P.prototype.push=W,P.prototype.has=z,X.exports=P},89516:function(X,st,T){var I=T(93454),W=T(40911),z=I(W,"WeakMap");X.exports=z},22899:function(X){function st(T,I){for(var W=-1,z=T==null?0:T.length;++W<z&&I(T[W],W,T)!==!1;);return T}X.exports=st},72280:function(X){function st(T,I){for(var W=-1,z=T==null?0:T.length,P=0,N=[];++W<z;){var G=T[W];I(G,W,T)&&(N[P++]=G)}return N}X.exports=st},55295:function(X,st,T){var I=T(17713);function W(z,P){var N=z==null?0:z.length;return!!N&&I(z,P,0)>-1}X.exports=W},90746:function(X){function st(T,I,W){for(var z=-1,P=T==null?0:T.length;++z<P;)if(W(I,T[z]))return!0;return!1}X.exports=st},43453:function(X){function st(T,I){for(var W=-1,z=T==null?0:T.length,P=Array(z);++W<z;)P[W]=I(T[W],W,T);return P}X.exports=st},10451:function(X){function st(T,I){for(var W=-1,z=I.length,P=T.length;++W<z;)T[P+W]=I[W];return T}X.exports=st},85665:function(X){function st(T,I,W,z){var P=-1,N=T==null?0:T.length;for(z&&N&&(W=T[++P]);++P<N;)W=I(W,T[P],P,T);return W}X.exports=st},16604:function(X){function st(T,I){for(var W=-1,z=T==null?0:T.length;++W<z;)if(I(T[W],W,T))return!0;return!1}X.exports=st},8483:function(X,st,T){var I=T(11372),W=I("length");X.exports=W},52961:function(X,st,T){var I=T(39408),W=T(66357);function z(P,N){return P&&I(N,W(N),P)}X.exports=z},56903:function(X,st,T){var I=T(39408),W=T(331);function z(P,N){return P&&I(N,W(N),P)}X.exports=z},51024:function(X,st,T){var I=T(26163),W=T(22899),z=T(78436),P=T(52961),N=T(56903),G=T(6151),K=T(63272),_=T(45280),H=T(24299),J=T(29921),Z=T(53904),$=T(29148),ct=T(83505),ht=T(44723),Ct=T(71349),pt=T(41594),ut=T(33636),Bt=T(32455),wt=T(71721),Tt=T(60437),kt=T(66357),_t=T(331),Ot=1,Gt=2,ae=4,Wt="[object Arguments]",ie="[object Array]",ve="[object Boolean]",de="[object Date]",Oe="[object Error]",sn="[object Function]",dn="[object GeneratorFunction]",Xn="[object Map]",Jr="[object Number]",ji="[object Object]",As="[object RegExp]",ho="[object Set]",Pt="[object String]",zt="[object Symbol]",jt="[object WeakMap]",gt="[object ArrayBuffer]",Mt="[object DataView]",Lt="[object Float32Array]",ee="[object Float64Array]",be="[object Int8Array]",_e="[object Int16Array]",Me="[object Int32Array]",nn="[object Uint8Array]",rr="[object Uint8ClampedArray]",or="[object Uint16Array]",Ge="[object Uint32Array]",ze={};ze[Wt]=ze[ie]=ze[gt]=ze[Mt]=ze[ve]=ze[de]=ze[Lt]=ze[ee]=ze[be]=ze[_e]=ze[Me]=ze[Xn]=ze[Jr]=ze[ji]=ze[As]=ze[ho]=ze[Pt]=ze[zt]=ze[nn]=ze[rr]=ze[or]=ze[Ge]=!0,ze[Oe]=ze[sn]=ze[jt]=!1;function me(Ve,zr,Zi,pe,Wa,kr){var Fr,fi=zr&Ot,ls=zr&Gt,Yi=zr&ae;if(Zi&&(Fr=Wa?Zi(Ve,pe,Wa,kr):Zi(Ve)),Fr!==void 0)return Fr;if(!wt(Ve))return Ve;var cs=pt(Ve);if(cs){if(Fr=ct(Ve),!fi)return K(Ve,Fr)}else{var Li=$(Ve),qr=Li==sn||Li==dn;if(ut(Ve))return G(Ve,fi);if(Li==ji||Li==Wt||qr&&!Wa){if(Fr=ls||qr?{}:Ct(Ve),!fi)return ls?H(Ve,N(Fr,Ve)):_(Ve,P(Fr,Ve))}else{if(!ze[Li])return Wa?Ve:{};Fr=ht(Ve,Li,fi)}}kr||(kr=new I);var Ba=kr.get(Ve);if(Ba)return Ba;kr.set(Ve,Fr),Tt(Ve)?Ve.forEach(function(xa){Fr.add(me(xa,zr,Zi,xa,Ve,kr))}):Bt(Ve)&&Ve.forEach(function(xa,$r){Fr.set($r,me(xa,zr,Zi,$r,Ve,kr))});var ba=Yi?ls?Z:J:ls?_t:kt,la=cs?void 0:ba(Ve);return W(la||Ve,function(xa,$r){la&&($r=xa,xa=Ve[$r]),z(Fr,$r,me(xa,zr,Zi,$r,Ve,kr))}),Fr}X.exports=me},89264:function(X,st,T){var I=T(23543),W=T(26503),z=W(I);X.exports=z},87542:function(X,st,T){var I=T(66459);function W(z,P,N){for(var G=-1,K=z.length;++G<K;){var _=z[G],H=P(_);if(H!=null&&(J===void 0?H===H&&!I(H):N(H,J)))var J=H,Z=_}return Z}X.exports=W},22307:function(X,st,T){var I=T(89264);function W(z,P){var N=[];return I(z,function(G,K,_){P(G,K,_)&&N.push(G)}),N}X.exports=W},33405:function(X){function st(T,I,W,z){for(var P=T.length,N=W+(z?1:-1);z?N--:++N<P;)if(I(T[N],N,T))return N;return-1}X.exports=st},27417:function(X,st,T){var I=T(10451),W=T(32111);function z(P,N,G,K,_){var H=-1,J=P.length;for(G||(G=W),_||(_=[]);++H<J;){var Z=P[H];N>0&&G(Z)?N>1?z(Z,N-1,G,K,_):I(_,Z):K||(_[_.length]=Z)}return _}X.exports=z},23543:function(X,st,T){var I=T(43294),W=T(66357);function z(P,N){return P&&I(P,N,W)}X.exports=z},96980:function(X,st,T){var I=T(89382),W=T(90370);function z(P,N){N=I(N,P);for(var G=0,K=N.length;P!=null&&G<K;)P=P[W(N[G++])];return G&&G==K?P:void 0}X.exports=z},76674:function(X,st,T){var I=T(10451),W=T(41594);function z(P,N,G){var K=N(P);return W(P)?K:I(K,G(P))}X.exports=z},52538:function(X){function st(T,I){return T>I}X.exports=st},11874:function(X){var st=Object.prototype,T=st.hasOwnProperty;function I(W,z){return W!=null&&T.call(W,z)}X.exports=I},4769:function(X){function st(T,I){return T!=null&&I in Object(T)}X.exports=st},17713:function(X,st,T){var I=T(33405),W=T(17406),z=T(68048);function P(N,G,K){return G===G?z(N,G,K):I(N,W,K)}X.exports=P},30433:function(X,st,T){var I=T(98317),W=T(71161);function z(P,N,G,K,_){return P===N?!0:P==null||N==null||!W(P)&&!W(N)?P!==P&&N!==N:I(P,N,G,K,z,_)}X.exports=z},98317:function(X,st,T){var I=T(26163),W=T(70670),z=T(23499),P=T(83544),N=T(29148),G=T(41594),K=T(33636),_=T(53745),H=1,J="[object Arguments]",Z="[object Array]",$="[object Object]",ct=Object.prototype,ht=ct.hasOwnProperty;function Ct(pt,ut,Bt,wt,Tt,kt){var _t=G(pt),Ot=G(ut),Gt=_t?Z:N(pt),ae=Ot?Z:N(ut);Gt=Gt==J?$:Gt,ae=ae==J?$:ae;var Wt=Gt==$,ie=ae==$,ve=Gt==ae;if(ve&&K(pt)){if(!K(ut))return!1;_t=!0,Wt=!1}if(ve&&!Wt)return kt||(kt=new I),_t||_(pt)?W(pt,ut,Bt,wt,Tt,kt):z(pt,ut,Gt,Bt,wt,Tt,kt);if(!(Bt&H)){var de=Wt&&ht.call(pt,"__wrapped__"),Oe=ie&&ht.call(ut,"__wrapped__");if(de||Oe){var sn=de?pt.value():pt,dn=Oe?ut.value():ut;return kt||(kt=new I),Tt(sn,dn,Bt,wt,kt)}}return ve?(kt||(kt=new I),P(pt,ut,Bt,wt,Tt,kt)):!1}X.exports=Ct},9961:function(X,st,T){var I=T(29148),W=T(71161),z="[object Map]";function P(N){return W(N)&&I(N)==z}X.exports=P},44626:function(X,st,T){var I=T(26163),W=T(30433),z=1,P=2;function N(G,K,_,H){var J=_.length,Z=J,$=!H;if(G==null)return!Z;for(G=Object(G);J--;){var ct=_[J];if($&&ct[2]?ct[1]!==G[ct[0]]:!(ct[0]in G))return!1}for(;++J<Z;){ct=_[J];var ht=ct[0],Ct=G[ht],pt=ct[1];if($&&ct[2]){if(Ct===void 0&&!(ht in G))return!1}else{var ut=new I;if(H)var Bt=H(Ct,pt,ht,G,K,ut);if(!(Bt===void 0?W(pt,Ct,z|P,H,ut):Bt))return!1}}return!0}X.exports=N},17406:function(X){function st(T){return T!==T}X.exports=st},65562:function(X,st,T){var I=T(29148),W=T(71161),z="[object Set]";function P(N){return W(N)&&I(N)==z}X.exports=P},71499:function(X,st,T){var I=T(37472),W=T(9859),z=T(44525),P=T(41594),N=T(59932);function G(K){return typeof K=="function"?K:K==null?z:typeof K=="object"?P(K)?W(K[0],K[1]):I(K):N(K)}X.exports=G},63427:function(X,st,T){var I=T(46024),W=T(90535),z=Object.prototype,P=z.hasOwnProperty;function N(G){if(!I(G))return W(G);var K=[];for(var _ in Object(G))P.call(G,_)&&_!="constructor"&&K.push(_);return K}X.exports=N},85679:function(X){function st(T,I){return T<I}X.exports=st},27592:function(X,st,T){var I=T(89264),W=T(9015);function z(P,N){var G=-1,K=W(P)?Array(P.length):[];return I(P,function(_,H,J){K[++G]=N(_,H,J)}),K}X.exports=z},37472:function(X,st,T){var I=T(44626),W=T(86162),z=T(47366);function P(N){var G=W(N);return G.length==1&&G[0][2]?z(G[0][0],G[0][1]):function(K){return K===N||I(K,N,G)}}X.exports=P},9859:function(X,st,T){var I=T(30433),W=T(3239),z=T(35339),P=T(10866),N=T(63286),G=T(47366),K=T(90370),_=1,H=2;function J(Z,$){return P(Z)&&N($)?G(K(Z),$):function(ct){var ht=W(ct,Z);return ht===void 0&&ht===$?z(ct,Z):I($,ht,_|H)}}X.exports=J},50447:function(X,st,T){var I=T(43453),W=T(96980),z=T(71499),P=T(27592),N=T(24327),G=T(82230),K=T(47936),_=T(44525),H=T(41594);function J(Z,$,ct){$.length?$=I($,function(pt){return H(pt)?function(ut){return W(ut,pt.length===1?pt[0]:pt)}:pt}):$=[_];var ht=-1;$=I($,G(z));var Ct=P(Z,function(pt,ut,Bt){var wt=I($,function(Tt){return Tt(pt)});return{criteria:wt,index:++ht,value:pt}});return N(Ct,function(pt,ut){return K(pt,ut,ct)})}X.exports=J},80073:function(X,st,T){var I=T(59967),W=T(35339);function z(P,N){return I(P,N,function(G,K){return W(P,K)})}X.exports=z},59967:function(X,st,T){var I=T(96980),W=T(63077),z=T(89382);function P(N,G,K){for(var _=-1,H=G.length,J={};++_<H;){var Z=G[_],$=I(N,Z);K($,Z)&&W(J,z(Z,N),$)}return J}X.exports=P},11372:function(X){function st(T){return function(I){return I==null?void 0:I[T]}}X.exports=st},91315:function(X,st,T){var I=T(96980);function W(z){return function(P){return I(P,z)}}X.exports=W},91018:function(X){var st=Math.ceil,T=Math.max;function I(W,z,P,N){for(var G=-1,K=T(st((z-W)/(P||1)),0),_=Array(K);K--;)_[N?K:++G]=W,W+=P;return _}X.exports=I},88120:function(X){function st(T,I,W,z,P){return P(T,function(N,G,K){W=z?(z=!1,N):I(W,N,G,K)}),W}X.exports=st},63077:function(X,st,T){var I=T(78436),W=T(89382),z=T(65068),P=T(71721),N=T(90370);function G(K,_,H,J){if(!P(K))return K;_=W(_,K);for(var Z=-1,$=_.length,ct=$-1,ht=K;ht!=null&&++Z<$;){var Ct=N(_[Z]),pt=H;if(Ct==="__proto__"||Ct==="constructor"||Ct==="prototype")return K;if(Z!=ct){var ut=ht[Ct];pt=J?J(ut,Ct,ht):void 0,pt===void 0&&(pt=P(ut)?ut:z(_[Z+1])?[]:{})}I(ht,Ct,pt),ht=ht[Ct]}return K}X.exports=G},24327:function(X){function st(T,I){var W=T.length;for(T.sort(I);W--;)T[W]=T[W].value;return T}X.exports=st},12580:function(X,st,T){var I=T(33140),W=T(43453),z=T(41594),P=T(66459),N=1/0,G=I?I.prototype:void 0,K=G?G.toString:void 0;function _(H){if(typeof H=="string")return H;if(z(H))return W(H,_)+"";if(P(H))return K?K.call(H):"";var J=H+"";return J=="0"&&1/H==-N?"-0":J}X.exports=_},8944:function(X,st,T){var I=T(10242),W=/^\s+/;function z(P){return P&&P.slice(0,I(P)+1).replace(W,"")}X.exports=z},75996:function(X,st,T){var I=T(66643),W=T(55295),z=T(90746),P=T(53257),N=T(82241),G=T(25008),K=200;function _(H,J,Z){var $=-1,ct=W,ht=H.length,Ct=!0,pt=[],ut=pt;if(Z)Ct=!1,ct=z;else if(ht>=K){var Bt=J?null:N(H);if(Bt)return G(Bt);Ct=!1,ct=P,ut=new I}else ut=J?[]:pt;t:for(;++$<ht;){var wt=H[$],Tt=J?J(wt):wt;if(wt=Z||wt!==0?wt:0,Ct&&Tt===Tt){for(var kt=ut.length;kt--;)if(ut[kt]===Tt)continue t;J&&ut.push(Tt),pt.push(wt)}else ct(ut,Tt,Z)||(ut!==pt&&ut.push(Tt),pt.push(wt))}return pt}X.exports=_},98030:function(X,st,T){var I=T(43453);function W(z,P){return I(P,function(N){return z[N]})}X.exports=W},30232:function(X){function st(T,I,W){for(var z=-1,P=T.length,N=I.length,G={};++z<P;){var K=z<N?I[z]:void 0;W(G,T[z],K)}return G}X.exports=st},53257:function(X){function st(T,I){return T.has(I)}X.exports=st},764:function(X,st,T){var I=T(44525);function W(z){return typeof z=="function"?z:I}X.exports=W},89382:function(X,st,T){var I=T(41594),W=T(10866),z=T(80048),P=T(14135);function N(G,K){return I(G)?G:W(G,K)?[G]:z(P(G))}X.exports=N},449:function(X,st,T){var I=T(507);function W(z,P){var N=P?I(z.buffer):z.buffer;return new z.constructor(N,z.byteOffset,z.byteLength)}X.exports=W},63472:function(X){var st=/\w*$/;function T(I){var W=new I.constructor(I.source,st.exec(I));return W.lastIndex=I.lastIndex,W}X.exports=T},66922:function(X,st,T){var I=T(33140),W=I?I.prototype:void 0,z=W?W.valueOf:void 0;function P(N){return z?Object(z.call(N)):{}}X.exports=P},11885:function(X,st,T){var I=T(66459);function W(z,P){if(z!==P){var N=z!==void 0,G=z===null,K=z===z,_=I(z),H=P!==void 0,J=P===null,Z=P===P,$=I(P);if(!J&&!$&&!_&&z>P||_&&H&&Z&&!J&&!$||G&&H&&Z||!N&&Z||!K)return 1;if(!G&&!_&&!$&&z<P||$&&N&&K&&!G&&!_||J&&N&&K||!H&&K||!Z)return-1}return 0}X.exports=W},47936:function(X,st,T){var I=T(11885);function W(z,P,N){for(var G=-1,K=z.criteria,_=P.criteria,H=K.length,J=N.length;++G<H;){var Z=I(K[G],_[G]);if(Z){if(G>=J)return Z;var $=N[G];return Z*($=="desc"?-1:1)}}return z.index-P.index}X.exports=W},45280:function(X,st,T){var I=T(39408),W=T(69601);function z(P,N){return I(P,W(P),N)}X.exports=z},24299:function(X,st,T){var I=T(39408),W=T(72426);function z(P,N){return I(P,W(P),N)}X.exports=z},26503:function(X,st,T){var I=T(9015);function W(z,P){return function(N,G){if(N==null)return N;if(!I(N))return z(N,G);for(var K=N.length,_=P?K:-1,H=Object(N);(P?_--:++_<K)&&G(H[_],_,H)!==!1;);return N}}X.exports=W},76470:function(X,st,T){var I=T(71499),W=T(9015),z=T(66357);function P(N){return function(G,K,_){var H=Object(G);if(!W(G)){var J=I(K,3);G=z(G),K=function($){return J(H[$],$,H)}}var Z=N(G,K,_);return Z>-1?H[J?G[Z]:Z]:void 0}}X.exports=P},6651:function(X,st,T){var I=T(91018),W=T(20688),z=T(925);function P(N){return function(G,K,_){return _&&typeof _!="number"&&W(G,K,_)&&(K=_=void 0),G=z(G),K===void 0?(K=G,G=0):K=z(K),_=_===void 0?G<K?1:-1:z(_),I(G,K,_,N)}}X.exports=P},82241:function(X,st,T){var I=T(73230),W=T(65075),z=T(25008),P=1/0,N=I&&1/z(new I([,-0]))[1]==P?function(G){return new I(G)}:W;X.exports=N},70670:function(X,st,T){var I=T(66643),W=T(16604),z=T(53257),P=1,N=2;function G(K,_,H,J,Z,$){var ct=H&P,ht=K.length,Ct=_.length;if(ht!=Ct&&!(ct&&Ct>ht))return!1;var pt=$.get(K),ut=$.get(_);if(pt&&ut)return pt==_&&ut==K;var Bt=-1,wt=!0,Tt=H&N?new I:void 0;for($.set(K,_),$.set(_,K);++Bt<ht;){var kt=K[Bt],_t=_[Bt];if(J)var Ot=ct?J(_t,kt,Bt,_,K,$):J(kt,_t,Bt,K,_,$);if(Ot!==void 0){if(Ot)continue;wt=!1;break}if(Tt){if(!W(_,function(Gt,ae){if(!z(Tt,ae)&&(kt===Gt||Z(kt,Gt,H,J,$)))return Tt.push(ae)})){wt=!1;break}}else if(!(kt===_t||Z(kt,_t,H,J,$))){wt=!1;break}}return $.delete(K),$.delete(_),wt}X.exports=G},23499:function(X,st,T){var I=T(33140),W=T(85015),z=T(83914),P=T(70670),N=T(85120),G=T(25008),K=1,_=2,H="[object Boolean]",J="[object Date]",Z="[object Error]",$="[object Map]",ct="[object Number]",ht="[object RegExp]",Ct="[object Set]",pt="[object String]",ut="[object Symbol]",Bt="[object ArrayBuffer]",wt="[object DataView]",Tt=I?I.prototype:void 0,kt=Tt?Tt.valueOf:void 0;function _t(Ot,Gt,ae,Wt,ie,ve,de){switch(ae){case wt:if(Ot.byteLength!=Gt.byteLength||Ot.byteOffset!=Gt.byteOffset)return!1;Ot=Ot.buffer,Gt=Gt.buffer;case Bt:return!(Ot.byteLength!=Gt.byteLength||!ve(new W(Ot),new W(Gt)));case H:case J:case ct:return z(+Ot,+Gt);case Z:return Ot.name==Gt.name&&Ot.message==Gt.message;case ht:case pt:return Ot==Gt+"";case $:var Oe=N;case Ct:var sn=Wt&K;if(Oe||(Oe=G),Ot.size!=Gt.size&&!sn)return!1;var dn=de.get(Ot);if(dn)return dn==Gt;Wt|=_,de.set(Ot,Gt);var Xn=P(Oe(Ot),Oe(Gt),Wt,ie,ve,de);return de.delete(Ot),Xn;case ut:if(kt)return kt.call(Ot)==kt.call(Gt)}return!1}X.exports=_t},83544:function(X,st,T){var I=T(29921),W=1,z=Object.prototype,P=z.hasOwnProperty;function N(G,K,_,H,J,Z){var $=_&W,ct=I(G),ht=ct.length,Ct=I(K),pt=Ct.length;if(ht!=pt&&!$)return!1;for(var ut=ht;ut--;){var Bt=ct[ut];if(!($?Bt in K:P.call(K,Bt)))return!1}var wt=Z.get(G),Tt=Z.get(K);if(wt&&Tt)return wt==K&&Tt==G;var kt=!0;Z.set(G,K),Z.set(K,G);for(var _t=$;++ut<ht;){Bt=ct[ut];var Ot=G[Bt],Gt=K[Bt];if(H)var ae=$?H(Gt,Ot,Bt,K,G,Z):H(Ot,Gt,Bt,G,K,Z);if(!(ae===void 0?Ot===Gt||J(Ot,Gt,_,H,Z):ae)){kt=!1;break}_t||(_t=Bt=="constructor")}if(kt&&!_t){var Wt=G.constructor,ie=K.constructor;Wt!=ie&&"constructor"in G&&"constructor"in K&&!(typeof Wt=="function"&&Wt instanceof Wt&&typeof ie=="function"&&ie instanceof ie)&&(kt=!1)}return Z.delete(G),Z.delete(K),kt}X.exports=N},33944:function(X,st,T){var I=T(1332),W=T(9291),z=T(48815);function P(N){return z(W(N,void 0,I),N+"")}X.exports=P},29921:function(X,st,T){var I=T(76674),W=T(69601),z=T(66357);function P(N){return I(N,z,W)}X.exports=P},53904:function(X,st,T){var I=T(76674),W=T(72426),z=T(331);function P(N){return I(N,z,W)}X.exports=P},86162:function(X,st,T){var I=T(63286),W=T(66357);function z(P){for(var N=W(P),G=N.length;G--;){var K=N[G],_=P[K];N[G]=[K,_,I(_)]}return N}X.exports=z},69601:function(X,st,T){var I=T(72280),W=T(57004),z=Object.prototype,P=z.propertyIsEnumerable,N=Object.getOwnPropertySymbols,G=N?function(K){return K==null?[]:(K=Object(K),I(N(K),function(_){return P.call(K,_)}))}:W;X.exports=G},72426:function(X,st,T){var I=T(10451),W=T(13530),z=T(69601),P=T(57004),N=Object.getOwnPropertySymbols,G=N?function(K){for(var _=[];K;)I(_,z(K)),K=W(K);return _}:P;X.exports=G},29148:function(X,st,T){var I=T(23346),W=T(25281),z=T(22477),P=T(73230),N=T(89516),G=T(17325),K=T(89614),_="[object Map]",H="[object Object]",J="[object Promise]",Z="[object Set]",$="[object WeakMap]",ct="[object DataView]",ht=K(I),Ct=K(W),pt=K(z),ut=K(P),Bt=K(N),wt=G;(I&&wt(new I(new ArrayBuffer(1)))!=ct||W&&wt(new W)!=_||z&&wt(z.resolve())!=J||P&&wt(new P)!=Z||N&&wt(new N)!=$)&&(wt=function(Tt){var kt=G(Tt),_t=kt==H?Tt.constructor:void 0,Ot=_t?K(_t):"";if(Ot)switch(Ot){case ht:return ct;case Ct:return _;case pt:return J;case ut:return Z;case Bt:return $}return kt}),X.exports=wt},37073:function(X,st,T){var I=T(89382),W=T(30516),z=T(41594),P=T(65068),N=T(41199),G=T(90370);function K(_,H,J){H=I(H,_);for(var Z=-1,$=H.length,ct=!1;++Z<$;){var ht=G(H[Z]);if(!(ct=_!=null&&J(_,ht)))break;_=_[ht]}return ct||++Z!=$?ct:($=_==null?0:_.length,!!$&&N($)&&P(ht,$)&&(z(_)||W(_)))}X.exports=K},19406:function(X){var st="\\ud800-\\udfff",T="\\u0300-\\u036f",I="\\ufe20-\\ufe2f",W="\\u20d0-\\u20ff",z=T+I+W,P="\\ufe0e\\ufe0f",N="\\u200d",G=RegExp("["+N+st+z+P+"]");function K(_){return G.test(_)}X.exports=K},83505:function(X){var st=Object.prototype,T=st.hasOwnProperty;function I(W){var z=W.length,P=new W.constructor(z);return z&&typeof W[0]=="string"&&T.call(W,"index")&&(P.index=W.index,P.input=W.input),P}X.exports=I},44723:function(X,st,T){var I=T(507),W=T(449),z=T(63472),P=T(66922),N=T(89577),G="[object Boolean]",K="[object Date]",_="[object Map]",H="[object Number]",J="[object RegExp]",Z="[object Set]",$="[object String]",ct="[object Symbol]",ht="[object ArrayBuffer]",Ct="[object DataView]",pt="[object Float32Array]",ut="[object Float64Array]",Bt="[object Int8Array]",wt="[object Int16Array]",Tt="[object Int32Array]",kt="[object Uint8Array]",_t="[object Uint8ClampedArray]",Ot="[object Uint16Array]",Gt="[object Uint32Array]";function ae(Wt,ie,ve){var de=Wt.constructor;switch(ie){case ht:return I(Wt);case G:case K:return new de(+Wt);case Ct:return W(Wt,ve);case pt:case ut:case Bt:case wt:case Tt:case kt:case _t:case Ot:case Gt:return N(Wt,ve);case _:return new de;case H:case $:return new de(Wt);case J:return z(Wt);case Z:return new de;case ct:return P(Wt)}}X.exports=ae},32111:function(X,st,T){var I=T(33140),W=T(30516),z=T(41594),P=I?I.isConcatSpreadable:void 0;function N(G){return z(G)||W(G)||!!(P&&G&&G[P])}X.exports=N},10866:function(X,st,T){var I=T(41594),W=T(66459),z=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,P=/^\w*$/;function N(G,K){if(I(G))return!1;var _=typeof G;return _=="number"||_=="symbol"||_=="boolean"||G==null||W(G)?!0:P.test(G)||!z.test(G)||K!=null&&G in Object(K)}X.exports=N},63286:function(X,st,T){var I=T(71721);function W(z){return z===z&&!I(z)}X.exports=W},85120:function(X){function st(T){var I=-1,W=Array(T.size);return T.forEach(function(z,P){W[++I]=[P,z]}),W}X.exports=st},47366:function(X){function st(T,I){return function(W){return W==null?!1:W[T]===I&&(I!==void 0||T in Object(W))}}X.exports=st},72902:function(X,st,T){var I=T(88530),W=500;function z(P){var N=I(P,function(K){return G.size===W&&G.clear(),K}),G=N.cache;return N}X.exports=z},90535:function(X,st,T){var I=T(1276),W=I(Object.keys,Object);X.exports=W},81685:function(X){var st="__lodash_hash_undefined__";function T(I){return this.__data__.set(I,st),this}X.exports=T},1324:function(X){function st(T){return this.__data__.has(T)}X.exports=st},25008:function(X){function st(T){var I=-1,W=Array(T.size);return T.forEach(function(z){W[++I]=z}),W}X.exports=st},68048:function(X){function st(T,I,W){for(var z=W-1,P=T.length;++z<P;)if(T[z]===I)return z;return-1}X.exports=st},62961:function(X,st,T){var I=T(8483),W=T(19406),z=T(22174);function P(N){return W(N)?z(N):I(N)}X.exports=P},80048:function(X,st,T){var I=T(72902),W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,z=/\\(\\)?/g,P=I(function(N){var G=[];return N.charCodeAt(0)===46&&G.push(""),N.replace(W,function(K,_,H,J){G.push(H?J.replace(z,"$1"):_||K)}),G});X.exports=P},90370:function(X,st,T){var I=T(66459),W=1/0;function z(P){if(typeof P=="string"||I(P))return P;var N=P+"";return N=="0"&&1/P==-W?"-0":N}X.exports=z},10242:function(X){var st=/\s/;function T(I){for(var W=I.length;W--&&st.test(I.charAt(W)););return W}X.exports=T},22174:function(X){var st="\\ud800-\\udfff",T="\\u0300-\\u036f",I="\\ufe20-\\ufe2f",W="\\u20d0-\\u20ff",z=T+I+W,P="\\ufe0e\\ufe0f",N="["+st+"]",G="["+z+"]",K="\\ud83c[\\udffb-\\udfff]",_="(?:"+G+"|"+K+")",H="[^"+st+"]",J="(?:\\ud83c[\\udde6-\\uddff]){2}",Z="[\\ud800-\\udbff][\\udc00-\\udfff]",$="\\u200d",ct=_+"?",ht="["+P+"]?",Ct="(?:"+$+"(?:"+[H,J,Z].join("|")+")"+ht+ct+")*",pt=ht+ct+Ct,ut="(?:"+[H+G+"?",G,J,Z,N].join("|")+")",Bt=RegExp(K+"(?="+K+")|"+ut+pt,"g");function wt(Tt){for(var kt=Bt.lastIndex=0;Bt.test(Tt);)++kt;return kt}X.exports=wt},40633:function(X,st,T){var I=T(51024),W=4;function z(P){return I(P,W)}X.exports=z},44187:function(X,st,T){var I=T(51024),W=1,z=4;function P(N){return I(N,W|z)}X.exports=P},34981:function(X,st,T){var I=T(2440),W=T(83914),z=T(20688),P=T(331),N=Object.prototype,G=N.hasOwnProperty,K=I(function(_,H){_=Object(_);var J=-1,Z=H.length,$=Z>2?H[2]:void 0;for($&&z(H[0],H[1],$)&&(Z=1);++J<Z;)for(var ct=H[J],ht=P(ct),Ct=-1,pt=ht.length;++Ct<pt;){var ut=ht[Ct],Bt=_[ut];(Bt===void 0||W(Bt,N[ut])&&!G.call(_,ut))&&(_[ut]=ct[ut])}return _});X.exports=K},61475:function(X,st,T){X.exports=T(47177)},3130:function(X,st,T){var I=T(72280),W=T(22307),z=T(71499),P=T(41594);function N(G,K){var _=P(G)?I:W;return _(G,z(K,3))}X.exports=N},48835:function(X,st,T){var I=T(76470),W=T(45796),z=I(W);X.exports=z},45796:function(X,st,T){var I=T(33405),W=T(71499),z=T(46588),P=Math.max;function N(G,K,_){var H=G==null?0:G.length;if(!H)return-1;var J=_==null?0:z(_);return J<0&&(J=P(H+J,0)),I(G,W(K,3),J)}X.exports=N},1332:function(X,st,T){var I=T(27417);function W(z){var P=z==null?0:z.length;return P?I(z,1):[]}X.exports=W},47177:function(X,st,T){var I=T(22899),W=T(89264),z=T(764),P=T(41594);function N(G,K){var _=P(G)?I:W;return _(G,z(K))}X.exports=N},59946:function(X,st,T){var I=T(43294),W=T(764),z=T(331);function P(N,G){return N==null?N:I(N,W(G),z)}X.exports=P},3239:function(X,st,T){var I=T(96980);function W(z,P,N){var G=z==null?void 0:I(z,P);return G===void 0?N:G}X.exports=W},64760:function(X,st,T){var I=T(11874),W=T(37073);function z(P,N){return P!=null&&W(P,N,I)}X.exports=z},35339:function(X,st,T){var I=T(4769),W=T(37073);function z(P,N){return P!=null&&W(P,N,I)}X.exports=z},74336:function(X,st,T){var I=T(63427),W=T(29148),z=T(30516),P=T(41594),N=T(9015),G=T(33636),K=T(46024),_=T(53745),H="[object Map]",J="[object Set]",Z=Object.prototype,$=Z.hasOwnProperty;function ct(ht){if(ht==null)return!0;if(N(ht)&&(P(ht)||typeof ht=="string"||typeof ht.splice=="function"||G(ht)||_(ht)||z(ht)))return!ht.length;var Ct=W(ht);if(Ct==H||Ct==J)return!ht.size;if(K(ht))return!I(ht).length;for(var pt in ht)if($.call(ht,pt))return!1;return!0}X.exports=ct},32455:function(X,st,T){var I=T(9961),W=T(82230),z=T(37340),P=z&&z.isMap,N=P?W(P):I;X.exports=N},60437:function(X,st,T){var I=T(65562),W=T(82230),z=T(37340),P=z&&z.isSet,N=P?W(P):I;X.exports=N},13720:function(X,st,T){var I=T(17325),W=T(41594),z=T(71161),P="[object String]";function N(G){return typeof G=="string"||!W(G)&&z(G)&&I(G)==P}X.exports=N},66459:function(X,st,T){var I=T(17325),W=T(71161),z="[object Symbol]";function P(N){return typeof N=="symbol"||W(N)&&I(N)==z}X.exports=P},68408:function(X){function st(T){return T===void 0}X.exports=st},66357:function(X,st,T){var I=T(91762),W=T(63427),z=T(9015);function P(N){return z(N)?I(N):W(N)}X.exports=P},47522:function(X){function st(T){var I=T==null?0:T.length;return I?T[I-1]:void 0}X.exports=st},81426:function(X,st,T){var I=T(43453),W=T(71499),z=T(27592),P=T(41594);function N(G,K){var _=P(G)?I:z;return _(G,W(K,3))}X.exports=N},60032:function(X,st,T){var I=T(67109),W=T(23543),z=T(71499);function P(N,G){var K={};return G=z(G,3),W(N,function(_,H,J){I(K,H,G(_,H,J))}),K}X.exports=P},18038:function(X,st,T){var I=T(87542),W=T(52538),z=T(44525);function P(N){return N&&N.length?I(N,z,W):void 0}X.exports=P},88530:function(X,st,T){var I=T(97800),W="Expected a function";function z(P,N){if(typeof P!="function"||N!=null&&typeof N!="function")throw new TypeError(W);var G=function(){var K=arguments,_=N?N.apply(this,K):K[0],H=G.cache;if(H.has(_))return H.get(_);var J=P.apply(this,K);return G.cache=H.set(_,J)||H,J};return G.cache=new(z.Cache||I),G}z.Cache=I,X.exports=z},60169:function(X,st,T){var I=T(87542),W=T(85679),z=T(44525);function P(N){return N&&N.length?I(N,z,W):void 0}X.exports=P},13604:function(X,st,T){var I=T(87542),W=T(71499),z=T(85679);function P(N,G){return N&&N.length?I(N,W(G,2),z):void 0}X.exports=P},65075:function(X){function st(){}X.exports=st},76308:function(X,st,T){var I=T(40911),W=function(){return I.Date.now()};X.exports=W},72333:function(X,st,T){var I=T(80073),W=T(33944),z=W(function(P,N){return P==null?{}:I(P,N)});X.exports=z},59932:function(X,st,T){var I=T(11372),W=T(91315),z=T(10866),P=T(90370);function N(G){return z(G)?I(P(G)):W(G)}X.exports=N},69235:function(X,st,T){var I=T(6651),W=I();X.exports=W},9695:function(X,st,T){var I=T(85665),W=T(89264),z=T(71499),P=T(88120),N=T(41594);function G(K,_,H){var J=N(K)?I:P,Z=arguments.length<3;return J(K,z(_,4),H,Z,W)}X.exports=G},24727:function(X,st,T){var I=T(63427),W=T(29148),z=T(9015),P=T(13720),N=T(62961),G="[object Map]",K="[object Set]";function _(H){if(H==null)return 0;if(z(H))return P(H)?N(H):H.length;var J=W(H);return J==G||J==K?H.size:I(H).length}X.exports=_},35020:function(X,st,T){var I=T(27417),W=T(50447),z=T(2440),P=T(20688),N=z(function(G,K){if(G==null)return[];var _=K.length;return _>1&&P(G,K[0],K[1])?K=[]:_>2&&P(K[0],K[1],K[2])&&(K=[K[0]]),W(G,I(K,1),[])});X.exports=N},57004:function(X){function st(){return[]}X.exports=st},925:function(X,st,T){var I=T(13933),W=1/0,z=17976931348623157e292;function P(N){if(!N)return N===0?N:0;if(N=I(N),N===W||N===-W){var G=N<0?-1:1;return G*z}return N===N?N:0}X.exports=P},46588:function(X,st,T){var I=T(925);function W(z){var P=I(z),N=P%1;return P===P?N?P-N:P:0}X.exports=W},13933:function(X,st,T){var I=T(8944),W=T(71721),z=T(66459),P=NaN,N=/^[-+]0x[0-9a-f]+$/i,G=/^0b[01]+$/i,K=/^0o[0-7]+$/i,_=parseInt;function H(J){if(typeof J=="number")return J;if(z(J))return P;if(W(J)){var Z=typeof J.valueOf=="function"?J.valueOf():J;J=W(Z)?Z+"":Z}if(typeof J!="string")return J===0?J:+J;J=I(J);var $=G.test(J);return $||K.test(J)?_(J.slice(2),$?2:8):N.test(J)?P:+J}X.exports=H},14135:function(X,st,T){var I=T(12580);function W(z){return z==null?"":I(z)}X.exports=W},61477:function(X,st,T){var I=T(22899),W=T(93511),z=T(23543),P=T(71499),N=T(13530),G=T(41594),K=T(33636),_=T(92581),H=T(71721),J=T(53745);function Z($,ct,ht){var Ct=G($),pt=Ct||K($)||J($);if(ct=P(ct,4),ht==null){var ut=$&&$.constructor;pt?ht=Ct?new ut:[]:H($)?ht=_(ut)?W(N($)):{}:ht={}}return(pt?I:z)($,function(Bt,wt,Tt){return ct(ht,Bt,wt,Tt)}),ht}X.exports=Z},99477:function(X,st,T){var I=T(27417),W=T(2440),z=T(75996),P=T(20577),N=W(function(G){return z(I(G,1,P,!0))});X.exports=N},69624:function(X,st,T){var I=T(14135),W=0;function z(P){var N=++W;return I(P)+N}X.exports=z},72834:function(X,st,T){var I=T(98030),W=T(66357);function z(P){return P==null?[]:I(P,W(P))}X.exports=z},79261:function(X,st,T){var I=T(78436),W=T(30232);function z(P,N){return W(P||[],N||[],I)}X.exports=z},34402:function(X,st,T){"use strict";T.r(st),T.d(st,{default:function(){return P}});var I=T(34634);function W(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,I.isAnyArray)(N))throw new TypeError("input must be an array");if(N.length===0)throw new TypeError("input must not be empty");var K=G.fromIndex,_=K===void 0?0:K,H=G.toIndex,J=H===void 0?N.length:H;if(_<0||_>=N.length||!Number.isInteger(_))throw new Error("fromIndex must be a positive integer smaller than length");if(J<=_||J>N.length||!Number.isInteger(J))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var Z=N[_],$=_+1;$<J;$++)N[$]>Z&&(Z=N[$]);return Z}function z(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,I.isAnyArray)(N))throw new TypeError("input must be an array");if(N.length===0)throw new TypeError("input must not be empty");var K=G.fromIndex,_=K===void 0?0:K,H=G.toIndex,J=H===void 0?N.length:H;if(_<0||_>=N.length||!Number.isInteger(_))throw new Error("fromIndex must be a positive integer smaller than length");if(J<=_||J>N.length||!Number.isInteger(J))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var Z=N[_],$=_+1;$<J;$++)N[$]<Z&&(Z=N[$]);return Z}function P(N){var G=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,I.isAnyArray)(N)){if(N.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var K;if(G.output!==void 0){if(!(0,I.isAnyArray)(G.output))throw new TypeError("output option must be an array if specified");K=G.output}else K=new Array(N.length);var _=z(N),H=W(N);if(_===H)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var J=G.min,Z=J===void 0?G.autoMinMax?_:0:J,$=G.max,ct=$===void 0?G.autoMinMax?H:1:$;if(Z>=ct)throw new RangeError("min option must be smaller than max option");for(var ht=(ct-Z)/(H-_),Ct=0;Ct<N.length;Ct++)K[Ct]=(N[Ct]-_)*ht+Z;return K}},81683:function(X,st,T){"use strict";var I=T(55973),W=Array.prototype.concat,z=Array.prototype.slice,P=X.exports=function(G){for(var K=[],_=0,H=G.length;_<H;_++){var J=G[_];I(J)?K=W.call(K,z.call(J)):K.push(J)}return K};P.wrap=function(N){return function(){return N(P(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"},96885:function(X,st,T){"use strict";T.d(st,{Z:function(){return P}});var I=T(38882),W=T(54628),z=T(51296);function P(N,G,K){return G=(0,I.Z)(G),(0,z.Z)(N,(0,W.Z)()?Reflect.construct(G,K||[],(0,I.Z)(N).constructor):G.apply(N,K))}},80813:function(X,st,T){"use strict";T.d(st,{CR:function(){return ut},Jh:function(){return ct},Q_:function(){return Oe},XA:function(){return pt},ZT:function(){return W},_T:function(){return P},ev:function(){return Tt},mG:function(){return $},pi:function(){return z},pr:function(){return wt}});var I=function(Pt,zt){return I=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(jt,gt){jt.__proto__=gt}||function(jt,gt){for(var Mt in gt)Object.prototype.hasOwnProperty.call(gt,Mt)&&(jt[Mt]=gt[Mt])},I(Pt,zt)};function W(Pt,zt){if(typeof zt!="function"&&zt!==null)throw new TypeError("Class extends value "+String(zt)+" is not a constructor or null");I(Pt,zt);function jt(){this.constructor=Pt}Pt.prototype=zt===null?Object.create(zt):(jt.prototype=zt.prototype,new jt)}var z=function(){return z=Object.assign||function(zt){for(var jt,gt=1,Mt=arguments.length;gt<Mt;gt++){jt=arguments[gt];for(var Lt in jt)Object.prototype.hasOwnProperty.call(jt,Lt)&&(zt[Lt]=jt[Lt])}return zt},z.apply(this,arguments)};function P(Pt,zt){var jt={};for(var gt in Pt)Object.prototype.hasOwnProperty.call(Pt,gt)&&zt.indexOf(gt)<0&&(jt[gt]=Pt[gt]);if(Pt!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Mt=0,gt=Object.getOwnPropertySymbols(Pt);Mt<gt.length;Mt++)zt.indexOf(gt[Mt])<0&&Object.prototype.propertyIsEnumerable.call(Pt,gt[Mt])&&(jt[gt[Mt]]=Pt[gt[Mt]]);return jt}function N(Pt,zt,jt,gt){var Mt=arguments.length,Lt=Mt<3?zt:gt===null?gt=Object.getOwnPropertyDescriptor(zt,jt):gt,ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Lt=Reflect.decorate(Pt,zt,jt,gt);else for(var be=Pt.length-1;be>=0;be--)(ee=Pt[be])&&(Lt=(Mt<3?ee(Lt):Mt>3?ee(zt,jt,Lt):ee(zt,jt))||Lt);return Mt>3&&Lt&&Object.defineProperty(zt,jt,Lt),Lt}function G(Pt,zt){return function(jt,gt){zt(jt,gt,Pt)}}function K(Pt,zt,jt,gt,Mt,Lt){function ee(zr){if(zr!==void 0&&typeof zr!="function")throw new TypeError("Function expected");return zr}for(var be=gt.kind,_e=be==="getter"?"get":be==="setter"?"set":"value",Me=!zt&&Pt?gt.static?Pt:Pt.prototype:null,nn=zt||(Me?Object.getOwnPropertyDescriptor(Me,gt.name):{}),rr,or=!1,Ge=jt.length-1;Ge>=0;Ge--){var ze={};for(var me in gt)ze[me]=me==="access"?{}:gt[me];for(var me in gt.access)ze.access[me]=gt.access[me];ze.addInitializer=function(zr){if(or)throw new TypeError("Cannot add initializers after decoration has completed");Lt.push(ee(zr||null))};var Ve=(0,jt[Ge])(be==="accessor"?{get:nn.get,set:nn.set}:nn[_e],ze);if(be==="accessor"){if(Ve===void 0)continue;if(Ve===null||typeof Ve!="object")throw new TypeError("Object expected");(rr=ee(Ve.get))&&(nn.get=rr),(rr=ee(Ve.set))&&(nn.set=rr),(rr=ee(Ve.init))&&Mt.unshift(rr)}else(rr=ee(Ve))&&(be==="field"?Mt.unshift(rr):nn[_e]=rr)}Me&&Object.defineProperty(Me,gt.name,nn),or=!0}function _(Pt,zt,jt){for(var gt=arguments.length>2,Mt=0;Mt<zt.length;Mt++)jt=gt?zt[Mt].call(Pt,jt):zt[Mt].call(Pt);return gt?jt:void 0}function H(Pt){return typeof Pt=="symbol"?Pt:"".concat(Pt)}function J(Pt,zt,jt){return typeof zt=="symbol"&&(zt=zt.description?"[".concat(zt.description,"]"):""),Object.defineProperty(Pt,"name",{configurable:!0,value:jt?"".concat(jt," ",zt):zt})}function Z(Pt,zt){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Pt,zt)}function $(Pt,zt,jt,gt){function Mt(Lt){return Lt instanceof jt?Lt:new jt(function(ee){ee(Lt)})}return new(jt||(jt=Promise))(function(Lt,ee){function be(nn){try{Me(gt.next(nn))}catch(rr){ee(rr)}}function _e(nn){try{Me(gt.throw(nn))}catch(rr){ee(rr)}}function Me(nn){nn.done?Lt(nn.value):Mt(nn.value).then(be,_e)}Me((gt=gt.apply(Pt,zt||[])).next())})}function ct(Pt,zt){var jt={label:0,sent:function(){if(Lt[0]&1)throw Lt[1];return Lt[1]},trys:[],ops:[]},gt,Mt,Lt,ee=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return ee.next=be(0),ee.throw=be(1),ee.return=be(2),typeof Symbol=="function"&&(ee[Symbol.iterator]=function(){return this}),ee;function be(Me){return function(nn){return _e([Me,nn])}}function _e(Me){if(gt)throw new TypeError("Generator is already executing.");for(;ee&&(ee=0,Me[0]&&(jt=0)),jt;)try{if(gt=1,Mt&&(Lt=Me[0]&2?Mt.return:Me[0]?Mt.throw||((Lt=Mt.return)&&Lt.call(Mt),0):Mt.next)&&!(Lt=Lt.call(Mt,Me[1])).done)return Lt;switch(Mt=0,Lt&&(Me=[Me[0]&2,Lt.value]),Me[0]){case 0:case 1:Lt=Me;break;case 4:return jt.label++,{value:Me[1],done:!1};case 5:jt.label++,Mt=Me[1],Me=[0];continue;case 7:Me=jt.ops.pop(),jt.trys.pop();continue;default:if(Lt=jt.trys,!(Lt=Lt.length>0&&Lt[Lt.length-1])&&(Me[0]===6||Me[0]===2)){jt=0;continue}if(Me[0]===3&&(!Lt||Me[1]>Lt[0]&&Me[1]<Lt[3])){jt.label=Me[1];break}if(Me[0]===6&&jt.label<Lt[1]){jt.label=Lt[1],Lt=Me;break}if(Lt&&jt.label<Lt[2]){jt.label=Lt[2],jt.ops.push(Me);break}Lt[2]&&jt.ops.pop(),jt.trys.pop();continue}Me=zt.call(Pt,jt)}catch(nn){Me=[6,nn],Mt=0}finally{gt=Lt=0}if(Me[0]&5)throw Me[1];return{value:Me[0]?Me[1]:void 0,done:!0}}}var ht=Object.create?function(Pt,zt,jt,gt){gt===void 0&&(gt=jt);var Mt=Object.getOwnPropertyDescriptor(zt,jt);(!Mt||("get"in Mt?!zt.__esModule:Mt.writable||Mt.configurable))&&(Mt={enumerable:!0,get:function(){return zt[jt]}}),Object.defineProperty(Pt,gt,Mt)}:function(Pt,zt,jt,gt){gt===void 0&&(gt=jt),Pt[gt]=zt[jt]};function Ct(Pt,zt){for(var jt in Pt)jt!=="default"&&!Object.prototype.hasOwnProperty.call(zt,jt)&&ht(zt,Pt,jt)}function pt(Pt){var zt=typeof Symbol=="function"&&Symbol.iterator,jt=zt&&Pt[zt],gt=0;if(jt)return jt.call(Pt);if(Pt&&typeof Pt.length=="number")return{next:function(){return Pt&>>=Pt.length&&(Pt=void 0),{value:Pt&&Pt[gt++],done:!Pt}}};throw new TypeError(zt?"Object is not iterable.":"Symbol.iterator is not defined.")}function ut(Pt,zt){var jt=typeof Symbol=="function"&&Pt[Symbol.iterator];if(!jt)return Pt;var gt=jt.call(Pt),Mt,Lt=[],ee;try{for(;(zt===void 0||zt-- >0)&&!(Mt=gt.next()).done;)Lt.push(Mt.value)}catch(be){ee={error:be}}finally{try{Mt&&!Mt.done&&(jt=gt.return)&&jt.call(gt)}finally{if(ee)throw ee.error}}return Lt}function Bt(){for(var Pt=[],zt=0;zt<arguments.length;zt++)Pt=Pt.concat(ut(arguments[zt]));return Pt}function wt(){for(var Pt=0,zt=0,jt=arguments.length;zt<jt;zt++)Pt+=arguments[zt].length;for(var gt=Array(Pt),Mt=0,zt=0;zt<jt;zt++)for(var Lt=arguments[zt],ee=0,be=Lt.length;ee<be;ee++,Mt++)gt[Mt]=Lt[ee];return gt}function Tt(Pt,zt,jt){if(jt||arguments.length===2)for(var gt=0,Mt=zt.length,Lt;gt<Mt;gt++)(Lt||!(gt in zt))&&(Lt||(Lt=Array.prototype.slice.call(zt,0,gt)),Lt[gt]=zt[gt]);return Pt.concat(Lt||Array.prototype.slice.call(zt))}function kt(Pt){return this instanceof kt?(this.v=Pt,this):new kt(Pt)}function _t(Pt,zt,jt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var gt=jt.apply(Pt,zt||[]),Mt,Lt=[];return Mt=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),be("next"),be("throw"),be("return",ee),Mt[Symbol.asyncIterator]=function(){return this},Mt;function ee(Ge){return function(ze){return Promise.resolve(ze).then(Ge,rr)}}function be(Ge,ze){gt[Ge]&&(Mt[Ge]=function(me){return new Promise(function(Ve,zr){Lt.push([Ge,me,Ve,zr])>1||_e(Ge,me)})},ze&&(Mt[Ge]=ze(Mt[Ge])))}function _e(Ge,ze){try{Me(gt[Ge](ze))}catch(me){or(Lt[0][3],me)}}function Me(Ge){Ge.value instanceof kt?Promise.resolve(Ge.value.v).then(nn,rr):or(Lt[0][2],Ge)}function nn(Ge){_e("next",Ge)}function rr(Ge){_e("throw",Ge)}function or(Ge,ze){Ge(ze),Lt.shift(),Lt.length&&_e(Lt[0][0],Lt[0][1])}}function Ot(Pt){var zt,jt;return zt={},gt("next"),gt("throw",function(Mt){throw Mt}),gt("return"),zt[Symbol.iterator]=function(){return this},zt;function gt(Mt,Lt){zt[Mt]=Pt[Mt]?function(ee){return(jt=!jt)?{value:kt(Pt[Mt](ee)),done:!1}:Lt?Lt(ee):ee}:Lt}}function Gt(Pt){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var zt=Pt[Symbol.asyncIterator],jt;return zt?zt.call(Pt):(Pt=typeof pt=="function"?pt(Pt):Pt[Symbol.iterator](),jt={},gt("next"),gt("throw"),gt("return"),jt[Symbol.asyncIterator]=function(){return this},jt);function gt(Lt){jt[Lt]=Pt[Lt]&&function(ee){return new Promise(function(be,_e){ee=Pt[Lt](ee),Mt(be,_e,ee.done,ee.value)})}}function Mt(Lt,ee,be,_e){Promise.resolve(_e).then(function(Me){Lt({value:Me,done:be})},ee)}}function ae(Pt,zt){return Object.defineProperty?Object.defineProperty(Pt,"raw",{value:zt}):Pt.raw=zt,Pt}var Wt=Object.create?function(Pt,zt){Object.defineProperty(Pt,"default",{enumerable:!0,value:zt})}:function(Pt,zt){Pt.default=zt},ie=function(Pt){return ie=Object.getOwnPropertyNames||function(zt){var jt=[];for(var gt in zt)Object.prototype.hasOwnProperty.call(zt,gt)&&(jt[jt.length]=gt);return jt},ie(Pt)};function ve(Pt){if(Pt&&Pt.__esModule)return Pt;var zt={};if(Pt!=null)for(var jt=ie(Pt),gt=0;gt<jt.length;gt++)jt[gt]!=="default"&&ht(zt,Pt,jt[gt]);return Wt(zt,Pt),zt}function de(Pt){return Pt&&Pt.__esModule?Pt:{default:Pt}}function Oe(Pt,zt,jt,gt){if(jt==="a"&&!gt)throw new TypeError("Private accessor was defined without a getter");if(typeof zt=="function"?Pt!==zt||!gt:!zt.has(Pt))throw new TypeError("Cannot read private member from an object whose class did not declare it");return jt==="m"?gt:jt==="a"?gt.call(Pt):gt?gt.value:zt.get(Pt)}function sn(Pt,zt,jt,gt,Mt){if(gt==="m")throw new TypeError("Private method is not writable");if(gt==="a"&&!Mt)throw new TypeError("Private accessor was defined without a setter");if(typeof zt=="function"?Pt!==zt||!Mt:!zt.has(Pt))throw new TypeError("Cannot write private member to an object whose class did not declare it");return gt==="a"?Mt.call(Pt,jt):Mt?Mt.value=jt:zt.set(Pt,jt),jt}function dn(Pt,zt){if(zt===null||typeof zt!="object"&&typeof zt!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof Pt=="function"?zt===Pt:Pt.has(zt)}function Xn(Pt,zt,jt){if(zt!=null){if(typeof zt!="object"&&typeof zt!="function")throw new TypeError("Object expected.");var gt,Mt;if(jt){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");gt=zt[Symbol.asyncDispose]}if(gt===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");gt=zt[Symbol.dispose],jt&&(Mt=gt)}if(typeof gt!="function")throw new TypeError("Object not disposable.");Mt&&(gt=function(){try{Mt.call(this)}catch(Lt){return Promise.reject(Lt)}}),Pt.stack.push({value:zt,dispose:gt,async:jt})}else jt&&Pt.stack.push({async:!0});return zt}var Jr=typeof SuppressedError=="function"?SuppressedError:function(Pt,zt,jt){var gt=new Error(jt);return gt.name="SuppressedError",gt.error=Pt,gt.suppressed=zt,gt};function ji(Pt){function zt(Lt){Pt.error=Pt.hasError?new Jr(Lt,Pt.error,"An error was suppressed during disposal."):Lt,Pt.hasError=!0}var jt,gt=0;function Mt(){for(;jt=Pt.stack.pop();)try{if(!jt.async&>===1)return gt=0,Pt.stack.push(jt),Promise.resolve().then(Mt);if(jt.dispose){var Lt=jt.dispose.call(jt.value);if(jt.async)return gt|=2,Promise.resolve(Lt).then(Mt,function(ee){return zt(ee),Mt()})}else gt|=1}catch(ee){zt(ee)}if(gt===1)return Pt.hasError?Promise.reject(Pt.error):Promise.resolve();if(Pt.hasError)throw Pt.error}return Mt()}function As(Pt,zt){return typeof Pt=="string"&&/^\.\.?\//.test(Pt)?Pt.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(jt,gt,Mt,Lt,ee){return gt?zt?".jsx":".js":Mt&&(!Lt||!ee)?jt:Mt+Lt+"."+ee.toLowerCase()+"js"}):Pt}var ho={__extends:W,__assign:z,__rest:P,__decorate:N,__param:G,__esDecorate:K,__runInitializers:_,__propKey:H,__setFunctionName:J,__metadata:Z,__awaiter:$,__generator:ct,__createBinding:ht,__exportStar:Ct,__values:pt,__read:ut,__spread:Bt,__spreadArrays:wt,__spreadArray:Tt,__await:kt,__asyncGenerator:_t,__asyncDelegator:Ot,__asyncValues:Gt,__makeTemplateObject:ae,__importStar:ve,__importDefault:de,__classPrivateFieldGet:Oe,__classPrivateFieldSet:sn,__classPrivateFieldIn:dn,__addDisposableResource:Xn,__disposeResources:ji,__rewriteRelativeImportExtension:As}}}]);
|
|
|
}()); |