|
|
!(function(){var Sz=Object.defineProperty,Pz=Object.defineProperties;var Oz=Object.getOwnPropertyDescriptors;var Q2=Object.getOwnPropertySymbols;var Cz=Object.prototype.hasOwnProperty,Dz=Object.prototype.propertyIsEnumerable;var jo=Math.pow,Bp=(Se,Ce,Y)=>Ce in Se?Sz(Se,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Y}):Se[Ce]=Y,xu=(Se,Ce)=>{for(var Y in Ce||(Ce={}))Cz.call(Ce,Y)&&Bp(Se,Y,Ce[Y]);if(Q2)for(var Y of Q2(Ce))Dz.call(Ce,Y)&&Bp(Se,Y,Ce[Y]);return Se},kp=(Se,Ce)=>Pz(Se,Oz(Ce));var Xr=(Se,Ce,Y)=>Bp(Se,typeof Ce!="symbol"?Ce+"":Ce,Y);(self.webpackChunk=self.webpackChunk||[]).push([[5567],{81710:function(Se,Ce,Y){"use strict";Y.d(Ce,{kJ:function(){return rv},RN:function(){return cz}});var X={};Y.r(X),Y.d(X,{add:function(){return Gn},adjoint:function(){return It},clone:function(){return Ve},copy:function(){return Ke},create:function(){return Ge},determinant:function(){return Ct},equals:function(){return Vt},exactEquals:function(){return Gt},frob:function(){return di},fromQuat:function(){return Tn},fromQuat2:function(){return Pn},fromRotation:function(){return Yt},fromRotationTranslation:function(){return nn},fromRotationTranslationScale:function(){return Zn},fromRotationTranslationScaleOrigin:function(){return Wn},fromScaling:function(){return Ft},fromTranslation:function(){return rn},fromValues:function(){return at},fromXRotation:function(){return qt},fromYRotation:function(){return cn},fromZRotation:function(){return ln},frustum:function(){return nr},getRotation:function(){return wn},getScaling:function(){return hn},getTranslation:function(){return Nn},identity:function(){return Qe},invert:function(){return bt},lookAt:function(){return Cr},mul:function(){return vn},multiply:function(){return _t},multiplyScalar:function(){return Hn},multiplyScalarAndAdd:function(){return ur},ortho:function(){return br},orthoNO:function(){return ri},orthoZO:function(){return bi},perspective:function(){return Kn},perspectiveFromFieldOfView:function(){return xi},perspectiveNO:function(){return En},perspectiveZO:function(){return kr},rotate:function(){return $e},rotateX:function(){return xt},rotateY:function(){return Rt},rotateZ:function(){return Mt},scale:function(){return Bt},set:function(){return Le},str:function(){return Vi},sub:function(){return Dn},subtract:function(){return _n},targetTo:function(){return fa},translate:function(){return St},transpose:function(){return ut}});var re={};Y.r(re),Y.d(re,{circle:function(){return GL},diamond:function(){return HL},rect:function(){return VL},simple:function(){return KL},triangle:function(){return X1},triangleRect:function(){return ZL},vee:function(){return jL}});var V=Y(77321),b=Y(96949),U=Y(55090),C=Y(80702),w=Y(97889),y=Y(77205),T=Y(52487),x=Y(37271),p=x,m=1e-6,L=typeof Float32Array!="undefined"?Float32Array:Array,d=Math.random;function g(n){L=n}var A=Math.PI/180;function M(n){return n*A}function O(n,e){return Math.abs(n-e)<=m*Math.max(1,Math.abs(n),Math.abs(e))}Math.hypot||(Math.hypot=function(){for(var n=0,e=arguments.length;e--;)n+=arguments[e]*arguments[e];return Math.sqrt(n)});function S(){var n=new L(3);return L!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n}function I(n){var e=new L(3);return e[0]=n[0],e[1]=n[1],e[2]=n[2],e}function c(n){var e=n[0],t=n[1],r=n[2];return Math.hypot(e,t,r)}function f(n,e,t){var r=new L(3);return r[0]=n,r[1]=e,r[2]=t,r}function P(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n}function N(n,e,t,r){return n[0]=e,n[1]=t,n[2]=r,n}function k(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n}function W(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n}function z(n,e,t){return n[0]=e[0]*t[0],n[1]=e[1]*t[1],n[2]=e[2]*t[2],n}function Z(n,e,t){return n[0]=e[0]/t[0],n[1]=e[1]/t[1],n[2]=e[2]/t[2],n}function J(n,e){return n[0]=Math.ceil(e[0]),n[1]=Math.ceil(e[1]),n[2]=Math.ceil(e[2]),n}function ee(n,e){return n[0]=Math.floor(e[0]),n[1]=Math.floor(e[1]),n[2]=Math.floor(e[2]),n}function $(n,e,t){return n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n[2]=Math.min(e[2],t[2]),n}function ie(n,e,t){return n[0]=Math.max(e[0],t[0]),n[1]=Math.max(e[1],t[1]),n[2]=Math.max(e[2],t[2]),n}function se(n,e){return n[0]=Math.round(e[0]),n[1]=Math.round(e[1]),n[2]=Math.round(e[2]),n}function ne(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n}function ce(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n[2]=e[2]+t[2]*r,n}function ae(n,e){var t=e[0]-n[0],r=e[1]-n[1],i=e[2]-n[2];return Math.hypot(t,r,i)}function fe(n,e){var t=e[0]-n[0],r=e[1]-n[1],i=e[2]-n[2];return t*t+r*r+i*i}function oe(n){var e=n[0],t=n[1],r=n[2];return e*e+t*t+r*r}function pe(n,e){return n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n}function _e(n,e){return n[0]=1/e[0],n[1]=1/e[1],n[2]=1/e[2],n}function de(n,e){var t=e[0],r=e[1],i=e[2],a=t*t+r*r+i*i;return a>0&&(a=1/Math.sqrt(a)),n[0]=e[0]*a,n[1]=e[1]*a,n[2]=e[2]*a,n}function be(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]}function Ae(n,e,t){var r=e[0],i=e[1],a=e[2],s=t[0],o=t[1],l=t[2];return n[0]=i*l-a*o,n[1]=a*s-r*l,n[2]=r*o-i*s,n}function Fe(n,e,t,r){var i=e[0],a=e[1],s=e[2];return n[0]=i+r*(t[0]-i),n[1]=a+r*(t[1]-a),n[2]=s+r*(t[2]-s),n}function Ue(n,e,t,r,i,a){var s=a*a,o=s*(2*a-3)+1,l=s*(a-2)+a,u=s*(a-1),h=s*(3-2*a);return n[0]=e[0]*o+t[0]*l+r[0]*u+i[0]*h,n[1]=e[1]*o+t[1]*l+r[1]*u+i[1]*h,n[2]=e[2]*o+t[2]*l+r[2]*u+i[2]*h,n}function it(n,e,t,r,i,a){var s=1-a,o=s*s,l=a*a,u=o*s,h=3*a*o,v=3*l*s,E=l*a;return n[0]=e[0]*u+t[0]*h+r[0]*v+i[0]*E,n[1]=e[1]*u+t[1]*h+r[1]*v+i[1]*E,n[2]=e[2]*u+t[2]*h+r[2]*v+i[2]*E,n}function tt(n,e){e=e||1;var t=glMatrix.RANDOM()*2*Math.PI,r=glMatrix.RANDOM()*2-1,i=Math.sqrt(1-r*r)*e;return n[0]=Math.cos(t)*i,n[1]=Math.sin(t)*i,n[2]=r*e,n}function et(n,e,t){var r=e[0],i=e[1],a=e[2],s=t[3]*r+t[7]*i+t[11]*a+t[15];return s=s||1,n[0]=(t[0]*r+t[4]*i+t[8]*a+t[12])/s,n[1]=(t[1]*r+t[5]*i+t[9]*a+t[13])/s,n[2]=(t[2]*r+t[6]*i+t[10]*a+t[14])/s,n}function vt(n,e,t){var r=e[0],i=e[1],a=e[2];return n[0]=r*t[0]+i*t[3]+a*t[6],n[1]=r*t[1]+i*t[4]+a*t[7],n[2]=r*t[2]+i*t[5]+a*t[8],n}function dt(n,e,t){var r=t[0],i=t[1],a=t[2],s=t[3],o=e[0],l=e[1],u=e[2],h=i*u-a*l,v=a*o-r*u,E=r*l-i*o,D=i*E-a*v,F=a*h-r*E,G=r*v-i*h,H=s*2;return h*=H,v*=H,E*=H,D*=2,F*=2,G*=2,n[0]=o+h+D,n[1]=l+v+F,n[2]=u+E+G,n}function je(n,e,t,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),n[0]=a[0]+t[0],n[1]=a[1]+t[1],n[2]=a[2]+t[2],n}function nt(n,e,t,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),n[0]=a[0]+t[0],n[1]=a[1]+t[1],n[2]=a[2]+t[2],n}function rt(n,e,t,r){var i=[],a=[];return i[0]=e[0]-t[0],i[1]=e[1]-t[1],i[2]=e[2]-t[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],n[0]=a[0]+t[0],n[1]=a[1]+t[1],n[2]=a[2]+t[2],n}function ft(n,e){var t=n[0],r=n[1],i=n[2],a=e[0],s=e[1],o=e[2],l=Math.sqrt(t*t+r*r+i*i),u=Math.sqrt(a*a+s*s+o*o),h=l*u,v=h&&be(n,e)/h;return Math.acos(Math.min(Math.max(v,-1),1))}function lt(n){return n[0]=0,n[1]=0,n[2]=0,n}function wt(n){return"vec3("+n[0]+", "+n[1]+", "+n[2]+")"}function Re(n,e){return n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]}function We(n,e){var t=n[0],r=n[1],i=n[2],a=e[0],s=e[1],o=e[2];return Math.abs(t-a)<=m*Math.max(1,Math.abs(t),Math.abs(a))&&Math.abs(r-s)<=m*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(i-o)<=m*Math.max(1,Math.abs(i),Math.abs(o))}var Pe=W,ke=null,Ze=null,Ie=ae,Ye=null,qe=c,ot=null,gt=function(){var n=S();return function(e,t,r,i,a,s){var o,l;for(t||(t=3),r||(r=0),i?l=Math.min(i*t+r,e.length):l=e.length,o=r;o<l;o+=t)n[0]=e[o],n[1]=e[o+1],n[2]=e[o+2],a(n,n,s),e[o]=n[0],e[o+1]=n[1],e[o+2]=n[2];return e}}();function pt(){var n=new L(4);return L!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0,n[3]=0),n}function Lt(n){var e=new L(4);return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e}function Tt(n,e,t,r){var i=new L(4);return i[0]=n,i[1]=e,i[2]=t,i[3]=r,i}function Nt(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n}function jt(n,e,t,r,i){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}function zt(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n}function Ot(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n}function Kt(n,e,t){return n[0]=e[0]*t[0],n[1]=e[1]*t[1],n[2]=e[2]*t[2],n[3]=e[3]*t[3],n}function gn(n,e,t){return n[0]=e[0]/t[0],n[1]=e[1]/t[1],n[2]=e[2]/t[2],n[3]=e[3]/t[3],n}function $n(n,e){return n[0]=Math.ceil(e[0]),n[1]=Math.ceil(e[1]),n[2]=Math.ceil(e[2]),n[3]=Math.ceil(e[3]),n}function On(n,e){return n[0]=Math.floor(e[0]),n[1]=Math.floor(e[1]),n[2]=Math.floor(e[2]),n[3]=Math.floor(e[3]),n}function ir(n,e,t){return n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n[2]=Math.min(e[2],t[2]),n[3]=Math.min(e[3],t[3]),n}function mr(n,e,t){return n[0]=Math.max(e[0],t[0]),n[1]=Math.max(e[1],t[1]),n[2]=Math.max(e[2],t[2]),n[3]=Math.max(e[3],t[3]),n}function ar(n,e){return n[0]=Math.round(e[0]),n[1]=Math.round(e[1]),n[2]=Math.round(e[2]),n[3]=Math.round(e[3]),n}function Vn(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n}function Rr(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n[2]=e[2]+t[2]*r,n[3]=e[3]+t[3]*r,n}function er(n,e){var t=e[0]-n[0],r=e[1]-n[1],i=e[2]-n[2],a=e[3]-n[3];return Math.hypot(t,r,i,a)}function an(n,e){var t=e[0]-n[0],r=e[1]-n[1],i=e[2]-n[2],a=e[3]-n[3];return t*t+r*r+i*i+a*a}function $t(n){var e=n[0],t=n[1],r=n[2],i=n[3];return Math.hypot(e,t,r,i)}function mn(n){var e=n[0],t=n[1],r=n[2],i=n[3];return e*e+t*t+r*r+i*i}function Xt(n,e){return n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=-e[3],n}function Fn(n,e){return n[0]=1/e[0],n[1]=1/e[1],n[2]=1/e[2],n[3]=1/e[3],n}function sr(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=t*t+r*r+i*i+a*a;return s>0&&(s=1/Math.sqrt(s)),n[0]=t*s,n[1]=r*s,n[2]=i*s,n[3]=a*s,n}function Cn(n,e){return n[0]*e[0]+n[1]*e[1]+n[2]*e[2]+n[3]*e[3]}function tr(n,e,t,r){var i=t[0]*r[1]-t[1]*r[0],a=t[0]*r[2]-t[2]*r[0],s=t[0]*r[3]-t[3]*r[0],o=t[1]*r[2]-t[2]*r[1],l=t[1]*r[3]-t[3]*r[1],u=t[2]*r[3]-t[3]*r[2],h=e[0],v=e[1],E=e[2],D=e[3];return n[0]=v*u-E*l+D*o,n[1]=-(h*u)+E*s-D*a,n[2]=h*l-v*s+D*i,n[3]=-(h*o)+v*a-E*i,n}function lr(n,e,t,r){var i=e[0],a=e[1],s=e[2],o=e[3];return n[0]=i+r*(t[0]-i),n[1]=a+r*(t[1]-a),n[2]=s+r*(t[2]-s),n[3]=o+r*(t[3]-o),n}function or(n,e){e=e||1;var t,r,i,a,s,o;do t=glMatrix.RANDOM()*2-1,r=glMatrix.RANDOM()*2-1,s=t*t+r*r;while(s>=1);do i=glMatrix.RANDOM()*2-1,a=glMatrix.RANDOM()*2-1,o=i*i+a*a;while(o>=1);var l=Math.sqrt((1-s)/o);return n[0]=e*t,n[1]=e*r,n[2]=e*i*l,n[3]=e*a*l,n}function Ut(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3];return n[0]=t[0]*r+t[4]*i+t[8]*a+t[12]*s,n[1]=t[1]*r+t[5]*i+t[9]*a+t[13]*s,n[2]=t[2]*r+t[6]*i+t[10]*a+t[14]*s,n[3]=t[3]*r+t[7]*i+t[11]*a+t[15]*s,n}function me(n,e,t){var r=e[0],i=e[1],a=e[2],s=t[0],o=t[1],l=t[2],u=t[3],h=u*r+o*a-l*i,v=u*i+l*r-s*a,E=u*a+s*i-o*r,D=-s*r-o*i-l*a;return n[0]=h*u+D*-s+v*-l-E*-o,n[1]=v*u+D*-o+E*-s-h*-l,n[2]=E*u+D*-l+h*-o-v*-s,n[3]=e[3],n}function _(n){return n[0]=0,n[1]=0,n[2]=0,n[3]=0,n}function B(n){return"vec4("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+")"}function R(n,e){return n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]}function j(n,e){var t=n[0],r=n[1],i=n[2],a=n[3],s=e[0],o=e[1],l=e[2],u=e[3];return Math.abs(t-s)<=m*Math.max(1,Math.abs(t),Math.abs(s))&&Math.abs(r-o)<=m*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-l)<=m*Math.max(1,Math.abs(i),Math.abs(l))&&Math.abs(a-u)<=m*Math.max(1,Math.abs(a),Math.abs(u))}var Q=null,Ee=null,we=null,De=null,ye=null,Me=null,Be=null,He=function(){var n=pt();return function(e,t,r,i,a,s){var o,l;for(t||(t=4),r||(r=0),i?l=Math.min(i*t+r,e.length):l=e.length,o=r;o<l;o+=t)n[0]=e[o],n[1]=e[o+1],n[2]=e[o+2],n[3]=e[o+3],a(n,n,s),e[o]=n[0],e[o+1]=n[1],e[o+2]=n[2],e[o+3]=n[3];return e}}();function Ge(){var n=new L(16);return L!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=0,n[12]=0,n[13]=0,n[14]=0),n[0]=1,n[5]=1,n[10]=1,n[15]=1,n}function Ve(n){var e=new L(16);return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],e}function Ke(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n}function at(n,e,t,r,i,a,s,o,l,u,h,v,E,D,F,G){var H=new L(16);return H[0]=n,H[1]=e,H[2]=t,H[3]=r,H[4]=i,H[5]=a,H[6]=s,H[7]=o,H[8]=l,H[9]=u,H[10]=h,H[11]=v,H[12]=E,H[13]=D,H[14]=F,H[15]=G,H}function Le(n,e,t,r,i,a,s,o,l,u,h,v,E,D,F,G,H){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n[4]=a,n[5]=s,n[6]=o,n[7]=l,n[8]=u,n[9]=h,n[10]=v,n[11]=E,n[12]=D,n[13]=F,n[14]=G,n[15]=H,n}function Qe(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function ut(n,e){if(n===e){var t=e[1],r=e[2],i=e[3],a=e[6],s=e[7],o=e[11];n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=t,n[6]=e[9],n[7]=e[13],n[8]=r,n[9]=a,n[11]=e[14],n[12]=i,n[13]=s,n[14]=o}else n[0]=e[0],n[1]=e[4],n[2]=e[8],n[3]=e[12],n[4]=e[1],n[5]=e[5],n[6]=e[9],n[7]=e[13],n[8]=e[2],n[9]=e[6],n[10]=e[10],n[11]=e[14],n[12]=e[3],n[13]=e[7],n[14]=e[11],n[15]=e[15];return n}function bt(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],v=e[9],E=e[10],D=e[11],F=e[12],G=e[13],H=e[14],K=e[15],q=t*o-r*s,te=t*l-i*s,ue=t*u-a*s,le=r*l-i*o,he=r*u-a*o,ve=i*u-a*l,ge=h*G-v*F,Te=h*H-E*F,Oe=h*K-D*F,Ne=v*H-E*G,ze=v*K-D*G,Xe=E*K-D*H,Je=q*Xe-te*ze+ue*Ne+le*Oe-he*Te+ve*ge;return Je?(Je=1/Je,n[0]=(o*Xe-l*ze+u*Ne)*Je,n[1]=(i*ze-r*Xe-a*Ne)*Je,n[2]=(G*ve-H*he+K*le)*Je,n[3]=(E*he-v*ve-D*le)*Je,n[4]=(l*Oe-s*Xe-u*Te)*Je,n[5]=(t*Xe-i*Oe+a*Te)*Je,n[6]=(H*ue-F*ve-K*te)*Je,n[7]=(h*ve-E*ue+D*te)*Je,n[8]=(s*ze-o*Oe+u*ge)*Je,n[9]=(r*Oe-t*ze-a*ge)*Je,n[10]=(F*he-G*ue+K*q)*Je,n[11]=(v*ue-h*he-D*q)*Je,n[12]=(o*Te-s*Ne-l*ge)*Je,n[13]=(t*Ne-r*Te+i*ge)*Je,n[14]=(G*te-F*le-H*q)*Je,n[15]=(h*le-v*te+E*q)*Je,n):null}function It(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],v=e[9],E=e[10],D=e[11],F=e[12],G=e[13],H=e[14],K=e[15];return n[0]=o*(E*K-D*H)-v*(l*K-u*H)+G*(l*D-u*E),n[1]=-(r*(E*K-D*H)-v*(i*K-a*H)+G*(i*D-a*E)),n[2]=r*(l*K-u*H)-o*(i*K-a*H)+G*(i*u-a*l),n[3]=-(r*(l*D-u*E)-o*(i*D-a*E)+v*(i*u-a*l)),n[4]=-(s*(E*K-D*H)-h*(l*K-u*H)+F*(l*D-u*E)),n[5]=t*(E*K-D*H)-h*(i*K-a*H)+F*(i*D-a*E),n[6]=-(t*(l*K-u*H)-s*(i*K-a*H)+F*(i*u-a*l)),n[7]=t*(l*D-u*E)-s*(i*D-a*E)+h*(i*u-a*l),n[8]=s*(v*K-D*G)-h*(o*K-u*G)+F*(o*D-u*v),n[9]=-(t*(v*K-D*G)-h*(r*K-a*G)+F*(r*D-a*v)),n[10]=t*(o*K-u*G)-s*(r*K-a*G)+F*(r*u-a*o),n[11]=-(t*(o*D-u*v)-s*(r*D-a*v)+h*(r*u-a*o)),n[12]=-(s*(v*H-E*G)-h*(o*H-l*G)+F*(o*E-l*v)),n[13]=t*(v*H-E*G)-h*(r*H-i*G)+F*(r*E-i*v),n[14]=-(t*(o*H-l*G)-s*(r*H-i*G)+F*(r*l-i*o)),n[15]=t*(o*E-l*v)-s*(r*E-i*v)+h*(r*l-i*o),n}function Ct(n){var e=n[0],t=n[1],r=n[2],i=n[3],a=n[4],s=n[5],o=n[6],l=n[7],u=n[8],h=n[9],v=n[10],E=n[11],D=n[12],F=n[13],G=n[14],H=n[15],K=e*s-t*a,q=e*o-r*a,te=e*l-i*a,ue=t*o-r*s,le=t*l-i*s,he=r*l-i*o,ve=u*F-h*D,ge=u*G-v*D,Te=u*H-E*D,Oe=h*G-v*F,Ne=h*H-E*F,ze=v*H-E*G;return K*ze-q*Ne+te*Oe+ue*Te-le*ge+he*ve}function _t(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],v=e[8],E=e[9],D=e[10],F=e[11],G=e[12],H=e[13],K=e[14],q=e[15],te=t[0],ue=t[1],le=t[2],he=t[3];return n[0]=te*r+ue*o+le*v+he*G,n[1]=te*i+ue*l+le*E+he*H,n[2]=te*a+ue*u+le*D+he*K,n[3]=te*s+ue*h+le*F+he*q,te=t[4],ue=t[5],le=t[6],he=t[7],n[4]=te*r+ue*o+le*v+he*G,n[5]=te*i+ue*l+le*E+he*H,n[6]=te*a+ue*u+le*D+he*K,n[7]=te*s+ue*h+le*F+he*q,te=t[8],ue=t[9],le=t[10],he=t[11],n[8]=te*r+ue*o+le*v+he*G,n[9]=te*i+ue*l+le*E+he*H,n[10]=te*a+ue*u+le*D+he*K,n[11]=te*s+ue*h+le*F+he*q,te=t[12],ue=t[13],le=t[14],he=t[15],n[12]=te*r+ue*o+le*v+he*G,n[13]=te*i+ue*l+le*E+he*H,n[14]=te*a+ue*u+le*D+he*K,n[15]=te*s+ue*h+le*F+he*q,n}function St(n,e,t){var r=t[0],i=t[1],a=t[2],s,o,l,u,h,v,E,D,F,G,H,K;return e===n?(n[12]=e[0]*r+e[4]*i+e[8]*a+e[12],n[13]=e[1]*r+e[5]*i+e[9]*a+e[13],n[14]=e[2]*r+e[6]*i+e[10]*a+e[14],n[15]=e[3]*r+e[7]*i+e[11]*a+e[15]):(s=e[0],o=e[1],l=e[2],u=e[3],h=e[4],v=e[5],E=e[6],D=e[7],F=e[8],G=e[9],H=e[10],K=e[11],n[0]=s,n[1]=o,n[2]=l,n[3]=u,n[4]=h,n[5]=v,n[6]=E,n[7]=D,n[8]=F,n[9]=G,n[10]=H,n[11]=K,n[12]=s*r+h*i+F*a+e[12],n[13]=o*r+v*i+G*a+e[13],n[14]=l*r+E*i+H*a+e[14],n[15]=u*r+D*i+K*a+e[15]),n}function Bt(n,e,t){var r=t[0],i=t[1],a=t[2];return n[0]=e[0]*r,n[1]=e[1]*r,n[2]=e[2]*r,n[3]=e[3]*r,n[4]=e[4]*i,n[5]=e[5]*i,n[6]=e[6]*i,n[7]=e[7]*i,n[8]=e[8]*a,n[9]=e[9]*a,n[10]=e[10]*a,n[11]=e[11]*a,n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15],n}function $e(n,e,t,r){var i=r[0],a=r[1],s=r[2],o=Math.hypot(i,a,s),l,u,h,v,E,D,F,G,H,K,q,te,ue,le,he,ve,ge,Te,Oe,Ne,ze,Xe,Je,st;return o<m?null:(o=1/o,i*=o,a*=o,s*=o,l=Math.sin(t),u=Math.cos(t),h=1-u,v=e[0],E=e[1],D=e[2],F=e[3],G=e[4],H=e[5],K=e[6],q=e[7],te=e[8],ue=e[9],le=e[10],he=e[11],ve=i*i*h+u,ge=a*i*h+s*l,Te=s*i*h-a*l,Oe=i*a*h-s*l,Ne=a*a*h+u,ze=s*a*h+i*l,Xe=i*s*h+a*l,Je=a*s*h-i*l,st=s*s*h+u,n[0]=v*ve+G*ge+te*Te,n[1]=E*ve+H*ge+ue*Te,n[2]=D*ve+K*ge+le*Te,n[3]=F*ve+q*ge+he*Te,n[4]=v*Oe+G*Ne+te*ze,n[5]=E*Oe+H*Ne+ue*ze,n[6]=D*Oe+K*Ne+le*ze,n[7]=F*Oe+q*Ne+he*ze,n[8]=v*Xe+G*Je+te*st,n[9]=E*Xe+H*Je+ue*st,n[10]=D*Xe+K*Je+le*st,n[11]=F*Xe+q*Je+he*st,e!==n&&(n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n)}function xt(n,e,t){var r=Math.sin(t),i=Math.cos(t),a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],h=e[9],v=e[10],E=e[11];return e!==n&&(n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[4]=a*i+u*r,n[5]=s*i+h*r,n[6]=o*i+v*r,n[7]=l*i+E*r,n[8]=u*i-a*r,n[9]=h*i-s*r,n[10]=v*i-o*r,n[11]=E*i-l*r,n}function Rt(n,e,t){var r=Math.sin(t),i=Math.cos(t),a=e[0],s=e[1],o=e[2],l=e[3],u=e[8],h=e[9],v=e[10],E=e[11];return e!==n&&(n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[0]=a*i-u*r,n[1]=s*i-h*r,n[2]=o*i-v*r,n[3]=l*i-E*r,n[8]=a*r+u*i,n[9]=s*r+h*i,n[10]=o*r+v*i,n[11]=l*r+E*i,n}function Mt(n,e,t){var r=Math.sin(t),i=Math.cos(t),a=e[0],s=e[1],o=e[2],l=e[3],u=e[4],h=e[5],v=e[6],E=e[7];return e!==n&&(n[8]=e[8],n[9]=e[9],n[10]=e[10],n[11]=e[11],n[12]=e[12],n[13]=e[13],n[14]=e[14],n[15]=e[15]),n[0]=a*i+u*r,n[1]=s*i+h*r,n[2]=o*i+v*r,n[3]=l*i+E*r,n[4]=u*i-a*r,n[5]=h*i-s*r,n[6]=v*i-o*r,n[7]=E*i-l*r,n}function rn(n,e){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=e[0],n[13]=e[1],n[14]=e[2],n[15]=1,n}function Ft(n,e){return n[0]=e[0],n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=e[1],n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=e[2],n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function Yt(n,e,t){var r=t[0],i=t[1],a=t[2],s=Math.hypot(r,i,a),o,l,u;return s<m?null:(s=1/s,r*=s,i*=s,a*=s,o=Math.sin(e),l=Math.cos(e),u=1-l,n[0]=r*r*u+l,n[1]=i*r*u+a*o,n[2]=a*r*u-i*o,n[3]=0,n[4]=r*i*u-a*o,n[5]=i*i*u+l,n[6]=a*i*u+r*o,n[7]=0,n[8]=r*a*u+i*o,n[9]=i*a*u-r*o,n[10]=a*a*u+l,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n)}function qt(n,e){var t=Math.sin(e),r=Math.cos(e);return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=r,n[6]=t,n[7]=0,n[8]=0,n[9]=-t,n[10]=r,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function cn(n,e){var t=Math.sin(e),r=Math.cos(e);return n[0]=r,n[1]=0,n[2]=-t,n[3]=0,n[4]=0,n[5]=1,n[6]=0,n[7]=0,n[8]=t,n[9]=0,n[10]=r,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function ln(n,e){var t=Math.sin(e),r=Math.cos(e);return n[0]=r,n[1]=t,n[2]=0,n[3]=0,n[4]=-t,n[5]=r,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=1,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function nn(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3],o=r+r,l=i+i,u=a+a,h=r*o,v=r*l,E=r*u,D=i*l,F=i*u,G=a*u,H=s*o,K=s*l,q=s*u;return n[0]=1-(D+G),n[1]=v+q,n[2]=E-K,n[3]=0,n[4]=v-q,n[5]=1-(h+G),n[6]=F+H,n[7]=0,n[8]=E+K,n[9]=F-H,n[10]=1-(h+D),n[11]=0,n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=1,n}function Pn(n,e){var t=new L(3),r=-e[0],i=-e[1],a=-e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],v=r*r+i*i+a*a+s*s;return v>0?(t[0]=(o*s+h*r+l*a-u*i)*2/v,t[1]=(l*s+h*i+u*r-o*a)*2/v,t[2]=(u*s+h*a+o*i-l*r)*2/v):(t[0]=(o*s+h*r+l*a-u*i)*2,t[1]=(l*s+h*i+u*r-o*a)*2,t[2]=(u*s+h*a+o*i-l*r)*2),nn(n,e,t),n}function Nn(n,e){return n[0]=e[12],n[1]=e[13],n[2]=e[14],n}function hn(n,e){var t=e[0],r=e[1],i=e[2],a=e[4],s=e[5],o=e[6],l=e[8],u=e[9],h=e[10];return n[0]=Math.hypot(t,r,i),n[1]=Math.hypot(a,s,o),n[2]=Math.hypot(l,u,h),n}function wn(n,e){var t=new L(3);hn(t,e);var r=1/t[0],i=1/t[1],a=1/t[2],s=e[0]*r,o=e[1]*i,l=e[2]*a,u=e[4]*r,h=e[5]*i,v=e[6]*a,E=e[8]*r,D=e[9]*i,F=e[10]*a,G=s+h+F,H=0;return G>0?(H=Math.sqrt(G+1)*2,n[3]=.25*H,n[0]=(v-D)/H,n[1]=(E-l)/H,n[2]=(o-u)/H):s>h&&s>F?(H=Math.sqrt(1+s-h-F)*2,n[3]=(v-D)/H,n[0]=.25*H,n[1]=(o+u)/H,n[2]=(E+l)/H):h>F?(H=Math.sqrt(1+h-s-F)*2,n[3]=(E-l)/H,n[0]=(o+u)/H,n[1]=.25*H,n[2]=(v+D)/H):(H=Math.sqrt(1+F-s-h)*2,n[3]=(o-u)/H,n[0]=(E+l)/H,n[1]=(v+D)/H,n[2]=.25*H),n}function Zn(n,e,t,r){var i=e[0],a=e[1],s=e[2],o=e[3],l=i+i,u=a+a,h=s+s,v=i*l,E=i*u,D=i*h,F=a*u,G=a*h,H=s*h,K=o*l,q=o*u,te=o*h,ue=r[0],le=r[1],he=r[2];return n[0]=(1-(F+H))*ue,n[1]=(E+te)*ue,n[2]=(D-q)*ue,n[3]=0,n[4]=(E-te)*le,n[5]=(1-(v+H))*le,n[6]=(G+K)*le,n[7]=0,n[8]=(D+q)*he,n[9]=(G-K)*he,n[10]=(1-(v+F))*he,n[11]=0,n[12]=t[0],n[13]=t[1],n[14]=t[2],n[15]=1,n}function Wn(n,e,t,r,i){var a=e[0],s=e[1],o=e[2],l=e[3],u=a+a,h=s+s,v=o+o,E=a*u,D=a*h,F=a*v,G=s*h,H=s*v,K=o*v,q=l*u,te=l*h,ue=l*v,le=r[0],he=r[1],ve=r[2],ge=i[0],Te=i[1],Oe=i[2],Ne=(1-(G+K))*le,ze=(D+ue)*le,Xe=(F-te)*le,Je=(D-ue)*he,st=(1-(E+K))*he,Et=(H+q)*he,mt=(F+te)*ve,ct=(H-q)*ve,ht=(1-(E+G))*ve;return n[0]=Ne,n[1]=ze,n[2]=Xe,n[3]=0,n[4]=Je,n[5]=st,n[6]=Et,n[7]=0,n[8]=mt,n[9]=ct,n[10]=ht,n[11]=0,n[12]=t[0]+ge-(Ne*ge+Je*Te+mt*Oe),n[13]=t[1]+Te-(ze*ge+st*Te+ct*Oe),n[14]=t[2]+Oe-(Xe*ge+Et*Te+ht*Oe),n[15]=1,n}function Tn(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=t+t,o=r+r,l=i+i,u=t*s,h=r*s,v=r*o,E=i*s,D=i*o,F=i*l,G=a*s,H=a*o,K=a*l;return n[0]=1-v-F,n[1]=h+K,n[2]=E-H,n[3]=0,n[4]=h-K,n[5]=1-u-F,n[6]=D+G,n[7]=0,n[8]=E+H,n[9]=D-G,n[10]=1-u-v,n[11]=0,n[12]=0,n[13]=0,n[14]=0,n[15]=1,n}function nr(n,e,t,r,i,a,s){var o=1/(t-e),l=1/(i-r),u=1/(a-s);return n[0]=a*2*o,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a*2*l,n[6]=0,n[7]=0,n[8]=(t+e)*o,n[9]=(i+r)*l,n[10]=(s+a)*u,n[11]=-1,n[12]=0,n[13]=0,n[14]=s*a*2*u,n[15]=0,n}function En(n,e,t,r,i){var a=1/Math.tan(e/2),s;return n[0]=a/t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,i!=null&&i!==1/0?(s=1/(r-i),n[10]=(i+r)*s,n[14]=2*i*r*s):(n[10]=-1,n[14]=-2*r),n}var Kn=En;function kr(n,e,t,r,i){var a=1/Math.tan(e/2),s;return n[0]=a/t,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=a,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[11]=-1,n[12]=0,n[13]=0,n[15]=0,i!=null&&i!==1/0?(s=1/(r-i),n[10]=i*s,n[14]=i*r*s):(n[10]=-1,n[14]=-r),n}function xi(n,e,t,r){var i=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),s=Math.tan(e.leftDegrees*Math.PI/180),o=Math.tan(e.rightDegrees*Math.PI/180),l=2/(s+o),u=2/(i+a);return n[0]=l,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=u,n[6]=0,n[7]=0,n[8]=-((s-o)*l*.5),n[9]=(i-a)*u*.5,n[10]=r/(t-r),n[11]=-1,n[12]=0,n[13]=0,n[14]=r*t/(t-r),n[15]=0,n}function ri(n,e,t,r,i,a,s){var o=1/(e-t),l=1/(r-i),u=1/(a-s);return n[0]=-2*o,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=2*u,n[11]=0,n[12]=(e+t)*o,n[13]=(i+r)*l,n[14]=(s+a)*u,n[15]=1,n}var br=ri;function bi(n,e,t,r,i,a,s){var o=1/(e-t),l=1/(r-i),u=1/(a-s);return n[0]=-2*o,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=-2*l,n[6]=0,n[7]=0,n[8]=0,n[9]=0,n[10]=u,n[11]=0,n[12]=(e+t)*o,n[13]=(i+r)*l,n[14]=a*u,n[15]=1,n}function Cr(n,e,t,r){var i,a,s,o,l,u,h,v,E,D,F=e[0],G=e[1],H=e[2],K=r[0],q=r[1],te=r[2],ue=t[0],le=t[1],he=t[2];return Math.abs(F-ue)<m&&Math.abs(G-le)<m&&Math.abs(H-he)<m?Qe(n):(h=F-ue,v=G-le,E=H-he,D=1/Math.hypot(h,v,E),h*=D,v*=D,E*=D,i=q*E-te*v,a=te*h-K*E,s=K*v-q*h,D=Math.hypot(i,a,s),D?(D=1/D,i*=D,a*=D,s*=D):(i=0,a=0,s=0),o=v*s-E*a,l=E*i-h*s,u=h*a-v*i,D=Math.hypot(o,l,u),D?(D=1/D,o*=D,l*=D,u*=D):(o=0,l=0,u=0),n[0]=i,n[1]=o,n[2]=h,n[3]=0,n[4]=a,n[5]=l,n[6]=v,n[7]=0,n[8]=s,n[9]=u,n[10]=E,n[11]=0,n[12]=-(i*F+a*G+s*H),n[13]=-(o*F+l*G+u*H),n[14]=-(h*F+v*G+E*H),n[15]=1,n)}function fa(n,e,t,r){var i=e[0],a=e[1],s=e[2],o=r[0],l=r[1],u=r[2],h=i-t[0],v=a-t[1],E=s-t[2],D=h*h+v*v+E*E;D>0&&(D=1/Math.sqrt(D),h*=D,v*=D,E*=D);var F=l*E-u*v,G=u*h-o*E,H=o*v-l*h;return D=F*F+G*G+H*H,D>0&&(D=1/Math.sqrt(D),F*=D,G*=D,H*=D),n[0]=F,n[1]=G,n[2]=H,n[3]=0,n[4]=v*H-E*G,n[5]=E*F-h*H,n[6]=h*G-v*F,n[7]=0,n[8]=h,n[9]=v,n[10]=E,n[11]=0,n[12]=i,n[13]=a,n[14]=s,n[15]=1,n}function Vi(n){return"mat4("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+", "+n[4]+", "+n[5]+", "+n[6]+", "+n[7]+", "+n[8]+", "+n[9]+", "+n[10]+", "+n[11]+", "+n[12]+", "+n[13]+", "+n[14]+", "+n[15]+")"}function di(n){return Math.hypot(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8],n[9],n[10],n[11],n[12],n[13],n[14],n[15])}function Gn(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n[9]=e[9]+t[9],n[10]=e[10]+t[10],n[11]=e[11]+t[11],n[12]=e[12]+t[12],n[13]=e[13]+t[13],n[14]=e[14]+t[14],n[15]=e[15]+t[15],n}function _n(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n[9]=e[9]-t[9],n[10]=e[10]-t[10],n[11]=e[11]-t[11],n[12]=e[12]-t[12],n[13]=e[13]-t[13],n[14]=e[14]-t[14],n[15]=e[15]-t[15],n}function Hn(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n[9]=e[9]*t,n[10]=e[10]*t,n[11]=e[11]*t,n[12]=e[12]*t,n[13]=e[13]*t,n[14]=e[14]*t,n[15]=e[15]*t,n}function ur(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n[2]=e[2]+t[2]*r,n[3]=e[3]+t[3]*r,n[4]=e[4]+t[4]*r,n[5]=e[5]+t[5]*r,n[6]=e[6]+t[6]*r,n[7]=e[7]+t[7]*r,n[8]=e[8]+t[8]*r,n[9]=e[9]+t[9]*r,n[10]=e[10]+t[10]*r,n[11]=e[11]+t[11]*r,n[12]=e[12]+t[12]*r,n[13]=e[13]+t[13]*r,n[14]=e[14]+t[14]*r,n[15]=e[15]+t[15]*r,n}function Gt(n,e){return n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]&&n[9]===e[9]&&n[10]===e[10]&&n[11]===e[11]&&n[12]===e[12]&&n[13]===e[13]&&n[14]===e[14]&&n[15]===e[15]}function Vt(n,e){var t=n[0],r=n[1],i=n[2],a=n[3],s=n[4],o=n[5],l=n[6],u=n[7],h=n[8],v=n[9],E=n[10],D=n[11],F=n[12],G=n[13],H=n[14],K=n[15],q=e[0],te=e[1],ue=e[2],le=e[3],he=e[4],ve=e[5],ge=e[6],Te=e[7],Oe=e[8],Ne=e[9],ze=e[10],Xe=e[11],Je=e[12],st=e[13],Et=e[14],mt=e[15];return Math.abs(t-q)<=m*Math.max(1,Math.abs(t),Math.abs(q))&&Math.abs(r-te)<=m*Math.max(1,Math.abs(r),Math.abs(te))&&Math.abs(i-ue)<=m*Math.max(1,Math.abs(i),Math.abs(ue))&&Math.abs(a-le)<=m*Math.max(1,Math.abs(a),Math.abs(le))&&Math.abs(s-he)<=m*Math.max(1,Math.abs(s),Math.abs(he))&&Math.abs(o-ve)<=m*Math.max(1,Math.abs(o),Math.abs(ve))&&Math.abs(l-ge)<=m*Math.max(1,Math.abs(l),Math.abs(ge))&&Math.abs(u-Te)<=m*Math.max(1,Math.abs(u),Math.abs(Te))&&Math.abs(h-Oe)<=m*Math.max(1,Math.abs(h),Math.abs(Oe))&&Math.abs(v-Ne)<=m*Math.max(1,Math.abs(v),Math.abs(Ne))&&Math.abs(E-ze)<=m*Math.max(1,Math.abs(E),Math.abs(ze))&&Math.abs(D-Xe)<=m*Math.max(1,Math.abs(D),Math.abs(Xe))&&Math.abs(F-Je)<=m*Math.max(1,Math.abs(F),Math.abs(Je))&&Math.abs(G-st)<=m*Math.max(1,Math.abs(G),Math.abs(st))&&Math.abs(H-Et)<=m*Math.max(1,Math.abs(H),Math.abs(Et))&&Math.abs(K-mt)<=m*Math.max(1,Math.abs(K),Math.abs(mt))}var vn=_t,Dn=_n;function Ln(){var n=new L(9);return L!=Float32Array&&(n[1]=0,n[2]=0,n[3]=0,n[5]=0,n[6]=0,n[7]=0),n[0]=1,n[4]=1,n[8]=1,n}function Yr(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],n}function ii(n){var e=new glMatrix.ARRAY_TYPE(9);return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e}function Ma(n,e){return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[3],n[4]=e[4],n[5]=e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n}function Aa(n,e,t,r,i,a,s,o,l){var u=new L(9);return u[0]=n,u[1]=e,u[2]=t,u[3]=r,u[4]=i,u[5]=a,u[6]=s,u[7]=o,u[8]=l,u}function Hr(n,e,t,r,i,a,s,o,l,u){return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n[4]=a,n[5]=s,n[6]=o,n[7]=l,n[8]=u,n}function rs(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=1,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function lo(n,e){if(n===e){var t=e[1],r=e[2],i=e[5];n[1]=e[3],n[2]=e[6],n[3]=t,n[5]=e[7],n[6]=r,n[7]=i}else n[0]=e[0],n[1]=e[3],n[2]=e[6],n[3]=e[1],n[4]=e[4],n[5]=e[7],n[6]=e[2],n[7]=e[5],n[8]=e[8];return n}function Ga(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],v=h*s-o*u,E=-h*a+o*l,D=u*a-s*l,F=t*v+r*E+i*D;return F?(F=1/F,n[0]=v*F,n[1]=(-h*r+i*u)*F,n[2]=(o*r-i*s)*F,n[3]=E*F,n[4]=(h*t-i*l)*F,n[5]=(-o*t+i*a)*F,n[6]=D*F,n[7]=(-u*t+r*l)*F,n[8]=(s*t-r*a)*F,n):null}function Zi(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8];return n[0]=s*h-o*u,n[1]=i*u-r*h,n[2]=r*o-i*s,n[3]=o*l-a*h,n[4]=t*h-i*l,n[5]=i*a-t*o,n[6]=a*u-s*l,n[7]=r*l-t*u,n[8]=t*s-r*a,n}function da(n){var e=n[0],t=n[1],r=n[2],i=n[3],a=n[4],s=n[5],o=n[6],l=n[7],u=n[8];return e*(u*a-s*l)+t*(-u*i+s*o)+r*(l*i-a*o)}function wi(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],v=e[8],E=t[0],D=t[1],F=t[2],G=t[3],H=t[4],K=t[5],q=t[6],te=t[7],ue=t[8];return n[0]=E*r+D*s+F*u,n[1]=E*i+D*o+F*h,n[2]=E*a+D*l+F*v,n[3]=G*r+H*s+K*u,n[4]=G*i+H*o+K*h,n[5]=G*a+H*l+K*v,n[6]=q*r+te*s+ue*u,n[7]=q*i+te*o+ue*h,n[8]=q*a+te*l+ue*v,n}function ws(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],v=e[8],E=t[0],D=t[1];return n[0]=r,n[1]=i,n[2]=a,n[3]=s,n[4]=o,n[5]=l,n[6]=E*r+D*s+u,n[7]=E*i+D*o+h,n[8]=E*a+D*l+v,n}function uo(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=e[5],u=e[6],h=e[7],v=e[8],E=Math.sin(t),D=Math.cos(t);return n[0]=D*r+E*s,n[1]=D*i+E*o,n[2]=D*a+E*l,n[3]=D*s-E*r,n[4]=D*o-E*i,n[5]=D*l-E*a,n[6]=u,n[7]=h,n[8]=v,n}function Hs(n,e,t){var r=t[0],i=t[1];return n[0]=r*e[0],n[1]=r*e[1],n[2]=r*e[2],n[3]=i*e[3],n[4]=i*e[4],n[5]=i*e[5],n[6]=e[6],n[7]=e[7],n[8]=e[8],n}function Ha(n,e){return n[0]=1,n[1]=0,n[2]=0,n[3]=0,n[4]=1,n[5]=0,n[6]=e[0],n[7]=e[1],n[8]=1,n}function Ta(n,e){var t=Math.sin(e),r=Math.cos(e);return n[0]=r,n[1]=t,n[2]=0,n[3]=-t,n[4]=r,n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function Ll(n,e){return n[0]=e[0],n[1]=0,n[2]=0,n[3]=0,n[4]=e[1],n[5]=0,n[6]=0,n[7]=0,n[8]=1,n}function ja(n,e){return n[0]=e[0],n[1]=e[1],n[2]=0,n[3]=e[2],n[4]=e[3],n[5]=0,n[6]=e[4],n[7]=e[5],n[8]=1,n}function bu(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=t+t,o=r+r,l=i+i,u=t*s,h=r*s,v=r*o,E=i*s,D=i*o,F=i*l,G=a*s,H=a*o,K=a*l;return n[0]=1-v-F,n[3]=h-K,n[6]=E+H,n[1]=h+K,n[4]=1-u-F,n[7]=D-G,n[2]=E-H,n[5]=D+G,n[8]=1-u-v,n}function va(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=e[5],l=e[6],u=e[7],h=e[8],v=e[9],E=e[10],D=e[11],F=e[12],G=e[13],H=e[14],K=e[15],q=t*o-r*s,te=t*l-i*s,ue=t*u-a*s,le=r*l-i*o,he=r*u-a*o,ve=i*u-a*l,ge=h*G-v*F,Te=h*H-E*F,Oe=h*K-D*F,Ne=v*H-E*G,ze=v*K-D*G,Xe=E*K-D*H,Je=q*Xe-te*ze+ue*Ne+le*Oe-he*Te+ve*ge;return Je?(Je=1/Je,n[0]=(o*Xe-l*ze+u*Ne)*Je,n[1]=(l*Oe-s*Xe-u*Te)*Je,n[2]=(s*ze-o*Oe+u*ge)*Je,n[3]=(i*ze-r*Xe-a*Ne)*Je,n[4]=(t*Xe-i*Oe+a*Te)*Je,n[5]=(r*Oe-t*ze-a*ge)*Je,n[6]=(G*ve-H*he+K*le)*Je,n[7]=(H*ue-F*ve-K*te)*Je,n[8]=(F*he-G*ue+K*q)*Je,n):null}function zc(n,e,t){return n[0]=2/e,n[1]=0,n[2]=0,n[3]=0,n[4]=-2/t,n[5]=0,n[6]=-1,n[7]=1,n[8]=1,n}function wu(n){return"mat3("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+", "+n[4]+", "+n[5]+", "+n[6]+", "+n[7]+", "+n[8]+")"}function Mu(n){return Math.hypot(n[0],n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])}function Uc(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n[2]=e[2]+t[2],n[3]=e[3]+t[3],n[4]=e[4]+t[4],n[5]=e[5]+t[5],n[6]=e[6]+t[6],n[7]=e[7]+t[7],n[8]=e[8]+t[8],n}function Au(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n[2]=e[2]-t[2],n[3]=e[3]-t[3],n[4]=e[4]-t[4],n[5]=e[5]-t[5],n[6]=e[6]-t[6],n[7]=e[7]-t[7],n[8]=e[8]-t[8],n}function Tu(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n[2]=e[2]*t,n[3]=e[3]*t,n[4]=e[4]*t,n[5]=e[5]*t,n[6]=e[6]*t,n[7]=e[7]*t,n[8]=e[8]*t,n}function co(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n[2]=e[2]+t[2]*r,n[3]=e[3]+t[3]*r,n[4]=e[4]+t[4]*r,n[5]=e[5]+t[5]*r,n[6]=e[6]+t[6]*r,n[7]=e[7]+t[7]*r,n[8]=e[8]+t[8]*r,n}function Rl(n,e){return n[0]===e[0]&&n[1]===e[1]&&n[2]===e[2]&&n[3]===e[3]&&n[4]===e[4]&&n[5]===e[5]&&n[6]===e[6]&&n[7]===e[7]&&n[8]===e[8]}function Il(n,e){var t=n[0],r=n[1],i=n[2],a=n[3],s=n[4],o=n[5],l=n[6],u=n[7],h=n[8],v=e[0],E=e[1],D=e[2],F=e[3],G=e[4],H=e[5],K=e[6],q=e[7],te=e[8];return Math.abs(t-v)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(v))&&Math.abs(r-E)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(E))&&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-H)<=glMatrix.EPSILON*Math.max(1,Math.abs(o),Math.abs(H))&&Math.abs(l-K)<=glMatrix.EPSILON*Math.max(1,Math.abs(l),Math.abs(K))&&Math.abs(u-q)<=glMatrix.EPSILON*Math.max(1,Math.abs(u),Math.abs(q))&&Math.abs(h-te)<=glMatrix.EPSILON*Math.max(1,Math.abs(h),Math.abs(te))}var vi=null,Su=null;function Fr(){var n=new L(4);return L!=Float32Array&&(n[0]=0,n[1]=0,n[2]=0),n[3]=1,n}function bn(n){return n[0]=0,n[1]=0,n[2]=0,n[3]=1,n}function Mn(n,e,t){t=t*.5;var r=Math.sin(t);return n[0]=r*e[0],n[1]=r*e[1],n[2]=r*e[2],n[3]=Math.cos(t),n}function Sn(n,e){var t=Math.acos(e[3])*2,r=Math.sin(t/2);return r>glMatrix.EPSILON?(n[0]=e[0]/r,n[1]=e[1]/r,n[2]=e[2]/r):(n[0]=1,n[1]=0,n[2]=0),t}function Rn(n,e){var t=hv(n,e);return Math.acos(2*t*t-1)}function Qn(n,e,t){var r=e[0],i=e[1],a=e[2],s=e[3],o=t[0],l=t[1],u=t[2],h=t[3];return n[0]=r*h+s*o+i*u-a*l,n[1]=i*h+s*l+a*o-r*u,n[2]=a*h+s*u+r*l-i*o,n[3]=s*h-r*o-i*l-a*u,n}function zr(n,e,t){t*=.5;var r=e[0],i=e[1],a=e[2],s=e[3],o=Math.sin(t),l=Math.cos(t);return n[0]=r*l+s*o,n[1]=i*l+a*o,n[2]=a*l-i*o,n[3]=s*l-r*o,n}function Ms(n,e,t){t*=.5;var r=e[0],i=e[1],a=e[2],s=e[3],o=Math.sin(t),l=Math.cos(t);return n[0]=r*l-a*o,n[1]=i*l+s*o,n[2]=a*l+r*o,n[3]=s*l-i*o,n}function is(n,e,t){t*=.5;var r=e[0],i=e[1],a=e[2],s=e[3],o=Math.sin(t),l=Math.cos(t);return n[0]=r*l+i*o,n[1]=i*l-r*o,n[2]=a*l+s*o,n[3]=s*l-a*o,n}function js(n,e){var t=e[0],r=e[1],i=e[2];return n[0]=t,n[1]=r,n[2]=i,n[3]=Math.sqrt(Math.abs(1-t*t-r*r-i*i)),n}function Mi(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=Math.sqrt(t*t+r*r+i*i),o=Math.exp(a),l=s>0?o*Math.sin(s)/s:0;return n[0]=t*l,n[1]=r*l,n[2]=i*l,n[3]=o*Math.cos(s),n}function As(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=Math.sqrt(t*t+r*r+i*i),o=s>0?Math.atan2(s,a)/s:0;return n[0]=t*o,n[1]=r*o,n[2]=i*o,n[3]=.5*Math.log(t*t+r*r+i*i+a*a),n}function ho(n,e,t){return As(n,e),Hc(n,n,t),Mi(n,n),n}function Vo(n,e,t,r){var i=e[0],a=e[1],s=e[2],o=e[3],l=t[0],u=t[1],h=t[2],v=t[3],E,D,F,G,H;return D=i*l+a*u+s*h+o*v,D<0&&(D=-D,l=-l,u=-u,h=-h,v=-v),1-D>m?(E=Math.acos(D),F=Math.sin(E),G=Math.sin((1-r)*E)/F,H=Math.sin(r*E)/F):(G=1-r,H=r),n[0]=G*i+H*l,n[1]=G*a+H*u,n[2]=G*s+H*h,n[3]=G*o+H*v,n}function uv(n){var e=glMatrix.RANDOM(),t=glMatrix.RANDOM(),r=glMatrix.RANDOM(),i=Math.sqrt(1-e),a=Math.sqrt(e);return n[0]=i*Math.sin(2*Math.PI*t),n[1]=i*Math.cos(2*Math.PI*t),n[2]=a*Math.sin(2*Math.PI*r),n[3]=a*Math.cos(2*Math.PI*r),n}function Vs(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=t*t+r*r+i*i+a*a,o=s?1/s:0;return n[0]=-t*o,n[1]=-r*o,n[2]=-i*o,n[3]=a*o,n}function Ts(n,e){return n[0]=-e[0],n[1]=-e[1],n[2]=-e[2],n[3]=e[3],n}function Pu(n,e){var t=e[0]+e[4]+e[8],r;if(t>0)r=Math.sqrt(t+1),n[3]=.5*r,r=.5/r,n[0]=(e[5]-e[7])*r,n[1]=(e[6]-e[2])*r,n[2]=(e[1]-e[3])*r;else{var i=0;e[4]>e[0]&&(i=1),e[8]>e[i*3+i]&&(i=2);var a=(i+1)%3,s=(i+2)%3;r=Math.sqrt(e[i*3+i]-e[a*3+a]-e[s*3+s]+1),n[i]=.5*r,r=.5/r,n[3]=(e[a*3+s]-e[s*3+a])*r,n[a]=(e[a*3+i]+e[i*3+a])*r,n[s]=(e[s*3+i]+e[i*3+s])*r}return n}function Nl(n,e,t,r){var i=.5*Math.PI/180;e*=i,t*=i,r*=i;var a=Math.sin(e),s=Math.cos(e),o=Math.sin(t),l=Math.cos(t),u=Math.sin(r),h=Math.cos(r);return n[0]=a*l*h-s*o*u,n[1]=s*o*h+a*l*u,n[2]=s*l*u-a*o*h,n[3]=s*l*h+a*o*u,n}function Up(n){return"quat("+n[0]+", "+n[1]+", "+n[2]+", "+n[3]+")"}var Zo=Lt,cv=Tt,Bl=Nt,Wc=jt,Wp=zt,Gc=Qn,Hc=Vn,hv=Cn,fv=lr,dv=$t,Gp=null,vv=mn,Hp=null,kl=sr,jp=R,Vp=j,gv=function(){var n=S(),e=f(1,0,0),t=f(0,1,0);return function(r,i,a){var s=be(i,a);return s<-.999999?(Ae(n,e,i),qe(n)<1e-6&&Ae(n,t,i),de(n,n),Mn(r,n,Math.PI),r):s>.999999?(r[0]=0,r[1]=0,r[2]=0,r[3]=1,r):(Ae(n,i,a),r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=1+s,kl(r,r))}}(),jc=function(){var n=Fr(),e=Fr();return function(t,r,i,a,s,o){return Vo(n,r,s,o),Vo(e,i,a,o),Vo(t,n,e,2*o*(1-o)),t}}(),cr=function(){var n=Ln();return function(e,t,r,i){return n[0]=r[0],n[3]=r[1],n[6]=r[2],n[1]=i[0],n[4]=i[1],n[7]=i[2],n[2]=-t[0],n[5]=-t[1],n[8]=-t[2],kl(e,Pu(e,n))}}();function jn(){var n=new L(2);return L!=Float32Array&&(n[0]=0,n[1]=0),n}function ea(n){var e=new glMatrix.ARRAY_TYPE(2);return e[0]=n[0],e[1]=n[1],e}function ta(n,e){var t=new glMatrix.ARRAY_TYPE(2);return t[0]=n,t[1]=e,t}function ai(n,e){return n[0]=e[0],n[1]=e[1],n}function Ci(n,e,t){return n[0]=e,n[1]=t,n}function Ss(n,e,t){return n[0]=e[0]+t[0],n[1]=e[1]+t[1],n}function as(n,e,t){return n[0]=e[0]-t[0],n[1]=e[1]-t[1],n}function fo(n,e,t){return n[0]=e[0]*t[0],n[1]=e[1]*t[1],n}function Ko(n,e,t){return n[0]=e[0]/t[0],n[1]=e[1]/t[1],n}function vo(n,e){return n[0]=Math.ceil(e[0]),n[1]=Math.ceil(e[1]),n}function Ou(n,e){return n[0]=Math.floor(e[0]),n[1]=Math.floor(e[1]),n}function Cu(n,e,t){return n[0]=Math.min(e[0],t[0]),n[1]=Math.min(e[1],t[1]),n}function Lz(n,e,t){return n[0]=Math.max(e[0],t[0]),n[1]=Math.max(e[1],t[1]),n}function Rz(n,e){return n[0]=Math.round(e[0]),n[1]=Math.round(e[1]),n}function Iz(n,e,t){return n[0]=e[0]*t,n[1]=e[1]*t,n}function Nz(n,e,t,r){return n[0]=e[0]+t[0]*r,n[1]=e[1]+t[1]*r,n}function Bz(n,e){var t=e[0]-n[0],r=e[1]-n[1];return Math.hypot(t,r)}function kz(n,e){var t=e[0]-n[0],r=e[1]-n[1];return t*t+r*r}function Fz(n){var e=n[0],t=n[1];return Math.hypot(e,t)}function zz(n){var e=n[0],t=n[1];return e*e+t*t}function Uz(n,e){return n[0]=-e[0],n[1]=-e[1],n}function Wz(n,e){return n[0]=1/e[0],n[1]=1/e[1],n}function q2(n,e){var t=e[0],r=e[1],i=t*t+r*r;return i>0&&(i=1/Math.sqrt(i)),n[0]=e[0]*i,n[1]=e[1]*i,n}function $2(n,e){return n[0]*e[0]+n[1]*e[1]}function Gz(n,e,t){var r=e[0]*t[1]-e[1]*t[0];return n[0]=n[1]=0,n[2]=r,n}function Hz(n,e,t,r){var i=e[0],a=e[1];return n[0]=i+r*(t[0]-i),n[1]=a+r*(t[1]-a),n}function jz(n,e){e=e||1;var t=glMatrix.RANDOM()*2*Math.PI;return n[0]=Math.cos(t)*e,n[1]=Math.sin(t)*e,n}function Vz(n,e,t){var r=e[0],i=e[1];return n[0]=t[0]*r+t[2]*i,n[1]=t[1]*r+t[3]*i,n}function Zz(n,e,t){var r=e[0],i=e[1];return n[0]=t[0]*r+t[2]*i+t[4],n[1]=t[1]*r+t[3]*i+t[5],n}function Kz(n,e,t){var r=e[0],i=e[1];return n[0]=t[0]*r+t[3]*i+t[6],n[1]=t[1]*r+t[4]*i+t[7],n}function Xz(n,e,t){var r=e[0],i=e[1];return n[0]=t[0]*r+t[4]*i+t[12],n[1]=t[1]*r+t[5]*i+t[13],n}function Yz(n,e,t,r){var i=e[0]-t[0],a=e[1]-t[1],s=Math.sin(r),o=Math.cos(r);return n[0]=i*o-a*s+t[0],n[1]=i*s+a*o+t[1],n}function Qz(n,e){var t=n[0],r=n[1],i=e[0],a=e[1],s=Math.sqrt(t*t+r*r)*Math.sqrt(i*i+a*a),o=s&&(t*i+r*a)/s;return Math.acos(Math.min(Math.max(o,-1),1))}function Jz(n){return n[0]=0,n[1]=0,n}function qz(n){return"vec2("+n[0]+", "+n[1]+")"}function ew(n,e){return n[0]===e[0]&&n[1]===e[1]}function $z(n,e){var t=n[0],r=n[1],i=e[0],a=e[1];return Math.abs(t-i)<=glMatrix.EPSILON*Math.max(1,Math.abs(t),Math.abs(i))&&Math.abs(r-a)<=glMatrix.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))}var e6=null,t6=null,n6=null,r6=null,i6=null,a6=null,s6=null,o6=function(){var n=jn();return function(e,t,r,i,a,s){var o,l;for(t||(t=2),r||(r=0),i?l=Math.min(i*t+r,e.length):l=e.length,o=r;o<l;o+=t)n[0]=e[o],n[1]=e[o+1],a(n,n,s),e[o]=n[0],e[o+1]=n[1];return e}}();function sn(n){return typeof n=="number"}function ga(n,e){return Math.sqrt((n[0]-e[0])*(n[0]-e[0])+(n[1]-e[1])*(n[1]-e[1]))}function xn(n){return n==null}function fr(n){return typeof n=="string"}var tw=function(n,e,t){return n<e?e:n>t?t:n},Qr=tw,xe=Y(80813),Du={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Zp(n){return Array.isArray(n)&&n.every(function(e){var t=e[0].toLowerCase();return Du[t]===e.length-1&&"achlmqstvz".includes(t)})}function Kp(n){return Zp(n)&&n.every(function(e){var t=e[0];return t===t.toUpperCase()})}function Xp(n){return Kp(n)&&n.every(function(e){var t=e[0];return"ACLMQZ".includes(t)})}var Yp={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function Qp(n){for(var e=n.pathValue[n.segmentStart],t=e.toLowerCase(),r=n.data;r.length>=Du[t]&&(t==="m"&&r.length>2?(n.segments.push([e].concat(r.splice(0,2))),t="l",e=e==="m"?"l":"L"):n.segments.push([e].concat(r.splice(0,Du[t]))),!!Du[t]););}function nw(n){var e=n.index,t=n.pathValue,r=t.charCodeAt(e);if(r===48){n.param=0,n.index+=1;return}if(r===49){n.param=1,n.index+=1;return}n.err='[path-util]: invalid Arc flag "'.concat(t[e],'", expecting 0 or 1 at index ').concat(e)}function rw(n){return n>=48&&n<=57||n===43||n===45||n===46}function Fl(n){return n>=48&&n<=57}function iw(n){var e=n.max,t=n.pathValue,r=n.index,i=r,a=!1,s=!1,o=!1,l=!1,u;if(i>=e){n.err="[path-util]: Invalid path value at index ".concat(i,', "pathValue" is missing param');return}if(u=t.charCodeAt(i),(u===43||u===45)&&(i+=1,u=t.charCodeAt(i)),!Fl(u)&&u!==46){n.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(t[i],'" is not a number');return}if(u!==46){if(a=u===48,i+=1,u=t.charCodeAt(i),a&&i<e&&u&&Fl(u)){n.err="[path-util]: Invalid path value at index ".concat(r,', "').concat(t[r],'" illegal number');return}for(;i<e&&Fl(t.charCodeAt(i));)i+=1,s=!0;u=t.charCodeAt(i)}if(u===46){for(l=!0,i+=1;Fl(t.charCodeAt(i));)i+=1,o=!0;u=t.charCodeAt(i)}if(u===101||u===69){if(l&&!s&&!o){n.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(t[i],'" invalid float exponent');return}if(i+=1,u=t.charCodeAt(i),(u===43||u===45)&&(i+=1),i<e&&Fl(t.charCodeAt(i)))for(;i<e&&Fl(t.charCodeAt(i));)i+=1;else{n.err="[path-util]: Invalid path value at index ".concat(i,', "').concat(t[i],'" invalid integer exponent');return}}n.index=i,n.param=+n.pathValue.slice(r,i)}function aw(n){var e=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return n===10||n===13||n===8232||n===8233||n===32||n===9||n===11||n===12||n===160||n>=5760&&e.includes(n)}function Vc(n){for(var e=n.pathValue,t=n.max;n.index<t&&aw(e.charCodeAt(n.index));)n.index+=1}function sw(n){switch(n|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 ow(n){return(n|32)===97}function lw(n){var e=n.max,t=n.pathValue,r=n.index,i=t.charCodeAt(r),a=Du[t[r].toLowerCase()];if(n.segmentStart=r,!sw(i)){n.err='[path-util]: Invalid path value "'.concat(t[r],'" is not a path command');return}if(n.index+=1,Vc(n),n.data=[],!a){Qp(n);return}for(;;){for(var s=a;s>0;s-=1){if(ow(i)&&(s===3||s===4)?nw(n):iw(n),n.err.length)return;n.data.push(n.param),Vc(n),n.index<e&&t.charCodeAt(n.index)===44&&(n.index+=1,Vc(n))}if(n.index>=n.max||!rw(t.charCodeAt(n.index)))break}Qp(n)}var uw=function(){function n(e){this.pathValue=e,this.segments=[],this.max=e.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return n}();function cw(n){if(Zp(n))return[].concat(n);var e=new uw(n);for(Vc(e);e.index<e.max&&!e.err.length;)lw(e);return e.err?e.err:e.segments}function hw(n){if(Kp(n))return[].concat(n);var e=cw(n),t=0,r=0,i=0,a=0;return e.map(function(s){var o=s.slice(1).map(Number),l=s[0],u=l.toUpperCase();if(l==="M")return t=o[0],r=o[1],i=t,a=r,["M",t,r];var h;if(l!==u)switch(u){case"A":h=[u,o[0],o[1],o[2],o[3],o[4],o[5]+t,o[6]+r];break;case"V":h=[u,o[0]+r];break;case"H":h=[u,o[0]+t];break;default:{var v=o.map(function(D,F){return D+(F%2?r:t)});h=[u].concat(v)}}else h=[u].concat(o);var E=h.length;switch(u){case"Z":t=i,r=a;break;case"H":t=h[1];break;case"V":r=h[1];break;default:t=h[E-2],r=h[E-1],u==="M"&&(i=t,a=r)}return h})}function fw(n,e){var t=n[0],r=e.x1,i=e.y1,a=e.x2,s=e.y2,o=n.slice(1).map(Number),l=n;if("TQ".includes(t)||(e.qx=null,e.qy=null),t==="H")l=["L",n[1],i];else if(t==="V")l=["L",r,n[1]];else if(t==="S"){var u=r*2-a,h=i*2-s;e.x1=u,e.y1=h,l=["C",u,h].concat(o)}else if(t==="T"){var v=r*2-e.qx,E=i*2-e.qy;e.qx=v,e.qy=E,l=["Q",v,E].concat(o)}else if(t==="Q"){var D=o[0],F=o[1];e.qx=D,e.qy=F}return l}function Zc(n){if(Xp(n))return[].concat(n);for(var e=hw(n),t=(0,xe.pi)({},Yp),r=0;r<e.length;r+=1){e[r]=fw(e[r],t);var i=e[r],a=i.length;t.x1=+i[a-2],t.y1=+i[a-1],t.x2=+i[a-4]||t.x1,t.y2=+i[a-3]||t.y1}return e}function go(n,e,t){var r=n[0],i=n[1],a=e[0],s=e[1];return[r+(a-r)*t,i+(s-i)*t]}function pv(n,e,t,r,i){var a=ga([n,e],[t,r]),s={x:0,y:0};if(typeof i=="number")if(i<=0)s={x:n,y:e};else if(i>=a)s={x:t,y:r};else{var o=go([n,e],[t,r],i/a),l=o[0],u=o[1];s={x:l,y:u}}return{length:a,point:s,min:{x:Math.min(n,t),y:Math.min(e,r)},max:{x:Math.max(n,t),y:Math.max(e,r)}}}function Jp(n,e){var t=n.x,r=n.y,i=e.x,a=e.y,s=t*i+r*a,o=Math.sqrt((Math.pow(t,2)+Math.pow(r,2))*(Math.pow(i,2)+Math.pow(a,2))),l=t*a-r*i<0?-1:1,u=l*Math.acos(s/o);return u}function dw(n,e,t,r,i,a,s,o,l,u){var h=Math.abs,v=Math.sin,E=Math.cos,D=Math.sqrt,F=Math.PI,G=h(t),H=h(r),K=(i%360+360)%360,q=K*(F/180);if(n===o&&e===l)return{x:n,y:e};if(G===0||H===0)return pv(n,e,o,l,u).point;var te=(n-o)/2,ue=(e-l)/2,le={x:E(q)*te+v(q)*ue,y:-v(q)*te+E(q)*ue},he=Math.pow(le.x,2)/Math.pow(G,2)+Math.pow(le.y,2)/Math.pow(H,2);he>1&&(G*=D(he),H*=D(he));var ve=Math.pow(G,2)*Math.pow(H,2)-Math.pow(G,2)*Math.pow(le.y,2)-Math.pow(H,2)*Math.pow(le.x,2),ge=Math.pow(G,2)*Math.pow(le.y,2)+Math.pow(H,2)*Math.pow(le.x,2),Te=ve/ge;Te=Te<0?0:Te;var Oe=(a!==s?1:-1)*D(Te),Ne={x:Oe*(G*le.y/H),y:Oe*(-(H*le.x)/G)},ze={x:E(q)*Ne.x-v(q)*Ne.y+(n+o)/2,y:v(q)*Ne.x+E(q)*Ne.y+(e+l)/2},Xe={x:(le.x-Ne.x)/G,y:(le.y-Ne.y)/H},Je=Jp({x:1,y:0},Xe),st={x:(-le.x-Ne.x)/G,y:(-le.y-Ne.y)/H},Et=Jp(Xe,st);!s&&Et>0?Et-=2*F:s&&Et<0&&(Et+=2*F),Et%=2*F;var mt=Je+Et*u,ct=G*E(mt),ht=H*v(mt),At={x:E(q)*ct-v(q)*ht+ze.x,y:v(q)*ct+E(q)*ht+ze.y};return At}function vw(n,e,t,r,i,a,s,o,l,u,h){var v,E=h.bbox,D=E===void 0?!0:E,F=h.length,G=F===void 0?!0:F,H=h.sampleSize,K=H===void 0?30:H,q=typeof u=="number",te=n,ue=e,le=0,he=[te,ue,le],ve=[te,ue],ge=0,Te={x:0,y:0},Oe=[{x:te,y:ue}];q&&u<=0&&(Te={x:te,y:ue});for(var Ne=0;Ne<=K;Ne+=1){if(ge=Ne/K,v=dw(n,e,t,r,i,a,s,o,l,ge),te=v.x,ue=v.y,D&&Oe.push({x:te,y:ue}),G&&(le+=ga(ve,[te,ue])),ve=[te,ue],q&&le>=u&&u>he[2]){var ze=(le-u)/(le-he[2]);Te={x:ve[0]*(1-ze)+he[0]*ze,y:ve[1]*(1-ze)+he[1]*ze}}he=[te,ue,le]}return q&&u>=le&&(Te={x:o,y:l}),{length:le,point:Te,min:{x:Math.min.apply(null,Oe.map(function(Xe){return Xe.x})),y:Math.min.apply(null,Oe.map(function(Xe){return Xe.y}))},max:{x:Math.max.apply(null,Oe.map(function(Xe){return Xe.x})),y:Math.max.apply(null,Oe.map(function(Xe){return Xe.y}))}}}function gw(n,e,t,r,i,a,s,o,l){var u=1-l;return{x:Math.pow(u,3)*n+3*Math.pow(u,2)*l*t+3*u*Math.pow(l,2)*i+Math.pow(l,3)*s,y:Math.pow(u,3)*e+3*Math.pow(u,2)*l*r+3*u*Math.pow(l,2)*a+Math.pow(l,3)*o}}function qp(n,e,t,r,i,a,s,o,l,u){var h,v=u.bbox,E=v===void 0?!0:v,D=u.length,F=D===void 0?!0:D,G=u.sampleSize,H=G===void 0?10:G,K=typeof l=="number",q=n,te=e,ue=0,le=[q,te,ue],he=[q,te],ve=0,ge={x:0,y:0},Te=[{x:q,y:te}];K&&l<=0&&(ge={x:q,y:te});for(var Oe=0;Oe<=H;Oe+=1){if(ve=Oe/H,h=gw(n,e,t,r,i,a,s,o,ve),q=h.x,te=h.y,E&&Te.push({x:q,y:te}),F&&(ue+=ga(he,[q,te])),he=[q,te],K&&ue>=l&&l>le[2]){var Ne=(ue-l)/(ue-le[2]);ge={x:he[0]*(1-Ne)+le[0]*Ne,y:he[1]*(1-Ne)+le[1]*Ne}}le=[q,te,ue]}return K&&l>=ue&&(ge={x:s,y:o}),{length:ue,point:ge,min:{x:Math.min.apply(null,Te.map(function(ze){return ze.x})),y:Math.min.apply(null,Te.map(function(ze){return ze.y}))},max:{x:Math.max.apply(null,Te.map(function(ze){return ze.x})),y:Math.max.apply(null,Te.map(function(ze){return ze.y}))}}}function pw(n,e,t,r,i,a,s){var o=1-s;return{x:Math.pow(o,2)*n+2*o*s*t+Math.pow(s,2)*i,y:Math.pow(o,2)*e+2*o*s*r+Math.pow(s,2)*a}}function mw(n,e,t,r,i,a,s,o){var l,u=o.bbox,h=u===void 0?!0:u,v=o.length,E=v===void 0?!0:v,D=o.sampleSize,F=D===void 0?10:D,G=typeof s=="number",H=n,K=e,q=0,te=[H,K,q],ue=[H,K],le=0,he={x:0,y:0},ve=[{x:H,y:K}];G&&s<=0&&(he={x:H,y:K});for(var ge=0;ge<=F;ge+=1){if(le=ge/F,l=pw(n,e,t,r,i,a,le),H=l.x,K=l.y,h&&ve.push({x:H,y:K}),E&&(q+=ga(ue,[H,K])),ue=[H,K],G&&q>=s&&s>te[2]){var Te=(q-s)/(q-te[2]);he={x:ue[0]*(1-Te)+te[0]*Te,y:ue[1]*(1-Te)+te[1]*Te}}te=[H,K,q]}return G&&s>=q&&(he={x:i,y:a}),{length:q,point:he,min:{x:Math.min.apply(null,ve.map(function(Oe){return Oe.x})),y:Math.min.apply(null,ve.map(function(Oe){return Oe.y}))},max:{x:Math.max.apply(null,ve.map(function(Oe){return Oe.x})),y:Math.max.apply(null,ve.map(function(Oe){return Oe.y}))}}}function $p(n,e,t){for(var r,i,a,s,o,l,u=Zc(n),h=typeof e=="number",v,E=[],D,F=0,G=0,H=0,K=0,q,te=[],ue=[],le=0,he={x:0,y:0},ve=he,ge=he,Te=he,Oe=0,Ne=0,ze=u.length;Ne<ze;Ne+=1)q=u[Ne],D=q[0],v=D==="M",E=v?E:[F,G].concat(q.slice(1)),v?(H=q[1],K=q[2],he={x:H,y:K},ve=he,le=0,h&&e<.001&&(Te=he)):D==="L"?(r=pv(E[0],E[1],E[2],E[3],(e||0)-Oe),le=r.length,he=r.min,ve=r.max,ge=r.point):D==="A"?(i=vw(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],E[8],(e||0)-Oe,t||{}),le=i.length,he=i.min,ve=i.max,ge=i.point):D==="C"?(a=qp(E[0],E[1],E[2],E[3],E[4],E[5],E[6],E[7],(e||0)-Oe,t||{}),le=a.length,he=a.min,ve=a.max,ge=a.point):D==="Q"?(s=mw(E[0],E[1],E[2],E[3],E[4],E[5],(e||0)-Oe,t||{}),le=s.length,he=s.min,ve=s.max,ge=s.point):D==="Z"&&(E=[F,G,H,K],o=pv(E[0],E[1],E[2],E[3],(e||0)-Oe),le=o.length,he=o.min,ve=o.max,ge=o.point),h&&Oe<e&&Oe+le>=e&&(Te=ge),ue.push(ve),te.push(he),Oe+=le,l=D!=="Z"?q.slice(-2):[H,K],F=l[0],G=l[1];return h&&e>=Oe&&(Te={x:F,y:G}),{length:Oe,point:Te,min:{x:Math.min.apply(null,te.map(function(Xe){return Xe.x})),y:Math.min.apply(null,te.map(function(Xe){return Xe.y}))},max:{x:Math.max.apply(null,ue.map(function(Xe){return Xe.x})),y:Math.max.apply(null,ue.map(function(Xe){return Xe.y}))}}}function yw(n,e){return $p(n,void 0,(0,xe.pi)((0,xe.pi)({},e),{bbox:!1,length:!0})).length}function Sa(n){return Array.isArray(n)}var Kc=function(n){if(Sa(n))return n.reduce(function(e,t){return Math.min(e,t)},n[0])};function Xc(n){if(!Array.isArray(n))return-1/0;var e=n.length;if(!e)return-1/0;for(var t=n[0],r=1;r<e;r++)t=Math.max(t,n[r]);return t}var _w=1e-5;function Lu(n,e,t){return t===void 0&&(t=_w),n===e||Math.abs(n-e)<t}var Ew=function(n,e){return(n%e+e)%e},em=Ew;function xw(n,e,t){if(n[t].length>7){n[t].shift();for(var r=n[t],i=t;r.length;)e[t]="A",n.splice(i+=1,0,["C"].concat(r.splice(0,6)));n.splice(t,1)}}function bw(n){return Xp(n)&&n.every(function(e){var t=e[0];return"MC".includes(t)})}function Yc(n,e,t){var r=n*Math.cos(t)-e*Math.sin(t),i=n*Math.sin(t)+e*Math.cos(t);return{x:r,y:i}}function mv(n,e,t,r,i,a,s,o,l,u){var h=n,v=e,E=t,D=r,F=o,G=l,H=Math.PI*120/180,K=Math.PI/180*(+i||0),q=[],te,ue,le,he,ve;if(u)ue=u[0],le=u[1],he=u[2],ve=u[3];else{te=Yc(h,v,-K),h=te.x,v=te.y,te=Yc(F,G,-K),F=te.x,G=te.y;var ge=(h-F)/2,Te=(v-G)/2,Oe=ge*ge/(E*E)+Te*Te/(D*D);Oe>1&&(Oe=Math.sqrt(Oe),E*=Oe,D*=Oe);var Ne=E*E,ze=D*D,Xe=(a===s?-1:1)*Math.sqrt(Math.abs((Ne*ze-Ne*Te*Te-ze*ge*ge)/(Ne*Te*Te+ze*ge*ge)));he=Xe*E*Te/D+(h+F)/2,ve=Xe*-D*ge/E+(v+G)/2,ue=Math.asin(((v-ve)/D*Math.pow(10,9)>>0)/Math.pow(10,9)),le=Math.asin(((G-ve)/D*Math.pow(10,9)>>0)/Math.pow(10,9)),ue=h<he?Math.PI-ue:ue,le=F<he?Math.PI-le:le,ue<0&&(ue=Math.PI*2+ue),le<0&&(le=Math.PI*2+le),s&&ue>le&&(ue-=Math.PI*2),!s&&le>ue&&(le-=Math.PI*2)}var Je=le-ue;if(Math.abs(Je)>H){var st=le,Et=F,mt=G;le=ue+H*(s&&le>ue?1:-1),F=he+E*Math.cos(le),G=ve+D*Math.sin(le),q=mv(F,G,E,D,i,0,s,Et,mt,[le,st,he,ve])}Je=le-ue;var ct=Math.cos(ue),ht=Math.sin(ue),At=Math.cos(le),kt=Math.sin(le),Ht=Math.tan(Je/4),en=4/3*E*Ht,on=4/3*D*Ht,tn=[h,v],yn=[h+en*ht,v-on*ct],An=[F+en*kt,G-on*At],kn=[F,G];if(yn[0]=2*tn[0]-yn[0],yn[1]=2*tn[1]-yn[1],u)return yn.concat(An,kn,q);q=yn.concat(An,kn,q);for(var qn=[],hr=0,qi=q.length;hr<qi;hr+=1)qn[hr]=hr%2?Yc(q[hr-1],q[hr],K).y:Yc(q[hr],q[hr+1],K).x;return qn}function ww(n,e,t,r,i,a){var s=.3333333333333333,o=2/3;return[s*n+o*t,s*e+o*r,s*i+o*t,s*a+o*r,i,a]}var tm=function(n,e,t,r){var i=.5,a=go([n,e],[t,r],i);return(0,xe.ev)((0,xe.ev)([],a,!0),[t,r,t,r],!1)};function Mw(n,e){var t=n[0],r=n.slice(1).map(Number),i=r[0],a=r[1],s,o=e.x1,l=e.y1,u=e.x,h=e.y;switch("TQ".includes(t)||(e.qx=null,e.qy=null),t){case"M":return e.x=i,e.y=a,n;case"A":return s=[o,l].concat(r),["C"].concat(mv(s[0],s[1],s[2],s[3],s[4],s[5],s[6],s[7],s[8],s[9]));case"Q":return e.qx=i,e.qy=a,s=[o,l].concat(r),["C"].concat(ww(s[0],s[1],s[2],s[3],s[4],s[5]));case"L":return["C"].concat(tm(o,l,i,a));case"Z":return o===u&&l===h?["C",o,l,u,h,u,h]:["C"].concat(tm(o,l,u,h));default:}return n}function yv(n,e){if(e===void 0&&(e=!1),bw(n)){var t=[].concat(n);return e?[t,[]]:t}for(var r=Zc(n),i=(0,xe.pi)({},Yp),a=[],s="",o=r.length,l,u,h=[],v=0;v<o;v+=1){r[v]&&(s=r[v][0]),a[v]=s;var E=Mw(r[v],i);r[v]=E,xw(r,a,v),o=r.length,s==="Z"&&h.push(v),l=r[v],u=l.length,i.x1=+l[u-2],i.y1=+l[u-1],i.x2=+l[u-4]||i.x1,i.y2=+l[u-3]||i.y1}return e?[r,h]:r}function Aw(n,e){e===void 0&&(e=.5);var t=n.slice(0,2),r=n.slice(2,4),i=n.slice(4,6),a=n.slice(6,8),s=go(t,r,e),o=go(r,i,e),l=go(i,a,e),u=go(s,o,e),h=go(o,l,e),v=go(u,h,e);return[["C"].concat(s,u,v),["C"].concat(h,l,a)]}function nm(n){return n.map(function(e,t,r){var i=t&&r[t-1].slice(-2).concat(e.slice(1)),a=t?qp(i[0],i[1],i[2],i[3],i[4],i[5],i[6],i[7],i[8],{bbox:!1}).length:0,s;return t?s=a?Aw(i):[e,e]:s=[e],{s:e,ss:s,l:a}})}function rm(n,e,t){var r=nm(n),i=nm(e),a=r.length,s=i.length,o=r.filter(function(H){return H.l}).length,l=i.filter(function(H){return H.l}).length,u=r.filter(function(H){return H.l}).reduce(function(H,K){var q=K.l;return H+q},0)/o||0,h=i.filter(function(H){return H.l}).reduce(function(H,K){var q=K.l;return H+q},0)/l||0,v=t||Math.max(a,s),E=[u,h],D=[v-a,v-s],F=0,G=[r,i].map(function(H,K){return H.l===v?H.map(function(q){return q.s}):H.map(function(q,te){return F=te&&D[K]&&q.l>=E[K],D[K]-=F?1:0,F?q.ss:[q.s]}).flat()});return G[0].length===G[1].length?G:rm(G[0],G[1],v)}function Tw(n,e,t,r,i,a,s,o){return 3*((o-e)*(t+i)-(s-n)*(r+a)+r*(n-i)-t*(e-a)+o*(i+n/3)-s*(a+e/3))/20}function Sw(n){var e=0,t=0,r=0;return yv(n).map(function(i){var a;switch(i[0]){case"M":return e=i[1],t=i[2],0;default:var s=i.slice(1),o=s[0],l=s[1],u=s[2],h=s[3],v=s[4],E=s[5];return r=Tw(e,t,o,l,u,h,v,E),a=i.slice(-2),e=a[0],t=a[1],r}}).reduce(function(i,a){return i+a},0)}function im(n){return Sw(n)>=0}function Pw(n){var e=n.slice(1).map(function(t,r,i){return r?i[r-1].slice(-2).concat(t.slice(1)):n[0].slice(1).concat(t.slice(1))}).map(function(t){return t.map(function(r,i){return t[t.length-i-2*(1-i%2)]})}).reverse();return[["M"].concat(e[0].slice(0,2))].concat(e.map(function(t){return["C"].concat(t.slice(2))}))}function Ow(n){return n.map(function(e){return Array.isArray(e)?[].concat(e):e})}function Cw(n){var e=n.length,t=e-1;return n.map(function(r,i){return n.map(function(a,s){var o=i+s,l;return s===0||n[o]&&n[o][0]==="M"?(l=n[o],["M"].concat(l.slice(-2))):(o>=e&&(o-=t),n[o])})})}function Dw(n,e){var t=n.length-1,r=[],i=0,a=0,s=Cw(n);return s.forEach(function(o,l){n.slice(1).forEach(function(u,h){a+=ga(n[(l+h)%t].slice(-2),e[h%t].slice(-2))}),r[l]=a,a=0}),i=r.indexOf(Math.min.apply(null,r)),s[i]}var Lw=function(n){return n===void 0},Bn=Lw,Rw={}.toString,Iw=function(n,e){return Rw.call(n)==="[object "+e+"]"},am=Iw,Nw=function(n){return am(n,"Boolean")},Ru=Nw;function fn(n){return typeof n=="function"}var si=function(n){var e=typeof n;return n!==null&&e==="object"||e==="function"};function Bw(n,e,t){return $p(n,e,(0,xe.pi)((0,xe.pi)({},t),{bbox:!1,length:!0})).point}var un=Y(49618),sm=Y(75841);function kw(n,e){for(;!{}.hasOwnProperty.call(n,e)&&(n=(0,sm.Z)(n))!==null;);return n}function _v(){return _v=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(n,e,t){var r=kw(n,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?n:t):i.value}},_v.apply(null,arguments)}function om(n,e,t,r){var i=_v((0,sm.Z)(1&r?n.prototype:n),e,t);return 2&r&&typeof i=="function"?function(a){return i.apply(t,a)}:i}function Ki(n,e,t,r){var i=n-t,a=e-r;return Math.sqrt(i*i+a*a)}function Qc(n,e){var t=Math.min.apply(Math,(0,xe.ev)([],(0,xe.CR)(n),!1)),r=Math.min.apply(Math,(0,xe.ev)([],(0,xe.CR)(e),!1)),i=Math.max.apply(Math,(0,xe.ev)([],(0,xe.CR)(n),!1)),a=Math.max.apply(Math,(0,xe.ev)([],(0,xe.CR)(e),!1));return{x:t,y:r,width:i-t,height:a-r}}function lm(n){return(n+Math.PI*2)%(Math.PI*2)}function um(n,e){var t=Math.abs(n);return e>0?t:t*-1}function Fw(n,e,t,r,i,a){var s=t,o=r;if(s===0||o===0)return{x:n,y:e};for(var l=i-n,u=a-e,h=Math.abs(l),v=Math.abs(u),E=s*s,D=o*o,F=Math.PI/4,G=0,H=0,K=0;K<4;K++){G=s*Math.cos(F),H=o*Math.sin(F);var q=(E-D)*Math.pow(Math.cos(F),3)/s,te=(D-E)*Math.pow(Math.sin(F),3)/o,ue=G-q,le=H-te,he=h-q,ve=v-te,ge=Math.hypot(le,ue),Te=Math.hypot(ve,he),Oe=ge*Math.asin((ue*ve-le*he)/(ge*Te)),Ne=Oe/Math.sqrt(E+D-G*G-H*H);F+=Ne,F=Math.min(Math.PI/2,Math.max(0,F))}return{x:n+um(G,l),y:e+um(H,u)}}function zw(n,e,t,r,i,a,s,o){return-1*t*Math.cos(i)*Math.sin(o)-r*Math.sin(i)*Math.cos(o)}function Uw(n,e,t,r,i,a,s,o){return-1*t*Math.sin(i)*Math.sin(o)+r*Math.cos(i)*Math.cos(o)}function Ww(n,e,t){return Math.atan(-e/n*Math.tan(t))}function Gw(n,e,t){return Math.atan(e/(n*Math.tan(t)))}function Hw(n,e,t,r,i,a){return t*Math.cos(i)*Math.cos(a)-r*Math.sin(i)*Math.sin(a)+n}function jw(n,e,t,r,i,a){return t*Math.sin(i)*Math.cos(a)+r*Math.cos(i)*Math.sin(a)+e}function Vw(n,e,t,r){var i=Math.atan2(r*n,t*e);return(i+Math.PI*2)%(Math.PI*2)}function cm(n,e,t){return{x:n*Math.cos(t),y:e*Math.sin(t)}}function hm(n,e,t){var r=Math.cos(t),i=Math.sin(t);return[n*r-e*i,n*i+e*r]}function Zw(n,e,t,r,i,a,s){for(var o=Ww(t,r,i),l=1/0,u=-1/0,h=[a,s],v=-Math.PI*2;v<=Math.PI*2;v+=Math.PI){var E=o+v;a<s?a<E&&E<s&&h.push(E):s<E&&E<a&&h.push(E)}for(var v=0;v<h.length;v++){var D=Hw(n,e,t,r,i,h[v]);D<l&&(l=D),D>u&&(u=D)}for(var F=Gw(t,r,i),G=1/0,H=-1/0,K=[a,s],v=-Math.PI*2;v<=Math.PI*2;v+=Math.PI){var q=F+v;a<s?a<q&&q<s&&K.push(q):s<q&&q<a&&K.push(q)}for(var v=0;v<K.length;v++){var te=jw(n,e,t,r,i,K[v]);te<G&&(G=te),te>H&&(H=te)}return{x:l,y:G,width:u-l,height:H-G}}function l6(n,e,t,r,i,a,s,o,l){var u=hm(o-n,l-e,-i),h=__read(u,2),v=h[0],E=h[1],D=Fw(0,0,t,r,v,E),F=Vw(t,r,D.x,D.y);F<a?D=cm(t,r,a):F>s&&(D=cm(t,r,s));var G=hm(D.x,D.y,i);return{x:G[0]+n,y:G[1]+e}}function u6(n,e,t,r,i,a,s,o){var l=(s-a)*o+a,u=zw(n,e,t,r,i,a,s,l),h=Uw(n,e,t,r,i,a,s,l);return lm(Math.atan2(h,u))}var Kw=1e-4;function fm(n,e,t,r,i,a){var s=-1,o=1/0,l=[t,r],u=20;a&&a>200&&(u=a/10);for(var h=1/u,v=h/10,E=0;E<=u;E++){var D=E*h,F=[i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(n.concat([D])),!1)),i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(e.concat([D])),!1))],G=Ki(l[0],l[1],F[0],F[1]);G<o&&(s=D,o=G)}if(s===0)return{x:n[0],y:e[0]};if(s===1){var H=n.length;return{x:n[H-1],y:e[H-1]}}o=1/0;for(var E=0;E<32&&!(v<Kw);E++){var K=s-v,q=s+v,F=[i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(n.concat([K])),!1)),i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(e.concat([K])),!1))],G=Ki(l[0],l[1],F[0],F[1]);if(K>=0&&G<o)s=K,o=G;else{var te=[i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(n.concat([q])),!1)),i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(e.concat([q])),!1))],ue=Ki(l[0],l[1],te[0],te[1]);q<=1&&ue<o?(s=q,o=ue):v*=.5}}return{x:i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(n.concat([s])),!1)),y:i.apply(void 0,(0,xe.ev)([],(0,xe.CR)(e.concat([s])),!1))}}function Xw(n,e){for(var t=0,r=n.length,i=0;i<r;i++){var a=n[i],s=e[i],o=n[(i+1)%r],l=e[(i+1)%r];t+=Ki(a,s,o,l)}return t/2}function c6(n,e,t,r){return Qc([n,t],[e,r])}function dm(n,e,t,r){return Ki(n,e,t,r)}function Ps(n,e,t,r,i){return{x:(1-i)*n+i*t,y:(1-i)*e+i*r}}function Yw(n,e,t,r,i,a){var s=(t-n)*(i-n)+(r-e)*(a-e);if(s<0)return Ki(n,e,i,a);var o=(t-n)*(t-n)+(r-e)*(r-e);return s>o?Ki(t,r,i,a):vm(n,e,t,r,i,a)}function vm(n,e,t,r,i,a){var s=[t-n,r-e];if(ew(s,[0,0]))return Math.sqrt((i-n)*(i-n)+(a-e)*(a-e));var o=[-s[1],s[0]];q2(o,o);var l=[i-n,a-e];return Math.abs($2(l,o))}function h6(n,e,t,r){return Math.atan2(r-e,t-n)}function Xo(n,e,t,r,i){var a=1-i;return a*a*a*n+3*e*i*a*a+3*t*i*i*a+r*i*i*i}function gm(n,e,t,r,i){var a=1-i;return 3*(a*a*(e-n)+2*a*i*(t-e)+i*i*(r-t))}function pm(n,e,t,r){var i=-3*n+9*e-9*t+3*r,a=6*n-12*e+6*t,s=3*e-3*n,o=[],l,u,h;if(Lu(i,0))Lu(a,0)||(l=-s/a,l>=0&&l<=1&&o.push(l));else{var v=a*a-4*i*s;Lu(v,0)?o.push(-a/(2*i)):v>0&&(h=Math.sqrt(v),l=(-a+h)/(2*i),u=(-a-h)/(2*i),l>=0&&l<=1&&o.push(l),u>=0&&u<=1&&o.push(u))}return o}function Qw(n,e,t,r,i,a,s,o,l){var u=Xo(n,t,i,s,l),h=Xo(e,r,a,o,l),v=Ps(n,e,t,r,l),E=Ps(t,r,i,a,l),D=Ps(i,a,s,o,l),F=Ps(v.x,v.y,E.x,E.y,l),G=Ps(E.x,E.y,D.x,D.y,l);return[[n,e,v.x,v.y,F.x,F.y,u,h],[u,h,G.x,G.y,D.x,D.y,s,o]]}function Ev(n,e,t,r,i,a,s,o,l){if(l===0)return Xw([n,t,i,s],[e,r,a,o]);var u=Qw(n,e,t,r,i,a,s,o,.5),h=__spreadArray(__spreadArray([],__read(u[0]),!1),[l-1],!1),v=__spreadArray(__spreadArray([],__read(u[1]),!1),[l-1],!1);return Ev.apply(void 0,__spreadArray([],__read(h),!1))+Ev.apply(void 0,__spreadArray([],__read(v),!1))}function Jw(n,e,t,r,i,a,s,o){for(var l=[n,s],u=[e,o],h=pm(n,t,i,s),v=pm(e,r,a,o),E=0;E<h.length;E++)l.push(Xo(n,t,i,s,h[E]));for(var E=0;E<v.length;E++)u.push(Xo(e,r,a,o,v[E]));return Qc(l,u)}function f6(n,e,t,r,i,a,s,o){return Ev(n,e,t,r,i,a,s,o,3)}function qw(n,e,t,r,i,a,s,o,l,u,h){return fm([n,t,i,s],[e,r,a,o],l,u,Xo,h)}function mm(n,e,t,r,i,a,s,o,l,u,h){var v=qw(n,e,t,r,i,a,s,o,l,u,h);return Ki(v.x,v.y,l,u)}function d6(n,e,t,r,i,a,s,o,l){return{x:Xo(n,t,i,s,l),y:Xo(e,r,a,o,l)}}function v6(n,e,t,r,i,a,s,o,l){var u=gm(n,t,i,s,l),h=gm(e,r,a,o,l);return lm(Math.atan2(h,u))}function ym(n){for(var e=0,t=[],r=0;r<n.length-1;r++){var i=n[r],a=n[r+1],s=Ki(i[0],i[1],a[0],a[1]),o={from:i,to:a,length:s};t.push(o),e+=s}return{segments:t,totalLength:e}}function _m(n){if(n.length<2)return 0;for(var e=0,t=0;t<n.length-1;t++){var r=n[t],i=n[t+1];e+=Ki(r[0],r[1],i[0],i[1])}return e}function Em(n,e){if(e>1||e<0||n.length<2)return null;var t=ym(n),r=t.segments,i=t.totalLength;if(i===0)return{x:n[0][0],y:n[0][1]};for(var a=0,s=null,o=0;o<r.length;o++){var l=r[o],u=l.from,h=l.to,v=l.length/i;if(e>=a&&e<=a+v){var E=(e-a)/v;s=Ps(u[0],u[1],h[0],h[1],E);break}a+=v}return s}function xm(n,e){if(e>1||e<0||n.length<2)return 0;for(var t=ym(n),r=t.segments,i=t.totalLength,a=0,s=0,o=0;o<r.length;o++){var l=r[o],u=l.from,h=l.to,v=l.length/i;if(e>=a&&e<=a+v){s=Math.atan2(h[1]-u[1],h[0]-u[0]);break}a+=v}return s}function bm(n,e,t){for(var r=1/0,i=0;i<n.length-1;i++){var a=n[i],s=n[i+1],o=Yw(a[0],a[1],s[0],s[1],e,t);o<r&&(r=o)}return r}function $w(n){for(var e=[],t=[],r=0;r<n.length;r++){var i=n[r];e.push(i[0]),t.push(i[1])}return Qc(e,t)}function eM(n){return _m(n)}function g6(n,e){return Em(n,e)}function p6(n,e,t){return bm(n,e,t)}function m6(n,e){return xm(n,e)}function Jc(n){var e=n.slice(0);return n.length&&e.push(n[0]),e}function y6(n){return $w(n)}function _6(n){return _m(Jc(n))}function E6(n,e){return Em(Jc(n),e)}function x6(n,e,t){return bm(Jc(n),e,t)}function b6(n,e){return xm(Jc(n),e)}function Iu(n,e,t,r){var i=1-r;return i*i*n+2*r*i*e+r*r*t}function wm(n,e,t){var r=n+t-2*e;if(Lu(r,0))return[.5];var i=(n-e)/r;return i<=1&&i>=0?[i]:[]}function tM(n,e,t,r,i,a,s){var o=Iu(n,t,i,s),l=Iu(e,r,a,s),u=Ps(n,e,t,r,s),h=Ps(t,r,i,a,s);return[[n,e,u.x,u.y,o,l],[o,l,h.x,h.y,i,a]]}function xv(n,e,t,r,i,a,s){if(s===0)return(Ki(n,e,t,r)+Ki(t,r,i,a)+Ki(n,e,i,a))/2;var o=tM(n,e,t,r,i,a,.5),l=o[0],u=o[1];return l.push(s-1),u.push(s-1),xv.apply(void 0,__spreadArray([],__read(l),!1))+xv.apply(void 0,__spreadArray([],__read(u),!1))}function nM(n,e,t,r,i,a){var s=wm(n,t,i)[0],o=wm(e,r,a)[0],l=[n,i],u=[e,a];return s!==void 0&&l.push(Iu(n,t,i,s)),o!==void 0&&u.push(Iu(e,r,a,o)),Qc(l,u)}function w6(n,e,t,r,i,a){return xv(n,e,t,r,i,a,3)}function rM(n,e,t,r,i,a,s,o){return fm([n,t,i],[e,r,a],s,o,Iu)}function iM(n,e,t,r,i,a,s,o){var l=rM(n,e,t,r,i,a,s,o);return Ki(l.x,l.y,s,o)}var Xi=Y(65736),po=Y(72633),Yo=Y(2826),Qo=Y(74416);var aM=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:typeof self!="undefined"?self:{},Mm={exports:{}};(function(n,e){(function(t,r){n.exports=r()})(aM,function(){function t(le,he,ve,ge,Te){r(le,he,ve||0,ge||le.length-1,Te||a)}function r(le,he,ve,ge,Te){for(;ge>ve;){if(ge-ve>600){var Oe=ge-ve+1,Ne=he-ve+1,ze=Math.log(Oe),Xe=.5*Math.exp(2*ze/3),Je=.5*Math.sqrt(ze*Xe*(Oe-Xe)/Oe)*(Ne-Oe/2<0?-1:1),st=Math.max(ve,Math.floor(he-Ne*Xe/Oe+Je)),Et=Math.min(ge,Math.floor(he+(Oe-Ne)*Xe/Oe+Je));r(le,he,st,Et,Te)}var mt=le[he],ct=ve,ht=ge;for(i(le,ve,he),Te(le[ge],mt)>0&&i(le,ve,ge);ct<ht;){for(i(le,ct,ht),ct++,ht--;Te(le[ct],mt)<0;)ct++;for(;Te(le[ht],mt)>0;)ht--}Te(le[ve],mt)===0?i(le,ve,ht):(ht++,i(le,ht,ge)),ht<=he&&(ve=ht+1),he<=ht&&(ge=ht-1)}}function i(le,he,ve){var ge=le[he];le[he]=le[ve],le[ve]=ge}function a(le,he){return le<he?-1:le>he?1:0}var s=function(he){he===void 0&&(he=9),this._maxEntries=Math.max(4,he),this._minEntries=Math.max(2,Math.ceil(this._maxEntries*.4)),this.clear()};s.prototype.all=function(){return this._all(this.data,[])},s.prototype.search=function(he){var ve=this.data,ge=[];if(!q(he,ve))return ge;for(var Te=this.toBBox,Oe=[];ve;){for(var Ne=0;Ne<ve.children.length;Ne++){var ze=ve.children[Ne],Xe=ve.leaf?Te(ze):ze;q(he,Xe)&&(ve.leaf?ge.push(ze):K(he,Xe)?this._all(ze,ge):Oe.push(ze))}ve=Oe.pop()}return ge},s.prototype.collides=function(he){var ve=this.data;if(!q(he,ve))return!1;for(var ge=[];ve;){for(var Te=0;Te<ve.children.length;Te++){var Oe=ve.children[Te],Ne=ve.leaf?this.toBBox(Oe):Oe;if(q(he,Ne)){if(ve.leaf||K(he,Ne))return!0;ge.push(Oe)}}ve=ge.pop()}return!1},s.prototype.load=function(he){if(!(he&&he.length))return this;if(he.length<this._minEntries){for(var ve=0;ve<he.length;ve++)this.insert(he[ve]);return this}var ge=this._build(he.slice(),0,he.length-1,0);if(!this.data.children.length)this.data=ge;else if(this.data.height===ge.height)this._splitRoot(this.data,ge);else{if(this.data.height<ge.height){var Te=this.data;this.data=ge,ge=Te}this._insert(ge,this.data.height-ge.height-1,!0)}return this},s.prototype.insert=function(he){return he&&this._insert(he,this.data.height-1),this},s.prototype.clear=function(){return this.data=te([]),this},s.prototype.remove=function(he,ve){if(!he)return this;for(var ge=this.data,Te=this.toBBox(he),Oe=[],Ne=[],ze,Xe,Je;ge||Oe.length;){if(ge||(ge=Oe.pop(),Xe=Oe[Oe.length-1],ze=Ne.pop(),Je=!0),ge.leaf){var st=o(he,ge.children,ve);if(st!==-1)return ge.children.splice(st,1),Oe.push(ge),this._condense(Oe),this}!Je&&!ge.leaf&&K(ge,Te)?(Oe.push(ge),Ne.push(ze),ze=0,Xe=ge,ge=ge.children[0]):Xe?(ze++,ge=Xe.children[ze],Je=!1):ge=null}return this},s.prototype.toBBox=function(he){return he},s.prototype.compareMinX=function(he,ve){return he.minX-ve.minX},s.prototype.compareMinY=function(he,ve){return he.minY-ve.minY},s.prototype.toJSON=function(){return this.data},s.prototype.fromJSON=function(he){return this.data=he,this},s.prototype._all=function(he,ve){for(var ge=[];he;)he.leaf?ve.push.apply(ve,he.children):ge.push.apply(ge,he.children),he=ge.pop();return ve},s.prototype._build=function(he,ve,ge,Te){var Oe=ge-ve+1,Ne=this._maxEntries,ze;if(Oe<=Ne)return ze=te(he.slice(ve,ge+1)),l(ze,this.toBBox),ze;Te||(Te=Math.ceil(Math.log(Oe)/Math.log(Ne)),Ne=Math.ceil(Oe/Math.pow(Ne,Te-1))),ze=te([]),ze.leaf=!1,ze.height=Te;var Xe=Math.ceil(Oe/Ne),Je=Xe*Math.ceil(Math.sqrt(Ne));ue(he,ve,ge,Je,this.compareMinX);for(var st=ve;st<=ge;st+=Je){var Et=Math.min(st+Je-1,ge);ue(he,st,Et,Xe,this.compareMinY);for(var mt=st;mt<=Et;mt+=Xe){var ct=Math.min(mt+Xe-1,Et);ze.children.push(this._build(he,mt,ct,Te-1))}}return l(ze,this.toBBox),ze},s.prototype._chooseSubtree=function(he,ve,ge,Te){for(;Te.push(ve),!(ve.leaf||Te.length-1===ge);){for(var Oe=1/0,Ne=1/0,ze=void 0,Xe=0;Xe<ve.children.length;Xe++){var Je=ve.children[Xe],st=D(Je),Et=G(he,Je)-st;Et<Ne?(Ne=Et,Oe=st<Oe?st:Oe,ze=Je):Et===Ne&&st<Oe&&(Oe=st,ze=Je)}ve=ze||ve.children[0]}return ve},s.prototype._insert=function(he,ve,ge){var Te=ge?he:this.toBBox(he),Oe=[],Ne=this._chooseSubtree(Te,this.data,ve,Oe);for(Ne.children.push(he),h(Ne,Te);ve>=0&&Oe[ve].children.length>this._maxEntries;)this._split(Oe,ve),ve--;this._adjustParentBBoxes(Te,Oe,ve)},s.prototype._split=function(he,ve){var ge=he[ve],Te=ge.children.length,Oe=this._minEntries;this._chooseSplitAxis(ge,Oe,Te);var Ne=this._chooseSplitIndex(ge,Oe,Te),ze=te(ge.children.splice(Ne,ge.children.length-Ne));ze.height=ge.height,ze.leaf=ge.leaf,l(ge,this.toBBox),l(ze,this.toBBox),ve?he[ve-1].children.push(ze):this._splitRoot(ge,ze)},s.prototype._splitRoot=function(he,ve){this.data=te([he,ve]),this.data.height=he.height+1,this.data.leaf=!1,l(this.data,this.toBBox)},s.prototype._chooseSplitIndex=function(he,ve,ge){for(var Te,Oe=1/0,Ne=1/0,ze=ve;ze<=ge-ve;ze++){var Xe=u(he,0,ze,this.toBBox),Je=u(he,ze,ge,this.toBBox),st=H(Xe,Je),Et=D(Xe)+D(Je);st<Oe?(Oe=st,Te=ze,Ne=Et<Ne?Et:Ne):st===Oe&&Et<Ne&&(Ne=Et,Te=ze)}return Te||ge-ve},s.prototype._chooseSplitAxis=function(he,ve,ge){var Te=he.leaf?this.compareMinX:v,Oe=he.leaf?this.compareMinY:E,Ne=this._allDistMargin(he,ve,ge,Te),ze=this._allDistMargin(he,ve,ge,Oe);Ne<ze&&he.children.sort(Te)},s.prototype._allDistMargin=function(he,ve,ge,Te){he.children.sort(Te);for(var Oe=this.toBBox,Ne=u(he,0,ve,Oe),ze=u(he,ge-ve,ge,Oe),Xe=F(Ne)+F(ze),Je=ve;Je<ge-ve;Je++){var st=he.children[Je];h(Ne,he.leaf?Oe(st):st),Xe+=F(Ne)}for(var Et=ge-ve-1;Et>=ve;Et--){var mt=he.children[Et];h(ze,he.leaf?Oe(mt):mt),Xe+=F(ze)}return Xe},s.prototype._adjustParentBBoxes=function(he,ve,ge){for(var Te=ge;Te>=0;Te--)h(ve[Te],he)},s.prototype._condense=function(he){for(var ve=he.length-1,ge=void 0;ve>=0;ve--)he[ve].children.length===0?ve>0?(ge=he[ve-1].children,ge.splice(ge.indexOf(he[ve]),1)):this.clear():l(he[ve],this.toBBox)};function o(le,he,ve){if(!ve)return he.indexOf(le);for(var ge=0;ge<he.length;ge++)if(ve(le,he[ge]))return ge;return-1}function l(le,he){u(le,0,le.children.length,he,le)}function u(le,he,ve,ge,Te){Te||(Te=te(null)),Te.minX=1/0,Te.minY=1/0,Te.maxX=-1/0,Te.maxY=-1/0;for(var Oe=he;Oe<ve;Oe++){var Ne=le.children[Oe];h(Te,le.leaf?ge(Ne):Ne)}return Te}function h(le,he){return le.minX=Math.min(le.minX,he.minX),le.minY=Math.min(le.minY,he.minY),le.maxX=Math.max(le.maxX,he.maxX),le.maxY=Math.max(le.maxY,he.maxY),le}function v(le,he){return le.minX-he.minX}function E(le,he){return le.minY-he.minY}function D(le){return(le.maxX-le.minX)*(le.maxY-le.minY)}function F(le){return le.maxX-le.minX+(le.maxY-le.minY)}function G(le,he){return(Math.max(he.maxX,le.maxX)-Math.min(he.minX,le.minX))*(Math.max(he.maxY,le.maxY)-Math.min(he.minY,le.minY))}function H(le,he){var ve=Math.max(le.minX,he.minX),ge=Math.max(le.minY,he.minY),Te=Math.min(le.maxX,he.maxX),Oe=Math.min(le.maxY,he.maxY);return Math.max(0,Te-ve)*Math.max(0,Oe-ge)}function K(le,he){return le.minX<=he.minX&&le.minY<=he.minY&&he.maxX<=le.maxX&&he.maxY<=le.maxY}function q(le,he){return he.minX<=le.maxX&&he.minY<=le.maxY&&he.maxX>=le.minX&&he.maxY>=le.minY}function te(le){return{children:le,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function ue(le,he,ve,ge,Te){for(var Oe=[he,ve];Oe.length;)if(ve=Oe.pop(),he=Oe.pop(),!(ve-he<=ge)){var Ne=he+Math.ceil((ve-he)/ge/2)*ge;t(le,Ne,he,ve,Te),Oe.push(he,Ne,Ne,ve)}}return s})})(Mm);var sM=Mm.exports,Pt=function(n){return n.GROUP="g",n.FRAGMENT="fragment",n.CIRCLE="circle",n.ELLIPSE="ellipse",n.IMAGE="image",n.RECT="rect",n.LINE="line",n.POLYLINE="polyline",n.POLYGON="polygon",n.TEXT="text",n.PATH="path",n.HTML="html",n.MESH="mesh",n}({}),qc=function(n){return n[n.ZERO=0]="ZERO",n[n.NEGATIVE_ONE=1]="NEGATIVE_ONE",n}({}),mo=function(){function n(){(0,b.Z)(this,n),this.plugins=[]}return(0,U.Z)(n,[{key:"addRenderingPlugin",value:function(t){this.plugins.push(t),this.context.renderingPlugins.push(t)}},{key:"removeAllRenderingPlugins",value:function(){var t=this;this.plugins.forEach(function(r){var i=t.context.renderingPlugins.indexOf(r);i>=0&&t.context.renderingPlugins.splice(i,1)})}}])}(),oM=function(){function n(e){(0,b.Z)(this,n),this.clipSpaceNearZ=qc.NEGATIVE_ONE,this.plugins=[],this.config=(0,V.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},e)}return(0,U.Z)(n,[{key:"registerPlugin",value:function(t){var r=this.plugins.findIndex(function(i){return i===t});r===-1&&this.plugins.push(t)}},{key:"unregisterPlugin",value:function(t){var r=this.plugins.findIndex(function(i){return i===t});r>-1&&this.plugins.splice(r,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(t){return this.plugins.find(function(r){return r.name===t})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(t){Object.assign(this.config,t)}}])}(),bv=k,zl=P,lM=ie,uM=$,Am=ne,wv=Pe,Ir=function(){function n(){(0,b.Z)(this,n),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,U.Z)(n,[{key:"update",value:function(t,r){zl(this.center,t),zl(this.halfExtents,r),wv(this.min,this.center,this.halfExtents),bv(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(t,r){bv(this.center,r,t),Am(this.center,this.center,.5),wv(this.halfExtents,r,t),Am(this.halfExtents,this.halfExtents,.5),zl(this.min,t),zl(this.max,r)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(t){if(!n.isEmpty(t)){if(n.isEmpty(this)){this.setMinMax(t.getMin(),t.getMax());return}var r=this.center,i=r[0],a=r[1],s=r[2],o=this.halfExtents,l=o[0],u=o[1],h=o[2],v=i-l,E=i+l,D=a-u,F=a+u,G=s-h,H=s+h,K=t.center,q=K[0],te=K[1],ue=K[2],le=t.halfExtents,he=le[0],ve=le[1],ge=le[2],Te=q-he,Oe=q+he,Ne=te-ve,ze=te+ve,Xe=ue-ge,Je=ue+ge;Te<v&&(v=Te),Oe>E&&(E=Oe),Ne<D&&(D=Ne),ze>F&&(F=ze),Xe<G&&(G=Xe),Je>H&&(H=Je),r[0]=(v+E)*.5,r[1]=(D+F)*.5,r[2]=(G+H)*.5,o[0]=(E-v)*.5,o[1]=(F-D)*.5,o[2]=(H-G)*.5,this.min[0]=v,this.min[1]=D,this.min[2]=G,this.max[0]=E,this.max[1]=F,this.max[2]=H}}},{key:"setFromTransformedAABB",value:function(t,r){var i=this.center,a=this.halfExtents,s=t.center,o=t.halfExtents,l=r[0],u=r[4],h=r[8],v=r[1],E=r[5],D=r[9],F=r[2],G=r[6],H=r[10],K=Math.abs(l),q=Math.abs(u),te=Math.abs(h),ue=Math.abs(v),le=Math.abs(E),he=Math.abs(D),ve=Math.abs(F),ge=Math.abs(G),Te=Math.abs(H);i[0]=r[12]+l*s[0]+u*s[1]+h*s[2],i[1]=r[13]+v*s[0]+E*s[1]+D*s[2],i[2]=r[14]+F*s[0]+G*s[1]+H*s[2],a[0]=K*o[0]+q*o[1]+te*o[2],a[1]=ue*o[0]+le*o[1]+he*o[2],a[2]=ve*o[0]+ge*o[1]+Te*o[2],wv(this.min,i,a),bv(this.max,i,a)}},{key:"intersects",value:function(t){var r=this.getMax(),i=this.getMin(),a=t.getMax(),s=t.getMin();return i[0]<=a[0]&&r[0]>=s[0]&&i[1]<=a[1]&&r[1]>=s[1]&&i[2]<=a[2]&&r[2]>=s[2]}},{key:"intersection",value:function(t){if(!this.intersects(t))return null;var r=new n,i=lM([0,0,0],this.getMin(),t.getMin()),a=uM([0,0,0],this.getMax(),t.getMax());return r.setMinMax(i,a),r}},{key:"getNegativeFarPoint",value:function(t){return t.pnVertexFlag===273?zl([0,0,0],this.min):t.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:t.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:t.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:t.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:t.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:t.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(t){return t.pnVertexFlag===273?zl([0,0,0],this.max):t.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:t.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:t.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:t.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:t.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:t.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(t){return!t||t.halfExtents[0]===0&&t.halfExtents[1]===0&&t.halfExtents[2]===0}}])}(),cM=function(){function n(e,t){(0,b.Z)(this,n),this.distance=e||0,this.normal=t||f(0,1,0),this.updatePNVertexFlag()}return(0,U.Z)(n,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(t){return be(t,this.normal)-this.distance}},{key:"normalize",value:function(){var t=1/qe(this.normal);ne(this.normal,this.normal,t),this.distance*=t}},{key:"intersectsLine",value:function(t,r,i){var a=this.distanceToPoint(t),s=this.distanceToPoint(r),o=a/(a-s),l=o>=0&&o<=1;return l&&i&&Fe(i,t,r,o),l}}])}(),Ul=function(n){return n[n.OUTSIDE=4294967295]="OUTSIDE",n[n.INSIDE=0]="INSIDE",n[n.INDETERMINATE=2147483647]="INDETERMINATE",n}({}),hM=function(){function n(e){if((0,b.Z)(this,n),this.planes=[],e)this.planes=e;else for(var t=0;t<6;t++)this.planes.push(new cM)}return(0,U.Z)(n,[{key:"extractFromVPMatrix",value:function(t){var r=(0,T.Z)(t,16),i=r[0],a=r[1],s=r[2],o=r[3],l=r[4],u=r[5],h=r[6],v=r[7],E=r[8],D=r[9],F=r[10],G=r[11],H=r[12],K=r[13],q=r[14],te=r[15];N(this.planes[0].normal,o-i,v-l,G-E),this.planes[0].distance=te-H,N(this.planes[1].normal,o+i,v+l,G+E),this.planes[1].distance=te+H,N(this.planes[2].normal,o+a,v+u,G+D),this.planes[2].distance=te+K,N(this.planes[3].normal,o-a,v-u,G-D),this.planes[3].distance=te-K,N(this.planes[4].normal,o-s,v-h,G-F),this.planes[4].distance=te-q,N(this.planes[5].normal,o+s,v+h,G+F),this.planes[5].distance=te+q,this.planes.forEach(function(ue){ue.normalize(),ue.updatePNVertexFlag()})}}])}(),Bi=function(){function n(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(0,b.Z)(this,n),this.x=0,this.y=0,this.x=e,this.y=t}return(0,U.Z)(n,[{key:"clone",value:function(){return new n(this.x,this.y)}},{key:"copyFrom",value:function(t){this.x=t.x,this.y=t.y}}])}(),Wl=function(){function n(e,t,r,i){(0,b.Z)(this,n),this.x=e,this.y=t,this.width=r,this.height=i,this.left=e,this.right=e+r,this.top=t,this.bottom=t+i}return(0,U.Z)(n,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(t){return new n(t.x,t.y,t.width,t.height)}},{key:"applyTransform",value:function(t,r){var i=Tt(t.x,t.y,0,1),a=Tt(t.x+t.width,t.y,0,1),s=Tt(t.x,t.y+t.height,0,1),o=Tt(t.x+t.width,t.y+t.height,0,1),l=pt(),u=pt(),h=pt(),v=pt();Ut(l,i,r),Ut(u,a,r),Ut(h,s,r),Ut(v,o,r);var E=Math.min(l[0],u[0],h[0],v[0]),D=Math.min(l[1],u[1],h[1],v[1]),F=Math.max(l[0],u[0],h[0],v[0]),G=Math.max(l[1],u[1],h[1],v[1]);return n.fromRect({x:E,y:D,width:F-E,height:G-D})}}])}(),Mr="Method not implemented.",Gl="Use document.documentElement instead.",fM="Cannot append a destroyed element.";function Hl(n){return n===void 0?0:n>360||n<-360?n%360:n}var Mv=S();function na(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(n)&&n.length===3?r?I(n):P(Mv,n):sn(n)?r?f(n,e,t):N(Mv,n,e,t):r?f(n[0],n[1]||e,n[2]||t):N(Mv,n[0],n[1]||e,n[2]||t)}var dM=Math.PI/180;function Ar(n){return n*dM}var vM=180/Math.PI;function pa(n){return n*vM}var gM=.9;function M6(n){return n%=400,n<0&&(n+=400),n*gM}function A6(n){return n/360}function pM(n){return 360*n}var $c=Math.PI/2;function mM(n,e){var t=e[0],r=e[1],i=e[2],a=e[3],s=t*t,o=r*r,l=i*i,u=a*a,h=s+o+l+u,v=t*a-r*i;return v>.499995*h?(n[0]=$c,n[1]=2*Math.atan2(r,t),n[2]=0):v<-.499995*h?(n[0]=-$c,n[1]=2*Math.atan2(r,t),n[2]=0):(n[0]=Math.asin(2*(t*i-a*r)),n[1]=Math.atan2(2*(t*a+r*i),1-2*(l+u)),n[2]=Math.atan2(2*(t*r+i*a),1-2*(o+l))),n}function yM(n,e){var t,r,i=hn(S(),e),a=(0,T.Z)(i,3),s=a[0],o=a[1],l=a[2],u=Math.asin(-e[2]/s);return u<$c?u>-$c?(t=Math.atan2(e[6]/o,e[10]/l),r=Math.atan2(e[1]/s,e[0]/s)):(r=0,t=-Math.atan2(e[4]/o,e[5]/o)):(r=0,t=Math.atan2(e[4]/o,e[5]/o)),n[0]=t,n[1]=u,n[2]=r,n}function Av(n,e){return e.length===16?yM(n,e):mM(n,e)}function _M(n,e,t,r,i){var a=Math.cos(n),s=Math.sin(n);return Aa(r*a,i*s,0,-r*s,i*a,0,e,t,1)}function EM(n,e,t,r,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,l=2*a,u=t-e,h=r-i,v=l/u,E=l/h,D=(t+e)/u,F=(r+i)/h,G,H,K=s-a,q=s*a;return o?(G=-s/K,H=-q/K):(G=-(s+a)/K,H=-2*q/K),n[0]=v,n[1]=0,n[2]=0,n[3]=0,n[4]=0,n[5]=E,n[6]=0,n[7]=0,n[8]=D,n[9]=F,n[10]=G,n[11]=-1,n[12]=0,n[13]=0,n[14]=H,n[15]=0,n}function Tm(n){var e=n[0],t=n[1],r=n[3],i=n[4],a=Math.sqrt(e*e+t*t),s=Math.sqrt(r*r+i*i),o=e*i-t*r;if(o<0&&(e<i?a=-a:s=-s),a){var l=1/a;e*=l,t*=l}if(s){var u=1/s;r*=u,i*=u}var h=Math.atan2(t,e),v=pa(h);return[n[6],n[7],a,s,v]}var Os=Ge(),ss=Ge(),Nu=pt(),In=[S(),S(),S()],Sm=S();function xM(n,e,t,r,i,a){if(!bM(Os,n)||(Ke(ss,Os),ss[3]=0,ss[7]=0,ss[11]=0,ss[15]=1,Math.abs(Ct(ss))<1e-8))return!1;var s=Os[3],o=Os[7],l=Os[11],u=Os[12],h=Os[13],v=Os[14],E=Os[15];if(s!==0||o!==0||l!==0){Nu[0]=s,Nu[1]=o,Nu[2]=l,Nu[3]=E;var D=bt(ss,ss);if(!D)return!1;ut(ss,ss),Ut(i,Nu,ss)}else i[0]=i[1]=i[2]=0,i[3]=1;if(e[0]=u,e[1]=h,e[2]=v,wM(In,Os),t[0]=c(In[0]),de(In[0],In[0]),r[0]=be(In[0],In[1]),Tv(In[1],In[1],In[0],1,-r[0]),t[1]=c(In[1]),de(In[1],In[1]),r[0]/=t[1],r[1]=be(In[0],In[2]),Tv(In[2],In[2],In[0],1,-r[1]),r[2]=be(In[1],In[2]),Tv(In[2],In[2],In[1],1,-r[2]),t[2]=c(In[2]),de(In[2],In[2]),r[1]/=t[2],r[2]/=t[2],Ae(Sm,In[1],In[2]),be(In[0],Sm)<0)for(var F=0;F<3;F++)t[F]*=-1,In[F][0]*=-1,In[F][1]*=-1,In[F][2]*=-1;return a[0]=.5*Math.sqrt(Math.max(1+In[0][0]-In[1][1]-In[2][2],0)),a[1]=.5*Math.sqrt(Math.max(1-In[0][0]+In[1][1]-In[2][2],0)),a[2]=.5*Math.sqrt(Math.max(1-In[0][0]-In[1][1]+In[2][2],0)),a[3]=.5*Math.sqrt(Math.max(1+In[0][0]+In[1][1]+In[2][2],0)),In[2][1]>In[1][2]&&(a[0]=-a[0]),In[0][2]>In[2][0]&&(a[1]=-a[1]),In[1][0]>In[0][1]&&(a[2]=-a[2]),!0}function bM(n,e){var t=e[15];if(t===0)return!1;for(var r=1/t,i=0;i<16;i++)n[i]=e[i]*r;return!0}function wM(n,e){n[0][0]=e[0],n[0][1]=e[1],n[0][2]=e[2],n[1][0]=e[4],n[1][1]=e[5],n[1][2]=e[6],n[2][0]=e[8],n[2][1]=e[9],n[2][2]=e[10]}function Tv(n,e,t,r,i){n[0]=e[0]*r+t[0]*i,n[1]=e[1]*r+t[1]*i,n[2]=e[2]*r+t[2]*i}var Tr=function(n){return n[n.ORBITING=0]="ORBITING",n[n.EXPLORING=1]="EXPLORING",n[n.TRACKING=2]="TRACKING",n}({}),Sv=function(n){return n[n.DEFAULT=0]="DEFAULT",n[n.ROTATIONAL=1]="ROTATIONAL",n[n.TRANSLATIONAL=2]="TRANSLATIONAL",n[n.CINEMATIC=3]="CINEMATIC",n}({}),Va=function(n){return n[n.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",n[n.PERSPECTIVE=1]="PERSPECTIVE",n}({}),Pm={UPDATED:"updated"},Om=2e-4,Cm=function(){function n(){(0,b.Z)(this,n),this.clipSpaceNearZ=qc.NEGATIVE_ONE,this.eventEmitter=new p,this.matrix=Ge(),this.right=f(1,0,0),this.up=f(0,1,0),this.forward=f(0,0,1),this.position=f(0,0,1),this.focalPoint=f(0,0,0),this.distanceVector=f(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=Ge(),this.projectionMatrixInverse=Ge(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Tr.EXPLORING,this.trackingMode=Sv.DEFAULT,this.projectionMode=Va.PERSPECTIVE,this.frustum=new hM,this.orthoMatrix=Ge()}return(0,U.Z)(n,[{key:"isOrtho",value:function(){return this.projectionMode===Va.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(t){this.enableUpdate=t}},{key:"setType",value:function(t,r){return this.type=t,this.type===Tr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Tr.TRACKING&&r!==void 0&&this.setTrackingMode(r),this}},{key:"setProjectionMode",value:function(t){return this.projectionMode=t,this}},{key:"setTrackingMode",value:function(t){if(this.type!==Tr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=t,this}},{key:"setWorldRotation",value:function(t){return this.rotateWorld=t,this._getAngles(),this}},{key:"getViewTransform",value:function(){return bt(Ge(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(t,r){var i=rn(Ge(),[t,r,0]);this.jitteredProjectionMatrix=_t(Ge(),i,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(t){return this.matrix=t,this._update(),this}},{key:"setProjectionMatrix",value:function(t){this.projectionMatrix=t}},{key:"setFov",value:function(t){return this.setPerspective(this.near,this.far,t,this.aspect),this}},{key:"setAspect",value:function(t){return this.setPerspective(this.near,this.far,this.fov,t),this}},{key:"setNear",value:function(t){return this.projectionMode===Va.PERSPECTIVE?this.setPerspective(t,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,t,this.far),this}},{key:"setFar",value:function(t){return this.projectionMode===Va.PERSPECTIVE?this.setPerspective(this.near,t,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,t),this}},{key:"setViewOffset",value:function(t,r,i,a,s,o){return this.aspect=t/r,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=t,this.view.fullHeight=r,this.view.offsetX=i,this.view.offsetY=a,this.view.width=s,this.view.height=o,this.projectionMode===Va.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===Va.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(t){return this.zoom=t,this.projectionMode===Va.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===Va.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(t,r){var i=this.canvas.viewport2Canvas({x:r[0],y:r[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(t),this.rotate(0,0,o);var l=this.canvas.viewport2Canvas({x:r[0],y:r[1]}),u=l.x,h=l.y,v=f(u-a,h-s,0),E=be(v,this.right)/c(this.right),D=be(v,this.up)/c(this.up),F=this.getPosition(),G=(0,T.Z)(F,2),H=G[0],K=G[1],q=this.getFocalPoint(),te=(0,T.Z)(q,2),ue=te[0],le=te[1];return this.setPosition(H-E,K-D),this.setFocalPoint(ue-E,le-D),this}},{key:"setPerspective",value:function(t,r,i,a){var s;this.projectionMode=Va.PERSPECTIVE,this.fov=i,this.near=t,this.far=r,this.aspect=a;var o=this.near*Math.tan(Ar(.5*this.fov))/this.zoom,l=2*o,u=this.aspect*l,h=-.5*u;if((s=this.view)!==null&&s!==void 0&&s.enabled){var v=this.view.fullWidth,E=this.view.fullHeight;h+=this.view.offsetX*u/v,o-=this.view.offsetY*l/E,u*=this.view.width/v,l*=this.view.height/E}return EM(this.projectionMatrix,h,h+u,o-l,o,t,this.far,this.clipSpaceNearZ===qc.ZERO),bt(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(t,r,i,a,s,o){var l;this.projectionMode=Va.ORTHOGRAPHIC,this.rright=r,this.left=t,this.top=i,this.bottom=a,this.near=s,this.far=o;var u=(this.rright-this.left)/(2*this.zoom),h=(this.top-this.bottom)/(2*this.zoom),v=(this.rright+this.left)/2,E=(this.top+this.bottom)/2,D=v-u,F=v+u,G=E+h,H=E-h;if((l=this.view)!==null&&l!==void 0&&l.enabled){var K=(this.rright-this.left)/this.view.fullWidth/this.zoom,q=(this.top-this.bottom)/this.view.fullHeight/this.zoom;D+=K*this.view.offsetX,F=D+K*this.view.width,G-=q*this.view.offsetY,H=G-q*this.view.height}return this.clipSpaceNearZ===qc.NEGATIVE_ONE?br(this.projectionMatrix,D,F,G,H,s,o):bi(this.projectionMatrix,D,F,G,H,s,o),bt(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(t){var r=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=na(t,r,i);return this._setPosition(a),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(t){var r=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=f(0,1,0);if(this.focalPoint=na(t,r,i),this.trackingMode===Sv.CINEMATIC){var s=W(S(),this.focalPoint,this.position);t=s[0],r=s[1],i=s[2];var o=c(s),l=pa(Math.asin(r/o)),u=90+pa(Math.atan2(i,t)),h=Ge();Rt(h,h,Ar(u)),xt(h,h,Ar(l)),a=et(S(),[0,1,0],h)}return bt(this.matrix,Cr(Ge(),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(t){if(this.distance===t||t<0)return this;this.distance=t,this.distance<Om&&(this.distance=Om),this.dollyingStep=this.distance/100;var r=S();t=this.distance;var i=this.forward,a=this.focalPoint;return r[0]=t*i[0]+a[0],r[1]=t*i[1]+a[1],r[2]=t*i[2]+a[2],this._setPosition(r),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(t){return this.maxDistance=t,this}},{key:"setMinDistance",value:function(t){return this.minDistance=t,this}},{key:"setAzimuth",value:function(t){return this.azimuth=Hl(t),this.computeMatrix(),this._getAxes(),this.type===Tr.ORBITING||this.type===Tr.EXPLORING?this._getPosition():this.type===Tr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(t){return this.elevation=Hl(t),this.computeMatrix(),this._getAxes(),this.type===Tr.ORBITING||this.type===Tr.EXPLORING?this._getPosition():this.type===Tr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(t){return this.roll=Hl(t),this.computeMatrix(),this._getAxes(),this.type===Tr.ORBITING||this.type===Tr.EXPLORING?this._getPosition():this.type===Tr.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 t=Mn(Fr(),[0,0,1],Ar(this.roll));Qe(this.matrix);var r=Mn(Fr(),[1,0,0],Ar((this.rotateWorld&&this.type!==Tr.TRACKING||this.type===Tr.TRACKING?1:-1)*this.elevation)),i=Mn(Fr(),[0,1,0],Ar((this.rotateWorld&&this.type!==Tr.TRACKING||this.type===Tr.TRACKING?1:-1)*this.azimuth)),a=Qn(Fr(),i,r);a=Qn(Fr(),a,t);var s=Tn(Ge(),a);this.type===Tr.ORBITING||this.type===Tr.EXPLORING?(St(this.matrix,this.matrix,this.focalPoint),_t(this.matrix,this.matrix,s),St(this.matrix,this.matrix,[0,0,this.distance])):this.type===Tr.TRACKING&&(St(this.matrix,this.matrix,this.position),_t(this.matrix,this.matrix,s))}},{key:"_setPosition",value:function(t,r,i){this.position=na(t,r,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(){P(this.right,na(Ut(pt(),[1,0,0,0],this.matrix))),P(this.up,na(Ut(pt(),[0,1,0,0],this.matrix))),P(this.forward,na(Ut(pt(),[0,0,1,0],this.matrix))),de(this.right,this.right),de(this.up,this.up),de(this.forward,this.forward)}},{key:"_getAngles",value:function(){var t=this.distanceVector[0],r=this.distanceVector[1],i=this.distanceVector[2],a=c(this.distanceVector);if(a===0){this.elevation=0,this.azimuth=0;return}this.type===Tr.TRACKING?(this.elevation=pa(Math.asin(r/a)),this.azimuth=pa(Math.atan2(-t,-i))):this.rotateWorld?(this.elevation=pa(Math.asin(r/a)),this.azimuth=pa(Math.atan2(-t,-i))):(this.elevation=-pa(Math.asin(r/a)),this.azimuth=-pa(Math.atan2(-t,-i)))}},{key:"_getPosition",value:function(){P(this.position,na(Ut(pt(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){vt(this.distanceVector,[0,0,-this.distance],Yr(Ln(),this.matrix)),k(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=W(S(),this.focalPoint,this.position),this.distance=c(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===Va.ORTHOGRAPHIC){var t=this.position,r=Mn(Fr(),[0,0,1],-this.roll*Math.PI/180);Wn(this.orthoMatrix,r,f((this.rright-this.left)/2-t[0],(this.top-this.bottom)/2-t[1],0),f(this.zoom,this.zoom,1),t)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var t=this.getViewTransform(),r=_t(Ge(),this.getPerspective(),t);this.getFrustum().extractFromVPMatrix(r),this.eventEmitter.emit(Pm.UPDATED)}}},{key:"rotate",value:function(t,r,i){throw new Error(Mr)}},{key:"pan",value:function(t,r){throw new Error(Mr)}},{key:"dolly",value:function(t){throw new Error(Mr)}},{key:"createLandmark",value:function(t,r){throw new Error(Mr)}},{key:"gotoLandmark",value:function(t,r){throw new Error(Mr)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(Mr)}}])}(),MM=function(n){return n[n.Standard=0]="Standard",n}({}),eh=function(n){return n[n.ADDED=0]="ADDED",n[n.REMOVED=1]="REMOVED",n[n.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",n}({}),Dm={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Wl(0,0,0,0)},Qt=function(n){return n.COORDINATE="<coordinate>",n.COLOR="<color>",n.PAINT="<paint>",n.NUMBER="<number>",n.ANGLE="<angle>",n.OPACITY_VALUE="<opacity-value>",n.SHADOW_BLUR="<shadow-blur>",n.LENGTH="<length>",n.PERCENTAGE="<percentage>",n.LENGTH_PERCENTAGE="<length> | <percentage>",n.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",n.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",n.LIST_OF_POINTS="<list-of-points>",n.PATH="<path>",n.FILTER="<filter>",n.Z_INDEX="<z-index>",n.OFFSET_DISTANCE="<offset-distance>",n.DEFINED_PATH="<defined-path>",n.MARKER="<marker>",n.TRANSFORM="<transform>",n.TRANSFORM_ORIGIN="<transform-origin>",n.TEXT="<text>",n.TEXT_TRANSFORM="<text-transform>",n}({});function Pv(n,e,t){n.prototype=e.prototype=t,t.constructor=n}function Lm(n,e){var t=Object.create(n.prototype);for(var r in e)t[r]=e[r];return t}function Bu(){}var ku=.7,th=1/ku,jl="\\s*([+-]?\\d+)\\s*",Fu="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Cs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",AM=/^#([0-9a-f]{3,8})$/,TM=new RegExp(`^rgb\\(${jl},${jl},${jl}\\)$`),SM=new RegExp(`^rgb\\(${Cs},${Cs},${Cs}\\)$`),PM=new RegExp(`^rgba\\(${jl},${jl},${jl},${Fu}\\)$`),OM=new RegExp(`^rgba\\(${Cs},${Cs},${Cs},${Fu}\\)$`),CM=new RegExp(`^hsl\\(${Fu},${Cs},${Cs}\\)$`),DM=new RegExp(`^hsla\\(${Fu},${Cs},${Cs},${Fu}\\)$`),Rm={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};Pv(Bu,nh,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Im,formatHex:Im,formatHex8:LM,formatHsl:RM,formatRgb:Nm,toString:Nm});function Im(){return this.rgb().formatHex()}function LM(){return this.rgb().formatHex8()}function RM(){return Um(this).formatHsl()}function Nm(){return this.rgb().formatRgb()}function nh(n){var e,t;return n=(n+"").trim().toLowerCase(),(e=AM.exec(n))?(t=e[1].length,e=parseInt(e[1],16),t===6?Bm(e):t===3?new ma(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?rh(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?rh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=TM.exec(n))?new ma(e[1],e[2],e[3],1):(e=SM.exec(n))?new ma(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=PM.exec(n))?rh(e[1],e[2],e[3],e[4]):(e=OM.exec(n))?rh(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=CM.exec(n))?zm(e[1],e[2]/100,e[3]/100,1):(e=DM.exec(n))?zm(e[1],e[2]/100,e[3]/100,e[4]):Rm.hasOwnProperty(n)?Bm(Rm[n]):n==="transparent"?new ma(NaN,NaN,NaN,0):null}function Bm(n){return new ma(n>>16&255,n>>8&255,n&255,1)}function rh(n,e,t,r){return r<=0&&(n=e=t=NaN),new ma(n,e,t,r)}function IM(n){return n instanceof Bu||(n=nh(n)),n?(n=n.rgb(),new ma(n.r,n.g,n.b,n.opacity)):new ma}function NM(n,e,t,r){return arguments.length===1?IM(n):new ma(n,e,t,r==null?1:r)}function ma(n,e,t,r){this.r=+n,this.g=+e,this.b=+t,this.opacity=+r}Pv(ma,NM,Lm(Bu,{brighter(n){return n=n==null?th:Math.pow(th,n),new ma(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?ku:Math.pow(ku,n),new ma(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new ma(Jo(this.r),Jo(this.g),Jo(this.b),ih(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:km,formatHex:km,formatHex8:BM,formatRgb:Fm,toString:Fm}));function km(){return`#${qo(this.r)}${qo(this.g)}${qo(this.b)}`}function BM(){return`#${qo(this.r)}${qo(this.g)}${qo(this.b)}${qo((isNaN(this.opacity)?1:this.opacity)*255)}`}function Fm(){const n=ih(this.opacity);return`${n===1?"rgb(":"rgba("}${Jo(this.r)}, ${Jo(this.g)}, ${Jo(this.b)}${n===1?")":`, ${n})`}`}function ih(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Jo(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function qo(n){return n=Jo(n),(n<16?"0":"")+n.toString(16)}function zm(n,e,t,r){return r<=0?n=e=t=NaN:t<=0||t>=1?n=e=NaN:e<=0&&(n=NaN),new os(n,e,t,r)}function Um(n){if(n instanceof os)return new os(n.h,n.s,n.l,n.opacity);if(n instanceof Bu||(n=nh(n)),!n)return new os;if(n instanceof os)return n;n=n.rgb();var e=n.r/255,t=n.g/255,r=n.b/255,i=Math.min(e,t,r),a=Math.max(e,t,r),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(t-r)/o+(t<r)*6:t===a?s=(r-e)/o+2:s=(e-t)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new os(s,o,l,n.opacity)}function kM(n,e,t,r){return arguments.length===1?Um(n):new os(n,e,t,r==null?1:r)}function os(n,e,t,r){this.h=+n,this.s=+e,this.l=+t,this.opacity=+r}Pv(os,kM,Lm(Bu,{brighter(n){return n=n==null?th:Math.pow(th,n),new os(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?ku:Math.pow(ku,n),new os(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,t=this.l,r=t+(t<.5?t:1-t)*e,i=2*t-r;return new ma(Ov(n>=240?n-240:n+120,i,r),Ov(n,i,r),Ov(n<120?n+240:n-120,i,r),this.opacity)},clamp(){return new os(Wm(this.h),ah(this.s),ah(this.l),ih(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 n=ih(this.opacity);return`${n===1?"hsl(":"hsla("}${Wm(this.h)}, ${ah(this.s)*100}%, ${ah(this.l)*100}%${n===1?")":`, ${n})`}`}}));function Wm(n){return n=(n||0)%360,n<0?n+360:n}function ah(n){return Math.max(0,Math.min(1,n||0))}function Ov(n,e,t){return(n<60?e+(t-e)*n/60:n<180?t:n<240?e+(t-e)*(240-n)/60:e)*255}function gi(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new TypeError("Expected a function");var t=function(){for(var i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=e?e.apply(this,a):a[0],l=t.cache;if(l.has(o))return l.get(o);var u=n.apply(this,a);return t.cache=l.set(o,u)||l,u};return t.cache=new(gi.Cache||Map),gi.cacheList.push(t.cache),t}gi.Cache=Map,gi.cacheList=[],gi.clearCache=function(){gi.cacheList.forEach(function(n){return n.clear()})};var Jt=function(n){return n[n.kUnknown=0]="kUnknown",n[n.kNumber=1]="kNumber",n[n.kPercentage=2]="kPercentage",n[n.kEms=3]="kEms",n[n.kPixels=4]="kPixels",n[n.kRems=5]="kRems",n[n.kDegrees=6]="kDegrees",n[n.kRadians=7]="kRadians",n[n.kGradians=8]="kGradians",n[n.kTurns=9]="kTurns",n[n.kMilliseconds=10]="kMilliseconds",n[n.kSeconds=11]="kSeconds",n[n.kInteger=12]="kInteger",n}({}),ls=function(n){return n[n.kUNumber=0]="kUNumber",n[n.kUPercent=1]="kUPercent",n[n.kULength=2]="kULength",n[n.kUAngle=3]="kUAngle",n[n.kUTime=4]="kUTime",n[n.kUOther=5]="kUOther",n}({}),FM=function(n){return n[n.kYes=0]="kYes",n[n.kNo=1]="kNo",n}({}),zM=function(n){return n[n.kYes=0]="kYes",n[n.kNo=1]="kNo",n}({}),UM=[{name:"em",unit_type:Jt.kEms},{name:"px",unit_type:Jt.kPixels},{name:"deg",unit_type:Jt.kDegrees},{name:"rad",unit_type:Jt.kRadians},{name:"grad",unit_type:Jt.kGradians},{name:"ms",unit_type:Jt.kMilliseconds},{name:"s",unit_type:Jt.kSeconds},{name:"rem",unit_type:Jt.kRems},{name:"turn",unit_type:Jt.kTurns}],Vl=function(n){return n[n.kUnknownType=0]="kUnknownType",n[n.kUnparsedType=1]="kUnparsedType",n[n.kKeywordType=2]="kKeywordType",n[n.kUnitType=3]="kUnitType",n[n.kSumType=4]="kSumType",n[n.kProductType=5]="kProductType",n[n.kNegateType=6]="kNegateType",n[n.kInvertType=7]="kInvertType",n[n.kMinType=8]="kMinType",n[n.kMaxType=9]="kMaxType",n[n.kClampType=10]="kClampType",n[n.kTransformType=11]="kTransformType",n[n.kPositionType=12]="kPositionType",n[n.kURLImageType=13]="kURLImageType",n[n.kColorType=14]="kColorType",n[n.kUnsupportedColorType=15]="kUnsupportedColorType",n}({}),WM=function(e){return UM.find(function(t){return t.name===e}).unit_type},GM=function(e){return e?e==="number"?Jt.kNumber:e==="percent"||e==="%"?Jt.kPercentage:WM(e):Jt.kUnknown},HM=function(e){switch(e){case Jt.kNumber:case Jt.kInteger:return ls.kUNumber;case Jt.kPercentage:return ls.kUPercent;case Jt.kPixels:return ls.kULength;case Jt.kMilliseconds:case Jt.kSeconds:return ls.kUTime;case Jt.kDegrees:case Jt.kRadians:case Jt.kGradians:case Jt.kTurns:return ls.kUAngle;default:return ls.kUOther}},jM=function(e){switch(e){case ls.kUNumber:return Jt.kNumber;case ls.kULength:return Jt.kPixels;case ls.kUPercent:return Jt.kPercentage;case ls.kUTime:return Jt.kSeconds;case ls.kUAngle:return Jt.kDegrees;default:return Jt.kUnknown}},Gm=function(e){var t=1;switch(e){case Jt.kPixels:case Jt.kDegrees:case Jt.kSeconds:break;case Jt.kMilliseconds:t=.001;break;case Jt.kRadians:t=180/Math.PI;break;case Jt.kGradians:t=.9;break;case Jt.kTurns:t=360;break}return t},Cv=function(e){switch(e){case Jt.kNumber:case Jt.kInteger:return"";case Jt.kPercentage:return"%";case Jt.kEms:return"em";case Jt.kRems:return"rem";case Jt.kPixels:return"px";case Jt.kDegrees:return"deg";case Jt.kRadians:return"rad";case Jt.kGradians:return"grad";case Jt.kMilliseconds:return"ms";case Jt.kSeconds:return"s";case Jt.kTurns:return"turn"}return""},sh=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"toString",value:function(){return this.buildCSSText(FM.kNo,zM.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Vl.kUnitType&&this.getType()<=Vl.kClampType}}],[{key:"isAngle",value:function(t){return t===Jt.kDegrees||t===Jt.kRadians||t===Jt.kGradians||t===Jt.kTurns}},{key:"isLength",value:function(t){return t>=Jt.kEms&&t<Jt.kDegrees}},{key:"isRelativeUnit",value:function(t){return t===Jt.kPercentage||t===Jt.kEms||t===Jt.kRems}},{key:"isTime",value:function(t){return t===Jt.kSeconds||t===Jt.kMilliseconds}}])}(),VM=function(n){function e(t){var r;return(0,b.Z)(this,e),r=(0,w.Z)(this,e),r.colorSpace=t,r}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"getType",value:function(){return Vl.kColorType}},{key:"to",value:function(r){return this}}])}(sh),yo=function(n){return n[n.Constant=0]="Constant",n[n.LinearGradient=1]="LinearGradient",n[n.RadialGradient=2]="RadialGradient",n}({}),oh=function(n){function e(t,r){var i;return(0,b.Z)(this,e),i=(0,w.Z)(this,e),i.type=t,i.value=r,i}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"clone",value:function(){return new e(this.type,this.value)}},{key:"buildCSSText",value:function(r,i,a){return a}},{key:"getType",value:function(){return Vl.kColorType}}])}(sh),Za=function(n){function e(t){var r;return(0,b.Z)(this,e),r=(0,w.Z)(this,e),r.value=t,r}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"clone",value:function(){return new e(this.value)}},{key:"getType",value:function(){return Vl.kKeywordType}},{key:"buildCSSText",value:function(r,i,a){return a+this.value}}])}(sh),ZM=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",r="";return Number.isFinite(e)?r="NaN":e>0?r="infinity":r="-infinity",r+=t},Dv=function(e){return jM(HM(e))},Sr=function(n){function e(t){var r,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jt.kNumber;(0,b.Z)(this,e),r=(0,w.Z)(this,e);var a;return typeof i=="string"?a=GM(i):a=i,r.unit=a,r.value=t,r}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"clone",value:function(){return new e(this.value,this.unit)}},{key:"equals",value:function(r){var i=r;return this.value===i.value&&this.unit===i.unit}},{key:"getType",value:function(){return Vl.kUnitType}},{key:"convertTo",value:function(r){if(this.unit===r)return new e(this.value,this.unit);var i=Dv(this.unit);if(i!==Dv(r)||i===Jt.kUnknown)return null;var a=Gm(this.unit)/Gm(r);return new e(this.value*a,r)}},{key:"buildCSSText",value:function(r,i,a){var s;switch(this.unit){case Jt.kUnknown:break;case Jt.kInteger:s=Number(this.value).toFixed(0);break;case Jt.kNumber:case Jt.kPercentage:case Jt.kEms:case Jt.kRems:case Jt.kPixels:case Jt.kDegrees:case Jt.kRadians:case Jt.kGradians:case Jt.kMilliseconds:case Jt.kSeconds:case Jt.kTurns:{var o=-999999,l=999999,u=this.value,h=Cv(this.unit);if(u<o||u>l){var v=Cv(this.unit);!Number.isFinite(u)||Number.isNaN(u)?s=ZM(u,v):s=u+(v||"")}else s="".concat(u).concat(h)}}return a+=s,a}}])}(sh),us=new Sr(0,"px");new Sr(1,"px");var $o=new Sr(0,"deg"),Lv=function(n){function e(t,r,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,b.Z)(this,e),a=(0,w.Z)(this,e,["rgb"]),a.r=t,a.g=r,a.b=i,a.alpha=s,a.isNone=o,a}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"clone",value:function(){return new e(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(r,i,a){return"".concat(a,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(VM),Hm=new Za("unset"),KM=new Za("initial"),XM=new Za("inherit"),Rv={"":Hm,unset:Hm,initial:KM,inherit:XM},YM=function(e){return Rv[e]||(Rv[e]=new Za(e)),Rv[e]},jm=new Lv(0,0,0,0,!0),Vm=new Lv(0,0,0,0),QM=gi(function(n,e,t,r){return new Lv(n,e,t,r)},function(n,e,t,r){return"rgba(".concat(n,",").concat(e,",").concat(t,",").concat(r,")")}),jr=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Jt.kNumber;return new Sr(e,t)};new Sr(50,"%");function JM(n){var e=n.type,t=n.value;return e==="hex"?"#".concat(t):e==="literal"?t:e==="rgb"?"rgb(".concat(t.join(","),")"):"rgba(".concat(t.join(","),")")}var qM=function(){var n={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]+\.?))/},e="";function t(mt){throw new Error("".concat(e,": ").concat(mt))}function r(){var mt=i();return e.length>0&&t("Invalid input not EOF"),mt}function i(){return te(a)}function a(){return s("linear-gradient",n.linearGradient,l)||s("repeating-linear-gradient",n.repeatingLinearGradient,l)||s("radial-gradient",n.radialGradient,v)||s("repeating-radial-gradient",n.repeatingRadialGradient,v)||s("conic-gradient",n.conicGradient,v)}function s(mt,ct,ht){return o(ct,function(At){var kt=ht();return kt&&(st(n.comma)||t("Missing comma before color stops")),{type:mt,orientation:kt,colorStops:te(ue)}})}function o(mt,ct){var ht=st(mt);if(ht){st(n.startCall)||t("Missing (");var At=ct(ht);return st(n.endCall)||t("Missing )"),At}}function l(){return u()||h()}function u(){return Je("directional",n.sideOrCorner,1)}function h(){return Je("angular",n.angleValue,1)}function v(){var mt,ct=E(),ht;return ct&&(mt=[],mt.push(ct),ht=e,st(n.comma)&&(ct=E(),ct?mt.push(ct):e=ht)),mt}function E(){var mt=D()||F();if(mt)mt.at=H();else{var ct=G();if(ct){mt=ct;var ht=H();ht&&(mt.at=ht)}else{var At=K();At&&(mt={type:"default-radial",at:At})}}return mt}function D(){var mt=Je("shape",/^(circle)/i,0);return mt&&(mt.style=Xe()||G()),mt}function F(){var mt=Je("shape",/^(ellipse)/i,0);return mt&&(mt.style=Ne()||G()),mt}function G(){return Je("extent-keyword",n.extentKeywords,1)}function H(){if(Je("position",/^at/,0)){var mt=K();return mt||t("Missing positioning value"),mt}}function K(){var mt=q();if(mt.x||mt.y)return{type:"position",value:mt}}function q(){return{x:Ne(),y:Ne()}}function te(mt){var ct=mt(),ht=[];if(ct)for(ht.push(ct);st(n.comma);)ct=mt(),ct?ht.push(ct):t("One extra comma");return ht}function ue(){var mt=le();return mt||t("Expected color definition"),mt.length=Ne(),mt}function le(){return ve()||Te()||ge()||he()}function he(){return Je("literal",n.literalColor,0)}function ve(){return Je("hex",n.hexColor,1)}function ge(){return o(n.rgbColor,function(){return{type:"rgb",value:te(Oe)}})}function Te(){return o(n.rgbaColor,function(){return{type:"rgba",value:te(Oe)}})}function Oe(){return st(n.number)[1]}function Ne(){return Je("%",n.percentageValue,1)||ze()||Xe()}function ze(){return Je("position-keyword",n.positionKeywords,1)}function Xe(){return Je("px",n.pixelValue,1)||Je("em",n.emValue,1)}function Je(mt,ct,ht){var At=st(ct);if(At)return{type:mt,value:At[ht]}}function st(mt){var ct=/^[\n\r\t\s]+/.exec(e);ct&&Et(ct[0].length);var ht=mt.exec(e);return ht&&Et(ht[0].length),ht}function Et(mt){e=e.substring(mt)}return function(mt){return e=mt,r()}}();function $M(n,e,t,r){var i=Ar(r.value),a=0,s=0,o=a+e/2,l=s+t/2,u=Math.abs(e*Math.cos(i))+Math.abs(t*Math.sin(i)),h=n[0]+o-Math.cos(i)*u/2,v=n[1]+l-Math.sin(i)*u/2,E=n[0]+o+Math.cos(i)*u/2,D=n[1]+l+Math.sin(i)*u/2;return{x1:h,y1:v,x2:E,y2:D}}function eA(n,e,t,r,i,a){var s=r.value,o=i.value;r.unit===Jt.kPercentage&&(s=r.value/100*e),i.unit===Jt.kPercentage&&(o=i.value/100*t);var l=Math.max(ga([0,0],[s,o]),ga([0,t],[s,o]),ga([e,t],[s,o]),ga([e,0],[s,o]));return a&&(a instanceof Sr?l=a.value:a instanceof Za&&(a.value==="closest-side"?l=Math.min(s,e-s,o,t-o):a.value==="farthest-side"?l=Math.max(s,e-s,o,t-o):a.value==="closest-corner"&&(l=Math.min(ga([0,0],[s,o]),ga([0,t],[s,o]),ga([e,t],[s,o]),ga([e,0],[s,o]))))),{x:s+n[0],y:o+n[1],r:l}}var tA=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,nA=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,rA=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,Zm=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function iA(n){var e,t=n.length;if(n[t-1].length=(e=n[t-1].length)!==null&&e!==void 0?e:{type:"%",value:"100"},t>1){var r;n[0].length=(r=n[0].length)!==null&&r!==void 0?r:{type:"%",value:"0"}}for(var i=0,a=Number(n[0].length.value),s=1;s<t;s++){var o,l=(o=n[s].length)===null||o===void 0?void 0:o.value;if(!xn(l)&&!xn(a)){for(var u=1;u<s-i;u++)n[i+u].length={type:"%",value:"".concat(a+(Number(l)-a)*u/(s-i))};i=s,a=Number(l)}}}var aA={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},sA=gi(function(n){var e;return n.type==="angular"?e=Number(n.value):e=aA[n.value]||0,jr(e,"deg")}),oA=gi(function(n){var e=50,t=50,r="%",i="%";if((n==null?void 0:n.type)==="position"){var a=n.value,s=a.x,o=a.y;(s==null?void 0:s.type)==="position-keyword"&&(s.value==="left"?e=0:s.value==="center"?e=50:s.value==="right"?e=100:s.value==="top"?t=0:s.value==="bottom"&&(t=100)),(o==null?void 0:o.type)==="position-keyword"&&(o.value==="left"?e=0:o.value==="center"?t=50:o.value==="right"?e=100:o.value==="top"?t=0:o.value==="bottom"&&(t=100)),((s==null?void 0:s.type)==="px"||(s==null?void 0:s.type)==="%"||(s==null?void 0:s.type)==="em")&&(r=s==null?void 0:s.type,e=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,t=Number(o.value))}return{cx:jr(e,r),cy:jr(t,i)}}),lA=gi(function(n){if(n.indexOf("linear")>-1||n.indexOf("radial")>-1){var e=qM(n);return e.map(function(o){var l=o.type,u=o.orientation,h=o.colorStops;iA(h);var v=h.map(function(te){return{offset:jr(Number(te.length.value),"%"),color:JM(te)}});if(l==="linear-gradient")return new oh(yo.LinearGradient,{angle:u?sA(u):$o,steps:v});if(l==="radial-gradient"&&(u||(u=[{type:"shape",value:"circle"}]),u[0].type==="shape"&&u[0].value==="circle")){var E=oA(u[0].at),D=E.cx,F=E.cy,G;if(u[0].style){var H=u[0].style,K=H.type,q=H.value;K==="extent-keyword"?G=YM(q):G=jr(q,K)}return new oh(yo.RadialGradient,{cx:D,cy:F,size:G,steps:v})}})}var t=n[0];if(n[1]==="("||n[2]==="("){if(t==="l"){var r=tA.exec(n);if(r){var i,a=((i=r[2].match(Zm))===null||i===void 0?void 0:i.map(function(o){return o.split(":")}))||[];return[new oh(yo.LinearGradient,{angle:jr(parseFloat(r[1]),"deg"),steps:a.map(function(o){var l=(0,T.Z)(o,2),u=l[0],h=l[1];return{offset:jr(Number(u)*100,"%"),color:h}})})]}}else if(t==="r"){var s=uA(n);if(s)if(fr(s))n=s;else return[new oh(yo.RadialGradient,s)]}else if(t==="p")return cA(n)}});function uA(n){var e=nA.exec(n);if(e){var t,r=((t=e[4].match(Zm))===null||t===void 0?void 0:t.map(function(i){return i.split(":")}))||[];return{cx:jr(50,"%"),cy:jr(50,"%"),steps:r.map(function(i){var a=(0,T.Z)(i,2),s=a[0],o=a[1];return{offset:jr(Number(s)*100,"%"),color:o}})}}return null}function cA(n){var e=rA.exec(n);if(e){var t=e[1],r=e[2];switch(t){case"a":t="repeat";break;case"x":t="repeat-x";break;case"y":t="repeat-y";break;case"n":t="no-repeat";break;default:t="no-repeat"}return{image:r,repetition:t}}return null}function T6(n){return!!n.type&&!!n.value}function el(n){return n&&!!n.image}function lh(n){return n&&!xn(n.r)&&!xn(n.g)&&!xn(n.b)}var zu=gi(function(n){if(el(n))return(0,V.Z)({repetition:"repeat"},n);if(xn(n)&&(n=""),n==="transparent")return Vm;if(n==="currentColor")n="black";else if(n==="none")return jm;var e=lA(n);if(e)return e;var t=nh(n),r=[0,0,0,0];return t!==null&&(r[0]=t.r||0,r[1]=t.g||0,r[2]=t.b||0,r[3]=t.opacity),QM.apply(void 0,r)});function hA(n,e){if(!(!lh(n)||!lh(e)))return[[Number(n.r),Number(n.g),Number(n.b),Number(n.alpha)],[Number(e.r),Number(e.g),Number(e.b),Number(e.alpha)],function(t){var r=t.slice();if(r[3])for(var i=0;i<3;i++)r[i]=Math.round(Qr(r[i],0,255));return r[3]=Qr(r[3],0,1),"rgba(".concat(r.join(","),")")}]}function Uu(n,e){if(xn(e))return jr(0,"px");if(e="".concat(e).trim().toLowerCase(),isFinite(Number(e))){if("px".search(n)>=0)return jr(Number(e),"px");if("deg".search(n)>=0)return jr(Number(e),"deg")}var t=[];e=e.replace(n,function(i){return t.push(i),"U".concat(i)});var r="U(".concat(n.source,")");return t.map(function(i){return jr(Number(e.replace(new RegExp("U".concat(i),"g"),"").replace(new RegExp(r,"g"),"*0")),i)})[0]}var Km=function(e){return Uu(new RegExp("px","g"),e)},fA=gi(Km),dA=function(e){return Uu(new RegExp("%","g"),e)};gi(dA);var Xm=function(e){return sn(e)||isFinite(Number(e))?jr(Number(e)||0,"px"):Uu(new RegExp("px|%|em|rem","g"),e)},Iv=gi(Xm),Ym=function(e){return Uu(new RegExp("deg|rad|grad|turn","g"),e)},vA=gi(Ym);function gA(n,e,t,r){var i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a="",s=n.value||0,o=e.value||0,l=Dv(n.unit),u=n.convertTo(l),h=e.convertTo(l);return u&&h?(s=u.value,o=h.value,a=Cv(n.unit)):(Sr.isLength(n.unit)||Sr.isLength(e.unit))&&(s=Pa(n,i,t),o=Pa(e,i,t),a="px"),[s,o,function(v){return r&&(v=Math.max(v,0)),v+a}]}function ya(n){var e=0;return n.unit===Jt.kDegrees?e=n.value:n.unit===Jt.kRadians?e=pa(Number(n.value)):n.unit===Jt.kTurns?e=pM(Number(n.value)):n.value&&(e=n.value),e}function Qm(n,e){var t;return Array.isArray(n)?t=n.map(function(r){return Number(r)}):fr(n)?t=n.split(" ").map(function(r){return Number(r)}):sn(n)&&(t=[n]),e===2?t.length===1?[t[0],t[0]]:[t[0],t[1]]:e===4?t.length===1?[t[0],t[0],t[0],t[0]]:t.length===2?[t[0],t[1],t[0],t[1]]:t.length===3?[t[0],t[1],t[2],t[1]]:[t[0],t[1],t[2],t[3]]:e==="even"&&t.length%2===1?[].concat((0,C.Z)(t),(0,C.Z)(t)):t}function Pa(n,e,t){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(n.unit===Jt.kPixels)return Number(n.value);if(n.unit===Jt.kPercentage&&t){var i=t.nodeName===Pt.GROUP?t.getLocalBounds():t.getGeometryBounds();return(r?i.min[e]:0)+n.value/100*i.halfExtents[e]*2}return 0}var pA=function(e){return Uu(/deg|rad|grad|turn|px|%/g,e)},mA=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function yA(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(n=n.toLowerCase().trim(),n==="none")return[];for(var e=/\s*([\w-]+)\(([^)]*)\)/g,t=[],r,i=0;r=e.exec(n);){if(r.index!==i)return[];if(i=r.index+r[0].length,mA.indexOf(r[1])>-1&&t.push({name:r[1],params:r[2].split(" ").map(function(a){return pA(a)||zu(a)})}),e.lastIndex===n.length)return t}return[]}function Jm(n){return n.toString()}var qm=function(e){return typeof e=="number"?jr(e):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(e)?jr(Number(e)):jr(0)},Nv=gi(qm);gi(function(n){return fr(n)?n.split(" ").map(Nv):n.map(Nv)});function Bv(n,e){return[n,e,Jm]}function kv(n,e){return function(t,r){return[t,r,function(i){return Jm(Qr(i,n,e))}]}}function $m(n,e){if(n.length===e.length)return[n,e,function(t){return t}]}function Fv(n){return n.parsedStyle.d.totalLength===0&&(n.parsedStyle.d.totalLength=yw(n.parsedStyle.d.absolutePath)),n.parsedStyle.d.totalLength}function _A(n){return n.parsedStyle.points.totalLength===0&&(n.parsedStyle.points.totalLength=eM(n.parsedStyle.points.points)),n.parsedStyle.points.totalLength}function EA(n){for(var e=0;e<n.length;e++){var t=n[e-1],r=n[e],i=r[0];if(i==="M"&&t){var a=t[0],s=[r[1],r[2]],o=void 0;a==="L"||a==="M"?o=[t[1],t[2]]:(a==="C"||a==="A"||a==="Q")&&(o=[t[t.length-2],t[t.length-1]]),o&&uh(s,o)&&(n.splice(e,1),e--)}}}function xA(n){for(var e=!1,t=n.length,r=0;r<t;r++){var i=n[r],a=i[0];if(a==="C"||a==="A"||a==="Q"){e=!0;break}}return e}function bA(n){for(var e=[],t=[],r=[],i=0;i<n.length;i++){var a=n[i],s=a[0];s==="M"?(r.length&&(t.push(r),r=[]),r.push([a[1],a[2]])):s==="Z"?r.length&&(e.push(r),r=[]):r.push([a[1],a[2]])}return r.length>0&&t.push(r),{polygons:e,polylines:t}}function uh(n,e){return n[0]===e[0]&&n[1]===e[1]}function wA(n,e){for(var t=[],r=[],i=[],a=0;a<n.length;a++){var s=n[a],o=s.currentPoint,l=s.params,u=s.prePoint,h=void 0;switch(s.command){case"Q":h=nM(u[0],u[1],l[1],l[2],l[3],l[4]);break;case"C":h=Jw(u[0],u[1],l[1],l[2],l[3],l[4],l[5],l[6]);break;case"A":var v=s.arcParams;h=Zw(v.cx,v.cy,v.rx,v.ry,v.xRotation,v.startAngle,v.endAngle);break;default:t.push(o[0]),r.push(o[1]);break}h&&(s.box=h,t.push(h.x,h.x+h.width),r.push(h.y,h.y+h.height)),e&&(s.command==="L"||s.command==="M")&&s.prePoint&&s.nextPoint&&i.push(s)}t=t.filter(function(ue){return!Number.isNaN(ue)&&ue!==1/0&&ue!==-1/0}),r=r.filter(function(ue){return!Number.isNaN(ue)&&ue!==1/0&&ue!==-1/0});var E=Kc(t),D=Kc(r),F=Xc(t),G=Xc(r);if(i.length===0)return{x:E,y:D,width:F-E,height:G-D};for(var H=0;H<i.length;H++){var K=i[H],q=K.currentPoint,te=void 0;q[0]===E?(te=ch(K,e),E-=te.xExtra):q[0]===F&&(te=ch(K,e),F+=te.xExtra),q[1]===D?(te=ch(K,e),D-=te.yExtra):q[1]===G&&(te=ch(K,e),G+=te.yExtra)}return{x:E,y:D,width:F-E,height:G-D}}function ch(n,e){var t=n.prePoint,r=n.currentPoint,i=n.nextPoint,a=Math.pow(r[0]-t[0],2)+Math.pow(r[1]-t[1],2),s=Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2),o=Math.pow(t[0]-i[0],2)+Math.pow(t[1]-i[1],2),l=Math.acos((a+s-o)/(2*Math.sqrt(a)*Math.sqrt(s)));if(!l||Math.sin(l)===0||Lu(l,0))return{xExtra:0,yExtra:0};var u=Math.abs(Math.atan2(i[1]-r[1],i[0]-r[0])),h=Math.abs(Math.atan2(i[0]-r[0],i[1]-r[1]));u=u>Math.PI/2?Math.PI-u:u,h=h>Math.PI/2?Math.PI-h:h;var v={xExtra:Math.cos(l/2-u)*(e/2*(1/Math.sin(l/2)))-e/2||0,yExtra:Math.cos(h-l/2)*(e/2*(1/Math.sin(l/2)))-e/2||0};return v}function ey(n,e){return[e[0]+(e[0]-n[0]),e[1]+(e[1]-n[1])]}var ty=function(e,t){var r=e.x*t.x+e.y*t.y,i=Math.sqrt((Math.pow(e.x,2)+Math.pow(e.y,2))*(Math.pow(t.x,2)+Math.pow(t.y,2))),a=e.x*t.y-e.y*t.x<0?-1:1,s=a*Math.acos(r/i);return s},ny=function(e,t,r,i,a,s,o,l){t=Math.abs(t),r=Math.abs(r),i=em(i,360);var u=Ar(i);if(e.x===o.x&&e.y===o.y)return{x:e.x,y:e.y,ellipticalArcAngle:0};if(t===0||r===0)return{x:0,y:0,ellipticalArcAngle:0};var h=(e.x-o.x)/2,v=(e.y-o.y)/2,E={x:Math.cos(u)*h+Math.sin(u)*v,y:-Math.sin(u)*h+Math.cos(u)*v},D=Math.pow(E.x,2)/Math.pow(t,2)+Math.pow(E.y,2)/Math.pow(r,2);D>1&&(t*=Math.sqrt(D),r*=Math.sqrt(D));var F=Math.pow(t,2)*Math.pow(r,2)-Math.pow(t,2)*Math.pow(E.y,2)-Math.pow(r,2)*Math.pow(E.x,2),G=Math.pow(t,2)*Math.pow(E.y,2)+Math.pow(r,2)*Math.pow(E.x,2),H=F/G;H=H<0?0:H;var K=(a!==s?1:-1)*Math.sqrt(H),q={x:K*(t*E.y/r),y:K*(-(r*E.x)/t)},te={x:Math.cos(u)*q.x-Math.sin(u)*q.y+(e.x+o.x)/2,y:Math.sin(u)*q.x+Math.cos(u)*q.y+(e.y+o.y)/2},ue={x:(E.x-q.x)/t,y:(E.y-q.y)/r},le=ty({x:1,y:0},ue),he={x:(-E.x-q.x)/t,y:(-E.y-q.y)/r},ve=ty(ue,he);!s&&ve>0?ve-=2*Math.PI:s&&ve<0&&(ve+=2*Math.PI),ve%=2*Math.PI;var ge=le+ve*l,Te=t*Math.cos(ge),Oe=r*Math.sin(ge),Ne={x:Math.cos(u)*Te-Math.sin(u)*Oe+te.x,y:Math.sin(u)*Te+Math.cos(u)*Oe+te.y,ellipticalArcStartAngle:le,ellipticalArcEndAngle:le+ve,ellipticalArcAngle:ge,ellipticalArcCenter:te,resultantRx:t,resultantRy:r};return Ne};function MA(n){for(var e=[],t=null,r=null,i=null,a=0,s=n.length,o=0;o<s;o++){var l=n[o];r=n[o+1];var u=l[0],h={command:u,prePoint:t,params:l,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(u){case"M":i=[l[1],l[2]],a=o;break;case"A":var v=AA(t,l);h.arcParams=v;break}if(u==="Z")t=i,r=n[a+1];else{var E=l.length;t=[l[E-2],l[E-1]]}r&&r[0]==="Z"&&(r=n[a],e[a]&&(e[a].prePoint=t)),h.currentPoint=t,e[a]&&uh(t,e[a].currentPoint)&&(e[a].prePoint=h.prePoint);var D=r?[r[r.length-2],r[r.length-1]]:null;h.nextPoint=D;var F=h.prePoint;if(["L","H","V"].includes(u))h.startTangent=[F[0]-t[0],F[1]-t[1]],h.endTangent=[t[0]-F[0],t[1]-F[1]];else if(u==="Q"){var G=[l[1],l[2]];h.startTangent=[F[0]-G[0],F[1]-G[1]],h.endTangent=[t[0]-G[0],t[1]-G[1]]}else if(u==="T"){var H=e[o-1],K=ey(H.currentPoint,F);H.command==="Q"?(h.command="Q",h.startTangent=[F[0]-K[0],F[1]-K[1]],h.endTangent=[t[0]-K[0],t[1]-K[1]]):(h.command="TL",h.startTangent=[F[0]-t[0],F[1]-t[1]],h.endTangent=[t[0]-F[0],t[1]-F[1]])}else if(u==="C"){var q=[l[1],l[2]],te=[l[3],l[4]];h.startTangent=[F[0]-q[0],F[1]-q[1]],h.endTangent=[t[0]-te[0],t[1]-te[1]],h.startTangent[0]===0&&h.startTangent[1]===0&&(h.startTangent=[q[0]-te[0],q[1]-te[1]]),h.endTangent[0]===0&&h.endTangent[1]===0&&(h.endTangent=[te[0]-q[0],te[1]-q[1]])}else if(u==="S"){var ue=e[o-1],le=ey(ue.currentPoint,F),he=[l[1],l[2]];ue.command==="C"?(h.command="C",h.startTangent=[F[0]-le[0],F[1]-le[1]],h.endTangent=[t[0]-he[0],t[1]-he[1]]):(h.command="SQ",h.startTangent=[F[0]-he[0],F[1]-he[1]],h.endTangent=[t[0]-he[0],t[1]-he[1]])}else if(u==="A"){var ve=ry(h,0),ge=ve.x,Te=ve.y,Oe=ry(h,1,!1),Ne=Oe.x,ze=Oe.y;h.startTangent=[ge,Te],h.endTangent=[Ne,ze]}e.push(h)}return e}function ry(n,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,r=n.arcParams,i=r.rx,a=i===void 0?0:i,s=r.ry,o=s===void 0?0:s,l=r.xRotation,u=r.arcFlag,h=r.sweepFlag,v=ny({x:n.prePoint[0],y:n.prePoint[1]},a,o,l,!!u,!!h,{x:n.currentPoint[0],y:n.currentPoint[1]},e),E=ny({x:n.prePoint[0],y:n.prePoint[1]},a,o,l,!!u,!!h,{x:n.currentPoint[0],y:n.currentPoint[1]},t?e+.005:e-.005),D=E.x-v.x,F=E.y-v.y,G=Math.sqrt(D*D+F*F);return{x:-D/G,y:-F/G}}function hh(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function zv(n,e){return hh(n)*hh(e)?(n[0]*e[0]+n[1]*e[1])/(hh(n)*hh(e)):1}function iy(n,e){return(n[0]*e[1]<n[1]*e[0]?-1:1)*Math.acos(zv(n,e))}function AA(n,e){var t=e[1],r=e[2],i=em(Ar(e[3]),Math.PI*2),a=e[4],s=e[5],o=n[0],l=n[1],u=e[6],h=e[7],v=Math.cos(i)*(o-u)/2+Math.sin(i)*(l-h)/2,E=-1*Math.sin(i)*(o-u)/2+Math.cos(i)*(l-h)/2,D=v*v/(t*t)+E*E/(r*r);D>1&&(t*=Math.sqrt(D),r*=Math.sqrt(D));var F=t*t*(E*E)+r*r*(v*v),G=F?Math.sqrt((t*t*(r*r)-F)/F):1;a===s&&(G*=-1),isNaN(G)&&(G=0);var H=r?G*t*E/r:0,K=t?G*-r*v/t:0,q=(o+u)/2+Math.cos(i)*H-Math.sin(i)*K,te=(l+h)/2+Math.sin(i)*H+Math.cos(i)*K,ue=[(v-H)/t,(E-K)/r],le=[(-1*v-H)/t,(-1*E-K)/r],he=iy([1,0],ue),ve=iy(ue,le);return zv(ue,le)<=-1&&(ve=Math.PI),zv(ue,le)>=1&&(ve=0),s===0&&ve>0&&(ve-=2*Math.PI),s===1&&ve<0&&(ve+=2*Math.PI),{cx:q,cy:te,rx:uh(n,[u,h])?0:t,ry:uh(n,[u,h])?0:r,startAngle:he,endAngle:he+ve,xRotation:i,arcFlag:a,sweepFlag:s}}function TA(n,e,t){return n.reduce(function(r,i){var a="";if(i[0]==="M"||i[0]==="L"){var s=vec3.fromValues(i[1],i[2],0);t&&vec3.transformMat4(s,s,t),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),l=vec3.fromValues(i[3],i[4],0),u=vec3.fromValues(i[5],i[6],0);t&&(vec3.transformMat4(o,o,t),vec3.transformMat4(l,l,t),vec3.transformMat4(u,u,t)),a="".concat(i[0]).concat(o[0],",").concat(o[1],",").concat(l[0],",").concat(l[1],",").concat(u[0],",").concat(u[1])}else if(i[0]==="A"){var h=vec3.fromValues(i[6],i[7],0);t&&vec3.transformMat4(h,h,t),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],",").concat(i[5],",").concat(h[0],",").concat(h[1])}else if(i[0]==="Q"){var v=vec3.fromValues(i[1],i[2],0),E=vec3.fromValues(i[3],i[4],0);t&&(vec3.transformMat4(v,v,t),vec3.transformMat4(E,E,t)),a="".concat(i[0]).concat(i[1],",").concat(i[2],",").concat(i[3],",").concat(i[4],"}")}return r+=a},"")}function SA(n,e,t,r){return[["M",n,e],["L",t,r]]}function ay(n,e,t,r){var i=(-1+Math.sqrt(2))/3*4,a=n*i,s=e*i,o=t-n,l=t+n,u=r-e,h=r+e;return[["M",o,r],["C",o,r-s,t-a,u,t,u],["C",t+a,u,l,r-s,l,r],["C",l,r+s,t+a,h,t,h],["C",t-a,h,o,r+s,o,r],["Z"]]}function PA(n,e){var t=n.map(function(r,i){return[i===0?"M":"L",r[0],r[1]]});return e&&t.push(["Z"]),t}function OA(n,e,t,r,i){if(i){var a=_slicedToArray(i,4),s=a[0],o=a[1],l=a[2],u=a[3],h=n>0?1:-1,v=e>0?1:-1,E=h+v!==0?1:0;return[["M",h*s+t,r],["L",n-h*o+t,r],o?["A",o,o,0,0,E,n+t,v*o+r]:null,["L",n+t,e-v*l+r],l?["A",l,l,0,0,E,n+t-h*l,e+r]:null,["L",t+h*u,e+r],u?["A",u,u,0,0,E,t,e+r-v*u]:null,["L",t,v*s+r],s?["A",s,s,0,0,E,h*s+t,r]:null,["Z"]].filter(function(D){return D})}return[["M",t,r],["L",t+n,r],["L",t+n,r+e],["L",t,r+e],["Z"]]}function S6(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:n.getLocalTransform(),t=[];switch(n.nodeName){case Pt.LINE:var r=n.parsedStyle,i=r.x1,a=i===void 0?0:i,s=r.y1,o=s===void 0?0:s,l=r.x2,u=l===void 0?0:l,h=r.y2,v=h===void 0?0:h;t=SA(a,o,u,v);break;case Pt.CIRCLE:{var E=n.parsedStyle,D=E.r,F=D===void 0?0:D,G=E.cx,H=G===void 0?0:G,K=E.cy,q=K===void 0?0:K;t=ay(F,F,H,q);break}case Pt.ELLIPSE:{var te=n.parsedStyle,ue=te.rx,le=ue===void 0?0:ue,he=te.ry,ve=he===void 0?0:he,ge=te.cx,Te=ge===void 0?0:ge,Oe=te.cy,Ne=Oe===void 0?0:Oe;t=ay(le,ve,Te,Ne);break}case Pt.POLYLINE:case Pt.POLYGON:var ze=n.parsedStyle.points;t=PA(ze.points,n.nodeName===Pt.POLYGON);break;case Pt.RECT:var Xe=n.parsedStyle,Je=Xe.width,st=Je===void 0?0:Je,Et=Xe.height,mt=Et===void 0?0:Et,ct=Xe.x,ht=ct===void 0?0:ct,At=Xe.y,kt=At===void 0?0:At,Ht=Xe.radius,en=Ht&&Ht.some(function(tn){return tn!==0});t=OA(st,mt,ht,kt,en&&Ht.map(function(tn){return clamp(tn,0,Math.min(Math.abs(st)/2,Math.abs(mt)/2))}));break;case Pt.PATH:var on=n.parsedStyle.d.absolutePath;t=_toConsumableArray(on);break}if(t.length)return TA(t,n,e)}function P6(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,a=n.map(function(s,o){var l=s[0],u=n[o+1],h=o===0&&(e!==0||t!==0),v=(o===n.length-1||u&&(u[0]==="M"||u[0]==="Z"))&&r!==0&&i!==0,E=h?[e,t]:[0,0],D=_slicedToArray(E,2),F=D[0],G=D[1],H=v?[r,i]:[0,0],K=_slicedToArray(H,2),q=K[0],te=K[1];switch(l){case"M":return"M ".concat(s[1]+F,",").concat(s[2]+G);case"L":return"L ".concat(s[1]+q,",").concat(s[2]+te);case"Q":return"Q ".concat(s[1]," ").concat(s[2],",").concat(s[3]+q," ").concat(s[4]+te);case"C":return"C ".concat(s[1]," ").concat(s[2],",").concat(s[3]," ").concat(s[4],",").concat(s[5]+q," ").concat(s[6]+te);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(v?" L ".concat(s[6]+r,",").concat(s[7]+i):"");case"Z":return"Z";default:return null}}).filter(function(s){return s!==null}).join(" ");return~a.indexOf("NaN")?"":a}var sy=function(e){if(e===""||Array.isArray(e)&&e.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var t;try{t=Zc(e)}catch(D){t=Zc(""),console.error("[g]: Invalid SVG Path definition: ".concat(e))}EA(t);var r=xA(t),i=bA(t),a=i.polygons,s=i.polylines,o=MA(t),l=wA(o,0),u=l.x,h=l.y,v=l.width,E=l.height;return{absolutePath:t,hasArc:r,segments:o,polygons:a,polylines:s,totalLength:0,rect:{x:Number.isFinite(u)?u:0,y:Number.isFinite(h)?h:0,width:Number.isFinite(v)?v:0,height:Number.isFinite(E)?E:0}}},CA=gi(sy);function oy(n){return fr(n)?CA(n):sy(n)}function DA(n,e,t){var r=n.curve,i=e.curve;(!r||r.length===0)&&(r=yv(n.absolutePath,!1),n.curve=r),(!i||i.length===0)&&(i=yv(e.absolutePath,!1),e.curve=i);var a=[r,i];r.length!==i.length&&(a=rm(r,i));var s=im(a[0])!==im(a[1])?Pw(a[0]):Ow(a[0]);return[s,Dw(a[1],s),function(o){return o}]}function LA(n,e){var t;return fr(n)?t=n.split(" ").map(function(r){var i=r.split(","),a=(0,T.Z)(i,2),s=a[0],o=a[1];return[Number(s),Number(o)]}):t=n,{points:t,totalLength:0,segments:[]}}function RA(n,e){return[n.points,e.points,function(t){return t}]}var Jr=null,Zl=/\s*(\w+)\(([^)]*)\)/g;function _a(n){return function(e){var t=0;return n.map(function(r){return r===Jr?e[t++]:r})}}function tl(n){return n}var Wu={matrix:["NNNNNN",[Jr,Jr,0,0,Jr,Jr,0,0,0,0,1,0,Jr,Jr,0,1],tl],matrix3d:["NNNNNNNNNNNNNNNN",tl],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",_a([Jr,Jr,new Sr(1)]),tl],scaleX:["N",_a([Jr,new Sr(1),new Sr(1)]),_a([Jr,new Sr(1)])],scaleY:["N",_a([new Sr(1),Jr,new Sr(1)]),_a([new Sr(1),Jr])],scaleZ:["N",_a([new Sr(1),new Sr(1),Jr])],scale3d:["NNN",tl],skew:["Aa",null,tl],skewX:["A",null,_a([Jr,$o])],skewY:["A",null,_a([$o,Jr])],translate:["Tt",_a([Jr,Jr,us]),tl],translateX:["T",_a([Jr,us,us]),_a([Jr,us])],translateY:["T",_a([us,Jr,us]),_a([us,Jr])],translateZ:["L",_a([us,us,Jr])],translate3d:["TTL",tl]};function ly(n){for(var e=[],t=n.length,r=0;r<t;r++){var i=n[r],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=Wu[a];if(!o)return[];var l=s.map(function(u){return jr(u)});e.push({t:a,d:l})}return e}function uy(n){if(Array.isArray(n))return ly(n);if(n=(n||"none").trim(),n==="none")return[];var e=[],t,r=0;for(Zl.lastIndex=0;t=Zl.exec(n);){if(t.index!==r)return[];r=t.index+t[0].length;var i=t[1],a=Wu[i];if(!a)return[];var s=t[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var h=s[u],v=o[u],E=void 0;if(h?E={A:function(F){return F.trim()==="0"?$o:vA(F)},N:Nv,T:Iv,L:fA}[v.toUpperCase()](h):E={a:$o,n:l[0],t:us}[v],E===void 0)return[];l.push(E)}if(e.push({t:i,d:l}),Zl.lastIndex===n.length)return e}return[]}function IA(n){if(Array.isArray(n))return ly(n);if(n=(n||"none").trim(),n==="none")return[];var e=[],t,r=0;for(Zl.lastIndex=0;t=Zl.exec(n);){if(t.index!==r)return[];r=t.index+t[0].length;var i=t[1],a=Wu[i];if(!a)return[];var s=t[2].split(","),o=a[0];if(o.length<s.length)return[];for(var l=[],u=0;u<o.length;u++){var h=s[u],v=o[u],E=void 0;if(h?E={A:function(F){return F.trim()==="0"?$o:Ym(F)},N:qm,T:Xm,L:Km}[v.toUpperCase()](h):E={a:$o,n:l[0],t:us}[v],E===void 0)return[];l.push(E)}if(e.push({t:i,d:l}),Zl.lastIndex===n.length)return e}return[]}function NA(n){var e,t,r,i;switch(n.t){case"rotateX":return i=Ar(ya(n.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=Ar(ya(n.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=Ar(ya(n.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":e=n.d[0].value,t=n.d[1].value,r=n.d[2].value,i=Ar(ya(n.d[3]));var a=e*e+t*t+r*r;if(a===0)e=1,t=0,r=0;else if(a!==1){var s=Math.sqrt(a);e/=s,t/=s,r/=s}var o=Math.sin(i/2),l=o*Math.cos(i/2),u=o*o;return[1-2*(t*t+r*r)*u,2*(e*t*u+r*l),2*(e*r*u-t*l),0,2*(e*t*u-r*l),1-2*(e*e+r*r)*u,2*(t*r*u+e*l),0,2*(e*r*u+t*l),2*(t*r*u-e*l),1-2*(e*e+t*t)*u,0,0,0,0,1];case"scale":return[n.d[0].value,0,0,0,0,n.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[n.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,n.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,n.d[0].value,0,0,0,0,1];case"scale3d":return[n.d[0].value,0,0,0,0,n.d[1].value,0,0,0,0,n.d[2].value,0,0,0,0,1];case"skew":var h=Ar(ya(n.d[0])),v=Ar(ya(n.d[1]));return[1,Math.tan(v),0,0,Math.tan(h),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return i=Ar(ya(n.d[0])),[1,0,0,0,Math.tan(i),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return i=Ar(ya(n.d[0])),[1,Math.tan(i),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return e=Pa(n.d[0],0,null)||0,t=Pa(n.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,t,0,1];case"translateX":return e=Pa(n.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,0,0,1];case"translateY":return t=Pa(n.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,t,0,1];case"translateZ":return r=Pa(n.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,r,1];case"translate3d":return e=Pa(n.d[0],0,null)||0,t=Pa(n.d[1],0,null)||0,r=Pa(n.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,e,t,r,1];case"perspective":var E=Pa(n.d[0],0,null)||0,D=E?-1/E:0;return[1,0,0,0,0,1,0,0,0,0,1,D,0,0,0,1];case"matrix":return[n.d[0].value,n.d[1].value,0,0,n.d[2].value,n.d[3].value,0,0,0,0,1,0,n.d[4].value,n.d[5].value,0,1];case"matrix3d":return n.d.map(function(F){return F.value})}}function BA(n,e){return[n[0]*e[0]+n[4]*e[1]+n[8]*e[2]+n[12]*e[3],n[1]*e[0]+n[5]*e[1]+n[9]*e[2]+n[13]*e[3],n[2]*e[0]+n[6]*e[1]+n[10]*e[2]+n[14]*e[3],n[3]*e[0]+n[7]*e[1]+n[11]*e[2]+n[15]*e[3],n[0]*e[4]+n[4]*e[5]+n[8]*e[6]+n[12]*e[7],n[1]*e[4]+n[5]*e[5]+n[9]*e[6]+n[13]*e[7],n[2]*e[4]+n[6]*e[5]+n[10]*e[6]+n[14]*e[7],n[3]*e[4]+n[7]*e[5]+n[11]*e[6]+n[15]*e[7],n[0]*e[8]+n[4]*e[9]+n[8]*e[10]+n[12]*e[11],n[1]*e[8]+n[5]*e[9]+n[9]*e[10]+n[13]*e[11],n[2]*e[8]+n[6]*e[9]+n[10]*e[10]+n[14]*e[11],n[3]*e[8]+n[7]*e[9]+n[11]*e[10]+n[15]*e[11],n[0]*e[12]+n[4]*e[13]+n[8]*e[14]+n[12]*e[15],n[1]*e[12]+n[5]*e[13]+n[9]*e[14]+n[13]*e[15],n[2]*e[12]+n[6]*e[13]+n[10]*e[14]+n[14]*e[15],n[3]*e[12]+n[7]*e[13]+n[11]*e[14]+n[15]*e[15]]}function kA(n){return n.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:n.map(NA).reduce(BA)}function cy(n){var e=[0,0,0],t=[1,1,1],r=[0,0,0],i=[0,0,0,1],a=[0,0,0,1];return xM(kA(n),e,t,r,i,a),[[e,t,r,a,i]]}var FA=function(){function n(r,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 l=0;l<4;l++)a[s][o]+=i[s][l]*r[l][o];return a}function e(r){return r[0][2]===0&&r[0][3]===0&&r[1][2]===0&&r[1][3]===0&&r[2][0]===0&&r[2][1]===0&&r[2][2]===1&&r[2][3]===0&&r[3][2]===0&&r[3][3]===1}function t(r,i,a,s,o){for(var l=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],u=0;u<4;u++)l[u][3]=o[u];for(var h=0;h<3;h++)for(var v=0;v<3;v++)l[3][h]+=r[v]*l[v][h];var E=s[0],D=s[1],F=s[2],G=s[3],H=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];H[0][0]=1-2*(D*D+F*F),H[0][1]=2*(E*D-F*G),H[0][2]=2*(E*F+D*G),H[1][0]=2*(E*D+F*G),H[1][1]=1-2*(E*E+F*F),H[1][2]=2*(D*F-E*G),H[2][0]=2*(E*F-D*G),H[2][1]=2*(D*F+E*G),H[2][2]=1-2*(E*E+D*D),l=n(l,H);var K=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];a[2]&&(K[2][1]=a[2],l=n(l,K)),a[1]&&(K[2][1]=0,K[2][0]=a[0],l=n(l,K)),a[0]&&(K[2][0]=0,K[1][0]=a[0],l=n(l,K));for(var q=0;q<3;q++)for(var te=0;te<3;te++)l[q][te]*=i[q];return e(l)?[l[0][0],l[0][1],l[1][0],l[1][1],l[3][0],l[3][1]]:l[0].concat(l[1],l[2],l[3])}return t}();function zA(n){return n.toFixed(6).replace(".000000","")}function Uv(n,e){var t,r;return n.decompositionPair!==e&&(n.decompositionPair=e,t=cy(n)),e.decompositionPair!==n&&(e.decompositionPair=n,r=cy(e)),t[0]===null||r[0]===null?[[!1],[!0],function(i){return i?e[0].d:n[0].d}]:(t[0].push(0),r[0].push(1),[t,r,function(i){var a=WA(t[0][3],r[0][3],i[5]),s=FA(i[0],i[1],i[2],a,i[4]),o=s.map(zA).join(",");return o}])}function UA(n,e){for(var t=0,r=0;r<n.length;r++)t+=n[r]*e[r];return t}function WA(n,e,t){var r=UA(n,e);r=Qr(r,-1,1);var i=[];if(r===1)i=n;else for(var a=Math.acos(r),s=Math.sin(t*a)*1/Math.sqrt(1-r*r),o=0;o<4;o++)i.push(n[o]*(Math.cos(t*a)-r*s)+e[o]*s);return i}function Wv(n){return n.replace(/[XY]/,"")}function Gv(n){return n.replace(/(X|Y|Z|3d)?$/,"3d")}var GA=function(e,t){return e==="perspective"&&t==="perspective"||(e==="matrix"||e==="matrix3d")&&(t==="matrix"||t==="matrix3d")};function HA(n,e,t){var r=!1;if(!n.length||!e.length){n.length||(r=!0,n=e,e=[]);for(var i=function(){var Ne=n[a],ze=Ne.t,Xe=Ne.d,Je=ze.substring(0,5)==="scale"?1:0;e.push({t:ze,d:Xe.map(function(st){return typeof st=="number"?jr(Je):jr(Je,st.unit)})})},a=0;a<n.length;a++)i()}var s=[],o=[],l=[];if(n.length!==e.length){var u=Uv(n,e);s=[u[0]],o=[u[1]],l=[["matrix",[u[2]]]]}else for(var h=0;h<n.length;h++){var v=n[h].t,E=e[h].t,D=n[h].d,F=e[h].d,G=Wu[v],H=Wu[E],K=void 0;if(GA(v,E)){var q=Uv([n[h]],[e[h]]);s.push(q[0]),o.push(q[1]),l.push(["matrix",[q[2]]]);continue}else if(v===E)K=v;else if(G[2]&&H[2]&&Wv(v)===Wv(E))K=Wv(v),D=G[2](D),F=H[2](F);else if(G[1]&&H[1]&&Gv(v)===Gv(E))K=Gv(v),D=G[1](D),F=H[1](F);else{var te=Uv(n,e);s=[te[0]],o=[te[1]],l=[["matrix",[te[2]]]];break}for(var ue=[],le=[],he=[],ve=0;ve<D.length;ve++){var ge=gA(D[ve],F[ve],t,!1,ve);ue[ve]=ge[0],le[ve]=ge[1],he.push(ge[2])}s.push(ue),o.push(le),l.push([K,he])}if(r){var Te=s;s=o,o=Te}return[s,o,function(Oe){return Oe.map(function(Ne,ze){var Xe=Ne.map(function(Je,st){return l[ze][1][st](Je)}).join(",");return l[ze][0]==="matrix"&&Xe.split(",").length===16&&(l[ze][0]="matrix3d"),l[ze][0]==="matrix3d"&&Xe.split(",").length===6&&(l[ze][0]="matrix"),"".concat(l[ze][0],"(").concat(Xe,")")}).join(" ")}]}var jA=gi(function(n){if(fr(n)){if(n==="text-anchor")return[jr(0,"px"),jr(0,"px")];var e=n.split(" ");return e.length===1&&(e[0]==="top"||e[0]==="bottom"?(e[1]=e[0],e[0]="center"):e[1]="center"),e.length!==2?null:[Iv(hy(e[0])),Iv(hy(e[1]))]}return[jr(n[0]||0,"px"),jr(n[1]||0,"px")]});function hy(n){return n==="center"?"50%":n==="left"||n==="top"?"0%":n==="right"||n==="bottom"?"100%":n}var Hv=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Qt.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Qt.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Qt.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Qt.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Qt.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Qt.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Qt.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Qt.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Qt.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:Qt.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Qt.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Qt.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Qt.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Qt.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:Qt.FILTER},{n:"clipPath",syntax:Qt.DEFINED_PATH},{n:"textPath",syntax:Qt.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Qt.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Qt.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Qt.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Qt.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Qt.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Qt.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Qt.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Qt.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Qt.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Qt.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Qt.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Qt.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Qt.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Qt.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Qt.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Qt.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Qt.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Qt.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Qt.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Qt.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Qt.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:Qt.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Qt.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Qt.NUMBER,d:function(e){return e===Pt.PATH||e===Pt.POLYGON||e===Pt.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:Qt.MARKER},{n:"markerEnd",syntax:Qt.MARKER},{n:"markerMid",syntax:Qt.MARKER},{n:"markerStartOffset",syntax:Qt.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Qt.LENGTH,l:!0,int:!0,d:"0"}],VA=new Set(Hv.filter(function(n){return!!n.l}).map(function(n){return n.n})),fy={},ZA=function(){function n(e){var t=this;(0,b.Z)(this,n),this.runtime=e,Hv.forEach(function(r){t.registerMetadata(r)})}return(0,U.Z)(n,[{key:"registerMetadata",value:function(t){[t.n].concat((0,C.Z)(t.a||[])).forEach(function(r){fy[r]=t})}},{key:"getPropertySyntax",value:function(t){return this.runtime.CSSPropertySyntaxFactory[t]}},{key:"processProperties",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(t.attributes,r);var a=t.parsedStyle.clipPath,s=t.parsedStyle.offsetPath;KA(t,r);var o=!!i.forceUpdateGeometry;if(!o){for(var l in r)if(VA.has(l)){o=!0;break}}var u=dy(t);u.has("fill")&&r.fill&&(t.parsedStyle.fill=zu(r.fill)),u.has("stroke")&&r.stroke&&(t.parsedStyle.stroke=zu(r.stroke)),u.has("shadowColor")&&r.shadowColor&&(t.parsedStyle.shadowColor=zu(r.shadowColor)),u.has("filter")&&r.filter&&(t.parsedStyle.filter=yA(r.filter)),u.has("radius")&&!xn(r.radius)&&(t.parsedStyle.radius=Qm(r.radius,4)),u.has("lineDash")&&!xn(r.lineDash)&&(t.parsedStyle.lineDash=Qm(r.lineDash,"even")),u.has("points")&&r.points&&(t.parsedStyle.points=LA(r.points)),u.has("d")&&r.d===""&&(t.parsedStyle.d=(0,V.Z)({},Dm)),u.has("d")&&r.d&&(t.parsedStyle.d=oy(r.d)),u.has("textTransform")&&r.textTransform&&this.runtime.CSSPropertySyntaxFactory[Qt.TEXT_TRANSFORM].calculator(null,null,{value:r.textTransform},t,null),u.has("clipPath")&&!Bn(r.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Qt.DEFINED_PATH].calculator("clipPath",a,r.clipPath,t,this.runtime),u.has("offsetPath")&&r.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Qt.DEFINED_PATH].calculator("offsetPath",s,r.offsetPath,t,this.runtime),u.has("transform")&&r.transform&&(t.parsedStyle.transform=uy(r.transform)),u.has("transformOrigin")&&r.transformOrigin&&(t.parsedStyle.transformOrigin=jA(r.transformOrigin)),u.has("markerStart")&&r.markerStart&&(t.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Qt.MARKER].calculator(null,r.markerStart,r.markerStart,null,null)),u.has("markerEnd")&&r.markerEnd&&(t.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Qt.MARKER].calculator(null,r.markerEnd,r.markerEnd,null,null)),u.has("markerMid")&&r.markerMid&&(t.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Qt.MARKER].calculator("",r.markerMid,r.markerMid,null,null)),u.has("zIndex")&&!xn(r.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Qt.Z_INDEX].postProcessor(t),u.has("offsetDistance")&&!xn(r.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Qt.OFFSET_DISTANCE].postProcessor(t),u.has("transform")&&r.transform&&this.runtime.CSSPropertySyntaxFactory[Qt.TRANSFORM].postProcessor(t),u.has("transformOrigin")&&r.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Qt.TRANSFORM_ORIGIN].postProcessor(t),o&&(t.geometry.dirty=!0,t.renderable.boundsDirty=!0,t.renderable.renderBoundsDirty=!0,i.forceUpdateGeometry||this.runtime.sceneGraphService.dirtifyToRoot(t))}},{key:"updateGeometry",value:function(t){var r=t.nodeName,i=this.runtime.geometryUpdaterFactory[r];if(i){var a=t.geometry;a.contentBounds||(a.contentBounds=new Ir),a.renderBounds||(a.renderBounds=new Ir);var s=t.parsedStyle,o=i.update(s,t),l=o.cx,u=l===void 0?0:l,h=o.cy,v=h===void 0?0:h,E=o.cz,D=E===void 0?0:E,F=o.hwidth,G=F===void 0?0:F,H=o.hheight,K=H===void 0?0:H,q=o.hdepth,te=q===void 0?0:q,ue=[Math.abs(G),Math.abs(K),te],le=s.stroke,he=s.lineWidth,ve=he===void 0?1:he,ge=s.increasedLineWidthForHitTesting,Te=ge===void 0?0:ge,Oe=s.shadowType,Ne=Oe===void 0?"outer":Oe,ze=s.shadowColor,Xe=s.filter,Je=Xe===void 0?[]:Xe,st=s.transformOrigin,Et=[u,v,D];a.contentBounds.update(Et,ue);var mt=r===Pt.POLYLINE||r===Pt.POLYGON||r===Pt.PATH?Math.SQRT2:.5,ct=le&&!le.isNone;if(ct){var ht=((ve||0)+(Te||0))*mt;ue[0]+=ht,ue[1]+=ht}if(a.renderBounds.update(Et,ue),ze&&Ne&&Ne!=="inner"){var At=a.renderBounds,kt=At.min,Ht=At.max,en=s.shadowBlur,on=s.shadowOffsetX,tn=s.shadowOffsetY,yn=en||0,An=on||0,kn=tn||0,qn=kt[0]-yn+An,hr=Ht[0]+yn+An,qi=kt[1]-yn+kn,yr=Ht[1]+yn+kn;kt[0]=Math.min(kt[0],qn),Ht[0]=Math.max(Ht[0],hr),kt[1]=Math.min(kt[1],qi),Ht[1]=Math.max(Ht[1],yr),a.renderBounds.setMinMax(kt,Ht)}Je.forEach(function(Ni){var ao=Ni.name,ji=Ni.params;if(ao==="blur"){var wa=ji[0].value;a.renderBounds.update(a.renderBounds.center,k(a.renderBounds.halfExtents,a.renderBounds.halfExtents,[wa,wa,0]))}else if(ao==="drop-shadow"){var Yn=ji[0].value,_r=ji[1].value,Jn=ji[2].value,vr=a.renderBounds,wr=vr.min,pn=vr.max,gr=wr[0]-Jn+Yn,Er=pn[0]+Jn+Yn,Ei=wr[1]-Jn+_r,xr=pn[1]+Jn+_r;wr[0]=Math.min(wr[0],gr),pn[0]=Math.max(pn[0],Er),wr[1]=Math.min(wr[1],Ei),pn[1]=Math.max(pn[1],xr),a.renderBounds.setMinMax(wr,pn)}}),t.geometry.dirty=!1;var za=G<0,$i=K<0,Go=(za?-1:1)*(st?Pa(st[0],0,t,!0):0),Hi=($i?-1:1)*(st?Pa(st[1],1,t,!0):0);(Go||Hi)&&t.setOrigin(Go,Hi)}}},{key:"updateSizeAttenuation",value:function(t,r){t.style.isSizeAttenuation?(t.style.rawLineWidth||(t.style.rawLineWidth=t.style.lineWidth),t.style.lineWidth=(t.style.rawLineWidth||1)/r,t.nodeName===Pt.CIRCLE&&(t.style.rawR||(t.style.rawR=t.style.r),t.style.r=(t.style.rawR||1)/r)):(t.style.rawLineWidth&&(t.style.lineWidth=t.style.rawLineWidth,delete t.style.rawLineWidth),t.nodeName===Pt.CIRCLE&&t.style.rawR&&(t.style.r=t.style.rawR,delete t.style.rawR))}}])}();function KA(n,e){var t=dy(n);for(var r in e)t.has(r)&&(n.parsedStyle[r]=e[r])}function dy(n){return n.constructor.PARSED_STYLE_LIST}var XA=function(){function n(){(0,b.Z)(this,n),this.mixer=Bv}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a){return ya(i)}}])}(),YA=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a,s){return i instanceof Za&&(i=null),s.sceneGraphService.updateDisplayObjectDependency(t,r,i,a),t==="clipPath"&&a.forEach(function(o){o.childNodes.length===0&&s.sceneGraphService.dirtifyToRoot(o)}),i}}])}(),QA=function(){function n(){(0,b.Z)(this,n),this.parser=zu,this.mixer=hA}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a){return i instanceof Za?i.value==="none"?jm:Vm:i}}])}(),JA=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i instanceof Za?[]:i}}])}();function vy(n){var e=n.parsedStyle,t=e.fontSize;return xn(t)?null:t}var jv=function(){function n(){(0,b.Z)(this,n),this.mixer=Bv}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a,s){if(sn(i))return i;if(Sr.isRelativeUnit(i.unit)){if(i.unit===Jt.kPercentage)return 0;if(i.unit===Jt.kEms){if(a.parentNode){var o=vy(a.parentNode);if(o)return o*=i.value,o}return 0}if(i.unit===Jt.kRems){var l;if(a!=null&&(l=a.ownerDocument)!==null&&l!==void 0&&l.documentElement){var u=vy(a.ownerDocument.documentElement);if(u)return u*=i.value,u}return 0}}else return i.value}}])}(),qA=function(){function n(){(0,b.Z)(this,n),this.mixer=$m}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i.map(function(a){return a.value})}}])}(),$A=function(){function n(){(0,b.Z)(this,n),this.mixer=$m}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i.map(function(a){return a.value})}}])}(),eT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a){var s;i instanceof Za&&(i=null);var o=(s=i)===null||s===void 0?void 0:s.cloneNode(!0);return o&&(o.style.isMarker=!0),o}}])}(),tT=function(){function n(){(0,b.Z)(this,n),this.mixer=Bv}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i.value}}])}(),nT=function(){function n(){(0,b.Z)(this,n),this.mixer=kv(0,1)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i.value}},{key:"postProcessor",value:function(t){var r=t.parsedStyle,i=r.offsetPath,a=r.offsetDistance;if(i){var s=i.nodeName;if(s===Pt.LINE||s===Pt.PATH||s===Pt.POLYLINE){var o=i.getPoint(a);o&&t.setLocalPosition(o.x,o.y)}}}}])}(),rT=function(){function n(){(0,b.Z)(this,n),this.mixer=kv(0,1)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i.value}}])}(),iT=function(){function n(){(0,b.Z)(this,n),this.parser=oy,this.mixer=DA}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i){return i instanceof Za&&i.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new Wl(0,0,0,0)}:i}}])}(),aT=(0,U.Z)(function n(){(0,b.Z)(this,n),this.mixer=RA}),sT=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.mixer=kv(0,1/0),t}return(0,y.Z)(e,n),(0,U.Z)(e)}(jv),oT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a){return i instanceof Za?i.value==="unset"?"":i.value:"".concat(i)}},{key:"postProcessor",value:function(t){t.nodeValue="".concat(t.parsedStyle.text)||""}}])}(),lT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,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}}])}(),O6=function(e){return Object.fromEntries(Object.entries(e).filter(function(t){var r=_slicedToArray(t,2),i=r[1];return i!==void 0}))},Vv=new WeakMap;function uT(n,e,t){if(n){var r=typeof n=="string"?document.getElementById(n):n;Vv.has(r)&&Vv.get(r).destroy(t),Vv.set(r,e)}}var Zv=typeof window!="undefined"&&typeof window.document!="undefined";function cT(n){return!!n.getAttribute}function hT(n,e){for(var t=0,r=n.length;t<r;){var i=t+r>>>1;gy(n[i],e)<0?t=i+1:r=i}return t}function gy(n,e){var t=Number(n.parsedStyle.zIndex||0),r=Number(e.parsedStyle.zIndex||0);if(t===r){var i=n.parentNode;if(i){var a=i.childNodes||[];return a.indexOf(n)-a.indexOf(e)}}return t-r}function py(n){var e=n;do{var t,r=(t=e.parsedStyle)===null||t===void 0?void 0:t.clipPath;if(r)return e;e=e.parentElement}while(e!==null);return null}var my="px";function fT(n,e,t){Zv&&n.style&&(n.style.width=e+my,n.style.height=t+my)}function yy(n,e){if(Zv)return document.defaultView.getComputedStyle(n,null).getPropertyValue(e)}function dT(n){var e=yy(n,"width");return e==="auto"?n.offsetWidth:parseFloat(e)}function vT(n){var e=yy(n,"height");return e==="auto"?n.offsetHeight:parseFloat(e)}var gT=1,pT={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Kv=typeof performance=="object"&&performance.now?performance:Date;function fh(n){return n.nodeName===Pt.FRAGMENT?!0:n.getRootNode().nodeName===Pt.FRAGMENT}function nl(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",e=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,r=!1,i=!1,a=!!e&&!e.isNone,s=!!t&&!t.isNone;return n==="visiblepainted"||n==="painted"||n==="auto"?(r=a,i=s):n==="visiblefill"||n==="fill"?r=!0:n==="visiblestroke"||n==="stroke"?i=!0:(n==="visible"||n==="all")&&(r=!0,i=!0),[r,i]}var mT=1,yT=function(){return mT++},Ds=typeof self=="object"&&self.self===self?self:typeof Y.g=="object"&&Y.g.global===Y.g?Y.g:{},_T=Date.now(),ET=function(){return Ds.performance&&typeof Ds.performance.now=="function"?Ds.performance.now():Date.now()-_T},Gu={},_y=Date.now(),xT=function(e){if(typeof e!="function")throw new TypeError("".concat(e," is not a function"));var t=Date.now(),r=t-_y,i=r>16?0:16-r,a=yT();return Gu[a]=e,Object.keys(Gu).length>1||setTimeout(function(){_y=t;var s=Gu;Gu={},Object.keys(s).forEach(function(o){return s[o](ET())})},i),a},bT=function(e){delete Gu[e]},wT=["","webkit","moz","ms","o"],Ey=function(e){return typeof e!="string"?xT:e===""?Ds.requestAnimationFrame:Ds["".concat(e,"RequestAnimationFrame")]},MT=function(e){return typeof e!="string"?bT:e===""?Ds.cancelAnimationFrame:Ds["".concat(e,"CancelAnimationFrame")]||Ds["".concat(e,"CancelRequestAnimationFrame")]},AT=function(e,t){for(var r=0;e[r]!==void 0;){if(t(e[r]))return e[r];r+=1}},xy=AT(wT,function(n){return!!Ey(n)}),Xv=Ey(xy),by=MT(xy);Ds.requestAnimationFrame=Xv,Ds.cancelAnimationFrame=by;var TT=function(){function n(){(0,b.Z)(this,n),this.callbacks=[]}return(0,U.Z)(n,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(t,r){this.callbacks.push(r)}},{key:"promise",value:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return Promise.all(this.callbacks.map(function(a){return a.apply(void 0,r)}))}}])}(),ST=function(){function n(){(0,b.Z)(this,n),this.callbacks=[]}return(0,U.Z)(n,[{key:"tapPromise",value:function(t,r){this.callbacks.push(r)}},{key:"promise",value:function(){var e=(0,po.Z)((0,Xi.Z)().mark(function r(){var i,a,s,o,l=arguments;return(0,Xi.Z)().wrap(function(h){for(;;)switch(h.prev=h.next){case 0:if(!this.callbacks.length){h.next=14;break}return h.next=3,(i=this.callbacks)[0].apply(i,l);case 3:a=h.sent,s=0;case 5:if(!(s<this.callbacks.length-1)){h.next=13;break}return o=this.callbacks[s],h.next=9,o(a);case 9:a=h.sent;case 10:s++,h.next=5;break;case 13:return h.abrupt("return",a);case 14:return h.abrupt("return",null);case 15:case"end":return h.stop()}},r,this)}));function t(){return e.apply(this,arguments)}return t}()}])}(),ra=function(){function n(){(0,b.Z)(this,n),this.callbacks=[]}return(0,U.Z)(n,[{key:"tap",value:function(t,r){this.callbacks.push(r)}},{key:"call",value:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];var a=arguments;this.callbacks.forEach(function(s){s.apply(void 0,a)})}}])}(),Yv=function(){function n(){(0,b.Z)(this,n),this.callbacks=[]}return(0,U.Z)(n,[{key:"tap",value:function(t,r){this.callbacks.push(r)}},{key:"call",value:function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];if(this.callbacks.length){for(var a=arguments,s=this.callbacks[0].apply(void 0,a),o=0;o<this.callbacks.length-1;o++){var l=this.callbacks[o];s=l(s)}return s}return null}}])}(),PT=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],OT=/([\"\'])[^\'\"]+\1/;function CT(n){for(var e=n.fontSize,t=e===void 0?16:e,r=n.fontFamily,i=r===void 0?"sans-serif":r,a=n.fontStyle,s=a===void 0?"normal":a,o=n.fontVariant,l=o===void 0?"normal":o,u=n.fontWeight,h=u===void 0?"normal":u,v=sn(t)&&"".concat(t,"px")||"16px",E=i.split(","),D=E.length-1;D>=0;D--){var F=E[D].trim();!OT.test(F)&&PT.indexOf(F)<0&&(F='"'.concat(F,'"')),E[D]=F}return"".concat(s," ").concat(l," ").concat(h," ").concat(v," ").concat(E.join(","))}function Qv(n,e,t){return Qe(n),n[4]=Math.tan(e),n[1]=Math.tan(t),n}var oi=Ge(),DT=Ge(),LT={scale:function(e){Ft(oi,[e[0].value,e[1].value,1])},scaleX:function(e){Ft(oi,[e[0].value,1,1])},scaleY:function(e){Ft(oi,[1,e[0].value,1])},scaleZ:function(e){Ft(oi,[1,1,e[0].value])},scale3d:function(e){Ft(oi,[e[0].value,e[1].value,e[2].value])},translate:function(e){rn(oi,[e[0].value,e[1].value,0])},translateX:function(e){rn(oi,[e[0].value,0,0])},translateY:function(e){rn(oi,[0,e[0].value,0])},translateZ:function(e){rn(oi,[0,0,e[0].value])},translate3d:function(e){rn(oi,[e[0].value,e[1].value,e[2].value])},rotate:function(e){ln(oi,Ar(ya(e[0])))},rotateX:function(e){qt(oi,Ar(ya(e[0])))},rotateY:function(e){cn(oi,Ar(ya(e[0])))},rotateZ:function(e){ln(oi,Ar(ya(e[0])))},rotate3d:function(e){Yt(oi,Ar(ya(e[3])),[e[0].value,e[1].value,e[2].value])},skew:function(e){Qv(oi,Ar(e[0].value),Ar(e[1].value))},skewX:function(e){Qv(oi,Ar(e[0].value),0)},skewY:function(e){Qv(oi,0,Ar(e[0].value))},matrix:function(e){Le(oi,e[0].value,e[1].value,0,0,e[2].value,e[3].value,0,0,0,0,1,0,e[4].value,e[5].value,0,1)},matrix3d:function(e){Le.apply(X,[oi].concat((0,C.Z)(e.map(function(t){return t.value}))))}},RT=f(1,1,1),IT=S(),wy={translate:function(e,t){Wt.sceneGraphService.setLocalScale(e,RT,!1),Wt.sceneGraphService.setLocalEulerAngles(e,IT,void 0,void 0,!1),Wt.sceneGraphService.setLocalPosition(e,[t[0].value,t[1].value,0],!1),Wt.sceneGraphService.dirtifyLocal(e,e.transformable)}};function My(n,e){if(n.length){if(n.length===1&&wy[n[0].t]){wy[n[0].t](e,n[0].d);return}for(var t=Qe(DT),r=0;r<n.length;r++){var i=n[r],a=i.t,s=i.d,o=LT[a];o&&(o(s),vn(t,t,oi))}e.setLocalTransform(t)}else e.resetLocalTransform();return e.getLocalTransform()}var NT=function(){function n(){(0,b.Z)(this,n),this.parser=IA,this.mixer=HA}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a){return i instanceof Za?[]:i}},{key:"postProcessor",value:function(t){My(t.parsedStyle.transform,t)}}])}(),BT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"postProcessor",value:function(t){var r=t.parsedStyle.transformOrigin;r[0].unit===Jt.kPixels&&r[1].unit===Jt.kPixels?t.setOrigin(r[0].value,r[1].value):t.getGeometryBounds()}}])}(),kT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"calculator",value:function(t,r,i,a){return i.value}},{key:"postProcessor",value:function(t){if(t.parentNode){var r=t.parentNode,i=r.renderable,a=r.sortable;i&&(i.dirty=!0),a&&(a.dirty=!0,a.dirtyReason=eh.Z_INDEX_CHANGED)}}}])}(),FT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t,r){var i=t.cx,a=i===void 0?0:i,s=t.cy,o=s===void 0?0:s,l=t.r,u=l===void 0?0:l;return{cx:a,cy:o,hwidth:u,hheight:u}}}])}(),zT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t,r){var i=t.cx,a=i===void 0?0:i,s=t.cy,o=s===void 0?0:s,l=t.rx,u=l===void 0?0:l,h=t.ry,v=h===void 0?0:h;return{cx:a,cy:o,hwidth:u,hheight:v}}}])}(),UT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t){var r=t.x1,i=t.y1,a=t.x2,s=t.y2,o=Math.min(r,a),l=Math.max(r,a),u=Math.min(i,s),h=Math.max(i,s),v=l-o,E=h-u,D=v/2,F=E/2;return{cx:o+D,cy:u+F,hwidth:D,hheight:F}}}])}(),WT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t){var r=t.d,i=r.rect,a=i.x,s=i.y,o=i.width,l=i.height,u=o/2,h=l/2;return{cx:a+u,cy:s+h,hwidth:u,hheight:h}}}])}(),GT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t){if(t.points&&Sa(t.points.points)){var r=t.points.points,i=Math.min.apply(Math,(0,C.Z)(r.map(function(E){return E[0]}))),a=Math.max.apply(Math,(0,C.Z)(r.map(function(E){return E[0]}))),s=Math.min.apply(Math,(0,C.Z)(r.map(function(E){return E[1]}))),o=Math.max.apply(Math,(0,C.Z)(r.map(function(E){return E[1]}))),l=a-i,u=o-s,h=l/2,v=u/2;return{cx:i+h,cy:s+v,hwidth:h,hheight:v}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),HT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t,r){var i=t.x,a=i===void 0?0:i,s=t.y,o=s===void 0?0:s,l=t.src,u=t.width,h=u===void 0?0:u,v=t.height,E=v===void 0?0:v,D=h,F=E;return l&&!fr(l)&&(D||(D=l.width,t.width=D),F||(F=l.height,t.height=F)),{cx:a+D/2,cy:o+F/2,hwidth:D/2,hheight:F/2}}}])}(),jT=function(){function n(e){(0,b.Z)(this,n),this.globalRuntime=e}return(0,U.Z)(n,[{key:"isReadyToMeasure",value:function(t,r){var i=t.text;return i}},{key:"update",value:function(t,r){var i,a=t.text,s=t.textAlign,o=s===void 0?"start":s,l=t.lineWidth,u=l===void 0?1:l,h=t.textBaseline,v=h===void 0?"alphabetic":h,E=t.dx,D=E===void 0?0:E,F=t.dy,G=F===void 0?0:F,H=t.x,K=H===void 0?0:H,q=t.y,te=q===void 0?0:q;if(!this.isReadyToMeasure(t,r))return t.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 ue=(r==null||(i=r.ownerDocument)===null||i===void 0||(i=i.defaultView)===null||i===void 0?void 0:i.getConfig())||{},le=ue.offscreenCanvas,he=this.globalRuntime.textService.measureText(a,t,le);t.metrics=he;var ve=he.width,ge=he.height,Te=ve/2,Oe=ge/2,Ne=K+Te;o==="center"||o==="middle"?Ne+=u/2-Te:(o==="right"||o==="end")&&(Ne+=u-Te*2);var ze=te-Oe;return v==="middle"?ze+=Oe:v==="top"||v==="hanging"?ze+=Oe*2:v==="alphabetic"||(v==="bottom"||v==="ideographic")&&(ze+=0),D&&(Ne+=D),G&&(ze+=G),{cx:Ne,cy:ze,hwidth:Te,hheight:Oe}}}])}(),VT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t,r){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),ZT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"update",value:function(t,r){var i=t.x,a=i===void 0?0:i,s=t.y,o=s===void 0?0:s,l=t.width,u=l===void 0?0:l,h=t.height,v=h===void 0?0:h;return{cx:a+u/2,cy:o+v/2,hwidth:u/2,hheight:v/2}}}])}();function C6(n){return!!n.type}var dh=function(){function n(e){(0,b.Z)(this,n),this.eventPhase=n.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Bi,this.page=new Bi,this.canvas=new Bi,this.viewport=new Bi,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}return(0,U.Z)(n,[{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(Mr)}}])}(),Ay=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.client=new Bi,t.movement=new Bi,t.offset=new Bi,t.global=new Bi,t.screen=new Bi,t}return(0,y.Z)(e,n),(0,U.Z)(e,[{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(r){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(r)}},{key:"initMouseEvent",value:function(){throw new Error(Mr)}}])}(dh),vh=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.width=0,t.height=0,t.isPrimary=!1,t}return(0,y.Z)(e,n),(0,U.Z)(e,[{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)}}])}(Ay),Jv=function(n){function e(){return(0,b.Z)(this,e),(0,w.Z)(this,e,arguments)}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(Ay),pi=function(n){function e(t,r){var i;return(0,b.Z)(this,e),i=(0,w.Z)(this,e,[null]),i.type=t,i.detail=r,Object.assign(i,r),i}return(0,y.Z)(e,n),(0,U.Z)(e)}(dh),Ty=new WeakMap,Sy=function(){function n(){(0,b.Z)(this,n),this.emitter=new p}return(0,U.Z)(n,[{key:"on",value:function(t,r,i){return this.addEventListener(t,r,i),this}},{key:"addEventListener",value:function(t,r,i){var a=!1,s=!1;if(Ru(i))a=i;else if(i){var o=i.capture;a=o===void 0?!1:o;var l=i.once;s=l===void 0?!1:l}a&&(t+="capture"),r=fn(r)?r:r.handleEvent;var u=fn(r)?void 0:r;return s?this.emitter.once(t,r,u):this.emitter.on(t,r,u),this}},{key:"off",value:function(t,r,i){return t?this.removeEventListener(t,r,i):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var t;(t=this.emitter)===null||t===void 0||t.removeAllListeners()}},{key:"removeEventListener",value:function(t,r,i){var a;if(!this.emitter)return this;var s=Ru(i)?i:i==null?void 0:i.capture;s&&(t+="capture"),r=fn(r)?r:(a=r)===null||a===void 0?void 0:a.handleEvent;var o=fn(r)?void 0:r;return this.emitter.off(t,r,o),this}},{key:"emit",value:function(t,r){this.dispatchEvent(new pi(t,r))}},{key:"dispatchEvent",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=Ty.get(this);if(!i){var a;this.document?i=this:this.defaultView?i=this.defaultView:i=(a=this.ownerDocument)===null||a===void 0?void 0:a.defaultView,i&&Ty.set(this,i)}if(i){if(t.manager=i.getEventService(),!t.manager)return!1;t.defaultPrevented=!1,t.path?t.path.length=0:t.page=[],r||(t.target=this),t.manager.dispatchEvent(t,t.type,r)}else this.emitter.emit(t.type,t);return!t.defaultPrevented}}])}(),Kr=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.shadow=!1,t.ownerDocument=null,t.isConnected=!1,t.baseURI="",t.childNodes=[],t.nodeType=0,t.nodeName="",t.nodeValue=null,t.parentNode=null,t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"textContent",get:function(){var r="";this.nodeName===Pt.TEXT&&(r+=this.style.text);var i=(0,Yo.Z)(this.childNodes),a;try{for(i.s();!(a=i.n()).done;){var s=a.value;s.nodeName===Pt.TEXT?r+=s.nodeValue:r+=s.textContent}}catch(o){i.e(o)}finally{i.f()}return r},set:function(r){var i=this;this.childNodes.slice().forEach(function(a){i.removeChild(a)}),this.nodeName===Pt.TEXT&&(this.style.text="".concat(r))}},{key:"getRootNode",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(r):r.composed&&this.host?this.host.getRootNode(r):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(r){throw new Error(Mr)}},{key:"lookupNamespaceURI",value:function(r){throw new Error(Mr)}},{key:"lookupPrefix",value:function(r){throw new Error(Mr)}},{key:"normalize",value:function(){throw new Error(Mr)}},{key:"isEqualNode",value:function(r){return this===r}},{key:"isSameNode",value:function(r){return this.isEqualNode(r)}},{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(r){if(r===this)return 0;for(var i=r,a=this,s=[i],o=[a];(l=i.parentNode)!==null&&l!==void 0?l:a.parentNode;){var l;i=i.parentNode?(s.push(i.parentNode),i.parentNode):i,a=a.parentNode?(o.push(a.parentNode),a.parentNode):a}if(i!==a)return e.DOCUMENT_POSITION_DISCONNECTED|e.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|e.DOCUMENT_POSITION_PRECEDING;var u=s.length>o.length?s:o,h=u===s?o:s;if(u[u.length-h.length]===h[0])return u===s?e.DOCUMENT_POSITION_CONTAINED_BY|e.DOCUMENT_POSITION_FOLLOWING:e.DOCUMENT_POSITION_CONTAINS|e.DOCUMENT_POSITION_PRECEDING;for(var v=u.length-h.length,E=h.length-1;E>=0;E--){var D=h[E],F=u[v+E];if(F!==D){var G=D.parentNode.childNodes;return G.indexOf(D)<G.indexOf(F)?h===s?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING:u===s?e.DOCUMENT_POSITION_PRECEDING:e.DOCUMENT_POSITION_FOLLOWING}}return e.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(r){return this.contains(r)}},{key:"contains",value:function(r){for(var i=r;i&&this!==i;)i=i.parentNode;return!!i}},{key:"getAncestor",value:function(r){for(var i=this;r>0&&i;)i=i.parentNode,r--;return i}},{key:"forEach",value:function(r){for(var i=[this];i.length>0;){var a=i.pop(),s=r(a);if(s===!1)break;for(var o=a.childNodes.length-1;o>=0;o--)i.push(a.childNodes[o])}}}],[{key:"isNode",value:function(r){return!!r.childNodes}}])}(Sy);Kr.DOCUMENT_POSITION_DISCONNECTED=1,Kr.DOCUMENT_POSITION_PRECEDING=2,Kr.DOCUMENT_POSITION_FOLLOWING=4,Kr.DOCUMENT_POSITION_CONTAINS=8,Kr.DOCUMENT_POSITION_CONTAINED_BY=16,Kr.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var KT=2048,XT=function(){function n(e,t){var r=this;(0,b.Z)(this,n),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=Ge(),this.tmpVec3=S(),this.onPointerDown=function(i){var a=r.createPointerEvent(i);if(r.dispatchEvent(a,"pointerdown"),a.pointerType==="touch")r.dispatchEvent(a,"touchstart");else if(a.pointerType==="mouse"||a.pointerType==="pen"){var s=a.button===2;r.dispatchEvent(a,s?"rightdown":"mousedown")}var o=r.trackingData(i.pointerId);o.pressTargetsByButton[i.button]=a.composedPath(),r.freeEvent(a)},this.onPointerUp=function(i){var a=Kv.now(),s=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);if(r.dispatchEvent(s,"pointerup"),s.pointerType==="touch")r.dispatchEvent(s,"touchend");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var o=s.button===2;r.dispatchEvent(s,o?"rightup":"mouseup")}var l=r.trackingData(i.pointerId),u=r.findMountedTarget(l.pressTargetsByButton[i.button]),h=u;if(u&&!s.composedPath().includes(u)){for(var v=u;v&&!s.composedPath().includes(v);){if(s.currentTarget=v,r.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch")r.notifyTarget(s,"touchendoutside");else if(s.pointerType==="mouse"||s.pointerType==="pen"){var E=s.button===2;r.notifyTarget(s,E?"rightupoutside":"mouseupoutside")}Kr.isNode(v)&&(v=v.parentNode)}delete l.pressTargetsByButton[i.button],h=v}if(h){var D,F=r.clonePointerEvent(s,"click");F.target=h,F.path=[],l.clicksByButton[i.button]||(l.clicksByButton[i.button]={clickCount:0,target:F.target,timeStamp:a});var G=r.context.renderingContext.root.ownerDocument.defaultView,H=l.clicksByButton[i.button];H.target===F.target&&a-H.timeStamp<G.getConfig().dblClickSpeed?++H.clickCount:H.clickCount=1,H.target=F.target,H.timeStamp=a,F.detail=H.clickCount,(D=s.detail)!==null&&D!==void 0&&D.preventClick||(!r.context.config.useNativeClickEvent&&(F.pointerType==="mouse"||F.pointerType==="touch")&&r.dispatchEvent(F,"click"),r.dispatchEvent(F,"pointertap")),r.freeEvent(F)}r.freeEvent(s)},this.onPointerMove=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0),s=a.pointerType==="mouse"||a.pointerType==="pen",o=r.trackingData(i.pointerId),l=r.findMountedTarget(o.overTargets);if(o.overTargets&&l!==a.target){var u=i.type==="mousemove"?"mouseout":"pointerout",h=r.createPointerEvent(i,u,l||void 0);if(r.dispatchEvent(h,"pointerout"),s&&r.dispatchEvent(h,"mouseout"),!a.composedPath().includes(l)){var v=r.createPointerEvent(i,"pointerleave",l||void 0);for(v.eventPhase=v.AT_TARGET;v.target&&!a.composedPath().includes(v.target);)v.currentTarget=v.target,r.notifyTarget(v),s&&r.notifyTarget(v,"mouseleave"),Kr.isNode(v.target)&&(v.target=v.target.parentNode);r.freeEvent(v)}r.freeEvent(h)}if(l!==a.target){var E=i.type==="mousemove"?"mouseover":"pointerover",D=r.clonePointerEvent(a,E);r.dispatchEvent(D,"pointerover"),s&&r.dispatchEvent(D,"mouseover");for(var F=l&&Kr.isNode(l)&&l.parentNode;F&&F!==(Kr.isNode(r.rootTarget)&&r.rootTarget.parentNode)&&F!==a.target;)F=F.parentNode;var G=!F||F===(Kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);if(G){var H=r.clonePointerEvent(a,"pointerenter");for(H.eventPhase=H.AT_TARGET;H.target&&H.target!==l&&H.target!==(Kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)H.currentTarget=H.target,r.notifyTarget(H),s&&r.notifyTarget(H,"mouseenter"),Kr.isNode(H.target)&&(H.target=H.target.parentNode);r.freeEvent(H)}r.freeEvent(D)}r.dispatchEvent(a,"pointermove"),a.pointerType==="touch"&&r.dispatchEvent(a,"touchmove"),s&&(r.dispatchEvent(a,"mousemove"),r.cursor=r.getCursor(a.target)),o.overTargets=a.composedPath(),r.freeEvent(a)},this.onPointerOut=function(i){var a=r.trackingData(i.pointerId);if(a.overTargets){var s=i.pointerType==="mouse"||i.pointerType==="pen",o=r.findMountedTarget(a.overTargets),l=r.createPointerEvent(i,"pointerout",o||void 0);r.dispatchEvent(l),s&&r.dispatchEvent(l,"mouseout");var u=r.createPointerEvent(i,"pointerleave",o||void 0);for(u.eventPhase=u.AT_TARGET;u.target&&u.target!==(Kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)u.currentTarget=u.target,r.notifyTarget(u),s&&r.notifyTarget(u,"mouseleave"),Kr.isNode(u.target)&&(u.target=u.target.parentNode);a.overTargets=null,r.freeEvent(l),r.freeEvent(u)}r.cursor=null},this.onPointerOver=function(i){var a=r.trackingData(i.pointerId),s=r.createPointerEvent(i),o=s.pointerType==="mouse"||s.pointerType==="pen";r.dispatchEvent(s,"pointerover"),o&&r.dispatchEvent(s,"mouseover"),s.pointerType==="mouse"&&(r.cursor=r.getCursor(s.target));var l=r.clonePointerEvent(s,"pointerenter");for(l.eventPhase=l.AT_TARGET;l.target&&l.target!==(Kr.isNode(r.rootTarget)&&r.rootTarget.parentNode);)l.currentTarget=l.target,r.notifyTarget(l),o&&r.notifyTarget(l,"mouseenter"),Kr.isNode(l.target)&&(l.target=l.target.parentNode);a.overTargets=s.composedPath(),r.freeEvent(s),r.freeEvent(l)},this.onPointerUpOutside=function(i){var a=r.trackingData(i.pointerId),s=r.findMountedTarget(a.pressTargetsByButton[i.button]),o=r.createPointerEvent(i);if(s){for(var l=s;l;)o.currentTarget=l,r.notifyTarget(o,"pointerupoutside"),o.pointerType==="touch"||(o.pointerType==="mouse"||o.pointerType==="pen")&&r.notifyTarget(o,o.button===2?"rightupoutside":"mouseupoutside"),Kr.isNode(l)&&(l=l.parentNode);delete a.pressTargetsByButton[i.button]}r.freeEvent(o)},this.onWheel=function(i){var a=r.createWheelEvent(i);r.dispatchEvent(a),r.freeEvent(a)},this.onClick=function(i){if(r.context.config.useNativeClickEvent){var a=r.createPointerEvent(i);r.dispatchEvent(a),r.freeEvent(a)}},this.onPointerCancel=function(i){var a=r.createPointerEvent(i,void 0,void 0,r.context.config.alwaysTriggerPointerEventOnCanvas?r.rootTarget:void 0);r.dispatchEvent(a),r.freeEvent(a)},this.globalRuntime=e,this.context=t}return(0,U.Z)(n,[{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 t=this.context.contextService.getBoundingClientRect(),r=1,i=1,a=this.context.contextService.getDomElement();if(a&&t){var s=a.offsetWidth,o=a.offsetHeight;s&&o&&(r=t.width/s,i=t.height/o)}return{scaleX:r,scaleY:i,bbox:t}}},{key:"client2Viewport",value:function(t){var r=this.getScale(),i=r.scaleX,a=r.scaleY,s=r.bbox;return new Bi((t.x-((s==null?void 0:s.left)||0))/i,(t.y-((s==null?void 0:s.top)||0))/a)}},{key:"viewport2Client",value:function(t){var r=this.getScale(),i=r.scaleX,a=r.scaleY,s=r.bbox;return new Bi((t.x+((s==null?void 0:s.left)||0))*i,(t.y+((s==null?void 0:s.top)||0))*a)}},{key:"viewport2Canvas",value:function(t){var r=t.x,i=t.y,a=this.rootTarget.defaultView,s=a.getCamera(),o=this.context.config,l=o.width,u=o.height,h=s.getPerspectiveInverse(),v=s.getWorldTransform(),E=_t(this.tmpMatrix,v,h),D=N(this.tmpVec3,r/l*2-1,(1-i/u)*2-1,0);return et(D,D,E),new Bi(D[0],D[1])}},{key:"canvas2Viewport",value:function(t){var r=this.rootTarget.defaultView,i=r.getCamera(),a=i.getPerspective(),s=i.getViewTransform(),o=_t(this.tmpMatrix,a,s),l=N(this.tmpVec3,t.x,t.y,0);et(this.tmpVec3,this.tmpVec3,o);var u=this.context.config,h=u.width,v=u.height;return new Bi((l[0]+1)/2*h,(1-(l[1]+1)/2)*v)}},{key:"setPickHandler",value:function(t){this.pickHandler=t}},{key:"addEventMapping",value:function(t,r){this.mappingTable[t]||(this.mappingTable[t]=[]),this.mappingTable[t].push({fn:r,priority:0}),this.mappingTable[t].sort(function(i,a){return i.priority-a.priority})}},{key:"mapEvent",value:function(t){if(this.rootTarget){var r=this.mappingTable[t.type];if(r)for(var i=0,a=r.length;i<a;i++)r[i].fn(t);else console.warn("[EventService]: Event mapping not defined for ".concat(t.type))}}},{key:"dispatchEvent",value:function(t,r,i){if(!i)t.propagationStopped=!1,t.propagationImmediatelyStopped=!1,this.propagate(t,r);else{t.eventPhase=t.AT_TARGET;var a=this.rootTarget.defaultView||null;t.currentTarget=a,this.notifyListeners(t,r)}}},{key:"propagate",value:function(t,r){if(t.target){var i=t.composedPath();t.eventPhase=t.CAPTURING_PHASE;for(var a=i.length-1;a>=1;a--)if(t.currentTarget=i[a],this.notifyTarget(t,r),t.propagationStopped||t.propagationImmediatelyStopped)return;if(t.eventPhase=t.AT_TARGET,t.currentTarget=t.target,this.notifyTarget(t,r),!(t.propagationStopped||t.propagationImmediatelyStopped)){var s=i.indexOf(t.currentTarget);t.eventPhase=t.BUBBLING_PHASE;for(var o=s+1;o<i.length;o++)if(t.currentTarget=i[o],this.notifyTarget(t,r),t.propagationStopped||t.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(t){var r=[t],i=this.rootTarget.defaultView||null;if(i&&i===t)return r.unshift(i.document),r;for(var a=0;a<KT&&t!==this.rootTarget;a++)Kr.isNode(t)&&t.parentNode&&(r.push(t.parentNode),t=t.parentNode);return i&&r.push(i),r}},{key:"hitTest",value:function(t){var r=t.viewportX,i=t.viewportY,a=this.context.config,s=a.width,o=a.height,l=a.disableHitTesting;return r<0||i<0||r>s||i>o?null:!l&&this.pickHandler(t)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(t,r){var i,a=r==null?void 0:r.target;if((i=a)!==null&&i!==void 0&&i.shadowRoot&&(a=r.composedPath()[0]),a){if(a===t)return!0;if(t&&t.contains)return t.contains(a)}return r!=null&&r.composedPath?r.composedPath().indexOf(t)>-1:!1}},{key:"getExistedHTML",value:function(t){if(t.nativeEvent.composedPath)for(var r=0,i=t.nativeEvent.composedPath();r<i.length;r++){var a=i[r],s=this.nativeHTMLMap.get(a);if(s)return s}return null}},{key:"pickTarget",value:function(t){return this.hitTest({clientX:t.clientX,clientY:t.clientY,viewportX:t.viewportX,viewportY:t.viewportY,x:t.canvasX,y:t.canvasY})}},{key:"createPointerEvent",value:function(t,r,i,a){var s=this.allocateEvent(vh);this.copyPointerData(t,s),this.copyMouseData(t,s),this.copyData(t,s),s.nativeEvent=t.nativeEvent,s.originalEvent=t;var o=this.getExistedHTML(s),l=this.context.contextService.getDomElement();return s.target=i!=null?i:o||this.isNativeEventFromCanvas(l,s.nativeEvent)&&this.pickTarget(s)||a,typeof r=="string"&&(s.type=r),s}},{key:"createWheelEvent",value:function(t){var r=this.allocateEvent(Jv);this.copyWheelData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.nativeEvent=t.nativeEvent,r.originalEvent=t;var i=this.getExistedHTML(r),a=this.context.contextService.getDomElement();return r.target=i||this.isNativeEventFromCanvas(a,r.nativeEvent)&&this.pickTarget(r),r}},{key:"trackingData",value:function(t){return this.mappingState.trackingData[t]||(this.mappingState.trackingData[t]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[t]}},{key:"cloneWheelEvent",value:function(t){var r=this.allocateEvent(Jv);return r.nativeEvent=t.nativeEvent,r.originalEvent=t.originalEvent,this.copyWheelData(t,r),this.copyMouseData(t,r),this.copyData(t,r),r.target=t.target,r.path=t.composedPath().slice(),r.type=t.type,r}},{key:"clonePointerEvent",value:function(t,r){var i=this.allocateEvent(vh);return i.nativeEvent=t.nativeEvent,i.originalEvent=t.originalEvent,this.copyPointerData(t,i),this.copyMouseData(t,i),this.copyData(t,i),i.target=t.target,i.path=t.composedPath().slice(),i.type=r!=null?r:i.type,i}},{key:"copyPointerData",value:function(t,r){r.pointerId=t.pointerId,r.width=t.width,r.height=t.height,r.isPrimary=t.isPrimary,r.pointerType=t.pointerType,r.pressure=t.pressure,r.tangentialPressure=t.tangentialPressure,r.tiltX=t.tiltX,r.tiltY=t.tiltY,r.twist=t.twist}},{key:"copyMouseData",value:function(t,r){r.altKey=t.altKey,r.button=t.button,r.buttons=t.buttons,r.ctrlKey=t.ctrlKey,r.metaKey=t.metaKey,r.shiftKey=t.shiftKey,r.client.copyFrom(t.client),r.movement.copyFrom(t.movement),r.canvas.copyFrom(t.canvas),r.screen.copyFrom(t.screen),r.global.copyFrom(t.global),r.offset.copyFrom(t.offset)}},{key:"copyWheelData",value:function(t,r){r.deltaMode=t.deltaMode,r.deltaX=t.deltaX,r.deltaY=t.deltaY,r.deltaZ=t.deltaZ}},{key:"copyData",value:function(t,r){r.isTrusted=t.isTrusted,r.timeStamp=Kv.now(),r.type=t.type,r.detail=t.detail,r.view=t.view,r.page.copyFrom(t.page),r.viewport.copyFrom(t.viewport)}},{key:"allocateEvent",value:function(t){this.eventPool.has(t)||this.eventPool.set(t,[]);var r=this.eventPool.get(t).pop()||new t(this);return r.eventPhase=r.NONE,r.currentTarget=null,r.path=[],r.target=null,r}},{key:"freeEvent",value:function(t){if(t.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var r=t.constructor;this.eventPool.has(r)||this.eventPool.set(r,[]),this.eventPool.get(r).push(t)}},{key:"notifyTarget",value:function(t,r){r=r!=null?r:t.type;var i=t.eventPhase===t.CAPTURING_PHASE||t.eventPhase===t.AT_TARGET?"".concat(r,"capture"):r;this.notifyListeners(t,i),t.eventPhase===t.AT_TARGET&&this.notifyListeners(t,r)}},{key:"notifyListeners",value:function(t,r){var i=t.currentTarget.emitter,a=i._events[r];if(a)if("fn"in a)a.once&&i.removeListener(r,a.fn,void 0,!0),a.fn.call(t.currentTarget||a.context,t);else for(var s=0;s<a.length&&!t.propagationImmediatelyStopped;s++)a[s].once&&i.removeListener(r,a[s].fn,void 0,!0),a[s].fn.call(t.currentTarget||a[s].context,t)}},{key:"findMountedTarget",value:function(t){if(!t)return null;for(var r=t[t.length-1],i=t.length-2;i>=0;i--){var a=t[i];if(a===this.rootTarget||Kr.isNode(a)&&a.parentNode===r)r=t[i];else break}return r}},{key:"getCursor",value:function(t){for(var r=t;r;){var i=cT(r)&&r.getAttribute("cursor");if(i)return i;r=Kr.isNode(r)&&r.parentNode}}}])}(),qv=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"getOrCreateCanvas",value:function(t,r){if(this.canvas)return this.canvas;if(t||Wt.offscreenCanvas)this.canvas=t||Wt.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,V.Z)({willReadFrequently:!0},r));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,V.Z)({willReadFrequently:!0},r)),(!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,V.Z)({willReadFrequently:!0},r))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(t,r){return this.context?this.context:(this.getOrCreateCanvas(t,r),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(t){}try{return document.createElement("canvas")}catch(t){}return null}}])}(),Kl=function(n){return n[n.CAMERA_CHANGED=0]="CAMERA_CHANGED",n[n.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",n[n.NONE=2]="NONE",n}({}),YT=function(){function n(e,t){(0,b.Z)(this,n),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ra,initAsync:new TT,dirtycheck:new Yv,cull:new Yv,beginFrame:new ra,beforeRender:new ra,render:new ra,afterRender:new ra,endFrame:new ra,destroy:new ra,pick:new ST,pickSync:new Yv,pointerDown:new ra,pointerUp:new ra,pointerMove:new ra,pointerOut:new ra,pointerOver:new ra,pointerWheel:new ra,pointerCancel:new ra,click:new ra},this.globalRuntime=e,this.context=t}return(0,U.Z)(n,[{key:"init",value:function(t){var r=this,i=(0,V.Z)((0,V.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(a){a.apply(i,r.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,t()):this.hooks.initAsync.promise().then(function(){r.inited=!0,t()}).catch(function(a){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var t=this.context.config.renderer,r=t.getConfig(),i=r.enableDirtyRectangleRendering;return!i||this.context.renderingContext.renderReasons.has(Kl.CAMERA_CHANGED)}},{key:"render",value:function(t,r,i){var a=this;this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0;var s=this.context.renderingContext;if(this.globalRuntime.sceneGraphService.syncHierarchy(s.root),this.globalRuntime.sceneGraphService.triggerPendingEvents(),s.renderReasons.size&&this.inited){s.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var o=s.renderReasons.size===1&&s.renderReasons.has(Kl.CAMERA_CHANGED),l=!t.disableRenderHooks||!(t.disableRenderHooks&&o);l&&this.renderDisplayObject(s.root,t,s),this.hooks.beginFrame.call(r),l&&s.renderListCurrentFrame.forEach(function(u){a.hooks.beforeRender.call(u),a.hooks.render.call(u),a.hooks.afterRender.call(u)}),this.hooks.endFrame.call(r),s.renderListCurrentFrame=[],s.renderReasons.clear(),i()}}},{key:"renderDisplayObject",value:function(t,r,i){var a=this,s=r.renderer.getConfig(),o=s.enableDirtyCheck,l=s.enableCulling;function u(G){var H=G.renderable,K=G.sortable,q=o?H.dirty||i.dirtyRectangleRenderingDisabled?G:null:G;if(q){var te=l?a.hooks.cull.call(q,a.context.camera):q;te&&(a.stats.rendered+=1,i.renderListCurrentFrame.push(te))}H.dirty=!1,K.renderOrder=a.zIndexCounter,a.zIndexCounter+=1,a.stats.total+=1,K.dirty&&(a.sort(G,K),K.dirty=!1,K.dirtyChildren=[],K.dirtyReason=void 0)}for(var h=[t];h.length>0;){var v,E=h.pop();u(E);for(var D=((v=E.sortable)===null||v===void 0||(v=v.sorted)===null||v===void 0?void 0:v.length)>0?E.sortable.sorted:E.childNodes,F=D.length-1;F>=0;F--)h.push(D[F])}}},{key:"sort",value:function(t,r){var i,a;(r==null||(i=r.sorted)===null||i===void 0?void 0:i.length)>0&&r.dirtyReason!==eh.Z_INDEX_CHANGED?r.dirtyChildren.forEach(function(s){var o=r.sorted.indexOf(s);o>-1&&r.sorted.splice(o,1);var l=t.childNodes.indexOf(s);if(l>-1)if(r.sorted.length===0)r.sorted.push(s);else{var u=hT(r.sorted,s);r.sorted.splice(u,0,s)}}):r.sorted=t.childNodes.slice().sort(gy),((a=r.sorted)===null||a===void 0?void 0:a.length)>0&&t.childNodes.filter(function(s){return s.parsedStyle.zIndex}).length===0&&(r.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call(),this.globalRuntime.sceneGraphService.clearPendingEvents()}},{key:"dirtify",value:function(){this.context.renderingContext.renderReasons.add(Kl.DISPLAY_OBJECT_CHANGED)}}])}(),QT=/\[\s*(.*)=(.*)\s*\]/,JT=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"selectOne",value:function(t,r){var i=this;if(t.startsWith("."))return r.find(function(l){return((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(t))>-1});if(t.startsWith("#"))return r.find(function(l){return l.id===i.getIdOrClassname(t)});if(t.startsWith("[")){var a=this.getAttribute(t),s=a.name,o=a.value;return s?r.find(function(l){return r!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):null}return r.find(function(l){return r!==l&&l.nodeName===t})}},{key:"selectAll",value:function(t,r){var i=this;if(t.startsWith("."))return r.findAll(function(l){return r!==l&&((l==null?void 0:l.classList)||[]).indexOf(i.getIdOrClassname(t))>-1});if(t.startsWith("#"))return r.findAll(function(l){return r!==l&&l.id===i.getIdOrClassname(t)});if(t.startsWith("[")){var a=this.getAttribute(t),s=a.name,o=a.value;return s?r.findAll(function(l){return r!==l&&(s==="name"?l.name===o:i.attributeToString(l,s)===o)}):[]}return r.findAll(function(l){return r!==l&&l.nodeName===t})}},{key:"is",value:function(t,r){if(t.startsWith("."))return r.className===this.getIdOrClassname(t);if(t.startsWith("#"))return r.id===this.getIdOrClassname(t);if(t.startsWith("[")){var i=this.getAttribute(t),a=i.name,s=i.value;return a==="name"?r.name===s:this.attributeToString(r,a)===s}return r.nodeName===t}},{key:"getIdOrClassname",value:function(t){return t.substring(1)}},{key:"getAttribute",value:function(t){var r=t.match(QT),i="",a="";return r&&r.length>2&&(i=r[1].replace(/"/g,""),a=r[2].replace(/"/g,"")),{name:i,value:a}}},{key:"attributeToString",value:function(t,r){if(!t.getAttribute)return"";var i=t.getAttribute(r);return xn(i)?"":i.toString?i.toString():""}}])}(),Xn=function(n){return n.ATTR_MODIFIED="DOMAttrModified",n.INSERTED="DOMNodeInserted",n.MOUNTED="DOMNodeInsertedIntoDocument",n.REMOVED="removed",n.UNMOUNTED="DOMNodeRemovedFromDocument",n.REPARENT="reparent",n.DESTROY="destroy",n.BOUNDS_CHANGED="bounds-changed",n.CULLED="culled",n}({}),Ls=function(n){function e(t,r,i,a,s,o,l,u){var h;return(0,b.Z)(this,e),h=(0,w.Z)(this,e,[null]),h.relatedNode=r,h.prevValue=i,h.newValue=a,h.attrName=s,h.attrChange=o,h.prevParsedValue=l,h.newParsedValue=u,h.type=t,h}return(0,y.Z)(e,n),(0,U.Z)(e)}(dh);Ls.ADDITION=2,Ls.MODIFICATION=1,Ls.REMOVAL=3;function Py(n){var e=n.renderable;e&&(e.renderBoundsDirty=!0,e.boundsDirty=!0)}var qT=new Ls(Xn.REPARENT,null,"","","",0,"",""),$T=jn(),gh=S(),eS=f(1,1,1),tS=Ge(),nS=jn(),_o=S(),Xl=Ge(),Eo=Fr(),rS=S(),iS=Fr(),aS=S(),Hu=S(),rl=S(),ph=Ge(),Oy=Fr(),Cy=Fr(),mh=Fr(),$v={affectChildren:!0},sS=function(){function n(e){(0,b.Z)(this,n),this.pendingEvents=new Map,this.boundsChangedEvent=new pi(Xn.BOUNDS_CHANGED),this.displayObjectDependencyMap=new WeakMap,this.runtime=e}return(0,U.Z)(n,[{key:"matches",value:function(t,r){return this.runtime.sceneGraphSelector.is(t,r)}},{key:"querySelector",value:function(t,r){return this.runtime.sceneGraphSelector.selectOne(t,r)}},{key:"querySelectorAll",value:function(t,r){return this.runtime.sceneGraphSelector.selectAll(t,r)}},{key:"attach",value:function(t,r,i){var a,s=!1;t.parentNode&&(s=t.parentNode!==r,this.detach(t));var o=t.nodeName===Pt.FRAGMENT,l=fh(r);t.parentNode=r;var u=o?t.childNodes:[t];sn(i)?u.forEach(function(D){r.childNodes.splice(i,0,D),D.parentNode=r}):u.forEach(function(D){r.childNodes.push(D),D.parentNode=r});var h=r,v=h.sortable;if((v!=null&&(a=v.sorted)!==null&&a!==void 0&&a.length||v.dirty||t.parsedStyle.zIndex)&&(v.dirtyChildren.indexOf(t)===-1&&v.dirtyChildren.push(t),v.dirty=!0,v.dirtyReason=eh.ADDED),!l){if(o)this.dirtifyFragment(t);else{var E=t.transformable;E&&this.dirtifyWorld(t,E)}s&&t.dispatchEvent(qT)}}},{key:"detach",value:function(t){var r,i;if(t.parentNode){var a=t.transformable,s=t.parentNode,o=s.sortable;(o!=null&&(r=o.sorted)!==null&&r!==void 0&&r.length||(i=t.style)!==null&&i!==void 0&&i.zIndex)&&(o.dirtyChildren.indexOf(t)===-1&&o.dirtyChildren.push(t),o.dirty=!0,o.dirtyReason=eh.REMOVED);var l=t.parentNode.childNodes.indexOf(t);l>-1&&t.parentNode.childNodes.splice(l,1),a&&this.dirtifyWorld(t,a),t.parentNode=null}}},{key:"getOrigin",value:function(t){return t.getGeometryBounds(),t.transformable.origin}},{key:"setOrigin",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=[r,i,a]);var s=t.transformable;if(!(r[0]===s.origin[0]&&r[1]===s.origin[1]&&r[2]===s.origin[2])){var o=s.origin;o[0]=r[0],o[1]=r[1],o[2]=r[2]||0,this.dirtifyLocal(t,s)}}},{key:"rotate",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=f(r,i,a));var s=t.transformable;if(t.parentNode===null||!t.parentNode.transformable)this.rotateLocal(t,r);else{var o=Eo;Nl(o,r[0],r[1],r[2]);var l=this.getRotation(t),u=this.getRotation(t.parentNode);Bl(mh,u),Vs(mh,mh),Qn(o,mh,o),Qn(s.localRotation,o,l),kl(s.localRotation,s.localRotation),this.dirtifyLocal(t,s)}}},{key:"rotateLocal",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=f(r,i,a));var s=t.transformable;Nl(Cy,r[0],r[1],r[2]),Gc(s.localRotation,s.localRotation,Cy),this.dirtifyLocal(t,s)}},{key:"setEulerAngles",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=f(r,i,a));var s=t.transformable;if(t.parentNode===null||!t.parentNode.transformable)this.setLocalEulerAngles(t,r);else{Nl(s.localRotation,r[0],r[1],r[2]);var o=this.getRotation(t.parentNode);Bl(Oy,Vs(Eo,o)),Gc(s.localRotation,s.localRotation,Oy),this.dirtifyLocal(t,s)}}},{key:"setLocalEulerAngles",value:function(t,r){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 r=="number"&&(r=f(r,i,a));var o=t.transformable;Nl(o.localRotation,r[0],r[1],r[2]),s&&this.dirtifyLocal(t,o)}},{key:"translateLocal",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=f(r,i,a));var s=t.transformable;We(r,gh)||(dt(r,r,s.localRotation),k(s.localPosition,s.localPosition,r),this.dirtifyLocal(t,s))}},{key:"setPosition",value:function(t,r){var i,a=t.transformable;if(rl[0]=r[0],rl[1]=r[1],rl[2]=(i=r[2])!==null&&i!==void 0?i:0,!We(this.getPosition(t),rl)){if(P(a.position,rl),t.parentNode===null||!t.parentNode.transformable)P(a.localPosition,rl);else{var s=t.parentNode.transformable;Ke(ph,s.worldTransform),bt(ph,ph),et(a.localPosition,rl,ph)}this.dirtifyLocal(t,a)}}},{key:"setLocalPosition",value:function(t,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=t.transformable;Hu[0]=r[0],Hu[1]=r[1],Hu[2]=(i=r[2])!==null&&i!==void 0?i:0,!We(s.localPosition,Hu)&&(P(s.localPosition,Hu),a&&this.dirtifyLocal(t,s))}},{key:"scaleLocal",value:function(t,r){var i,a=t.transformable;z(a.localScale,a.localScale,N(_o,r[0],r[1],(i=r[2])!==null&&i!==void 0?i:1)),this.dirtifyLocal(t,a)}},{key:"setLocalScale",value:function(t,r){var i,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=t.transformable;N(_o,r[0],r[1],(i=r[2])!==null&&i!==void 0?i:s.localScale[2]),!We(_o,s.localScale)&&(P(s.localScale,_o),a&&this.dirtifyLocal(t,s))}},{key:"translate",value:function(t,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof r=="number"&&(r=N(_o,r,i,a)),!We(r,gh)&&(k(_o,this.getPosition(t),r),this.setPosition(t,_o))}},{key:"setRotation",value:function(t,r,i,a,s){var o=t.transformable;if(typeof r=="number"&&(r=cv(r,i,a,s)),t.parentNode===null||!t.parentNode.transformable)this.setLocalRotation(t,r);else{var l=this.getRotation(t.parentNode);Bl(Eo,l),Vs(Eo,Eo),Qn(o.localRotation,Eo,r),kl(o.localRotation,o.localRotation),this.dirtifyLocal(t,o)}}},{key:"setLocalRotation",value:function(t,r,i,a,s){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof r=="number"&&(r=Wc(Eo,r,i,a,s));var l=t.transformable;Bl(l.localRotation,r),o&&this.dirtifyLocal(t,l)}},{key:"setLocalSkew",value:function(t,r,i){var a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof r=="number"&&(r=Ci(nS,r,i));var s=t.transformable;ai(s.localSkew,r),a&&this.dirtifyLocal(t,s)}},{key:"dirtifyLocal",value:function(t,r){fh(t)||r.localDirtyFlag||(r.localDirtyFlag=!0,r.dirtyFlag||this.dirtifyWorld(t,r))}},{key:"dirtifyWorld",value:function(t,r){r.dirtyFlag||this.unfreezeParentToRoot(t),this.dirtifyWorldInternal(t,r),this.dirtifyToRoot(t,!0)}},{key:"dirtifyFragment",value:function(t){var r=t.transformable;r&&(r.frozen=!1,r.dirtyFlag=!0,r.localDirtyFlag=!0);var i=t.renderable;i&&(i.renderBoundsDirty=!0,i.boundsDirty=!0,i.dirty=!0);for(var a=t.childNodes.length,s=0;s<a;s++)this.dirtifyFragment(t.childNodes[s]);t.nodeName===Pt.FRAGMENT&&this.pendingEvents.set(t,!1)}},{key:"triggerPendingEvents",value:function(){var t=this,r=new Set,i=function(s,o){!s.isConnected||r.has(s)||s.nodeName===Pt.FRAGMENT||(t.boundsChangedEvent.detail=o,t.boundsChangedEvent.target=s,s.isMutationObserved?s.dispatchEvent(t.boundsChangedEvent):s.ownerDocument.defaultView.dispatchEvent(t.boundsChangedEvent,!0),r.add(s))};this.pendingEvents.forEach(function(a,s){s.nodeName!==Pt.FRAGMENT&&($v.affectChildren=a,a?s.forEach(function(o){i(o,$v)}):i(s,$v))}),r.clear(),this.clearPendingEvents()}},{key:"clearPendingEvents",value:function(){this.pendingEvents.clear()}},{key:"dirtifyToRoot",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=t;for(i.renderable&&(i.renderable.dirty=!0);i;)Py(i),i=i.parentNode;r&&t.forEach(function(a){Py(a)}),this.informDependentDisplayObjects(t),this.pendingEvents.set(t,r)}},{key:"updateDisplayObjectDependency",value:function(t,r,i,a){if(r&&r!==i){var s=this.displayObjectDependencyMap.get(r);if(s&&s[t]){var o=s[t].indexOf(a);s[t].splice(o,1)}}if(i){var l=this.displayObjectDependencyMap.get(i);l||(this.displayObjectDependencyMap.set(i,{}),l=this.displayObjectDependencyMap.get(i)),l[t]||(l[t]=[]),l[t].push(a)}}},{key:"informDependentDisplayObjects",value:function(t){var r=this,i=this.displayObjectDependencyMap.get(t);i&&Object.keys(i).forEach(function(a){i[a].forEach(function(s){r.dirtifyToRoot(s,!0),s.dispatchEvent(new Ls(Xn.ATTR_MODIFIED,s,r,r,a,Ls.MODIFICATION,r,r)),s.isCustomElement&&s.isConnected&&s.attributeChangedCallback&&s.attributeChangedCallback(a,r,r)})})}},{key:"getPosition",value:function(t){var r=t.transformable;return Nn(r.position,this.getWorldTransform(t,r))}},{key:"getRotation",value:function(t){var r=t.transformable;return wn(r.rotation,this.getWorldTransform(t,r))}},{key:"getScale",value:function(t){var r=t.transformable;return hn(r.scaling,this.getWorldTransform(t,r))}},{key:"getWorldTransform",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.transformable;return!r.localDirtyFlag&&!r.dirtyFlag||(t.parentNode&&t.parentNode.transformable&&this.getWorldTransform(t.parentNode),this.sync(t,r)),r.worldTransform}},{key:"getLocalPosition",value:function(t){return t.transformable.localPosition}},{key:"getLocalRotation",value:function(t){return t.transformable.localRotation}},{key:"getLocalScale",value:function(t){return t.transformable.localScale}},{key:"getLocalSkew",value:function(t){return t.transformable.localSkew}},{key:"calcLocalTransform",value:function(t){var r=t.localSkew[0]!==0||t.localSkew[1]!==0;if(r){Wn(t.localTransform,t.localRotation,t.localPosition,f(1,1,1),t.origin),(t.localSkew[0]!==0||t.localSkew[1]!==0)&&(Qe(Xl),Xl[4]=Math.tan(t.localSkew[0]),Xl[1]=Math.tan(t.localSkew[1]),_t(t.localTransform,t.localTransform,Xl));var i=Wn(Xl,Wc(Eo,0,0,0,1),N(_o,1,1,1),t.localScale,t.origin);_t(t.localTransform,t.localTransform,i)}else{var a=t.localTransform,s=t.localPosition,o=t.localRotation,l=t.localScale,u=t.origin,h=s[0]!==0||s[1]!==0||s[2]!==0,v=o[3]!==1||o[0]!==0||o[1]!==0||o[2]!==0,E=l[0]!==1||l[1]!==1||l[2]!==1,D=u[0]!==0||u[1]!==0||u[2]!==0;!v&&!E&&!D?h?rn(a,s):Qe(a):Wn(a,o,s,l,u)}}},{key:"getLocalTransform",value:function(t){var r=t.transformable;return r.localDirtyFlag&&(this.calcLocalTransform(r),r.localDirtyFlag=!1),r.localTransform}},{key:"setLocalTransform",value:function(t,r){var i=Nn(rS,r),a=wn(iS,r),s=hn(aS,r);this.setLocalScale(t,s,!1),this.setLocalPosition(t,i,!1),this.setLocalRotation(t,a,void 0,void 0,void 0,!1),this.dirtifyLocal(t,t.transformable)}},{key:"resetLocalTransform",value:function(t){this.setLocalScale(t,eS,!1),this.setLocalPosition(t,gh,!1),this.setLocalEulerAngles(t,gh,void 0,void 0,!1),this.setLocalSkew(t,$T,void 0,!1),this.dirtifyLocal(t,t.transformable)}},{key:"getTransformedGeometryBounds",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=arguments.length>2?arguments[2]:void 0,a=this.getGeometryBounds(t,r);if(!Ir.isEmpty(a)){var s=i||new Ir;return s.setFromTransformedAABB(a,this.getWorldTransform(t)),s}return null}},{key:"getGeometryBounds",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i=t,a=i.geometry;a.dirty&&Wt.styleValueRegistry.updateGeometry(t);var s=r?a.renderBounds:a.contentBounds||null;return s||new Ir}},{key:"getBounds",value:function(t){var r=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=t,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,l=this.getTransformedGeometryBounds(t,i,o),u=t.childNodes;if(u.forEach(function(E){var D=r.getBounds(E,i);D&&(l?l.add(D):(l=o||new Ir,l.update(D.center,D.halfExtents)))}),l||(l=new Ir),i){var h=py(t);if(h){var v=h.parsedStyle.clipPath.getBounds(i);l?v&&(l=v.intersection(l)):l.update(v.center,v.halfExtents)}}return i?(s.renderBounds=l,s.renderBoundsDirty=!1):(s.bounds=l,s.boundsDirty=!1),l}},{key:"getLocalBounds",value:function(t){if(t.parentNode){var r=tS;t.parentNode.transformable&&(r=bt(Xl,this.getWorldTransform(t.parentNode)));var i=this.getBounds(t);if(!Ir.isEmpty(i)){var a=new Ir;return a.setFromTransformedAABB(i,r),a}}return this.getBounds(t)}},{key:"getBoundingClientRect",value:function(t){var r,i,a=this.getGeometryBounds(t);Ir.isEmpty(a)||(i=new Ir,i.setFromTransformedAABB(a,this.getWorldTransform(t)));var s=(r=t.ownerDocument)===null||r===void 0||(r=r.defaultView)===null||r===void 0?void 0:r.getContextService().getBoundingClientRect();if(i){var o=i.getMin(),l=(0,T.Z)(o,2),u=l[0],h=l[1],v=i.getMax(),E=(0,T.Z)(v,2),D=E[0],F=E[1];return new Wl(u+((s==null?void 0:s.left)||0),h+((s==null?void 0:s.top)||0),D-u,F-h)}return new Wl((s==null?void 0:s.left)||0,(s==null?void 0:s.top)||0,0,0)}},{key:"dirtifyWorldInternal",value:function(t,r){var i=this;if(!r.dirtyFlag){r.dirtyFlag=!0,r.frozen=!1,t.childNodes.forEach(function(o){var l=o.transformable;l.dirtyFlag||i.dirtifyWorldInternal(o,l)});var a=t,s=a.renderable;s&&(s.renderBoundsDirty=!0,s.boundsDirty=!0,s.dirty=!0)}}},{key:"syncHierarchy",value:function(t){var r=t.transformable;if(!r.frozen){r.frozen=!0,(r.localDirtyFlag||r.dirtyFlag)&&this.sync(t,r);for(var i=t.childNodes,a=0;a<i.length;a++)this.syncHierarchy(i[a])}}},{key:"sync",value:function(t,r){if(r.localDirtyFlag&&(this.calcLocalTransform(r),r.localDirtyFlag=!1),r.dirtyFlag){var i=t.parentNode,a=i&&i.transformable;i===null||!a?Ke(r.worldTransform,r.localTransform):_t(r.worldTransform,a.worldTransform,r.localTransform),r.dirtyFlag=!1}}},{key:"unfreezeParentToRoot",value:function(t){for(var r=t.parentNode;r;){var i=r.transformable;i&&(i.frozen=!1),r=r.parentNode}}}])}(),il={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]},Dy=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,oS=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,lS=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,uS=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,cS=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,hS=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,fS=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,dS=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,vS=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,gS=new RegExp("".concat(oS.source,"|").concat(uS.source,"|").concat(hS.source,"|").concat(dS.source)),pS=new RegExp("".concat(lS.source,"|").concat(cS.source,"|").concat(fS.source,"|").concat(vS.source)),mS=function(){function n(e){var t=this;(0,b.Z)(this,n),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(r,i){return t.isBreakingSpace(i)?!1:!!(r&&(pS.exec(i)||gS.exec(r)))},this.trimByKinsokuShorui=function(r){var i=(0,C.Z)(r),a=i[i.length-2];if(!a)return r;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=e}return(0,U.Z)(n,[{key:"measureFont",value:function(t,r){if(this.fontMetricsCache[t])return this.fontMetricsCache[t];var i={ascent:0,descent:0,fontSize:0},a=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(r),s=this.runtime.offscreenCanvasCreator.getOrCreateContext(r,{willReadFrequently:!0});s.font=t;var o=il.MetricsString+il.BaselineSymbol,l=Math.ceil(s.measureText(o).width),u=Math.ceil(s.measureText(il.BaselineSymbol).width),h=il.HeightMultiplier*u;u=u*il.BaselineMultiplier|0,a.width=l,a.height=h,s.fillStyle="#f00",s.fillRect(0,0,l,h),s.font=t,s.textBaseline="alphabetic",s.fillStyle="#000",s.fillText(o,0,u);var v=s.getImageData(0,0,l||1,h||1).data,E=v.length,D=l*4,F=0,G=0,H=!1;for(F=0;F<u;++F){for(var K=0;K<D;K+=4)if(v[G+K]!==255){H=!0;break}if(!H)G+=D;else break}for(i.ascent=u-F,G=E-D,H=!1,F=h;F>u;--F){for(var q=0;q<D;q+=4)if(v[G+q]!==255){H=!0;break}if(!H)G-=D;else break}return i.descent=F-u,i.fontSize=i.ascent+i.descent,this.fontMetricsCache[t]=i,i}},{key:"measureText",value:function(t,r,i){var a=r.fontSize,s=a===void 0?16:a,o=r.wordWrap,l=o===void 0?!1:o,u=r.lineHeight,h=r.lineWidth,v=h===void 0?1:h,E=r.textBaseline,D=E===void 0?"alphabetic":E,F=r.textAlign,G=F===void 0?"start":F,H=r.letterSpacing,K=H===void 0?0:H,q=r.textPath;r.textPathSide,r.textPathStartOffset;var te=r.leading,ue=te===void 0?0:te,le=CT(r),he=this.measureFont(le,i);he.fontSize===0&&(he.fontSize=s,he.ascent=s);var ve=this.runtime.offscreenCanvasCreator.getOrCreateContext(i);ve.font=le,r.isOverflowing=!1;var ge=l?this.wordWrap(t,r,i):t,Te=ge.split(/(?:\r\n|\r|\n)/),Oe=new Array(Te.length),Ne=0;if(q){q.getTotalLength();for(var ze=0;ze<Te.length;ze++)ve.measureText(Te[ze]).width+(Te[ze].length-1)*K}else{for(var Xe=0;Xe<Te.length;Xe++){var Je=ve.measureText(Te[Xe]).width+(Te[Xe].length-1)*K;Oe[Xe]=Je,Ne=Math.max(Ne,Je)}var st=Ne+v,Et=u||he.fontSize+v,mt=Math.max(Et,he.fontSize+v)+(Te.length-1)*(Et+ue);Et+=ue;var ct=0;return D==="middle"?ct=-mt/2:D==="bottom"||D==="alphabetic"||D==="ideographic"?ct=-mt:(D==="top"||D==="hanging")&&(ct=0),{font:le,width:st,height:mt,lines:Te,lineWidths:Oe,lineHeight:Et,maxLineWidth:Ne,fontProperties:he,lineMetrics:Oe.map(function(ht,At){var kt=0;return G==="center"||G==="middle"?kt-=ht/2:(G==="right"||G==="end")&&(kt-=ht),new Wl(kt-v/2,ct+At*Et,ht+v,Et)})}}}},{key:"wordWrap",value:function(t,r,i){var a=this,s=this,o=r.wordWrapWidth,l=o===void 0?0:o,u=r.letterSpacing,h=u===void 0?0:u,v=r.maxLines,E=v===void 0?1/0:v,D=r.textOverflow,F=this.runtime.offscreenCanvasCreator.getOrCreateContext(i),G=l+h,H="";D==="ellipsis"?H="...":D&&D!=="clip"&&(H=D);var K=Array.from(t),q=[],te=0,ue=0,le=0,he={},ve=function(ct){return a.getFromCache(ct,h,he,F)},ge=ve(H);function Te(mt,ct,ht,At){for(;ve(mt)<At&&ct<K.length-1&&!s.isNewline(K[ct+1]);)ct+=1,mt+=K[ct];for(;ve(mt)>At&&ct>ht;)ct-=1,mt=mt.slice(0,-1);return{lineTxt:mt,txtLastCharIndex:ct}}function Oe(mt,ct){if(!(ge<=0||ge>G)){if(!q[mt]){q[mt]=H;return}var ht=Te(q[mt],ct,le+1,G-ge);q[mt]=ht.lineTxt+H}}for(var Ne=0;Ne<K.length;Ne++){var ze=K[Ne],Xe=K[Ne-1],Je=K[Ne+1],st=ve(ze);if(this.isNewline(ze)){if(te+1>=E){r.isOverflowing=!0,Ne<K.length-1&&Oe(te,Ne-1);break}le=Ne-1,te+=1,ue=0,q[te]="";continue}if(ue>0&&ue+st>G){var Et=Te(q[te],Ne-1,le+1,G);if(Et.txtLastCharIndex!==Ne-1){if(q[te]=Et.lineTxt,Et.txtLastCharIndex===K.length-1)break;Ne=Et.txtLastCharIndex+1,ze=K[Ne],Xe=K[Ne-1],Je=K[Ne+1],st=ve(ze)}if(te+1>=E){r.isOverflowing=!0,Oe(te,Ne-1);break}if(le=Ne-1,te+=1,ue=0,q[te]="",this.isBreakingSpace(ze))continue;this.canBreakInLastChar(ze)||(q=this.trimToBreakable(q),ue=this.sumTextWidthByCache(q[te]||"",ve)),this.shouldBreakByKinsokuShorui(ze,Je)&&(q=this.trimByKinsokuShorui(q),ue+=ve(Xe||""))}ue+=st,q[te]=(q[te]||"")+ze}return q.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(t){return typeof t!="string"?!1:il.BreakingSpaces.indexOf(t.charCodeAt(0))>=0}},{key:"isNewline",value:function(t){return typeof t!="string"?!1:il.Newlines.indexOf(t.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(t){var r=(0,C.Z)(t),i=r[r.length-2],a=this.findBreakableIndex(i);if(a===-1||!i)return r;var s=i.slice(a,a+1),o=this.isBreakingSpace(s),l=a+1,u=a+(o?0:1);return r[r.length-1]+=i.slice(l,i.length),r[r.length-2]=i.slice(0,u),r}},{key:"canBreakInLastChar",value:function(t){return!(t&&Dy.test(t))}},{key:"sumTextWidthByCache",value:function(t,r){return t.split("").reduce(function(i,a){return i+r(a)},0)}},{key:"findBreakableIndex",value:function(t){for(var r=t.length-1;r>=0;r--)if(!Dy.test(t[r]))return r;return-1}},{key:"getFromCache",value:function(t,r,i,a){var s=i[t];if(typeof s!="number"){var o=t.length*r,l=a.measureText(t);s=l.width+o,i[t]=s}return s}}])}(),Wt={},yS=function(n){var e=new HT,t=new GT;return n={},(0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)(n,Pt.FRAGMENT,null),Pt.CIRCLE,new FT),Pt.ELLIPSE,new zT),Pt.RECT,e),Pt.IMAGE,e),Pt.GROUP,new VT),Pt.LINE,new UT),Pt.TEXT,new jT(Wt)),Pt.POLYLINE,t),Pt.POLYGON,t),(0,un.Z)((0,un.Z)((0,un.Z)(n,Pt.PATH,new WT),Pt.HTML,new ZT),Pt.MESH,null)}(),_S=function(n){var e=new QA,t=new jv;return n={},(0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)(n,Qt.PERCENTAGE,null),Qt.NUMBER,new tT),Qt.ANGLE,new XA),Qt.DEFINED_PATH,new YA),Qt.PAINT,e),Qt.COLOR,e),Qt.FILTER,new JA),Qt.LENGTH,t),Qt.LENGTH_PERCENTAGE,t),Qt.LENGTH_PERCENTAGE_12,new qA),(0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)(n,Qt.LENGTH_PERCENTAGE_14,new $A),Qt.COORDINATE,new jv),Qt.OFFSET_DISTANCE,new nT),Qt.OPACITY_VALUE,new rT),Qt.PATH,new iT),Qt.LIST_OF_POINTS,new aT),Qt.SHADOW_BLUR,new sT),Qt.TEXT,new oT),Qt.TEXT_TRANSFORM,new lT),Qt.TRANSFORM,new NT),(0,un.Z)((0,un.Z)((0,un.Z)(n,Qt.TRANSFORM_ORIGIN,new BT),Qt.Z_INDEX,new kT),Qt.MARKER,new eT)}(),ES=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof Y.g!="undefined"?Y.g:{}};Wt.CameraContribution=Cm,Wt.AnimationTimeline=null,Wt.EasingFunction=null,Wt.offscreenCanvasCreator=new qv,Wt.sceneGraphSelector=new JT,Wt.sceneGraphService=new sS(Wt),Wt.textService=new mS(Wt),Wt.geometryUpdaterFactory=yS,Wt.CSSPropertySyntaxFactory=_S,Wt.styleValueRegistry=new ZA(Wt),Wt.layoutRegistry=null,Wt.globalThis=ES(),Wt.enableStyleSyntax=!0,Wt.enableSizeAttenuation=!1;var Ly=0;function D6(){Ly=0}var eg=new Ls(Xn.INSERTED,null,"","","",0,"",""),tg=new Ls(Xn.REMOVED,null,"","","",0,"",""),Ry=new pi(Xn.DESTROY),xS=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.entity=Ly++,t.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},t.cullable={strategy:MM.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},t.transformable={dirtyFlag:!1,localDirtyFlag:!1,frozen:!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]},t.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},t.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},t.rBushNode={aabb:void 0},t.namespaceURI="g",t.scrollLeft=0,t.scrollTop=0,t.clientTop=0,t.clientLeft=0,t.destroyed=!1,t.style={},t.computedStyle={},t.parsedStyle={},t.attributes={},t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"className",get:function(){return this.getAttribute("class")||""},set:function(r){this.setAttribute("class",r)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(r){return r!==""})}},{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 r=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[r+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var r=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[r-1]||null}return null}},{key:"cloneNode",value:function(r){throw new Error(Mr)}},{key:"appendChild",value:function(r,i){var a;if(r.destroyed)throw new Error(fM);return Wt.sceneGraphService.attach(r,this,i),(a=this.ownerDocument)!==null&&a!==void 0&&a.defaultView&&(!fh(this)&&r.nodeName===Pt.FRAGMENT?this.ownerDocument.defaultView.mountFragment(r):this.ownerDocument.defaultView.mountChildren(r)),this.isMutationObserved&&(eg.relatedNode=this,r.dispatchEvent(eg)),r}},{key:"insertBefore",value:function(r,i){if(!i)this.appendChild(r);else{r.parentElement&&r.parentElement.removeChild(r);var a=this.childNodes.indexOf(i);a===-1?this.appendChild(r):this.appendChild(r,a)}return r}},{key:"replaceChild",value:function(r,i){var a=this.childNodes.indexOf(i);return this.removeChild(i),this.appendChild(r,a),i}},{key:"removeChild",value:function(r){var i;return tg.relatedNode=this,r.dispatchEvent(tg),(i=r.ownerDocument)!==null&&i!==void 0&&i.defaultView&&r.ownerDocument.defaultView.unmountChildren(r),Wt.sceneGraphService.detach(r),r}},{key:"removeChildren",value:function(){for(var r=this.childNodes.length-1;r>=0;r--){var i=this.childNodes[r];this.removeChild(i)}}},{key:"destroyChildren",value:function(){for(var r=this.childNodes.length-1;r>=0;r--){var i=this.childNodes[r];i.childNodes.length>0&&i.destroyChildren(),i.destroy()}}},{key:"matches",value:function(r){return Wt.sceneGraphService.matches(r,this)}},{key:"getElementById",value:function(r){return Wt.sceneGraphService.querySelector("#".concat(r),this)}},{key:"getElementsByName",value:function(r){return Wt.sceneGraphService.querySelectorAll('[name="'.concat(r,'"]'),this)}},{key:"getElementsByClassName",value:function(r){return Wt.sceneGraphService.querySelectorAll(".".concat(r),this)}},{key:"getElementsByTagName",value:function(r){return Wt.sceneGraphService.querySelectorAll(r,this)}},{key:"querySelector",value:function(r){return Wt.sceneGraphService.querySelector(r,this)}},{key:"querySelectorAll",value:function(r){return Wt.sceneGraphService.querySelectorAll(r,this)}},{key:"closest",value:function(r){var i=this;do{if(Wt.sceneGraphService.matches(r,i))return i;i=i.parentElement}while(i!==null);return null}},{key:"find",value:function(r){var i=this,a=null;return this.forEach(function(s){return s!==i&&r(s)?(a=s,!1):!0}),a}},{key:"findAll",value:function(r){var i=this,a=[];return this.forEach(function(s){s!==i&&r(s)&&a.push(s)}),a}},{key:"after",value:function(){var r=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(l,u){var h;return(h=r.parentNode)===null||h===void 0?void 0:h.appendChild(l,i+u+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var r,i=this.parentNode.childNodes.indexOf(this),a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];var l=s[0],u=s.slice(1);this.parentNode.appendChild(l,i),(r=l).after.apply(r,(0,C.Z)(u))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var r=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o){return r.appendChild(o)})}},{key:"prepend",value:function(){for(var r=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];a.forEach(function(o,l){return r.appendChild(o,l)})}},{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(){this.destroyChildren(),this.dispatchEvent(Ry),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){return Wt.sceneGraphService.getGeometryBounds(this)}},{key:"getRenderBounds",value:function(){return Wt.sceneGraphService.getBounds(this,!0)}},{key:"getBounds",value:function(){return Wt.sceneGraphService.getBounds(this)}},{key:"getLocalBounds",value:function(){return Wt.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return Wt.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(r){if(typeof r!="symbol"){var i=this.attributes[r];return i}}},{key:"hasAttribute",value:function(r){return this.getAttributeNames().includes(r)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(r){this.setAttribute(r,null),delete this.attributes[r]}},{key:"setAttribute",value:function(r,i,a,s){this.attributes[r]=i}},{key:"getAttributeNS",value:function(r,i){throw new Error(Mr)}},{key:"getAttributeNode",value:function(r){throw new Error(Mr)}},{key:"getAttributeNodeNS",value:function(r,i){throw new Error(Mr)}},{key:"hasAttributeNS",value:function(r,i){throw new Error(Mr)}},{key:"removeAttributeNS",value:function(r,i){throw new Error(Mr)}},{key:"removeAttributeNode",value:function(r){throw new Error(Mr)}},{key:"setAttributeNS",value:function(r,i,a){throw new Error(Mr)}},{key:"setAttributeNode",value:function(r){throw new Error(Mr)}},{key:"setAttributeNodeNS",value:function(r){throw new Error(Mr)}},{key:"toggleAttribute",value:function(r,i){throw new Error(Mr)}}])}(Kr);function dr(n){return!!(n!=null&&n.nodeName)}var bS=Wt.globalThis.Proxy?Wt.globalThis.Proxy:function(){},Rs=new Ls(Xn.ATTR_MODIFIED,null,null,null,null,Ls.MODIFICATION,null,null),ju=S(),wS=Fr(),Ur=function(n){function e(t){var r;return(0,b.Z)(this,e),r=(0,w.Z)(this,e),r.isCustomElement=!1,r.isMutationObserved=!1,r.activeAnimations=[],r.config=t,r.id=t.id||"",r.name=t.name||"",(t.className||t.class)&&(r.className=t.className||t.class),r.nodeName=t.type||Pt.GROUP,t.initialParsedStyle&&Object.assign(r.parsedStyle,t.initialParsedStyle),r.initAttributes(t.style),Wt.enableStyleSyntax&&(r.style=new bS({setProperty:function(a,s){r.setAttribute(a,s)},getPropertyValue:function(a){return r.getAttribute(a)},removeProperty:function(a){r.removeAttribute(a)},item:function(){return""}},{get:function(a,s){return a[s]!==void 0?a[s]:r.getAttribute(s)},set:function(a,s,o){return r.setAttribute(s,o),!0}})),r}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"destroy",value:function(){om(e,"destroy",this,3)([]),this.getAnimations().forEach(function(r){r.cancel()})}},{key:"cloneNode",value:function(r,i){var a=(0,V.Z)({},this.attributes);for(var s in a){var o=a[s];dr(o)&&s!=="clipPath"&&s!=="offsetPath"&&s!=="textPath"&&(a[s]=o.cloneNode(r)),i&&(a[s]=i(s,o))}var l=new this.constructor((0,V.Z)((0,V.Z)({},this.config),{},{style:a}));return l.setLocalTransform(this.getLocalTransform()),r&&this.children.forEach(function(u){if(!u.style.isMarker){var h=u.cloneNode(r);l.appendChild(h)}}),l}},{key:"initAttributes",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i={forceUpdateGeometry:!0};Wt.styleValueRegistry.processProperties(this,r,i),this.renderable.dirty=!0}},{key:"setAttribute",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;Bn(i)||(a||i!==this.attributes[r])&&(this.internalSetAttribute(r,i,{memoize:s}),om(e,"setAttribute",this,3)([r,i]))}},{key:"internalSetAttribute",value:function(r,i){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=this.renderable,o=this.attributes[r],l=this.parsedStyle[r];Wt.styleValueRegistry.processProperties(this,(0,un.Z)({},r,i),a),s.dirty=!0;var u=this.parsedStyle[r];if(this.isConnected&&(Rs.relatedNode=this,Rs.prevValue=o,Rs.newValue=i,Rs.attrName=r,Rs.prevParsedValue=l,Rs.newParsedValue=u,this.isMutationObserved?this.dispatchEvent(Rs):(Rs.target=this,this.ownerDocument.defaultView.dispatchEvent(Rs,!0))),this.isCustomElement&&this.isConnected||!this.isCustomElement){var h,v;(h=(v=this).attributeChangedCallback)===null||h===void 0||h.call(v,r,o,i,l,u)}}},{key:"getBBox",value:function(){var r=this.getBounds(),i=r.getMin(),a=(0,T.Z)(i,2),s=a[0],o=a[1],l=r.getMax(),u=(0,T.Z)(l,2),h=u[0],v=u[1];return new Wl(s,o,h-s,v-o)}},{key:"setOrigin",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Wt.sceneGraphService.setOrigin(this,na(r,i,a,!1)),this}},{key:"getOrigin",value:function(){return Wt.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Wt.sceneGraphService.setPosition(this,na(r,i,a,!1)),this}},{key:"setLocalPosition",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Wt.sceneGraphService.setLocalPosition(this,na(r,i,a,!1)),this}},{key:"translate",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Wt.sceneGraphService.translate(this,na(r,i,a,!1)),this}},{key:"translateLocal",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Wt.sceneGraphService.translateLocal(this,na(r,i,a,!1)),this}},{key:"getPosition",value:function(){return Wt.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Wt.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(r,i,a){return this.scaleLocal(r,i,a)}},{key:"scaleLocal",value:function(r,i,a){return typeof r=="number"&&(i=i||r,a=a||r,r=na(r,i,a,!1)),Wt.sceneGraphService.scaleLocal(this,r),this}},{key:"setLocalScale",value:function(r,i,a){return typeof r=="number"&&(i=i||r,a=a||r,r=na(r,i,a,!1)),Wt.sceneGraphService.setLocalScale(this,r),this}},{key:"getLocalScale",value:function(){return Wt.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Wt.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var r=Av(ju,Wt.sceneGraphService.getWorldTransform(this)),i=(0,T.Z)(r,3),a=i[2];return pa(a)}},{key:"getLocalEulerAngles",value:function(){var r=Av(ju,Wt.sceneGraphService.getLocalRotation(this)),i=(0,T.Z)(r,3),a=i[2];return pa(a)}},{key:"setEulerAngles",value:function(r){return Wt.sceneGraphService.setEulerAngles(this,0,0,r),this}},{key:"setLocalEulerAngles",value:function(r){return Wt.sceneGraphService.setLocalEulerAngles(this,0,0,r),this}},{key:"rotateLocal",value:function(r,i,a){return xn(i)&&xn(a)?Wt.sceneGraphService.rotateLocal(this,0,0,r):Wt.sceneGraphService.rotateLocal(this,r,i,a),this}},{key:"rotate",value:function(r,i,a){return xn(i)&&xn(a)?Wt.sceneGraphService.rotate(this,0,0,r):Wt.sceneGraphService.rotate(this,r,i,a),this}},{key:"setRotation",value:function(r,i,a,s){return Wt.sceneGraphService.setRotation(this,r,i,a,s),this}},{key:"setLocalRotation",value:function(r,i,a,s){return Wt.sceneGraphService.setLocalRotation(this,r,i,a,s),this}},{key:"setLocalSkew",value:function(r,i){return Wt.sceneGraphService.setLocalSkew(this,r,i),this}},{key:"getRotation",value:function(){return Wt.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Wt.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Wt.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Wt.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Wt.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(r){return Wt.sceneGraphService.setLocalTransform(this,r),this}},{key:"resetLocalTransform",value:function(){Wt.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(r,i){var a,s=(a=this.ownerDocument)===null||a===void 0?void 0:a.timeline;return s?s.play(this,r,i):null}},{key:"isVisible",value:function(){var r;return((r=this.parsedStyle)===null||r===void 0?void 0:r.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(r){this.style.pointerEvents=r?"auto":"none"}},{key:"isInteractive",value:function(){var r;return((r=this.parsedStyle)===null||r===void 0?void 0:r.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,C.Z)(this.parentNode.children.map(function(r){return Number(r.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,C.Z)(this.parentNode.children.map(function(r){return Number(r.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var r=this,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];var o=a[0],l=a[1];return o?si(o)?(Object.keys(o).forEach(function(u){r.setAttribute(u,o[u])}),this):a.length===2?(this.setAttribute(o,l),this):this.attributes[o]:this.attributes}},{key:"getMatrix",value:function(r){var i=r||this.getWorldTransform(),a=Nn(ju,i),s=(0,T.Z)(a,2),o=s[0],l=s[1],u=hn(ju,i),h=(0,T.Z)(u,2),v=h[0],E=h[1],D=wn(wS,i),F=Av(ju,D),G=(0,T.Z)(F,3),H=G[0],K=G[2];return _M(H||K,o,l,v,E)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(r){var i=Tm(r),a=(0,T.Z)(i,5),s=a[0],o=a[1],l=a[2],u=a[3],h=a[4];this.setEulerAngles(h).setPosition(s,o).setLocalScale(l,u)}},{key:"setLocalMatrix",value:function(r){var i=Tm(r),a=(0,T.Z)(i,5),s=a[0],o=a[1],l=a[2],u=a[3],h=a[4];this.setLocalEulerAngles(h).setLocalPosition(s,o).setLocalScale(l,u)}},{key:"show",value:function(){this.forEach(function(r){r.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(r){r.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(r){return this.children[r]||null}},{key:"add",value:function(r,i){return this.appendChild(r,i)}},{key:"set",value:function(r,i){this.config[r]=i}},{key:"get",value:function(r){return this.config[r]}},{key:"moveTo",value:function(r){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(r,i,a),this}},{key:"move",value:function(r){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(r,i,a),this}},{key:"setZIndex",value:function(r){return this.style.zIndex=r,this}}])}(xS);Ur.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 Zs=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.CIRCLE},t)])}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);Zs.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var MS=["style"],ng=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=(0,Qo.Z)(r,MS);return(0,b.Z)(this,e),t=(0,w.Z)(this,e,[(0,V.Z)({style:i},a)]),t.isCustomElement=!0,t}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);ng.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var Vu=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.ELLIPSE},t)])}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);Vu.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var AS=function(n){function e(){return(0,b.Z)(this,e),(0,w.Z)(this,e,[{type:Pt.FRAGMENT}])}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);AS.PARSED_STYLE_LIST=new Set(["class","className"]);var Ai=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.GROUP},t)])}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);Ai.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var TS=["style"],Zu=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=(0,Qo.Z)(r,TS);return(0,b.Z)(this,e),t=(0,w.Z)(this,e,[(0,V.Z)({type:Pt.HTML,style:i},a)]),t.cullable.enable=!1,t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var r=bt(Ge(),this.parentNode.getWorldTransform()),i=this.getBounds();if(!Ir.isEmpty(i)){var a=new Ir;return a.setFromTransformedAABB(i,r),a}}return this.getBounds()}}])}(Ur);Zu.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var Ku=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.IMAGE},t)])}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);Ku.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var SS=["style"],al=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=(0,Qo.Z)(r,SS);(0,b.Z)(this,e),t=(0,w.Z)(this,e,[(0,V.Z)({type:Pt.LINE,style:(0,V.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},i)},a)]),t.markerStartAngle=0,t.markerEndAngle=0;var s=t.parsedStyle,o=s.markerStart,l=s.markerEnd;return o&&dr(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),l&&dr(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"attributeChangedCallback",value:function(r,i,a,s,o){r==="x1"||r==="y1"||r==="x2"||r==="y2"||r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(s&&dr(s)&&(this.markerStartAngle=0,s.remove()),o&&dr(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):r==="markerEnd"&&(s&&dr(s)&&(this.markerEndAngle=0,s.remove()),o&&dr(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1)))}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.x1,h=i.x2,v=i.y1,E=i.y2,D=r?a:s;if(!(!D||!dr(D))){var F=0,G,H,K,q,te,ue;r?(K=u,q=v,G=h-u,H=E-v,te=o||0,ue=this.markerStartAngle):(K=h,q=E,G=u-h,H=v-E,te=l||0,ue=this.markerEndAngle),F=Math.atan2(H,G),D.setLocalEulerAngles(F*180/Math.PI+ue),D.setLocalPosition(K+Math.cos(F)*te,q+Math.sin(F)*te)}}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle,s=a.x1,o=a.y1,l=a.x2,u=a.y2,h=Ps(s,o,l,u,r),v=h.x,E=h.y,D=et(S(),f(v,E,0),i?this.getWorldTransform():this.getLocalTransform());return new Bi(D[0],D[1])}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(r/this.getTotalLength(),i)}},{key:"getTotalLength",value:function(){var r=this.parsedStyle,i=r.x1,a=r.y1,s=r.x2,o=r.y2;return dm(i,a,s,o)}}])}(Ur);al.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var PS=["style"],Oa=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=(0,Qo.Z)(r,PS);(0,b.Z)(this,e),t=(0,w.Z)(this,e,[(0,V.Z)({type:Pt.PATH,style:i,initialParsedStyle:{miterLimit:4,d:(0,V.Z)({},Dm)}},a)]),t.markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var s=t.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&dr(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),u&&dr(u)&&t.placeMarkerMid(u),l&&dr(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"attributeChangedCallback",value:function(r,i,a,s,o){r==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(s&&dr(s)&&(this.markerStartAngle=0,s.remove()),o&&dr(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):r==="markerEnd"?(s&&dr(s)&&(this.markerEndAngle=0,s.remove()),o&&dr(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):r==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=r?a:s;if(!(!u||!dr(u))){var h=0,v,E,D,F,G,H;if(r){var K=this.getStartTangent(),q=(0,T.Z)(K,2),te=q[0],ue=q[1];D=ue[0],F=ue[1],v=te[0]-ue[0],E=te[1]-ue[1],G=o||0,H=this.markerStartAngle}else{var le=this.getEndTangent(),he=(0,T.Z)(le,2),ve=he[0],ge=he[1];D=ge[0],F=ge[1],v=ve[0]-ge[0],E=ve[1]-ge[1],G=l||0,H=this.markerEndAngle}h=Math.atan2(E,v),u.setLocalEulerAngles(h*180/Math.PI+H),u.setLocalPosition(D+Math.cos(h)*G,F+Math.sin(h)*G)}}},{key:"placeMarkerMid",value:function(r){var i=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(h){h.remove()}),r&&dr(r))for(var a=1;a<i.length-1;a++){var s=(0,T.Z)(i[a].currentPoint,2),o=s[0],l=s[1],u=a===1?r:r.cloneNode(!0);this.markerMidList.push(u),this.appendChild(u),u.setLocalPosition(o,l)}}},{key:"getTotalLength",value:function(){return Fv(this)}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,a=this.parsedStyle.d.absolutePath,s=Bw(a,r),o=s.x,l=s.y,u=et(S(),f(o,l,0),i?this.getWorldTransform():this.getLocalTransform());return new Bi(u[0],u[1])}},{key:"getPoint",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(r*Fv(this),i)}},{key:"getStartTangent",value:function(){var r=this.parsedStyle.d.segments,i=[];if(r.length>1){var a=r[0].currentPoint,s=r[1].currentPoint,o=r[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 r=this.parsedStyle.d.segments,i=r.length,a=[];if(i>1){var s=r[i-2].currentPoint,o=r[i-1].currentPoint,l=r[i-1].endTangent;a=[],l?(a.push([o[0]-l[0],o[1]-l[1]]),a.push([o[0],o[1]])):(a.push([s[0],s[1]]),a.push([o[0],o[1]]))}return a}}])}(Ur);Oa.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var OS=["style"],sl=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=r.style,a=(0,Qo.Z)(r,OS);(0,b.Z)(this,e),t=(0,w.Z)(this,e,[(0,V.Z)({type:Pt.POLYGON,style:i,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},a)]),t.markerStartAngle=0,t.markerEndAngle=0,t.markerMidList=[];var s=t.parsedStyle,o=s.markerStart,l=s.markerEnd,u=s.markerMid;return o&&dr(o)&&(t.markerStartAngle=o.getLocalEulerAngles(),t.appendChild(o)),u&&dr(u)&&t.placeMarkerMid(u),l&&dr(l)&&(t.markerEndAngle=l.getLocalEulerAngles(),t.appendChild(l)),t.transformMarker(!0),t.transformMarker(!1),t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"attributeChangedCallback",value:function(r,i,a,s,o){r==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):r==="markerStartOffset"||r==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):r==="markerStart"?(s&&dr(s)&&(this.markerStartAngle=0,s.remove()),o&&dr(o)&&(this.markerStartAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!0))):r==="markerEnd"?(s&&dr(s)&&(this.markerEndAngle=0,s.remove()),o&&dr(o)&&(this.markerEndAngle=o.getLocalEulerAngles(),this.appendChild(o),this.transformMarker(!1))):r==="markerMid"&&this.placeMarkerMid(o)}},{key:"transformMarker",value:function(r){var i=this.parsedStyle,a=i.markerStart,s=i.markerEnd,o=i.markerStartOffset,l=i.markerEndOffset,u=i.points,h=u||{},v=h.points,E=r?a:s;if(!(!E||!dr(E)||!v)){var D=0,F,G,H,K,q,te;if(H=v[0][0],K=v[0][1],r)F=v[1][0]-v[0][0],G=v[1][1]-v[0][1],q=o||0,te=this.markerStartAngle;else{var ue=v.length;this.parsedStyle.isClosed?(F=v[ue-1][0]-v[0][0],G=v[ue-1][1]-v[0][1]):(H=v[ue-1][0],K=v[ue-1][1],F=v[ue-2][0]-v[ue-1][0],G=v[ue-2][1]-v[ue-1][1]),q=l||0,te=this.markerEndAngle}D=Math.atan2(G,F),E.setLocalEulerAngles(D*180/Math.PI+te),E.setLocalPosition(H+Math.cos(D)*q,K+Math.sin(D)*q)}}},{key:"placeMarkerMid",value:function(r){var i=this.parsedStyle.points,a=i||{},s=a.points;if(this.markerMidList.forEach(function(v){v.remove()}),this.markerMidList=[],r&&dr(r)&&s)for(var o=1;o<(this.parsedStyle.isClosed?s.length:s.length-1);o++){var l=s[o][0],u=s[o][1],h=o===1?r:r.cloneNode(!0);this.markerMidList.push(h),this.appendChild(h),h.setLocalPosition(l,u)}}}])}(Ur);sl.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var CS=["style"],yh=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.style,i=(0,Qo.Z)(t,CS);return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.POLYLINE,style:r,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},i)])}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"getTotalLength",value:function(){return _A(this)}},{key:"getPointAtLength",value:function(r){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(r/this.getTotalLength(),i)}},{key:"getPoint",value:function(r){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,l,u,h=this.getTotalLength();a.forEach(function(K,q){a[q+1]&&(l=[0,0],l[0]=o/h,u=dm(K[0],K[1],a[q+1][0],a[q+1][1]),o+=u,l[1]=o/h,s.push(l))}),this.parsedStyle.points.segments=s}var v=0,E=0;this.parsedStyle.points.segments.forEach(function(K,q){r>=K[0]&&r<=K[1]&&(v=(r-K[0])/(K[1]-K[0]),E=q)});var D=Ps(a[E][0],a[E][1],a[E+1][0],a[E+1][1],v),F=D.x,G=D.y,H=et(S(),f(F,G,0),i?this.getWorldTransform():this.getLocalTransform());return new Bi(H[0],H[1])}},{key:"getStartTangent",value:function(){var r=this.parsedStyle.points.points,i=[];return i.push([r[1][0],r[1][1]]),i.push([r[0][0],r[0][1]]),i}},{key:"getEndTangent",value:function(){var r=this.parsedStyle.points.points,i=r.length-1,a=[];return a.push([r[i-1][0],r[i-1][1]]),a.push([r[i][0],r[i][1]]),a}}])}(sl);yh.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(sl.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var ki=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.RECT},t)])}return(0,y.Z)(e,n),(0,U.Z)(e)}(Ur);ki.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var DS=["style"],ol=function(n){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=t.style,i=(0,Qo.Z)(t,DS);return(0,b.Z)(this,e),(0,w.Z)(this,e,[(0,V.Z)({type:Pt.TEXT,style:(0,V.Z)({fill:"black"},r)},i)])}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"getComputedTextLength",value:function(){var r;return this.getGeometryBounds(),((r=this.parsedStyle.metrics)===null||r===void 0?void 0:r.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var r;return this.getGeometryBounds(),((r=this.parsedStyle.metrics)===null||r===void 0?void 0:r.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Ur);ol.PARSED_STYLE_LIST=new Set([].concat((0,C.Z)(Ur.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","textPathSide","textPathStartOffset","metrics","dx","dy"]));var LS=function(){function n(){(0,b.Z)(this,n),this.registry={},this.define(Pt.CIRCLE,Zs),this.define(Pt.ELLIPSE,Vu),this.define(Pt.RECT,ki),this.define(Pt.IMAGE,Ku),this.define(Pt.LINE,al),this.define(Pt.GROUP,Ai),this.define(Pt.PATH,Oa),this.define(Pt.POLYGON,sl),this.define(Pt.POLYLINE,yh),this.define(Pt.TEXT,ol),this.define(Pt.HTML,Zu)}return(0,U.Z)(n,[{key:"define",value:function(t,r){this.registry[t]=r}},{key:"get",value:function(t){return this.registry[t]}}])}(),L6={number:function(e){return new Sr(e)},percent:function(e){return new Sr(e,"%")},px:function(e){return new Sr(e,"px")},em:function(e){return new Sr(e,"em")},rem:function(e){return new Sr(e,"rem")},deg:function(e){return new Sr(e,"deg")},grad:function(e){return new Sr(e,"grad")},rad:function(e){return new Sr(e,"rad")},turn:function(e){return new Sr(e,"turn")},s:function(e){return new Sr(e,"s")},ms:function(e){return new Sr(e,"ms")},registerProperty:function(e){var t=e.name,r=e.inherits,i=e.interpolable,a=e.initialValue,s=e.syntax;Wt.styleValueRegistry.registerMetadata({n:t,inh:r,int:i,d:a,syntax:s})},registerLayout:function(e,t){Wt.layoutRegistry.registerLayout(e,t)}},Iy=function(n){function e(){var t;(0,b.Z)(this,e),t=(0,w.Z)(this,e),t.defaultView=null,t.ownerDocument=null,t.nodeName="document";try{t.timeline=new Wt.AnimationTimeline(t)}catch(i){}var r={};return Hv.forEach(function(i){var a=i.n,s=i.inh,o=i.d;s&&o&&(r[a]=fn(o)?o(Pt.GROUP):o)}),t.documentElement=new Ai({id:"g-root",style:r}),t.documentElement.ownerDocument=t,t.documentElement.parentNode=t,t.childNodes=[t.documentElement],t}return(0,y.Z)(e,n),(0,U.Z)(e,[{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(r,i){if(r==="svg")return this.documentElement;var a=this.defaultView.customElements.get(r);a||(console.warn("Unsupported tagName: ",r),a=r==="tspan"?ol:Ai);var s=new a(i);return s.ownerDocument=this,s}},{key:"createElementNS",value:function(r,i,a){return this.createElement(i,a)}},{key:"cloneNode",value:function(r){throw new Error(Mr)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(r){}}},{key:"elementsFromBBox",value:function(r,i,a,s){var o=this.defaultView.context.rBushRoot,l=o.search({minX:r,minY:i,maxX:a,maxY:s}),u=[];return l.forEach(function(h){var v=h.displayObject,E=v.parsedStyle.pointerEvents,D=E===void 0?"auto":E,F=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(D);(!F||F&&v.isVisible())&&!v.isCulled()&&v.isInteractive()&&u.push(v)}),u.sort(function(h,v){return v.sortable.renderOrder-h.sortable.renderOrder}),u}},{key:"elementFromPointSync",value:function(r,i){var a=this.defaultView.canvas2Viewport({x:r,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,h=l.height;if(s<0||o<0||s>u||o>h)return null;var v=this.defaultView.viewport2Client({x:s,y:o}),E=v.x,D=v.y,F=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:r,y:i,viewportX:s,viewportY:o,clientX:E,clientY:D},picked:[]}),G=F.picked;return G&&G[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var t=(0,po.Z)((0,Xi.Z)().mark(function i(a,s){var o,l,u,h,v,E,D,F,G,H,K;return(0,Xi.Z)().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,h=this.defaultView.getConfig(),v=h.width,E=h.height,!(l<0||u<0||l>v||u>E)){te.next=4;break}return te.abrupt("return",null);case 4:return D=this.defaultView.viewport2Client({x:l,y:u}),F=D.x,G=D.y,te.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:F,clientY:G},picked:[]});case 7:return H=te.sent,K=H.picked,te.abrupt("return",K&&K[0]||this.documentElement);case 10:case"end":return te.stop()}},i,this)}));function r(i,a){return t.apply(this,arguments)}return r}()},{key:"elementsFromPointSync",value:function(r,i){var a=this.defaultView.canvas2Viewport({x:r,y:i}),s=a.x,o=a.y,l=this.defaultView.getConfig(),u=l.width,h=l.height;if(s<0||o<0||s>u||o>h)return[];var v=this.defaultView.viewport2Client({x:s,y:o}),E=v.x,D=v.y,F=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:r,y:i,viewportX:s,viewportY:o,clientX:E,clientY:D},picked:[]}),G=F.picked;return G[G.length-1]!==this.documentElement&&G.push(this.documentElement),G}},{key:"elementsFromPoint",value:function(){var t=(0,po.Z)((0,Xi.Z)().mark(function i(a,s){var o,l,u,h,v,E,D,F,G,H,K;return(0,Xi.Z)().wrap(function(te){for(;;)switch(te.prev=te.next){case 0:if(o=this.defaultView.canvas2Viewport({x:a,y:s}),l=o.x,u=o.y,h=this.defaultView.getConfig(),v=h.width,E=h.height,!(l<0||u<0||l>v||u>E)){te.next=4;break}return te.abrupt("return",[]);case 4:return D=this.defaultView.viewport2Client({x:l,y:u}),F=D.x,G=D.y,te.next=7,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:a,y:s,viewportX:l,viewportY:u,clientX:F,clientY:G},picked:[]});case 7:return H=te.sent,K=H.picked,K[K.length-1]!==this.documentElement&&K.push(this.documentElement),te.abrupt("return",K);case 11:case"end":return te.stop()}},i,this)}));function r(i,a){return t.apply(this,arguments)}return r}()},{key:"appendChild",value:function(r,i){throw new Error(Gl)}},{key:"insertBefore",value:function(r,i){throw new Error(Gl)}},{key:"removeChild",value:function(r,i){throw new Error(Gl)}},{key:"replaceChild",value:function(r,i,a){throw new Error(Gl)}},{key:"append",value:function(){throw new Error(Gl)}},{key:"prepend",value:function(){throw new Error(Gl)}},{key:"getElementById",value:function(r){return this.documentElement.getElementById(r)}},{key:"getElementsByName",value:function(r){return this.documentElement.getElementsByName(r)}},{key:"getElementsByTagName",value:function(r){return this.documentElement.getElementsByTagName(r)}},{key:"getElementsByClassName",value:function(r){return this.documentElement.getElementsByClassName(r)}},{key:"querySelector",value:function(r){return this.documentElement.querySelector(r)}},{key:"querySelectorAll",value:function(r){return this.documentElement.querySelectorAll(r)}},{key:"find",value:function(r){return this.documentElement.find(r)}},{key:"findAll",value:function(r){return this.documentElement.findAll(r)}}])}(Kr),Ny=function(){function n(e){(0,b.Z)(this,n),this.strategies=e}return(0,U.Z)(n,[{key:"apply",value:function(t){var r=t.camera,i=t.renderingService,a=t.renderingContext,s=this.strategies;i.hooks.cull.tap(n.tag,function(o){if(o){var l=o.cullable;return s.length===0?l.visible=a.unculledEntities.indexOf(o.entity)>-1:l.visible=s.every(function(u){return u.isVisible(r,o)}),!o.isCulled()&&o.isVisible()?o:(o.dispatchEvent(new pi(Xn.CULLED)),null)}return o}),i.hooks.afterRender.tap(n.tag,function(o){o.cullable.visibilityPlaneMask=-1})}}])}();Ny.tag="Culling";var By=function(){function n(){var e=this;(0,b.Z)(this,n),this.autoPreventDefault=!1,this.rootPointerEvent=new vh(null),this.rootWheelEvent=new Jv(null),this.onPointerMove=function(t){var r,i=(r=e.context.renderingContext.root)===null||r===void 0||(r=r.ownerDocument)===null||r===void 0?void 0:r.defaultView;if(!(i.supportsTouchEvents&&t.pointerType==="touch")){var a=e.normalizeToPointerEvent(t,i),s=(0,Yo.Z)(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=e.bootstrapEvent(e.rootPointerEvent,l,i,t);e.context.eventService.mapEvent(u)}}catch(h){s.e(h)}finally{s.f()}e.setCursor(e.context.eventService.cursor)}},this.onClick=function(t){var r,i=(r=e.context.renderingContext.root)===null||r===void 0||(r=r.ownerDocument)===null||r===void 0?void 0:r.defaultView,a=e.normalizeToPointerEvent(t,i),s=(0,Yo.Z)(a),o;try{for(s.s();!(o=s.n()).done;){var l=o.value,u=e.bootstrapEvent(e.rootPointerEvent,l,i,t);e.context.eventService.mapEvent(u)}}catch(h){s.e(h)}finally{s.f()}e.setCursor(e.context.eventService.cursor)}}return(0,U.Z)(n,[{key:"apply",value:function(t){var r=this;this.context=t;var i=t.renderingService,a=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(s){var o=r.context.renderingService.hooks.pickSync.call({position:s,picked:[],topmost:!0}),l=o.picked;return l[0]||null}),i.hooks.pointerWheel.tap(n.tag,function(s){var o=r.normalizeWheelEvent(s);r.context.eventService.mapEvent(o)}),i.hooks.pointerDown.tap(n.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=r.normalizeToPointerEvent(s,a);if(r.autoPreventDefault&&o[0].isNormalized){var l=s.cancelable||!("cancelable"in s);l&&s.preventDefault()}var u=(0,Yo.Z)(o),h;try{for(u.s();!(h=u.n()).done;){var v=h.value,E=r.bootstrapEvent(r.rootPointerEvent,v,a,s);r.context.eventService.mapEvent(E)}}catch(D){u.e(D)}finally{u.f()}r.setCursor(r.context.eventService.cursor)}}),i.hooks.pointerUp.tap(n.tag,function(s){if(!(a.supportsTouchEvents&&s.pointerType==="touch")){var o=r.context.contextService.getDomElement(),l=r.context.eventService.isNativeEventFromCanvas(o,s),u=l?"":"outside",h=r.normalizeToPointerEvent(s,a),v=(0,Yo.Z)(h),E;try{for(v.s();!(E=v.n()).done;){var D=E.value,F=r.bootstrapEvent(r.rootPointerEvent,D,a,s);F.type+=u,r.context.eventService.mapEvent(F)}}catch(G){v.e(G)}finally{v.f()}r.setCursor(r.context.eventService.cursor)}}),i.hooks.pointerMove.tap(n.tag,this.onPointerMove),i.hooks.pointerOver.tap(n.tag,this.onPointerMove),i.hooks.pointerOut.tap(n.tag,this.onPointerMove),i.hooks.click.tap(n.tag,this.onClick),i.hooks.pointerCancel.tap(n.tag,function(s){var o=r.normalizeToPointerEvent(s,a),l=(0,Yo.Z)(o),u;try{for(l.s();!(u=l.n()).done;){var h=u.value,v=r.bootstrapEvent(r.rootPointerEvent,h,a,s);r.context.eventService.mapEvent(v)}}catch(E){l.e(E)}finally{l.f()}r.setCursor(r.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(t,r,i,a){t.view=i,t.originalEvent=null,t.nativeEvent=a,t.pointerId=r.pointerId,t.width=r.width,t.height=r.height,t.isPrimary=r.isPrimary,t.pointerType=r.pointerType,t.pressure=r.pressure,t.tangentialPressure=r.tangentialPressure,t.tiltX=r.tiltX,t.tiltY=r.tiltY,t.twist=r.twist,this.transferMouseData(t,r);var s=this.context.eventService.client2Viewport({x:r.clientX,y:r.clientY}),o=s.x,l=s.y;t.viewport.x=o,t.viewport.y=l;var u=this.context.eventService.viewport2Canvas(t.viewport),h=u.x,v=u.y;return t.canvas.x=h,t.canvas.y=v,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=a.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t.type.startsWith("mouse")&&(t.type=t.type.replace("mouse","pointer")),t.type.startsWith("touch")&&(t.type=pT[t.type]||t.type),t}},{key:"normalizeWheelEvent",value:function(t){var r=this.rootWheelEvent;this.transferMouseData(r,t),r.deltaMode=t.deltaMode,r.deltaX=t.deltaX,r.deltaY=t.deltaY,r.deltaZ=t.deltaZ;var i=this.context.eventService.client2Viewport({x:t.clientX,y:t.clientY}),a=i.x,s=i.y;r.viewport.x=a,r.viewport.y=s;var o=this.context.eventService.viewport2Canvas(r.viewport),l=o.x,u=o.y;return r.canvas.x=l,r.canvas.y=u,r.global.copyFrom(r.canvas),r.offset.copyFrom(r.canvas),r.nativeEvent=t,r.type=t.type,r}},{key:"transferMouseData",value:function(t,r){t.isTrusted=r.isTrusted,t.srcElement=r.srcElement,t.timeStamp=Kv.now(),t.type=r.type,t.altKey=r.altKey,t.metaKey=r.metaKey,t.shiftKey=r.shiftKey,t.ctrlKey=r.ctrlKey,t.button=r.button,t.buttons=r.buttons,t.client.x=r.clientX,t.client.y=r.clientY,t.movement.x=r.movementX,t.movement.y=r.movementY,t.page.x=r.pageX,t.page.y=r.pageY,t.screen.x=r.screenX,t.screen.y=r.screenY,t.relatedTarget=null}},{key:"setCursor",value:function(t){this.context.contextService.applyCursorStyle(t||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(t,r){var i=[];if(r.isTouchEvent(t))for(var a=0;a<t.changedTouches.length;a++){var s=t.changedTouches[a];Bn(s.button)&&(s.button=0),Bn(s.buttons)&&(s.buttons=1),Bn(s.isPrimary)&&(s.isPrimary=t.touches.length===1&&t.type==="touchstart"),Bn(s.width)&&(s.width=s.radiusX||1),Bn(s.height)&&(s.height=s.radiusY||1),Bn(s.tiltX)&&(s.tiltX=0),Bn(s.tiltY)&&(s.tiltY=0),Bn(s.pointerType)&&(s.pointerType="touch"),Bn(s.pointerId)&&(s.pointerId=s.identifier||0),Bn(s.pressure)&&(s.pressure=s.force||.5),Bn(s.twist)&&(s.twist=0),Bn(s.tangentialPressure)&&(s.tangentialPressure=0),s.isNormalized=!0,s.type=t.type,i.push(s)}else if(r.isMouseEvent(t)){var o=t;Bn(o.isPrimary)&&(o.isPrimary=!0),Bn(o.width)&&(o.width=1),Bn(o.height)&&(o.height=1),Bn(o.tiltX)&&(o.tiltX=0),Bn(o.tiltY)&&(o.tiltY=0),Bn(o.pointerType)&&(o.pointerType="mouse"),Bn(o.pointerId)&&(o.pointerId=gT),Bn(o.pressure)&&(o.pressure=.5),Bn(o.twist)&&(o.twist=0),Bn(o.tangentialPressure)&&(o.tangentialPressure=0),o.isNormalized=!0,i.push(o)}else i.push(t);return i}}])}();By.tag="Event";var RS=[Pt.CIRCLE,Pt.ELLIPSE,Pt.IMAGE,Pt.RECT,Pt.LINE,Pt.POLYLINE,Pt.POLYGON,Pt.TEXT,Pt.PATH,Pt.HTML],IS=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"isVisible",value:function(t,r){var i,a=r.cullable;if(!a.enable)return!0;var s=r.getRenderBounds();if(Ir.isEmpty(s))return!1;var o=t.getFrustum(),l=(i=r.parentNode)===null||i===void 0||(i=i.cullable)===null||i===void 0?void 0:i.visibilityPlaneMask;return a.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(r,s,l||Ul.INDETERMINATE,o.planes),a.visible=a.visibilityPlaneMask!==Ul.OUTSIDE,a.visible}},{key:"computeVisibilityWithPlaneMask",value:function(t,r,i,a){if(i===Ul.OUTSIDE||i===Ul.INSIDE)return i;for(var s=Ul.INSIDE,o=RS.indexOf(t.nodeName)>-1,l=0,u=a.length;l<u;++l){var h=1<<l;if(i&h&&!(o&&(l===4||l===5))){var v=a[l],E=v.normal,D=v.distance;if(be(E,r.getPositiveFarPoint(a[l]))+D<0)return Ul.OUTSIDE;be(E,r.getNegativeFarPoint(a[l]))+D<0&&(s|=h)}}return s}}])}(),ky=function(){function n(){(0,b.Z)(this,n),this.syncTasks=new Map,this.isFirstTimeRendering=!0,this.syncing=!1,this.isFirstTimeRenderingFinished=!1}return(0,U.Z)(n,[{key:"apply",value:function(t){var r=this,i,a=t.renderingService,s=t.renderingContext,o=t.rBushRoot,l=s.root.ownerDocument.defaultView;this.rBush=o;var u=function(G){var H=G.target;H.renderable.dirty=!0,a.dirtify()},h=function(G){r.syncTasks.set(G.target,G.detail.affectChildren),a.dirtify()},v=function(G){var H=G.target;Wt.enableSizeAttenuation&&Wt.styleValueRegistry.updateSizeAttenuation(H,l.getCamera().getZoom())},E=function(G){var H=G.target,K=H.rBushNode;K.aabb&&r.rBush.remove(K.aabb),r.syncTasks.delete(H),Wt.sceneGraphService.dirtifyToRoot(H),a.dirtify()};a.hooks.init.tap(n.tag,function(){l.addEventListener(Xn.MOUNTED,v),l.addEventListener(Xn.UNMOUNTED,E),l.addEventListener(Xn.ATTR_MODIFIED,u),l.addEventListener(Xn.BOUNDS_CHANGED,h)}),a.hooks.destroy.tap(n.tag,function(){l.removeEventListener(Xn.MOUNTED,v),l.removeEventListener(Xn.UNMOUNTED,E),l.removeEventListener(Xn.ATTR_MODIFIED,u),l.removeEventListener(Xn.BOUNDS_CHANGED,h),r.syncTasks.clear()});var D=(i=Wt.globalThis.requestIdleCallback)!==null&&i!==void 0?i:Xv.bind(Wt.globalThis);a.hooks.endFrame.tap(n.tag,function(){r.isFirstTimeRendering?(r.isFirstTimeRendering=!1,r.syncing=!0,D(function(){r.syncRTree(!0),r.isFirstTimeRenderingFinished=!0})):r.syncRTree()})}},{key:"syncNode",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(t.isConnected){var i=t.rBushNode;i.aabb&&this.rBush.remove(i.aabb);var a=t.getRenderBounds();if(a){var s=t.renderable;r&&(s.dirtyRenderBounds||(s.dirtyRenderBounds=new Ir),s.dirtyRenderBounds.update(a.center,a.halfExtents));var o=a.getMin(),l=(0,T.Z)(o,2),u=l[0],h=l[1],v=a.getMax(),E=(0,T.Z)(v,2),D=E[0],F=E[1];i.aabb||(i.aabb={}),i.aabb.displayObject=t,i.aabb.minX=u,i.aabb.minY=h,i.aabb.maxX=D,i.aabb.maxY=F}if(i.aabb&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.maxX)&&!isNaN(i.aabb.minX)&&!isNaN(i.aabb.minY))return i.aabb}}},{key:"syncRTree",value:function(){var t=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(!r&&(this.syncing||this.syncTasks.size===0))){this.syncing=!0;var i=[],a=new Set,s=function(l){if(!a.has(l)&&l.renderable){var u=t.syncNode(l,r);u&&(i.push(u),a.add(l))}};this.syncTasks.forEach(function(o,l){o&&l.forEach(s);for(var u=l;u;)s(u),u=u.parentElement}),this.rBush.load(i),i.length=0,this.syncing=!1}}}])}();ky.tag="Prepare";function R6(n){return!!n.document}var Ca=function(n){return n.READY="ready",n.BEFORE_RENDER="beforerender",n.RERENDER="rerender",n.AFTER_RENDER="afterrender",n.BEFORE_DESTROY="beforedestroy",n.AFTER_DESTROY="afterdestroy",n.RESIZE="resize",n.DIRTY_RECTANGLE="dirtyrectangle",n.RENDERER_CHANGED="rendererchanged",n}({}),Fy=500,NS=.1,BS=1e3,_h=new pi(Xn.MOUNTED),Eh=new pi(Xn.UNMOUNTED),rg=new pi(Ca.BEFORE_RENDER),zy=new pi(Ca.RERENDER),ig=new pi(Ca.AFTER_RENDER),ag=function(n){function e(t){var r;(0,b.Z)(this,e),r=(0,w.Z)(this,e),r.Element=Ur,r.inited=!1,r.context={};var i=t.container,a=t.canvas,s=t.renderer,o=t.width,l=t.height,u=t.background,h=t.cursor,v=t.supportsMutipleCanvasesInOneContainer,E=t.cleanUpOnDestroy,D=E===void 0?!0:E,F=t.offscreenCanvas,G=t.devicePixelRatio,H=t.requestAnimationFrame,K=t.cancelAnimationFrame,q=t.createImage,te=t.supportsTouchEvents,ue=t.supportsPointerEvents,le=t.isTouchEvent,he=t.isMouseEvent,ve=t.dblClickSpeed,ge=o,Te=l,Oe=G||Zv&&window.devicePixelRatio||1;return Oe=Oe>=1?Math.ceil(Oe):1,a&&(ge=o||dT(a)||a.width/Oe,Te=l||vT(a)||a.height/Oe),r.customElements=new LS,r.devicePixelRatio=Oe,r.requestAnimationFrame=H!=null?H:Xv.bind(Wt.globalThis),r.cancelAnimationFrame=K!=null?K:by.bind(Wt.globalThis),r.supportsTouchEvents=te!=null?te:"ontouchstart"in Wt.globalThis,r.supportsPointerEvents=ue!=null?ue:!!Wt.globalThis.PointerEvent,r.isTouchEvent=le!=null?le:function(Ne){return r.supportsTouchEvents&&Ne instanceof Wt.globalThis.TouchEvent},r.isMouseEvent=he!=null?he:function(Ne){return!Wt.globalThis.MouseEvent||Ne instanceof Wt.globalThis.MouseEvent&&(!r.supportsPointerEvents||!(Ne instanceof Wt.globalThis.PointerEvent))},F&&(Wt.offscreenCanvas=F),r.document=new Iy,r.document.defaultView=r,v||uT(i,r,D),r.initRenderingContext((0,V.Z)((0,V.Z)({},t),{},{width:ge,height:Te,background:u!=null?u:"transparent",cursor:h!=null?h:"default",cleanUpOnDestroy:D,devicePixelRatio:Oe,requestAnimationFrame:r.requestAnimationFrame,cancelAnimationFrame:r.cancelAnimationFrame,supportsTouchEvents:r.supportsTouchEvents,supportsPointerEvents:r.supportsPointerEvents,isTouchEvent:r.isTouchEvent,isMouseEvent:r.isMouseEvent,dblClickSpeed:ve!=null?ve:200,createImage:q!=null?q:function(){return new window.Image}})),r.initDefaultCamera(ge,Te,s.clipSpaceNearZ),r.initRenderer(s,!0),r}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"initRenderingContext",value:function(r){this.context.config=r,this.context.renderingContext={root:this.document.documentElement,renderListCurrentFrame:[],unculledEntities:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(r,i,a){var s=this,o=new Wt.CameraContribution;o.clipSpaceNearZ=a,o.setType(Tr.EXPLORING,Sv.DEFAULT).setPosition(r/2,i/2,Fy).setFocalPoint(r/2,i/2,0).setOrthographic(r/-2,r/2,i/2,i/-2,NS,BS),o.canvas=this,o.eventEmitter.on(Pm.UPDATED,function(){s.context.renderingContext.renderReasons.add(Kl.CAMERA_CHANGED),Wt.enableSizeAttenuation&&s.getConfig().renderer.getConfig().enableSizeAttenuation&&s.updateSizeAttenuation()}),this.context.camera=o}},{key:"updateSizeAttenuation",value:function(){var r=this.getCamera().getZoom();this.document.documentElement.forEach(function(i){Wt.styleValueRegistry.updateSizeAttenuation(i,r)})}},{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 r=this;return this.readyPromise||(this.readyPromise=new Promise(function(i){r.resolveReadyPromise=function(){i(r)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,i=arguments.length>1?arguments[1]:void 0;gi.clearCache(),i||this.dispatchEvent(new pi(Ca.BEFORE_DESTROY)),this.frameId&&this.cancelAnimationFrame(this.frameId);var a=this.getRoot();r&&(this.unmountChildren(a),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),this.context.rBushRoot&&this.context.rBushRoot.clear(),i||this.dispatchEvent(new pi(Ca.AFTER_DESTROY));var s=function(l){l.currentTarget=null,l.manager=null,l.target=null,l.relatedNode=null};s(_h),s(Eh),s(rg),s(zy),s(ig),s(Rs),s(eg),s(tg),s(Ry)}},{key:"changeSize",value:function(r,i){this.resize(r,i)}},{key:"resize",value:function(r,i){var a=this.context.config;a.width=r,a.height=i,this.getContextService().resize(r,i);var s=this.context.camera,o=s.getProjectionMode();s.setPosition(r/2,i/2,Fy).setFocalPoint(r/2,i/2,0),o===Va.ORTHOGRAPHIC?s.setOrthographic(r/-2,r/2,i/2,i/-2,s.getNear(),s.getFar()):s.setAspect(r/i),this.dispatchEvent(new pi(Ca.RESIZE,{width:r,height:i}))}},{key:"appendChild",value:function(r,i){return this.document.documentElement.appendChild(r,i)}},{key:"insertBefore",value:function(r,i){return this.document.documentElement.insertBefore(r,i)}},{key:"removeChild",value:function(r){return this.document.documentElement.removeChild(r)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(r){var i=this;r&&(rg.detail=r,ig.detail=r),this.dispatchEvent(rg);var a=this.getRenderingService();a.render(this.getConfig(),r,function(){i.dispatchEvent(zy)}),this.dispatchEvent(ig)}},{key:"run",value:function(){var r=this,i=function(s,o){r.render(o),r.frameId=r.requestAnimationFrame(i)};i()}},{key:"initRenderer",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!r)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.rBushRoot=new sM,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new By,new ky,new Ny([new IS])),this.loadRendererContainerModule(r),this.context.contextService=new this.context.ContextService((0,V.Z)((0,V.Z)({},Wt),this.context)),this.context.renderingService=new YT(Wt,this.context),this.context.eventService=new XT(Wt,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(r,a,!0)):this.context.contextService.initAsync().then(function(){i.initRenderingService(r,a)}).catch(function(s){console.error(s)})}},{key:"initRenderingService",value:function(r){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(){i.inited=!0,a?s?i.requestAnimationFrame(function(){i.dispatchEvent(new pi(Ca.READY))}):i.dispatchEvent(new pi(Ca.READY)):i.dispatchEvent(new pi(Ca.RENDERER_CHANGED)),i.readyPromise&&i.resolveReadyPromise(),a||i.getRoot().forEach(function(o){var l=o,u=l.renderable;u&&(u.renderBoundsDirty=!0,u.boundsDirty=!0,u.dirty=!0)}),i.mountChildren(i.getRoot()),r.getConfig().enableAutoRendering&&i.run()})}},{key:"loadRendererContainerModule",value:function(r){var i=this,a=r.getPlugins();a.forEach(function(s){s.context=i.context,s.init(Wt)})}},{key:"setRenderer",value:function(r){var i=this.getConfig();if(i.renderer!==r){var a=i.renderer;i.renderer=r,this.destroy(!1,!0),(0,C.Z)((a==null?void 0:a.getPlugins())||[]).reverse().forEach(function(s){s.destroy(Wt)}),this.initRenderer(r)}}},{key:"setCursor",value:function(r){var i=this.getConfig();i.cursor=r,this.getContextService().applyCursorStyle(r)}},{key:"unmountChildren",value:function(r){var i=this;r.childNodes.forEach(function(a){i.unmountChildren(a)}),this.inited&&(r.isMutationObserved?r.dispatchEvent(Eh):(Eh.target=r,this.dispatchEvent(Eh,!0)),r!==this.document.documentElement&&(r.ownerDocument=null),r.isConnected=!1),r.isCustomElement&&r.disconnectedCallback&&r.disconnectedCallback()}},{key:"mountChildren",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:fh(r);this.inited?r.isConnected||(r.ownerDocument=this.document,r.isConnected=!0,a||(r.isMutationObserved?r.dispatchEvent(_h):(_h.target=r,this.dispatchEvent(_h,!0)))):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: ",r.nodeName),r.childNodes.forEach(function(s){i.mountChildren(s,a)}),r.isCustomElement&&r.connectedCallback&&r.connectedCallback()}},{key:"mountFragment",value:function(r){this.mountChildren(r,!1)}},{key:"client2Viewport",value:function(r){return this.getEventService().client2Viewport(r)}},{key:"viewport2Client",value:function(r){return this.getEventService().viewport2Client(r)}},{key:"viewport2Canvas",value:function(r){return this.getEventService().viewport2Canvas(r)}},{key:"canvas2Viewport",value:function(r){return this.getEventService().canvas2Viewport(r)}},{key:"getPointByClient",value:function(r,i){return this.client2Viewport({x:r,y:i})}},{key:"getClientByPoint",value:function(r,i){return this.viewport2Client({x:r,y:i})}}])}(Sy);var kS=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.landmarks=[],t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"rotate",value:function(r,i,a){if(this.relElevation=Hl(i),this.relAzimuth=Hl(r),this.relRoll=Hl(a),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===Tr.EXPLORING){var s=Mn(Fr(),[1,0,0],Ar((this.rotateWorld?1:-1)*this.relElevation)),o=Mn(Fr(),[0,1,0],Ar((this.rotateWorld?1:-1)*this.relAzimuth)),l=Mn(Fr(),[0,0,1],Ar(this.relRoll)),u=Qn(Fr(),o,s);u=Qn(Fr(),u,l);var h=Tn(Ge(),u);St(this.matrix,this.matrix,[0,0,-this.distance]),_t(this.matrix,this.matrix,h),St(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===Tr.ORBITING||this.type===Tr.EXPLORING?this._getPosition():this.type===Tr.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(r,i){var a=na(r,i,0),s=I(this.position);return k(s,s,ne(S(),this.right,a[0])),k(s,s,ne(S(),this.up,a[1])),this._setPosition(s),this.triggerUpdate(),this}},{key:"dolly",value:function(r){var i=this.forward,a=I(this.position),s=r*this.dollyingStep,o=this.distance+r*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===Tr.ORBITING||this.type===Tr.EXPLORING?this._getDistance():this.type===Tr.TRACKING&&k(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(r){var i,a,s,o,l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},u=l.position,h=u===void 0?this.position:u,v=l.focalPoint,E=v===void 0?this.focalPoint:v,D=l.roll,F=l.zoom,G=new Wt.CameraContribution;G.setType(this.type,void 0),G.setPosition(h[0],(i=h[1])!==null&&i!==void 0?i:this.position[1],(a=h[2])!==null&&a!==void 0?a:this.position[2]),G.setFocalPoint(E[0],(s=E[1])!==null&&s!==void 0?s:this.focalPoint[1],(o=E[2])!==null&&o!==void 0?o:this.focalPoint[2]),G.setRoll(D!=null?D:this.roll),G.setZoom(F!=null?F:this.zoom);var H={name:r,matrix:Ve(G.getWorldTransform()),right:I(G.right),up:I(G.up),forward:I(G.forward),position:I(G.getPosition()),focalPoint:I(G.getFocalPoint()),distanceVector:I(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(H),H}},{key:"gotoLandmark",value:function(r){var i=this,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=fr(r)?this.landmarks.find(function(Ne){return Ne.name===r}):r;if(s){var o=sn(a)?{duration:a}:a,l=o.easing,u=l===void 0?"linear":l,h=o.duration,v=h===void 0?100:h,E=o.easingFunction,D=E===void 0?void 0:E,F=o.onfinish,G=F===void 0?void 0:F,H=o.onframe,K=H===void 0?void 0:H,q=.01;this.cancelLandmarkAnimation();var te=s.position,ue=s.focalPoint,le=s.zoom,he=s.roll,ve=D||Wt.EasingFunction(u),ge,Te=function(){i.setFocalPoint(ue),i.setPosition(te),i.setRoll(he),i.setZoom(le),i.computeMatrix(),i.triggerUpdate(),G==null||G()};if(v===0)return Te();var Oe=function(ze){ge===void 0&&(ge=ze);var Xe=ze-ge;if(Xe>=v){Te();return}var Je=ve(Xe/v),st=S(),Et=S(),mt=1,ct=0;Fe(st,i.focalPoint,ue,Je),Fe(Et,i.position,te,Je),ct=i.roll*(1-Je)+he*Je,mt=i.zoom*(1-Je)+le*Je,i.setFocalPoint(st),i.setPosition(Et),i.setRoll(ct),i.setZoom(mt);var ht=Ie(st,ue)+Ie(Et,te);if(ht<=q&&le===void 0&&he===void 0)return Te();i.computeMatrix(),i.triggerUpdate(),Xe<v&&(K==null||K(Je),i.landmarkAnimationID=i.canvas.requestAnimationFrame(Oe))};this.canvas.requestAnimationFrame(Oe)}}}])}(Cm);Wt.CameraContribution=kS;var Uy=null,I6=0,Wy=new WeakMap,N6=null,B6=null,xh,Ks;function k6(n,e){return xh=new Uy(n,e)}function F6(n){return Ks||(Ks=Uy.copy(xh),Ks.oldValue=n,Ks)}function z6(){xh=Ks=void 0}function FS(n){return n===Ks||n===xh}function U6(n,e){return n===e?n:Ks&&FS(n)?Ks:null}function zS(n){n.nodes.forEach(function(e){var t=Wy.get(e);t&&t.forEach(function(r){r.observer===n&&r.removeTransientObservers()})})}function W6(n,e){for(var t=n;t;t=t.parentNode){var r=Wy.get(t);if(r)for(var i=0;i<r.length;i++){var a=r[i],s=a.options;if(!(t!==n&&!s.subtree)){var o=e(s);o&&a.enqueue(o)}}}}var sg=!1,og=null;function G6(n){og.push(n),sg||(sg=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(lg):lg())}function lg(){sg=!1;var n=og;og=[],n.sort(function(t,r){return t.uid-r.uid});var e=!1;n.forEach(function(t){var r=t.takeRecords();zS(t),r.length&&(t.callback(r,t),e=!0)}),e&&lg()}var ug=function(n){function e(t,r,i,a){var s;return(0,b.Z)(this,e),s=(0,w.Z)(this,e,[t]),s.currentTime=i,s.timelineTime=a,s.target=r,s.type="finish",s.bubbles=!1,s.currentTarget=r,s.defaultPrevented=!1,s.eventPhase=s.AT_TARGET,s.timeStamp=Date.now(),s.currentTime=i,s.timelineTime=a,s}return(0,y.Z)(e,n),(0,U.Z)(e)}(dh),US=0,WS=function(){function n(e,t){var r;(0,b.Z)(this,n),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=e,e.animation=this,this.timeline=t,this.id="".concat(US++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((r=this.effect)===null||r===void 0?void 0:r.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return(0,U.Z)(n,[{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 t=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(r,i){t.resolveReadyPromise=function(){r(t)},t.rejectReadyPromise=function(){i(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var t=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(r,i){t.resolveFinishedPromise=function(){r(t)},t.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(t){if(t=Number(t),!isNaN(t)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var r;this._startTime=Number((r=this.timeline)===null||r===void 0?void 0:r.currentTime)-t/this.playbackRate}this.currentTimePending=!1,this._currentTime!==t&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(t,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(t){if(t!==null){if(this.updatePromises(),t=Number(t),isNaN(t)||this._paused||this._idle)return;this._startTime=t,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(t){if(t!==this._playbackRate){this.updatePromises();var r=this.currentTime;this._playbackRate=t,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),r!==null&&(this.currentTime=r),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 t=this.oldPlayState,r=this.pending?"pending":this.playState;return this.readyPromise&&r!==t&&(r==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):t==="pending"?this.resolveReadyPromise():r==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&r!==t&&(r==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):r==="finished"?this.resolveFinishedPromise():t==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=r,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 t=this;if(this.updatePromises(),!!this._inEffect&&(this._inEffect=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._startTime=null,this.effect.update(null),this.timeline.applyDirtiedAnimation(this),this.updatePromises(),this.oncancel)){var r=new ug(null,this,this.currentTime,null);setTimeout(function(){t.oncancel(r)})}}},{key:"reverse",value:function(){this.updatePromises();var t=this.currentTime;this.playbackRate*=-1,this.play(),t!==null&&(this.currentTime=t),this.updatePromises()}},{key:"updatePlaybackRate",value:function(t){this.playbackRate=t}},{key:"targetAnimations",value:function(){var t,r=(t=this.effect)===null||t===void 0?void 0:t.target;return r.getAnimations()}},{key:"markTarget",value:function(){var t=this.targetAnimations();t.indexOf(this)===-1&&t.push(this)}},{key:"unmarkTarget",value:function(){var t=this.targetAnimations(),r=t.indexOf(this);r!==-1&&t.splice(r,1)}},{key:"tick",value:function(t,r){!this._idle&&!this._paused&&(this._startTime===null?r&&(this.startTime=t-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((t-this._startTime)*this.playbackRate)),r&&(this.currentTimePending=!1,this.fireEvents(t))}},{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(Mr)}},{key:"addEventListener",value:function(t,r,i){throw new Error(Mr)}},{key:"removeEventListener",value:function(t,r,i){throw new Error(Mr)}},{key:"dispatchEvent",value:function(t){throw new Error(Mr)}},{key:"commitStyles",value:function(){throw new Error(Mr)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var t;this._inEffect=!!((t=this.effect)!==null&&t!==void 0&&t.update(-1))}else{var r;this._inEffect=!!((r=this.effect)!==null&&r!==void 0&&r.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(t,r){t!==this._currentTime&&(this._currentTime=t,this._isFinished&&!r&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(t){var r=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var i=new ug(null,this,this.currentTime,t);setTimeout(function(){r.onfinish&&r.onfinish(i)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var a=new ug(null,this,this.currentTime,t);this.onframe(a)}this._finishedFlag=!1}}}])}(),GS=4,HS=.001,jS=1e-7,VS=10,Xu=11,bh=1/(Xu-1),ZS=typeof Float32Array=="function",Gy=function(e,t){return 1-3*t+3*e},Hy=function(e,t){return 3*t-6*e},jy=function(e){return 3*e},wh=function(e,t,r){return((Gy(t,r)*e+Hy(t,r))*e+jy(t))*e},Vy=function(e,t,r){return 3*Gy(t,r)*e*e+2*Hy(t,r)*e+jy(t)},KS=function(e,t,r,i,a){var s,o,l=0;do o=t+(r-t)/2,s=wh(o,i,a)-e,s>0?r=o:t=o;while(Math.abs(s)>jS&&++l<VS);return o},XS=function(e,t,r,i){for(var a=0;a<GS;++a){var s=Vy(t,r,i);if(s===0)return t;var o=wh(t,r,i)-e;t-=o/s}return t},cg=function(e,t,r,i){if(!(e>=0&&e<=1&&r>=0&&r<=1))throw new Error("bezier x values must be in [0, 1] range");if(e===t&&r===i)return function(l){return l};for(var a=ZS?new Float32Array(Xu):new Array(Xu),s=0;s<Xu;++s)a[s]=wh(s*bh,e,r);var o=function(u){for(var h=0,v=1,E=Xu-1;v!==E&&a[v]<=u;++v)h+=bh;--v;var D=(u-a[v])/(a[v+1]-a[v]),F=h+D*bh,G=Vy(F,e,r);return G>=HS?XS(u,F,e,r):G===0?F:KS(u,h,h+bh,e,r)};return function(l){return l===0||l===1?l:wh(o(l),t,i)}},YS=function(e){return e=e.replace(/([A-Z])/g,function(t){return"-".concat(t.toLowerCase())}),e.charAt(0)==="-"?e.substring(1):e},Mh=function(e){return Math.pow(e,2)},Ah=function(e){return Math.pow(e,3)},Th=function(e){return Math.pow(e,4)},Sh=function(e){return Math.pow(e,5)},Ph=function(e){return Math.pow(e,6)},Oh=function(e){return 1-Math.cos(e*Math.PI/2)},Ch=function(e){return 1-Math.sqrt(1-e*e)},Dh=function(e){return e*e*(3*e-2)},Lh=function(e){for(var t,r=4;e<((t=Math.pow(2,--r))-1)/11;);return 1/Math.pow(4,3-r)-7.5625*Math.pow((t*3-2)/22-e,2)},Rh=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=(0,T.Z)(t,2),i=r[0],a=i===void 0?1:i,s=r[1],o=s===void 0?.5:s,l=Qr(Number(a),1,10),u=Qr(Number(o),.1,2);return e===0||e===1?e:-l*Math.pow(2,10*(e-1))*Math.sin((e-1-u/(Math.PI*2)*Math.asin(1/l))*(Math.PI*2)/u)},Yu=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0,i=(0,T.Z)(t,4),a=i[0],s=a===void 0?1:a,o=i[1],l=o===void 0?100:o,u=i[2],h=u===void 0?10:u,v=i[3],E=v===void 0?0:v;s=Qr(s,.1,1e3),l=Qr(l,.1,1e3),h=Qr(h,.1,1e3),E=Qr(E,.1,1e3);var D=Math.sqrt(l/s),F=h/(2*Math.sqrt(l*s)),G=F<1?D*Math.sqrt(1-F*F):0,H=1,K=F<1?(F*D+-E)/G:-E+D,q=r?r*e/1e3:e;return F<1?q=Math.exp(-q*F*D)*(H*Math.cos(G*q)+K*Math.sin(G*q)):q=(H+K*q)*Math.exp(-q*D),e===0||e===1?e:1-q},hg=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=t,i=(0,T.Z)(r,2),a=i[0],s=a===void 0?10:a,o=i[1],l=o==="start"?Math.ceil:Math.floor;return l(Qr(e,0,1)*s)/s},Zy=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=(0,T.Z)(t,4),i=r[0],a=r[1],s=r[2],o=r[3];return cg(i,a,s,o)(e)},Ih=cg(.42,0,1,1),Ka=function(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return 1-e(1-t,r,i)}},Xa=function(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return t<.5?e(t*2,r,i)/2:1-e(t*-2+2,r,i)/2}},Ya=function(e){return function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],i=arguments.length>2?arguments[2]:void 0;return t<.5?(1-e(1-t*2,r,i))/2:(e(t*2-1,r,i)+1)/2}},Ky={steps:hg,"step-start":function(e){return hg(e,[1,"start"])},"step-end":function(e){return hg(e,[1,"end"])},linear:function(e){return e},"cubic-bezier":Zy,ease:function(e){return Zy(e,[.25,.1,.25,1])},in:Ih,out:Ka(Ih),"in-out":Xa(Ih),"out-in":Ya(Ih),"in-quad":Mh,"out-quad":Ka(Mh),"in-out-quad":Xa(Mh),"out-in-quad":Ya(Mh),"in-cubic":Ah,"out-cubic":Ka(Ah),"in-out-cubic":Xa(Ah),"out-in-cubic":Ya(Ah),"in-quart":Th,"out-quart":Ka(Th),"in-out-quart":Xa(Th),"out-in-quart":Ya(Th),"in-quint":Sh,"out-quint":Ka(Sh),"in-out-quint":Xa(Sh),"out-in-quint":Ya(Sh),"in-expo":Ph,"out-expo":Ka(Ph),"in-out-expo":Xa(Ph),"out-in-expo":Ya(Ph),"in-sine":Oh,"out-sine":Ka(Oh),"in-out-sine":Xa(Oh),"out-in-sine":Ya(Oh),"in-circ":Ch,"out-circ":Ka(Ch),"in-out-circ":Xa(Ch),"out-in-circ":Ya(Ch),"in-back":Dh,"out-back":Ka(Dh),"in-out-back":Xa(Dh),"out-in-back":Ya(Dh),"in-bounce":Lh,"out-bounce":Ka(Lh),"in-out-bounce":Xa(Lh),"out-in-bounce":Ya(Lh),"in-elastic":Rh,"out-elastic":Ka(Rh),"in-out-elastic":Xa(Rh),"out-in-elastic":Ya(Rh),spring:Yu,"spring-in":Yu,"spring-out":Ka(Yu),"spring-in-out":Xa(Yu),"spring-out-in":Ya(Yu)},QS=function(e){return YS(e).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},JS=function(e){return Ky[QS(e)]||Ky.linear},qS=function(e){return e},$S=1,eP=.5,Xy=0;function Yy(n,e){return function(t){if(t>=1)return 1;var r=1/n;return t+=e*r,t-t%r}}var Nh="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",tP=new RegExp("cubic-bezier\\(".concat(Nh,",").concat(Nh,",").concat(Nh,",").concat(Nh,"\\)")),nP=/steps\(\s*(\d+)\s*\)/,rP=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function fg(n){var e=tP.exec(n);if(e)return cg.apply(void 0,(0,C.Z)(e.slice(1).map(Number)));var t=nP.exec(n);if(t)return Yy(Number(t[1]),Xy);var r=rP.exec(n);return r?Yy(Number(r[1]),{start:$S,middle:eP,end:Xy}[r[2]]):JS(n)}function iP(n){return Math.abs(aP(n)/(n.playbackRate||1))}function aP(n){var e;return n.duration===0||n.iterations===0?0:(n.duration==="auto"?0:Number(n.duration))*((e=n.iterations)!==null&&e!==void 0?e:1)}var Qy=0,dg=1,Bh=2,Jy=3;function sP(n,e,t){if(e===null)return Qy;var r=t.endTime;return e<Math.min(t.delay,r)?dg:e>=Math.min(t.delay+n+t.endDelay,r)?Bh:Jy}function oP(n,e,t,r,i){switch(r){case dg:return e==="backwards"||e==="both"?0:null;case Jy:return t-i;case Bh:return e==="forwards"||e==="both"?n:null;case Qy:return null}}function lP(n,e,t,r,i){var a=i;return n===0?e!==dg&&(a+=t):a+=r/n,a}function uP(n,e,t,r,i,a){var s=n===1/0?e%1:n%1;return s===0&&t===Bh&&r!==0&&(i!==0||a===0)&&(s=1),s}function cP(n,e,t,r){return n===Bh&&e===1/0?1/0:t===1?Math.floor(r)-1:Math.floor(r)}function hP(n,e,t){var r=n;if(n!=="normal"&&n!=="reverse"){var i=e;n==="alternate-reverse"&&(i+=1),r="normal",i!==1/0&&i%2!==0&&(r="reverse")}return r==="normal"?t:1-t}function fP(n,e,t){var r=sP(n,e,t),i=oP(n,t.fill,e,r,t.delay);if(i===null)return null;var a=t.duration==="auto"?0:t.duration,s=lP(a,r,t.iterations,i,t.iterationStart),o=uP(s,t.iterationStart,r,t.iterations,i,a),l=cP(r,t.iterations,o,s),u=hP(t.direction,l,o);return t.currentIteration=l,t.progress=u,t.easingFunction(u)}function dP(n,e,t){var r=vP(n,e),i=gP(r,t);return function(a,s){if(s!==null)i.filter(function(l){return s>=l.applyFrom&&s<l.applyTo}).forEach(function(l){var u=s-l.startOffset,h=l.endOffset-l.startOffset,v=h===0?0:u/h;a.setAttribute(l.property,l.interpolation(v),!1,!1)});else for(var o in r)qy(o)&&a.setAttribute(o,null)}}function qy(n){return n!=="offset"&&n!=="easing"&&n!=="composite"&&n!=="computedOffset"}function vP(n,e){for(var t={},r=0;r<n.length;r++)for(var i in n[r])if(qy(i)){var a={offset:n[r].offset,computedOffset:n[r].computedOffset,easing:n[r].easing,easingFunction:fg(n[r].easing)||e.easingFunction,value:n[r][i]};t[i]=t[i]||[],t[i].push(a)}return t}function gP(n,e){var t=[];for(var r in n)for(var i=n[r],a=0;a<i.length-1;a++){var s=a,o=a+1,l=i[s].computedOffset,u=i[o].computedOffset,h=l,v=u;a===0&&(h=-1/0,u===0&&(o=s)),a===i.length-2&&(v=1/0,l===1&&(s=o)),t.push({applyFrom:h,applyTo:v,startOffset:i[s].computedOffset,endOffset:i[o].computedOffset,easingFunction:i[s].easingFunction,property:r,interpolation:pP(r,i[s].value,i[o].value,e)})}return t.sort(function(E,D){return E.startOffset-D.startOffset}),t}var $y=function(e,t,r){return function(i){var a=e_(e,t,i);return sn(a)?a:r(a)}};function pP(n,e,t,r){var i=fy[n];if(i&&i.syntax&&i.int){var a=Wt.styleValueRegistry.getPropertySyntax(i.syntax);if(a){var s=a.parser,o=s?s(e,r):e,l=s?s(t,r):t,u=a.mixer(o,l,r);if(u){var h=$y.apply(void 0,(0,C.Z)(u));return function(v){return v===0?e:v===1?t:h(v)}}}}return $y(!1,!0,function(v){return v?t:e})}function e_(n,e,t){if(typeof n=="number"&&typeof e=="number")return n*(1-t)+e*t;if(typeof n=="boolean"&&typeof e=="boolean"||typeof n=="string"&&typeof e=="string")return t<.5?n:e;if(Array.isArray(n)&&Array.isArray(e)){for(var r=n.length,i=e.length,a=Math.max(r,i),s=[],o=0;o<a;o++)s.push(e_(n[o<r?o:r-1],e[o<i?o:i-1],t));return s}throw new Error("Mismatched interpolation arguments ".concat(n,":").concat(e))}var mP=function(){function n(){(0,b.Z)(this,n),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=qS,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return(0,U.Z)(n,[{key:"easing",get:function(){return this._easing},set:function(t){this.easingFunction=fg(t),this._easing=t}}])}();function yP(n){var e=[];for(var t in n)if(!(t in["easing","offset","composite"])){var r=n[t];Array.isArray(r)||(r=[r]);for(var i=r.length,a=0;a<i;a++){if(!e[a]){var s={};"offset"in n&&(s.offset=Number(n.offset)),"easing"in n&&(s.easing=n.easing),"composite"in n&&(s.composite=n.composite),e[a]=s}r[a]!==void 0&&r[a]!==null&&(e[a][t]=r[a])}}return e.sort(function(o,l){return(o.computedOffset||0)-(l.computedOffset||0)}),e}function t_(n,e){if(n===null)return[];Array.isArray(n)||(n=yP(n));for(var t=n.map(function(l){var u={};e!=null&&e.composite&&(u.composite="auto");for(var h in l){var v=l[h];if(h==="offset"){if(v!==null){if(v=Number(v),!isFinite(v))throw new Error("Keyframe offsets must be numbers.");if(v<0||v>1)throw new Error("Keyframe offsets must be between 0 and 1.");u.computedOffset=v}}else if(h==="composite"&&["replace","add","accumulate","auto"].indexOf(v)===-1)throw new Error("".concat(v," compositing is not supported"));u[h]=v}return u.offset===void 0&&(u.offset=null),u.easing===void 0&&(u.easing=(e==null?void 0:e.easing)||"linear"),u.composite===void 0&&(u.composite="auto"),u}),r=!0,i=-1/0,a=0;a<t.length;a++){var s=t[a].offset;if(xn(s))r=!1;else{if(s<i)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");i=s}}t=t.filter(function(l){return Number(l.offset)>=0&&Number(l.offset)<=1});function o(){var l,u=t,h=u.length;if(t[h-1].computedOffset=Number((l=t[h-1].offset)!==null&&l!==void 0?l:1),h>1){var v;t[0].computedOffset=Number((v=t[0].offset)!==null&&v!==void 0?v:0)}for(var E=0,D=Number(t[0].computedOffset),F=1;F<h;F++){var G=t[F].computedOffset;if(!xn(G)&&!xn(D)){for(var H=1;H<F-E;H++)t[E+H].computedOffset=D+(Number(G)-D)*H/(F-E);E=F,D=Number(G)}}}return r||o(),t}var _P="backwards|forwards|both|none".split("|"),EP="reverse|alternate|alternate-reverse".split("|");function xP(n,e){var t=new mP;return e&&(t.fill="both",t.duration="auto"),typeof n=="number"&&!isNaN(n)?t.duration=n:n!==void 0&&Object.keys(n).forEach(function(r){if(n[r]!==void 0&&n[r]!==null&&n[r]!=="auto"){if((typeof t[r]=="number"||r==="duration")&&(typeof n[r]!="number"||isNaN(n[r]))||r==="fill"&&_P.indexOf(n[r])===-1||r==="direction"&&EP.indexOf(n[r])===-1)return;t[r]=n[r]}}),t}function bP(n,e){return n=wP(n!=null?n:{duration:"auto"}),xP(n,e)}function wP(n){return typeof n=="number"&&(isNaN(n)?n={duration:"auto"}:n={duration:n}),n}var MP=function(){function n(e,t,r){var i=this;(0,b.Z)(this,n),this.composite="replace",this.iterationComposite="replace",this.target=e,this.timing=bP(r,!1),this.timing.effect=this,this.timing.activeDuration=iP(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=t_(t,this.timing),this.interpolations=dP(this.normalizedKeyframes,this.timing,this.target);var a=Wt.globalThis.Proxy;this.computedTiming=a?new a(this.timing,{get:function(o,l){return l==="duration"?o.duration==="auto"?0:o.duration:l==="fill"?o.fill==="auto"?"none":o.fill:l==="localTime"?i.animation&&i.animation.currentTime||null:l==="currentIteration"?!i.animation||i.animation.playState!=="running"?null:o.currentIteration||0:l==="progress"?!i.animation||i.animation.playState!=="running"?null:o.progress||0:o[l]},set:function(){return!0}}):this.timing}return(0,U.Z)(n,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(t){return t===null?!1:(this.timeFraction=fP(this.timing.activeDuration,t,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(t){this.normalizedKeyframes=t_(t)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(t){var r=this;Object.keys(t||{}).forEach(function(i){r.timing[i]=t[i]})}}])}();function n_(n,e){return Number(n.id)-Number(e.id)}var AP=function(){function n(e){var t=this;(0,b.Z)(this,n),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(r){t.currentTime=r,t.discardAnimations(),t.animations.length===0?t.timelineTicking=!1:t.requestAnimationFrame(t.webAnimationsNextTick)},this.processRafCallbacks=function(r){var i=t.rafCallbacks;t.rafCallbacks=[],r<Number(t.currentTime)&&(r=Number(t.currentTime)),t.animations.sort(n_),t.animations=t.tick(r,!0,t.animations)[0],i.forEach(function(a){a[1](r)}),t.applyPendingEffects()},this.document=e}return(0,U.Z)(n,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(t,r,i){var a=new MP(t,r,i),s=new WS(a,this);return this.animations.push(s),this.restartWebAnimationsNextTick(),s.updatePromises(),s.play(),s.updatePromises(),s}},{key:"applyDirtiedAnimation",value:function(t){var r=this;if(!this.inTick){t.markTarget();var i=t.targetAnimations();i.sort(n_);var a=this.tick(Number(this.currentTime),!1,i.slice())[1];a.forEach(function(s){var o=r.animations.indexOf(s);o!==-1&&r.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(t){t==null||t.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(t){return t.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(t){return t.playState!=="finished"&&t.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(t){var r=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([r,t]),r}},{key:"requestAnimationFrame",value:function(t){var r=this;return this.rAF(function(i){r.updateAnimationsPromises(),t(i),r.updateAnimationsPromises()})}},{key:"tick",value:function(t,r,i){var a=this,s,o;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=t,this.ticking=!1;var l=[],u=[],h=[],v=[];return i.forEach(function(E){E.tick(t,r),E._inEffect?(u.push(E.effect),E.markTarget()):(l.push(E.effect),E.unmarkTarget()),E._needsTick&&(a.ticking=!0);var D=E._inEffect||E._needsTick;E._inTimeline=D,D?h.push(E):v.push(E)}),(s=this.pendingEffects).push.apply(s,l),(o=this.pendingEffects).push.apply(o,u),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[h,v]}}])}();Wt.EasingFunction=fg,Wt.AnimationTimeline=AP;var r_=function(n){return xn(n)?"":n.toString()},TP=function(n){var e=r_(n);return e.charAt(0).toUpperCase()+e.substring(1)},kh=TP,SP=function(n){return typeof n=="object"&&n!==null},vg=SP,PP=function(n){return n!==null&&typeof n!="function"&&isFinite(n.length)},Qu=PP,gg=function(n,e){if(n===e)return!0;if(!n||!e||fr(n)||fr(e))return!1;if(Qu(n)||Qu(e)){if(n.length!==e.length)return!1;for(var t=!0,r=0;r<n.length&&(t=gg(n[r],e[r]),!!t);r++);return t}if(vg(n)||vg(e)){var i=Object.keys(n),a=Object.keys(e);if(i.length!==a.length)return!1;for(var t=!0,r=0;r<i.length&&(t=gg(n[i[r]],e[i[r]]),!!t);r++);return t}return!1},li=gg;const OP={duration:500},CP={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},H6={CHANGE:"change"};var Vr;(function(n){n.NodeAdded="NodeAdded",n.NodeUpdated="NodeUpdated",n.NodeRemoved="NodeRemoved",n.EdgeAdded="EdgeAdded",n.EdgeUpdated="EdgeUpdated",n.EdgeRemoved="EdgeRemoved",n.ComboAdded="ComboAdded",n.ComboUpdated="ComboUpdated",n.ComboRemoved="ComboRemoved"})(Vr||(Vr={}));var Ea;(function(n){n.DRAW="draw",n.COLLAPSE="collapse",n.EXPAND="expand",n.TRANSFORM="transform"})(Ea||(Ea={}));var Xs;(function(n){n.CLICK="canvas:click",n.DBLCLICK="canvas:dblclick",n.POINTER_OVER="canvas:pointerover",n.POINTER_LEAVE="canvas:pointerleave",n.POINTER_ENTER="canvas:pointerenter",n.POINTER_MOVE="canvas:pointermove",n.POINTER_OUT="canvas:pointerout",n.POINTER_DOWN="canvas:pointerdown",n.POINTER_UP="canvas:pointerup",n.CONTEXT_MENU="canvas:contextmenu",n.DRAG_START="canvas:dragstart",n.DRAG="canvas:drag",n.DRAG_END="canvas:dragend",n.DRAG_ENTER="canvas:dragenter",n.DRAG_OVER="canvas:dragover",n.DRAG_LEAVE="canvas:dragleave",n.DROP="canvas:drop",n.WHEEL="canvas:wheel"})(Xs||(Xs={}));var ll;(function(n){n.CLICK="combo:click",n.DBLCLICK="combo:dblclick",n.POINTER_OVER="combo:pointerover",n.POINTER_LEAVE="combo:pointerleave",n.POINTER_ENTER="combo:pointerenter",n.POINTER_MOVE="combo:pointermove",n.POINTER_OUT="combo:pointerout",n.POINTER_DOWN="combo:pointerdown",n.POINTER_UP="combo:pointerup",n.CONTEXT_MENU="combo:contextmenu",n.DRAG_START="combo:dragstart",n.DRAG="combo:drag",n.DRAG_END="combo:dragend",n.DRAG_ENTER="combo:dragenter",n.DRAG_OVER="combo:dragover",n.DRAG_LEAVE="combo:dragleave",n.DROP="combo:drop"})(ll||(ll={}));var Dt;(function(n){n.CLICK="click",n.DBLCLICK="dblclick",n.POINTER_OVER="pointerover",n.POINTER_LEAVE="pointerleave",n.POINTER_ENTER="pointerenter",n.POINTER_MOVE="pointermove",n.POINTER_OUT="pointerout",n.POINTER_DOWN="pointerdown",n.POINTER_UP="pointerup",n.CONTEXT_MENU="contextmenu",n.DRAG_START="dragstart",n.DRAG="drag",n.DRAG_END="dragend",n.DRAG_ENTER="dragenter",n.DRAG_OVER="dragover",n.DRAG_LEAVE="dragleave",n.DROP="drop",n.KEY_DOWN="keydown",n.KEY_UP="keyup",n.WHEEL="wheel",n.PINCH="pinch"})(Dt||(Dt={}));var Yl;(function(n){n.KEY_DOWN="keydown",n.KEY_UP="keyup"})(Yl||(Yl={}));var Fh;(function(n){n.CLICK="edge:click",n.DBLCLICK="edge:dblclick",n.POINTER_OVER="edge:pointerover",n.POINTER_LEAVE="edge:pointerleave",n.POINTER_ENTER="edge:pointerenter",n.POINTER_MOVE="edge:pointermove",n.POINTER_OUT="edge:pointerout",n.POINTER_DOWN="edge:pointerdown",n.POINTER_UP="edge:pointerup",n.CONTEXT_MENU="edge:contextmenu",n.DRAG_ENTER="edge:dragenter",n.DRAG_OVER="edge:dragover",n.DRAG_LEAVE="edge:dragleave",n.DROP="edge:drop"})(Fh||(Fh={}));var Zt;(function(n){n.BEFORE_CANVAS_INIT="beforecanvasinit",n.AFTER_CANVAS_INIT="aftercanvasinit",n.BEFORE_SIZE_CHANGE="beforesizechange",n.AFTER_SIZE_CHANGE="aftersizechange",n.BEFORE_ELEMENT_CREATE="beforeelementcreate",n.AFTER_ELEMENT_CREATE="afterelementcreate",n.BEFORE_ELEMENT_UPDATE="beforeelementupdate",n.AFTER_ELEMENT_UPDATE="afterelementupdate",n.BEFORE_ELEMENT_DESTROY="beforeelementdestroy",n.AFTER_ELEMENT_DESTROY="afterelementdestroy",n.BEFORE_ELEMENT_TRANSLATE="beforeelementtranslate",n.AFTER_ELEMENT_TRANSLATE="afterelementtranslate",n.BEFORE_DRAW="beforedraw",n.AFTER_DRAW="afterdraw",n.BEFORE_RENDER="beforerender",n.AFTER_RENDER="afterrender",n.BEFORE_ANIMATE="beforeanimate",n.AFTER_ANIMATE="afteranimate",n.BEFORE_LAYOUT="beforelayout",n.AFTER_LAYOUT="afterlayout",n.BEFORE_STAGE_LAYOUT="beforestagelayout",n.AFTER_STAGE_LAYOUT="afterstagelayout",n.BEFORE_TRANSFORM="beforetransform",n.AFTER_TRANSFORM="aftertransform",n.BATCH_START="batchstart",n.BATCH_END="batchend",n.BEFORE_DESTROY="beforedestroy",n.AFTER_DESTROY="afterdestroy",n.BEFORE_RENDERER_CHANGE="beforerendererchange",n.AFTER_RENDERER_CHANGE="afterrendererchange"})(Zt||(Zt={}));var xo;(function(n){n.UNDO="undo",n.REDO="redo",n.CANCEL="cancel",n.ADD="add",n.CLEAR="clear",n.CHANGE="change"})(xo||(xo={}));var Qa;(function(n){n.CLICK="node:click",n.DBLCLICK="node:dblclick",n.POINTER_OVER="node:pointerover",n.POINTER_LEAVE="node:pointerleave",n.POINTER_ENTER="node:pointerenter",n.POINTER_MOVE="node:pointermove",n.POINTER_OUT="node:pointerout",n.POINTER_DOWN="node:pointerdown",n.POINTER_UP="node:pointerup",n.CONTEXT_MENU="node:contextmenu",n.DRAG_START="node:dragstart",n.DRAG="node:drag",n.DRAG_END="node:dragend",n.DRAG_ENTER="node:dragenter",n.DRAG_OVER="node:dragover",n.DRAG_LEAVE="node:dragleave",n.DROP="node:drop"})(Qa||(Qa={}));const Dr="combo",Da="tree";var Ju;(function(n){n.NODE="node",n.EDGE="edge",n.COMBO="combo",n.THEME="theme",n.PALETTE="palette",n.LAYOUT="layout",n.BEHAVIOR="behavior",n.PLUGIN="plugin",n.ANIMATION="animation",n.TRANSFORM="transform",n.SHAPE="shape"})(Ju||(Ju={}));const pg={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function Ys(n,e){var t;const r=(t=pg[n])===null||t===void 0?void 0:t[e];if(r)return r}function j6(n){return EXTENSION_REGISTRY[n]}const DP="5.0.45",LP="G6";function Qs(n){return`[${LP} v${DP}] ${n}`}const xa={mute:!1,debug:n=>{!xa.mute&&console.debug(Qs(n))},info:n=>{!xa.mute&&console.info(Qs(n))},warn:n=>{!xa.mute&&console.warn(Qs(n))},error:n=>{!xa.mute&&console.error(Qs(n))}};function i_(n){const{theme:e}=n;if(!e)return{};const t=Ys(Ju.THEME,e);return t||(xa.warn(`The theme of ${e} is not registered.`),{})}function mg(n,e){if(Array.isArray(n)&&n.length===0)return null;const t=Array.isArray(n)?n[0]:n,r=Array.isArray(n)?n.slice(1):e||[];return new Proxy(t,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...s)=>{i[a](...s),r.forEach(o=>{var l;return(l=o[a])===null||l===void 0?void 0:l.call(o,...s)})}:a==="finished"?Promise.all([t.finished,...r.map(s=>s.finished)]):Reflect.get(i,a)},set(i,a,s){return["onframe","onfinish"].includes(a)||r.forEach(o=>{o[a]=s}),Reflect.set(i,a,s)}})}function yg(n){const e=n.reduce((r,i)=>(Object.entries(i).forEach(([a,s])=>{r[a]===void 0?r[a]=[s]:r[a].push(s)}),r),{});Object.entries(e).forEach(([r,i])=>{(i.length!==n.length||i.some(a=>xn(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(r)&&li(a,i[0])))&&delete e[r]});const t=Object.entries(e).reduce((r,[i,a])=>(a.forEach((s,o)=>{r[o]?r[o][i]=s:r[o]={[i]:s}}),r),[]);return n.length!==0&&t.length===0&&t.push({_:0},{_:0}),t}function qu(n){switch(n){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 a_(n,e){const{animation:t}=n;if(t===!1||e===!1)return!1;const r=Object.assign({},OP);return si(t)&&Object.assign(r,t),si(e)&&Object.assign(r,e),r}function RP(n){if(typeof n=="string"){const e=Ys(Ju.ANIMATION,n);return e||(xa.warn(`The animation of ${n} is not registered.`),[])}return n}function IP(n,e,t,r){var i,a;const{animation:s}=n;if(s===!1||r===!1)return[];const o=(i=n==null?void 0:n[e])===null||i===void 0?void 0:i.animation;if(o===!1)return[];const l=o==null?void 0:o[t];if(l===!1)return[];const u=(a=i_(n)[e])===null||a===void 0?void 0:a.animation,h=(E=[])=>RP(E).map(D=>Object.assign(Object.assign(Object.assign(Object.assign({},CP),si(s)&&s),D),si(r)&&r));if(l)return h(l);if(!u)return[];const v=u[t];return v===!1?[]:h(v)}function s_(n,e,t,r=[]){if(!r&&n===0&&e===0&&t===0)return null;if(Array.isArray(r)){let a=-1;const s=[];for(let o=0;o<r.length;o++){const l=r[o];if(l[0]==="translate"){if(l[1]===n&&l[2]===e)return null;a=o,s.push(["translate",n,e])}else if(l[0]==="translate3d"){if(l[1]===n&&l[2]===e&&l[3]===t)return null;a=o,s.push(["translate3d",n,e,t!=null?t:0])}else s.push(l)}return a===-1&&s.splice(0,0,sn(t)?["translate3d",n,e,t!=null?t:0]:["translate",n,e]),s.length===0?null:s}const i=r?r.replace(/translate(3d)?\([^)]*\)/g,""):"";return t===0?`translate(${n}, ${e})${i}`:`translate3d(${n}, ${e}, ${t})${i}`}var NP=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};const BP=(n,e,t)=>{if(!t.length)return null;const[r,i]=e,a=u=>{var h;if(u){const v=n.getShape(u);if(!v)return null;const E=`get${kh(u)}Style`,D=((h=n==null?void 0:n[E])===null||h===void 0?void 0:h.bind(n))||(H=>H),F=(D==null?void 0:D(r))||{},G=(D==null?void 0:D(i))||{};return{shape:v,fromStyle:F,toStyle:G}}else return{shape:n,fromStyle:r,toStyle:i}};let s;const o=t.map(u=>{var{fields:h,shape:v,states:E}=u,D=NP(u,["fields","shape","states"]);const F=a(v);if(!F)return null;const{shape:G,fromStyle:H,toStyle:K}=F,q=[{},{}];if(h.forEach(ue=>{var le,he;Object.assign(q[0],{[ue]:(le=H[ue])!==null&&le!==void 0?le:qu(ue)}),Object.assign(q[1],{[ue]:(he=K[ue])!==null&&he!==void 0?he:qu(ue)})}),q.some(ue=>Object.keys(ue).some(le=>["x","y","z"].includes(le)))){const{x:ue=0,y:le=0,z:he,transform:ve=""}=G.attributes||{};q.forEach(ge=>{var Te,Oe,Ne;ge.transform=s_((Te=ge.x)!==null&&Te!==void 0?Te:ue,(Oe=ge.y)!==null&&Oe!==void 0?Oe:le,(Ne=ge.z)!==null&&Ne!==void 0?Ne:he,ve)})}const te=G.animate(yg(q),D);return v===void 0&&(s=te),te}).filter(Boolean),l=s||(o==null?void 0:o[0]);return l?mg(l,o.filter(u=>u!==u)):null},kP=[{fields:["opacity"]}],FP=[{fields:["x","y"]}],o_=[{fields:["x","y"]}],zP=o_,l_=[{fields:["sourceNode","targetNode"]}],UP=l_,u_=[{fields:["childrenNode","x","y"]}],WP=u_,V6=[{fields:["childrenNode","x","y"]}];var GP=Object.prototype.hasOwnProperty;function HP(n,e){if(!e||!Sa(n))return{};for(var t={},r=fn(e)?e:function(o){return o[e]},i,a=0;a<n.length;a++){var s=n[a];i=r(s),GP.call(t,i)?t[i].push(s):t[i]=[s]}return t}var zh=HP,c_=function(n,e,t){var r,i,a,s,o=0;t||(t={});var l=function(){o=t.leading===!1?0:Date.now(),r=null,s=n.apply(i,a),r||(i=a=null)},u=function(){var h=Date.now();!o&&t.leading===!1&&(o=h);var v=e-(h-o);return i=this,a=arguments,v<=0||v>e?(r&&(clearTimeout(r),r=null),o=h,s=n.apply(i,a),r||(i=a=null)):!r&&t.trailing!==!1&&(r=setTimeout(l,v)),s};return u.cancel=function(){clearTimeout(r),o=0,r=i=a=null},u},_g=function(n){if(typeof n!="object"||n===null)return n;var e;if(Sa(n)){e=[];for(var t=0,r=n.length;t<r;t++)typeof n[t]=="object"&&n[t]!=null?e[t]=_g(n[t]):e[t]=n[t]}else{e={};for(var i in n)typeof n[i]=="object"&&n[i]!=null?e[i]=_g(n[i]):e[i]=n[i]}return e},Ql=_g;function jP(n){return"source"in n&&"target"in n}function VP(n){return n.length===2}function Z6(n){return n.length===3}function Jl(n){return n instanceof Float32Array?!0:Array.isArray(n)&&(n.length===2||n.length===3)?n.every(e=>typeof e=="number"):!1}function Is(n,e,t){return n>=e&&n<=t}function cs(n=0){if(Array.isArray(n)){const[e=0,t=e,r=e,i=t]=n;return[e,t,r,i]}return[n,n,n,n]}function ZP(n=0){const e=cs(n);return e[0]+e[2]}function K6(n=0){const e=cs(n);return e[1]+e[3]}function Ns(n){return n.max[0]-n.min[0]}function Bs(n){return n.max[1]-n.min[1]}function bo(n){return[Ns(n),Bs(n)]}function wo(n,e){const t=Jl(n)?Eg(n):n.getShape("key").getBounds();return e?Mo(t,e):t}function Eg(n){const[e,t,r=0]=n,i=new Ir;return i.setMinMax([e,t,r],[e,t,r]),i}function Mo(n,e){const[t,r,i,a]=cs(e),[s,o,l]=n.min,[u,h,v]=n.max,E=new Ir;return E.setMinMax([s-a,o-t,l],[u+r,h+i,v]),E}function $u(n){if(n.length===0)return new Ir;if(n.length===1)return n[0];const e=new Ir;e.setMinMax(n[0].min,n[0].max);for(let t=1;t<n.length;t++){const r=n[t];e.setMinMax([Math.min(e.min[0],r.min[0]),Math.min(e.min[1],r.min[1]),Math.min(e.min[2],r.min[2])],[Math.max(e.max[0],r.max[0]),Math.max(e.max[1],r.max[1]),Math.max(e.max[2],r.max[2])])}return e}function KP(n,e){const[t,r]=n.min,[i,a]=n.max,[s,o]=e.min,[l,u]=e.max;return t>=s&&i<=l&&r>=o&&a<=u}function hs(n,e){return Is(n[0],e.min[0],e.max[0])&&Is(n[1],e.min[1],e.max[1])}function h_(n,e,t=!1){const{min:[r,i],max:[a,s]}=e,o=(n[1]===i||n[1]===s)&&(t||Is(n[0],r,a)),l=(n[0]===r||n[0]===a)&&(t||Is(n[1],i,s));return o||l}function XP(n,e){return!hs(n,e)}function Uh(n,e){const{center:t}=e;return n[0]===t[0]&&n[1]===t[1]}function ec(n,e){const[t,r]=n,[i,a]=e.min,[s,o]=e.max,l=t-i,u=s-t,h=r-a,v=o-r,E=Math.min(l,u,h,v);return E===l?"left":E===u?"right":E===h?"top":E===v?"bottom":"left"}function ul(n,e){const t=Ql(n);if(hs(n,e))switch(ec(n,e)){case"left":t[0]=e.min[0];break;case"right":t[0]=e.max[0];break;case"top":t[1]=e.min[1];break;case"bottom":t[1]=e.max[1];break}else{const[r,i]=n,[a,s]=e.min,[o,l]=e.max;t[0]=Is(r,a,o)?r:r<a?a:o,t[1]=Is(i,s,l)?i:i<s?s:l}return t}function YP(n,e){const{center:t}=n,[r,i]=bo(n),a=e==="up"||e==="down"?t[0]:e==="right"?t[0]-r/6:t[0]+r/6,s=e==="left"||e==="right"?t[1]:e==="down"?t[1]-i/6:t[1]+i/6;return[a,s]}function QP(n,e){let[t,r]=bo(n);return[t,r]=e==="up"||e==="down"?[t,r]:[r,t],(Math.pow(r,2)-Math.pow(Math.sqrt(Math.pow(t/2,2)+Math.pow(r,2))-t/2,2))/(2*r)}function JP(n){const{min:[e,t],max:[r,i]}=n,a=[e,i],s=[r,i],o=[r,t],l=[e,t];return[[a,s],[s,o],[o,l],[l,a]]}var qP=function(e,t){var r=e.nodes,i=e.edges,a=[],s={};if(!r)throw new Error("invalid nodes data!");return r&&r.forEach(function(o,l){s[o.id]=l;var u=[];a.push(u)}),i&&i.forEach(function(o){var l=o.source,u=o.target,h=s[l],v=s[u];!h&&h!==0||!v&&v!==0||(a[h][v]=1,t||(a[v][h]=1))}),a},Wh=qP,$P=function(e,t){return e===t},f_=function(){function n(e,t){t===void 0&&(t=null),this.value=e,this.next=t}return n.prototype.toString=function(e){return e?e(this.value):"".concat(this.value)},n}(),eO=function(){function n(e){e===void 0&&(e=$P),this.head=null,this.tail=null,this.compare=e}return n.prototype.prepend=function(e){var t=new f_(e,this.head);return this.head=t,this.tail||(this.tail=t),this},n.prototype.append=function(e){var t=new f_(e);return this.head?(this.tail.next=t,this.tail=t,this):(this.head=t,this.tail=t,this)},n.prototype.delete=function(e){if(!this.head)return null;for(var t=null;this.head&&this.compare(this.head.value,e);)t=this.head,this.head=this.head.next;var r=this.head;if(r!==null)for(;r.next;)this.compare(r.next.value,e)?(t=r.next,r.next=r.next.next):r=r.next;return this.compare(this.tail.value,e)&&(this.tail=r),t},n.prototype.find=function(e){var t=e.value,r=t===void 0?void 0:t,i=e.callback,a=i===void 0?void 0:i;if(!this.head)return null;for(var s=this.head;s;){if(a&&a(s.value)||r!==void 0&&this.compare(s.value,r))return s;s=s.next}return null},n.prototype.deleteTail=function(){var e=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,e;for(var t=this.head;t.next;)t.next.next?t=t.next:t.next=null;return this.tail=t,e},n.prototype.deleteHead=function(){if(!this.head)return null;var e=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),e},n.prototype.fromArray=function(e){var t=this;return e.forEach(function(r){return t.append(r)}),this},n.prototype.toArray=function(){for(var e=[],t=this.head;t;)e.push(t),t=t.next;return e},n.prototype.reverse=function(){for(var e=this.head,t=null,r=null;e;)r=e.next,e.next=t,t=e,e=r;this.tail=this.head,this.head=t},n.prototype.toString=function(e){return e===void 0&&(e=void 0),this.toArray().map(function(t){return t.toString(e)}).toString()},n}(),d_=eO,tO=function(){function n(){this.linkedList=new d_}return n.prototype.isEmpty=function(){return!this.linkedList.head},n.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},n.prototype.enqueue=function(e){this.linkedList.append(e)},n.prototype.dequeue=function(){var e=this.linkedList.deleteHead();return e?e.value:null},n.prototype.toString=function(e){return this.linkedList.toString(e)},n}(),nO=tO,Ja=function(e,t,r){t===void 0&&(t=[]);var i=t.filter(function(l){return l.source===e||l.target===e});if(r==="target"){var a=function(u){return u.source===e};return i.filter(a).map(function(l){return l.target})}if(r==="source"){var s=function(u){return u.target===e};return i.filter(s).map(function(l){return l.source})}var o=function(u){return u.source===e?u.target:u.source};return i.map(o)},rO=function(e,t){return t.filter(function(r){return r.source===e})},Gh=function(e,t){return t.filter(function(r){return r.source===e||r.target===e})},v_=function(e){e===void 0&&(e=0);var t="".concat(Math.random()).split(".")[1].substr(0,5),r="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(e,"-").concat(t).concat(r)};function iO(n){n===void 0&&(n={});var e=n,t=function(){},r=function(){var i={};return function(a){var s=a.next,o=s;return i[o]?!1:(i[o]=!0,!0)}}();return e.allowTraversal=n.allowTraversal||r,e.enter=n.enter||t,e.leave=n.leave||t,e}var aO=function(e,t,r,i){i===void 0&&(i=!0);var a=iO(r),s=new nO,o=e.edges,l=o===void 0?[]:o;s.enqueue(t);for(var u="",h=function(){var E=s.dequeue();a.enter({current:E,previous:u}),Ja(E,l,i?"target":void 0).forEach(function(D){a.allowTraversal({previous:u,current:E,next:D})&&s.enqueue(D)}),a.leave({current:E,previous:u}),u=E};!s.isEmpty();)h()},sO=aO,oO=function(e){for(var t=e.nodes,r=t===void 0?[]:t,i=e.edges,a=i===void 0?[]:i,s=[],o={},l=[],u=function D(F){l.push(F),o[F.id]=!0;for(var G=Ja(F.id,a),H=function(te){var ue=G[te];if(!o[ue]){var le=r.filter(function(he){return he.id===ue});le.length>0&&D(le[0])}},K=0;K<G.length;++K)H(K)},h=0;h<r.length;h++){var v=r[h];if(!o[v.id]){u(v);for(var E=[];l.length>0;)E.push(l.pop());s.push(E)}}return s},g_=function(e){for(var t=e.nodes,r=t===void 0?[]:t,i=e.edges,a=i===void 0?[]:i,s=[],o={},l={},u={},h=[],v=0,E=function H(K){l[K.id]=v,u[K.id]=v,v+=1,s.push(K),o[K.id]=!0;for(var q=Ja(K.id,a,"target").filter(function(ve){return r.map(function(ge){return ge.id}).indexOf(ve)>-1}),te=function(ge){var Te=q[ge];if(!l[Te]&&l[Te]!==0){var Oe=r.filter(function(Ne){return Ne.id===Te});Oe.length>0&&H(Oe[0]),u[K.id]=Math.min(u[K.id],u[Te])}else o[Te]&&(u[K.id]=Math.min(u[K.id],l[Te]))},ue=0;ue<q.length;ue++)te(ue);if(u[K.id]===l[K.id]){for(var le=[];s.length>0;){var he=s.pop();if(o[he.id]=!1,le.push(he),he===K)break}le.length>0&&h.push(le)}},D=0,F=r;D<F.length;D++){var G=F[D];!l[G.id]&&l[G.id]!==0&&E(G)}return h};function p_(n,e){return e?g_(n):oO(n)}var tc=function(e){var t={},r=e.nodes,i=r===void 0?[]:r,a=e.edges,s=a===void 0?[]:a;return i.forEach(function(o){t[o.id]={degree:0,inDegree:0,outDegree:0}}),s.forEach(function(o){t[o.source].degree++,t[o.source].outDegree++,t[o.target].degree++,t[o.target].inDegree++}),t},xg=tc,lO=function(e,t){var r=tc(e);return r[t]?tc(e)[t].inDegree:0},uO=function(e,t){var r=tc(e);return r[t]?tc(e)[t].outDegree:0};function cO(n){n===void 0&&(n={});var e=n,t=function(){},r=function(){var i={};return function(a){var s=a.next;return i[s]?!1:(i[s]=!0,!0)}}();return e.allowTraversal=n.allowTraversal||r,e.enter=n.enter||t,e.leave=n.leave||t,e}function m_(n,e,t,r,i){i===void 0&&(i=!0),r.enter({current:e,previous:t});var a=n.edges,s=a===void 0?[]:a;Ja(e,s,i?"target":void 0).forEach(function(o){r.allowTraversal({previous:t,current:e,next:o})&&m_(n,o,e,r,i)}),r.leave({current:e,previous:t})}function y_(n,e,t,r){r===void 0&&(r=!0),m_(n,e,"",cO(t),r)}var hO=function(e){var t=null,r=e.nodes,i=r===void 0?[]:r,a={},s={},o={},l={};i.forEach(function(v){s[v.id]=v});for(var u={enter:function(E){var D=E.current,F=E.previous;if(o[D]){t={};for(var G=D,H=F;H!==D;)t[G]=H,G=H,H=a[H];t[G]=H}else o[D]=D,delete s[D],a[D]=F},leave:function(E){var D=E.current;l[D]=D,delete o[D]},allowTraversal:function(E){var D=E.next;return t?!1:!l[D]}};Object.keys(s).length;){var h=Object.keys(s)[0];y_(e,h,u)}return t},__=function(e,t,r){var i,a;r===void 0&&(r=!0);for(var s=[],o=p_(e,!1),l=0,u=o;l<u.length;l++){var h=u[l];if(h.length)for(var v=h[0],E=v.id,D=[v],F=(i={},i[E]=v,i),G=(a={},a[E]=new Set,a);D.length>0;)for(var H=D.pop(),K=H.id,q=Ja(K,e.edges),te=function(he){var ve,ge=q[he],Te=e.nodes.find(function(st){return st.id===ge});if(ge===K)s.push((ve={},ve[ge]=H,ve));else if(!(ge in G))F[ge]=H,D.push(Te),G[ge]=new Set([H]);else if(!G[K].has(Te)){for(var Oe=!0,Ne=[Te,H],ze=F[K];G[ge].size&&!G[ge].has(ze)&&(Ne.push(ze),ze!==F[ze.id]);)ze=F[ze.id];if(Ne.push(ze),t&&r?(Oe=!1,Ne.findIndex(function(st){return t.indexOf(st.id)>-1})>-1&&(Oe=!0)):t&&!r&&Ne.findIndex(function(st){return t.indexOf(st.id)>-1})>-1&&(Oe=!1),Oe){for(var Xe={},Je=1;Je<Ne.length;Je+=1)Xe[Ne[Je-1].id]=Ne[Je];Ne.length&&(Xe[Ne[Ne.length-1].id]=Ne[0]),s.push(Xe)}G[ge].add(H)}},ue=0;ue<q.length;ue+=1)te(ue)}return s},E_=function(e,t,r){r===void 0&&(r=!0);for(var i=[],a=new Set,s=[],o=[],l={},u={},h=function(ze){for(var Xe=[ze];Xe.length>0;){var Je=Xe.pop();a.has(Je)&&(a.delete(Je),s[Je.id].forEach(function(st){Xe.push(st)}),s[Je.id].clear())}},v=function Ne(ze,Xe,Je){var st=!1;if(t&&r===!1&&t.indexOf(ze.id)>-1)return st;i.push(ze),a.add(ze);for(var Et=Je[ze.id],mt=0;mt<Et.length;mt+=1){var ct=l[Et[mt]];if(ct===Xe){for(var ht={},At=1;At<i.length;At+=1)ht[i[At-1].id]=i[At];i.length&&(ht[i[i.length-1].id]=i[0]),o.push(ht),st=!0}else a.has(ct)||Ne(ct,Xe,Je)&&(st=!0)}if(st)h(ze);else for(var mt=0;mt<Et.length;mt+=1){var ct=l[Et[mt]];s[ct.id].has(ze)||s[ct.id].add(ze)}return i.pop(),st},E=e.nodes,D=E===void 0?[]:E,F=0;F<D.length;F+=1){var G=D[F],H=G.id;u[H]=F,l[F]=G}if(t&&r)for(var K=function(ze){var Xe=t[ze];u[D[ze].id]=u[Xe],u[Xe]=0,l[0]=D.find(function(Je){return Je.id===Xe}),l[u[D[ze].id]]=D[ze]},F=0;F<t.length;F++)K(F);for(var q=function(ze){for(var Xe,Je,st=1/0,Et=0;Et<ze.length;Et+=1)for(var mt=ze[Et],ct=0;ct<mt.length;ct++){var ht=u[mt[ct].id];ht<st&&(st=ht,Je=Et)}for(var At=ze[Je],kt=[],Et=0;Et<At.length;Et+=1){var Ht=At[Et];kt[Ht.id]=[];for(var en=0,on=Ja(Ht.id,e.edges,"target").filter(function(An){return At.map(function(kn){return kn.id}).indexOf(An)>-1});en<on.length;en++){var tn=on[en];tn===Ht.id&&!(r===!1&&t.indexOf(Ht.id)>-1)?o.push((Xe={},Xe[Ht.id]=Ht,Xe)):kt[Ht.id].push(u[tn])}}return{component:At,adjList:kt,minIdx:st}},te=0;te<D.length;){var ue=D.filter(function(Ne){return u[Ne.id]>=te}),le=g_({nodes:ue,edges:e.edges}).filter(function(Ne){return Ne.length>1});if(le.length===0)break;var he=q(le),ve=he.minIdx,ge=he.adjList,Te=he.component;if(Te.length>1){Te.forEach(function(Ne){s[Ne.id]=new Set});var Oe=l[ve];if(t&&r&&t.indexOf(Oe.id)===-1)return o;v(Oe,Oe,ge),te=ve+1}else break}return o},fO=function(e,t,r,i){return i===void 0&&(i=!0),t?E_(e,r,i):__(e,r,i)},x_=hO,dO={}.toString,vO=function(n,e){return dO.call(n)==="[object "+e+"]"},Hh=vO,bg=function(n){return Hh(n,"Function")},wg=function(n){return Array.isArray?Array.isArray(n):Hh(n,"Array")},gO=function(n){var e=typeof n;return n!==null&&e==="object"||e==="function"};function pO(n,e){if(n){var t;if(wg(n))for(var r=0,i=n.length;r<i&&(t=e(n[r],r),t!==!1);r++);else if(gO(n)){for(var a in n)if(n.hasOwnProperty(a)&&(t=e(n[a],a),t===!1))break}}}var b_=pO,X6=Object.keys?function(n){return Object.keys(n)}:function(n){var e=[];return b_(n,function(t,r){bg(n)&&r==="prototype"||e.push(r)}),e},Y6=null;function Q6(n,e){var t=keys(e),r=t.length;if(isNil(n))return!r;for(var i=0;i<r;i+=1){var a=t[i];if(e[a]!==n[a]||!(a in n))return!1}return!0}var J6=null,q6=function(n){if(!isObjectLike(n)||!isType(n,"Object"))return!1;if(Object.getPrototypeOf(n)===null)return!0;for(var e=n;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(n)===e},$6=null;function eU(n,e){if(!isArray(n))return null;var t;if(isFunction(e)&&(t=e),isPlainObject(e)&&(t=function(i){return isMatch(i,e)}),t){for(var r=0;r<n.length;r+=1)if(t(n[r]))return n[r]}return null}var tU=null,nU=function(n,e){for(var t=null,r=0;r<n.length;r++){var i=n[r],a=i[e];if(!isNil(a)){isArray(a)?t=a[0]:t=a;break}}return t},rU=null,iU=function(n){if(!isArray(n))return[];for(var e=[],t=0;t<n.length;t++)e=e.concat(n[t]);return e},aU=null,mO=function(n,e){if(e===void 0&&(e=[]),!isArray(n))e.push(n);else for(var t=0;t<n.length;t+=1)mO(n[t],e);return e},sU=null,oU=function(n){if(isArray(n))return n.reduce(function(e,t){return Math.max(e,t)},n[0])},lU=function(n){if(isArray(n))return n.reduce(function(e,t){return Math.min(e,t)},n[0])},uU=function(n){var e=n.filter(function(s){return!isNaN(s)});if(!e.length)return{min:0,max:0};if(isArray(n[0])){for(var t=[],r=0;r<n.length;r++)t=t.concat(n[r]);e=t}var i=getMax(e),a=getMin(e);return{min:a,max:i}},cU=null,w_=Array.prototype,yO=w_.splice,_O=w_.indexOf,hU=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var r=0;r<e.length;r++)for(var i=e[r],a=-1;(a=_O.call(n,i))>-1;)yO.call(n,a,1);return n},fU=null,EO=Array.prototype.splice,dU=function(e,t){if(!isArrayLike(e))return[];for(var r=e?t.length:0,i=r-1;r--;){var a=void 0,s=t[r];(r===i||s!==a)&&(a=s,EO.call(e,s,1))}return e},vU=null,gU=function(n,e,t){if(!isArray(n)&&!isPlainObject(n))return n;var r=t;return each(n,function(i,a){r=e(r,i,a)}),r},pU=null,mU=function(n,e){var t=[];if(!isArrayLike(n))return t;for(var r=-1,i=[],a=n.length;++r<a;){var s=n[r];e(s,r,n)&&(t.push(s),i.push(r))}return pullAt(n,i),t},yU=null,Mg=function(n){return Hh(n,"String")};function _U(n,e){var t;if(isFunction(e))t=function(i,a){return e(i)-e(a)};else{var r=[];isString(e)?r.push(e):isArray(e)&&(r=e),t=function(i,a){for(var s=0;s<r.length;s+=1){var o=r[s];if(i[o]>a[o])return 1;if(i[o]<a[o])return-1}return 0}}return n.sort(t),n}var EU=null;function Ag(n,e){e===void 0&&(e=new Map);var t=[];if(Array.isArray(n))for(var r=0,i=n.length;r<i;r++){var a=n[r];e.has(a)||(t.push(a),e.set(a,!0))}return t}var xU=function(n,e){for(var t=[],r={},i=0;i<n.length;i++){var a=n[i],s=a[e];if(!isNil(s)){isArray(s)||(s=[s]);for(var o=0;o<s.length;o++){var l=s[o];r[l]||(t.push(l),r[l]=!0)}}}return t};function bU(n,e){return isArray(n)||isString(n)?n[0]===e:!1}var wU=null;function MU(n,e){return isArray(n)||isString(n)?n[n.length-1]===e:!1}var AU=null,xO=Object.prototype.hasOwnProperty;function TU(n,e){if(!e||!isArray(n))return{};for(var t={},r=isFunction(e)?e:function(o){return o[e]},i,a=0;a<n.length;a++){var s=n[a];i=r(s),xO.call(t,i)?t[i].push(s):t[i]=[s]}return t}var SU=null;function PU(n,e){if(!e)return{0:n};if(!isFunction(e)){var t=isArray(e)?e:e.replace(/\s+/g,"").split("*");e=function(r){for(var i="_",a=0,s=t.length;a<s;a++)i+=r[t[a]]&&r[t[a]].toString();return i}}return groupBy(n,e)}var OU=function(n,e){if(!e)return[n];var t=groupToMap(n,e),r=[];for(var i in t)r.push(t[i]);return r},M_={};function CU(n){var e=M_[n];if(!e){for(var t=n.toString(16),r=t.length;r<6;r++)t="0"+t;e="#"+t,M_[n]=e}return e}var DU=null;function LU(n){var e=0,t=0,r=0,i=0;return isArray(n)?n.length===1?e=t=r=i=n[0]:n.length===2?(e=r=n[0],t=i=n[1]):n.length===3?(e=n[0],t=i=n[1],r=n[2]):(e=n[0],t=n[1],r=n[2],i=n[3]):e=t=r=i=n,{r1:e,r2:t,r3:r,r4:i}}var RU=null,bO=function(n){return Hh(n,"Number")},wO=bO,IU=function(n){return isNumber(n)&&n%1!==0},NU=null,BU=function(n){return isNumber(n)&&n%2===0},kU=null,FU=Number.isInteger?Number.isInteger:function(n){return wO(n)&&n%1===0},zU=null,UU=function(n){return isNumber(n)&&n<0},WU=null,GU=function(n){return isNumber(n)&&n%2!==0},HU=null,jU=function(n){return isNumber(n)&&n>0},VU=null,ZU=function(n,e){if(isArray(n)){for(var t,r=-1/0,i=0;i<n.length;i++){var a=n[i],s=isFunction(e)?e(a):a[e];s>r&&(t=a,r=s)}return t}},KU=function(n,e){if(isArray(n)){for(var t,r=1/0,i=0;i<n.length;i++){var a=n[i],s=isFunction(e)?e(a):a[e];s<r&&(t=a,r=s)}return t}},MO=180/Math.PI,XU=function(n){return MO*n},YU=null,AO=Math.PI/180,QU=function(n){return AO*n},JU=null,qU=null,TO=Object.values?function(n){return Object.values(n)}:function(n){var e=[];return b_(n,function(t,r){bg(n)&&r==="prototype"||e.push(t)}),e},SO=TO,$U=function(n,e){return contains(values(n),e)},PO={}.toString,e9=function(n){return PO.call(n).replace(/^\[object /,"").replace(/]$/,"")},t9=null,n9=function(n){return isType(n,"Arguments")},r9=null,i9=function(n){return isType(n,"Boolean")},a9=null,s9=function(n){return isType(n,"Date")},o9=null,l9=function(n){return isType(n,"Error")},u9=null;function c9(n){return isNumber(n)&&isFinite(n)}var OO=Object.prototype,h9=function(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||OO;return n===t},f9=null,d9=function(n){return isType(n,"RegExp")},v9=null,g9=function(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];for(var t=n[0],r=1;r<n.length;r++){var i=n[r];isFunction(i)&&(i=i.prototype),mix(t.prototype,i)}},p9=null,Tg=function(n){if(typeof n!="object"||n===null)return n;var e;if(wg(n)){e=[];for(var t=0,r=n.length;t<r;t++)typeof n[t]=="object"&&n[t]!=null?e[t]=Tg(n[t]):e[t]=n[t]}else{e={};for(var i in n)typeof n[i]=="object"&&n[i]!=null?e[i]=Tg(n[i]):e[i]=n[i]}return e},nc=Tg,CO=function(n,e){if(!bg(n))throw new TypeError("Expected a function");var t=function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];var a=e?e.apply(this,r):r[0],s=t.cache;if(s.has(a))return s.get(a);var o=n.apply(this,r);return s.set(a,o),o};return t.cache=new Map,t},DO=5;function A_(n,e,t,r){t=t||0,r=r||DO;for(var i in e)if(e.hasOwnProperty(i)){var a=e[i];a!==null&&isPlainObject(a)?(isPlainObject(n[i])||(n[i]={}),t<r?A_(n[i],a,t+1,r):n[i]=e[i]):isArray(a)?(n[i]=[],n[i]=n[i].concat(a)):a!==void 0&&(n[i]=a)}}var m9=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var r=0;r<e.length;r+=1)A_(n,e[r]);return n},y9=null,_9=function(n,e,t,r){isFunction(e)||(t=e,e=n,n=function(){});var i=Object.create?function(s,o){return Object.create(s,{constructor:{value:o}})}:function(s,o){function l(){}l.prototype=s;var u=new l;return u.constructor=o,u},a=i(e.prototype,n);return n.prototype=mix(a,n.prototype),n.superclass=i(e.prototype,e),mix(a,t),mix(n,r),n},E9=null,LO=Object.prototype.hasOwnProperty;function x9(n){if(isNil(n))return!0;if(isArrayLike(n))return!n.length;var e=getType(n);if(e==="Map"||e==="Set")return!n.size;if(isPrototype(n))return!Object.keys(n).length;for(var t in n)if(LO.call(n,t))return!1;return!0}var b9=null,RO=function(n){return typeof n=="object"&&n!==null},T_=RO,IO=function(n){return n!==null&&typeof n!="function"&&isFinite(n.length)},S_=IO,Sg=function(n,e){if(n===e)return!0;if(!n||!e||Mg(n)||Mg(e))return!1;if(S_(n)||S_(e)){if(n.length!==e.length)return!1;for(var t=!0,r=0;r<n.length&&(t=Sg(n[r],e[r]),!!t);r++);return t}if(T_(n)||T_(e)){var i=Object.keys(n),a=Object.keys(e);if(i.length!==a.length)return!1;for(var t=!0,r=0;r<i.length&&(t=Sg(n[i[r]],e[i[r]]),!!t);r++);return t}return!1},NO=Sg,w9=function(n,e,t){return isFunction(t)?!!t(n,e):isEqual(n,e)},M9=function(n,e,t){for(var r=0,i=isString(e)?e.split("."):e;n&&r<i.length;)n=n[i[r++]];return n===void 0||r<i.length?t:n},A9=function(n,e,t){var r=n,i=isString(e)?e.split("."):e;return i.forEach(function(a,s){s<i.length-1?(isObject(r[a])||(r[a]=isNumber(i[s+1])?[]:{}),r=r[a]):r[a]=t}),n},BO=Object.prototype.hasOwnProperty,T9=function(n,e){if(n===null||!isPlainObject(n))return{};var t={};return each(e,function(r){BO.call(n,r)&&(t[r]=n[r])}),t},S9=function(n,e){return reduce(n,function(t,r,i){return e.includes(i)||(t[i]=r),t},{})},jh={},P9=function(n){return n=n||"g",jh[n]?jh[n]+=1:jh[n]=1,n+jh[n]},Vh,O9=CO(function(n,e){e===void 0&&(e={});var t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,s=e.fontVariant;return Vh||(Vh=document.createElement("canvas").getContext("2d")),Vh.font=[a,s,i,t+"px",r].join(" "),Vh.measureText(Mg(n)?n:"").width},function(n,e){return e===void 0&&(e={}),(0,xe.pr)([n],SO(e)).join("")}),C9=function(n,e,t,r){r===void 0&&(r="...");var i=16,a=measureTextWidth(r,t),s=isString(n)?n:toString(n),o=e,l=[],u,h;if(measureTextWidth(n,t)<=e)return n;for(;u=s.substr(0,i),h=measureTextWidth(u,t),!(h+a>o&&h>o);)if(l.push(u),o-=h,s=s.substr(i),!s)return l.join("");for(;u=s.substr(0,1),h=measureTextWidth(u,t),!(h+a>o);)if(l.push(u),o-=h,s=s.substr(1),!s)return l.join("");return""+l.join("")+r},D9=function(){function n(){this.map={}}return n.prototype.has=function(e){return this.map[e]!==void 0},n.prototype.get=function(e,t){var r=this.map[e];return r===void 0?t:r},n.prototype.set=function(e,t){this.map[e]=t},n.prototype.clear=function(){this.map={}},n.prototype.delete=function(e){delete this.map[e]},n.prototype.size=function(){return Object.keys(this.map).length},n}(),L9=null,kO=function(e,t,r){for(var i=1/0,a,s=0;s<t.length;s++){var o=t[s].id;!r[o]&&e[o]<=i&&(i=e[o],a=t[s])}return a},FO=function(e,t,r,i){var a=e.nodes,s=a===void 0?[]:a,o=e.edges,l=o===void 0?[]:o,u=[],h={},v={},E={};s.forEach(function(te,ue){var le=te.id;u.push(le),v[le]=1/0,le===t&&(v[le]=0)});for(var D=s.length,F=function(ue){var le=kO(v,s,h),he=le.id;if(h[he]=!0,v[he]===1/0)return"continue";var ve=[];r?ve=rO(he,l):ve=Gh(he,l),ve.forEach(function(ge){var Te=ge.target,Oe=ge.source,Ne=Te===he?Oe:Te,ze=i&&ge[i]?ge[i]:1;v[Ne]>v[le.id]+ze?(v[Ne]=v[le.id]+ze,E[Ne]=[le.id]):v[Ne]===v[le.id]+ze&&E[Ne].push(le.id)})},G=0;G<D;G++)F(G);E[t]=[t];var H={};for(var K in v)v[K]!==1/0&&P_(t,K,E,H);var q={};for(var K in H)q[K]=H[K][0];return{length:v,path:q,allPath:H}},Zh=FO;function P_(n,e,t,r){if(n===e)return[n];if(r[e])return r[e];for(var i=[],a=0,s=t[e];a<s.length;a++){var o=s[a],l=P_(n,o,t,r);if(!l)return;for(var u=0,h=l;u<h.length;u++){var v=h[u];wg(v)?i.push((0,xe.ev)((0,xe.ev)([],v,!0),[e],!1)):i.push([v,e])}}return r[e]=i,r[e]}var Pg=function(e,t,r,i,a){var s=Zh(e,t,i,a),o=s.length,l=s.path,u=s.allPath;return{length:o[r],path:l[r],allPath:u[r]}},zO=function(e,t,r,i){var a;if(t===r)return[[t]];var s=e.edges,o=s===void 0?[]:s,l=[t],u=(a={},a[t]=!0,a),h=[],v=[],E=i?Ja(t,o,"target"):Ja(t,o);for(h.push(E);l.length>0&&h.length>0;){var D=h[h.length-1];if(D.length){var F=D.shift();F&&(l.push(F),u[F]=!0,E=i?Ja(F,o,"target"):Ja(F,o),h.push(E.filter(function(K){return!u[K]})))}else{var G=l.pop();u[G]=!1,h.pop();continue}if(l[l.length-1]===r){var H=l.map(function(q){return q});v.push(H);var G=l.pop();u[G]=!1,h.pop()}}return v},UO=function(e,t){for(var r=Wh(e,t),i=[],a=r.length,s=0;s<a;s+=1){i[s]=[];for(var o=0;o<a;o+=1)s===o?i[s][o]=0:r[s][o]===0||!r[s][o]?i[s][o]=1/0:i[s][o]=r[s][o]}for(var l=0;l<a;l+=1)for(var s=0;s<a;s+=1)for(var o=0;o<a;o+=1)i[s][o]>i[s][l]+i[l][o]&&(i[s][o]=i[s][l]+i[l][o]);return i},Og=UO,WO=function(e,t,r,i){t===void 0&&(t=!1),r===void 0&&(r="weight"),i===void 0&&(i=1e3);var a=e.nodes,s=a===void 0?[]:a,o=e.edges,l=o===void 0?[]:o,u={},h={};s.forEach(function(ue,le){var he=v_();ue.clusterId=he,u[he]={id:he,nodes:[ue]},h[ue.id]={node:ue,idx:le}});var v=Wh(e,t),E=[],D={};v.forEach(function(ue,le){var he=0,ve=s[le].id;D[ve]={},ue.forEach(function(ge,Te){if(ge){he+=ge;var Oe=s[Te].id;D[ve][Oe]=ge}}),E.push(he)});for(var F=0,G=function(){var le=!1;if(s.forEach(function(he){var ve={};Object.keys(D[he.id]).forEach(function(st){var Et=D[he.id][st],mt=h[st].node,ct=mt.clusterId;ve[ct]||(ve[ct]=0),ve[ct]+=Et});var ge=-1/0,Te=[];if(Object.keys(ve).forEach(function(st){ge<ve[st]?(ge=ve[st],Te=[st]):ge===ve[st]&&Te.push(st)}),!(Te.length===1&&Te[0]===he.clusterId)){var Oe=Te.indexOf(he.clusterId);if(Oe>=0&&Te.splice(Oe,1),Te&&Te.length){le=!0;var Ne=u[he.clusterId],ze=Ne.nodes.indexOf(he);Ne.nodes.splice(ze,1);var Xe=Math.floor(Math.random()*Te.length),Je=u[Te[Xe]];Je.nodes.push(he),he.clusterId=Je.id}}}),!le)return"break";F++};F<i;){var H=G();if(H==="break")break}Object.keys(u).forEach(function(ue){var le=u[ue];(!le.nodes||!le.nodes.length)&&delete u[ue]});var K=[],q={};l.forEach(function(ue){var le=ue.source,he=ue.target,ve=ue[r]||1,ge=h[le].node.clusterId,Te=h[he].node.clusterId,Oe="".concat(ge,"---").concat(Te);if(q[Oe])q[Oe].weight+=ve,q[Oe].count++;else{var Ne={source:ge,target:Te,weight:ve,count:1};q[Oe]=Ne,K.push(Ne)}});var te=[];return Object.keys(u).forEach(function(ue){te.push(u[ue])}),{clusters:te,clusterEdges:K}},GO=WO,HO=function(){function n(e){this.arr=e}return n.prototype.getArr=function(){return this.arr||[]},n.prototype.add=function(e){var t,r=e.arr;if(!(!((t=this.arr)===null||t===void 0)&&t.length))return new n(r);if(!(r!=null&&r.length))return new n(this.arr);if(this.arr.length===r.length){var i=[];for(var a in this.arr)i[a]=this.arr[a]+r[a];return new n(i)}},n.prototype.subtract=function(e){var t,r=e.arr;if(!(!((t=this.arr)===null||t===void 0)&&t.length))return new n(r);if(!(r!=null&&r.length))return new n(this.arr);if(this.arr.length===r.length){var i=[];for(var a in this.arr)i[a]=this.arr[a]-r[a];return new n(i)}},n.prototype.avg=function(e){var t=[];if(e!==0)for(var r in this.arr)t[r]=this.arr[r]/e;return new n(t)},n.prototype.negate=function(){var e=[];for(var t in this.arr)e[t]=-this.arr[t];return new n(e)},n.prototype.squareEuclideanDistance=function(e){var t,r=e.arr;if(!(!((t=this.arr)===null||t===void 0)&&t.length)||!(r!=null&&r.length))return 0;if(this.arr.length===r.length){var i=0;for(var a in this.arr)i+=Math.pow(this.arr[a]-e.arr[a],2);return i}},n.prototype.euclideanDistance=function(e){var t,r=e.arr;if(!(!((t=this.arr)===null||t===void 0)&&t.length)||!(r!=null&&r.length))return 0;if(this.arr.length===r.length){var i=0;for(var a in this.arr)i+=Math.pow(this.arr[a]-e.arr[a],2);return Math.sqrt(i)}else console.error("The two vectors are unequal in length.")},n.prototype.normalize=function(){var e=[],t=nc(this.arr);t.sort(function(s,o){return s-o});var r=t[t.length-1],i=t[0];for(var a in this.arr)e[a]=(this.arr[a]-i)/(r-i);return new n(e)},n.prototype.norm2=function(){var e;if(!(!((e=this.arr)===null||e===void 0)&&e.length))return 0;var t=0;for(var r in this.arr)t+=Math.pow(this.arr[r],2);return Math.sqrt(t)},n.prototype.dot=function(e){var t,r=e.arr;if(!(!((t=this.arr)===null||t===void 0)&&t.length)||!(r!=null&&r.length))return 0;if(this.arr.length===r.length){var i=0;for(var a in this.arr)i+=this.arr[a]*e.arr[a];return i}else console.error("The two vectors are unequal in length.")},n.prototype.equal=function(e){var t,r=e.arr;if(((t=this.arr)===null||t===void 0?void 0:t.length)!==(r==null?void 0:r.length))return!1;for(var i in this.arr)if(this.arr[i]!==r[i])return!1;return!0},n}(),qa=HO,jO=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,VO=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,O_=function(e,t){e===void 0&&(e=[]),t===void 0&&(t=100);var r={};e.forEach(function(a){a.properties&&Object.keys(a.properties).forEach(function(s){if(s==="id"||!"".concat(a.properties[s]).match(jO)&&!"".concat(a.properties[s]).match(VO)&&isNaN(Number(a.properties[s]))){r.hasOwnProperty(s)&&delete r[s];return}r.hasOwnProperty(s)?r[s]+=1:r[s]=1})});var i=Object.keys(r).sort(function(a,s){return r[s]-r[a]});return i.length<t?i:i.slice(0,t)},ZO=function(e,t){return t.map(function(r){return e.hasOwnProperty(r)?e[r]:0})},KO=function(e){for(var t=O_(e),r=[],i=0;i<e.length;i++)r[i]=ZO(e[i].properties,t);return r},Kh=function(e,t){t===void 0&&(t=void 0);var r=[];return e.forEach(function(i){t===void 0&&r.push(i),i[t]!==void 0&&r.push(i[t])}),r},R9={getAllSortProperties:O_,getPropertyWeight:KO,getAllProperties:Kh},fs;(function(n){n.EuclideanDistance="euclideanDistance"})(fs||(fs={}));var C_=function(e,t,r){var i=[];t!=null&&t.length?i=t:(e.forEach(function(s){i=i.concat(Object.keys(s))}),i=Ag(i));var a={};return i.forEach(function(s){var o=[];e.forEach(function(l){l[s]!==void 0&&l[s]!==""&&o.push(l[s])}),o.length&&!(r!=null&&r.includes(s))&&(a[s]=Ag(o))}),a},Xh=function(e,t,r){var i=C_(e,t,r),a=[];if(!Object.keys(i).length)return a;var s=Object.values(i),o=s.every(function(l){return l.every(function(u){return typeof u=="number"})});return e.forEach(function(l,u){var h=[];Object.keys(i).forEach(function(v){var E=l[v],D=i[v],F=D.findIndex(function(K){return E===K}),G=[];if(o)G.push(E);else for(var H=0;H<D.length;H++)H===F?G.push(1):G.push(0);h=h.concat(G)}),a[u]=h}),a},Cg=function(e,t,r,i){r===void 0&&(r=fs.EuclideanDistance);var a=0;switch(r){case fs.EuclideanDistance:a=new qa(e).euclideanDistance(new qa(t));break;default:break}return a},I9={getAllKeyValueMap:C_,oneHot:Xh,getDistance:Cg},D_=function(e,t,r,i){for(var a=t.length,s=2*i,o=0,l=0;l<a;l++)for(var u=e[l].clusterId,h=0;h<a;h++){var v=e[h].clusterId;if(u===v){var E=t[l][h]||0,D=r[l]||0,F=r[h]||0;o+=E-D*F/s}}return o*=1/s,o},Dg=function(e,t){e===void 0&&(e=[]);for(var r=e.length,i=new qa([]),a=0;a<r;a++)i=i.add(new qa(t[a]));var s=i.avg(r);s.normalize();for(var o=0,a=0;a<r;a++){var l=new qa(t[a]),u=l.squareEuclideanDistance(s);o+=u}var h=[];e.forEach(function(){h.push([])});for(var a=0;a<r;a++){var l=new qa(t[a]);e[a].clusterInertial=0;for(var v=0;v<r;v++){if(a===v){h[a][v]=0;continue}var E=new qa(t[v]);h[a][v]=l.squareEuclideanDistance(E),e[a].clusterInertial+=h[a][v]}}for(var D=0,F=2*r*o,a=0;a<r;a++)for(var G=e[a].clusterId,v=0;v<r;v++){var H=e[v].clusterId;if(!(a===v||G!==H)){var K=e[a].clusterInertial*e[v].clusterInertial/Math.pow(F,2)-h[a][v]/F;D+=K}}return Number(D.toFixed(4))},XO=function(e,t,r,i,a,s,o,l,u){t===void 0&&(t=!1),r===void 0&&(r="weight"),i===void 0&&(i=1e-4),a===void 0&&(a=!1),s===void 0&&(s=void 0),o===void 0&&(o=[]),l===void 0&&(l=["id"]),u===void 0&&(u=1);var h=e.nodes,v=h===void 0?[]:h,E=e.edges,D=E===void 0?[]:E,F=[];if(a){v.forEach(function(ht,At){ht.properties=ht.properties||{},ht.originIndex=At});var G=[];v.every(function(ht){return ht.hasOwnProperty("nodeType")})&&(G=Array.from(new Set(v.map(function(ht){return ht.nodeType}))),v.forEach(function(ht){ht.properties.nodeType=G.findIndex(function(At){return At===ht.nodeType})}));var H=Kh(v,s);F=Xh(H,o,l)}var K=1,q={},te={};v.forEach(function(ht,At){var kt=String(K++);ht.clusterId=kt,q[kt]={id:kt,nodes:[ht]},te[ht.id]={node:ht,idx:At}});var ue=Wh(e,t),le=[],he={},ve=0;ue.forEach(function(ht,At){var kt=0,Ht=v[At].id;he[Ht]={},ht.forEach(function(en,on){if(en){kt+=en;var tn=v[on].id;he[Ht][tn]=en,ve+=en}}),le.push(kt)}),ve/=2;for(var ge=1/0,Te=1/0,Oe=0,Ne=[],ze={};;){a&&v.every(function(ht){return ht.hasOwnProperty("properties")})?ge=D_(v,ue,le,ve)+Dg(v,F)*u:ge=D_(v,ue,le,ve),Oe===0&&(Te=ge,Ne=v,ze=q);var Xe=ge>0&&ge>Te&&ge-Te<i;if(ge>Te&&(Ne=v.map(function(ht){return{node:ht,clusterId:ht.clusterId}}),ze=nc(q),Te=ge),Xe||Oe>100)break;Oe++,Object.keys(q).forEach(function(ht){var At=0;D.forEach(function(kt){var Ht=kt.source,en=kt.target,on=te[Ht].node.clusterId,tn=te[en].node.clusterId;(on===ht&&tn!==ht||tn===ht&&on!==ht)&&(At=At+(kt[r]||1))}),q[ht].sumTot=At}),v.forEach(function(ht,At){var kt=q[ht.clusterId],Ht=0,en,on=le[At]/(2*ve),tn=0,yn=kt.nodes;yn.forEach(function(Hi){var Ni=te[Hi.id].idx;tn+=ue[At][Ni]||0});var An=tn-kt.sumTot*on,kn=yn.filter(function(Hi){return Hi.id!==ht.id}),qn=[];kn.forEach(function(Hi,Ni){qn[Ni]=F[Hi.originIndex]});var hr=Dg(kn,F)*u,qi=he[ht.id];if(Object.keys(qi).forEach(function(Hi){var Ni=te[Hi].node,ao=Ni.clusterId;if(ao!==ht.clusterId){var ji=q[ao],wa=ji.nodes;if(!(!wa||!wa.length)){var Yn=0;wa.forEach(function(gr){var Er=te[gr.id].idx;Yn+=ue[At][Er]||0});var _r=Yn-ji.sumTot*on,Jn=wa.concat([ht]),vr=[];Jn.forEach(function(gr,Er){vr[Er]=F[gr.originIndex]});var wr=Dg(Jn,F)*u,pn=_r-An;a&&(pn=_r+wr-(An+hr)),pn>Ht&&(Ht=pn,en=ji)}}}),Ht>0){en.nodes.push(ht);var yr=ht.clusterId;ht.clusterId=en.id;var za=kt.nodes.indexOf(ht);kt.nodes.splice(za,1);var $i=0,Go=0;D.forEach(function(Hi){var Ni=Hi.source,ao=Hi.target,ji=te[Ni].node.clusterId,wa=te[ao].node.clusterId;(ji===en.id&&wa!==en.id||wa===en.id&&ji!==en.id)&&($i=$i+(Hi[r]||1)),(ji===yr&&wa!==yr||wa===yr&&ji!==yr)&&(Go=Go+(Hi[r]||1))}),en.sumTot=$i,kt.sumTot=Go}})}var Je={},st=0;Object.keys(ze).forEach(function(ht){var At=ze[ht];if(!At.nodes||!At.nodes.length){delete ze[ht];return}var kt=String(st+1);kt!==ht&&(At.id=kt,At.nodes=At.nodes.map(function(Ht){return{id:Ht.id,clusterId:kt}}),ze[kt]=At,Je[ht]=kt,delete ze[ht],st++)}),Ne.forEach(function(ht){var At=ht.node,kt=ht.clusterId;At&&(At.clusterId=kt,At.clusterId&&Je[At.clusterId]&&(At.clusterId=Je[At.clusterId]))});var Et=[],mt={};D.forEach(function(ht){var At=ht.source,kt=ht.target,Ht=ht[r]||1,en=te[At].node.clusterId,on=te[kt].node.clusterId;if(!(!en||!on)){var tn="".concat(en,"---").concat(on);if(mt[tn])mt[tn].weight+=Ht,mt[tn].count++;else{var yn={source:en,target:on,weight:Ht,count:1};mt[tn]=yn,Et.push(yn)}}});var ct=[];return Object.keys(ze).forEach(function(ht){ct.push(ze[ht])}),{clusters:ct,clusterEdges:Et}},L_=XO,YO=function(e,t,r,i,a,s,o,l){return t===void 0&&(t=!1),r===void 0&&(r="weight"),i===void 0&&(i=1e-4),a===void 0&&(a=void 0),s===void 0&&(s=[]),o===void 0&&(o=["id"]),l===void 0&&(l=1),L_(e,t,r,i,!0,a,s,o,l)},QO=YO,JO=function(e,t){var r;t===void 0&&(t=1);for(var i=nc(e),a=i.nodes,s=a===void 0?[]:a,o=i.edges,l=o===void 0?[]:o,u=function(){var E=xg({nodes:s,edges:l}),D=Object.keys(E);D.sort(function(H,K){var q,te;return((q=E[H])===null||q===void 0?void 0:q.degree)-((te=E[K])===null||te===void 0?void 0:te.degree)});var F=D[0];if(!s.length||((r=E[F])===null||r===void 0?void 0:r.degree)>=t)return"break";var G=s.findIndex(function(H){return H.id===F});s.splice(G,1),l=l.filter(function(H){return!(H.source===F||H.target===F)})};;){var h=u();if(h==="break")break}return{nodes:s,edges:l}},qO=JO,R_=function(e,t,r){var i=[];switch(e){case fs.EuclideanDistance:i=t[r];break;default:i=[];break}return i},$O=function(e,t,r,i,a,s){t===void 0&&(t=3),r===void 0&&(r=void 0),i===void 0&&(i=[]),a===void 0&&(a=["id"]),s===void 0&&(s=fs.EuclideanDistance);var o=e.nodes,l=o===void 0?[]:o,u=e.edges,h=u===void 0?[]:u,v={clusters:[{id:"0",nodes:l}],clusterEdges:[]};if(s===fs.EuclideanDistance&&!l.every(function(kt){return kt.hasOwnProperty(r)}))return v;var E=[],D=[];if(s===fs.EuclideanDistance&&(E=Kh(l,r),D=Xh(E,i,a)),!D.length)return v;for(var F=Ag(D.map(function(kt){return kt.join("")})),G=Math.min(t,l.length,F.length),H=0;H<l.length;H++)l[H].originIndex=H;for(var K=[],q=[],te=[],H=0;H<G;H++)if(H===0){var ue=Math.floor(Math.random()*l.length);switch(s){case fs.EuclideanDistance:K[H]=D[ue];break;default:K[H]=[];break}q.push(ue),te[H]=[l[ue]],l[ue].clusterId=String(H)}else{for(var le=-1/0,he=0,ve=function(en){if(!q.includes(en)){for(var on=0,tn=0;tn<K.length;tn++){var yn=0;switch(s){case fs.EuclideanDistance:yn=Cg(D[l[en].originIndex],K[tn],s);break;default:break}on+=yn}var An=on/K.length;An>le&&!K.find(function(kn){return NO(kn,R_(s,D,l[en].originIndex))})&&(le=An,he=en)}},ge=0;ge<l.length;ge++)ve(ge);K[H]=R_(s,D,he),q.push(he),te[H]=[l[he]],l[he].clusterId=String(H)}for(var Te=0;;){for(var H=0;H<l.length;H++){var Oe=0,Ne=1/0;if(!(Te===0&&q.includes(H))){for(var ze=0;ze<K.length;ze++){var Xe=0;switch(s){case fs.EuclideanDistance:Xe=Cg(D[H],K[ze],s);break;default:break}Xe<Ne&&(Ne=Xe,Oe=ze)}if(l[H].clusterId!==void 0)for(var Je=te[Number(l[H].clusterId)].length-1;Je>=0;Je--)te[Number(l[H].clusterId)][Je].id===l[H].id&&te[Number(l[H].clusterId)].splice(Je,1);l[H].clusterId=String(Oe),te[Oe].push(l[H])}}for(var st=!1,H=0;H<te.length;H++){for(var Et=te[H],mt=new qa([]),ze=0;ze<Et.length;ze++)mt=mt.add(new qa(D[Et[ze].originIndex]));var ct=mt.avg(Et.length);ct.equal(new qa(K[H]))||(st=!0,K[H]=ct.getArr())}if(Te++,l.every(function(kt){return kt.clusterId!==void 0})&&st||Te>=1e3)break}var ht=[],At={};return h.forEach(function(kt){var Ht,en,on=kt.source,tn=kt.target,yn=(Ht=l.find(function(hr){return hr.id===on}))===null||Ht===void 0?void 0:Ht.clusterId,An=(en=l.find(function(hr){return hr.id===tn}))===null||en===void 0?void 0:en.clusterId,kn="".concat(yn,"---").concat(An);if(At[kn])At[kn].count++;else{var qn={source:yn,target:An,count:1};At[kn]=qn,ht.push(qn)}}),{clusters:te,clusterEdges:ht}},eC=$O,tC=function(e,t){var r=new qa(t),i=r.norm2(),a=new qa(e),s=a.norm2(),o=r.dot(a),l=i*s,u=l?o/l:0;return u},I_=tC,nC=function(e,t,r,i,a){e===void 0&&(e=[]),r===void 0&&(r=void 0),i===void 0&&(i=[]),a===void 0&&(a=[]);var s=nc(e.filter(function(E){return E.id!==t.id})),o=e.findIndex(function(E){return E.id===t.id}),l=Kh(e,r),u=Xh(l,i,a),h=u[o],v=[];return s.forEach(function(E,D){if(E.id!==t.id){var F=u[D],G=I_(F,h);v.push(G),E.cosineSimilarity=G}}),s.sort(function(E,D){return D.cosineSimilarity-E.cosineSimilarity}),{allCosineSimilarity:v,similarNodes:s}},rC=nC,iC=function(){function n(e){this.count=e.length,this.parent={};for(var t=0,r=e;t<r.length;t++){var i=r[t];this.parent[i]=i}}return n.prototype.find=function(e){for(;this.parent[e]!==e;)e=this.parent[e];return e},n.prototype.union=function(e,t){var r=this.find(e),i=this.find(t);r!==i&&(r<i?(this.parent[t]!==t&&this.union(this.parent[t],e),this.parent[t]=this.parent[e]):(this.parent[e]!==e&&this.union(this.parent[e],t),this.parent[e]=this.parent[t]))},n.prototype.connected=function(e,t){return this.find(e)===this.find(t)},n}(),aC=iC,sC=function(e,t){return e-t},oC=function(){function n(e){e===void 0&&(e=sC),this.compareFn=e,this.list=[]}return n.prototype.getLeft=function(e){return 2*e+1},n.prototype.getRight=function(e){return 2*e+2},n.prototype.getParent=function(e){return e===0?null:Math.floor((e-1)/2)},n.prototype.isEmpty=function(){return this.list.length<=0},n.prototype.top=function(){return this.isEmpty()?void 0:this.list[0]},n.prototype.delMin=function(){var e=this.top(),t=this.list.pop();return this.list.length>0&&(this.list[0]=t,this.moveDown(0)),e},n.prototype.insert=function(e){if(e!==null){this.list.push(e);var t=this.list.length-1;return this.moveUp(t),!0}return!1},n.prototype.moveUp=function(e){for(var t=this.getParent(e);e&&e>0&&this.compareFn(this.list[t],this.list[e])>0;){var r=this.list[t];this.list[t]=this.list[e],this.list[e]=r,e=t,t=this.getParent(e)}},n.prototype.moveDown=function(e){var t,r=e,i=this.getLeft(e),a=this.getRight(e),s=this.list.length;i!==null&&i<s&&this.compareFn(this.list[r],this.list[i])>0?r=i:a!==null&&a<s&&this.compareFn(this.list[r],this.list[a])>0&&(r=a),e!==r&&(t=[this.list[r],this.list[e]],this.list[e]=t[0],this.list[r]=t[1],this.moveDown(r))},n}(),lC=oC,uC=function(e,t){var r=[],i=e.nodes,a=i===void 0?[]:i,s=e.edges,o=s===void 0?[]:s;if(a.length===0)return r;var l=a[0],u=new Set;u.add(l);var h=function(H,K){return t?H.weight-K.weight:0},v=new lC(h);for(Gh(l.id,o).forEach(function(G){v.insert(G)});!v.isEmpty();){var E=v.delMin(),D=E.source,F=E.target;u.has(D)&&u.has(F)||(r.push(E),u.has(D)||(u.add(D),Gh(D,o).forEach(function(G){v.insert(G)})),u.has(F)||(u.add(F),Gh(F,o).forEach(function(G){v.insert(G)})))}return r},N_=function(e,t){var r=[],i=e.nodes,a=i===void 0?[]:i,s=e.edges,o=s===void 0?[]:s;if(a.length===0)return r;var l=o.map(function(D){return D});t&&l.sort(function(D,F){return D.weight-F.weight});for(var u=new aC(a.map(function(D){return D.id}));l.length>0;){var h=l.shift(),v=h.source,E=h.target;u.connected(v,E)||(r.push(h),u.union(v,E))}return r},cC=function(e,t,r){var i={prim:uC,kruskal:N_};return r?i[r](e,t):N_(e,t)},hC=cC,fC=function(e,t,r){typeof t!="number"&&(t=1e-6),typeof r!="number"&&(r=.85);for(var i=1,a=0,s=1e3,o=e.nodes,l=o===void 0?[]:o,u=e.edges,h=u===void 0?[]:u,v=l.length,E,D={},F={},G=0;G<v;++G){var H=l[G],K=H.id;D[K]=1/v,F[K]=1/v}for(var q=xg(e);s>0&&i>t;){a=0;for(var G=0;G<v;++G){var H=l[G],K=H.id;if(E=0,q[H.id].inDegree===0)D[K]=0;else{for(var te=Ja(K,h,"source"),ue=0;ue<te.length;++ue){var le=te[ue],he=q[le].outDegree;he>0&&(E+=F[le]/he)}D[K]=r*E,a+=D[K]}}a=(1-a)/v,i=0;for(var G=0;G<v;++G){var H=l[G],K=H.id;E=D[K]+a,i+=Math.abs(E-F[K]),F[K]=E}s-=1}return F},B_=fC,dC=-1,Yh=-1,k_="-1",ks="-1",F_=-1,N9="-1",z_=function(){function n(e,t,r,i){e===void 0&&(e=dC),t===void 0&&(t=Yh),r===void 0&&(r=Yh),i===void 0&&(i=k_),this.id=e,this.from=t,this.to=r,this.label=i}return n}(),vC=function(){function n(e,t){e===void 0&&(e=Yh),t===void 0&&(t=ks),this.id=e,this.label=t,this.edges=[],this.edgeMap={}}return n.prototype.addEdge=function(e){this.edges.push(e),this.edgeMap[e.id]=e},n}(),U_=function(){function n(e,t,r){e===void 0&&(e=Yh),t===void 0&&(t=!0),r===void 0&&(r=!1),this.id=e,this.edgeIdAutoIncrease=t,this.edges=[],this.nodes=[],this.nodeMap={},this.edgeMap={},this.nodeLabelMap={},this.edgeLabelMap={},this.counter=0,this.directed=r}return n.prototype.getNodeNum=function(){return this.nodes.length},n.prototype.addNode=function(e,t){if(!this.nodeMap[e]){var r=new vC(e,t);this.nodes.push(r),this.nodeMap[e]=r,this.nodeLabelMap[t]||(this.nodeLabelMap[t]=[]),this.nodeLabelMap[t].push(e)}},n.prototype.addEdge=function(e,t,r,i){if((this.edgeIdAutoIncrease||e===void 0)&&(e=this.counter++),!(this.nodeMap[t]&&this.nodeMap[r]&&this.nodeMap[r].edgeMap[e])){var a=new z_(e,t,r,i);if(this.edges.push(a),this.edgeMap[e]=a,this.nodeMap[t].addEdge(a),this.edgeLabelMap[i]||(this.edgeLabelMap[i]=[]),this.edgeLabelMap[i].push(a),!this.directed){var s=new z_(e,r,t,i);this.nodeMap[r].addEdge(s),this.edgeLabelMap[i].push(s)}}},n}(),cl=function(){function n(e,t,r,i,a){this.fromNode=e,this.toNode=t,this.nodeEdgeNodeLabel={nodeLabel1:r||ks,edgeLabel:i||k_,nodeLabel2:a||ks}}return n.prototype.equalTo=function(e){return this.fromNode===e.formNode&&this.toNode===e.toNode&&this.nodeEdgeNodeLabel===e.nodeEdgeNodeLabel},n.prototype.notEqualTo=function(e){return!this.equalTo(e)},n}(),W_=function(){function n(){this.rmpath=[],this.dfsEdgeList=[]}return n.prototype.equalTo=function(e){var t=this.dfsEdgeList.length,r=e.length;if(t!==r)return!1;for(var i=0;i<t;i++)if(this.dfsEdgeList[i]!==e[i])return!1;return!0},n.prototype.notEqualTo=function(e){return!this.equalTo(e)},n.prototype.pushBack=function(e,t,r,i,a){return this.dfsEdgeList.push(new cl(e,t,r,i,a)),this.dfsEdgeList},n.prototype.toGraph=function(e,t){e===void 0&&(e=F_),t===void 0&&(t=!1);var r=new U_(e,!0,t);return this.dfsEdgeList.forEach(function(i){var a=i.fromNode,s=i.toNode,o=i.nodeEdgeNodeLabel,l=o.nodeLabel1,u=o.edgeLabel,h=o.nodeLabel2;l!==ks&&r.addNode(a,l),h!==ks&&r.addNode(s,h),l!==ks&&h!==l&&r.addEdge(void 0,a,s,u)}),r},n.prototype.buildRmpath=function(){this.rmpath=[];for(var e=void 0,t=this.dfsEdgeList.length,r=t-1;r>=0;r--){var i=this.dfsEdgeList[r],a=i.fromNode,s=i.toNode;a<s&&(e===void 0||s===e)&&(this.rmpath.push(r),e=a)}return this.rmpath},n.prototype.getNodeNum=function(){var e={};return this.dfsEdgeList.forEach(function(t){e[t.fromNode]||(e[t.fromNode]=!0),e[t.toNode]||(e[t.toNode]=!0)}),Object.keys(e).length},n}(),Qh=function(){function n(e){if(this.his={},this.nodesUsed={},this.edgesUsed={},this.edges=[],!!e){for(;e;){var t=e.edge;this.edges.push(t),this.nodesUsed[t.from]=1,this.nodesUsed[t.to]=1,this.edgesUsed[t.id]=1,e=e.preNode}this.edges=this.edges.reverse()}}return n.prototype.hasNode=function(e){return this.nodesUsed[e.id]===1},n.prototype.hasEdge=function(e){return this.edgesUsed[e.id]===1},n}(),gC=function(){function n(e){var t=e.graphs,r=e.minSupport,i=r===void 0?2:r,a=e.minNodeNum,s=a===void 0?1:a,o=e.maxNodeNum,l=o===void 0?4:o,u=e.top,h=u===void 0?10:u,v=e.directed,E=v===void 0?!1:v,D=e.verbose,F=D===void 0?!1:D;this.graphs=t,this.dfsCode=new W_,this.support=0,this.frequentSize1Subgraphs=[],this.frequentSubgraphs=[],this.minSupport=i,this.top=h,this.directed=E,this.counter=0,this.maxNodeNum=l,this.minNodeNum=s,this.verbose=F,this.maxNodeNum<this.minNodeNum&&(this.maxNodeNum=this.minNodeNum),this.reportDF=[]}return n.prototype.findForwardRootEdges=function(e,t){var r=this,i=[],a=e.nodeMap;return t.edges.forEach(function(s){(r.directed||t.label<=a[s.to].label)&&i.push(s)}),i},n.prototype.findBackwardEdge=function(e,t,r,i){if(!this.directed&&t===r)return null;for(var a=e.nodeMap,s=a[r.to],o=s.edges,l=o.length,u=0;u<l;u++){var h=o[u];if(!(i.hasEdge(h)||h.to!==t.from)){if(this.directed){if(a[t.from].label<a[r.to].label||a[t.from].label===a[r.to].label&&t.label<=h.label)return h}else if(t.label<h.label||t.label===h.label&&a[t.to].label<=a[r.to].label)return h}}return null},n.prototype.findForwardPureEdges=function(e,t,r,i){for(var a=[],s=t.to,o=e.nodeMap[s].edges,l=o.length,u=0;u<l;u++){var h=o[u],v=e.nodeMap[h.to];r<=v.label&&!i.hasNode(v)&&a.push(h)}return a},n.prototype.findForwardRmpathEdges=function(e,t,r,i){for(var a=[],s=e.nodeMap,o=s[t.to].label,l=s[t.from],u=l.edges,h=u.length,v=0;v<h;v++){var E=u[v],D=s[E.to].label;t.to===E.to||r>D||i.hasNode(s[E.to])||(t.label<E.label||t.label===E.label&&o<=D)&&a.push(E)}return a},n.prototype.getSupport=function(e){var t={};return e.forEach(function(r){t[r.graphId]||(t[r.graphId]=!0)}),Object.keys(t).length},n.prototype.findMinLabel=function(e){var t=void 0;return Object.keys(e).forEach(function(r){var i=e[r],a=i.nodeLabel1,s=i.edgeLabel,o=i.nodeLabel2;if(!t){t={nodeLabel1:a,edgeLabel:s,nodeLabel2:o};return}(a<t.nodeLabel1||a===t.nodeLabel1&&s<t.edgeLabel||a===t.nodeLabel1&&s===t.edgeLabel&&o<t.nodeLabel2)&&(t={nodeLabel1:a,edgeLabel:s,nodeLabel2:o})}),t},n.prototype.isMin=function(){var e=this,t=this.dfsCode;if(this.verbose&&console.log("isMin checking",t),t.dfsEdgeList.length===1)return!0;var r=this.directed,i=t.toGraph(F_,r),a=i.nodeMap,s=new W_,o={};i.nodes.forEach(function(v){var E=e.findForwardRootEdges(i,v);E.forEach(function(D){var F=a[D.to],G="".concat(v.label,"-").concat(D.label,"-").concat(F.label);o[G]||(o[G]={projected:[],nodeLabel1:v.label,edgeLabel:D.label,nodeLabel2:F.label});var H={graphId:i.id,edge:D,preNode:null};o[G].projected.push(H)})});var l=this.findMinLabel(o);if(l){s.dfsEdgeList.push(new cl(0,1,l.nodeLabel1,l.edgeLabel,l.nodeLabel2));var u=function v(E){for(var D=s.buildRmpath(),F=s.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,G=s.dfsEdgeList[D[0]].toNode,H={},K=!1,q=0,te=r?-1:0,ue=function(mt){if(K)return"break";E.forEach(function(ct){var ht=new Qh(ct),At=e.findBackwardEdge(i,ht.edges[D[mt]],ht.edges[D[0]],ht);At&&(H[At.label]||(H[At.label]={projected:[],edgeLabel:At.label}),H[At.label].projected.push({graphId:i.id,edge:H,preNode:ct}),q=s.dfsEdgeList[D[mt]].fromNode,K=!0)})},le=D.length-1;le>te;le--){var he=ue(le);if(he==="break")break}if(K){var ve=e.findMinLabel(H);s.dfsEdgeList.push(new cl(G,q,ks,ve.edgeLabel,ks));var ge=s.dfsEdgeList.length-1;return e.dfsCode.dfsEdgeList[ge]!==s.dfsEdgeList[ge]?!1:v(H[ve.edgeLabel].projected)}var Te={};K=!1;var Oe=0;E.forEach(function(Et){var mt=new Qh(Et),ct=e.findForwardPureEdges(i,mt.edges[D[0]],F,mt);ct.length>0&&(K=!0,Oe=G,ct.forEach(function(ht){var At="".concat(ht.label,"-").concat(a[ht.to].label);Te[At]||(Te[At]={projected:[],edgeLabel:ht.label,nodeLabel2:a[ht.to].label}),Te[At].projected.push({graphId:i.id,edge:ht,preNode:Et})}))});for(var Ne=D.length,ze=function(mt){if(K)return"break";var ct=D[mt];E.forEach(function(ht){var At=new Qh(ht),kt=e.findForwardRmpathEdges(i,At.edges[ct],F,At);kt.length>0&&(K=!0,Oe=s.dfsEdgeList[ct].fromNode,kt.forEach(function(Ht){var en="".concat(Ht.label,"-").concat(a[Ht.to].label);Te[en]||(Te[en]={projected:[],edgeLabel:Ht.label,nodeLabel2:a[Ht.to].label}),Te[en].projected.push({graphId:i.id,edge:Ht,preNode:ht})}))})},le=0;le<Ne;le++){var Xe=ze(le);if(Xe==="break")break}if(!K)return!0;var Je=e.findMinLabel(Te);s.dfsEdgeList.push(new cl(Oe,G+1,ks,Je.edgeLabel,Je.nodeLabel2));var st=s.dfsEdgeList.length-1;return t.dfsEdgeList[st]!==s.dfsEdgeList[st]?!1:v(Te["".concat(Je.edgeLabel,"-").concat(Je.nodeLabel2)].projected)},h="".concat(l.nodeLabel1,"-").concat(l.edgeLabel,"-").concat(l.nodeLabel2);return u(o[h].projected)}},n.prototype.report=function(){if(!(this.dfsCode.getNodeNum()<this.minNodeNum)){this.counter++;var e=this.dfsCode.toGraph(this.counter,this.directed);this.frequentSubgraphs.push(nc(e))}},n.prototype.subGraphMining=function(e){var t=this,r=this.getSupport(e);if(!(r<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,l={},u={};e.forEach(function(h){for(var v=t.graphs[h.graphId],E=v.nodeMap,D=new Qh(h),F=a.length-1;F>=0;F--){var G=t.findBackwardEdge(v,D.edges[a[F]],D.edges[a[0]],D);if(G){var H="".concat(t.dfsCode.dfsEdgeList[a[F]].fromNode,"-").concat(G.label);u[H]||(u[H]={projected:[],toNodeId:t.dfsCode.dfsEdgeList[a[F]].fromNode,edgeLabel:G.label}),u[H].projected.push({graphId:h.graphId,edge:G,preNode:h})}}if(!(i>=t.maxNodeNum)){var K=t.findForwardPureEdges(v,D.edges[a[0]],o,D);K.forEach(function(te){var ue="".concat(s,"-").concat(te.label,"-").concat(E[te.to].label);l[ue]||(l[ue]={projected:[],fromNodeId:s,edgeLabel:te.label,nodeLabel2:E[te.to].label}),l[ue].projected.push({graphId:h.graphId,edge:te,preNode:h})});for(var q=function(ue){var le=t.findForwardRmpathEdges(v,D.edges[a[ue]],o,D);le.forEach(function(he){var ve="".concat(t.dfsCode.dfsEdgeList[a[ue]].fromNode,"-").concat(he.label,"-").concat(E[he.to].label);l[ve]||(l[ve]={projected:[],fromNodeId:t.dfsCode.dfsEdgeList[a[ue]].fromNode,edgeLabel:he.label,nodeLabel2:E[he.to].label}),l[ve].projected.push({graphId:h.graphId,edge:he,preNode:h})})},F=0;F<a.length;F++)q(F)}}),Object.keys(u).forEach(function(h){var v=u[h],E=v.toNodeId,D=v.edgeLabel;t.dfsCode.dfsEdgeList.push(new cl(s,E,"-1",D,"-1")),t.subGraphMining(u[h].projected),t.dfsCode.dfsEdgeList.pop()}),Object.keys(l).forEach(function(h){var v=l[h],E=v.fromNodeId,D=v.edgeLabel,F=v.nodeLabel2;t.dfsCode.dfsEdgeList.push(new cl(E,s+1,ks,D,F)),t.subGraphMining(l[h].projected),t.dfsCode.dfsEdgeList.pop()})}},n.prototype.generate1EdgeFrequentSubGraphs=function(){var e=this.graphs,t=this.directed,r=this.minSupport,i=this.frequentSize1Subgraphs,a={},s={},o={},l={};return Object.keys(e).forEach(function(u){var h=e[u],v=h.nodeMap;h.nodes.forEach(function(E,D){var F=E.label,G="".concat(u,"-").concat(F);if(!o[G]){var H=a[F]||0;H++,a[F]=H}o[G]={graphKey:u,label:F},E.edges.forEach(function(K){var q=F,te=v[K.to].label;if(!t&&q>te){var ue=te;te=q,q=ue}var le=K.label,he="".concat(u,"-").concat(q,"-").concat(le,"-").concat(te),ve="".concat(q,"-").concat(le,"-").concat(te);if(!s[ve]){var ge=s[ve]||0;ge++,s[ve]=ge}l[he]={graphId:u,nodeLabel1:q,edgeLabel:le,nodeLabel2:te}})})}),Object.keys(a).forEach(function(u){var h=a[u];if(!(h<r)){var v={nodes:[],edges:[]};v.nodes.push({id:"0",label:u}),i.push(v)}}),i},n.prototype.run=function(){var e=this;if(this.frequentSize1Subgraphs=this.generate1EdgeFrequentSubGraphs(),!(this.maxNodeNum<2)){var t=this.graphs,r=this.directed,i={};Object.keys(t).forEach(function(a){var s=t[a],o=s.nodeMap;s.nodes.forEach(function(l){var u=e.findForwardRootEdges(s,l);u.forEach(function(h){var v=o[h.to],E="".concat(l.label,"-").concat(h.label,"-").concat(v.label);i[E]||(i[E]={projected:[],nodeLabel1:l.label,edgeLabel:h.label,nodeLabel2:v.label});var D={graphId:a,edge:h,preNode:null};i[E].projected.push(D)})})}),Object.keys(i).forEach(function(a){var s=i[a],o=s.projected,l=s.nodeLabel1,u=s.edgeLabel,h=s.nodeLabel2;e.dfsCode.dfsEdgeList.push(new cl(0,1,l,u,h)),e.subGraphMining(o),e.dfsCode.dfsEdgeList.pop()})}},n}(),pC=function(e,t,r,i){var a={};return Object.keys(e).forEach(function(s,o){var l=e[s],u=new U_(o,!0,t),h={};l.nodes.forEach(function(v,E){u.addNode(E,v[r]),h[v.id]=E}),l.edges.forEach(function(v,E){var D=h[v.source],F=h[v.target];u.addEdge(-1,D,F,v[i])}),u&&u.getNodeNum()&&(a[u.id]=u)}),a},mC=function(e,t,r){var i=[];return e.forEach(function(a){var s={nodes:[],edges:[]};a.nodes.forEach(function(o){var l;s.nodes.push((l={id:"".concat(o.id)},l[t]=o.label,l))}),a.edges.forEach(function(o){var l;s.edges.push((l={source:"".concat(o.from),target:"".concat(o.to)},l[r]=o.label,l))}),i.push(s)}),i},G_="cluster",yC=function(e){var t=e.graphs,r=e.directed,i=r===void 0?!1:r,a=e.nodeLabelProp,s=a===void 0?G_:a,o=e.edgeLabelProp,l=o===void 0?G_:o,u=pC(t,i,s,l),h=e.minSupport,v=e.maxNodeNum,E=e.minNodeNum,D=e.verbose,F=e.top,G={graphs:u,minSupport:h,maxNodeNum:v,minNodeNum:E,top:F,verbose:D,directed:i},H=new gC(G);H.run();var K=mC(H.frequentSubgraphs,s,l);return K},_C=yC,H_=function(e,t,r,i){r===void 0&&(r="cluster"),i===void 0&&(i=2);var a=[],s=e.nodes;return t.forEach(function(o,l){a.push(j_(s,o,l,r,i))}),a},j_=function(e,t,r,i,a){var s=[r],o=[],l={};return t.forEach(function(u,h){if(u<=a&&r!==h){s.push(h),o.push(e[h]);var v=e[h][i];l[v]?(l[v].count++,l[v].dists.push(u)):l[v]={count:1,dists:[u]}}}),Object.keys(l).forEach(function(u){l[u].dists=l[u].dists.sort(function(h,v){return h-v})}),{nodeIdx:r,nodeId:e[r].id,nodeIdxs:s,neighbors:o,neighborNum:s.length-1,nodeLabelCountMap:l}},EC=function(e,t,r,i,a){var s=Math.ceil(r/t),o={},l=0;return i.forEach(function(u,h){for(var v=0,E=0,D=u.nodeIdxs,F=u.neighborNum-1;v<s;){for(var G=D[1+Math.floor(Math.random()*F)],H=0;(o["".concat(h,"-").concat(G)]||o["".concat(G,"-").concat(h)])&&(G=Math.floor(Math.random()*t),H++,!(H>2*t)););if(H<2*t&&(o["".concat(h,"-").concat(G)]={start:h,end:G,distance:a[h][G]},v++,l++,l>=r))return o;if(E++,E>2*t)break}if(v<s){var K=s-v;s=(s+K)/(t-h-1)}}),o},Jh=function(e,t,r,i){var a=r.nodes;return i||(i={}),Object.keys(e).forEach(function(s){var o,l;if(!(i&&i[s])){i[s]={nodes:[],edges:[]};var u=e[s],h=(o=t[u.start])===null||o===void 0?void 0:o.nodeIdxs,v=(l=t[u.end])===null||l===void 0?void 0:l.nodeIdxs;if(!(!h||!v)){var E=new Set(v),D=h.filter(function(q){return E.has(q)});if(!(!D||!D.length)){for(var F={},G=D.length,H=0;H<G;H++){var K=a[D[H]];i[s].nodes.push(K),F[K.id]=!0}r.edges.forEach(function(q){F[q.source]&&F[q.target]&&i[s].edges.push(q)})}}}}),i},qh=function(e,t,r,i){var a,s,o={};e.nodes.forEach(function(u){o[u.id]=u});var l=0;return!(!((a=t==null?void 0:t.edges)===null||a===void 0)&&a.length)||((s=t==null?void 0:t.nodes)===null||s===void 0?void 0:s.length)<2?0:(e.edges.forEach(function(u){var h=o[u.source][r],v=o[u.target][r],E=t==null?void 0:t.nodes[0][r],D=t==null?void 0:t.nodes[1][r],F=t==null?void 0:t.edges[0][i];u[i]===F&&(h===E&&v===D||h===D&&v===E)&&l++}),l)},xC=function(e,t,r){for(var i=1/0,a=0,s=function(u){var h=e[u],v=Object.keys(h).sort(function(q,te){return h[q]-h[te]}),E=10,D=[];v.forEach(function(q,te){D[te%E]||(D[te%E]={graphs:[],totalCount:0,aveCount:0}),D[te%E].graphs.push(q),D[te%E].totalCount+=h[q]});var F=0,G=[];D.forEach(function(q){var te=q.totalCount/q.graphs.length;q.aveCount=te,G.push(te);var ue=0,le=q.length;q.graphs.forEach(function(he,ve){var ge=h[he];q.graphs.forEach(function(Te,Oe){ve!==Oe&&(ue+=Math.abs(ge-h[Te]))})}),ue/=le*(le-1)/2,F+=ue}),F/=D.length;var H=0;G.forEach(function(q,te){G.forEach(function(ue,le){te!==le&&(H+=Math.abs(q-ue))}),H/=G.length*(G.length-1)/2});var K=H-F;i<K&&(i=K,a=u)},o=0;o<t;o++)s(o);return{structure:r[a],structureCountMap:e[a]}},V_=function(e,t){var r={},i={};return e.forEach(function(a,s){r[a.id]={idx:s,node:a,degree:0,inDegree:0,outDegree:0};var o=a[t];i[o]||(i[o]=[]),i[o].push(a)}),{nodeMap:r,nodeLabelMap:i}},Z_=function(e,t,r){var i={},a={};return e.forEach(function(s,o){i["".concat(v_)]={idx:o,edge:s};var l=s[t];a[l]||(a[l]=[]),a[l].push(s);var u=r[s.source];u&&(u.degree++,u.outDegree++);var h=r[s.target];h&&(h.degree++,h.inDegree++)}),{edgeMap:i,edgeLabelMap:a}},K_=function(e,t,r){var i=t.length,a={};return t.forEach(function(s,o){for(var l=r?0:o+1,u=e[o].id,h=l;h<i;h++)if(o!==h){var v=e[h].id,E=s[h];a["".concat(u,"-").concat(v)]=E,r||(a["".concat(v,"-").concat(u)]=E)}}),a},bC=function(e,t,r,i,a,s,o,l,u,h,v){var E,D="".concat(t.id,"-").concat(r.id);if(h&&h[D])return h[D];var F=v?v[D]:void 0;if(!F){var G=(E={},E[D]={start:i[t.id].idx,end:i[r.id].idx,distance:a},E);v=Jh(G,s,e,v),F=v[D]}return qh(F,o,l,u)},X_=function(e,t,r,i){var a,s,o,l=(a=e[t])===null||a===void 0?void 0:a.degree,u=(s=e[t])===null||s===void 0?void 0:s.inDegree,h=(o=e[t])===null||o===void 0?void 0:o.outDegree;return e[t]===void 0&&(l=1/0,u=1/0,h=1/0,i[t].forEach(function(v){var E=r[v.id].degree;l>E&&(l=E);var D=r[v.id].inDegree;u>D&&(u=D);var F=r[v.id].outDegree;h>F&&(h=F)}),e[t]={degree:l,inDegree:u,outDegree:h}),{minPatternNodeLabelDegree:l,minPatternNodeLabelInDegree:u,minPatternNodeLabelOutDegree:h}},wC=function(e,t,r,i,a,s,o){var l;if(r===void 0&&(r=!1),s===void 0&&(s="cluster"),o===void 0&&(o="cluster"),!(!e||!e.nodes)){var u=e.nodes.length;if(u){var h=Og(e,r),v=Og(t,r),E=K_(e.nodes,h,r),D=K_(t.nodes,v,r),F=V_(e.nodes,s),G=F.nodeMap,H=F.nodeLabelMap,K=V_(t.nodes,s),q=K.nodeMap,te=K.nodeLabelMap;Z_(e.edges,o,G);var ue=Z_(t.edges,o,q).edgeLabelMap,le=[];v==null||v.forEach(function(Yn){le=le.concat(Yn)}),a||(a=Math.max.apply(Math,(0,xe.ev)((0,xe.ev)([],le,!1),[2],!1))),i||(i=a);var he=H_(e,h,s,i),ve=H_(t,v,s,i),ge=Math.min(100,u*(u-1)/2),Te=EC(i,u,ge,he,h),Oe=Jh(Te,he,e),Ne=10,ze=1,Xe=1,Je=4,st={graphs:Oe,nodeLabelProp:s,edgeLabelProp:o,minSupport:ze,minNodeNum:Xe,maxNodeNum:Je,directed:r},Et=_C(st).slice(0,Ne),mt=Et.length,ct=[];Et.forEach(function(Yn,_r){ct[_r]={},Object.keys(Oe).forEach(function(Jn){var vr=Oe[Jn],wr=qh(vr,Yn,s,o);ct[_r][Jn]=wr})});var ht=xC(ct,mt,Et),At=ht.structure,kt=ht.structureCountMap,Ht=t.nodes[0],en=[],on=(l=t.nodes[0])===null||l===void 0?void 0:l[s],tn=-1/0;t.nodes.forEach(function(Yn){var _r=Yn[s],Jn=H[_r];(Jn==null?void 0:Jn.length)>tn&&(tn=Jn.length,en=Jn,on=_r,Ht=Yn)});var yn={},An={},kn={},qn={},hr={},qi={};Object.keys(te).forEach(function(Yn,_r){hr[Yn]=[],r&&(qi[Yn]=[]);var Jn=-1/0,vr=te[Yn],wr={};vr.forEach(function(xr){var pr=D["".concat(Ht.id,"-").concat(xr.id)];if(pr&&hr[Yn].push(pr),Jn<pr&&(Jn=pr),wr["".concat(Ht.id,"-").concat(xr.id)]={start:0,end:q[xr.id].idx,distance:pr},r){var ni=D["".concat(xr.id,"-").concat(Ht.id)];ni&&qi[Yn].push(ni)}}),hr[Yn]=hr[Yn].sort(function(xr,pr){return xr-pr}),r&&(qi[Yn]=qi[Yn].sort(function(xr,pr){return xr-pr})),An=Jh(wr,ve,t,An);var pn=[];if(Object.keys(wr).forEach(function(xr){if(kn[xr]){pn.push(kn[xr]);return}var pr=An[xr];kn[xr]=qh(pr,At,s,o),pn.push(kn[xr])}),pn=pn.sort(function(xr,pr){return pr-xr}),qn["".concat(Ht.id,"-").concat(Yn)]=pn,Yn!==on)for(var gr=(en==null?void 0:en.length)||0,Er=function(pr){var ni=en[pr],Ua=he[G[ni.id].idx],fi=Ua.nodeLabelCountMap[Yn],Cl=te[Yn].length;if(!fi||fi.count<Cl)return en.splice(pr,1),"continue";for(var Eu=!1,ca=0;ca<Cl;ca++)if(fi.dists[ca]>hr[Yn][ca]){Eu=!0;break}if(Eu)return en.splice(pr,1),"continue";var ns={};Ua.neighbors.forEach(function(ha){var bs=E["".concat(ni.id,"-").concat(ha.id)];ns["".concat(ni.id,"-").concat(ha.id)]={start:G[ni.id].idx,end:G[ha.id].idx,distance:bs}}),Oe=Jh(ns,he,e,Oe);var Ws=[];Object.keys(ns).forEach(function(ha){if(kt[ha]){Ws.push(kt[ha]);return}var bs=Oe[ha];kt[ha]=qh(bs,At,s,o),Ws.push(kt[ha])}),Ws=Ws.sort(function(ha,bs){return bs-ha});for(var Ho=!1,ca=0;ca<Cl;ca++)if(Ws[ca]<pn[ca]){Ho=!0;break}if(Ho)return en.splice(pr,1),"continue"},Ei=gr-1;Ei>=0;Ei--)Er(Ei)});var yr=[];en==null||en.forEach(function(Yn){for(var _r=G[Yn.id].idx,Jn=j_(e.nodes,h[_r],_r,s,a),vr=Jn.neighbors,wr=vr.length,pn=!1,gr=wr-1;gr>=0;gr--){if(vr.length+1<t.nodes.length){pn=!0;return}var Er=vr[gr],Ei=Er[s];if(!te[Ei]||!te[Ei].length){vr.splice(gr,1);continue}if(!hr[Ei]||!hr[Ei].length){vr.splice(gr,1);continue}var xr="".concat(Yn.id,"-").concat(Er.id),pr=E[xr],ni=hr[Ei].length-1,Ua=hr[Ei][ni];if(pr>Ua){vr.splice(gr,1);continue}if(r){var fi="".concat(Er.id,"-").concat(Yn.id),Cl=E[fi];ni=qi[Ei].length-1;var Eu=qi[Ei][ni];if(Cl>Eu){vr.splice(gr,1);continue}}var ca=kt[xr]?kt[xr]:bC(e,Yn,Er,G,pr,he,At,s,o,kt,Oe),ns="".concat(Ht.id,"-").concat(Ei),Ws=qn[ns][qn[ns].length-1];if(ca<Ws){vr.splice(gr,1);continue}var Ho=X_(yn,Ei,q,te),ha=Ho.minPatternNodeLabelDegree,bs=Ho.minPatternNodeLabelInDegree,so=Ho.minPatternNodeLabelOutDegree;if(G[Er.id].degree<ha){vr.splice(gr,1);continue}}pn||yr.push({nodes:[Yn].concat(vr)})});var za=Zh(t,Ht.id,!1).length,$i={};r?(Object.keys(za).forEach(function(Yn){var _r=q[Yn].node[s];$i[_r]?$i[_r].push(za[Yn]):$i[_r]=[za[Yn]]}),Object.keys($i).forEach(function(Yn){$i[Yn].sort(function(_r,Jn){return _r-Jn})})):$i=hr;for(var Go=yr.length,Hi=function(_r){var Jn=yr[_r],vr=Jn.nodes[0],wr={},pn={};Jn.nodes.forEach(function(Gr,Wa){pn[Gr.id]={idx:Wa,node:Gr,degree:0,inDegree:0,outDegree:0};var Oi=Gr[s];wr[Oi]?wr[Oi]++:wr[Oi]=1});var gr=[],Er={};e.edges.forEach(function(Gr){pn[Gr.source]&&pn[Gr.target]&&(gr.push(Gr),Er[Gr[o]]?Er[Gr[o]]++:Er[Gr[o]]=1,pn[Gr.source].degree++,pn[Gr.target].degree++,pn[Gr.source].outDegree++,pn[Gr.target].inDegree++)});for(var Ei=Object.keys(ue).length,xr=!1,pr=0;pr<Ei;pr++){var ni=Object.keys(ue)[pr];if(!Er[ni]||Er[ni]<ue[ni].length){xr=!0;break}}if(xr)return yr.splice(_r,1),"continue";var Ua=gr.length;if(Ua<t.edges.length)return yr.splice(_r,1),"break";for(var fi=!1,Cl=function(Wa){var Oi=gr[Wa],Gs=Oi[o],Dl=ue[Gs];if(!Dl||!Dl.length)return Er[Gs]--,Dl&&Er[Gs]<Dl.length?(fi=!0,"break"):(gr.splice(Wa,1),pn[Oi.source].degree--,pn[Oi.target].degree--,pn[Oi.source].outDegree--,pn[Oi.target].inDegree--,"continue");var V2=pn[Oi.source].node[s],Z2=pn[Oi.target].node[s],Np=!1;if(Dl.forEach(function(K2){var X2=q[K2.source].node,Y2=q[K2.target].node;X2[s]===V2&&Y2[s]===Z2&&(Np=!0),!r&&X2[s]===Z2&&Y2[s]===V2&&(Np=!0)}),!Np)return Er[Gs]--,Dl&&Er[Gs]<Dl.length?(fi=!0,"break"):(gr.splice(Wa,1),pn[Oi.source].degree--,pn[Oi.target].degree--,pn[Oi.source].outDegree--,pn[Oi.target].inDegree--,"continue")},pr=Ua-1;pr>=0;pr--){var Eu=Cl(pr);if(Eu==="break")break}if(fi)return yr.splice(_r,1),"continue";Jn.edges=gr;var ca=Zh(Jn,Jn.nodes[0].id,!1).length;if(Object.keys(ca).reverse().forEach(function(Gr){if(!(Gr===Jn.nodes[0].id||fi)){if(ca[Gr]===1/0){var Wa=pn[Gr].node[s];if(wr[Wa]--,wr[Wa]<te[Wa].length){fi=!0;return}var Oi=Jn.nodes.indexOf(pn[Gr].node);Jn.nodes.splice(Oi,1),pn[Gr]=void 0;return}var Gs=G[Gr].node[s];if(!$i[Gs]||!$i[Gs].length||ca[Gr]>$i[Gs][$i[Gs].length-1]){var Wa=pn[Gr].node[s];if(wr[Wa]--,wr[Wa]<te[Wa].length){fi=!0;return}var Oi=Jn.nodes.indexOf(pn[Gr].node);Jn.nodes.splice(Oi,1),pn[Gr]=void 0}}}),fi)return yr.splice(_r,1),"continue";for(var ns=!0,Ws=0;ns&&!fi;){ns=!1;var Ho=r?pn[vr.id].degree<q[Ht.id].degree||pn[vr.id].inDegree<q[Ht.id].inDegree||pn[vr.id].outDegree<q[Ht.id].outDegree:pn[vr.id].degree<q[Ht.id].degree;if(Ho){fi=!0;break}if(wr[vr[s]]<te[vr[s]].length){fi=!0;break}for(var ha=Jn.nodes.length,bs=ha-1;bs>=0;bs--){var so=Jn.nodes[bs],H2=pn[so.id].degree,xz=pn[so.id].inDegree,bz=pn[so.id].outDegree,wz=so[s],Ip=X_(yn,wz,q,te),j2=Ip.minPatternNodeLabelDegree,Mz=Ip.minPatternNodeLabelInDegree,Az=Ip.minPatternNodeLabelOutDegree,Tz=r?H2<j2||xz<Mz||bz<Az:H2<j2;if(Tz){if(wr[so[s]]--,wr[so[s]]<te[so[s]].length){fi=!0;break}Jn.nodes.splice(bs,1),pn[so.id]=void 0,ns=!0}}if(fi||!ns&&Ws!==0)break;Ua=gr.length;for(var ov=Ua-1;ov>=0;ov--){var oo=gr[ov];if(!pn[oo.source]||!pn[oo.target]){gr.splice(ov,1);var lv=oo[o];if(Er[lv]--,pn[oo.source]&&(pn[oo.source].degree--,pn[oo.source].outDegree--),pn[oo.target]&&(pn[oo.target].degree--,pn[oo.target].inDegree--),ue[lv]&&Er[lv]<ue[lv].length){fi=!0;break}ns=!0}}Ws++}if(fi||fi||Jn.nodes.length<t.nodes.length||gr.length<t.edges.length)return yr.splice(_r,1),"continue"},Ni=Go-1;Ni>=0;Ni--){var ao=Hi(Ni);if(ao==="break")break}for(var ji=yr.length,wa=function(_r){var Jn=yr[_r],vr={};Jn.edges.forEach(function(gr){var Er="".concat(gr.source,"-").concat(gr.target,"-").concat(gr.label);vr[Er]?vr[Er]++:vr[Er]=1});for(var wr=function(Er){var Ei=yr[Er],xr={};Ei.edges.forEach(function(ni){var Ua="".concat(ni.source,"-").concat(ni.target,"-").concat(ni.label);xr[Ua]?xr[Ua]++:xr[Ua]=1});var pr=!0;Object.keys(xr).length!==Object.keys(vr).length?pr=!1:Object.keys(vr).forEach(function(ni){xr[ni]!==vr[ni]&&(pr=!1)}),pr&&yr.splice(Er,1)},pn=ji-1;pn>_r;pn--)wr(pn);ji=yr.length},Ni=0;Ni<=ji-1;Ni++)wa(Ni);return yr}}},MC=wC,AC=function(){function n(e){e===void 0&&(e=10),this.linkedList=new d_,this.maxStep=e}return Object.defineProperty(n.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),n.prototype.isEmpty=function(){return!this.linkedList.head},n.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},n.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},n.prototype.push=function(e){this.linkedList.prepend(e),this.length>this.maxStep&&this.linkedList.deleteTail()},n.prototype.pop=function(){var e=this.linkedList.deleteHead();return e?e.value:null},n.prototype.toArray=function(){return this.linkedList.toArray().map(function(e){return e.value})},n.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},n}(),TC=AC,SC=x_,B9={getAdjMatrix:Wh,breadthFirstSearch:sO,connectedComponent:p_,getDegree:xg,getInDegree:lO,getOutDegree:uO,detectCycle:x_,detectDirectedCycle:SC,detectAllCycles:fO,detectAllDirectedCycle:E_,detectAllUndirectedCycle:__,depthFirstSearch:y_,dijkstra:Zh,findAllPath:zO,findShortestPath:Pg,floydWarshall:Og,labelPropagation:GO,louvain:L_,iLouvain:QO,kCore:qO,kMeans:eC,cosineSimilarity:I_,nodesCosineSimilarity:rC,minimumSpanningTree:hC,pageRank:B_,getNeighbors:Ja,Stack:TC,GADDI:MC};function yt(n){if(n.id!==void 0)return n.id;if(n.source!==void 0&&n.target!==void 0)return`${n.source}-${n.target}`;throw new Error(Qs("The datum does not have available id."))}function $h(n){return n.combo}function Y_(n,e){const t={nodes:(n.nodes||[]).map(yt),edges:(n.edges||[]).map(yt),combos:(n.combos||[]).map(yt)};return e?Object.values(t).flat():t}const Q_=(n,e,t)=>{var r;switch(t.type){case"degree":{const i=new Map;return(r=n.nodes)===null||r===void 0||r.forEach(a=>{const s=e(yt(a),t.direction).length;i.set(yt(a),s)}),i}case"betweenness":return PC(n,t.directed,t.weightPropertyName);case"closeness":return OC(n,t.directed,t.weightPropertyName);case"eigenvector":return DC(n,t.directed);case"pagerank":return CC(n,t.epsilon,t.linkProb);default:return J_(n)}},J_=n=>{var e;const t=new Map;return(e=n.nodes)===null||e===void 0||e.forEach(r=>{t.set(yt(r),0)}),t},PC=(n,e,t)=>{const r=J_(n),{nodes:i=[]}=n;return i.forEach(a=>{i.forEach(s=>{if(a!==s){const{allPath:o}=Pg(n,yt(a),yt(s),e,t),l=o.length;o.flat().forEach(u=>{u!==yt(a)&&u!==yt(s)&&r.set(u,r.get(u)+1/l)})}})}),r},OC=(n,e,t)=>{const r=new Map,{nodes:i=[]}=n;return i.forEach(a=>{const s=i.reduce((o,l)=>{if(a!==l){const{length:u}=Pg(n,yt(a),yt(l),e,t);o+=u}return o},0);r.set(yt(a),1/s)}),r},CC=(n,e,t)=>{var r;const i=new Map,a=B_(n,e,t);return(r=n.nodes)===null||r===void 0||r.forEach(s=>{i.set(yt(s),a[yt(s)])}),i},DC=(n,e)=>{const{nodes:t=[]}=n,r=LC(n,e),i=RC(r,t.length),a=new Map;return t.forEach((s,o)=>{a.set(yt(s),i[o])}),a},LC=(n,e)=>{const{nodes:t=[],edges:r=[]}=n,i=Array(t.length).fill(null).map(()=>Array(t.length).fill(0));return r.forEach(({source:a,target:s})=>{const o=t.findIndex(u=>yt(u)===a),l=t.findIndex(u=>yt(u)===s);e?i[o][l]=1:(i[o][l]=1,i[l][o]=1)}),i},RC=(n,e,t=100,r=1e-6)=>{let i=Array(e).fill(1),a=1/0;for(let s=0;s<t&&a>r;s++){const o=Array(e).fill(0);for(let u=0;u<e;u++)for(let h=0;h<e;h++)o[u]+=n[u][h]*i[h];const l=Math.sqrt(o.reduce((u,h)=>u+h*h,0));for(let u=0;u<e;u++)o[u]/=l;a=Math.sqrt(o.reduce((u,h,v)=>u+(h-i[v])*h,0)),i=o}return i};function Ao(n,e,t,r=li){const i=new Map(n.map(E=>[t(E),E])),a=new Map(e.map(E=>[t(E),E])),s=new Set(i.keys()),o=new Set(a.keys()),l=[],u=[],h=[],v=[];return o.forEach(E=>{s.has(E)?r(i.get(E),a.get(E))?v.push(a.get(E)):u.push(a.get(E)):l.push(a.get(E))}),s.forEach(E=>{o.has(E)||h.push(i.get(E))}),{enter:l,exit:h,keep:v,update:u}}function hl(n,e,t){const r=i=>{t&&!t(i)||(i.style.visibility=e)};n.forEach(i=>{r(i)})}function IC(n,e,t){const r={},i=a=>(a in r||(r[a]=0),`${e}-${a}-${r[a]++}`);return t.map(a=>typeof a=="string"?{type:a,key:i(a)}:typeof a=="function"?a.call(n):a.key?a:Object.assign(Object.assign({},a),{key:i(a.type)}))}class Lg{constructor(e){this.extensions=[],this.extensionMap={},this.context=e}setExtensions(e){const t=IC(this.context.graph,this.category,e),{enter:r,update:i,exit:a,keep:s}=Ao(this.extensions,t,o=>o.key);this.createExtensions(r),this.updateExtensions([...i,...s]),this.destroyExtensions(a),this.extensions=t}createExtension(e){const{category:t}=this,{key:r,type:i}=e,a=Ys(t,i);if(!a)return xa.warn(`The extension ${i} of ${t} is not registered.`);const s=new a(this.context,e);this.extensionMap[r]=s}createExtensions(e){e.forEach(t=>this.createExtension(t))}updateExtension(e){const{key:t}=e,r=this.extensionMap[t];r&&r.update(e)}updateExtensions(e){e.forEach(t=>this.updateExtension(t))}destroyExtension(e){const t=this.extensionMap[e];t&&(t.destroy(),delete this.extensionMap[e])}destroyExtensions(e){e.forEach(({key:t})=>this.destroyExtension(t))}destroy(){Object.values(this.extensionMap).forEach(e=>e.destroy()),this.context={},this.extensions=[],this.extensionMap={}}}class Rg{constructor(e,t){this.events=[],this.destroyed=!1,this.context=e,this.options=t}update(e){this.options=Object.assign(this.options,e)}destroy(){this.context={},this.options={},this.destroyed=!0}}class La extends Rg{}class ef extends La{constructor(e,t){super(e,Object.assign({},ef.defaultOptions,t)),this.isOverlapping=(r,i)=>i.some(a=>r.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=r=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],r.forEach(s=>{const o=s.getShape("label").getRenderBounds();i.isInViewport(o,!0)&&!this.isOverlapping(o,this.occupiedBounds)?(a.show.push(s),this.occupiedBounds.push(Mo(o,this.options.padding))):a.hide.push(s)}),a},this.hideLabelIfExceedViewport=(r,i)=>{const{exit:a}=Ao(r,i,s=>s.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(r,i)=>{const{model:a}=this.context,s=a.getData(),o=a.getRelatedEdgesData.bind(a);return r.map(u=>(this.nodeCentralities.has(u.id)||(this.nodeCentralities=Q_(s,o,i)),{node:u,centrality:this.nodeCentralities.get(u.id)})).sort((u,h)=>h.centrality-u.centrality).map(u=>u.node)},this.sortLabelElementsInView=r=>{const{sort:i,sortNode:a,sortCombo:s,sortEdge:o}=this.options,{model:l}=this.context;if(fn(i))return r.sort((G,H)=>i(l.getElementDataById(G.id),l.getElementDataById(H.id)));const{node:u=[],edge:h=[],combo:v=[]}=zh(r,G=>G.type),E=fn(s)?v.sort((G,H)=>s(...l.getComboData([G.id,H.id]))):v,D=fn(a)?u.sort((G,H)=>a(...l.getNodeData([G.id,H.id]))):this.sortNodesByCentrality(u,a),F=fn(o)?h.sort((G,H)=>o(...l.getEdgeData([G.id,H.id]))):h;return[...E,...D,...F]},this.labelElementsInView=[],this.isFirstRender=!0,this.onToggleVisibility=r=>{var i;if(((i=r.data)===null||i===void 0?void 0:i.stage)==="zIndex")return;if(!this.validate(r)){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:l}=this.detectLabelCollision(s);for(let u=o.length-1;u>=0;u--)this.showLabel(o[u]);l.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=r=>{const i=r.getShape("label");i&&hl(i,"hidden"),this.hiddenElements.set(r.id,r)},this.showLabel=r=>{const i=r.getShape("label");i&&hl(i,"visible"),r.toFront(),this.hiddenElements.delete(r.id)},this.onTransform=c_(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.enableToggle=!0,this.toggle=r=>{this.enableToggle&&this.onToggleVisibility(r)},this.onBeforeRender=()=>{this.enableToggle=!1},this.onAfterRender=r=>{this.onToggleVisibility(r),this.enableToggle=!0},this.bindEvents()}update(e){this.unbindEvents(),super.update(e),this.bindEvents(),this.onToggleVisibility({})}getLabelElements(){const{elementMap:e}=this.context.element,t=[];for(const r in e){const i=e[r];i.isVisible()&&i.getShape("label")&&t.push(i)}return t}getLabelElementsInView(){const e=this.context.viewport;return this.getLabelElements().filter(t=>e.isInViewport(t.getShape("key").getRenderBounds()))}bindEvents(){const{graph:e}=this.context;e.on(Zt.BEFORE_RENDER,this.onBeforeRender),e.on(Zt.AFTER_RENDER,this.onAfterRender),e.on(Zt.AFTER_DRAW,this.toggle),e.on(Zt.AFTER_LAYOUT,this.toggle),e.on(Zt.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:e}=this.context;e.off(Zt.BEFORE_RENDER,this.onBeforeRender),e.off(Zt.AFTER_RENDER,this.onAfterRender),e.off(Zt.AFTER_DRAW,this.toggle),e.off(Zt.AFTER_LAYOUT,this.toggle),e.off(Zt.AFTER_TRANSFORM,this.onTransform)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}destroy(){this.unbindEvents(),super.destroy()}}ef.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var NC=function(n){if(!vg(n)||!am(n,"Object"))return!1;if(Object.getPrototypeOf(n)===null)return!0;for(var e=n;Object.getPrototypeOf(e)!==null;)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(n)===e},ql=NC,BC=5;function kC(n,e){if(Object.hasOwn)return Object.hasOwn(n,e);if(n==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(n),e)}function q_(n,e,t,r){t=t||0,r=r||BC;for(var i in e)if(kC(e,i)){var a=e[i];a!==null&&ql(a)?(ql(n[i])||(n[i]={}),t<r?q_(n[i],a,t+1,r):n[i]=e[i]):Sa(a)?(n[i]=[],n[i]=n[i].concat(a)):a!==void 0&&(n[i]=a)}}var FC=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var r=0;r<e.length;r+=1)q_(n,e[r]);return n},ia=FC;const $_=[0,0,0];function zn(n,e){return n.map((t,r)=>t+e[r])}function Pr(n,e){return n.map((t,r)=>t-e[r])}function ds(n,e){return typeof e=="number"?n.map(t=>t*e):n.map((t,r)=>t*e[r])}function vs(n,e){return typeof e=="number"?n.map(t=>t/e):n.map((t,r)=>t/e[r])}function zC(n,e){return n.reduce((t,r,i)=>t+r*e[i],0)}function UC(n,e){const t=rc(n),r=rc(e);return[t[1]*r[2]-t[2]*r[1],t[2]*r[0]-t[0]*r[2],t[0]*r[1]-t[1]*r[0]]}function To(n,e){return n.map(t=>t*e)}function Wr(n,e){return Math.sqrt(n.reduce((t,r,i)=>t+Math.pow(r-e[i]||0,2),0))}function tf(n,e){return n.reduce((t,r,i)=>t+Math.abs(r-e[i]),0)}function Js(n){const e=n.reduce((t,r)=>t+Math.pow(r,2),0);return n.map(t=>t/Math.sqrt(e))}function Ig(n,e,t=!1){const r=n[0]*e[1]-n[1]*e[0];let i=Math.acos(ds(n,e).reduce((a,s)=>a+s,0)/(Wr(n,$_)*Wr(e,$_)));return t&&r<0&&(i=2*Math.PI-i),i}function k9(n,e){return n.every((t,r)=>t===e[r])}function nf(n,e=!0){return e?[-n[1],n[0]]:[n[1],-n[0]]}function Ng(n,e){return n.map(t=>t%e)}function fl(n){return[n[0],n[1]]}function rc(n){return VP(n)?[n[0],n[1],0]:n}function e1(n){const[e,t]=n;return!e&&!t?0:Math.atan2(t,e)}function t1(n,e){const[t,r]=n,[i,a]=e,s=Pr(t,r),o=Pr(i,a);return UC(s,o).every(l=>l===0)}function Bg(n,e,t=!1){if(t1(n,e))return;const[r,i]=n,[a,s]=e,o=((r[0]-a[0])*(a[1]-s[1])-(r[1]-a[1])*(a[0]-s[0]))/((r[0]-i[0])*(a[1]-s[1])-(r[1]-i[1])*(a[0]-s[0])),l=s[0]-a[0]?(r[0]-a[0]+o*(i[0]-r[0]))/(s[0]-a[0]):(r[1]-a[1]+o*(i[1]-r[1]))/(s[1]-a[1]);if(!(!t&&(!Is(o,0,1)||!Is(l,0,1))))return[r[0]+o*(i[0]-r[0]),r[1]+o*(i[1]-r[1])]}function n1(n){if(Array.isArray(n))return Is(n[0],0,1)&&Is(n[1],0,1)?n:[.5,.5];const e=n.split("-"),t=e.includes("left")?0:e.includes("right")?1:.5,r=e.includes("top")?0:e.includes("bottom")?1:.5;return[t,r]}function Ti(n){const{x:e=0,y:t=0,z:r=0}=n.style||{};return[+e,+t,+r]}function WC(n){const{x:e,y:t,z:r}=n.style||{};return e!==void 0||t!==void 0||r!==void 0}function r1(n,e){const[t,r]=e,{min:i,max:a}=n;return[i[0]+t*(a[0]-i[0]),i[1]+r*(a[1]-i[1])]}function qs(n,e="center"){const t=n1(e);return r1(n,t)}function F9(n,e){const t=parseAnchor(e);return r1(n,t)}const z9=n=>{const[e,t]=n;return{left:Math.min(e[0],t[0]),right:Math.max(e[0],t[0]),top:Math.min(e[1],t[1]),bottom:Math.max(e[1],t[1])}};function Fi(n){var e;return[n.x,n.y,(e=n.z)!==null&&e!==void 0?e:0]}function gs(n){var e;return{x:n[0],y:n[1],z:(e=n[2])!==null&&e!==void 0?e:0}}function U9(n){return n.sort((e,t)=>e[0]-t[0]||e[1]-t[1])}function W9(n){const e=new Set;return n.filter(t=>{const r=t.join(",");return e.has(r)?!1:(e.add(r),!0)})}function ic(n,e=0){return n.map(t=>parseFloat(t.toFixed(e)))}function So(n,e,t,r=!1){if(li(n,e))return n;const i=r?Pr(n,e):Pr(e,n),a=Js(i),s=[a[0]*t,a[1]*t];return zn(fl(n),s)}function i1(n,e){return n[1]===e[1]}function GC(n,e){return n[0]===e[0]}function HC(n,e){return i1(n,e)||GC(n,e)}function a1(n,e,t){return t1([n,e],[e,t])}function s1(n,e){return[2*e[0]-n[0],2*e[1]-n[1]]}function o1(n,e,t,r=!0,i=!1){for(let a=0;a<t.length;a++){let s=t[a],o=t[(a+1)%t.length];r&&(s=zn(e,s),o=zn(e,o));const l=i?s1(n,e):n,u=Bg([e,l],[s,o]);if(u)return{point:u,line:[s,o]}}return{point:e,line:void 0}}function jC(n,e,t,r){const i=n[0],a=n[1];let s=!1;t===void 0&&(t=0),r===void 0&&(r=e.length);const o=r-t;for(let l=0,u=o-1;l<o;u=l++){const h=e[l+t][0],v=e[l+t][1],E=e[u+t][0],D=e[u+t][1];v>a!=D>a&&i<(E-h)*(a-v)/(D-v)+h&&(s=!s)}return s}function VC(n,e,t=!1){const r=qs(e,"center"),i=[qs(e,"left-top"),qs(e,"right-top"),qs(e,"right-bottom"),qs(e,"left-bottom")];return o1(n,r,i,!1,t).point}function rf(n,e,t=!1){const r=e.center,i=t?s1(n,r):n,a=Pr(i,e.center),s=Math.atan2(a[1],a[0]);if(isNaN(s))return r;const o=Ns(e)/2,l=Bs(e)/2,u=r[0]+o*Math.cos(s),h=r[1]+l*Math.sin(s);return[u,h]}function ZC(n,e){let t=1/0,r=[n[0],e[0]];return n.forEach(i=>{e.forEach(a=>{const s=Wr(i,a);s<t&&(t=s,r=[i,a])})}),r}function KC(n,e){let t=1/0,r=[[0,0],[0,0]];return e.forEach(i=>{const a=XC(n,i);a<t&&(t=a,r=i)}),r}function XC(n,e){const t=l1(n,e);return Wr(n,t)}function l1(n,e){const[t,r]=e[0],[i,a]=e[1],[s,o]=n,l=i-t,u=a-r;if(l===0&&u===0)return[t,r];let h=((s-t)*l+(o-r)*u)/(l*l+u*u);h>1?h=1:h<0&&(h=0);const v=t+h*l,E=r+h*u;return[v,E]}function YC(n){const e=n.reduce((t,r)=>zn(t,r),[0,0]);return vs(e,n.length)}function kg(n,e=!0){const t=YC(n);return n.sort(([r,i],[a,s])=>{const o=Math.atan2(i-t[1],r-t[0]),l=Math.atan2(s-t[1],a-t[0]);return e?l-o:o-l})}function u1(n,e){return[n,[n[0],e[1]],e,[e[0],n[1]]]}class ui{constructor(e,t,r){if(this.phase=t,this.pointerByTouch=[],this.initialDistance=null,this.emitter=e,ui.instance)return ui.callbacks[this.phase].push(r),ui.instance;this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.bindEvents(),ui.instance=this,ui.callbacks[this.phase].push(r)}bindEvents(){const{emitter:e}=this;e.on(Dt.POINTER_DOWN,this.onPointerDown),e.on(Dt.POINTER_MOVE,this.onPointerMove),e.on(Dt.POINTER_UP,this.onPointerUp)}updatePointerPosition(e,t,r){const i=this.pointerByTouch.findIndex(a=>a.pointerId===e);i>=0&&(this.pointerByTouch[i]={x:t,y:r,pointerId:e})}onPointerDown(e){const{x:t,y:r}=e.client||{};if(!(t===void 0||r===void 0)&&(this.pointerByTouch.push({x:t,y:r,pointerId:e.pointerId}),e.pointerType==="touch"&&this.pointerByTouch.length===2)){ui.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),ui.callbacks.pinchstart.forEach(s=>s(e,{scale:0}))}}onPointerMove(e){if(this.pointerByTouch.length!==2||this.initialDistance===null)return;const{x:t,y:r}=e.client||{};if(t===void 0||r===void 0)return;this.updatePointerPosition(e.pointerId,t,r);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;ui.callbacks.pinchmove.forEach(l=>l(e,{scale:(o-1)*5}))}onPointerUp(e){var t;ui.callbacks.pinchend.forEach(r=>r(e,{scale:0})),ui.isPinching=!1,this.initialDistance=null,this.pointerByTouch=[],(t=ui.instance)===null||t===void 0||t.tryDestroy()}destroy(){this.emitter.off(Dt.POINTER_DOWN,this.onPointerDown),this.emitter.off(Dt.POINTER_MOVE,this.onPointerMove),this.emitter.off(Dt.POINTER_UP,this.onPointerUp),ui.instance=null}off(e,t){const r=ui.callbacks[e].indexOf(t);r>-1&&ui.callbacks[e].splice(r,1),this.tryDestroy()}tryDestroy(){Object.values(ui.callbacks).every(e=>e.length===0)&&this.destroy()}}ui.isPinching=!1,ui.instance=null,ui.callbacks={pinchstart:[],pinchmove:[],pinchend:[]};const c1=n=>n.map(e=>fr(e)?e.toLocaleLowerCase():e);class $l{constructor(e){this.map=new Map,this.boundHandlePinch=()=>{},this.recordKey=new Set,this.onKeyDown=t=>{t!=null&&t.key&&(this.recordKey.add(t.key),this.trigger(t))},this.onKeyUp=t=>{t!=null&&t.key&&this.recordKey.delete(t.key)},this.onWheel=t=>{this.triggerExtendKey(Dt.WHEEL,t)},this.onDrag=t=>{this.triggerExtendKey(Dt.DRAG,t)},this.handlePinch=(t,r)=>{this.triggerExtendKey(Dt.PINCH,Object.assign(Object.assign({},t),r))},this.onFocus=()=>{this.recordKey.clear()},this.emitter=e,this.bindEvents()}bind(e,t){e.length!==0&&(e.includes(Dt.PINCH)&&!this.pinchHandler&&(this.boundHandlePinch=this.handlePinch.bind(this),this.pinchHandler=new ui(this.emitter,"pinchmove",this.boundHandlePinch)),this.map.set(e,t))}unbind(e,t){this.map.forEach((r,i)=>{li(i,e)&&(!t||t===r)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(e){const t=c1(Array.from(this.recordKey)).sort(),r=c1(e).sort();return li(t,r)}bindEvents(){var e;const{emitter:t}=this;t.on(Dt.KEY_DOWN,this.onKeyDown),t.on(Dt.KEY_UP,this.onKeyUp),t.on(Dt.WHEEL,this.onWheel),t.on(Dt.DRAG,this.onDrag),(e=globalThis.addEventListener)===null||e===void 0||e.call(globalThis,"focus",this.onFocus)}trigger(e){this.map.forEach((t,r)=>{this.match(r)&&t(e)})}triggerExtendKey(e,t){this.map.forEach((r,i)=>{i.includes(e)&&li(Array.from(this.recordKey),i.filter(a=>a!==e))&&r(t)})}destroy(){var e,t;this.unbindAll(),this.emitter.off(Dt.KEY_DOWN,this.onKeyDown),this.emitter.off(Dt.KEY_UP,this.onKeyUp),this.emitter.off(Dt.WHEEL,this.onWheel),this.emitter.off(Dt.DRAG,this.onDrag),(e=this.pinchHandler)===null||e===void 0||e.off("pinchmove",this.boundHandlePinch),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"blur",this.onFocus)}}class ac extends La{constructor(e,t){super(e,ia({},ac.defaultOptions,t)),this.shortcut=new $l(e.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(e){if(!this.validate(e)||!this.isKeydown()||this.startPoint)return;const{canvas:t,graph:r}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/r.getZoom()),this.rectShape=new ki({id:"g6-brush-select",style:i}),t.appendChild(this.rectShape),this.startPoint=[e.canvas.x,e.canvas.y]}onPointerMove(e){var t;if(!this.startPoint)return;const{immediately:r,mode:i}=this.options;this.endPoint=af(e),(t=this.rectShape)===null||t===void 0||t.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])}),r&&i==="default"&&this.updateElementsStates(u1(this.startPoint,this.endPoint))}onPointerUp(e){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=af(e),this.updateElementsStates(u1(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:e}=this.context,t=Object.values(e.getData()).reduce((r,i)=>Object.assign({},r,i.reduce((a,s)=>(a[yt(s)]=[],a),{})),{});e.setElementState(t,this.options.animation)}updateElementsStates(e){const{graph:t}=this.context,{enableElements:r,state:i,mode:a,onSelect:s}=this.options,o=this.selector(t,e,r);let l={};switch(a){case"union":o.forEach(u=>{l[u]=[...t.getElementState(u),i]});break;case"diff":o.forEach(u=>{const h=t.getElementState(u);l[u]=h.includes(i)?h.filter(v=>v!==i):[...h,i]});break;case"intersect":o.forEach(u=>{const h=t.getElementState(u);l[u]=h.includes(i)?[i]:[]});break;case"default":default:o.forEach(u=>{l[u]=[i]});break}fn(s)&&(l=s(l)),t.setElementState(l,this.options.animation)}selector(e,t,r){if(!r||r.length===0)return[];const i=[],a=e.getData();if(r.forEach(s=>{a[`${s}s`].forEach(o=>{const l=yt(o);e.getElementVisibility(l)!=="hidden"&&jC(e.getElementPosition(l),t)&&i.push(l)})}),r.includes("edge")){const s=a.edges;s==null||s.forEach(o=>{const{source:l,target:u}=o;i.includes(l)&&i.includes(u)&&i.push(yt(o))})}return i}clearBrush(){var e;(e=this.rectShape)===null||e===void 0||e.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:e}=this.options,t=Array.isArray(e)?e:[e];return this.shortcut.match(t.filter(r=>r!=="drag"))}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}bindEvents(){const{graph:e}=this.context;e.on(Dt.POINTER_DOWN,this.onPointerDown),e.on(Dt.POINTER_MOVE,this.onPointerMove),e.on(Dt.POINTER_UP,this.onPointerUp),e.on(Xs.CLICK,this.clearStates)}unbindEvents(){const{graph:e}=this.context;e.off(Dt.POINTER_DOWN,this.onPointerDown),e.off(Dt.POINTER_MOVE,this.onPointerMove),e.off(Dt.POINTER_UP,this.onPointerUp),e.off(Xs.CLICK,this.clearStates)}update(e){this.unbindEvents(),this.options=ia(this.options,e),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}ac.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 af=n=>[n.canvas.x,n.canvas.y],$s=.8,dl=["node","edge","combo"];function vl(n,e,t,r,i=0){r==="TB"&&e(n,i);const a=t(n);if(a)for(const s of a)vl(s,e,t,r,i+1);r==="BT"&&e(n,i)}function QC(n,e,t){const r=[[n,0]];for(;r.length;){const[i,a]=r.shift();e(i,a);const s=t(i);if(s)for(const o of s)r.push([o,a+1])}}function h1(n,e,t,r,i="both"){if(e==="combo"||e==="node")return Fg(n,t,r,i);const a=n.getEdgeData(t);if(!a)return[];const s=Fg(n,a.source,r-1,i),o=Fg(n,a.target,r-1,i);return Array.from(new Set([...s,...o,t]))}function Fg(n,e,t,r="both"){const i=new Set,a=new Set,s=new Set;return QC(e,(o,l)=>{l>t||(s.add(o),n.getRelatedEdgesData(o,r).forEach(u=>{const h=yt(u);!a.has(h)&&l<t&&(s.add(h),a.add(h))}))},o=>n.getRelatedEdgesData(o,r).map(l=>l.source===o?l.target:l.source).filter(l=>i.has(l)?!1:(i.add(l),!0))),Array.from(s)}function zg(n){return n.states||[]}var sf=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class of extends La{constructor(e,t){super(e,Object.assign({},of.defaultOptions,t)),this.onClickSelect=r=>sf(this,void 0,void 0,function*(){var i,a;this.validate(r)&&(yield this.updateState(r),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,r))}),this.onClickCanvas=r=>sf(this,void 0,void 0,function*(){var i,a;this.validate(r)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,r))}),this.shortcut=new $l(e.graph),this.bindEvents()}bindEvents(){const{graph:e}=this.context;this.unbindEvents(),dl.forEach(t=>{e.on(`${t}:${Dt.CLICK}`,this.onClickSelect)}),e.on(Xs.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:e,trigger:t}=this.options;return e&&this.shortcut.match(t)}getNeighborIds(e){const{target:t,targetType:r}=e,{graph:i}=this.context,{degree:a}=this.options;return h1(i,r,t.id,typeof a=="function"?a(e):a).filter(s=>s!==t.id)}updateState(e){return sf(this,void 0,void 0,function*(){const{state:t,unselectedState:r,neighborState:i,animation:a}=this.options;if(!t&&!i&&!r)return;const{target:s}=e,{graph:o}=this.context,l=o.getElementData(s.id),u=zg(l).includes(t)?"unselect":"select",h={},v=this.isMultipleSelect,E=[s.id],D=this.getNeighborIds(e);if(v)if(Object.assign(h,this.getDataStates()),u==="select"){const F=(G,H)=>{G.forEach(K=>{const q=new Set(o.getElementState(K));q.add(H),q.delete(r),h[K]=Array.from(q)})};F(E,t),F(D,i),r&&Object.keys(h).forEach(G=>{const H=h[G];!H.includes(t)&&!H.includes(i)&&!H.includes(r)&&h[G].push(r)})}else{const F=h[s.id];h[s.id]=F.filter(G=>G!==t&&G!==i),F.includes(r)||h[s.id].push(r),D.forEach(G=>{h[G]=h[G].filter(H=>H!==i),h[G].includes(t)||h[G].push(r)})}else if(u==="select"){Object.assign(h,this.getClearStates(!!r));const F=(G,H)=>{G.forEach(K=>{h[K]||(h[K]=o.getElementState(K)),h[K].push(H)})};F(E,t),F(D,i),r&&Object.keys(h).forEach(G=>{!E.includes(G)&&!D.includes(G)&&h[G].push(r)})}else Object.assign(h,this.getClearStates());yield o.setElementState(h,a)})}getDataStates(){const{graph:e}=this.context,{nodes:t,edges:r,combos:i}=e.getData(),a={};return[...t,...r,...i].forEach(s=>{a[yt(s)]=zg(s)}),a}getClearStates(e=!1){const{graph:t}=this.context,{state:r,unselectedState:i,neighborState:a}=this.options,s=new Set([r,i,a]),{nodes:o,edges:l,combos:u}=t.getData(),h={};return[...o,...l,...u].forEach(v=>{const E=zg(v),D=E.filter(F=>!s.has(F));(e||D.length!==E.length)&&(h[yt(v)]=D)}),h}clearState(){return sf(this,void 0,void 0,function*(){const{graph:e}=this.context;yield e.setElementState(this.getClearStates(),this.options.animation)})}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;dl.forEach(t=>{e.off(`${t}:${Dt.CLICK}`,this.onClickSelect)}),e.off(Xs.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}of.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function ba(n){var e;return!!(!((e=n.style)===null||e===void 0)&&e.collapsed)}var aa=function(n,e,t){for(var r=0,i=fr(e)?e.split("."):e;n&&r<i.length;)n=n[i[r++]];return n===void 0||r<i.length?t:n},sc=function(n,e,t){var r=n,i=fr(e)?e.split("."):e;return i.forEach(function(a,s){s<i.length-1?(si(r[a])||(r[a]=sn(i[s+1])?[]:{}),r=r[a]):r[a]=t}),n},JC=function(n){var e=r_(n);return e.charAt(0).toLowerCase()+e.substring(1)},qC=JC;function oc(n,e){if(!n.startsWith(e))return!1;const t=n[e.length];return t>="A"&&t<="Z"}function f1(n,e){return`${e}${kh(n)}`}function d1(n,e,t=!0){if(!e||!oc(n,e))return n;const r=n.slice(e.length);return t?qC(r):r}function mi(n,e){const t=Object.entries(n).reduce((r,[i,a])=>(i==="className"||i==="class"||oc(i,e)&&Object.assign(r,{[d1(i,e)]:a}),r),{});if("opacity"in n){const r=f1("opacity",e),i=n.opacity;if(r in n){const a=n[r];Object.assign(t,{opacity:i*a})}else Object.assign(t,{opacity:i})}return t}function Ug(n,e){const t=e.length;return Object.keys(n).reduce((r,i)=>{if(i.startsWith(e)){const a=i.slice(t);r[a]=n[i]}return r},{})}function v1(n,e){const t=typeof e=="string"?[e]:e,r={};return Object.keys(n).forEach(i=>{t.find(a=>i.startsWith(a))||(r[i]=n[i])}),r}function G9(n,e,t){return Object.entries(n).reduce((r,[i,a])=>(oc(i,e)?r[f1(d1(i,e,!1),t)]=a:r[i]=a,r),{})}function Ra(n=0){if(typeof n=="number")return[n,n,n];const[e,t=e,r=e]=n;return[e,t,r]}var $C=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function g1(n,e){const{datum:t,graph:r}=e;return typeof n=="function"?n.call(r,t):Object.fromEntries(Object.entries(n).map(([i,a])=>typeof a=="function"?[i,a.call(r,t)]:[i,a]))}function Di(n,e){const t=(n==null?void 0:n.style)||{},r=(e==null?void 0:e.style)||{};for(const i in t)i in r||(r[i]=t[i]);return Object.assign({},n,e,{style:r})}function eD(n){const{x:e,y:t,z:r,class:i,className:a,transform:s,transformOrigin:o,zIndex:l,visibility:u}=n;return $C(n,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}function tD(n,e){const t=Ra(n);let r={};return e.text&&!e.fontSize&&(r={fontSize:Math.min(...t)*.5}),e.src&&(!e.width||!e.height)&&(r={width:t[0]*.5,height:t[1]*.5}),r}function p1(n){if(n)return typeof n=="string"||typeof n=="function"||Array.isArray(n)?{type:"group",field:e=>e.id,color:n,invert:!1}:n}function nD(n,e){if(!e)return{};const{type:t,color:r,field:i,invert:a}=e,s=l=>{const u=typeof r=="string"?Ys("palette",r):r;if(typeof u=="function"){const h={};return l.forEach(([v,E])=>{h[v]=u(a?1-E:E)}),h}else if(Array.isArray(u)){const h=a?[...u].reverse():u,v={};return l.forEach(([E,D])=>{v[E]=h[D%u.length]}),v}return{}},o=(l,u)=>{var h;return typeof l=="string"?(h=u.data)===null||h===void 0?void 0:h[l]:l==null?void 0:l(u)};if(t==="group"){const l=zh(n,E=>{if(!i)return"default";const D=o(i,E);return D?String(D):"default"}),u=Object.keys(l),h=s(u.map((E,D)=>[E,D])),v={};return Object.entries(l).forEach(([E,D])=>{D.forEach(F=>{v[yt(F)]=h[E]})}),v}else if(t==="value"){const[l,u]=n.reduce(([v,E],D)=>{const F=o(i,D);if(typeof F!="number")throw new Error(Qs(`Palette field ${i} is not a number`));return[Math.min(v,F),Math.max(E,F)]},[1/0,-1/0]),h=u-l;return s(n.map(v=>[v.id,(o(i,v)-l)/h]))}}function m1(n){const e=typeof n=="string"?Ys("palette",n):n;if(typeof e!="function")return e}function y1(n,e){let t=2*n;return typeof e=="string"?t=n*Number(e.replace("%",""))/100:typeof e=="number"&&(t=e),isNaN(t)&&(t=2*n),t}function _1(n,e,t=1,r=!1){const i=r?t:1,a=(n.max[0]-n.min[0])*i;return y1(a,e)}function rD(n,e,t=1){const r=Wr(n[0],n[1])*t;return y1(r,e)}var iD={}.toString,aD=function(n){return iD.call(n).replace(/^\[object /,"").replace(/]$/,"")},sD=aD,oD=Object.prototype,lD=function(n){var e=n&&n.constructor,t=typeof e=="function"&&e.prototype||oD;return n===t},uD=lD,cD=Object.prototype.hasOwnProperty;function hD(n){if(xn(n))return!0;if(Qu(n))return!n.length;var e=sD(n);if(e==="Map"||e==="Set")return!n.size;if(uD(n))return!Object.keys(n).length;for(var t in n)if(cD.call(n,t))return!1;return!0}var Fs=hD;class lc extends ng{constructor(e){E1(e.style),super(e),this.shapeMap={},this.animateMap={},this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(e,t,r,i,a){var s,o,l,u,h,v,E,D;const F=this.shapeMap[e];if(r===!1){F&&((s=a==null?void 0:a.beforeDestroy)===null||s===void 0||s.call(a,F),i.removeChild(F),delete this.shapeMap[e],(o=a==null?void 0:a.afterDestroy)===null||o===void 0||o.call(a,F));return}const G=typeof t=="string"?Ys(Ju.SHAPE,t):t;if(!G)throw new Error(Qs(`Shape ${t} not found`));if(!F||F.destroyed||!(F instanceof G)){F&&((l=a==null?void 0:a.beforeDestroy)===null||l===void 0||l.call(a,F),F==null||F.destroy(),(u=a==null?void 0:a.afterDestroy)===null||u===void 0||u.call(a,F)),(h=a==null?void 0:a.beforeCreate)===null||h===void 0||h.call(a);const H=new G({className:e,style:r});return i.appendChild(H),this.shapeMap[e]=H,(v=a==null?void 0:a.afterCreate)===null||v===void 0||v.call(a,H),H}return(E=a==null?void 0:a.beforeUpdate)===null||E===void 0||E.call(a,F),l0(F,r),(D=a==null?void 0:a.afterUpdate)===null||D===void 0||D.call(a,F),F}update(e={}){const t=Object.assign({},this.attributes,e);E1(t),dR(this,t),this.render(t,this),this.setVisibility()}bindEvents(){}getGraphicStyle(e){return eD(e)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(e,t){if(e.length===0)return null;const r=[];if(e[0].x!==void 0||e[0].y!==void 0||e[0].z!==void 0){const{x:a=0,y:s=0,z:o=0}=this.attributes;e.forEach(l=>{const{x:u=a,y:h=s,z:v=o}=l;Object.assign(l,{transform:v?[["translate3d",u,h,v]]:[["translate",u,h]]})})}const i=super.animate(e,t);if(i&&(Wg(this,i),r.push(i)),Array.isArray(e)&&e.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(e[0]).some(s=>!a.includes(s))){Object.entries(this.shapeMap).forEach(([o,l])=>{const u=`get${kh(o)}Style`,h=this[u];if(fn(h)){const v=e.map(D=>h.call(this,Object.assign(Object.assign({},this.attributes),D))),E=l.animate(yg(v),t);E&&(Wg(l,E),r.push(E))}});const s=(o,l)=>{if(!Fs(o)){const u=`get${kh(l)}Style`,h=this[u];if(fn(h)){const v=e.map(E=>h.call(this,Object.assign(Object.assign({},this.attributes),E)));Object.entries(v[0]).map(([E])=>{const D=v.map(G=>G[E]),F=o[E];if(F){const G=F.animate(yg(D),t);G&&(Wg(F,G),r.push(G))}})}}};this.compositeShapes.forEach(([o,l])=>{const u=Ug(this.shapeMap,l);s(u,o)})}}return mg(r)}getShape(e){return this.shapeMap[e]}setVisibility(){const{visibility:e}=this.attributes;hl(this,e)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function Wg(n,e){e==null||e.finished.then(()=>{const t=n.activeAnimations.findIndex(r=>r===e);t>-1&&n.activeAnimations.splice(t,1)})}function E1(n){if(!n)return{};if("x"in n||"y"in n||"z"in n){const{x:e=0,y:t=0,z:r,transform:i}=n,a=s_(e,t,r,i);a&&(n.transform=a)}return n}var fD=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class Po extends lc{constructor(e){super(Di({style:Po.defaultStyleProps},e))}isTextStyle(e){return oc(e,"label")}isBackgroundStyle(e){return oc(e,"background")}getTextStyle(e){const t=this.getGraphicStyle(e),{padding:r}=t,i=fD(t,["padding"]);return v1(i,"background")}getBackgroundStyle(e){if(e.background===!1)return!1;const t=this.getGraphicStyle(e),{wordWrap:r,wordWrapWidth:i,padding:a}=t,s=mi(t,"background"),{min:[o,l],center:[u,h],halfExtents:[v,E]}=this.shapeMap.text.getGeometryBounds(),[D,F,G,H]=cs(a),K=v*2+H+F,{width:q,height:te}=s;q&&te?Object.assign(s,{x:u-Number(q)/2,y:h-Number(te)/2}):Object.assign(s,{x:o-H,y:l-D,width:r?Math.min(K,i+H+F):K,height:E*2+D+G});const{radius:ue}=s;if(typeof ue=="string"&&ue.endsWith("%")){const le=Number(ue.replace("%",""))/100;s.radius=Math.min(+s.width,+s.height)*le}return s}render(e=this.parsedAttributes,t=this){this.upsert("text",ol,this.getTextStyle(e),t),this.upsert("background",ki,this.getBackgroundStyle(e),t)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}Po.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 eu extends lc{constructor(e){super(Di({style:eu.defaultStyleProps},e))}getBadgeStyle(e){return this.getGraphicStyle(e)}render(e=this.parsedAttributes,t=this){this.upsert("label",Po,this.getBadgeStyle(e),t)}getGeometryBounds(){const e=this.getShape("label");return(e.getShape("background")||e.getShape("text")).getGeometryBounds()}}eu.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function dD(n,e=!0){const t=[];return n.forEach((r,i)=>{t.push([i===0?"M":"L",...r])}),e&&t.push(["Z"]),t}const x1={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 vD(n){const e=n.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),t=[];let r="",i={};for(;e.length>0;){let a=e.shift();a in x1?r=a:e.unshift(a),i={type:r},x1[r].forEach(l=>{a=e.shift(),i[l]=a}),r==="M"?r="L":r==="m"&&(r="l");const[s,...o]=Object.values(i);t.push([s,...o.map(Number)])}return t}function gD(n){const e=[];return(typeof n=="string"?vD(n):n).forEach(r=>{const i=r[0];if(i==="Z"){e.push(e[0]);return}if(i!=="A")for(let a=1;a<r.length;a=a+2)e.push([r[a],r[a+1],0]);else{const a=r.length;e.push([r[a-2],r[a-1],0])}}),e}const b1=n=>{if(n.length<2)return[["M",0,0],["L",0,0]];const e=n[0],t=n[1],r=n[n.length-1],i=n[n.length-2];n.unshift(i,r),n.push(e,t);const a=[["M",r[0],r[1]]];for(let s=1;s<n.length-2;s+=1){const[o,l]=n[s-1],[u,h]=n[s],[v,E]=n[s+1],[D,F]=s!==n.length-2?n[s+2]:[v,E],G=u+(v-o)/6,H=h+(E-l)/6,K=v-(D-u)/6,q=E-(F-h)/6;a.push(["C",G,H,K,q,v,E])}return a};function pD(n,e,t,r,i,a,s){const[o,l]=qs(n,e),u={textAlign:e==="left"?"right":e==="right"?"left":"center",textBaseline:e==="top"?"bottom":e==="bottom"?"top":"middle",transform:[["translate",o+t,l+r]]};if(e==="center"||!i)return u;const h=gD(a);if(!h||h.length<=3)return u;const v=h.map((F,G)=>{const H=F,K=h[(G+1)%h.length];return li(H,K)?null:[H,K]}).filter(Boolean),E=KC([o,l],v),D=l1([o,l],E);if(D&&E&&(u.transform=[["translate",D[0]+t,D[1]+r]],s)){const F=Math.atan((E[0][1]-E[1][1])/(E[0][0]-E[1][0]));u.transform.push(["rotate",F/Math.PI*180]),u.textAlign="center",(e==="right"||e==="left")&&(F>0?u.textBaseline=e==="right"?"bottom":"top":u.textBaseline=e==="right"?"top":"bottom")}return u}var mD=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class uc extends lc{constructor(e){super(Di({style:uc.defaultStyleProps},e))}getLabelStyle(e){if(!e.label||!e.d||e.d.length===0)return!1;const t=mi(this.getGraphicStyle(e),"label"),{maxWidth:r,offsetX:i,offsetY:a,autoRotate:s,placement:o,closeToPath:l}=t,u=mD(t,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),h=this.shapeMap.key,v=h==null?void 0:h.getRenderBounds();return Object.assign(pD(v,o,i,a,l,e.d,s),{wordWrapWidth:_1(v,r)},u)}getKeyStyle(e){return this.getGraphicStyle(e)}render(e,t){this.upsert("key",Oa,this.getKeyStyle(e),t),this.upsert("label",Po,this.getLabelStyle(e),t)}}uc.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function yD(n){const e=[],t=r=>{r!=null&&r.children.length&&r.children.forEach(i=>{e.push(i),t(i)})};return t(n),e}function _D(n){const e=[];let t=n.parentNode;for(;t;)e.push(t),t=t.parentNode;return e}class Gg extends Ku{constructor(e){super(e),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},tu=this,this.isMutationObserved=!0,this.addEventListener(Xn.MOUNTED,this.onMounted),this.addEventListener(Xn.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:e,clipPath:t,width:r=0,height:i=0}=this.attributes;if(e&&r&&i){const[a,s]=this.getBounds().min,o={x:a,y:s,radius:e,width:r,height:i};if(t)Object.assign(this.parsedStyle.clipPath.style,o);else{const l=new ki({style:o});this.style.clipPath=l}}else t&&(this.style.clipPath=null)}}const Hg=new WeakMap;let tu=null;const jg=n=>{if(tu&&_D(tu).includes(n)){const e=Hg.get(n);e?e.includes(tu)||e.push(tu):Hg.set(n,[tu])}},Vg=n=>{const e=Hg.get(n);e&&e.forEach(t=>t.handleRadius())};class w1 extends lc{constructor(e){super(e)}isImage(){const{src:e}=this.attributes;return!!e}getIconStyle(e=this.attributes){const{width:t=0,height:r=0}=e,i=this.getGraphicStyle(e);return this.isImage()?Object.assign({x:-t/2,y:-r/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(e=this.attributes,t=this){this.upsert("icon",this.isImage()?Gg:ol,this.getIconStyle(e),t)}}class M1 extends lc{get context(){return this.config.context}get parsedAttributes(){return this.attributes}onframe(){}animate(e,t){const r=super.animate(e,t);return r&&(r.onframe=()=>this.onframe(),r.finished.then(()=>this.onframe())),r}}var lf=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class ps extends M1{constructor(e){super(Di({style:ps.defaultStyleProps},e)),this.type="node"}getSize(e=this.attributes){const{size:t}=e;return Ra(t)}getKeyStyle(e){const t=this.getGraphicStyle(e);return Object.assign(v1(t,["label","halo","icon","badge","port"]))}getLabelStyle(e){if(e.label===!1||!e.labelText)return!1;const t=mi(this.getGraphicStyle(e),"label"),{placement:r,maxWidth:i,offsetX:a,offsetY:s}=t,o=lf(t,["placement","maxWidth","offsetX","offsetY"]),l=this.getShape("key").getLocalBounds();return Object.assign(rE(l,r,a,s),{wordWrapWidth:_1(l,i)},o)}getHaloStyle(e){if(e.halo===!1)return!1;const t=this.getKeyStyle(e),{fill:r}=t,i=lf(t,["fill"]),a=mi(this.getGraphicStyle(e),"halo");return Object.assign(Object.assign(Object.assign({},i),{stroke:r}),a)}getIconStyle(e){if(e.icon===!1||!e.iconText&&!e.iconSrc)return!1;const t=mi(this.getGraphicStyle(e),"icon");return Object.assign(tD(e.size,t),t)}getBadgesStyle(e){var t;const r=Ug(this.shapeMap,"badge-"),i={};if(Object.keys(r).forEach(v=>{i[v]=!1}),e.badge===!1||!(!((t=e.badges)===null||t===void 0)&&t.length))return i;const{badges:a=[],badgePalette:s,opacity:o=1}=e,l=lf(e,["badges","badgePalette","opacity"]),u=m1(s),h=mi(this.getGraphicStyle(l),"badge");return a.forEach((v,E)=>{i[E]=Object.assign(Object.assign({backgroundFill:u?u[E%(u==null?void 0:u.length)]:void 0,opacity:o},h),this.getBadgeStyle(v))}),i}getBadgeStyle(e){const t=this.getShape("key"),{placement:r="top",offsetX:i,offsetY:a}=e,s=lf(e,["placement","offsetX","offsetY"]),o=rE(t.getLocalBounds(),r,i,a,!0);return Object.assign(Object.assign({},o),s)}getPortsStyle(e){var t;const r=this.getPorts(),i={};if(Object.keys(r).forEach(o=>{i[o]=!1}),e.port===!1||!(!((t=e.ports)===null||t===void 0)&&t.length))return i;const a=mi(this.getGraphicStyle(e),"port"),{ports:s=[]}=e;return s.forEach((o,l)=>{const u=o.key||l,h=Object.assign(Object.assign({},a),o);if(eE(h))i[u]=!1;else{const[v,E]=this.getPortXY(e,o);i[u]=Object.assign({transform:[["translate",v,E]]},h)}}),i}getPortXY(e,t){const{placement:r="left"}=t,i=this.getShape("key");return a0(ED(this.context,i),r)}getPorts(){return Ug(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(e,t=!1){const r=this.getShape("key").getBounds();return VC(e,r,t)}drawHaloShape(e,t){const r=this.getHaloStyle(e),i=this.getShape("key");this.upsert("halo",i.constructor,r,t)}drawIconShape(e,t){const r=this.getIconStyle(e);this.upsert("icon",w1,r,t),jg(this)}drawBadgeShapes(e,t){const r=this.getBadgesStyle(e);Object.keys(r).forEach(i=>{const a=r[i];this.upsert(`badge-${i}`,eu,a,t)})}drawPortShapes(e,t){const r=this.getPortsStyle(e);Object.keys(r).forEach(i=>{const a=r[i],s=`port-${i}`;this.upsert(s,Zs,a,t)})}drawLabelShape(e,t){const r=this.getLabelStyle(e);this.upsert("label",Po,r,t)}_drawKeyShape(e,t){return this.drawKeyShape(e,t)}render(e=this.parsedAttributes,t=this){this._drawKeyShape(e,t),this.getShape("key")&&(this.drawHaloShape(e,t),this.drawIconShape(e,t),this.drawBadgeShapes(e,t),this.drawLabelShape(e,t),this.drawPortShapes(e,t))}update(e){super.update(e),e&&("x"in e||"y"in e||"z"in e)&&Vg(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}ps.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 ED(n,e){if(!n)return e.getLocalBounds();const t=n.canvas.getLayer(),r=e.cloneNode();hl(r,"hidden"),t.appendChild(r);const i=r.getLocalBounds();return r.destroy(),i}class gl extends ps{constructor(e){super(Di({style:gl.defaultStyleProps},e))}drawKeyShape(e,t){return this.upsert("key",Zs,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e);return Object.assign(Object.assign({},t),{r:Math.min(...this.getSize(e))/2})}getIconStyle(e){const t=super.getIconStyle(e),{r}=this.getShape("key").attributes,i=r*2*$s;return t?Object.assign({width:i,height:i},t):!1}getIntersectPoint(e,t=!1){const r=this.getShape("key").getBounds();return rf(e,r,t)}}gl.defaultStyleProps={size:32};class uf extends ps{constructor(e){super(e)}get parsedAttributes(){return this.attributes}drawKeyShape(e,t){return this.upsert("key",sl,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e);return Object.assign(Object.assign({},t),{points:this.getPoints(e)})}getIntersectPoint(e,t=!1){var r,i;const{points:a}=this.getShape("key").attributes,s=[+(((r=this.attributes)===null||r===void 0?void 0:r.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return o1(e,s,a,!0,t).point}}class xD extends uf{constructor(e){super(e)}getPoints(e){const[t,r]=this.getSize(e);return hR(t,r)}}var bD=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class cf extends gl{constructor(e){super(Di({style:cf.defaultStyleProps},e))}parseOuterR(){const{size:e}=this.parsedAttributes;return Math.min(...Ra(e))/2}parseInnerR(){const{innerR:e}=this.parsedAttributes;return fr(e)?parseInt(e)/100*this.parseOuterR():e}drawDonutShape(e,t){const{donuts:r}=e;if(!(r!=null&&r.length))return;const i=r.map(v=>sn(v)?{value:v}:v),a=mi(this.getGraphicStyle(e),"donut"),s=m1(e.donutPalette);if(!s)return;const o=i.reduce((v,E)=>{var D;return v+((D=E.value)!==null&&D!==void 0?D:0)},0),l=this.parseOuterR(),u=this.parseInnerR();let h=0;i.forEach((v,E)=>{const{value:D=0,color:F=s[E%s.length]}=v,G=bD(v,["value","color"]),H=(o===0?1/i.length:D/o)*360;this.upsert(`round${E}`,Oa,Object.assign(Object.assign(Object.assign({},a),{d:AD(l,u,h,h+H),fill:F}),G),t),h+=H})}render(e,t=this){super.render(e,t),this.drawDonutShape(e,t)}}cf.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const hf=(n,e,t,r)=>[n+Math.sin(r)*t,e-Math.cos(r)*t],wD=(n,e,t,r)=>r<=0||t<=r?[["M",n-t,e],["A",t,t,0,1,1,n+t,e],["A",t,t,0,1,1,n-t,e],["Z"]]:[["M",n-t,e],["A",t,t,0,1,1,n+t,e],["A",t,t,0,1,1,n-t,e],["Z"],["M",n+r,e],["A",r,r,0,1,0,n-r,e],["A",r,r,0,1,0,n+r,e],["Z"]],MD=(n,e,t,r,i,a)=>{const[s,o]=[i/360*2*Math.PI,a/360*2*Math.PI],l=[hf(n,e,r,s),hf(n,e,t,s),hf(n,e,t,o),hf(n,e,r,o)],u=o-s>Math.PI?1:0;return[["M",l[0][0],l[0][1]],["L",l[1][0],l[1][1]],["A",t,t,0,u,1,l[2][0],l[2][1]],["L",l[3][0],l[3][1]],["A",r,r,0,u,0,l[0][0],l[0][1]],["Z"]]},AD=(n=0,e=0,t,r)=>{const[i,a]=[0,0];return Math.abs(t-r)%360<1e-6?wD(i,a,n,e):MD(i,a,n,e,t,r)};class ff extends ps{constructor(e){super(Di({style:ff.defaultStyleProps},e))}drawKeyShape(e,t){return this.upsert("key",Vu,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e),[r,i]=this.getSize(e);return Object.assign(Object.assign({},t),{rx:r/2,ry:i/2})}getIconStyle(e){const t=super.getIconStyle(e),{rx:r,ry:i}=this.getShape("key").attributes,a=Math.min(+r,+i)*2*$s;return t?Object.assign({width:a,height:a},t):!1}getIntersectPoint(e,t=!1){const r=this.getShape("key").getBounds();return rf(e,r,t)}}ff.defaultStyleProps={size:[45,35]};class TD extends uf{constructor(e){super(e)}getOuterR(e){return e.outerR||Math.min(...this.getSize(e))/2}getPoints(e){return vR(this.getOuterR(e))}getIconStyle(e){const t=super.getIconStyle(e),r=this.getOuterR(e)*$s;return t?Object.assign({width:r,height:r},t):!1}}function SD(n,e){var t=e.cx,r=t===void 0?0:t,i=e.cy,a=i===void 0?0:i,s=e.r;n.arc(r,a,s,0,Math.PI*2,!1)}function PD(n,e){var t=e.cx,r=t===void 0?0:t,i=e.cy,a=i===void 0?0:i,s=e.rx,o=e.ry;if(n.ellipse)n.ellipse(r,a,s,o,0,0,Math.PI*2,!1);else{var l=s>o?s:o,u=s>o?1:s/o,h=s>o?o/s:1;n.save(),n.scale(u,h),n.arc(r,a,l,0,Math.PI*2)}}function OD(n,e){var t=e.x1,r=e.y1,i=e.x2,a=e.y2,s=e.markerStart,o=e.markerEnd,l=e.markerStartOffset,u=e.markerEndOffset,h=0,v=0,E=0,D=0,F=0,G,H;s&&dr(s)&&l&&(G=i-t,H=a-r,F=Math.atan2(H,G),h=Math.cos(F)*(l||0),v=Math.sin(F)*(l||0)),o&&dr(o)&&u&&(G=t-i,H=r-a,F=Math.atan2(H,G),E=Math.cos(F)*(u||0),D=Math.sin(F)*(u||0)),n.moveTo(t+h,r+v),n.lineTo(i+E,a+D)}function CD(n,e){var t=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,s=e.d,o=s.absolutePath,l=s.segments,u=0,h=0,v=0,E=0,D=0,F,G;if(t&&dr(t)&&i){var H=t.parentNode.getStartTangent(),K=(0,T.Z)(H,2),q=K[0],te=K[1];F=q[0]-te[0],G=q[1]-te[1],D=Math.atan2(G,F),u=Math.cos(D)*(i||0),h=Math.sin(D)*(i||0)}if(r&&dr(r)&&a){var ue=r.parentNode.getEndTangent(),le=(0,T.Z)(ue,2),he=le[0],ve=le[1];F=he[0]-ve[0],G=he[1]-ve[1],D=Math.atan2(G,F),v=Math.cos(D)*(a||0),E=Math.sin(D)*(a||0)}for(var ge=0;ge<o.length;ge++){var Te=o[ge],Oe=Te[0],Ne=o[ge+1],ze=ge===0&&(u!==0||h!==0),Xe=(ge===o.length-1||Ne&&(Ne[0]==="M"||Ne[0]==="Z"))&&v!==0&&E!==0,Je=ze?[u,h]:[0,0],st=(0,T.Z)(Je,2),Et=st[0],mt=st[1],ct=Xe?[v,E]:[0,0],ht=(0,T.Z)(ct,2),At=ht[0],kt=ht[1];switch(Oe){case"M":n.moveTo(Te[1]+Et,Te[2]+mt);break;case"L":n.lineTo(Te[1]+At,Te[2]+kt);break;case"Q":n.quadraticCurveTo(Te[1],Te[2],Te[3]+At,Te[4]+kt);break;case"C":n.bezierCurveTo(Te[1],Te[2],Te[3],Te[4],Te[5]+At,Te[6]+kt);break;case"A":{var Ht=l[ge].arcParams,en=Ht.cx,on=Ht.cy,tn=Ht.rx,yn=Ht.ry,An=Ht.startAngle,kn=Ht.endAngle,qn=Ht.xRotation,hr=Ht.sweepFlag;if(n.ellipse)n.ellipse(en,on,tn,yn,qn,An,kn,!!(1-hr));else{var qi=tn>yn?tn:yn,yr=tn>yn?1:tn/yn,za=tn>yn?yn/tn:1;n.translate(en,on),n.rotate(qn),n.scale(yr,za),n.arc(0,0,qi,An,kn,!!(1-hr)),n.scale(1/yr,1/za),n.rotate(-qn),n.translate(-en,-on)}Xe&&n.lineTo(Te[6]+v,Te[7]+E);break}case"Z":n.closePath();break}}}function DD(n,e){var t=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,s=e.points.points,o=s.length,l=s[0][0],u=s[0][1],h=s[o-1][0],v=s[o-1][1],E=0,D=0,F=0,G=0,H=0,K,q;t&&dr(t)&&i&&(K=s[1][0]-s[0][0],q=s[1][1]-s[0][1],H=Math.atan2(q,K),E=Math.cos(H)*(i||0),D=Math.sin(H)*(i||0)),r&&dr(r)&&a&&(K=s[o-1][0]-s[0][0],q=s[o-1][1]-s[0][1],H=Math.atan2(q,K),F=Math.cos(H)*(a||0),G=Math.sin(H)*(a||0)),n.moveTo(l+(E||F),u+(D||G));for(var te=1;te<o-1;te++){var ue=s[te];n.lineTo(ue[0],ue[1])}n.lineTo(h,v)}function LD(n,e){var t=e.markerStart,r=e.markerEnd,i=e.markerStartOffset,a=e.markerEndOffset,s=e.points.points,o=s.length,l=s[0][0],u=s[0][1],h=s[o-1][0],v=s[o-1][1],E=0,D=0,F=0,G=0,H=0,K,q;t&&dr(t)&&i&&(K=s[1][0]-s[0][0],q=s[1][1]-s[0][1],H=Math.atan2(q,K),E=Math.cos(H)*(i||0),D=Math.sin(H)*(i||0)),r&&dr(r)&&a&&(K=s[o-2][0]-s[o-1][0],q=s[o-2][1]-s[o-1][1],H=Math.atan2(q,K),F=Math.cos(H)*(a||0),G=Math.sin(H)*(a||0)),n.moveTo(l+E,u+D);for(var te=1;te<o-1;te++){var ue=s[te];n.lineTo(ue[0],ue[1])}n.lineTo(h+F,v+G)}function RD(n,e){var t=e.x,r=t===void 0?0:t,i=e.y,a=i===void 0?0:i,s=e.radius,o=e.width,l=e.height,u=o,h=l,v=s&&s.some(function(le){return le!==0});if(!v)n.rect(r,a,u,h);else{var E=o>0?1:-1,D=l>0?1:-1,F=E+D===0,G=s.map(function(le){return Qr(le,0,Math.min(Math.abs(u)/2,Math.abs(h)/2))}),H=(0,T.Z)(G,4),K=H[0],q=H[1],te=H[2],ue=H[3];n.moveTo(E*K+r,a),n.lineTo(u-E*q+r,a),q!==0&&n.arc(u-E*q+r,D*q+a,q,-D*Math.PI/2,E>0?0:Math.PI,F),n.lineTo(u+r,h-D*te+a),te!==0&&n.arc(u-E*te+r,h-D*te+a,te,E>0?0:Math.PI,D>0?Math.PI/2:1.5*Math.PI,F),n.lineTo(E*ue+r,h+a),ue!==0&&n.arc(E*ue+r,h-D*ue+a,ue,D>0?Math.PI/2:-Math.PI/2,E>0?Math.PI:0,F),n.lineTo(r,D*K+a),K!==0&&n.arc(E*K+r,D*K+a,K,E>0?Math.PI:0,D>0?Math.PI*1.5:Math.PI/2,F)}}var ID=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.name="canvas-path-generator",t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){var r,i=(r={},(0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)(r,Pt.CIRCLE,SD),Pt.ELLIPSE,PD),Pt.RECT,RD),Pt.LINE,OD),Pt.POLYLINE,LD),Pt.POLYGON,DD),Pt.PATH,CD),Pt.TEXT,void 0),Pt.GROUP,void 0),Pt.IMAGE,void 0),(0,un.Z)((0,un.Z)((0,un.Z)(r,Pt.HTML,void 0),Pt.MESH,void 0),Pt.FRAGMENT,void 0));this.context.pathGeneratorFactory=i}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(mo);var ND=S(),BD=S(),kD=S(),FD=Ge(),A1=function(){function n(){var e=this;(0,b.Z)(this,n),this.isHit=function(t,r,i,a){var s=e.context.pointInPathPickerFactory[t.nodeName];if(s){var o=bt(FD,i),l=et(BD,N(kD,r[0],r[1],0),o);if(s(t,new Bi(l[0],l[1]),a,e.isPointInPath,e.context,e.runtime))return!0}return!1},this.isPointInPath=function(t,r){var i=e.runtime.offscreenCanvasCreator.getOrCreateContext(e.context.config.offscreenCanvas),a=e.context.pathGeneratorFactory[t.nodeName];return a&&(i.beginPath(),a(i,t.parsedStyle),i.closePath()),i.isPointInPath(r.x,r.y)}}return(0,U.Z)(n,[{key:"apply",value:function(t,r){var i,a=this,s=t.renderingService,o=t.renderingContext;this.context=t,this.runtime=r;var l=(i=o.root)===null||i===void 0?void 0:i.ownerDocument;s.hooks.pick.tapPromise(n.tag,function(){var u=(0,po.Z)((0,Xi.Z)().mark(function h(v){return(0,Xi.Z)().wrap(function(D){for(;;)switch(D.prev=D.next){case 0:return D.abrupt("return",a.pick(l,v));case 1:case"end":return D.stop()}},h)}));return function(h){return u.apply(this,arguments)}}()),s.hooks.pickSync.tap(n.tag,function(u){return a.pick(l,u)})}},{key:"pick",value:function(t,r){var i=r.topmost,a=r.position,s=a.x,o=a.y,l=N(ND,s,o,0),u=t.elementsFromBBox(l[0],l[1],l[0],l[1]),h=[],v=(0,Yo.Z)(u),E;try{for(v.s();!(E=v.n()).done;){var D=E.value,F=D.getWorldTransform(),G=this.isHit(D,l,F,!1);if(G){var H=py(D);if(H){var K=H.parsedStyle.clipPath,q=this.isHit(K,l,K.getWorldTransform(),!0);if(q){if(i)return r.picked=[D],r;h.push(D)}}else{if(i)return r.picked=[D],r;h.push(D)}}}}catch(te){v.e(te)}finally{v.f()}return r.picked=h,r}}])}();A1.tag="CanvasPicker";function zD(n,e,t){var r=n.parsedStyle,i=r.cx,a=i===void 0?0:i,s=r.cy,o=s===void 0?0:s,l=r.r,u=r.fill,h=r.stroke,v=r.lineWidth,E=v===void 0?1:v,D=r.increasedLineWidthForHitTesting,F=D===void 0?0:D,G=r.pointerEvents,H=G===void 0?"auto":G,K=(E+F)/2,q=Ki(a,o,e.x,e.y),te=nl(H,u,h),ue=(0,T.Z)(te,2),le=ue[0],he=ue[1];return le&&he||t?q<=l+K:le?q<=l:he?q>=l-K&&q<=l+K:!1}function df(n,e,t,r){return n/(t*t)+e/(r*r)}function UD(n,e,t){var r=n.parsedStyle,i=r.cx,a=i===void 0?0:i,s=r.cy,o=s===void 0?0:s,l=r.rx,u=r.ry,h=r.fill,v=r.stroke,E=r.lineWidth,D=E===void 0?1:E,F=r.increasedLineWidthForHitTesting,G=F===void 0?0:F,H=r.pointerEvents,K=H===void 0?"auto":H,q=e.x,te=e.y,ue=nl(K,h,v),le=(0,T.Z)(ue,2),he=le[0],ve=le[1],ge=(D+G)/2,Te=(q-a)*(q-a),Oe=(te-o)*(te-o);return he&&ve||t?df(Te,Oe,l+ge,u+ge)<=1:he?df(Te,Oe,l,u)<=1:ve?df(Te,Oe,l-ge,u-ge)>=1&&df(Te,Oe,l+ge,u+ge)<=1:!1}function pl(n,e,t,r,i,a){return i>=n&&i<=n+t&&a>=e&&a<=e+r}function WD(n,e,t,r,i,a,s){var o=i/2;return pl(n-o,e-o,t,i,a,s)||pl(n+t-o,e-o,i,r,a,s)||pl(n+o,e+r-o,t,i,a,s)||pl(n-o,e+o,i,r,a,s)}function vf(n,e,t,r,i,a,s,o){var l=(Math.atan2(o-e,s-n)+Math.PI*2)%(Math.PI*2),u={x:n+t*Math.cos(l),y:e+t*Math.sin(l)};return Ki(u.x,u.y,s,o)<=a/2}function Oo(n,e,t,r,i,a,s){var o=Math.min(n,t),l=Math.max(n,t),u=Math.min(e,r),h=Math.max(e,r),v=i/2;return a>=o-v&&a<=l+v&&s>=u-v&&s<=h+v?vm(n,e,t,r,a,s)<=i/2:!1}function T1(n,e,t,r,i){var a=n.length;if(a<2)return!1;for(var s=0;s<a-1;s++){var o=n[s][0],l=n[s][1],u=n[s+1][0],h=n[s+1][1];if(Oo(o,l,u,h,e,t,r))return!0}if(i){var v=n[0],E=n[a-1];if(Oo(v[0],v[1],E[0],E[1],e,t,r))return!0}return!1}var GD=1e-6;function Zg(n){return Math.abs(n)<GD?0:n<0?-1:1}function HD(n,e,t){return(t[0]-n[0])*(e[1]-n[1])===(e[0]-n[0])*(t[1]-n[1])&&Math.min(n[0],e[0])<=t[0]&&t[0]<=Math.max(n[0],e[0])&&Math.min(n[1],e[1])<=t[1]&&t[1]<=Math.max(n[1],e[1])}function S1(n,e,t){var r=!1,i=n.length;if(i<=2)return!1;for(var a=0;a<i;a++){var s=n[a],o=n[(a+1)%i];if(HD(s,o,[e,t]))return!0;Zg(s[1]-t)>0!=Zg(o[1]-t)>0&&Zg(e-(t-s[1])*(s[0]-o[0])/(s[1]-o[1])-s[0])<0&&(r=!r)}return r}function P1(n,e,t){for(var r=!1,i=0;i<n.length;i++){var a=n[i];if(r=S1(a,e,t),r)break}return r}function jD(n,e,t){var r=n.parsedStyle,i=r.x1,a=r.y1,s=r.x2,o=r.y2,l=r.lineWidth,u=l===void 0?1:l,h=r.increasedLineWidthForHitTesting,v=h===void 0?0:h,E=r.pointerEvents,D=E===void 0?"auto":E,F=r.fill,G=r.stroke,H=nl(D,F,G),K=(0,T.Z)(H,2),q=K[1];return!q&&!t||!u?!1:Oo(i,a,s,o,u+v,e.x,e.y)}function VD(n,e,t,r,i){for(var a=!1,s=e/2,o=0;o<n.length;o++){var l=n[o],u=l.currentPoint,h=l.params,v=l.prePoint,E=l.box;if(!(E&&!pl(E.x-s,E.y-s,E.width+e,E.height+e,t,r)))switch(l.command){case"L":case"Z":if(a=Oo(v[0],v[1],u[0],u[1],e,t,r),a)return!0;break;case"Q":var D=iM(v[0],v[1],h[1],h[2],h[3],h[4],t,r);if(a=D<=e/2,a)return!0;break;case"C":var F=mm(v[0],v[1],h[1],h[2],h[3],h[4],h[5],h[6],t,r,i);if(a=F<=e/2,a)return!0;break;case"A":l.cubicParams||(l.cubicParams=mv(v[0],v[1],h[1],h[2],h[3],h[4],h[5],h[6],h[7],void 0));for(var G=l.cubicParams,H=v,K=0;K<G.length;K+=6){var q=mm(H[0],H[1],G[K],G[K+1],G[K+2],G[K+3],G[K+4],G[K+5],t,r,i);if(H=[G[K+4],G[K+5]],a=q<=e/2,a)return!0}break}}return a}function ZD(n,e,t,r,i,a){var s=n.parsedStyle,o=s.lineWidth,l=o===void 0?1:o,u=s.increasedLineWidthForHitTesting,h=u===void 0?0:u,v=s.stroke,E=s.fill,D=s.d,F=s.pointerEvents,G=F===void 0?"auto":F,H=D.segments,K=D.hasArc,q=D.polylines,te=D.polygons,ue=nl(G,(te==null?void 0:te.length)&&E,v),le=(0,T.Z)(ue,2),he=le[0],ve=le[1],ge=Fv(n),Te=!1;return he||t?(K?Te=r(n,e):Te=P1(te,e.x,e.y)||P1(q,e.x,e.y),Te):((ve||t)&&(Te=VD(H,l+h,e.x,e.y,ge)),Te)}function KD(n,e,t){var r=n.parsedStyle,i=r.stroke,a=r.fill,s=r.lineWidth,o=s===void 0?1:s,l=r.increasedLineWidthForHitTesting,u=l===void 0?0:l,h=r.points,v=r.pointerEvents,E=v===void 0?"auto":v,D=nl(E,a,i),F=(0,T.Z)(D,2),G=F[0],H=F[1],K=!1;return(H||t)&&(K=T1(h.points,o+u,e.x,e.y,!0)),!K&&(G||t)&&(K=S1(h.points,e.x,e.y)),K}function XD(n,e,t){var r=n.parsedStyle,i=r.lineWidth,a=i===void 0?1:i,s=r.increasedLineWidthForHitTesting,o=s===void 0?0:s,l=r.points,u=r.pointerEvents,h=u===void 0?"auto":u,v=r.fill,E=r.stroke,D=nl(h,v,E),F=(0,T.Z)(D,2),G=F[1];return!G&&!t||!a?!1:T1(l.points,a+o,e.x,e.y,!1)}function YD(n,e,t,r,i){var a=n.parsedStyle,s=a.radius,o=a.fill,l=a.stroke,u=a.lineWidth,h=u===void 0?1:u,v=a.increasedLineWidthForHitTesting,E=v===void 0?0:v,D=a.x,F=D===void 0?0:D,G=a.y,H=G===void 0?0:G,K=a.width,q=a.height,te=a.pointerEvents,ue=te===void 0?"auto":te,le=nl(ue,o,l),he=(0,T.Z)(le,2),ve=he[0],ge=he[1],Te=s&&s.some(function(Xe){return Xe!==0}),Oe=h+E;if(Te){var ze=!1;return(ge||t)&&(ze=QD(F,H,K,q,s.map(function(Xe){return Qr(Xe,0,Math.min(Math.abs(K)/2,Math.abs(q)/2))}),Oe,e.x,e.y)),!ze&&(ve||t)&&(ze=r(n,e)),ze}else{var Ne=Oe/2;if(ve&&ge||t)return pl(F-Ne,H-Ne,K+Ne,q+Ne,e.x,e.y);if(ve)return pl(F,H,K,q,e.x,e.y);if(ge)return WD(F,H,K,q,Oe,e.x,e.y)}return!1}function QD(n,e,t,r,i,a,s,o){var l=(0,T.Z)(i,4),u=l[0],h=l[1],v=l[2],E=l[3];return Oo(n+u,e,n+t-h,e,a,s,o)||Oo(n+t,e+h,n+t,e+r-v,a,s,o)||Oo(n+t-v,e+r,n+E,e+r,a,s,o)||Oo(n,e+r-E,n,e+u,a,s,o)||vf(n+t-h,e+h,h,1.5*Math.PI,2*Math.PI,a,s,o)||vf(n+t-v,e+r-v,v,0,.5*Math.PI,a,s,o)||vf(n+E,e+r-E,E,.5*Math.PI,Math.PI,a,s,o)||vf(n+u,e+u,u,Math.PI,1.5*Math.PI,a,s,o)}function JD(n,e,t,r,i,a){var s=n.parsedStyle,o=s.pointerEvents,l=o===void 0?"auto":o,u=s.x,h=u===void 0?0:u,v=s.y,E=v===void 0?0:v,D=s.width,F=s.height;if(l==="non-transparent-pixel"){var G=i.config.offscreenCanvas,H=a.offscreenCanvasCreator.getOrCreateCanvas(G),K=a.offscreenCanvasCreator.getOrCreateContext(G,{willReadFrequently:!0});H.width=D,H.height=F,i.defaultStyleRendererFactory[Pt.IMAGE].render(K,(0,V.Z)((0,V.Z)({},n.parsedStyle),{},{x:0,y:0}),n,void 0,void 0,void 0);var q=K.getImageData(e.x-h,e.y-E,1,1).data;return q.every(function(te){return te!==0})}return!0}function qD(n,e,t,r){var i=n.getGeometryBounds();return e.x>=i.min[0]&&e.y>=i.min[1]&&e.x<=i.max[0]&&e.y<=i.max[1]}var $D=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.name="canvas-picker",t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){var r,i=(r={},(0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)(r,Pt.CIRCLE,zD),Pt.ELLIPSE,UD),Pt.RECT,YD),Pt.LINE,jD),Pt.POLYLINE,XD),Pt.POLYGON,KD),Pt.PATH,ZD),Pt.TEXT,qD),Pt.GROUP,null),Pt.IMAGE,JD),(0,un.Z)((0,un.Z)(r,Pt.HTML,null),Pt.MESH,null));this.context.pointInPathPickerFactory=i,this.addRenderingPlugin(new A1)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(mo);function zs(n,e){if(!{}.hasOwnProperty.call(n,e))throw new TypeError("attempted to use private field on non-instance");return n}var eL=0;function tL(n){return"__private_"+eL+++"_"+n}var nL=function(){function n(){(0,b.Z)(this,n),this.cacheStore=new Map}return(0,U.Z)(n,[{key:"onRefAdded",value:function(t){}},{key:"has",value:function(t){return this.cacheStore.has(t)}},{key:"put",value:function(t,r,i){return this.cacheStore.has(t)?!1:(this.cacheStore.set(t,{value:r,counter:new Set([i])}),this.onRefAdded(i),!0)}},{key:"get",value:function(t,r){var i=this.cacheStore.get(t);return i?(i.counter.has(r)||(i.counter.add(r),this.onRefAdded(r)),i.value):null}},{key:"update",value:function(t,r,i){var a=this.cacheStore.get(t);return a?(a.value=(0,V.Z)((0,V.Z)({},a.value),r),a.counter.has(i)||(a.counter.add(i),this.onRefAdded(i)),!0):!1}},{key:"release",value:function(t,r){var i=this.cacheStore.get(t);return i?(i.counter.delete(r),i.counter.size<=0&&this.cacheStore.delete(t),!0):!1}},{key:"releaseRef",value:function(t){var r=this;Array.from(this.cacheStore.keys()).forEach(function(i){r.release(i,t)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),Kg=[],Xg=[],Yg=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,null,[{key:"stop",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n.api;n.rafId&&(t.cancelAnimationFrame(n.rafId),n.rafId=null)}},{key:"executeTask",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n.api;Kg.length<=0&&Xg.length<=0||(Xg.forEach(function(r){return r()}),Xg=Kg.splice(0,n.TASK_NUM_PER_FRAME),n.rafId=t.requestAnimationFrame(function(){n.executeTask(t)}))}},{key:"sliceImage",value:function(t,r,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]:n.api,l=t.naturalWidth||t.width,u=t.naturalHeight||t.height,h=r-s,v=i-s,E=Math.ceil(l/h),D=Math.ceil(u/v),F={tileSize:[r,i],gridSize:[D,E],tiles:Array(D).fill(null).map(function(){return Array(E).fill(null)})},G=function(q){for(var te=function(he){Kg.push(function(){var ve=he*h,ge=q*v,Te=[Math.min(r,l-ve),Math.min(i,u-ge)],Oe=Te[0],Ne=Te[1],ze=o.createCanvas();ze.width=r,ze.height=i;var Xe=ze.getContext("2d");Xe.drawImage(t,ve,ge,Oe,Ne,0,0,Oe,Ne),F.tiles[q][he]={x:ve,y:ge,tileX:he,tileY:q,data:ze},a()})},ue=0;ue<E;ue++)te(ue)},H=0;H<D;H++)G(H);return n.stop(),n.executeTask(),F}}])}();Yg.TASK_NUM_PER_FRAME=10;var Ia=new nL;Ia.onRefAdded=function(e){var t=this;e.addEventListener(Xn.DESTROY,function(){t.releaseRef(e)},{once:!0})};var Qg=function(){function n(e,t){(0,b.Z)(this,n),this.gradientCache={},this.patternCache={},this.context=e,this.runtime=t}return(0,U.Z)(n,[{key:"getImageSync",value:function(t,r,i){var a=fr(t)?t:t.src;if(Ia.has(a)){var s=Ia.get(a,r);if(s.img.complete)return i==null||i(s),s}return this.getOrCreateImage(t,r).then(function(o){i==null||i(o)}).catch(function(o){console.error(o)}),null}},{key:"getOrCreateImage",value:function(t,r){var i=this,a=fr(t)?t:t.src;if(!fr(t)&&!Ia.has(a)){var s={img:t,size:[t.naturalWidth||t.width,t.naturalHeight||t.height],tileSize:gf(t)};Ia.put(a,s,r)}if(Ia.has(a)){var o=Ia.get(a,r);return o.img.complete?Promise.resolve(o):new Promise(function(l,u){o.img.addEventListener("load",function(){o.size=[o.img.naturalWidth||o.img.width,o.img.naturalHeight||o.img.height],o.tileSize=gf(o.img),l(o)}),o.img.addEventListener("error",function(h){u(h)})})}return new Promise(function(l,u){var h=i.context.config.createImage();if(h){var v={img:h,size:[0,0],tileSize:gf(h)};Ia.put(a,v,r),h.onload=function(){v.size=[h.naturalWidth||h.width,h.naturalHeight||h.height],v.tileSize=gf(v.img),l(v)},h.onerror=function(E){u(E)},h.crossOrigin="Anonymous",h.src=a}})}},{key:"createDownSampledImage",value:function(){var e=(0,po.Z)((0,Xi.Z)().mark(function r(i,a){var s,o,l,u,h,v,E,D,F,G,H,K,q,te;return(0,Xi.Z)().wrap(function(le){for(;;)switch(le.prev=le.next){case 0:return le.next=2,this.getOrCreateImage(i,a);case 2:if(s=le.sent,typeof s.downSamplingRate=="undefined"){le.next=5;break}return le.abrupt("return",s);case 5:if(o=this.context.config.enableLargeImageOptimization,l=typeof o=="boolean"?{}:o,u=l.maxDownSampledImageSize,h=u===void 0?2048:u,v=l.downSamplingRateThreshold,E=v===void 0?.5:v,D=this.runtime.globalThis.createImageBitmap,F=(0,T.Z)(s.size,2),G=F[0],H=F[1],K=s.img,q=Math.min((h+h)/(G+H),Math.max(.01,Math.min(E,.5))),te=(0,V.Z)((0,V.Z)({},s),{},{downSamplingRate:q}),Ia.update(s.img.src,te,a),!D){le.next=25;break}return le.prev=14,le.next=17,D(s.img,{resizeWidth:G*q,resizeHeight:H*q});case 17:K=le.sent,le.next=23;break;case 20:le.prev=20,le.t0=le.catch(14),q=1;case 23:le.next=26;break;case 25:q=1;case 26:return te=(0,V.Z)((0,V.Z)({},this.getImageSync(i,a)),{},{downSampled:K,downSamplingRate:q}),Ia.update(s.img.src,te,a),le.abrupt("return",te);case 29:case"end":return le.stop()}},r,this,[[14,20]])}));function t(r,i){return e.apply(this,arguments)}return t}()},{key:"createImageTiles",value:function(){var e=(0,po.Z)((0,Xi.Z)().mark(function r(i,a,s,o){var l,u,h,v,E;return(0,Xi.Z)().wrap(function(F){for(;;)switch(F.prev=F.next){case 0:return F.next=2,this.getOrCreateImage(i,o);case 2:return l=F.sent,u=o.ownerDocument.defaultView,h=u.requestAnimationFrame,v=u.cancelAnimationFrame,Yg.api={requestAnimationFrame:h,cancelAnimationFrame:v,createCanvas:function(){return qv.createCanvas()}},E=(0,V.Z)((0,V.Z)({},l),Yg.sliceImage(l.img,l.tileSize[0],l.tileSize[0],s)),Ia.update(l.img.src,E,o),F.abrupt("return",E);case 8:case"end":return F.stop()}},r,this)}));function t(r,i,a,s){return e.apply(this,arguments)}return t}()},{key:"releaseImage",value:function(t,r){Ia.release(fr(t)?t:t.src,r)}},{key:"releaseImageRef",value:function(t){Ia.releaseRef(t)}},{key:"getOrCreatePatternSync",value:function(t,r,i,a,s,o,l){var u=this.generatePatternKey(r);if(u&&this.patternCache[u])return this.patternCache[u];var h=r.image,v=r.repetition,E=r.transform,D,F=!1;if(fr(h)){var G=this.getImageSync(h,t,l);D=G==null?void 0:G.img}else a?(D=a,F=!0):D=h;var H=D&&i.createPattern(D,v);if(H){var K;E?K=My(uy(E),new Ur({})):K=Qe(Ge()),F&&Bt(K,K,[1/s,1/s,1]),H.setTransform({a:K[0],b:K[1],c:K[4],d:K[5],e:K[12]+o[0],f:K[13]+o[1]})}return u&&H&&(this.patternCache[u]=H),H}},{key:"getOrCreateGradient",value:function(t,r){var i=this.generateGradientKey(t),a=t.type,s=t.steps,o=t.min,l=t.width,u=t.height,h=t.angle,v=t.cx,E=t.cy,D=t.size;if(this.gradientCache[i])return this.gradientCache[i];var F=null;if(a===yo.LinearGradient){var G=$M(o,l,u,h),H=G.x1,K=G.y1,q=G.x2,te=G.y2;F=r.createLinearGradient(H,K,q,te)}else if(a===yo.RadialGradient){var ue=eA(o,l,u,v,E,D),le=ue.x,he=ue.y,ve=ue.r;F=r.createRadialGradient(le,he,0,le,he,ve)}return F&&(s.forEach(function(ge){var Te=ge.offset,Oe=ge.color;if(Te.unit===Jt.kPercentage){var Ne;(Ne=F)===null||Ne===void 0||Ne.addColorStop(Te.value/100,Oe.toString())}}),this.gradientCache[i]=F),this.gradientCache[i]}},{key:"generateGradientKey",value:function(t){var r=t.type,i=t.min,a=t.width,s=t.height,o=t.steps,l=t.angle,u=t.cx,h=t.cy,v=t.size;return"gradient-".concat(r,"-").concat((l==null?void 0:l.toString())||0,"-").concat((u==null?void 0:u.toString())||0,"-").concat((h==null?void 0:h.toString())||0,"-").concat((v==null?void 0:v.toString())||0,"-").concat(i[0],"-").concat(i[1],"-").concat(a,"-").concat(s,"-").concat(o.map(function(E){var D=E.offset,F=E.color;return"".concat(D).concat(F)}).join("-"))}},{key:"generatePatternKey",value:function(t){var r=t.image,i=t.repetition;if(fr(r))return"pattern-".concat(r,"-").concat(i);if(r.nodeName==="rect")return"pattern-".concat(r.entity,"-").concat(i)}}])}();Qg.isSupportTile=!!qv.createCanvas();function gf(n){if(!n.complete)return[0,0];var e=n.naturalWidth||n.width,t=n.naturalHeight||n.height,r=256;return[256,512].forEach(function(i){var a=Math.ceil(t/i),s=Math.ceil(e/i);a*s<1e3&&(r=i)}),[r,r]}var O1=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"apply",value:function(t){var r=t.renderingService,i=t.renderingContext,a=t.imagePool,s=i.root.ownerDocument.defaultView,o=function(v,E,D){var F=v.parsedStyle,G=F.width,H=F.height;G&&!H?v.setAttribute("height",D/E*G):!G&&H&&v.setAttribute("width",E/D*H)},l=function(v){var E=v.target,D=E.nodeName,F=E.attributes;if(D===Pt.IMAGE){var G=F.src,H=F.keepAspectRatio;a.getImageSync(G,E,function(K){var q=K.img,te=q.width,ue=q.height;H&&o(E,te,ue),E.renderable.dirty=!0,r.dirtify()})}},u=function(v){var E=v.target,D=v.attrName,F=v.prevValue,G=v.newValue;E.nodeName!==Pt.IMAGE||D!=="src"||(F!==G&&a.releaseImage(F,E),fr(G)&&a.getOrCreateImage(G,E).then(function(H){var K=H.img,q=K.width,te=K.height;E.attributes.keepAspectRatio&&o(E,q,te),E.renderable.dirty=!0,r.dirtify()}).catch(function(){}))};r.hooks.init.tap(n.tag,function(){s.addEventListener(Xn.MOUNTED,l),s.addEventListener(Xn.ATTR_MODIFIED,u)}),r.hooks.destroy.tap(n.tag,function(){s.removeEventListener(Xn.MOUNTED,l),s.removeEventListener(Xn.ATTR_MODIFIED,u)})}}])}();O1.tag="LoadImage";var rL=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.name="image-loader",t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(r){this.context.imagePool=new Qg(this.context,r),this.addRenderingPlugin(new O1)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(mo);var ci=tL("renderState"),C1=function(){function n(e){(0,b.Z)(this,n),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,ci,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=Ge(),this.dprMatrix=Ge(),this.tmpMat4=Ge(),this.vec3a=S(),this.vec3b=S(),this.vec3c=S(),this.vec3d=S(),this.canvasRendererPluginOptions=e}return(0,U.Z)(n,[{key:"apply",value:function(t,r){var i=this;this.context=t;var a=this.context,s=a.config,o=a.camera,l=a.renderingService,u=a.renderingContext,h=a.rBushRoot,v=a.pathGeneratorFactory,E=s.renderer.getConfig().enableRenderingOptimization;s.renderer.getConfig().enableDirtyCheck=!1,s.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=h,this.pathGeneratorFactory=v;var D=t.contextService,F=u.root.ownerDocument.defaultView,G=function(te){var ue=te.target,le=ue.rBushNode;le.aabb&&i.removedRBushNodeAABBs.push(le.aabb)},H=function(te){var ue=te.target,le=ue.rBushNode;le.aabb&&i.removedRBushNodeAABBs.push(le.aabb)};l.hooks.init.tap(n.tag,function(){F.addEventListener(Xn.UNMOUNTED,G),F.addEventListener(Xn.CULLED,H);var q=D.getDPR(),te=s.width,ue=s.height,le=D.getContext();i.clearRect(le,0,0,te*q,ue*q,s.background)}),l.hooks.destroy.tap(n.tag,function(){F.removeEventListener(Xn.UNMOUNTED,G),F.removeEventListener(Xn.CULLED,H),i.renderQueue=[],i.removedRBushNodeAABBs=[],zs(i,ci)[ci]={restoreStack:[],prevObject:null,currentContext:null}}),l.hooks.beginFrame.tap(n.tag,function(){var q,te=D.getContext(),ue=D.getDPR(),le=s.width,he=s.height,ve=i.canvasRendererPluginOptions,ge=ve.dirtyObjectNumThreshold,Te=ve.dirtyObjectRatioThreshold,Oe=l.getStats(),Ne=Oe.total,ze=Oe.rendered,Xe=ze/Ne;i.clearFullScreen=i.clearFullScreenLastFrame||!((q=F.context.renderingPlugins[1])!==null&&q!==void 0&&q.isFirstTimeRenderingFinished)||l.disableDirtyRectangleRendering()||ze>ge&&Xe>Te,te&&(typeof te.resetTransform=="function"?te.resetTransform():te.setTransform(1,0,0,1,0,0),i.clearFullScreen&&i.clearRect(te,0,0,le*ue,he*ue,s.background))});var K=function(te,ue){for(var le=[te];le.length>0;){var he,ve=le.pop();ve.isVisible()&&!ve.isCulled()&&(E?i.renderDisplayObjectOptimized(ve,ue,i.context,zs(i,ci)[ci],r):i.renderDisplayObject(ve,ue,i.context,zs(i,ci)[ci],r));for(var ge=((he=ve.sortable)===null||he===void 0||(he=he.sorted)===null||he===void 0?void 0:he.length)>0?ve.sortable.sorted:ve.childNodes,Te=ge.length-1;Te>=0;Te--)le.push(ge[Te])}};l.hooks.endFrame.tap(n.tag,function(){if(u.root.childNodes.length===0){i.clearFullScreenLastFrame=!0;return}E=s.renderer.getConfig().enableRenderingOptimization,zs(i,ci)[ci]={restoreStack:[],prevObject:null,currentContext:zs(i,ci)[ci].currentContext},zs(i,ci)[ci].currentContext.clear(),i.clearFullScreenLastFrame=!1;var q=D.getContext(),te=D.getDPR();if(Ft(i.dprMatrix,[te,te,1]),_t(i.vpMatrix,i.dprMatrix,o.getOrthoMatrix()),i.clearFullScreen)E?(q.save(),K(u.root,q),q.restore()):K(u.root,q),i.removedRBushNodeAABBs=[];else{var ue=i.safeMergeAABB.apply(i,[i.mergeDirtyAABBs(i.renderQueue)].concat((0,C.Z)(i.removedRBushNodeAABBs.map(function(tn){var yn=tn.minX,An=tn.minY,kn=tn.maxX,qn=tn.maxY,hr=new Ir;return hr.setMinMax([yn,An,0],[kn,qn,0]),hr}))));if(i.removedRBushNodeAABBs=[],Ir.isEmpty(ue)){i.renderQueue=[];return}var le=i.convertAABB2Rect(ue),he=le.x,ve=le.y,ge=le.width,Te=le.height,Oe=et(i.vec3a,[he,ve,0],i.vpMatrix),Ne=et(i.vec3b,[he+ge,ve,0],i.vpMatrix),ze=et(i.vec3c,[he,ve+Te,0],i.vpMatrix),Xe=et(i.vec3d,[he+ge,ve+Te,0],i.vpMatrix),Je=Math.min(Oe[0],Ne[0],Xe[0],ze[0]),st=Math.min(Oe[1],Ne[1],Xe[1],ze[1]),Et=Math.max(Oe[0],Ne[0],Xe[0],ze[0]),mt=Math.max(Oe[1],Ne[1],Xe[1],ze[1]),ct=Math.floor(Je),ht=Math.floor(st),At=Math.ceil(Et-Je),kt=Math.ceil(mt-st);q.save(),i.clearRect(q,ct,ht,At,kt,s.background),q.beginPath(),q.rect(ct,ht,At,kt),q.clip(),q.setTransform(i.vpMatrix[0],i.vpMatrix[1],i.vpMatrix[4],i.vpMatrix[5],i.vpMatrix[12],i.vpMatrix[13]);var Ht=s.renderer.getConfig(),en=Ht.enableDirtyRectangleRenderingDebug;en&&F.dispatchEvent(new pi(Ca.DIRTY_RECTANGLE,{dirtyRect:{x:ct,y:ht,width:At,height:kt}}));var on=i.searchDirtyObjects(ue);on.sort(function(tn,yn){return tn.sortable.renderOrder-yn.sortable.renderOrder}).forEach(function(tn){tn&&tn.isVisible()&&!tn.isCulled()&&i.renderDisplayObject(tn,q,i.context,zs(i,ci)[ci],r)}),q.restore(),i.renderQueue.forEach(function(tn){i.saveDirtyAABB(tn)}),i.renderQueue=[]}zs(i,ci)[ci].restoreStack.forEach(function(){q.restore()}),zs(i,ci)[ci].restoreStack=[]}),l.hooks.render.tap(n.tag,function(q){i.clearFullScreen||i.renderQueue.push(q)})}},{key:"clearRect",value:function(t,r,i,a,s,o){t.clearRect(r,i,a,s),o&&(t.fillStyle=o,t.fillRect(r,i,a,s))}},{key:"renderDisplayObjectOptimized",value:function(t,r,i,a,s){var o=t.nodeName,l=!1,u=!1,h=this.context.styleRendererFactory[o],v=this.pathGeneratorFactory[o],E=t.parsedStyle.clipPath;if(E){l=!a.prevObject||!Gt(E.getWorldTransform(),a.prevObject.getWorldTransform()),l&&(this.applyWorldTransform(r,E),a.prevObject=null);var D=this.pathGeneratorFactory[E.nodeName];D&&(r.save(),u=!0,r.beginPath(),D(r,E.parsedStyle),r.closePath(),r.clip())}if(h){l=!a.prevObject||!Gt(t.getWorldTransform(),a.prevObject.getWorldTransform()),l&&this.applyWorldTransform(r,t);var F=!a.prevObject;if(!F){var G=a.prevObject.nodeName;o===Pt.TEXT?F=G!==Pt.TEXT:o===Pt.IMAGE?F=G!==Pt.IMAGE:F=G===Pt.TEXT||G===Pt.IMAGE}h.applyStyleToContext(r,t,F,a),a.prevObject=t}v&&(r.beginPath(),v(r,t.parsedStyle),o!==Pt.LINE&&o!==Pt.PATH&&o!==Pt.POLYLINE&&r.closePath()),h&&h.drawToContext(r,t,zs(this,ci)[ci],this,s),u&&r.restore(),t.renderable.dirty=!1}},{key:"renderDisplayObject",value:function(t,r,i,a,s){var o=t.nodeName,l=a.restoreStack[a.restoreStack.length-1];l&&!(t.compareDocumentPosition(l)&Kr.DOCUMENT_POSITION_CONTAINS)&&(r.restore(),a.restoreStack.pop());var u=this.context.styleRendererFactory[o],h=this.pathGeneratorFactory[o],v=t.parsedStyle.clipPath;if(v){this.applyWorldTransform(r,v);var E=this.pathGeneratorFactory[v.nodeName];E&&(r.save(),a.restoreStack.push(t),r.beginPath(),E(r,v.parsedStyle),r.closePath(),r.clip())}u&&(this.applyWorldTransform(r,t),r.save(),this.applyAttributesToContext(r,t)),h&&(r.beginPath(),h(r,t.parsedStyle),o!==Pt.LINE&&o!==Pt.PATH&&o!==Pt.POLYLINE&&r.closePath()),u&&(u.render(r,t.parsedStyle,t,i,this,s),r.restore()),t.renderable.dirty=!1}},{key:"applyAttributesToContext",value:function(t,r){var i=r.parsedStyle,a=i.stroke,s=i.fill,o=i.opacity,l=i.lineDash,u=i.lineDashOffset;l&&t.setLineDash(l),xn(u)||(t.lineDashOffset=u),xn(o)||(t.globalAlpha*=o),!xn(a)&&!Array.isArray(a)&&!a.isNone&&(t.strokeStyle=r.attributes.stroke),!xn(s)&&!Array.isArray(s)&&!s.isNone&&(t.fillStyle=r.attributes.fill)}},{key:"convertAABB2Rect",value:function(t){var r=t.getMin(),i=t.getMax(),a=Math.floor(r[0]),s=Math.floor(r[1]),o=Math.ceil(i[0]),l=Math.ceil(i[1]),u=o-a,h=l-s;return{x:a,y:s,width:u,height:h}}},{key:"mergeDirtyAABBs",value:function(t){var r=new Ir;return t.forEach(function(i){var a=i.getRenderBounds();r.add(a);var s=i.renderable.dirtyRenderBounds;s&&r.add(s)}),r}},{key:"searchDirtyObjects",value:function(t){var r=t.getMin(),i=(0,T.Z)(r,2),a=i[0],s=i[1],o=t.getMax(),l=(0,T.Z)(o,2),u=l[0],h=l[1],v=this.rBush.search({minX:a,minY:s,maxX:u,maxY:h});return v.map(function(E){var D=E.displayObject;return D})}},{key:"saveDirtyAABB",value:function(t){var r=t.renderable;r.dirtyRenderBounds||(r.dirtyRenderBounds=new Ir);var i=t.getRenderBounds();i&&r.dirtyRenderBounds.update(i.center,i.halfExtents)}},{key:"applyWorldTransform",value:function(t,r,i){i?(Ke(this.tmpMat4,r.getLocalTransform()),_t(this.tmpMat4,i,this.tmpMat4),_t(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(Ke(this.tmpMat4,r.getWorldTransform()),_t(this.tmpMat4,this.vpMatrix,this.tmpMat4)),t.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 t=new Ir,r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return i.forEach(function(s){t.add(s)}),t}}])}();C1.tag="CanvasRenderer";function pf(n,e,t,r,i,a,s){var o,l;if(n.image.nodeName==="rect"){var u=n.image.parsedStyle,h=u.width,v=u.height;l=r.contextService.getDPR();var E=r.config.offscreenCanvas;o=a.offscreenCanvasCreator.getOrCreateCanvas(E),o.width=h*l,o.height=v*l;var D=a.offscreenCanvasCreator.getOrCreateContext(E),F={restoreStack:[],prevObject:null,currentContext:new Map};n.image.forEach(function(H){i.renderDisplayObject(H,D,r,F,a)}),F.restoreStack.forEach(function(){D.restore()})}var G=s.getOrCreatePatternSync(e,n,t,o,l,e.getGeometryBounds().min,function(){e.renderable.dirty=!0,r.renderingService.dirtify()});return G}function mf(n,e,t,r){var i;if(n.type===yo.LinearGradient||n.type===yo.RadialGradient){var a=e.getGeometryBounds(),s=a&&a.halfExtents[0]*2||1,o=a&&a.halfExtents[1]*2||1,l=a&&a.min||[0,0];i=r.getOrCreateGradient((0,V.Z)((0,V.Z)({type:n.type},n.value),{},{min:l,width:s,height:o}),t)}return i}var yf=["shadowBlur","shadowOffsetX","shadowOffsetY"],D1=["lineCap","lineJoin","miterLimit"],yi={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},L1={};function qr(n,e,t,r){var i=r.has(e)?r.get(e):yi[e];return i!==t&&(e==="lineDash"?n.setLineDash(t):n[e]=t,r.set(e,t)),i}var iL=function(){function n(e){(0,b.Z)(this,n),this.imagePool=e}return(0,U.Z)(n,[{key:"applyAttributesToContext",value:function(t,r){}},{key:"render",value:function(t,r,i,a,s,o){}},{key:"applyCommonStyleToContext",value:function(t,r,i,a){var s=i?L1:a.prevObject.parsedStyle,o=r.parsedStyle;(i||o.opacity!==s.opacity)&&qr(t,"globalAlpha",xn(o.opacity)?yi.globalAlpha:o.opacity,a.currentContext),(i||o.blend!==s.blend)&&qr(t,"globalCompositeOperation",xn(o.blend)?yi.globalCompositeOperation:o.blend,a.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(t,r,i,a){var s=i?L1:a.prevObject.parsedStyle,o=r.parsedStyle,l=o.lineWidth,u=l===void 0?yi.lineWidth:l,h=o.fill&&!o.fill.isNone,v=o.stroke&&!o.stroke.isNone&&u>0;if(v){if(i||r.attributes.stroke!==a.prevObject.attributes.stroke){var E=!xn(o.stroke)&&!Array.isArray(o.stroke)&&!o.stroke.isNone?r.attributes.stroke:yi.strokeStyle;qr(t,"strokeStyle",E,a.currentContext)}(i||o.lineWidth!==s.lineWidth)&&qr(t,"lineWidth",xn(o.lineWidth)?yi.lineWidth:o.lineWidth,a.currentContext),(i||o.lineDash!==s.lineDash)&&qr(t,"lineDash",o.lineDash||yi.lineDash,a.currentContext),(i||o.lineDashOffset!==s.lineDashOffset)&&qr(t,"lineDashOffset",xn(o.lineDashOffset)?yi.lineDashOffset:o.lineDashOffset,a.currentContext);for(var D=0;D<D1.length;D++){var F=D1[D];(i||o[F]!==s[F])&&qr(t,F,xn(o[F])?yi[F]:o[F],a.currentContext)}}if(h&&(i||r.attributes.fill!==a.prevObject.attributes.fill)){var G=!xn(o.fill)&&!Array.isArray(o.fill)&&!o.fill.isNone?r.attributes.fill:yi.fillStyle;qr(t,"fillStyle",G,a.currentContext)}}},{key:"applyStyleToContext",value:function(t,r,i,a){var s=r.nodeName;this.applyCommonStyleToContext(t,r,i,a),s===Pt.IMAGE||this.applyStrokeFillStyleToContext(t,r,i,a)}},{key:"applyShadowAndFilterStyleToContext",value:function(t,r,i,a){var s=r.parsedStyle;if(i){qr(t,"shadowColor",s.shadowColor.toString(),a.currentContext);for(var o=0;o<yf.length;o++){var l=yf[o];qr(t,l,s[l]||yi[l],a.currentContext)}}s.filter&&s.filter.length&&qr(t,"filter",r.attributes.filter,a.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(t,r,i,a){var s=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(r){qr(t,"shadowColor",yi.shadowColor,a.currentContext);for(var o=0;o<yf.length;o++){var l=yf[o];qr(t,l,yi[l],a.currentContext)}}if(i)if(r&&s){var u=t.filter;!xn(u)&&u.indexOf("drop-shadow")>-1&&qr(t,"filter",u.replace(/drop-shadow\([^)]*\)/,"").trim()||yi.filter,a.currentContext)}else qr(t,"filter",yi.filter,a.currentContext)}},{key:"fillToContext",value:function(t,r,i,a,s){var o=this,l=r.parsedStyle,u=l.fill,h=l.fillRule,v=null;if(Array.isArray(u)&&u.length>0)u.forEach(function(D){var F=qr(t,"fillStyle",mf(D,r,t,o.imagePool),i.currentContext);v=v!=null?v:F,h?t.fill(h):t.fill()});else{if(el(u)){var E=pf(u,r,t,r.ownerDocument.defaultView.context,a,s,this.imagePool);E&&(t.fillStyle=E,v=!0)}h?t.fill(h):t.fill()}v!==null&&qr(t,"fillStyle",v,i.currentContext)}},{key:"strokeToContext",value:function(t,r,i,a,s){var o=this,l=r.parsedStyle.stroke,u=null;if(Array.isArray(l)&&l.length>0)l.forEach(function(E){var D=qr(t,"strokeStyle",mf(E,r,t,o.imagePool),i.currentContext);u=u!=null?u:D,t.stroke()});else{if(el(l)){var h=pf(l,r,t,r.ownerDocument.defaultView.context,a,s,this.imagePool);if(h){var v=qr(t,"strokeStyle",h,i.currentContext);u=u!=null?u:v}}t.stroke()}u!==null&&qr(t,"strokeStyle",u,i.currentContext)}},{key:"drawToContext",value:function(t,r,i,a,s){var o,l=r.nodeName,u=r.parsedStyle,h=u.opacity,v=h===void 0?yi.globalAlpha:h,E=u.fillOpacity,D=E===void 0?yi.fillOpacity:E,F=u.strokeOpacity,G=F===void 0?yi.strokeOpacity:F,H=u.lineWidth,K=H===void 0?yi.lineWidth:H,q=u.fill&&!u.fill.isNone,te=u.stroke&&!u.stroke.isNone&&K>0;if(!(!q&&!te)){var ue=!xn(u.shadowColor)&&u.shadowBlur>0,le=u.shadowType==="inner",he=((o=u.fill)===null||o===void 0?void 0:o.alpha)===0,ve=!!(u.filter&&u.filter.length),ge=ue&&te&&(l===Pt.PATH||l===Pt.LINE||l===Pt.POLYLINE||he||le),Te=null;if(q){ge||this.applyShadowAndFilterStyleToContext(t,r,ue,i);var Oe=v*D;Te=qr(t,"globalAlpha",Oe,i.currentContext),this.fillToContext(t,r,i,a,s),ge||this.clearShadowAndFilterStyleForContext(t,ue,ve,i)}if(te){var Ne=!1,ze=v*G,Xe=qr(t,"globalAlpha",ze,i.currentContext);if(Te=q?Te:Xe,ge&&(this.applyShadowAndFilterStyleToContext(t,r,ue,i),Ne=!0,le)){var Je=t.globalCompositeOperation;t.globalCompositeOperation="source-atop",this.strokeToContext(t,r,i,a,s),t.globalCompositeOperation=Je,this.clearShadowAndFilterStyleForContext(t,ue,ve,i,!0)}this.strokeToContext(t,r,i,a,s),Ne&&this.clearShadowAndFilterStyleForContext(t,ue,ve,i)}Te!==null&&qr(t,"globalAlpha",Te,i.currentContext)}}}])}(),Jg=function(n){function e(){return(0,b.Z)(this,e),(0,w.Z)(this,e,arguments)}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"render",value:function(r,i,a,s,o,l){var u=i.fill,h=i.fillRule,v=i.opacity,E=v===void 0?1:v,D=i.fillOpacity,F=D===void 0?1:D,G=i.stroke,H=i.strokeOpacity,K=H===void 0?1:H,q=i.lineWidth,te=q===void 0?1:q,ue=i.lineCap,le=i.lineJoin,he=i.shadowType,ve=i.shadowColor,ge=i.shadowBlur,Te=i.filter,Oe=i.miterLimit,Ne=u&&!u.isNone,ze=G&&!G.isNone&&te>0,Xe=(u==null?void 0:u.alpha)===0,Je=!!(Te&&Te.length),st=!xn(ve)&&ge>0,Et=a.nodeName,mt=he==="inner",ct=ze&&st&&(Et===Pt.PATH||Et===Pt.LINE||Et===Pt.POLYLINE||Xe||mt);Ne&&(r.globalAlpha=E*F,ct||_f(a,r,st),R1(r,a,u,h,s,o,l,this.imagePool),ct||this.clearShadowAndFilter(r,Je,st)),ze&&(r.globalAlpha=E*K,r.lineWidth=te,xn(Oe)||(r.miterLimit=Oe),xn(ue)||(r.lineCap=ue),xn(le)||(r.lineJoin=le),ct&&(mt&&(r.globalCompositeOperation="source-atop"),_f(a,r,!0),mt&&(qg(r,a,G,s,o,l,this.imagePool),r.globalCompositeOperation=yi.globalCompositeOperation,this.clearShadowAndFilter(r,Je,!0))),qg(r,a,G,s,o,l,this.imagePool))}},{key:"clearShadowAndFilter",value:function(r,i,a){if(a&&(r.shadowColor="transparent",r.shadowBlur=0),i){var s=r.filter;!xn(s)&&s.indexOf("drop-shadow")>-1&&(r.filter=s.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(iL);function _f(n,e,t){var r=n.parsedStyle,i=r.filter,a=r.shadowColor,s=r.shadowBlur,o=r.shadowOffsetX,l=r.shadowOffsetY;i&&i.length&&(e.filter=n.style.filter),t&&(e.shadowColor=a.toString(),e.shadowBlur=s||0,e.shadowOffsetX=o||0,e.shadowOffsetY=l||0)}function R1(n,e,t,r,i,a,s,o){var l=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(t)?t.forEach(function(u){n.fillStyle=mf(u,e,n,o),l||(r?n.fill(r):n.fill())}):(el(t)&&(n.fillStyle=pf(t,e,n,i,a,s,o)),l||(r?n.fill(r):n.fill()))}function qg(n,e,t,r,i,a,s){var o=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(t)?t.forEach(function(l){n.strokeStyle=mf(l,e,n,s),o||n.stroke()}):(el(t)&&(n.strokeStyle=pf(t,e,n,r,i,a,s)),o||n.stroke())}function aL(n,e){var t=(0,T.Z)(n,4),r=t[0],i=t[1],a=t[2],s=t[3],o=(0,T.Z)(e,4),l=o[0],u=o[1],h=o[2],v=o[3],E=Math.max(r,l),D=Math.max(i,u),F=Math.min(r+a,l+h),G=Math.min(i+s,u+v);return F<=E||G<=D?null:[E,D,F-E,G-D]}function sL(n,e){var t=et(S(),[n[0],n[1],0],e),r=et(S(),[n[0]+n[2],n[1],0],e),i=et(S(),[n[0],n[1]+n[3],0],e),a=et(S(),[n[0]+n[2],n[1]+n[3],0],e);return[Math.min(t[0],r[0],i[0],a[0]),Math.min(t[1],r[1],i[1],a[1]),Math.max(t[0],r[0],i[0],a[0])-Math.min(t[0],r[0],i[0],a[0]),Math.max(t[1],r[1],i[1],a[1])-Math.min(t[1],r[1],i[1],a[1])]}var oL=function(n){function e(){return(0,b.Z)(this,e),(0,w.Z)(this,e,arguments)}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"renderDownSampled",value:function(r,i,a,s){var o=s.src,l=s.imageCache;if(!l.downSampled){this.imagePool.createDownSampledImage(o,a).then(function(){a.ownerDocument&&(a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify())}).catch(function(u){console.error(u)});return}r.drawImage(l.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(r,i,a,s){var o=s.src,l=s.imageCache,u=s.imageRect,h=s.drawRect,v=l.size,E=r.getTransform(),D=E.a,F=E.b,G=E.c,H=E.d,K=E.e,q=E.f;if(r.resetTransform(),!(l!=null&&l.gridSize)){this.imagePool.createImageTiles(o,[],function(){a.ownerDocument&&(a.renderable.dirty=!0,a.ownerDocument.defaultView.context.renderingService.dirtify())},a).catch(function(st){console.error(st)});return}for(var te=[v[0]/u[2],v[1]/u[3]],ue=[l.tileSize[0]/te[0],l.tileSize[1]/te[1]],le=[Math.floor((h[0]-u[0])/ue[0]),Math.ceil((h[0]+h[2]-u[0])/ue[0])],he=le[0],ve=le[1],ge=[Math.floor((h[1]-u[1])/ue[1]),Math.ceil((h[1]+h[3]-u[1])/ue[1])],Te=ge[0],Oe=ge[1],Ne=Te;Ne<=Oe;Ne++)for(var ze=he;ze<=ve;ze++){var Xe=l.tiles[Ne][ze];if(Xe){var Je=[Math.floor(u[0]+Xe.tileX*ue[0]),Math.floor(u[1]+Xe.tileY*ue[1]),Math.ceil(ue[0]),Math.ceil(ue[1])];r.drawImage(Xe.data,Je[0],Je[1],Je[2],Je[3])}}r.setTransform(D,F,G,H,K,q)}},{key:"render",value:function(r,i,a){var s=i.x,o=s===void 0?0:s,l=i.y,u=l===void 0?0:l,h=i.width,v=i.height,E=i.src,D=i.shadowColor,F=i.shadowBlur,G=this.imagePool.getImageSync(E,a),H=G==null?void 0:G.img,K=h,q=v;if(H){K||(K=H.width),q||(q=H.height);var te=!xn(D)&&F>0;_f(a,r,te);try{var ue=a.ownerDocument.defaultView.getContextService().getDomElement(),le=ue.width,he=ue.height,ve=r.getTransform(),ge=ve.a,Te=ve.b,Oe=ve.c,Ne=ve.d,ze=ve.e,Xe=ve.f,Je=at(ge,Oe,0,0,Te,Ne,0,0,0,0,1,0,ze,Xe,0,1),st=sL([o,u,K,q],Je),Et=aL([0,0,le,he],st);if(!Et)return;if(!a.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){e.renderFull(r,i,a,{image:H,drawRect:[o,u,K,q]});return}var mt=st[2]/G.size[0];if(mt<(G.downSamplingRate||.5)){this.renderDownSampled(r,i,a,{src:E,imageCache:G,drawRect:[o,u,K,q]});return}if(!Qg.isSupportTile){e.renderFull(r,i,a,{image:H,drawRect:[o,u,K,q]});return}this.renderTile(r,i,a,{src:E,imageCache:G,imageRect:st,drawRect:Et})}catch(ct){}}}},{key:"drawToContext",value:function(r,i,a,s,o){this.render(r,i.parsedStyle,i)}}],[{key:"renderFull",value:function(r,i,a,s){r.drawImage(s.image,Math.floor(s.drawRect[0]),Math.floor(s.drawRect[1]),Math.ceil(s.drawRect[2]),Math.ceil(s.drawRect[3]))}}])}(Jg),lL=function(n){function e(){return(0,b.Z)(this,e),(0,w.Z)(this,e,arguments)}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"render",value:function(r,i,a,s,o,l){a.getBounds();var u=i.lineWidth,h=u===void 0?1:u,v=i.textAlign,E=v===void 0?"start":v,D=i.textBaseline,F=D===void 0?"alphabetic":D,G=i.lineJoin,H=G===void 0?"miter":G,K=i.miterLimit,q=K===void 0?10:K,te=i.letterSpacing,ue=te===void 0?0:te,le=i.stroke,he=i.fill,ve=i.fillRule,ge=i.fillOpacity,Te=ge===void 0?1:ge,Oe=i.strokeOpacity,Ne=Oe===void 0?1:Oe,ze=i.opacity,Xe=ze===void 0?1:ze,Je=i.metrics,st=i.x,Et=st===void 0?0:st,mt=i.y,ct=mt===void 0?0:mt,ht=i.dx,At=i.dy,kt=i.shadowColor,Ht=i.shadowBlur,en=Je.font,on=Je.lines,tn=Je.height,yn=Je.lineHeight,An=Je.lineMetrics;r.font=en,r.lineWidth=h,r.textAlign=E==="middle"?"center":E;var kn=F;kn==="alphabetic"&&(kn="bottom"),r.lineJoin=H,xn(q)||(r.miterLimit=q);var qn=ct;F==="middle"?qn+=-tn/2-yn/2:F==="bottom"||F==="alphabetic"||F==="ideographic"?qn+=-tn:(F==="top"||F==="hanging")&&(qn+=-yn);var hr=Et+(ht||0);qn+=At||0,on.length===1&&(kn==="bottom"?(kn="middle",qn-=.5*tn):kn==="top"&&(kn="middle",qn+=.5*tn)),r.textBaseline=kn;var qi=!xn(kt)&&Ht>0;_f(a,r,qi);for(var yr=0;yr<on.length;yr++){var za=h/2+hr;qn+=yn,!xn(le)&&!le.isNone&&h&&this.drawLetterSpacing(r,a,on[yr],An[yr],E,za,qn,ue,he,ve,Te,le,Ne,Xe,!0,s,o,l),xn(he)||this.drawLetterSpacing(r,a,on[yr],An[yr],E,za,qn,ue,he,ve,Te,le,Ne,Xe,!1,s,o,l)}}},{key:"drawLetterSpacing",value:function(r,i,a,s,o,l,u,h,v,E,D,F,G,H,K,q,te,ue){if(h===0){K?this.strokeText(r,i,a,l,u,F,G,q,te,ue):this.fillText(r,i,a,l,u,v,E,D,H,q,te,ue);return}var le=r.textAlign;r.textAlign="left";var he=l;o==="center"||o==="middle"?he=l-s.width/2:(o==="right"||o==="end")&&(he=l-s.width);for(var ve=Array.from(a),ge=r.measureText(a).width,Te=0,Oe=0;Oe<ve.length;++Oe){var Ne=ve[Oe];K?this.strokeText(r,i,Ne,he,u,F,G,q,te,ue):this.fillText(r,i,Ne,he,u,v,E,D,H,q,te,ue),Te=r.measureText(a.substring(Oe+1)).width,he+=ge-Te+h,ge=Te}r.textAlign=le}},{key:"fillText",value:function(r,i,a,s,o,l,u,h,v,E,D,F){R1(r,i,l,u,E,D,F,this.imagePool,!0);var G,H=!xn(h)&&h!==1;H&&(G=r.globalAlpha,r.globalAlpha=h*v),r.fillText(a,s,o),H&&(r.globalAlpha=G)}},{key:"strokeText",value:function(r,i,a,s,o,l,u,h,v,E){qg(r,i,l,h,v,E,this.imagePool,!0);var D,F=!xn(u)&&u!==1;F&&(D=r.globalAlpha,r.globalAlpha=u),r.strokeText(a,s,o),F&&(r.globalAlpha=D)}},{key:"drawToContext",value:function(r,i,a,s,o){this.render(r,i.parsedStyle,i,i.ownerDocument.defaultView.context,s,o)}}])}(Jg),uL=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),t=(0,w.Z)(this,e),t.name="canvas-renderer",t.options=r,t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){var r,i=(0,V.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),a=this.context.imagePool,s=new Jg(a),o=(r={},(0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)((0,un.Z)(r,Pt.CIRCLE,s),Pt.ELLIPSE,s),Pt.RECT,s),Pt.IMAGE,new oL(a)),Pt.TEXT,new lL(a)),Pt.LINE,s),Pt.POLYLINE,s),Pt.POLYGON,s),Pt.PATH,s),Pt.GROUP,void 0),(0,un.Z)((0,un.Z)((0,un.Z)(r,Pt.HTML,void 0),Pt.MESH,void 0),Pt.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=o,this.context.styleRendererFactory=o,this.addRenderingPlugin(new C1(i))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(mo);var I1=function(){function n(){(0,b.Z)(this,n)}return(0,U.Z)(n,[{key:"apply",value:function(t,r){var i=this,a=t.renderingService,s=t.renderingContext,o=t.config;this.context=t;var l=s.root.ownerDocument.defaultView,u=function(ge){a.hooks.pointerMove.call(ge)},h=function(ge){a.hooks.pointerUp.call(ge)},v=function(ge){a.hooks.pointerDown.call(ge)},E=function(ge){a.hooks.pointerOver.call(ge)},D=function(ge){a.hooks.pointerOut.call(ge)},F=function(ge){a.hooks.pointerCancel.call(ge)},G=function(ge){a.hooks.pointerWheel.call(ge)},H=function(ge){a.hooks.click.call(ge)},K=function(ge){r.globalThis.document.addEventListener("pointermove",u,!0),ge.addEventListener("pointerdown",v,!0),ge.addEventListener("pointerleave",D,!0),ge.addEventListener("pointerover",E,!0),r.globalThis.addEventListener("pointerup",h,!0),r.globalThis.addEventListener("pointercancel",F,!0)},q=function(ge){ge.addEventListener("touchstart",v,!0),ge.addEventListener("touchend",h,!0),ge.addEventListener("touchmove",u,!0),ge.addEventListener("touchcancel",F,!0)},te=function(ge){r.globalThis.document.addEventListener("mousemove",u,!0),ge.addEventListener("mousedown",v,!0),ge.addEventListener("mouseout",D,!0),ge.addEventListener("mouseover",E,!0),r.globalThis.addEventListener("mouseup",h,!0)},ue=function(ge){r.globalThis.document.removeEventListener("pointermove",u,!0),ge.removeEventListener("pointerdown",v,!0),ge.removeEventListener("pointerleave",D,!0),ge.removeEventListener("pointerover",E,!0),r.globalThis.removeEventListener("pointerup",h,!0),r.globalThis.removeEventListener("pointercancel",F,!0)},le=function(ge){ge.removeEventListener("touchstart",v,!0),ge.removeEventListener("touchend",h,!0),ge.removeEventListener("touchmove",u,!0),ge.removeEventListener("touchcancel",F,!0)},he=function(ge){r.globalThis.document.removeEventListener("mousemove",u,!0),ge.removeEventListener("mousedown",v,!0),ge.removeEventListener("mouseout",D,!0),ge.removeEventListener("mouseover",E,!0),r.globalThis.removeEventListener("mouseup",h,!0)};a.hooks.init.tap(n.tag,function(){var ve=i.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(ve.style.msContentZooming="none",ve.style.msTouchAction="none"):l.supportsPointerEvents&&(ve.style.touchAction="none"),l.supportsPointerEvents?K(ve):te(ve),l.supportsTouchEvents&&q(ve),o.useNativeClickEvent&&ve.addEventListener("click",H,!0),ve.addEventListener("wheel",G,{passive:!0,capture:!0})}),a.hooks.destroy.tap(n.tag,function(){var ve=i.context.contextService.getDomElement();r.globalThis.navigator.msPointerEnabled?(ve.style.msContentZooming="",ve.style.msTouchAction=""):l.supportsPointerEvents&&(ve.style.touchAction=""),l.supportsPointerEvents?ue(ve):he(ve),l.supportsTouchEvents&&le(ve),o.useNativeClickEvent&&ve.removeEventListener("click",H,!0),ve.removeEventListener("wheel",G,!0)})}}])}();I1.tag="DOMInteraction";var cL=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.name="dom-interaction",t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new I1)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(mo);var hL="g-canvas-camera",N1=function(){function n(){(0,b.Z)(this,n),this.displayObjectHTMLElementMap=new WeakMap}return(0,U.Z)(n,[{key:"joinTransformMatrix",value:function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([t[0],t[1],t[4],t[5],t[12]+r[0],t[13]+r[1]].join(","),")")}},{key:"apply",value:function(t,r){var i=this,a=t.camera,s=t.renderingContext,o=t.renderingService;this.context=t;var l=s.root.ownerDocument.defaultView,u=l.context.eventService.nativeHTMLMap,h=function(K,q){q.style.transform=i.joinTransformMatrix(K.getWorldTransform(),K.getOrigin())},v=function(K){var q=K.target;if(q.nodeName===Pt.HTML){i.$camera||(i.$camera=i.createCamera(a));var te=i.getOrCreateEl(q);i.$camera.appendChild(te),Object.keys(q.attributes).forEach(function(ue){i.updateAttribute(ue,q)}),h(q,te),u.set(te,q)}},E=function(K){var q=K.target;if(q.nodeName===Pt.HTML&&i.$camera){var te=i.getOrCreateEl(q);te&&(te.remove(),u.delete(te))}},D=function(K){var q=K.target;if(q.nodeName===Pt.HTML){var te=K.attrName;i.updateAttribute(te,q)}},F=function(K){var q=K.target,te=q.nodeName===Pt.FRAGMENT?q.childNodes:[q];te.forEach(function(ue){if(ue.nodeName===Pt.HTML){var le=i.getOrCreateEl(ue);h(ue,le)}})},G=function(){if(i.$camera){var K=i.context.config,q=K.width,te=K.height;i.$camera.parentElement.style.width="".concat(q||0,"px"),i.$camera.parentElement.style.height="".concat(te||0,"px")}};o.hooks.init.tap(n.tag,function(){l.addEventListener(Ca.RESIZE,G),l.addEventListener(Xn.MOUNTED,v),l.addEventListener(Xn.UNMOUNTED,E),l.addEventListener(Xn.ATTR_MODIFIED,D),l.addEventListener(Xn.BOUNDS_CHANGED,F)}),o.hooks.endFrame.tap(n.tag,function(){i.$camera&&s.renderReasons.has(Kl.CAMERA_CHANGED)&&(i.$camera.style.transform=i.joinTransformMatrix(a.getOrthoMatrix()))}),o.hooks.destroy.tap(n.tag,function(){i.$camera&&i.$camera.remove(),l.removeEventListener(Ca.RESIZE,G),l.removeEventListener(Xn.MOUNTED,v),l.removeEventListener(Xn.UNMOUNTED,E),l.removeEventListener(Xn.ATTR_MODIFIED,D),l.removeEventListener(Xn.BOUNDS_CHANGED,F)})}},{key:"createCamera",value:function(t){var r=this.context.config,i=r.document,a=r.width,s=r.height,o=this.context.contextService.getDomElement(),l=o.parentNode;if(l){var u=hL,h=l.querySelector("#".concat(u));if(!h){var v=(i||document).createElement("div");v.style.overflow="hidden",v.style.pointerEvents="none",v.style.position="absolute",v.style.left="0px",v.style.top="0px",v.style.width="".concat(a||0,"px"),v.style.height="".concat(s||0,"px");var E=(i||document).createElement("div");h=E,E.id=u,E.style.position="absolute",E.style.left="".concat(o.offsetLeft||0,"px"),E.style.top="".concat(o.offsetTop||0,"px"),E.style.transformOrigin="left top",E.style.transform=this.joinTransformMatrix(t.getOrthoMatrix()),E.style.pointerEvents="none",E.style.width="100%",E.style.height="100%",v.appendChild(E),l.appendChild(v)}return h}return null}},{key:"getOrCreateEl",value:function(t){var r=this.context.config.document,i=this.displayObjectHTMLElementMap.get(t);return i||(i=(r||document).createElement("div"),t.parsedStyle.$el=i,this.displayObjectHTMLElementMap.set(t,i),t.id&&(i.id=t.id),t.name&&i.setAttribute("name",t.name),t.className&&(i.className=t.className),i.style.position="absolute",i.style["will-change"]="transform",i.style.transform=this.joinTransformMatrix(t.getWorldTransform(),t.getOrigin())),i}},{key:"updateAttribute",value:function(t,r){var i=this.getOrCreateEl(r);switch(t){case"innerHTML":var a=r.parsedStyle.innerHTML;fr(a)?i.innerHTML=a:(i.innerHTML="",i.appendChild(a));break;case"x":i.style.left="".concat(r.parsedStyle.x,"px");break;case"y":i.style.top="".concat(r.parsedStyle.y,"px");break;case"transformOrigin":var s=r.parsedStyle.transformOrigin;i.style["transform-origin"]="".concat(s[0].buildCSSText(null,null,"")," ").concat(s[1].buildCSSText(null,null,""));break;case"width":var o=r.parsedStyle.width;i.style.width=sn(o)?"".concat(o,"px"):o.toString();break;case"height":var l=r.parsedStyle.height;i.style.height=sn(l)?"".concat(l,"px"):l.toString();break;case"zIndex":var u=r.parsedStyle.zIndex;i.style["z-index"]="".concat(u);break;case"visibility":var h=r.parsedStyle.visibility;i.style.visibility=h;break;case"pointerEvents":var v=r.parsedStyle.pointerEvents,E=v===void 0?"auto":v;i.style.pointerEvents=E;break;case"opacity":var D=r.parsedStyle.opacity;i.style.opacity="".concat(D);break;case"fill":var F=r.parsedStyle.fill,G="";lh(F)?F.isNone?G="transparent":G=r.getAttribute("fill"):Array.isArray(F)?G=r.getAttribute("fill"):el(F),i.style.background=G;break;case"stroke":var H=r.parsedStyle.stroke,K="";lh(H)?H.isNone?K="transparent":K=r.getAttribute("stroke"):Array.isArray(H)?K=r.getAttribute("stroke"):el(H),i.style["border-color"]=K,i.style["border-style"]="solid";break;case"lineWidth":var q=r.parsedStyle.lineWidth;i.style["border-width"]="".concat(q||0,"px");break;case"lineDash":i.style["border-style"]="dashed";break;case"filter":var te=r.style.filter;i.style.filter=te;break;default:!xn(r.style[t])&&r.style[t]!==""&&(i.style[t]=r.style[t])}}}])}();N1.tag="HTMLRendering";var fL=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.name="html-renderer",t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new N1)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(mo);var dL=function(){function n(e){(0,b.Z)(this,n),this.renderingContext=e.renderingContext,this.canvasConfig=e.config}return(0,U.Z)(n,[{key:"init",value:function(){var t=this.canvasConfig,r=t.container,i=t.canvas;if(i)this.$canvas=i,r&&i.parentElement!==r&&r.appendChild(i),this.$container=i.parentElement,this.canvasConfig.container=this.$container;else if(r&&(this.$container=fr(r)?document.getElementById(r):r,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(t,r){var i=this.canvasConfig.devicePixelRatio;this.dpr=i,this.$canvas&&(this.$canvas.width=this.dpr*t,this.$canvas.height=this.dpr*r,fT(this.$canvas,t,r)),this.renderingContext.renderReasons.add(Kl.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(t){this.$container&&this.$container.style&&(this.$container.style.cursor=t)}},{key:"toDataURL",value:function(){var e=(0,po.Z)((0,Xi.Z)().mark(function r(){var i,a,s,o=arguments;return(0,Xi.Z)().wrap(function(u){for(;;)switch(u.prev=u.next){case 0:return i=o.length>0&&o[0]!==void 0?o[0]:{},a=i.type,s=i.encoderOptions,u.abrupt("return",this.context.canvas.toDataURL(a,s));case 3:case"end":return u.stop()}},r,this)}));function t(){return e.apply(this,arguments)}return t}()}])}(),vL=function(n){function e(){var t;(0,b.Z)(this,e);for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];return t=(0,w.Z)(this,e,[].concat(i)),t.name="canvas-context-register",t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){this.context.ContextService=dL}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(mo),cc=function(n){function e(t){var r;return(0,b.Z)(this,e),r=(0,w.Z)(this,e,[t]),r.registerPlugin(new vL),r.registerPlugin(new rL),r.registerPlugin(new ID),r.registerPlugin(new uL),r.registerPlugin(new cL),r.registerPlugin(new $D),r.registerPlugin(new fL),r}return(0,y.Z)(e,n),(0,U.Z)(e)}(oM);function gL(n,e){if(n){var t;if(Sa(n))for(var r=0,i=n.length;r<i&&(t=e(n[r],r),t!==!1);r++);else if(si(n)){for(var a in n)if(n.hasOwnProperty(a)&&(t=e(n[a],a),t===!1))break}}}var B1=gL,pL=Object.prototype.hasOwnProperty,ml=function(n,e){if(n===null||!ql(n))return{};var t={};return B1(e,function(r){pL.call(n,r)&&(t[r]=n[r])}),t},mL=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class Ef extends ps{constructor(e){super(Object.assign(Object.assign({},e),{style:Object.assign({},Ef.defaultStyleProps,e.style)})),this.rootPointerEvent=new vh(null),this.forwardEvents=t=>{const r=this.context.canvas,i=r.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(t,i).forEach(s=>{const o=this.bootstrapEvent(this.rootPointerEvent,s,i,t);sc(r.context.eventService,"mappingTable.pointerupoutside",[]),r.context.eventService.mapEvent(o)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[Dt.CLICK,Dt.POINTER_DOWN,Dt.POINTER_MOVE,Dt.POINTER_UP,Dt.POINTER_OVER,Dt.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}render(e=this.parsedAttributes,t=this){this.drawKeyShape(e,t),this.drawPortShapes(e,t)}getKeyStyle(e){const t=ml(e,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:r=0,dy:i=0}=t,a=mL(t,["dx","dy"]),[s,o]=this.getSize(e);return Object.assign(Object.assign({x:r,y:i},a),{width:s,height:o})}drawKeyShape(e,t){const r=this.getKeyStyle(e),{x:i,y:a,width:s=0,height:o=0}=r,l=this.upsert("key-container",ki,{x:i,y:a,width:s,height:o,opacity:0},t);return this.upsert("key",Zu,r,l)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof cc))return;const r=this.getDomElement();this.events.forEach(i=>{r.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(e,t,r){e==="zIndex"&&t!==r&&(this.getDomElement().style.zIndex=r)}destroy(){const e=this.getDomElement();this.events.forEach(t=>{e.removeEventListener(t,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(e,t){const r=[];if(t.isTouchEvent(e))for(let i=0;i<e.changedTouches.length;i++){const a=e.changedTouches[i];Bn(a.button)&&(a.button=0),Bn(a.buttons)&&(a.buttons=1),Bn(a.isPrimary)&&(a.isPrimary=e.touches.length===1&&e.type==="touchstart"),Bn(a.width)&&(a.width=a.radiusX||1),Bn(a.height)&&(a.height=a.radiusY||1),Bn(a.tiltX)&&(a.tiltX=0),Bn(a.tiltY)&&(a.tiltY=0),Bn(a.pointerType)&&(a.pointerType="touch"),Bn(a.pointerId)&&(a.pointerId=a.identifier||0),Bn(a.pressure)&&(a.pressure=a.force||.5),Bn(a.twist)&&(a.twist=0),Bn(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=e.type,r.push(a)}else if(t.isMouseEvent(e)){const i=e;Bn(i.isPrimary)&&(i.isPrimary=!0),Bn(i.width)&&(i.width=1),Bn(i.height)&&(i.height=1),Bn(i.tiltX)&&(i.tiltX=0),Bn(i.tiltY)&&(i.tiltY=0),Bn(i.pointerType)&&(i.pointerType="mouse"),Bn(i.pointerId)&&(i.pointerId=1),Bn(i.pressure)&&(i.pressure=.5),Bn(i.twist)&&(i.twist=0),Bn(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,r.push(i)}else r.push(e);return r}transferMouseData(e,t){e.isTrusted=t.isTrusted,e.srcElement=t.srcElement,e.timeStamp=performance.now(),e.type=t.type,e.altKey=t.altKey,e.metaKey=t.metaKey,e.shiftKey=t.shiftKey,e.ctrlKey=t.ctrlKey,e.button=t.button,e.buttons=t.buttons,e.client.x=t.clientX,e.client.y=t.clientY,e.movement.x=t.movementX,e.movement.y=t.movementY,e.page.x=t.pageX,e.page.y=t.pageY,e.screen.x=t.screenX,e.screen.y=t.screenY,e.relatedTarget=null}bootstrapEvent(e,t,r,i){e.view=r,e.originalEvent=null,e.nativeEvent=i,e.pointerId=t.pointerId,e.width=t.width,e.height=t.height,e.isPrimary=t.isPrimary,e.pointerType=t.pointerType,e.pressure=t.pressure,e.tangentialPressure=t.tangentialPressure,e.tiltX=t.tiltX,e.tiltY=t.tiltY,e.twist=t.twist,this.transferMouseData(e,t);const{x:a,y:s}=this.getViewportXY(t);e.viewport.x=a,e.viewport.y=s;const[o,l]=this.context.canvas.getCanvasByViewport([a,s]);return e.canvas.x=o,e.canvas.y=l,e.global.copyFrom(e.canvas),e.offset.copyFrom(e.canvas),e.isTrusted=i.isTrusted,e.type==="pointerleave"&&(e.type="pointerout"),e}getViewportXY(e){let t,r;const{offsetX:i,offsetY:a,clientX:s,clientY:o}=e;if(!xn(i)&&!xn(a))t=i,r=a;else{const l=this.eventService.client2Viewport({x:s,y:o});t=l.x,r=l.y}return{x:t,y:r}}onframe(){super.onframe();const{opacity:e}=this.attributes;this.getDomElement().style.opacity=`${e}`}}Ef.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var k1=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class xf extends ps{constructor(e){super(Di({style:xf.defaultStyleProps},e))}getKeyStyle(e){const[t,r]=this.getSize(e),i=super.getKeyStyle(e),{fillOpacity:a,opacity:s=a}=i,o=k1(i,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:s},o),{width:t,height:r,x:-t/2,y:-r/2})}getHaloStyle(e){if(e.halo===!1)return!1;const t=this.getShape("key").attributes,{fill:r,stroke:i}=t,a=k1(t,["fill","stroke"]),s=mi(this.getGraphicStyle(e),"halo"),o=Number(s.lineWidth),[l,u]=zn(this.getSize(e),[o,o]);return Object.assign(Object.assign({},s),{width:l,height:u,fill:"transparent",x:-l/2,y:-u/2})}getIconStyle(e){const t=super.getIconStyle(e),[r,i]=this.getSize(e);return t?Object.assign({width:r*$s,height:i*$s},t):!1}drawKeyShape(e,t){const r=this.upsert("key",Gg,this.getKeyStyle(e),t);return jg(this),r}drawHaloShape(e,t){this.upsert("halo",ki,this.getHaloStyle(e),t)}update(e){super.update(e),e&&("x"in e||"y"in e||"z"in e)&&Vg(this)}}xf.defaultStyleProps={size:32};class yL extends ps{constructor(e){super(e)}getKeyStyle(e){const[t,r]=this.getSize(e);return Object.assign(Object.assign({},super.getKeyStyle(e)),{width:t,height:r,x:-t/2,y:-r/2})}getIconStyle(e){const t=super.getIconStyle(e),{width:r,height:i}=this.getShape("key").attributes;return t?Object.assign({width:r*$s,height:i*$s},t):!1}drawKeyShape(e,t){return this.upsert("key",ki,this.getKeyStyle(e),t)}}class _L extends uf{constructor(e){super(e)}getInnerR(e){return e.innerR||this.getOuterR(e)*3/8}getOuterR(e){return Math.min(...this.getSize(e))/2}getPoints(e){return oR(this.getOuterR(e),this.getInnerR(e))}getIconStyle(e){const t=super.getIconStyle(e),r=this.getInnerR(e)*2*$s;return t?Object.assign({width:r,height:r},t):!1}getPortXY(e,t){const{placement:r="top"}=t,i=this.getShape("key").getLocalBounds(),a=lR(this.getOuterR(e),this.getInnerR(e));return a0(i,r,a,!1)}}class bf extends uf{constructor(e){super(Di({style:bf.defaultStyleProps},e))}getPoints(e){const{direction:t}=e,[r,i]=this.getSize(e);return uR(r,i,t)}getPortXY(e,t){const{direction:r}=e,{placement:i="top"}=t,a=this.getShape("key").getLocalBounds(),[s,o]=this.getSize(e),l=cR(s,o,r);return a0(a,i,l,!1)}getIconStyle(e){const{icon:t,iconText:r,iconSrc:i,direction:a}=e;if(t===!1||Fs(r||i))return!1;const s=mi(this.getGraphicStyle(e),"icon"),o=this.getShape("key").getLocalBounds(),[l,u]=YP(o,a),h=QP(o,a)*2*$s;return Object.assign({x:l,y:u,width:h,height:h},s)}}bf.defaultStyleProps={size:40,direction:"up"};var F1=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class nu extends ps{constructor(e){super(Di({style:nu.defaultStyleProps},e)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(e){const{collapsed:t,childrenNode:r=[]}=e;return r.length===0?this.getEmptyKeySize(e):t?this.getCollapsedKeySize(e):this.getExpandedKeySize(e)}getEmptyKeySize(e){const{padding:t,collapsedSize:r}=e,[i,a,s,o]=cs(t);return zn(Ra(r),[o+a,i+s,0])}getCollapsedKeySize(e){return Ra(e.collapsedSize)}getExpandedKeySize(e){const t=this.getContentBBox(e);return[Ns(t),Bs(t),0]}getContentBBox(e){const{childrenNode:t=[],padding:r}=e,i=t.map(s=>this.context.element.getElement(s)).filter(Boolean);if(i.length===0){const s=new Ir,{x:o=0,y:l=0,size:u}=e,[h,v]=Ra(u);return s.setMinMax([o-h/2,l-v/2,0],[o+h/2,l+v/2,0]),s}const a=$u(i.map(s=>s.getBounds()));return r?Mo(a,r):a}drawCollapsedMarkerShape(e,t){const r=this.getCollapsedMarkerStyle(e);this.upsert("collapsed-marker",w1,r,t),jg(this)}getCollapsedMarkerStyle(e){if(!e.collapsed||!e.collapsedMarker)return!1;const t=mi(this.getGraphicStyle(e),"collapsedMarker"),{type:r}=t,i=F1(t,["type"]),a=this.getShape("key"),[s,o]=qs(a.getLocalBounds(),"center"),l=Object.assign(Object.assign({},i),{x:s,y:o});if(r){const u=this.getCollapsedMarkerText(r,e);Object.assign(l,{text:u})}return l}getCollapsedMarkerText(e,t){const{childrenData:r=[]}=t,{model:i}=this.context;return e==="descendant-count"?i.getDescendantsData(this.id).length.toString():e==="child-count"?r.length.toString():e==="node-count"?i.getDescendantsData(this.id).filter(a=>i.getElementType(yt(a))==="node").length.toString():fn(e)?e(r):""}getComboPosition(e){const{x:t=0,y:r=0,collapsed:i,childrenData:a=[]}=e;if(a.length===0)return[+t,+r,0];if(i){const{model:s}=this.context,o=s.getDescendantsData(this.id).filter(l=>!s.isCombo(yt(l)));if(o.length>0&&o.some(WC)){const l=o.reduce((u,h)=>zn(u,Ti(h)),[0,0,0]);return vs(l,o.length)}return[+t,+r,0]}return this.getContentBBox(e).center}getComboStyle(e){const[t,r]=this.getComboPosition(e);return{x:t,y:r,transform:[["translate",t,r]]}}updateComboPosition(e){const t=this.getComboStyle(e);Object.assign(this.style,t);const{x:r,y:i}=t;this.context.model.syncNodeLikeDatum({id:this.id,style:{x:r,y:i}}),Vg(this)}render(e,t=this){super.render(e,t),this.drawCollapsedMarkerShape(e,t)}update(e={}){super.update(e),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(e,t){const r=super.animate(this.attributes.collapsed?e:e.map(i=>{var{x:a,y:s,z:o,transform:l}=i,u=F1(i,["x","y","z","transform"]);return u}),t);return r&&new Proxy(r,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}nu.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class EL extends nu{constructor(e){super(e)}drawKeyShape(e,t){return this.upsert("key",Zs,this.getKeyStyle(e),t)}getKeyStyle(e){const{collapsed:t}=e,r=super.getKeyStyle(e),[i]=this.getKeySize(e);return Object.assign(Object.assign(Object.assign({},r),t&&mi(r,"collapsed")),{r:i/2})}getCollapsedKeySize(e){const[t,r]=Ra(e.collapsedSize),i=Math.max(t,r)/2;return[i*2,i*2,0]}getExpandedKeySize(e){const t=this.getContentBBox(e),[r,i]=bo(t),a=Math.sqrt(Math.pow(r,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(e,t=!1){const r=this.getShape("key").getBounds();return rf(e,r,t)}}class xL extends nu{constructor(e){super(e)}drawKeyShape(e,t){return this.upsert("key",ki,this.getKeyStyle(e),t)}getKeyStyle(e){const t=super.getKeyStyle(e),[r,i]=this.getKeySize(e);return Object.assign(Object.assign(Object.assign({},t),e.collapsed&&mi(t,"collapsed")),{width:r,height:i,x:-r/2,y:-i/2})}}var bL=function(n,e){if(!Qu(n))return n;for(var t=[],r=0;r<n.length;r++){var i=n[r];e(i,r)&&t.push(i)}return t},wL=bL,ML=function(n,e){return Qu(n)?n.indexOf(e)>-1:!1},AL=ML,TL=function(n,e){return e===void 0&&(e=[]),wL(n,function(t){return!AL(e,t)})},SL=TL;const PL={padding:10};function z1(n,e,t,r,i,a){const{padding:s}=Object.assign(PL,a),o=wo(t,s),l=wo(r,s),u=[n,...i,e];let h=null;const v=[];for(let E=0,D=u.length;E<D-1;E++){const F=E+1,G=u[E],H=u[F],K=HC(G,H);let q=null;if(E===0)if(F===D-1)if(o.intersects(l))q=e0(G,H,o,l);else if(!Uh(G,o)&&!Uh(H,l)){const te=ul(G,o),ue=ul(H,l);q=W1(te,ue,sa(te,ue)),q.points.unshift(te),q.points.push(ue)}else K||(q=CL(G,H,o,l));else hs(H,o)?q=e0(G,H,o,wo(H,s),h):K||(q=wf(G,H,o));else F===D-1?hs(G,l)?q=e0(G,H,wo(G,s),l,h):K||(q=G1(G,H,l,h)):K||(q=W1(G,H,h));q?(v.push(...q.points),h=q.direction):h=sa(G,H),F<D-1&&v.push(H)}return v.map(fl)}const OL={N:"S",S:"N",W:"E",E:"W"},U1={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function sa(n,e){const[t,r]=n,[i,a]=e;return t===i?r>a?"N":"S":r===a?t>i?"W":"E":null}function $g(n,e){return e==="N"||e==="S"?Bs(n):Ns(n)}function W1(n,e,t){const r=[n[0],e[1]],i=[e[0],n[1]],a=sa(n,r),s=sa(n,i),o=t?OL[t]:null,l=a===t||a!==o&&s!==t?r:i;return{points:[l],direction:sa(l,e)}}function wf(n,e,t){if(Uh(n,t)){const r=hc(n,e,t);return{points:[r],direction:sa(r,e)}}else{const r=ul(n,t),a=["left","right"].includes(ec(n,t))?[e[0],r[1]]:[r[0],e[1]];return{points:[a],direction:sa(a,e)}}}function G1(n,e,t,r){const i=Uh(e,t)?e:ul(e,t),a=[[i[0],n[1]],[n[0],i[1]]],s=a.filter(l=>XP(l,t)&&!h_(l,t,!0)),o=s.filter(l=>sa(l,n)!==r);if(o.length>0){const l=o.find(u=>sa(n,u)===r)||o[0];return{points:[l],direction:sa(l,e)}}else{const l=SL(a,s)[0],u=So(e,l,$g(t,r)/2);return{points:[hc(u,n,t),u],direction:sa(u,e)}}}function CL(n,e,t,r){let i=wf(n,e,t);const a=rc(i.points[0]);if(hs(a,r)){i=wf(e,n,r);const s=rc(i.points[0]);if(hs(s,t)){const o=So(n,a,$g(t,sa(n,a))/2),l=So(e,s,$g(r,sa(e,s))/2),u=[(o[0]+l[0])/2,(o[1]+l[1])/2],h=wf(n,u,t),v=G1(u,e,r,h.direction);i.points=[h.points[0],v.points[0]],i.direction=v.direction}}return i}function e0(n,e,t,r,i){const s=$u([t,r]),o=Wr(e,s.center)>Wr(n,s.center),[l,u]=o?[e,n]:[n,e],h=Bs(s)+Ns(s);let v;if(i){const F=[l[0]+h*Math.cos(U1[i]),l[1]+h*Math.sin(U1[i])];v=So(ul(F,s),F,.01)}else v=So(ul(l,s),l,-.01);let E=hc(v,u,s),D=[ic(v,2),ic(E,2)];if(li(ic(v),ic(E))){const F=Ig(Pr(v,l),[1,0,0])+Math.PI/2;E=[u[0]+h*Math.cos(F),u[1]+h*Math.sin(F),0],E=ic(So(ul(E,s),u,-.01),2);const G=hc(v,E,s);D=[v,G,E]}return{points:o?D.reverse():D,direction:sa(o?v:E,e)}}function hc(n,e,t){let r=[n[0],e[1]];return hs(r,t)&&(r=[e[0],n[1]]),r}function H1(n,e,t,r,i){let l=typeof e=="number"?e:.5;e==="start"&&(l=0),e==="end"&&(l=.99);const u=Fi(n.getPoint(l)),h=Fi(n.getPoint(l+.01));let v=e==="start"?"left":e==="end"?"right":"center";if(i1(u,h)||!t){const[K,q]=j1(n,l,r,i);return{transform:[["translate",K,q]],textAlign:v}}let E=Math.atan2(h[1]-u[1],h[0]-u[0]);h[0]<u[0]&&(v=v==="center"?v:v==="left"?"right":"left",r*=-1,E+=Math.PI);const[F,G]=j1(n,l,r,i,E),H=[["translate",F,G],["rotate",E/Math.PI*180]];return{textAlign:v,transform:H}}function DL(n,e,t,r,i){var a,s;const o=((a=n.badge)===null||a===void 0?void 0:a.getGeometryBounds().halfExtents[0])*2||0,l=((s=n.label)===null||s===void 0?void 0:s.getGeometryBounds().halfExtents[0])*2||0;return H1(n.key,t,!0,(l?(l/2+o/2)*(e==="suffix"?1:-1):0)+r,i)}function j1(n,e,t,r,i){const[a,s]=Fi(n.getPoint(e));let o=t,l=r;return i&&(o=t*Math.cos(i)-r*Math.sin(i),l=t*Math.sin(i)+r*Math.cos(i)),[a+o,s+l]}function t0(n,e,t,r){if(li(n,e))return n;const i=Pr(e,n),a=[n[0]+t*i[0],n[1]+t*i[1]],s=Js(nf(i,!1));return a[0]+=r*s[0],a[1]+=r*s[1],a}function LL(n){return sn(n)?[n,-n]:n}function RL(n){return sn(n)?[n,1-n]:n}function IL(n,e,t){return[["M",n[0],n[1]],["Q",t[0],t[1],e[0],e[1]]]}function V1(n,e,t){return[["M",n[0],n[1]],["C",t[0][0],t[0][1],t[1][0],t[1][1],e[0],e[1]]]}function n0(n,e=0,t=!1){const r=n.length-1,i=n[0],a=n[r],s=n.slice(1,r),o=[["M",i[0],i[1]]];return s.forEach((l,u)=>{const h=s[u-1]||i,v=s[u+1]||a;if(!a1(h,l,v)&&e){const[E,D]=NL(h,l,v,e);o.push(["L",E[0],E[1]],["Q",l[0],l[1],D[0],D[1]],["L",D[0],D[1]])}else o.push(["L",l[0],l[1]])}),o.push(["L",a[0],a[1]]),t&&o.push(["Z"]),o}function NL(n,e,t,r){const i=tf(n,e),a=tf(t,e),s=Math.min(r,Math.min(i,a)/2),o=[e[0]-s/i*(e[0]-n[0]),e[1]-s/i*(e[1]-n[1])],l=[e[0]-s/a*(e[0]-t[0]),e[1]-s/a*(e[1]-t[1])];return[o,l]}const BL=n=>{const e=Math.PI/2,t=Bs(n)/2,r=Ns(n)/2,i=Math.atan2(t,r)/2,a=Math.atan2(r,t)/2;return{top:[-e-a,-e+a],"top-right":[-e+a,-i],"right-top":[-e+a,-i],right:[-i,i],"bottom-right":[i,e-a],"right-bottom":[i,e-a],bottom:[e-a,e+a],"bottom-left":[e+a,Math.PI-i],"left-bottom":[e+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-e-a],"left-top":[Math.PI+i,-e-a]}};function Z1(n,e,t,r,i){const a=wo(n),s=n.getCenter();let o=r&&Do(r),l=i&&Do(i);if(!o||!l){const u=BL(a),h=u[e][0],v=u[e][1],[E,D]=bo(a),F=Math.max(E,D),G=zn(s,[F*Math.cos(h),F*Math.sin(h),0]),H=zn(s,[F*Math.cos(v),F*Math.sin(v),0]);o=o0(n,G),l=o0(n,H),t||([o,l]=[l,o])}return[o,l]}function kL(n,e,t,r,i,a){const s=n.getPorts()[i||a],o=n.getPorts()[a||i];let[l,u]=Z1(n,e,t,s,o);const h=FL(n,l,u,r);return s&&(l=dc(s,h[0])),o&&(u=dc(o,h.at(-1))),V1(l,u,h)}function FL(n,e,t,r){const i=n.getCenter();if(li(e,t)){const a=Pr(e,i),s=[r*Math.sign(a[0])||r/2,r*Math.sign(a[1])||-r/2,0];return[zn(e,s),zn(t,ds(s,[1,-1,1]))]}return[So(i,e,Wr(i,e)+r),So(i,t,Wr(i,t)+r)]}function zL(n,e,t,r,i,a,s){const o=s0(n),l=o[a||s],u=o[s||a];let[h,v]=Z1(n,t,r,l,u);const E=UL(n,h,v,i);return l&&(h=dc(l,E[0])),u&&(v=dc(u,E.at(-1))),n0([h,...E,v],e)}function UL(n,e,t,r){const i=[],a=wo(n);if(li(e,t))switch(ec(e,a)){case"left":i.push([e[0]-r,e[1]]),i.push([e[0]-r,e[1]+r]),i.push([e[0],e[1]+r]);break;case"right":i.push([e[0]+r,e[1]]),i.push([e[0]+r,e[1]+r]),i.push([e[0],e[1]+r]);break;case"top":i.push([e[0],e[1]-r]),i.push([e[0]+r,e[1]-r]),i.push([e[0]+r,e[1]]);break;case"bottom":i.push([e[0],e[1]+r]),i.push([e[0]+r,e[1]+r]),i.push([e[0]+r,e[1]]);break}else{const s=ec(e,a),o=ec(t,a);if(s===o){const l=s;let u,h;switch(l){case"left":u=Math.min(e[0],t[0])-r,i.push([u,e[1]]),i.push([u,t[1]]);break;case"right":u=Math.max(e[0],t[0])+r,i.push([u,e[1]]),i.push([u,t[1]]);break;case"top":h=Math.min(e[1],t[1])-r,i.push([e[0],h]),i.push([t[0],h]);break;case"bottom":h=Math.max(e[1],t[1])+r,i.push([e[0],h]),i.push([t[0],h]);break}}else{const l=(E,D)=>({left:[D[0]-r,D[1]],right:[D[0]+r,D[1]],top:[D[0],D[1]-r],bottom:[D[0],D[1]+r]})[E],u=l(s,e),h=l(o,t),v=hc(u,h,a);i.push(u,v,h)}}return i}function r0(n,e){const t=new Set,r=new Set,i=new Set;return n.forEach(a=>{e(a).forEach(o=>{t.add(o),n.includes(o.source)&&n.includes(o.target)?r.add(o):i.add(o)})}),{edges:Array.from(t),internal:Array.from(r),external:Array.from(i)}}function K1(n,e){const t=[];let r=n;for(;r;){t.push(r);const i=e(yt(r));if(i)r=i;else break}if(t.some(i=>{var a;return(a=i.style)===null||a===void 0?void 0:a.collapsed})){const i=t.reverse().findIndex(ba);return t[i]||t.at(-1)}return n}function WL(n,e){return e||(n<4?10:n===4?12:n*2.5)}const GL=(n,e)=>{const t=Math.max(n,e)/2;return[["M",-n/2,0],["A",t,t,0,1,0,2*t-n/2,0],["A",t,t,0,1,0,-n/2,0],["Z"]]},X1=(n,e)=>[["M",-n/2,0],["L",n/2,-e/2],["L",n/2,e/2],["Z"]],HL=(n,e)=>[["M",-n/2,0],["L",0,-e/2],["L",n/2,0],["L",0,e/2],["Z"]],jL=(n,e)=>[["M",-n/2,0],["L",n/2,-e/2],["L",4*n/5-n/2,0],["L",n/2,e/2],["Z"]],VL=(n,e)=>[["M",-n/2,-e/2],["L",n/2,-e/2],["L",n/2,e/2],["L",-n/2,e/2],["Z"]],ZL=(n,e)=>{const t=n/2,r=n/7,i=n-r;return[["M",-t,0],["L",0,-e/2],["L",0,e/2],["Z"],["M",i-t,-e/2],["L",i+r-t,-e/2],["L",i+r-t,e/2],["L",i-t,e/2],["Z"]]},KL=(n,e)=>[["M",n/2,-e/2],["L",-n/2,0],["L",n/2,0],["L",-n/2,0],["L",n/2,e/2]];var Mf=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class Co extends M1{constructor(e){super(Di({style:Co.defaultStyleProps},e)),this.type="edge"}get sourceNode(){const{sourceNode:e}=this.parsedAttributes;return this.context.element.getElement(e)}get targetNode(){const{targetNode:e}=this.parsedAttributes;return this.context.element.getElement(e)}getKeyStyle(e){const t=this.getGraphicStyle(e),{loop:r}=t,i=Mf(t,["loop"]),{sourceNode:a,targetNode:s}=this,l={d:r&&rR(a,s)?this.getLoopPath(e):this.getKeyPath(e)};return Oa.PARSED_STYLE_LIST.forEach(u=>{u in i&&(l[u]=i[u])}),l}getLoopPath(e){const{sourcePort:t,targetPort:r}=e,i=this.sourceNode,a=wo(i),s=Math.max(Ns(a),Bs(a)),{placement:o,clockwise:l,dist:u=s}=mi(this.getGraphicStyle(e),"loop");return kL(i,o,l,u,t,r)}getEndpoints(e,t=!0,r=[]){const{sourcePort:i,targetPort:a}=e,{sourceNode:s,targetNode:o}=this,[l,u]=aR(s,o,i,a);if(!t){const D=l?Do(l):s.getCenter(),F=u?Do(u):o.getCenter();return[D,F]}const h=typeof r=="function"?r():r,v=nE(l||s,h[0]||u||o),E=nE(u||o,h[h.length-1]||l||s);return[v,E]}getHaloStyle(e){if(e.halo===!1)return!1;const t=this.getKeyStyle(e),r=mi(this.getGraphicStyle(e),"halo");return Object.assign(Object.assign({},t),r)}getLabelStyle(e){if(e.label===!1||!e.labelText)return!1;const t=mi(this.getGraphicStyle(e),"label"),{placement:r,offsetX:i,offsetY:a,autoRotate:s,maxWidth:o}=t,l=Mf(t,["placement","offsetX","offsetY","autoRotate","maxWidth"]),u=H1(this.shapeMap.key,r,s,i,a),h=this.shapeMap.key.getLocalBounds(),v=rD([h.min,h.max],o);return Object.assign({wordWrapWidth:v},u,l)}getBadgeStyle(e){if(e.badge===!1||!e.badgeText)return!1;const t=mi(e,"badge"),{offsetX:r,offsetY:i,placement:a}=t,s=Mf(t,["offsetX","offsetY","placement"]);return Object.assign(s,DL(this.shapeMap,a,e.labelPlacement,r,i))}drawArrow(e,t){var r;const i=t==="start",s=e[t==="start"?"startArrow":"endArrow"],o=this.shapeMap.key;if(s){const l=this.getArrowStyle(e,i),[u,h,v]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],E=o.parsedStyle[u];if(E)E.attr(l);else{const D=l.src?Ku:Oa,F=new D({style:l});o.style[u]=F}o.style[h]=e[v]||l.width/2+ +l.lineWidth}else{const l=i?"markerStart":"markerEnd";(r=o.style[l])===null||r===void 0||r.destroy(),o.style[l]=null}}getArrowStyle(e,t){const r=this.getShape("key").attributes,i=t?"startArrow":"endArrow",a=mi(this.getGraphicStyle(e),i),{size:s,type:o}=a,l=Mf(a,["size","type"]),[u,h]=Ra(WL(r.lineWidth,s)),E=(fn(o)?o:re[o]||X1)(u,h);return Object.assign(ml(r,["stroke","strokeOpacity","fillOpacity"]),{width:u,height:h},Object.assign({},E&&{d:E,fill:o==="simple"?"":r.stroke}),l)}drawLabelShape(e,t){const r=this.getLabelStyle(e);this.upsert("label",Po,r,t)}drawHaloShape(e,t){const r=this.getHaloStyle(e);this.upsert("halo",Oa,r,t)}drawBadgeShape(e,t){const r=this.getBadgeStyle(e);this.upsert("badge",eu,r,t)}drawSourceArrow(e){this.drawArrow(e,"start")}drawTargetArrow(e){this.drawArrow(e,"end")}drawKeyShape(e,t){const r=this.getKeyStyle(e);return this.upsert("key",Oa,r,t)}render(e=this.parsedAttributes,t=this){this.drawKeyShape(e,t),this.getShape("key")&&(this.drawSourceArrow(e),this.drawTargetArrow(e),this.drawLabelShape(e,t),this.drawHaloShape(e,t),this.drawBadgeShape(e,t))}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(e,t){const r=super.animate(e,t);return r&&new Proxy(r,{set:(i,a,s)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,s))})}}Co.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 yl extends Co{constructor(e){super(Di({style:yl.defaultStyleProps},e))}getKeyPath(e){const[t,r]=this.getEndpoints(e),{controlPoints:i,curvePosition:a,curveOffset:s}=e,o=this.getControlPoints(t,r,RL(a),LL(s),i);return V1(t,r,o)}getControlPoints(e,t,r,i,a){return(a==null?void 0:a.length)===2?a:[t0(e,t,r[0],i[0]),t0(e,t,r[1],i[1])]}}yl.defaultStyleProps={curvePosition:.5,curveOffset:20};class Af extends yl{constructor(e){super(Di({style:Af.defaultStyleProps},e))}getControlPoints(e,t,r,i){const a=t[0]-e[0];return[[e[0]+a*r[0]+i[0],e[1]],[t[0]-a*r[1]+i[1],t[1]]]}}Af.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class Tf extends yl{constructor(e){super(Di({style:Tf.defaultStyleProps},e))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(e){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(e);const t=Ti(this.ref),r=this.sourceNode.getIntersectPoint(t,!0),i=this.targetNode.getIntersectPoint(t);return[r,i]}toRadialCoordinate(e){const t=Ti(this.ref),r=Wr(e,t),i=e1(Pr(e,t));return[r,i]}getControlPoints(e,t,r,i){const[a,s]=this.toRadialCoordinate(e),[o]=this.toRadialCoordinate(t),l=o-a;return[[e[0]+(l*r[0]+i[0])*Math.cos(s),e[1]+(l*r[0]+i[0])*Math.sin(s)],[t[0]-(l*r[1]-i[0])*Math.cos(s),t[1]-(l*r[1]-i[0])*Math.sin(s)]]}}Tf.defaultStyleProps={curvePosition:.5,curveOffset:20};class Sf extends yl{constructor(e){super(Di({style:Sf.defaultStyleProps},e))}getControlPoints(e,t,r,i){const a=t[1]-e[1];return[[e[0],e[1]+a*r[0]+i[0]],[t[0],t[1]-a*r[1]+i[1]]]}}Sf.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class Pf extends Co{constructor(e){super(Di({style:Pf.defaultStyleProps},e))}getKeyPath(e){const[t,r]=this.getEndpoints(e);return[["M",t[0],t[1]],["L",r[0],r[1]]]}}Pf.defaultStyleProps={};const XL={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:tf},eo=n=>`${Math.round(n[0])}|||${Math.round(n[1])}`;function _l(n,e){const t=r=>Math.round(r/e);return sn(n)?t(n):n.map(t)}function YL(n,e){const t=Math.abs(n-e);return t>Math.PI?2*Math.PI-t:t}function Y1(n,e){const t=e[0]-n[0],r=e[1]-n[1];return!t&&!r?0:Math.atan2(r,t)}function Q1(n,e,t,r){const i=Y1(n,e),a=t[eo(n)],o=Y1(a||r,n);return YL(o,i)}const QL=(n,e)=>{const{offset:t,gridSize:r}=e,i={};return n.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const s=Mo(a.getRenderBounds(),t);for(let o=_l(s.min[0],r);o<=_l(s.max[0],r);o+=1)for(let l=_l(s.min[1],r);l<=_l(s.max[1],r);l+=1)i[`${o}|||${l}`]=!0}),i};function J1(n,e,t){return Math.min(...e.map(r=>t(n,r)))}function JL(n,e,t){let r=n[0],i=t(n[0],e);for(let a=0;a<n.length;a++){const s=n[a],o=t(s,e);o<i&&(r=s,i=o)}return r}const q1=(n,e,t,r)=>{if(!e)return[n];const{directionMap:i,offset:a}=r,s=Mo(e.getRenderBounds(),a),o=Object.keys(i).reduce((l,u)=>{if(t.includes(u)){const h=i[u],[v,E]=bo(s),D=[n[0]+h.stepX*v,n[1]+h.stepY*E],F=JP(s);for(let G=0;G<F.length;G++){const H=Bg([n,D],F[G]);H&&h_(H,s)&&l.push(H)}}return l},[]);return hs(n,s)||o.push(n),o.map(l=>_l(l,r.gridSize))},qL=(n,e,t,r,i,a,s)=>{const o=[];let l=[a[0]===r[0]?r[0]:n[0]*s,a[1]===r[1]?r[1]:n[1]*s];o.unshift(l);let u=n,h=e[eo(u)];for(;h;){const D=h,F=u;Q1(D,F,e,t)&&(l=[D[0]===F[0]?l[0]:D[0]*s,D[1]===F[1]?l[1]:D[1]*s],o.unshift(l)),h=e[eo(D)],u=D}const v=i.map(D=>[D[0]*s,D[1]*s]),E=JL(v,l,tf);return o.unshift(E),o};function $L(n,e,t,r){const i=fl(n.getCenter()),a=fl(e.getCenter()),s=Object.assign(XL,r),{gridSize:o}=s,l=s.enableObstacleAvoidance?t:[n,e],u=QL(l,s),h=_l(i,o),v=_l(a,o),E=q1(i,n,s.startDirections,s),D=q1(a,e,s.endDirections,s);E.forEach(ge=>delete u[eo(ge)]),D.forEach(ge=>delete u[eo(ge)]);const F={},G={},H={},K={},q={},te=new eR;for(let ge=0;ge<E.length;ge++){const Te=E[ge],Oe=eo(Te);F[Oe]=Te,K[Oe]=0,q[Oe]=J1(Te,D,s.distFunc),te.add({id:Oe,value:q[Oe]})}const ue=D.map(ge=>eo(ge));let le=s.maximumLoops,he,ve=1/0;for(const[ge,Te]of Object.entries(F))q[ge]<=ve&&(ve=q[ge],he=Te);for(;Object.keys(F).length>0&&le>0;){const ge=te.minId(!1);if(ge)he=F[ge];else break;const Te=eo(he);if(ue.includes(Te))return qL(he,H,h,a,E,v,o);delete F[Te],te.remove(Te),G[Te]=!0;for(const Oe of Object.values(s.directionMap)){const Ne=zn(he,[Oe.stepX,Oe.stepY]),ze=eo(Ne);if(G[ze])continue;const Xe=Q1(he,Ne,H,h);if(Xe>s.maxAllowedDirectionChange||u[ze])continue;F[ze]||(F[ze]=Ne);const Je=s.penalties[Xe],st=s.distFunc(he,Ne)+(isNaN(Je)?o:Je),Et=K[Te]+st,mt=K[ze];mt&&Et>=mt||(H[ze]=he,K[ze]=Et,q[ze]=Et+J1(Ne,D,s.distFunc),te.add({id:ze,value:q[ze]}))}le-=1}return[]}class eR{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(e,t){let r=0,i=t-1;for(;i-r>1;){const a=Math.floor((r+i)/2);if(this.arr[a].value>e.value)i=a;else if(this.arr[a].value<e.value)r=a;else{this.arr.splice(a,0,e),this.map[e.id]=!0;return}}this.arr.splice(i,0,e),this.map[e.id]=!0}add(e){delete this.map[e.id];const t=this.arr.length;if(!t||this.arr[t-1].value<e.value){this.arr.push(e),this.map[e.id]=!0;return}this._innerAdd(e,t)}remove(e){this.map[e]&&delete this.map[e]}_clearAndGetMinId(){let e;for(let t=this.arr.length-1;t>=0;t--)this.map[this.arr[t].id]?e=this.arr[t].id:this.arr.splice(t,1);return e}_findFirstId(){for(;this.arr.length;){const e=this.arr.shift();if(this.map[e.id])return e.id}}minId(e){return e?this._clearAndGetMinId():this._findFirstId()}}class Of extends Co{constructor(e){super(Di({style:Of.defaultStyleProps},e))}getControlPoints(e){const{router:t}=e,{sourceNode:r,targetNode:i}=this,[a,s]=this.getEndpoints(e,!1);let o=[];if(!t)o=e.controlPoints;else if(t.type==="shortest-path"){const l=this.context.element.getNodes();o=$L(r,i,l,t),o.length||(o=z1(a,s,r,i,e.controlPoints,{padding:t.offset}))}else t.type==="orth"&&(o=z1(a,s,r,i,e.controlPoints,t));return o}getPoints(e){const t=this.getControlPoints(e),[r,i]=this.getEndpoints(e,!0,t);return[r,...t,i]}getKeyPath(e){const t=this.getPoints(e);return n0(t,e.radius)}getLoopPath(e){const{sourcePort:t,targetPort:r,radius:i}=e,a=this.sourceNode,s=wo(a),o=Math.max(Ns(s),Bs(s))/4,{placement:l,clockwise:u,dist:h=o}=mi(this.getGraphicStyle(e),"loop");return zL(a,i,l,u,h,t,r)}}Of.defaultStyleProps={radius:0,controlPoints:[],router:!1};class Cf extends Co{constructor(e){super(Di({style:Cf.defaultStyleProps},e))}getKeyPath(e){const{curvePosition:t,curveOffset:r}=e,[i,a]=this.getEndpoints(e),s=e.controlPoint||t0(i,a,t,r);return IL(i,a,s)}}Cf.defaultStyleProps={curvePosition:.5,curveOffset:30};var tR=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function fc(n){return n instanceof ps&&n.type==="node"}function $1(n){return n instanceof Co}function i0(n){return n instanceof nu}function nR(n){return fc(n)||$1(n)||i0(n)}function rR(n,e){return!n||!e?!1:n===e}const iR={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 a0(n,e,t=iR,r=!0){const i=[.5,.5],a=fr(e)?aa(t,e.toLocaleLowerCase(),i):e;if(!r&&fr(e))return a;const[s,o]=a||i;return[n.min[0]+Ns(n)*s,n.min[1]+Bs(n)*o]}function s0(n){if(!n)return{};const e=n.getPorts();return(n.attributes.ports||[]).forEach((r,i)=>{var a;const{key:s,placement:o}=r;eE(r)&&(e[a=s||i]||(e[a]=qs(n.getShape("key").getBounds(),o)))}),e}function eE(n){const{r:e}=n;return!e||Number(e)===0}function Do(n){return Jl(n)?n:n.getPosition()}function aR(n,e,t,r){const i=tE(n,e,t,r),a=tE(e,n,r,t);return[i,a]}function tE(n,e,t,r){const i=s0(n);if(t)return i[t];const a=Object.values(i);if(a.length===0)return;const s=a.map(u=>Do(u)),o=sR(e,r),[l]=ZC(s,o);return a.find(u=>Do(u)===l)}function sR(n,e){const t=s0(n);if(e)return[Do(t[e])];const r=Object.values(t);return r.length>0?r.map(i=>Do(i)):[n.getCenter()]}function nE(n,e){return i0(n)||fc(n)?o0(n,e):dc(n,e)}function dc(n,e){if(!n||!e)return[0,0,0];if(Jl(n))return n;if(n.attributes.linkToCenter)return n.getPosition();const t=Jl(e)?e:fc(e)?e.getCenter():e.getPosition();return rf(t,n.getBounds())}function o0(n,e){if(!n||!e)return[0,0,0];const t=Jl(e)?e:fc(e)?e.getCenter():e.getPosition();return n.getIntersectPoint(t)||n.getCenter()}function rE(n,e="bottom",t=0,r=0,i=!1){const a=e.split("-"),[s,o]=qs(n,e),[l,u]=i?["bottom","top"]:["top","bottom"],h=a.includes("top")?u:a.includes("bottom")?l:"middle",v=a.includes("left")?"right":a.includes("right")?"left":"center";return{transform:[["translate",s+t,o+r]],textBaseline:h,textAlign:v}}function oR(n,e){return[[0,-n],[e*Math.cos(3*Math.PI/10),-e*Math.sin(3*Math.PI/10)],[n*Math.cos(Math.PI/10),-n*Math.sin(Math.PI/10)],[e*Math.cos(Math.PI/10),e*Math.sin(Math.PI/10)],[n*Math.cos(3*Math.PI/10),n*Math.sin(3*Math.PI/10)],[0,e],[-n*Math.cos(3*Math.PI/10),n*Math.sin(3*Math.PI/10)],[-e*Math.cos(Math.PI/10),e*Math.sin(Math.PI/10)],[-n*Math.cos(Math.PI/10),-n*Math.sin(Math.PI/10)],[-e*Math.cos(3*Math.PI/10),-e*Math.sin(3*Math.PI/10)]]}function lR(n,e){const t={};return t.top=[0,-n],t.left=[-n*Math.cos(Math.PI/10),-n*Math.sin(Math.PI/10)],t["left-bottom"]=[-n*Math.cos(3*Math.PI/10),n*Math.sin(3*Math.PI/10)],t.bottom=[0,e],t["right-bottom"]=[n*Math.cos(3*Math.PI/10),n*Math.sin(3*Math.PI/10)],t.right=t.default=[n*Math.cos(Math.PI/10),-n*Math.sin(Math.PI/10)],t}function uR(n,e,t){const r=e/2,i=n/2,a={up:[[-i,r],[i,r],[0,-r]],left:[[-i,0],[i,r],[i,-r]],right:[[-i,r],[-i,-r],[i,0]],down:[[-i,-r],[i,-r],[0,r]]};return a[t]||a.up}function cR(n,e,t){const r=e/2,i=n/2,a={};return t==="down"?(a.bottom=a.default=[0,r],a.right=[i,-r],a.left=[-i,-r]):t==="left"?(a.top=[i,-r],a.bottom=[i,r],a.left=a.default=[-i,0]):t==="right"?(a.top=[-i,-r],a.bottom=[-i,r],a.right=a.default=[i,0]):(a.left=[-i,r],a.top=a.default=[0,-r],a.right=[i,r]),a}function H9(n,e){return[[n/2,-e/2],[n/2,e/2],[-n/2,e/2],[-n/2,-e/2]]}function hR(n,e){return[[0,-e/2],[n/2,0],[0,e/2],[-n/2,0]]}function fR(n){return aa(n,["style","visibility"])!=="hidden"}function dR(n,e){const{zIndex:t,transform:r,transformOrigin:i,visibility:a,cursor:s,clipPath:o,component:l}=e,u=tR(e,["zIndex","transform","transformOrigin","visibility","cursor","clipPath","component"]);Object.assign(n.attributes,u),r&&n.setAttribute("transform",r),sn(t)&&n.setAttribute("zIndex",t),i&&n.setAttribute("transformOrigin",i),a&&n.setAttribute("visibility",a),s&&n.setAttribute("cursor",s),o&&n.setAttribute("clipPath",o),l&&n.setAttribute("component",l)}function l0(n,e){"update"in n?n.update(e):n.attr(e)}function vR(n){return[[0,n],[n*Math.sqrt(3)/2,n/2],[n*Math.sqrt(3)/2,-n/2],[0,-n],[-n*Math.sqrt(3)/2,-n/2],[-n*Math.sqrt(3)/2,n/2]]}function gR(n){sc(n,"__to_be_destroyed__",!0)}function Df(n){return aa(n,"__to_be_destroyed__",!1)}var pR=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class Lf extends La{constructor(e,t){super(e,Object.assign({},Lf.defaultOptions,t)),this.onCollapseExpand=r=>pR(this,void 0,void 0,function*(){if(!this.validate(r))return;const{target:i}=r;if(!nR(i))return;const a=i.id,{model:s,graph:o}=this.context,l=s.getElementDataById(a);if(!l)return!1;const{onCollapse:u,onExpand:h,animation:v,align:E}=this.options;ba(l)?(yield o.expandElement(a,{animation:v,align:E}),h==null||h(a)):(yield o.collapseElement(a,{animation:v,align:E}),u==null||u(a))}),this.bindEvents()}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}bindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.on(`node:${t}`,this.onCollapseExpand),e.on(`combo:${t}`,this.onCollapseExpand)}unbindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.off(`node:${t}`,this.onCollapseExpand),e.off(`combo:${t}`,this.onCollapseExpand)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}destroy(){this.unbindEvents(),super.destroy()}}Lf.defaultOptions={enable:!0,animation:!0,trigger:Dt.DBLCLICK,align:!0};var Rf={},mR=function(n){return n=n||"g",Rf[n]?Rf[n]+=1:Rf[n]=1,n+Rf[n]},If=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};const yR="g6-create-edge-assist-edge-id",Nf="g6-create-edge-assist-node-id";class Bf extends La{constructor(e,t){super(e,Object.assign({},Bf.defaultOptions,t)),this.drop=r=>If(this,void 0,void 0,function*(){const{targetType:i}=r;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(r):yield this.cancelEdge()}),this.handleCreateEdge=r=>If(this,void 0,void 0,function*(){var i,a,s;if(!this.validate(r))return;const{graph:o,canvas:l,batch:u,element:h}=this.context,{style:v}=this.options;if(this.source){this.createEdge(r),yield this.cancelEdge();return}u.startBatch(),l.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([r.target.id])[0];const E=o.getElementData(this.source);o.addNodeData([{id:Nf,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=E.style)===null||i===void 0?void 0:i.x,y:(a=E.style)===null||a===void 0?void 0:a.y}}]),o.addEdgeData([{id:yR,source:this.source,target:Nf,style:Object.assign({pointerEvents:"none"},v)}]),yield(s=h.draw({animation:!1}))===null||s===void 0?void 0:s.finished}),this.updateAssistEdge=r=>If(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:s}=this.context;a.translateNodeTo(Nf,[r.canvas.x,r.canvas.y]),yield(i=s.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=r=>{var i,a;const{graph:s}=this.context,{style:o,onFinish:l,onCreate:u}=this.options;if(((i=r.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const v=(a=this.getSelectedNodeIDs([r.target.id]))===null||a===void 0?void 0:a[0],E=`${this.source}-${v}-${mR()}`,D=u({id:E,source:this.source,target:v,style:o});s.addEdgeData([D]),l(D)},this.cancelEdge=()=>If(this,void 0,void 0,function*(){var r;if(!this.source)return;const{graph:i,element:a,batch:s}=this.context;i.removeNodeData([Nf]),this.source=void 0,yield(r=a.draw({animation:!1}))===null||r===void 0?void 0:r.finished,s.endBatch()}),this.bindEvents()}update(e){super.update(e),this.bindEvents()}bindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;this.unbindEvents(),t==="click"?(e.on(Qa.CLICK,this.handleCreateEdge),e.on(ll.CLICK,this.handleCreateEdge),e.on(Xs.CLICK,this.cancelEdge),e.on(Fh.CLICK,this.cancelEdge)):(e.on(Qa.DRAG_START,this.handleCreateEdge),e.on(ll.DRAG_START,this.handleCreateEdge),e.on(Dt.POINTER_UP,this.drop)),e.on(Dt.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(e){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(t=>t.id).concat(e)))}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;e.off(Qa.CLICK,this.handleCreateEdge),e.off(ll.CLICK,this.handleCreateEdge),e.off(Xs.CLICK,this.cancelEdge),e.off(Fh.CLICK,this.cancelEdge),e.off(Qa.DRAG_START,this.handleCreateEdge),e.off(ll.DRAG_START,this.handleCreateEdge),e.off(Dt.POINTER_UP,this.drop),e.off(Dt.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}Bf.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:n=>n,onFinish:()=>{}};function _R(n,e,t){var r;return function(){var i=this,a=arguments,s=function(){r=null,t||n.apply(i,a)},o=t&&!r;clearTimeout(r),r=setTimeout(s,e),o&&n.apply(i,a)}}var vc=_R,iE=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class kf extends La{constructor(e,t){super(e,Object.assign({},kf.defaultOptions,t)),this.isDragging=!1,this.onDragStart=r=>{this.validate(r)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=r=>{var i,a,s,o;if(!this.isDragging||ui.isPinching)return;const l=(a=(i=r.movement)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:r.dx,u=(o=(s=r.movement)===null||s===void 0?void 0:s.y)!==null&&o!==void 0?o:r.dy;l|u&&this.translate([l,u],!1)},this.onDragEnd=()=>{var r,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(r=this.options).onFinish)===null||i===void 0||i.call(r)},this.invokeOnFinish=vc(()=>{var r,i;(i=(r=this.options).onFinish)===null||i===void 0||i.call(r)},300),this.shortcut=new $l(e.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}bindEvents(){const{trigger:e}=this.options;if(si(e)){const{up:t=[],down:r=[],left:i=[],right:a=[]}=e;this.shortcut.bind(t,s=>this.onTranslate([0,1],s)),this.shortcut.bind(r,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:t}=this.context;t.on(Dt.DRAG_START,this.onDragStart),t.on(Dt.DRAG,this.onDrag),t.on(Dt.DRAG_END,this.onDragEnd)}}onTranslate(e,t){return iE(this,void 0,void 0,function*(){if(!this.validate(t))return;const{sensitivity:r}=this.options,i=r*-1;yield this.translate(ds(e,i),this.options.animation),this.invokeOnFinish()})}translate(e,t){return iE(this,void 0,void 0,function*(){e=this.clampByDirection(e),e=this.clampByRange(e),yield this.context.graph.translateBy(e,t)})}clampByDirection([e,t]){const{direction:r}=this.options;return r==="x"?t=0:r==="y"&&(e=0),[e,t]}clampByRange([e,t]){const{viewport:r,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,h]=cs(this.options.range),v=[s*o,a*l,s*u,a*h],E=Mo(Eg(r.getCanvasCenter()),v),D=Pr(r.getViewportCenter(),[e,t,0]);if(!hs(D,E)){const{min:[F,G],max:[H,K]}=E;(D[0]<F&&e>0||D[0]>H&&e<0)&&(e=0),(D[1]<G&&t>0||D[1]>K&&t<0)&&(t=0)}return[e,t]}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return typeof t=="function"?t(e):!!t}unbindEvents(){this.shortcut.unbindAll();const{graph:e}=this.context;e.off(Dt.DRAG_START,this.onDragStart),e.off(Dt.DRAG,this.onDrag),e.off(Dt.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}kf.defaultOptions={enable:n=>"targetType"in n?n.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var aE=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class gc extends La{constructor(e,t){super(e,Object.assign({},gc.defaultOptions,t)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=r=>aE(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:s}=this.context,o=r.target.id;this.target.forEach(l=>{const u=a.getParentData(l,Dr);u&&yt(u)===o&&a.refreshComboData(o),a.setParent(l,o,Dr)}),yield(i=s==null?void 0:s.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=r=>{if(this.isDragging)return;const{type:i}=r,{canvas:a}=this.context,{cursor:s}=this.options;i===Dt.POINTER_ENTER?a.setCursor((s==null?void 0:s.grab)||"grab"):a.setCursor((s==null?void 0:s.default)||"default")},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(e){this.unbindEvents(),super.update(e),this.bindEvents()}bindEvents(){const{graph:e,canvas:t}=this.context,r=t.getLayer().getContextService().$canvas;r&&(r.addEventListener("blur",this.onDragEnd),r.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{e.on(`${i}:${Dt.DRAG_START}`,this.onDragStart),e.on(`${i}:${Dt.DRAG}`,this.onDrag),e.on(`${i}:${Dt.DRAG_END}`,this.onDragEnd),e.on(`${i}:${Dt.POINTER_ENTER}`,this.setCursor),e.on(`${i}:${Dt.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(e.on(ll.DROP,this.onDrop),e.on(Xs.DROP,this.onDrop))}getSelectedNodeIDs(e){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(t=>t.id).concat(e)))}getDelta(e){const t=this.context.graph.getZoom();return vs([e.dx,e.dy],t)}onDragStart(e){var t;if(this.enable=this.validate(e),!this.enable)return;const{batch:r,canvas:i,graph:a}=this.context;i.setCursor(((t=this.options.cursor)===null||t===void 0?void 0:t.grabbing)||"grabbing"),this.isDragging=!0,r.startBatch();const s=e.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(e){if(!this.enable)return;const t=this.getDelta(e);this.options.shadow?this.moveShadow(t):this.moveElement(this.target,t)}onDragEnd(){var e,t,r;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,[l,u]=Pr([+s,+o],this.shadowOrigin);this.moveElement(this.target,[l,u])}this.showEdges(),(t=(e=this.options).onFinish)===null||t===void 0||t.call(e,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((r=this.options.cursor)===null||r===void 0?void 0:r.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}moveElement(e,t){return aE(this,void 0,void 0,function*(){const{graph:r,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&e.forEach(s=>i.refreshComboData(s)),r.translateElementBy(Object.fromEntries(e.map(s=>[s,t])),!1)})}moveShadow(e){if(!this.shadow)return;const{x:t=0,y:r=0}=this.shadow.attributes,[i,a]=e;this.shadow.attr({x:+t+i,y:+r+a})}createShadow(e){const t=mi(this.options,"shadow"),r=$u(e.map(u=>this.context.element.getElement(u).getBounds())),[i,a]=r.min;this.shadowOrigin=[i,a];const[s,o]=bo(r),l={width:s,height:o,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},t),l),{visibility:"visible"})):(this.shadow=new ki({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},t),l),{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:e,shadow:t}=this.options;if(e==="none"||t)return;const{graph:r}=this.context;e==="all"?this.hiddenEdges=r.getEdgeData().map(yt):this.hiddenEdges=Array.from(new Set(this.target.map(i=>r.getRelatedEdgesData(i,e).map(yt)).flat())),r.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:e,canvas:t}=this.context,r=t.getLayer().getContextService().$canvas;r&&(r.removeEventListener("blur",this.onDragEnd),r.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{e.off(`${i}:${Dt.DRAG_START}`,this.onDragStart),e.off(`${i}:${Dt.DRAG}`,this.onDrag),e.off(`${i}:${Dt.DRAG_END}`,this.onDragEnd),e.off(`${i}:${Dt.POINTER_ENTER}`,this.setCursor),e.off(`${i}:${Dt.POINTER_LEAVE}`,this.setCursor)}),e.off(`combo:${Dt.DROP}`,this.onDrop),e.off(`canvas:${Dt.DROP}`,this.onDrop)}destroy(){var e;this.unbindEvents(),(e=this.shadow)===null||e===void 0||e.destroy(),super.destroy()}}gc.defaultOptions={animation:!0,enable:n=>["node","combo"].includes(n.targetType),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 ER="*",xR=function(){function n(){this._events={}}return n.prototype.on=function(e,t,r){return this._events[e]||(this._events[e]=[]),this._events[e].push({callback:t,once:!!r}),this},n.prototype.once=function(e,t){return this.on(e,t,!0)},n.prototype.emit=function(e){for(var t=this,r=[],i=1;i<arguments.length;i++)r[i-1]=arguments[i];var a=this._events[e]||[],s=this._events[ER]||[],o=function(l){for(var u=l.length,h=0;h<u;h++)if(l[h]){var v=l[h],E=v.callback,D=v.once;D&&(l.splice(h,1),l.length===0&&delete t._events[e],u--,h--),E.apply(t,r)}};o(a),o(s)},n.prototype.off=function(e,t){if(!e)this._events={};else if(!t)delete this._events[e];else{for(var r=this._events[e]||[],i=r.length,a=0;a<i;a++)r[a].callback===t&&(r.splice(a,1),i--,a--);r.length===0&&delete this._events[e]}return this},n.prototype.getEvents=function(){return this._events},n}(),Ff=xR;function u0(n,e,t,r){for(;n.length;){const i=n.shift();if(t(i))return!0;e.add(i.id),r(i.id).forEach(s=>{e.has(s.id)||(e.add(s.id),n.push(s))})}return!1}function zf(n,e,t,r){if(t(n))return!0;e.add(n.id);for(const a of r(n.id))if(!e.has(a.id)&&zf(a,e,t,r))return!0;return!1}const sE=()=>!0;class bR{constructor(e){Xr(this,"graph");Xr(this,"nodeFilter");Xr(this,"edgeFilter");Xr(this,"cacheEnabled");Xr(this,"inEdgesMap",new Map);Xr(this,"outEdgesMap",new Map);Xr(this,"bothEdgesMap",new Map);Xr(this,"allNodesMap",new Map);Xr(this,"allEdgesMap",new Map);Xr(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});Xr(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(e=>e.id))});Xr(this,"updateCache",e=>{const t=new Set;e.forEach(r=>{const i=this.bothEdgesMap.get(r);if(i&&i.forEach(a=>t.add(a.id)),!this.hasNode(r))this.inEdgesMap.delete(r),this.outEdgesMap.delete(r),this.bothEdgesMap.delete(r),this.allNodesMap.delete(r);else{const a=this.graph.getRelatedEdges(r,"in").filter(this.edgeFilter),s=this.graph.getRelatedEdges(r,"out").filter(this.edgeFilter),o=Array.from(new Set([...a,...s]));o.forEach(l=>t.add(l.id)),this.inEdgesMap.set(r,a),this.outEdgesMap.set(r,s),this.bothEdgesMap.set(r,o),this.allNodesMap.set(r,this.graph.getNode(r))}}),t.forEach(r=>{this.hasEdge(r)?this.allEdgesMap.set(r,this.graph.getEdge(r)):this.allEdgesMap.delete(r)})});Xr(this,"handleGraphChanged",e=>{const t=new Set;e.changes.forEach(r=>{switch(r.type){case"NodeAdded":t.add(r.value.id);break;case"NodeDataUpdated":t.add(r.id);break;case"EdgeAdded":t.add(r.value.source),t.add(r.value.target);break;case"EdgeUpdated":(r.propertyName==="source"||r.propertyName==="target")&&(t.add(r.oldValue),t.add(r.newValue));break;case"EdgeDataUpdated":if(e.graph.hasEdge(r.id)){const i=e.graph.getEdge(r.id);t.add(i.source),t.add(i.target)}break;case"EdgeRemoved":t.add(r.value.source),t.add(r.value.target);break;case"NodeRemoved":t.add(r.value.id);break;default:break}}),this.updateCache(t)});this.graph=e.graph;const t=e.nodeFilter||sE,r=e.edgeFilter||sE;this.nodeFilter=t,this.edgeFilter=i=>{const{source:a,target:s}=this.graph.getEdgeDetail(i.id);return!t(a)||!t(s)?!1:r(i,a,s)},e.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):e.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(e){this.getNode(e)}hasNode(e){if(!this.graph.hasNode(e))return!1;const t=this.graph.getNode(e);return this.nodeFilter(t)}areNeighbors(e,t){return this.checkNodeExistence(e),this.getNeighbors(t).some(r=>r.id===e)}getNode(e){const t=this.graph.getNode(e);if(!this.nodeFilter(t))throw new Error("Node not found for id: "+e);return t}getRelatedEdges(e,t){return this.checkNodeExistence(e),this.cacheEnabled?t==="in"?this.inEdgesMap.get(e):t==="out"?this.outEdgesMap.get(e):this.bothEdgesMap.get(e):this.graph.getRelatedEdges(e,t).filter(this.edgeFilter)}getDegree(e,t){return this.getRelatedEdges(e,t).length}getSuccessors(e){const r=this.getRelatedEdges(e,"out").map(i=>this.getNode(i.target));return Array.from(new Set(r))}getPredecessors(e){const r=this.getRelatedEdges(e,"in").map(i=>this.getNode(i.source));return Array.from(new Set(r))}getNeighbors(e){const t=this.getPredecessors(e),r=this.getSuccessors(e);return Array.from(new Set([...t,...r]))}hasEdge(e){if(!this.graph.hasEdge(e))return!1;const t=this.graph.getEdge(e);return this.edgeFilter(t)}getEdge(e){const t=this.graph.getEdge(e);if(!this.edgeFilter(t))throw new Error("Edge not found for id: "+e);return t}getEdgeDetail(e){const t=this.getEdge(e);return{edge:t,source:this.getNode(t.source),target:this.getNode(t.target)}}hasTreeStructure(e){return this.graph.hasTreeStructure(e)}getRoots(e){return this.graph.getRoots(e).filter(this.nodeFilter)}getChildren(e,t){return this.checkNodeExistence(e),this.graph.getChildren(e,t).filter(this.nodeFilter)}getParent(e,t){this.checkNodeExistence(e);const r=this.graph.getParent(e,t);return!r||!this.nodeFilter(r)?null:r}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(e,t,r="out"){const i={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];u0([this.getNode(e)],new Set,t,i)}dfs(e,t,r="out"){const i={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[r];zf(this.getNode(e),new Set,t,i)}}class hi extends Ff{constructor(t){super();Xr(this,"nodeMap",new Map);Xr(this,"edgeMap",new Map);Xr(this,"inEdgesMap",new Map);Xr(this,"outEdgesMap",new Map);Xr(this,"bothEdgesMap",new Map);Xr(this,"treeIndices",new Map);Xr(this,"changes",[]);Xr(this,"batchCount",0);Xr(this,"onChanged",()=>{});Xr(this,"batch",t=>{this.batchCount+=1,t(),this.batchCount-=1,this.batchCount||this.commit()});t&&(t.nodes&&this.addNodes(t.nodes),t.edges&&this.addEdges(t.edges),t.tree&&this.addTree(t.tree),t.onChanged&&(this.onChanged=t.onChanged))}commit(){const t=this.changes;this.changes=[];const r={graph:this,changes:t};this.emit("changed",r),this.onChanged(r)}reduceChanges(t){let r=[];return t.forEach(i=>{switch(i.type){case"NodeRemoved":{let a=!1;r=r.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||r.push(i);break}case"EdgeRemoved":{let a=!1;r=r.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||r.push(i);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const a=r.findIndex(o=>o.type===i.type&&o.id===i.id&&(i.propertyName===void 0||o.propertyName===i.propertyName)),s=r[a];s?i.propertyName!==void 0?s.newValue=i.newValue:(r.splice(a,1),r.push(i)):r.push(i);break}case"TreeStructureDetached":{r=r.filter(a=>a.type==="TreeStructureAttached"||a.type==="TreeStructureChanged"?a.treeKey!==i.treeKey:!0),r.push(i);break}case"TreeStructureChanged":{const a=r.find(s=>s.type==="TreeStructureChanged"&&s.treeKey===i.treeKey&&s.nodeId===i.nodeId);a?a.newParentId=i.newParentId:r.push(i);break}default:r.push(i);break}}),r}checkNodeExistence(t){this.getNode(t)}hasNode(t){return this.nodeMap.has(t)}areNeighbors(t,r){return this.getNeighbors(r).some(i=>i.id===t)}getNode(t){const r=this.nodeMap.get(t);if(!r)throw new Error("Node not found for id: "+t);return r}getRelatedEdges(t,r){if(this.checkNodeExistence(t),r==="in"){const i=this.inEdgesMap.get(t);return Array.from(i)}else if(r==="out"){const i=this.outEdgesMap.get(t);return Array.from(i)}else{const i=this.bothEdgesMap.get(t);return Array.from(i)}}getDegree(t,r){return this.getRelatedEdges(t,r).length}getSuccessors(t){const i=this.getRelatedEdges(t,"out").map(a=>this.getNode(a.target));return Array.from(new Set(i))}getPredecessors(t){const i=this.getRelatedEdges(t,"in").map(a=>this.getNode(a.source));return Array.from(new Set(i))}getNeighbors(t){const r=this.getPredecessors(t),i=this.getSuccessors(t);return Array.from(new Set([...r,...i]))}doAddNode(t){if(this.hasNode(t.id))throw new Error("Node already exists: "+t.id);this.nodeMap.set(t.id,t),this.inEdgesMap.set(t.id,new Set),this.outEdgesMap.set(t.id,new Set),this.bothEdgesMap.set(t.id,new Set),this.treeIndices.forEach(r=>{r.childrenMap.set(t.id,new Set)}),this.changes.push({type:"NodeAdded",value:t})}addNodes(t){this.batch(()=>{for(const r of t)this.doAddNode(r)})}addNode(t){this.addNodes([t])}doRemoveNode(t){const r=this.getNode(t),i=this.bothEdgesMap.get(t);i==null||i.forEach(a=>this.doRemoveEdge(a.id)),this.nodeMap.delete(t),this.treeIndices.forEach(a=>{var o,l;(o=a.childrenMap.get(t))==null||o.forEach(u=>{a.parentMap.delete(u.id)});const s=a.parentMap.get(t);s&&((l=a.childrenMap.get(s.id))==null||l.delete(r)),a.parentMap.delete(t),a.childrenMap.delete(t)}),this.bothEdgesMap.delete(t),this.inEdgesMap.delete(t),this.outEdgesMap.delete(t),this.changes.push({type:"NodeRemoved",value:r})}removeNodes(t){this.batch(()=>{t.forEach(r=>this.doRemoveNode(r))})}removeNode(t){this.removeNodes([t])}updateNodeDataProperty(t,r,i){const a=this.getNode(t);this.batch(()=>{const s=a.data[r],o=i;a.data[r]=o,this.changes.push({type:"NodeDataUpdated",id:t,propertyName:r,oldValue:s,newValue:o})})}mergeNodeData(t,r){this.batch(()=>{Object.entries(r).forEach(([i,a])=>{this.updateNodeDataProperty(t,i,a)})})}updateNodeData(...t){const r=t[0],i=this.getNode(r);if(typeof t[1]=="string"){this.updateNodeDataProperty(r,t[1],t[2]);return}let a;if(typeof t[1]=="function"){const s=t[1];a=s(i.data)}else typeof t[1]=="object"&&(a=t[1]);this.batch(()=>{const s=i.data,o=a;i.data=a,this.changes.push({type:"NodeDataUpdated",id:r,oldValue:s,newValue:o})})}checkEdgeExistence(t){if(!this.hasEdge(t))throw new Error("Edge not found for id: "+t)}hasEdge(t){return this.edgeMap.has(t)}getEdge(t){return this.checkEdgeExistence(t),this.edgeMap.get(t)}getEdgeDetail(t){const r=this.getEdge(t);return{edge:r,source:this.getNode(r.source),target:this.getNode(r.target)}}doAddEdge(t){if(this.hasEdge(t.id))throw new Error("Edge already exists: "+t.id);this.checkNodeExistence(t.source),this.checkNodeExistence(t.target),this.edgeMap.set(t.id,t);const r=this.inEdgesMap.get(t.target),i=this.outEdgesMap.get(t.source),a=this.bothEdgesMap.get(t.source),s=this.bothEdgesMap.get(t.target);r.add(t),i.add(t),a.add(t),s.add(t),this.changes.push({type:"EdgeAdded",value:t})}addEdges(t){this.batch(()=>{for(const r of t)this.doAddEdge(r)})}addEdge(t){this.addEdges([t])}doRemoveEdge(t){const r=this.getEdge(t),i=this.outEdgesMap.get(r.source),a=this.inEdgesMap.get(r.target),s=this.bothEdgesMap.get(r.source),o=this.bothEdgesMap.get(r.target);i.delete(r),a.delete(r),s.delete(r),o.delete(r),this.edgeMap.delete(t),this.changes.push({type:"EdgeRemoved",value:r})}removeEdges(t){this.batch(()=>{t.forEach(r=>this.doRemoveEdge(r))})}removeEdge(t){this.removeEdges([t])}updateEdgeSource(t,r){const i=this.getEdge(t);this.checkNodeExistence(r);const a=i.source,s=r;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=r,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"source",oldValue:a,newValue:s})})}updateEdgeTarget(t,r){const i=this.getEdge(t);this.checkNodeExistence(r);const a=i.target,s=r;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=r,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:t,propertyName:"target",oldValue:a,newValue:s})})}updateEdgeDataProperty(t,r,i){const a=this.getEdge(t);this.batch(()=>{const s=a.data[r],o=i;a.data[r]=o,this.changes.push({type:"EdgeDataUpdated",id:t,propertyName:r,oldValue:s,newValue:o})})}updateEdgeData(...t){const r=t[0],i=this.getEdge(r);if(typeof t[1]=="string"){this.updateEdgeDataProperty(r,t[1],t[2]);return}let a;if(typeof t[1]=="function"){const s=t[1];a=s(i.data)}else typeof t[1]=="object"&&(a=t[1]);this.batch(()=>{const s=i.data,o=a;i.data=a,this.changes.push({type:"EdgeDataUpdated",id:r,oldValue:s,newValue:o})})}mergeEdgeData(t,r){this.batch(()=>{Object.entries(r).forEach(([i,a])=>{this.updateEdgeDataProperty(t,i,a)})})}checkTreeExistence(t){if(!this.hasTreeStructure(t))throw new Error("Tree structure not found for treeKey: "+t)}hasTreeStructure(t){return this.treeIndices.has(t)}attachTreeStructure(t){this.treeIndices.has(t)||(this.treeIndices.set(t,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:t})}))}detachTreeStructure(t){this.checkTreeExistence(t),this.treeIndices.delete(t),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:t})})}addTree(t,r){this.batch(()=>{this.attachTreeStructure(r);const i=[],a=Array.isArray(t)?t:[t];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(l=>{this.setParent(l.id,s.id,r)})})})}getRoots(t){return this.checkTreeExistence(t),this.getAllNodes().filter(r=>!this.getParent(r.id,t))}getChildren(t,r){this.checkNodeExistence(t),this.checkTreeExistence(r);const a=this.treeIndices.get(r).childrenMap.get(t);return Array.from(a||[])}getParent(t,r){return this.checkNodeExistence(t),this.checkTreeExistence(r),this.treeIndices.get(r).parentMap.get(t)||null}getAncestors(t,r){const i=[];let a=this.getNode(t),s;for(;s=this.getParent(a.id,r);)i.push(s),a=s;return i}setParent(t,r,i){var h,v;this.checkTreeExistence(i);const a=this.treeIndices.get(i);if(!a)return;const s=this.getNode(t),o=a.parentMap.get(t);if((o==null?void 0:o.id)===r)return;if(r==null){o&&((h=a.childrenMap.get(o.id))==null||h.delete(s)),a.parentMap.delete(t);return}const l=this.getNode(r);a.parentMap.set(t,l),o&&((v=a.childrenMap.get(o.id))==null||v.delete(s));let u=a.childrenMap.get(l.id);u||(u=new Set,a.childrenMap.set(l.id,u)),u.add(s),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:i,nodeId:t,oldParentId:o==null?void 0:o.id,newParentId:l.id})})}dfsTree(t,r,i){const a=s=>this.getChildren(s,i);return zf(this.getNode(t),new Set,r,a)}bfsTree(t,r,i){const a=s=>this.getChildren(s,i);return u0([this.getNode(t)],new Set,r,a)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(t,r,i="out"){const a={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[i];return u0([this.getNode(t)],new Set,r,a)}dfs(t,r,i="out"){const a={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[i];return zf(this.getNode(t),new Set,r,a)}clone(){const t=this.getAllNodes().map(a=>kp(xu({},a),{data:xu({},a.data)})),r=this.getAllEdges().map(a=>kp(xu({},a),{data:xu({},a.data)})),i=new hi({nodes:t,edges:r});return this.treeIndices.forEach(({parentMap:a,childrenMap:s},o)=>{const l=new Map;a.forEach((h,v)=>{l.set(v,i.getNode(h.id))});const u=new Map;s.forEach((h,v)=>{u.set(v,new Set(Array.from(h).map(E=>i.getNode(E.id))))}),i.treeIndices.set(o,{parentMap:l,childrenMap:u})}),i}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(t){return new bR(xu({graph:this},t))}}class Uf{constructor(e,t){this.context=e,this.options=t||{}}}var wR=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})},MR=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function j9(n){const{type:e}=n;return!!(["comboCombined","comboForce"].includes(e)||e==="antv-dagre"&&n.sortByCombo)}function AR(n){const{type:e}=n;return["compact-box","mindmap","dendrogram","indented"].includes(e)}function V9(n){return isNumber(n.x)&&isNumber(n.y)}function TR(n){return!Array.isArray(n)&&(n==null?void 0:n.preLayout)}function Wf(n){const{nodes:e,edges:t}=n,r={nodes:[],edges:[],combos:[]};return e.forEach(i=>{const a=i.data._isCombo?r.combos:r.nodes,{x:s,y:o,z:l=0}=i.data;a==null||a.push({id:i.id,style:{x:s,y:o,z:l}})}),t.forEach(i=>{const{id:a,source:s,target:o,data:{points:l=[],controlPoints:u=l.slice(1,l.length-1)}}=i;r.edges.push({id:a,source:s,target:o,style:Object.assign({},u!=null&&u.length?{controlPoints:u.map(Fi)}:{})})}),r}function SR(n,e){class t extends Uf{constructor(i,a){if(super(i,a),this.instance=new n({}),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 l=s.tick(o);return Wf(l)}}}execute(i,a){return wR(this,void 0,void 0,function*(){return Wf(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions(ia({},this.options,a))))})}transformOptions(i){const{onTick:a}=i;return a&&(i.onTick=s=>a(Wf(s))),i}graphData2LayoutModel(i){const{nodes:a=[],edges:s=[],combos:o=[]}=i,l=a.map(D=>{const F=yt(D),{data:G,style:H,combo:K}=D,q=MR(D,["data","style","combo"]),te={id:F,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},G),{data:G}),K?{parentId:K}:{}),{style:H}),q)};return H!=null&&H.x&&Object.assign(te.data,{x:H.x}),H!=null&&H.y&&Object.assign(te.data,{y:H.y}),H!=null&&H.z&&Object.assign(te.data,{z:H.z}),te}),u=new Map(l.map(D=>[D.id,D])),h=s.filter(D=>{const{source:F,target:G}=D;return u.has(F)&&u.has(G)}).map(D=>{const{source:F,target:G,data:H,style:K}=D;return{id:yt(D),source:F,target:G,data:Object.assign({},H),style:Object.assign({},K)}}),v=o.map(D=>({id:yt(D),data:Object.assign({_isCombo:!0},D.data),style:Object.assign({},D.style)})),E=new hi({nodes:[...l,...v],edges:h});return e.model.model.hasTreeStructure(Dr)&&(E.attachTreeStructure(Dr),l.forEach(D=>{const F=e.model.model.getParent(D.id,Dr);F&&E.hasNode(F.id)&&E.setParent(D.id,F.id,Dr)})),E}}return t}function c0(n,e,...t){if(e in n)return n[e](...t);if("instance"in n){const r=n.instance;if(e in r)return r[e](...t)}return null}function oE(n,e){if(e in n)return n[e];if("instance"in n){const t=n.instance;if(e in t)return t[e]}return null}var PR=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class OR extends gc{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(e=>["d3-force","d3-force-3d"].includes(e==null?void 0:e.id))}validate(e){return this.context.layout?this.forceLayoutInstance?super.validate(e):(xa.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(e,t){return PR(this,void 0,void 0,function*(){const r=this.forceLayoutInstance;this.context.graph.getNodeData(e).forEach((i,a)=>{const{x:s=0,y:o=0}=i.style||{};r&&c0(r,"setFixedPosition",e[a],[...zn([+s,+o],t)])})})}onDragStart(e){if(this.enable=this.validate(e),!this.enable)return;this.target=this.getSelectedNodeIDs([e.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const t=this.forceLayoutInstance;t&&oE(t,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(r=>{const{x:i=0,y:a=0}=r.style||{};t&&c0(t,"setFixedPosition",yt(r),[+i,+a])})}onDrag(e){if(!this.enable)return;const t=this.getDelta(e);this.moveElement(this.target,t)}onDragEnd(){const e=this.forceLayoutInstance;e&&oE(e,"simulation").alphaTarget(0),!this.options.fixed&&this.context.graph.getNodeData(this.target).forEach(t=>{e&&c0(e,"setFixedPosition",yt(t),[null,null,null])})}}var lE=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class Gf extends La{constructor(e,t){super(e,Object.assign({},Gf.defaultOptions,t)),this.isZoomEvent=r=>!!(r.data&&"scale"in r.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=r=>lE(this,void 0,void 0,function*(){if(!this.validate(r))return;const{graph:i}=this.context,{state:a,nodeFilter:s,edgeFilter:o,comboFilter:l}=this.options,u=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(s),h=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(o),v=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(l),E=this.isZoomEvent(r)?this.zoom=Math.max(.01,Math.min(r.data.scale,10)):this.zoom,D=[...u,...v];D.length>0&&D.forEach(F=>this.fixNodeLike(F,E)),this.updateRelatedEdges(),h.length>0&&h.forEach(F=>this.fixEdge(F,E))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(r,i,a)=>{var s;const o=this.cachedStyles.get(r)||[],l=((s=o.find(u=>u.shape===i))===null||s===void 0?void 0:s.style)||{};return a in l||(l[a]=i.attributes[a],this.cachedStyles.set(r,[...o.filter(u=>u.shape!==i),{shape:i,style:l}])),l[a]},this.scaleEntireElement=(r,i,a)=>{i.setLocalScale(1/a);const s=this.cachedStyles.get(r)||[];s.push({shape:i}),this.cachedStyles.set(r,s)},this.scaleSpecificShapes=(r,i,a)=>{const s=yD(r);(Array.isArray(a)?a:[a]).forEach(l=>{const{shape:u,fields:h}=l,v=typeof u=="function"?u(s):r.getShape(u);if(v){if(!h){this.scaleEntireElement(r.id,v,i);return}h.forEach(E=>{const D=this.getOriginalFieldValue(r.id,v,E);sn(D)&&(v.style[E]=D/i)})}})},this.skipIfExceedViewport=r=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(r.getRenderBounds(),!1,30))},this.fixNodeLike=(r,i)=>{const a=yt(r),{element:s,model:o}=this.context,l=s.getElement(a);if(!l||this.skipIfExceedViewport(l))return;o.getRelatedEdgesData(a).forEach(v=>this.relatedEdgeToUpdate.add(yt(v)));const h=this.options[l.type];if(!h){this.scaleEntireElement(a,l,i);return}this.scaleSpecificShapes(l,i,h)},this.fixEdge=(r,i)=>{const a=yt(r),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:r}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=r.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=r=>lE(this,void 0,void 0,function*(){var i;!((i=r.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(Fs(s))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(s).forEach(([o,l])=>a.style[o]=l)}})});const{graph:e,element:t}=this.context,r=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&e.getElementType(i)==="node");if(r.length>0){const i=new Set;r.forEach(a=>{e.getRelatedEdgesData(a).forEach(s=>i.add(yt(s)))}),i.forEach(a=>{const s=t==null?void 0:t.getElement(a);s==null||s.update({})})}}}bindEvents(){const{graph:e}=this.context;e.on(Zt.AFTER_DRAW,this.resetTransform),e.on(Zt.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:e}=this.context;e.off(Zt.AFTER_DRAW,this.resetTransform),e.off(Zt.AFTER_TRANSFORM,this.fixElementSize)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}destroy(){this.unbindEvents(),super.destroy()}}Gf.defaultOptions={enable:n=>n.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var CR=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class Hf extends La{constructor(e,t){super(e,Object.assign({},Hf.defaultOptions,t)),this.focus=r=>CR(this,void 0,void 0,function*(){if(!this.validate(r))return;const{graph:i}=this.context;yield i.focusElement(r.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:e}=this.context;this.unbindEvents(),dl.forEach(t=>{e.on(`${t}:${Dt.CLICK}`,this.focus)})}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;dl.forEach(t=>{e.off(`${t}:${Dt.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}Hf.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class jf extends La{constructor(e,t){super(e,Object.assign({},jf.defaultOptions,t)),this.isFrozen=!1,this.toggleFrozen=r=>{this.isFrozen=r.type==="dragstart"},this.hoverElement=r=>{if(!this.validate(r))return;const i=r.type===Dt.POINTER_ENTER;this.updateElementsState(r,i);const{onHover:a,onHoverEnd:s}=this.options;i?a==null||a(r):s==null||s(r)},this.updateElementsState=(r,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:s,animation:o,inactiveState:l}=this.options,u=this.getActiveIds(r),h={};if(s&&Object.assign(h,this.getElementsState(u,s,i)),l){const v=Y_(a.getData(),!0).filter(E=>!u.includes(E));Object.assign(h,this.getElementsState(v,l,i))}a.setElementState(h,o)},this.getElementsState=(r,i,a)=>{const{graph:s}=this.context,o={};return r.forEach(l=>{const u=s.getElementState(l);a?o[l]=u.includes(i)?u:[...u,i]:o[l]=u.filter(h=>h!==i)}),o},this.bindEvents()}bindEvents(){const{graph:e}=this.context;this.unbindEvents(),dl.forEach(r=>{e.on(`${r}:${Dt.POINTER_ENTER}`,this.hoverElement),e.on(`${r}:${Dt.POINTER_LEAVE}`,this.hoverElement)});const t=this.context.canvas.document;t.addEventListener(`${Dt.DRAG_START}`,this.toggleFrozen),t.addEventListener(`${Dt.DRAG_END}`,this.toggleFrozen)}getActiveIds(e){const{graph:t}=this.context,{degree:r,direction:i}=this.options,a=e.target.id;return r?h1(t,e.targetType,a,typeof r=="function"?r(e):r,i):[a]}validate(e){if(this.destroyed||this.isFrozen||Df(e.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}unbindEvents(){const{graph:e}=this.context;dl.forEach(r=>{e.off(`${r}:${Dt.POINTER_ENTER}`,this.hoverElement),e.off(`${r}:${Dt.POINTER_LEAVE}`,this.hoverElement)});const t=this.context.canvas.document;t.removeEventListener(`${Dt.DRAG_START}`,this.toggleFrozen),t.removeEventListener(`${Dt.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}jf.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class DR extends ac{onPointerDown(e){if(!super.validate(e)||!super.isKeydown()||this.points)return;const{canvas:t}=this.context;this.pathShape=new Oa({id:"g6-lasso-select",style:this.options.style}),t.appendChild(this.pathShape),this.points=[af(e)]}onPointerMove(e){var t;if(!this.points)return;const{immediately:r,mode:i}=this.options;this.points.push(af(e)),(t=this.pathShape)===null||t===void 0||t.setAttribute("d",dD(this.points)),r&&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 e;(e=this.pathShape)===null||e===void 0||e.remove(),this.pathShape=void 0,this.points=void 0}}class Vf extends La{constructor(e,t){super(e,Object.assign({},Vf.defaultOptions,t)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(r,i,a)=>{r.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):hl(s,i,a)})},this.filterShapes=(r,i)=>{if(fn(i))return s=>!i(r,s);const a=i==null?void 0:i[r];return s=>s.className?!(a!=null&&a.includes(s.className)):!0},this.hideShapes=r=>{if(!this.validate(r)||!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=vc(r=>{if(!this.validate(r)||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:e}=this.context;e.on(Zt.BEFORE_TRANSFORM,this.hideShapes),e.on(Zt.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:e}=this.context;e.off(Zt.BEFORE_TRANSFORM,this.hideShapes),e.off(Zt.AFTER_TRANSFORM,this.showShapes)}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Vf.defaultOptions={enable:!0,debounce:200,shapes:n=>n==="node"};var uE=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class Zf extends La{constructor(e,t){super(e,Object.assign({},Zf.defaultOptions,t)),this.onWheel=r=>uE(this,void 0,void 0,function*(){this.options.preventDefault&&r.preventDefault();const i=r.deltaX,a=r.deltaY;yield this.scroll([-i,-a],r)}),this.shortcut=new $l(e.graph),this.bindEvents()}update(e){super.update(e),this.bindEvents()}bindEvents(){var e,t;const{trigger:r}=this.options;if(this.shortcut.unbindAll(),si(r)){(e=this.graphDom)===null||e===void 0||e.removeEventListener(Dt.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:s=[],right:o=[]}=r;this.shortcut.bind(i,l=>this.scroll([0,-10],l)),this.shortcut.bind(a,l=>this.scroll([0,10],l)),this.shortcut.bind(s,l=>this.scroll([-10,0],l)),this.shortcut.bind(o,l=>this.scroll([10,0],l))}else(t=this.graphDom)===null||t===void 0||t.addEventListener(Dt.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(e){const{sensitivity:t}=this.options;return e=ds(e,t),e=this.clampByDirection(e),e=this.clampByRange(e),e}clampByDirection([e,t]){const{direction:r}=this.options;return r==="x"?t=0:r==="y"&&(e=0),[e,t]}clampByRange([e,t]){const{viewport:r,canvas:i}=this.context,[a,s]=i.getSize(),[o,l,u,h]=cs(this.options.range),v=[s*o,a*l,s*u,a*h],E=Mo(Eg(r.getCanvasCenter()),v),D=Pr(r.getViewportCenter(),[e,t,0]);if(!hs(D,E)){const{min:[F,G],max:[H,K]}=E;(D[0]<F&&e>0||D[0]>H&&e<0)&&(e=0),(D[1]<G&&t>0||D[1]>K&&t<0)&&(t=0)}return[e,t]}scroll(e,t){return uE(this,void 0,void 0,function*(){if(!this.validate(t))return;const{onFinish:r}=this.options,i=this.context.graph,a=this.formatDisplacement(e);yield i.translateBy(a,!1),r==null||r()})}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}destroy(){var e;this.shortcut.destroy(),(e=this.graphDom)===null||e===void 0||e.removeEventListener(Dt.WHEEL,this.onWheel),super.destroy()}}Zf.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var cE=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class Kf extends La{constructor(e,t){super(e,Object.assign({},Kf.defaultOptions,t)),this.zoom=(r,i,a)=>cE(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:s}=this.context;let o;"viewport"in i&&(o=Fi(i.viewport));const{sensitivity:l,onFinish:u}=this.options,h=1+Qr(r,-50,50)*l/100,v=s.getZoom();yield s.zoomTo(v*h,a,o),u==null||u()}),this.onReset=()=>cE(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=r=>{this.options.preventDefault&&r.preventDefault()},this.shortcut=new $l(e.graph),this.bindEvents()}update(e){super.update(e),this.bindEvents()}bindEvents(){const{trigger:e}=this.options;if(this.shortcut.unbindAll(),Array.isArray(e))if(e.includes(Dt.PINCH))this.shortcut.bind([Dt.PINCH],t=>{this.zoom(t.scale,t,!1)});else{const t=this.context.canvas.getContainer();t==null||t.addEventListener(Dt.WHEEL,this.preventDefault),this.shortcut.bind([...e,Dt.WHEEL],r=>{const{deltaX:i,deltaY:a}=r;this.zoom(-(a!=null?a:i),r,!1)})}if(typeof e=="object"){const{zoomIn:t=[],zoomOut:r=[],reset:i=[]}=e;this.shortcut.bind(t,a=>this.zoom(10,a,this.options.animation)),this.shortcut.bind(r,a=>this.zoom(-10,a,this.options.animation)),this.shortcut.bind(i,this.onReset)}}validate(e){if(this.destroyed)return!1;const{enable:t}=this.options;return fn(t)?t(e):!!t}destroy(){var e;this.shortcut.destroy(),(e=this.context.canvas.getContainer())===null||e===void 0||e.removeEventListener(Dt.WHEEL,this.preventDefault),super.destroy()}}Kf.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var Xf=Y(13722);const LR=(n,e)=>{if(n!=="next"&&n!=="prev")return e},hE=n=>{n.prev.next=n.next,n.next.prev=n.prev,delete n.next,delete n.prev};class RR{constructor(){const e={};e.prev=e,e.next=e.prev,this.shortcut=e}dequeue(){const e=this.shortcut,t=e.prev;if(t&&t!==e)return hE(t),t}enqueue(e){const t=this.shortcut;e.prev&&e.next&&hE(e),e.next=t.next,t.next.prev=e,t.next=e,e.prev=t}toString(){const e=[],t=this.shortcut;let r=t.prev;for(;r!==t;)e.push(JSON.stringify(r,LR)),r=r==null?void 0:r.prev;return`[${e.join(", ")}]`}}class IR extends RR{}const NR=()=>1,BR=(n,e)=>{var t;if(n.getAllNodes().length<=1)return[];const r=FR(n,e||NR);return(t=kR(r.graph,r.buckets,r.zeroIdx).map(a=>n.getRelatedEdges(a.v,"out").filter(({target:s})=>s===a.w)))===null||t===void 0?void 0:t.flat()},kR=(n,e,t)=>{let r=[];const i=e[e.length-1],a=e[0];let s;for(;n.getAllNodes().length;){for(;s=a.dequeue();)h0(n,e,t,s);for(;s=i.dequeue();)h0(n,e,t,s);if(n.getAllNodes().length){for(let o=e.length-2;o>0;--o)if(s=e[o].dequeue(),s){r=r.concat(h0(n,e,t,s,!0));break}}}return r},h0=(n,e,t,r,i)=>{var a,s;const o=[];return n.hasNode(r.v)&&((a=n.getRelatedEdges(r.v,"in"))===null||a===void 0||a.forEach(l=>{const u=l.data.weight,h=n.getNode(l.source);i&&o.push({v:l.source,w:l.target,in:0,out:0}),h.data.out===void 0&&(h.data.out=0),h.data.out-=u,f0(e,t,Object.assign({v:h.id},h.data))}),(s=n.getRelatedEdges(r.v,"out"))===null||s===void 0||s.forEach(l=>{const u=l.data.weight,h=l.target,v=n.getNode(h);v.data.in===void 0&&(v.data.in=0),v.data.in-=u,f0(e,t,Object.assign({v:v.id},v.data))}),n.removeNode(r.v)),i?o:void 0},FR=(n,e)=>{const t=new hi;let r=0,i=0;n.getAllNodes().forEach(l=>{t.addNode({id:l.id,data:{v:l.id,in:0,out:0}})}),n.getAllEdges().forEach(l=>{const u=t.getRelatedEdges(l.source,"out").find(v=>v.target===l.target),h=(e==null?void 0:e(l))||1;u?t.updateEdgeData(u==null?void 0:u.id,Object.assign(Object.assign({},u.data),{weight:u.data.weight+h})):t.addEdge({id:l.id,source:l.source,target:l.target,data:{weight:h}}),i=Math.max(i,t.getNode(l.source).data.out+=h),r=Math.max(r,t.getNode(l.target).data.in+=h)});const a=[],s=i+r+3;for(let l=0;l<s;l++)a.push(new IR);const o=r+1;return t.getAllNodes().forEach(l=>{f0(a,o,Object.assign({v:l.id},t.getNode(l.id).data))}),{buckets:a,zeroIdx:o,graph:t}},f0=(n,e,t)=>{t.out?t.in?n[t.out-t.in+e].enqueue(t):n[n.length-1].enqueue(t):n[0].enqueue(t)},zR=(n,e)=>{const r=e==="greedy"?BR(n,(i=>a=>a.data.weight||1)(n)):UR(n);r==null||r.forEach(i=>{const a=i.data;n.removeEdge(i.id),a.forwardName=i.data.name,a.reversed=!0,n.addEdge({id:i.id,source:i.target,target:i.source,data:Object.assign({},a)})})},UR=n=>{const e=[],t={},r={},i=a=>{r[a]||(r[a]=!0,t[a]=!0,n.getRelatedEdges(a,"out").forEach(s=>{t[s.target]?e.push(s):i(s.target)}),delete t[a])};return n.getAllNodes().forEach(a=>i(a.id)),e},WR=n=>{n.getAllEdges().forEach(e=>{const t=e.data;if(t.reversed){n.removeEdge(e.id);const r=t.forwardName;delete t.reversed,delete t.forwardName,n.addEdge({id:e.id,source:e.target,target:e.source,data:Object.assign(Object.assign({},t),{forwardName:r})})}})},GR=(n,e)=>Number(n)-Number(e),ru=(n,e,t,r)=>{let i;do i=`${r}${Math.random()}`;while(n.hasNode(i));return t.dummy=e,n.addNode({id:i,data:t}),i},HR=n=>{const e=new hi;return n.getAllNodes().forEach(t=>{e.addNode(Object.assign({},t))}),n.getAllEdges().forEach(t=>{const r=e.getRelatedEdges(t.source,"out").find(i=>i.target===t.target);r?e.updateEdgeData(r==null?void 0:r.id,Object.assign(Object.assign({},r.data),{weight:r.data.weight+t.data.weight||0,minlen:Math.max(r.data.minlen,t.data.minlen||1)})):e.addEdge({id:t.id,source:t.source,target:t.target,data:{weight:t.data.weight||0,minlen:t.data.minlen||1}})}),e},fE=n=>{const e=new hi;return n.getAllNodes().forEach(t=>{n.getChildren(t.id).length||e.addNode(Object.assign({},t))}),n.getAllEdges().forEach(t=>{e.addEdge(t)}),e},dE=(n,e)=>n==null?void 0:n.reduce((t,r,i)=>(t[r]=e[i],t),{}),Z9=n=>{const e={};return n.getAllNodes().forEach(t=>{const r={};n.getRelatedEdges(t.id,"out").forEach(i=>{r[i.target]=(r[i.target]||0)+(i.data.weight||0)}),e[t.id]=r}),e},K9=n=>{const e=n.getAllNodes(),t=e.map(r=>{const i={};return n.getRelatedEdges(r.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return dE(e.map(r=>r.id),t)},vE=(n,e)=>{const t=Number(n.x),r=Number(n.y),i=Number(e.x)-t,a=Number(e.y)-r;let s=Number(n.width)/2,o=Number(n.height)/2;if(!i&&!a)return{x:0,y:0};let l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=o*i/a,u=o):(i<0&&(s=-s),l=s,u=s*a/i),{x:t+l,y:r+u}},pc=n=>{const e=[],t=pE(n)+1;for(let r=0;r<t;r++)e.push([]);n.getAllNodes().forEach(r=>{const i=r.data.rank;i!==void 0&&e[i]&&e[i].push(r.id)});for(let r=0;r<t;r++)e[r]=e[r].sort((i,a)=>GR(n.getNode(i).data.order,n.getNode(a).data.order));return e},jR=n=>{const e=n.getAllNodes().filter(r=>r.data.rank!==void 0).map(r=>r.data.rank),t=Math.min(...e);n.getAllNodes().forEach(r=>{r.data.hasOwnProperty("rank")&&t!==1/0&&(r.data.rank-=t)})},VR=(n,e=0)=>{const t=n.getAllNodes(),r=t.filter(o=>o.data.rank!==void 0).map(o=>o.data.rank),i=Math.min(...r),a=[];t.forEach(o=>{const l=(o.data.rank||0)-i;a[l]||(a[l]=[]),a[l].push(o.id)});let s=0;for(let o=0;o<a.length;o++){const l=a[o];l===void 0?o%e!==0&&(s-=1):s&&(l==null||l.forEach(u=>{const h=n.getNode(u);h&&(h.data.rank=h.data.rank||0,h.data.rank+=s)}))}},gE=(n,e,t,r)=>{const i={width:0,height:0};return sn(t)&&sn(r)&&(i.rank=t,i.order=r),ru(n,"border",i,e)},pE=n=>{let e;return n.getAllNodes().forEach(t=>{const r=t.data.rank;r!==void 0&&(e===void 0||r>e)&&(e=r)}),e||(e=0),e},ZR=(n,e)=>{const t={lhs:[],rhs:[]};return n==null||n.forEach(r=>{e(r)?t.lhs.push(r):t.rhs.push(r)}),t},d0=(n,e)=>n.reduce((t,r)=>{const i=e(t),a=e(r);return i>a?r:t}),mE=(n,e,t,r,i,a)=>{r.includes(e.id)||(r.push(e.id),t||a.push(e.id),i(e.id).forEach(s=>mE(n,s,t,r,i,a)),t&&a.push(e.id))},yE=(n,e,t,r)=>{const i=Array.isArray(e)?e:[e],a=l=>r?n.getSuccessors(l):n.getNeighbors(l),s=[],o=[];return i.forEach(l=>{if(n.hasNode(l.id))mE(n,l,t==="post",o,a,s);else throw new Error(`Graph does not have node: ${l}`)}),s},KR=n=>{const e=t=>{const r=n.getChildren(t),i=n.getNode(t);if(r!=null&&r.length&&r.forEach(a=>e(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)_E(n,"borderLeft","_bl",t,i,a),_E(n,"borderRight","_br",t,i,a)}};n.getRoots().forEach(t=>e(t.id))},_E=(n,e,t,r,i,a)=>{const s={rank:a,borderType:e,width:0,height:0},o=i.data[e][a-1],l=ru(n,"border",s,t);i.data[e][a]=l,n.setParent(l,r),o&&n.addEdge({id:`e${Math.random()}`,source:o,target:l,data:{weight:1}})},XR=(n,e)=>{const t=e.toLowerCase();(t==="lr"||t==="rl")&&EE(n)},YR=(n,e)=>{const t=e.toLowerCase();(t==="bt"||t==="rl")&&QR(n),(t==="lr"||t==="rl")&&(JR(n),EE(n))},EE=n=>{n.getAllNodes().forEach(e=>{xE(e)}),n.getAllEdges().forEach(e=>{xE(e)})},xE=n=>{const e=n.data.width;n.data.width=n.data.height,n.data.height=e},QR=n=>{n.getAllNodes().forEach(e=>{v0(e.data)}),n.getAllEdges().forEach(e=>{var t;(t=e.data.points)===null||t===void 0||t.forEach(r=>v0(r)),e.data.hasOwnProperty("y")&&v0(e.data)})},v0=n=>{n!=null&&n.y&&(n.y=-n.y)},JR=n=>{n.getAllNodes().forEach(e=>{g0(e.data)}),n.getAllEdges().forEach(e=>{var t;(t=e.data.points)===null||t===void 0||t.forEach(r=>g0(r)),e.data.hasOwnProperty("x")&&g0(e.data)})},g0=n=>{const e=n.x;n.x=n.y,n.y=e},qR=n=>{const e=ru(n,"root",{},"_root"),t=$R(n);let r=Math.max(...Object.values(t));Math.abs(r)===1/0&&(r=1);const i=r-1,a=2*i+1;n.getAllEdges().forEach(o=>{o.data.minlen*=a});const s=e3(n)+1;return n.getRoots().forEach(o=>{bE(n,e,a,s,i,t,o.id)}),{nestingRoot:e,nodeRankFactor:a}},bE=(n,e,t,r,i,a,s)=>{const o=n.getChildren(s);if(!(o!=null&&o.length)){s!==e&&n.addEdge({id:`e${Math.random()}`,source:e,target:s,data:{weight:0,minlen:t}});return}const l=gE(n,"_bt"),u=gE(n,"_bb"),h=n.getNode(s);n.setParent(l,s),h.data.borderTop=l,n.setParent(u,s),h.data.borderBottom=u,o==null||o.forEach(v=>{bE(n,e,t,r,i,a,v.id);const E=v.data.borderTop?v.data.borderTop:v.id,D=v.data.borderBottom?v.data.borderBottom:v.id,F=v.data.borderTop?r:2*r,G=E!==D?1:i-a[s]+1;n.addEdge({id:`e${Math.random()}`,source:l,target:E,data:{minlen:G,weight:F,nestingEdge:!0}}),n.addEdge({id:`e${Math.random()}`,source:D,target:u,data:{minlen:G,weight:F,nestingEdge:!0}})}),n.getParent(s)||n.addEdge({id:`e${Math.random()}`,source:e,target:l,data:{weight:0,minlen:i+a[s]}})},$R=n=>{const e={},t=(r,i)=>{const a=n.getChildren(r);a==null||a.forEach(s=>t(s.id,i+1)),e[r]=i};return n.getRoots().forEach(r=>t(r.id,1)),e},e3=n=>{let e=0;return n.getAllEdges().forEach(t=>{e+=t.data.weight}),e},t3=(n,e)=>{e&&n.removeNode(e),n.getAllEdges().forEach(t=>{t.data.nestingEdge&&n.removeEdge(t.id)})},n3="edge",wE="edge-label",r3=(n,e)=>{n.getAllEdges().forEach(t=>i3(n,t,e))},i3=(n,e,t)=>{let r=e.source,i=n.getNode(r).data.rank;const a=e.target,s=n.getNode(a).data.rank,o=e.data.labelRank;if(s===i+1)return;n.removeEdge(e.id);let l,u,h;for(h=0,++i;i<s;++h,++i)e.data.points=[],u={originalEdge:e,width:0,height:0,rank:i},l=ru(n,n3,u,"_d"),i===o&&(u.width=e.data.width,u.height=e.data.height,u.dummy=wE,u.labelpos=e.data.labelpos),n.addEdge({id:`e${Math.random()}`,source:r,target:l,data:{weight:e.data.weight}}),h===0&&t.push(l),r=l;n.addEdge({id:`e${Math.random()}`,source:r,target:a,data:{weight:e.data.weight}})},a3=(n,e)=>{e.forEach(t=>{let r=n.getNode(t);const{data:i}=r,a=i.originalEdge;let s;a&&n.addEdge(a);let o=t;for(;r.data.dummy;)s=n.getSuccessors(o)[0],n.removeNode(o),a.data.points.push({x:r.data.x,y:r.data.y}),r.data.dummy===wE&&(a.data.x=r.data.x,a.data.y=r.data.y,a.data.width=r.data.width,a.data.height=r.data.height),o=s.id,r=n.getNode(o)})},s3=(n,e,t)=>{const r={};let i;t==null||t.forEach(a=>{let s=n.getParent(a),o,l;for(;s;){if(o=n.getParent(s.id),o?(l=r[o.id],r[o.id]=s.id):(l=i,i=s.id),l&&l!==s.id){e.hasNode(l)||e.addNode({id:l,data:{}}),e.hasNode(s.id)||e.addNode({id:s.id,data:{}}),e.hasEdge(`e${l}-${s.id}`)||e.addEdge({id:`e${l}-${s.id}`,source:l,target:s.id,data:{}});return}s=o}})},o3=(n,e,t)=>{const r=l3(n),i=new hi({tree:[{id:r,children:[],data:{}}]});return n.getAllNodes().forEach(a=>{const s=n.getParent(a.id);(a.data.rank===e||a.data.minRank<=e&&e<=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)||r),n.getRelatedEdges(a.id,t).forEach(o=>{const l=o.source===a.id?o.target:o.source;i.hasNode(l)||i.addNode(Object.assign({},n.getNode(l)));const u=i.getRelatedEdges(l,"out").find(({target:v})=>v===a.id),h=u!==void 0?u.data.weight:0;u?i.updateEdgeData(u.id,Object.assign(Object.assign({},u.data),{weight:o.data.weight+h})):i.addEdge({id:o.id,source:l,target:a.id,data:{weight:o.data.weight+h}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[e],borderRight:a.data.borderRight[e]})))}),i},l3=n=>{let e;for(;n.hasNode(e=`_root${Math.random()}`););return e},u3=(n,e,t)=>{const r=dE(t,t.map((h,v)=>v)),a=e.map(h=>{const v=n.getRelatedEdges(h,"out").map(E=>({pos:r[E.target]||0,weight:E.data.weight}));return v==null?void 0:v.sort((E,D)=>E.pos-D.pos)}).flat().filter(h=>h!==void 0);let s=1;for(;s<t.length;)s<<=1;const o=2*s-1;s-=1;const l=Array(o).fill(0,0,o);let u=0;return a==null||a.forEach(h=>{if(h){let v=h.pos+s;l[v]+=h.weight;let E=0;for(;v>0;)v%2&&(E+=l[v+1]),v=v-1>>1,l[v]+=h.weight;u+=h.weight*E}}),u},ME=(n,e)=>{let t=0;for(let r=1;r<(e==null?void 0:e.length);r+=1)t+=u3(n,e[r-1],e[r]);return t},AE=n=>{const e={},t=n.getAllNodes(),r=t.map(u=>{var h;return(h=u.data.rank)!==null&&h!==void 0?h:-1/0}),i=Math.max(...r),a=[];for(let u=0;u<i+1;u++)a.push([]);const s=t.sort((u,h)=>n.getNode(u.id).data.rank-n.getNode(h.id).data.rank),l=s.filter(u=>n.getNode(u.id).data.fixorder!==void 0).sort((u,h)=>n.getNode(u.id).data.fixorder-n.getNode(h.id).data.fixorder);return l==null||l.forEach(u=>{isNaN(n.getNode(u.id).data.rank)||a[n.getNode(u.id).data.rank].push(u.id),e[u.id]=!0}),s==null||s.forEach(u=>n.dfsTree(u.id,h=>{if(e.hasOwnProperty(h.id))return!0;e[h.id]=!0,isNaN(h.data.rank)||a[h.data.rank].push(h.id)})),a},c3=(n,e)=>e.map(t=>{const r=n.getRelatedEdges(t,"in");if(!(r!=null&&r.length))return{v:t};const i={sum:0,weight:0};return r==null||r.forEach(a=>{const s=n.getNode(a.source);i.sum+=a.data.weight*s.data.order,i.weight+=a.data.weight}),{v:t,barycenter:i.sum/i.weight,weight:i.weight}}),h3=(n,e)=>{var t,r,i;const a={};n==null||n.forEach((o,l)=>{a[o.v]={i:l,indegree:0,in:[],out:[],vs:[o.v]};const u=a[o.v];o.barycenter!==void 0&&(u.barycenter=o.barycenter,u.weight=o.weight)}),(t=e.getAllEdges())===null||t===void 0||t.forEach(o=>{const l=a[o.source],u=a[o.target];l!==void 0&&u!==void 0&&(u.indegree++,l.out.push(a[o.target]))});const s=(i=(r=Object.values(a)).filter)===null||i===void 0?void 0:i.call(r,o=>!o.indegree);return f3(s)},f3=n=>{var e,t;const r=[],i=l=>u=>{u.merged||(u.barycenter===void 0||l.barycenter===void 0||u.barycenter>=l.barycenter)&&d3(l,u)},a=l=>u=>{u.in.push(l),--u.indegree===0&&n.push(u)};for(;n!=null&&n.length;){const l=n.pop();r.push(l),(e=l.in.reverse())===null||e===void 0||e.forEach(u=>i(l)(u)),(t=l.out)===null||t===void 0||t.forEach(u=>a(l)(u))}const s=r.filter(l=>!l.merged),o=["vs","i","barycenter","weight"];return s.map(l=>{const u={};return o==null||o.forEach(h=>{l[h]!==void 0&&(u[h]=l[h])}),u})},d3=(n,e)=>{var t;let r=0,i=0;n.weight&&(r+=n.barycenter*n.weight,i+=n.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),n.vs=(t=e.vs)===null||t===void 0?void 0:t.concat(n.vs),n.barycenter=r/i,n.weight=i,n.i=Math.min(e.i,n.i),e.merged=!0};var v3=h3;const g3=(n,e,t,r)=>{const i=ZR(n,E=>{const D=E.hasOwnProperty("fixorder")&&!isNaN(E.fixorder);return r?!D&&E.hasOwnProperty("barycenter"):D||E.hasOwnProperty("barycenter")}),a=i.lhs,s=i.rhs.sort((E,D)=>-E.i- -D.i),o=[];let l=0,u=0,h=0;a==null||a.sort(p3(!!e,!!t)),h=TE(o,s,h),a==null||a.forEach(E=>{var D;h+=(D=E.vs)===null||D===void 0?void 0:D.length,o.push(E.vs),l+=E.barycenter*E.weight,u+=E.weight,h=TE(o,s,h)});const v={vs:o.flat()};return u&&(v.barycenter=l/u,v.weight=u),v},TE=(n,e,t)=>{let r=t,i;for(;e.length&&(i=e[e.length-1]).i<=r;)e.pop(),n==null||n.push(i.vs),r++;return r},p3=(n,e)=>(t,r)=>{if(t.fixorder!==void 0&&r.fixorder!==void 0)return t.fixorder-r.fixorder;if(t.barycenter<r.barycenter)return-1;if(t.barycenter>r.barycenter)return 1;if(e&&t.order!==void 0&&r.order!==void 0){if(t.order<r.order)return-1;if(t.order>r.order)return 1}return n?r.i-t.i:t.i-r.i},SE=(n,e,t,r,i,a)=>{var s,o,l,u;let h=n.getChildren(e).map(q=>q.id);const v=n.getNode(e),E=v?v.data.borderLeft:void 0,D=v?v.data.borderRight:void 0,F={};E&&(h=h==null?void 0:h.filter(q=>q!==E&&q!==D));const G=c3(n,h||[]);G==null||G.forEach(q=>{var te;if(!((te=n.getChildren(q.v))===null||te===void 0)&&te.length){const ue=SE(n,q.v,t,r,a);F[q.v]=ue,ue.hasOwnProperty("barycenter")&&y3(q,ue)}});const H=v3(G,t);m3(H,F),(s=H.filter(q=>q.vs.length>0))===null||s===void 0||s.forEach(q=>{const te=n.getNode(q.vs[0]);te&&(q.fixorder=te.data.fixorder,q.order=te.data.order)});const K=g3(H,r,i,a);if(E&&(K.vs=[E,K.vs,D].flat(),!((o=n.getPredecessors(E))===null||o===void 0)&&o.length)){const q=n.getNode(((l=n.getPredecessors(E))===null||l===void 0?void 0:l[0].id)||""),te=n.getNode(((u=n.getPredecessors(D))===null||u===void 0?void 0:u[0].id)||"");K.hasOwnProperty("barycenter")||(K.barycenter=0,K.weight=0),K.barycenter=(K.barycenter*K.weight+q.data.order+te.data.order)/(K.weight+2),K.weight+=2}return K},m3=(n,e)=>{n==null||n.forEach(t=>{var r;const i=(r=t.vs)===null||r===void 0?void 0:r.map(a=>e[a]?e[a].vs:a);t.vs=i.flat()})},y3=(n,e)=>{n.barycenter!==void 0?(n.barycenter=(n.barycenter*n.weight+e.barycenter*e.weight)/(n.weight+e.weight),n.weight+=e.weight):(n.barycenter=e.barycenter,n.weight=e.weight)},_3=(n,e)=>{const t=pE(n),r=[],i=[];for(let h=1;h<t+1;h++)r.push(h);for(let h=t-1;h>-1;h--)i.push(h);const a=PE(n,r,"in"),s=PE(n,i,"out");let o=AE(n);p0(n,o);let l=Number.POSITIVE_INFINITY,u;for(let h=0,v=0;v<4;++h,++v){OE(h%2?a:s,h%4>=2,!1,e),o=pc(n);const E=ME(n,o);E<l&&(v=0,u=Ql(o),l=E)}o=AE(n),p0(n,o);for(let h=0,v=0;v<4;++h,++v){OE(h%2?a:s,h%4>=2,!0,e),o=pc(n);const E=ME(n,o);E<l&&(v=0,u=Ql(o),l=E)}p0(n,u)},PE=(n,e,t)=>e.map(r=>o3(n,r,t)),OE=(n,e,t,r)=>{const i=new hi;n==null||n.forEach(a=>{var s;const o=a.getRoots()[0].id,l=SE(a,o,i,e,t,r);for(let u=0;u<((s=l.vs)===null||s===void 0?void 0:s.length);u++){const h=a.getNode(l.vs[u]);h&&(h.data.order=u)}s3(a,i,l.vs)})},p0=(n,e)=>{e==null||e.forEach(t=>{t==null||t.forEach((r,i)=>{n.getNode(r).data.order=i})})},E3=(n,e)=>{const r=n.getAllNodes().filter(s=>{var o;return!(!((o=n.getChildren(s.id))===null||o===void 0)&&o.length)}).map(s=>s.data.rank),i=Math.max(...r),a=[];for(let s=0;s<i+1;s++)a[s]=[];e==null||e.forEach(s=>{const o=n.getNode(s);!o||o.data.dummy||isNaN(o.data.rank)||(o.data.fixorder=a[o.data.rank].length,a[o.data.rank].push(s))})},x3=n=>{const e={};let t=0;const r=i=>{const a=t;n.getChildren(i).forEach(s=>r(s.id)),e[i]={low:a,lim:t++}};return n.getRoots().forEach(i=>r(i.id)),e},b3=(n,e,t,r)=>{var i,a;const s=[],o=[],l=Math.min(e[t].low,e[r].low),u=Math.max(e[t].lim,e[r].lim);let h,v;h=t;do h=(i=n.getParent(h))===null||i===void 0?void 0:i.id,s.push(h);while(h&&(e[h].low>l||u>e[h].lim));for(v=h,h=r;h&&h!==v;)o.push(h),h=(a=n.getParent(h))===null||a===void 0?void 0:a.id;return{lca:v,path:s.concat(o.reverse())}},w3=(n,e)=>{const t=x3(n);e.forEach(r=>{var i,a;let s=r,o=n.getNode(s);const l=o.data.originalEdge;if(!l)return;const u=b3(n,t,l.source,l.target),h=u.path,v=u.lca;let E=0,D=h[E],F=!0;for(;s!==l.target;){if(o=n.getNode(s),F){for(;D!==v&&((i=n.getNode(D))===null||i===void 0?void 0:i.data.maxRank)<o.data.rank;)E++,D=h[E];D===v&&(F=!1)}if(!F){for(;E<h.length-1&&((a=n.getNode(h[E+1]))===null||a===void 0?void 0:a.data.minRank)<=o.data.rank;)E++;D=h[E]}n.hasNode(D)&&n.setParent(s,D),s=n.getSuccessors(s)[0].id}})},CE=(n,e)=>{const t={},r=(i,a)=>{let s=0,o=0;const l=i.length,u=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((h,v)=>{var E;const D=M3(n,h),F=D?n.getNode(D.id).data.order:l;(D||h===u)&&((E=a.slice(o,v+1))===null||E===void 0||E.forEach(G=>{var H;(H=n.getPredecessors(G))===null||H===void 0||H.forEach(K=>{var q;const te=n.getNode(K.id),ue=te.data.order;(ue<s||F<ue)&&!(te.data.dummy&&(!((q=n.getNode(G))===null||q===void 0)&&q.data.dummy))&&LE(t,K.id,G)})}),o=v+1,s=F)}),a};return e!=null&&e.length&&e.reduce(r),t},DE=(n,e)=>{const t={};function r(o,l,u,h,v){var E,D;let F;for(let G=l;G<u;G++)F=o[G],!((E=n.getNode(F))===null||E===void 0)&&E.data.dummy&&((D=n.getPredecessors(F))===null||D===void 0||D.forEach(H=>{const K=n.getNode(H.id);K.data.dummy&&(K.data.order<h||K.data.order>v)&&LE(t,H.id,F)}))}function i(o){return JSON.stringify(o.slice(1))}function a(o,l){const u=i(o);l.get(u)||(r(...o),l.set(u,!0))}const s=(o,l)=>{let u=-1,h,v=0;const E=new Map;return l==null||l.forEach((D,F)=>{var G;if(((G=n.getNode(D))===null||G===void 0?void 0:G.data.dummy)==="border"){const H=n.getPredecessors(D)||[];H.length&&(h=n.getNode(H[0].id).data.order,a([l,v,F,u,h],E),v=F,u=h)}a([l,v,l.length,h,o.length],E)}),l};return e!=null&&e.length&&e.reduce(s),t},M3=(n,e)=>{var t,r;if(!((t=n.getNode(e))===null||t===void 0)&&t.data.dummy)return(r=n.getPredecessors(e))===null||r===void 0?void 0:r.find(i=>n.getNode(i.id).data.dummy)},LE=(n,e,t)=>{let r=e,i=t;if(r>i){const s=r;r=i,i=s}let a=n[r];a||(n[r]=a={}),a[i]=!0},A3=(n,e,t)=>{let r=e,i=t;if(r>i){const a=e;r=i,i=a}return!!n[r]},RE=(n,e,t,r)=>{const i={},a={},s={};return e==null||e.forEach(o=>{o==null||o.forEach((l,u)=>{i[l]=l,a[l]=l,s[l]=u})}),e==null||e.forEach(o=>{let l=-1;o==null||o.forEach(u=>{let h=r(u).map(v=>v.id);if(h.length){h=h.sort((E,D)=>s[E]-s[D]);const v=(h.length-1)/2;for(let E=Math.floor(v),D=Math.ceil(v);E<=D;++E){const F=h[E];a[u]===u&&l<s[F]&&!A3(t,u,F)&&(a[F]=u,a[u]=i[u]=i[F],l=s[F])}}})}),{root:i,align:a}},IE=(n,e,t,r,i,a,s)=>{var o;const l={},u=T3(n,e,t,i,a,s),h=s?"borderLeft":"borderRight",v=(F,G)=>{let H=u.getAllNodes(),K=H.pop();const q={};for(;K;)q[K.id]?F(K.id):(q[K.id]=!0,H.push(K),H=H.concat(G(K.id))),K=H.pop()},E=F=>{l[F]=(u.getRelatedEdges(F,"in")||[]).reduce((G,H)=>Math.max(G,(l[H.source]||0)+H.data.weight),0)},D=F=>{const G=(u.getRelatedEdges(F,"out")||[]).reduce((K,q)=>Math.min(K,(l[q.target]||0)-q.data.weight),Number.POSITIVE_INFINITY),H=n.getNode(F);G!==Number.POSITIVE_INFINITY&&H.data.borderType!==h&&(l[F]=Math.max(l[F],G))};return v(E,u.getPredecessors.bind(u)),v(D,u.getSuccessors.bind(u)),(o=Object.values(r))===null||o===void 0||o.forEach(F=>{l[F]=l[t[F]]}),l},T3=(n,e,t,r,i,a)=>{const s=new hi,o=S3(r,i,a);return e==null||e.forEach(l=>{let u;l==null||l.forEach(h=>{const v=t[h];if(s.hasNode(v)||s.addNode({id:v,data:{}}),u){const E=t[u],D=s.getRelatedEdges(E,"out").find(F=>F.target===v);D?s.updateEdgeData(D.id,Object.assign(Object.assign({},D.data),{weight:Math.max(o(n,h,u),D.data.weight||0)})):s.addEdge({id:`e${Math.random()}`,source:E,target:v,data:{weight:Math.max(o(n,h,u),0)}})}u=h})}),s},NE=(n,e)=>d0(Object.values(e),t=>{var r;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(r=Object.keys(t))===null||r===void 0||r.forEach(s=>{const o=t[s],l=P3(n,s)/2;i=Math.max(o+l,i),a=Math.min(o-l,a)}),i-a});function BE(n,e){const t=Object.values(e),r=Math.min(...t),i=Math.max(...t);["u","d"].forEach(a=>{["l","r"].forEach(s=>{const o=a+s,l=n[o];let u;if(l===e)return;const h=Object.values(l);u=s==="l"?r-Math.min(...h):i-Math.max(...h),u&&(n[o]={},Object.keys(l).forEach(v=>{n[o][v]=l[v]+u}))})})}const kE=(n,e)=>{const t={};return Object.keys(n.ul).forEach(r=>{if(e)t[r]=n[e.toLowerCase()][r];else{const i=Object.values(n).map(a=>a[r]);t[r]=(i[0]+i[1])/2}}),t},X9=(n,e)=>{const{align:t,nodesep:r=0,edgesep:i=0}=e||{},a=buildLayerMatrix(n),s=Object.assign(CE(n,a),DE(n,a)),o={};let l;["u","d"].forEach(h=>{l=h==="u"?a:Object.values(a).reverse(),["l","r"].forEach(v=>{v==="r"&&(l=l.map(G=>Object.values(G).reverse()));const E=(h==="u"?n.getPredecessors:n.getSuccessors).bind(n),D=RE(n,l,s,E),F=IE(n,l,D.root,D.align,r,i,v==="r");v==="r"&&Object.keys(F).forEach(G=>{F[G]=-F[G]}),o[h+v]=F})});const u=NE(n,o);return BE(o,u),kE(o,t)},S3=(n,e,t)=>(r,i,a)=>{const s=r.getNode(i),o=r.getNode(a);let l=0,u=0;if(l+=s.data.width/2,s.data.hasOwnProperty("labelpos"))switch((s.data.labelpos||"").toLowerCase()){case"l":u=-s.data.width/2;break;case"r":u=s.data.width/2;break}if(u&&(l+=t?u:-u),u=0,l+=(s.data.dummy?e:n)/2,l+=(o.data.dummy?e:n)/2,l+=o.data.width/2,o.data.labelpos)switch((o.data.labelpos||"").toLowerCase()){case"l":u=o.data.width/2;break;case"r":u=-o.data.width/2;break}return u&&(l+=t?u:-u),u=0,l},P3=(n,e)=>n.getNode(e).data.width||0,O3=(n,e)=>{const{ranksep:t=0}=e||{},r=pc(n);let i=0;r==null||r.forEach(a=>{const s=a.map(l=>n.getNode(l).data.height),o=Math.max(...s,0);a==null||a.forEach(l=>{n.getNode(l).data.y=i+o/2}),i+=o+t})},C3=(n,e)=>{const{align:t,nodesep:r=0,edgesep:i=0}=e||{},a=pc(n),s=Object.assign(CE(n,a),DE(n,a)),o={};let l=[];["u","d"].forEach(h=>{l=h==="u"?a:Object.values(a).reverse(),["l","r"].forEach(v=>{v==="r"&&(l=l.map(G=>Object.values(G).reverse()));const E=(h==="u"?n.getPredecessors:n.getSuccessors).bind(n),D=RE(n,l,s,E),F=IE(n,l,D.root,D.align,r,i,v==="r");v==="r"&&Object.keys(F).forEach(G=>F[G]=-F[G]),o[h+v]=F})});const u=NE(n,o);return u&&BE(o,u),kE(o,t)},D3=(n,e)=>{var t;const r=fE(n);O3(r,e);const i=C3(r,e);(t=Object.keys(i))===null||t===void 0||t.forEach(a=>{r.getNode(a).data.x=i[a]})},FE=n=>{const e={},t=r=>{var i;const a=n.getNode(r);if(!a)return 0;if(e[r])return a.data.rank;e[r]=!0;let s;return(i=n.getRelatedEdges(r,"out"))===null||i===void 0||i.forEach(o=>{const l=t(o.target),u=o.data.minlen,h=l-u;h&&(s===void 0||h<s)&&(s=h)}),s||(s=0),a.data.rank=s,s};n.getAllNodes().filter(r=>n.getRelatedEdges(r.id,"in").length===0).forEach(r=>t(r.id))},L3=n=>{const e={};let t;const r=s=>{var o;const l=n.getNode(s);if(!l)return 0;if(e[s])return l.data.rank;e[s]=!0;let u;return(o=n.getRelatedEdges(s,"out"))===null||o===void 0||o.forEach(h=>{const v=r(h.target),E=h.data.minlen,D=v-E;D&&(u===void 0||D<u)&&(u=D)}),u||(u=0),(t===void 0||u<t)&&(t=u),l.data.rank=u,u};n.getAllNodes().filter(s=>n.getRelatedEdges(s.id,"in").length===0).forEach(s=>{s&&r(s.id)}),t===void 0&&(t=0);const i={},a=(s,o)=>{var l;const u=n.getNode(s),h=isNaN(u.data.layer)?o:u.data.layer;(u.data.rank===void 0||u.data.rank<h)&&(u.data.rank=h),!i[s]&&(i[s]=!0,(l=n.getRelatedEdges(s,"out"))===null||l===void 0||l.forEach(v=>{a(v.target,h+v.data.minlen)}))};n.getAllNodes().forEach(s=>{const o=s.data;o&&(isNaN(o.layer)?o.rank-=t:a(s.id,o.layer))})},Lo=(n,e)=>n.getNode(e.target).data.rank-n.getNode(e.source).data.rank-e.data.minlen,R3=n=>{const e=new hi({tree:[]}),t=n.getAllNodes()[0],r=n.getAllNodes().length;e.addNode(t);let i,a;for(;I3(e,n)<r;)i=zE(e,n),a=e.hasNode(i.source)?Lo(n,i):-Lo(n,i),UE(e,n,a);return e},I3=(n,e)=>{const t=r=>{e.getRelatedEdges(r,"both").forEach(i=>{const a=i.source,s=r===a?i.target:a;!n.hasNode(s)&&!Lo(e,i)&&(n.addNode({id:s,data:{}}),n.addEdge({id:i.id,source:r,target:s,data:{}}),t(s))})};return n.getAllNodes().forEach(r=>t(r.id)),n.getAllNodes().length},N3=n=>{const e=new hi({tree:[]}),t=n.getAllNodes()[0],r=n.getAllNodes().length;e.addNode(t);let i,a;for(;B3(e,n)<r;)i=zE(e,n),a=e.hasNode(i.source)?Lo(n,i):-Lo(n,i),UE(e,n,a);return e},B3=(n,e)=>{const t=r=>{var i;(i=e.getRelatedEdges(r,"both"))===null||i===void 0||i.forEach(a=>{const s=a.source,o=r===s?a.target:s;!n.hasNode(o)&&(e.getNode(o).data.layer!==void 0||!Lo(e,a))&&(n.addNode({id:o,data:{}}),n.addEdge({id:a.id,source:r,target:o,data:{}}),t(o))})};return n.getAllNodes().forEach(r=>t(r.id)),n.getAllNodes().length},zE=(n,e)=>d0(e.getAllEdges(),t=>n.hasNode(t.source)!==n.hasNode(t.target)?Lo(e,t):1/0),UE=(n,e,t)=>{n.getAllNodes().forEach(r=>{const i=e.getNode(r.id);i.data.rank||(i.data.rank=0),i.data.rank+=t})},k3=n=>{const e=HR(n);FE(e);const t=R3(e);GE(t),WE(t,e);let r,i;for(;r=U3(t);)i=W3(t,e,r),G3(t,e,r,i)},WE=(n,e)=>{let t=yE(n,n.getAllNodes(),"post",!1);t=t.slice(0,(t==null?void 0:t.length)-1),t.forEach(r=>{F3(n,e,r)})},F3=(n,e,t)=>{const i=n.getNode(t).data.parent,a=n.getRelatedEdges(t,"both").find(s=>s.target===i||s.source===i);a.data.cutvalue=z3(n,e,t)},z3=(n,e,t)=>{const i=n.getNode(t).data.parent;let a=!0,s=e.getRelatedEdges(t,"out").find(l=>l.target===i),o=0;return s||(a=!1,s=e.getRelatedEdges(i,"out").find(l=>l.target===t)),o=s.data.weight,e.getRelatedEdges(t,"both").forEach(l=>{const u=l.source===t,h=u?l.target:l.source;if(h!==i){const v=u===a,E=l.data.weight;if(o+=v?E:-E,j3(n,t,h)){const D=n.getRelatedEdges(t,"both").find(F=>F.source===h||F.target===h).data.cutvalue;o+=v?-D:D}}}),o},GE=(n,e=n.getAllNodes()[0].id)=>{HE(n,{},1,e)},HE=(n,e,t,r,i)=>{var a;const s=t;let o=t;const l=n.getNode(r);return e[r]=!0,(a=n.getNeighbors(r))===null||a===void 0||a.forEach(u=>{e[u.id]||(o=HE(n,e,o,u.id,r))}),l.data.low=s,l.data.lim=o++,i?l.data.parent=i:delete l.data.parent,o},U3=n=>n.getAllEdges().find(e=>e.data.cutvalue<0),W3=(n,e,t)=>{let r=t.source,i=t.target;e.getRelatedEdges(r,"out").find(h=>h.target===i)||(r=t.target,i=t.source);const a=n.getNode(r),s=n.getNode(i);let o=a,l=!1;a.data.lim>s.data.lim&&(o=s,l=!0);const u=e.getAllEdges().filter(h=>l===jE(n.getNode(h.source),o)&&l!==jE(n.getNode(h.target),o));return d0(u,h=>Lo(e,h))},G3=(n,e,t,r)=>{const i=n.getRelatedEdges(t.source,"both").find(a=>a.source===t.target||a.target===t.target);i&&n.removeEdge(i.id),n.addEdge({id:`e${Math.random()}`,source:r.source,target:r.target,data:{}}),GE(n),WE(n,e),H3(n,e)},H3=(n,e)=>{const t=n.getAllNodes().find(i=>!i.data.parent);let r=yE(n,t,"pre",!1);r=r.slice(1),r.forEach(i=>{const a=n.getNode(i).data.parent;let s=e.getRelatedEdges(i,"out").find(l=>l.target===a),o=!1;!s&&e.hasNode(a)&&(s=e.getRelatedEdges(a,"out").find(l=>l.target===i),o=!0),e.getNode(i).data.rank=(e.hasNode(a)&&e.getNode(a).data.rank||0)+(o?s==null?void 0:s.data.minlen:-(s==null?void 0:s.data.minlen))})},j3=(n,e,t)=>n.getRelatedEdges(e,"both").find(r=>r.source===t||r.target===t),jE=(n,e)=>e.data.low<=n.data.lim&&n.data.lim<=e.data.lim,V3=(n,e)=>{switch(e){case"network-simplex":K3(n);break;case"tight-tree":VE(n);break;case"longest-path":Z3(n);break;default:VE(n)}},Z3=FE,VE=n=>{L3(n),N3(n)},K3=n=>{k3(n)},X3=(n,e)=>{const{edgeLabelSpace:t,keepNodeOrder:r,prevGraph:i,rankdir:a,ranksep:s}=e;!r&&i&&Q3(n,i);const o=nI(n);t&&(e.ranksep=rI(o,{rankdir:a,ranksep:s}));let l;try{l=Y3(o,e)}catch(u){if(u.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:
|
|
|
`,u);return}throw u}return J3(n,o),l},Y3=(n,e)=>{const{acyclicer:t,ranker:r,rankdir:i="tb",nodeOrder:a,keepNodeOrder:s,align:o,nodesep:l=50,edgesep:u=20,ranksep:h=50}=e;fI(n),zR(n,t);const{nestingRoot:v,nodeRankFactor:E}=qR(n);V3(fE(n),r),iI(n),VR(n,E),t3(n,v),jR(n),aI(n),sI(n);const D=[];r3(n,D),w3(n,D),KR(n),s&&E3(n,a),_3(n,s),dI(n),XR(n,i),D3(n,{align:o,nodesep:l,edgesep:u,ranksep:h}),vI(n),hI(n),a3(n,D),uI(n),YR(n,i);const{width:F,height:G}=oI(n);return lI(n),cI(n),WR(n),{width:F,height:G}},Q3=(n,e)=>{n.getAllNodes().forEach(t=>{const r=n.getNode(t.id);if(e.hasNode(t.id)){const i=e.getNode(t.id);r.data.fixorder=i.data._order,delete i.data._order}else delete r.data.fixorder})},J3=(n,e)=>{n.getAllNodes().forEach(t=>{var r;const i=n.getNode(t.id);if(i){const a=e.getNode(t.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,!((r=e.getChildren(t.id))===null||r===void 0)&&r.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),n.getAllEdges().forEach(t=>{const r=n.getEdge(t.id),i=e.getEdge(t.id);r.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(r.data.x=i.data.x,r.data.y=i.data.y)})},q3=["width","height","layer","fixorder"],$3={width:0,height:0},eI=["minlen","weight","width","height","labeloffset"],tI={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},m0=["labelpos"],nI=n=>{const e=new hi({tree:[]});return n.getAllNodes().forEach(t=>{const r=KE(n.getNode(t.id).data),i=Object.assign(Object.assign({},$3),r),a=ZE(i,q3);e.hasNode(t.id)||e.addNode({id:t.id,data:Object.assign({},a)});const s=n.hasTreeStructure("combo")?n.getParent(t.id,"combo"):n.getParent(t.id);xn(s)||(e.hasNode(s.id)||e.addNode(Object.assign({},s)),e.setParent(t.id,s.id))}),n.getAllEdges().forEach(t=>{const r=KE(n.getEdge(t.id).data),i={};m0==null||m0.forEach(a=>{r[a]!==void 0&&(i[a]=r[a])}),e.addEdge({id:t.id,source:t.source,target:t.target,data:Object.assign({},tI,ZE(r,eI),i)})}),e},rI=(n,e)=>{const{ranksep:t=0,rankdir:r}=e;return n.getAllNodes().forEach(i=>{isNaN(i.data.layer)||i.data.layer||(i.data.layer=0)}),n.getAllEdges().forEach(i=>{var a;i.data.minlen*=2,((a=i.data.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(r==="TB"||r==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),t/2},iI=n=>{n.getAllEdges().forEach(e=>{if(e.data.width&&e.data.height){const t=n.getNode(e.source),r=n.getNode(e.target),i={e,rank:(r.data.rank-t.data.rank)/2+t.data.rank};ru(n,"edge-proxy",i,"_ep")}})},aI=n=>{let e=0;return n.getAllNodes().forEach(t=>{var r,i;t.data.borderTop&&(t.data.minRank=(r=n.getNode(t.data.borderTop))===null||r===void 0?void 0:r.data.rank,t.data.maxRank=(i=n.getNode(t.data.borderBottom))===null||i===void 0?void 0:i.data.rank,e=Math.max(e,t.data.maxRank||-1/0))}),e},sI=n=>{n.getAllNodes().forEach(e=>{e.data.dummy==="edge-proxy"&&(n.getEdge(e.data.e.id).data.labelRank=e.data.rank,n.removeNode(e.id))})},oI=(n,e)=>{let t,r=0,i,a=0;const{marginx:s=0,marginy:o=0}=e||{},l=u=>{if(!u.data)return;const h=u.data.x,v=u.data.y,E=u.data.width,D=u.data.height;!isNaN(h)&&!isNaN(E)&&(t===void 0&&(t=h-E/2),t=Math.min(t,h-E/2),r=Math.max(r,h+E/2)),!isNaN(v)&&!isNaN(D)&&(i===void 0&&(i=v-D/2),i=Math.min(i,v-D/2),a=Math.max(a,v+D/2))};return n.getAllNodes().forEach(u=>{l(u)}),n.getAllEdges().forEach(u=>{u!=null&&u.data.hasOwnProperty("x")&&l(u)}),t-=s,i-=o,n.getAllNodes().forEach(u=>{u.data.x-=t,u.data.y-=i}),n.getAllEdges().forEach(u=>{var h;(h=u.data.points)===null||h===void 0||h.forEach(v=>{v.x-=t,v.y-=i}),u.data.hasOwnProperty("x")&&(u.data.x-=t),u.data.hasOwnProperty("y")&&(u.data.y-=i)}),{width:r-t+s,height:a-i+o}},lI=n=>{n.getAllEdges().forEach(e=>{const t=n.getNode(e.source),r=n.getNode(e.target);let i,a;e.data.points?(i=e.data.points[0],a=e.data.points[e.data.points.length-1]):(e.data.points=[],i={x:r.data.x,y:r.data.y},a={x:t.data.x,y:t.data.y}),e.data.points.unshift(vE(t.data,i)),e.data.points.push(vE(r.data,a))})},uI=n=>{n.getAllEdges().forEach(e=>{if(e.data.hasOwnProperty("x"))switch((e.data.labelpos==="l"||e.data.labelpos==="r")&&(e.data.width-=e.data.labeloffset),e.data.labelpos){case"l":e.data.x-=e.data.width/2+e.data.labeloffset;break;case"r":e.data.x+=e.data.width/2+e.data.labeloffset;break}})},cI=n=>{n.getAllEdges().forEach(e=>{var t;e.data.reversed&&((t=e.data.points)===null||t===void 0||t.reverse())})},hI=n=>{n.getAllNodes().forEach(e=>{var t,r,i;if(!((t=n.getChildren(e.id))===null||t===void 0)&&t.length){const a=n.getNode(e.id),s=n.getNode(a.data.borderTop),o=n.getNode(a.data.borderBottom),l=n.getNode(a.data.borderLeft[((r=a.data.borderLeft)===null||r===void 0?void 0:r.length)-1]),u=n.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((u==null?void 0:u.data.x)-(l==null?void 0:l.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=((l==null?void 0:l.data.x)||0)+a.data.width/2,a.data.y=((s==null?void 0:s.data.y)||0)+a.data.height/2}}),n.getAllNodes().forEach(e=>{e.data.dummy==="border"&&n.removeNode(e.id)})},fI=n=>{n.getAllEdges().forEach(e=>{if(e.source===e.target){const t=n.getNode(e.source);t.data.selfEdges||(t.data.selfEdges=[]),t.data.selfEdges.push(e),n.removeEdge(e.id)}})},dI=n=>{const e=pc(n);e==null||e.forEach(t=>{let r=0;t==null||t.forEach((i,a)=>{var s;const o=n.getNode(i);o.data.order=a+r,(s=o.data.selfEdges)===null||s===void 0||s.forEach(l=>{ru(n,"selfedge",{width:l.data.width,height:l.data.height,rank:o.data.rank,order:a+ ++r,e:l},"_se")}),delete o.data.selfEdges})})},vI=n=>{n.getAllNodes().forEach(e=>{const t=n.getNode(e.id);if(t.data.dummy==="selfedge"){const r=n.getNode(t.data.e.source),i=r.data.x+r.data.width/2,a=r.data.y,s=t.data.x-i,o=r.data.height/2;n.hasEdge(t.data.e.id)?n.updateEdgeData(t.data.e.id,t.data.e.data):n.addEdge({id:t.data.e.id,source:t.data.e.source,target:t.data.e.target,data:t.data.e.data}),n.removeNode(e.id),t.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}],t.data.e.data.x=t.data.x,t.data.e.data.y=t.data.y}})},ZE=(n,e)=>{const t={};return e==null||e.forEach(r=>{n[r]!==void 0&&(t[r]=+n[r])}),t},KE=(n={})=>{const e={};return Object.keys(n).forEach(t=>{e[t.toLowerCase()]=n[t]}),e};function mc(n){if(!n)return[0,0,0];if(sn(n))return[n,n,n];if(n.length===0)return[0,0,0];const[e,t=e,r=e]=n;return[e,t,r]}function El(n,e){let t;return fn(e)?t=e:sn(e)?t=()=>e:t=()=>n,t}function y0(n,e,t=!0){return!e&&e!==0?r=>{const{size:i}=r.data||{};return i?Array.isArray(i)?t?Math.max(...i)||n:i:si(i)&&i.width&&i.height?t?Math.max(i.width,i.height)||n:[i.width,i.height]:i:n}:fn(e)?e:sn(e)?()=>e:Array.isArray(e)?()=>t?Math.max(...e)||n:e:si(e)&&e.width&&e.height?()=>t?Math.max(e.width,e.height)||n:[e.width,e.height]:()=>n}const _0=(n,e,t=10)=>{let r;const i=typeof e=="function"?e:()=>e||0;return n?Array.isArray(n)?r=s=>n:fn(n)?r=n:r=s=>n:r=s=>{var o,l,u;if(!((o=s.data)===null||o===void 0)&&o.bboxSize)return(l=s.data)===null||l===void 0?void 0:l.bboxSize;if(!((u=s.data)===null||u===void 0)&&u.size){const h=s.data.size;return Array.isArray(h)?h:si(h)?[h.width,h.height]:h}return t},s=>{const o=r(s),l=i(s);return Math.max(...mc(o))+l}},E0=n=>{if(n===null)return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof Array){const e=[];return n.forEach(t=>{e.push(t)}),e.map(t=>E0(t))}if(typeof n=="object"){const e={};return Object.keys(n).forEach(t=>{e[t]=E0(n[t])}),e}return n},Na=(n,e)=>{const t=E0(n);return t.data=t.data||{},e&&(sn(t.data.x)||(t.data.x=Math.random()*e[0]),sn(t.data.y)||(t.data.y=Math.random()*e[1])),t},gI={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class pI{constructor(e={}){this.options=e,this.id="antv-dagre",this.options=Object.assign(Object.assign({},gI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,e,t)})}genericDagreLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{nodeSize:a,align:s,rankdir:o="TB",ranksep:l,nodesep:u,ranksepFunc:h,nodesepFunc:v,edgeLabelSpace:E,ranker:D,nodeOrder:F,begin:G,controlPoints:H,radial:K,sortByCombo:q,preset:te}=i,ue=new hi({tree:[]}),le=El(l||50,h),he=El(u||50,v);let ve=he,ge=le;(o==="LR"||o==="RL")&&(ve=le,ge=he);const Te=y0(10,a,!1),Oe=t.getAllNodes(),Ne=t.getAllEdges();Oe.forEach(ct=>{const ht=mc(Te(ct)),At=ge(ct),kt=ve(ct),Ht=ht[0]+2*kt,en=ht[1]+2*At,on=ct.data.layer;sn(on)?ue.addNode({id:ct.id,data:{width:Ht,height:en,layer:on}}):ue.addNode({id:ct.id,data:{width:Ht,height:en}})}),q&&(ue.attachTreeStructure("combo"),Oe.forEach(ct=>{const{parentId:ht}=ct.data;ht!==void 0&&ue.hasNode(ht)&&ue.setParent(ct.id,ht,"combo")})),Ne.forEach(ct=>{ue.addEdge({id:ct.id,source:ct.source,target:ct.target,data:{weight:ct.data.weight||1}})});let ze;te!=null&&te.length&&(ze=new hi({nodes:te})),X3(ue,{prevGraph:ze,edgeLabelSpace:E,keepNodeOrder:!!F,nodeOrder:F||[],acyclicer:"greedy",ranker:D,rankdir:o,nodesep:u,align:s});const Xe=[0,0];if(G){let ct=1/0,ht=1/0;ue.getAllNodes().forEach(At=>{ct>At.data.x&&(ct=At.data.x),ht>At.data.y&&(ht=At.data.y)}),ue.getAllEdges().forEach(At=>{var kt;(kt=At.data.points)===null||kt===void 0||kt.forEach(Ht=>{ct>Ht.x&&(ct=Ht.x),ht>Ht.y&&(ht=Ht.y)})}),Xe[0]=G[0]-ct,Xe[1]=G[1]-ht}const Je=o==="LR"||o==="RL";if(!K){const ct=new Set,At=o==="BT"||o==="RL"?(on,tn)=>tn-on:(on,tn)=>on-tn;ue.getAllNodes().forEach(on=>{on.data.x=on.data.x+Xe[0],on.data.y=on.data.y+Xe[1],ct.add(Je?on.data.x:on.data.y)});const kt=Array.from(ct).sort(At),Ht=Je?(on,tn)=>on.x!==tn.x:(on,tn)=>on.y!==tn.y,en=Je?(on,tn,yn)=>{const An=Math.max(tn.y,yn.y),kn=Math.min(tn.y,yn.y);return on.filter(qn=>qn.y<=An&&qn.y>=kn)}:(on,tn,yn)=>{const An=Math.max(tn.x,yn.x),kn=Math.min(tn.x,yn.x);return on.filter(qn=>qn.x<=An&&qn.x>=kn)};ue.getAllEdges().forEach((on,tn)=>{var yn;E&&H&&on.data.type!=="loop"&&(on.data.controlPoints=mI((yn=on.data.points)===null||yn===void 0?void 0:yn.map(({x:An,y:kn})=>({x:An+Xe[0],y:kn+Xe[1]})),ue.getNode(on.source),ue.getNode(on.target),kt,Je,Ht,en))})}let st=[];st=ue.getAllNodes().map(ct=>Na(ct));const Et=ue.getAllEdges();return e&&(st.forEach(ct=>{t.mergeNodeData(ct.id,{x:ct.data.x,y:ct.data.y})}),Et.forEach(ct=>{t.mergeEdgeData(ct.id,{controlPoints:ct.data.controlPoints})})),{nodes:st,edges:Et}})}}const mI=(n,e,t,r,i,a,s)=>{let o=(n==null?void 0:n.slice(1,n.length-1))||[];if(e&&t){let{x:l,y:u}=e.data,{x:h,y:v}=t.data;if(i&&(l=e.data.y,u=e.data.x,h=t.data.y,v=t.data.x),v!==u&&l!==h){const E=r.indexOf(u),D=r[E+1];if(D){const H=o[0],K=i?{x:(u+D)/2,y:(H==null?void 0:H.y)||h}:{x:(H==null?void 0:H.x)||h,y:(u+D)/2};(!H||a(H,K))&&o.unshift(K)}const F=r.indexOf(v),G=Math.abs(F-E);if(G===1)o=s(o,e.data,t.data),o.length||o.push(i?{x:(u+v)/2,y:l}:{x:l,y:(u+v)/2});else if(G>1){const H=r[F-1];if(H){const K=o[o.length-1],q=i?{x:(v+H)/2,y:(K==null?void 0:K.y)||h}:{x:(K==null?void 0:K.x)||l,y:(v+H)/2};(!K||a(K,q))&&o.push(q)}}}}return o},xl=(n,e,t)=>{const r=n.getAllNodes(),i=n.getAllEdges();if(!(r!=null&&r.length))return{nodes:[],edges:i};if(r.length===1)return e&&n.mergeNodeData(r[0].id,{x:t[0],y:t[1]}),{nodes:[Object.assign(Object.assign({},r[0]),{data:Object.assign(Object.assign({},r[0].data),{x:t[0],y:t[1]})})],edges:i}},yI={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class _I{constructor(e={}){this.options=e,this.id="circular",this.options=Object.assign(Object.assign({},yI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,e,t)})}genericCircularLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{width:a,height:s,center:o,divisions:l,startAngle:u=0,endAngle:h=2*Math.PI,angleRatio:v,ordering:E,clockwise:D,nodeSpacing:F,nodeSize:G}=i,H=t.getAllNodes(),K=t.getAllEdges(),[q,te,ue]=xI(a,s,o),le=H==null?void 0:H.length;if(!le||le===1)return xl(t,e,ue);const he=(h-u)/le;let{radius:ve,startRadius:ge,endRadius:Te}=i;if(F){const Je=El(10,F),st=y0(10,G);let Et=-1/0;H.forEach(ct=>{const ht=st(ct);Et<ht&&(Et=ht)});let mt=0;H.forEach((ct,ht)=>{ht===0?mt+=Et||10:mt+=(Je(ct)||0)+(Et||10)}),ve=mt/(2*Math.PI)}else!ve&&!ge&&!Te?ve=Math.min(te,q)/2:!ge&&Te?ge=Te:ge&&!Te&&(Te=ge);const Oe=he*v;let Ne=[];E==="topology"?Ne=XE(t,H):E==="topology-directed"?Ne=XE(t,H,!0):E==="degree"?Ne=EI(t,H):Ne=H.map(Je=>Na(Je));const ze=Math.ceil(le/l);for(let Je=0;Je<le;++Je){let st=ve;!st&&ge!==null&&Te!==null&&(st=ge+Je*(Te-ge)/(le-1)),st||(st=10+Je*100/(le-1));let Et=u+Je%ze*Oe+2*Math.PI/l*Math.floor(Je/ze);D||(Et=h-Je%ze*Oe-2*Math.PI/l*Math.floor(Je/ze)),Ne[Je].data.x=ue[0]+Math.cos(Et)*st,Ne[Je].data.y=ue[1]+Math.sin(Et)*st}return e&&Ne.forEach(Je=>{t.mergeNodeData(Je.id,{x:Je.data.x,y:Je.data.y})}),{nodes:Ne,edges:K}})}}const XE=(n,e,t=!1)=>{const r=[Na(e[0])],i={},a=e.length;i[e[0].id]=!0;let s=0;return e.forEach((o,l)=>{if(l!==0)if((l===a-1||n.getDegree(o.id,"both")!==n.getDegree(e[l+1].id,"both")||n.areNeighbors(r[s].id,o.id))&&!i[o.id])r.push(Na(o)),i[o.id]=!0,s++;else{const u=t?n.getSuccessors(r[s].id):n.getNeighbors(r[s].id);let h=!1;for(let E=0;E<u.length;E++){const D=u[E];if(n.getDegree(D.id)===n.getDegree(o.id)&&!i[D.id]){r.push(Na(D)),i[D.id]=!0,h=!0;break}}let v=0;for(;!h&&(i[e[v].id]||(r.push(Na(e[v])),i[e[v].id]=!0,h=!0),v++,v!==a););}}),r};function EI(n,e){const t=[];return e.forEach((r,i)=>{t.push(Na(r))}),t.sort((r,i)=>n.getDegree(r.id,"both")-n.getDegree(i.id,"both")),t}const xI=(n,e,t)=>{let r=n,i=e,a=t;return!r&&typeof window!="undefined"&&(r=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[r/2,i/2]),[r,i,a]},to=Array.isArray,bI={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class x0{constructor(e={}){this.options=e,this.id="concentric",this.options=Object.assign(Object.assign({},bI),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,e,t)})}genericConcentricLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{center:a,width:s,height:o,sortBy:l,maxLevelDiff:u,sweep:h,clockwise:v,equidistant:E,preventOverlap:D,startAngle:F=3/2*Math.PI,nodeSize:G,nodeSpacing:H}=i,K=t.getAllNodes(),q=t.getAllEdges(),te=!s&&typeof window!="undefined"?window.innerWidth:s,ue=!o&&typeof window!="undefined"?window.innerHeight:o,le=a||[te/2,ue/2];if(!(K!=null&&K.length)||K.length===1)return xl(t,e,le);const he=[];let ve,ge=0;to(G)?ve=Math.max(G[0],G[1]):fn(G)?(ve=-1/0,K.forEach(ct=>{const ht=Math.max(...mc(G(ct)));ht>ve&&(ve=ht)})):ve=G,to(H)?ge=Math.max(H[0],H[1]):sn(H)&&(ge=H),K.forEach(ct=>{const ht=Na(ct);he.push(ht);let At=ve;const{data:kt}=ht;to(kt.size)?At=Math.max(kt.size[0],kt.size[1]):sn(kt.size)?At=kt.size:si(kt.size)&&(At=Math.max(kt.size.width,kt.size.height)),ve=Math.max(ve,At),fn(H)&&(ge=Math.max(H(ct),ge))});const Te={};he.forEach((ct,ht)=>{Te[ct.id]=ht});let Oe=l;(!fr(Oe)||he[0].data[Oe]===void 0)&&(Oe="degree"),Oe==="degree"?he.sort((ct,ht)=>t.getDegree(ht.id,"both")-t.getDegree(ct.id,"both")):he.sort((ct,ht)=>ht.data[Oe]-ct.data[Oe]);const Ne=he[0],ze=(u||(Oe==="degree"?t.getDegree(Ne.id,"both"):Ne.data[Oe]))/4,Xe=[{nodes:[]}];let Je=Xe[0];he.forEach(ct=>{if(Je.nodes.length>0){const ht=Math.abs(Oe==="degree"?t.getDegree(Je.nodes[0].id,"both")-t.getDegree(ct.id,"both"):Je.nodes[0].data[Oe]-ct.data[Oe]);ze&&ht>=ze&&(Je={nodes:[]},Xe.push(Je))}Je.nodes.push(ct)});let st=ve+ge;if(!D){const ct=Xe.length>0&&Xe[0].nodes.length>1,At=(Math.min(te,ue)/2-st)/(Xe.length+(ct?1:0));st=Math.min(st,At)}let Et=0;if(Xe.forEach(ct=>{const ht=h===void 0?2*Math.PI-2*Math.PI/ct.nodes.length:h;if(ct.dTheta=ht/Math.max(1,ct.nodes.length-1),ct.nodes.length>1&&D){const At=Math.cos(ct.dTheta)-Math.cos(0),kt=Math.sin(ct.dTheta)-Math.sin(0),Ht=Math.sqrt(st*st/(At*At+kt*kt));Et=Math.max(Ht,Et)}ct.r=Et,Et+=st}),E){let ct=0,ht=0;for(let At=0;At<Xe.length;At++){const Ht=(Xe[At].r||0)-ht;ct=Math.max(ct,Ht)}ht=0,Xe.forEach((At,kt)=>{kt===0&&(ht=At.r||0),At.r=ht,ht+=ct})}return Xe.forEach(ct=>{const ht=ct.dTheta||0,At=ct.r||0;ct.nodes.forEach((kt,Ht)=>{const en=F+(v?1:-1)*ht*Ht;kt.data.x=le[0]+At*Math.cos(en),kt.data.y=le[1]+At*Math.sin(en)})}),e&&he.forEach(ct=>t.mergeNodeData(ct.id,{x:ct.data.x,y:ct.data.y})),{nodes:he,edges:q}})}}function wI(n){const e=+this._x.call(null,n),t=+this._y.call(null,n);return YE(this.cover(e,t),e,t,n)}function YE(n,e,t,r){if(isNaN(e)||isNaN(t))return n;var i,a=n._root,s={data:r},o=n._x0,l=n._y0,u=n._x1,h=n._y1,v,E,D,F,G,H,K,q;if(!a)return n._root=s,n;for(;a.length;)if((G=e>=(v=(o+u)/2))?o=v:u=v,(H=t>=(E=(l+h)/2))?l=E:h=E,i=a,!(a=a[K=H<<1|G]))return i[K]=s,n;if(D=+n._x.call(null,a.data),F=+n._y.call(null,a.data),e===D&&t===F)return s.next=a,i?i[K]=s:n._root=s,n;do i=i?i[K]=new Array(4):n._root=new Array(4),(G=e>=(v=(o+u)/2))?o=v:u=v,(H=t>=(E=(l+h)/2))?l=E:h=E;while((K=H<<1|G)===(q=(F>=E)<<1|D>=v));return i[q]=a,i[K]=s,n}function MI(n){var e,t,r=n.length,i,a,s=new Array(r),o=new Array(r),l=1/0,u=1/0,h=-1/0,v=-1/0;for(t=0;t<r;++t)isNaN(i=+this._x.call(null,e=n[t]))||isNaN(a=+this._y.call(null,e))||(s[t]=i,o[t]=a,i<l&&(l=i),i>h&&(h=i),a<u&&(u=a),a>v&&(v=a));if(l>h||u>v)return this;for(this.cover(l,u).cover(h,v),t=0;t<r;++t)YE(this,s[t],o[t],n[t]);return this}function AI(n,e){if(isNaN(n=+n)||isNaN(e=+e))return this;var t=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(t))i=(t=Math.floor(n))+1,a=(r=Math.floor(e))+1;else{for(var s=i-t||1,o=this._root,l,u;t>n||n>=i||r>e||e>=a;)switch(u=(e<r)<<1|n<t,l=new Array(4),l[u]=o,o=l,s*=2,u){case 0:i=t+s,a=r+s;break;case 1:t=i-s,a=r+s;break;case 2:i=t+s,r=a-s;break;case 3:t=i-s,r=a-s;break}this._root&&this._root.length&&(this._root=o)}return this._x0=t,this._y0=r,this._x1=i,this._y1=a,this}function TI(){var n=[];return this.visit(function(e){if(!e.length)do n.push(e.data);while(e=e.next)}),n}function SI(n){return arguments.length?this.cover(+n[0][0],+n[0][1]).cover(+n[1][0],+n[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function oa(n,e,t,r,i){this.node=n,this.x0=e,this.y0=t,this.x1=r,this.y1=i}function PI(n,e,t){var r,i=this._x0,a=this._y0,s,o,l,u,h=this._x1,v=this._y1,E=[],D=this._root,F,G;for(D&&E.push(new oa(D,i,a,h,v)),t==null?t=1/0:(i=n-t,a=e-t,h=n+t,v=e+t,t*=t);F=E.pop();)if(!(!(D=F.node)||(s=F.x0)>h||(o=F.y0)>v||(l=F.x1)<i||(u=F.y1)<a))if(D.length){var H=(s+l)/2,K=(o+u)/2;E.push(new oa(D[3],H,K,l,u),new oa(D[2],s,K,H,u),new oa(D[1],H,o,l,K),new oa(D[0],s,o,H,K)),(G=(e>=K)<<1|n>=H)&&(F=E[E.length-1],E[E.length-1]=E[E.length-1-G],E[E.length-1-G]=F)}else{var q=n-+this._x.call(null,D.data),te=e-+this._y.call(null,D.data),ue=q*q+te*te;if(ue<t){var le=Math.sqrt(t=ue);i=n-le,a=e-le,h=n+le,v=e+le,r=D.data}}return r}function OI(n){if(isNaN(h=+this._x.call(null,n))||isNaN(v=+this._y.call(null,n)))return this;var e,t=this._root,r,i,a,s=this._x0,o=this._y0,l=this._x1,u=this._y1,h,v,E,D,F,G,H,K;if(!t)return this;if(t.length)for(;;){if((F=h>=(E=(s+l)/2))?s=E:l=E,(G=v>=(D=(o+u)/2))?o=D:u=D,e=t,!(t=t[H=G<<1|F]))return this;if(!t.length)break;(e[H+1&3]||e[H+2&3]||e[H+3&3])&&(r=e,K=H)}for(;t.data!==n;)if(i=t,!(t=t.next))return this;return(a=t.next)&&delete t.next,i?(a?i.next=a:delete i.next,this):e?(a?e[H]=a:delete e[H],(t=e[0]||e[1]||e[2]||e[3])&&t===(e[3]||e[2]||e[1]||e[0])&&!t.length&&(r?r[K]=t:this._root=t),this):(this._root=a,this)}function CI(n){for(var e=0,t=n.length;e<t;++e)this.remove(n[e]);return this}function DI(){return this._root}function LI(){var n=0;return this.visit(function(e){if(!e.length)do++n;while(e=e.next)}),n}function RI(n){var e=[],t,r=this._root,i,a,s,o,l;for(r&&e.push(new oa(r,this._x0,this._y0,this._x1,this._y1));t=e.pop();)if(!n(r=t.node,a=t.x0,s=t.y0,o=t.x1,l=t.y1)&&r.length){var u=(a+o)/2,h=(s+l)/2;(i=r[3])&&e.push(new oa(i,u,h,o,l)),(i=r[2])&&e.push(new oa(i,a,h,u,l)),(i=r[1])&&e.push(new oa(i,u,s,o,h)),(i=r[0])&&e.push(new oa(i,a,s,u,h))}return this}function II(n){var e=[],t=[],r;for(this._root&&e.push(new oa(this._root,this._x0,this._y0,this._x1,this._y1));r=e.pop();){var i=r.node;if(i.length){var a,s=r.x0,o=r.y0,l=r.x1,u=r.y1,h=(s+l)/2,v=(o+u)/2;(a=i[0])&&e.push(new oa(a,s,o,h,v)),(a=i[1])&&e.push(new oa(a,h,o,l,v)),(a=i[2])&&e.push(new oa(a,s,v,h,u)),(a=i[3])&&e.push(new oa(a,h,v,l,u))}t.push(r)}for(;r=t.pop();)n(r.node,r.x0,r.y0,r.x1,r.y1);return this}function NI(n){return n[0]}function BI(n){return arguments.length?(this._x=n,this):this._x}function kI(n){return n[1]}function FI(n){return arguments.length?(this._y=n,this):this._y}function Yf(n,e,t){var r=new b0(e==null?NI:e,t==null?kI:t,NaN,NaN,NaN,NaN);return n==null?r:r.addAll(n)}function b0(n,e,t,r,i,a){this._x=n,this._y=e,this._x0=t,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function QE(n){for(var e={data:n.data},t=e;n=n.next;)t=t.next={data:n.data};return e}var la=Yf.prototype=b0.prototype;la.copy=function(){var n=new b0(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,t,r;if(!e)return n;if(!e.length)return n._root=QE(e),n;for(t=[{source:e,target:n._root=new Array(4)}];e=t.pop();)for(var i=0;i<4;++i)(r=e.source[i])&&(r.length?t.push({source:r,target:e.target[i]=new Array(4)}):e.target[i]=QE(r));return n},la.add=wI,la.addAll=MI,la.cover=AI,la.data=TI,la.extent=SI,la.find=PI,la.remove=OI,la.removeAll=CI,la.root=DI,la.size=LI,la.visit=RI,la.visitAfter=II,la.x=BI,la.y=FI;function zI(n){const e=+this._x.call(null,n),t=+this._y.call(null,n),r=+this._z.call(null,n);return JE(this.cover(e,t,r),e,t,r,n)}function JE(n,e,t,r,i){if(isNaN(e)||isNaN(t)||isNaN(r))return n;var a,s=n._root,o={data:i},l=n._x0,u=n._y0,h=n._z0,v=n._x1,E=n._y1,D=n._z1,F,G,H,K,q,te,ue,le,he,ve,ge;if(!s)return n._root=o,n;for(;s.length;)if((ue=e>=(F=(l+v)/2))?l=F:v=F,(le=t>=(G=(u+E)/2))?u=G:E=G,(he=r>=(H=(h+D)/2))?h=H:D=H,a=s,!(s=s[ve=he<<2|le<<1|ue]))return a[ve]=o,n;if(K=+n._x.call(null,s.data),q=+n._y.call(null,s.data),te=+n._z.call(null,s.data),e===K&&t===q&&r===te)return o.next=s,a?a[ve]=o:n._root=o,n;do a=a?a[ve]=new Array(8):n._root=new Array(8),(ue=e>=(F=(l+v)/2))?l=F:v=F,(le=t>=(G=(u+E)/2))?u=G:E=G,(he=r>=(H=(h+D)/2))?h=H:D=H;while((ve=he<<2|le<<1|ue)===(ge=(te>=H)<<2|(q>=G)<<1|K>=F));return a[ge]=s,a[ve]=o,n}function UI(n){Array.isArray(n)||(n=Array.from(n));const e=n.length,t=new Float64Array(e),r=new Float64Array(e),i=new Float64Array(e);let a=1/0,s=1/0,o=1/0,l=-1/0,u=-1/0,h=-1/0;for(let v=0,E,D,F,G;v<e;++v)isNaN(D=+this._x.call(null,E=n[v]))||isNaN(F=+this._y.call(null,E))||isNaN(G=+this._z.call(null,E))||(t[v]=D,r[v]=F,i[v]=G,D<a&&(a=D),D>l&&(l=D),F<s&&(s=F),F>u&&(u=F),G<o&&(o=G),G>h&&(h=G));if(a>l||s>u||o>h)return this;this.cover(a,s,o).cover(l,u,h);for(let v=0;v<e;++v)JE(this,t[v],r[v],i[v],n[v]);return this}function WI(n,e,t){if(isNaN(n=+n)||isNaN(e=+e)||isNaN(t=+t))return this;var r=this._x0,i=this._y0,a=this._z0,s=this._x1,o=this._y1,l=this._z1;if(isNaN(r))s=(r=Math.floor(n))+1,o=(i=Math.floor(e))+1,l=(a=Math.floor(t))+1;else{for(var u=s-r||1,h=this._root,v,E;r>n||n>=s||i>e||e>=o||a>t||t>=l;)switch(E=(t<a)<<2|(e<i)<<1|n<r,v=new Array(8),v[E]=h,h=v,u*=2,E){case 0:s=r+u,o=i+u,l=a+u;break;case 1:r=s-u,o=i+u,l=a+u;break;case 2:s=r+u,i=o-u,l=a+u;break;case 3:r=s-u,i=o-u,l=a+u;break;case 4:s=r+u,o=i+u,a=l-u;break;case 5:r=s-u,o=i+u,a=l-u;break;case 6:s=r+u,i=o-u,a=l-u;break;case 7:r=s-u,i=o-u,a=l-u;break}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=i,this._z0=a,this._x1=s,this._y1=o,this._z1=l,this}function GI(){var n=[];return this.visit(function(e){if(!e.length)do n.push(e.data);while(e=e.next)}),n}function HI(n){return arguments.length?this.cover(+n[0][0],+n[0][1],+n[0][2]).cover(+n[1][0],+n[1][1],+n[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]}function Nr(n,e,t,r,i,a,s){this.node=n,this.x0=e,this.y0=t,this.z0=r,this.x1=i,this.y1=a,this.z1=s}function jI(n,e,t,r){var i,a=this._x0,s=this._y0,o=this._z0,l,u,h,v,E,D,F=this._x1,G=this._y1,H=this._z1,K=[],q=this._root,te,ue;for(q&&K.push(new Nr(q,a,s,o,F,G,H)),r==null?r=1/0:(a=n-r,s=e-r,o=t-r,F=n+r,G=e+r,H=t+r,r*=r);te=K.pop();)if(!(!(q=te.node)||(l=te.x0)>F||(u=te.y0)>G||(h=te.z0)>H||(v=te.x1)<a||(E=te.y1)<s||(D=te.z1)<o))if(q.length){var le=(l+v)/2,he=(u+E)/2,ve=(h+D)/2;K.push(new Nr(q[7],le,he,ve,v,E,D),new Nr(q[6],l,he,ve,le,E,D),new Nr(q[5],le,u,ve,v,he,D),new Nr(q[4],l,u,ve,le,he,D),new Nr(q[3],le,he,h,v,E,ve),new Nr(q[2],l,he,h,le,E,ve),new Nr(q[1],le,u,h,v,he,ve),new Nr(q[0],l,u,h,le,he,ve)),(ue=(t>=ve)<<2|(e>=he)<<1|n>=le)&&(te=K[K.length-1],K[K.length-1]=K[K.length-1-ue],K[K.length-1-ue]=te)}else{var ge=n-+this._x.call(null,q.data),Te=e-+this._y.call(null,q.data),Oe=t-+this._z.call(null,q.data),Ne=ge*ge+Te*Te+Oe*Oe;if(Ne<r){var ze=Math.sqrt(r=Ne);a=n-ze,s=e-ze,o=t-ze,F=n+ze,G=e+ze,H=t+ze,i=q.data}}return i}const VI=(n,e,t,r,i,a)=>Math.sqrt(jo(n-r,2)+jo(e-i,2)+jo(t-a,2));function ZI(n,e,t,r){const i=[],a=n-r,s=e-r,o=t-r,l=n+r,u=e+r,h=t+r;return this.visit((v,E,D,F,G,H,K)=>{if(!v.length)do{const q=v.data;VI(n,e,t,this._x(q),this._y(q),this._z(q))<=r&&i.push(q)}while(v=v.next);return E>l||D>u||F>h||G<a||H<s||K<o}),i}function KI(n){if(isNaN(E=+this._x.call(null,n))||isNaN(D=+this._y.call(null,n))||isNaN(F=+this._z.call(null,n)))return this;var e,t=this._root,r,i,a,s=this._x0,o=this._y0,l=this._z0,u=this._x1,h=this._y1,v=this._z1,E,D,F,G,H,K,q,te,ue,le,he;if(!t)return this;if(t.length)for(;;){if((q=E>=(G=(s+u)/2))?s=G:u=G,(te=D>=(H=(o+h)/2))?o=H:h=H,(ue=F>=(K=(l+v)/2))?l=K:v=K,e=t,!(t=t[le=ue<<2|te<<1|q]))return this;if(!t.length)break;(e[le+1&7]||e[le+2&7]||e[le+3&7]||e[le+4&7]||e[le+5&7]||e[le+6&7]||e[le+7&7])&&(r=e,he=le)}for(;t.data!==n;)if(i=t,!(t=t.next))return this;return(a=t.next)&&delete t.next,i?(a?i.next=a:delete i.next,this):e?(a?e[le]=a:delete e[le],(t=e[0]||e[1]||e[2]||e[3]||e[4]||e[5]||e[6]||e[7])&&t===(e[7]||e[6]||e[5]||e[4]||e[3]||e[2]||e[1]||e[0])&&!t.length&&(r?r[he]=t:this._root=t),this):(this._root=a,this)}function XI(n){for(var e=0,t=n.length;e<t;++e)this.remove(n[e]);return this}function YI(){return this._root}function QI(){var n=0;return this.visit(function(e){if(!e.length)do++n;while(e=e.next)}),n}function JI(n){var e=[],t,r=this._root,i,a,s,o,l,u,h;for(r&&e.push(new Nr(r,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));t=e.pop();)if(!n(r=t.node,a=t.x0,s=t.y0,o=t.z0,l=t.x1,u=t.y1,h=t.z1)&&r.length){var v=(a+l)/2,E=(s+u)/2,D=(o+h)/2;(i=r[7])&&e.push(new Nr(i,v,E,D,l,u,h)),(i=r[6])&&e.push(new Nr(i,a,E,D,v,u,h)),(i=r[5])&&e.push(new Nr(i,v,s,D,l,E,h)),(i=r[4])&&e.push(new Nr(i,a,s,D,v,E,h)),(i=r[3])&&e.push(new Nr(i,v,E,o,l,u,D)),(i=r[2])&&e.push(new Nr(i,a,E,o,v,u,D)),(i=r[1])&&e.push(new Nr(i,v,s,o,l,E,D)),(i=r[0])&&e.push(new Nr(i,a,s,o,v,E,D))}return this}function qI(n){var e=[],t=[],r;for(this._root&&e.push(new Nr(this._root,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1));r=e.pop();){var i=r.node;if(i.length){var a,s=r.x0,o=r.y0,l=r.z0,u=r.x1,h=r.y1,v=r.z1,E=(s+u)/2,D=(o+h)/2,F=(l+v)/2;(a=i[0])&&e.push(new Nr(a,s,o,l,E,D,F)),(a=i[1])&&e.push(new Nr(a,E,o,l,u,D,F)),(a=i[2])&&e.push(new Nr(a,s,D,l,E,h,F)),(a=i[3])&&e.push(new Nr(a,E,D,l,u,h,F)),(a=i[4])&&e.push(new Nr(a,s,o,F,E,D,v)),(a=i[5])&&e.push(new Nr(a,E,o,F,u,D,v)),(a=i[6])&&e.push(new Nr(a,s,D,F,E,h,v)),(a=i[7])&&e.push(new Nr(a,E,D,F,u,h,v))}t.push(r)}for(;r=t.pop();)n(r.node,r.x0,r.y0,r.z0,r.x1,r.y1,r.z1);return this}function $I(n){return n[0]}function eN(n){return arguments.length?(this._x=n,this):this._x}function tN(n){return n[1]}function nN(n){return arguments.length?(this._y=n,this):this._y}function rN(n){return n[2]}function iN(n){return arguments.length?(this._z=n,this):this._z}function qE(n,e,t,r){var i=new w0(e==null?$I:e,t==null?tN:t,r==null?rN:r,NaN,NaN,NaN,NaN,NaN,NaN);return n==null?i:i.addAll(n)}function w0(n,e,t,r,i,a,s,o,l){this._x=n,this._y=e,this._z=t,this._x0=r,this._y0=i,this._z0=a,this._x1=s,this._y1=o,this._z1=l,this._root=void 0}function $E(n){for(var e={data:n.data},t=e;n=n.next;)t=t.next={data:n.data};return e}var zi=qE.prototype=w0.prototype;zi.copy=function(){var n=new w0(this._x,this._y,this._z,this._x0,this._y0,this._z0,this._x1,this._y1,this._z1),e=this._root,t,r;if(!e)return n;if(!e.length)return n._root=$E(e),n;for(t=[{source:e,target:n._root=new Array(8)}];e=t.pop();)for(var i=0;i<8;++i)(r=e.source[i])&&(r.length?t.push({source:r,target:e.target[i]=new Array(8)}):e.target[i]=$E(r));return n},zi.add=zI,zi.addAll=UI,zi.cover=WI,zi.data=GI,zi.extent=HI,zi.find=jI,zi.findAllWithinRadius=ZI,zi.remove=KI,zi.removeAll=XI,zi.root=YI,zi.size=QI,zi.visit=JI,zi.visitAfter=qI,zi.x=eN,zi.y=nN,zi.z=iN;const aN=.81,M0=.1;function sN(n,e,t,r,i=2){const a=e/t,s=n.getAllNodes(),o=s.map((h,v)=>{const{nodeStrength:E,x:D,y:F,z:G,size:H}=h.data;return{x:D,y:F,z:G,size:H,index:v,id:h.id,vx:0,vy:0,vz:0,weight:a*E}}),l=(i===2?Yf(o,h=>h.x,h=>h.y):qE(o,h=>h.x,h=>h.y,h=>h.z)).visitAfter(oN),u=new Map;return o.forEach(h=>{u.set(h.id,h),uN(h,l,i)}),o.map((h,v)=>{const{id:E,data:D}=s[v],{mass:F=1}=D;r[E]={x:h.vx/F,y:h.vy/F,z:h.vz/F}}),r}function oN(n){let e=0,t=0,r=0,i=0,a=0;const s=n.length;if(s){for(let o=0;o<s;o++){const l=n[o];l&&l.weight&&(e+=l.weight,t+=l.x*l.weight,r+=l.y*l.weight,i+=l.z*l.weight,a+=l.size*l.weight)}n.x=t/e,n.y=r/e,n.z=i/e,n.size=a/e,n.weight=e}else{const o=n;n.x=o.data.x,n.y=o.data.y,n.z=o.data.z,n.size=o.data.size,n.weight=o.data.weight}}const lN=(n,e,t,r,i,a,s)=>{var o;if(((o=n.data)===null||o===void 0?void 0:o.id)===a.id)return;const l=[t,r,i][s-1],u=a.x-n.x||M0,h=a.y-n.y||M0,v=a.z-n.z||M0,E=[u,h,v],D=l-e;let F=0;for(let K=0;K<s;K++)F+=E[K]*E[K];const H=Math.sqrt(F)*F;if(D*D*aN<F){const K=n.weight/H;return a.vx+=u*K,a.vy+=h*K,a.vz+=v*K,!0}if(n.length)return!1;if(n.data!==a){const K=n.data.weight/H;a.vx+=u*K,a.vy+=h*K,a.vz+=v*K}};function uN(n,e,t){e.visit((r,i,a,s,o)=>lN(r,i,a,s,o,n,t))}const cN={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 ex{constructor(e={}){this.options=e,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},cN),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,e,t)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(e=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let r=0;(this.judgingDistance>this.lastOptions.minMovement||r<1)&&r<e;r++)this.runOneStep(this.lastCalcGraph,this.lastGraph,r,this.lastVelMap,this.lastOptions),this.updatePosition(this.lastGraph,this.lastCalcGraph,this.lastVelMap,this.lastOptions);const t={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&t.nodes.forEach(r=>this.lastGraph.mergeNodeData(r.id,{x:r.data.x,y:r.data.y,z:this.options.dimensions===3?r.data.z:void 0})),t}genericForceLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),a=t.getAllNodes(),s=t.getAllEdges(),o=this.formatOptions(i,t),{dimensions:l,width:u,height:h,nodeSize:v,getMass:E,nodeStrength:D,edgeStrength:F,linkDistance:G}=o,H=a.map((ge,Te)=>Object.assign(Object.assign({},ge),{data:Object.assign(Object.assign({},ge.data),{x:sn(ge.data.x)?ge.data.x:Math.random()*u,y:sn(ge.data.y)?ge.data.y:Math.random()*h,z:sn(ge.data.z)?ge.data.z:Math.random()*Math.sqrt(u*h),size:v(ge)||30,mass:E(ge),nodeStrength:D(ge)})})),K=s.map(ge=>Object.assign(Object.assign({},ge),{data:Object.assign(Object.assign({},ge.data),{edgeStrength:F(ge),linkDistance:G(ge,t.getNode(ge.source),t.getNode(ge.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:s},{nodes:[],edges:s};const q={};a.forEach((ge,Te)=>{q[ge.id]={x:0,y:0,z:0}});const te=new hi({nodes:H,edges:K});this.formatCentripetal(o,te);const{maxIteration:ue,minMovement:le,onTick:he}=o;if(this.lastLayoutNodes=H,this.lastLayoutEdges=K,this.lastAssign=e,this.lastGraph=t,this.lastCalcGraph=te,this.lastOptions=o,this.lastVelMap=q,typeof window=="undefined")return;let ve=0;return new Promise(ge=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&ge({nodes:A0(t,H),edges:s}),this.runOneStep(te,t,ve,q,o),this.updatePosition(t,te,q,o),e&&H.forEach(Te=>t.mergeNodeData(Te.id,{x:Te.data.x,y:Te.data.y,z:l===3?Te.data.z:void 0})),he==null||he({nodes:A0(t,H),edges:s}),ve++,(ve>=ue||this.judgingDistance<le)&&(window.clearInterval(this.timeInterval),ge({nodes:A0(t,H),edges:s}))},0),this.running=!0})})}formatOptions(e,t){const r=Object.assign({},e),{width:i,height:a,getMass:s}=e;r.width=!i&&typeof window!="undefined"?window.innerWidth:i,r.height=!a&&typeof window!="undefined"?window.innerHeight:a,e.center||(r.center=[r.width/2,r.height/2]),s||(r.getMass=l=>{let u=1;sn(l==null?void 0:l.data.mass)&&(u=l==null?void 0:l.data.mass);const h=t.getDegree(l.id,"both");return!h||h<5?u:h*5*u}),r.nodeSize=_0(e.nodeSize,e.nodeSpacing);const o=e.linkDistance?El(1,e.linkDistance):l=>1+r.nodeSize(t.getNode(l.source))+r.nodeSize(t.getNode(l.target));return r.linkDistance=o,r.nodeStrength=El(1,e.nodeStrength),r.edgeStrength=El(1,e.edgeStrength),r}formatCentripetal(e,t){const{dimensions:r,centripetalOptions:i,center:a,clusterNodeStrength:s,leafCluster:o,clustering:l,nodeClusterBy:u}=e,h=t.getAllNodes(),v=i||{leaf:2,single:2,others:1,center:K=>({x:a[0],y:a[1],z:r===3?a[2]:void 0})};typeof s!="function"&&(e.clusterNodeStrength=K=>s);let E,D;if(o&&u&&(E=tx(t,u),D=Array.from(new Set(h==null?void 0:h.map(K=>K.data[u])))||[],e.centripetalOptions=Object.assign(v,{single:100,leaf:K=>{const{siblingLeaves:q,sameTypeLeaves:te}=E[K.id]||{};return(te==null?void 0:te.length)===(q==null?void 0:q.length)||(D==null?void 0:D.length)===1?1:e.clusterNodeStrength(K)},others:1,center:K=>{const q=t.getDegree(K.id,"both");if(!q)return{x:100,y:100,z:0};let te;if(q===1){const{sameTypeLeaves:ue=[]}=E[K.id]||{};ue.length===1?te=void 0:ue.length>1&&(te=nx(ue))}else te=void 0;return{x:te==null?void 0:te.x,y:te==null?void 0:te.y,z:te==null?void 0:te.z}}})),l&&u){E||(E=tx(t,u)),D||(D=Array.from(new Set(h.map(q=>q.data[u])))),D=D.filter(q=>q!==void 0);const K={};D.forEach(q=>{const te=h.filter(ue=>ue.data[u]===q).map(ue=>t.getNode(ue.id));K[q]=nx(te)}),e.centripetalOptions=Object.assign(v,{single:q=>e.clusterNodeStrength(q),leaf:q=>e.clusterNodeStrength(q),others:q=>e.clusterNodeStrength(q),center:q=>{const te=K[q.data[u]];return{x:te==null?void 0:te.x,y:te==null?void 0:te.y,z:te==null?void 0:te.z}}})}const{leaf:F,single:G,others:H}=e.centripetalOptions||{};F&&typeof F!="function"&&(e.centripetalOptions.leaf=()=>F),G&&typeof G!="function"&&(e.centripetalOptions.single=()=>G),H&&typeof H!="function"&&(e.centripetalOptions.others=()=>H)}runOneStep(e,t,r,i,a){const s={},o=e.getAllNodes(),l=e.getAllEdges();if(!(o!=null&&o.length))return;const{monitor:u}=a;if(this.calRepulsive(e,s,a),l&&this.calAttractive(e,s,a),this.calGravity(e,t,s,a),this.updateVelocity(e,s,i,a),u){const h=this.calTotalEnergy(s,o);u({energy:h,nodes:t.getAllNodes(),edges:t.getAllEdges(),iterations:r})}}calTotalEnergy(e,t){if(!(t!=null&&t.length))return 0;let r=0;return t.forEach((i,a)=>{const s=e[i.id].x,o=e[i.id].y,l=this.options.dimensions===3?e[i.id].z:0,u=s*s+o*o+l*l,{mass:h=1}=i.data;r+=h*u*.5}),r}calRepulsive(e,t,r){const{dimensions:i,factor:a,coulombDisScale:s}=r;sN(e,a,s*s,t,i)}calAttractive(e,t,r){const{dimensions:i,nodeSize:a}=r;e.getAllEdges().forEach((s,o)=>{const{source:l,target:u}=s,h=e.getNode(l),v=e.getNode(u);if(!h||!v)return;let E=v.data.x-h.data.x,D=v.data.y-h.data.y,F=i===3?v.data.z-h.data.z:0;!E&&!D&&(E=Math.random()*.01,D=Math.random()*.01,i===3&&!F&&(F=Math.random()*.01));const G=Math.sqrt(E*E+D*D+F*F);if(G<a(h)+a(v))return;const H=E/G,K=D/G,q=F/G,{linkDistance:te=200,edgeStrength:ue=200}=s.data||{},he=(te-G)*ue,ve=h.data.mass||1,ge=v.data.mass||1,Te=1/ve,Oe=1/ge,Ne=H*he,ze=K*he,Xe=q*he;t[l].x-=Ne*Te,t[l].y-=ze*Te,t[l].z-=Xe*Te,t[u].x+=Ne*Oe,t[u].y+=ze*Oe,t[u].z+=Xe*Oe})}calGravity(e,t,r,i){const{getCenter:a}=i,s=e.getAllNodes(),o=t.getAllNodes(),l=t.getAllEdges(),{width:u,height:h,center:v,gravity:E,centripetalOptions:D}=i;s&&s.forEach(F=>{const{id:G,data:H}=F,{mass:K,x:q,y:te,z:ue}=H,le=t.getNode(G);let he=0,ve=0,ge=0,Te=E;const Oe=e.getDegree(G,"in"),Ne=e.getDegree(G,"out"),ze=e.getDegree(G,"both"),Xe=a==null?void 0:a(le,ze);if(Xe){const[Je,st,Et]=Xe;he=q-Je,ve=te-st,Te=Et}else he=q-v[0],ve=te-v[1],ge=ue-v[2];if(Te&&(r[G].x-=Te*he/K,r[G].y-=Te*ve/K,r[G].z-=Te*ge/K),D){const{leaf:Je,single:st,others:Et,center:mt}=D,{x:ct,y:ht,z:At,centerStrength:kt}=(mt==null?void 0:mt(le,o,l,u,h))||{x:0,y:0,z:0,centerStrength:0};if(!sn(ct)||!sn(ht))return;const Ht=(q-ct)/K,en=(te-ht)/K,on=(ue-At)/K;if(kt&&(r[G].x-=kt*Ht,r[G].y-=kt*en,r[G].z-=kt*on),ze===0){const yn=st(le);if(!yn)return;r[G].x-=yn*Ht,r[G].y-=yn*en,r[G].z-=yn*on;return}if(Oe===0||Ne===0){const yn=Je(le,o,l);if(!yn)return;r[G].x-=yn*Ht,r[G].y-=yn*en,r[G].z-=yn*on;return}const tn=Et(le);if(!tn)return;r[G].x-=tn*Ht,r[G].y-=tn*en,r[G].z-=tn*on}})}updateVelocity(e,t,r,i){const{damping:a,maxSpeed:s,interval:o,dimensions:l}=i,u=e.getAllNodes();u!=null&&u.length&&u.forEach(h=>{const{id:v}=h;let E=(r[v].x+t[v].x*o)*a||.01,D=(r[v].y+t[v].y*o)*a||.01,F=l===3?(r[v].z+t[v].z*o)*a||.01:0;const G=Math.sqrt(E*E+D*D+F*F);if(G>s){const H=s/G;E=H*E,D=H*D,F=H*F}r[v]={x:E,y:D,z:F}})}updatePosition(e,t,r,i){const{distanceThresholdMode:a,interval:s,dimensions:o}=i,l=t.getAllNodes();if(!(l!=null&&l.length)){this.judgingDistance=0;return}let u=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),l.forEach(h=>{const{id:v}=h,E=e.getNode(v);if(sn(E.data.fx)&&sn(E.data.fy)){t.mergeNodeData(v,{x:E.data.fx,y:E.data.fy,z:o===3?E.data.fz:void 0});return}const D=r[v].x*s,F=r[v].y*s,G=o===3?r[v].z*s:0;t.mergeNodeData(v,{x:h.data.x+D,y:h.data.y+F,z:h.data.z+G});const H=Math.sqrt(D*D+F*F+G*G);switch(a){case"max":this.judgingDistance<H&&(this.judgingDistance=H);break;case"min":this.judgingDistance>H&&(this.judgingDistance=H);break;default:u=u+H;break}}),(!a||a==="mean")&&(this.judgingDistance=u/l.length)}}const tx=(n,e)=>{const t=n.getAllNodes();if(!(t!=null&&t.length))return{};const r={};return t.forEach((i,a)=>{n.getDegree(i.id,"both")===1&&(r[i.id]=hN(n,"leaf",i,e))}),r},hN=(n,e,t,r)=>{const i=n.getDegree(t.id,"in"),a=n.getDegree(t.id,"out");let s=t,o=[];i===0?(s=n.getSuccessors(t.id)[0],o=n.getNeighbors(s.id)):a===0&&(s=n.getPredecessors(t.id)[0],o=n.getNeighbors(s.id)),o=o.filter(u=>n.getDegree(u.id,"in")===0||n.getDegree(u.id,"out")===0);const l=fN(n,e,r,t,o);return{coreNode:s,siblingLeaves:o,sameTypeLeaves:l}},fN=(n,e,t,r,i)=>{const a=r.data[t]||"";let s=(i==null?void 0:i.filter(o=>o.data[t]===a))||[];return e==="leaf"&&(s=s.filter(o=>n.getDegree(o.id,"in")===0||n.getDegree(o.id,"out")===0)),s},nx=n=>{const e={x:0,y:0};n.forEach(r=>{const{x:i,y:a}=r.data;e.x+=i||0,e.y+=a||0});const t=n.length||1;return{x:e.x/t,y:e.y/t}},A0=(n,e)=>e.map(t=>{const{id:r,data:i}=t,a=n.getNode(r);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var rr=Y(95484);const Y9=rr.XA,Q9=rr.a_,J9=rr.yQ,q9=rr.Hs,$9=rr.Ec,eW=rr.dx,tW=rr.LU,nW=rr.Rm,Ro=rr.y3,rW=rr.qK,iW=rr.pb,aW=rr.j,sW=rr.sO,oW=rr.BZ,lW=rr.EK,uW=rr.Db,cW=rr.Fx,hW=rr.tU,fW=rr.Ym,dW=rr.rs,vW=rr.QR,gW=rr.TB,pW=rr.oH,rx=rr.Sc,mW=rr.BN,yW=rr.it,_W=rr.$r,EW=rr.QM,xW=rr.AV;var bW=(rr.y3,rr.y3);const wW=rr.GH,MW=rr.SO,AW=rr.uZ,TW=rr.yU,SW=rr.F1,PW=rr.re,ix=n=>{const e=[],t=n.length;for(let r=0;r<t;r+=1){e[r]=[];for(let i=0;i<t;i+=1)r===i?e[r][i]=0:n[r][i]===0||!n[r][i]?e[r][i]=1/0:e[r][i]=n[r][i]}for(let r=0;r<t;r+=1)for(let i=0;i<t;i+=1)for(let a=0;a<t;a+=1)e[i][a]>e[i][r]+e[r][a]&&(e[i][a]=e[i][r]+e[r][a]);return e},ax=(n,e)=>{const{nodes:t,edges:r}=n,i=[],a={};if(!t)throw new Error("invalid nodes data!");return t&&t.forEach((s,o)=>{a[s.id]=o;const l=[];i.push(l)}),r==null||r.forEach(s=>{const{source:o,target:l}=s,u=a[o],h=a[l];u===void 0||h===void 0||(i[u][h]=1,e||(i[h][u]=1))}),i},dN=(n,e)=>{const t=[];return n.forEach(r=>{const i=[];r.forEach(a=>{i.push(a*e)}),t.push(i)}),t},vN=n=>{let e=1/0,t=1/0,r=-1/0,i=-1/0;return n.forEach(a=>{let s=a.data.size;to(s)?s.length===1&&(s=[s[0],s[0]]):sn(s)?s=[s,s]:(s===void 0||isNaN(s))&&(s=[30,30]);const o=[s[0]/2,s[1]/2],l=a.data.x-o[0],u=a.data.x+o[0],h=a.data.y-o[1],v=a.data.y+o[1];e>l&&(e=l),t>h&&(t=h),r<u&&(r=u),i<v&&(i=v)}),{minX:e,minY:t,maxX:r,maxY:i}},sx=(n,e)=>Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)),T0=(n,e,t,r="TB",i,a={})=>{if(!(e!=null&&e.length))return;const{stopBranchFn:s,stopAllFn:o}=a;for(let l=0;l<e.length;l++){const u=e[l];if(n.hasNode(u.id)&&!(s!=null&&s(u))){if(o!=null&&o(u))return;r==="TB"&&t(u),T0(n,n.getChildren(u.id,i),t,r,i,a),r!=="TB"&&t(u)}}},gN={center:[0,0],linkDistance:50};class ox{constructor(e={}){this.options=e,this.id="mds",this.options=Object.assign(Object.assign({},gN),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,e,t)})}genericMDSLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{center:a=[0,0],linkDistance:s=50}=i,o=t.getAllNodes(),l=t.getAllEdges();if(!(o!=null&&o.length)||o.length===1)return xl(t,e,a);const u=ax({nodes:o,edges:l},!1),h=ix(u);pN(h);const v=dN(h,s),E=mN(v),D=[];return E.forEach((G,H)=>{const K=Na(o[H]);K.data.x=G[0]+a[0],K.data.y=G[1]+a[1],D.push(K)}),e&&D.forEach(G=>t.mergeNodeData(G.id,{x:G.data.x,y:G.data.y})),{nodes:D,edges:l}})}}const pN=n=>{let e=-999999;n.forEach(t=>{t.forEach(r=>{r!==1/0&&e<r&&(e=r)})}),n.forEach((t,r)=>{t.forEach((i,a)=>{i===1/0&&(n[r][a]=e)})})},mN=n=>{const t=Ro.mul(Ro.pow(n,2),-.5),r=t.mean("row"),i=t.mean("column"),a=t.mean();t.add(a).subRowVector(r).subColumnVector(i);const s=new rx(t),o=Ro.sqrt(s.diagonalMatrix).diagonal();return s.leftSingularVectors.toJSON().map(l=>Ro.mul([l],[o]).toJSON()[0].splice(0,2))};function S0(n){return!!n.tick&&!!n.stop}const yN={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},_N={center:[0,0],comboPadding:10,treeKey:"combo"};class EN{constructor(e={}){this.options=e,this.id="comboCombined",this.options=Object.assign(Object.assign({},_N),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,e,t)})}genericComboCombinedLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),r)),{center:a,treeKey:s,outerLayout:o}=i,l=t.getAllNodes().filter(ge=>!ge.data._isCombo),u=t.getAllNodes().filter(ge=>ge.data._isCombo),h=t.getAllEdges(),v=l==null?void 0:l.length;if(!v||v===1)return xl(t,e,a);const E=[],D=new Map;l.forEach(ge=>{D.set(ge.id,ge)});const F=new Map;u.forEach(ge=>{F.set(ge.id,ge)});const G=new Map,H=this.getInnerGraphs(t,s,D,F,h,i,G);yield Promise.all(H);const K=new Map,q=[],te=new Map;let ue=!0;t.getRoots(s).forEach(ge=>{const Te=G.get(ge.id),Oe=F.get(ge.id)||D.get(ge.id),Ne={id:ge.id,data:Object.assign(Object.assign({},ge.data),{x:Te.data.x||Oe.data.x,y:Te.data.y||Oe.data.y,fx:Te.data.fx||Oe.data.fx,fy:Te.data.fy||Oe.data.fy,mass:Te.data.mass||Oe.data.mass,size:Te.data.size})};q.push(Ne),K.set(ge.id,!0),!isNaN(Ne.data.x)&&Ne.data.x!==0&&!isNaN(Ne.data.y)&&Ne.data.y!==0?ue=!1:(Ne.data.x=Math.random()*100,Ne.data.y=Math.random()*100),T0(t,[ge],ze=>{ze.id!==ge.id&&te.set(ze.id,ge.id)},"TB",s)});const le=[];h.forEach(ge=>{const Te=te.get(ge.source)||ge.source,Oe=te.get(ge.target)||ge.target;Te!==Oe&&K.has(Te)&&K.has(Oe)&&le.push({id:ge.id,source:Te,target:Oe,data:{}})});let he;if(q!=null&&q.length){if(q.length===1)q[0].data.x=a[0],q[0].data.y=a[1];else{const ge=new hi({nodes:q,edges:le}),Te=o||new ex;ue&&yN[Te.id]&&(yield(q.length<100?new ox:new x0).assign(ge));const Oe=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},Te.id==="force"?{gravity:1,factor:4,linkDistance:(Ne,ze,Xe)=>{const Je=Math.max(...ze.data.size)||32,st=Math.max(...Xe.data.size)||32;return Je/2+st/2+200}}:{});he=yield lx(Te,ge,Oe)}G.forEach(ge=>{var Te;const Oe=he.nodes.find(Xe=>Xe.id===ge.id);if(Oe){const{x:Xe,y:Je}=Oe.data;ge.data.visited=!0,ge.data.x=Xe,ge.data.y=Je,E.push({id:ge.id,data:{x:Xe,y:Je}})}const{x:Ne,y:ze}=ge.data;(Te=ge.data.nodes)===null||Te===void 0||Te.forEach(Xe=>{E.push({id:Xe.id,data:{x:Xe.data.x+Ne,y:Xe.data.y+ze}})})}),G.forEach(({data:ge})=>{const{x:Te,y:Oe,visited:Ne,nodes:ze}=ge;ze==null||ze.forEach(Xe=>{if(!Ne){const Je=E.find(st=>st.id===Xe.id);Je.data.x+=Te||0,Je.data.y+=Oe||0}})})}return e&&E.forEach(ge=>{t.mergeNodeData(ge.id,{x:ge.data.x,y:ge.data.y})}),{nodes:E,edges:h}})}initVals(e){const t=Object.assign({},e),{nodeSize:r,spacing:i,comboPadding:a}=e;let s,o;if(sn(i)?o=()=>i:fn(i)?o=i:o=()=>0,t.spacing=o,!r)s=u=>{const h=o(u);return u.size?to(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+h)/2:si(u.size)?((u.size.width>u.size.height?u.size.width:u.size.height)+h)/2:(u.size+h)/2:32+h/2};else if(fn(r))s=u=>{const h=r(u),v=o(u);return to(u.size)?((u.size[0]>u.size[1]?u.size[0]:u.size[1])+v)/2:((h||32)+v)/2};else if(to(r)){const h=(r[0]>r[1]?r[0]:r[1])/2;s=v=>h+o(v)/2}else{const u=r/2;s=h=>u+o(h)/2}t.nodeSize=s;let l;return sn(a)?l=()=>a:to(a)?l=()=>Math.max.apply(null,a):fn(a)?l=a:l=()=>0,t.comboPadding=l,t}getInnerGraphs(e,t,r,i,a,s,o){const{nodeSize:l,comboPadding:u,spacing:h,innerLayout:v}=s,E=v||new x0({}),D={center:[0,0],preventOverlap:!0,nodeSpacing:h},F=[],G=H=>{let K=(u==null?void 0:u(H))||10;return to(K)&&(K=Math.max(...K)),{size:K?[K*2,K*2]:[30,30],padding:K}};return e.getRoots(t).forEach(H=>{o.set(H.id,{id:H.id,data:{nodes:[],size:G(H).size}});let K=Promise.resolve();T0(e,[H],q=>{var te;if(!q.data._isCombo)return;const{size:ue,padding:le}=G(q);if(!(!((te=e.getChildren(q.id,t))===null||te===void 0)&&te.length))o.set(q.id,{id:q.id,data:Object.assign(Object.assign({},q.data),{size:ue})});else{const he=o.get(q.id);o.set(q.id,{id:q.id,data:Object.assign({nodes:[]},he==null?void 0:he.data)});const ve=new Map,ge=e.getChildren(q.id,t).map(Ne=>{if(Ne.data._isCombo)return o.has(Ne.id)||o.set(Ne.id,{id:Ne.id,data:Object.assign({},Ne.data)}),ve.set(Ne.id,!0),o.get(Ne.id);const ze=r.get(Ne.id)||i.get(Ne.id);return ve.set(Ne.id,!0),{id:Ne.id,data:Object.assign(Object.assign({},ze.data),Ne.data)}}),Te={nodes:ge,edges:a.filter(Ne=>ve.has(Ne.source)&&ve.has(Ne.target))};let Oe=1/0;ge.forEach(Ne=>{var ze;let{size:Xe}=Ne.data;Xe||(Xe=((ze=o.get(Ne.id))===null||ze===void 0?void 0:ze.data.size)||(l==null?void 0:l(Ne))||[30,30]),sn(Xe)&&(Xe=[Xe,Xe]);const[Je,st]=Xe;Oe>Je&&(Oe=Je),Oe>st&&(Oe=st),Ne.data.size=Xe}),K=K.then(()=>(0,xe.mG)(this,void 0,void 0,function*(){const Ne=new hi(Te);yield lx(E,Ne,D,!0);const{minX:ze,minY:Xe,maxX:Je,maxY:st}=vN(ge),Et={x:(Je+ze)/2,y:(st+Xe)/2};Te.nodes.forEach(ct=>{ct.data.x-=Et.x,ct.data.y-=Et.y});const mt=[Math.max(Je-ze,Oe)+le*2,Math.max(st-Xe,Oe)+le*2];o.get(q.id).data.size=mt,o.get(q.id).data.nodes=ge}))}return!0},"BT",t),F.push(K)}),F}}function lx(n,e,t,r){var i;return(0,xe.mG)(this,void 0,void 0,function*(){return S0(n)?(n.execute(e,t),n.stop(),n.tick((i=t.iterations)!==null&&i!==void 0?i:300)):r?yield n.assign(e,t):yield n.execute(e,t)})}function Si(n){return function(){return n}}function Io(n){return(n()-.5)*1e-6}function xN(n){return n.index}function ux(n,e){var t=n.get(e);if(!t)throw new Error("node not found: "+e);return t}function bN(n){var e=xN,t=v,r,i=Si(30),a,s,o,l,u,h=1;n==null&&(n=[]);function v(H){return 1/Math.min(o[H.source.index],o[H.target.index])}function E(H){for(var K=0,q=n.length;K<h;++K)for(var te=0,ue,le,he,ve,ge,Te,Oe;te<q;++te)ue=n[te],le=ue.source,he=ue.target,ve=he.x+he.vx-le.x-le.vx||Io(u),ge=he.y+he.vy-le.y-le.vy||Io(u),Te=Math.sqrt(ve*ve+ge*ge),Te=(Te-a[te])/Te*H*r[te],ve*=Te,ge*=Te,he.vx-=ve*(Oe=l[te]),he.vy-=ge*Oe,le.vx+=ve*(Oe=1-Oe),le.vy+=ge*Oe}function D(){if(s){var H,K=s.length,q=n.length,te=new Map(s.map((le,he)=>[e(le,he,s),le])),ue;for(H=0,o=new Array(K);H<q;++H)ue=n[H],ue.index=H,typeof ue.source!="object"&&(ue.source=ux(te,ue.source)),typeof ue.target!="object"&&(ue.target=ux(te,ue.target)),o[ue.source.index]=(o[ue.source.index]||0)+1,o[ue.target.index]=(o[ue.target.index]||0)+1;for(H=0,l=new Array(q);H<q;++H)ue=n[H],l[H]=o[ue.source.index]/(o[ue.source.index]+o[ue.target.index]);r=new Array(q),F(),a=new Array(q),G()}}function F(){if(s)for(var H=0,K=n.length;H<K;++H)r[H]=+t(n[H],H,n)}function G(){if(s)for(var H=0,K=n.length;H<K;++H)a[H]=+i(n[H],H,n)}return E.initialize=function(H,K){s=H,u=K,D()},E.links=function(H){return arguments.length?(n=H,D(),E):n},E.id=function(H){return arguments.length?(e=H,E):e},E.iterations=function(H){return arguments.length?(h=+H,E):h},E.strength=function(H){return arguments.length?(t=typeof H=="function"?H:Si(+H),F(),E):t},E.distance=function(H){return arguments.length?(i=typeof H=="function"?H:Si(+H),G(),E):i},E}var wN={value:()=>{}};function cx(){for(var n=0,e=arguments.length,t={},r;n<e;++n){if(!(r=arguments[n]+"")||r in t||/[\s.]/.test(r))throw new Error("illegal type: "+r);t[r]=[]}return new Qf(t)}function Qf(n){this._=n}function MN(n,e){return n.trim().split(/^|\s+/).map(function(t){var r="",i=t.indexOf(".");if(i>=0&&(r=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:r}})}Qf.prototype=cx.prototype={constructor:Qf,on:function(n,e){var t=this._,r=MN(n+"",t),i,a=-1,s=r.length;if(arguments.length<2){for(;++a<s;)if((i=(n=r[a]).type)&&(i=AN(t[i],n.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(n=r[a]).type)t[i]=hx(t[i],n.name,e);else if(e==null)for(i in t)t[i]=hx(t[i],n.name,null);return this},copy:function(){var n={},e=this._;for(var t in e)n[t]=e[t].slice();return new Qf(n)},call:function(n,e){if((i=arguments.length-2)>0)for(var t=new Array(i),r=0,i,a;r<i;++r)t[r]=arguments[r+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(a=this._[n],r=0,i=a.length;r<i;++r)a[r].value.apply(e,t)},apply:function(n,e,t){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var r=this._[n],i=0,a=r.length;i<a;++i)r[i].value.apply(e,t)}};function AN(n,e){for(var t=0,r=n.length,i;t<r;++t)if((i=n[t]).name===e)return i.value}function hx(n,e,t){for(var r=0,i=n.length;r<i;++r)if(n[r].name===e){n[r]=wN,n=n.slice(0,r).concat(n.slice(r+1));break}return t!=null&&n.push({name:e,value:t}),n}var TN=cx,iu=0,yc=0,_c=0,fx=1e3,Jf,Ec,qf=0,bl=0,$f=0,xc=typeof performance=="object"&&performance.now?performance:Date,dx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function vx(){return bl||(dx(SN),bl=xc.now()+$f)}function SN(){bl=0}function P0(){this._call=this._time=this._next=null}P0.prototype=gx.prototype={constructor:P0,restart:function(n,e,t){if(typeof n!="function")throw new TypeError("callback is not a function");t=(t==null?vx():+t)+(e==null?0:+e),!this._next&&Ec!==this&&(Ec?Ec._next=this:Jf=this,Ec=this),this._call=n,this._time=t,O0()},stop:function(){this._call&&(this._call=null,this._time=1/0,O0())}};function gx(n,e,t){var r=new P0;return r.restart(n,e,t),r}function PN(){vx(),++iu;for(var n=Jf,e;n;)(e=bl-n._time)>=0&&n._call.call(void 0,e),n=n._next;--iu}function px(){bl=(qf=xc.now())+$f,iu=yc=0;try{PN()}finally{iu=0,CN(),bl=0}}function ON(){var n=xc.now(),e=n-qf;e>fx&&($f-=e,qf=n)}function CN(){for(var n,e=Jf,t,r=1/0;e;)e._call?(r>e._time&&(r=e._time),n=e,e=e._next):(t=e._next,e._next=null,e=n?n._next=t:Jf=t);Ec=n,O0(r)}function O0(n){if(!iu){yc&&(yc=clearTimeout(yc));var e=n-bl;e>24?(n<1/0&&(yc=setTimeout(px,n-xc.now()-$f)),_c&&(_c=clearInterval(_c))):(_c||(qf=xc.now(),_c=setInterval(ON,fx)),iu=1,dx(px))}}const DN=1664525,LN=1013904223,mx=4294967296;function RN(){let n=1;return()=>(n=(DN*n+LN)%mx)/mx}function IN(n){return n.x}function NN(n){return n.y}var BN=10,kN=Math.PI*(3-Math.sqrt(5));function FN(n){var e,t=1,r=.001,i=1-Math.pow(r,1/300),a=0,s=.6,o=new Map,l=gx(v),u=TN("tick","end"),h=RN();n==null&&(n=[]);function v(){E(),u.call("tick",e),t<r&&(l.stop(),u.call("end",e))}function E(G){var H,K=n.length,q;G===void 0&&(G=1);for(var te=0;te<G;++te)for(t+=(a-t)*i,o.forEach(function(ue){ue(t)}),H=0;H<K;++H)q=n[H],q.fx==null?q.x+=q.vx*=s:(q.x=q.fx,q.vx=0),q.fy==null?q.y+=q.vy*=s:(q.y=q.fy,q.vy=0);return e}function D(){for(var G=0,H=n.length,K;G<H;++G){if(K=n[G],K.index=G,K.fx!=null&&(K.x=K.fx),K.fy!=null&&(K.y=K.fy),isNaN(K.x)||isNaN(K.y)){var q=BN*Math.sqrt(.5+G),te=G*kN;K.x=q*Math.cos(te),K.y=q*Math.sin(te)}(isNaN(K.vx)||isNaN(K.vy))&&(K.vx=K.vy=0)}}function F(G){return G.initialize&&G.initialize(n,h),G}return D(),e={tick:E,restart:function(){return l.restart(v),e},stop:function(){return l.stop(),e},nodes:function(G){return arguments.length?(n=G,D(),o.forEach(F),e):n},alpha:function(G){return arguments.length?(t=+G,e):t},alphaMin:function(G){return arguments.length?(r=+G,e):r},alphaDecay:function(G){return arguments.length?(i=+G,e):+i},alphaTarget:function(G){return arguments.length?(a=+G,e):a},velocityDecay:function(G){return arguments.length?(s=1-G,e):1-s},randomSource:function(G){return arguments.length?(h=G,o.forEach(F),e):h},force:function(G,H){return arguments.length>1?(H==null?o.delete(G):o.set(G,F(H)),e):o.get(G)},find:function(G,H,K){var q=0,te=n.length,ue,le,he,ve,ge;for(K==null?K=1/0:K*=K,q=0;q<te;++q)ve=n[q],ue=G-ve.x,le=H-ve.y,he=ue*ue+le*le,he<K&&(ge=ve,K=he);return ge},on:function(G,H){return arguments.length>1?(u.on(G,H),e):u.on(G)}}}function zN(){var n,e,t,r,i=Si(-30),a,s=1,o=1/0,l=.81;function u(D){var F,G=n.length,H=Yf(n,IN,NN).visitAfter(v);for(r=D,F=0;F<G;++F)e=n[F],H.visit(E)}function h(){if(n){var D,F=n.length,G;for(a=new Array(F),D=0;D<F;++D)G=n[D],a[G.index]=+i(G,D,n)}}function v(D){var F=0,G,H,K=0,q,te,ue;if(D.length){for(q=te=ue=0;ue<4;++ue)(G=D[ue])&&(H=Math.abs(G.value))&&(F+=G.value,K+=H,q+=H*G.x,te+=H*G.y);D.x=q/K,D.y=te/K}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 E(D,F,G,H){if(!D.value)return!0;var K=D.x-e.x,q=D.y-e.y,te=H-F,ue=K*K+q*q;if(te*te/l<ue)return ue<o&&(K===0&&(K=Io(t),ue+=K*K),q===0&&(q=Io(t),ue+=q*q),ue<s&&(ue=Math.sqrt(s*ue)),e.vx+=K*D.value*r/ue,e.vy+=q*D.value*r/ue),!0;if(D.length||ue>=o)return;(D.data!==e||D.next)&&(K===0&&(K=Io(t),ue+=K*K),q===0&&(q=Io(t),ue+=q*q),ue<s&&(ue=Math.sqrt(s*ue)));do D.data!==e&&(te=a[D.data.index]*r/ue,e.vx+=K*te,e.vy+=q*te);while(D=D.next)}return u.initialize=function(D,F){n=D,t=F,h()},u.strength=function(D){return arguments.length?(i=typeof D=="function"?D:Si(+D),h(),u):i},u.distanceMin=function(D){return arguments.length?(s=D*D,u):Math.sqrt(s)},u.distanceMax=function(D){return arguments.length?(o=D*D,u):Math.sqrt(o)},u.theta=function(D){return arguments.length?(l=D*D,u):Math.sqrt(l)},u}function UN(n,e){var t,r=1;n==null&&(n=0),e==null&&(e=0);function i(){var a,s=t.length,o,l=0,u=0;for(a=0;a<s;++a)o=t[a],l+=o.x,u+=o.y;for(l=(l/s-n)*r,u=(u/s-e)*r,a=0;a<s;++a)o=t[a],o.x-=l,o.y-=u}return i.initialize=function(a){t=a},i.x=function(a){return arguments.length?(n=+a,i):n},i.y=function(a){return arguments.length?(e=+a,i):e},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function WN(n){return n.x+n.vx}function GN(n){return n.y+n.vy}function HN(n){var e,t,r,i=1,a=1;typeof n!="function"&&(n=Si(n==null?1:+n));function s(){for(var u,h=e.length,v,E,D,F,G,H,K=0;K<a;++K)for(v=Yf(e,WN,GN).visitAfter(o),u=0;u<h;++u)E=e[u],G=t[E.index],H=G*G,D=E.x+E.vx,F=E.y+E.vy,v.visit(q);function q(te,ue,le,he,ve){var ge=te.data,Te=te.r,Oe=G+Te;if(ge){if(ge.index>E.index){var Ne=D-ge.x-ge.vx,ze=F-ge.y-ge.vy,Xe=Ne*Ne+ze*ze;Xe<Oe*Oe&&(Ne===0&&(Ne=Io(r),Xe+=Ne*Ne),ze===0&&(ze=Io(r),Xe+=ze*ze),Xe=(Oe-(Xe=Math.sqrt(Xe)))/Xe*i,E.vx+=(Ne*=Xe)*(Oe=(Te*=Te)/(H+Te)),E.vy+=(ze*=Xe)*Oe,ge.vx-=Ne*(Oe=1-Oe),ge.vy-=ze*Oe)}return}return ue>D+Oe||he<D-Oe||le>F+Oe||ve<F-Oe}}function o(u){if(u.data)return u.r=t[u.data.index];for(var h=u.r=0;h<4;++h)u[h]&&u[h].r>u.r&&(u.r=u[h].r)}function l(){if(e){var u,h=e.length,v;for(t=new Array(h),u=0;u<h;++u)v=e[u],t[v.index]=+n(v,u,e)}}return s.initialize=function(u,h){e=u,r=h,l()},s.iterations=function(u){return arguments.length?(a=+u,s):a},s.strength=function(u){return arguments.length?(i=+u,s):i},s.radius=function(u){return arguments.length?(n=typeof u=="function"?u:Si(+u),l(),s):n},s}function jN(n,e,t){var r,i=Si(.1),a,s;typeof n!="function"&&(n=Si(+n)),e==null&&(e=0),t==null&&(t=0);function o(u){for(var h=0,v=r.length;h<v;++h){var E=r[h],D=E.x-e||1e-6,F=E.y-t||1e-6,G=Math.sqrt(D*D+F*F),H=(s[h]-G)*a[h]*u/G;E.vx+=D*H,E.vy+=F*H}}function l(){if(r){var u,h=r.length;for(a=new Array(h),s=new Array(h),u=0;u<h;++u)s[u]=+n(r[u],u,r),a[u]=isNaN(s[u])?0:+i(r[u],u,r)}}return o.initialize=function(u){r=u,l()},o.strength=function(u){return arguments.length?(i=typeof u=="function"?u:Si(+u),l(),o):i},o.radius=function(u){return arguments.length?(n=typeof u=="function"?u:Si(+u),l(),o):n},o.x=function(u){return arguments.length?(e=+u,o):e},o.y=function(u){return arguments.length?(t=+u,o):t},o}function VN(n){var e=Si(.1),t,r,i;typeof n!="function"&&(n=Si(n==null?0:+n));function a(o){for(var l=0,u=t.length,h;l<u;++l)h=t[l],h.vx+=(i[l]-h.x)*r[l]*o}function s(){if(t){var o,l=t.length;for(r=new Array(l),i=new Array(l),o=0;o<l;++o)r[o]=isNaN(i[o]=+n(t[o],o,t))?0:+e(t[o],o,t)}}return a.initialize=function(o){t=o,s()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:Si(+o),s(),a):e},a.x=function(o){return arguments.length?(n=typeof o=="function"?o:Si(+o),s(),a):n},a}function ZN(n){var e=Si(.1),t,r,i;typeof n!="function"&&(n=Si(n==null?0:+n));function a(o){for(var l=0,u=t.length,h;l<u;++l)h=t[l],h.vy+=(i[l]-h.y)*r[l]*o}function s(){if(t){var o,l=t.length;for(r=new Array(l),i=new Array(l),o=0;o<l;++o)r[o]=isNaN(i[o]=+n(t[o],o,t))?0:+e(t[o],o,t)}}return a.initialize=function(o){t=o,s()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:Si(+o),s(),a):e},a.y=function(o){return arguments.length?(n=typeof o=="function"?o:Si(+o),s(),a):n},a}class KN{constructor(e){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:bN,manyBody:zN,center:UN,collide:HN,radial:jN,x:VN,y:ZN},this.options={link:{id:t=>t.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},ia(this.options,e),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,e,t)})}stop(){this.simulation.stop()}tick(e){return this.simulation.tick(e),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(e,t){const r=this.context.nodes.find(i=>i.id===e);r&&t.forEach((i,a)=>{if(typeof i=="number"||i===null){const s=["fx","fy","fz"][a];r[s]=i}})}getOptions(e){var t,r;const i=ia({},this.options,e);return i.collide&&((t=i.collide)===null||t===void 0?void 0:t.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(r=i.nodeSize)!==null&&r!==void 0?r: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(e,t,r){var i;return(0,xe.mG)(this,void 0,void 0,function*(){const a=this.getOptions(r),s=t.getAllNodes().map(({id:h,data:v})=>Object.assign(Object.assign({id:h},v),ml(v.data,this.config.inputNodeAttrs))),o=t.getAllEdges().map(h=>Object.assign({},h));Object.assign(this.context,{assign:e,nodes:s,edges:o,graph:t});const l=new Promise(h=>{this.resolver=h}),u=this.setSimulation(a);return u.nodes(s),(i=u.force("link"))===null||i===void 0||i.links(o),l})}getResult(){const{assign:e,nodes:t,edges:r,graph:i}=this.context,a=t.map(o=>({id:o.id,data:Object.assign(Object.assign({},o.data),ml(o,this.config.outputNodeAttrs))})),s=r.map(({id:o,source:l,target:u,data:h})=>({id:o,source:typeof l=="object"?l.id:l,target:typeof u=="object"?u.id:u,data:h}));return e&&a.forEach(o=>i.mergeNodeData(o.id,o.data)),{nodes:a,edges:s}}initSimulation(){return FN()}setSimulation(e){const t=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=t.on("tick",()=>{var r;return(r=e.onTick)===null||r===void 0?void 0:r.call(e,this.getResult())}).on("end",()=>{var r;return(r=this.resolver)===null||r===void 0?void 0:r.call(this,this.getResult())})),yx(t,this.config.simulationAttrs.map(r=>[r,e[r]])),Object.entries(this.forceMap).forEach(([r,i])=>{const a=r;if(e[r]){let s=t.force(a);s||(s=i(),t.force(a,s)),yx(s,Object.entries(e[a]))}else t.force(a,null)}),t}}const yx=(n,e)=>e.reduce((t,[r,i])=>!t[r]||i===void 0?t:t[r].call(n,i),n);var _x=Y(92546),XN=Y.n(_x);class ed{constructor(e){this.id="dagre",this.options={},Object.assign(this.options,ed.defaultOptions,e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,e,Object.assign(Object.assign({},this.options),t))})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,e,Object.assign(Object.assign({},this.options),t))})}genericDagreLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const{nodeSize:i}=r,a=new _x.graphlib.Graph;a.setGraph(r),a.setDefaultEdgeLabel(()=>({}));const s=t.getAllNodes(),o=t.getAllEdges();[...s,...o].some(({id:u})=>sn(u))&&console.error("Dagre layout only support string id, it will convert number to string."),t.getAllNodes().forEach(u=>{const{id:h}=u,v=Object.assign({},u.data);if(i!==void 0){const[E,D]=mc(fn(i)?i(u):i);Object.assign(v,{width:E,height:D})}a.setNode(h.toString(),v)}),t.getAllEdges().forEach(({id:u,source:h,target:v})=>{a.setEdge(h.toString(),v.toString(),{id:u})}),XN().layout(a);const l={nodes:[],edges:[]};return a.nodes().forEach(u=>{const h=a.node(u);l.nodes.push({id:u,data:h}),e&&t.mergeNodeData(u,h)}),a.edges().forEach(u=>{const h=a.edge(u),{id:v}=h,E=(0,xe._T)(h,["id"]),{v:D,w:F}=u;l.edges.push({id:v,source:D,target:F,data:E}),e&&t.mergeEdgeData(v,E)}),l})}}ed.defaultOptions={};class C0{constructor(e){this.id=e.id||0,this.rx=e.rx,this.ry=e.ry,this.fx=0,this.fy=0,this.mass=e.mass,this.degree=e.degree,this.g=e.g||0}distanceTo(e){const t=this.rx-e.rx,r=this.ry-e.ry;return Math.hypot(t,r)}setPos(e,t){this.rx=e,this.ry=t}resetForce(){this.fx=0,this.fy=0}addForce(e){const t=e.rx-this.rx,r=e.ry-this.ry;let i=Math.hypot(t,r);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(e.degree+1)/i;this.fx+=a*t/i,this.fy+=a*r/i}in(e){return e.contains(this.rx,this.ry)}add(e){const t=this.mass+e.mass,r=(this.rx*this.mass+e.rx*e.mass)/t,i=(this.ry*this.mass+e.ry*e.mass)/t,a=this.degree+e.degree,s={rx:r,ry:i,mass:t,degree:a};return new C0(s)}}class au{constructor(e){this.xmid=e.xmid,this.ymid=e.ymid,this.length=e.length,this.massCenter=e.massCenter||[0,0],this.mass=e.mass||1}getLength(){return this.length}contains(e,t){const r=this.length/2;return e<=this.xmid+r&&e>=this.xmid-r&&t<=this.ymid+r&&t>=this.ymid-r}NW(){const e=this.xmid-this.length/4,t=this.ymid+this.length/4,r=this.length/2,i={xmid:e,ymid:t,length:r};return new au(i)}NE(){const e=this.xmid+this.length/4,t=this.ymid+this.length/4,r=this.length/2,i={xmid:e,ymid:t,length:r};return new au(i)}SW(){const e=this.xmid-this.length/4,t=this.ymid-this.length/4,r=this.length/2,i={xmid:e,ymid:t,length:r};return new au(i)}SE(){const e=this.xmid+this.length/4,t=this.ymid-this.length/4,r=this.length/2,i={xmid:e,ymid:t,length:r};return new au(i)}}class su{constructor(e){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,e!=null&&(this.quad=e)}insert(e){if(this.body==null){this.body=e;return}this._isExternal()?(this.quad&&(this.NW=new su(this.quad.NW()),this.NE=new su(this.quad.NE()),this.SW=new su(this.quad.SW()),this.SE=new su(this.quad.SE())),this._putBody(this.body),this._putBody(e),this.body=this.body.add(e)):(this.body=this.body.add(e),this._putBody(e))}_putBody(e){this.quad&&(e.in(this.quad.NW())&&this.NW?this.NW.insert(e):e.in(this.quad.NE())&&this.NE?this.NE.insert(e):e.in(this.quad.SW())&&this.SW?this.SW.insert(e):e.in(this.quad.SE())&&this.SE&&this.SE.insert(e))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(e){if(!(this.body==null||e===this.body))if(this._isExternal())e.addForce(this.body);else{const t=this.quad?this.quad.getLength():0,r=this.body.distanceTo(e);t/r<this.theta?e.addForce(this.body):(this.NW&&this.NW.updateForce(e),this.NE&&this.NE.updateForce(e),this.SW&&this.SW.updateForce(e),this.SE&&this.SE.updateForce(e))}}}const YN={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 QN{constructor(e={}){this.options=e,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},YN),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,e,t)})}genericForceAtlas2Layout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=t.getAllEdges(),a=t.getAllNodes(),s=this.formatOptions(r,a.length),{width:o,height:l,prune:u,maxIteration:h,nodeSize:v,center:E}=s;if(!(a!=null&&a.length)||a.length===1)return xl(t,e,E);const D=a.map(K=>Na(K,[o,l])),F=i.filter(K=>{const{source:q,target:te}=K;return q!==te}),G=new hi({nodes:D,edges:F}),H=this.getSizes(G,v);if(this.run(G,t,h,H,e,s),u){for(let q=0;q<F.length;q+=1){const{source:te,target:ue}=F[q],le=G.getDegree(te),he=G.getDegree(te);if(le<=1){const ve=G.getNode(ue);G.mergeNodeData(te,{x:ve.data.x,y:ve.data.y})}else if(he<=1){const ve=G.getNode(te);G.mergeNodeData(ue,{x:ve.data.x,y:ve.data.y})}}const K=Object.assign(Object.assign({},s),{prune:!1,barnesHut:!1});this.run(G,t,100,H,e,K)}return{nodes:D,edges:i}})}getSizes(e,t){const r=e.getAllNodes(),i={};for(let a=0;a<r.length;a+=1){const s=r[a];i[s.id]=_0(t,void 0)(s)}return i}formatOptions(e={},t){const r=Object.assign(Object.assign({},this.options),e),{center:i,width:a,height:s,barnesHut:o,prune:l,maxIteration:u,kr:h,kg:v}=r;return r.width=!a&&typeof window!="undefined"?window.innerWidth:a,r.height=!s&&typeof window!="undefined"?window.innerHeight:s,r.center=i||[r.width/2,r.height/2],o===void 0&&t>250&&(r.barnesHut=!0),l===void 0&&t>100&&(r.prune=!0),u===0&&!l?(r.maxIteration=250,t<=200&&t>100?r.maxIteration=1e3:t>200&&(r.maxIteration=1200)):u===0&&l&&(r.maxIteration=100,t<=200&&t>100?r.maxIteration=500:t>200&&(r.maxIteration=950)),h||(r.kr=50,t>100&&t<=500?r.kr=20:t>500&&(r.kr=1)),v||(r.kg=20,t>100&&t<=500?r.kg=10:t>500&&(r.kg=1)),r}run(e,t,r,i,a,s){const{kr:o,barnesHut:l,onTick:u}=s,h=e.getAllNodes();let v=0,E=r;const D={},F={},G={};for(let H=0;H<h.length;H+=1){const{data:K,id:q}=h[H];if(D[q]=[0,0],l){const te={id:H,rx:K.x,ry:K.y,mass:1,g:o,degree:e.getDegree(q)};G[q]=new C0(te)}}for(;E>0;)v=this.oneStep(e,{iter:E,preventOverlapIters:50,krPrime:100,sg:v,forces:D,preForces:F,bodies:G,sizes:i},s),E--,u==null||u({nodes:h,edges:t.getAllEdges()});return e}oneStep(e,t,r){const{iter:i,preventOverlapIters:a,krPrime:s,sg:o,preForces:l,bodies:u,sizes:h}=t;let{forces:v}=t;const{preventOverlap:E,barnesHut:D}=r,F=e.getAllNodes();for(let G=0;G<F.length;G+=1){const{id:H}=F[G];l[H]=[...v[H]],v[H]=[0,0]}return v=this.getAttrForces(e,i,a,h,v,r),D&&(E&&i>a||!E)?v=this.getOptRepGraForces(e,v,u,r):v=this.getRepGraForces(e,i,a,v,s,h,r),this.updatePos(e,v,l,o,r)}getAttrForces(e,t,r,i,a,s){const{preventOverlap:o,dissuadeHubs:l,mode:u,prune:h}=s,v=e.getAllEdges();for(let E=0;E<v.length;E+=1){const{source:D,target:F}=v[E],G=e.getNode(D),H=e.getNode(F),K=e.getDegree(D),q=e.getDegree(F);if(h&&(K<=1||q<=1))continue;const te=[H.data.x-G.data.x,H.data.y-G.data.y];let ue=Math.hypot(te[0],te[1]);ue=ue<1e-4?1e-4:ue,te[0]=te[0]/ue,te[1]=te[1]/ue,o&&t<r&&(ue=ue-i[D]-i[F]);let le=ue,he=le;u==="linlog"&&(le=Math.log(1+ue),he=le),l&&(le=ue/K,he=ue/q),o&&t<r&&ue<=0?(le=0,he=0):o&&t<r&&ue>0&&(le=ue,he=ue),a[D][0]+=le*te[0],a[F][0]-=he*te[0],a[D][1]+=le*te[1],a[F][1]-=he*te[1]}return a}getOptRepGraForces(e,t,r,i){const{kg:a,center:s,prune:o}=i,l=e.getAllNodes(),u=l.length;let h=9e10,v=-9e10,E=9e10,D=-9e10;for(let q=0;q<u;q+=1){const{id:te,data:ue}=l[q];o&&e.getDegree(te)<=1||(r[te].setPos(ue.x,ue.y),ue.x>=v&&(v=ue.x),ue.x<=h&&(h=ue.x),ue.y>=D&&(D=ue.y),ue.y<=E&&(E=ue.y))}const F=Math.max(v-h,D-E),G={xmid:(v+h)/2,ymid:(D+E)/2,length:F,massCenter:s,mass:u},H=new au(G),K=new su(H);for(let q=0;q<u;q+=1){const{id:te}=l[q];o&&e.getDegree(te)<=1||r[te].in(H)&&K.insert(r[te])}for(let q=0;q<u;q+=1){const{id:te,data:ue}=l[q],le=e.getDegree(te);if(o&&le<=1)continue;r[te].resetForce(),K.updateForce(r[te]),t[te][0]-=r[te].fx,t[te][1]-=r[te].fy;const he=[ue.x-s[0],ue.y-s[1]];let ve=Math.hypot(he[0],he[1]);ve=ve<1e-4?1e-4:ve,he[0]=he[0]/ve,he[1]=he[1]/ve;const ge=a*(le+1);t[te][0]-=ge*he[0],t[te][1]-=ge*he[1]}return t}getRepGraForces(e,t,r,i,a,s,o){const{preventOverlap:l,kr:u,kg:h,center:v,prune:E}=o,D=e.getAllNodes(),F=D.length;for(let G=0;G<F;G+=1){const H=D[G],K=e.getDegree(H.id);for(let le=G+1;le<F;le+=1){const he=D[le],ve=e.getDegree(he.id);if(E&&(K<=1||ve<=1))continue;const ge=[he.data.x-H.data.x,he.data.y-H.data.y];let Te=Math.hypot(ge[0],ge[1]);Te=Te<1e-4?1e-4:Te,ge[0]=ge[0]/Te,ge[1]=ge[1]/Te,l&&t<r&&(Te=Te-s[H.id]-s[he.id]);let Oe=u*(K+1)*(ve+1)/Te;l&&t<r&&Te<0?Oe=a*(K+1)*(ve+1):l&&t<r&&Te===0?Oe=0:l&&t<r&&Te>0&&(Oe=u*(K+1)*(ve+1)/Te),i[H.id][0]-=Oe*ge[0],i[he.id][0]+=Oe*ge[0],i[H.id][1]-=Oe*ge[1],i[he.id][1]+=Oe*ge[1]}const q=[H.data.x-v[0],H.data.y-v[1]],te=Math.hypot(q[0],q[1]);q[0]=q[0]/te,q[1]=q[1]/te;const ue=h*(K+1);i[H.id][0]-=ue*q[0],i[H.id][1]-=ue*q[1]}return i}updatePos(e,t,r,i,a){const{ks:s,tao:o,prune:l,ksmax:u}=a,h=e.getAllNodes(),v=h.length,E=[],D=[];let F=0,G=0,H=i;for(let q=0;q<v;q+=1){const{id:te}=h[q],ue=e.getDegree(te);if(l&&ue<=1)continue;const le=[t[te][0]-r[te][0],t[te][1]-r[te][1]],he=Math.hypot(le[0],le[1]),ve=[t[te][0]+r[te][0],t[te][1]+r[te][1]],ge=Math.hypot(ve[0],ve[1]);E[q]=he,D[q]=ge/2,F+=(ue+1)*E[q],G+=(ue+1)*D[q]}const K=H;H=o*G/F,K!==0&&(H=H>1.5*K?1.5*K:H);for(let q=0;q<v;q+=1){const{id:te,data:ue}=h[q],le=e.getDegree(te);if(l&&le<=1||sn(ue.fx)&&sn(ue.fy))continue;let he=s*H/(1+H*Math.sqrt(E[q])),ve=Math.hypot(t[te][0],t[te][1]);ve=ve<1e-4?1e-4:ve;const ge=u/ve;he=he>ge?ge:he;const Te=he*t[te][0],Oe=he*t[te][1];e.mergeNodeData(te,{x:ue.x+Te,y:ue.y+Oe})}return H}}const JN={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},qN=800;class $N{constructor(e={}){this.options=e,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},JN),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,e,t)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(e=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let r=0;r<e;r++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const t={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&t.nodes.forEach(r=>this.lastGraph.mergeNodeData(r.id,{x:r.data.x,y:r.data.y,z:this.options.dimensions===3?r.data.z:void 0})),t}genericFruchtermanLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(r),{dimensions:a,width:s,height:o,center:l,clustering:u,nodeClusterBy:h,maxIteration:v,onTick:E}=i,D=t.getAllNodes(),F=t.getAllEdges();if(!(D!=null&&D.length)){const te={nodes:[],edges:F};return this.lastResult=te,te}if(D.length===1){e&&t.mergeNodeData(D[0].id,{x:l[0],y:l[1],z:a===3?l[2]:void 0});const te={nodes:[Object.assign(Object.assign({},D[0]),{data:Object.assign(Object.assign({},D[0].data),{x:l[0],y:l[1],z:a===3?l[2]:void 0})})],edges:F};return this.lastResult=te,te}const G=D.map(te=>Na(te,[s,o])),H=new hi({nodes:G,edges:F}),K={};if(u&&G.forEach(te=>{const ue=te.data[h];K[ue]||(K[ue]={name:ue,cx:0,cy:0,count:0})}),this.lastLayoutNodes=G,this.lastLayoutEdges=F,this.lastAssign=e,this.lastGraph=H,this.lastOptions=i,this.lastClusterMap=K,typeof window=="undefined")return;let q=0;return new Promise(te=>{this.timeInterval=window.setInterval(()=>{if(!this.running){te({nodes:G,edges:F});return}this.runOneStep(H,K,i),e&&G.forEach(({id:ue,data:le})=>t.mergeNodeData(ue,{x:le.x,y:le.y,z:a===3?le.z:void 0})),E==null||E({nodes:G,edges:F}),q++,q>=v&&(window.clearInterval(this.timeInterval),te({nodes:G,edges:F}))},0),this.running=!0})})}formatOptions(e={}){const t=Object.assign(Object.assign({},this.options),e),{clustering:r,nodeClusterBy:i}=t,{center:a,width:s,height:o}=t;return t.width=!s&&typeof window!="undefined"?window.innerWidth:s,t.height=!o&&typeof window!="undefined"?window.innerHeight:o,t.center=a||[t.width/2,t.height/2],t.clustering=r&&!!i,t}runOneStep(e,t,r){const{dimensions:i,height:a,width:s,gravity:o,center:l,speed:u,clustering:h,nodeClusterBy:v,clusterGravity:E}=r,D=a*s,F=Math.sqrt(D)/10,G=e.getAllNodes(),H=D/(G.length+1),K=Math.sqrt(H),q={};if(this.applyCalculate(e,q,K,H),h){for(const ue in t)t[ue].cx=0,t[ue].cy=0,t[ue].count=0;G.forEach(ue=>{const{data:le}=ue,he=t[le[v]];sn(le.x)&&(he.cx+=le.x),sn(le.y)&&(he.cy+=le.y),he.count++});for(const ue in t)t[ue].cx/=t[ue].count,t[ue].cy/=t[ue].count;const te=E||o;G.forEach((ue,le)=>{const{id:he,data:ve}=ue;if(!sn(ve.x)||!sn(ve.y))return;const ge=t[ve[v]],Te=Math.sqrt((ve.x-ge.cx)*(ve.x-ge.cx)+(ve.y-ge.cy)*(ve.y-ge.cy)),Oe=K*te;q[he].x-=Oe*(ve.x-ge.cx)/Te,q[he].y-=Oe*(ve.y-ge.cy)/Te})}G.forEach((te,ue)=>{const{id:le,data:he}=te;if(!sn(he.x)||!sn(he.y))return;const ve=.01*K*o;q[le].x-=ve*(he.x-l[0]),q[le].y-=ve*(he.y-l[1]),i===3&&(q[le].z-=ve*(he.z-l[2]))}),G.forEach((te,ue)=>{const{id:le,data:he}=te;if(sn(he.fx)&&sn(he.fy)){he.x=he.fx,he.y=he.fy,i===3&&(he.z=he.fz);return}if(!sn(he.x)||!sn(he.y))return;const ve=Math.sqrt(q[le].x*q[le].x+q[le].y*q[le].y+(i===3?q[le].z*q[le].z:0));if(ve>0){const ge=Math.min(F*(u/qN),ve);e.mergeNodeData(le,{x:he.x+q[le].x/ve*ge,y:he.y+q[le].y/ve*ge,z:i===3?he.z+q[le].z/ve*ge:void 0})}})}applyCalculate(e,t,r,i){this.calRepulsive(e,t,i),this.calAttractive(e,t,r)}calRepulsive(e,t,r){const i=e.getAllNodes();i.forEach(({data:a,id:s},o)=>{t[s]={x:0,y:0,z:0},i.forEach(({data:l,id:u},h)=>{if(o<=h||!sn(a.x)||!sn(l.x)||!sn(a.y)||!sn(l.y))return;let v=a.x-l.x,E=a.y-l.y,D=this.options.dimensions===3?a.z-l.z:0,F=v*v+E*E+D*D;F===0&&(F=1,v=.01,E=.01,D=.01);const G=r/F,H=v*G,K=E*G,q=D*G;t[s].x+=H,t[s].y+=K,t[u].x-=H,t[u].y-=K,this.options.dimensions===3&&(t[s].z+=q,t[u].z-=q)})})}calAttractive(e,t,r){e.getAllEdges().forEach(a=>{const{source:s,target:o}=a;if(!s||!o||s===o)return;const{data:l}=e.getNode(s),{data:u}=e.getNode(o);if(!sn(u.x)||!sn(l.x)||!sn(u.y)||!sn(l.y))return;const h=u.x-l.x,v=u.y-l.y,E=this.options.dimensions===3?u.z-l.z:0,D=Math.sqrt(h*h+v*v+E*E)/r,F=h*D,G=v*D,H=E*D;t[s].x+=F,t[s].y+=G,t[o].x-=F,t[o].y-=G,this.options.dimensions===3&&(t[s].z+=H,t[o].z-=H)})}}const eB={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 tB{constructor(e={}){this.options=e,this.id="grid",this.options=Object.assign(Object.assign({},eB),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,e,t)})}genericGridLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{begin:a=[0,0],condense:s,preventOverlapPadding:o,preventOverlap:l,rows:u,cols:h,nodeSpacing:v,nodeSize:E,width:D,height:F,position:G}=i;let{sortBy:H}=i;const K=t.getAllNodes(),q=t.getAllEdges(),te=K==null?void 0:K.length;if(!te||te===1)return xl(t,e,a);const ue=K.map(st=>Na(st));H!=="id"&&(!fr(H)||ue[0].data[H]===void 0)&&(H="degree"),H==="degree"?ue.sort((st,Et)=>t.getDegree(Et.id,"both")-t.getDegree(st.id,"both")):H==="id"?ue.sort((st,Et)=>sn(Et.id)&&sn(st.id)?Et.id-st.id:`${st.id}`.localeCompare(`${Et.id}`)):ue.sort((st,Et)=>Et.data[H]-st.data[H]);const le=!D&&typeof window!="undefined"?window.innerWidth:D,he=!F&&typeof window!="undefined"?window.innerHeight:F,ve=te,ge={rows:u,cols:h};if(u!=null&&h!=null)ge.rows=u,ge.cols=h;else if(u!=null&&h==null)ge.rows=u,ge.cols=Math.ceil(ve/ge.rows);else if(u==null&&h!=null)ge.cols=h,ge.rows=Math.ceil(ve/ge.cols);else{const st=Math.sqrt(ve*he/le);ge.rows=Math.round(st),ge.cols=Math.round(le/he*st)}if(ge.rows=Math.max(ge.rows,1),ge.cols=Math.max(ge.cols,1),ge.cols*ge.rows>ve){const st=td(ge),Et=nd(ge);(st-1)*Et>=ve?td(ge,st-1):(Et-1)*st>=ve&&nd(ge,Et-1)}else for(;ge.cols*ge.rows<ve;){const st=td(ge),Et=nd(ge);(Et+1)*st>=ve?nd(ge,Et+1):td(ge,st+1)}let Te=s?0:le/ge.cols,Oe=s?0:he/ge.rows;if(l||v){const st=El(10,v),Et=y0(30,E,!1);ue.forEach(mt=>{(!mt.data.x||!mt.data.y)&&(mt.data.x=0,mt.data.y=0);const ct=t.getNode(mt.id),[ht,At]=mc(Et(ct)||30),kt=st!==void 0?st(mt):o,Ht=ht+kt,en=At+kt;Te=Math.max(Te,Ht),Oe=Math.max(Oe,en)})}const Ne={},ze={row:0,col:0},Xe={};for(let st=0;st<ue.length;st++){const Et=ue[st];let mt;if(G&&(mt=G(t.getNode(Et.id))),mt&&(mt.row!==void 0||mt.col!==void 0)){const ct={row:mt.row,col:mt.col};if(ct.col===void 0)for(ct.col=0;D0(Ne,ct);)ct.col++;else if(ct.row===void 0)for(ct.row=0;D0(Ne,ct);)ct.row++;Xe[Et.id]=ct,Ex(Ne,ct)}nB(Et,a,Te,Oe,Xe,ge,ze,Ne)}const Je={nodes:ue,edges:q};return e&&ue.forEach(st=>{t.mergeNodeData(st.id,{x:st.data.x,y:st.data.y})}),Je})}}const td=(n,e)=>{let t;const r=n.rows||5,i=n.cols||5;return e==null?t=Math.min(r,i):Math.min(r,i)===n.rows?n.rows=e:n.cols=e,t},nd=(n,e)=>{let t;const r=n.rows||5,i=n.cols||5;return e==null?t=Math.max(r,i):Math.max(r,i)===n.rows?n.rows=e:n.cols=e,t},D0=(n,e)=>n[`c-${e.row}-${e.col}`]||!1,Ex=(n,e)=>n[`c-${e.row}-${e.col}`]=!0,xx=(n,e)=>{const t=n.cols||5;e.col++,e.col>=t&&(e.col=0,e.row++)},nB=(n,e,t,r,i,a,s,o)=>{let l,u;const h=i[n.id];if(h)l=h.col*t+t/2+e[0],u=h.row*r+r/2+e[1];else{for(;D0(o,s);)xx(a,s);l=s.col*t+t/2+e[0],u=s.row*r+r/2+e[1],Ex(o,s),xx(a,s)}n.data.x=l,n.data.y=u},rB=(n,e,t)=>{try{const r=Ro.mul(Ro.pow(e,2),-.5),i=r.mean("row"),a=r.mean("column"),s=r.mean();r.add(s).subRowVector(i).subColumnVector(a);const o=new rx(r),l=Ro.sqrt(o.diagonalMatrix).diagonal();return o.leftSingularVectors.toJSON().map(u=>Ro.mul([u],[l]).toJSON()[0].splice(0,n))}catch(r){const i=[];for(let a=0;a<e.length;a++){const s=Math.random()*t,o=Math.random()*t;i.push([s,o])}return i}},iB=800,aB={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},sB=(n,e)=>{const t=Object.assign(Object.assign({},aB),e),{positions:r,iterations:i,width:a,k:s,speed:o=100,strictRadial:l,focusIdx:u,radii:h=[],nodeSizeFunc:v}=t,E=n.getAllNodes(),D=[],F=a/10;for(let G=0;G<i;G++)r.forEach((H,K)=>{D[K]={x:0,y:0}}),oB(E,r,D,s,h,v),lB(r,D,o,l,u,F,a,h);return r},oB=(n,e,t,r,i,a)=>{e.forEach((s,o)=>{t[o]={x:0,y:0},e.forEach((l,u)=>{if(o===u||i[o]!==i[u])return;let h=s.x-l.x,v=s.y-l.y,E=Math.sqrt(h*h+v*v);if(E===0){E=1;const D=o>u?1:-1;h=.01*D,v=.01*D}if(E<a(n[o])/2+a(n[u])/2){const D=r*r/E;t[o].x+=h/E*D,t[o].y+=v/E*D}})})},lB=(n,e,t,r,i,a,s,o)=>{const l=a||s/10;return r&&e.forEach((u,h)=>{const v=n[h].x-n[i].x,E=n[h].y-n[i].y,D=Math.sqrt(v*v+E*E);let F=E/D,G=-v/D;const H=Math.sqrt(u.x*u.x+u.y*u.y);let K=Math.acos((F*u.x+G*u.y)/H);K>Math.PI/2&&(K-=Math.PI/2,F*=-1,G*=-1);const q=Math.cos(K)*H;u.x=F*q,u.y=G*q}),n.forEach((u,h)=>{if(h===i)return;const v=Math.sqrt(e[h].x*e[h].x+e[h].y*e[h].y);if(v>0&&h!==i){const E=Math.min(l*(t/iB),v);if(u.x+=e[h].x/v*E,u.y+=e[h].y/v*E,r){let D=u.x-n[i].x,F=u.y-n[i].y;const G=Math.sqrt(D*D+F*F);D=D/G*o[h],F=F/G*o[h],u.x=n[i].x+D,u.y=n[i].y+F}}}),n},uB={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class cB{constructor(e={}){this.options=e,this.id="radial",this.options=Object.assign(Object.assign({},uB),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,e,t)})}genericRadialLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{width:a,height:s,center:o,focusNode:l,unitRadius:u,nodeSize:h,nodeSpacing:v,strictRadial:E,preventOverlap:D,maxPreventOverlapIteration:F,sortBy:G,linkDistance:H=50,sortStrength:K=10,maxIteration:q=1e3}=i,te=t.getAllNodes(),ue=t.getAllEdges(),le=!a&&typeof window!="undefined"?window.innerWidth:a,he=!s&&typeof window!="undefined"?window.innerHeight:s,ve=o||[le/2,he/2];if(!(te!=null&&te.length)||te.length===1)return xl(t,e,ve);let ge=te[0];if(fr(l)){for(let An=0;An<te.length;An++)if(te[An].id===l){ge=te[An];break}}else ge=l||te[0];const Te=dB(te,ge.id),Oe=ax({nodes:te,edges:ue},!1),Ne=ix(Oe),ze=gB(Ne,Te);vB(Ne,Te,ze+1);const Xe=Ne[Te];let Je=le-ve[0]>ve[0]?ve[0]:le-ve[0],st=he-ve[1]>ve[1]?ve[1]:he-ve[1];Je===0&&(Je=le/2),st===0&&(st=he/2);const Et=Math.min(Je,st),mt=Math.max(...Xe),ct=[],ht=u||Et/mt;Xe.forEach((An,kn)=>{ct[kn]=An*ht});const At=hB(te,Ne,H,ct,ht,G,K),kt=fB(At),Ht=rB(H,At,H);let en=Ht.map(([An,kn])=>({x:(isNaN(An)?Math.random()*H:An)-Ht[Te][0],y:(isNaN(kn)?Math.random()*H:kn)-Ht[Te][1]}));this.run(q,en,kt,At,ct,Te);let on;if(D){on=_0(h,v);const An={nodes:te,nodeSizeFunc:on,positions:en,radii:ct,height:he,width:le,strictRadial:!!E,focusIdx:Te,iterations:F||200,k:en.length/4.5};en=sB(t,An)}const tn=[];return en.forEach((An,kn)=>{const qn=Na(te[kn]);qn.data.x=An.x+ve[0],qn.data.y=An.y+ve[1],tn.push(qn)}),e&&tn.forEach(An=>t.mergeNodeData(An.id,{x:An.data.x,y:An.data.y})),{nodes:tn,edges:ue}})}run(e,t,r,i,a,s){for(let o=0;o<=e;o++){const l=o/e;this.oneIteration(l,t,a,i,r,s)}}oneIteration(e,t,r,i,a,s){const o=1-e;t.forEach((l,u)=>{const h=sx(l,{x:0,y:0}),v=h===0?0:1/h;if(u===s)return;let E=0,D=0,F=0;t.forEach((H,K)=>{if(u===K)return;const q=sx(l,H),te=q===0?0:1/q,ue=i[K][u];F+=a[u][K],E+=a[u][K]*(H.x+ue*(l.x-H.x)*te),D+=a[u][K]*(H.y+ue*(l.y-H.y)*te)});const G=r[u]===0?0:1/r[u];F*=o,F+=e*G*G,E*=o,E+=e*G*l.x*v,l.x=E/F,D*=o,D+=e*G*l.y*v,l.y=D/F})}}const hB=(n,e,t,r,i,a,s)=>{if(!n)return[];const o=[];if(e){const l={};e.forEach((u,h)=>{const v=[];u.forEach((E,D)=>{var F,G;if(h===D)v.push(0);else if(r[h]===r[D])if(a==="data")v.push(E*(Math.abs(h-D)*s)/(r[h]/i));else if(a){let H,K;if(l[n[h].id])H=l[n[h].id];else{const q=(a==="id"?n[h].id:(F=n[h].data)===null||F===void 0?void 0:F[a])||0;fr(q)?H=q.charCodeAt(0):H=q,l[n[h].id]=H}if(l[n[D].id])K=l[n[D].id];else{const q=(a==="id"?n[D].id:(G=n[D].data)===null||G===void 0?void 0:G[a])||0;fr(q)?K=q.charCodeAt(0):K=q,l[n[D].id]=K}v.push(E*(Math.abs(H-K)*s)/(r[h]/i))}else v.push(E*t/(r[h]/i));else{const H=(t+i)/2;v.push(E*H)}}),o.push(v)})}return o},fB=n=>{const e=n.length,t=n[0].length,r=[];for(let i=0;i<e;i++){const a=[];for(let s=0;s<t;s++)n[i][s]!==0?a.push(1/(n[i][s]*n[i][s])):a.push(0);r.push(a)}return r},dB=(n,e)=>{let t=-1;return n.forEach((r,i)=>{r.id===e&&(t=i)}),Math.max(t,0)},vB=(n,e,t)=>{const r=n.length;for(let i=0;i<r;i++)if(n[e][i]===1/0){n[e][i]=t,n[i][e]=t;for(let a=0;a<r;a++)n[i][a]!==1/0&&n[e][a]===1/0&&(n[e][a]=t+n[i][a],n[a][e]=t+n[i][a])}for(let i=0;i<r;i++)if(i!==e){for(let a=0;a<r;a++)if(n[i][a]===1/0){let s=Math.abs(n[e][i]-n[e][a]);s=s===0?1:s,n[i][a]=s}}},gB=(n,e)=>{let t=0;for(let r=0;r<n[e].length;r++)n[e][r]!==1/0&&(t=n[e][r]>t?n[e][r]:t);return t},pB={center:[0,0],width:300,height:300};class mB{constructor(e={}){this.options=e,this.id="random",this.options=Object.assign(Object.assign({},pB),e)}execute(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,e,t)})}assign(e,t){return(0,xe.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,e,t)})}genericRandomLayout(e,t,r){return(0,xe.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),r),{center:a,width:s,height:o}=i,l=t.getAllNodes(),u=.9,h=!s&&typeof window!="undefined"?window.innerWidth:s,v=!o&&typeof window!="undefined"?window.innerHeight:o,E=a||[h/2,v/2],D=[];return l&&l.forEach(G=>{D.push({id:G.id,data:{x:(Math.random()-.5)*u*h+E[0],y:(Math.random()-.5)*u*v+E[1]}})}),e&&D.forEach(G=>t.mergeNodeData(G.id,{x:G.data.x,y:G.data.y})),{nodes:D,edges:t.getAllEdges()}})}}function yB(n){var e,t,r,i=n||1;function a(o,l){++e>i&&(r=t,s(1),++e),t[o]=l}function s(o){e=0,t=Object.create(null),o||(r=Object.create(null))}return s(),{clear:s,has:function(o){return t[o]!==void 0||r[o]!==void 0},get:function(o){var l=t[o];if(l!==void 0)return l;if((l=r[o])!==void 0)return a(o,l),l},set:function(o,l){t[o]!==void 0?t[o]=l:a(o,l)}}}var L0=new Map;function R0(n,e,t){t===void 0&&(t=128);var r=function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e?e.apply(this,i):i[0];L0.has(n)||L0.set(n,yB(t));var o=L0.get(n);if(o.has(s))return o.get(s);var l=n.apply(this,i);return o.set(s,l),l};return r}var _B=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class rd extends Uf{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const e=this.context.model.getRootsData();if(!(Fs(e)||e.length>2))return e[0]}formatSize(e){const t=typeof e=="function"?e:()=>e;return r=>Ra(t(r))}doLayout(e,t){const{hGap:r,getRibSep:i,vGap:a,nodeSize:s,height:o}=t,{model:l}=this.context,u=this.formatSize(s);let h=u(e)[0]+i(e);const v=(te,ue=0)=>{var le;return ue+=r*((te.children||[]).length+1),(le=te.children)===null||le===void 0||le.forEach(he=>{var ve;(ve=l.getNodeLikeDatum(he).children)===null||ve===void 0||ve.forEach(Te=>{const Oe=l.getNodeLikeDatum(Te);ue=v(Oe,ue)})}),ue},E=te=>{if(te.depth===1)return h;const ue=l.getParentData(te.id,"tree");if(ou(te)){const le=l.getParentData(ue.id,"tree"),he=G(te)-G(le);return E(ue)+he*r/a}else{const le=(ue.children||[]).indexOf(te.id),he=l.getNodeData((ue.children||[]).slice(le));return D(ue)-he.reduce((ve,ge)=>ve+v(ge),0)-u(ue)[0]/2}},D=R0(te=>{if(I0(te))return u(te)[0]/2;const ue=l.getParentData(te.id,"tree");if(ou(te))return E(te)+v(te)+u(te)[0]/2;{const le=G(te)-G(ue),he=r/a;return E(te)+le*he}},te=>te.id),F=te=>G(l.getParentData(te,"tree")),G=R0(te=>{if(I0(te))return o/2;if(ou(te)){const ue=l.getParentData(te.id,"tree"),le=ue.children.indexOf(te.id);if(le===0)return F(ue.id)+a;const he=l.getNodeLikeDatum(ue.children[le-1]);if(Fs(he.children))return G(he)+a;const ve=l.getDescendantsData(he.id);return Math.max(...ve.map(ge=>ou(ge)?F(ge.id):G(ge)))+a}else{if(Fs(te.children))return F(te.id)+a;const ue=l.getNodeLikeDatum(te.children.slice(-1)[0]);if(Fs(ue.children))return G(ue)+a;const le=l.getDescendantsData(te.id).slice(-1)[0];return(ou(le)?F(le.id):G(le))+a}},te=>te.id);let H=0;const K={nodes:[],edges:[]},q=te=>{var ue;(ue=te.children)===null||ue===void 0||ue.forEach(Te=>q(l.getNodeLikeDatum(Te)));const le=G(te),he=D(te);if(K.nodes.push({id:te.id,x:he,y:le}),I0(te))return;const ve=l.getRelatedEdgesData(te.id,"in")[0],ge=[E(te),ou(te)?le:F(te.id)];K.edges.push({id:yt(ve),controlPoints:[ge],relatedNodeId:te.id}),H=Math.max(H,he+i(te)),te.depth===1&&(h=H)};return q(e),K}placeAlterative(e,t){const r=(t.children||[]).filter((o,l)=>l%2!==0);if(r.length===0)return e;const{model:i}=this.context,a=e.nodes.find(o=>o.id===t.id).y,s=o=>{const l=i.getAncestorsData(o,"tree");if(Fs(l))return!1;const u=l.length===1?o:l[l.length-2].id;return r.includes(u)};e.nodes.forEach(o=>{s(o.id)&&(o.y=2*a-o.y)}),e.edges.forEach(o=>{s(o.relatedNodeId)&&(o.controlPoints=o.controlPoints.map(l=>[l[0],2*a-l[1]]))})}rightToLeft(e,t){return e.nodes.forEach(r=>r.x=t.width-r.x),e.edges.forEach(r=>{r.controlPoints=r.controlPoints.map(i=>[t.width-i[0],i[1]])}),e}execute(e,t){return _B(this,void 0,void 0,function*(){const r=Object.assign(Object.assign(Object.assign({},rd.defaultOptions),this.options),t),{direction:i,nodeSize:a}=r,s=this.getRoot();if(!s)return e;const o=this.formatSize(a);r.vGap||(r.vGap=Math.max(...(e.nodes||[]).map(E=>o(E)[1]))),r.hGap||(r.hGap=Math.max(...(e.nodes||[]).map(E=>o(E)[0])));let l=this.doLayout(s,r);this.placeAlterative(l,s),i==="RL"&&(l=this.rightToLeft(l,r));const{model:u}=this.context,h=[],v=[];return l.nodes.forEach(E=>{const{id:D,x:F,y:G}=E,H=u.getNodeLikeDatum(D);h.push(bx(H,{x:F,y:G}))}),l.edges.forEach(E=>{const{id:D,controlPoints:F}=E,G=u.getEdgeDatum(D);v.push(bx(G,{controlPoints:F}))}),{nodes:h,edges:v}})}}rd.defaultOptions={direction:"RL",getRibSep:()=>60};const bx=(n,e)=>Object.assign(Object.assign({},n),{style:Object.assign(Object.assign({},n.style||{}),e)}),I0=n=>n.depth===0,ou=n=>(n.depth||(n.depth=0))%2===0;var EB=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class id extends Uf{constructor(){super(...arguments),this.id="snake"}formatSize(e,t){const r=typeof t=="function"?t:()=>t;return e.reduce((i,a)=>{const[s,o]=Ra(r(a))||[0,0];return[Math.max(i[0],s),Math.max(i[1],o)]},[0,0])}validate(e){const{nodes:t=[],edges:r=[]}=e,i={},a={},s={};t.forEach(E=>{i[E.id]=0,a[E.id]=0,s[E.id]=[]}),r.forEach(E=>{i[E.target]++,a[E.source]++,s[E.source].push(E.target)});const o=new Set,l=E=>{o.has(E)||(o.add(E),s[E].forEach(l))};if(l(t[0].id),o.size!==t.length)return!1;const u=t.filter(E=>i[E.id]===0),h=t.filter(E=>a[E.id]===0);return!(u.length!==1||h.length!==1||t.filter(E=>i[E.id]===1&&a[E.id]===1).length!==t.length-2)}execute(e,t){return EB(this,void 0,void 0,function*(){var r;if(!this.validate(e))return e;const{nodeSize:i,padding:a,sortBy:s,cols:o,colGap:l,rowGap:u,clockwise:h,width:v,height:E}=Object.assign({},id.defaultOptions,this.options,t),[D,F,G,H]=cs(a),K=this.formatSize(e.nodes||[],i),q=Math.ceil((e.nodes||[]).length/o);let te=l||(v-H-F-o*K[0])/(o-1),ue=u||(E-D-G-q*K[1])/(q-1);return(ue===1/0||ue<0)&&(ue=0),(te===1/0||te<0)&&(te=0),{nodes:((s?(r=e.nodes)===null||r===void 0?void 0:r.sort(s):xB(e))||[]).map((ve,ge)=>{const Te=Math.floor(ge/o),Oe=ge%o,Ne=h?Te%2===0?Oe:o-1-Oe:Te%2===0?o-1-Oe:Oe,ze=H+Ne*(K[0]+te)+K[0]/2,Xe=D+Te*(K[1]+ue)+K[1]/2;return{id:ve.id,style:{x:ze,y:Xe}}})}})}}id.defaultOptions={padding:0,cols:5,clockwise:!0};function xB(n){const{nodes:e=[],edges:t=[]}=n,r={},i={};e.forEach(o=>{r[o.id]=0,i[o.id]=[]}),t.forEach(o=>{r[o.target]++,i[o.source].push(o.target)});const a=[],s=[];for(e.forEach(o=>{r[o.id]===0&&a.push(o.id)});a.length>0;){const o=a.shift(),l=e.find(u=>u.id===o);s.push(l),i[o].forEach(u=>{r[u]--,r[u]===0&&a.push(u)})}return s}const bB=["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)"],wB=["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)"],MB=["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)"],AB=["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)"],TB=["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 SB=function(n,e,t){if(!Sa(n)&&!ql(n))return n;var r=t;return B1(n,function(i,a){r=e(r,i,a)}),r},PB=SB,N0=function(n,e){return PB(n,function(t,r,i){return e.includes(i)||(t[i]=r),t},{})};class Ui extends Rg{}function lu(n,e=!0,t){const r=document.createElement("div");return r.setAttribute("class",`g6-${n}`),Object.assign(r.style,{position:"absolute",display:"block"}),e&&Object.assign(r.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),t&&Object.assign(r.style,t),r}function B0(n,e="div",t={},r="",i=document.body){const a=document.getElementById(n);a&&a.remove();const s=document.createElement(e);return s.innerHTML=r,s.id=n,Object.assign(s.style,t),i.appendChild(s),s}var OB=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class ad extends Ui{constructor(e,t){super(e,Object.assign({},ad.defaultOptions,t)),this.$element=lu("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return OB(this,void 0,void 0,function*(){t.update.call(this,e),Object.assign(this.$element.style,N0(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}ad.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};function k0(n,e,t,r,i,a){const s=n,o=e,l=t-s,u=r-o;let h=i-s,v=a-o,E=h*l+v*u,D=0;E<=0?D=0:(h=l-h,v=u-v,E=h*l+v*u,E<=0?D=0:D=E*E/(l*l+u*u));const F=h*h+v*v-D;return F<0?0:F}function No(n,e,t,r){return(n-t)*(n-t)+(e-r)*(e-r)}function wx(n,e,t,r,i){return No(n,e,t,r)<i*i}function CB(n){if(!Number.isFinite(n))return t=>t;if(n===0)return Math.round;const e=Math.pow(10,n);return t=>Math.round(t*e)/e}function Mx(n){const e=Math.min(n.x1,n.x2),t=Math.max(n.x1,n.x2),r=Math.min(n.y1,n.y2),i=Math.max(n.y1,n.y2);return{x:e,y:r,x2:t,y2:i,width:t-e,height:i-r}}class Li{constructor(e,t,r,i){this.x1=e,this.y1=t,this.x2=r,this.y2=i}equals(e){return this.x1===e.x1&&this.y1===e.y1&&this.x2===e.x2&&this.y2===e.y2}draw(e){e.moveTo(this.x1,this.y1),e.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(e){return new Li(e.x1,e.y1,e.x2,e.y2)}cuts(e,t){if(this.y1===this.y2||t<this.y1&&t<=this.y2||t>this.y1&&t>=this.y2||e>this.x1&&e>=this.x2)return!1;if(e<this.x1&&e<=this.x2)return!0;const r=this.x1+(t-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return e<=r}distSquare(e,t){return k0(this.x1,this.y1,this.x2,this.y2,e,t)}ptClose(e,t,r){if(this.x1<this.x2){if(e<this.x1-r||e>this.x2+r)return!1}else if(e<this.x2-r||e>this.x1+r)return!1;if(this.y1<this.y2){if(t<this.y1-r||t>this.y2+r)return!1}else if(t<this.y2-r||t>this.y1+r)return!1;return!0}}var $r;(function(n){n[n.POINT=1]="POINT",n[n.PARALLEL=2]="PARALLEL",n[n.COINCIDENT=3]="COINCIDENT",n[n.NONE=4]="NONE"})($r||($r={}));class F0{constructor(e,t=0,r=0){this.state=e,this.x=t,this.y=r}}function sd(n,e){const t=(e.x2-e.x1)*(n.y1-e.y1)-(e.y2-e.y1)*(n.x1-e.x1),r=(n.x2-n.x1)*(n.y1-e.y1)-(n.y2-n.y1)*(n.x1-e.x1),i=(e.y2-e.y1)*(n.x2-n.x1)-(e.x2-e.x1)*(n.y2-n.y1);if(i){const a=t/i,s=r/i;return 0<=a&&a<=1&&0<=s&&s<=1?new F0($r.POINT,n.x1+a*(n.x2-n.x1),n.y1+a*(n.y2-n.y1)):new F0($r.NONE)}return new F0(t===0||r===0?$r.COINCIDENT:$r.PARALLEL)}function Ax(n,e){const t=(e.x2-e.x1)*(n.y1-e.y1)-(e.y2-e.y1)*(n.x1-e.x1),r=(n.x2-n.x1)*(n.y1-e.y1)-(n.y2-n.y1)*(n.x1-e.x1),i=(e.y2-e.y1)*(n.x2-n.x1)-(e.x2-e.x1)*(n.y2-n.y1);if(i){const a=t/i,s=r/i;if(0<=a&&a<=1&&0<=s&&s<=1)return a}return Number.POSITIVE_INFINITY}function DB(n,e){function t(i,a,s,o){let l=Ax(e,new Li(i,a,s,o));return l=Math.abs(l-.5),l>=0&&l<=1?1:0}let r=t(n.x,n.y,n.x2,n.y);return r+=t(n.x,n.y,n.x,n.y2),r>1||(r+=t(n.x,n.y2,n.x2,n.y2),r>1)?!0:(r+=t(n.x2,n.y,n.x2,n.y2),r>0)}var ei;(function(n){n[n.LEFT=0]="LEFT",n[n.TOP=1]="TOP",n[n.RIGHT=2]="RIGHT",n[n.BOTTOM=3]="BOTTOM"})(ei||(ei={}));function od(n,e,t){const r=new Set;return n.width<=0?(r.add(ei.LEFT),r.add(ei.RIGHT)):e<n.x?r.add(ei.LEFT):e>n.x+n.width&&r.add(ei.RIGHT),n.height<=0?(r.add(ei.TOP),r.add(ei.BOTTOM)):t<n.y?r.add(ei.TOP):t>n.y+n.height&&r.add(ei.BOTTOM),r}function Tx(n,e){let t=e.x1,r=e.y1;const i=e.x2,a=e.y2,s=Array.from(od(n,i,a));if(s.length===0)return!0;let o=od(n,t,r);for(;o.size!==0;){for(const l of s)if(o.has(l))return!1;if(o.has(ei.RIGHT)||o.has(ei.LEFT)){let l=n.x;o.has(ei.RIGHT)&&(l+=n.width),r=r+(l-t)*(a-r)/(i-t),t=l}else{let l=n.y;o.has(ei.BOTTOM)&&(l+=n.height),t=t+(l-r)*(i-t)/(a-r),r=l}o=od(n,t,r)}return!0}function LB(n,e){let t=Number.POSITIVE_INFINITY,r=0;function i(a,s,o,l){let u=Ax(e,new Li(a,s,o,l));u=Math.abs(u-.5),u>=0&&u<=1&&(r++,u<t&&(t=u))}return i(n.x,n.y,n.x2,n.y),i(n.x,n.y,n.x,n.y2),r>1||(i(n.x,n.y2,n.x2,n.y2),r>1)?t:(i(n.x2,n.y,n.x2,n.y2),r===0?-1:t)}function RB(n,e){let t=0;const r=sd(n,new Li(e.x,e.y,e.x2,e.y));t+=r.state===$r.POINT?1:0;const i=sd(n,new Li(e.x,e.y,e.x,e.y2));t+=i.state===$r.POINT?1:0;const a=sd(n,new Li(e.x,e.y2,e.x2,e.y2));t+=a.state===$r.POINT?1:0;const s=sd(n,new Li(e.x2,e.y,e.x2,e.y2));return t+=s.state===$r.POINT?1:0,{top:r,left:i,bottom:a,right:s,count:t}}class Yi{constructor(e,t,r,i){this.x=e,this.y=t,this.width=r,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(e){return new Yi(e.x,e.y,e.width,e.height)}equals(e){return this.x===e.x&&this.y===e.y&&this.width===e.width&&this.height===e.height}clone(){return new Yi(this.x,this.y,this.width,this.height)}add(e){const t=Math.min(this.x,e.x),r=Math.min(this.y,e.y),i=Math.max(this.x2,e.x+e.width),a=Math.max(this.y2,e.y+e.height);this.x=t,this.y=r,this.width=i-t,this.height=a-r}addPoint(e){const t=Math.min(this.x,e.x),r=Math.min(this.y,e.y),i=Math.max(this.x2,e.x),a=Math.max(this.y2,e.y);this.x=t,this.y=r,this.width=i-t,this.height=a-r}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(e){e.rect(this.x,this.y,this.width,this.height)}containsPt(e,t){return e>=this.x&&e<=this.x2&&t>=this.y&&t<=this.y2}get area(){return this.width*this.height}intersects(e){return this.area<=0||e.width<=0||e.height<=0?!1:e.x+e.width>this.x&&e.y+e.height>this.y&&e.x<this.x2&&e.y<this.y2}distSquare(e,t){if(this.containsPt(e,t))return 0;const r=od(this,e,t);return r.has(ei.TOP)?r.has(ei.LEFT)?No(e,t,this.x,this.y):r.has(ei.RIGHT)?No(e,t,this.x2,this.y):(this.y-t)*(this.y-t):r.has(ei.BOTTOM)?r.has(ei.LEFT)?No(e,t,this.x,this.y2):r.has(ei.RIGHT)?No(e,t,this.x2,this.y2):(t-this.y2)*(t-this.y2):r.has(ei.LEFT)?(this.x-e)*(this.x-e):r.has(ei.RIGHT)?(e-this.x2)*(e-this.x2):0}}function IB(n){if(n.length===0)return null;const e=n[0],t=new Yi(e.x,e.y,0,0);for(const r of n)t.addPoint(r);return t}class ld{constructor(e,t,r){this.cx=e,this.cy=t,this.radius=r}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(e){return new ld(e.cx,e.cy,e.radius)}containsPt(e,t){return No(this.cx,this.cy,e,t)<this.radius*this.radius}distSquare(e,t){const r=No(this.cx,this.cy,e,t);if(r<this.radius*this.radius)return 0;const i=Math.sqrt(r)-this.radius;return i*i}draw(e){e.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class wl{constructor(e,t=0,r=0,i=0,a=0,s=10,o=10,l=new Float32Array(Math.max(0,s*o)).fill(0)){this.pixelGroup=e,this.i=t,this.j=r,this.pixelX=i,this.pixelY=a,this.width=s,this.height=o,this.area=l}createSub(e,t){return new wl(this.pixelGroup,e.x,e.y,t.x,t.y,e.width,e.height)}static fromPixelRegion(e,t){return new wl(t,0,0,e.x,e.y,Math.ceil(e.width/t),Math.ceil(e.height/t))}copy(e,t){return new wl(this.pixelGroup,this.scaleX(t.x),this.scaleY(t.y),t.x,t.y,e.width,e.height,e.area)}boundX(e){return e<this.i?this.i:e>=this.width?this.width-1:e}boundY(e){return e<this.j?this.j:e>=this.height?this.height-1:e}scaleX(e){return this.boundX(Math.floor((e-this.pixelX)/this.pixelGroup))}scaleY(e){return this.boundY(Math.floor((e-this.pixelY)/this.pixelGroup))}scale(e){const t=this.scaleX(e.x),r=this.scaleY(e.y),i=this.boundX(Math.ceil((e.x+e.width-this.pixelX)/this.pixelGroup)),a=this.boundY(Math.ceil((e.y+e.height-this.pixelY)/this.pixelGroup)),s=i-t,o=a-r;return new Yi(t,r,s,o)}invertScaleX(e){return Math.round(e*this.pixelGroup+this.pixelX)}invertScaleY(e){return Math.round(e*this.pixelGroup+this.pixelY)}addPadding(e,t){const r=Math.ceil(t/this.pixelGroup),i=this.boundX(e.x-r),a=this.boundY(e.y-r),s=this.boundX(e.x2+r),o=this.boundY(e.y2+r),l=s-i,u=o-a;return new Yi(i,a,l,u)}get(e,t){return e<0||t<0||e>=this.width||t>=this.height?Number.NaN:this.area[e+t*this.width]}inc(e,t,r){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]+=r)}set(e,t,r){e<0||t<0||e>=this.width||t>=this.height||(this.area[e+t*this.width]=r)}incArea(e,t){if(e.width<=0||e.height<=0||t===0)return;const r=this.width,i=e.width,a=Math.max(0,e.i),s=Math.max(0,e.j),o=Math.min(e.i+e.width,r),l=Math.min(e.j+e.height,this.height);if(!(l<=0||o<=0||a>=r||l>=this.height))for(let u=s;u<l;u++){const h=(u-e.j)*i,v=u*r;for(let E=a;E<o;E++){const D=e.area[E-e.i+h];D!==0&&(this.area[E+v]+=t*D)}}}fill(e){this.area.fill(e)}fillArea(e,t){const r=e.x+e.y*this.width;for(let i=0;i<e.height;i++){const a=r+i*this.width;this.area.fill(t,a,a+e.width)}}fillHorizontalLine(e,t,r,i){const a=e+t*this.width;this.area.fill(i,a,a+r)}fillVerticalLine(e,t,r,i){const a=e+t*this.width;for(let s=0;s<r;s++)this.area[a+s*this.width]=i}clear(){this.area.fill(0)}toString(){let e="";for(let t=0;t<this.height;t++){const r=t*this.width;for(let i=0;i<this.width;i++){const a=this.area[r+i];e+=a.toFixed(1).padStart(6),e+=" "}e+=`
|
|
|
`}return e}draw(e,t=!0){if(this.width<=0||this.height<=0)return;e.save(),t&&e.translate(this.pixelX,this.pixelY);const r=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-r)/(i-r);e.scale(this.pixelGroup,this.pixelGroup);for(let s=0;s<this.width;s++)for(let o=0;o<this.height;o++){const l=this.area[s+o*this.width];e.fillStyle=`rgba(0, 0, 0, ${a(l)})`,e.fillRect(s,o,1,1)}e.restore()}drawThreshold(e,t,r=!0){if(!(this.width<=0||this.height<=0)){e.save(),r&&e.translate(this.pixelX,this.pixelY),e.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];e.fillStyle=s>t?"black":"white",e.fillRect(i,a,1,1)}e.restore()}}}function Sx(n,e){const t=r=>({x:r.x-e,y:r.y-e,width:r.width+2*e,height:r.height+2*e});return Array.isArray(n)?n.map(t):t(n)}function Px(n,e,t){return Ox(Object.assign(Mx(n),{distSquare:(r,i)=>k0(n.x1,n.y1,n.x2,n.y2,r,i)}),e,t)}function Ox(n,e,t){const r=Sx(n,t),i=e.scale(r),a=e.createSub(i,r);return NB(a,e,t,(s,o)=>n.distSquare(s,o)),a}function NB(n,e,t,r){const i=t*t;for(let a=0;a<n.height;a++)for(let s=0;s<n.width;s++){const o=e.invertScaleX(n.i+s),l=e.invertScaleY(n.j+a),u=r(o,l);if(u===0){n.set(s,a,i);continue}if(u<i){const h=t-Math.sqrt(u);n.set(s,a,h*h)}}return n}function BB(n,e,t){const r=e.scale(n),i=e.addPadding(r,t),a=e.createSub(i,{x:n.x-t,y:n.y-t}),s=r.x-i.x,o=r.y-i.y,l=i.x2-r.x2,u=i.y2-r.y2,h=i.width-s-l,v=i.height-o-u,E=t*t;a.fillArea({x:s,y:o,width:h+1,height:v+1},E);const D=[0],F=Math.max(o,s,l,u);{const q=e.invertScaleX(r.x+r.width/2);for(let te=1;te<F;te++){const ue=e.invertScaleY(r.y-te),le=n.distSquare(q,ue);if(le<E){const he=t-Math.sqrt(le);D.push(he*he)}else break}}const G=[],H=Math.max(s,l),K=Math.max(o,l);for(let q=1;q<H;q++){const te=e.invertScaleX(r.x-q),ue=[];for(let le=1;le<K;le++){const he=e.invertScaleY(r.y-le),ve=n.distSquare(te,he);if(ve<E){const ge=t-Math.sqrt(ve);ue.push(ge*ge)}else ue.push(0)}G.push(ue)}for(let q=1;q<Math.min(o,D.length);q++){const te=D[q];a.fillHorizontalLine(s,o-q,h+1,te)}for(let q=1;q<Math.min(u,D.length);q++){const te=D[q];a.fillHorizontalLine(s,o+v+q,h+1,te)}for(let q=1;q<Math.min(s,D.length);q++){const te=D[q];a.fillVerticalLine(s-q,o,v+1,te)}for(let q=1;q<Math.min(u,D.length);q++){const te=D[q];a.fillVerticalLine(s+h+q,o,v+1,te)}for(let q=1;q<s;q++){const te=G[q-1],ue=s-q;for(let le=1;le<o;le++)a.set(ue,o-le,te[le-1]);for(let le=1;le<u;le++)a.set(ue,o+v+le,te[le-1])}for(let q=1;q<l;q++){const te=G[q-1],ue=s+h+q;for(let le=1;le<o;le++)a.set(ue,o-le,te[le-1]);for(let le=1;le<u;le++)a.set(ue,o+v+le,te[le-1])}return a}function OW(n,e,t,r){return{x:n,y:e,width:t,height:r}}function CW(n,e,t){return{cx:n,cy:e,radius:t}}function DW(n,e,t,r){return{x1:n,y1:e,x2:t,y2:r}}function Zr(n,e){return{x:n,y:e}}function kB(n,e,t,r){if(n.length===0)return[];const i=GB(n);return i.map((a,s)=>{const o=i.slice(0,s);return FB(e,a,o,t,r)}).flat()}function FB(n,e,t,r,i){const a=Zr(e.cx,e.cy),s=WB(a,t,n);if(s==null)return[];const o=new Li(a.x,a.y,s.cx,s.cy),l=zB(o,n,r,i);return UB(l,n)}function zB(n,e,t,r){const i=[],a=[];a.push(n);let s=!0;for(let o=0;o<t&&s;o++)for(s=!1;!s&&a.length>0;){const l=a.pop(),u=Cx(e,l),h=u?RB(l,u):null;if(!u||!h||h.count!==2){s||i.push(l);continue}let v=r,E=cd(u,v,h,!0),D=Bo(E,a)||Bo(E,i),F=ud(E,e);for(;!D&&F&&v>=1;)v/=1.5,E=cd(u,v,h,!0),D=Bo(E,a)||Bo(E,i),F=ud(E,e);if(E&&!D&&!F&&(a.push(new Li(l.x1,l.y1,E.x,E.y)),a.push(new Li(E.x,E.y,l.x2,l.y2)),s=!0),s)continue;v=r,E=cd(u,v,h,!1);let G=Bo(E,a)||Bo(E,i);for(F=ud(E,e);!G&&F&&v>=1;)v/=1.5,E=cd(u,v,h,!1),G=Bo(E,a)||Bo(E,i),F=ud(E,e);E&&!G&&(a.push(new Li(l.x1,l.y1,E.x,E.y)),a.push(new Li(E.x,E.y,l.x2,l.y2)),s=!0),s||i.push(l)}for(;a.length>0;)i.push(a.pop());return i}function UB(n,e){const t=[];for(;n.length>0;){const r=n.pop();if(n.length===0){t.push(r);break}const i=n.pop(),a=new Li(r.x1,r.y1,i.x2,i.y2);Cx(e,a)?(t.push(r),n.push(i)):n.push(a)}return t}function WB(n,e,t){let r=Number.POSITIVE_INFINITY;return e.reduce((i,a)=>{const s=No(n.x,n.y,a.cx,a.cy);if(s>r)return i;const o=new Li(n.x,n.y,a.cx,a.cy),l=HB(t,o);return s*(l+1)*(l+1)<r&&(i=a,r=s*(l+1)*(l+1)),i},null)}function GB(n){if(n.length<2)return n;let e=0,t=0;return n.forEach(r=>{e+=r.cx,t+=r.cy}),e/=n.length,t/=n.length,n.map(r=>{const i=e-r.cx,a=t-r.cy,s=i*i+a*a;return[r,s]}).sort((r,i)=>r[1]-i[1]).map(r=>r[0])}function ud(n,e){return e.some(t=>t.containsPt(n.x,n.y))}function Bo(n,e){return e.some(t=>!!(wx(t.x1,t.y1,n.x,n.y,.001)||wx(t.x2,t.y2,n.x,n.y,.001)))}function Cx(n,e){let t=Number.POSITIVE_INFINITY,r=null;for(const i of n){if(!Tx(i,e))continue;const a=LB(i,e);a>=0&&a<t&&(r=i,t=a)}return r}function HB(n,e){return n.reduce((t,r)=>Tx(r,e)&&DB(r,e)?t+1:t,0)}function cd(n,e,t,r){const i=t.top,a=t.left,s=t.bottom,o=t.right;if(r){if(a.state===$r.POINT){if(i.state===$r.POINT)return Zr(n.x-e,n.y-e);if(s.state===$r.POINT)return Zr(n.x-e,n.y2+e);const E=n.width*n.height;return n.width*((a.y-n.y+(o.y-n.y))*.5)<E*.5?a.y>o.y?Zr(n.x-e,n.y-e):Zr(n.x2+e,n.y-e):a.y<o.y?Zr(n.x-e,n.y2+e):Zr(n.x2+e,n.y2+e)}if(o.state===$r.POINT){if(i.state===$r.POINT)return Zr(n.x2+e,n.y-e);if(s.state===$r.POINT)return Zr(n.x2+e,n.y2+e)}const h=n.height*n.width;return n.height*((i.x-n.x+(o.x-n.x))*.5)<h*.5?i.x>s.x?Zr(n.x-e,n.y-e):Zr(n.x-e,n.y2+e):i.x<s.x?Zr(n.x2+e,n.y-e):Zr(n.x2+e,n.y2+e)}if(a.state===$r.POINT){if(i.state===$r.POINT)return Zr(n.x2+e,n.y2+e);if(s.state===$r.POINT)return Zr(n.x2+e,n.y-e);const h=n.height*n.width;return n.width*((a.y-n.y+(o.y-n.y))*.5)<h*.5?a.y>o.y?Zr(n.x2+e,n.y2+e):Zr(n.x-e,n.y2+e):a.y<o.y?Zr(n.x2+e,n.y-e):Zr(n.x-e,n.y-e)}if(o.state===$r.POINT){if(i.state===$r.POINT)return Zr(n.x-e,n.y2+e);if(s.state===$r.POINT)return Zr(n.x-e,n.y-e)}const l=n.height*n.width;return n.height*((i.x-n.x+(o.x-n.x))*.5)<l*.5?i.x>s.x?Zr(n.x2+e,n.y2+e):Zr(n.x2+e,n.y-e):i.x<s.x?Zr(n.x-e,n.y2+e):Zr(n.x-e,n.y-e)}function jB(n,e,t,r){if(!(n.closed?t<n.length:t<n.length-1))return!1;const a=n.get(e),s=n.get(t+1);for(let o=e+1;o<=t;o++){const l=n.get(o);if(k0(a.x,a.y,s.x,s.y,l.x,l.y)>r)return!1}return!0}function VB(n=0){return e=>{if(n<0||e.length<3)return e;const t=[];let r=0;const i=n*n;for(;r<e.length;){let a=r+1;for(;jB(e,r,a,i);)a++;t.push(e.get(r)),r=a}return new Ml(t)}}function ZB(n,e){switch(n){case-2:return(((-e+3)*e-3)*e+1)/6;case-1:return((3*e-6)*e*e+4)/6;case 0:return(((-3*e+3)*e+3)*e+1)/6;case 1:return e*e*e/6;default:throw new Error("unknown error")}}function KB(n=6){function a(s,o,l){let u=0,h=0;for(let v=-2;v<=1;v++){const E=s.get(o+v),D=ZB(v,l);u+=D*E.x,h+=D*E.y}return{x:u,y:h}}return s=>{if(s.length<3)return s;const o=[],l=s.closed,u=s.length+3-1+(l?0:2);o.push(a(s,2-(l?0:2),0));for(let h=2-(l?0:2);h<u;h++)for(let v=1;v<=n;v++)o.push(a(s,h,v/n));return new Ml(o)}}function XB(n=8){return e=>{let t=n,r=e.length;if(t>1)for(r=Math.floor(e.length/t);r<3&&t>1;)t-=1,r=Math.floor(e.length/t);const i=[];for(let a=0,s=0;s<r;s++,a+=t)i.push(e.get(a));return new Ml(i)}}class Ml{constructor(e=[],t=!0){this.points=e,this.closed=t}get(e){const t=e,r=this.points.length;return e<0?this.closed?this.get(e+r):this.points[0]:e>=r?this.closed?this.get(e-r):this.points[r-1]:this.points[t]}get length(){return this.points.length}toString(e=1/0){const t=this.points;if(t.length===0)return"";const r=typeof e=="function"?e:CB(e);let i="M";for(const a of t)i+=`${r(a.x)},${r(a.y)} L`;return i=i.slice(0,-1),this.closed&&(i+=" Z"),i}draw(e){const t=this.points;if(t.length!==0){e.beginPath(),e.moveTo(t[0].x,t[0].y);for(const r of t)e.lineTo(r.x,r.y);this.closed&&e.closePath()}}sample(e){return XB(e)(this)}simplify(e){return VB(e)(this)}bSplines(e){return KB(e)(this)}apply(e){return e(this)}containsElements(e){const t=IB(this.points);return t?e.every(r=>t.containsPt(r.cx,r.cy)&&this.withinArea(r.cx,r.cy)):!1}withinArea(e,t){if(this.length===0)return!1;let r=0;const i=this.points[0],a=new Li(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(e,t)&&r++}return a.x1=a.x2,a.y1=a.y2,a.x2=i.x,a.y2=i.y,a.cuts(e,t)&&r++,r%2===1}}class YB{constructor(e=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=e}add(e){this.set.add(`${e.x}x${e.y}`),this.arr[this.count++]=e}contains(e){return this.set.has(`${e.x}x${e.y}`)}isFirst(e){if(this.count===0)return!1;const t=this.arr[0];return t!=null&&t.x===e.x&&t.y===e.y}path(){return new Ml(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(e){return this.arr[e]}get length(){return this.count}}const bc=0,hd=1,fd=2,z0=3;function QB(n,e){const t=(Math.floor(n.width)+Math.floor(n.height))*2,r=new YB(t);function i(l,u,h,v){const E=n.get(l,u);return Number.isNaN(E)?Number.NaN:E>e?h+v:h}function a(l,u){let h=bc;return h=i(l,u,h,1),h=i(l+1,u,h,2),h=i(l,u+1,h,4),h=i(l+1,u+1,h,8),Number.isNaN(h)?-1:h}let s=hd;function o(l,u){let h=l,v=u,E=n.invertScaleX(h),D=n.invertScaleY(v);for(let F=0;F<n.width*n.height;F++){const G={x:E,y:D};if(r.contains(G)){if(r.isFirst(G))return!0}else r.add(G);const H=a(h,v);switch(H){case-1:return!0;case 0:case 3:case 2:case 7:s=fd;break;case 12:case 14:case 4:s=z0;break;case 6:s=s===bc?z0:fd;break;case 1:case 13:case 5:s=bc;break;case 9:s=s===fd?bc:hd;break;case 10:case 8:case 11:s=hd;break;default:return console.warn("Marching squares invalid state: "+H),!0}switch(s){case bc:v--,D-=n.pixelGroup;break;case hd:v++,D+=n.pixelGroup;break;case z0:h--,E-=n.pixelGroup;break;case fd:h++,E+=n.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+H),!0}}return!0}for(let l=0;l<n.width;l++)for(let u=0;u<n.height;u++){if(n.get(l,u)<=e)continue;const h=a(l,u);if(!(h<0||h===15)&&o(l,u))return r.path()}return null}const dd={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 wc(n){return n!=null&&typeof n.radius=="number"}function Dx(n,e){if(wc(n)!==wc(e))return!1;if(wc(n)){const r=e;return n.cx===r.cx&&n.cy===r.cy&&n.radius===r.radius}const t=e;return n.x===t.x&&n.y===t.y&&n.width===t.width&&n.height===t.height}var ms;(function(n){n[n.MEMBERS=0]="MEMBERS",n[n.NON_MEMBERS=1]="NON_MEMBERS",n[n.EDGES=2]="EDGES"})(ms||(ms={}));class U0{constructor(e={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new Yi(0,0,0,0),this.potentialArea=new wl(1,0,0,0,0,0,0),this.o=Object.assign({},dd,e)}pushMember(...e){if(e.length!==0){this.dirty.add(ms.MEMBERS);for(const t of e)this.members.push({raw:t,obj:wc(t)?ld.from(t):Yi.from(t),area:null})}}removeMember(e){const t=this.members.findIndex(r=>Dx(r.raw,e));return t<0?!1:(this.members.splice(t,1),this.dirty.add(ms.MEMBERS),!0)}removeNonMember(e){const t=this.nonMembers.findIndex(r=>Dx(r.raw,e));return t<0?!1:(this.nonMembers.splice(t,1),this.dirty.add(ms.NON_MEMBERS),!0)}removeEdge(e){const t=this.edges.findIndex(r=>r.obj.equals(e));return t<0?!1:(this.edges.splice(t,1),this.dirty.add(ms.NON_MEMBERS),!0)}pushNonMember(...e){if(e.length!==0){this.dirty.add(ms.NON_MEMBERS);for(const t of e)this.nonMembers.push({raw:t,obj:wc(t)?ld.from(t):Yi.from(t),area:null})}}pushEdge(...e){if(e.length!==0){this.dirty.add(ms.EDGES);for(const t of e)this.edges.push({raw:t,obj:Li.from(t),area:null})}}update(){const e=this.dirty.has(ms.MEMBERS),t=this.dirty.has(ms.NON_MEMBERS);let r=this.dirty.has(ms.EDGES);this.dirty.clear();const i=this.members.map(u=>u.obj);if(this.o.virtualEdges&&(e||t)){const u=this.nonMembers.map(E=>E.obj),h=kB(i,u,this.o.maxRoutingIterations,this.o.morphBuffer),v=new Map(this.virtualEdges.map(E=>[E.obj.toString(),E.area]));this.virtualEdges=h.map(E=>{var D;return{raw:E,obj:E,area:(D=v.get(E.toString()))!==null&&D!==void 0?D:null}}),r=!0}let a=!1;if(e||r){const u=this.virtualEdges.concat(this.edges).map(D=>D.obj),h=qB(i,u),v=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,E=Yi.from(Sx(h,v));E.equals(this.activeRegion)||(a=!0,this.activeRegion=E)}if(a){const u=Math.ceil(this.activeRegion.width/this.o.pixelGroup),h=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=wl.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(v=>v.area=null),this.nonMembers.forEach(v=>v.area=null),this.edges.forEach(v=>v.area=null),this.virtualEdges.forEach(v=>v.area=null)):(u!==this.potentialArea.width||h!==this.potentialArea.height)&&(this.potentialArea=wl.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const s=new Map,o=u=>{if(u.area){const h=`${u.obj.width}x${u.obj.height}x${u.obj instanceof Yi?"R":"C"}`;s.set(h,u.area)}},l=u=>{if(u.area)return;const h=`${u.obj.width}x${u.obj.height}x${u.obj instanceof Yi?"R":"C"}`;if(s.has(h)){const E=s.get(h);u.area=this.potentialArea.copy(E,{x:u.obj.x-this.o.nodeR1,y:u.obj.y-this.o.nodeR1});return}const v=u.obj instanceof Yi?BB(u.obj,this.potentialArea,this.o.nodeR1):Ox(u.obj,this.potentialArea,this.o.nodeR1);u.area=v,s.set(h,v)};this.members.forEach(o),this.nonMembers.forEach(o),this.members.forEach(l),this.nonMembers.forEach(u=>{this.activeRegion.intersects(u.obj)?l(u):u.area=null}),this.edges.forEach(u=>{u.area||(u.area=Px(u.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(u=>{u.area||(u.area=Px(u.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(e){for(const t of this.members)t.obj.draw(e)}drawNonMembers(e){for(const t of this.nonMembers)t.obj.draw(e)}drawEdges(e){for(const t of this.edges)t.obj.draw(e)}drawPotentialArea(e,t=!0){this.potentialArea.draw(e,t)}compute(){if(this.members.length===0)return new Ml([]);this.dirty.size>0&&this.update();const{o:e,potentialArea:t}=this,r=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 JB(t,r,i,a,o=>o.containsElements(s),e)}}function JB(n,e,t,r,i,a={}){const s=Object.assign({},dd,a);let o=s.threshold,l=s.memberInfluenceFactor,u=s.edgeInfluenceFactor,h=s.nonMemberInfluenceFactor;const v=(s.nodeR0-s.nodeR1)*(s.nodeR0-s.nodeR1),E=(s.edgeR0-s.edgeR1)*(s.edgeR0-s.edgeR1);for(let D=0;D<s.maxMarchingIterations;D++){if(n.clear(),l!==0){const G=l/v;for(const H of e)n.incArea(H,G)}if(u!==0){const G=u/E;for(const H of t)n.incArea(H,G)}if(h!==0){const G=h/v;for(const H of r)n.incArea(H,G)}const F=QB(n,o);if(F&&i(F))return F;if(o*=.95,D<=s.maxMarchingIterations*.5)l*=1.2,u*=1.2;else if(h!==0&&r.length>0)h*=.8;else break}return new Ml([])}function qB(n,e){if(n.length===0)return new Yi(0,0,0,0);const t=Yi.from(n[0]);for(const r of n)t.add(r);for(const r of e)t.add(Mx(r));return t}function LW(n,e=[],t=[],r={}){if(n.length===0)return new Ml([]);const i=new U0(r);return i.pushMember(...n),i.pushNonMember(...e),i.pushEdge(...t),i.compute()}var $B=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class vd extends Ui{constructor(e,t){super(e,ia({},vd.defaultOptions,t)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:r,bubbleSetOptions:i}=this.parseOptions();li(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},r),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new uc({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=r=>{if(!this.shape)return;const i=yt(r.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=r=>{const{graph:i}=this.context,a=this.options.members,s=[...this.members.keys()],o=this.options.avoidMembers,l=[...this.avoidMembers.keys()];if(!r&&li(a,s)&&li(o,l))return this.path;const{enter:u=[],exit:h=[]}=Ao(s,a,H=>H),{enter:v=[],exit:E=[]}=Ao(l,o,H=>H);r&&(h.push(r),u.push(r));const D=(H,K,q)=>{H.forEach(te=>{const ue=q?this.members:this.avoidMembers,le=q?"pushMember":"pushNonMember",he=q?"removeMember":"removeNonMember";if(K){let ve;i.getElementType(te)==="edge"?([ve]=t5(i,te),this.bubbleSets.pushEdge(ve)):([ve]=e5(i,te),this.bubbleSets[le](ve)),ue.set(te,ve)}else{const ve=ue.get(te);ve&&(i.getElementType(te)==="edge"?this.bubbleSets.removeEdge(ve):this.bubbleSets[he](ve),ue.delete(te))}})};D(h,!1,!0),D(u,!0,!0),D(E,!1,!1),D(v,!0,!1);const G=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=b1(G.points.map(Fi)),this.path},this.bindEvents(),this.bubbleSets=new U0(this.options)}bindEvents(){this.context.graph.on(Zt.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(Zt.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new U0(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const e=this.options,{type:t,key:r,members:i,avoidMembers:a}=e,s=$B(e,["type","key","members","avoidMembers"]),o=Object.keys(s).reduce((l,u)=>(u in dd?l.bubbleSetOptions[u]=s[u]:l.style[u]=s[u],l),{style:{},bubbleSetOptions:{}});return Object.assign({type:t,key:r,members:i,avoidMembers:a},o)}addMember(e){const t=Array.isArray(e)?e:[e];t.some(r=>this.options.avoidMembers.includes(r))&&(this.options.avoidMembers=this.options.avoidMembers.filter(r=>!t.includes(r))),this.options.members=[...new Set([...this.options.members,...t])],this.drawBubbleSets()}removeMember(e){const t=Array.isArray(e)?e:[e];this.options.members=this.options.members.filter(r=>!t.includes(r)),this.drawBubbleSets()}updateMember(e){this.options.members=fn(e)?e(this.options.members):e,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(e){const t=Array.isArray(e)?e:[e];t.some(r=>this.options.members.includes(r))&&(this.options.members=this.options.members.filter(r=>!t.includes(r))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...t])],this.drawBubbleSets()}removeAvoidMember(e){const t=Array.isArray(e)?e:[e];this.options.avoidMembers.some(r=>t.includes(r))&&(this.options.avoidMembers=this.options.avoidMembers.filter(r=>!t.includes(r)),this.drawBubbleSets())}updateAvoidMember(e){this.options.avoidMembers=Array.isArray(e)?e:[e],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(Zt.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(Zt.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}vd.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},dd);const e5=(n,e)=>(Array.isArray(e)?e:[e]).map(r=>{const i=n.getElementRenderBounds(r);return new Yi(i.min[0],i.min[1],Ns(i),Bs(i))}),t5=(n,e)=>(Array.isArray(e)?e:[e]).map(r=>{const i=n.getEdgeData(r),a=n.getElementPosition(i.source),s=n.getElementPosition(i.target);return Li.from({x1:a[0],y1:a[1],x2:s[0],y2:s[1]})});class RW extends null{constructor(e,t){super(e,t),this.setOptions=r=>{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 l=r[s];if(l!==void 0){const u=a(s,l);this.context.canvas.getCamera()[o](u)}})},this.bindEvents()}update(e){this.setOptions(e),super.update(e)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[e,t]=this.context.viewport.getCanvasSize();return e/t}}function n5(n){return`
|
|
|
<ul class="g6-contextmenu-ul">
|
|
|
${n.map(e=>`<li class="g6-contextmenu-li" value="${e.value}">${e.name}</li>`).join("")}
|
|
|
</ul>
|
|
|
`}const r5=`
|
|
|
.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 Lx=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class gd extends Ui{constructor(e,t){super(e,Object.assign({},gd.defaultOptions,t)),this.targetElement=null,this.onTriggerEvent=r=>{var i;(i=r.preventDefault)===null||i===void 0||i.call(r),this.show(r)},this.onMenuItemClick=r=>{const{onClick:i,trigger:a}=this.options;if(r.target instanceof HTMLElement&&r.target.className.includes("g6-contextmenu-li")){const s=r.target.getAttribute("value");i==null||i(s,r.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(t)}initElement(){this.$element=lu("contextmenu",!1,{zIndex:"99"});const{className:e}=this.options;e&&this.$element.classList.add(e),this.context.canvas.getContainer().appendChild(this.$element),B0("g6-contextmenu-css","style",{},r5,document.head)}show(e){return Lx(this,void 0,void 0,function*(){const{enable:t,offset:r}=this.options;if(typeof t=="function"&&!t(e)||!t){this.hide();return}const i=yield this.getDOMContent(e);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=`${e.client.x-a.left+r[0]}px`,this.$element.style.top=`${e.client.y-a.top+r[1]}px`,this.$element.style.display="block",this.targetElement=e.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(e){return Lx(this,void 0,void 0,function*(){const{getContent:t,getItems:r}=this.options;return r?n5(yield r(e)):yield t(e)})}bindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.on(`canvas:${t}`,this.onTriggerEvent),e.on(`node:${t}`,this.onTriggerEvent),e.on(`edge:${t}`,this.onTriggerEvent),e.on(`combo:${t}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:e}=this.context,{trigger:t}=this.options;e.off(`canvas:${t}`,this.onTriggerEvent),e.off(`node:${t}`,this.onTriggerEvent),e.off(`edge:${t}`,this.onTriggerEvent),e.off(`combo:${t}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}gd.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class pd extends Ui{constructor(e,t){super(e,Object.assign({},pd.defaultOptions,t)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:r,element:i}=this.context,a=r.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:s,iterRate:o,divRate:l}=this.options;let{lambda:u,divisions:h,iterations:v}=this.options;for(let E=0;E<s;E++){for(let D=0;D<v;D++){const F={};a.forEach(G=>{var H;if(G.source===G.target)return;const K=yt(G);F[K]=this.getEdgeForces(G,h,u);for(let q=0;q<h+1;q++)(H=this.edgePoints)[K]||(H[K]=[]),this.edgePoints[K][q]=zn(this.edgePoints[K][q],F[K][q])})}u/=2,h*=l,v*=o,this.divideEdges(h)}a.forEach(E=>{const D=yt(E),F=i.getElement(D);F==null||F.update({d:n0(this.edgePoints[D])})})},this.bindEvents()}get nodeMap(){const e=this.context.model.getNodeData();return Object.fromEntries(e.map(t=>[yt(t),fl(Ti(t))]))}divideEdges(e){this.context.model.getEdgeData().forEach(r=>{var i;const a=yt(r);(i=this.edgePoints)[a]||(i[a]=[]);const s=this.nodeMap[r.source],o=this.nodeMap[r.target];if(e===1)this.edgePoints[a].push(s),this.edgePoints[a].push(vs(zn(s,o),2)),this.edgePoints[a].push(o);else{const u=(this.edgePoints[a].length===0?Wr(s,o):l5(this.edgePoints[a]))/(e+1);let h=u;const v=[s];for(let E=1;E<this.edgePoints[a].length;E++){const D=this.edgePoints[a][E-1],F=this.edgePoints[a][E];let G=Wr(F,D);for(;G>h;){const H=h/G,K=zn(D,ds(Pr(F,D),H));v.push(K),G-=h,h=u}h-=G}v.push(o),this.edgePoints[a]=v}})}getVectorPosition(e){const t=this.nodeMap[e.source],r=this.nodeMap[e.target],[i,a]=Pr(r,t),s=Wr(t,r);return{source:t,target:r,vx:i,vy:a,length:s}}measureEdgeCompatibility(e,t){const r=this.getVectorPosition(e),i=this.getVectorPosition(t),a=i5(r,i),s=a5(r,i),o=s5(r,i),l=o5(r,i);return a*s*o*l}getEdgeBundles(){const e={},t=this.options.bundleThreshold,r=this.context.model.getEdgeData();return r.forEach((i,a)=>{r.forEach((s,o)=>{var l,u;if(o<=a)return;this.measureEdgeCompatibility(i,s)>=t&&(e[l=yt(i)]||(e[l]=[]),e[yt(i)].push(s),e[u=yt(s)]||(e[u]=[]),e[yt(s)].push(i))})}),e}getSpringForce(e,t){const{pre:r,cur:i,next:a}=e;return ds(Pr(zn(r,a),ds(i,2)),t)}getElectrostaticForce(e,t){Fs(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const r=this.edgeBundles[yt(t)];let i=[0,0];return r==null||r.forEach(a=>{const s=this.edgePoints[yt(a)][e],o=this.edgePoints[yt(t)][e],l=Pr(s,o),u=Wr(s,o);i=zn(i,ds(l,1/u))}),i}getEdgeForces(e,t,r){const i=this.nodeMap[e.source],a=this.nodeMap[e.target],s=this.options.K/(Wr(i,a)*(t+1)),o=[[0,0]],l=yt(e);for(let u=1;u<t;u++){const h=this.getSpringForce({pre:this.edgePoints[l][u-1],cur:this.edgePoints[l][u],next:this.edgePoints[l][u+1]||[0,0]},s),v=this.getElectrostaticForce(u,e);o.push(ds(zn(h,v),r))}return o.push([0,0]),o}bindEvents(){const{graph:e}=this.context;e.on(Zt.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:e}=this.context;e.off(Zt.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}pd.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const i5=(n,e)=>Math.abs(zC([n.vx,n.vy],[e.vx,e.vy])/(n.length*e.length)),a5=(n,e)=>{const t=(n.length+e.length)/2;return 2/(t/Math.min(n.length,e.length)+Math.max(n.length,e.length)/t)},s5=(n,e)=>{const t=(n.length+e.length)/2,r=vs(zn(n.source,n.target),2),i=vs(zn(e.source,e.target),2);return t/(t+Wr(r,i))},Rx=(n,e)=>{if(e.source[0]===e.target[0])return[e.source[0],n[1]];if(e.source[1]===e.target[1])return[n[0],e.source[1]];const t=(e.source[1]-e.target[1])/(e.source[0]-e.target[0]),r=(t*t*e.source[0]+t*(n[1]-e.source[1])+n[0])/(t*t+1),i=t*(r-e.source[0])+e.source[1];return[r,i]},Ix=(n,e)=>{const t=Rx(e.source,n),r=Rx(e.target,n),i=vs(zn(t,r),2),a=vs(zn(n.source,n.target),2);return Wr(t,r)===0?0:Math.max(0,1-2*Wr(a,i)/Wr(t,r))},o5=(n,e)=>Math.min(Ix(n,e),Ix(e,n)),l5=n=>{let e=0;for(let t=1;t<n.length;t++)e+=Wr(n[t],n[t-1]);return e},u5={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8,zIndex:-1/0},Nx=.05;class md extends Ui{constructor(e,t){super(e,Object.assign({},md.defaultOptions,t)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=r=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Fi(r.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=r=>{const i=Object.assign({},u5,this.options.style);this.isLensOn||(this.lens=new gl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,gs(r),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:r}=this.options,{model:i}=this.context,a=i.getData();if(!r)return a;const{nodes:s,edges:o,combos:l}=a;return{nodes:s.filter(u=>r(yt(u),"node")),edges:o.filter(u=>r(yt(u),"edge")),combos:l.filter(u=>r(yt(u),"combo"))}},this.getFocusElements=r=>{const{nodes:i,edges:a}=this.getFilterData(),s=i.filter(u=>Wr(Ti(u),r)<this.r),o=s.map(u=>yt(u)),l=a.filter(u=>{const{source:h,target:v}=u,E=o.includes(h),D=o.includes(v);switch(this.options.nodeType){case"both":return E&&D;case"either":return E!==D;case"source":return E&&!D;case"target":return!E&&D;default:return!1}});return{nodes:s,edges:l}},this.renderFocusElements=()=>{const{element:r,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:s,edges:o}=this.getFocusElements(a),l=new Set,u=h=>{const v=yt(h);l.add(v);const E=r.getElement(v);if(!E)return;const D=this.shapes.get(v)||E.cloneNode();D.setPosition(E.getPosition()),D.id=E.id,this.shapes.has(v)?Object.entries(E.attributes).forEach(([H,K])=>{D.style[H]!==K&&(D.style[H]=K)}):(this.canvas.appendChild(D),this.shapes.set(v,D));const F=i.getElementType(v),G=this.getElementStyle(F,h);D.update(G)};s.forEach(u),o.forEach(u),this.shapes.forEach((h,v)=>{l.has(v)||(h.destroy(),this.shapes.delete(v))})},this.scaleRByWheel=r=>{var i;this.options.preventDefault&&r.preventDefault();const{clientX:a,clientY:s,deltaX:o,deltaY:l}=r,{graph:u,canvas:h}=this.context,v=u.getCanvasByClient([a,s]),E=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||Wr(v,E)>this.r)return;const{maxR:D,minR:F}=this.options,G=o+l>0?1/(1-Nx):1-Nx,H=Math.min(...h.getSize())/2;this.r=Math.max(F||0,Math.min(D||H,this.r*G)),this.renderLens(E),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=r=>{var i;const a=Fi(r.canvas),s=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||Wr(a,s)>this.r||(this.isLensDragging=!0)},this.onDrag=r=>{if(!this.isLensDragging)return;const i=Fi(r.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(e,t){const r=e==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof r=="function"?r(t):r}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var e;const{graph:t}=this.context,{trigger:r,scaleRBy:i}=this.options,a=t.getCanvas().getLayer();["click","drag"].includes(r)&&a.addEventListener(Dt.CLICK,this.onEdgeFilter),r==="pointermove"?a.addEventListener(Dt.POINTER_MOVE,this.onEdgeFilter):r==="drag"&&(a.addEventListener(Dt.DRAG_START,this.onDragStart),a.addEventListener(Dt.DRAG,this.onDrag),a.addEventListener(Dt.DRAG_END,this.onDragEnd)),i==="wheel"&&((e=this.graphDom)===null||e===void 0||e.addEventListener(Dt.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var e;const{graph:t}=this.context,{trigger:r,scaleRBy:i}=this.options,a=t.getCanvas().getLayer();["click","drag"].includes(r)&&a.removeEventListener(Dt.CLICK,this.onEdgeFilter),r==="pointermove"?a.removeEventListener(Dt.POINTER_MOVE,this.onEdgeFilter):r==="drag"&&(a.removeEventListener(Dt.DRAG_START,this.onDragStart),a.removeEventListener(Dt.DRAG,this.onDrag),a.removeEventListener(Dt.DRAG_END,this.onDragEnd)),i==="wheel"&&((e=this.graphDom)===null||e===void 0||e.removeEventListener(Dt.WHEEL,this.scaleRByWheel))}update(e){var t;this.unbindEvents(),super.update(e),this.r=(t=e.r)!==null&&t!==void 0?t:this.r,this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((e,t)=>{e.destroy(),this.shapes.delete(t)}),super.destroy()}}md.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const c5={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},Bx=.05,kx=.1;class yd extends Ui{constructor(e,t){super(e,Object.assign({},yd.defaultOptions,t)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=r=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Fi(r.canvas);this.onMagnify(i)},this.onMagnify=r=>{r.some(isNaN)||(this.renderLens(r),this.renderFocusElements())},this.renderLens=r=>{const i=Object.assign({},c5,this.options.style);this.isLensOn||(this.lens=new gl({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,gs(r),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:r,maxD:i}=this.options;return`${Math.round((this.d-r)/(i-r)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:r}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,s=new Map,o=new Map;r.getNodeData().forEach(u=>{const h=Ti(u),v=Wr(h,i);if(v>this.r)return;const E=a*v/(this.d*v+this.r),[D,F]=h,[G,H]=i,K=(D-G)/v,q=(F-H)/v,te=[G+E*K,H+E*q],ue=yt(u),le=this.getNodeStyle(u),he=ml(r.getElementRenderStyle(ue),Object.keys(le));s.set(ue,Object.assign(Object.assign({},gs(te)),le)),o.set(ue,Object.assign(Object.assign({},gs(h)),he))}),this.updateStyle(s,o)},this.getNodeStyle=r=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(r):i},this.updateStyle=(r,i)=>{const{graph:a,element:s}=this.context,{enter:o,exit:l,keep:u}=Ao(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(r.keys()),E=>E),h=new Set,v=(E,D)=>{const F=s.getElement(E);F==null||F.update(D),a.getRelatedEdgesData(E).forEach(G=>{h.add(yt(G))})};[...o,...u].forEach(E=>{v(E,r.get(E))}),l.forEach(E=>{v(E,this.prevOriginStyleMap.get(E)),this.prevOriginStyleMap.delete(E)}),h.forEach(E=>{const D=s.getElement(E);D==null||D.update({})}),this.prevMagnifiedStyleMap=r,i.forEach((E,D)=>{this.prevOriginStyleMap.has(D)||this.prevOriginStyleMap.set(D,E)})},this.isWheelValid=r=>{if(this.options.preventDefault&&r.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=r,s=this.context.graph.getCanvasByClient([i,a]),o=this.lens.getCenter();return!(Wr(s,o)>this.r)},this.scaleR=r=>{const{maxR:i,minR:a}=this.options,s=r?1/(1-Bx):1-Bx,o=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||o,this.r*s))},this.scaleD=r=>{const{maxD:i,minD:a}=this.options,s=r?this.d+kx:this.d-kx;this.d=Math.max(a,Math.min(i,s))},this.scaleRByWheel=r=>{if(!this.isWheelValid(r))return;const{deltaX:i,deltaY:a}=r;this.scaleR(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByWheel=r=>{if(!this.isWheelValid(r))return;const{deltaX:i,deltaY:a}=r;this.scaleD(i+a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.isDragValid=r=>{if(this.options.preventDefault&&r.preventDefault(),!this.isLensOn)return!1;const i=Fi(r.canvas),a=this.lens.getCenter();return!(Wr(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=r=>{this.isDragValid(r)&&(this.isLensDragging=!0)},this.onDrag=r=>{if(!this.isLensDragging)return;const i=Fi(r.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=r=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=r;this.scaleR(i-a>0);const s=this.lens.getCenter();this.onMagnify(s)},this.scaleDByDrag=r=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=r;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 e;const{graph:t}=this.context,{trigger:r,scaleRBy:i,scaleDBy:a}=this.options,s=t.getCanvas().getLayer();if(["click","drag"].includes(r)&&s.addEventListener(Dt.CLICK,this.onCreateFisheye),r==="pointermove"&&s.addEventListener(Dt.POINTER_MOVE,this.onCreateFisheye),r==="drag"||i==="drag"||a==="drag"){s.addEventListener(Dt.DRAG_START,this.onDragStart),s.addEventListener(Dt.DRAG_END,this.onDragEnd);const o=r==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.addEventListener(Dt.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(e=this.graphDom)===null||e===void 0||e.addEventListener(Dt.WHEEL,o,{passive:!1})}}unbindEvents(){var e;const{graph:t}=this.context,{trigger:r,scaleRBy:i,scaleDBy:a}=this.options,s=t.getCanvas().getLayer();if(["click","drag"].includes(r)&&s.removeEventListener(Dt.CLICK,this.onCreateFisheye),r==="pointermove"&&s.removeEventListener(Dt.POINTER_MOVE,this.onCreateFisheye),r==="drag"||i==="drag"||a==="drag"){s.removeEventListener(Dt.DRAG_START,this.onDragStart),s.removeEventListener(Dt.DRAG_END,this.onDragEnd);const o=r==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;s.removeEventListener(Dt.DRAG,o)}if(i==="wheel"||a==="wheel"){const o=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(e=this.graphDom)===null||e===void 0||e.removeEventListener(Dt.WHEEL,o)}}update(e){var t,r;this.unbindEvents(),super.update(e),this.r=(t=e.r)!==null&&t!==void 0?t:this.r,this.d=(r=e.d)!==null&&r!==void 0?r:this.d,this.bindEvents()}destroy(){var e;this.unbindEvents(),this.isLensOn&&((e=this.lens)===null||e===void 0||e.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}yd.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class _d extends Ui{constructor(e,t){super(e,Object.assign({},_d.defaultOptions,t)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var r,i,a,s;const o=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(o),o?(i=(r=this.options).onEnter)===null||i===void 0||i.call(r):(s=(a=this.options).onExit)===null||s===void 0||s.call(a)},this.shortcut=new $l(e.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:e=[],exit:t=[]}=this.options.trigger;this.shortcut.bind(e,this.request),this.shortcut.bind(t,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(i=>{document.addEventListener(i,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(t=>{document.removeEventListener(t,this.onFullscreenChange,!1)})}setGraphSize(e=!0){var t,r;let i,a;e?(i=((t=globalThis.screen)===null||t===void 0?void 0:t.width)||0,a=((r=globalThis.screen)===null||r===void 0?void 0:r.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||!h5()||this.$el.requestFullscreen().catch(e=>{xa.warn(`Error attempting to enable full-screen: ${e.message} (${e.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(e){this.unbindEvents(),super.update(e),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}_d.defaultOptions={trigger:{},autoFit:!0};function h5(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}class Ed extends Ui{constructor(e,t){super(e,Object.assign({},Ed.defaultOptions,t)),this.$element=lu("grid-line",!0),this.offset=[0,0],this.currentScale=1,this.followZoom=i=>{const{data:{scale:a,origin:s}}=i;if(!a)return;const o=this.currentScale;this.currentScale=a;const l=a/o,u=ds(s||this.context.graph.getCanvasCenter(),1-l),h=this.baseSize*a,v=ds(this.offset,l),E=Ng(v,h),D=zn(E,u);this.$element.style.backgroundSize=`${h}px ${h}px`,this.$element.style.backgroundPosition=`${D[0]}px ${D[1]}px`,this.offset=Ng(D,h)},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(e){super.update(e),e.size!==void 0&&(this.baseSize=e.size),this.updateStyle()}bindEvents(){const{graph:e}=this.context;e.on(Zt.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{stroke:e,lineWidth:t,border:r,borderLineWidth:i,borderStroke:a,borderStyle:s}=this.options,o=this.baseSize*this.currentScale;Object.assign(this.$element.style,{border:r?`${i}px ${s} ${a}`:"none",backgroundImage:`linear-gradient(${e} ${t}px, transparent ${t}px), linear-gradient(90deg, ${e} ${t}px, transparent ${t}px)`,backgroundSize:`${o}px ${o}px`,backgroundRepeat:"repeat"})}updateOffset(e){const t=this.baseSize*this.currentScale;this.offset=Ng(zn(this.offset,e),t),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}parseFollow(e){var t,r;return Ru(e)?{translate:e,zoom:e}:{translate:(t=e==null?void 0:e.translate)!==null&&t!==void 0?t:!1,zoom:(r=e==null?void 0:e.zoom)!==null&&r!==void 0?r:!1}}destroy(){this.context.graph.off(Zt.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}Ed.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};function W0(n){const e={Added:new Map,Updated:new Map,Removed:new Map};return n.forEach(t=>{const{type:r,value:i}=t,a=yt(i);if(r==="NodeAdded"||r==="EdgeAdded"||r==="ComboAdded")e.Added.set(a,t);else if(r==="NodeUpdated"||r==="EdgeUpdated"||r==="ComboUpdated")if(e.Added.has(a))e.Added.set(a,{type:r.replace("Updated","Added"),value:i});else if(e.Updated.has(a)){const{original:s}=e.Updated.get(a);e.Updated.set(a,{type:r,value:i,original:s})}else e.Removed.has(a)||e.Updated.set(a,t);else(r==="NodeRemoved"||r==="EdgeRemoved"||r==="ComboRemoved")&&(e.Added.has(a)?e.Added.delete(a):(e.Updated.has(a)&&e.Updated.delete(a),e.Removed.set(a,t)))}),[...Array.from(e.Added.values()),...Array.from(e.Updated.values()),...Array.from(e.Removed.values())]}function Fx(n){const{NodeAdded:e=[],NodeUpdated:t=[],NodeRemoved:r=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:s=[],ComboAdded:o=[],ComboUpdated:l=[],ComboRemoved:u=[]}=zh(n,h=>h.type);return{add:{nodes:e,edges:i,combos:o},update:{nodes:t,edges:a,combos:l},remove:{nodes:r,edges:s,combos:u}}}function zx(n,e){for(const t in n)si(n[t])&&!Array.isArray(n[t])&&n[t]!==null?(e[t]||(e[t]={}),zx(n[t],e[t])):e[t]===void 0&&(e[t]=qu(t))}function f5(n,e=!1,t){const r={animation:e,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:s}=Fx(W0(n));return["nodes","edges","combos"].forEach(o=>{a[o]&&a[o].forEach(l=>{var u,h;const v=Object.assign({},l.value);let E=Object.assign({},l.original);if(t){const D=t.graph.getElementType(yt(l.original)),F=D==="edge"?"stroke":"fill",G=t.element.getElementComputedStyle(D,l.original);E=Object.assign(Object.assign({},l.original),{style:Object.assign({[F]:G[F]},l.original.style)})}zx(v,E),(u=r.current.update)[o]||(u[o]=[]),r.current.update[o].push(v),(h=r.original.update)[o]||(h[o]=[]),r.original.update[o].push(E)}),i[o]&&i[o].forEach(l=>{var u,h;const v=Object.assign({},l.value);(u=r.current.add)[o]||(u[o]=[]),r.current.add[o].push(v),(h=r.original.remove)[o]||(h[o]=[]),r.original.remove[o].push(v)}),s[o]&&s[o].forEach(l=>{var u,h;const v=Object.assign({},l.value);(u=r.current.remove)[o]||(u[o]=[]),r.current.remove[o].push(v),(h=r.original.add)[o]||(h[o]=[]),r.original.add[o].push(v)})}),r}class xd extends Ui{constructor(e,t){super(e,Object.assign({},xd.defaultOptions,t)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var s,o,l;this.freezed=!0,(o=(s=this.options).executeCommand)===null||o===void 0||o.call(s,i);const u=a?i.original:i.current;this.context.graph.addData(u.add),this.context.graph.updateData(u.update),this.context.graph.removeData(Y_(u.remove,!1)),(l=this.context.element)===null||l===void 0||l.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===Zt.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(f5(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(xo.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 Ff;const{graph:r}=this.context;r.on(Zt.AFTER_DRAW,this.addCommand),r.on(Zt.BATCH_START,this.initBatchCommand),r.on(Zt.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var e,t,r,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((t=(e=this.options).beforeAddCommand)===null||t===void 0?void 0:t.call(e,a,!1))===!1)return;this.redoStack.push(a),(i=(r=this.options).afterAddCommand)===null||i===void 0||i.call(r,a,!1),this.notify(xo.UNDO,a)}return this}redo(){const e=this.redoStack.pop();return e&&(this.executeCommand(e,!1),this.undoStackPush(e),this.notify(xo.REDO,e)),this}undoAndCancel(){const e=this.undoStack.pop();return e&&(this.executeCommand(e,!1),this.redoStack=[],this.notify(xo.CANCEL,e)),this}undoStackPush(e){var t,r,i,a;const{stackSize:s}=this.options;s!==0&&this.undoStack.length>=s&&this.undoStack.shift(),((r=(t=this.options).beforeAddCommand)===null||r===void 0?void 0:r.call(t,e,!0))!==!1&&(this.undoStack.push(e),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,e,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(xo.CLEAR,null)}notify(e,t){this.emitter.emit(e,{cmd:t}),this.emitter.emit(xo.CHANGE,{cmd:t})}on(e,t){this.emitter.on(e,t)}destroy(){const{graph:e}=this.context;e.off(Zt.AFTER_DRAW,this.addCommand),e.off(Zt.BATCH_START,this.initBatchCommand),e.off(Zt.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}xd.defaultOptions={stackSize:0};const G0={toXy(n,e){if(!e)return[...n];const t=e[0].slice(1),r=e[1].slice(1);return n.map(i=>[i[t],i[r]])},fromXy(n,e){if(!e)return[...n];const t=e[0].slice(1),r=e[1].slice(1);return n.map(([i,a])=>({[t]:i,[r]:a}))}};class d5{constructor(e,t){this._cells=[],this._cellSize=t,this._reverseCellSize=1/t;for(const r of e){const i=this.coordToCellNum(r[0]),a=this.coordToCellNum(r[1]);this._cells[i]||(this._cells[i]=[]),this._cells[i][a]||(this._cells[i][a]=[]),this._cells[i][a].push(r)}}cellPoints(e,t){var r;return((r=this._cells[e])===null||r===void 0?void 0:r[t])||[]}rangePoints(e){const t=this.coordToCellNum(e[0]),r=this.coordToCellNum(e[1]),i=this.coordToCellNum(e[2]),a=this.coordToCellNum(e[3]),s=[];for(let o=t;o<=i;o++)for(let l=r;l<=a;l++){const u=this.cellPoints(o,l);for(const h of u)s.push(h)}return s}removePoint(e){const t=this.coordToCellNum(e[0]),r=this.coordToCellNum(e[1]),i=this._cells[t][r],a=i.findIndex(([s,o])=>s===e[0]&&o===e[1]);return a>-1&&i.splice(a,1),i}trunc(e){return Math.trunc(e)}coordToCellNum(e){return this.trunc(e*this._reverseCellSize)}extendBbox(e,t){return[e[0]-t*this._cellSize,e[1]-t*this._cellSize,e[2]+t*this._cellSize,e[3]+t*this._cellSize]}}function v5(n,e){return new d5(n,e)}const Ux=+(Math.pow(2,27)+1);function bd(n,e,t){const r=n*e,i=Ux*n,a=i-n,s=i-a,o=n-s,l=Ux*e,u=l-e,h=l-u,v=e-h,F=r-s*h-o*h-s*v,G=o*v-F;return t?(t[0]=G,t[1]=r,t):[G,r]}function g5(n,e,t){const r=n+e,i=r-n,a=r-i,s=e-i,o=n-a;return t?(t[0]=o+s,t[1]=r,t):[o+s,r]}function p5(n,e){const t=n.length;if(t===1){const o=bd(n[0],e);return o[0]?o:[o[1]]}const r=new Array(2*t),i=[.1,.1],a=[.1,.1];let s=0;bd(n[0],e,i),i[0]&&(r[s++]=i[0]);for(let o=1;o<t;++o){bd(n[o],e,a);const l=i[1];g5(l,a[0],i),i[0]&&(r[s++]=i[0]);const u=a[1],h=i[1],v=u+h,E=v-u,D=h-E;i[1]=v,D&&(r[s++]=D)}return i[1]&&(r[s++]=i[1]),s===0&&(r[s++]=0),r.length=s,r}function m5(n,e){const t=n+e,r=t-n,i=t-r,a=e-r,o=n-i+a;return o?[o,t]:[t]}function y5(n,e){const t=n.length|0,r=e.length|0;if(t===1&&r===1)return m5(n[0],-e[0]);const i=t+r,a=new Array(i);let s=0,o=0,l=0;const u=Math.abs;let h=n[o],v=u(h),E=-e[l],D=u(E),F,G;v<D?(G=h,o+=1,o<t&&(h=n[o],v=u(h))):(G=E,l+=1,l<r&&(E=-e[l],D=u(E))),o<t&&v<D||l>=r?(F=h,o+=1,o<t&&(h=n[o],v=u(h))):(F=E,l+=1,l<r&&(E=-e[l],D=u(E)));let H=F+G,K=H-F,q=G-K,te=q,ue=H,le,he,ve,ge,Te;for(;o<t&&l<r;)v<D?(F=h,o+=1,o<t&&(h=n[o],v=u(h))):(F=E,l+=1,l<r&&(E=-e[l],D=u(E))),G=te,H=F+G,K=H-F,q=G-K,q&&(a[s++]=q),le=ue+H,he=le-ue,ve=le-he,ge=H-he,Te=ue-ve,te=Te+ge,ue=le;for(;o<t;)F=h,G=te,H=F+G,K=H-F,q=G-K,q&&(a[s++]=q),le=ue+H,he=le-ue,ve=le-he,ge=H-he,Te=ue-ve,te=Te+ge,ue=le,o+=1,o<t&&(h=n[o]);for(;l<r;)F=E,G=te,H=F+G,K=H-F,q=G-K,q&&(a[s++]=q),le=ue+H,he=le-ue,ve=le-he,ge=H-he,Te=ue-ve,te=Te+ge,ue=le,l+=1,l<r&&(E=-e[l]);return te&&(a[s++]=te),ue&&(a[s++]=ue),s||(a[s++]=0),a.length=s,a}function _5(n,e){const t=n+e,r=t-n,i=t-r,a=e-r,o=n-i+a;return o?[o,t]:[t]}function E5(n,e){const t=n.length|0,r=e.length|0;if(t===1&&r===1)return _5(n[0],e[0]);const i=t+r,a=new Array(i);let s=0,o=0,l=0;const u=Math.abs;let h=n[o],v=u(h),E=e[l],D=u(E),F,G;v<D?(G=h,o+=1,o<t&&(h=n[o],v=u(h))):(G=E,l+=1,l<r&&(E=e[l],D=u(E))),o<t&&v<D||l>=r?(F=h,o+=1,o<t&&(h=n[o],v=u(h))):(F=E,l+=1,l<r&&(E=e[l],D=u(E)));let H=F+G,K=H-F,q=G-K,te=q,ue=H,le,he,ve,ge,Te;for(;o<t&&l<r;)v<D?(F=h,o+=1,o<t&&(h=n[o],v=u(h))):(F=E,l+=1,l<r&&(E=e[l],D=u(E))),G=te,H=F+G,K=H-F,q=G-K,q&&(a[s++]=q),le=ue+H,he=le-ue,ve=le-he,ge=H-he,Te=ue-ve,te=Te+ge,ue=le;for(;o<t;)F=h,G=te,H=F+G,K=H-F,q=G-K,q&&(a[s++]=q),le=ue+H,he=le-ue,ve=le-he,ge=H-he,Te=ue-ve,te=Te+ge,ue=le,o+=1,o<t&&(h=n[o]);for(;l<r;)F=E,G=te,H=F+G,K=H-F,q=G-K,q&&(a[s++]=q),le=ue+H,he=le-ue,ve=le-he,ge=H-he,Te=ue-ve,te=Te+ge,ue=le,l+=1,l<r&&(E=e[l]);return te&&(a[s++]=te),ue&&(a[s++]=ue),s||(a[s++]=0),a.length=s,a}const Wx=5,wd=11102230246251565e-32,x5=(3+16*wd)*wd,b5=(7+56*wd)*wd;function w5(n,e,t,r){return function(a,s,o){const l=n(n(e(s[1],o[0]),e(-o[1],s[0])),n(e(a[1],s[0]),e(-s[1],a[0]))),u=n(e(a[1],o[0]),e(-o[1],a[0])),h=r(l,u);return h[h.length-1]}}function M5(n,e,t,r){return function(a,s,o,l){const u=n(n(t(n(e(o[1],l[0]),e(-l[1],o[0])),s[2]),n(t(n(e(s[1],l[0]),e(-l[1],s[0])),-o[2]),t(n(e(s[1],o[0]),e(-o[1],s[0])),l[2]))),n(t(n(e(s[1],l[0]),e(-l[1],s[0])),a[2]),n(t(n(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),l[2])))),h=n(n(t(n(e(o[1],l[0]),e(-l[1],o[0])),a[2]),n(t(n(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),t(n(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),n(t(n(e(s[1],o[0]),e(-o[1],s[0])),a[2]),n(t(n(e(a[1],o[0]),e(-o[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),o[2])))),v=r(u,h);return v[v.length-1]}}function A5(n,e,t,r){return function(a,s,o,l,u){const h=n(n(n(t(n(t(n(e(l[1],u[0]),e(-u[1],l[0])),o[2]),n(t(n(e(o[1],u[0]),e(-u[1],o[0])),-l[2]),t(n(e(o[1],l[0]),e(-l[1],o[0])),u[2]))),s[3]),n(t(n(t(n(e(l[1],u[0]),e(-u[1],l[0])),s[2]),n(t(n(e(s[1],u[0]),e(-u[1],s[0])),-l[2]),t(n(e(s[1],l[0]),e(-l[1],s[0])),u[2]))),-o[3]),t(n(t(n(e(o[1],u[0]),e(-u[1],o[0])),s[2]),n(t(n(e(s[1],u[0]),e(-u[1],s[0])),-o[2]),t(n(e(s[1],o[0]),e(-o[1],s[0])),u[2]))),l[3]))),n(t(n(t(n(e(o[1],l[0]),e(-l[1],o[0])),s[2]),n(t(n(e(s[1],l[0]),e(-l[1],s[0])),-o[2]),t(n(e(s[1],o[0]),e(-o[1],s[0])),l[2]))),-u[3]),n(t(n(t(n(e(l[1],u[0]),e(-u[1],l[0])),s[2]),n(t(n(e(s[1],u[0]),e(-u[1],s[0])),-l[2]),t(n(e(s[1],l[0]),e(-l[1],s[0])),u[2]))),a[3]),t(n(t(n(e(l[1],u[0]),e(-u[1],l[0])),a[2]),n(t(n(e(a[1],u[0]),e(-u[1],a[0])),-l[2]),t(n(e(a[1],l[0]),e(-l[1],a[0])),u[2]))),-s[3])))),n(n(t(n(t(n(e(s[1],u[0]),e(-u[1],s[0])),a[2]),n(t(n(e(a[1],u[0]),e(-u[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),u[2]))),l[3]),n(t(n(t(n(e(s[1],l[0]),e(-l[1],s[0])),a[2]),n(t(n(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),l[2]))),-u[3]),t(n(t(n(e(o[1],l[0]),e(-l[1],o[0])),s[2]),n(t(n(e(s[1],l[0]),e(-l[1],s[0])),-o[2]),t(n(e(s[1],o[0]),e(-o[1],s[0])),l[2]))),a[3]))),n(t(n(t(n(e(o[1],l[0]),e(-l[1],o[0])),a[2]),n(t(n(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),t(n(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),-s[3]),n(t(n(t(n(e(s[1],l[0]),e(-l[1],s[0])),a[2]),n(t(n(e(a[1],l[0]),e(-l[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),l[2]))),o[3]),t(n(t(n(e(s[1],o[0]),e(-o[1],s[0])),a[2]),n(t(n(e(a[1],o[0]),e(-o[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),o[2]))),-l[3]))))),v=n(n(n(t(n(t(n(e(l[1],u[0]),e(-u[1],l[0])),o[2]),n(t(n(e(o[1],u[0]),e(-u[1],o[0])),-l[2]),t(n(e(o[1],l[0]),e(-l[1],o[0])),u[2]))),a[3]),t(n(t(n(e(l[1],u[0]),e(-u[1],l[0])),a[2]),n(t(n(e(a[1],u[0]),e(-u[1],a[0])),-l[2]),t(n(e(a[1],l[0]),e(-l[1],a[0])),u[2]))),-o[3])),n(t(n(t(n(e(o[1],u[0]),e(-u[1],o[0])),a[2]),n(t(n(e(a[1],u[0]),e(-u[1],a[0])),-o[2]),t(n(e(a[1],o[0]),e(-o[1],a[0])),u[2]))),l[3]),t(n(t(n(e(o[1],l[0]),e(-l[1],o[0])),a[2]),n(t(n(e(a[1],l[0]),e(-l[1],a[0])),-o[2]),t(n(e(a[1],o[0]),e(-o[1],a[0])),l[2]))),-u[3]))),n(n(t(n(t(n(e(o[1],u[0]),e(-u[1],o[0])),s[2]),n(t(n(e(s[1],u[0]),e(-u[1],s[0])),-o[2]),t(n(e(s[1],o[0]),e(-o[1],s[0])),u[2]))),a[3]),t(n(t(n(e(o[1],u[0]),e(-u[1],o[0])),a[2]),n(t(n(e(a[1],u[0]),e(-u[1],a[0])),-o[2]),t(n(e(a[1],o[0]),e(-o[1],a[0])),u[2]))),-s[3])),n(t(n(t(n(e(s[1],u[0]),e(-u[1],s[0])),a[2]),n(t(n(e(a[1],u[0]),e(-u[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),u[2]))),o[3]),t(n(t(n(e(s[1],o[0]),e(-o[1],s[0])),a[2]),n(t(n(e(a[1],o[0]),e(-o[1],a[0])),-s[2]),t(n(e(a[1],s[0]),e(-s[1],a[0])),o[2]))),-u[3])))),E=r(h,v);return E[E.length-1]}}function Md(n){return(n===3?w5:n===4?M5:A5)(E5,bd,p5,y5)}const T5=Md(3),S5=Md(4),Al=[function(){return 0},function(){return 0},function(e,t){return t[0]-e[0]},function(e,t,r){const i=(e[1]-r[1])*(t[0]-r[0]),a=(e[0]-r[0])*(t[1]-r[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 l=x5*o;return s>=l||s<=-l?s:T5(e,t,r)},function(e,t,r,i){const a=e[0]-i[0],s=t[0]-i[0],o=r[0]-i[0],l=e[1]-i[1],u=t[1]-i[1],h=r[1]-i[1],v=e[2]-i[2],E=t[2]-i[2],D=r[2]-i[2],F=s*h,G=o*u,H=o*l,K=a*h,q=a*u,te=s*l,ue=v*(F-G)+E*(H-K)+D*(q-te),le=(Math.abs(F)+Math.abs(G))*Math.abs(v)+(Math.abs(H)+Math.abs(K))*Math.abs(E)+(Math.abs(q)+Math.abs(te))*Math.abs(D),he=b5*le;return ue>he||-ue>he?ue:S5(e,t,r,i)}];function P5(n){let e=Al[n.length];return e||(e=Al[n.length]=Md(n.length)),e.apply(void 0,...n)}function O5(n,e,t,r,i,a,s){return function(...l){switch(l.length){case 0:case 1:return 0;case 2:return r(l[0],l[1]);case 3:return i(l[0],l[1],l[2]);case 4:return a(l[0],l[1],l[2],l[3]);case 5:return s(l[0],l[1],l[2],l[3],l[4])}return n(l)}}function C5(){for(;Al.length<=Wx;)Al.push(Md(Al.length));const n=O5(void 0,P5,...Al);for(let e=0;e<=Wx;++e)n[e]=Al[e];return n}var Mc=C5();const Gx=Mc[3];function D5(n){const e=n.length;if(e<3){const o=new Array(e);for(let l=0;l<e;++l)o[l]=l;return e===2&&n[0][0]===n[1][0]&&n[0][1]===n[1][1]?[0]:o}const t=new Array(e);for(let o=0;o<e;++o)t[o]=o;t.sort((o,l)=>{const u=n[o][0]-n[l][0];return u||n[o][1]-n[l][1]});const r=[t[0],t[1]],i=[t[0],t[1]];for(let o=2;o<e;++o){const l=t[o],u=n[l];let h=r.length;for(;h>1&&Gx(n[r[h-2]],n[r[h-1]],u)<=0;)h-=1,r.pop();for(r.push(l),h=i.length;h>1&&Gx(n[i[h-2]],n[i[h-1]],u)>=0;)h-=1,i.pop();i.push(l)}const a=new Array(i.length+r.length-2);let s=0;for(let o=0,l=r.length;o<l;++o)a[s++]=r[o];for(let o=i.length-2;o>0;--o)a[s++]=i[o];return a}function L5(n,e,t,r){for(let i=0;i<2;++i){const a=n[i],s=e[i],[o,l]=[Math.min(a,s),Math.max(a,s)],u=t[i],h=r[i],[v,E]=[Math.min(u,h),Math.max(u,h)];if(E<o||l<v)return!1}return!0}function R5(n,e,t,r){const i=Mc(n,t,r),a=Mc(e,t,r);if(i>0&&a>0||i<0&&a<0)return!1;const s=Mc(t,n,e),o=Mc(r,n,e);return s>0&&o>0||s<0&&o<0?!1:i===0&&a===0&&s===0&&o===0?L5(n,e,t,r):!0}function I5(n){const e=[n[0]];let t=n[0];for(let r=1;r<n.length;r++){const i=n[r];(t[0]!==i[0]||t[1]!==i[1])&&e.push(i),t=i}return e}function N5(n){return n.sort(function(e,t){return e[0]-t[0]||e[1]-t[1]})}function H0(n,e){return Math.pow(e[0]-n[0],2)+Math.pow(e[1]-n[1],2)}function Hx(n,e,t){const r=[e[0]-n[0],e[1]-n[1]],i=[t[0]-n[0],t[1]-n[1]],a=H0(n,e),s=H0(n,t);return(r[0]*i[0]+r[1]*i[1])/Math.sqrt(a*s)}function jx(n,e){for(let t=0;t<e.length-1;t++){const r=[e[t],e[t+1]];if(!(n[0][0]===r[0][0]&&n[0][1]===r[0][1]||n[0][0]===r[1][0]&&n[0][1]===r[1][1])&&R5(n[0],n[1],r[0],r[1]))return!0}return!1}function B5(n){let e=1/0,t=1/0,r=-1/0,i=-1/0;for(let a=n.length-1;a>=0;a--)n[a][0]<e&&(e=n[a][0]),n[a][1]<t&&(t=n[a][1]),n[a][0]>r&&(r=n[a][0]),n[a][1]>i&&(i=n[a][1]);return[r-e,i-t]}function k5(n){return[Math.min(n[0][0],n[1][0]),Math.min(n[0][1],n[1][1]),Math.max(n[0][0],n[1][0]),Math.max(n[0][1],n[1][1])]}function F5(n,e,t){let r=null,i=Zx,a=Zx,s,o;for(let l=0;l<e.length;l++)s=Hx(n[0],n[1],e[l]),o=Hx(n[1],n[0],e[l]),s>i&&o>a&&!jx([n[0],e[l]],t)&&!jx([n[1],e[l]],t)&&(i=s,a=o,r=e[l]);return r}function Vx(n,e,t,r,i){let a=!1;for(let s=0;s<n.length-1;s++){const o=[n[s],n[s+1]],l=o[0][0]+","+o[0][1]+","+o[1][0]+","+o[1][1];if(H0(o[0],o[1])<e||i.has(l))continue;let u=0,h=k5(o),v,E,D;do h=r.extendBbox(h,u),v=h[2]-h[0],E=h[3]-h[1],D=F5(o,r.rangePoints(h),n),u++;while(D===null&&(t[0]>v||t[1]>E));v>=t[0]&&E>=t[1]&&i.add(l),D!==null&&(n.splice(s+1,0,D),r.removePoint(D),a=!0)}return a?Vx(n,e,t,r,i):n}function z5(n,e,t){const r=e||20,i=I5(N5(G0.toXy(n,t)));if(i.length<4){const v=i.concat([i[0]]);return t?G0.fromXy(v,t):v}const a=B5(i),s=[a[0]*Kx,a[1]*Kx],o=D5(i).reverse().map(v=>i[v]);o.push(o[0]);const l=i.filter(function(v){return o.indexOf(v)<0}),u=Math.ceil(1/(i.length/(a[0]*a[1]))),h=Vx(o,Math.pow(r,2),s,v5(l,u),new Set);return t?G0.fromXy(h,t):h}const Zx=Math.cos(90/(180/Math.PI)),Kx=.6;function U5(n,e,t){if(n.length===1)return W5(n[0],e,t);if(n.length===2)return Xx(n,e,t);if(n.length===3){const[r,i,a]=kg(n);if(a1(r,i,a))return Xx([r,a],e,t)}switch(t){case"smooth":return H5(n,e);case"sharp":return j5(n,e);case"rounded":default:return G5(n,e)}}const W5=(n,e,t)=>{if(t==="sharp")return[["M",n[0]-e,n[1]-e],["L",n[0]+e,n[1]-e],["L",n[0]+e,n[1]+e],["L",n[0]-e,n[1]+e],["Z"]];const r=[e,e,0,0,0];return[["M",n[0],n[1]-e],["A",...r,n[0],n[1]+e],["A",...r,n[0],n[1]-e]]},Xx=(n,e,t)=>{const r=[e,e,0,0,0],i=t==="sharp"?zn(n[0],To(Js(Pr(n[0],n[1])),e)):n[0],a=t==="sharp"?zn(n[1],To(Js(Pr(n[1],n[0])),e)):n[1],s=To(Js(nf(Pr(i,a),!1)),e),o=To(s,-1),l=zn(i,s),u=zn(a,s),h=zn(a,o),v=zn(i,o);return t==="sharp"?[["M",l[0],l[1]],["L",u[0],u[1]],["L",h[0],h[1]],["L",v[0],v[1]],["Z"]]:[["M",l[0],l[1]],["L",u[0],u[1]],["A",...r,h[0],h[1]],["L",v[0],v[1]],["A",...r,l[0],l[1]]]},G5=(n,e)=>{const t=kg(n).map((o,l)=>{const u=(l-2+n.length)%n.length,h=(l-1+n.length)%n.length,v=(l+1)%n.length,E=n[u],D=n[h],F=n[v],G=Pr(E,D),H=Pr(D,o),K=Pr(o,F),q=(ve,ge)=>Ig(ve,ge,!0)<Math.PI,te=q(G,H),ue=q(H,K),le=ve=>To(Js(nf(ve,!1)),e),he=le(H);return[{p:fl(te?zn(D,le(G)):zn(D,he)),concave:te&&D},{p:fl(ue?zn(o,le(K)):zn(o,he)),concave:ue&&o}]}),r=[e,e,0,0,0],i=t.findIndex((o,l)=>!t[(l-1+t.length)%t.length][0].concave&&!t[(l-1+t.length)%t.length][1].concave&&!o[0].concave&&!o[0].concave&&!o[1].concave),a=t.slice(i).concat(t.slice(0,i));let s=[];return a.flatMap((o,l)=>{const u=[],h=a[t.length-1];return l===0&&u.push(["M",...h[1].p]),o[0].concave?s.push(o[0].p,o[1].p):u.push(["A",...r,...o[0].p]),o[1].concave?s.unshift(o[1].p):u.push(["L",...o[1].p]),s.length===3&&(u.pop(),u.push(["C",...s.flat()]),s=[]),u})},H5=(n,e)=>{const t=kg(n).map((r,i)=>{const a=n[(i+1)%n.length];return{p:r,v:Js(Pr(a,r))}});return t.forEach((r,i)=>{const a=i>0?i-1:n.length-1,s=t[a].v,o=Js(zn(s,To(r.v,Ig(s,r.v,!0)<Math.PI?1:-1)));r.p=zn(r.p,To(o,e))}),b1(t.map(r=>r.p))},j5=(n,e)=>{const r=n.map((a,s)=>{const o=n[s===0?n.length-1:s-1],l=rc(To(Js(nf(Pr(o,a),!1)),e));return[zn(o,l),zn(a,l)]}).flat();return r.map((a,s)=>{if(s%2===0)return null;const o=[r[(s-1)%r.length],r[s%r.length]],l=[r[(s+1)%r.length],r[(s+2)%r.length]];return Bg(o,l,!0)}).filter(Boolean).map((a,s)=>[s===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var V5=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class Ad extends Ui{constructor(e,t){super(e,Object.assign({},Ad.defaultOptions,t)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new uc({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const r=!li(this.optionsCache,this.options);this.shape.update(this.getHullStyle(r))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=r=>{this.shape&&this.options.members.includes(yt(r.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(r=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const s=a.map(u=>i.getNodeData(u)),o=z5(s.map(Ti),this.options.concavity).slice(1).reverse(),l=o.flatMap(u=>s.filter(h=>li(Ti(h),u)).map(yt));return li(l,this.hullMemberIds)&&!r?this.path:(this.hullMemberIds=l,this.path=U5(o,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(Zt.AFTER_RENDER,this.drawHull),this.context.graph.on(Zt.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(e){const t=this.options,{members:r,padding:i,corner:a}=t,s=V5(t,["members","padding","corner"]);return Object.assign(Object.assign({},s),{d:this.getHullPath(e)})}getPadding(){const{graph:e}=this.context;return this.hullMemberIds.reduce((r,i)=>{const{halfExtents:a}=e.getElementRenderBounds(i),s=Math.max(a[0],a[1]);return Math.max(r,s)},0)+this.options.padding}addMember(e){const t=Array.isArray(e)?e:[e];this.options.members=[...new Set([...this.options.members,...t])],this.shape.update({d:this.getHullPath()})}removeMember(e){const t=Array.isArray(e)?e:[e];this.options.members=this.options.members.filter(r=>!t.includes(r)),t.some(r=>this.hullMemberIds.includes(r))&&this.shape.update({d:this.getHullPath()})}updateMember(e){this.options.members=fn(e)?e(this.options.members):e,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.context.graph.off(Zt.AFTER_DRAW,this.drawHull),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}Ad.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};function Yx(n,e){e(n),n.children&&n.children.forEach(function(t){t&&Yx(t,e)})}function Ac(n){Td(n,!0)}function ys(n){Td(n,!1)}function Td(n,e){var t=e?"visible":"hidden";Yx(n,function(r){r.attr("visibility",t)})}var Z5=5,Qx=function(n,e,t,r){t===void 0&&(t=0),r===void 0&&(r=Z5),Object.entries(e).forEach(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1],l=n;Object.prototype.hasOwnProperty.call(e,s)&&(o?ql(o)?(ql(n[s])||(l[s]={}),t<r?Qx(n[s],o,t+1,r):l[s]=e[s]):Sa(o)?(l[s]=[],l[s]=l[s].concat(o)):l[s]=o:l[s]=o)})},Ri=function(n){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];for(var r=0;r<e.length;r+=1)Qx(n,e[r]);return n},K5=function(n){(0,xe.ZT)(e,n);function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=n.apply(this,(0,xe.ev)([],(0,xe.CR)(t),!1))||this;return i.isMutationObserved=!0,i.addEventListener(Xn.INSERTED,function(){ys(i)}),i}return e}(Ai);function Jx(n){var e=n.appendChild(new K5({class:"offscreen"}));return ys(e),e}function X5(n){for(var e=n;e;){if(e.className==="offscreen")return!0;e=e.parent}return!1}function Y5(){Td(this,this.attributes.visibility!=="hidden")}var ti=function(n){(0,xe.ZT)(e,n);function e(t,r){r===void 0&&(r={});var i=n.call(this,Ri({},{style:r},t))||this;return i.initialized=!1,i._defaultOptions=r,i}return Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Jx(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),e.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},e.prototype.disconnectedCallback=function(){var t;(t=this._offscreen)===null||t===void 0||t.destroy()},e.prototype.attributeChangedCallback=function(t){t==="visibility"&&Y5.call(this)},e.prototype.update=function(t,r){var i;return this.attr(Ri({},this.attributes,t||{})),(i=this.render)===null||i===void 0?void 0:i.call(this,this.attributes,this,r)},e.prototype.clear=function(){this.removeChildren()},e.prototype.bindEvents=function(t,r){},e.prototype.getSubShapeStyle=function(t){var r=t.x,i=t.y,a=t.transform,s=t.transformOrigin,o=t.class,l=t.className,u=t.zIndex,h=(0,xe._T)(t,["x","y","transform","transformOrigin","class","className","zIndex"]);return h},e}(ng);function j0(n){return n.toString().charAt(0).toUpperCase()+n.toString().slice(1)}function Q5(n){return n.toString().charAt(0).toLowerCase()+n.toString().slice(1)}function J5(n,e){return"".concat(e).concat(j0(n))}function qx(n,e,t){var r;t===void 0&&(t=!0);var i=e||((r=n.match(/^([a-z][a-z0-9]+)/))===null||r===void 0?void 0:r[0])||"",a=n.replace(new RegExp("^(".concat(i,")")),"");return t?Q5(a):a}function q5(n,e){Object.entries(e).forEach(function(t){var r=(0,xe.CR)(t,2),i=r[0],a=r[1];(0,xe.ev)([n],(0,xe.CR)(n.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(l,u){return"".concat(l).concat(u.join(":"),";")},"")}})})}var Sd=function(n,e){if(!(n!=null&&n.startsWith(e)))return!1;var t=n[e.length];return t>="A"&&t<="Z"};function Un(n,e,t){t===void 0&&(t=!1);var r={};return Object.entries(n).forEach(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1];if(!(s==="className"||s==="class")){if(Sd(s,"show")&&Sd(qx(s,"show"),e)!==t)s===J5(e,"show")?r[s]=o:r[s.replace(new RegExp(j0(e)),"")]=o;else if(!Sd(s,"show")&&Sd(s,e)!==t){var l=qx(s,e);l==="filter"&&typeof o=="function"||(r[l]=o)}}}),r}function uu(n,e){return Object.entries(n).reduce(function(t,r){var i=(0,xe.CR)(r,2),a=i[0],s=i[1];return a.startsWith("show")?t["show".concat(e).concat(a.slice(4))]=s:t["".concat(e).concat(j0(a))]=s,t},{})}function no(n,e){e===void 0&&(e=["x","y","class","className"]);var t=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],r={},i={};return Object.entries(n).forEach(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];e.includes(o)||(t.indexOf(o)!==-1?i[o]=l:r[o]=l)}),[r,i]}var V0=function(n){(0,xe.ZT)(e,n);function e(t){t===void 0&&(t={});var r=t.style,i=(0,xe._T)(t,["style"]);return n.call(this,(0,xe.pi)({style:(0,xe.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},r)},i))||this}return Object.defineProperty(e.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=Jx(this)),this._offscreen},enumerable:!1,configurable:!0}),e.prototype.disconnectedCallback=function(){var t;(t=this._offscreen)===null||t===void 0||t.destroy()},e}(ol);function $5(n,e){var t=new Map;return n.forEach(function(r){var i=e(r);t.has(i)||t.set(i,[]),t.get(i).push(r)}),t}function e4(n){throw new Error(n)}var t4=function(){function n(i,a,s,o,l,u,h){i===void 0&&(i=null),a===void 0&&(a=null),s===void 0&&(s=null),o===void 0&&(o=null),l===void 0&&(l=[null,null,null,null,null]),u===void 0&&(u=[]),h===void 0&&(h=[]),e.add(this),this._elements=Array.from(i),this._data=a,this._parent=s,this._document=o,this._enter=l[0],this._update=l[1],this._exit=l[2],this._merge=l[3],this._split=l[4],this._transitions=u,this._facetElements=h}n.prototype.selectAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new t(a,null,this._elements[0],this._document)},n.prototype.selectFacetAll=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i):i;return new t(this._elements,null,this._parent,this._document,void 0,void 0,a)},n.prototype.select=function(i){var a=typeof i=="string"?this._parent.querySelectorAll(i)[0]||null:i;return new t([a],null,a,this._document)},n.prototype.append=function(i){var a=this,s=typeof i=="function"?i:function(){return a.createElement(i)},o=[];if(this._data!==null){for(var l=0;l<this._data.length;l++){var u=this._data[l],h=(0,xe.CR)(Array.isArray(u)?u:[u,null],2),v=h[0],E=h[1],D=s(v,l);D.__data__=v,E!==null&&(D.__fromElements__=E),this._parent.appendChild(D),o.push(D)}return new t(o,null,this._parent,this._document)}for(var l=0;l<this._elements.length;l++){var F=this._elements[l],v=F.__data__,D=s(v,l);F.appendChild(D),o.push(D)}return new t(o,null,o[0],this._document)},n.prototype.maybeAppend=function(i,a){var s=(0,xe.Q_)(this,e,"m",r).call(this,i[0]==="#"?i:"#".concat(i),a);return s.attr("id",i),s},n.prototype.maybeAppendByClassName=function(i,a){var s=i.toString(),o=(0,xe.Q_)(this,e,"m",r).call(this,s[0]==="."?s:".".concat(s),a);return o.attr("className",s),o},n.prototype.maybeAppendByName=function(i,a){var s=(0,xe.Q_)(this,e,"m",r).call(this,'[name="'.concat(i,'"]'),a);return s.attr("name",i),s},n.prototype.data=function(i,a,s){var o,l;a===void 0&&(a=function(Oe){return Oe}),s===void 0&&(s=function(){return null});for(var u=[],h=[],v=new Set(this._elements),E=[],D=new Set,F=new Map(this._elements.map(function(Oe,Ne){return[a(Oe.__data__,Ne),Oe]})),G=new Map(this._facetElements.map(function(Oe,Ne){return[a(Oe.__data__,Ne),Oe]})),H=$5(this._elements,function(Oe){return s(Oe.__data__)}),K=0;K<i.length;K++){var q=i[K],te=a(q,K),ue=s(q,K);if(F.has(te)){var le=F.get(te);le.__data__=q,le.__facet__=!1,h.push(le),v.delete(le),F.delete(te)}else if(G.has(te)){var le=G.get(te);le.__data__=q,le.__facet__=!0,h.push(le),G.delete(te)}else if(H.has(te)){var he=H.get(te);E.push([q,he]);try{for(var ve=(o=void 0,(0,xe.XA)(he)),ge=ve.next();!ge.done;ge=ve.next()){var le=ge.value;v.delete(le)}}catch(Oe){o={error:Oe}}finally{try{ge&&!ge.done&&(l=ve.return)&&l.call(ve)}finally{if(o)throw o.error}}H.delete(te)}else if(F.has(ue)){var le=F.get(ue);le.__toData__?le.__toData__.push(q):le.__toData__=[q],D.add(le),v.delete(le)}else u.push(q)}var Te=[new t([],u,this._parent,this._document),new t(h,null,this._parent,this._document),new t(v,null,this._parent,this._document),new t([],E,this._parent,this._document),new t(D,null,this._parent,this._document)];return new t(this._elements,null,this._parent,this._document,Te)},n.prototype.merge=function(i){var a=(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(this._elements),!1),(0,xe.CR)(i._elements),!1),s=(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(this._transitions),!1),(0,xe.CR)(i._transitions),!1);return new t(a,null,this._parent,this._document,void 0,s)},n.prototype.createElement=function(i){if(this._document)return this._document.createElement(i,{});var a=t.registry[i];return a?new a:e4("Unknown node type: ".concat(i))},n.prototype.join=function(i,a,s,o,l){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}),l===void 0&&(l=function(F){return F.remove()});var u=i(this._enter),h=a(this._update),v=s(this._exit),E=o(this._merge),D=l(this._split);return h.merge(u).merge(v).merge(E).merge(D)},n.prototype.remove=function(){for(var i=function(o){var l=a._elements[o],u=a._transitions[o];u?u.then(function(){return l.remove()}):l.remove()},a=this,s=0;s<this._elements.length;s++)i(s);return new t([],null,this._parent,this._document,void 0,this._transitions)},n.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},n.prototype.attr=function(i,a){var s=typeof a!="function"?function(){return a}:a;return this.each(function(o,l){a!==void 0&&(this[i]=s.call(this,o,l))})},n.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(l,u){a!==void 0&&(this.style[i]=o.call(this,l,u))})},n.prototype.styles=function(i,a){return i===void 0&&(i={}),a===void 0&&(a=!0),this.each(function(s,o){var l=this;Object.entries(i).forEach(function(u){var h=(0,xe.CR)(u,2),v=h[0],E=h[1],D=typeof E!="function"||!a?function(){return E}:E;E!==void 0&&l.attr(v,D.call(l,s,o))})})},n.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,l){i&&this.update&&this.update(s.call(this,o,l))})},n.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,l){i&&this.update&&this.update(s.call(this,o,l))})},n.prototype.transition=function(i){var a=this._transitions;return this.each(function(s,o){a[o]=i.call(this,s,o)})},n.prototype.on=function(i,a){return this.each(function(){this.addEventListener(i,a)}),this},n.prototype.call=function(i){for(var a=[],s=1;s<arguments.length;s++)a[s-1]=arguments[s];return i.call.apply(i,(0,xe.ev)([this._parent,this],(0,xe.CR)(a),!1)),this},n.prototype.node=function(){return this._elements[0]},n.prototype.nodes=function(){return this._elements},n.prototype.transitions=function(){return this._transitions.filter(function(i){return!!i})},n.prototype.parent=function(){return this._parent};var e,t,r;return t=n,e=new WeakSet,r=function(a,s){var o=this._elements[0],l=o.querySelector(a);if(l)return new t([l],null,this._parent,this._document);var u=typeof s=="string"?this.createElement(s):s();return o.appendChild(u),new t([u],null,this._parent,this._document)},n.registry={g:Ai,rect:ki,circle:Zs,path:Oa,text:V0,ellipse:Vu,image:Ku,line:al,polygon:sl,polyline:yh,html:Zu},n}();function dn(n){return new t4([n],null,n,n.ownerDocument)}function n4(n,e,t){return n.querySelector(e)?dn(n).select(e):dn(n).append(t)}var Qi=function(){function n(e,t,r,i){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0),i===void 0&&(i=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=e,this.y=t,this.width=r,this.height=i}return Object.defineProperty(n.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),n.fromRect=function(e){return new n(e.x,e.y,e.width,e.height)},n.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}},n.prototype.isPointIn=function(e,t){return e>=this.left&&e<=this.right&&t>=this.top&&t<=this.bottom},n}();function IW(n){var e=n.getRenderBounds(),t=__read(e.min,2),r=t[0],i=t[1],a=__read(e.max,2),s=a[0],o=a[1],l=s-r,u=o-i;return new Qi(r,i,l,u)}var _s=function(n,e){var t=function(i){return"".concat(e,"-").concat(i)},r=Object.fromEntries(Object.entries(n).map(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1],l=t(o);return[s,{name:l,class:".".concat(l),id:"#".concat(l),toString:function(){return l}}]}));return Object.assign(r,{prefix:t}),r};function Wi(n){if(sn(n))return[n,n,n,n];if(Sa(n)){var e=n.length;if(e===1)return[n[0],n[0],n[0],n[0]];if(e===2)return[n[0],n[1],n[0],n[1]];if(e===3)return[n[0],n[1],n[2],n[1]];if(e===4)return n}return[0,0,0,0]}function Ba(n,e,t,r,i){return r===void 0&&(r=!0),i===void 0&&(i=function(a){a.node().removeChildren()}),n?t(e):(r&&i(e),null)}var $x=_s({text:"text"},"title");function Pd(n){return/\S+-\S+/g.test(n)?n.split("-").map(function(e){return e[0]}):n.length>2?[n[0]]:n.split("")}function r4(n,e){var t=n.attributes,r=t.position,i=t.spacing,a=t.inset,s=t.text,o=n.getBBox(),l=e.getBBox(),u=Pd(r),h=(0,xe.CR)(Wi(s?i:0),4),v=h[0],E=h[1],D=h[2],F=h[3],G=(0,xe.CR)(Wi(a),4),H=G[0],K=G[1],q=G[2],te=G[3],ue=(0,xe.CR)([F+E,v+D],2),le=ue[0],he=ue[1],ve=(0,xe.CR)([te+K,H+q],2),ge=ve[0],Te=ve[1];if(u[0]==="l")return new Qi(o.x,o.y,l.width+o.width+le+ge,Math.max(l.height+Te,o.height));if(u[0]==="t")return new Qi(o.x,o.y,Math.max(l.width+ge,o.width),l.height+o.height+he+Te);var Oe=(0,xe.CR)([e.attributes.width||l.width,e.attributes.height||l.height],2),Ne=Oe[0],ze=Oe[1];return new Qi(l.x,l.y,Ne+o.width+le+ge,ze+o.height+he+Te)}function i4(n,e){var t=Object.entries(e).reduce(function(r,i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1],l=n.node().attr(s);return l||(r[s]=o),r},{});n.styles(t)}function a4(n){var e,t,r,i,a=n,s=a.width,o=a.height,l=a.position,u=(0,xe.CR)([+s/2,+o/2],2),h=u[0],v=u[1],E=(0,xe.CR)([+h,+v,"center","middle"],4),D=E[0],F=E[1],G=E[2],H=E[3],K=Pd(l);return K.includes("l")&&(e=(0,xe.CR)([0,"start"],2),D=e[0],G=e[1]),K.includes("r")&&(t=(0,xe.CR)([+s,"end"],2),D=t[0],G=t[1]),K.includes("t")&&(r=(0,xe.CR)([0,"top"],2),F=r[0],H=r[1]),K.includes("b")&&(i=(0,xe.CR)([+o,"bottom"],2),F=i[0],H=i[1]),{x:D,y:F,textAlign:G,textBaseline:H}}var s4=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return e.prototype.getAvailableSpace=function(){var t=this,r=this.attributes,i=r.width,a=r.height,s=r.position,o=r.spacing,l=r.inset,u=t.querySelector($x.text.class);if(!u)return new Qi(0,0,+i,+a);var h=u.getBBox(),v=h.width,E=h.height,D=(0,xe.CR)(Wi(o),4),F=D[0],G=D[1],H=D[2],K=D[3],q=(0,xe.CR)([0,0,+i,+a],4),te=q[0],ue=q[1],le=q[2],he=q[3],ve=Pd(s);if(ve.includes("i"))return new Qi(te,ue,le,he);ve.forEach(function(Et,mt){var ct,ht,At,kt;Et==="t"&&(ct=(0,xe.CR)(mt===0?[E+H,+a-E-H]:[0,+a],2),ue=ct[0],he=ct[1]),Et==="r"&&(ht=(0,xe.CR)([+i-v-K],1),le=ht[0]),Et==="b"&&(At=(0,xe.CR)([+a-E-F],1),he=At[0]),Et==="l"&&(kt=(0,xe.CR)(mt===0?[v+G,+i-v-G]:[0,+i],2),te=kt[0],le=kt[1])});var ge=(0,xe.CR)(Wi(l),4),Te=ge[0],Oe=ge[1],Ne=ge[2],ze=ge[3],Xe=(0,xe.CR)([ze+Oe,Te+Ne],2),Je=Xe[0],st=Xe[1];return new Qi(te+ze,ue+Te,le-Je,he-st)},e.prototype.getBBox=function(){return this.title?this.title.getBBox():new Qi(0,0,0,0)},e.prototype.render=function(t,r){var i=this,a=t.width,s=t.height,o=t.position,l=t.spacing,u=(0,xe._T)(t,["width","height","position","spacing"]),h=(0,xe.CR)(no(u),1),v=h[0],E=a4(t),D=E.x,F=E.y,G=E.textAlign,H=E.textBaseline;Ba(!!u.text,dn(r),function(K){i.title=K.maybeAppendByClassName($x.text,"text").styles(v).call(i4,{x:D,y:F,textAlign:G,textBaseline:H}).node()})},e}(ti),Z0=function(){};function $a(n,e){return fn(n)?n.apply(void 0,(0,xe.ev)([],(0,xe.CR)(e),!1)):n}function o4(n,e){return n.reduce(function(t,r){return(t[r[e]]=t[r[e]]||[]).push(r),t},{})}function l4(n){return typeof n=="boolean"?!1:"enter"in n&&"update"in n&&"exit"in n}function eb(n){if(!n)return{enter:!1,update:!1,exit:!1};var e=["enter","update","exit"],t=Object.fromEntries(Object.entries(n).filter(function(r){var i=(0,xe.CR)(r,1),a=i[0];return!e.includes(a)}));return Object.fromEntries(e.map(function(r){return l4(n)?n[r]===!1?[r,!1]:[r,(0,xe.pi)((0,xe.pi)({},n[r]),t)]:[r,t]}))}function cu(n,e){n?n.finished.then(e):e()}function u4(n,e){n.length===0?e():Promise.all(n.map(function(t){return t==null?void 0:t.finished})).then(e)}function tb(n,e){"update"in n?n.update(e):n.attr(e)}function nb(n,e,t){if(e.length===0)return null;if(!t){var r=e.slice(-1)[0];return tb(n,{style:r}),null}return n.animate(e,t)}function c4(n,e){return!(n.nodeName!=="text"||e.nodeName!=="text"||n.attributes.text!==e.attributes.text)}function h4(n,e,t,r){if(r===void 0&&(r="destroy"),c4(n,e))return n.remove(),[null];var i=function(){r==="destroy"?n.destroy():r==="hide"&&ys(n),e.isVisible()&&Ac(e)};if(!t)return i(),[null];var a=t.duration,s=a===void 0?0:a,o=t.delay,l=o===void 0?0:o,u=Math.ceil(+s/2),h=+s/4,v=(0,xe.CR)(n.getGeometryBounds().center,2),E=v[0],D=v[1],F=(0,xe.CR)(e.getGeometryBounds().center,2),G=F[0],H=F[1],K=(0,xe.CR)([(E+G)/2-E,(D+H)/2-D],2),q=K[0],te=K[1],ue=n.style.opacity,le=ue===void 0?1:ue,he=e.style.opacity,ve=he===void 0?1:he,ge=n.style.transform||"",Te=e.style.transform||"",Oe=n.animate([{opacity:le,transform:"translate(0, 0) ".concat(ge)},{opacity:0,transform:"translate(".concat(q,", ").concat(te,") ").concat(ge)}],(0,xe.pi)((0,xe.pi)({fill:"both"},t),{duration:l+u+h})),Ne=e.animate([{opacity:0,transform:"translate(".concat(-q,", ").concat(-te,") ").concat(Te),offset:.01},{opacity:ve,transform:"translate(0, 0) ".concat(Te)}],(0,xe.pi)((0,xe.pi)({fill:"both"},t),{duration:u+h,delay:l+u-h}));return cu(Ne,i),[Oe,Ne]}function Es(n,e,t){var r={},i={};return Object.entries(e).forEach(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];if(!xn(l)){var u=n.style[o]||n.parsedStyle[o]||0;u!==l&&(r[o]=u,i[o]=l)}}),t?nb(n,[r,i],(0,xe.pi)({fill:"both"},t)):(tb(n,i),null)}function f4(n){var e;return((e=n[0])===null||e===void 0?void 0:e.map(function(t,r){return n.map(function(i){return i[r]})}))||[]}function K0(n,e,t){t===void 0&&(t=!1);var r=n.getBBox(),i=r.width,a=r.height,s=e/Math.max(i,a);return t&&(n.style.transform="scale(".concat(s,")")),s}var rb=function(n,e,t){return[["M",n-t,e],["A",t,t,0,1,0,n+t,e],["A",t,t,0,1,0,n-t,e],["Z"]]},d4=rb,v4=function(n,e,t){return[["M",n-t,e-t],["L",n+t,e-t],["L",n+t,e+t],["L",n-t,e+t],["Z"]]},g4=function(n,e,t){return[["M",n-t,e],["L",n,e-t],["L",n+t,e],["L",n,e+t],["Z"]]},p4=function(n,e,t){var r=t*Math.sin(.3333333333333333*Math.PI);return[["M",n-t,e+r],["L",n,e-r],["L",n+t,e+r],["Z"]]},m4=function(n,e,t){var r=t*Math.sin(.3333333333333333*Math.PI);return[["M",n-t,e-r],["L",n+t,e-r],["L",n,e+r],["Z"]]},y4=function(n,e,t){var r=t/2*Math.sqrt(3);return[["M",n,e-t],["L",n+r,e-t/2],["L",n+r,e+t/2],["L",n,e+t],["L",n-r,e+t/2],["L",n-r,e-t/2],["Z"]]},_4=function(n,e,t){var r=t-1.5;return[["M",n-t,e-r],["L",n+t,e+r],["L",n+t,e-r],["L",n-t,e+r],["Z"]]},ib=function(n,e,t){return[["M",n,e+t],["L",n,e-t]]},E4=function(n,e,t){return[["M",n-t,e-t],["L",n+t,e+t],["M",n+t,e-t],["L",n-t,e+t]]},x4=function(n,e,t){return[["M",n-t/2,e-t],["L",n+t/2,e-t],["M",n,e-t],["L",n,e+t],["M",n-t/2,e+t],["L",n+t/2,e+t]]},b4=function(n,e,t){return[["M",n-t,e],["L",n+t,e],["M",n,e-t],["L",n,e+t]]},w4=function(n,e,t){return[["M",n-t,e],["L",n+t,e]]},ab=function(n,e,t){return[["M",n-t,e],["L",n+t,e]]},M4=ab,A4=function(n,e,t){return[["M",n-t,e],["A",t/2,t/2,0,1,1,n,e],["A",t/2,t/2,0,1,0,n+t,e]]},T4=function(n,e,t){return[["M",n-t-1,e-2.5],["L",n,e-2.5],["L",n,e+2.5],["L",n+t+1,e+2.5]]},S4=function(n,e,t){return[["M",n-t-1,e+2.5],["L",n,e+2.5],["L",n,e-2.5],["L",n+t+1,e-2.5]]},P4=function(n,e,t){return[["M",n-(t+1),e+2.5],["L",n-t/2,e+2.5],["L",n-t/2,e-2.5],["L",n+t/2,e-2.5],["L",n+t/2,e+2.5],["L",n+t+1,e+2.5]]};function O4(n,e){return[["M",n-5,e+2.5],["L",n-5,e],["L",n,e],["L",n,e-3],["L",n,e+3],["L",n+6.5,e+3]]}var C4=function(n,e,t){return[["M",n-t,e-t],["L",n+t,e],["L",n-t,e+t],["Z"]]},es=_s({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"),D4=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,t,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:C4(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 r.playState="idle",r.contentGroup=r.appendChild(new Ai({class:es.contentGroup.name})),r.playWindow=r.contentGroup.appendChild(new Ai({class:es.playWindow.name})),r.innerCurrPage=r.defaultPage,r}return Object.defineProperty(e.prototype,"defaultPage",{get:function(){var t=this.attributes.defaultPage;return Qr(t,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pageShape",{get:function(){var t=this.pageViews,r=(0,xe.CR)(f4(t.map(function(v){var E=v.getBBox(),D=E.width,F=E.height;return[D,F]})).map(function(v){return Math.max.apply(Math,(0,xe.ev)([],(0,xe.CR)(v),!1))}),2),i=r[0],a=r[1],s=this.attributes,o=s.pageWidth,l=o===void 0?i:o,u=s.pageHeight,h=u===void 0?a:u;return{pageWidth:l,pageHeight:h}},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(e.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t=n.prototype.getBBox.call(this),r=t.x,i=t.y,a=this.controllerShape,s=this.pageShape,o=s.pageWidth,l=s.pageHeight;return new Qi(r,i,o+a.width,l)},e.prototype.goTo=function(t){var r=this,i=this.attributes.animate,a=this,s=a.currPage,o=a.playState,l=a.playWindow,u=a.pageViews;if(o!=="idle"||t<0||u.length<=0||t>=u.length)return null;u[s].setLocalPosition(0,0),this.prepareFollowingPage(t);var h=(0,xe.CR)(this.getFollowingPageDiff(t),2),v=h[0],E=h[1];this.playState="running";var D=nb(l,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-v,", ").concat(-E,")")}],i);return cu(D,function(){r.innerCurrPage=t,r.playState="idle",r.setVisiblePages([t]),r.updatePageInfo()}),D},e.prototype.prev=function(){var t=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!t&&i<=0)return null;var a=t?(i-1+r)%r:Qr(i-1,0,r);return this.goTo(a)},e.prototype.next=function(){var t=this.attributes.loop,r=this.pageViews.length,i=this.currPage;if(!t&&i>=r-1)return null;var a=t?(i+1)%r:Qr(i+1,0,r);return this.goTo(a)},e.prototype.renderClipPath=function(t){var r=this.pageShape,i=r.pageWidth,a=r.pageHeight;if(!i||!a){this.contentGroup.style.clipPath=void 0;return}this.clipPath=t.maybeAppendByClassName(es.clipPath,"rect").styles({width:i,height:a}),this.contentGroup.attr("clipPath",this.clipPath.node())},e.prototype.setVisiblePages=function(t){this.playWindow.children.forEach(function(r,i){t.includes(i)?Ac(r):ys(r)})},e.prototype.adjustControllerLayout=function(){var t=this,r=t.prevBtnGroup,i=t.nextBtnGroup,a=t.pageInfoGroup,s=this.attributes,o=s.orientation,l=s.controllerPadding,u=a.getBBox(),h=u.width,v=u.height,E=(0,xe.CR)(o==="horizontal"?[-180,0]:[-90,90],2),D=E[0],F=E[1];r.setLocalEulerAngles(D),i.setLocalEulerAngles(F);var G=r.getBBox(),H=G.width,K=G.height,q=i.getBBox(),te=q.width,ue=q.height,le=Math.max(H,h,te),he=o==="horizontal"?{offset:[[0,0],[H/2+l,0],[H+h+l*2,0]],textAlign:"start"}:{offset:[[le/2,-K-l],[le/2,0],[le/2,ue+l]],textAlign:"center"},ve=(0,xe.CR)(he.offset,3),ge=(0,xe.CR)(ve[0],2),Te=ge[0],Oe=ge[1],Ne=(0,xe.CR)(ve[1],2),ze=Ne[0],Xe=Ne[1],Je=(0,xe.CR)(ve[2],2),st=Je[0],Et=Je[1],mt=he.textAlign,ct=a.querySelector("text");ct&&(ct.style.textAlign=mt),r.setLocalPosition(Te,Oe),a.setLocalPosition(ze,Xe),i.setLocalPosition(st,Et)},e.prototype.updatePageInfo=function(){var t,r=this,i=r.currPage,a=r.pageViews,s=r.attributes.formatter;a.length<2||((t=this.pageInfoGroup.querySelector(es.pageInfo.class))===null||t===void 0||t.attr("text",s(i+1,a.length)),this.adjustControllerLayout())},e.prototype.getFollowingPageDiff=function(t){var r=this.currPage;if(r===t)return[0,0];var i=this.attributes.orientation,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=t<r?-1:1;return i==="horizontal"?[l*s,0]:[0,l*o]},e.prototype.prepareFollowingPage=function(t){var r=this,i=r.currPage,a=r.pageViews;if(this.setVisiblePages([t,i]),t!==i){var s=(0,xe.CR)(this.getFollowingPageDiff(t),2),o=s[0],l=s[1];a[t].setLocalPosition(o,l)}},e.prototype.renderController=function(t){var r=this,i=this.attributes.controllerSpacing,a=this.pageShape,s=a.pageWidth,o=a.pageHeight,l=this.pageViews.length>=2,u=t.maybeAppendByClassName(es.controller,"g");if(Td(u.node(),l),!!l){var h=Un(this.attributes,"button"),v=Un(this.attributes,"pageNum"),E=(0,xe.CR)(no(h),2),D=E[0],F=E[1],G=D.size,H=(0,xe._T)(D,["size"]),K=!u.select(es.prevBtnGroup.class).node(),q=u.maybeAppendByClassName(es.prevBtnGroup,"g").styles(F);this.prevBtnGroup=q.node();var te=q.maybeAppendByClassName(es.prevBtn,"path"),ue=u.maybeAppendByClassName(es.nextBtnGroup,"g").styles(F);this.nextBtnGroup=ue.node();var le=ue.maybeAppendByClassName(es.nextBtn,"path");[te,le].forEach(function(ve){ve.styles((0,xe.pi)((0,xe.pi)({},H),{transformOrigin:"center"})),K0(ve.node(),G,!0)});var he=u.maybeAppendByClassName(es.pageInfoGroup,"g");this.pageInfoGroup=he.node(),he.maybeAppendByClassName(es.pageInfo,"text").styles(v),this.updatePageInfo(),u.node().setLocalPosition(s+i,o/2),K&&(this.prevBtnGroup.addEventListener("click",function(){r.prev()}),this.nextBtnGroup.addEventListener("click",function(){r.next()}))}},e.prototype.render=function(t,r){var i=t.x,a=i===void 0?0:i,s=t.y,o=s===void 0?0:s;this.attr("transform","translate(".concat(a,", ").concat(o,")"));var l=dn(r);this.renderClipPath(l),this.renderController(l),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},e.prototype.bindEvents=function(){var t=this,r=vc(function(){return t.render(t.attributes,t)},50);this.playWindow.addEventListener(Xn.INSERTED,r),this.playWindow.addEventListener(Xn.REMOVED,r)},e}(ti);function L4(n){var e="default";if(si(n)&&n instanceof Image)e="image";else if(fn(n))e="symbol";else if(fr(n)){var t=new RegExp("data:(image|text)");n.match(t)?e="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test(n)?e="url":e="symbol"}return e}function R4(n){var e=L4(n);return["base64","url","image"].includes(e)?"image":n&&e==="symbol"?"path":null}var Lr=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,r){var i=t.x,a=i===void 0?0:i,s=t.y,o=s===void 0?0:s,l=this.getSubShapeStyle(t),u=l.symbol,h=l.size,v=h===void 0?16:h,E=(0,xe._T)(l,["symbol","size"]),D=R4(u);Ba(!!D,dn(r),function(F){F.maybeAppendByClassName("marker",D).attr("className","marker ".concat(D,"-marker")).call(function(G){if(D==="image"){var H=v*2;G.styles({img:u,width:H,height:H,x:a-v,y:o-v})}else{var H=v/2,K=fn(u)?u:e.getSymbol(u);G.styles((0,xe.pi)({d:K==null?void 0:K(a,o,H)},E))}})})},e.MARKER_SYMBOL_MAP=new Map,e.registerSymbol=function(t,r){e.MARKER_SYMBOL_MAP.set(t,r)},e.getSymbol=function(t){return e.MARKER_SYMBOL_MAP.get(t)},e.getSymbols=function(){return Array.from(e.MARKER_SYMBOL_MAP.keys())},e}(ti);Lr.registerSymbol("cross",E4),Lr.registerSymbol("hyphen",w4),Lr.registerSymbol("line",ib),Lr.registerSymbol("plus",b4),Lr.registerSymbol("tick",x4),Lr.registerSymbol("circle",rb),Lr.registerSymbol("point",d4),Lr.registerSymbol("bowtie",_4),Lr.registerSymbol("hexagon",y4),Lr.registerSymbol("square",v4),Lr.registerSymbol("diamond",g4),Lr.registerSymbol("triangle",p4),Lr.registerSymbol("triangle-down",m4),Lr.registerSymbol("line",ib),Lr.registerSymbol("dot",ab),Lr.registerSymbol("dash",M4),Lr.registerSymbol("smooth",A4),Lr.registerSymbol("hv",T4),Lr.registerSymbol("vh",S4),Lr.registerSymbol("hvh",P4),Lr.registerSymbol("vhv",O4);function NW(n,e,t){var r=Math.round((n-t)/e);return t+r*e}function I4(n,e,t){var r=1.4,i=r*t;return[["M",n-t,e-i],["L",n+t,e-i],["L",n+t,e+i],["L",n-t,e+i],["Z"]]}var sb=1.4,ob=.4;function N4(n,e,t){var r=t,i=r*sb,a=r/2,s=r/6,o=n+i*ob;return[["M",n,e],["L",o,e+a],["L",n+i,e+a],["L",n+i,e-a],["L",o,e-a],["Z"],["M",o,e+s],["L",n+i-2,e+s],["M",o,e-s],["L",n+i-2,e-s]]}function B4(n,e,t){var r=t,i=r*sb,a=r/2,s=r/6,o=e+i*ob;return[["M",n,e],["L",n-a,o],["L",n-a,e+i],["L",n+a,e+i],["L",n+a,o],["Z"],["M",n-s,o],["L",n-s,e+i-2],["M",n+s,o],["L",n+s,e+i-2]]}Lr.registerSymbol("hiddenHandle",I4),Lr.registerSymbol("verticalHandle",N4),Lr.registerSymbol("horizontalHandle",B4);var BW=function(n,e,t){return n===void 0&&(n="horizontal"),n==="horizontal"?e:t};function kW(n,e,t,r){var i;r===void 0&&(r=4);var a=__read(n,2),s=a[0],o=a[1],l=__read(e,2),u=l[0],h=l[1],v=__read(t,2),E=v[0],D=v[1],F=__read([u,h],2),G=F[0],H=F[1],K=H-G;return G>H&&(i=__read([H,G],2),G=i[0],H=i[1]),K>o-s?[s,o]:G<s?E===s&&D===H?[s,H]:[s,K+s]:H>o?D===o&&E===G?[G,o]:[o-K,o]:[G,H]}function X0(n,e,t){return n===void 0&&(n="horizontal"),n==="horizontal"?e:t}function FW(n){var e=n&&n.getRenderBounds();if(!e)return{width:0,height:0};var t=e.getMax(),r=e.getMin();return{width:t[0]-r[0],height:t[1]-r[1]}}function lb(n){var e=n.getLocalBounds(),t=e.min,r=e.max,i=(0,xe.CR)([t,r],2),a=(0,xe.CR)(i[0],2),s=a[0],o=a[1],l=(0,xe.CR)(i[1],2),u=l[0],h=l[1];return{x:s,y:o,width:u-s,height:h-o,left:s,bottom:h,top:o,right:u}}function zW(n,e){var t=select(n).append("text").node();return t.attr(__assign(__assign({},e),{visibility:"hidden"})),t}function k4(n,e){var t=(0,xe.CR)(n,2),r=t[0],i=t[1],a=(0,xe.CR)(e,2),s=a[0],o=a[1];return r!==s&&i===o}function UW(n,e){var t=__read(n,2),r=t[0],i=t[1],a=__read(e,2),s=a[0],o=a[1];return r===s&&i!==o}function F4(n,e){var t,r,i=e.attributes;try{for(var a=(0,xe.XA)(Object.entries(i)),s=a.next();!s.done;s=a.next()){var o=(0,xe.CR)(s.value,2),l=o[0],u=o[1];l!=="id"&&l!=="className"&&n.attr(l,u)}}catch(h){t={error:h}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}}function ro(n){return typeof n=="function"?n():fr(n)||sn(n)?new V0({style:{text:String(n)}}):n}var Od,Y0;function WW(n){Y0=n}var z4=R0(function(n,e){var t=e.fontSize,r=e.fontFamily,i=e.fontWeight,a=e.fontStyle,s=e.fontVariant;return Y0?Y0(n,t):(Od||(Od=Wt.offscreenCanvasCreator.getOrCreateContext(void 0)),Od.font=[a,s,i,"".concat(t,"px"),r].join(" "),Od.measureText(n).width)},function(n,e){return[n,Object.values(e||ub(n)).join()].join("")},4096),ub=function(n){var e=n.style.fontFamily||"sans-serif",t=n.style.fontWeight||"normal",r=n.style.fontStyle||"normal",i=n.style.fontVariant,a=n.style.fontSize;return a=typeof a=="object"?a.value:a,{fontSize:a,fontFamily:e,fontWeight:t,fontStyle:r,fontVariant:i}};function cb(n){return n.nodeName==="text"?n:n.nodeName==="g"&&n.children.length===1&&n.children[0].nodeName==="text"?n.children[0]:null}function hb(n,e){var t=cb(n);t&&t.attr(e)}function Q0(n,e,t){t===void 0&&(t="..."),hb(n,{wordWrap:!0,wordWrapWidth:e,maxLines:1,textOverflow:t})}var ka=_s({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item");function U4(n){var e=n.querySelector(ka.marker.class);return e?e.style:{}}var W4=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,{span:[1,1],marker:function(){return new Zs({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this}return Object.defineProperty(e.prototype,"showValue",{get:function(){var t=this.attributes.valueText;return t?typeof t=="string"||typeof t=="number"?t!=="":typeof t=="function"?!0:t.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"actualSpace",{get:function(){var t=this.labelGroup,r=this.valueGroup,i=this.attributes.markerSize,a=t.node().getBBox(),s=a.width,o=a.height,l=r.node().getBBox(),u=l.width,h=l.height;return{markerWidth:i,labelWidth:s,valueWidth:u,height:Math.max(i,o,h)}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"span",{get:function(){var t=this.attributes.span;if(!t)return[1,1];var r=(0,xe.CR)(Wi(t),2),i=r[0],a=r[1],s=this.showValue?a:0,o=i+s;return[i/o,s/o]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t,r=this.attributes,i=r.markerSize,a=r.width,s=this.actualSpace,o=s.markerWidth,l=s.height,u=this.actualSpace,h=u.labelWidth,v=u.valueWidth,E=(0,xe.CR)(this.spacing,2),D=E[0],F=E[1];if(a){var G=a-i-D-F,H=(0,xe.CR)(this.span,2),K=H[0],q=H[1];t=(0,xe.CR)([K*G,q*G],2),h=t[0],v=t[1]}var te=o+h+v+D+F;return{width:te,height:l,markerWidth:o,labelWidth:h,valueWidth:v}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"spacing",{get:function(){var t=this.attributes.spacing;if(!t)return[0,0];var r=(0,xe.CR)(Wi(t),2),i=r[0],a=r[1];return this.showValue?[i,a]:[i,0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"layout",{get:function(){var t=this.shape,r=t.markerWidth,i=t.labelWidth,a=t.valueWidth,s=t.width,o=t.height,l=(0,xe.CR)(this.spacing,2),u=l[0],h=l[1];return{height:o,width:s,markerWidth:r,labelWidth:i,valueWidth:a,position:[r/2,r+u,r+i+u+h]}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleSize",{get:function(){var t=U4(this.markerGroup.node()),r=this.attributes,i=r.markerSize,a=r.markerStrokeWidth,s=a===void 0?t.strokeWidth:a,o=r.markerLineWidth,l=o===void 0?t.lineWidth:o,u=r.markerStroke,h=u===void 0?t.stroke:u,v=+(s||l||(h?1:0))*Math.sqrt(2),E=this.markerGroup.node().getBBox(),D=E.width,F=E.height;return(1-v/Math.max(D,F))*i},enumerable:!1,configurable:!0}),e.prototype.renderMarker=function(t){var r=this,i=this.attributes.marker,a=Un(this.attributes,"marker");this.markerGroup=t.maybeAppendByClassName(ka.markerGroup,"g").style("zIndex",0),Ba(!!i,this.markerGroup,function(){var s,o=r.markerGroup.node(),l=(s=o.childNodes)===null||s===void 0?void 0:s[0],u=typeof i=="string"?new Lr({style:{symbol:i},className:ka.marker.name}):i();l?u.nodeName===l.nodeName?l instanceof Lr?l.update((0,xe.pi)((0,xe.pi)({},a),{symbol:i})):(F4(l,u),dn(l).styles(a)):(l.remove(),dn(u).attr("className",ka.marker.name).styles(a),o.appendChild(u)):(u instanceof Lr||dn(u).attr("className",ka.marker.name).styles(a),o.appendChild(u)),r.markerGroup.node().scale(1/r.markerGroup.node().getScale()[0]);var h=K0(r.markerGroup.node(),r.scaleSize,!0);r.markerGroup.node().style._transform="scale(".concat(h,")")})},e.prototype.renderLabel=function(t){var r=Un(this.attributes,"label"),i=r.text,a=(0,xe._T)(r,["text"]);this.labelGroup=t.maybeAppendByClassName(ka.labelGroup,"g").style("zIndex",0),this.labelGroup.maybeAppendByClassName(ka.label,function(){return ro(i)}).styles(a)},e.prototype.renderValue=function(t){var r=this,i=Un(this.attributes,"value"),a=i.text,s=(0,xe._T)(i,["text"]);this.valueGroup=t.maybeAppendByClassName(ka.valueGroup,"g").style("zIndex",0),Ba(this.showValue,this.valueGroup,function(){r.valueGroup.maybeAppendByClassName(ka.value,function(){return ro(a)}).styles(s)})},e.prototype.renderBackground=function(t){var r=this.shape,i=r.width,a=r.height,s=Un(this.attributes,"background");this.background=t.maybeAppendByClassName(ka.backgroundGroup,"g").style("zIndex",-1),this.background.maybeAppendByClassName(ka.background,"rect").styles((0,xe.pi)({width:i,height:a},s))},e.prototype.adjustLayout=function(){var t=this.layout,r=t.labelWidth,i=t.valueWidth,a=t.height,s=(0,xe.CR)(t.position,3),o=s[0],l=s[1],u=s[2],h=a/2;this.markerGroup.styles({transform:"translate(".concat(o,", ").concat(h,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(l,", ").concat(h,")")}),Q0(this.labelGroup.select(ka.label.class).node(),Math.ceil(r)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(u,", ").concat(h,")")}),Q0(this.valueGroup.select(ka.value.class).node(),Math.ceil(i)))},e.prototype.render=function(t,r){var i=dn(r),a=t.x,s=a===void 0?0:a,o=t.y,l=o===void 0?0:o;i.styles({transform:"translate(".concat(s,", ").concat(l,")")}),this.renderMarker(i),this.renderLabel(i),this.renderValue(i),this.renderBackground(i),this.adjustLayout()},e}(ti),Tl=_s({page:"item-page",navigator:"navigator",item:"item"},"items"),fb=function(n,e,t){return t===void 0&&(t=!0),n?e(n):t},G4=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,t,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:Z0,mouseenter:Z0,mouseleave:Z0})||this;return r.navigatorShape=[0,0],r}return Object.defineProperty(e.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"grid",{get:function(){var t=this.attributes,r=t.gridRow,i=t.gridCol,a=t.data;if(!r&&!i)throw new Error("gridRow and gridCol can not be set null at the same time");return r&&i?[r,i]:r?[r,a.length]:[a.length,i]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderData",{get:function(){var t=this.attributes,r=t.data,i=t.layout,a=Un(this.attributes,"item"),s=r.map(function(o,l){var u=o.id,h=u===void 0?l:u,v=o.label,E=o.value;return{id:"".concat(h),index:l,style:(0,xe.pi)({layout:i,labelText:v,valueText:E},Object.fromEntries(Object.entries(a).map(function(D){var F=(0,xe.CR)(D,2),G=F[0],H=F[1];return[G,$a(H,[o,l,r])]})))}});return s},enumerable:!1,configurable:!0}),e.prototype.getGridLayout=function(){var t=this,r=this.attributes,i=r.orientation,a=r.width,s=r.rowPadding,o=r.colPadding,l=(0,xe.CR)(this.navigatorShape,1),u=l[0],h=(0,xe.CR)(this.grid,2),v=h[0],E=h[1],D=E*v,F=0;return this.pageViews.children.map(function(G,H){var K,q,te=Math.floor(H/D),ue=H%D,le=t.ifHorizontal(E,v),he=[Math.floor(ue/le),ue%le];i==="vertical"&&he.reverse();var ve=(0,xe.CR)(he,2),ge=ve[0],Te=ve[1],Oe=(a-u-(E-1)*o)/E,Ne=G.getBBox().height,ze=(0,xe.CR)([0,0],2),Xe=ze[0],Je=ze[1];return i==="horizontal"?(K=(0,xe.CR)([F,ge*(Ne+s)],2),Xe=K[0],Je=K[1],F=Te===E-1?0:F+Oe+o):(q=(0,xe.CR)([Te*(Oe+o),F],2),Xe=q[0],Je=q[1],F=ge===v-1?0:F+Ne+s),{page:te,index:H,row:ge,col:Te,pageIndex:ue,width:Oe,height:Ne,x:Xe,y:Je}})},e.prototype.getFlexLayout=function(){var t=this.attributes,r=t.width,i=t.height,a=t.rowPadding,s=t.colPadding,o=(0,xe.CR)(this.navigatorShape,1),l=o[0],u=(0,xe.CR)(this.grid,2),h=u[0],v=u[1],E=(0,xe.CR)([r-l,i],2),D=E[0],F=E[1],G=(0,xe.CR)([0,0,0,0,0,0,0,0],8),H=G[0],K=G[1],q=G[2],te=G[3],ue=G[4],le=G[5],he=G[6],ve=G[7];return this.pageViews.children.map(function(ge,Te){var Oe,Ne,ze,Xe,Je=ge.getBBox(),st=Je.width,Et=Je.height,mt=he===0?0:s,ct=he+mt+st;if(ct<=D&&fb(ue,function(At){return At<v}))return Oe=(0,xe.CR)([he+mt,ve,ct],3),H=Oe[0],K=Oe[1],he=Oe[2],{width:st,height:Et,x:H,y:K,page:q,index:Te,pageIndex:te++,row:le,col:ue++};Ne=(0,xe.CR)([le+1,0,0,ve+Et+a],4),le=Ne[0],ue=Ne[1],he=Ne[2],ve=Ne[3];var ht=ve+Et;return ht<=F&&fb(le,function(At){return At<h})?(ze=(0,xe.CR)([he,ve,st],3),H=ze[0],K=ze[1],he=ze[2],{width:st,height:Et,x:H,y:K,page:q,index:Te,pageIndex:te++,row:le,col:ue++}):(Xe=(0,xe.CR)([0,0,st,0,q+1,0,0,0],8),H=Xe[0],K=Xe[1],he=Xe[2],ve=Xe[3],q=Xe[4],te=Xe[5],le=Xe[6],ue=Xe[7],{width:st,height:Et,x:H,y:K,page:q,index:Te,pageIndex:te++,row:le,col:ue++})})},Object.defineProperty(e.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var t=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,r=t.call(this);return r.slice(-1)[0].page>0?(this.navigatorShape=[55,0],t.call(this)):r},enumerable:!1,configurable:!0}),e.prototype.ifHorizontal=function(t,r){var i=this.attributes.orientation;return X0(i,t,r)},e.prototype.flattenPage=function(t){t.querySelectorAll(Tl.item.class).forEach(function(r){t.appendChild(r)}),t.querySelectorAll(Tl.page.class).forEach(function(r){var i=t.removeChild(r);i.destroy()})},e.prototype.renderItems=function(t){var r=this.attributes,i=r.click,a=r.mouseenter,s=r.mouseleave;this.flattenPage(t);var o=this.dispatchCustomEvent.bind(this);dn(t).selectAll(Tl.item.class).data(this.renderData,function(l){return l.id}).join(function(l){return l.append(function(u){var h=u.style;return new W4({style:h})}).attr("className",Tl.item.name).on("click",function(){i==null||i(this),o("itemClick",{item:this})}).on("pointerenter",function(){a==null||a(this),o("itemMouseenter",{item:this})}).on("pointerleave",function(){s==null||s(this),o("itemMouseleave",{item:this})})},function(l){return l.each(function(u){var h=u.style;this.update(h)})},function(l){return l.remove()})},e.prototype.relayoutNavigator=function(){var t,r=this.attributes,i=r.layout,a=r.width,s=((t=this.pageViews.children[0])===null||t===void 0?void 0:t.getBBox().height)||0,o=(0,xe.CR)(this.navigatorShape,2),l=o[0],u=o[1];this.navigator.update(i==="grid"?{pageWidth:a-l,pageHeight:s-u}:{})},e.prototype.adjustLayout=function(){var t=this,r=Object.entries(o4(this.itemsLayout,"page")).map(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];return{page:o,layouts:l}}),i=(0,xe.ev)([],(0,xe.CR)(this.navigator.getContainer().children),!1);r.forEach(function(a){var s=a.layouts,o=t.pageViews.appendChild(new Ai({className:Tl.page.name}));s.forEach(function(l){var u=l.x,h=l.y,v=l.index,E=l.width,D=l.height,F=i[v];o.appendChild(F),sc(F,"__layout__",l),F.update({x:u,y:h,width:E,height:D})})}),this.relayoutNavigator()},e.prototype.renderNavigator=function(t){var r=this.attributes.orientation,i=Un(this.attributes,"nav"),a=Ri({orientation:r},i),s=this;return t.selectAll(Tl.navigator.class).data(["nav"]).join(function(o){return o.append(function(){return new D4({style:a})}).attr("className",Tl.navigator.name).each(function(){s.navigator=this})},function(o){return o.each(function(){this.update(a)})},function(o){return o.remove()}),this.navigator},e.prototype.getBBox=function(){return this.navigator.getBBox()},e.prototype.render=function(t,r){var i=this.attributes.data;if(!(!i||i.length===0)){var a=this.renderNavigator(dn(r));this.renderItems(a.getContainer()),this.adjustLayout()}},e.prototype.dispatchCustomEvent=function(t,r){var i=new pi(t,{detail:r});this.dispatchEvent(i)},e}(ti),Tc=_s({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),db={showLabel:!0,formatter:function(n){return n.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},GW=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,db)||this}return e.prototype.render=function(t,r){var i=dn(r).maybeAppendByClassName(Tc.markerGroup,"g");this.renderMarker(i);var a=dn(r).maybeAppendByClassName(Tc.labelGroup,"g");this.renderLabel(a)},e.prototype.renderMarker=function(t){var r=this,i=this.attributes,a=i.orientation,s=i.markerSymbol,o=s===void 0?X0(a,"horizontalHandle","verticalHandle"):s;Ba(!!o,t,function(l){var u=Un(r.attributes,"marker"),h=(0,xe.pi)({symbol:o},u);r.marker=l.maybeAppendByClassName(Tc.marker,function(){return new Lr({style:h})}).update(h)})},e.prototype.renderLabel=function(t){var r=this,i=this.attributes,a=i.showLabel,s=i.orientation,o=i.spacing,l=o===void 0?0:o,u=i.formatter;Ba(a,t,function(h){var v,E=Un(r.attributes,"label"),D=E.text,F=(0,xe._T)(E,["text"]),G=((v=h.select(Tc.marker.class))===null||v===void 0?void 0:v.node().getBBox())||{},H=G.width,K=H===void 0?0:H,q=G.height,te=q===void 0?0:q,ue=(0,xe.CR)(X0(s,[0,te+l,"center","top"],[K+l,0,"start","middle"]),4),le=ue[0],he=ue[1],ve=ue[2],ge=ue[3];h.maybeAppendByClassName(Tc.label,"text").styles((0,xe.pi)((0,xe.pi)({},F),{x:le,y:he,text:u(D).toString(),textAlign:ve,textBaseline:ge}))})},e}(ti),vb={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},H4=Ri({},vb,{}),HW=Ri({},vb,uu(db,"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"}),jW=.01,VW=.5,Sc=_s({title:"title",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"),j4=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,H4)||this}return e.prototype.renderTitle=function(t,r,i){var a=this.attributes,s=a.showTitle,o=a.titleText,l=Un(this.attributes,"title"),u=(0,xe.CR)(no(l),2),h=u[0],v=u[1];this.titleGroup=t.maybeAppendByClassName(Sc.titleGroup,"g").styles(v);var E=(0,xe.pi)((0,xe.pi)({width:r,height:i},h),{text:s?o:""});this.title=this.titleGroup.maybeAppendByClassName(Sc.title,function(){return new s4({style:E})}).update(E)},e.prototype.renderItems=function(t,r){var i=r.x,a=r.y,s=r.width,o=r.height,l=Un(this.attributes,"title",!0),u=(0,xe.CR)(no(l),2),h=u[0],v=u[1],E=(0,xe.pi)((0,xe.pi)({},h),{width:s,height:o,x:0,y:0});this.itemsGroup=t.maybeAppendByClassName(Sc.itemsGroup,"g").styles((0,xe.pi)((0,xe.pi)({},v),{transform:"translate(".concat(i,", ").concat(a,")")}));var D=this;this.itemsGroup.selectAll(Sc.items.class).data(["items"]).join(function(F){return F.append(function(){return new G4({style:E})}).attr("className",Sc.items.name).each(function(){D.items=dn(this)})},function(F){return F.update(E)},function(F){return F.remove()})},e.prototype.adjustLayout=function(){var t=this.attributes.showTitle;if(t){var r=this.title.node().getAvailableSpace(),i=r.x,a=r.y;this.itemsGroup.node().style.transform="translate(".concat(i,", ").concat(a,")")}},Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,r=t.showTitle,i=t.width,a=t.height;return r?this.title.node().getAvailableSpace():new Qi(0,0,i,a)},enumerable:!1,configurable:!0}),e.prototype.getBBox=function(){var t,r,i=(t=this.title)===null||t===void 0?void 0:t.node(),a=(r=this.items)===null||r===void 0?void 0:r.node();return!i||!a?n.prototype.getBBox.call(this):r4(i,a)},e.prototype.render=function(t,r){var i=this.attributes,a=i.width,s=i.height,o=i.x,l=o===void 0?0:o,u=i.y,h=u===void 0?0:u,v=dn(r);r.style.transform="translate(".concat(l,", ").concat(h,")"),this.renderTitle(v,a,s),this.renderItems(v,this.availableSpace),this.adjustLayout()},e}(ti);function J0(n){const{width:e,height:t,renderer:r}=n,i=V4(n),a=new ag({width:e,height:t,container:i,renderer:r||new cc});return[i,a]}function V4(n){var e;const{container:t,className:r,graphCanvas:i}=n;if(t)return typeof t=="string"?document.getElementById(t):t;const a=lu(r,!1),{width:s,height:o,containerStyle:l}=n,[u,h]=Z4(n);return Object.assign(a.style,Object.assign({position:"absolute",left:u+"px",top:h+"px",width:s+"px",height:o+"px"},l)),(e=i.getContainer())===null||e===void 0||e.appendChild(a),a}function Z4(n){const{width:e,height:t,placement:r,graphCanvas:i}=n,[a,s]=i.getSize(),[o,l]=n1(r);return[o*(a-e),l*(s-t)]}var K4=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class Cd extends Ui{constructor(e,t){super(e,Object.assign({},Cd.defaultOptions,t)),this.typePrefix="__data__",this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:r}=this.context;r.on(Zt.AFTER_DRAW,this.createElement)},this.changeState=(r,i)=>{const{graph:a}=this.context,{typePrefix:s}=this,o=aa(r,[s,"id"]),l=aa(r,[s,"style","labelText"]),[u]=o.split("__"),h=this.fieldMap[u].get(l)||[];a.setElementState(Object.fromEntries(h==null?void 0:h.map(v=>[v,i])))},this.click=r=>{if(this.options.trigger==="hover")return;const i=aa(r,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(r,[])):(this.selectedItems.push(i),this.changeState(r,"selected"))},this.mouseleave=r=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(r,[]))},this.mouseenter=r=>{if(this.options.trigger==="click")return;const i=aa(r,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(r,"active"))},this.setFieldMap=(r,i,a)=>{if(!r)return;const s=this.fieldMap[a];if(s)if(!s.has(r))s.set(r,[i]);else{const o=s.get(r);o&&(o.push(i),s.set(r,o))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(r,i)=>{if(!r)return[];const{model:a,element:s}=this.context,{nodes:o,edges:l,combos:u}=a.getData(),h={},v=H=>fn(r)?r(H):r,E={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=(H,K)=>s==null?void 0:s.getElementComputedStyle(H,K),G=(H,K)=>{H.forEach(q=>{const{id:te}=q,ue=aa(q,["data",v(q)]),le=(s==null?void 0:s.getElementType(K,q))||"circle",he=F(K,q),ve=(K==="edge"?he==null?void 0:he.stroke:he==null?void 0:he.fill)||"#1783ff";te&&ue&&ue.replace(/\s+/g,"")&&(this.setFieldMap(ue,te,K),h[ue]||(h[ue]={id:`${K}__${te}`,label:ue,marker:D[le]||E[K],elementType:K,lineWidth:1,stroke:ve,fill:ve}))})};switch(i){case"node":G(o,"node");break;case"edge":G(l,"edge");break;case"combo":G(u,"combo");break;default:return[]}return Object.values(h)},this.createElement=()=>{if(this.draw){this.updateElement();return}const r=this.options,{width:i,height:a,nodeField:s,edgeField:o,comboField:l,trigger:u,position:h,container:v,containerStyle:E,className:D}=r,F=K4(r,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),G=this.getMarkerData(s,"node"),H=this.getMarkerData(o,"edge"),K=this.getMarkerData(l,"combo"),q=[...G,...K,...H],te=Object.assign({width:i,height:a,data:q,itemMarkerLineWidth:({lineWidth:he})=>he,itemMarker:({marker:he})=>he,itemMarkerStroke:({stroke:he})=>he,itemMarkerFill:({fill:he})=>he,gridCol:G.length},F,this.getEvents()),ue=new j4({className:"legend",style:te});this.category=ue,this.upsertCanvas().appendChild(ue),this.draw=!0},this.bindEvents()}update(e){super.update(e),this.clear(),this.createElement()}clear(){var e,t;(e=this.canvas)===null||e===void 0||e.destroy(),(t=this.container)===null||t===void 0||t.remove(),this.canvas=void 0,this.container=void 0,this.draw=!1}updateElement(){this.category&&this.category.update({itemMarkerOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5,itemLabelOpacity:({id:e})=>!this.selectedItems.length||this.selectedItems.includes(e)?1:.5})}upsertCanvas(){if(this.canvas)return this.canvas;const e=this.context.canvas,[t,r]=e.getSize(),{width:i=t,height:a=r,position:s,container:o,containerStyle:l,className:u}=this.options,[h,v]=J0({width:i,height:a,graphCanvas:e,container:o,containerStyle:l,placement:s,className:"legend"});return this.container=h,u&&h.classList.add(u),this.canvas=v,this.canvas}destroy(){this.clear(),this.context.graph.off(Zt.AFTER_DRAW,this.createElement),super.destroy()}}Cd.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class Dd extends Ui{constructor(e,t){super(e,Object.assign({},Dd.defaultOptions,t)),this.onDraw=r=>{var i;!((i=r==null?void 0:r.data)===null||i===void 0)&&i.render||this.onRender()},this.shapes=new Map,this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=r=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(r.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=r=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:s,movementY:o}=r,{left:l,top:u,width:h,height:v}=this.mask.style,[,,E,D]=this.maskBBox;let F=parseInt(l)+s,G=parseInt(u)+o,H=parseInt(h),K=parseInt(v);F<0&&(F=0),G<0&&(G=0),F+H>i&&(F=Fo(i-H,0)),G+K>a&&(G=Fo(a-K,0)),H<E&&(s>0?(F=Fo(F-s,0),H=ko(H+s,i)):s<0&&(H=ko(H-s,i))),K<D&&(o>0?(G=Fo(G-o,0),K=ko(K+o,a)):o<0&&(K=ko(K-o,a))),Object.assign(this.mask.style,{left:F+"px",top:G+"px",width:H+"px",height:K+"px"});const q=parseInt(l)-F,te=parseInt(u)-G;if(q===0&&te===0)return;const ue=this.context.canvas.getCamera().getZoom(),le=this.canvas.getCamera().getZoom(),he=ue/le;this.context.graph.translateBy([q*he,te*he],!1)},this.onMaskDragEnd=r=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(r.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=c_(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(e){this.unbindEvents(),super.update(e),"delay"in e&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=vc(()=>{this.renderMinimap(),this.renderMask()},this.options.delay)}bindEvents(){const{graph:e}=this.context;e.on(Zt.AFTER_DRAW,this.onDraw),e.on(Zt.AFTER_RENDER,this.onRender),e.on(Zt.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:e}=this.context;e.off(Zt.AFTER_DRAW,this.onDraw),e.off(Zt.AFTER_RENDER,this.onRender),e.off(Zt.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const e=this.getElements(),t=this.initCanvas();this.setShapes(t,e)}getElements(){const{filter:e}=this.options,{model:t}=this.context,r=t.getData();if(!e)return r;const{nodes:i,edges:a,combos:s}=r;return{nodes:i.filter(o=>e(yt(o),"node")),edges:a.filter(o=>e(yt(o),"edge")),combos:s.filter(o=>e(yt(o),"combo"))}}setShapes(e,t){const{nodes:r,edges:i,combos:a}=t,{shape:s}=this.options,{element:o}=this.context;if(s==="key"){const u=new Set,h=v=>{const E=yt(v);u.add(E);const D=o.getElement(E);if(!D)return;const F=D.getShape("key"),G=this.shapes.get(E)||F.cloneNode();G.setPosition(F.getPosition()),D.style.zIndex&&(G.style.zIndex=D.style.zIndex),G.id=D.id,this.shapes.has(E)?Object.entries(F.attributes).forEach(([H,K])=>{G.style[H]!==K&&(G.style[H]=K)}):(e.appendChild(G),this.shapes.set(E,G))};i.forEach(h),a.forEach(h),r.forEach(h),this.shapes.forEach((v,E)=>{u.has(E)||(e.removeChild(v),this.shapes.delete(E))});return}const l=(u,h)=>{const E=o.getElement(u).getPosition();return h.setPosition(E),h};e.removeChildren(),i.forEach(u=>e.appendChild(s(yt(u),"edge"))),a.forEach(u=>{e.appendChild(l(yt(u),s(yt(u),"combo")))}),r.forEach(u=>{e.appendChild(l(yt(u),s(yt(u),"node")))})}initCanvas(){const{renderer:e,size:[t,r]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(t!==i||r!==a)&&this.canvas.resize(t,r),e&&this.canvas.setRenderer(e)}else{const{className:i,position:a,container:s,containerStyle:o}=this.options,[l,u]=J0({renderer:e,width:t,height:r,placement:a,className:"minimap",container:s,containerStyle:o,graphCanvas:this.context.canvas});i&&l.classList.add(i),this.container=l,this.canvas=u}return this.setCamera(),this.canvas}createLandmark(e,t,r){const i=`${e.join(",")}-${t.join(",")}-${r}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const s=this.canvas.getCamera().createLandmark(i,{position:e,focalPoint:t,zoom:r});return this.landmarkMap.set(i,s),s}setCamera(){var e;const{canvas:t}=this.context,r=(e=this.canvas)===null||e===void 0?void 0:e.getCamera();if(!r)return;const{size:[i,a],padding:s}=this.options,[o,l,u,h]=cs(s),{min:v,max:E,center:D}=t.getBounds("elements"),F=E[0]-v[0],G=E[1]-v[1],H=i-h-l,K=a-o-u,q=H/F,te=K/G,ue=Math.min(q,te),le=this.createLandmark(D,D,ue);r.gotoLandmark(le,0)}get maskBBox(){const{canvas:e}=this.context,t=e.getSize(),r=e.getCanvasByViewport([0,0]),i=e.getCanvasByViewport(t),a=this.canvas.canvas2Viewport(gs(r)),s=this.canvas.canvas2Viewport(gs(i)),o=s.x-a.x,l=s.y-a.y;return[a.x,a.y,o,l]}calculateMaskBBox(){const{size:[e,t]}=this.options;let[r,i,a,s]=this.maskBBox;return r<0&&(a=ko(a+r,e),r=0),i<0&&(s=ko(s+i,t),i=0),r+a>e&&(a=Fo(e-r,0)),i+s>t&&(s=Fo(t-i,0)),[ko(r,e),ko(i,t),Fo(a,0),Fo(s,0)]}renderMask(){const{maskStyle:e}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart)),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},e),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[e,t,r,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:t+"px",left:e+"px",width:r+"px",height:i+"px"})}destroy(){var e;this.unbindEvents(),this.canvas.destroy(),(e=this.mask)===null||e===void 0||e.remove(),super.destroy()}}Dd.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 ko=(n,e)=>Math.min(n,e),Fo=(n,e)=>Math.max(n,e);var q0=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};const $0={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class Ld extends Ui{constructor(e,t){super(e,Object.assign({},Ld.defaultOptions,t)),this.initSnapline=()=>{const r=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=r.appendChild(new al({style:Object.assign(Object.assign({},$0),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=r.appendChild(new al({style:Object.assign(Object.assign({},$0),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(r,i,a)=>q0(this,void 0,void 0,function*(){const{verticalX:s,horizontalY:o}=a,{tolerance:l}=this.options,{min:[u,h],max:[v,E],center:[D,F]}=i;let G=0,H=0;s!==null&&(Ji(v,s)<l&&(G=s-v),Ji(u,s)<l&&(G=s-u),Ji(D,s)<l&&(G=s-D),G!==0&&(this.isVerticalSticking=!0)),o!==null&&(Ji(E,o)<l&&(H=o-E),Ji(h,o)<l&&(H=o-h),Ji(F,o)<l&&(H=o-F),H!==0&&(this.isHorizontalSticking=!0)),(G!==0||H!==0)&&(yield this.context.graph.translateElementBy({[r]:[G,H]},!1))}),this.enableSnap=r=>{const{target:i}=r,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[s,o]=this.getDelta(r);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=(r,i)=>{const{tolerance:a,shape:s}=this.options,{min:[o,l],max:[u,h],center:[v,E]}=i;let D=null,F=null,G=null,H=null,K=null,q=null;return this.getNodes().some(te=>{if(li(r.id,te.id))return!1;const ue=gb(te,s).getRenderBounds(),{min:[le,he],max:[ve,ge],center:[Te,Oe]}=ue;return D===null&&(Ji(Te,v)<a?D=Te:Ji(le,o)<a||Ji(le,u)<a?D=le:(Ji(ve,u)<a||Ji(ve,o)<a)&&(D=ve),D!==null&&(F=Math.min(he,l),G=Math.max(ge,h))),H===null&&(Ji(Oe,E)<a?H=Oe:Ji(he,l)<a||Ji(he,h)<a?H=he:(Ji(ge,h)<a||Ji(ge,l)<a)&&(H=ge),H!==null&&(K=Math.min(le,o),q=Math.max(ve,u))),D!==null&&H!==null}),{verticalX:D,verticalMinY:F,verticalMaxY:G,horizontalY:H,horizontalMinX:K,horizontalMaxX:q}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=r=>q0(this,void 0,void 0,function*(){const{target:i}=r;if(this.options.autoSnap&&!this.enableSnap(r))return;const a=gb(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 e;const{filter:t}=this.options,i=(((e=this.context.element)===null||e===void 0?void 0:e.getNodes())||[]).filter(a=>{var s;return fR(a)&&((s=this.context.viewport)===null||s===void 0?void 0:s.isInViewport(a.getRenderBounds()))});return t?i.filter(a=>t(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(e){const{lineWidth:t}=this.options[`${e}LineStyle`];return+(t||$0.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(e){const{verticalX:t,verticalMinY:r,verticalMaxY:i,horizontalY:a,horizontalMinX:s,horizontalMaxX:o}=e,[l,u]=this.context.canvas.getSize(),{offset:h}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:h===1/0?0:s-h,y1:a,x2:h===1/0?l:o+h,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",t!==null?Object.assign(this.verticalLine.style,{x1:t,y1:h===1/0?0:r-h,x2:t,y2:h===1/0?u:i+h,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(e){const t=this.context.graph.getZoom();return vs([e.dx,e.dy],t)}bindEvents(){return q0(this,void 0,void 0,function*(){const{graph:e}=this.context;e.on(Qa.DRAG_START,this.onDragStart),e.on(Qa.DRAG,this.onDrag),e.on(Qa.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:e}=this.context;e.off(Qa.DRAG_START,this.onDragStart),e.off(Qa.DRAG,this.onDrag),e.off(Qa.DRAG_END,this.onDragEnd)}destroyElements(){var e,t;(e=this.horizontalLine)===null||e===void 0||e.destroy(),(t=this.verticalLine)===null||t===void 0||t.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}Ld.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Ji=(n,e)=>Math.abs(n-e),gb=(n,e)=>typeof e=="function"?e(n):n.getShape(e);var pb=null,X4=null;function Rd(n){return n instanceof Date?n:new Date(n)}function Y4(n){for(var e=__read(n,2),t=e[0],r=e[1],i=pb.indexOf(t),a=pb.indexOf(r),s="",o=i;o<=a;o+=1)if(s+=X4[o],o<a){var l="-";o===2?l=" ":o>2&&(l=":"),s+=l}return s}function ua(n,e){var t={YYYY:n.getFullYear(),MM:n.getMonth()+1,DD:n.getDate(),HH:n.getHours(),mm:n.getMinutes(),ss:n.getSeconds()},r=e;return Object.keys(t).forEach(function(i){var a=t[i];r=r.replace(i,i==="YYYY"?"".concat(a):"".concat(a).padStart(2,"0"))}),r}function ZW(n,e){return Rd(n).getTime()-Rd(e).getTime()}function KW(n,e){var t=__read([Rd(n),Rd(e)],2),r=t[0],i=t[1];return r.getFullYear()!==i.getFullYear()?"year":r.getMonth()!==i.getMonth()?"month":r.getDay()!==i.getDay()?"day":r.getHours()!==i.getHours()?"hour":r.getMinutes()!==i.getMinutes()?"minute":"second"}function XW(n,e){var t=new Date(n),r={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 r[e](t),ua(t,Y4(["year",e]))}function Q4(n,e){if(n.length<=e)return n;for(var t=Math.floor(n.length/e),r=[],i=0;i<n.length;i+=t)r.push(n[i]);return r}var ep={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 Oa({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:[]},YW=ia({},ep,{style:{type:"arc"}}),QW=ia({},ep,{style:{}}),Or=_s({mainGroup:"main-group",gridGroup:"grid-group",grid:"grid",lineGroup:"line-group",line:"line",tickGroup:"tick-group",tick:"tick",tickItem:"tick-item",labelGroup:"label-group",label:"label",labelItem:"label-item",titleGroup:"title-group",title:"title",lineFirst:"line-first",lineSecond:"line-second"},"axis");function io(n,e){return[n[0]*e,n[1]*e]}function Pc(n,e){return[n[0]+e[0],n[1]+e[1]]}function tp(n,e){return[n[0]-e[0],n[1]-e[1]]}function Sl(n,e){return[Math.min(n[0],e[0]),Math.min(n[1],e[1])]}function Pl(n,e){return[Math.max(n[0],e[0]),Math.max(n[1],e[1])]}function Oc(n,e){return Math.sqrt(Math.pow(n[0]-e[0],2)+Math.pow(n[1]-e[1],2))}function mb(n){if(n[0]===0&&n[1]===0)return[0,0];var e=Math.sqrt(Math.pow(n[0],2)+Math.pow(n[1],2));return[n[0]/e,n[1]/e]}function JW(n,e,t){var r=__read(n,2),i=r[0],a=r[1],s=__read(e,2),o=s[0],l=s[1],u=i-o,h=a-l,v=Math.sin(t),E=Math.cos(t);return[u*E-h*v+o,u*v+h*E+l]}function J4(n,e){return e?[n[1],-n[0]]:[-n[1],n[0]]}function hu(n){return n*Math.PI/180}function yb(n){return Number((n*180/Math.PI).toPrecision(5))}function Id(n,e){return n.style.opacity||(n.style.opacity=1),Es(n,{opacity:0},e)}var q4=["$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 $4(n){return q4.includes(n)}function _b(n){var e={};for(var t in n)$4(t)&&(e[t]=n[t]);return e}var fu=_s({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function Eb(n){return n.reduce(function(e,t,r){return e.push((0,xe.ev)([r===0?"M":"L"],(0,xe.CR)(t),!1)),e},[])}function ek(n,e,t){var r=e.connect,i=r===void 0?"line":r,a=e.center;if(i==="line")return Eb(n);if(!a)return[];var s=Oc(n[0],a),o=t?0:1;return n.reduce(function(l,u,h){return h===0?l.push((0,xe.ev)(["M"],(0,xe.CR)(u),!1)):l.push((0,xe.ev)(["A",s,s,0,0,o],(0,xe.CR)(u),!1)),l},[])}function np(n,e,t){return e.type==="surround"?ek(n,e,t):Eb(n)}function tk(n,e,t){var r=t.type,i=t.connect,a=t.center,s=t.closed,o=s?[["Z"]]:[],l=(0,xe.CR)([np(n,t),np(e.slice().reverse(),t,!0)],2),u=l[0],h=l[1],v=(0,xe.CR)([n[0],e.slice(-1)[0]],2),E=v[0],D=v[1],F=function(q,te){return[u,q,h,te,o].flat()};if(i==="line"||r==="surround")return F([(0,xe.ev)(["L"],(0,xe.CR)(D),!1)],[(0,xe.ev)(["L"],(0,xe.CR)(E),!1)]);if(!a)throw new Error("Arc grid need to specified center");var G=(0,xe.CR)([Oc(D,a),Oc(E,a)],2),H=G[0],K=G[1];return F([(0,xe.ev)(["A",H,H,0,0,1],(0,xe.CR)(D),!1),(0,xe.ev)(["L"],(0,xe.CR)(D),!1)],[(0,xe.ev)(["A",K,K,0,0,0],(0,xe.CR)(E),!1),(0,xe.ev)(["L"],(0,xe.CR)(E),!1)])}function nk(n,e,t,r){var i=t.animate,a=t.isBillboard,s=e.map(function(o,l){return{id:o.id||"grid-line-".concat(l),d:np(o.points,t)}});return n.selectAll(fu.line.class).data(s,function(o){return o.id}).join(function(o){return o.append("path").each(function(l,u){var h=$a(_b((0,xe.pi)({d:l.d},r)),[l,u,s]);this.attr((0,xe.pi)({class:fu.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:a},h))})},function(o){return o.transition(function(l,u){var h=$a(_b((0,xe.pi)({d:l.d},r)),[l,u,s]);return Es(this,h,i.update)})},function(o){return o.transition(function(){var l=this,u=Id(this,i.exit);return cu(u,function(){return l.remove()}),u})}).transitions()}function rk(n,e,t){var r=t.animate,i=t.connect,a=t.areaFill;if(e.length<2||!a||!i)return[];for(var s=Array.isArray(a)?a:[a,"transparent"],o=function(F){return s[F%s.length]},l=[],u=0;u<e.length-1;u++){var h=(0,xe.CR)([e[u].points,e[u+1].points],2),v=h[0],E=h[1],D=tk(v,E,t);l.push({d:D,fill:o(u)})}return n.selectAll(fu.region.class).data(l,function(F,G){return G}).join(function(F){return F.append("path").each(function(G,H){var K=$a(G,[G,H,l]);this.attr(K)}).attr("className",fu.region.name)},function(F){return F.transition(function(G,H){var K=$a(G,[G,H,l]);return Es(this,K,r.update)})},function(F){return F.transition(function(){var G=this,H=Id(this,r.exit);return cu(H,function(){return G.remove()}),H})}).transitions()}function ik(n){var e=n.data,t=e===void 0?[]:e,r=n.closed;return r?t.map(function(i){var a=i.points,s=(0,xe.CR)(a,1),o=s[0];return(0,xe.pi)((0,xe.pi)({},i),{points:(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(a),!1),[o],!1)})}):t}var ak=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,r){var i=t.type,a=t.center,s=t.areaFill,o=t.closed,l=(0,xe._T)(t,["type","center","areaFill","closed"]),u=ik(t),h=dn(r).maybeAppendByClassName(fu.lineGroup,"g"),v=dn(r).maybeAppendByClassName(fu.regionGroup,"g"),E=nk(h,u,t,l),D=rk(v,u,t);return(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(E),!1),(0,xe.CR)(D),!1)},e}(ti),sk=function(n,e){return function(t){return n*(1-t)+e*t}};function ok(n,e){var t=e?e.length:0,r=n?Math.min(t,n.length):0;return function(i){var a=new Array(r),s=new Array(t),o=0;for(o=0;o<r;++o)a[o]=rp(n[o],e[o]);for(;o<t;++o)s[o]=e[o];for(o=0;o<r;++o)s[o]=a[o](i);return s}}function lk(n,e){n===void 0&&(n={}),e===void 0&&(e={});var t={},r={};return Object.entries(e).forEach(function(i){var a=(0,xe.CR)(i,2),s=a[0],o=a[1];s in n?t[s]=rp(n[s],o):r[s]=o}),function(i){return Object.entries(t).forEach(function(a){var s=(0,xe.CR)(a,2),o=s[0],l=s[1];return r[o]=l(i)}),r}}function rp(n,e){return typeof n=="number"&&typeof e=="number"?sk(n,e):Array.isArray(n)&&Array.isArray(e)?ok(n,e):typeof n=="object"&&typeof e=="object"?lk(n,e):function(t){return n}}function uk(n,e,t,r){if(!r)return n.attr("__keyframe_data__",t),null;var i=r.duration,a=i===void 0?0:i,s=rp(e,t),o=Math.ceil(+a/16),l=new Array(o).fill(0).map(function(u,h,v){return{__keyframe_data__:s(h/(v.length-1))}});return n.animate(l,(0,xe.pi)({fill:"both"},r))}function xb(n,e){var t={},r=Array.isArray(e)?e:[e];for(var i in n)r.includes(i)||(t[i]=n[i]);return t}function bb(n,e){return Object.fromEntries(Object.entries(n).map(function(t){var r=(0,xe.CR)(t,2),i=r[0],a=r[1];return[i,$a(a,e)]}))}function qW(n){if(n.type==="linear"){var e=n.startPos,t=n.endPos;return __spreadArray(__spreadArray([],__read(e),!1),__read(t),!1)}var r=n.startAngle,i=n.endAngle,a=n.center,s=n.radius;return __spreadArray(__spreadArray([r,i],__read(a),!1),[s],!1)}function ip(n,e){return e&&fn(e)?n.filter(e):n}function wb(n,e){var t=e.startAngle,r=e.endAngle;return(r-t)*n+t}function Nd(n,e){if(e.type==="linear"){var t=(0,xe.CR)(e.startPos,2),r=t[0],i=t[1],a=(0,xe.CR)(e.endPos,2),s=a[0],o=a[1],l=(0,xe.CR)([s-r,o-i],2),u=l[0],h=l[1];return mb([u,h])}var v=hu(wb(n,e));return[-Math.sin(v),Math.cos(v)]}function ap(n,e,t){var r=Nd(n,t);return J4(r,e!=="positive")}function Cc(n,e){return ap(n,e.labelDirection,e)}function ck(n,e){var t=(0,xe.CR)(e.startPos,2),r=t[0],i=t[1],a=(0,xe.CR)(e.endPos,2),s=a[0],o=a[1],l=(0,xe.CR)([s-r,o-i],2),u=l[0],h=l[1];return[r+u*n,i+h*n]}function hk(n,e){var t=e.radius,r=(0,xe.CR)(e.center,2),i=r[0],a=r[1],s=hu(wb(n,e));return[i+t*Math.cos(s),a+t*Math.sin(s)]}function Bd(n,e){return e.type==="linear"?ck(n,e):hk(n,e)}function Mb(n){return Nd(0,n)[1]===0}function Ab(n){return Nd(0,n)[0]===0}function Tb(n,e){return e-n===360}function Sb(n,e,t,r,i){var a=e-n,s=(0,xe.CR)([i,i],2),o=s[0],l=s[1],u=(0,xe.CR)([hu(n),hu(e)],2),h=u[0],v=u[1],E=function(Oe){return[t+i*Math.cos(Oe),r+i*Math.sin(Oe)]},D=(0,xe.CR)(E(h),2),F=D[0],G=D[1],H=(0,xe.CR)(E(v),2),K=H[0],q=H[1];if(Tb(n,e)){var te=(v+h)/2,ue=(0,xe.CR)(E(te),2),le=ue[0],he=ue[1];return[["M",F,G],["A",o,l,0,1,0,le,he],["A",o,l,0,1,0,K,q]]}var ve=a>180?1:0,ge=n>e?0:1,Te=!1;return Te?"M".concat(t,",").concat(r,",L").concat(F,",").concat(G,",A").concat(o,",").concat(l,",0,").concat(ve,",").concat(ge,",").concat(K,",").concat(q,",L").concat(t,",").concat(r):"M".concat(F,",").concat(G,",A").concat(o,",").concat(l,",0,").concat(ve,",").concat(ge,",").concat(K,",").concat(q)}function fk(n){var e=n.attributes,t=e.startAngle,r=e.endAngle,i=e.center,a=e.radius;return(0,xe.ev)((0,xe.ev)([t,r],(0,xe.CR)(i),!1),[a],!1)}function dk(n,e,t,r){var i=e.startAngle,a=e.endAngle,s=e.center,o=e.radius;return n.selectAll(Or.line.class).data([{d:Sb.apply(void 0,(0,xe.ev)((0,xe.ev)([i,a],(0,xe.CR)(s),!1),[o],!1))}],function(l,u){return u}).join(function(l){return l.append("path").attr("className",Or.line.name).styles(e).styles({d:function(u){return u.d}})},function(l){return l.transition(function(){var u=this,h=uk(this,fk(this),(0,xe.ev)((0,xe.ev)([i,a],(0,xe.CR)(s),!1),[o],!1),r.update);if(h){var v=function(){var E=aa(u.attributes,"__keyframe_data__");u.style.d=Sb.apply(void 0,(0,xe.ev)([],(0,xe.CR)(E),!1))};h.onframe=v,h.onfinish=v}return h}).styles(e)},function(l){return l.remove()}).styles(t).transitions()}function vk(n,e){var t=e.truncRange,r=e.truncShape,i=e.lineExtension}function gk(n,e,t){t===void 0&&(t=[0,0]);var r=(0,xe.CR)([n,e,t],3),i=(0,xe.CR)(r[0],2),a=i[0],s=i[1],o=(0,xe.CR)(r[1],2),l=o[0],u=o[1],h=(0,xe.CR)(r[2],2),v=h[0],E=h[1],D=(0,xe.CR)([l-a,u-s],2),F=D[0],G=D[1],H=Math.sqrt(Math.pow(F,2)+Math.pow(G,2)),K=(0,xe.CR)([-v/H,E/H],2),q=K[0],te=K[1];return[q*F,q*G,te*F,te*G]}function Pb(n){var e=(0,xe.CR)(n,2),t=(0,xe.CR)(e[0],2),r=t[0],i=t[1],a=(0,xe.CR)(e[1],2),s=a[0],o=a[1];return{x1:r,y1:i,x2:s,y2:o}}function pk(n,e,t,r){var i=e.showTrunc,a=e.startPos,s=e.endPos,o=e.truncRange,l=e.lineExtension,u=(0,xe.CR)([a,s],2),h=(0,xe.CR)(u[0],2),v=h[0],E=h[1],D=(0,xe.CR)(u[1],2),F=D[0],G=D[1],H=(0,xe.CR)(l?gk(a,s,l):new Array(4).fill(0),4),K=H[0],q=H[1],te=H[2],ue=H[3],le=function(ct){return n.selectAll(Or.line.class).data(ct,function(ht,At){return At}).join(function(ht){return ht.append("line").attr("className",function(At){return"".concat(Or.line.name," ").concat(At.className)}).styles(t).transition(function(At){return Es(this,Pb(At.line),!1)})},function(ht){return ht.styles(t).transition(function(At){var kt=At.line;return Es(this,Pb(kt),r.update)})},function(ht){return ht.remove()}).transitions()};if(!i||!o)return le([{line:[[v+K,E+q],[F+te,G+ue]],className:Or.line.name}]);var he=(0,xe.CR)(o,2),ve=he[0],ge=he[1],Te=F-v,Oe=G-E,Ne=(0,xe.CR)([v+Te*ve,E+Oe*ve],2),ze=Ne[0],Xe=Ne[1],Je=(0,xe.CR)([v+Te*ge,E+Oe*ge],2),st=Je[0],Et=Je[1],mt=le([{line:[[v+K,E+q],[ze,Xe]],className:Or.lineFirst.name},{line:[[st,Et],[F+te,G+ue]],className:Or.lineSecond.name}]);return vk(n,e),mt}function mk(n,e,t,r){var i=t.showArrow,a=t.showTrunc,s=t.lineArrow,o=t.lineArrowOffset,l=t.lineArrowSize,u;if(e==="arc"?u=n.select(Or.line.class):a?u=n.select(Or.lineSecond.class):u=n.select(Or.line.class),!i||!s||t.type==="arc"&&Tb(t.startAngle,t.endAngle)){var h=u.node();h&&(h.style.markerEnd=void 0);return}var v=ro(s);v.attr(r),K0(v,l,!0),u.style("markerEnd",v).style("markerEndOffset",-o)}function yk(n,e,t){var r=e.type,i,a=Un(e,"line");return r==="linear"?i=pk(n,e,xb(a,"arrow"),t):i=dk(n,e,xb(a,"arrow"),t),mk(n,r,e,a),i}function _k(n,e){return ap(n,e.gridDirection,e)}function Ob(n){var e=n.type,t=n.gridCenter;return e==="linear"?t:t||n.center}function Ek(n,e){var t=e.gridLength;return n.map(function(r,i){var a=r.value,s=(0,xe.CR)(Bd(a,e),2),o=s[0],l=s[1],u=(0,xe.CR)(io(_k(a,e),t),2),h=u[0],v=u[1];return{id:i,points:[[o,l],[o+h,l+v]]}})}function xk(n,e){var t=e.gridControlAngles,r=Ob(e);if(!r)throw new Error("grid center is not provide");if(n.length<2)throw new Error("Invalid grid data");if(!t||t.length===0)throw new Error("Invalid gridControlAngles");var i=(0,xe.CR)(r,2),a=i[0],s=i[1];return n.map(function(o,l){var u=o.value,h=(0,xe.CR)(Bd(u,e),2),v=h[0],E=h[1],D=(0,xe.CR)([v-a,E-s],2),F=D[0],G=D[1],H=[];return t.forEach(function(K){var q=hu(K),te=(0,xe.CR)([Math.cos(q),Math.sin(q)],2),ue=te[0],le=te[1],he=F*ue-G*le+a,ve=F*le+G*ue+s;H.push([he,ve])}),{points:H,id:l}})}function bk(n,e,t,r){var i=Un(t,"grid"),a=i.type,s=i.areaFill,o=Ob(t),l=ip(e,t.gridFilter),u=a==="segment"?Ek(l,t):xk(l,t),h=(0,xe.pi)((0,xe.pi)({},i),{center:o,areaFill:fn(s)?l.map(function(v,E){return $a(s,[v,E,l])}):s,animate:r,data:u});return n.selectAll(Or.grid.class).data([1]).join(function(v){return v.append(function(){return new ak({style:h})}).attr("className",Or.grid.name)},function(v){return v.transition(function(){return this.update(h)})},function(v){return v.remove()}).transitions()}function Gi(n,e,t,r,i){return r===void 0&&(r=!0),i===void 0&&(i=!1),r&&n===e||i&&n===t?!0:n>e&&n<t}function wk(n,e,t,r){t===void 0&&(t=2),r===void 0&&(r="top"),hb(n,{wordWrap:!0,wordWrapWidth:e,maxLines:t,textBaseline:r})}function Mk(n,e,t){var r=n.getBBox(),i=r.width,a=r.height,s=(0,xe.CR)([e,t].map(function(u,h){var v;return u.includes("%")?parseFloat(((v=u.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||v===void 0?void 0:v[0])||"0")/100*(h===0?i:a):u}),2),o=s[0],l=s[1];return[o,l]}function Cb(n,e){if(e)try{var t=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,r=e.replace(t,function(i,a,s){return"translate(".concat(Mk(n,a,s),")")});n.attr("transform",r)}catch(i){}}var Db=function(n){return n!==void 0&&n!=null&&!Number.isNaN(n)},sp=function(){function n(e,t,r,i){this.set(e,t,r,i)}return Object.defineProperty(n.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),n.prototype.rotatedPoints=function(e,t,r){var i=this,a=i.x1,s=i.y1,o=i.x2,l=i.y2,u=Math.cos(e),h=Math.sin(e),v=t-t*u+r*h,E=r-t*h-r*u,D=[[u*a-h*l+v,h*a+u*l+E],[u*o-h*l+v,h*o+u*l+E],[u*a-h*s+v,h*a+u*s+E],[u*o-h*s+v,h*o+u*s+E]];return D},n.prototype.set=function(e,t,r,i){return r<e?(this.x2=e,this.x1=r):(this.x1=e,this.x2=r),i<t?(this.y2=t,this.y1=i):(this.y1=t,this.y2=i),this},n.prototype.defined=function(e){return this[e]!==Number.MAX_VALUE&&this[e]!==-Number.MAX_VALUE},n}();function kd(n,e){var t=n.getEulerAngles()||0;n.setEulerAngles(0);var r=n.getBounds(),i=(0,xe.CR)(r.min,2),a=i[0],s=i[1],o=(0,xe.CR)(r.max,2),l=o[0],u=o[1],h=n.getBBox(),v=h.width,E=h.height,D=E,F=0,G=0,H=a,K=s,q=cb(n);if(q){D-=1.5;var te=q.style.textAlign,ue=q.style.textBaseline;te==="center"?H=(a+l)/2:(te==="right"||te==="end")&&(H=l),ue==="middle"?K=(s+u)/2:ue==="bottom"&&(K=u)}var le=(0,xe.CR)(Wi(e),4),he=le[0],ve=he===void 0?0:he,ge=le[1],Te=ge===void 0?0:ge,Oe=le[2],Ne=Oe===void 0?ve:Oe,ze=le[3],Xe=ze===void 0?Te:ze,Je=new sp((F+=a)-Xe,(G+=s)-ve,F+v+Te,G+D+Ne);return n.setEulerAngles(t),Je.rotatedPoints(hu(t),H,K)}function Dc(n,e){return e[0]<=Math.max(n[0][0],n[1][0])&&e[0]<=Math.min(n[0][0],n[1][0])&&e[1]<=Math.max(n[0][1],n[1][1])&&e[1]<=Math.min(n[0][1],n[1][1])}function Lc(n,e,t){var r=(e[1]-n[1])*(t[0]-e[0])-(e[0]-n[0])*(t[1]-e[1]);return r===0?0:r<0?2:1}function Ak(n,e){var t=Lc(n[0],n[1],e[0]),r=Lc(n[0],n[1],e[1]),i=Lc(e[0],e[1],n[0]),a=Lc(e[0],e[1],n[1]);return!!(t!==r&&i!==a||t===0&&Dc(n,e[0])||r===0&&Dc(n,e[1])||i===0&&Dc(e,n[0])||a===0&&Dc(e,n[1]))}function Tk(n,e){var t=n.length;if(t<3)return!1;var r=[e,[9999,e[1]]],i=0,a=0;do{var s=[n[a],n[(a+1)%t]];if(Ak(s,r)){if(Lc(s[0],e,s[1])===0)return Dc(s,e);i++}a=(a+1)%t}while(a!==0);return!!(i&1)}function Sk(n,e){return e.every(function(t){return Tk(n,t)})}function Pk(n,e,t){var r=n.x1,i=n.x2,a=n.y1,s=n.y2,o=[[r,a],[i,a],[i,s],[r,s]],l=kd(e,t);return Sk(o,l)}function Lb(n,e){var t=(0,xe.CR)(n,4),r=t[0],i=t[1],a=t[2],s=t[3],o=(0,xe.CR)(e,4),l=o[0],u=o[1],h=o[2],v=o[3],E=a-r,D=s-i,F=h-l,G=v-u,H=E*G-F*D;if(H===0)return!1;var K=H>0,q=r-l,te=i-u,ue=E*te-D*q;if(ue<0===K)return!1;var le=F*te-G*q;return!(le<0===K||ue>H===K||le>H===K)}function Rb(n,e){var t=[[n[0],n[1],n[2],n[3]],[n[2],n[3],n[4],n[5]],[n[4],n[5],n[6],n[7]],[n[6],n[7],n[0],n[1]]];return t.some(function(r){return Lb(e,r)})}var $W={lineToLine:Lb,intersectBoxLine:Rb,getBounds:kd};function Ok(n,e,t){var r,i,a=kd(n,t).flat(1),s=kd(e,t).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 l=(0,xe.XA)(o),u=l.next();!u.done;u=l.next()){var h=u.value;if(Rb(s,h))return!0}}catch(v){r={error:v}}finally{try{u&&!u.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}return!1}function Ck(n,e){var t=n.type,r=n.labelDirection,i=n.crossSize;if(!i)return!1;if(t==="arc"){var a=n.center,s=n.radius,o=(0,xe.CR)(a,2),l=o[0],u=o[1],h=r==="negative"?0:i,v=-s-h,E=s+h,D=(0,xe.CR)(Wi(e),4),F=D[0],G=D[1],H=D[2],K=D[3];return new sp(l+v-K,u+v-F,l+E+G,u+E+H)}var q=(0,xe.CR)(n.startPos,2),te=q[0],ue=q[1],le=(0,xe.CR)(n.endPos,2),he=le[0],ve=le[1],ge=(0,xe.CR)(Ab(n)?[-e,0,e,0]:[0,e,0,-e],4),Te=ge[0],Oe=ge[1],Ne=ge[2],ze=ge[3],Xe=Cc(0,n),Je=io(Xe,i),st=new sp(te,ue,he,ve);return st.x1+=ze,st.y1+=Te,st.x2+=Oe+Je[0],st.y2+=Ne+Je[1],st}function Fd(n,e,t){var r,i,a=e.crossPadding,s=new Set,o=null,l=Ck(e,a),u=function(F){return l?Pk(l,F):!0},h=function(F,G){return!F||!F.firstChild?!0:!Ok(F.firstChild,G.firstChild,Wi(t))};try{for(var v=(0,xe.XA)(n),E=v.next();!E.done;E=v.next()){var D=E.value;u(D)?!o||h(o,D)?o=D:(s.add(o),s.add(D)):s.add(D)}}catch(F){r={error:F}}finally{try{E&&!E.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return Array.from(s)}function op(n,e){return e===void 0&&(e={}),xn(n)?0:typeof n=="number"?n:Math.floor(z4(n,e))}function Dk(n,e,t,r){if(!(n.length<=1)){var i=e.suffix,a=i===void 0?"...":i,s=e.minLength,o=e.maxLength,l=o===void 0?1/0:o,u=e.step,h=u===void 0?" ":u,v=e.margin,E=v===void 0?[0,0,0,0]:v,D=ub(r.getTextShape(n[0])),F=op(h,D),G=s?op(s,D):F,H=op(l,D);(xn(H)||H===1/0)&&(H=Math.max.apply(null,n.map(function(Je){return Je.getBBox().width})));for(var K=n.slice(),q=(0,xe.CR)(E,4),te=q[0],ue=te===void 0?0:te,le=q[1],he=le===void 0?0:le,ve=q[2],ge=ve===void 0?ue:ve,Te=q[3],Oe=Te===void 0?he:Te,Ne=function(Je){if(K.forEach(function(st){r.ellipsis(r.getTextShape(st),Je,a)}),K=Fd(n,t,E),K.length<1)return{value:void 0}},ze=H;ze>G+F;ze-=F){var Xe=Ne(ze);if(typeof Xe=="object")return Xe.value}}}var Lk={parity:function(n,e){var t=e.seq,r=t===void 0?2:t;return n.filter(function(i,a){return a%r?(ys(i),!1):!0})}},Rk=function(n){return n.filter(Db)};function Ik(n,e,t,r){var i=n.length,a=e.keepHeader,s=e.keepTail;if(!(i<=1||i===2&&a&&s)){var o=Lk.parity,l=function(te){return te.forEach(r.show),te},u=2,h=n.slice(),v=n.slice(),E=Math.min.apply(Math,(0,xe.ev)([1],(0,xe.CR)(n.map(function(te){return te.getBBox().width})),!1));if(t.type==="linear"&&(Mb(t)||Ab(t))){var D=lb(n[0]).left,F=lb(n[i-1]).right,G=Math.abs(F-D)||1;u=Math.max(Math.floor(i*E/G),u)}var H,K;for(a&&(H=h.splice(0,1)[0]),s&&(K=h.splice(-1,1)[0],h.reverse()),l(h);u<n.length&&Fd(Rk(K?(0,xe.ev)((0,xe.ev)([K],(0,xe.CR)(v),!1),[H],!1):(0,xe.ev)([H],(0,xe.CR)(v),!1)),t,e==null?void 0:e.margin).length;){if(K&&!H&&u%2===0){var q=h.splice(0,1);q.forEach(r.hide)}else if(K&&H){var q=h.splice(0,1);q.forEach(r.hide)}v=o(l(h),{seq:u}),u++}}}function Nk(n,e,t,r){var i,a,s=e.optionalAngles,o=s===void 0?[0,45,90]:s,l=e.margin,u=e.recoverWhenFailed,h=u===void 0?!0:u,v=n.map(function(K){return K.getLocalEulerAngles()}),E=function(){return Fd(n,t,l).length<1},D=function(K){return n.forEach(function(q,te){var ue=Array.isArray(K)?K[te]:K;r.rotate(q,+ue)})};try{for(var F=(0,xe.XA)(o),G=F.next();!G.done;G=F.next()){var H=G.value;if(D(H),E())return}}catch(K){i={error:K}}finally{try{G&&!G.done&&(a=F.return)&&a.call(F)}finally{if(i)throw i.error}}h&&D(v)}function Bk(n){var e=n.type,t=n.labelDirection;return e==="linear"&&Mb(n)?t==="negative"?"bottom":"top":"middle"}function kk(n,e,t,r){var i=e.wordWrapWidth,a=i===void 0?50:i,s=e.maxLines,o=s===void 0?3:s,l=e.recoverWhenFailed,u=l===void 0?!0:l,h=e.margin,v=h===void 0?[0,0,0,0]:h,E=n.map(function(q){return q.attr("maxLines")||1}),D=Math.min.apply(Math,(0,xe.ev)([],(0,xe.CR)(E),!1)),F=function(){return Fd(n,t,v).length<1},G=Bk(t),H=function(q){return n.forEach(function(te,ue){var le=Array.isArray(q)?q[ue]:q;r.wrap(te,a,le,G)})};if(!(D>o)){for(var K=D;K<=o;K++)if(H(K),F())return;u&&H(E)}}var Fk=new Map([["hide",Ik],["rotate",Nk],["ellipsis",Dk],["wrap",kk]]);function zk(n,e,t){return e.labelOverlap.length<1?!1:t==="hide"?!X5(n[0]):t==="rotate"?!n.some(function(r){var i;return!!(!((i=r.attr("transform"))===null||i===void 0)&&i.includes("rotate"))}):t==="ellipsis"||t==="wrap"?n.filter(function(r){return r.querySelector("text")}).length>1:!0}function Uk(n,e,t){var r=e.labelOverlap,i=r===void 0?[]:r;i.length&&i.forEach(function(a){var s=a.type,o=Fk.get(s);zk(n,e,s)&&(o==null||o(n,a,e,t))})}function Wk(){for(var n=[],e=0;e<arguments.length;e++)n[e]=arguments[e];var t=function(r){return r==="positive"?-1:1};return n.reduce(function(r,i){return r*t(i)},1)}function Ib(n){for(var e=n;e<0;)e+=360;return Math.round(e%360)}function lp(n,e){var t=(0,xe.CR)(n,2),r=t[0],i=t[1],a=(0,xe.CR)(e,2),s=a[0],o=a[1],l=(0,xe.CR)([r*s+i*o,r*o-i*s],2),u=l[0],h=l[1];return Math.atan2(h,u)}function Gk(n){var e=(n+360)%180;return Gi(e,-90,90)||(e+=180),e}function Hk(n,e,t){var r,i=t.labelAlign,a=(r=e.style.transform)===null||r===void 0?void 0:r.includes("rotate");if(a)return e.getLocalEulerAngles();var s=0,o=Cc(n.value,t),l=Nd(n.value,t);return i==="horizontal"?0:(i==="perpendicular"?s=lp([1,0],o):s=lp([l[0]<0?-1:1,0],l),Gk(yb(s)))}function Nb(n,e,t){var r=t.type,i=t.labelAlign,a=Cc(n,t),s=Ib(e),o=Ib(yb(lp([1,0],a))),l="center",u="middle";return r==="linear"?[90,270].includes(o)&&s===0?(l="center",u=a[1]===1?"top":"bottom"):!(o%180)&&[90,270].includes(s)?l="center":o===0?(Gi(s,0,90,!1,!0)||Gi(s,0,90)||Gi(s,270,360))&&(l="start"):o===90?Gi(s,0,90,!1,!0)?l="start":(Gi(s,90,180)||Gi(s,270,360))&&(l="end"):o===270?Gi(s,0,90,!1,!0)?l="end":(Gi(s,90,180)||Gi(s,270,360))&&(l="start"):o===180&&(s===90?l="start":(Gi(s,0,90)||Gi(s,270,360))&&(l="end")):i==="parallel"?Gi(o,0,180,!0)?u="top":u="bottom":i==="horizontal"?Gi(o,90,270,!1)?l="end":(Gi(o,270,360,!1)||Gi(o,0,90))&&(l="start"):i==="perpendicular"&&(Gi(o,90,270)?l="end":l="start"),{textAlign:l,textBaseline:u}}function jk(n,e,t){e.setLocalEulerAngles(n);var r=e.__data__.value,i=Nb(r,n,t),a=e.querySelector(Or.labelItem.class);a&&kb(a,i)}function Bb(n,e,t){var r=t.showTick,i=t.tickLength,a=t.tickDirection,s=t.labelDirection,o=t.labelSpacing,l=e.indexOf(n),u=$a(o,[n,l,e]),h=(0,xe.CR)([Cc(n.value,t),Wk(s,a)],2),v=h[0],E=h[1],D=E===1?$a(r?i:0,[n,l,e]):0,F=(0,xe.CR)(Pc(io(v,u+D),Bd(n.value,t)),2),G=F[0],H=F[1];return{x:G,y:H}}function Vk(n,e,t,r){var i=r.labelFormatter,a=fn(i)?function(){return ro($a(i,[n,e,t,Cc(n.value,r)]))}:function(){return ro(n.label||"")};return a}function kb(n,e){n.nodeName==="text"&&n.attr(e)}function Fb(n){Uk(this.node().childNodes,n,{hide:ys,show:Ac,rotate:function(e,t){jk(+t,e,n)},ellipsis:function(e,t,r){e&&Q0(e,t||1/0,r)},wrap:function(e,t,r){e&&wk(e,t,r)},getTextShape:function(e){return e.querySelector("text")}})}function zb(n,e,t,r,i){var a=t.indexOf(e),s=dn(n).append(Vk(e,a,t,i)).attr("className",Or.labelItem.name).node(),o=(0,xe.CR)(no(bb(r,[e,a,t])),2),l=o[0],u=o[1],h=u.transform,v=(0,xe._T)(u,["transform"]);Cb(s,h);var E=Hk(e,s,i);return s.getLocalEulerAngles()||s.setLocalEulerAngles(E),kb(s,(0,xe.pi)((0,xe.pi)({},Nb(e.value,E,i)),l)),n.attr(v),s}function Zk(n,e,t,r){var i=ip(e,t.labelFilter),a=Un(t,"label");return n.selectAll(Or.label.class).data(i,function(s,o){return o}).join(function(s){return s.append("g").attr("className",Or.label.name).transition(function(o){zb(this,o,e,a,t);var l=Bb(o,e,t),u=l.x,h=l.y;return this.style.transform="translate(".concat(u,", ").concat(h,")"),null}).call(function(){Fb.call(n,t)})},function(s){return s.transition(function(o){var l=this.querySelector(Or.labelItem.class),u=zb(this,o,e,a,t),h=h4(l,u,r.update),v=Bb(o,e,t),E=v.x,D=v.y,F=Es(this,{transform:"translate(".concat(E,", ").concat(D,")")},r.update);return(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(h),!1),[F],!1)}).call(function(o){var l=aa(o,"_transitions").flat().filter(Db);u4(l,function(){Fb.call(n,t)})})},function(s){return s.transition(function(){var o=this,l=Id(this.childNodes[0],r.exit);return cu(l,function(){return dn(o).remove()}),l})}).transitions()}function Ub(n,e){return ap(n,e.tickDirection,e)}function Kk(n,e){var t=(0,xe.CR)(n,2),r=t[0],i=t[1];return[[0,0],[r*e,i*e]]}function Xk(n,e,t,r,i){var a=i.tickLength,s=(0,xe.CR)(Kk(r,$a(a,[n,e,t])),2),o=(0,xe.CR)(s[0],2),l=o[0],u=o[1],h=(0,xe.CR)(s[1],2),v=h[0],E=h[1];return{x1:l,x2:v,y1:u,y2:E}}function Yk(n,e,t,r,i){var a=i.tickFormatter,s=Ub(e.value,i),o="line";return fn(a)&&(o=function(){return $a(a,[e,t,r,s])}),n.append(o).attr("className",Or.tickItem.name)}function Qk(n,e,t,r,i,a,s){var o=Ub(n.value,a),l=Xk(n,e,t,o,a),u=l.x1,h=l.x2,v=l.y1,E=l.y2,D=(0,xe.CR)(no(bb(s,[n,e,t,o])),2),F=D[0],G=D[1];r.node().nodeName==="line"&&r.styles((0,xe.pi)({x1:u,x2:h,y1:v,y2:E},F)),i.attr(G),r.styles(F)}function Wb(n,e,t,r,i,a){var s=Yk(dn(this),n,e,t,r);Qk(n,e,t,s,this,r,i);var o=(0,xe.CR)(Bd(n.value,r),2),l=o[0],u=o[1];return Es(this,{transform:"translate(".concat(l,", ").concat(u,")")},a)}function Jk(n,e,t,r){var i=ip(e,t.tickFilter),a=Un(t,"tick");return n.selectAll(Or.tick.class).data(i,function(s){return s.id||s.label}).join(function(s){return s.append("g").attr("className",Or.tick.name).transition(function(o,l){return Wb.call(this,o,l,i,t,a,!1)})},function(s){return s.transition(function(o,l){return this.removeChildren(),Wb.call(this,o,l,i,t,a,r.update)})},function(s){return s.transition(function(){var o=this,l=Id(this.childNodes[0],r.exit);return cu(l,function(){return o.remove()}),l})}).transitions()}function qk(n,e,t){var r=t.titlePosition,i=r===void 0?"lb":r,a=t.titleSpacing,s=Pd(i),o=n.node().getLocalBounds(),l=(0,xe.CR)(o.min,2),u=l[0],h=l[1],v=(0,xe.CR)(o.halfExtents,2),E=v[0],D=v[1],F=(0,xe.CR)(e.node().getLocalBounds().halfExtents,2),G=F[0],H=F[1],K=(0,xe.CR)([u+E,h+D],2),q=K[0],te=K[1],ue=(0,xe.CR)(Wi(a),4),le=ue[0],he=ue[1],ve=ue[2],ge=ue[3];if(["start","end"].includes(i)&&t.type==="linear"){var Te=t.startPos,Oe=t.endPos,Ne=(0,xe.CR)(i==="start"?[Te,Oe]:[Oe,Te],2),ze=Ne[0],Xe=Ne[1],Je=mb([-Xe[0]+ze[0],-Xe[1]+ze[1]]),st=(0,xe.CR)(io(Je,le),2),Et=st[0],mt=st[1];return{x:ze[0]+Et,y:ze[1]+mt}}return s.includes("t")&&(te-=D+H+le),s.includes("r")&&(q+=E+G+he),s.includes("l")&&(q-=E+G+ge),s.includes("b")&&(te+=D+H+ve),{x:q,y:te}}function $k(n,e,t){var r=n.getGeometryBounds().halfExtents,i=r[1]*2;if(e==="vertical"){if(t==="left")return"rotate(-90) translate(0, ".concat(i/2,")");if(t==="right")return"rotate(-90) translate(0, -".concat(i/2,")")}return""}function Gb(n,e,t,r,i){var a=Un(r,"title"),s=(0,xe.CR)(no(a),2),o=s[0],l=s[1],u=l.transform,h=l.transformOrigin,v=(0,xe._T)(l,["transform","transformOrigin"]);e.styles(v);var E=u||$k(n.node(),o.direction,o.position);n.styles((0,xe.pi)((0,xe.pi)({},o),{transformOrigin:h})),Cb(n.node(),E);var D=qk(dn(t._offscreen||t.querySelector(Or.mainGroup.class)),e,r),F=D.x,G=D.y,H=Es(e.node(),{transform:"translate(".concat(F,", ").concat(G,")")},i);return H}function eF(n,e,t,r){var i=t.titleText;return n.selectAll(Or.title.class).data([{title:i}].filter(function(a){return!!a.title}),function(a,s){return a.title}).join(function(a){return a.append(function(){return ro(i)}).attr("className",Or.title.name).transition(function(){return Gb(dn(this),n,e,t,r.enter)})},function(a){return a.transition(function(){return Gb(dn(this),n,e,t,r.update)})},function(a){return a.remove()}).transitions()}function Hb(n,e,t,r){var i=n.showLine,a=n.showTick,s=n.showLabel,o=e.maybeAppendByClassName(Or.lineGroup,"g"),l=Ba(i,o,function(D){return yk(D,n,r)})||[],u=e.maybeAppendByClassName(Or.tickGroup,"g"),h=Ba(a,u,function(D){return Jk(D,t,n,r)})||[],v=e.maybeAppendByClassName(Or.labelGroup,"g"),E=Ba(s,v,function(D){return Zk(D,t,n,r)})||[];return(0,xe.ev)((0,xe.ev)((0,xe.ev)([],(0,xe.CR)(l),!1),(0,xe.CR)(h),!1),(0,xe.CR)(E),!1).filter(function(D){return!!D})}var tF=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,ep)||this}return e.prototype.render=function(t,r,i){var a=this,s=t.titleText,o=t.data,l=t.animate,u=t.showTitle,h=t.showGrid,v=t.dataThreshold,E=t.truncRange,D=Q4(o,v).filter(function(le){var he=le.value;return!(E&&he>E[0]&&he<E[1])}),F=eb(i===void 0?l:i),G=dn(r).maybeAppendByClassName(Or.gridGroup,"g"),H=Ba(h,G,function(le){return bk(le,D,t,F)})||[],K=dn(r).maybeAppendByClassName(Or.mainGroup,"g");s&&(!this.initialized&&F.enter||this.initialized&&F.update)&&Hb(t,dn(this.offscreenGroup),D,eb(!1));var q=Hb(t,dn(K.node()),D,F),te=dn(r).maybeAppendByClassName(Or.titleGroup,"g"),ue=Ba(u,te,function(le){return eF(le,a,t,F)})||[];return(0,xe.ev)((0,xe.ev)((0,xe.ev)([],(0,xe.CR)(H),!1),(0,xe.CR)(q),!1),(0,xe.CR)(ue),!1).flat().filter(function(le){return!!le})},e}(ti);function jb(n){var e=n.canvas,t=n.touches,r=n.offsetX,i=n.offsetY;if(e){var a=e.x,s=e.y;return[a,s]}if(t){var o=t[0],l=o.clientX,u=o.clientY;return[l,u]}return r&&i?[r,i]:[0,0]}function up(n,e){return+n.toPrecision(e)}function eG(n){return n.toLocaleString()}function tG(n){return n.toExponential()}function nG(n,e){return e===void 0&&(e=0),Math.abs(n)<1e3?String(n):"".concat(up(n/1e3,e).toLocaleString(),"K")}var rG=function(n,e,t){return n<0&&Number.isFinite(n)?e:t},iG=function(n,e,t){return n>0&&Number.isFinite(n)?e:t},aG=function(n,e){return n*e},sG=function(n,e){return n/2+(e||0)/2},cp=function(n){return n};class Vb{constructor(e){this.options=ia({},this.getDefaultOptions()),this.update(e)}getOptions(){return this.options}update(e={}){this.options=ia({},this.options,e),this.rescale(e)}rescale(e){}}function hp(n,e){return e-n?t=>(t-n)/(e-n):t=>.5}function zd(n,...e){return e.reduce((t,r)=>i=>t(r(i)),n)}function nF(n,e,t,r,i){let a=t||0,s=r||n.length;const o=i||(l=>l);for(;a<s;){const l=Math.floor((a+s)/2);o(n[l])>e?s=l:a=l+1}return a}var rF=Y(75196),iF=Y.n(rF);function fp(n,e,t){let r=t;return r<0&&(r+=1),r>1&&(r-=1),r<1/6?n+(e-n)*6*r:r<1/2?e:r<2/3?n+(e-n)*(2/3-r)*6:n}function aF(n){const e=n[0]/360,t=n[1]/100,r=n[2]/100,i=n[3];if(t===0)return[r*255,r*255,r*255,i];const a=r<.5?r*(1+t):r+t-r*t,s=2*r-a,o=fp(s,a,e+1/3),l=fp(s,a,e),u=fp(s,a,e-1/3);return[o*255,l*255,u*255,i]}function Zb(n){const e=iF().get(n);if(!e)return null;const{model:t,value:r}=e;return t==="rgb"?r:t==="hsl"?aF(r):null}const Ud=(n,e)=>t=>n*(1-t)+e*t,sF=(n,e)=>{const t=Zb(n),r=Zb(e);return t===null||r===null?t?()=>n:()=>e:i=>{const a=new Array(4);for(let h=0;h<4;h+=1){const v=t[h],E=r[h];a[h]=v*(1-i)+E*i}const[s,o,l,u]=a;return`rgba(${Math.round(s)}, ${Math.round(o)}, ${Math.round(l)}, ${u})`}},oF=(n,e)=>typeof n=="number"&&typeof e=="number"?Ud(n,e):typeof n=="string"&&typeof e=="string"?sF(n,e):()=>n,lF=(n,e)=>{const t=Ud(n,e);return r=>Math.round(t(r))};function uF(n){return n===null}function Kb(n){return!Bn(n)&&!uF(n)&&!Number.isNaN(n)}const dp=Math.sqrt(50),vp=Math.sqrt(10),gp=Math.sqrt(2);function Wd(n,e,t){const r=(e-n)/Math.max(0,t),i=Math.floor(Math.log(r)/Math.LN10),a=r/jo(10,i);return i>=0?(a>=dp?10:a>=vp?5:a>=gp?2:1)*jo(10,i):-jo(10,-i)/(a>=dp?10:a>=vp?5:a>=gp?2:1)}function oG(n,e,t){const r=Math.abs(e-n)/Math.max(0,t);let i=jo(10,Math.floor(Math.log(r)/Math.LN10));const a=r/i;return a>=dp?i*=10:a>=vp?i*=5:a>=gp&&(i*=2),e<n?-i:i}const cF=(n,e,t=5)=>{const r=[n,e];let i=0,a=r.length-1,s=r[i],o=r[a],l;return o<s&&([s,o]=[o,s],[i,a]=[a,i]),l=Wd(s,o,t),l>0?(s=Math.floor(s/l)*l,o=Math.ceil(o/l)*l,l=Wd(s,o,t)):l<0&&(s=Math.ceil(s*l)/l,o=Math.floor(o*l)/l,l=Wd(s,o,t)),l>0?(r[i]=Math.floor(s/l)*l,r[a]=Math.ceil(o/l)*l):l<0&&(r[i]=Math.ceil(s*l)/l,r[a]=Math.floor(o*l)/l),r};function hF(n,e){const t=e<n?e:n,r=n>e?n:e;return i=>Math.min(Math.max(t,i),r)}const fF=(n,e,t)=>{const[r,i]=n,[a,s]=e;let o,l;return r<i?(o=hp(r,i),l=t(a,s)):(o=hp(i,r),l=t(s,a)),zd(l,o)},dF=(n,e,t)=>{const r=Math.min(n.length,e.length)-1,i=new Array(r),a=new Array(r),s=n[0]>n[r],o=s?[...n].reverse():n,l=s?[...e].reverse():e;for(let u=0;u<r;u+=1)i[u]=hp(o[u],o[u+1]),a[u]=t(l[u],l[u+1]);return u=>{const h=nF(n,u,1,r)-1,v=i[h],E=a[h];return zd(E,v)(u)}},Xb=(n,e,t,r)=>(Math.min(n.length,e.length)>2?dF:fF)(n,e,r?lF:t);class vF extends Vb{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:Ud,tickCount:5}}map(e){return Kb(e)?this.output(e):this.options.unknown}invert(e){return Kb(e)?this.input(e):this.options.unknown}nice(){if(!this.options.nice)return;const[e,t,r,...i]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(e,t,r,...i)}getTicks(){const{tickMethod:e}=this.options,[t,r,i,...a]=this.getTickMethodOptions();return e(t,r,i,...a)}getTickMethodOptions(){const{domain:e,tickCount:t}=this.options,r=e[0],i=e[e.length-1];return[r,i,t]}chooseNice(){return cF}rescale(){this.nice();const[e,t]=this.chooseTransforms();this.composeOutput(e,this.chooseClamp(e)),this.composeInput(e,t,this.chooseClamp(t))}chooseClamp(e){const{clamp:t,range:r}=this.options,i=this.options.domain.map(e),a=Math.min(i.length,r.length);return t?hF(i[0],i[a-1]):cp}composeOutput(e,t){const{domain:r,range:i,round:a,interpolate:s}=this.options,o=Xb(r.map(e),i,s,a);this.output=zd(o,t,e)}composeInput(e,t,r){const{domain:i,range:a}=this.options,s=Xb(a,i.map(e),Ud);this.input=zd(t,r,s)}}const gF=(n,e,t)=>{let r,i,a=n,s=e;if(a===s&&t>0)return[a];let o=Wd(a,s,t);if(o===0||!Number.isFinite(o))return[];if(o>0){a=Math.ceil(a/o),s=Math.floor(s/o),i=new Array(r=Math.ceil(s-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)*o}else{o=-o,a=Math.ceil(a*o),s=Math.floor(s*o),i=new Array(r=Math.ceil(s-a+1));for(let l=0;l<r;l+=1)i[l]=(a+l)/o}return i};class Rc extends vF{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:oF,tickMethod:gF,tickCount:5}}chooseTransforms(){return[cp,cp]}clone(){return new Rc(this.options)}}function Yb({map:n,initKey:e},t){const r=e(t);return n.has(r)?n.get(r):t}function pF({map:n,initKey:e},t){const r=e(t);return n.has(r)?n.get(r):(n.set(r,t),t)}function mF({map:n,initKey:e},t){const r=e(t);return n.has(r)&&(t=n.get(r),n.delete(r)),t}function yF(n){return typeof n=="object"?n.valueOf():n}class Qb extends Map{constructor(e){if(super(),this.map=new Map,this.initKey=yF,e!==null)for(const[t,r]of e)this.set(t,r)}get(e){return super.get(Yb({map:this.map,initKey:this.initKey},e))}has(e){return super.has(Yb({map:this.map,initKey:this.initKey},e))}set(e,t){return super.set(pF({map:this.map,initKey:this.initKey},e),t)}delete(e){return super.delete(mF({map:this.map,initKey:this.initKey},e))}}const pp=Symbol("defaultUnknown");function Jb(n,e,t){for(let r=0;r<e.length;r+=1)n.has(e[r])||n.set(t(e[r]),r)}function qb(n){const{value:e,from:t,to:r,mapper:i,notFoundReturn:a}=n;let s=i.get(e);if(s===void 0){if(a!==pp)return a;s=t.push(e)-1,i.set(e,s)}return r[s%r.length]}function $b(n){return n instanceof Date?e=>`${e}`:typeof n=="object"?e=>JSON.stringify(e):e=>e}class mp extends Vb{getDefaultOptions(){return{domain:[],range:[],unknown:pp}}constructor(e){super(e)}map(e){return this.domainIndexMap.size===0&&Jb(this.domainIndexMap,this.getDomain(),this.domainKey),qb({value:this.domainKey(e),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(e){return this.rangeIndexMap.size===0&&Jb(this.rangeIndexMap,this.getRange(),this.rangeKey),qb({value:this.rangeKey(e),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(e){const[t]=this.options.domain,[r]=this.options.range;if(this.domainKey=$b(t),this.rangeKey=$b(r),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!e||e.range)&&this.rangeIndexMap.clear(),(!e||e.domain||e.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new mp(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:e,compare:t}=this.options;return this.sortedDomain=t?[...e].sort(t):e,this.sortedDomain}}function _F(n){const e=Math.min(...n);return n.map(t=>t/e)}function EF(n,e){const t=n.length,r=e-t;return r>0?[...n,...new Array(r).fill(1)]:r<0?n.slice(0,e):n}function xF(n){return Math.round(n*1e12)/1e12}function bF(n){const{domain:e,range:t,paddingOuter:r,paddingInner:i,flex:a,round:s,align:o}=n,l=e.length,u=EF(a,l),[h,v]=t,E=v-h,D=2/l*r+1-1/l*i,F=E/D,G=F*i/l,H=F-l*G,K=_F(u),q=K.reduce((ze,Xe)=>ze+Xe),te=H/q,ue=new Qb(e.map((ze,Xe)=>{const Je=K[Xe]*te;return[ze,s?Math.floor(Je):Je]})),le=new Qb(e.map((ze,Xe)=>{const st=K[Xe]*te+G;return[ze,s?Math.floor(st):st]})),he=Array.from(le.values()).reduce((ze,Xe)=>ze+Xe),ge=(E-(he-he/l*i))*o,Te=h+ge;let Oe=s?Math.round(Te):Te;const Ne=new Array(l);for(let ze=0;ze<l;ze+=1){Ne[ze]=xF(Oe);const Xe=e[ze];Oe+=le.get(Xe)}return{valueBandWidth:ue,valueStep:le,adjustedRange:Ne}}function wF(n){var e;const{domain:t}=n,r=t.length;if(r===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((e=n.flex)===null||e===void 0)&&e.length))return bF(n);const{range:a,paddingOuter:s,paddingInner:o,round:l,align:u}=n;let h,v,E=a[0];const F=a[1]-E,G=s*2,H=r-o;h=F/Math.max(1,G+H),l&&(h=Math.floor(h)),E+=(F-h*(r-o))*u,v=h*(1-o),l&&(E=Math.round(E),v=Math.round(v));const K=new Array(r).fill(0).map((q,te)=>E+te*h);return{valueStep:h,valueBandWidth:v,adjustedRange:K}}class yp extends mp{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:pp,flex:[]}}constructor(e){super(e)}clone(){return new yp(this.options)}getStep(e){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:e===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(e)}getBandWidth(e){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:e===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(e)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:e,paddingInner:t}=this.options;return e>0?e:t}getPaddingOuter(){const{padding:e,paddingOuter:t}=this.options;return e>0?e:t}rescale(){super.rescale();const{align:e,domain:t,range:r,round:i,flex:a}=this.options,{adjustedRange:s,valueBandWidth:o,valueStep:l}=wF({align:e,range:r,round:i,flex:a,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:t});this.valueStep=l,this.valueBandWidth=o,this.adjustedRange=s}}var MF=function(n){(0,xe.ZT)(e,n);function e(t){var r=this,i=t.style,a=(0,xe._T)(t,["style"]);return r=n.call(this,ia({},{type:"column"},(0,xe.pi)({style:i},a)))||this,r.columnsGroup=new Ai({name:"columns"}),r.appendChild(r.columnsGroup),r.render(),r}return e.prototype.render=function(){var t=this.attributes,r=t.columns,i=t.x,a=t.y;this.columnsGroup.style.transform="translate(".concat(i,", ").concat(a,")"),dn(this.columnsGroup).selectAll(".column").data(r.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()})},e.prototype.update=function(t){this.attr(Ri({},this.attributes,t)),this.render()},e.prototype.clear=function(){this.removeChildren()},e}(Ur),AF=function(n){(0,xe.ZT)(e,n);function e(t){var r=this,i=t.style,a=(0,xe._T)(t,["style"]);return r=n.call(this,ia({},{type:"lines"},(0,xe.pi)({style:i},a)))||this,r.linesGroup=r.appendChild(new Ai),r.areasGroup=r.appendChild(new Ai),r.render(),r}return e.prototype.render=function(){var t=this.attributes,r=t.lines,i=t.areas,a=t.x,s=t.y;this.style.transform="translate(".concat(a,", ").concat(s,")"),r&&this.renderLines(r),i&&this.renderAreas(i)},e.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},e.prototype.update=function(t){this.attr(Ri({},this.attributes,t)),this.render()},e.prototype.renderLines=function(t){dn(this.linesGroup).selectAll(".line").data(t).join(function(r){return r.append("path").attr("className","line").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.attr(i)})},function(r){return r.remove()})},e.prototype.renderAreas=function(t){dn(this.linesGroup).selectAll(".area").data(t).join(function(r){return r.append("path").attr("className","area").each(function(i){this.attr(i)})},function(r){return r.each(function(i){this.style(i)})},function(r){return r.remove()})},e}(Ur);function TF(n,e,t,r){var i,a=[],s=!!r,o,l,u=[1/0,1/0],h=[-1/0,-1/0],v,E,D;if(s){i=(0,xe.CR)(r,2),u=i[0],h=i[1];for(var F=0,G=n.length;F<G;F+=1){var H=n[F];u=Sl(u,H),h=Pl(h,H)}}for(var F=0,K=n.length;F<K;F+=1){var H=n[F];if(F===0&&!t)D=H;else if(F===K-1&&!t)E=H,a.push(D),a.push(E);else{var q=[F?F-1:K-1,F-1][t?0:1];o=n[q],l=n[t?(F+1)%K:F+1];var te=[0,0];te=tp(l,o),te=io(te,e);var ue=Oc(H,o),le=Oc(H,l),he=ue+le;he!==0&&(ue/=he,le/=he);var ve=io(te,-ue),ge=io(te,le);E=Pc(H,ve),v=Pc(H,ge),v=Sl(v,Pl(l,H)),v=Pl(v,Sl(l,H)),ve=tp(v,H),ve=io(ve,-ue/le),E=Pc(H,ve),E=Sl(E,Pl(o,H)),E=Pl(E,Sl(o,H)),ge=tp(H,E),ge=io(ge,le/ue),v=Pc(H,ge),s&&(E=Pl(E,u),E=Sl(E,h),v=Pl(v,u),v=Sl(v,h)),a.push(D),a.push(E),D=v}}return t&&a.push(a.shift()),a}function SF(n,e,t){var r;e===void 0&&(e=!1),t===void 0&&(t=[[0,0],[1,1]]);for(var i=!!e,a=[],s=0,o=n.length;s<o;s+=2)a.push([n[s],n[s+1]]);for(var l=TF(a,.4,i,t),u=a.length,h=[],v,E,D,s=0;s<u-1;s+=1)v=l[s*2],E=l[s*2+1],D=a[s+1],h.push(["C",v[0],v[1],E[0],E[1],D[0],D[1]]);return i&&(v=l[u],E=l[u+1],r=(0,xe.CR)(a,1),D=r[0],h.push(["C",v[0],v[1],E[0],E[1],D[0],D[1]])),h}function PF(n,e){var t,r=e.x,i=e.y,a=(0,xe.CR)(i.getOptions().range||[0,0],2),s=a[0],o=a[1];return o>s&&(t=(0,xe.CR)([s,o],2),o=t[0],s=t[1]),n.map(function(l){var u=l.map(function(h,v){return[r.map(v),Qr(i.map(h),o,s)]});return u})}function Ic(n,e){e===void 0&&(e=!1);var t=e?n.length-1:0,r=n.map(function(i,a){return(0,xe.ev)([a===t?"M":"L"],(0,xe.CR)(i),!1)});return e?r.reverse():r}function Gd(n,e){if(e===void 0&&(e=!1),n.length<=2)return Ic(n);for(var t=[],r=n.length,i=0;i<r;i+=1){var a=e?n[r-i-1]:n[i];li(a,t.slice(-2))||t.push.apply(t,(0,xe.ev)([],(0,xe.CR)(a),!1))}var s=SF(t,!1);return e?s.unshift((0,xe.ev)(["M"],(0,xe.CR)(n[r-1]),!1)):s.unshift((0,xe.ev)(["M"],(0,xe.CR)(n[0]),!1)),s}function _p(n,e,t){var r=Ql(n);return r.push(["L",e,t],["L",0,t],["Z"]),r}function OF(n,e,t,r){return n.map(function(i){return _p(e?Gd(i):Ic(i),t,r)})}function CF(n,e,t){for(var r=[],i=n.length-1;i>=0;i-=1){var a=n[i],s=Ic(a),o=void 0;if(i===0)o=_p(s,e,t);else{var l=n[i-1],u=Ic(l,!0);u[0][0]="L",o=(0,xe.ev)((0,xe.ev)((0,xe.ev)([],(0,xe.CR)(s),!1),(0,xe.CR)(u),!1),[["Z"]],!1)}r.push(o)}return r}function DF(n,e,t){for(var r=[],i=n.length-1;i>=0;i-=1){var a=n[i],s=Gd(a),o=void 0;if(i===0)o=_p(s,e,t);else{var l=n[i-1],u=Gd(l,!0),h=a[0];u[0][0]="L",o=(0,xe.ev)((0,xe.ev)((0,xe.ev)([],(0,xe.CR)(s),!1),(0,xe.CR)(u),!1),[(0,xe.ev)(["M"],(0,xe.CR)(h),!1),["Z"]],!1)}r.push(o)}return r}var LF=function(n,e){if(Sa(n)){for(var t,r=1/0,i=0;i<n.length;i++){var a=n[i],s=fn(e)?e(a):a[e];s<r&&(t=a,r=s)}return t}},RF=function(n,e){if(Sa(n)){for(var t,r=-1/0,i=0;i<n.length;i++){var a=n[i],s=fn(e)?e(a):a[e];s>r&&(t=a,r=s)}return t}};function e2(n){return n.length===0?[0,0]:[Kc(LF(n,function(e){return Kc(e)||0})),Xc(RF(n,function(e){return Xc(e)||0}))]}function t2(n){for(var e=Ql(n),t=e[0].length,r=(0,xe.CR)([Array(t).fill(0),Array(t).fill(0)],2),i=r[0],a=r[1],s=0;s<e.length;s+=1)for(var o=e[s],l=0;l<t;l+=1)o[l]>=0?(o[l]+=i[l],i[l]=o[l]):(o[l]+=a[l],a[l]=o[l]);return e}var IF=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,{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(e.prototype,"rawData",{get:function(){var t=this.attributes.data;if(!t||(t==null?void 0:t.length)===0)return[[]];var r=Ql(t);return sn(r[0])?[r]:r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return this.attributes.isStack?t2(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"baseline",{get:function(){var t=this.scales.y,r=(0,xe.CR)(t.getOptions().domain||[0,0],2),i=r[0],a=r[1];return a<0?t.map(a):t.map(i<0?0:i)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"containerShape",{get:function(){var t=this.attributes,r=t.width,i=t.height;return{width:r,height:i}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"linesStyle",{get:function(){var t=this,r=this.attributes,i=r.type,a=r.isStack,s=r.smooth;if(i!=="line")throw new Error("linesStyle can only be used in line type");var o=Un(this.attributes,"area"),l=Un(this.attributes,"line"),u=this.containerShape.width,h=this.data;if(h[0].length===0)return{lines:[],areas:[]};var v=this.scales,E=v.x,D=v.y,F=PF(h,{type:"line",x:E,y:D}),G=[];if(o){var H=this.baseline;a?G=s?DF(F,u,H):CF(F,u,H):G=OF(F,s,u,H)}return{lines:F.map(function(K,q){return(0,xe.pi)({stroke:t.getColor(q),d:s?Gd(K):Ic(K)},l)}),areas:G.map(function(K,q){return(0,xe.pi)({d:K,fill:t.getColor(q)},o)})}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"columnsStyle",{get:function(){var t=this,r=Un(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 l=this.containerShape.height,u=this.rawData;if(!u)return{columns:[]};a&&(u=t2(u));var h=this.createScales(u),v=h.x,E=h.y,D=(0,xe.CR)(e2(u),2),F=D[0],G=D[1],H=new Rc({domain:[0,G-(F>0?0:F)],range:[0,l*o]}),K=v.getBandWidth(),q=this.rawData;return{columns:u.map(function(te,ue){return te.map(function(le,he){var ve=K/u.length,ge=function(){return{x:v.map(he)+ve*ue,y:le>=0?E.map(le):E.map(0),width:ve,height:H.map(Math.abs(le))}},Te=function(){return{x:v.map(he),y:E.map(le),width:K,height:H.map(q[ue][he])}};return(0,xe.pi)((0,xe.pi)({fill:t.getColor(ue)},r),a?Te():ge())})})}},enumerable:!1,configurable:!0}),e.prototype.render=function(t,r){n4(r,".container","rect").attr("className","container").node();var i=t.type,a=t.x,s=t.y,o="spark".concat(i),l=(0,xe.pi)({x:a,y:s},i==="line"?this.linesStyle:this.columnsStyle);dn(r).selectAll(".spark").data([i]).join(function(u){return u.append(function(h){return h==="line"?new AF({className:o,style:l}):new MF({className:o,style:l})}).attr("className","spark ".concat(o))},function(u){return u.update(l)},function(u){return u.remove()})},e.prototype.getColor=function(t){var r=this.attributes.color;return Sa(r)?r[t%r.length]:fn(r)?r.call(null,t):r},e.prototype.createScales=function(t){var r,i,a=this.attributes,s=a.type,o=a.scale,l=a.range,u=l===void 0?[]:l,h=a.spacing,v=this.containerShape,E=v.width,D=v.height,F=(0,xe.CR)(e2(t),2),G=F[0],H=F[1],K=new Rc({domain:[(r=u[0])!==null&&r!==void 0?r:G,(i=u[1])!==null&&i!==void 0?i:H],range:[D,D*(1-o)]});return s==="line"?{type:s,x:new Rc({domain:[0,t[0].length-1],range:[0,E]}),y:K}:{type:s,x:new yp({domain:t[0].map(function(q,te){return te}),range:[0,E],paddingInner:h,paddingOuter:h/2,align:.5}),y:K}},e.tag="sparkline",e}(ti),n2={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},r2={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},i2={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},Us=_s({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),zo=_s({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),NF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.render=function(t,r){var i=t.x,a=t.y,s=t.size,o=s===void 0?10:s,l=t.radius,u=l===void 0?o/4:l,h=t.orientation,v=(0,xe._T)(t,["x","y","size","radius","orientation"]),E=o,D=E*2.4,F=dn(r).maybeAppendByClassName(zo.iconRect,"rect").styles((0,xe.pi)((0,xe.pi)({},v),{width:E,height:D,radius:u,x:i-E/2,y:a-D/2,transformOrigin:"center"})),G=i+1/3*E-E/2,H=i+2/3*E-E/2,K=a+1/4*D-D/2,q=a+3/4*D-D/2;F.maybeAppendByClassName("".concat(zo.iconLine,"-1"),"line").styles((0,xe.pi)({x1:G,x2:G,y1:K,y2:q},v)),F.maybeAppendByClassName("".concat(zo.iconLine,"-2"),"line").styles((0,xe.pi)({x1:H,x2:H,y1:K,y2:q},v)),h==="vertical"&&(F.node().style.transform="rotate(90)")},e}(ti),BF=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,t,i2)||this}return e.prototype.renderLabel=function(t){var r=this,i=this.attributes,a=i.x,s=i.y,o=i.showLabel,l=Un(this.attributes,"label"),u=l.x,h=u===void 0?0:u,v=l.y,E=v===void 0?0:v,D=l.transform,F=l.transformOrigin,G=(0,xe._T)(l,["x","y","transform","transformOrigin"]),H=(0,xe.CR)(no(G,[]),2),K=H[0],q=H[1],te=dn(t).maybeAppendByClassName(zo.labelGroup,"g").styles(q),ue=(0,xe.pi)((0,xe.pi)({},r2),K),le=ue.text,he=(0,xe._T)(ue,["text"]);Ba(!!o,te,function(ve){r.label=ve.maybeAppendByClassName(zo.label,"text").styles((0,xe.pi)((0,xe.pi)({},he),{x:a+h,y:s+E,transform:D,transformOrigin:F,text:"".concat(le)})),r.label.on("mousedown",function(ge){ge.stopPropagation()}),r.label.on("touchstart",function(ge){ge.stopPropagation()})})},e.prototype.renderIcon=function(t){var r=this.attributes,i=r.x,a=r.y,s=r.orientation,o=r.type,l=(0,xe.pi)((0,xe.pi)({x:i,y:a,orientation:s},n2),Un(this.attributes,"icon")),u=this.attributes.iconShape,h=u===void 0?function(){return new NF({style:l})}:u,v=dn(t).maybeAppendByClassName(zo.iconGroup,"g");v.selectAll(zo.icon.class).data([h]).join(function(E){return E.append(typeof h=="string"?h:function(){return h(o)}).attr("className",zo.icon.name)},function(E){return E.update(l)},function(E){return E.remove()})},e.prototype.render=function(t,r){this.renderIcon(r),this.renderLabel(r)},e}(ti),kF=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,t,(0,xe.pi)((0,xe.pi)((0,xe.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},uu(i2,"handle")),uu(n2,"handleIcon")),uu(r2,"handleLabel")))||this;return r.range=[0,1],r.onDragStart=function(i){return function(a){a.stopPropagation(),r.target=i,r.prevPos=r.getOrientVal(jb(a));var s=r.availableSpace,o=s.x,l=s.y,u=r.getBBox(),h=u.x,v=u.y;r.selectionStartPos=r.getRatio(r.prevPos-r.getOrientVal([o,l])-r.getOrientVal([+h,+v])),r.selectionWidth=0,document.addEventListener("pointermove",r.onDragging),document.addEventListener("pointerup",r.onDragEnd)}},r.onDragging=function(i){var a=r.attributes,s=a.slidable,o=a.brushable,l=a.type;i.stopPropagation();var u=r.getOrientVal(jb(i)),h=u-r.prevPos;if(h){var v=r.getRatio(h);switch(r.target){case"start":s&&r.setValuesOffset(v);break;case"end":s&&r.setValuesOffset(0,v);break;case"selection":s&&r.setValuesOffset(v,v);break;case"track":if(!o)return;r.selectionWidth+=v,l==="range"?r.innerSetValues([r.selectionStartPos,r.selectionStartPos+r.selectionWidth].sort(),!0):r.innerSetValues([0,r.selectionStartPos+r.selectionWidth],!0);break;default:break}r.prevPos=u}},r.onDragEnd=function(){document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointermove",r.onDragging),document.removeEventListener("pointerup",r.onDragEnd),r.target="",r.updateHandlesPosition(!1)},r.onValueChange=function(i){var a=r.attributes,s=a.onChange,o=a.type,l=o==="range"?i:i[1],u=o==="range"?r.getValues():r.getValues()[1],h=new pi("valuechange",{detail:{oldValue:l,value:u}});r.dispatchEvent(h),s==null||s(u)},r.selectionStartPos=0,r.selectionWidth=0,r.prevPos=0,r.target="",r}return Object.defineProperty(e.prototype,"values",{get:function(){return this.attributes.values},set:function(t){this.attributes.values=this.clampValues(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sparklineStyle",{get:function(){var t=this.attributes.orientation;if(t!=="horizontal")return null;var r=Un(this.attributes,"sparkline");return(0,xe.pi)((0,xe.pi)({zIndex:0},this.availableSpace),r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shape",{get:function(){var t=this.attributes,r=t.trackLength,i=t.trackSize,a=(0,xe.CR)(this.getOrientVal([[r,i],[i,r]]),2),s=a[0],o=a[1];return{width:s,height:o}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableSpace",{get:function(){var t=this.attributes,r=t.x,i=t.y,a=t.padding,s=(0,xe.CR)(Wi(a),4),o=s[0],l=s[1],u=s[2],h=s[3],v=this.shape,E=v.width,D=v.height;return{x:h,y:o,width:E-(h+l),height:D-(o+u)}},enumerable:!1,configurable:!0}),e.prototype.getValues=function(){return this.values},e.prototype.setValues=function(t,r){t===void 0&&(t=[0,0]),r===void 0&&(r=!1),this.attributes.values=t;var i=r===!1?!1:this.attributes.animate;this.updateSelectionArea(i),this.updateHandlesPosition(i)},e.prototype.updateSelectionArea=function(t){var r=this.calcSelectionArea();this.foregroundGroup.selectAll(Us.selection.class).each(function(i,a){Es(this,r[a],t)})},e.prototype.updateHandlesPosition=function(t){this.attributes.showHandle&&(this.startHandle&&Es(this.startHandle,this.getHandleStyle("start"),t),this.endHandle&&Es(this.endHandle,this.getHandleStyle("end"),t))},e.prototype.innerSetValues=function(t,r){t===void 0&&(t=[0,0]),r===void 0&&(r=!1);var i=this.values,a=this.clampValues(t);this.attributes.values=a,this.setValues(a),r&&this.onValueChange(i)},e.prototype.renderTrack=function(t){var r=this.attributes,i=r.x,a=r.y,s=Un(this.attributes,"track");this.trackShape=dn(t).maybeAppendByClassName(Us.track,"rect").styles((0,xe.pi)((0,xe.pi)({x:i,y:a},this.shape),s))},e.prototype.renderBrushArea=function(t){var r=this.attributes,i=r.x,a=r.y,s=r.brushable;this.brushArea=dn(t).maybeAppendByClassName(Us.brushArea,"rect").styles((0,xe.pi)({x:i,y:a,fill:"transparent",cursor:s?"crosshair":"default"},this.shape))},e.prototype.renderSparkline=function(t){var r=this,i=this.attributes,a=i.x,s=i.y,o=i.orientation,l=dn(t).maybeAppendByClassName(Us.sparklineGroup,"g");Ba(o==="horizontal",l,function(u){var h=(0,xe.pi)((0,xe.pi)({},r.sparklineStyle),{x:a,y:s});u.maybeAppendByClassName(Us.sparkline,function(){return new IF({style:h})}).update(h)})},e.prototype.renderHandles=function(){var t=this,r,i=this.attributes,a=i.showHandle,s=i.type,o=s==="range"?["start","end"]:["end"],l=a?o:[],u=this;(r=this.foregroundGroup)===null||r===void 0||r.selectAll(Us.handle.class).data(l.map(function(h){return{type:h}}),function(h){return h.type}).join(function(h){return h.append(function(v){var E=v.type;return new BF({style:t.getHandleStyle(E)})}).each(function(v){var E=v.type;this.attr("class","".concat(Us.handle.name," ").concat(E,"-handle"));var D="".concat(E,"Handle");u[D]=this,this.addEventListener("pointerdown",u.onDragStart(E))})},function(h){return h.each(function(v){var E=v.type;this.update(u.getHandleStyle(E))})},function(h){return h.each(function(v){var E=v.type,D="".concat(E,"Handle");u[D]=void 0}).remove()})},e.prototype.renderSelection=function(t){var r=this.attributes,i=r.x,a=r.y,s=r.type,o=r.selectionType;this.foregroundGroup=dn(t).maybeAppendByClassName(Us.foreground,"g");var l=Un(this.attributes,"selection"),u=function(v){return v.style("visibility",function(E){return E.show?"visible":"hidden"}).style("cursor",function(E){return o==="select"?"grab":o==="invert"?"crosshair":"default"}).styles((0,xe.pi)((0,xe.pi)({},l),{transform:"translate(".concat(i,", ").concat(a,")")}))},h=this;this.foregroundGroup.selectAll(Us.selection.class).data(s==="value"?[]:this.calcSelectionArea().map(function(v,E){return{style:(0,xe.pi)({},v),index:E,show:o==="select"?E===1:E!==1}}),function(v){return v.index}).join(function(v){return v.append("rect").attr("className",Us.selection.name).call(u).each(function(E,D){var F=this;D===1?(h.selectionShape=dn(this),this.on("pointerdown",function(G){F.attr("cursor","grabbing"),h.onDragStart("selection")(G)}),h.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),h.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),h.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",h.onDragStart("track"))})},function(v){return v.call(u)},function(v){return v.remove()}),this.updateSelectionArea(!1),this.renderHandles()},e.prototype.render=function(t,r){this.renderTrack(r),this.renderSparkline(r),this.renderBrushArea(r),this.renderSelection(r)},e.prototype.clampValues=function(t,r){var i;r===void 0&&(r=4);var a=(0,xe.CR)(this.range,2),s=a[0],o=a[1],l=(0,xe.CR)(this.getValues().map(function(H){return up(H,r)}),2),u=l[0],h=l[1],v=Array.isArray(t)?t:[u,t!=null?t:h],E=(0,xe.CR)((v||[u,h]).map(function(H){return up(H,r)}),2),D=E[0],F=E[1];if(this.attributes.type==="value")return[0,Qr(F,s,o)];D>F&&(i=(0,xe.CR)([F,D],2),D=i[0],F=i[1]);var G=F-D;return G>o-s?[s,o]:D<s?u===s&&h===F?[s,F]:[s,G+s]:F>o?h===o&&u===D?[D,o]:[o-G,o]:[D,F]},e.prototype.calcSelectionArea=function(t){var r=(0,xe.CR)(this.clampValues(t),2),i=r[0],a=r[1],s=this.availableSpace,o=s.x,l=s.y,u=s.width,h=s.height;return this.getOrientVal([[{y:l,height:h,x:o,width:i*u},{y:l,height:h,x:i*u+o,width:(a-i)*u},{y:l,height:h,x:a*u,width:(1-a)*u}],[{x:o,width:u,y:l,height:i*h},{x:o,width:u,y:i*h+l,height:(a-i)*h},{x:o,width:u,y:a*h,height:(1-a)*h}]])},e.prototype.calcHandlePosition=function(t){var r=this.attributes.handleIconOffset,i=this.availableSpace,a=i.x,s=i.y,o=i.width,l=i.height,u=(0,xe.CR)(this.clampValues(),2),h=u[0],v=u[1],E=t==="start"?-r:r,D=(t==="start"?h:v)*this.getOrientVal([o,l])+E;return{x:a+this.getOrientVal([D,o/2]),y:s+this.getOrientVal([l/2,D])}},e.prototype.inferTextStyle=function(t){var r=this.attributes.orientation;return r==="horizontal"?{}:t==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:t==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},e.prototype.calcHandleText=function(t){var r,i=this.attributes,a=i.type,s=i.orientation,o=i.formatter,l=i.autoFitLabel,u=Un(this.attributes,"handle"),h=Un(u,"label"),v=u.spacing,E=this.getHandleSize(),D=this.clampValues(),F=t==="start"?D[0]:D[1],G=o(F),H=new V0({style:(0,xe.pi)((0,xe.pi)((0,xe.pi)({},h),this.inferTextStyle(t)),{text:G})}),K=H.getBBox(),q=K.width,te=K.height;if(H.destroy(),!l){if(a==="value")return{text:G,x:0,y:-te-v};var ue=v+E+(s==="horizontal"?q/2:0);return r={text:G},r[s==="horizontal"?"x":"y"]=t==="start"?-ue:ue,r}var le=0,he=0,ve=this.availableSpace,ge=ve.width,Te=ve.height,Oe=this.calcSelectionArea()[1],Ne=Oe.x,ze=Oe.y,Xe=Oe.width,Je=Oe.height,st=v+E;if(s==="horizontal"){var Et=st+q/2;if(t==="start"){var mt=Ne-st-q;le=mt>0?-Et:Et}else{var ct=ge-Ne-Xe-st>q;le=ct?Et:-Et}}else{var ht=st,At=te+st;t==="start"?he=ze-E>te?-At:ht:he=Te-(ze+Je)-E>te?At:-ht}return{x:le,y:he,text:G}},e.prototype.getHandleLabelStyle=function(t){var r=Un(this.attributes,"handleLabel");return(0,xe.pi)((0,xe.pi)((0,xe.pi)({},r),this.calcHandleText(t)),this.inferTextStyle(t))},e.prototype.getHandleIconStyle=function(){var t=this.attributes.handleIconShape,r=Un(this.attributes,"handleIcon"),i=this.getOrientVal(["ew-resize","ns-resize"]),a=this.getHandleSize();return(0,xe.pi)({cursor:i,shape:t,size:a},r)},e.prototype.getHandleStyle=function(t){var r=this.attributes,i=r.x,a=r.y,s=r.showLabel,o=r.showLabelOnInteraction,l=r.orientation,u=this.calcHandlePosition(t),h=u.x,v=u.y,E=this.calcHandleText(t),D=s;return!s&&o&&(this.target?D=!0:D=!1),(0,xe.pi)((0,xe.pi)((0,xe.pi)({},uu(this.getHandleIconStyle(),"icon")),uu((0,xe.pi)((0,xe.pi)({},this.getHandleLabelStyle(t)),E),"label")),{transform:"translate(".concat(h+i,", ").concat(v+a,")"),orientation:l,showLabel:D,type:t,zIndex:3})},e.prototype.getHandleSize=function(){var t=this.attributes,r=t.handleIconSize,i=t.width,a=t.height;return r||Math.floor((this.getOrientVal([+a,+i])+4)/2.4)},e.prototype.getOrientVal=function(t){var r=(0,xe.CR)(t,2),i=r[0],a=r[1],s=this.attributes.orientation;return s==="horizontal"?i:a},e.prototype.setValuesOffset=function(t,r,i){r===void 0&&(r=0),i===void 0&&(i=!1);var a=this.attributes.type,s=(0,xe.CR)(this.getValues(),2),o=s[0],l=s[1],u=a==="range"?t:0,h=[o+u,l+r].sort();i?this.setValues(h):this.innerSetValues(h,!0)},e.prototype.getRatio=function(t){var r=this.availableSpace,i=r.width,a=r.height;return t/this.getOrientVal([i,a])},e.prototype.dispatchCustomEvent=function(t,r,i){var a=this;t.on(r,function(s){s.stopPropagation(),a.dispatchEvent(new pi(i,{detail:s}))})},e.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var t=this.brushArea;this.dispatchCustomEvent(t,"click","trackClick"),this.dispatchCustomEvent(t,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(t,"pointerleave","trackMouseleave"),t.on("pointerdown",this.onDragStart("track"))},e.prototype.onScroll=function(t){var r=this.attributes.scrollable;if(r){var i=t.deltaX,a=t.deltaY,s=a||i,o=this.getRatio(s);this.setValuesOffset(o,o,!0)}},e.tag="slider",e}(ti),FF={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(n){return n.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Ep=_s({background:"background",labelGroup:"label-group",label:"label"},"indicator"),zF=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,t,FF)||this;return r.point=[0,0],r.group=r.appendChild(new Ai({})),r.isMutationObserved=!0,r}return e.prototype.renderBackground=function(){if(this.label){var t=this.attributes,r=t.position,i=t.padding,a=(0,xe.CR)(Wi(i),4),s=a[0],o=a[1],l=a[2],u=a[3],h=this.label.node().getLocalBounds(),v=h.min,E=h.max,D=new Qi(v[0]-u,v[1]-s,E[0]+o-v[0]+u,E[1]+l-v[1]+s),F=this.getPath(r,D),G=Un(this.attributes,"background");this.background=dn(this.group).maybeAppendByClassName(Ep.background,"path").styles((0,xe.pi)((0,xe.pi)({},G),{d:F})),this.group.appendChild(this.label.node())}},e.prototype.renderLabel=function(){var t=this.attributes,r=t.formatter,i=t.labelText,a=Un(this.attributes,"label"),s=(0,xe.CR)(no(a),2),o=s[0],l=s[1],u=o.text,h=(0,xe._T)(o,["text"]);if(this.label=dn(this.group).maybeAppendByClassName(Ep.labelGroup,"g").styles(l),!!i){var v=this.label.maybeAppendByClassName(Ep.label,function(){return ro(r(i))}).style("text",r(i).toString());v.selectAll("text").styles(h)}},e.prototype.adjustLayout=function(){var t=(0,xe.CR)(this.point,2),r=t[0],i=t[1],a=this.attributes,s=a.x,o=a.y;this.group.attr("transform","translate(".concat(s-r,", ").concat(o-i,")"))},e.prototype.getPath=function(t,r){var i=this.attributes.radius,a=r.x,s=r.y,o=r.width,l=r.height,u=[["M",a+i,s],["L",a+o-i,s],["A",i,i,0,0,1,a+o,s+i],["L",a+o,s+l-i],["A",i,i,0,0,1,a+o-i,s+l],["L",a+i,s+l],["A",i,i,0,0,1,a,s+l-i],["L",a,s+i],["A",i,i,0,0,1,a+i,s],["Z"]],h={top:4,right:6,bottom:0,left:2},v=h[t],E=this.createCorner([u[v].slice(-2),u[v+1].slice(-2)]);return u.splice.apply(u,(0,xe.ev)([v+1,1],(0,xe.CR)(E),!1)),u[0][0]="M",u},e.prototype.createCorner=function(t,r){r===void 0&&(r=10);var i=.8,a=k4.apply(void 0,(0,xe.ev)([],(0,xe.CR)(t),!1)),s=(0,xe.CR)(t,2),o=(0,xe.CR)(s[0],2),l=o[0],u=o[1],h=(0,xe.CR)(s[1],2),v=h[0],E=h[1],D=(0,xe.CR)(a?[v-l,[l,v]]:[E-u,[u,E]],2),F=D[0],G=(0,xe.CR)(D[1],2),H=G[0],K=G[1],q=F/2,te=F/Math.abs(F),ue=r*te,le=ue/2,he=ue*Math.sqrt(3)/2*i,ve=(0,xe.CR)([H,H+q-le,H+q,H+q+le,K],5),ge=ve[0],Te=ve[1],Oe=ve[2],Ne=ve[3],ze=ve[4];return a?(this.point=[Oe,u-he],[["L",ge,u],["L",Te,u],["L",Oe,u-he],["L",Ne,u],["L",ze,u]]):(this.point=[l+he,Oe],[["L",l,ge],["L",l,Te],["L",l+he,Oe],["L",l,Ne],["L",l,ze]])},e.prototype.applyVisibility=function(){var t=this.attributes.visibility;t==="hidden"?ys(this):Ac(this)},e.prototype.bindEvents=function(){this.label.on(Xn.BOUNDS_CHANGED,this.renderBackground)},e.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},e}(ti),UF=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},e.defaultOptions,t))||this;return r.hoverColor="#f5f5f5",r.selectedColor="#e6f7ff",r.background=r.appendChild(new ki({})),r.label=r.background.appendChild(new Ai({})),r}return Object.defineProperty(e.prototype,"padding",{get:function(){return Wi(this.style.padding)},enumerable:!1,configurable:!0}),e.prototype.renderLabel=function(){var t=this.style,r=t.label,i=t.value,a=Un(this.attributes,"label");dn(this.label).maybeAppend(".label",function(){return ro(r)}).attr("className","label").styles(a),this.label.attr("__data__",i)},e.prototype.renderBackground=function(){var t=this.label.getBBox(),r=(0,xe.CR)(this.padding,4),i=r[0],a=r[1],s=r[2],o=r[3],l=t.width,u=t.height,h=l+o+a,v=u+i+s,E=Un(this.attributes,"background"),D=this.style,F=D.width,G=F===void 0?0:F,H=D.height,K=H===void 0?0:H,q=D.selected;this.background.attr((0,xe.pi)((0,xe.pi)({},E),{width:Math.max(h,G),height:Math.max(v,K),fill:q?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(o,", ").concat((v-u)/2,")")})},e.prototype.render=function(){this.renderLabel(),this.renderBackground()},e.prototype.bindEvents=function(){var t=this;this.addEventListener("pointerenter",function(){t.style.selected||t.background.attr("fill",t.hoverColor)}),this.addEventListener("pointerleave",function(){t.style.selected||t.background.attr("fill",t.style.backgroundFill)});var r=this;this.addEventListener("click",function(){var i=t.style,a=i.label,s=i.value,o=i.onClick;o==null||o(s,{label:a,value:s},r)})},e.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},e}(ti),WF=function(n){(0,xe.ZT)(e,n);function e(t){var r,i,a=n.call(this,Ri({},e.defaultOptions,t))||this;a.currentValue=(r=e.defaultOptions.style)===null||r===void 0?void 0:r.defaultValue,a.isPointerInSelect=!1,a.select=a.appendChild(new ki({className:"select",style:{cursor:"pointer",width:0,height:0}})),a.dropdown=a.appendChild(new ki({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 e.prototype.setValue=function(t){this.currentValue=t,this.render()},e.prototype.getValue=function(){return this.currentValue},Object.defineProperty(e.prototype,"dropdownPadding",{get:function(){return Wi(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),e.prototype.renderSelect=function(){var t=this,r,i=this.style,a=i.x,s=i.y,o=i.width,l=i.height,u=i.bordered,h=i.showDropdownIcon,v=Un(this.attributes,"select"),E=Un(this.attributes,"placeholder");this.select.attr((0,xe.pi)((0,xe.pi)({x:a,y:s,width:o,height:l},v),{fill:"#fff",strokeWidth:u?1:0}));var D=this.dropdownPadding,F=10;h&&dn(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+l/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var G=(r=this.style.options)===null||r===void 0?void 0:r.find(function(te){return te.value===t.currentValue}),H=(0,xe.pi)({x:a+D[3]},E);dn(this.select).selectAll(".placeholder").data(G?[]:[1]).join(function(te){return te.append("text").attr("className","placeholder").styles(H).style("y",function(){var ue=this.getBBox();return s+(l-ue.height)/2})},function(te){return te.styles(H)},function(te){return te.remove()});var K=Un(this.attributes,"optionLabel"),q=(0,xe.pi)({x:a+D[3]},K);dn(this.select).selectAll(".value").data(G?[G]:[]).join(function(te){return te.append(function(ue){return ro(ue.label)}).attr("className","value").styles(q).style("y",function(){var ue=this.getBBox();return s+(l-ue.height)/2})},function(te){return te.styles(q)},function(te){return te.remove()})},e.prototype.renderDropdown=function(){var t=this,r,i,a=this.style,s=a.x,o=a.y,l=a.width,u=a.height,h=a.options,v=a.onSelect,E=a.open,D=Un(this.attributes,"dropdown"),F=Un(this.attributes,"option"),G=this.dropdownPadding;dn(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(h,function(q){return q.value}).join(function(q){return q.append(function(te){return new UF({className:"dropdown-item",style:(0,xe.pi)((0,xe.pi)((0,xe.pi)({},te),F),{width:l-G[1]-G[3],selected:te.value===t.currentValue,onClick:function(ue,le,he){t.setValue(ue),v==null||v(ue,le,he),t.dispatchEvent(new pi("change",{detail:{value:ue,option:le,item:he}})),ys(t.dropdown)}})})}).each(function(te,ue){var le,he=(le=this.parentNode)===null||le===void 0?void 0:le.children,ve=he.reduce(function(ge,Te,Oe){return Oe<ue&&(ge+=Te.getBBox().height),ge},0);this.attr("transform","translate(".concat(G[3],", ").concat(G[0]+ve,")"))})},function(q){return q.update(function(te){return{selected:te.value===t.currentValue}})},function(q){return q.remove()});var H=(i=(r=this.dropdown.getElementsByClassName("dropdown-container"))===null||r===void 0?void 0:r[0])===null||i===void 0?void 0:i.getBBox(),K=D.spacing;this.dropdown.attr((0,xe.pi)({transform:"translate(".concat(s,", ").concat(o+u+K,")"),width:H.width+G[1]+G[3],height:H.height+G[0]+G[2]},D)),!E&&ys(this.dropdown)},e.prototype.render=function(){this.renderSelect(),this.renderDropdown()},e.prototype.bindEvents=function(){var t=this;this.addEventListener("click",function(r){r.stopPropagation()}),this.select.addEventListener("click",function(){t.dropdown.style.visibility==="visible"?ys(t.dropdown):Ac(t.dropdown)}),this.addEventListener("pointerenter",function(){t.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){t.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){t.isPointerInSelect||ys(t.dropdown)})},e.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"}},e}(ti),xs=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},{style:{backgroundOpacity:e.backgroundOpacities.default}},e.defaultOptions,t))||this;return r.showBackground=!0,r.background=r.appendChild(new ki({})),r.icon=r.appendChild(new Ai({})),r}return Object.defineProperty(e.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"padding",{get:function(){return Wi(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"iconSize",{get:function(){var t=this.attributes.size,r=(0,xe.CR)(this.padding,4),i=r[0],a=r[1],s=r[2],o=r[3];return Math.max(t-Math.max(o+a,i+s),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),e.prototype.renderBackground=function(){var t=this.attributes,r=t.x,i=t.y,a=t.size,s=a/2,o=Un(this.attributes,"background");this.background.attr((0,xe.pi)({x:r-s,y:i-s,width:a,height:a},o))},e.prototype.showIndicator=function(){if(this.label){var t=this.attributes.size,r=this.background.getBBox(),i=r.x,a=r.y;this.indicator.update({x:i+t/2,y:a-5,labelText:this.label,visibility:"visible"})}},e.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},e.prototype.connectedCallback=function(){var t;n.prototype.connectedCallback.call(this);var r=this.attributes.size,i=this.background.getBBox(),a=i.x,s=i.y,o=(t=this.ownerDocument)===null||t===void 0?void 0:t.defaultView;o&&(this.indicator=o.appendChild(new zF({style:{x:a+r/2,y:s-r/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},e.prototype.disconnectedCallback=function(){this.indicator.destroy()},e.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},e.prototype.bindEvents=function(){var t=this,r=this.attributes.onClick;if(this.addEventListener("click",function(){r==null||r(t)}),this.showBackground){var i=function(){return t.background.attr({opacity:e.backgroundOpacities.default})},a=function(){return t.background.attr({opacity:e.backgroundOpacities.hover})},s=function(){return t.background.attr({opacity:e.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){a(),t.showIndicator()}),this.addEventListener("pointerleave",function(){i(),t.hideIndicator()}),this.addEventListener("pointerdown",function(){s()}),this.addEventListener("pointerup",function(){i()})}},e.tag="IconBase",e.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},e.backgroundOpacities={default:0,hover:.8,active:1},e}(ti),Nc=function(n,e){return e===void 0&&(e="#565758"),new Oa({style:{fill:e,d:"M ".concat(n,",").concat(n," L -").concat(n,",0 L ").concat(n,",-").concat(n," Z"),transformOrigin:"center"}})},GF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return e.prototype.arcPath=function(t,r,i){var a=(0,xe.CR)([i,i],2),s=a[0],o=a[1],l=function(G){return[t+i*Math.cos(G),r+i*Math.sin(G)]},u=(0,xe.CR)(l(-5/4*Math.PI),2),h=u[0],v=u[1],E=(0,xe.CR)(l(1/4*Math.PI),2),D=E[0],F=E[1];return"M".concat(h,",").concat(v,",A").concat(s,",").concat(o,",0,1,1,").concat(D,",").concat(F)},Object.defineProperty(e.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this.iconSize,o=this.lineWidth,l=o+.5;dn(this.icon).maybeAppend(".reset","path").styles({stroke:a,lineWidth:o,d:this.arcPath(r,i,s/2-o),markerStart:Nc(l,a)})},e}(xs),HF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this.iconSize,o=s/2,l=s/2/Math.pow(3,.5),u=[[r,i],[r,i-l],[r-o,i],[r,i+l],[r,i],[r+o,i-l],[r+o,i+l],[r,i]];dn(this.icon).maybeAppend(".backward","polygon").styles({points:u,fill:a})},e}(xs),jF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this.iconSize,o=s/2,l=s/2/Math.pow(3,.5),u=[[r,i],[r,i-l],[r+o,i],[r,i+l],[r,i],[r-o,i-l],[r-o,i+l],[r,i]];dn(this.icon).maybeAppend(".forward","polygon").styles({points:u,fill:a})},e}(xs),VF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this.iconSize,o=s/3*Math.pow(3,.5)*.8,l=[[r+o,i],[r-o/2,i-s/2*.8],[r-o/2,i+s/2*.8],[r+o,i]];dn(this.icon).maybeAppend(".play","polygon").styles({points:l,fill:a})},e}(xs),ZF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this.iconSize,o=s/3,l=[[r-o,i-s/2],[r-o,i+s/2],[r-o/2,i+s/2],[r-o/2,i-s/2],[r-o,i-s/2],[r+o/2,i-s/2],[r+o/2,i+s/2],[r+o,i+s/2],[r+o,i-s/2]];dn(this.icon).maybeAppend(".pause","polygon").styles({points:l,fill:a})},e}(xs),KF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this,o=s.iconSize,l=s.lineWidth,u=l;dn(this.icon).maybeAppend(".left-line","line").styles({x1:r-o/2,y1:i-o/2,x2:r-o/2,y2:i+o/2,stroke:a,lineWidth:l}),dn(this.icon).maybeAppend(".right-line","line").styles({x1:r+o/2,y1:i-o/2,x2:r+o/2,y2:i+o/2,stroke:a,lineWidth:l}),dn(this.icon).maybeAppend(".left-arrow","line").styles({x1:r,y1:i,x2:r-o/2+u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Nc(l*2,a)}),dn(this.icon).maybeAppend(".right-arrow","line").styles({x1:r,y1:i,x2:r+o/2-u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Nc(l*2,a)})},e}(xs),XF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this,o=s.iconSize,l=s.lineWidth;dn(this.icon).maybeAppend(".line","line").styles({x1:r,y1:i-o/2,x2:r,y2:i+o/2,stroke:a,lineWidth:l});var u=l;dn(this.icon).maybeAppend(".left-arrow","line").styles({x1:r-o/2-u*2,y1:i,x2:r-u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Nc(l*2,a)}),dn(this.icon).maybeAppend(".right-arrow","line").styles({x1:r+o/2+u*2,y1:i,x2:r+u*2,y2:i,stroke:a,lineWidth:l,markerEnd:Nc(l*2,a)})},e}(xs),a2=function(n){return[[-n/2,-n/2],[-n/2,n/2],[n/2,n/2]]},YF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this,o=s.iconSize,l=s.lineWidth,u=l,h=(o-u*2-l)/4,v=(o-u*2-l)/2,E=(0,xe.CR)([r-o/2+u,i+o/2-u*2],2),D=E[0],F=E[1];dn(this.icon).maybeAppend(".coordinate","polyline").styles({points:a2(o).map(function(G){var H=(0,xe.CR)(G,2),K=H[0],q=H[1];return[K+r,q+i]}),stroke:a,lineWidth:l}),dn(this.icon).maybeAppend(".line","polyline").styles({points:[[D,F],[D+h,F-v],[D+h*2,F],[D+h*4,F-v*2]],stroke:a,lineWidth:l})},e}(xs),QF=function(n){(0,xe.ZT)(e,n);function e(){return n!==null&&n.apply(this,arguments)||this}return Object.defineProperty(e.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.data,r=this.attributes,i=r.x,a=r.y,s=r.color,o=this,l=o.iconSize,u=o.lineWidth,h=u,v=(l-h)/t.length,E=(l-h*2)/4,D=(0,xe.CR)([i-l/2+h*2,a+l/2-h],2),F=D[0],G=D[1];dn(this.icon).maybeAppend(".coordinate","polyline").styles({points:a2(l).map(function(H){var K=(0,xe.CR)(H,2),q=K[0],te=K[1];return[q+i,te+a]}),stroke:s,lineWidth:u}),dn(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(H,K){return{value:H,index:K}})).join(function(H){return H.append("line").attr("className","column").style("x1",function(K){var q=K.index;return F+v*q}).style("y1",G).style("x2",function(K){var q=K.index;return F+v*q}).style("y2",function(K){var q=K.value;return G-E*q}).styles({y1:G,stroke:s,lineWidth:u})})},e}(xs),JF=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},{style:{color:"#d8d9d9"}},t))||this;return r.showBackground=!1,r}return e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.color,s=this,o=s.iconSize,l=s.lineWidth;dn(this.icon).maybeAppend(".split","line").styles({x1:r,y1:i-o/2,x2:r,y2:i+o/2,stroke:a,lineWidth:l})},e}(xs),xp=function(n){(0,xe.ZT)(e,n);function e(){var t=n.apply(this,(0,xe.ev)([],(0,xe.CR)(arguments),!1))||this;return t.showBackground=!1,t}return Object.defineProperty(e.prototype,"padding",{get:function(){return Wi(0)},enumerable:!1,configurable:!0}),e.prototype.renderIcon=function(){var t=this.iconSize,r=this.attributes,i=r.x,a=r.y,s=r.speed,o=s===void 0?1:s,l=N0(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),u=Qr(t,20,1/0),h=20,v=(0,xe.pi)((0,xe.pi)({},l),{x:i-u/2,y:a-h/2,width:u,height:h,defaultValue:o,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:t/5,placeholderFontSize:t/2,optionPadding:0,optionLabelFontSize:t/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});dn(this.icon).maybeAppend(".speed",function(){return new WF({style:v})}).attr("className","speed").each(function(){this.update(v)})},e.tag="SpeedSelect",e}(xs),bp=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,t)||this;return r.icon=r.appendChild(new Ai({})),r.currentType=r.attributes.type,r}return e.prototype.getType=function(){return this.currentType},e.prototype.render=function(){var t=this,r=this.attributes,i=r.onChange,a=(0,xe._T)(r,["onChange"]);dn(this.icon).selectAll(".icon").data([this.currentType]).join(function(s){return s.append(function(o){var l,u=(l=t.toggles.find(function(h){var v=(0,xe.CR)(h,1),E=v[0];return E===o}))===null||l===void 0?void 0:l[1];if(!u)throw new Error("Invalid type: ".concat(o));return new u({})}).attr("className","icon").styles(a,!1).update({})},function(s){return s.styles({restStyles:a}).update({})},function(s){return s.remove()})},e.prototype.bindEvents=function(){var t=this,r=this.attributes.onChange;this.addEventListener("click",function(i){i.preventDefault(),i.stopPropagation();var a=(t.toggles.findIndex(function(o){var l=(0,xe.CR)(o,1),u=l[0];return u===t.currentType})+1)%t.toggles.length,s=t.toggles[a][0];r==null||r(t.currentType),t.currentType=s,t.render()})},e.tag="ToggleIcon",e}(ti),wp=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},{style:{type:"play"}},t))||this;return r.toggles=[["play",VF],["pause",ZF]],r}return e}(bp),Mp=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},{style:{type:"range"}},t))||this;return r.toggles=[["range",KF],["value",XF]],r}return e}(bp),Ap=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},{style:{type:"column"}},t))||this;return r.toggles=[["line",YF],["column",QF]],r}return e}(bp),qF={reset:GF,speed:xp,backward:HF,playPause:wp,forward:jF,selectionType:Mp,chartType:Ap,split:JF},$F=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},e.defaultOptions,t))||this;return r.background=r.appendChild(new ki({})),r.functions=r.appendChild(new Ai({})),r}return Object.defineProperty(e.prototype,"padding",{get:function(){return Wi(this.attributes.padding)},enumerable:!1,configurable:!0}),e.prototype.renderBackground=function(){var t=this.style,r=t.x,i=t.y,a=t.width,s=t.height,o=Un(this.attributes,"background");this.background.attr((0,xe.pi)({x:r,y:i,width:a,height:s},o))},e.prototype.renderFunctions=function(){var t=this,r,i=this.attributes,a=i.functions,s=i.iconSize,o=i.iconSpacing,l=i.x,u=i.y,h=i.width,v=i.height,E=i.align,D=(0,xe.CR)(this.padding,4),F=D[1],G=D[3],H=a.reduce(function(te,ue){return te.length&&ue.length?te.concat.apply(te,(0,xe.ev)(["split"],(0,xe.CR)(ue),!1)):te.concat.apply(te,(0,xe.ev)([],(0,xe.CR)(ue),!1))},[]),K=H.length*(s+o)-o,q={left:G+s/2,center:(h-K)/2+s/2,right:h-K-G-F+s/2}[E]||0;(r=this.speedSelect)===null||r===void 0||r.destroy(),this.functions.removeChildren(),H.forEach(function(te,ue){var le,he=qF[te],ve={x:l+ue*(s+o)+q,y:u+v/2,size:s};if(he===xp?(ve.speed=t.attributes.speed,ve.onSelect=function(Te){return t.handleFunctionChange(te,{value:Te})}):[wp,Mp,Ap].includes(he)?(ve.onChange=function(Te){return t.handleFunctionChange(te,{value:Te})},he===wp&&(ve.type=t.attributes.state==="play"?"pause":"play"),he===Mp&&(ve.type=t.attributes.selectionType==="range"?"value":"range"),he===Ap&&(ve.type=t.attributes.chartType==="line"?"column":"line")):ve.onClick=function(){return t.handleFunctionChange(te,{value:te})},he===xp){var ge=(le=t.ownerDocument)===null||le===void 0?void 0:le.defaultView;ge&&(t.speedSelect=new he({style:(0,xe.pi)((0,xe.pi)({},ve),{zIndex:100})}),ge.appendChild(t.speedSelect))}else t.functions.appendChild(new he({style:ve}))})},e.prototype.disconnectedCallback=function(){var t;n.prototype.disconnectedCallback.call(this),(t=this.speedSelect)===null||t===void 0||t.destroy()},e.prototype.render=function(){this.renderBackground(),this.renderFunctions()},e.prototype.handleFunctionChange=function(t,r){var i=this.attributes.onChange;i==null||i(t,r)},e.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"]]}},e}(ti),e8=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},e.defaultOptions,t))||this;return r.bindEvents(),r}return e.prototype.bindEvents=function(){var t=this;this.addEventListener("mouseenter",function(){t.attr("lineWidth",Math.ceil(+(t.style.r||0)/2))}),this.addEventListener("mouseleave",function(){t.attr("lineWidth",0)})},e.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},e}(Zs),t8=function(n){(0,xe.ZT)(e,n);function e(t){return n.call(this,Ri({},e.defaultOptions,t))||this}return e.prototype.renderBackground=function(){var t=this.attributes,r=t.x,i=t.y,a=t.width,s=t.height,o=Un(this.attributes,"background");dn(this).maybeAppend("background","rect").attr("className","background").styles((0,xe.pi)({x:r-a/2,y:i-s/2,width:a,height:s},o))},e.prototype.renderIcon=function(){var t=this.attributes,r=t.x,i=t.y,a=t.iconSize,s=Un(this.attributes,"icon"),o=1,l=a/2;dn(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,xe.pi)({x1:r-o,y1:i-l,x2:r-o,y2:i+l},s)),dn(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,xe.pi)({x1:r+o,y1:i-l,x2:r+o,y2:i+l},s))},e.prototype.renderBorder=function(){var t=this.attributes,r=t.x,i=t.y,a=t.width,s=t.height,o=t.type,l=Un(this.attributes,"border"),u=o==="start"?+a/2:-a/2;dn(this).maybeAppend("border","line").attr("className","border").styles((0,xe.pi)({x1:u+r,y1:i-s/2,x2:u+r,y2:i+s/2},l))},e.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},e.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}},e}(ti);function n8(n,e){return typeof n=="number"?s2(n):r8(n,e)}function r8(n,e){var t=new Date(n);switch(e){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(t.getHours())&&t.getMinutes()===0?ua(t,`HH:mm
|
|
|
YYYY-MM-DD`):ua(t,"HH:mm");case"half-day":return t.getHours()<12?`AM
|
|
|
`.concat(ua(t,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(t.getDate())?ua(t,`DD
|
|
|
YYYY-MM`):ua(t,"DD");case"week":return t.getDate()<=7?ua(t,`DD
|
|
|
YYYY-MM`):ua(t,"DD");case"month":return[0,6].includes(t.getMonth())?ua(t,`MM\u6708
|
|
|
YYYY`):ua(t,"MM\u6708");case"season":return[0].includes(t.getMonth())?ua(t,`MM\u6708
|
|
|
YYYY`):ua(t,"MM\u6708");case"year":return ua(t,"YYYY");default:return ua(t,"YYYY-MM-DD HH:mm")}}function s2(n){var e=String(Math.floor(n/3600)).padStart(2,"0"),t=String(Math.floor(n%3600/60)).padStart(2,"0"),r=String(Math.floor(n%60)).padStart(2,"0");return n<3600?"".concat(t,":").concat(r):"".concat(e,":").concat(t,":").concat(r)}var i8=function(n){(0,xe.ZT)(e,n);function e(t){var r=n.call(this,Ri({},e.defaultOptions,t))||this;r.axis=r.appendChild(new tF({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),r.timeline=r.appendChild(new kF({style:{onChange:function(v){r.handleSliderChange(v)}}})),r.controller=r.appendChild(new $F({})),r.states={},r.handleSliderChange=function(v){var E=function(){var D=r.states.values;return Array.isArray(D)?(0,xe.ev)([],(0,xe.CR)(D),!1):D}();r.setBySliderValues(v),r.dispatchOnChange(E)};var i=r.attributes,a=i.selectionType,s=i.chartType,o=i.speed,l=i.state,u=i.playMode,h=i.values;return r.states={chartType:s,playMode:u,selectionType:a,speed:o,state:l},r.setByTimebarValues(h),r}return Object.defineProperty(e.prototype,"data",{get:function(){var t=this.attributes.data,r=function(i,a){return i.time<a.time?-1:i.time>a.time?1:0};return t.sort(r)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"space",{get:function(){var t=this.attributes,r=t.x,i=t.y,a=t.width,s=t.height,o=t.type,l=t.controllerHeight,u=Qr(+s-l,0,+s),h=new Qi(r,i+ +s-l,+a,l),v,E=0;o==="chart"?(E=35,v=new Qi(r,i+u-E,+a,E)):v=new Qi;var D=o==="time"?10:u,F=new Qi(r,i+(o==="time"?u:u-D),+a,D-E);return{axisBBox:v,controllerBBox:h,timelineBBox:F}},enumerable:!1,configurable:!0}),e.prototype.setBySliderValues=function(t){var r,i,a=this.data,s=(0,xe.CR)(Array.isArray(t)?t:[0,t],2),o=s[0],l=s[1],u=a.length,h=a[Math.floor(o*u)],v=a[Math.ceil(l*u)-(Array.isArray(t)?0:1)];this.states.values=[(r=h==null?void 0:h.time)!==null&&r!==void 0?r:a[0].time,(i=v==null?void 0:v.time)!==null&&i!==void 0?i:1/0]},e.prototype.setByTimebarValues=function(t){var r,i,a,s=this.data,o=(0,xe.CR)(Array.isArray(t)?t:[void 0,t],2),l=o[0],u=o[1],h=s.find(function(E){var D=E.time;return D===l}),v=s.find(function(E){var D=E.time;return D===u});this.states.values=[(r=h==null?void 0:h.time)!==null&&r!==void 0?r:(i=s[0])===null||i===void 0?void 0:i.time,(a=v==null?void 0:v.time)!==null&&a!==void 0?a:1/0]},e.prototype.setByIndex=function(t){var r,i,a,s,o=this.data,l=(0,xe.CR)(t,2),u=l[0],h=l[1];this.states.values=[(i=(r=o[u])===null||r===void 0?void 0:r.time)!==null&&i!==void 0?i:o[0].time,(s=(a=this.data[h])===null||a===void 0?void 0:a.time)!==null&&s!==void 0?s:1/0]},Object.defineProperty(e.prototype,"sliderValues",{get:function(){var t=this.states,r=t.values,i=t.selectionType,a=(0,xe.CR)(Array.isArray(r)?r:[void 0,r],2),s=a[0],o=a[1],l=this.data,u=l.length,h=i==="value",v=function(){var D=l.findIndex(function(F){var G=F.time;return G===s});return h?0:D>-1?D/u:0},E=function(){if(o===1/0)return 1;var D=l.findIndex(function(F){var G=F.time;return G===o});return D>-1?D/u:h?.5:1};return[v(),E()]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){var t=this.states,r=t.values,i=t.selectionType,a=(0,xe.CR)(Array.isArray(r)?r:[this.data[0].time,r],2),s=a[0],o=a[1];return i==="value"?o:[s,o]},enumerable:!1,configurable:!0}),e.prototype.getDatumByRatio=function(t){var r=this.data,i=r.length,a=Math.floor(t*(i-1));return r[a]},Object.defineProperty(e.prototype,"chartHandleIconShape",{get:function(){var t=this.states.selectionType,r=this.space.timelineBBox.height;return t==="range"?function(i){return new t8({style:{type:i,height:r,iconSize:r/6}})}:function(){return new al({style:{x1:0,y1:-r/2,x2:0,y2:r/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),e.prototype.getChartStyle=function(t){var r=this,i=t.x,a=t.y,s=t.width,o=t.height,l=this.states,u=l.selectionType,h=l.chartType,v=this.data,E=this.attributes,D=E.type,F=E.labelFormatter,G=Un(this.attributes,"chart"),H=G.type,K=(0,xe._T)(G,["type"]),q=u==="range";if(D==="time")return(0,xe.pi)({handleIconShape:function(){return new e8({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:q?-15:0,autoFitLabel:q,handleSpacing:q?-15:0,trackFill:"#edeeef",trackLength:s,trackOpacity:.5,trackRadius:o/2,trackSize:o/2,type:u,values:this.sliderValues,formatter:function(le){if(F)return F(le);var he=r.getDatumByRatio(le).time;return typeof he=="number"?s2(he):ua(he,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},K);var te=u==="range"?5:0,ue=v.map(function(le){var he=le.value;return he});return(0,xe.pi)({handleIconOffset:te,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:ue,sparklineType:h,sparklineScale:.8,trackLength:s,trackSize:o,type:u,values:this.sliderValues,transform:"translate(".concat(i,", ").concat(a,")"),zIndex:1},K)},e.prototype.renderChart=function(t){t===void 0&&(t=this.space.timelineBBox),this.timeline.update(this.getChartStyle(t))},e.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},e.prototype.getAxisStyle=function(t){var r=this.data,i=this.attributes,a=i.interval,s=i.labelFormatter,o=Un(this.attributes,"axis"),l=t.x,u=t.y,h=t.width,v=(0,xe.ev)((0,xe.ev)([],(0,xe.CR)(r),!1),[{time:0}],!1).map(function(D,F,G){var H=D.time;return{label:"".concat(H),value:F/(G.length-1),time:H}}),E=(0,xe.pi)({startPos:[l,u],endPos:[l+h,u],data:v,labelFilter:function(D,F){return F<v.length-1},labelFormatter:function(D){var F=D.time;return s?s(F):n8(F,a)}},o);return E},e.prototype.renderAxis=function(t){t===void 0&&(t=this.space.axisBBox);var r=this.attributes.type;r==="chart"&&this.axis.update(this.getAxisStyle(t))},e.prototype.renderController=function(t){t===void 0&&(t=this.space.controllerBBox);var r=this.attributes.type,i=this.states,a=i.state,s=i.speed,o=i.selectionType,l=i.chartType,u=Un(this.attributes,"controller"),h=this,v=(0,xe.pi)((0,xe.pi)((0,xe.pi)({},t),{iconSize:20,speed:s,state:a,selectionType:o,chartType:l,onChange:function(E,D){var F=D.value;switch(E){case"reset":h.internalReset();break;case"speed":h.handleSpeedChange(F);break;case"backward":h.internalBackward();break;case"playPause":F==="play"?h.internalPlay():h.internalPause();break;case"forward":h.internalForward();break;case"selectionType":h.handleSelectionTypeChange(F);break;case"chartType":h.handleChartTypeChange(F);break;default:break}}}),u);r==="time"&&(v.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(v)},e.prototype.dispatchOnChange=function(t){var r=this.data,i=this.attributes.onChange,a=this.states,s=a.values,o=a.selectionType,l=(0,xe.CR)(s,2),u=l[0],h=l[1],v=h===1/0?r.at(-1).time:h,E=o==="range"?[u,v]:v,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};(!t||!D(t,E))&&(i==null||i(o==="range"?[u,v]:v))},e.prototype.internalReset=function(t){var r,i,a=this.states.selectionType;this.internalPause(),this.setBySliderValues(a==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),t||((i=(r=this.attributes)===null||r===void 0?void 0:r.onReset)===null||i===void 0||i.call(r),this.dispatchOnChange())},e.prototype.reset=function(){this.internalReset()},e.prototype.moveSelection=function(t,r){var i=this.data,a=i.length,s=this.states,o=s.values,l=s.selectionType,u=s.playMode,h=(0,xe.CR)(o,2),v=h[0],E=h[1],D=i.findIndex(function(te){var ue=te.time;return ue===v}),F=i.findIndex(function(te){var ue=te.time;return ue===E});F===-1&&(F=a);var G=t==="backward"?-1:1,H;l==="range"?u==="acc"?(H=[D,F+G],G===-1&&D===F&&(H=[D,a])):H=[D+G,F+G]:H=[D,F+G];var K=function(te){var ue=(0,xe.CR)(te.sort(function(ge,Te){return ge-Te}),2),le=ue[0],he=ue[1],ve=function(ge){return Qr(ge,0,a)};return he>a?l==="value"?[0,0]:u==="acc"?[ve(le),ve(le)]:[0,ve(he-le)]:le<0?u==="acc"?[0,ve(he)]:[ve(le+a-he),a]:[ve(le),ve(he)]},q=K(H);return this.setByIndex(q),this.updateSelection(),q},e.prototype.internalBackward=function(t){var r,i,a=this.moveSelection("backward",t);return t||((i=(r=this.attributes)===null||r===void 0?void 0:r.onBackward)===null||i===void 0||i.call(r),this.dispatchOnChange()),a},e.prototype.backward=function(){this.internalBackward()},e.prototype.internalPlay=function(t){var r=this,i,a,s=this.data,o=this.attributes.loop,l=this.states.speed,u=l===void 0?1:l;this.playInterval=window.setInterval(function(){var h=r.internalForward();h[1]===s.length&&!o&&(r.internalPause(),r.renderController())},1e3/u),this.states.state="play",!t&&((a=(i=this.attributes)===null||i===void 0?void 0:i.onPlay)===null||a===void 0||a.call(i))},e.prototype.play=function(){this.internalPlay()},e.prototype.internalPause=function(t){var r,i;clearInterval(this.playInterval),this.states.state="pause",!t&&((i=(r=this.attributes)===null||r===void 0?void 0:r.onPause)===null||i===void 0||i.call(r))},e.prototype.pause=function(){this.internalPause()},e.prototype.internalForward=function(t){var r,i,a=this.moveSelection("forward",t);return t||((i=(r=this.attributes)===null||r===void 0?void 0:r.onForward)===null||i===void 0||i.call(r),this.dispatchOnChange()),a},e.prototype.forward=function(){this.internalForward()},e.prototype.handleSpeedChange=function(t){var r,i;this.states.speed=t;var a=this.states.state;a==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(i=(r=this.attributes)===null||r===void 0?void 0:r.onSpeedChange)===null||i===void 0||i.call(r,t)},e.prototype.handleSelectionTypeChange=function(t){var r,i;this.states.selectionType=t,this.renderChart(),(i=(r=this.attributes)===null||r===void 0?void 0:r.onSelectionTypeChange)===null||i===void 0||i.call(r,t)},e.prototype.handleChartTypeChange=function(t){var r,i;this.states.chartType=t,this.renderChart(),(i=(r=this.attributes)===null||r===void 0?void 0:r.onChartTypeChange)===null||i===void 0||i.call(r,t)},e.prototype.render=function(){var t=this.space,r=t.axisBBox,i=t.controllerBBox,a=t.timelineBBox;this.renderController(i),this.renderAxis(r),this.renderChart(a),this.states.state==="play"&&this.internalPlay()},e.prototype.destroy=function(){n.prototype.destroy.call(this),this.internalPause(!0)},e.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"}},e}(ti);function a8(n){return n instanceof Date}var s8=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})},o8=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};const l8=["timestamp","time","date","datetime"];class Hd extends Ui{get padding(){return cs(this.options.padding)}constructor(e,t){super(e,Object.assign({},Hd.defaultOptions,t)),this.backup(),this.upsertTimebar()}play(){var e;(e=this.timebar)===null||e===void 0||e.play()}pause(){var e;(e=this.timebar)===null||e===void 0||e.pause()}forward(){var e;(e=this.timebar)===null||e===void 0||e.forward()}backward(){var e;(e=this.timebar)===null||e===void 0||e.backward()}reset(){var e;(e=this.timebar)===null||e===void 0||e.reset()}update(e){super.update(e),this.backup(),this.upsertTimebar()}backup(){this.originalData=o2(this.context.graph.getData())}upsertTimebar(){const{canvas:e}=this.context,t=this.options,{onChange:r,timebarType:i,data:a,x:s,y:o,width:l,height:u,mode:h}=t,v=o8(t,["onChange","timebarType","data","x","y","width","height","mode"]),E=e.getSize(),[D]=this.padding;this.upsertCanvas().ready.then(()=>{var F;const G=Object.assign(Object.assign({x:E[0]/2-l/2,y:D,onChange:H=>{const K=(Sa(H)?H:[H,H]).map(q=>a8(q)?q.getTime():q);this.options.mode==="modify"?this.filterElements(K):this.hiddenElements(K),r==null||r(K)}},v),{data:a.map(H=>sn(H)?{time:H,value:0}:H),width:l,height:u,type:i});this.timebar?this.timebar.update(G):(this.timebar=new i8({style:G}),(F=this.canvas)===null||F===void 0||F.appendChild(this.timebar))})}upsertCanvas(){if(this.canvas)return this.canvas;const{className:e,height:t,position:r}=this.options,i=this.context.canvas,[a]=i.getSize(),[s,,o]=this.padding,[l,u]=J0({width:a,height:t+s+o,graphCanvas:i,className:"timebar",placement:r});return this.container=l,e&&l.classList.add(e),this.canvas=u,this.canvas}filterElements(e){return s8(this,void 0,void 0,function*(){var t;if(!this.originalData)return;const{elementTypes:r,getTime:i}=this.options,{graph:a,element:s}=this.context,o=o2(this.originalData);r.forEach(u=>{const h=`${u}s`;o[h]=(this.originalData[h]||[]).filter(v=>{const E=i(v);return!!l2(E,e)})});const l=[...o.nodes,...o.combos].map(u=>yt(u));o.edges=o.edges.filter(u=>{const h=u.source,v=u.target;return l.includes(h)&&l.includes(v)}),a.setData(o),yield(t=s.draw({animation:!1,silence:!0}))===null||t===void 0?void 0:t.finished})}hiddenElements(e){const{graph:t}=this.context,{elementTypes:r,getTime:i}=this.options,a=[],s=[];r.forEach(o=>{var l;const u=`${o}s`;(((l=this.originalData)===null||l===void 0?void 0:l[u])||[]).forEach(v=>{const E=yt(v),D=i(v);l2(D,e)?s.push(E):a.push(E)})}),t.hideElement(a,!1),t.showElement(s,!1)}destroy(){var e,t,r;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(e=this.timebar)===null||e===void 0||e.destroy(),(t=this.canvas)===null||t===void 0||t.destroy(),(r=this.container)===null||r===void 0||r.remove(),this.originalData=void 0,this.container=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}Hd.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:n=>u8(n,l8,void 0),loop:!1};const o2=n=>{const{nodes:e=[],edges:t=[],combos:r=[]}=n;return{nodes:[...e],edges:[...t],combos:[...r]}},l2=(n,e)=>{if(sn(e))return n===e;const[t,r]=e;return n>=t&&n<=r},u8=(n,e,t)=>{var r;for(let i=0;i<e.length;i++){const a=e[i],s=(r=n.data)===null||r===void 0?void 0:r[a];if(s)return s}return t};function c8(n){const e={top:"unset",right:"unset",bottom:"unset",left:"unset"};return n.split("-").forEach(r=>{e[r]="8px"}),e.flexDirection=n.startsWith("top")||n.startsWith("bottom")?"row":"column",e}const h8=`
|
|
|
.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;
|
|
|
}
|
|
|
`,f8=`
|
|
|
<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 u2=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class jd extends Ui{constructor(e,t){super(e,Object.assign({},jd.defaultOptions,t)),this.$element=lu("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 r=this.context.canvas.getContainer();this.$element.style.display="flex",r.appendChild(this.$element),B0("g6-toolbar-css","style",{},h8,document.head),B0("g6-toolbar-svgicon","div",{display:"none"},f8),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return u2(this,void 0,void 0,function*(){t.update.call(this,e);const{className:r,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${r||""}`,Object.assign(this.$element.style,a,c8(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return u2(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(t=>{var r;return`
|
|
|
<div class="g6-toolbar-item" value="${t.value}" title="${(r=t.title)!==null&&r!==void 0?r:""}">
|
|
|
<svg aria-hidden="true" focusable="false">
|
|
|
<use xlink:href="#${t.id}"></use>
|
|
|
</svg>
|
|
|
</div>`}).join("")})}}jd.defaultOptions={position:"top-left"};function Tp(n){var e=document.createElement("div");e.innerHTML=n;var t=e.childNodes[0];return t&&e.contains(t)&&e.removeChild(t),t}function d8(n,e){return!n||!e?n:n.replace(/\\?\{([^{}]+)\}/g,function(t,r){return t.charAt(0)==="\\"?t.slice(1):e[r]===void 0?"":e[r]})}var v8=d8,c2=function(n,e){if(e==null){n.innerHTML="";return}n.replaceChildren?Array.isArray(e)?n.replaceChildren.apply(n,(0,xe.ev)([],(0,xe.CR)(e),!1)):n.replaceChildren(e):(n.innerHTML="",Array.isArray(e)?e.forEach(function(t){return n.appendChild(t)}):n.appendChild(e))};function Sp(n){return n===void 0&&(n=""),{CONTAINER:"".concat(n,"tooltip"),TITLE:"".concat(n,"tooltip-title"),LIST:"".concat(n,"tooltip-list"),LIST_ITEM:"".concat(n,"tooltip-list-item"),NAME:"".concat(n,"tooltip-list-item-name"),MARKER:"".concat(n,"tooltip-list-item-marker"),NAME_LABEL:"".concat(n,"tooltip-list-item-name-label"),VALUE:"".concat(n,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(n,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(n,"tooltip-crosshair-y")}}var h2={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function g8(n){var e;n===void 0&&(n="");var t=Sp(n);return e={},e[".".concat(t.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"},e[".".concat(t.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},e[".".concat(t.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},e[".".concat(t.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},e[".".concat(t.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},e[".".concat(t.NAME)]={display:"flex","align-items":"center","max-width":"216px"},e[".".concat(t.NAME_LABEL)]=(0,xe.pi)({flex:1},h2),e[".".concat(t.VALUE)]=(0,xe.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},h2),e[".".concat(t.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e[".".concat(t.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},e}var p8=function(n){(0,xe.ZT)(e,n);function e(t){var r=this,i,a,s=(a=(i=t.style)===null||i===void 0?void 0:i.template)===null||a===void 0?void 0:a.prefixCls,o=Sp(s);return r=n.call(this,t,{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:g8(s)})||this,r.timestamp=-1,r.prevCustomContentKey=r.attributes.contentKey,r.initShape(),r.render(r.attributes,r),r}return Object.defineProperty(e.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),e.prototype.getContainer=function(){return this.element},Object.defineProperty(e.prototype,"elementSize",{get:function(){var t=this.element.offsetWidth,r=this.element.offsetHeight;return{width:t,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"HTMLTooltipItemsElements",{get:function(){var t=this.attributes,r=t.data,i=t.template;return r.map(function(a,s){var o=a.name,l=o===void 0?"":o,u=a.color,h=u===void 0?"black":u,v=a.index,E=(0,xe._T)(a,["name","color","index"]),D=(0,xe.pi)({name:l,color:h,index:v!=null?v:s},E);return Tp(v8(i.item,D))})},enumerable:!1,configurable:!0}),e.prototype.render=function(t,r){this.renderHTMLTooltipElement(),this.updatePosition()},e.prototype.destroy=function(){var t;(t=this.element)===null||t===void 0||t.remove(),n.prototype.destroy.call(this)},e.prototype.show=function(t,r){var i=this;if(t!==void 0&&r!==void 0){var a=this.element.style.visibility==="hidden",s=function(){i.attributes.x=t!=null?t:i.attributes.x,i.attributes.y=r!=null?r:i.attributes.y,i.updatePosition()};a?this.closeTransition(s):s()}this.element.style.visibility="visible"},e.prototype.hide=function(t,r){t===void 0&&(t=0),r===void 0&&(r=0);var i=this.attributes.enterable;i&&this.isCursorEntered(t,r)||(this.element.style.visibility="hidden")},e.prototype.initShape=function(){var t=this.attributes.template;this.element=Tp(t.container),this.id&&this.element.setAttribute("id",this.id)},e.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var t=this.attributes.content;t&&(typeof t=="string"?this.element.innerHTML=t:c2(this.element,t))}},e.prototype.renderHTMLTooltipElement=function(){var t,r,i=this.attributes,a=i.template,s=i.title,o=i.enterable,l=i.style,u=i.content,h=Sp(a.prefixCls),v=this.element;if(this.element.style.pointerEvents=o?"auto":"none",u)this.renderCustomContent();else{s?(v.innerHTML=a.title,v.getElementsByClassName(h.TITLE)[0].innerHTML=s):(r=(t=v.getElementsByClassName(h.TITLE))===null||t===void 0?void 0:t[0])===null||r===void 0||r.remove();var E=this.HTMLTooltipItemsElements,D=document.createElement("ul");D.className=h.LIST,c2(D,E);var F=this.element.querySelector(".".concat(h.LIST));F?F.replaceWith(D):v.appendChild(D)}q5(v,l)},e.prototype.getRelativeOffsetFromCursor=function(t){var r=this.attributes,i=r.position,a=r.offset,s=t||i,o=s.split("-"),l={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},u=this.elementSize,h=u.width,v=u.height,E=[-h/2,-v/2];return o.forEach(function(D){var F=(0,xe.CR)(E,2),G=F[0],H=F[1],K=(0,xe.CR)(l[D],2),q=K[0],te=K[1];E=[G+(h/2+a[0])*q,H+(v/2+a[1])*te]}),E},e.prototype.setOffsetPosition=function(t){var r=(0,xe.CR)(t,2),i=r[0],a=r[1],s=this.attributes,o=s.x,l=o===void 0?0:o,u=s.y,h=u===void 0?0:u,v=s.container,E=v.x,D=v.y;this.element.style.left="".concat(+l+E+i,"px"),this.element.style.top="".concat(+h+D+a,"px")},e.prototype.updatePosition=function(){var t=this.attributes.showDelay,r=t===void 0?60:t,i=Date.now();this.timestamp>0&&i-this.timestamp<r||(this.timestamp=i,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},e.prototype.autoPosition=function(t){var r=(0,xe.CR)(t,2),i=r[0],a=r[1],s=this.attributes,o=s.x,l=s.y,u=s.bounding,h=s.position;if(!u)return[i,a];var v=this.element,E=v.offsetWidth,D=v.offsetHeight,F=(0,xe.CR)([+o+i,+l+a],2),G=F[0],H=F[1],K={left:"right",right:"left",top:"bottom",bottom:"top"},q=u.x,te=u.y,ue=u.width,le=u.height,he={left:G<q,right:G+E>q+ue,top:H<te,bottom:H+D>te+le},ve=[];h.split("-").forEach(function(Te){he[Te]?ve.push(K[Te]):ve.push(Te)});var ge=ve.join("-");return this.getRelativeOffsetFromCursor(ge)},e.prototype.isCursorEntered=function(t,r){if(this.element){var i=this.element.getBoundingClientRect(),a=i.x,s=i.y,o=i.width,l=i.height;return new Qi(a,s,o,l).isPointIn(t,r)}return!1},e.prototype.closeTransition=function(t){var r=this,i=this.element.style.transition;this.element.style.transition="none",t(),setTimeout(function(){r.element.style.transition=i},10)},e.tag="tooltip",e}(ti),f2=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class Vd extends Ui{constructor(e,t){super(e,Object.assign({},Vd.defaultOptions,t)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=(r,i)=>{const{enable:a}=this.options;return typeof a=="function"?a(r,i):a},this.onClick=r=>{const{target:{id:i}}=r;this.currentTarget===i?this.hide(r):this.show(r)},this.onPointerMove=r=>{const{target:i}=r;!this.currentTarget||i.id===this.currentTarget||this.show(r)},this.onPointerLeave=r=>{this.hide(r)},this.onCanvasMove=r=>{this.hide(r)},this.onPointerEnter=r=>{this.show(r)},this.showById=r=>f2(this,void 0,void 0,function*(){const i={target:{id:r}};yield this.show(i)}),this.getElementData=(r,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([r]);case"edge":return a.getEdgeData([r]);case"combo":return a.getComboData([r]);default:return[]}},this.show=r=>f2(this,void 0,void 0,function*(){var i,a;const{client:s,target:{id:o}}=r;if(Df(r.target))return;const l=this.context.graph.getElementType(o),{getContent:u,title:h}=this.options,v=this.getElementData(o,l);if(!this.tooltipElement||!this.isEnable(r,v))return;let E={};if(u){if(E.content=yield u(r,v),!E.content)return}else{const G=this.context.graph.getElementRenderStyle(o),H=l==="node"?G.fill:G.stroke;E={title:h||l,data:v.map(K=>({name:"ID",value:K.id||`${K.source} -> ${K.target}`,color:H}))}}this.currentTarget=o;let D,F;if(s)D=s.x,F=s.y;else{const G=aa(v,"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"}}}),E))}),this.hide=r=>{var i,a,s,o,l;if(!r){(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:u,y:h}}=r;(l=(o=this.options).onOpenChange)===null||l===void 0||l.call(o,!1),this.tooltipElement.hide(u,h),this.currentTarget=null},this.initTooltip=()=>{var r;const i=new p8({className:"tooltip",style:this.tooltipStyleProps});return(r=this.container)===null||r===void 0||r.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:pointerenter":this.onPointerEnter,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerenter":this.onPointerEnter,"edge:pointermove":this.onPointerMove,"combo:pointerenter":this.onPointerEnter,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(e){var t;this.unbindEvents(),super.update(e),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:e}=this.context,t=e.getContainer();t&&(this.container=t,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:e}=this.context,t=this.getEvents();Object.keys(t).forEach(r=>{e.off(r,t[r])})}bindEvents(){const{graph:e}=this.context,t=this.getEvents();Object.keys(t).forEach(r=>{e.on(r,t[r])})}get tooltipStyleProps(){const{canvas:e}=this.context,{center:t}=e.getBounds(),r=e.getContainer(),{top:i,left:a}=r.getBoundingClientRect(),{style:s,position:o,enterable:l,container:u={x:-a,y:-i},title:h,offset:v}=this.options,[E,D]=t,[F,G]=e.getSize();return{x:E,y:D,container:u,title:h,bounding:{x:0,y:0,width:F,height:G},position:o,enterable:l,offset:v,style:s}}destroy(){var e;this.unbindEvents(),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}Vd.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var d2=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};let du;function v2(n,e){return du||(du=document.createElement("canvas")),du.width=n,du.height=e,du.getContext("2d").clearRect(0,0,n,e),du}function m8(n,e,t,r){return d2(this,void 0,void 0,function*(){const i=v2(n,e),a=i.getContext("2d"),{rotate:s,opacity:o,textFill:l,textFontSize:u,textFontFamily:h,textFontVariant:v,textFontWeight:E,textAlign:D,textBaseline:F}=r;return a.textAlign=D,a.textBaseline=F,a.translate(n/2,e/2),a.font=`${u}px ${h} ${v} ${E}`,s&&a.rotate(s),o&&(a.globalAlpha=o),l&&(a.fillStyle=l,a.fillText(`${t}`,0,0)),i.toDataURL()})}function y8(n,e,t,r){return d2(this,void 0,void 0,function*(){const i=v2(n,e),a=i.getContext("2d"),{rotate:s,opacity:o}=r;s&&a.rotate(s),o&&(a.globalAlpha=o);const l=new Image;return l.crossOrigin="anonymous",l.src=t,new Promise(u=>{l.onload=function(){const h=n>l.width?(n-l.width)/2:0,v=e>l.height?(e-l.height)/2:0;a.drawImage(l,0,0,l.width,l.height,h,v,n-h*2,e-v*2),u(i.toDataURL())}})})}var _8=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})},E8=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class Zd extends Ui{constructor(e,t){super(e,Object.assign({},Zd.defaultOptions,t)),this.$element=lu("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(t)}update(e){const t=Object.create(null,{update:{get:()=>super.update}});return _8(this,void 0,void 0,function*(){t.update.call(this,e);const r=this.options,{width:i,height:a,text:s,imageURL:o}=r,l=E8(r,["width","height","text","imageURL"]);Object.keys(l).forEach(h=>{h.startsWith("background")&&(this.$element.style[h]=e[h])});const u=o?yield y8(i,a,o,l):yield m8(i,a,s,l);this.$element.style.backgroundImage=`url(${u})`})}destroy(){super.destroy(),this.$element.remove()}}Zd.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const x8=["#7E92B5","#F4664A","#FFBE3A"],b8={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},w8={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function g2(n){const{bgColor:e,textColor:t,nodeColor:r,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:s=.15,nodeHaloStrokeOpacitySelected:o=.25,nodeOpacityDisabled:l=.06,nodeIconOpacityInactive:u=.85,nodeOpacityInactive:h=.25,nodeBadgePalette:v=x8,nodePaletteOptions:E=b8,edgeColor:D,edgeColorDisabled:F,edgePaletteOptions:G=w8,comboColor:H,comboColorDisabled:K,comboStroke:q,comboStrokeDisabled:te,edgeColorInactive:ue}=n;return{background:e,node:{palette:E,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:v,fill:r,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:e,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:t,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:r,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:h,donutOpacity:h,fillOpacity:h,iconOpacity:u,labelFill:t,labelFillOpacity:h,strokeOpacity:h},disabled:{badgeBackgroundOpacity:.25,donutOpacity:l,fill:i,fillOpacity:l,iconFill:i,iconOpacity:.25,labelFill:t,labelFillOpacity:.25,strokeOpacity:l}},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,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:e,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:t,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:ue,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:e,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:H,halo:!1,haloLineWidth:12,haloStroke:q,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:e,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:t,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:q},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:K,fillOpacity:.25,labelOpacity:.25,stroke:te,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 M8=g2({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"}),A8=g2({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 Uo extends Rg{beforeDraw(e,t){return e}afterLayout(e,t){}}class T8 extends Uo{beforeDraw(e){const{model:t}=this.context,r=e.add.combos,i=a=>{const s=[];return a.forEach((o,l)=>{const h=t.getAncestorsData(l,"combo").map(v=>yt(v)).reverse();s.push([l,o,h.length])}),new Map(s.sort(([,,o],[,,l])=>l-o).map(([o,l])=>[o,l]))};return e.add.combos=i(r),e.update.combos=i(e.update.combos),e}}function Fa(n,e,t,r,i){const a=yt(r),s=`${t}s`,o=i?r:n.add[s].get(a)||n.update[s].get(a)||n.remove[s].get(a)||r;Object.entries(n).forEach(([l,u])=>{e===l?u[s].set(a,o):u[s].delete(a)})}function Kd(n,e){return Object.keys(n).every(t=>n[t]===e[t])}class S8 extends Uo{beforeDraw(e,t){if(t.stage==="visibility"||!this.context.model.model.hasTreeStructure(Dr))return e;const{model:r}=this.context,{add:i,update:a}=e,s=[...e.update.combos.entries(),...e.add.combos.entries()];for(;s.length;){const[o,l]=s.pop();if(ba(l)){const u=r.getDescendantsData(o),h=u.map(yt),{internal:v,external:E}=r0(h,D=>r.getRelatedEdgesData(D));u.forEach(D=>{const F=yt(D),G=s.findIndex(([K])=>K===F);G!==-1&&s.splice(G,1);const H=r.getElementType(F);Fa(e,"remove",H,D)}),v.forEach(D=>Fa(e,"remove","edge",D)),E.forEach(D=>{var F;const G=yt(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 u=r.getChildrenData(o),h=u.map(yt),{edges:v}=r0(h,E=>r.getRelatedEdgesData(E));[...u,...v].forEach(E=>{var D;const F=yt(E),G=r.getElementType(F);((D=this.context.element)===null||D===void 0?void 0:D.getElement(F))?Fa(e,"update",G,E):Fa(e,"add",G,E),G==="combo"&&s.push([F,E])})}}return e}}const p2=(n,e,t,r)=>{const i=`${t}s`,a=yt(r);!n.add[i].has(a)&&!n.update[i].has(a)&&n[e][i].set(yt(r),r)};class P8 extends Uo{getElement(e){return this.context.element.getElement(e)}handleExpand(e,t){if(p2(t,"add","node",e),ba(e))return;const r=yt(e);p2(t,"add","node",e),this.context.model.getRelatedEdgesData(r,"out").forEach(s=>{Fa(t,"add","edge",s)}),this.context.model.getChildrenData(r).forEach(s=>{this.handleExpand(s,t)})}beforeDraw(e){const{graph:t,model:r}=this.context;if(!r.model.hasTreeStructure(Da))return e;const{add:{nodes:i,edges:a},update:{nodes:s}}=e,o=new Map,l=new Map;i.forEach((h,v)=>{ba(h)&&o.set(v,h)}),a.forEach(h=>{if(t.getElementType(h.source)!=="node")return;const v=t.getNodeData(h.source);ba(v)&&o.set(h.source,v)}),s.forEach((h,v)=>{const E=this.getElement(v);if(!E)return;const D=E.attributes.collapsed;ba(h)?D||o.set(v,h):D&&l.set(v,h)});const u=new Set;return o.forEach((h,v)=>{r.getDescendantsData(v).forEach(D=>{const F=yt(D);if(u.has(F))return;Fa(e,"remove","node",D),r.getRelatedEdgesData(F).forEach(H=>{Fa(e,"remove","edge",H)}),u.add(F)})}),l.forEach((h,v)=>{if(r.getAncestorsData(v,Da).some(ba)){Fa(e,"remove","node",h);return}this.handleExpand(h,e)}),e}}const Pp=new WeakMap;function hG(n,e,t){Pp.has(n)||Pp.set(n,{});const r=Pp.get(n);if(!r[e])return r[e]=t,!0;const i=r[e];return m2(i,t)?!1:(r[e]=t,!0)}const m2=(n,e,t=2)=>{if(typeof n!="object"||typeof e!="object")return n===e;const r=Object.keys(n),i=Object.keys(e);if(r.length!==i.length)return!1;for(const a of r){const s=n[a],o=e[a];if(t>1&&typeof s=="object"&&typeof o=="object"){if(!m2(s,o,t-1))return!1}else if(s!==o)return!1}return!0};function O8(n,e,t,r=!1){const i=pg[n][e];!r&&i?i!==t&&xa.warn(`The extension ${e} of ${n} has been registered before.`):Object.assign(pg[n],{[e]:t})}var y2=function(){function n(e){(0,b.Z)(this,n),this.dragndropPluginOptions=e}return(0,U.Z)(n,[{key:"apply",value:function(t){var r=this,i=t.renderingService,a=t.renderingContext,s=a.root.ownerDocument,o=s.defaultView,l=function(h){var v=h.target,E=v===s,D=E&&r.dragndropPluginOptions.isDocumentDraggable?s:v.closest&&v.closest("[draggable=true]");if(D){var F=!1,G=h.timeStamp,H=[h.clientX,h.clientY],K=null,q=[h.clientX,h.clientY],te=function(){var le=(0,po.Z)((0,Xi.Z)().mark(function he(ve){var ge,Te,Oe,Ne,ze,Xe;return(0,Xi.Z)().wrap(function(st){for(;;)switch(st.prev=st.next){case 0:if(F){st.next=8;break}if(ge=ve.timeStamp-G,Te=ga([ve.clientX,ve.clientY],H),!(ge<=r.dragndropPluginOptions.dragstartTimeThreshold||Te<=r.dragndropPluginOptions.dragstartDistanceThreshold)){st.next=5;break}return st.abrupt("return");case 5:ve.type="dragstart",D.dispatchEvent(ve),F=!0;case 8:if(ve.type="drag",ve.dx=ve.clientX-q[0],ve.dy=ve.clientY-q[1],D.dispatchEvent(ve),q=[ve.clientX,ve.clientY],E){st.next=21;break}return Oe=r.dragndropPluginOptions.overlap==="pointer"?[ve.canvasX,ve.canvasY]:v.getBounds().center,st.next=17,s.elementsFromPoint(Oe[0],Oe[1]);case 17:Ne=st.sent,ze=Ne[Ne.indexOf(v)+1],Xe=(ze==null?void 0:ze.closest("[droppable=true]"))||(r.dragndropPluginOptions.isDocumentDroppable?s:null),K!==Xe&&(K&&(ve.type="dragleave",ve.target=K,K.dispatchEvent(ve)),Xe&&(ve.type="dragenter",ve.target=Xe,Xe.dispatchEvent(ve)),K=Xe,K&&(ve.type="dragover",ve.target=K,K.dispatchEvent(ve)));case 21:case"end":return st.stop()}},he)}));return function(ve){return le.apply(this,arguments)}}();o.addEventListener("pointermove",te);var ue=function(he){if(F){he.detail={preventClick:!0};var ve=he.clone();K&&(ve.type="drop",ve.target=K,K.dispatchEvent(ve)),ve.type="dragend",D.dispatchEvent(ve),F=!1}o.removeEventListener("pointermove",te)};v.addEventListener("pointerup",ue,{once:!0}),v.addEventListener("pointerupoutside",ue,{once:!0})}};i.hooks.init.tap(n.tag,function(){o.addEventListener("pointerdown",l)}),i.hooks.destroy.tap(n.tag,function(){o.removeEventListener("pointerdown",l)})}}])}();y2.tag="Dragndrop";var C8=function(n){function e(){var t,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,b.Z)(this,e),t=(0,w.Z)(this,e),t.name="dragndrop",t.options=r,t}return(0,y.Z)(e,n),(0,U.Z)(e,[{key:"init",value:function(){this.addRenderingPlugin(new y2((0,V.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(r){Object.assign(this.plugins[0].dragndropPluginOptions,r)}}])}(mo),_2=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})},E2=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};const x2=["main"],b2=["background","main","label","transient"];function D8(n){return n.main}class w2{getConfig(){return this.config}getLayer(e="main"){return this.extends.layers[e]||D8(this.getLayers())}getLayers(){return this.extends.layers}getRenderer(e){return this.extends.renderers[e]}getCamera(e="main"){return this.getLayer(e).getCamera()}getRoot(e="main"){return this.getLayer(e).getRoot()}getContextService(e="main"){return this.getLayer(e).getContextService()}setCursor(e){this.config.cursor=e,this.getLayer().setCursor(e)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(e){this.config={enableMultiLayer:!0},Object.assign(this.config,e);const t=this.config,{renderer:r,background:i,cursor:a,enableMultiLayer:s}=t,o=E2(t,["renderer","background","cursor","enableMultiLayer"]),l=s?b2:x2,u=M2(r,l),h=Object.fromEntries(l.map(v=>{const E=new ag(Object.assign(Object.assign({},o),{supportsMutipleCanvasesInOneContainer:s,renderer:u[v],background:s?v==="background"?i:void 0:i}));return[v,E]}));A2(h),this.extends={config:this.config,renderer:r,renderers:u,layers:h}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,e])=>e.ready))}resize(e,t){Object.assign(this.extends.config,{width:e,height:t}),Object.values(this.getLayers()).forEach(r=>{const i=r.getCamera(),a=i.getPosition(),s=i.getFocalPoint();r.resize(e,t),i.setPosition(a),i.setFocalPoint(s)})}getBounds(e){return $u(Object.values(this.getLayers()).map(t=>e?t.getRoot().childNodes.find(i=>i.classList.includes(e)):t.getRoot()).filter(t=>(t==null?void 0:t.childNodes.length)>0).map(t=>t.getBounds()))}getContainer(){const e=this.extends.config.container;return typeof e=="string"?document.getElementById(e):e}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(e,t){var r;const i=((r=e.style)===null||r===void 0?void 0:r.$layer)||"main";return this.getLayer(i).appendChild(e,t)}setRenderer(e){if(e===this.extends.renderer)return;const t=M2(e,this.config.enableMultiLayer?b2:x2);this.extends.renderers=t,Object.entries(t).forEach(([r,i])=>this.getLayer(r).setRenderer(i)),A2(this.getLayers())}getCanvasByViewport(e){return Fi(this.getLayer().viewport2Canvas(gs(e)))}getViewportByCanvas(e){return Fi(this.getLayer().canvas2Viewport(gs(e)))}getViewportByClient(e){return Fi(this.getLayer().client2Viewport(gs(e)))}getClientByViewport(e){return Fi(this.getLayer().viewport2Client(gs(e)))}getClientByCanvas(e){return this.getClientByViewport(this.getViewportByCanvas(e))}getCanvasByClient(e){const t=this.getLayer(),r=t.client2Viewport(gs(e));return Fi(t.viewport2Canvas(r))}toDataURL(){return _2(this,arguments,void 0,function*(e={}){const t=globalThis.devicePixelRatio||1,{mode:r="viewport"}=e,i=E2(e,["mode"]);let[a,s,o,l]=[0,0,0,0];if(r==="viewport")[o,l]=this.getSize();else if(r==="overall"){const K=this.getBounds(),q=bo(K);[a,s]=K.min,[o,l]=q}const u=Tp('<div id="virtual-image"></div>'),h=new ag({width:o,height:l,renderer:new cc,devicePixelRatio:t,container:u,background:this.extends.config.background});yield h.ready,h.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),h.appendChild(this.getRoot().cloneNode(!0));const v=this.getLayer("label").getRoot().cloneNode(!0),E=h.viewport2Canvas({x:0,y:0}),D=this.getCanvasByViewport([0,0]);v.translate([D[0]-E.x,D[1]-E.y]),v.scale(1/this.getCamera().getZoom()),h.appendChild(v),h.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const F=this.getCamera(),G=h.getCamera();if(r==="viewport")G.setZoom(F.getZoom()),G.setPosition(F.getPosition()),G.setFocalPoint(F.getFocalPoint());else if(r==="overall"){const[K,q,te]=G.getPosition(),[ue,le,he]=G.getFocalPoint();G.setPosition([K+a,q+s,te]),G.setFocalPoint([ue+a,le+s,he])}const H=h.getContextService();return new Promise(K=>{h.addEventListener(Ca.RERENDER,()=>_2(this,void 0,void 0,function*(){yield new Promise(te=>setTimeout(te,300));const q=yield H.toDataURL(i);K(q)}))})})}destroy(){Object.values(this.getLayers()).forEach(e=>{e.getCamera().cancelLandmarkAnimation(),e.destroy()})}}function M2(n,e){return Object.fromEntries(e.map(t=>{const r=(n==null?void 0:n(t))||new cc;return r instanceof cc&&r.setConfig({enableDirtyRectangleRendering:!1}),t==="main"?r.registerPlugin(new C8({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):r.unregisterPlugin(r.getPlugin("dom-interaction")),[t,r]}))}function A2(n){Object.entries(n).forEach(([e,t])=>{const r=t.getContextService().getDomElement();r!=null&&r.style&&(r.style.gridArea="1 / 1 / 2 / 2",r.style.outline="none",r.tabIndex=1,e!=="main"&&(r.style.pointerEvents="none")),r!=null&&r.parentElement&&(r.parentElement.style.display="grid")})}const vu=n=>n?parseInt(n):0;function L8(n){const e=getComputedStyle(n),t=n.clientWidth||vu(e.width),r=n.clientHeight||vu(e.height),i=vu(e.paddingLeft)+vu(e.paddingRight),a=vu(e.paddingTop)+vu(e.paddingBottom);return[t-i,r-a]}function T2(n){if(!n)return[0,0];let e=640,t=480;const[r,i]=L8(n);e=r||e,t=i||t;const a=1,s=1;return[Math.max(sn(e)?e:a,a),Math.max(sn(t)?t:s,s)]}class Xd{constructor(e){this.type=e}}class _i extends Xd{constructor(e,t){super(e),this.data=t}}class ts extends Xd{constructor(e,t,r,i){super(e),this.animationType=t,this.animation=r,this.data=i}}class gu extends Xd{constructor(e,t,r){super(e),this.elementType=t,this.data=r}}class Yd extends Xd{constructor(e,t){super(e),this.data=t}}function Pi(n,e){n.emit(e.type,e)}function R8(n){if(!n)return null;if(n instanceof Iy)return{type:"canvas",element:n};let e=n;for(;e;){if(fc(e))return{type:"node",element:e};if($1(e))return{type:"edge",element:e};if(i0(e))return{type:"combo",element:e};e=e.parentElement}return null}function S2(n){var e;return((e=n==null?void 0:n.style)===null||e===void 0?void 0:e.zIndex)||0}const pu="cachedStyle",Qd=n=>`__${n}__`;function I8(n,e){const t=Array.isArray(e)?e:[e];aa(n,pu)||sc(n,pu,{}),t.forEach(r=>{sc(aa(n,pu),Qd(r),n.attributes[r])})}function P2(n,e){return aa(n,[pu,Qd(e)])}function N8(n,e){return Qd(e)in(aa(n,pu)||{})}function fG(n,e,t){set(n,[pu,Qd(e)],t)}class B8{constructor(e){this.tasks=[],this.animations=new Set,this.context=e}getTasks(){const e=[...this.tasks];return this.tasks=[],e}add(e,t){this.tasks.push([e,t])}animate(e,t,r){var i,a,s;(i=t==null?void 0:t.before)===null||i===void 0||i.call(t);const o=this.getTasks().map(([u,h])=>{var v,E,D;const{element:F,elementType:G,stage:H}=u,K=IP(this.context.options,G,H,e);(v=h==null?void 0:h.before)===null||v===void 0||v.call(h);const q=K.length?BP(F,this.inferStyle(u,r),K):null;return q?((E=h==null?void 0:h.beforeAnimate)===null||E===void 0||E.call(h,q),q.finished.then(()=>{var te,ue;(te=h==null?void 0:h.afterAnimate)===null||te===void 0||te.call(h,q),(ue=h==null?void 0:h.after)===null||ue===void 0||ue.call(h),this.animations.delete(q)})):(D=h==null?void 0:h.after)===null||D===void 0||D.call(h),q}).filter(Boolean);o.forEach(u=>this.animations.add(u));const l=mg(o);return l?((a=t==null?void 0:t.beforeAnimate)===null||a===void 0||a.call(t,l),l.finished.then(()=>{var u,h;(u=t==null?void 0:t.afterAnimate)===null||u===void 0||u.call(t,l),(h=t==null?void 0:t.after)===null||h===void 0||h.call(t),this.release()})):(s=t==null?void 0:t.after)===null||s===void 0||s.call(t),l}inferStyle(e,t){var r,i;const{element:a,elementType:s,stage:o,originalStyle:l,updatedStyle:u={}}=e;e.modifiedStyle||(e.modifiedStyle=Object.assign(Object.assign({},l),u));const{modifiedStyle:h}=e,v={},E={};if(o==="enter")Object.assign(v,{opacity:0});else if(o==="exit")Object.assign(E,{opacity:0});else if(o==="show")Object.assign(v,{opacity:0}),Object.assign(E,{opacity:(r=P2(a,"opacity"))!==null&&r!==void 0?r:qu("opacity")});else if(o==="hide")Object.assign(v,{opacity:(i=P2(a,"opacity"))!==null&&i!==void 0?i:qu("opacity")}),Object.assign(E,{opacity:0});else if(o==="collapse"){const{collapse:D}=t||{},{target:F,descendants:G,position:H}=D;if(s==="node"){if(G.includes(a.id)){const[K,q,te]=H;Object.assign(E,{x:K,y:q,z:te})}}else if(s==="combo"){if(a.id===F||G.includes(a.id)){const[K,q]=H;Object.assign(E,{x:K,y:q,childrenNode:l.childrenNode})}}else s==="edge"&&Object.assign(E,{sourceNode:h.sourceNode,targetNode:h.targetNode})}else if(o==="expand"){const{expand:D}=t||{},{target:F,descendants:G,position:H}=D;if(s==="node"){if(a.id===F||G.includes(a.id)){const[K,q,te]=H;Object.assign(v,{x:K,y:q,z:te})}}else if(s==="combo"){if(a.id===F||G.includes(a.id)){const[K,q,te]=H;Object.assign(v,{x:K,y:q,z:te,childrenNode:h.childrenNode})}}else s==="edge"&&Object.assign(v,{sourceNode:h.sourceNode,targetNode:h.targetNode})}return[Object.keys(v).length>0?Object.assign({},l,v):l,Object.keys(E).length>0?Object.assign({},h,E):h]}stop(){this.animations.forEach(e=>e.cancel())}clear(){this.tasks=[]}release(){var e,t;const{canvas:r}=this.context,i=(t=(e=r.document)===null||e===void 0?void 0:e.timeline)===null||t===void 0?void 0:t.animationsWithPromises;i&&(r.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class k8{constructor(e){this.batchCount=0,this.context=e}emit(e){const{graph:t}=this.context;t.emit(e.type,e)}startBatch(e=!0){this.batchCount++,this.batchCount===1&&this.emit(new _i(Zt.BATCH_START,{initiate:e}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new _i(Zt.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class F8 extends Lg{constructor(e){super(e),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=t=>{const{target:r}=t,i=R8(r);if(!i)return;const{graph:a,canvas:s}=this.context,{type:o,element:l}=i;if("destroyed"in l&&(Df(l)||l.destroyed))return;const{type:u,detail:h,button:v}=t,E=Object.assign(Object.assign({},t),{target:l,targetType:o,originalTarget:r});u===Dt.POINTER_MOVE&&(this.currentTarget!==l&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${Dt.POINTER_LEAVE}`,Object.assign(Object.assign({},E),{type:Dt.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),l&&(Object.assign(E,{type:Dt.POINTER_ENTER}),a.emit(`${o}:${Dt.POINTER_ENTER}`,E))),this.currentTarget=l,this.currentTargetType=o),u===Dt.CLICK&&v===2||(a.emit(`${o}:${u}`,E),a.emit(u,E)),u===Dt.CLICK&&h===2&&(Object.assign(E,{type:Dt.DBLCLICK}),a.emit(`${o}:${Dt.DBLCLICK}`,E),a.emit(Dt.DBLCLICK,E)),u===Dt.POINTER_DOWN&&v===2&&(Object.assign(E,{type:Dt.CONTEXT_MENU,preventDefault:()=>{var D;(D=s.getContainer())===null||D===void 0||D.addEventListener(Dt.CONTEXT_MENU,F=>F.preventDefault(),{once:!0})}}),a.emit(`${o}:${Dt.CONTEXT_MENU}`,E),a.emit(Dt.CONTEXT_MENU,E))},this.forwardContainerEvents=t=>{this.context.graph.emit(t.type,t)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(e){this.setExtensions(e)}forwardEvents(){const e=this.context.canvas.getContainer();e&&[Yl.KEY_DOWN,Yl.KEY_UP].forEach(r=>{e.addEventListener(r,this.forwardContainerEvents)});const t=this.context.canvas.document;t&&[Dt.CLICK,Dt.DBLCLICK,Dt.POINTER_OVER,Dt.POINTER_LEAVE,Dt.POINTER_ENTER,Dt.POINTER_MOVE,Dt.POINTER_OUT,Dt.POINTER_DOWN,Dt.POINTER_UP,Dt.CONTEXT_MENU,Dt.DRAG_START,Dt.DRAG,Dt.DRAG_END,Dt.DRAG_ENTER,Dt.DRAG_OVER,Dt.DRAG_LEAVE,Dt.DROP,Dt.WHEEL].forEach(r=>{t.addEventListener(r,this.forwardCanvasEvents)})}destroy(){const e=this.context.canvas.getContainer();e&&[Yl.KEY_DOWN,Yl.KEY_UP].forEach(t=>{e.removeEventListener(t,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}function z8(n,e){e===void 0&&(e=new Map);var t=[];if(Array.isArray(n))for(var r=0,i=n.length;r<i;r++){var a=n[r];e.has(a)||(t.push(a),e.set(a,!0))}return t}var Bc=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function Wo(n,e){const{data:t,style:r}=n,i=Bc(n,["data","style"]),{data:a,style:s}=e,o=Bc(e,["data","style"]),l=Object.assign(Object.assign({},i),o);return(t||a)&&Object.assign(l,{data:Object.assign(Object.assign({},t),a)}),(r||s)&&Object.assign(l,{style:Object.assign(Object.assign({},r),s)}),l}function Op(n){const{data:e,style:t}=n,i=Bc(n,["data","style"]);return e&&(i.data=Object.assign({},e)),t&&(i.style=Object.assign({},t)),i}function dG(n){return!get(n,["nodes","length"])&&!get(n,["edges","length"])&&!get(n,["combos","length"])}function mu(n={},e={}){const{states:t=[],data:r={},style:i={},children:a=[]}=n,s=Bc(n,["states","data","style","children"]),{states:o=[],data:l={},style:u={},children:h=[]}=e,v=Bc(e,["states","data","style","children"]),E=(F,G)=>F.length!==G.length?!1:F.every((H,K)=>H===G[K]),D=(F,G)=>{const H=Object.keys(F),K=Object.keys(G);return H.length!==K.length?!1:H.every(q=>F[q]===G[q])};return!(!D(s,v)||!E(a,h)||!E(t,o)||!D(r,l)||!D(i,u))}var U8=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function Cp(n){const{id:e=yt(n),style:t,data:r}=n,i=U8(n,["id","style","data"]),a=Object.assign(Object.assign({},n),{style:Object.assign({},t),data:Object.assign({},r)});return jP(n)?Object.assign({id:e,data:a},i):{id:e,data:a}}function Ii(n){return n.data}function W8(n){if(n.hasTreeStructure(Da))return;n.attachTreeStructure(Da);const e=n.getAllEdges();for(const t of e){const{source:r,target:i}=t;n.setParent(i,r,Da)}}class G8{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new hi}pushChange(e){if(this.isTraceless)return;const{type:t}=e;if(t===Vr.NodeUpdated||t===Vr.EdgeUpdated||t===Vr.ComboUpdated){const{value:r,original:i}=e;this.changes.push({value:Op(r),original:Op(i),type:t})}else this.changes.push({value:Op(e.value),type:t})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(e){this.batchCount++,this.model.batch(e),this.batchCount--}isBatching(){return this.batchCount>0}silence(e){this.isTraceless=!0,e(),this.isTraceless=!1}isCombo(e){return this.comboIds.has(e)||this.latestRemovedComboIds.has(e)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(e){return this.model.getAllNodes().reduce((t,r)=>{const i=Ii(r);return this.isCombo(yt(i))||(e===void 0||e.includes(yt(i)))&&t.push(i),t},[])}getEdgeDatum(e){return Ii(this.model.getEdge(e))}getEdgeData(e){return this.model.getAllEdges().reduce((t,r)=>{const i=Ii(r);return(e===void 0||e.includes(yt(i)))&&t.push(i),t},[])}getComboData(e){return this.model.getAllNodes().reduce((t,r)=>{const i=Ii(r);return this.isCombo(yt(i))&&(e===void 0||e.includes(yt(i)))&&t.push(i),t},[])}getRootsData(e=Da){return this.model.getRoots(e).map(Ii)}getAncestorsData(e,t){const{model:r}=this;return!r.hasNode(e)||!r.hasTreeStructure(t)?[]:r.getAncestors(e,t).map(Ii)}getDescendantsData(e){const t=this.getElementDataById(e),r=[];return vl(t,i=>{i!==t&&r.push(i)},i=>this.getChildrenData(yt(i)),"TB"),r}getParentData(e,t){const{model:r}=this;if(!t){xa.warn("The hierarchy structure key is not specified");return}if(!r.hasNode(e)||!r.hasTreeStructure(t))return;const i=r.getParent(e,t);return i?Ii(i):void 0}getChildrenData(e){const t=this.getElementType(e)==="node"?Da:Dr,{model:r}=this;return!r.hasNode(e)||!r.hasTreeStructure(t)?[]:r.getChildren(e,t).map(Ii)}getElementsDataByType(e){return e==="node"?this.getNodeData():e==="edge"?this.getEdgeData():e==="combo"?this.getComboData():[]}getElementDataById(e){return this.getElementType(e)==="edge"?this.getEdgeDatum(e):this.getNodeLikeDatum(e)}getNodeLikeDatum(e){const t=this.model.getNode(e);return Ii(t)}getNodeLikeData(e){return this.model.getAllNodes().reduce((t,r)=>{const i=Ii(r);return e?e.includes(yt(i))&&t.push(i):t.push(i),t},[])}getElementDataByState(e,t){return this.getElementsDataByType(e).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(t)})}getElementState(e){var t;return((t=this.getElementDataById(e))===null||t===void 0?void 0:t.states)||[]}hasNode(e){return this.model.hasNode(e)&&!this.isCombo(e)}hasEdge(e){return this.model.hasEdge(e)}hasCombo(e){return this.model.hasNode(e)&&this.isCombo(e)}getRelatedEdgesData(e,t="both"){return this.model.getRelatedEdges(e,t).map(Ii)}getNeighborNodesData(e){return this.model.getNeighbors(e).map(Ii)}setData(e){const{nodes:t=[],edges:r=[],combos:i=[]}=e,{nodes:a,edges:s,combos:o}=this.getData(),l=Ao(a,t,v=>yt(v),mu),u=Ao(s,r,v=>yt(v),mu),h=Ao(o,i,v=>yt(v),mu);this.batch(()=>{const v={nodes:l.enter,edges:u.enter,combos:h.enter};this.addData(v),this.computeZIndex(v,"add",!0);const E={nodes:l.update,edges:u.update,combos:h.update};this.updateData(E),this.computeZIndex(E,"update",!0);const D={nodes:l.exit.map(yt),edges:u.exit.map(yt),combos:h.exit.map(yt)};this.removeData(D)})}addData(e){const{nodes:t,edges:r,combos:i}=e;this.batch(()=>{this.addComboData(i),this.addNodeData(t),this.addEdgeData(r)}),this.computeZIndex(e,"add")}addNodeData(e=[]){e.length&&(this.model.addNodes(e.map(t=>(this.pushChange({value:t,type:Vr.NodeAdded}),Cp(t)))),this.updateNodeLikeHierarchy(e),this.computeZIndex({nodes:e},"add"))}addEdgeData(e=[]){e.length&&(this.model.addEdges(e.map(t=>(this.pushChange({value:t,type:Vr.EdgeAdded}),Cp(t)))),this.computeZIndex({edges:e},"add"))}addComboData(e=[]){if(!e.length)return;const{model:t}=this;t.hasTreeStructure(Dr)||t.attachTreeStructure(Dr),t.addNodes(e.map(r=>(this.comboIds.add(yt(r)),this.pushChange({value:r,type:Vr.ComboAdded}),Cp(r)))),this.updateNodeLikeHierarchy(e),this.computeZIndex({combos:e},"add")}addChildrenData(e,t){const r=this.getNodeLikeDatum(e),i=t.map(yt);this.addNodeData(t),this.updateNodeData([{id:e,children:[...r.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:e,target:a})))}computeZIndex(e,t,r=!1){!r&&this.isBatching()||this.batch(()=>{const{nodes:i=[],edges:a=[],combos:s=[]}=e;s.forEach(o=>{var l,u,h;const v=yt(o);if(t==="add"&&sn((l=o.style)===null||l===void 0?void 0:l.zIndex)||t==="update"&&!("combo"in o))return;const E=this.getParentData(v,Dr),D=E?((h=(u=E.style)===null||u===void 0?void 0:u.zIndex)!==null&&h!==void 0?h:0)+1:0;this.preventUpdateNodeLikeHierarchy(()=>{this.updateComboData([{id:v,style:{zIndex:D}}])})}),i.forEach(o=>{var l,u,h;const v=yt(o);if(t==="add"&&sn((l=o.style)===null||l===void 0?void 0:l.zIndex)||t==="update"&&!("combo"in o)&&!("children"in o))return;let E=0;const D=this.getParentData(v,Dr);if(D)E=(((u=D.style)===null||u===void 0?void 0:u.zIndex)||0)+1;else{const F=this.getParentData(v,Da);F&&(E=((h=F==null?void 0:F.style)===null||h===void 0?void 0:h.zIndex)||0)}this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:v,style:{zIndex:E}}])})}),a.forEach(o=>{var l,u,h,v,E;if(sn((l=o.style)===null||l===void 0?void 0:l.zIndex))return;let{id:D,source:F,target:G}=o;if(!D)D=yt(o);else{const q=this.getEdgeDatum(D);F=q.source,G=q.target}if(!F||!G)return;const H=((h=(u=this.getNodeLikeDatum(F))===null||u===void 0?void 0:u.style)===null||h===void 0?void 0:h.zIndex)||0,K=((E=(v=this.getNodeLikeDatum(G))===null||v===void 0?void 0:v.style)===null||E===void 0?void 0:E.zIndex)||0;this.updateEdgeData([{id:yt(o),style:{zIndex:Math.max(H,K)-1}}])})})}getFrontZIndex(e){var t;const r=this.getElementType(e),i=this.getElementDataById(e),a=this.getData();if(Object.assign(a,{[`${r}s`]:a[`${r}s`].filter(s=>yt(s)!==e)}),r==="combo"&&!ba(i)){const s=new Set(this.getAncestorsData(e,Dr).map(yt));a.nodes=a.nodes.filter(o=>!s.has(yt(o))),a.combos=a.combos.filter(o=>!s.has(yt(o))),a.edges=a.edges.filter(({source:o,target:l})=>!s.has(o)&&!s.has(l))}return Math.max(((t=i.style)===null||t===void 0?void 0:t.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(e){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:t}=this;e.forEach(r=>{const i=yt(r),a=$h(r);a!==void 0&&(t.hasTreeStructure(Dr)||t.attachTreeStructure(Dr),a===null&&this.refreshComboData(i),this.setParent(i,$h(r),Dr));const s=r.children||[];if(s.length){t.hasTreeStructure(Da)||t.attachTreeStructure(Da);const o=s.filter(l=>t.hasNode(l));o.forEach(l=>this.setParent(l,i,Da)),o.length!==s.length&&this.updateNodeData([{id:i,children:o}])}})}preventUpdateNodeLikeHierarchy(e){this.enableUpdateNodeLikeHierarchy=!1,e(),this.enableUpdateNodeLikeHierarchy=!0}updateData(e){const{nodes:t,edges:r,combos:i}=e;this.batch(()=>{this.updateNodeData(t),this.updateComboData(i),this.updateEdgeData(r)}),this.computeZIndex(e,"update")}updateNodeData(e=[]){if(!e.length)return;const{model:t}=this;this.batch(()=>{const r=[];e.forEach(i=>{const a=yt(i),s=Ii(t.getNode(a));if(mu(s,i))return;const o=Wo(s,i);this.pushChange({value:o,original:s,type:Vr.NodeUpdated}),t.mergeNodeData(a,o),r.push(o)}),this.updateNodeLikeHierarchy(r)}),this.computeZIndex({nodes:e},"update")}refreshData(){const{nodes:e,edges:t,combos:r}=this.getData();e.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.NodeUpdated})}),t.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.EdgeUpdated})}),r.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.ComboUpdated})})}syncNodeLikeDatum(e){const{model:t}=this,r=yt(e);if(!t.hasNode(r))return;const i=Ii(t.getNode(r)),a=Wo(i,e);t.mergeNodeData(r,a)}syncEdgeDatum(e){const{model:t}=this,r=yt(e);if(!t.hasEdge(r))return;const i=Ii(t.getEdge(r)),a=Wo(i,e);t.mergeEdgeData(r,a)}updateEdgeData(e=[]){if(!e.length)return;const{model:t}=this;this.batch(()=>{e.forEach(r=>{const i=yt(r),a=Ii(t.getEdge(i));if(mu(a,r))return;r.source&&a.source!==r.source&&t.updateEdgeSource(i,r.source),r.target&&a.target!==r.target&&t.updateEdgeTarget(i,r.target);const s=Wo(a,r);this.pushChange({value:s,original:a,type:Vr.EdgeUpdated}),t.mergeEdgeData(i,s)})}),this.computeZIndex({edges:e},"update")}updateComboData(e=[]){if(!e.length)return;const{model:t}=this;t.batch(()=>{const r=[];e.forEach(i=>{const a=yt(i),s=Ii(t.getNode(a));if(mu(s,i))return;const o=Wo(s,i);this.pushChange({value:o,original:s,type:Vr.ComboUpdated}),t.mergeNodeData(a,o),r.push(o)}),this.updateNodeLikeHierarchy(r)}),this.computeZIndex({combos:e},"update")}setParent(e,t,r,i=!0){if(e===t)return;const a=this.getNodeLikeDatum(e),s=$h(a);if(s!==t&&r===Dr){const o={id:e,combo:t};this.isCombo(e)?this.syncNodeLikeDatum(o):this.syncNodeLikeDatum(o)}this.model.setParent(e,t,r),i&&r===Dr&&z8([s,t]).forEach(o=>{o!==void 0&&this.refreshComboData(o)})}refreshComboData(e){const t=this.getComboData([e])[0],r=this.getAncestorsData(e,Dr);t&&this.pushChange({value:t,original:t,type:Vr.ComboUpdated}),r.forEach(i=>{this.pushChange({value:i,original:i,type:Vr.ComboUpdated})})}getElementPosition(e){const t=this.getElementDataById(e);return Ti(t)}translateNodeLikeBy(e,t){this.isCombo(e)?this.translateComboBy(e,t):this.translateNodeBy(e,t)}translateNodeLikeTo(e,t){this.isCombo(e)?this.translateComboTo(e,t):this.translateNodeTo(e,t)}translateNodeBy(e,t){const r=this.getElementPosition(e),i=zn(r,[...t,0].slice(0,3));this.translateNodeTo(e,i)}translateNodeTo(e,t){const[r=0,i=0,a=0]=t;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:e,style:{x:r,y:i,z:a}}])})}translateComboBy(e,t){const[r=0,i=0,a=0]=t;if([r,i,a].some(isNaN)||[r,i,a].every(l=>l===0))return;const s=this.getComboData([e])[0];if(!s)return;const o=new Set;vl(s,l=>{const u=yt(l);if(o.has(u))return;o.add(u);const[h,v,E]=Ti(l),D=Wo(l,{style:{x:h+r,y:v+i,z:E+a}});this.pushChange({value:D,original:l,type:this.isCombo(u)?Vr.ComboUpdated:Vr.NodeUpdated}),this.model.mergeNodeData(u,D)},l=>this.getChildrenData(yt(l)),"BT")}translateComboTo(e,t){var r;if(t.some(isNaN))return;const[i=0,a=0,s=0]=t,o=(r=this.getComboData([e]))===null||r===void 0?void 0:r[0];if(!o)return;const[l,u,h]=Ti(o),v=i-l,E=a-u,D=s-h;vl(o,F=>{const G=yt(F),[H,K,q]=Ti(F),te=Wo(F,{style:{x:H+v,y:K+E,z:q+D}});this.pushChange({value:te,original:F,type:this.isCombo(G)?Vr.ComboUpdated:Vr.NodeUpdated}),this.model.mergeNodeData(G,te)},F=>this.getChildrenData(yt(F)),"BT")}removeData(e){const{nodes:t,edges:r,combos:i}=e;this.batch(()=>{this.removeEdgeData(r),this.removeNodeData(t),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(e=[]){e.length&&this.batch(()=>{e.forEach(t=>{this.removeEdgeData(this.getRelatedEdgesData(t).map(yt)),this.pushChange({value:this.getNodeData([t])[0],type:Vr.NodeRemoved}),this.removeNodeLikeHierarchy(t)}),this.model.removeNodes(e)})}removeEdgeData(e=[]){e.length&&(e.forEach(t=>this.pushChange({value:this.getEdgeData([t])[0],type:Vr.EdgeRemoved})),this.model.removeEdges(e))}removeComboData(e=[]){e.length&&this.batch(()=>{e.forEach(t=>{this.pushChange({value:this.getComboData([t])[0],type:Vr.ComboRemoved}),this.removeNodeLikeHierarchy(t),this.comboIds.delete(t)}),this.model.removeNodes(e)})}removeNodeLikeHierarchy(e){if(this.model.hasTreeStructure(Dr)){const t=$h(this.getNodeLikeDatum(e));this.setParent(e,void 0,Dr,!1),this.model.getChildren(e,Dr).forEach(r=>{const i=Ii(r),a=yt(i);this.setParent(yt(i),t,Dr,!1);const s=Wo(i,{id:yt(i),combo:t});this.pushChange({value:s,original:i,type:this.isCombo(a)?Vr.ComboUpdated:Vr.NodeUpdated}),this.model.mergeNodeData(yt(i),s)}),xn(t)||this.refreshComboData(t)}}getElementType(e){if(this.model.hasNode(e))return this.isCombo(e)?"combo":"node";if(this.model.hasEdge(e))return"edge";throw new Error(Qs(`Unknown element type of id: ${e}`))}destroy(){const{model:e}=this,t=e.getAllNodes(),r=e.getAllEdges();e.removeEdges(r.map(i=>i.id)),e.removeNodes(t.map(i=>i.id)),this.context={}}}var kc=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class H8{constructor(e){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=e}init(){this.initContainer()}initContainer(){if(!this.container||this.container.destroyed){const{canvas:e}=this.context;this.container=e.appendChild(new Ai({className:"elements"}))}}emit(e,t){t.silence||Pi(this.context.graph,e)}forEachElementData(e){dl.forEach(t=>{const r=this.context.model.getElementsDataByType(t);e(t,r)})}getElementType(e,t){var r;const{options:i,graph:a}=this.context,s=((r=i[e])===null||r===void 0?void 0:r.type)||t.type;return s?typeof s=="string"?s:s.call(a,t):e==="edge"?"line":"circle"}getTheme(e){return i_(this.context.options)[e]||{}}getThemeStyle(e){return this.getTheme(e).style||{}}getThemeStateStyle(e,t){const{state:r={}}=this.getTheme(e);return Object.assign({},...t.map(i=>r[i]||{}))}computePaletteStyle(){const{options:e}=this.context;this.paletteStyle={},this.forEachElementData((t,r)=>{var i,a;const s=Object.assign({},p1((i=this.getTheme(t))===null||i===void 0?void 0:i.palette),p1((a=e[t])===null||a===void 0?void 0:a.palette));s!=null&&s.field&&Object.assign(this.paletteStyle,nD(r,s))})}getPaletteStyle(e,t){const r=this.paletteStyle[t];return r?e==="edge"?{stroke:r}:{fill:r}:{}}computeElementDefaultStyle(e,t){var r;const{options:i}=this.context,a=((r=i[e])===null||r===void 0?void 0:r.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[yt(t.datum)]=g1(a,t)}computeElementsDefaultStyle(e){const{graph:t}=this.context;this.forEachElementData((r,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];(e===void 0||e.includes(yt(o)))&&this.computeElementDefaultStyle(r,{datum:o,graph:t})}})}getDefaultStyle(e){return this.defaultStyle[e]||{}}getElementState(e){try{const{model:t}=this.context;return t.getElementState(e)}catch(t){return[]}}getElementStateStyle(e,t,r){var i,a;const{options:s}=this.context,o=((a=(i=s[e])===null||i===void 0?void 0:i.state)===null||a===void 0?void 0:a[t])||{};return g1(o,r)}computeElementStatesStyle(e,t,r){this.stateStyle[yt(r.datum)]=Object.assign({},...t.map(i=>this.getElementStateStyle(e,i,r)))}computeElementsStatesStyle(e){const{graph:t}=this.context;this.forEachElementData((r,i)=>{const a=i.length;for(let s=0;s<a;s++){const o=i[s];if(e===void 0||e.includes(yt(o))){const l=this.getElementState(yt(o));this.computeElementStatesStyle(r,l,{datum:o,graph:t})}}})}getStateStyle(e){return this.stateStyle[e]||{}}computeStyle(e,t){e&&["translate","zIndex"].includes(e)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(t),this.computeElementsStatesStyle(t))}getElement(e){return this.elementMap[e]}getNodes(){return this.context.model.getNodeData().map(({id:e})=>this.elementMap[e])}getEdges(){return this.context.model.getEdgeData().map(e=>this.elementMap[yt(e)])}getCombos(){return this.context.model.getComboData().map(({id:e})=>this.elementMap[e])}getElementComputedStyle(e,t){const r=yt(t),i=this.getThemeStyle(e),a=this.getPaletteStyle(e,r),s=t.style||{},o=this.getDefaultStyle(r),l=this.getThemeStateStyle(e,this.getElementState(r)),u=this.getStateStyle(r),h=Object.assign({},i,a,s,o,l,u);if(e==="combo"){const v=this.context.model.getChildrenData(r),D=!!h.collapsed?[]:v.map(yt).filter(F=>this.getElement(F));Object.assign(h,{childrenNode:D,childrenData:v})}return h}getDrawData(e){this.init();const t=this.computeChangesAndDrawData(e);if(!t)return null;const{type:r="draw",stage:i=r}=e;return this.markDestroyElement(t.drawData),this.computeStyle(i),{type:r,stage:i,data:t}}draw(e={animation:!0}){const t=this.getDrawData(e);if(!t)return;const{data:{drawData:{add:r,update:i,remove:a}}}=t;return this.destroyElements(a,e),this.createElements(r,e),this.updateElements(i,e),this.setAnimationTask(e,t)}preLayoutDraw(){return kc(this,arguments,void 0,function*(e={animation:!0}){var t,r;const i=this.getDrawData(e);if(!i)return;const{data:{drawData:a}}=i;yield(r=(t=this.context.layout)===null||t===void 0?void 0:t.preLayout)===null||r===void 0?void 0:r.call(t,a);const{add:s,update:o,remove:l}=a;return this.destroyElements(l,e),this.createElements(s,e),this.updateElements(o,e),this.setAnimationTask(e,i)})}setAnimationTask(e,t){const{animation:r,silence:i}=e,{data:{dataChanges:a,drawData:s},stage:o,type:l}=t;return this.context.animation.animate(r,i?{}:{before:()=>this.emit(new _i(Zt.BEFORE_DRAW,{dataChanges:a,animation:r,stage:o,render:l==="render"}),e),beforeAnimate:u=>this.emit(new ts(Zt.BEFORE_ANIMATE,Ea.DRAW,u,s),e),afterAnimate:u=>this.emit(new ts(Zt.AFTER_ANIMATE,Ea.DRAW,u,s),e),after:()=>this.emit(new _i(Zt.AFTER_DRAW,{dataChanges:a,animation:r,stage:o,render:l==="render",firstRender:this.context.graph.rendered===!1}),e)})}computeChangesAndDrawData(e){const{model:t}=this.context,r=t.getChanges(),i=W0(r);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:s=[],NodeRemoved:o=[],EdgeAdded:l=[],EdgeUpdated:u=[],EdgeRemoved:h=[],ComboAdded:v=[],ComboUpdated:E=[],ComboRemoved:D=[]}=zh(i,K=>K.type),F=K=>new Map(K.map(q=>{const te=q.value;return[yt(te),te]})),G={add:{nodes:F(a),edges:F(l),combos:F(v)},update:{nodes:F(s),edges:F(u),combos:F(E)},remove:{nodes:F(o),edges:F(h),combos:F(D)}},H=this.transformData(G,e);return t.clearChanges(),{dataChanges:r,drawData:H}}transformData(e,t){const r=this.context.transform.getTransformInstance();return Object.values(r).reduce((i,a)=>a.beforeDraw(i,t),e)}createElement(e,t,r){var i;const a=yt(t);if(this.getElement(a))return;const o=this.getElementType(e,t),l=this.getElementComputedStyle(e,t),u=Ys(e,o);if(!u)return xa.warn(`The element ${o} of ${e} is not registered.`);this.emit(new gu(Zt.BEFORE_ELEMENT_CREATE,e,t),r);const h=this.container.appendChild(new u({id:a,context:this.context,style:l}));this.shapeTypeMap[a]=o,this.elementMap[a]=h;const{stage:v="enter"}=r;(i=this.context.animation)===null||i===void 0||i.add({element:h,elementType:e,stage:v,originalStyle:Object.assign({},h.attributes),updatedStyle:l},{after:()=>{var E;this.emit(new gu(Zt.AFTER_ELEMENT_CREATE,e,t),r),(E=h.onCreate)===null||E===void 0||E.call(h)}})}createElements(e,t){const{nodes:r,edges:i,combos:a}=e;[["node",r],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.createElement(o,u,t))})}getUpdateStageStyle(e,t,r){const{stage:i="update"}=r;if(i==="translate")if(e==="node"||e==="combo"){const{style:{x:a=0,y:s=0,z:o=0}={}}=t;return{x:a,y:s,z:o}}else return{};return this.getElementComputedStyle(e,t)}updateElement(e,t,r){var i;const a=yt(t),{stage:s="update"}=r,o=this.getElement(a);if(!o)return()=>null;this.emit(new gu(Zt.BEFORE_ELEMENT_UPDATE,e,t),r);const l=this.getElementType(e,t),u=this.getUpdateStageStyle(e,t,r);this.shapeTypeMap[a]!==l&&(o.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(e,t,{animation:!1,silence:!0}));const h=s!=="visibility"?s:u.visibility==="hidden"?"hide":"show";h==="hide"&&delete u.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:e,stage:h,originalStyle:Object.assign({},o.attributes),updatedStyle:u},{before:()=>{const v=this.elementMap[a];s!=="collapse"&&l0(v,u),s==="visibility"&&(N8(v,"opacity")||I8(v,"opacity"),this.visibilityCache.set(v,h==="show"?"visible":"hidden"),h==="show"&&hl(v,"visible"))},after:()=>{var v;const E=this.elementMap[a];s==="collapse"&&l0(E,u),h==="hide"&&hl(E,this.visibilityCache.get(E)),this.emit(new gu(Zt.AFTER_ELEMENT_UPDATE,e,t),r),(v=E.onUpdate)===null||v===void 0||v.call(E)}})}updateElements(e,t){const{nodes:r,edges:i,combos:a}=e;[["node",r],["combo",a],["edge",i]].forEach(([o,l])=>{l.forEach(u=>this.updateElement(o,u,t))})}markDestroyElement(e){Object.values(e.remove).forEach(t=>{t.forEach(r=>{const i=yt(r),a=this.getElement(i);a&&gR(a)})})}destroyElement(e,t,r){var i;const{stage:a="exit"}=r,s=yt(t),o=this.elementMap[s];if(!o)return()=>null;this.emit(new gu(Zt.BEFORE_ELEMENT_DESTROY,e,t),r),(i=this.context.animation)===null||i===void 0||i.add({element:o,elementType:e,stage:a,originalStyle:Object.assign({},o.attributes),updatedStyle:{}},{after:()=>{var l;this.clearElement(s),o.destroy(),(l=o.onDestroy)===null||l===void 0||l.call(o),this.emit(new gu(Zt.AFTER_ELEMENT_DESTROY,e,t),r)}})}destroyElements(e,t){const{nodes:r,edges:i,combos:a}=e;[["combo",a],["edge",i],["node",r]].forEach(([o,l])=>{l.forEach(u=>this.destroyElement(o,u,t))})}clearElement(e){delete this.paletteStyle[e],delete this.defaultStyle[e],delete this.stateStyle[e],delete this.elementMap[e],delete this.shapeTypeMap[e]}alignLayoutResultToElement(e,t){var r,i;const a=(r=e.nodes)===null||r===void 0?void 0:r.find(s=>yt(s)===t);if(a){const s=Ti(this.context.model.getNodeLikeDatum(t)),o=Ti(a),l=Pr(s,o);(i=e.nodes)===null||i===void 0||i.forEach(u=>{var h,v,E;!((h=u.style)===null||h===void 0)&&h.x&&(u.style.x+=l[0]),!((v=u.style)===null||v===void 0)&&v.y&&(u.style.y+=l[1]),!((E=u.style)===null||E===void 0)&&E.z&&(u.style.z+=l[2]||0)})}}collapseNode(e,t){return kc(this,void 0,void 0,function*(){var r;const{animation:i,align:a}=t,{model:s,layout:o}=this.context,l=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!l)return;this.markDestroyElement(l.drawData);const u=yield o.simulate();a&&this.alignLayoutResultToElement(u,e),s.updateData(u);const h=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!h)return;const{drawData:v}=h,{add:E,remove:D,update:F}=v;this.markDestroyElement(v);const G={animation:i,stage:"collapse",data:v};this.destroyElements(D,G),this.createElements(E,G),this.updateElements(F,G),yield(r=this.context.animation.animate(i,{beforeAnimate:H=>this.emit(new ts(Zt.BEFORE_ANIMATE,Ea.COLLAPSE,H,v),G),afterAnimate:H=>this.emit(new ts(Zt.AFTER_ANIMATE,Ea.COLLAPSE,H,v),G)},{collapse:{target:e,descendants:Array.from(D.nodes).map(([,H])=>yt(H)),position:Ti(F.nodes.get(e))}}))===null||r===void 0?void 0:r.finished})}expandNode(e,t){return kc(this,void 0,void 0,function*(){var r;const{model:i,layout:a}=this.context,{animation:s,align:o}=t,l=Ti(i.getNodeData([e])[0]),u=this.computeChangesAndDrawData({stage:"expand",animation:s});if(!u)return;const{drawData:{add:h}}=u;this.createElements(h,{animation:!1,stage:"expand",target:e}),this.context.animation.clear();const v=yield a.simulate();o&&this.alignLayoutResultToElement(v,e),i.updateData(v),this.computeStyle("expand");const E=this.computeChangesAndDrawData({stage:"collapse",animation:s});if(!E)return;const{drawData:D}=E,{update:F}=D,G={animation:s,stage:"expand",data:D};h.edges.forEach(H=>F.edges.set(yt(H),H)),h.nodes.forEach(H=>F.nodes.set(yt(H),H)),this.updateElements(F,G),yield(r=this.context.animation.animate(s,{beforeAnimate:H=>this.emit(new ts(Zt.BEFORE_ANIMATE,Ea.EXPAND,H,D),G),afterAnimate:H=>this.emit(new ts(Zt.AFTER_ANIMATE,Ea.EXPAND,H,D),G)},{expand:{target:e,descendants:Array.from(h.nodes).map(([,H])=>yt(H)),position:l}}))===null||r===void 0?void 0:r.finished})}collapseCombo(e,t){return kc(this,void 0,void 0,function*(){var r;const{model:i,element:a}=this.context;if(i.getAncestorsData(e,Dr).some(G=>ba(G)))return;const s=a.getElement(e),o=s.getComboPosition(Object.assign(Object.assign({},s.attributes),{collapsed:!0})),l=this.computeChangesAndDrawData({stage:"collapse",animation:t});if(!l)return;const{dataChanges:u,drawData:h}=l;this.markDestroyElement(h);const{update:v,remove:E}=h,D={animation:t,stage:"collapse",data:h};this.destroyElements(E,D),this.updateElements(v,D);const F=G=>Array.from(G).map(([,H])=>yt(H));yield(r=this.context.animation.animate(t,{before:()=>this.emit(new _i(Zt.BEFORE_DRAW,{dataChanges:u,animation:t}),D),beforeAnimate:G=>this.emit(new ts(Zt.BEFORE_ANIMATE,Ea.COLLAPSE,G,h),D),afterAnimate:G=>this.emit(new ts(Zt.AFTER_ANIMATE,Ea.COLLAPSE,G,h),D),after:()=>this.emit(new _i(Zt.AFTER_DRAW,{dataChanges:u,animation:t}),D)},{collapse:{target:e,descendants:[...F(E.nodes),...F(E.combos)],position:o}}))===null||r===void 0?void 0:r.finished})}expandCombo(e,t){return kc(this,void 0,void 0,function*(){var r;const{model:i}=this.context,a=Ti(i.getComboData([e])[0]);this.computeStyle("expand");const s=this.computeChangesAndDrawData({stage:"expand",animation:t});if(!s)return;const{dataChanges:o,drawData:l}=s,{add:u,update:h}=l,v={animation:t,stage:"expand",data:l,target:e};this.createElements(u,v),this.updateElements(h,v);const E=D=>Array.from(D).map(([,F])=>yt(F));yield(r=this.context.animation.animate(t,{before:()=>this.emit(new _i(Zt.BEFORE_DRAW,{dataChanges:o,animation:t}),v),beforeAnimate:D=>this.emit(new ts(Zt.BEFORE_ANIMATE,Ea.EXPAND,D,l),v),afterAnimate:D=>this.emit(new ts(Zt.AFTER_ANIMATE,Ea.EXPAND,D,l),v),after:()=>this.emit(new _i(Zt.AFTER_DRAW,{dataChanges:o,animation:t}),v)},{expand:{target:e,descendants:[...E(u.nodes),...E(u.combos)],position:a}}))===null||r===void 0?void 0:r.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 O2=Symbol("Comlink.proxy"),j8=Symbol("Comlink.endpoint"),C2=Symbol("Comlink.releaseProxy"),Dp=Symbol("Comlink.finalizer"),Jd=Symbol("Comlink.thrown"),D2=n=>typeof n=="object"&&n!==null||typeof n=="function",V8={canHandle:n=>D2(n)&&n[O2],serialize(n){const{port1:e,port2:t}=new MessageChannel;return R2(n,e),[t,[t]]},deserialize(n){return n.start(),N2(n)}},Z8={canHandle:n=>D2(n)&&Jd in n,serialize({value:n}){let e;return n instanceof Error?e={isError:!0,value:{message:n.message,name:n.name,stack:n.stack}}:e={isError:!1,value:n},[e,[]]},deserialize(n){throw n.isError?Object.assign(new Error(n.value.message),n.value):n.value}},L2=new Map([["proxy",V8],["throw",Z8]]);function K8(n,e){for(const t of n)if(e===t||t==="*"||t instanceof RegExp&&t.test(e))return!0;return!1}function R2(n,e=globalThis,t=["*"]){e.addEventListener("message",function r(i){if(!i||!i.data)return;if(!K8(t,i.origin)){console.warn(`Invalid origin '${i.origin}' for comlink proxy`);return}const{id:a,type:s,path:o}=Object.assign({path:[]},i.data),l=(i.data.argumentList||[]).map(Ol);let u;try{const h=o.slice(0,-1).reduce((E,D)=>E[D],n),v=o.reduce((E,D)=>E[D],n);switch(s){case"GET":u=v;break;case"SET":h[o.slice(-1)[0]]=Ol(i.data.value),u=!0;break;case"APPLY":u=v.apply(h,l);break;case"CONSTRUCT":{const E=new v(...l);u=$8(E)}break;case"ENDPOINT":{const{port1:E,port2:D}=new MessageChannel;R2(n,D),u=q8(E,[E])}break;case"RELEASE":u=void 0;break;default:return}}catch(h){u={value:h,[Jd]:0}}Promise.resolve(u).catch(h=>({value:h,[Jd]:0})).then(h=>{const[v,E]=tv(h);e.postMessage(Object.assign(Object.assign({},v),{id:a}),E),s==="RELEASE"&&(e.removeEventListener("message",r),I2(e),Dp in n&&typeof n[Dp]=="function"&&n[Dp]())}).catch(h=>{const[v,E]=tv({value:new TypeError("Unserializable return value"),[Jd]:0});e.postMessage(Object.assign(Object.assign({},v),{id:a}),E)})}),e.start&&e.start()}function X8(n){return n.constructor.name==="MessagePort"}function I2(n){X8(n)&&n.close()}function N2(n,e){const t=new Map;return n.addEventListener("message",function(i){const{data:a}=i;if(!a||!a.id)return;const s=t.get(a.id);if(s)try{s(a)}finally{t.delete(a.id)}}),Lp(n,t,[],e)}function qd(n){if(n)throw new Error("Proxy has been released and is not useable")}function B2(n){return yu(n,new Map,{type:"RELEASE"}).then(()=>{I2(n)})}const $d=new WeakMap,ev="FinalizationRegistry"in globalThis&&new FinalizationRegistry(n=>{const e=($d.get(n)||0)-1;$d.set(n,e),e===0&&B2(n)});function Y8(n,e){const t=($d.get(e)||0)+1;$d.set(e,t),ev&&ev.register(n,e,n)}function Q8(n){ev&&ev.unregister(n)}function Lp(n,e,t=[],r=function(){}){let i=!1;const a=new Proxy(r,{get(s,o){if(qd(i),o===C2)return()=>{Q8(a),B2(n),e.clear(),i=!0};if(o==="then"){if(t.length===0)return{then:()=>a};const l=yu(n,e,{type:"GET",path:t.map(u=>u.toString())}).then(Ol);return l.then.bind(l)}return Lp(n,e,[...t,o])},set(s,o,l){qd(i);const[u,h]=tv(l);return yu(n,e,{type:"SET",path:[...t,o].map(v=>v.toString()),value:u},h).then(Ol)},apply(s,o,l){qd(i);const u=t[t.length-1];if(u===j8)return yu(n,e,{type:"ENDPOINT"}).then(Ol);if(u==="bind")return Lp(n,e,t.slice(0,-1));const[h,v]=k2(l);return yu(n,e,{type:"APPLY",path:t.map(E=>E.toString()),argumentList:h},v).then(Ol)},construct(s,o){qd(i);const[l,u]=k2(o);return yu(n,e,{type:"CONSTRUCT",path:t.map(h=>h.toString()),argumentList:l},u).then(Ol)}});return Y8(a,n),a}function J8(n){return Array.prototype.concat.apply([],n)}function k2(n){const e=n.map(tv);return[e.map(t=>t[0]),J8(e.map(t=>t[1]))]}const F2=new WeakMap;function q8(n,e){return F2.set(n,e),n}function $8(n){return Object.assign(n,{[O2]:!0})}function vG(n,e=globalThis,t="*"){return{postMessage:(r,i)=>n.postMessage(r,t,i),addEventListener:e.addEventListener.bind(e),removeEventListener:e.removeEventListener.bind(e)}}function tv(n){for(const[e,t]of L2)if(t.canHandle(n)){const[r,i]=t.serialize(n);return[{type:"HANDLER",name:e,value:r},i]}return[{type:"RAW",value:n},F2.get(n)||[]]}function Ol(n){switch(n.type){case"HANDLER":return L2.get(n.name).deserialize(n.value);case"RAW":return n.value}}function yu(n,e,t,r){return new Promise(i=>{const a=ez();e.set(a,i),n.start&&n.start(),n.postMessage(Object.assign({id:a},t),r)})}function ez(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}class tz extends Ff{constructor(e,t,r){super(),this.graph=e,this.layout=t,this.options=r,this.spawnWorker()}spawnWorker(){this.proxy=N2(new Worker(new URL(Y.p+Y.u(2765),Y.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var e;return(0,xe.mG)(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const t=this.layout.options,{onTick:r}=t,i=(0,xe._T)(t,["onTick"]),a={};Object.keys(i).forEach(u=>{fn(i[u])||(a[u]=i[u])});const s={layout:{id:this.layout.id,options:a,iterations:(e=this.options)===null||e===void 0?void 0:e.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},o=new Float32Array([0]),[l]=yield this.proxy.calculateLayout(s,[o]);return l})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[C2]()}isRunning(){return this.running}}var _u=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})},nz=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};class rz{get presetOptions(){return{animation:!!a_(this.context.options,!0)}}get options(){const{options:e}=this.context;return e.layout}constructor(e){this.instances=[],this.context=e}getLayoutInstance(){return this.instances}preLayout(e){return _u(this,void 0,void 0,function*(){var t,r,i,a;const{graph:s,model:o}=this.context,{add:l}=e;Pi(s,new _i(Zt.BEFORE_LAYOUT,{type:"pre"}));const u=yield(t=this.context.layout)===null||t===void 0?void 0:t.simulate();(r=u==null?void 0:u.nodes)===null||r===void 0||r.forEach(h=>{const v=yt(h),E=l.nodes.get(v);o.syncNodeLikeDatum(h),E&&Object.assign(E.style,h.style)}),(i=u==null?void 0:u.edges)===null||i===void 0||i.forEach(h=>{const v=yt(h),E=l.edges.get(v);o.syncEdgeDatum(h),E&&Object.assign(E.style,h.style)}),(a=u==null?void 0:u.combos)===null||a===void 0||a.forEach(h=>{const v=yt(h),E=l.combos.get(v);o.syncNodeLikeDatum(h),E&&Object.assign(E.style,h.style)}),Pi(s,new _i(Zt.AFTER_LAYOUT,{type:"pre"})),this.transformDataAfterLayout("pre",e)})}postLayout(){return _u(this,arguments,void 0,function*(e=this.options){if(!e)return;const t=Array.isArray(e)?e:[e],{graph:r}=this.context;Pi(r,new _i(Zt.BEFORE_LAYOUT,{type:"post"}));for(let i=0;i<t.length;i++){const a=t[i],s=this.getLayoutData(a),o=Object.assign(Object.assign({},this.presetOptions),a);Pi(r,new _i(Zt.BEFORE_STAGE_LAYOUT,{options:o,index:i}));const l=yield this.stepLayout(s,o,i);Pi(r,new _i(Zt.AFTER_STAGE_LAYOUT,{options:o,index:i})),a.animation||this.updateElementPosition(l,!1)}Pi(r,new _i(Zt.AFTER_LAYOUT,{type:"post"})),this.transformDataAfterLayout("post")})}transformDataAfterLayout(e,t){const r=this.context.transform.getTransformInstance();Object.values(r).forEach(i=>i.afterLayout(e,t))}simulate(){return _u(this,void 0,void 0,function*(){if(!this.options)return{};const e=Array.isArray(this.options)?this.options:[this.options];let t={};for(let r=0;r<e.length;r++){const i=e[r],a=this.getLayoutData(i);t=yield this.stepLayout(a,Object.assign(Object.assign(Object.assign({},this.presetOptions),i),{animation:!1}),r)}return t})}stepLayout(e,t,r){return _u(this,void 0,void 0,function*(){return AR(t)?yield this.treeLayout(e,t,r):yield this.graphLayout(e,t,r)})}graphLayout(e,t,r){return _u(this,void 0,void 0,function*(){const{animation:i,enableWorker:a,iterations:s=300}=t,o=this.initGraphLayout(t);if(!o)return{};if(this.instances[r]=o,this.instance=o,a){const u=o;return this.supervisor=new tz(u.graphData2LayoutModel(e),u.instance,{iterations:s}),Wf(yield this.supervisor.execute())}if(S0(o))return i?yield o.execute(e,{onTick:u=>{this.updateElementPosition(u,!1)}}):(o.execute(e),o.stop(),o.tick(s));const l=yield o.execute(e);if(i){const u=this.updateElementPosition(l,i);yield u==null?void 0:u.finished}return l})}treeLayout(e,t,r){return _u(this,void 0,void 0,function*(){const{type:i,animation:a}=t,s=Ys("layout",i);if(!s)return{};const{nodes:o=[],edges:l=[]}=e,u=new hi({nodes:o.map(F=>({id:yt(F),data:F.data||{}})),edges:l.map(F=>({id:yt(F),source:F.source,target:F.target,data:F.data||{}}))});W8(u);const h={nodes:[],edges:[]},v={nodes:[],edges:[]};u.getRoots(Da).forEach(F=>{vl(F,te=>{te.children=u.getSuccessors(te.id)},te=>u.getSuccessors(te.id),"TB");const G=s(F,t),{x:H,y:K,z:q=0}=G;vl(G,te=>{const{id:ue,x:le,y:he,z:ve=0}=te;h.nodes.push({id:ue,style:{x:H,y:K,z:q}}),v.nodes.push({id:ue,style:{x:le,y:he,z:ve}})},te=>te.children,"TB")});const D=this.inferTreeLayoutOffset(v);if(z2(v,D),a){z2(h,D),this.updateElementPosition(h,!1);const F=this.updateElementPosition(v,a);yield F==null?void 0:F.finished}return v})}inferTreeLayoutOffset(e){var t;let[r,i]=[1/0,-1/0],[a,s]=[1/0,-1/0];(t=e.nodes)===null||t===void 0||t.forEach(G=>{const{x:H=0,y:K=0}=G.style||{};r=Math.min(r,H),i=Math.max(i,H),a=Math.min(a,K),s=Math.max(s,K)});const{canvas:o}=this.context,l=o.getSize(),[u,h]=o.getCanvasByViewport([0,0]),[v,E]=o.getCanvasByViewport(l);if(r>=u&&i<=v&&a>=h&&s<=E)return[0,0];const D=(u+v)/2,F=(h+E)/2;return[D-(r+i)/2,F-(a+s)/2]}stopLayout(){this.instance&&S0(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(e){const{nodeFilter:t=()=>!0,preLayout:r=!1,isLayoutInvisibleNodes:i=!1}=e,{nodes:a,edges:s,combos:o}=this.context.model.getData(),{element:l,model:u}=this.context,h=G=>l.getElement(G),v=r?G=>{var H;return!i&&(((H=G.style)===null||H===void 0?void 0:H.visibility)==="hidden"||u.getAncestorsData(G.id,Da).some(ba)||u.getAncestorsData(G.id,Dr).some(ba))?!1:t(G)}:G=>{const H=yt(G),K=h(H);return!K||Df(K)?!1:t(G)},E=a.filter(v),D=new Map(E.map(G=>[yt(G),G]));o.forEach(G=>D.set(yt(G),G));const F=s.filter(({source:G,target:H})=>D.has(G)&&D.has(H));return{nodes:E,edges:F,combos:o}}initGraphLayout(e){var t;const{element:r,viewport:i}=this.context,{type:a,enableWorker:s,animation:o,iterations:l}=e,u=nz(e,["type","enableWorker","animation","iterations"]),[h,v]=i.getCanvasSize(),E=[h/2,v/2],D=(t=e==null?void 0:e.nodeSize)!==null&&t!==void 0?t:q=>{const te=r==null?void 0:r.getElement(q.id);return te?te.attributes.size:r==null?void 0:r.getElementComputedStyle("node",q).size},F=Ys("layout",a);if(!F)return xa.warn(`The layout of ${a} is not registered.`);const G=Object.getPrototypeOf(F.prototype)===Uf.prototype?F:SR(F,this.context),H=new G(this.context),K={nodeSize:D,width:h,height:v,center:E};switch(H.id){case"d3-force":case"d3-force-3d":Object.assign(K,{center:{x:h/2,y:v/2,z:0}});break;default:break}return ia(H.options,K,u),H}updateElementPosition(e,t){const{model:r,element:i}=this.context;return i?(r.updateData(e),i.draw({animation:t,silence:!0})):null}destroy(){var e;this.stopLayout(),this.context={},(e=this.supervisor)===null||e===void 0||e.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const z2=(n,e)=>{var t;const[r,i]=e;(t=n.nodes)===null||t===void 0||t.forEach(a=>{if(a.style){const{x:s=0,y:o=0}=a.style;a.style.x=s+r,a.style.y=o+i}else a.style={x:r,y:i}})};function iz(n){return[az].reduce((t,r)=>r(t),n)}function az(n){return!n.layout||Array.isArray(n.layout)||"preLayout"in n.layout||["antv-dagre","combo-combined","compact-box","circular","concentric","dagre","fishbone","grid","indented","mds","radial","random","snake","dendrogram","mindmap"].includes(n.layout.type)&&(n.layout.preLayout=!0),n}class sz extends Lg{constructor(e){super(e),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(e){this.setExtensions(e)}getPluginInstance(e){const t=this.extensionMap[e];if(t)return t;xa.warn(`Cannot find the plugin ${e}, will try to find it by type.`);const r=this.extensions.find(i=>i.type===e);if(r)return this.extensionMap[r.key]}}const nv=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class oz extends Lg{constructor(e){super(e),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(e){this.setExtensions([...nv.slice(0,nv.length-1),...e,nv[nv.length-1]])}getTransformInstance(e){return e?this.extensionMap[e]:this.extensionMap}}var Fc=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class lz{get padding(){return cs(this.context.options.padding)}get paddingOffset(){const[e,t,r,i]=this.padding,[a,s,o]=[(i-t)/2,(e-r)/2,0];return[a,s,o]}constructor(e){this.landmarkCounter=0,this.context=e;const[t,r]=this.paddingOffset,{zoom:i,rotation:a,x:s=t,y:o=r}=e.options;this.transform({mode:"absolute",scale:i,translate:[s,o],rotate:a},!1)}get camera(){const{canvas:e}=this.context;return new Proxy(e.getCamera(),{get:(t,r)=>{const a=Object.entries(e.getLayers()).filter(([o])=>!["main"].includes(o)).map(([,o])=>o.getCamera()),s=t[r];if(typeof s=="function")return(...o)=>{const l=s.apply(t,o);return a.forEach(u=>{u[r].apply(u,o)}),l}}})}createLandmark(e){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,e)}getAnimation(e){const t=a_(this.context.options,e);return t?ml(Object.assign({},t),["easing","duration"]):!1}getCanvasSize(){const{canvas:e}=this.context,{width:t=0,height:r=0}=e.getConfig();return[t,r]}getCanvasCenter(){const{canvas:e}=this.context,{width:t=0,height:r=0}=e.getConfig();return[t/2,r/2,0]}getViewportCenter(){const[e,t]=this.camera.getPosition();return[e,t,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(e){const{camera:t}=this,{mode:r,translate:i=[]}=e,a=this.getZoom(),s=t.getPosition(),o=t.getFocalPoint(),[l,u]=this.getCanvasCenter(),[h=0,v=0,E=0]=i,D=vs([-h,-v,-E],a);return r==="relative"?{position:zn(s,D),focalPoint:zn(o,D)}:{position:zn([l,u,s[2]],D),focalPoint:zn([l,u,o[2]],D)}}getRotateOptions(e){const{mode:t,rotate:r=0}=e;return{roll:t==="relative"?this.camera.getRoll()+r:r}}getZoomOptions(e){const{zoomRange:t}=this.context.options,r=this.camera.getZoom(),{mode:i,scale:a=1}=e;return Qr(i==="relative"?r*a:a,...t)}transform(e,t){return Fc(this,void 0,void 0,function*(){const{graph:r}=this.context,{translate:i,rotate:a,scale:s,origin:o}=e;this.cancelAnimation();const l=this.getAnimation(t);if(Pi(r,new Yd(Zt.BEFORE_TRANSFORM,e)),!a&&s&&!i&&o&&!l){this.camera.setZoomByViewportPoint(this.getZoomOptions(e),o),Pi(r,new Yd(Zt.AFTER_TRANSFORM,e));return}const u={};if(i&&Object.assign(u,this.getTranslateOptions(e)),sn(a)&&Object.assign(u,this.getRotateOptions(e)),sn(s)&&Object.assign(u,{zoom:this.getZoomOptions(e)}),l)return Pi(r,new ts(Zt.BEFORE_ANIMATE,Ea.TRANSFORM,null,e)),new Promise(h=>{this.transformResolver=h,this.camera.gotoLandmark(this.createLandmark(u),Object.assign(Object.assign({},l),{onfinish:()=>{Pi(r,new ts(Zt.AFTER_ANIMATE,Ea.TRANSFORM,null,e)),Pi(r,new Yd(Zt.AFTER_TRANSFORM,e)),this.transformResolver=void 0,h()}}))});this.camera.gotoLandmark(this.createLandmark(u),{duration:0}),Pi(r,new Yd(Zt.AFTER_TRANSFORM,e))})}fitView(e,t){return Fc(this,void 0,void 0,function*(){const[r,i,a,s]=this.padding,{when:o="always",direction:l="both"}=e||{},[u,h]=this.context.canvas.getSize(),v=u-s-i,E=h-r-a,D=this.context.canvas.getBounds(),F=this.getBBoxInViewport(D),[G,H]=bo(F),K=l==="x"&&G>=v||l==="y"&&H>=E||l==="both"&&G>=v&&H>=E;if(o==="overflow"&&!K)return yield this.fitCenter({animation:t});const q=v/G,te=E/H,ue=l==="x"?q:l==="y"?te:Math.min(q,te),le=this.getAnimation(t);yield this.transform({mode:"relative",scale:ue,translate:zn(Pr(this.getCanvasCenter(),this.getBBoxInViewport(D).center),vs(this.paddingOffset,ue))},le)})}fitCenter(e){return Fc(this,void 0,void 0,function*(){const t=this.context.canvas.getBounds();yield this.focus(t,e)})}focusElements(e){return Fc(this,arguments,void 0,function*(t,r={}){const{element:i}=this.context;if(!i)return;const a=o=>r.shapes?o.getShape(r.shapes).getRenderBounds():o.getRenderBounds(),s=$u(t.map(o=>a(i.getElement(o))));yield this.focus(s,r)})}focus(e,t){return Fc(this,void 0,void 0,function*(){const r=this.context.graph.getViewportByCanvas(e.center),i=t.position||this.getCanvasCenter(),a=Pr(i,r);yield this.transform({mode:"relative",translate:zn(a,this.paddingOffset)},t.animation)})}getBBoxInViewport(e){const{min:t,max:r}=e,{graph:i}=this.context,[a,s]=i.getViewportByCanvas(t),[o,l]=i.getViewportByCanvas(r),u=new Ir;return u.setMinMax([a,s,0],[o,l,0]),u}isInViewport(e,t=!1,r=0){const{graph:i}=this.context,a=this.getCanvasSize(),[s,o]=i.getCanvasByViewport([0,0]),[l,u]=i.getCanvasByViewport(a);let h=new Ir;return h.setMinMax([s,o,0],[l,u,0]),r&&(h=Mo(h,r)),Jl(e)?hs(e,h):t?KP(e,h):h.intersects(e)}cancelAnimation(){var e,t;!((e=this.camera.landmarks)===null||e===void 0)&&e.length&&this.camera.cancelLandmarkAnimation(),(t=this.transformResolver)===null||t===void 0||t.call(this)}}var Br=function(n,e,t,r){function i(a){return a instanceof t?a:new t(function(s){s(a)})}return new(t||(t=Promise))(function(a,s){function o(h){try{u(r.next(h))}catch(v){s(v)}}function l(h){try{u(r.throw(h))}catch(v){s(v)}}function u(h){h.done?a(h.value):i(h.value).then(o,l)}u((r=r.apply(n,e||[])).next())})};class rv extends Ff{constructor(e){var t;super(),this.options={},this.rendered=!1,this.destroyed=!1,this.context={model:new G8},this.isCollapsingExpanding=!1,this.onResize=vc(()=>{this.resize()},300),this._setOptions(Object.assign({},rv.defaultOptions,e),!0),this.context.graph=this,this.options.autoResize&&((t=globalThis.addEventListener)===null||t===void 0||t.call(globalThis,"resize",this.onResize))}getOptions(){return this.options}setOptions(e){this._setOptions(e,!1)}_setOptions(e,t){if(this.updateCanvas(e),Object.assign(this.options,iz(e)),t){const{data:E}=e;E&&this.addData(E);return}const{behaviors:r,combo:i,data:a,edge:s,layout:o,node:l,plugins:u,theme:h,transforms:v}=e;r&&this.setBehaviors(r),a&&this.setData(a),l&&this.setNode(l),s&&this.setEdge(s),i&&this.setCombo(i),o&&this.setLayout(o),h&&this.setTheme(h),u&&this.setPlugins(u),v&&this.setTransforms(v)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(e,t){e&&(this.options.width=e),t&&(this.options.height=t),this.resize(e,t)}setZoomRange(e){this.options.zoomRange=e}getZoomRange(){return this.options.zoomRange}setNode(e){this.options.node=e,this.context.model.refreshData()}setEdge(e){this.options.edge=e,this.context.model.refreshData()}setCombo(e){this.options.combo=e,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(e){this.options.theme=fn(e)?e(this.getTheme()):e}setLayout(e){this.options.layout=fn(e)?e(this.getLayout()):e}getLayout(){return this.options.layout}setBehaviors(e){var t;this.options.behaviors=fn(e)?e(this.getBehaviors()):e,(t=this.context.behavior)===null||t===void 0||t.setBehaviors(this.options.behaviors)}updateBehavior(e){this.setBehaviors(t=>t.map(r=>typeof r=="object"&&r.key===e.key?Object.assign(Object.assign({},r),e):r))}getBehaviors(){return this.options.behaviors||[]}setPlugins(e){var t;this.options.plugins=fn(e)?e(this.getPlugins()):e,(t=this.context.plugin)===null||t===void 0||t.setPlugins(this.options.plugins)}updatePlugin(e){this.setPlugins(t=>t.map(r=>typeof r=="object"&&r.key===e.key?Object.assign(Object.assign({},r),e):r))}getPlugins(){return this.options.plugins||[]}getPluginInstance(e){return this.context.plugin.getPluginInstance(e)}setTransforms(e){var t;this.options.transforms=fn(e)?e(this.getTransforms()):e,(t=this.context.transform)===null||t===void 0||t.setTransforms(this.options.transforms)}updateTransform(e){this.setTransforms(t=>t.map(r=>typeof r=="object"&&r.key===e.key?Object.assign(Object.assign({},r),e):r)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}getElementData(e){return Array.isArray(e)?e.map(t=>this.context.model.getElementDataById(t)):this.context.model.getElementDataById(e)}getNodeData(e){return e===void 0?this.context.model.getNodeData():Array.isArray(e)?this.context.model.getNodeData(e):this.context.model.getNodeLikeDatum(e)}getEdgeData(e){return e===void 0?this.context.model.getEdgeData():Array.isArray(e)?this.context.model.getEdgeData(e):this.context.model.getEdgeDatum(e)}getComboData(e){return e===void 0?this.context.model.getComboData():Array.isArray(e)?this.context.model.getComboData(e):this.context.model.getNodeLikeDatum(e)}setData(e){this.context.model.setData(fn(e)?e(this.getData()):e)}addData(e){this.context.model.addData(fn(e)?e(this.getData()):e)}addNodeData(e){this.context.model.addNodeData(fn(e)?e(this.getNodeData()):e)}addEdgeData(e){this.context.model.addEdgeData(fn(e)?e(this.getEdgeData()):e)}addComboData(e){this.context.model.addComboData(fn(e)?e(this.getComboData()):e)}addChildrenData(e,t){this.context.model.addChildrenData(e,t)}updateData(e){this.context.model.updateData(fn(e)?e(this.getData()):e)}updateNodeData(e){this.context.model.updateNodeData(fn(e)?e(this.getNodeData()):e)}updateEdgeData(e){this.context.model.updateEdgeData(fn(e)?e(this.getEdgeData()):e)}updateComboData(e){this.context.model.updateComboData(fn(e)?e(this.getComboData()):e)}removeData(e){this.context.model.removeData(fn(e)?e(this.getData()):e)}removeNodeData(e){this.context.model.removeNodeData(fn(e)?e(this.getNodeData()):e)}removeEdgeData(e){this.context.model.removeEdgeData(fn(e)?e(this.getEdgeData()):e)}removeComboData(e){this.context.model.removeComboData(fn(e)?e(this.getComboData()):e)}getElementType(e){return this.context.model.getElementType(e)}getRelatedEdgesData(e,t="both"){return this.context.model.getRelatedEdgesData(e,t)}getNeighborNodesData(e){return this.context.model.getNeighborNodesData(e)}getAncestorsData(e,t){return this.context.model.getAncestorsData(e,t)}getParentData(e,t){return this.context.model.getParentData(e,t)}getChildrenData(e){return this.context.model.getChildrenData(e)}getDescendantsData(e){return this.context.model.getDescendantsData(e)}getElementDataByState(e,t){return this.context.model.getElementDataByState(e,t)}initCanvas(){return Br(this,void 0,void 0,function*(){var e;if(this.context.canvas)return yield this.context.canvas.ready;const{container:t="container",width:r,height:i,renderer:a,cursor:s,background:o,canvas:l,devicePixelRatio:u=(e=globalThis.devicePixelRatio)!==null&&e!==void 0?e:1}=this.options;if(t instanceof w2)this.context.canvas=t,s&&t.setCursor(s),a&&t.setRenderer(a),yield t.ready;else{const h=fr(t)?document.getElementById(t):t,v=T2(h);this.emit(Zt.BEFORE_CANVAS_INIT,{container:h,width:r,height:i});const E=Object.assign(Object.assign({},l),{container:h,width:r||v[0],height:i||v[1],background:o,renderer:a,cursor:s,devicePixelRatio:u}),D=new w2(E);this.context.canvas=D,yield D.ready,this.emit(Zt.AFTER_CANVAS_INIT,{canvas:D})}})}updateCanvas(e){var t,r;const{renderer:i,cursor:a,height:s,width:o}=e,l=this.context.canvas;l&&(i&&(this.emit(Zt.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),l.setRenderer(i),this.emit(Zt.AFTER_RENDERER_CHANGE,{renderer:i})),a&&l.setCursor(a),(sn(o)||sn(s))&&this.setSize((t=o!=null?o:this.options.width)!==null&&t!==void 0?t:0,(r=s!=null?s:this.options.height)!==null&&r!==void 0?r:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new k8(this.context)),this.context.plugin||(this.context.plugin=new sz(this.context)),this.context.viewport||(this.context.viewport=new lz(this.context)),this.context.transform||(this.context.transform=new oz(this.context)),this.context.element||(this.context.element=new H8(this.context)),this.context.animation||(this.context.animation=new B8(this.context)),this.context.layout||(this.context.layout=new rz(this.context)),this.context.behavior||(this.context.behavior=new F8(this.context))}prepare(){return Br(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed)throw new Error(Qs("The graph instance has been destroyed"));yield this.initCanvas(),this.initRuntime()})}render(){return Br(this,void 0,void 0,function*(){if(yield this.prepare(),Pi(this,new _i(Zt.BEFORE_RENDER)),this.options.layout)if(!this.rendered&&TR(this.options.layout)){const e=yield this.context.element.preLayoutDraw({type:"render"});yield Promise.all([e==null?void 0:e.finished,this.autoFit()])}else{const e=this.context.element.draw({type:"render"});yield Promise.all([e==null?void 0:e.finished,this.context.layout.postLayout()]),yield this.autoFit()}else{const e=this.context.element.draw({type:"render"});yield Promise.all([e==null?void 0:e.finished,this.autoFit()])}this.rendered=!0,Pi(this,new _i(Zt.AFTER_RENDER))})}draw(){return Br(this,void 0,void 0,function*(){var e;yield this.prepare(),yield(e=this.context.element.draw())===null||e===void 0?void 0:e.finished})}layout(e){return Br(this,void 0,void 0,function*(){yield this.context.layout.postLayout(e)})}stopLayout(){this.context.layout.stopLayout()}clear(){return Br(this,void 0,void 0,function*(){const{model:e,element:t}=this.context;e.setData({}),e.clearChanges(),t==null||t.clear()})}destroy(){var e;Pi(this,new _i(Zt.BEFORE_DESTROY));const{layout:t,animation:r,element:i,model:a,canvas:s,behavior:o,plugin:l}=this.context;l==null||l.destroy(),o==null||o.destroy(),t==null||t.destroy(),r==null||r.destroy(),i==null||i.destroy(),a.destroy(),s==null||s.destroy(),this.options={},this.context={},this.off(),(e=globalThis.removeEventListener)===null||e===void 0||e.call(globalThis,"resize",this.onResize),this.destroyed=!0,Pi(this,new _i(Zt.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(e,t){var r;const i=T2((r=this.context.canvas)===null||r===void 0?void 0:r.getContainer()),a=[e||i[0],t||i[1]];if(!this.context.canvas)return;const s=this.context.canvas.getSize();li(a,s)||(Pi(this,new _i(Zt.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),Pi(this,new _i(Zt.AFTER_SIZE_CHANGE,{size:a})))}fitView(e,t){return Br(this,void 0,void 0,function*(){var r;yield(r=this.context.viewport)===null||r===void 0?void 0:r.fitView(e,t)})}fitCenter(e){return Br(this,void 0,void 0,function*(){var t;yield(t=this.context.viewport)===null||t===void 0?void 0:t.fitCenter({animation:e})})}autoFit(){return Br(this,void 0,void 0,function*(){const{autoFit:e}=this.context.options;if(e)if(fr(e))e==="view"?yield this.fitView():e==="center"&&(yield this.fitCenter());else{const{type:t,animation:r}=e;t==="view"?yield this.fitView(e.options,r):t==="center"&&(yield this.fitCenter(r))}})}focusElement(e,t){return Br(this,void 0,void 0,function*(){var r;yield(r=this.context.viewport)===null||r===void 0?void 0:r.focusElements(Array.isArray(e)?e:[e],{animation:t})})}zoomBy(e,t,r){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:e,origin:r},t)})}zoomTo(e,t,r){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",scale:e,origin:r},t)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(e,t,r){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:e,origin:r},t)})}rotateTo(e,t,r){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:e,origin:r},t)})}getRotation(){return this.context.viewport.getRotation()}translateBy(e,t){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:e},t)})}translateTo(e,t){return Br(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:e},t)})}getPosition(){return Pr([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(e,t){return Br(this,arguments,void 0,function*(r,i,a=!0){var s,o;const[l,u]=si(r)?[r,(s=i)!==null&&s!==void 0?s:!0]:[{[r]:i},a];Object.entries(l).forEach(([h,v])=>this.context.model.translateNodeLikeBy(h,v)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}translateElementTo(e,t){return Br(this,arguments,void 0,function*(r,i,a=!0){var s,o;const[l,u]=si(r)?[r,(s=i)!==null&&s!==void 0?s:!0]:[{[r]:i},a];Object.entries(l).forEach(([h,v])=>this.context.model.translateNodeLikeTo(h,v)),yield(o=this.context.element.draw({animation:u,stage:"translate"}))===null||o===void 0?void 0:o.finished})}getElementPosition(e){return this.context.model.getElementPosition(e)}getElementRenderStyle(e){return N0(this.context.element.getElement(e).attributes,["context"])}setElementVisibility(e,t){return Br(this,arguments,void 0,function*(r,i,a=!0){var s,o;const[l,u]=si(r)?[r,(s=i)!==null&&s!==void 0?s:!0]:[{[r]:i},a],h={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([D,F])=>{const G=this.getElementType(D);h[`${G}s`].push({id:D,style:{visibility:F}})});const{model:v,element:E}=this.context;v.preventUpdateNodeLikeHierarchy(()=>{v.updateData(h)}),yield(o=E.draw({animation:u,stage:"visibility"}))===null||o===void 0?void 0:o.finished})}showElement(e,t){return Br(this,void 0,void 0,function*(){const r=Array.isArray(e)?e:[e];yield this.setElementVisibility(Object.fromEntries(r.map(i=>[i,"visible"])),t)})}hideElement(e,t){return Br(this,void 0,void 0,function*(){const r=Array.isArray(e)?e:[e];yield this.setElementVisibility(Object.fromEntries(r.map(i=>[i,"hidden"])),t)})}getElementVisibility(e){var t,r;const i=this.context.element.getElement(e);return(r=(t=i==null?void 0:i.style)===null||t===void 0?void 0:t.visibility)!==null&&r!==void 0?r:"visible"}setElementZIndex(e,t){return Br(this,void 0,void 0,function*(){var r;const i={nodes:[],edges:[],combos:[]},a=si(e)?e:{[e]:t};Object.entries(a).forEach(([l,u])=>{const h=this.getElementType(l);i[`${h}s`].push({id:l,style:{zIndex:u}})});const{model:s,element:o}=this.context;s.preventUpdateNodeLikeHierarchy(()=>s.updateData(i)),yield(r=o.draw({animation:!1,stage:"zIndex"}))===null||r===void 0?void 0:r.finished})}frontElement(e){return Br(this,void 0,void 0,function*(){const t=Array.isArray(e)?e:[e],{model:r}=this.context,i={};t.map(a=>{const s=r.getFrontZIndex(a);if(r.getElementType(a)==="combo"){const l=r.getAncestorsData(a,Dr).at(-1)||this.getComboData(a),u=[l,...r.getDescendantsData(yt(l))],h=s-S2(l);u.forEach(E=>{i[yt(E)]=this.getElementZIndex(yt(E))+h});const{internal:v}=r0(u.map(yt),E=>r.getRelatedEdgesData(E));v.forEach(E=>{const D=yt(E);i[D]=this.getElementZIndex(D)+h})}else i[a]=s}),yield this.setElementZIndex(i)})}getElementZIndex(e){return S2(this.context.model.getElementDataById(e))}setElementState(e,t){return Br(this,arguments,void 0,function*(r,i,a=!0){var s,o;const[l,u]=si(r)?[r,(s=i)!==null&&s!==void 0?s:!0]:[{[r]:i},a],h=E=>E?Array.isArray(E)?E:[E]:[],v={nodes:[],edges:[],combos:[]};Object.entries(l).forEach(([E,D])=>{const F=this.getElementType(E);v[`${F}s`].push({id:E,states:h(D)})}),this.updateData(v),yield(o=this.context.element.draw({animation:u,stage:"state"}))===null||o===void 0?void 0:o.finished})}getElementState(e){return this.context.model.getElementState(e)}getElementRenderBounds(e){return this.context.element.getElement(e).getRenderBounds()}collapseElement(e){return Br(this,arguments,void 0,function*(t,r=!0){const{model:i,element:a}=this.context;if(ba(i.getNodeLikeData([t])[0])||this.isCollapsingExpanding)return;typeof r=="boolean"&&(r={animation:r,align:!0});const s=i.getElementType(t);yield this.frontElement(t),this.isCollapsingExpanding=!0,this.setElementCollapsibility(t,!0),s==="node"?yield a.collapseNode(t,r):s==="combo"&&(yield a.collapseCombo(t,!!r.animation)),this.isCollapsingExpanding=!1})}expandElement(e){return Br(this,arguments,void 0,function*(t,r=!0){const{model:i,element:a}=this.context;if(!ba(i.getNodeLikeData([t])[0])||this.isCollapsingExpanding)return;typeof r=="boolean"&&(r={animation:r,align:!0});const s=i.getElementType(t);this.isCollapsingExpanding=!0,this.setElementCollapsibility(t,!1),s==="node"?yield a.expandNode(t,r):s==="combo"&&(yield a.expandCombo(t,!!r.animation)),this.isCollapsingExpanding=!1})}setElementCollapsibility(e,t){const r=this.getElementType(e);r==="node"?this.updateNodeData([{id:e,style:{collapsed:t}}]):r==="combo"&&this.updateComboData([{id:e,style:{collapsed:t}}])}toDataURL(){return Br(this,arguments,void 0,function*(e={}){return this.context.canvas.toDataURL(e)})}getCanvasByViewport(e){return this.context.canvas.getCanvasByViewport(e)}getViewportByCanvas(e){return this.context.canvas.getViewportByCanvas(e)}getClientByCanvas(e){return this.context.canvas.getClientByCanvas(e)}getCanvasByClient(e){return this.context.canvas.getCanvasByClient(e)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(e,t,r){return super.on(e,t,r)}once(e,t){return super.once(e,t)}off(e,t){return super.off(e,t)}}rv.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var uz=function(n,e){var t={};for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&e.indexOf(r)<0&&(t[r]=n[r]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(n);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(n,r[i])&&(t[r[i]]=n[r[i]]);return t};function cz(n,e){const{getNodeData:t=(o,l)=>{if(o.depth=l,!o.children)return o;const{children:u}=o,h=uz(o,["children"]);return Object.assign(Object.assign({},h),{children:u.map(v=>v.id)})},getEdgeData:r=(o,l)=>({source:o.id,target:l.id}),getChildren:i=o=>o.children||[]}=e||{},a=[],s=[];return vl(n,(o,l)=>{a.push(t(o,l));const u=i(o);for(const h of u)s.push(r(o,h))},o=>i(o),"TB"),{nodes:a,edges:s}}class hz extends Uo{beforeDraw(e){const{add:t,update:r}=e,{model:i}=this.context;return[...t.edges.entries(),...r.edges.entries()].forEach(([,a])=>{U2(i,a)}),e}}const U2=(n,e)=>{const{source:t,target:r}=e,i=n.getElementDataById(t),a=n.getElementDataById(r),s=K1(i,v=>n.getParentData(v,Dr)),o=K1(a,v=>n.getParentData(v,Dr)),l=yt(s),u=yt(o),h={sourceNode:l,targetNode:u};return e.style?Object.assign(e.style,h):e.style=h,e},fz=(n,e,t)=>{const[r,i]=e,[a,s]=t;if(i===r)return a;const o=(n-r)/(i-r);return a+o*(s-a)},dz=(n,e,t)=>{const[r,i]=e,[a,s]=t,o=Math.log(n-r+1)/Math.log(i-r+1);return a+o*(s-a)},vz=(n,e,t,r=2)=>{const[i,a]=e,[s,o]=t,l=Math.pow((n-i)/(a-i),r);return s+l*(o-s)},gz=(n,e,t)=>{const[r,i]=e,[a,s]=t,o=Math.sqrt((n-r)/(i-r));return a+o*(s-a)};class iv extends Uo{constructor(e,t){super(e,ia({},iv.defaultOptions,t)),this.assignSizeByCentrality=(r,i,a,s,o,l)=>{const u=[i,a],h=[s[0],o[0]],v=[s[1],o[1]],E=[s[2],o[2]],D=(F,G)=>{if(typeof l=="function")return l(F,u,G);switch(l){case"linear":return fz(F,u,G);case"log":return dz(F,u,G);case"pow":return vz(F,u,G,2);case"sqrt":return gz(F,u,G);default:return G[0]}};return[D(r,h),D(r,v),D(r,E)]}}beforeDraw(e){const{model:t}=this.context,r=t.getNodeData(),i=Ra(this.options.maxSize),a=Ra(this.options.minSize),s=this.getCentralities(this.options.centrality),o=s.size>0?Math.max(...s.values()):0,l=s.size>0?Math.min(...s.values()):0;return r.forEach(u=>{var h;const v=this.assignSizeByCentrality(s.get(yt(u))||0,l,o,a,i,this.options.scale),E=(h=this.context.element)===null||h===void 0?void 0:h.getElement(yt(u)),D={size:v};this.assignLabelStyle(D,v,u,E),(!E||!Kd(D,E.attributes))&&Fa(e,E?"update":"add","node",ia(u,{style:D}),!0)}),e}assignLabelStyle(e,t,r,i){var a;const s=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",r);if(Object.assign(e,ml(s,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const o=this.getLabelSizeByNodeSize(t,1/0,Number(e.labelFontSize));Object.assign(e,{labelFontSize:o,labelLineHeight:o+ZP(e.labelPadding)})}return e}getLabelSizeByNodeSize(e,t,r){const i=Math.min(...e)/2,[a,s]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[r,t];return Math.min(s,Math.max(i,a))}getCentralities(e){const{model:t}=this.context,r=t.getData();if(typeof e=="function")return e(r);const i=t.getRelatedEdgesData.bind(t);return Q_(r,i,e)}}iv.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class av extends Uo{constructor(e,t){super(e,Object.assign({},av.defaultOptions,t))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var e;const t=Ti(this.ref),{graph:r,model:i}=this.context;(e=i.getData().nodes)===null||e===void 0||e.forEach(s=>{var o;if(yt(s)===yt(this.ref))return;const l=e1(Pr(Ti(s),t)),u=Math.abs(l)>Math.PI/2,h=!s.children||s.children.length===0,v=yt(s),E=(o=this.context.element)===null||o===void 0?void 0:o.getElement(v);if(!E||!E.isVisible())return;const D=Ra(r.getElementRenderStyle(v).size)[0]/2,F=(h?1:-1)*(D+this.options.offset),G=[["translate",F*Math.cos(l),F*Math.sin(l)],["rotate",u?pa(l)+180:pa(l)]];i.updateNodeData([{id:yt(s),style:{labelTextAlign:u===h?"right":"left",labelTextBaseline:"middle",labelTransform:G}}])}),r.draw()}}av.defaultOptions={offset:5};const pz="quadratic",W2=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class sv extends Uo{constructor(e,t){super(e,Object.assign({},sv.defaultOptions,t)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=r=>{const{add:{edges:i},update:{nodes:a,edges:s,combos:o},remove:{edges:l}}=r,{model:u}=this.context,h=new Map,v=(F,G)=>{u.getRelatedEdgesData(G).forEach(K=>!h.has(yt(K))&&h.set(yt(K),K))};a.forEach(v),o.forEach(v);const E=F=>{const G=u.getEdgeData().map(K=>U2(u,K));mz(F,G,!0).forEach(K=>!h.has(yt(K))&&h.set(yt(K),K))};if(l.size&&l.forEach(E),i.size&&i.forEach(E),s.size){const F=Fx(W0(u.getChanges())).update.edges;s.forEach(G=>{var H;E(G);const K=(H=F.find(q=>yt(q.value)===yt(G)))===null||H===void 0?void 0:H.original;K&&!Rp(G,K)&&E(K)})}Fs(this.options.edges)||h.forEach((F,G)=>!this.options.edges.includes(G)&&h.delete(G));const D=u.getEdgeData().map(yt);return new Map([...h].sort((F,G)=>D.indexOf(F[0])-D.indexOf(G[0])))},this.applyBundlingStyle=(r,i,a)=>{const{edgeMap:s,reverses:o}=G2(i);s.forEach(l=>{l.forEach((u,h,v)=>{var E;const D=v.length,F=u.style||{};if(u.source===u.target){const K=W2.length;F.loopPlacement=W2[h%K],F.loopDist=Math.floor(h/K)*a+50}else if(D===1)F.curveOffset=0;else{const K=(h%2===0?1:-1)*(o[`${u.source}|${u.target}|${h}`]?-1:1);F.curveOffset=D%2===1?K*Math.ceil(h/2)*a*2:K*(Math.floor(h/2)*a*2+a)}const G=Object.assign(u,{type:pz,style:F}),H=(E=this.context.element)===null||E===void 0?void 0:E.getElement(yt(u));(!H||!Kd(G.style,H.attributes))&&Fa(r,H?"update":"add","edge",G,!0)})})},this.resetEdgeStyle=r=>{const i=r.style||{},a=this.cacheMergeStyle.get(yt(r))||{};return Object.keys(a).forEach(s=>{li(i[s],a[s])&&(r[s]?i[s]=r[s]:delete i[s])}),Object.assign(r,{style:i})},this.applyMergingStyle=(r,i)=>{const{edgeMap:a,reverses:s}=G2(i);a.forEach(o=>{var l;if(o.length===1){const h=o[0],v=(l=this.context.element)===null||l===void 0?void 0:l.getElement(yt(h)),E=this.resetEdgeStyle(h);(!v||!Kd(E,v.attributes))&&Fa(r,v?"update":"add","edge",E);return}const u=o.map(({source:h,target:v,style:E={}},D)=>{const{startArrow:F,endArrow:G}=E,H={},[K,q]=s[`${h}|${v}|${D}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return Ru(F)&&(H[K]=F),Ru(G)&&(H[q]=G),H}).reduce((h,v)=>Object.assign(Object.assign({},h),v),{});o.forEach((h,v,E)=>{var D;if(v!==0){Fa(r,"remove","edge",h);return}const F=Object.assign({},fn(this.options.style)?this.options.style(E):this.options.style,{childrenData:E});this.cacheMergeStyle.set(yt(h),F);const G=Object.assign(Object.assign({},h),{type:"line",style:Object.assign(Object.assign(Object.assign({},h.style),u),F)}),H=(D=this.context.element)===null||D===void 0?void 0:D.getElement(yt(h));(!H||!Kd(G.style,H.attributes))&&Fa(r,H?"update":"add","edge",G,!0)})})}}beforeDraw(e){const t=this.getAffectedParallelEdges(e);return t.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(e,t,this.options.distance):this.applyMergingStyle(e,t)),e}}sv.defaultOptions={mode:"bundle",distance:15};const G2=n=>{const e=new Map,t=new Set,r={},i=new Map;for(const[a,s]of n){if(t.has(a))continue;const{source:o,target:l}=s,u=`${o}-${l}`;e.has(u)||(e.set(u,[]),i.set(u,new Set));const h=e.get(u),v=i.get(u);h&&v&&!v.has(a)&&(h.push(s),v.add(a),t.add(a));for(const[E,D]of n)if(!(t.has(E)||E===a)&&Rp(s,D)){const F=e.get(u),G=i.get(u);F&&G&&!G.has(E)&&(F.push(D),G.add(E),o===D.target&&l===D.source&&(r[`${D.source}|${D.target}|${F.length-1}`]=!0),t.add(E))}}return{edgeMap:e,reverses:r}},mz=(n,e,t)=>e.filter(r=>(t||yt(r)!==yt(n))&&Rp(r,n)),Rp=(n,e)=>{const{sourceNode:t,targetNode:r}=n.style||{},{sourceNode:i,targetNode:a}=e.style||{};return t===i&&r===a||t===a&&r===i};class yz extends Uo{beforeDraw(e,t){const{stage:r}=t;if(r==="visibility")return e;const{model:i}=this.context,{update:{nodes:a,edges:s,combos:o}}=e,l=(u,h)=>{i.getRelatedEdgesData(h).forEach(E=>!s.has(yt(E))&&s.set(yt(E),E))};return a.forEach(l),o.forEach(l),e}}const _z={animation:{"combo-collapse":u_,"combo-expand":WP,"node-collapse":o_,"node-expand":zP,"path-in":l_,"path-out":UP,fade:kP,translate:FP},behavior:{"brush-select":ac,"click-select":of,"collapse-expand":Lf,"create-edge":Bf,"drag-canvas":kf,"drag-element-force":OR,"drag-element":gc,"fix-element-size":Gf,"focus-element":Hf,"hover-activate":jf,"lasso-select":DR,"auto-adapt-label":ef,"optimize-viewport-transform":Vf,"scroll-canvas":Zf,"zoom-canvas":Kf},combo:{circle:EL,rect:xL},edge:{cubic:yl,line:Pf,polyline:Of,quadratic:Cf,"cubic-horizontal":Af,"cubic-radial":Tf,"cubic-vertical":Sf},layout:{"antv-dagre":pI,"combo-combined":EN,"compact-box":Xf.compactBox,"d3-force":KN,"force-atlas2":QN,circular:_I,concentric:x0,dagre:ed,dendrogram:Xf.dendrogram,fishbone:rd,force:ex,fruchterman:$N,grid:tB,indented:Xf.indented,mds:ox,mindmap:Xf.mindmap,radial:cB,random:mB,snake:id},node:{circle:gl,diamond:xD,ellipse:ff,hexagon:TD,html:Ef,image:xf,rect:yL,star:_L,donut:cf,triangle:bf},palette:{spectral:bB,tableau:wB,oranges:MB,greens:AB,blues:TB},theme:{dark:M8,light:A8},plugin:{"bubble-sets":vd,"edge-bundling":pd,"edge-filter-lens":md,"grid-line":Ed,background:ad,contextmenu:gd,fisheye:yd,fullscreen:_d,history:xd,hull:Ad,legend:Cd,minimap:Dd,snapline:Ld,timebar:Hd,toolbar:jd,tooltip:Vd,watermark:Zd},transform:{"arrange-draw-order":T8,"collapse-expand-combo":S8,"collapse-expand-node":P8,"get-edge-actual-ends":hz,"map-node-size":iv,"place-radial-labels":av,"process-parallel-edges":sv,"update-related-edges":yz},shape:{circle:Zs,ellipse:Vu,group:Ai,html:Zu,image:Gg,line:al,path:Oa,polygon:sl,polyline:yh,rect:ki,text:ol,label:Po,badge:eu}};function Ez(){Object.entries(_z).forEach(([n,e])=>{Object.entries(e).forEach(([t,r])=>{O8(n,t,r)})})}Ez();const gG={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},13722:function(Se){(function(Y,X){Se.exports=X()})(typeof self!="undefined"?self:this,function(){return function(Ce){var Y={};function X(re){if(Y[re])return Y[re].exports;var V=Y[re]={i:re,l:!1,exports:{}};return Ce[re].call(V.exports,V,V.exports,X),V.l=!0,V.exports}return X.m=Ce,X.c=Y,X.d=function(re,V,b){X.o(re,V)||Object.defineProperty(re,V,{configurable:!1,enumerable:!0,get:b})},X.n=function(re){var V=re&&re.__esModule?function(){return re.default}:function(){return re};return X.d(V,"a",V),V},X.o=function(re,V){return Object.prototype.hasOwnProperty.call(re,V)},X.p="",X(X.s=5)}([function(Ce,Y){function X(re,V,b,U){return U===void 0&&(U="height"),b==="center"?(re[U]+V[U])/2:re.height}Ce.exports={assign:Object.assign,getHeight:X}},function(Ce,Y,X){var re=X(3),V=function(){function b(C,w){w===void 0&&(w={});var y=this;y.options=w,y.rootNode=re(C,w)}var U=b.prototype;return U.execute=function(){throw new Error("please override this method")},b}();Ce.exports=V},function(Ce,Y,X){var re=X(4),V=["LR","RL","TB","BT","H","V"],b=["LR","RL","H"],U=function(T){return b.indexOf(T)>-1},C=V[0];Ce.exports=function(y,T,x){var p=T.direction||C;if(T.isHorizontal=U(p),p&&V.indexOf(p)===-1)throw new TypeError("Invalid direction: "+p);if(p===V[0])x(y,T);else if(p===V[1])x(y,T),y.right2left();else if(p===V[2])x(y,T);else if(p===V[3])x(y,T),y.bottom2top();else if(p===V[4]||p===V[5]){var m=re(y,T),L=m.left,d=m.right;x(L,T),x(d,T),T.isHorizontal?L.right2left():L.bottom2top(),d.translate(L.x-d.x,L.y-d.y),y.x=L.x,y.y=d.y;var g=y.getBoundingBox();T.isHorizontal?g.top<0&&y.translate(0,-g.top):g.left<0&&y.translate(-g.left,0)}var A=T.fixedRoot;return A===void 0&&(A=!0),A&&y.translate(-(y.x+y.width/2+y.hgap),-(y.y+y.height/2+y.vgap)),w(y,T),y};function w(y,T){if(T.radial){var x=T.isHorizontal?["x","y"]:["y","x"],p=x[0],m=x[1],L={x:1/0,y:1/0},d={x:-1/0,y:-1/0},g=0;y.DFTraverse(function(O){g++;var S=O.x,I=O.y;L.x=Math.min(L.x,S),L.y=Math.min(L.y,I),d.x=Math.max(d.x,S),d.y=Math.max(d.y,I)});var A=d[m]-L[m];if(A===0)return;var M=Math.PI*2/g;y.DFTraverse(function(O){var S=(O[m]-L[m])/A*(Math.PI*2-M)+M,I=O[p]-y[p];O.x=Math.cos(S)*I,O.y=Math.sin(S)*I})}}},function(Ce,Y,X){var re=X(0),V=18,b=V*2,U=V,C={getId:function(x){return x.id||x.name},getPreH:function(x){return x.preH||0},getPreV:function(x){return x.preV||0},getHGap:function(x){return x.hgap||U},getVGap:function(x){return x.vgap||U},getChildren:function(x){return x.children},getHeight:function(x){return x.height||b},getWidth:function(x){var p=x.label||" ";return x.width||p.split("").length*V}};function w(T,x){var p=this;if(p.vgap=p.hgap=0,T instanceof w)return T;p.data=T;var m=x.getHGap(T),L=x.getVGap(T);return p.preH=x.getPreH(T),p.preV=x.getPreV(T),p.width=x.getWidth(T),p.height=x.getHeight(T),p.width+=p.preH,p.height+=p.preV,p.id=x.getId(T),p.x=p.y=0,p.depth=0,p.children||(p.children=[]),p.addGap(m,L),p}re.assign(w.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(x,p){var m=this;m.hgap+=x,m.vgap+=p,m.width+=2*x,m.height+=2*p},eachNode:function(x){for(var p=this,m=[p],L;L=m.shift();)x(L),m=L.children.concat(m)},DFTraverse:function(x){this.eachNode(x)},BFTraverse:function(x){for(var p=this,m=[p],L;L=m.shift();)x(L),m=m.concat(L.children)},getBoundingBox:function(){var x={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(p){x.left=Math.min(x.left,p.x),x.top=Math.min(x.top,p.y),x.width=Math.max(x.width,p.x+p.width),x.height=Math.max(x.height,p.y+p.height)}),x},translate:function(x,p){x===void 0&&(x=0),p===void 0&&(p=0),this.eachNode(function(m){m.x+=x,m.y+=p,m.x+=m.preH,m.y+=m.preV})},right2left:function(){var x=this,p=x.getBoundingBox();x.eachNode(function(m){m.x=m.x-(m.x-p.left)*2-m.width}),x.translate(p.width,0)},bottom2top:function(){var x=this,p=x.getBoundingBox();x.eachNode(function(m){m.y=m.y-(m.y-p.top)*2-m.height}),x.translate(0,p.height)}});function y(T,x,p){x===void 0&&(x={}),x=re.assign({},C,x);var m=new w(T,x),L=[m],d;if(!p&&!T.collapsed){for(;d=L.shift();)if(!d.data.collapsed){var g=x.getChildren(d.data),A=g?g.length:0;if(d.children=new Array(A),g&&A)for(var M=0;M<A;M++){var O=new w(g[M],x);d.children[M]=O,L.push(O),O.parent=d,O.depth=d.depth+1}}}return m}Ce.exports=y},function(Ce,Y,X){var re=X(3);Ce.exports=function(V,b){for(var U=re(V.data,b,!0),C=re(V.data,b,!0),w=V.children.length,y=Math.round(w/2),T=b.getSide||function(L,d){return d<y?"right":"left"},x=0;x<w;x++){var p=V.children[x],m=T(p,x);m==="right"?C.children.push(p):U.children.push(p)}return U.eachNode(function(L){L.isRoot()||(L.side="left")}),C.eachNode(function(L){L.isRoot()||(L.side="right")}),{left:U,right:C}}},function(Ce,Y,X){var re={compactBox:X(6),dendrogram:X(8),indented:X(10),mindmap:X(12)};Ce.exports=re},function(Ce,Y,X){function re(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,V(p,m)}function V(p,m){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,d){return L.__proto__=d,L},V(p,m)}var b=X(1),U=X(7),C=X(2),w=X(0),y=function(p){function m(){return p.apply(this,arguments)||this}re(m,p);var L=m.prototype;return L.execute=function(){var g=this;return C(g.rootNode,g.options,U)},m}(b),T={};function x(p,m){return m=w.assign({},T,m),new y(p,m).execute()}Ce.exports=x},function(Ce,Y){function X(w,y,T,x){x===void 0&&(x=[]);var p=this;p.w=w||0,p.h=y||0,p.y=T||0,p.x=0,p.c=x||[],p.cs=x.length,p.prelim=0,p.mod=0,p.shift=0,p.change=0,p.tl=null,p.tr=null,p.el=null,p.er=null,p.msel=0,p.mser=0}X.fromNode=function(w,y){if(!w)return null;var T=[];return w.children.forEach(function(x){T.push(X.fromNode(x,y))}),y?new X(w.height,w.width,w.x,T):new X(w.width,w.height,w.y,T)};function re(w,y,T){T?w.y+=y:w.x+=y,w.children.forEach(function(x){re(x,y,T)})}function V(w,y){var T=y?w.y:w.x;return w.children.forEach(function(x){T=Math.min(V(x,y),T)}),T}function b(w,y){var T=V(w,y);re(w,-T,y)}function U(w,y,T){T?y.y=w.x:y.x=w.x,w.c.forEach(function(x,p){U(x,y.children[p],T)})}function C(w,y,T){T===void 0&&(T=0),y?(w.x=T,T+=w.width):(w.y=T,T+=w.height),w.children.forEach(function(x){C(x,y,T)})}Ce.exports=function(w,y){y===void 0&&(y={});var T=y.isHorizontal;function x(k){if(k.cs===0){p(k);return}x(k.c[0]);for(var W=P(A(k.c[0].el),0,null),z=1;z<k.cs;++z){x(k.c[z]);var Z=A(k.c[z].er);m(k,z,W),W=P(Z,z,W)}S(k),p(k)}function p(k){k.cs===0?(k.el=k,k.er=k,k.msel=k.mser=0):(k.el=k.c[0].el,k.msel=k.c[0].msel,k.er=k.c[k.cs-1].er,k.mser=k.c[k.cs-1].mser)}function m(k,W,z){for(var Z=k.c[W-1],J=Z.mod,ee=k.c[W],$=ee.mod;Z!==null&&ee!==null;){A(Z)>z.low&&(z=z.nxt);var ie=J+Z.prelim+Z.w-($+ee.prelim);ie>0&&($+=ie,L(k,W,z.index,ie));var se=A(Z),ne=A(ee);se<=ne&&(Z=g(Z),Z!==null&&(J+=Z.mod)),se>=ne&&(ee=d(ee),ee!==null&&($+=ee.mod))}!Z&&ee?M(k,W,ee,$):Z&&!ee&&O(k,W,Z,J)}function L(k,W,z,Z){k.c[W].mod+=Z,k.c[W].msel+=Z,k.c[W].mser+=Z,c(k,W,z,Z)}function d(k){return k.cs===0?k.tl:k.c[0]}function g(k){return k.cs===0?k.tr:k.c[k.cs-1]}function A(k){return k.y+k.h}function M(k,W,z,Z){var J=k.c[0].el;J.tl=z;var ee=Z-z.mod-k.c[0].msel;J.mod+=ee,J.prelim-=ee,k.c[0].el=k.c[W].el,k.c[0].msel=k.c[W].msel}function O(k,W,z,Z){var J=k.c[W].er;J.tr=z;var ee=Z-z.mod-k.c[W].mser;J.mod+=ee,J.prelim-=ee,k.c[W].er=k.c[W-1].er,k.c[W].mser=k.c[W-1].mser}function S(k){k.prelim=(k.c[0].prelim+k.c[0].mod+k.c[k.cs-1].mod+k.c[k.cs-1].prelim+k.c[k.cs-1].w)/2-k.w/2}function I(k,W){W+=k.mod,k.x=k.prelim+W,f(k);for(var z=0;z<k.cs;z++)I(k.c[z],W)}function c(k,W,z,Z){if(z!==W-1){var J=W-z;k.c[z+1].shift+=Z/J,k.c[W].shift-=Z/J,k.c[W].change-=Z-Z/J}}function f(k){for(var W=0,z=0,Z=0;Z<k.cs;Z++)W+=k.c[Z].shift,z+=W+k.c[Z].change,k.c[Z].mod+=z}function P(k,W,z){for(;z!==null&&k>=z.low;)z=z.nxt;return{low:k,index:W,nxt:z}}C(w,T);var N=X.fromNode(w,T);return x(N),I(N,0),U(N,w,T),b(w,T),w}},function(Ce,Y,X){function re(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,V(p,m)}function V(p,m){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,d){return L.__proto__=d,L},V(p,m)}var b=X(1),U=X(9),C=X(2),w=X(0),y=function(p){function m(){return p.apply(this,arguments)||this}re(m,p);var L=m.prototype;return L.execute=function(){var g=this;return g.rootNode.width=0,C(g.rootNode,g.options,U)},m}(b),T={};function x(p,m){return m=w.assign({},T,m),new y(p,m).execute()}Ce.exports=x},function(Ce,Y,X){var re=X(0);function V(C,w){C===void 0&&(C=0),w===void 0&&(w=[]);var y=this;y.x=y.y=0,y.leftChild=y.rightChild=null,y.height=0,y.children=w}var b={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function U(C,w,y){y?(w.x=C.x,w.y=C.y):(w.x=C.y,w.y=C.x),C.children.forEach(function(T,x){U(T,w.children[x],y)})}Ce.exports=function(C,w){w===void 0&&(w={}),w=re.assign({},b,w);var y=0;function T(d){if(!d)return null;d.width=0,d.depth&&d.depth>y&&(y=d.depth);var g=d.children,A=g.length,M=new V(d.height,[]);return g.forEach(function(O,S){var I=T(O);M.children.push(I),S===0&&(M.leftChild=I),S===A-1&&(M.rightChild=I)}),M.originNode=d,M.isLeaf=d.isLeaf(),M}function x(d){if(d.isLeaf||d.children.length===0)d.drawingDepth=y;else{var g=d.children.map(function(M){return x(M)}),A=Math.min.apply(null,g);d.drawingDepth=A-1}return d.drawingDepth}var p;function m(d){d.x=d.drawingDepth*w.rankSep,d.isLeaf?(d.y=0,p&&(d.y=p.y+p.height+w.nodeSep,d.originNode.parent!==p.originNode.parent&&(d.y+=w.subTreeSep)),p=d):(d.children.forEach(function(g){m(g)}),d.y=(d.leftChild.y+d.rightChild.y)/2)}var L=T(C);return x(L),m(L),U(L,C,w.isHorizontal),C}},function(Ce,Y,X){function re(L,d){L.prototype=Object.create(d.prototype),L.prototype.constructor=L,V(L,d)}function V(L,d){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(g,A){return g.__proto__=A,g},V(L,d)}var b=X(1),U=X(11),C=X(4),w=X(0),y=["LR","RL","H"],T=y[0],x=function(L){function d(){return L.apply(this,arguments)||this}re(d,L);var g=d.prototype;return g.execute=function(){var M=this,O=M.options,S=M.rootNode;O.isHorizontal=!0;var I=O.indent,c=I===void 0?20:I,f=O.dropCap,P=f===void 0?!0:f,N=O.direction,k=N===void 0?T:N,W=O.align;if(k&&y.indexOf(k)===-1)throw new TypeError("Invalid direction: "+k);if(k===y[0])U(S,c,P,W);else if(k===y[1])U(S,c,P,W),S.right2left();else if(k===y[2]){var z=C(S,O),Z=z.left,J=z.right;U(Z,c,P,W),Z.right2left(),U(J,c,P,W);var ee=Z.getBoundingBox();J.translate(ee.width,0),S.x=J.x-S.width/2}return S},d}(b),p={};function m(L,d){return d=w.assign({},p,d),new x(L,d).execute()}Ce.exports=m},function(Ce,Y,X){var re=X(0);function V(b,U,C,w,y){var T=(typeof C=="function"?C(b):C)*b.depth;if(!w)try{if(b.id===b.parent.children[0].id){b.x+=T,b.y=U?U.y:0;return}}catch(m){}if(b.x+=T,U){if(b.y=U.y+re.getHeight(U,b,y),U.parent&&b.parent.id!==U.parent.id){var x=U.parent,p=x.y+re.getHeight(x,b,y);b.y=p>b.y?p:b.y}}else b.y=0}Ce.exports=function(b,U,C,w){var y=null;b.eachNode(function(T){V(T,y,U,C,w),y=T})}},function(Ce,Y,X){function re(p,m){p.prototype=Object.create(m.prototype),p.prototype.constructor=p,V(p,m)}function V(p,m){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(L,d){return L.__proto__=d,L},V(p,m)}var b=X(1),U=X(13),C=X(2),w=X(0),y=function(p){function m(){return p.apply(this,arguments)||this}re(m,p);var L=m.prototype;return L.execute=function(){var g=this;return C(g.rootNode,g.options,U)},m}(b),T={};function x(p,m){return m=w.assign({},T,m),new y(p,m).execute()}Ce.exports=x},function(Ce,Y,X){var re=X(0);function V(C,w){var y=0;return C.children.length?C.children.forEach(function(T){y+=V(T,w)}):y=C.height,C._subTreeSep=w.getSubTreeSep(C.data),C.totalHeight=Math.max(C.height,y)+2*C._subTreeSep,C.totalHeight}function b(C){var w=C.children,y=w.length;if(y){w.forEach(function(d){b(d)});var T=w[0],x=w[y-1],p=x.y-T.y+x.height,m=0;if(w.forEach(function(d){m+=d.totalHeight}),p>C.height)C.y=T.y+p/2-C.height/2;else if(w.length!==1||C.height>m){var L=C.y+(C.height-p)/2-T.y;w.forEach(function(d){d.translate(0,L)})}else C.y=(T.y+T.height/2+x.y+x.height/2)/2-C.height/2}}var U={getSubTreeSep:function(){return 0}};Ce.exports=function(C,w){w===void 0&&(w={}),w=re.assign({},U,w),C.parent={x:0,width:0,height:0,y:0},C.BFTraverse(function(y){y.x=y.parent.x+y.parent.width}),C.parent=null,V(C,w),C.startY=0,C.y=C.totalHeight/2-C.height/2,C.eachNode(function(y){var T=y.children,x=T.length;if(x){var p=T[0];if(p.startY=y.startY+y._subTreeSep,x===1)p.y=y.y+y.height/2-p.height/2;else{p.y=p.startY+p.totalHeight/2-p.height/2;for(var m=1;m<x;m++){var L=T[m];L.startY=T[m-1].startY+T[m-1].totalHeight,L.y=L.startY+L.totalHeight/2-L.height/2}}}}),b(C)}}])})},70731:function(Se,Ce,Y){"use strict";var X=Y(59301),re=Y(42441),V=Y(48961),b=Y.n(V),U=Object.defineProperty,C=Object.defineProperties,w=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,T=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,p=(M,O,S)=>O in M?U(M,O,{enumerable:!0,configurable:!0,writable:!0,value:S}):M[O]=S,m=(M,O)=>{for(var S in O||(O={}))T.call(O,S)&&p(M,S,O[S]);if(y)for(var S of y(O))x.call(O,S)&&p(M,S,O[S]);return M},L=(M,O)=>C(M,w(O));function d(M,O,S=1/3,I){let c=M*Math.PI*2,f=O*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(P,N){return P<c?Math.cos(c)*(1+Math.cos(N)*S):P>f?Math.cos(f)*(1+Math.cos(N)*S):Math.cos(P)*(1+Math.cos(N)*S)},y:function(P,N){return P<c?Math.sin(c)*(1+Math.cos(N)*S):P>f?Math.sin(f)*(1+Math.cos(N)*S):Math.sin(P)*(1+Math.cos(N)*S)},z:function(P,N){return P<-Math.PI*.5?Math.sin(P):P>Math.PI*2.5?Math.sin(P)*I*.1:Math.sin(N)>0?1*I*.1:-1}}}function g({pieData:M=[],internalDiameterRatio:O=1/3}){var S,I,c,f;const P=[],N=M==null?void 0:M.reduce((J,ee)=>(J||0)+((ee==null?void 0:ee.value)||0),0);let k=0,W=0;const z=[];for(let J=0;J<(M==null?void 0:M.length);J++){W=k+(N==0?1:((S=M==null?void 0:M[J])==null?void 0:S.value)||0);const ee={itemStyle:((I=M==null?void 0:M[J])==null?void 0:I.itemStyle)||{},name:((c=M==null?void 0:M[J])==null?void 0:c.name)||`name${J}`,type:"surface",parametric:!0,parametricEquation:d(k/(N||(M==null?void 0:M.length)),W/(N||(M==null?void 0:M.length)),O,((f=M==null?void 0:M[J])==null?void 0:f.value)||(N==0?25:0)),wireframe:{show:!1},pieData:M==null?void 0:M[J]};z.push(ee.name),P.push(ee),k=W}return P.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:J=>`${J.value}
|
|
|
|
|
|
${J.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...M||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:z},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:P}}const A=({dataSource:M=[{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:O="",style:S={},legend:I={},internalDiameterRatio:c=1/3})=>{const[f,P]=(0,X.useState)([]),N=(0,X.useCallback)(z=>{const Z=z.selected||{},J=M.map(ee=>ee.name).filter(ee=>Z[ee]===!1);P(J)},[M]),k=(0,X.useMemo)(()=>M.filter(z=>!f.includes(z.name)),[M,f]),W=(0,X.useMemo)(()=>{const z=g({pieData:k,internalDiameterRatio:c}),Z=M.map(ee=>ee.name),J=M.reduce((ee,$)=>(ee[$.name]=!f.includes($.name),ee),{});return z.legend=L(m(m({},z.legend),I),{data:Z,selected:J}),z},[k,I,c,M,f]);return X.createElement(re.Z,{onEvents:{legendselectchanged:N},className:`w-full h-full ${O}`,option:W,style:m({height:"100%"},S)})};Ce.Z=A},12635:function(Se,Ce,Y){"use strict";var X=Y(59301),re=Y(93314),V=Y(99571),b=Object.defineProperty,U=Object.defineProperties,C=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,x=(d,g,A)=>g in d?b(d,g,{enumerable:!0,configurable:!0,writable:!0,value:A}):d[g]=A,p=(d,g)=>{for(var A in g||(g={}))y.call(g,A)&&x(d,A,g[A]);if(w)for(var A of w(g))T.call(g,A)&&x(d,A,g[A]);return d},m=(d,g)=>U(d,C(g));const L=({img:d,buttonProps:g={},styles:A={},customText:M,ButtonText:O,ButtonClick:S,Buttonclass:I,ButtonTwo:c,imgStyles:f,loading:P=!1,className:N=""})=>X.createElement("section",{className:`tc animated fadeIn ${N}`,style:p({color:"#999",margin:"100px auto",visibility:P?"hidden":"visible"},A)},X.createElement("img",{src:d||re,style:m(p({},f),{pointerEvents:"none",userSelect:"none"})}),X.createElement("p",{className:"mt20 font14"},M||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),O&&X.createElement(V.ZP,p({className:I,onClick:S},g),O),c&&c);Ce.Z=L},6311:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return I}});var X=Y(59301),re={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},V=Y(99571),b=Y(70557),U=Y(89081),C=Y(25399),w=Y(59895),y=Y(76011),T=Y(12635),x=Y(12242),p=Y(65789),m=Y(59301),L=Object.defineProperty,d=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,M=(c,f,P)=>f in c?L(c,f,{enumerable:!0,configurable:!0,writable:!0,value:P}):c[f]=P,O=(c,f)=>{for(var P in f||(f={}))g.call(f,P)&&M(c,P,f[P]);if(d)for(var P of d(f))A.call(f,P)&&M(c,P,f[P]);return c},S=(c,f,P)=>new Promise((N,k)=>{var W=J=>{try{Z(P.next(J))}catch(ee){k(ee)}},z=J=>{try{Z(P.throw(J))}catch(ee){k(ee)}},Z=J=>J.done?N(J.value):Promise.resolve(J.value).then(W,z);Z((P=P.apply(c,f)).next())}),I=({editOffice:c="view",data:f,theme:P,type:N,filename:k,monacoEditor:W,className:z,style:Z,close:J,onClose:ee,hasMask:$,disabledDownload:ie,onImgDimensions:se,showNodata:ne,recordInfo:ce})=>{const[ae,fe]=(0,X.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[oe,pe]=(0,X.useState)(""),[_e,de]=(0,X.useState)(),be=window.ENV==="build"?"/react/build":"",Ae=location.host.startsWith("localhost")?x.Z.PROXY_SERVER:x.Z.API_SERVER,Ue=10*(1024*1024),it=(0,X.useRef)();f!=null&&f.startsWith("/api")&&N!=="txt"&&(f=x.Z.API_SERVER+f);const tt=je=>je.substring(je.lastIndexOf("/")+1).split(".").pop();k&&W&&(W.filename=k),(0,X.useEffect)(()=>{var je,nt;const rt=(nt=(je=document.cookie)==null?void 0:je.replace(/\s/g,""))==null?void 0:nt.split(";");rt==null||rt.map(ft=>{let lt=ft.split("=");lt[0]==="_educoder_session"&&pe(lt[1])})},[]),(0,X.useEffect)(()=>{N==="office"&&(f.indexOf("bigfilescdn.")>-1||f.indexOf("bigfiles1")>-1?de({url:f,fileType:tt(f),model:f.indexOf("model=edit")?"edit":"view"}):et())},[N,f]);const et=()=>S(void 0,null,function*(){console.log("data:",f);let je=f;f.startsWith("http")||(je=location.origin+je);let nt=new URL(je).pathname.split("/").pop();const rt=yield(0,y.gJ)({attachment_id:nt});rt.url=Ae+rt.url,de(rt)}),vt=()=>{if(f.startsWith("http")||f.startsWith("blob:")){dt();return}(0,w.Sv)(k||"educoder",f,k)},dt=()=>{ce&&(0,p.fc)({id:ce==null?void 0:ce.id,watch_type:1,course_id:ce==null?void 0:ce.course_id}),(0,w.Nd)(k||"educoder",decodeURIComponent(f))};return m.createElement("div",{style:O({},Z||{}),className:`${$&&re.bgBlack} ${N?re.wrp:"hide"}`},J&&m.createElement("div",{className:re.close,ref:it},!!se&&m.createElement(C.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>it.current},m.createElement("span",{onClick:()=>{ee(),se()}},m.createElement("i",{className:"icon-yulanpizhu"}))),!ie&&m.createElement(C.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>it.current},m.createElement("span",{onClick:dt},m.createElement("i",{className:"icon-quxiaozhiding"}))),m.createElement(C.Z,{title:"\u5173\u95ED",getPopupContainer:()=>it.current},m.createElement("span",{className:"",onClick:ee},m.createElement("i",{className:"icon-guanbi1"})))),m.createElement("div",{className:`${re[z]} ${z} ${re.monaco} ${N==="txt"?"show":"hide"}`},N==="txt"&&m.createElement(m.Fragment,null,m.createElement(U.ZP,O({},W)))),N==="audio"&&m.createElement("audio",{src:`${(f==null?void 0:f.indexOf("http://"))>-1||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${f}`,autoPlay:!0}),N==="video"&&m.createElement(m.Fragment,null,(f==null?void 0:f.indexOf("http"))>-1?m.createElement("video",{controls:!0,src:`${f}`,autoPlay:!0}):m.createElement("video",{controls:!0,src:`data:video/mp4;base64,${f}`,autoPlay:!0})),N==="office"&&_e&&m.createElement("iframe",{src:`${be}/office.html?key=${_e.key}&url=${btoa(_e.url)}&callbackUrl=${Ae+(_e.callbackUrl||"")}&fileType=${_e.fileType}&title=${_e.title||""}&model=${c}&officeServer=${x.Z.ONLYOFFICE}&disabledDownload=${!!ie}`}),N==="html"&&m.createElement("iframe",{src:f+"&disposition=inline"}),N==="pdf"&&m.createElement("iframe",{src:`${be}/js/pdfview/index.html?filename=${k||"educoder.pdf"}&url=${encodeURIComponent(f)}&disabledDownload=${!!ie}`}),N==="image"&&m.createElement("img",{src:`${(f==null?void 0:f.indexOf("http://"))>-1||(f==null?void 0:f.indexOf("https://"))>-1?"":"data:image/png;base64,"}${f}`}),(N==="other"||N==="download")&&m.createElement(m.Fragment,null,ne?m.createElement(T.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:m.createElement(V.ZP,{icon:m.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:vt,disabled:ie},"\u4E0B\u8F7D")}):m.createElement(V.ZP,{type:"primary",size:"middle",onClick:vt,disabled:ie},m.createElement(b.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},42159:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return g}});var X=Y(59301),re=Y(6767),V=Y(75727),b=Y(92841),U=Y(79710),C=Y(69669),w=Y(56102),y=Y(72890),T={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},x=(A,M,O)=>new Promise((S,I)=>{var c=N=>{try{P(O.next(N))}catch(k){I(k)}},f=N=>{try{P(O.throw(N))}catch(k){I(k)}},P=N=>N.done?S(N.value):Promise.resolve(N.value).then(c,f);P((O=O.apply(A,M)).next())});function p(A){if(isNaN(A))return{minutes:"00",seconds:"00"};const M=new Date(A*1e3).toISOString().substr(11,8);return{hour:M.substr(0,2),minutes:M.substr(3,2),seconds:M.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function m(A,M){return A-M}function L(A){A.sort(m);let M=0;for(let O=0;O<A.length-1;O++){let S=Math.abs(A[O+1]-A[O]);S<21&&(M+=S)}return M}const d=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var g=(0,X.forwardRef)(({allow_skip:A,src:M,toLog:O,videoId:S,logWatchHistory:I,courseId:c=null,startTime:f,handlePause:P=()=>{},handlePlay:N=()=>{},handlePlayEnded:k=()=>{},autoPlay:W=!1,onPlayEnded:z=()=>{},isShowWaterMark:Z=!0},J)=>{var ee;M=M==null?void 0:M.replace("http://","https://");const ie=((ee=M==null?void 0:M.split("."))==null?void 0:ee.pop())==="flv",se=(0,X.useRef)(),ne=(0,X.useRef)(),ce=(0,X.useRef)(),ae=(0,X.useRef)(),fe=(0,X.useRef)(),oe=(0,X.useRef)(),pe=(0,X.useRef)(),_e=(0,X.useRef)(),de=(0,X.useRef)(),be=(0,X.useRef)(),Ae=(0,X.useRef)(),Fe=(0,X.useRef)(),Ue=(0,X.useRef)(),it=(0,X.useRef)(),tt=navigator.userAgent.toLowerCase().match(d),et=tt?tt[0]:"pc",vt=(0,X.useRef)(!1),dt=(0,C.eY)();let je=0,nt=0,rt=0,ft=null,lt=!1,wt=20,Re=1,We=!1,Pe=!1,ke=[];(0,X.useImperativeHandle)(J,()=>({getLastUpdatedTime:()=>se.current.currentTime,getDuration:()=>se.current.duration})),re.ZP.config({maxCount:1,getContainer:()=>ce.current});const Ze=(0,X.useCallback)((Lt,Tt=!1)=>{let Nt={point:se.current.currentTime};ft?(Nt.log_id=ft,Nt.watch_duration=L(ke),Nt.total_duration=nt):(c?(Nt.video_id=parseInt(S,10),Nt.course_id=c):Nt.video_id=S,Nt.duration=je,Nt.device=et),Tt&&(Nt.ed="1");function jt(){return x(this,null,function*(){We=!0,ft=yield I==null?void 0:I(Nt),We=!1,Lt&&Lt()})}jt()},[S,c]);(0,X.useEffect)(()=>{se.current&&(ae.current.style.display="none",fe.current.style.display="block"),re.ZP.destroy();let Lt=null;return b.Z.isSupported&&ie&&M&&(M==null?void 0:M.indexOf(".m3u8"))<0?(Lt=b.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:M,muted:!1}),se.current&&(Lt.attachMediaElement(se.current),Lt.load())):se.current.setAttribute("src",M),Ye(),()=>{Lt&&(Lt.unload(),Lt.pause(),Lt.destroy(),Lt=null)}},[se,ie,M]);function Ie(){se.current.paused?(ae.current.style.display="none",fe.current.style.display="block"):(ae.current.style.display="block",fe.current.style.display="none")}function Ye(){Ae.current.style.display="none",Ue.current.style.display="none",Fe.current.style.display="none",se.current.muted||se.current.volume===0?Ae.current.style.display="block":se.current.volume>0&&se.current.volume<=.5?Ue.current.style.display="block":Fe.current.style.display="block"}(0,X.useEffect)(()=>{const Lt=document.getElementById("play"),Tt=document.querySelectorAll(".playback-icons use");function Nt(){N(),f&&!vt.current&&(se.current.currentTime=f),vt.current=!0,ke.push(se.current.currentTime),lt||(lt=!0,O&&Ze())}function jt(){return x(this,null,function*(){Ie(),ke.push(se.current.currentTime),O&&Ze(()=>{ft=null,rt=0,lt=!1,We=!1,Pe=!1,ke=[],nt=0,Re=1},!0),z()})}function zt(){oe.current.value=Math.round(se.current.currentTime),pe.current.value=Math.round(se.current.currentTime)}function Ot(){const an=p(Math.round(se.current.currentTime));de.current.innerText=`${an.hour>0?an.hour+":":""}${an.minutes}:${an.seconds}`,de.current.setAttribute("datetime",`${an.hour>0?" "+an.hour+" ":""}${an.minutes}m ${an.seconds}s`)}function Kt(){var an,$t,mn,Xt,Fn,sr,Cn;const tr=Math.round((an=se.current)==null?void 0:an.duration);(mn=($t=oe.current)==null?void 0:$t.setAttribute)==null||mn.call($t,"max",tr),(Fn=(Xt=pe.current)==null?void 0:Xt.setAttribute)==null||Fn.call(Xt,"max",tr);const lr=p(tr);_e.current&&(_e.current.innerText=`${lr.hour>0?lr.hour+":":""}${lr.minutes}:${lr.seconds}`,(Cn=(sr=_e.current).setAttribute)==null||Cn.call(sr,"datetime",`${lr.hour>0?" "+lr.hour+" ":""}${lr.minutes}m ${lr.seconds}s`))}function gn(){try{const an=Math.round(se.current.duration);oe.current.setAttribute("max",an),pe.current.setAttribute("max",an);const $t=p(an);_e.current.innerText=`${$t.hour>0?$t.hour+":":""}${$t.minutes}:${$t.seconds}`,_e.current.setAttribute("datetime",`${$t.hour>0?" "+$t.hour+" ":""}${$t.minutes}m ${$t.seconds}s`),zt(),Ot();const{width:mn,height:Xt,x:Fn,y:sr}=ne.current.getBoundingClientRect();if(Fn<0||sr<0,!Pe){let Cn=se.current.currentTime,tr=Cn-rt;Math.abs(tr)<10?(nt+=Math.abs(tr),rt=Cn,We||nt-Re*wt>=0&&(Re++,ke.push(rt),O&&Ze())):(rt=Cn,O&&Ze())}}catch(an){console.log("videoplaying:",an)}}function $n(){Pe=!0}function On(){se.current.playing&&ke.push(se.current.currentTime,rt),rt=se.current.currentTime,Pe=!1}function ir(){je=se.current.duration,je<=20&&(wt=je/3),se.current.addEventListener("play",Nt)}function mr(an){an.preventDefault(),(0,y.vp)()?(se.current.style.width="100%",se.current.style.height="100%"):se.current.style.cssText=""}function ar(){P()}function Vn(an){if(!A){re.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const $t=an.target.dataset.seek?an.target.dataset.seek:an.target.value;se.current.currentTime=$t,pe.current.value=$t,oe.current.value=$t}function Rr(an){const $t=Math.round(an.offsetX/an.target.clientWidth*parseInt(an.target.getAttribute("max"),10));oe.current.setAttribute("data-seek",$t);const mn=p($t);be.current.textContent=`${mn.hour>0?mn.hour+":":""}${mn.minutes}:${mn.seconds}`;const Xt=se.current.getBoundingClientRect();be.current.style.left=`${an.pageX-Xt.left}px`}function er(an){switch(an.code){case"Space":an.preventDefault(),gt();break;case"ArrowRight":if(an.preventDefault(),!A){re.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(se.current.currentTime>=se.current.duration)break;se.current.currentTime=parseInt(se.current.currentTime)+5,zt();break;case"ArrowLeft":if(an.preventDefault(),!A){re.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(se.current.currentTime===0)break;se.current.currentTime=parseInt(se.current.currentTime)-5,zt();break;case"ArrowUp":an.preventDefault(),se.current.volume<1&&(se.current.volume=(parseInt(se.current.volume*10)+1)/10);break;case"ArrowDown":an.preventDefault(),se.current.volume>0&&(se.current.volume=(parseInt(se.current.volume*10)-1)/10);break}}return ce.current.addEventListener((0,y.gH)(),mr),se.current.addEventListener("canplay",ir),se.current.addEventListener("ended",jt),se.current.addEventListener("seeking",$n),se.current.addEventListener("seeked",On),se.current.addEventListener("loadedmetadata",Kt),oe.current.addEventListener("mousemove",Rr),oe.current.addEventListener("input",Vn),se.current.addEventListener("timeupdate",gn),se.current.addEventListener("pause",ar),se.current.addEventListener("volumechange",Ye),document.addEventListener("keydown",er),()=>{var an,$t,mn,Xt,Fn,sr,Cn,tr,lr,or,Ut,me;(an=se.current)==null||an.removeEventListener("canplay",ir),($t=se.current)==null||$t.removeEventListener("play",Nt),(mn=se.current)==null||mn.removeEventListener("ended",jt),(Xt=se.current)==null||Xt.removeEventListener("seeking",$n),(Fn=se.current)==null||Fn.removeEventListener("seeked",On),(sr=oe.current)==null||sr.removeEventListener("mousemove",Rr),(Cn=oe.current)==null||Cn.removeEventListener("input",Vn),(tr=se.current)==null||tr.removeEventListener("timeupdate",gn),(lr=se.current)==null||lr.removeEventListener("pause",ar),(or=se.current)==null||or.removeEventListener("loadedmetadata",Kt),(Ut=se.current)==null||Ut.removeEventListener("volumechange",Ye),document.removeEventListener("keydown",er),(me=se.current)!=null&&me.playing&&(ke.push(rt,se.current.currentTime),O&&Ze())}},[se,M]),(0,X.useEffect)(()=>{if(se.current.onended=()=>{k(se)},se.current.oncontextmenu=()=>!1,(M==null?void 0:M.indexOf(".m3u8"))>-1){if(se.current.canPlayType("application/vnd.apple.mpegurl"))se.current.src=M;else if(U.ZP.isSupported()){var Lt=new U.ZP;Lt.loadSource(M),Lt.attachMedia(se.current)}}},[M]);const[qe,ot]=(0,X.useState)(1),gt=()=>{se.current.paused||se.current.ended?se.current.play():se.current.pause(),Ie()};function pt(){se.current.muted=!se.current.muted,se.current.muted?(it.current.setAttribute("data-volume",volume.value),it.current.value=0):it.current.value=it.current.dataset.volume}return X.createElement("div",{style:{position:"relative"},ref:ce},X.createElement("div",{ref:ne,className:`${T.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${T.animate__loop}`},Z&&dt?dt.login:" "),X.createElement("div",{className:T.container},X.createElement("div",{className:T["video-container"],id:"video-container"},X.createElement("div",{className:T["playback-animation"],id:"playback-animation"},X.createElement("svg",{className:T["playback-icons"]},X.createElement("use",{className:"hidden",href:"#play-icon"}),X.createElement("use",{href:"#pause"}))),X.createElement("video",{className:T.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:se,autoPlay:W}),X.createElement("div",{className:`${T["video-controls"]} `,id:"video-controls"},X.createElement("div",{className:T["bottom-controls"]},X.createElement("div",{className:T["left-controls"]},X.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:gt},X.createElement("svg",{className:T["playback-icons"]},X.createElement("use",{ref:fe,href:"#play-icon"}),X.createElement("use",{ref:ae,style:{display:"none"},href:"#pause"}))),X.createElement("div",{className:T.time},X.createElement("time",{id:"time-elapsed",ref:de},"00:00"),X.createElement("span",null," / "),X.createElement("time",{id:"duration",ref:_e},"00:00"))),X.createElement("div",{className:T["right-controls"]},A&&X.createElement(V.Z,{placement:"top",overlayClassName:T.rateOverlay,getPopupContainer:Lt=>Lt.parentNode,menu:{items:[{key:"1",label:X.createElement("span",{onClick:()=>{ot(1),se.current.playbackRate=1}},"1.0x")},{key:"2",label:X.createElement("span",{onClick:()=>{ot(1.5),se.current.playbackRate=1.5}},"1.5x")},{key:"3",label:X.createElement("span",{onClick:()=>{ot(2),se.current.playbackRate=2}},"2.0x")}]}},X.createElement("div",{className:`${T.controlText} mr5`},"\u500D\u901F")),X.createElement(w.CopyToClipboard,{text:M,onCopy:()=>re.ZP.success("\u590D\u5236\u6210\u529F")},X.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},X.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),X.createElement("div",{className:T["volume-controls"]},X.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:T["volume-button"],id:"volume-button",onClick:pt},X.createElement("i",{ref:Ae,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),X.createElement("i",{ref:Ue,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),X.createElement("i",{ref:Fe,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),X.createElement("input",{className:T.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:it,style:{display:"none"},onClick:Ye})),X.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:T["fullscreen-button"],onClick:()=>{(0,y.vp)()?(0,y.BU)():(0,y.Dj)(ce.current)}},X.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),X.createElement("div",{className:T["video-progress"]},X.createElement("progress",{ref:pe,value:"0",min:"0"}),X.createElement("input",{className:T.seek,ref:oe,value:"0",min:"0",type:"range",step:"1"}),X.createElement("div",{className:T["seek-tooltip"],ref:be,id:"seek-tooltip"},"00:00"))))),X.createElement("svg",{style:{display:"none"}},X.createElement("defs",null,X.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},X.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),X.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},X.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),X.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},X.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),X.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},X.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),X.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},X.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),X.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},X.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),X.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},X.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),X.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},X.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},89081:function(Se,Ce,Y){"use strict";Y.d(Ce,{SV:function(){return Re},ZP:function(){return wt}});var X=Y(59301),re=Y(76374);const V={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},b={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},U={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},C={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
|
`)}]},w={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
|
`)}]};var y=Y(53184),T=Y.n(y),x=Object.defineProperty,p=Object.defineProperties,m=Object.getOwnPropertyDescriptors,L=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable,A=(We,Pe,ke)=>Pe in We?x(We,Pe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):We[Pe]=ke,M=(We,Pe)=>{for(var ke in Pe||(Pe={}))d.call(Pe,ke)&&A(We,ke,Pe[ke]);if(L)for(var ke of L(Pe))g.call(Pe,ke)&&A(We,ke,Pe[ke]);return We},O=(We,Pe)=>p(We,m(Pe)),S=(We,Pe,ke)=>new Promise((Ze,Ie)=>{var Ye=gt=>{try{ot(ke.next(gt))}catch(pt){Ie(pt)}},qe=gt=>{try{ot(ke.throw(gt))}catch(pt){Ie(pt)}},ot=gt=>gt.done?Ze(gt.value):Promise.resolve(gt.value).then(Ye,qe);ot((ke=ke.apply(We,Pe)).next())});const I={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},c=(We,Pe)=>Pe.map(ke=>({label:ke,kind:We.languages.CompletionItemKind.Keyword,insertText:ke})),f=We=>Object.keys(I.tables).map(Pe=>({label:Pe,kind:We.languages.CompletionItemKind.Variable,insertText:Pe})),P=(We,Pe)=>{const ke=I.tables[We];return ke?ke.map(Ze=>({label:Ze,kind:Pe.languages.CompletionItemKind.Field,insertText:Ze})):[]};function N(We,Pe,ke,Ze,Ie){let Ye=Pe.getWordUntilPosition(ke),qe={startLineNumber:ke.lineNumber,endLineNumber:ke.lineNumber,startColumn:Ye.startColumn,endColumn:Ye.endColumn},ot=Ze.map(gt=>({label:gt,kind:We.languages.CompletionItemKind.Keyword,insertText:gt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:qe}));return Ie.map(gt=>{ot.push(O(M({},gt),{range:qe}))}),ot}var k=We=>{I.languages.map(Ie=>(We.languages.registerDocumentFormattingEditProvider(Ie,{provideDocumentFormattingEdits(Ye,qe,ot){return S(this,null,function*(){const gt=T()(Ye.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:Ye.getFullModelRange(),text:gt}]})}}),Ie));const Pe=U.quickKey.map(Ie=>({label:Ie.label,kind:We.languages.CompletionItemKind.Method,insertText:Ie.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ke=C.quickKey.map(Ie=>({label:Ie.label,kind:We.languages.CompletionItemKind.Method,insertText:Ie.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ze=b.quickKey.map(Ie=>({label:Ie.label,kind:We.languages.CompletionItemKind.Method,insertText:Ie.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet}));We.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ie,Ye){var qe=Ie.getWordUntilPosition(Ye),ot={startLineNumber:Ye.lineNumber,endLineNumber:Ye.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},gt=Ie.getLineContent(Ye.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...U.keywords.map(pt=>({label:pt,kind:We.languages.CompletionItemKind.Function,documentation:pt,insertText:pt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot})),...U.quickKey.map(pt=>({label:pt.label,kind:We.languages.CompletionItemKind.Function,documentation:pt.content,insertText:gt.startsWith("#")?pt.content.replace(/#/,""):pt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot}))]}}}),We.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ie,Ye){var qe=Ie.getWordUntilPosition(Ye),ot={startLineNumber:Ye.lineNumber,endLineNumber:Ye.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn};return{suggestions:[...V.keywords.map(gt=>({label:gt,kind:We.languages.CompletionItemKind.Function,documentation:gt,insertText:gt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot}))]}}}),We.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ie,Ye){var qe=Ie.getWordUntilPosition(Ye),ot={startLineNumber:Ye.lineNumber,endLineNumber:Ye.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},gt=Ie.getLineContent(Ye.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...b.keywords.map(pt=>({label:pt,kind:We.languages.CompletionItemKind.Function,documentation:pt,insertText:pt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot})),...b.quickKey.map(pt=>({label:pt.label,kind:We.languages.CompletionItemKind.Function,documentation:pt.content,insertText:gt.startsWith("#")?pt.content.replace(/#/,""):pt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot}))]}}}),We.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ie,Ye){var qe=Ie.getWordUntilPosition(Ye),ot={startLineNumber:Ye.lineNumber,endLineNumber:Ye.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},gt=Ie.getLineContent(Ye.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...w.keywords.map(pt=>({label:pt,kind:We.languages.CompletionItemKind.Function,documentation:pt,insertText:pt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot})),...w.quickKey.map(pt=>({label:pt.label,kind:We.languages.CompletionItemKind.Function,documentation:pt.content,insertText:gt.startsWith("#")?pt.content.replace(/#/,""):pt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot}))]}}}),We.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ie,Ye){var qe=Ie.getWordUntilPosition(Ye),ot={startLineNumber:Ye.lineNumber,endLineNumber:Ye.lineNumber,startColumn:qe.startColumn,endColumn:qe.endColumn},gt=Ie.getLineContent(Ye.lineNumber).substring(qe.startColumn-2,qe.endColumn);return{suggestions:[...C.keywords.map(pt=>({label:pt,kind:We.languages.CompletionItemKind.Function,documentation:pt,insertText:pt,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot})),...C.quickKey.map(pt=>({label:pt.label,kind:We.languages.CompletionItemKind.Function,documentation:pt.content,insertText:gt.startsWith("#")?pt.content.replace(/#/,""):pt.content,insertTextRules:We.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:ot}))]}}})};const W="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var z=Object.defineProperty,Z=(We,Pe,ke)=>Pe in We?z(We,Pe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):We[Pe]=ke,J=(We,Pe,ke)=>Z(We,typeof Pe!="symbol"?Pe+"":Pe,ke);const ee=class J2{constructor(Pe,ke,Ze){this.placeholder=Pe,this.editor=ke,this.monaco=Ze,ke.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return J2.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};J(ee,"ID","editor.widget.placeholderHint");var ie=ee,se=Y(96236),ne=Y(6767),ce=Y(25399),ae=Y(89392),fe=Y(16448),oe=Y(56102),pe=Object.defineProperty,_e=Object.defineProperties,de=Object.getOwnPropertyDescriptors,be=Object.getOwnPropertySymbols,Ae=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,Ue=(We,Pe,ke)=>Pe in We?pe(We,Pe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):We[Pe]=ke,it=(We,Pe)=>{for(var ke in Pe||(Pe={}))Ae.call(Pe,ke)&&Ue(We,ke,Pe[ke]);if(be)for(var ke of be(Pe))Fe.call(Pe,ke)&&Ue(We,ke,Pe[ke]);return We},tt=(We,Pe)=>_e(We,de(Pe)),et=(We,Pe)=>{var ke={};for(var Ze in We)Ae.call(We,Ze)&&Pe.indexOf(Ze)<0&&(ke[Ze]=We[Ze]);if(We!=null&&be)for(var Ze of be(We))Pe.indexOf(Ze)<0&&Fe.call(We,Ze)&&(ke[Ze]=We[Ze]);return ke},vt=(We,Pe,ke)=>new Promise((Ze,Ie)=>{var Ye=gt=>{try{ot(ke.next(gt))}catch(pt){Ie(pt)}},qe=gt=>{try{ot(ke.throw(gt))}catch(pt){Ie(pt)}},ot=gt=>gt.done?Ze(gt.value):Promise.resolve(gt.value).then(Ye,qe);ot((ke=ke.apply(We,Pe)).next())});function dt(We){return/^\d+$/.test(We)?`${We}px`:We}function je(){}let nt=!1;const rt={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function ft(We=[]){let Pe=We;if(Array.isArray(We)){for(let ke=0;ke<We.length;ke++){let Ze=rt[We[ke]];if(Ze)return Ze}return Pe[0]}return rt[Pe]||Pe}let lt=null;var wt=We=>{var Pe=We,{width:ke="100%",height:Ze="100%",value:Ie,language:Ye="javascript",style:qe={},options:ot={},overrideServices:gt={},theme:pt="vs-dark",onEditBlur:Lt,isCopy:Tt=!1,onSave:Nt,autoHeight:jt=!1,forbidCopy:zt=!1,onChange:Ot=je,editorDidMount:Kt=je,onFocus:gn=je,onBreakPoint:$n=je,breakPointValue:On=[],filename:ir="educoder.txt",errorLine:mr,errorContent:ar="",highlightLine:Vn,openBreakPoint:Rr=!1,placeholder:er="",showMiniMap:an=!0}=Pe,$t=et(Pe,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const mn=(0,X.useRef)(),Xt=(0,X.useRef)({}),Fn=(0,X.useRef)(),sr=(0,X.useRef)(),Cn=(0,X.useRef)([]),tr=(0,X.useRef)(!1),lr=(0,X.useRef)(),or=(0,X.useRef)(),Ut=(0,X.useRef)(!1),[me,_]=(0,X.useState)(!1);function B(){let Le;return mn.current&&(Le=new re.Z(Qe=>{for(let ut of Qe)(ut.target.offsetHeight>0||ut.target.offsetWidth>0)&&Xt.current.instance.layout()}),Le.observe(mn.current)),Le}function R(){ne.ZP.warning({content:decodeURIComponent(W),key:"monaco-editor-tip"})}const j=()=>{let Le=Xt.current.instance;if(Ie!=null&&Le&&me){const Qe=Le.getModel();Qe&&Ie!==Qe.getValue()&&(nt=!0,Qe.setValue(Ie),Le.layout(),nt=!1)}};(0,X.useEffect)(()=>{const Le=fe.Z.subscribe("formatDocument",Qe=>{var ut;let bt=Xt.current.instance;(ut=bt==null?void 0:bt.getAction)==null||ut.call(bt,"editor.action.formatDocument").run()});return window.updateMonacoValue=Qe=>{Ot(Qe)},Le},[]),(0,X.useEffect)(()=>{var Le;let Qe=Xt.current.instance;sr.current&&clearTimeout(sr.current),sr.current=setTimeout(()=>{j()},500),Ie&&(Ie!=null&&Ie.length)&&((Le=Qe==null?void 0:Qe.updateOptions)==null||Le.call(Qe,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ie.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ie,me,Xt.current]),(0,X.useEffect)(()=>{if(mr&&Xt.current&&Xt.current.instance){let Qe=Xt.current.instance;Qe.changeViewZones(function(ut){var bt=document.createElement("div");bt.style.padding="10px 20px",bt.style.width="calc(100% - 20px)",bt.className="my-error-line-wrp",bt.innerHTML=ar,ut.addZone({afterLineNumber:mr||11,heightInLines:3,domNode:bt})});var Le={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Qe.addOverlayWidget(Le),Qe.revealPositionInCenter({lineNumber:20,column:1})}},[mr,Xt.current,me]);const Q=(Le="",Qe)=>{if(!Le||Le.trim()==="")return!0;const bt=Xt.current.instance.getModel().getLineTokens(Qe);let It=!1;for(let Ct=0;Ct<2;Ct++)bt.getStandardTokenType(Ct)===1&&(It=!0);return It};(0,X.useEffect)(()=>{var Le;const Qe=(Le=Xt.current)==null?void 0:Le.instance;if(Qe&&me&&zt){const ut=Qe.onDidBlurEditorWidget(()=>{Ut.current=!1}),bt=Qe.onDidFocusEditorText(()=>{Ut.current=!0});return()=>{ut.dispose(),bt.dispose()}}},[Xt.current,me,zt]),(0,X.useEffect)(()=>{var Le;if((Le=Xt.current)!=null&&Le.instance&&me&&Rr){let Qe=Xt.current.instance,ut=Qe.getModel();if(!ut)return;(()=>{var Ft;let Yt=[],qt=[];const cn=ut.getAllDecorations();for(let nn of cn)nn.options.className==="highlighted-line"&&(Yt.push((Ft=nn==null?void 0:nn.range)==null?void 0:Ft.startLineNumber),qt.push(nn==null?void 0:nn.id));if(Vn===Yt[0])return;ut.deltaDecorations(qt,[]);const ln=ut.getLineCount();Vn&&Vn<=ln&&(Qe.deltaDecorations([],[{range:new lt.Range(Vn,1,Vn,ut.getLineMaxColumn(Vn)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Qe.revealLineInCenter(Vn))})();const It=(Ft=!1)=>{var Yt;let qt=[],cn=[];const ln=ut.getAllDecorations();for(let nn of ln)nn.options.linesDecorationsClassName==="breakpoints-select"&&(qt.push((Yt=nn==null?void 0:nn.range)==null?void 0:Yt.startLineNumber),cn.push(nn==null?void 0:nn.id));if(Ft)return{lines:qt,ids:cn};$n(qt)},Ct=Ft=>vt(void 0,null,function*(){let Yt={range:new lt.Range(Ft,1,Ft,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield ut.deltaDecorations([],[Yt]),It()}),_t=Ft=>vt(void 0,null,function*(){let Yt=[];const qt=Qe.getLineDecorations(Ft);for(let cn of qt)cn.options.linesDecorationsClassName==="breakpoints-select"&&Yt.push(cn.id);yield ut.deltaDecorations(Yt,[]),It()}),St=Ft=>{let Yt=Qe.getLineDecorations(Ft);for(let qt of Yt)if(qt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,ae.isEqual)(On,It(!0).lines)){ut.deltaDecorations(It(!0).ids,[]);const Ft=On.map(Yt=>({range:new lt.Range(Yt,1,Yt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));ut.deltaDecorations([],Ft)}const Bt=Qe.onDidChangeModelContent(Ft=>{let Yt=Qe.getPosition();if(Yt){let qt=Yt.lineNumber;clearTimeout(or.current),or.current=setTimeout(()=>{Q(ut.getLineContent(qt),qt)?_t(qt):St(qt)?(_t(qt),Ct(qt)):It()},100)}}),$e=Qe.onMouseDown(Ft=>{var Yt,qt,cn;if(Ft.target.detail&&((cn=(qt=(Yt=Ft.target)==null?void 0:Yt.element)==null?void 0:qt.className)!=null&&cn.includes("line-numbers"))){let ln=Ft.target.position.lineNumber;if(Q(ut.getLineContent(ln),ln))return;St(ln)?_t(ln):Ct(ln)}}),xt=Ft=>{let Yt={range:new lt.Range(Ft,1,Ft,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Cn.current=Qe.deltaDecorations(Cn.current,[Yt])},Rt=()=>{Cn.current=Qe.deltaDecorations(Cn.current,[])},Mt=Qe.onMouseMove(Ft=>{var Yt,qt,cn;if(Rt(),Ft.target.detail&&((cn=(qt=(Yt=Ft.target)==null?void 0:Yt.element)==null?void 0:qt.className)!=null&&cn.includes("line-numbers"))){let ln=Ft.target.position.lineNumber;if(Q(ut.getLineContent(ln),ln))return;xt(ln)}}),rn=Qe.onMouseLeave(()=>{Rt()});return()=>{Bt.dispose(),$e.dispose(),Mt.dispose(),rn.dispose()}}},[Xt.current,me,On,Vn,Rr,Ye]),(0,X.useEffect)(()=>{var Le;(Le=Xt.current)!=null&&Le.instance&&Rr&&Xt.current.instance.setPosition({lineNumber:0,column:0})},[Vn]);function Ee(){let Le=Xt.current.instance;if(Le){const Qe=Le.getSelection(),ut=Xt.current.pastePos||{},bt=new lt.Range(ut.startLineNumber||Qe.endLineNumber,ut.startColumn||Qe.endColumn,ut.endLineNumber||Qe.endLineNumber,ut.endColumn||Qe.endColumn);setTimeout(()=>{Le.executeEdits("",[{range:bt,text:""}])},300)}}function we(Le){(window.navigator.platform.match("Mac")?Le.metaKey:Le.ctrlKey)&&Le.keyCode==83&&(Le.preventDefault(),Nt())}const De=()=>{if(jt&&Xt.current.instance){const Le=Xt.current.instance.getContentHeight();Ke(Le<Ze?Ze:Le)}else Ke(Ze)};function ye(Le){var Qe=document.createEvent("MouseEvents");Qe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Le.dispatchEvent(Qe)}const Me=Le=>{if(!Ut.current)return;const{keyCode:Qe,ctrlKey:ut,metaKey:bt,target:It,type:Ct}=Le;return(Ct==="paste"||(Qe===67||Qe===86)&&(bt||ut))&&It.nodeName==="TEXTAREA"&&(R(),Le.preventDefault()),!1};function Be(Le,Qe){var ut=window.URL||window.webkitURL||window,bt=new Blob([Qe]),It=document.createElementNS("http://www.w3.org/1999/xhtml","a");It.href=ut.createObjectURL(bt),It.download=Le,ye(It)}(0,X.useEffect)(()=>{De()},[De]),(0,X.useEffect)(()=>{mn.current&&!me&&Promise.all([Y.e(8909),Y.e(7960)]).then(Y.bind(Y,71448)).then(Le=>{try{lt=Le,Xt.current.instance=lt.editor.create(mn.current,{value:Ie,language:ft(Ye),theme:pt,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:an||!1}},gt);const Qe=Xt.current.instance;let It=[...se.BH._menuItems].find(Bt=>Bt[0]._debugName=="EditorContext")[1],Ct=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],_t=(Bt,$e)=>{var xt,Rt;let Mt=Bt._first;do $e.includes((Rt=(xt=Mt.element)==null?void 0:xt.command)==null?void 0:Rt.id)&&Bt._remove(Mt);while(Mt=Mt.next)};if(Kt(Qe,lt),setTimeout(()=>{De(),Xt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Be(ir||"educoder.txt",Qe.getValue())}})},500),Xt.current.subscription=Qe.onDidChangeModelContent(Bt=>{tr.current?clearTimeout(lr.current):(De(),Ot(Qe.getValue(),Bt)),lr.current=setTimeout(()=>{tr.current=!1},500)}),window.Monaco||k(lt,ft(Ye)),zt&&(_t(It,Ct),mn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Me),window.removeEventListener("paste",Me),window.addEventListener("keydown",Me),window.addEventListener("paste",Me)),window.Monaco=lt,Lt&&Qe.onDidBlurEditorWidget(()=>{Lt(Qe.getValue())}),gn&&Qe.onDidFocusEditorText(()=>{gn(Qe.getValue())}),zt)try{Qe.onDidPaste(Bt=>{const $e=Qe.getSelection(),xt=Xt.current.pastePos||{},Rt=new lt.Range(xt.startLineNumber||$e.endLineNumber,xt.startColumn||$e.endColumn,xt.endLineNumber||$e.endLineNumber,xt.endColumn||$e.endColumn);Qe.executeEdits("",[{range:Bt.range,text:""}])})}catch(Bt){}let St=B();return er&&typeof er=="string"&&new ie(er,Qe,lt),_(!0),()=>{const Bt=Xt.current.instance;Bt.dispose();const $e=Bt.getModel();$e&&$e.dispose(),Xt.current.subscription&&Xt.current.subscription.dispose(),St.unobserve(mn.current)}}catch(Qe){}})},[]),(0,X.useEffect)(()=>{if(Xt.current.instance&&me)return document.addEventListener("keydown",we,!1),()=>{document.removeEventListener("keydown",we)}},[Nt,me]),(0,X.useEffect)(()=>{let Le=Xt.current.instance;if(Le&&me){let Qe=ft(Ye);lt.editor.setModelLanguage(Le.getModel(),Qe)}},[Ye,me]),(0,X.useEffect)(()=>{Xt.current.instance&&me&<.editor.setTheme(pt)},[pt,me]),(0,X.useEffect)(()=>{let Le=Xt.current.instance;Fn.current=ot,Le&&me&&(Le.updateOptions(it({},ot)),setTimeout(()=>{Le.getModel().updateOptions(it({},ot))},200))},[JSON.stringify(ot),me]),(0,X.useEffect)(()=>{let Le=Xt.current.instance;Le&&me&&Le.layout()},[ke,Ze,me]);const[He,Ge]=(0,X.useState)(dt(ke)),[Ve,Ke]=(0,X.useState)(dt(Ze)),at=tt(it({},qe),{width:He,height:Ve,position:"relative"});return X.createElement("div",{className:"my-monaco-editor",ref:mn,style:at},Tt&&X.createElement(oe.CopyToClipboard,{text:Ie,onCopy:()=>ne.ZP.success("\u590D\u5236\u6210\u529F")},X.createElement(ce.Z,{title:"\u590D\u5236\u4EE3\u7801"},X.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},X.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Re({width:We="100%",height:Pe="100%",original:ke,modified:Ze,language:Ie,options:Ye={}}){const qe=(0,X.useRef)(),[ot,gt]=(0,X.useState)(null);function pt(jt){let zt;return qe.current&&(zt=new re.Z(Ot=>{for(let Kt of Ot)(Kt.target.offsetHeight>0||Kt.target.offsetWidth>0)&&jt.layout()}),zt.observe(qe.current)),zt}(0,X.useEffect)(()=>(qe.current&&Promise.all([Y.e(8909),Y.e(9404)]).then(Y.bind(Y,2550)).then(jt=>{lt=jt;const zt=lt.editor.createDiffEditor(qe.current,tt(it({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},Ye),{wordWrap:!0}));gt(zt);let Ot=pt(zt);return()=>{zt.dispose();const Kt=zt.getModel();Kt&&Kt.dispose(),Ot.unobserve(qe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,X.useEffect)(()=>{ot&&ot.setModel({original:lt.editor.createModel(ke,Ie),modified:lt.editor.createModel(Ze,Ie)})},[ke,Ze,Ie,ot]);const Lt=dt(We),Tt=dt(Pe),Nt={width:Lt,height:Tt};return X.createElement("div",{className:"my-diff-editor",ref:qe,style:Nt})}},46133:function(Se,Ce,Y){"use strict";Y.d(Ce,{jL:function(){return U},w9:function(){return Ae},QD:function(){return Ot},cQ:function(){return oe},op:function(){return pt},O5:function(){return or},_b:function(){return mr},t7:function(){return O},Gi:function(){return vt},YG:function(){return tt},qp:function(){return p},vr:function(){return $n},qE:function(){return Nt},Je:function(){return c},wb:function(){return se},cq:function(){return lt},tp:function(){return d}});var X=Y(59301),re={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},V="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAE4AAAA0CAYAAAAkEw66AAAAAXNSR0IArs4c6QAAGNVJREFUeF7VmwmwHVWdxr9zuvvu9+3ZXsxCiNkIQZOwEzMgyADjggsWgzPqOAJaMiCjYiGKqDBQAo4iWGAxA+ooMm7gBhSyhBBRIIBSAQlrHuTt7913t97PmfpOd4cXlLAFGO6rW9237719+/z6+6/nPIHX+XHttddaex38nlW2lLO1svq1wJ4aeFMM9CqFnNKoaYVapDAOicfjGEMKqKk2nrx59Lbt5xx6aPR6DEG8Hj/K3xwY0YtjSx2vYnlspLEsX0BRKUBrINtyX+PZp0r3fR+IIgzFSo9EsahFUfSHWIj7Pa919zvf2vlo+rFXdWivObjHJvR8S6vTJORHckV0+4GBAF4InwQlBCAIkEMXgCLA9Mn9WCef4ft8HWkgVIDn6ckwUA/HQfCzoFX71TsP6n/41aL3moHTWotnJnGysPEFx8ZcAtMqGTjh2NmVTL+iDB6BZurjsRSe2SogjhNwMZIngbZbqgXom8N26/KjV3femB7ebRxfE3DbRnW/k8c3LQvv5yCjOFVVqhgCyNnJmAhoxyOFasz1OeCM2lLTJryI4BQQUn1RAhI24Lc1dBjc2K6Nnv2edfP+sLvIvergxqb0vpHA1fk8lre9xBZpZsYKU9sMYiDvAHKaqU4HuANcZrIpcILiezRdo7z0aUw3BoJYI4gELAeI/bjZmBq9+PGNd5x/+unHua8U4KsKbriujxUSV9gW+rwg9WPTfpHgpEgUQgAFJwU6LSDwjSxA8F2jslSBBJaZKwVGJRv1pSAJLyQ8qlwLOA4Q1us31Z58+OTj3rX/E68E3qsGbmhK/6Nt40oIFMJwZ5URFh/cZoGgHQKODeSsaUEiA5iS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391jcV1jE/1qKFcaeCfDwOYeK9D83nv32/wHzrWgvjJ8Q7AAAAABJRU5ErkJggg==",U=({dataSource:Ut=[],img:me,imgWidth:_=346,title:B,sunTitle:R,bannerExtraContent:j})=>X.createElement("div",{className:re.banner},X.createElement("div",{className:re.content},X.createElement("aside",null,X.createElement("p",null,X.createElement("b",null,B),X.createElement("span",null,R)),Ut.length>0&&X.createElement("div",{className:re.btns},Ut.map((Q,Ee)=>X.createElement("div",{key:Ee,onClick:Q.click},Q.name,Q.sign?X.createElement("img",{src:V,width:39}):null))),j),me&&X.createElement("img",{style:{marginTop:33,marginRight:38},src:me,width:_}))),C={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},w=Y(92310),y=Y.n(w),T=Y(89392),p=({dataSource:Ut=[],value:me,onChange:_,onTitleChange:B,className:R,title:j,titleWidth:Q=41,style:Ee={},fontColor:we="#6A7283",showCount:De})=>{const[ye,Me]=(0,X.useState)(0),[Be,He]=(0,X.useState)(!1),Ge=(0,X.useRef)(null),Ve=(0,X.useRef)(null);return(0,X.useEffect)(()=>{var Ke;Ut.length!==0&&(((Ke=Ge==null?void 0:Ge.current)==null?void 0:Ke.clientHeight)>97?Me(1):Me(0)),Ut.length===0&&Me(0),He(!1)},[Ut]),X.createElement("div",{className:y()(C.row,R),style:Ee},X.createElement("div",{onClick:(0,T.throttle)(()=>B==null?void 0:B(),2e3),style:{width:Q,marginTop:Be?12:4},className:`${C.title} ${B?"current":""}`},j),X.createElement("div",{className:Be?`${C.tagsWrap} ${C.tagsBorderWrap}`:C.tagsWrap},X.createElement("div",{className:C.bar,ref:Ve,style:ye>0?{height:ye===1?97:"auto",overflow:ye===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},X.createElement("div",{className:C.tag,ref:Ge},Ut==null?void 0:Ut.map(Ke=>X.createElement("span",{onClick:()=>_(Ke.id),key:Ke.id,style:{color:we},className:me===Ke.id?C.active:""},X.createElement("span",{title:Ke.name,className:C.name},Ke.name),!!De&&X.createElement("span",{className:C.num},Ke.count))))),!!ye&&X.createElement(X.Fragment,null,ye===1?X.createElement("div",{onClick:()=>{var Ke;Me(2),((Ke=Ge==null?void 0:Ge.current)==null?void 0:Ke.clientHeight)>245?He(!0):He(!1)},className:C.action},"\u5C55\u5F00",X.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):X.createElement("div",{onClick:()=>{Ve.current.scrollTop=0,Me(1),He(!1)},className:C.action},"\u6536\u8D77",X.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},m={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},d=({dataSource:Ut=[],value:me,onChange:_,className:B,style:R={}})=>X.createElement("div",{style:R,className:y()(m.tabs,B)},Ut.map(j=>X.createElement("span",{onClick:()=>_(j.id),className:me===j.id?m.active:"",key:j.id},j.name))),g={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},A=Y(37568),O=({dataSource:Ut=[],value:me="",onChange:_,onInputChange:B=()=>{},className:R,style:j={},placeholder:Q,allowClear:Ee=!1})=>{var we;const[De,ye]=(0,X.useState)(""),[Me,Be]=(0,X.useState)("");(0,X.useEffect)(()=>{var Ve;let Ke=me;(Ve=JSON.stringify(me))!=null&&Ve.includes("{")&&(ye(me.id),Ke=me.value||"");try{Be(decodeURIComponent(Ke||""))}catch(at){Be(decodeURIComponent(Ke||""))}},[me]);const He=()=>{_(encodeURIComponent(Me),De||null)},Ge=Ve=>{Ve!==De&&(ye(Ve),_(encodeURIComponent(Me),Ve))};return X.createElement("div",{className:y()(g.input,R),style:j},!!Ut.length&&X.createElement("div",{className:g.dropdown},X.createElement("div",{className:g.text},(we=Ut.find(Ve=>Ve.id===De))==null?void 0:we.name,X.createElement("i",{className:"iconfont icon-zhankai4"}),X.createElement("b",{className:g.b1}),X.createElement("b",{className:g.b2})),X.createElement("div",{className:g.menu},Ut.map((Ve,Ke)=>X.createElement("div",{key:Ke,onClick:()=>Ge(Ve.id)},Ve.name)))),X.createElement(A.default,{onPressEnter:He,value:Me,onChange:Ve=>{Be(Ve.target.value),B(encodeURIComponent(Ve.target.value),De||null)},bordered:!1,placeholder:Q}),X.createElement("i",{onClick:He,className:"iconfont icon-sousuo9 font14 pl10 current"}))},S={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},c=({value:Ut,onChange:me,className:_,total:B,pageSize:R,style:j={}})=>{const Q=Ut<2,Ee=Ut>=Math.ceil(B/R);return B<=R?X.createElement(X.Fragment,null):X.createElement("div",{className:y()(S.quickPager,_),style:j},X.createElement("div",{onClick:()=>{Q||me(Ut-1,"prev")},className:Q?S.disabled:""},"\u4E0A\u4E00\u9875"),X.createElement("div",{onClick:()=>{Ee||me(Ut+1,"next")},className:Ee?S.disabled:""},"\u4E0B\u4E00\u9875"))},f={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},P=Y(29787),N=Y(25399),k=Y(58018),W=Y(12242),z=Y(59895),Z=Y(96908),J=Y(57177),ee=Y(81378),$=Y(12635),se=({className:Ut,dataSource:me=[],col:_=4,right:B,bottom:R=23,precision:j=0,wrapWidth:Q=1200,trackEventItems:Ee,loading:we})=>{const De=Math.floor((Q-(_-1)*B)/_);return X.createElement(P.Z,{spinning:we},X.createElement("div",{className:y()(f.list,Ut)},!!me.length&&me.map((ye,Me)=>{const{name:Be,id:He,identifier:Ge,power:Ve,cover_image_id:Ke,pic:at}=ye;return X.createElement("div",{className:f.wrap,key:He,style:{width:De,marginRight:(1+Me)%_===0?0:B+j,marginBottom:R}},X.createElement("a",{target:"_blank",href:`/shixuns/${Ge}/challenges`,className:f.li,onClick:Le=>{Le.preventDefault(),Ee&&(0,z.L9)([Ee]),Ve&&(0,z.xg)(`/shixuns/${Ge}/challenges`)}},X.createElement("div",{className:f.img},X.createElement("img",{className:f.cover,src:`${at}`}),ye.is_jupyter&&X.createElement("img",{className:f.sign,src:Z}),ye.is_jupyter_lab&&X.createElement("img",{className:f.sign,src:J}),ye.is_unity_3d&&X.createElement("img",{className:f.sign,src:ee})),X.createElement("div",{className:f.name},X.createElement(N.Z,{title:Be||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},X.createElement("span",{className:f.e},Be||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),X.createElement("div",{className:f.tags},X.createElement(N.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},X.createElement("span",null,X.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),X.createElement("span",null,ye.challenges_count))),!!ye.myshixuns_count&&X.createElement(N.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},X.createElement("span",null,X.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),X.createElement("span",null,ye.myshixuns_count))),X.createElement(N.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},X.createElement("span",null,X.createElement("span",null,ye.level))),X.createElement("div",{className:f.rate},X.createElement(k.Z,{allowHalf:!0,disabled:!0,defaultValue:ye.score_info}),X.createElement("span",null,"\xA0",ye.score_info?`${ye.score_info}\u5206`:"5\u5206")))),!Ve&&X.createElement("div",{className:f.lockWrap},X.createElement("img",{src:`${W.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),X.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!me.length&&X.createElement($.Z,null)))},ne={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},ce=Y(69669),ae=Y(59301),oe=({className:Ut,dataSource:me=[],col:_=4,right:B,bottom:R=23,precision:j=0,wrapWidth:Q=1200,trackEventItems:Ee,loading:we,onRemove:De=()=>{},isCurrent:ye=!0,showAlias:Me=!1})=>{const Be=Math.floor((Q-(_-1)*B)/_),He=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return ae.createElement(P.Z,{spinning:we},ae.createElement("div",{className:y()(ne.list,Ut)},!!(me!=null&&me.length)&&(me==null?void 0:me.map((Ge,Ve)=>{var Ke;const{name:at,id:Le,identifier:Qe,featured:ut,school_name:bt,image_url:It,excellent:Ct,is_plan:_t}=Ge;return ae.createElement("div",{key:Le,className:ne.wrap,style:{width:Be,marginRight:(1+Ve)%_===0?0:B+j,marginBottom:R}},ae.createElement("a",{className:ne.li,onClick:St=>{St.preventDefault(),St.stopPropagation(),Ee&&(0,z.L9)([Ee]),(0,z.xg)(`/paths/${Qe}`)}},ae.createElement("div",{className:ne.img},ae.createElement("img",{className:ne.cover,src:`${It}`}),ye&&(0,ce.bg)()&&(Ge==null?void 0:Ge.studying)&&ae.createElement("div",{className:`${ne.movebq} user-path-items`,onClick:St=>{St.stopPropagation(),De(Ge)}},ae.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),ae.createElement("span",{className:"c-red"},"\u79FB\u9664")),(Ke=Ge==null?void 0:Ge.subject_tags)==null?void 0:Ke.map((St,Bt)=>{var $e,xt;if(Bt===0){const Mt=($e=He.find(rn=>rn.name==St))==null?void 0:$e.swimg;return ae.createElement("img",{className:ne.sign,src:Mt,style:{left:"-4px"}})}const Rt=(xt=He.find(Mt=>Mt.name==St))==null?void 0:xt.ptimg;return ae.createElement("img",{className:ne.sign,src:Rt,style:{left:`${48+52*(Bt-1)+2*Bt}px`}})}),ae.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(Ge==null?void 0:Ge.excellent)&&ae.createElement("div",{className:ne.bq},"\u5F00\u653E\u8BFE\u7A0B"))),ae.createElement("div",{className:ne.name},ae.createElement(N.Z,{title:Me&&(Ge!=null&&Ge.excellent_alias_name)?ae.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${at}`,ae.createElement("br",null),ae.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${Ge==null?void 0:Ge.excellent_alias_name}`)):at},ae.createElement("span",{className:ne.e},Me&&(Ge==null?void 0:Ge.excellent_alias_name)||at))),ae.createElement(N.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${bt}`},ae.createElement("div",{className:ne.unit},ae.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),bt)),ae.createElement("div",{className:ne.tags},ae.createElement("div",null,ae.createElement(N.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},ae.createElement("span",null,ae.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),ae.createElement("span",null,Ge.stages_count))),ae.createElement(N.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},ae.createElement("span",null,ae.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),ae.createElement("span",null,Ge.members_count)))))))})),!me.length&&ae.createElement($.Z,null)))},pe={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},_e="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHgAAAB4CAYAAAA5ZDbSAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXWmQXFd1/s59r3t6nX00o93GluV9AQNxiAkIB0OMISFsFQqSAhOohFR+JKmEQPILClJZfpEfIUAChFQSHIJxnGDiDYwsb8KRLUuWZcmSxqN9pJF6nV7eSZ373u1509Mzvd2eGVt6VV2z9Ht3+9459+yX8Bq4mDmWK2GLqla3MvFWZt4KpjVMSBNzGoQ0M6WJkJbpMiNDxBkwMkyUIUYGxCeJaB8x7fMcZ18yiv1EVHy1Lw+9GicwO8tXlSrlbSB6O4HfANAmZlY250JEHsBHGLQTzA9H3chDfX2012Yfy9HWqwJgZh7NF6vvY/a2gWkbgyeWY3Hq+yDQcRA/RKQeSsSce4jo9EqMo50+Vy3AzNxXKFTv9MAfB/AuZo60M7Fe30tEZQA/UqBvx+POvUQ02+s+O2l/1QGcy5Xe6Cn1SXj8YYAHO5nU8j9DM1D0b8rzvpFMRp9a/v4X73HVAJwplN9GHj7P4NtW0wK1OxYCPcAKX0rHI4+0+2wv7l9xgHPFyrs9j78A5l/sxQRXrE2ix5SiLyZj7v+s2BgArBjA+XzpzR7oq8x880ouQK/7JqKnFfiziUT0iV731aj9ZQeYmYez+fJXiOguZl72/ldkkYmYmb+eSkT+lIjOLOcYlm2BBcx8sfoJz+O/BHhkOSe5evqiaaXoTxIx55tExMsxrmUBOJ/njVVUvgvmW5djUqu+D6JHHbgfTSRostdj7TnAuWLlDq/K37pwqXYxCGlaOfRbyZh7Xy9B7hnAzOzmCpUvA/jDC2WvbReogE3/TTLufo6IKu0+38r9PQE4n+f1VVS+B+ZbWhnEBX8P0Q4H7gcTCZqyvRbWARZHQLlavp8ZG20P9rXcHhEmI07kdtsODasA5/OlX6gy/dfF/bbT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HKtsoPOGQzMA/7sCvp5MRp9aTSNdNRRcvyhSTqJQqN7pgT8O4F3MvArC3uZGKdVsAPxIgb4djzv3EtHsagLWjGXVAhxeLCnxlC9W38fsbQPTNgZPrMRiSgU5ED9EpB5KxJx7iKjFkxlXYrR+n68KgOuXJ6ituQ1E2wj8eoA2McuxWPYuqbcM8BEG7QTzw1E38pBtR4C90S7e0qsS4AbsPJYrYYuqVrcy8VZm3gqmcSakiTkFQpqZ0kRIy7PMyBBxBowME2WJkQHxCSLaR0z7PMfZl4xiPxFdXaKvAAAADElEQVQVlwOEXvbx/3Bccpan8cseAAAAAElFTkSuQmCC",de=Y(59301),Ae=({className:Ut,dataSource:me=[],col:_=4,right:B,bottom:R=23,precision:j=0,wrapWidth:Q=1200,trackEventItems:Ee,loading:we,handleVery:De=()=>!0})=>{const ye=Math.floor((Q-(_-1)*B)/_);return de.createElement(P.Z,{spinning:we},de.createElement("div",{className:y()(pe.list,Ut)},!!me.length&&me.map((Me,Be)=>{const{subject_identifier:He,id:Ge,identifier:Ve,power:Ke}=Me,at=Me.is_public!=0&&Me.is_public;return de.createElement("div",{className:pe.wrap,key:Ge,style:{width:ye,marginRight:(1+Be)%_===0?0:B+j,marginBottom:R}},de.createElement("a",{className:pe.li,onClick:Le=>{Le.preventDefault(),De(Me==null?void 0:Me.first_category_url)&&(Ee&&(0,z.L9)([Ee]),(0,z.xg)(Me.first_category_url))}},de.createElement("div",{className:pe.top},de.createElement(N.Z,{title:Me.name},de.createElement("div",{className:pe.name},Me.name)),de.createElement("img",{className:pe.img,src:W.Z.IMG_SERVER+"/images/"+Me.avatar_url}),de.createElement("div",{className:pe.text,title:Me.creator},Me.creator),He&&de.createElement("div",{className:pe.btns},de.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),de.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),at&&de.createElement("div",{className:pe.sign},"\u516C\u5F00")),de.createElement("div",{className:pe.bottom},Me.visits>0&&de.createElement(N.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},de.createElement("span",null,de.createElement("i",{className:"iconfont icon-liulanyan"}),de.createElement("span",null,Me.visits))),Me.course_members_count>0&&de.createElement(N.Z,{title:"\u6210\u5458",placement:"bottom"},de.createElement("span",null,de.createElement("i",{className:"iconfont icon-chengyuan"}),Me.course_members_count)),Me.tasks_count>0&&de.createElement(N.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},de.createElement("span",null,de.createElement("i",{className:"iconfont icon-zuoye"}),Me.tasks_count)),Me.is_end?de.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):de.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!Me.is_accessible&&de.createElement("div",{className:pe.lockWrap},de.createElement("img",{src:`${W.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),de.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!me.length&&de.createElement($.Z,null)))},Fe={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},Ue=Y(71570),tt=({dataSource:Ut=[],value:me,onChange:_,className:B,style:R={},tabBarExtraContent:j})=>X.createElement("div",{className:y()(Fe.tabs,B),style:R},X.createElement("div",{className:Fe.tabsWrap},Ut.map((Q,Ee)=>!(Q!=null&&Q.hide)&&X.createElement("aside",{className:Fe.tab,onClick:()=>{_(Q.id),Q.link&&Ue.history.push(Q.link)},key:Ee},X.createElement("div",{className:me===Q.id?Fe.active:""},Q.name),(Q==null?void 0:Q.resetCount)==null&&(Q==null?void 0:Q.total)!==void 0&&X.createElement("span",null,"\uFF08",Q==null?void 0:Q.total,"\uFF09"),(Q==null?void 0:Q.resetCount)!==void 0&&(Q==null?void 0:Q.total)!==void 0&&X.createElement(N.Z,{title:(Q==null?void 0:Q.tip)!=null?Q==null?void 0:Q.tip:""},X.createElement("span",{style:{color:"#9096A3"}},"\uFF08",X.createElement("span",{style:{color:"#000"}},Q==null?void 0:Q.resetCount),"/",X.createElement("span",null,Q==null?void 0:Q.total),"\uFF09"))))),X.createElement("div",{className:Fe.tabBar},j)),vt=({className:Ut,style:me={},children:_})=>X.createElement("div",{className:y()(Ut),style:me},_),dt={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},je=Y(75727),nt=Y(93041);const rt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var lt=({sortValue:Ut,dropValue:me,className:_,onSort:B,onDrop:R,dataSource:j=rt})=>{var Q;return X.createElement("div",{className:y()(dt.orderWrap,_)},X.createElement(je.Z,{dropdownRender:()=>X.createElement(nt.default,null,j.map((Ee,we)=>X.createElement(nt.default.Item,{key:we,onClick:()=>R(Ee.id)},Ee.name)))},X.createElement("span",{className:dt.orderTextWrap},(Q=j.find(Ee=>me===Ee.id))==null?void 0:Q.name)),X.createElement("span",{className:dt.orderIconWrap},X.createElement("span",{className:dt.orderAsc},X.createElement("i",{className:Ut==="asc"?`iconfont icon-sanjiaoxing-up font12 ${dt.cursorPointer} ${dt.active}`:`iconfont icon-sanjiaoxing-up font12 ${dt.cursorPointer}`,onClick:()=>B(Ut==="asc"?"desc":"asc")})),X.createElement("span",{className:dt.orderDesc},X.createElement("i",{className:Ut==="desc"?`iconfont icon-sanjiaoxing-down font12 ${dt.cursorPointer} ${dt.active}`:`iconfont icon-sanjiaoxing-down font12 ${dt.cursorPointer}`,onClick:()=>B(Ut==="asc"?"desc":"asc")}))))},wt={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},Re=Y(99571),We=Object.defineProperty,Pe=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,Ie=(Ut,me,_)=>me in Ut?We(Ut,me,{enumerable:!0,configurable:!0,writable:!0,value:_}):Ut[me]=_,Ye=(Ut,me)=>{for(var _ in me||(me={}))ke.call(me,_)&&Ie(Ut,_,me[_]);if(Pe)for(var _ of Pe(me))Ze.call(me,_)&&Ie(Ut,_,me[_]);return Ut},qe=(Ut,me)=>{var _={};for(var B in Ut)ke.call(Ut,B)&&me.indexOf(B)<0&&(_[B]=Ut[B]);if(Ut!=null&&Pe)for(var B of Pe(Ut))me.indexOf(B)<0&&Ze.call(Ut,B)&&(_[B]=Ut[B]);return _},ot=(Ut,me,_)=>new Promise((B,R)=>{var j=we=>{try{Ee(_.next(we))}catch(De){R(De)}},Q=we=>{try{Ee(_.throw(we))}catch(De){R(De)}},Ee=we=>we.done?B(we.value):Promise.resolve(we.value).then(j,Q);Ee((_=_.apply(Ut,me)).next())}),pt=Ut=>{var me=Ut,{className:_,style:B,children:R,loading:j=!1,openLoading:Q,onClick:Ee=()=>{},size:we="middle",shape:De="round"}=me,ye=qe(me,["className","style","children","loading","openLoading","onClick","size","shape"]);const[Me,Be]=(0,X.useState)(!1);return X.createElement(Re.ZP,Ye({onClick:(0,T.throttle)(He=>ot(void 0,null,function*(){Q&&Be(!0);try{yield Ee(He)}catch(Ge){console.log("error",Ge)}Q&&Be(!1)}),2e3,{leading:!0,trailing:!1}),className:y()(wt.btn,wt[`${we}-${De}`],_),style:B,size:we,shape:De,loading:Me||j},ye),R)},Lt={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Nt=({className:Ut,style:me,children:_=null,onClick:B,title:R})=>X.createElement("div",{className:y()(Lt.head,Ut),style:me},X.createElement("span",{className:"primary-hover",onClick:B},X.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),X.createElement("b",{title:R},R),X.createElement("div",{className:Lt.node},_)),jt={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Ot=({confirmShow:Ut=!0,confirmTitle:me,confirmClick:_,cancelShow:B=!0,cancelTitle:R,cancelClick:j,className:Q,style:Ee,confirmLoading:we=!1})=>X.createElement("div",{className:y()(jt.btns,Q),style:Ee},Ut&&X.createElement(Re.ZP,{loading:we,onClick:_,type:"primary",className:jt.confirm},me),B&&X.createElement(Re.ZP,{onClick:j,className:jt.cancel},R)),Kt={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},$n=({className:Ut,style:me={},LeftContent:_,children:B,RightContent:R})=>X.createElement("div",{className:y()(Kt.fixedBottom,Ut),style:me},X.createElement("div",{className:Kt.wrap},X.createElement("div",{className:Kt.left},_),X.createElement("div",{className:Kt.center},B),X.createElement("div",{className:Kt.right},R))),On={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},mr=({className:Ut,style:me={},dataSource:_=[]})=>X.createElement("div",{className:y()(On.crumbs,Ut),style:me},_.map((B,R)=>R<_.length-1?X.createElement(X.Fragment,{key:R},B.path||B.onClick?X.createElement("span",{className:On.hover,onClick:B!=null&&B.onClick?B.onClick:()=>Ue.history.push(B.path)},B.name):X.createElement("span",null,B.name),X.createElement("span",null,"\xA0",">","\xA0")):X.createElement("span",{key:R,style:{color:"#5F6368"}},B.name))),ar=Y(11938),Vn=Object.defineProperty,Rr=Object.defineProperties,er=Object.getOwnPropertyDescriptors,an=Object.getOwnPropertySymbols,$t=Object.prototype.hasOwnProperty,mn=Object.prototype.propertyIsEnumerable,Xt=(Ut,me,_)=>me in Ut?Vn(Ut,me,{enumerable:!0,configurable:!0,writable:!0,value:_}):Ut[me]=_,Fn=(Ut,me)=>{for(var _ in me||(me={}))$t.call(me,_)&&Xt(Ut,_,me[_]);if(an)for(var _ of an(me))mn.call(me,_)&&Xt(Ut,_,me[_]);return Ut},sr=(Ut,me)=>Rr(Ut,er(me)),Cn=(Ut,me)=>{var _={};for(var B in Ut)$t.call(Ut,B)&&me.indexOf(B)<0&&(_[B]=Ut[B]);if(Ut!=null&&an)for(var B of an(Ut))me.indexOf(B)<0&&mn.call(Ut,B)&&(_[B]=Ut[B]);return _};const{Countdown:tr}=ar.default;var or=Ut=>{var me=Ut,{onChange:_}=me,B=Cn(me,["onChange"]);const[R,j]=(0,X.useState)(null);(0,X.useEffect)(()=>{typeof R=="number"&&R>=0&&_(R)},[R]);const Q=Ee=>{const we=Math.floor(Ee/1e3);j(we)};return X.createElement(tr,sr(Fn({},B),{onChange:Q}))}},94432:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return N}});var X=Y(25399),re=Y(59301),V=Y(71570),b=Y(59895),U=Y.p+"static/nltpbg.f01aad4b.png",C=Y.p+"static/nltpbg2.303fcb0b.png",w={title:"title___m9Fww",bg:"bg___f9tLu"},y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAnMAAAJzCAYAAABksJUOAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAACc6ADAAQAAAABAAACcwAAAACCpLptAABAAElEQVR4Aey9abAtR3UumLWnM10NVwIkIRAgkIQEZhAzGISfgfcEZuaAhMFBvI6GX+1o0w9LQryI4zCSGBx0B/0L/eggHma8ZjRYz8bGYGMGM5lRgBgMPEACS1fSvWfcQ/X3rcpVO3edfe6Z9q5h18ob92RWDrsyv1y51leZWVmRM2cIGAKGQKEIxNHyO9x8b8MtDgZuMY7dYruV+AxHkVvoD1yz0XStuO9akXMN/GvFzrVc7Jouwn+m++sYaSjTlDTE898gdj2kD5C3j3v0GvCR3pfryPXwmz383iBCWuzToqbr4V+fPuqxjt9c4/9uL/EbDbfWmndrx17vNpyLUNycIWAIGALFIAAdZs4QMAQMgckisLISN74y586Yd+5oPHBn9iO31AYpA2MiOVsCaVrwRG0J/rwQL7AtOtAiFBE/ArECN3MOfpTG+zDzMh7lY6RFIHji0nyIy6M8SSHuuTEAuRPCF7vVAUhfEwSw14ffdKtRw90Nxnf8CZvunpUVtN6cIWAIGAITRMDI3ATBtJ8yBGqDQIzZtLe607uxOzrouqOtpjsTDOwopqeONlruzKjvTgehaRIPkq2QkJGAaTx9EKCUqPEaM16cQxOixutZKt8A8QPpOwEAjmOW8Xi/4Y5jfvDuRtsdB9k9fuwad6+gwYabMwQMAUNgj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NsDGmJ87mTfFrjEYQJ8jjilejM46BnZV1/kxGJifziC5bfp1n8LrtyIDg7XRbhj5kyifkwSWwmhJwMLeaz9XvyiUwRwJpsreHY8a+Lo1HZ9K40ZD68Fia/ZYkBvJmGYvoMY2b1+o2J8EL6PzTEohlZTkx7VXl1+pL2rghg82hjH6zJcNv/I0M8YxxcL173UzeHrsEVl0CDuZW/Qn7/bkELiABrpz9v7AVyldvSr25K43jnjRuDTEHb4Y3BiGWVURjnoEUK6e0AsDn/NlQeCwnlVUAyUZvwUs6rsu4mchgcCjDz45k9A+EwM33dzMZeewSWFcJOJhb1yfv9+0SuIAEuMjizQfSgOetfutA6sktqWGbijrm5NUJLvph/p19VRid1cs4P05b2SKa84t04WHDsPiInrYvGjIGKB49eFOGn/riBFMdj10CLoEZCTiYmxGIX7oEXAIXkwC9eV98Ser9+wB2IrVbv4P0EY4na0qdc/Pib4mBG4cFOaw7lV9Am8qPgGPV+TGHjcdejVs3ZXSANOQ3bn1JRl++LyP3ssVP3dMuAZfARSUwZVAvyuTlXAIuAZfAiyRAr97tZ/DktQD2+lK7eSTJzpYk+yOpbbUlSRAfA/RtYOg19vAR+MmxCAFfDyDvxg2k4QGM6ZpGBYy+bP4uVgwTZBKkYRXx+C7+T84kZfrZbc0bIR67d+1FWuP5LgGXwMtIwMHcy0jNeVwCLoErlQC3VXnrU6n9g/8bHru/L7X9B5LAg1XD4e21MwDAe/g1gsDNbUkPHkvtNs46w+bJXG3LxRdJe1PSDfAc7sJFGLyCG12ARABCgiwBICRA7G5kK09Jw/BlymvlR5rX+EoNt16XcedUks2OpCc7km4FYIbh5fHdNyX94hnKApz9+psy9u09gtA8cgm4BJYmgf8fqOZsRaZ0WgEAAAAASUVORK5CYII=",T=Y.p+"static/2.3612d2e5.png",x=Y.p+"static/3.0ae7bccf.png",p=Y.p+"static/4.d75cb058.png",m=Y.p+"static/5.89f1948f.png",L=Y.p+"static/6.cc2d55ef.png",d=Y.p+"static/7.3afb9435.png",g=Y.p+"static/8.5401d4a7.png",A=Object.defineProperty,M=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,I=(k,W,z)=>W in k?A(k,W,{enumerable:!0,configurable:!0,writable:!0,value:z}):k[W]=z,c=(k,W)=>{for(var z in W||(W={}))O.call(W,z)&&I(k,z,W[z]);if(M)for(var z of M(W))S.call(W,z)&&I(k,z,W[z]);return k};const f=({DataProps:k=[],baifenbi:W=1,pathsDetail:z,isShow:Z,item:J,i:ee})=>{const $=(0,V.useParams)(),[ie,se]=(0,re.useState)(0),ne=33,ce=Math.PI/2+ee*(Math.PI*2/(k==null?void 0:k.length)),ae=ne*Math.cos(ce)/100,fe=ne*Math.sin(ce)/100;return re.createElement(X.Z,{color:"#444FC2",title:Z?null:re.createElement("div",{style:{fontSize:`${14*W}rem`}},re.createElement("div",null,"\u8986\u76D6",(J==null?void 0:J.children_count)||0,"\u4E2A\u5B50\u80FD\u529B\u3001",(J==null?void 0:J.subject_knowledge_graph_count)||0,"\u4E2A\u77E5\u8BC6\u70B9"),re.createElement("div",{style:{marginTop:"10rem"}},"\u70B9\u51FB\u67E5\u770B\u8BE6\u60C5"))},re.createElement("div",{className:`flex flex-col item-center justify-center absolute ${Z?"":"current"} ${w.title}`,onClick:()=>{Z||(0,b.xg)(`/knowledgegraph/${$==null?void 0:$.pathId}/abilityMap/detail/${J==null?void 0:J.id}${window.location.search}`)},onMouseOver:()=>{Z||se(2)},onMouseOut:()=>{Z||se(0)},style:{left:`calc(50% - ${ae*100}%)`,top:`calc(50% - ${fe*100}%)`,transform:"translate(-50%,-50%)",width:"20%",fontSize:`${(14+ie)*W}rem`}},re.createElement("div",{style:{opacity:"0.8"}},"\u4E3B\u80FD\u529B"),re.createElement("div",{className:"multi_ellipsis1",style:{fontSize:`${18*W}rem`,fontWeight:500}},J==null?void 0:J.name),!(z!=null&&z.detail.can_managed)&&re.createElement("div",null,"\u638C\u63E1\u7387 ",J==null?void 0:J.grasp_rate," %")))},P=({DataProps:k=[],className:W="",style:z={},baifenbi:Z=1,pathsDetail:J,isShow:ee})=>{const $=(0,re.useMemo)(()=>{const ie=["",y,T,x,p,m,L,d,g];return ie==null?void 0:ie[(k==null?void 0:k.length)||0]},[k]);return re.createElement("div",{className:`w-full h-full flex item-center justify-center relative overflow_hidden ${W} ${w.bg}`,style:c({backgroundImage:`url(${k!=null&&k.length?C:U})`,backgroundSize:"auto 100%",height:"100%"},z)},((k==null?void 0:k.length)||0)>0&&re.createElement("img",{className:`absolute ${w.bg}`,src:$,style:{width:"95%",height:"95%",left:"50%",top:"50%",transform:`translate(-50%, -50%) ${[2,3,6].includes(k==null?void 0:k.length)?"rotate(90deg)":(k==null?void 0:k.length)==7?"rotate(25deg)":""}`}}),k==null?void 0:k.map((ie,se)=>re.createElement(f,{key:se,i:se,item:ie,DataProps:k,className:W,style:z,baifenbi:Z,pathsDetail:J,isShow:ee})),re.createElement("div",{className:"text-center"},re.createElement("div",{style:{fontSize:`${28*Z}rem`}},"\u80FD\u529B\u76EE\u6807"),re.createElement("div",{style:{fontSize:`${12*Z}rem`}},"\u70B9\u51FB\u73AF\u56FE\u67E5\u770B\u80FD\u529B\u8BE6\u60C5")))};var N=(0,V.connect)(({pathsDetail:k})=>({pathsDetail:k}))(P)},72890:function(Se,Ce,Y){"use strict";Y.d(Ce,{BU:function(){return re},Dj:function(){return X},gH:function(){return V},vp:function(){return b}});function X(U){try{U.mozRequestFullScreen?U.mozRequestFullScreen():U.webkitRequestFullScreen&&U.webkitRequestFullScreen()}catch(C){console.log(C,":e")}}function re(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const V=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function b(){var U=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,C=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",U),window.isFullScreen?window.isFullScreen:U!=null}},16948:function(Se,Ce,Y){"use strict";Y.d(Ce,{U:function(){return T}});var X=Y(59301),re=Object.defineProperty,V=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,C=(x,p,m)=>p in x?re(x,p,{enumerable:!0,configurable:!0,writable:!0,value:m}):x[p]=m,w=(x,p)=>{for(var m in p||(p={}))b.call(p,m)&&C(x,m,p[m]);if(V)for(var m of V(p))U.call(p,m)&&C(x,m,p[m]);return x},y=(x,p,m)=>new Promise((L,d)=>{var g=O=>{try{M(m.next(O))}catch(S){d(S)}},A=O=>{try{M(m.throw(O))}catch(S){d(S)}},M=O=>O.done?L(O.value):Promise.resolve(O.value).then(g,A);M((m=m.apply(x,p)).next())});function T(x,p){const[m,L]=(0,X.useState)(p),[d,g]=(0,X.useState)(!1),[A,M]=(0,X.useState)();return[m,d,(S,I=!1)=>y(this,null,function*(){const c=I?p:w(w({},m),S);g(!0),L(c);const f=yield x(c);return g(!1),M(f),f}),A,M]}},92841:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return Ut}});class X{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(_,B){return _.__proto__=B,_},Object.assign=Object.assign||function(_){if(_==null)throw new TypeError("Cannot convert undefined or null to object");let B=Object(_);for(let R=1;R<arguments.length;R++){let j=arguments[R];if(j!=null)for(let Q in j)j.hasOwnProperty(Q)&&(B[Q]=j[Q])}return B},typeof self.Promise!="function"&&Y(3867).polyfill()}}X.install();var re=X,V=Y(86204),b=Y.n(V);class U{static e(_,B){(!_||U.FORCE_GLOBAL_TAG)&&(_=U.GLOBAL_TAG);let R=`[${_}] > ${B}`;U.ENABLE_CALLBACK&&U.emitter.emit("log","error",R),U.ENABLE_ERROR&&(console.error?console.error(R):console.warn?console.warn(R):console.log(R))}static i(_,B){(!_||U.FORCE_GLOBAL_TAG)&&(_=U.GLOBAL_TAG);let R=`[${_}] > ${B}`;U.ENABLE_CALLBACK&&U.emitter.emit("log","info",R),U.ENABLE_INFO&&(console.info?console.info(R):console.log(R))}static w(_,B){(!_||U.FORCE_GLOBAL_TAG)&&(_=U.GLOBAL_TAG);let R=`[${_}] > ${B}`;U.ENABLE_CALLBACK&&U.emitter.emit("log","warn",R),U.ENABLE_WARN&&(console.warn?console.warn(R):console.log(R))}static d(_,B){(!_||U.FORCE_GLOBAL_TAG)&&(_=U.GLOBAL_TAG);let R=`[${_}] > ${B}`;U.ENABLE_CALLBACK&&U.emitter.emit("log","debug",R),U.ENABLE_DEBUG&&(console.debug?console.debug(R):console.log(R))}static v(_,B){(!_||U.FORCE_GLOBAL_TAG)&&(_=U.GLOBAL_TAG);let R=`[${_}] > ${B}`;U.ENABLE_CALLBACK&&U.emitter.emit("log","verbose",R),U.ENABLE_VERBOSE&&console.log(R)}}U.GLOBAL_TAG="flv.js",U.FORCE_GLOBAL_TAG=!1,U.ENABLE_ERROR=!0,U.ENABLE_INFO=!0,U.ENABLE_WARN=!0,U.ENABLE_DEBUG=!0,U.ENABLE_VERBOSE=!0,U.ENABLE_CALLBACK=!1,U.emitter=new(b());var C=U;class w{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(_){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=_,this._totalBytes+=_):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=_,this._totalBytes+=_):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=_,this._totalBytes+=_,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let _=(this._now()-this._lastCheckpoint)/1e3;return _==0&&(_=1),this._intervalBytes/_/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let _=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/_/1024}}var y=w;class T{constructor(_){this._message=_}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class x extends T{constructor(_){super(_)}get name(){return"IllegalStateException"}}class p extends T{constructor(_){super(_)}get name(){return"InvalidArgumentException"}}class m extends T{constructor(_){super(_)}get name(){return"NotImplementedException"}}const L={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},d={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class g{constructor(_){this._type=_||"undefined",this._status=L.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=L.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===L.kConnecting||this._status===L.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(_){this._onContentLengthKnown=_}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(_){this._onURLRedirect=_}get onDataArrival(){return this._onDataArrival}set onDataArrival(_){this._onDataArrival=_}get onError(){return this._onError}set onError(_){this._onError=_}get onComplete(){return this._onComplete}set onComplete(_){this._onComplete=_}open(_,B){throw new m("Unimplemented abstract function!")}abort(){throw new m("Unimplemented abstract function!")}}let A={};function M(){let me=self.navigator.userAgent.toLowerCase(),_=/(edge)\/([\w.]+)/.exec(me)||/(opr)[\/]([\w.]+)/.exec(me)||/(chrome)[ \/]([\w.]+)/.exec(me)||/(iemobile)[\/]([\w.]+)/.exec(me)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(me)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec(me)||/(webkit)[ \/]([\w.]+)/.exec(me)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(me)||/(msie) ([\w.]+)/.exec(me)||me.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec(me)||me.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec(me)||[],B=/(ipad)/.exec(me)||/(ipod)/.exec(me)||/(windows phone)/.exec(me)||/(iphone)/.exec(me)||/(kindle)/.exec(me)||/(android)/.exec(me)||/(windows)/.exec(me)||/(mac)/.exec(me)||/(linux)/.exec(me)||/(cros)/.exec(me)||[],R={browser:_[5]||_[3]||_[1]||"",version:_[2]||_[4]||"0",majorVersion:_[4]||_[2]||"0",platform:B[0]||""},j={};if(R.browser){j[R.browser]=!0;let Q=R.majorVersion.split(".");j.version={major:parseInt(R.majorVersion,10),string:R.version},Q.length>1&&(j.version.minor=parseInt(Q[1],10)),Q.length>2&&(j.version.build=parseInt(Q[2],10))}if(R.platform&&(j[R.platform]=!0),(j.chrome||j.opr||j.safari)&&(j.webkit=!0),j.rv||j.iemobile){j.rv&&delete j.rv;let Q="msie";R.browser=Q,j[Q]=!0}if(j.edge){delete j.edge;let Q="msedge";R.browser=Q,j[Q]=!0}if(j.opr){let Q="opera";R.browser=Q,j[Q]=!0}if(j.safari&&j.android){let Q="android";R.browser=Q,j[Q]=!0}j.name=R.browser,j.platform=R.platform;for(let Q in A)A.hasOwnProperty(Q)&&delete A[Q];Object.assign(A,j)}M();var O=A;class S extends g{static isSupported(){try{let _=O.msedge&&O.version.minor>=15048,B=O.msedge?_:!0;return self.fetch&&self.ReadableStream&&B}catch(_){return!1}}constructor(_,B){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=_,this._config=B,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(_,B){this._dataSource=_,this._range=B;let R=_.url;this._config.reuseRedirectedURL&&_.redirectedURL!=null&&(R=_.redirectedURL);let j=this._seekHandler.getConfig(R,B),Q=new self.Headers;if(typeof j.headers=="object"){let we=j.headers;for(let De in we)we.hasOwnProperty(De)&&Q.append(De,we[De])}let Ee={method:"GET",headers:Q,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let we in this._config.headers)Q.append(we,this._config.headers[we]);_.cors===!1&&(Ee.mode="same-origin"),_.withCredentials&&(Ee.credentials="include"),_.referrerPolicy&&(Ee.referrerPolicy=_.referrerPolicy),this._status=L.kConnecting,self.fetch(j.url,Ee).then(we=>{if(this._requestAbort){this._requestAbort=!1,this._status=L.kIdle;return}if(we.ok&&we.status>=200&&we.status<=299){if(we.url!==j.url&&this._onURLRedirect){let ye=this._seekHandler.removeURLParameters(we.url);this._onURLRedirect(ye)}let De=we.headers.get("Content-Length");return De!=null&&(this._contentLength=parseInt(De),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,we.body.getReader())}else if(this._status=L.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:we.status,msg:we.statusText});else throw new T("FetchStreamLoader: Http code invalid, "+we.status+" "+we.statusText)}).catch(we=>{if(this._status=L.kError,this._onError)this._onError(d.EXCEPTION,{code:-1,msg:we.message});else throw we})}abort(){this._requestAbort=!0}_pump(_){return _.read().then(B=>{if(B.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=L.kError;let R=d.EARLY_EOF,j={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(R,j);else throw new T(j.msg)}else this._status=L.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=L.kComplete,_.cancel();this._status=L.kBuffering;let R=B.value.buffer,j=this._range.from+this._receivedLength;this._receivedLength+=R.byteLength,this._onDataArrival&&this._onDataArrival(R,j,this._receivedLength),this._pump(_)}}).catch(B=>{if(B.code===11&&O.msedge)return;this._status=L.kError;let R=0,j=null;if((B.code===19||B.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(R=d.EARLY_EOF,j={code:B.code,msg:"Fetch stream meet Early-EOF"}):(R=d.EXCEPTION,j={code:B.code,msg:B.message}),this._onError)this._onError(R,j);else throw new T(j.msg)})}}var I=S;class c extends g{static isSupported(){try{let _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="moz-chunked-arraybuffer",_.responseType==="moz-chunked-arraybuffer"}catch(_){return C.w("MozChunkedLoader",_.message),!1}}constructor(_,B){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=_,this._config=B,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(_,B){this._dataSource=_,this._range=B;let R=_.url;this._config.reuseRedirectedURL&&_.redirectedURL!=null&&(R=_.redirectedURL);let j=this._seekHandler.getConfig(R,B);this._requestURL=j.url;let Q=this._xhr=new XMLHttpRequest;if(Q.open("GET",j.url,!0),Q.responseType="moz-chunked-arraybuffer",Q.onreadystatechange=this._onReadyStateChange.bind(this),Q.onprogress=this._onProgress.bind(this),Q.onloadend=this._onLoadEnd.bind(this),Q.onerror=this._onXhrError.bind(this),_.withCredentials&&(Q.withCredentials=!0),typeof j.headers=="object"){let Ee=j.headers;for(let we in Ee)Ee.hasOwnProperty(we)&&Q.setRequestHeader(we,Ee[we])}if(typeof this._config.headers=="object"){let Ee=this._config.headers;for(let we in Ee)Ee.hasOwnProperty(we)&&Q.setRequestHeader(we,Ee[we])}this._status=L.kConnecting,Q.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=L.kComplete}_onReadyStateChange(_){let B=_.target;if(B.readyState===2){if(B.responseURL!=null&&B.responseURL!==this._requestURL&&this._onURLRedirect){let R=this._seekHandler.removeURLParameters(B.responseURL);this._onURLRedirect(R)}if(B.status!==0&&(B.status<200||B.status>299))if(this._status=L.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:B.status,msg:B.statusText});else throw new T("MozChunkedLoader: Http code invalid, "+B.status+" "+B.statusText);else this._status=L.kBuffering}}_onProgress(_){if(this._status===L.kError)return;this._contentLength===null&&_.total!==null&&_.total!==0&&(this._contentLength=_.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let B=_.target.response,R=this._range.from+this._receivedLength;this._receivedLength+=B.byteLength,this._onDataArrival&&this._onDataArrival(B,R,this._receivedLength)}_onLoadEnd(_){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===L.kError)return;this._status=L.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(_){this._status=L.kError;let B=0,R=null;if(this._contentLength&&_.loaded<this._contentLength?(B=d.EARLY_EOF,R={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(B=d.EXCEPTION,R={code:-1,msg:_.constructor.name+" "+_.type}),this._onError)this._onError(B,R);else throw new T(R.msg)}}var f=c;class P extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="ms-stream",_.responseType==="ms-stream"}catch(_){return Log.w("MSStreamLoader",_.message),!1}}constructor(_,B){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=_,this._config=B,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(_,B){this._internalOpen(_,B,!1)}_internalOpen(_,B,R){this._dataSource=_,R?this._currentRange=B:this._totalRange=B;let j=_.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?j=this._currentRedirectedURL:_.redirectedURL!=null&&(j=_.redirectedURL));let Q=this._seekHandler.getConfig(j,B);this._currentRequestURL=Q.url;let Ee=this._reader=new self.MSStreamReader;Ee.onprogress=this._msrOnProgress.bind(this),Ee.onload=this._msrOnLoad.bind(this),Ee.onerror=this._msrOnError.bind(this);let we=this._xhr=new XMLHttpRequest;if(we.open("GET",Q.url,!0),we.responseType="ms-stream",we.onreadystatechange=this._xhrOnReadyStateChange.bind(this),we.onerror=this._xhrOnError.bind(this),_.withCredentials&&(we.withCredentials=!0),typeof Q.headers=="object"){let De=Q.headers;for(let ye in De)De.hasOwnProperty(ye)&&we.setRequestHeader(ye,De[ye])}if(typeof this._config.headers=="object"){let De=this._config.headers;for(let ye in De)De.hasOwnProperty(ye)&&we.setRequestHeader(ye,De[ye])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,we.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(_){let B=_.target;if(B.readyState===2)if(B.status>=200&&B.status<=299){if(this._status=LoaderStatus.kBuffering,B.responseURL!=null){let j=this._seekHandler.removeURLParameters(B.responseURL);B.responseURL!==this._currentRequestURL&&j!==this._currentRedirectedURL&&(this._currentRedirectedURL=j,this._onURLRedirect&&this._onURLRedirect(j))}let R=B.getResponseHeader("Content-Length");if(R!=null&&this._contentLength==null){let j=parseInt(R);j>0&&(this._contentLength=j,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:B.status,msg:B.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+B.status+" "+B.statusText);else if(B.readyState===3&&B.status>=200&&B.status<=299){this._status=LoaderStatus.kBuffering;let R=B.response;this._reader.readAsArrayBuffer(R)}}_xhrOnError(_){this._status=LoaderStatus.kError;let B=LoaderErrors.EXCEPTION,R={code:-1,msg:_.constructor.name+" "+_.type};if(this._onError)this._onError(B,R);else throw new RuntimeException(R.msg)}_msrOnProgress(_){let R=_.target.result;if(R==null){this._doReconnectIfNeeded();return}let j=R.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=R.byteLength;let Q=this._totalRange.from+this._receivedLength;this._receivedLength+=j.byteLength,this._onDataArrival&&this._onDataArrival(j,Q,this._receivedLength),R.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${Q+j.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let _={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,_,!0)}}_msrOnLoad(_){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(_){this._status=LoaderStatus.kError;let B=0,R=null;if(this._contentLength&&this._receivedLength<this._contentLength?(B=LoaderErrors.EARLY_EOF,R={code:-1,msg:"MSStream meet Early-Eof"}):(B=LoaderErrors.EARLY_EOF,R={code:-1,msg:_.constructor.name+" "+_.type}),this._onError)this._onError(B,R);else throw new RuntimeException(R.msg)}}var N=null;class k extends g{static isSupported(){try{let _=new XMLHttpRequest;return _.open("GET","https://example.com",!0),_.responseType="arraybuffer",_.responseType==="arraybuffer"}catch(_){return C.w("RangeLoader",_.message),!1}}constructor(_,B){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=_,this._config=B,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new y,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(_,B){this._dataSource=_,this._range=B,this._status=L.kConnecting;let R=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(R=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!R?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let _=this._currentChunkSizeKB*1024,B=this._range.from+this._receivedLength,R=B+_;this._contentLength!=null&&R-this._range.from>=this._contentLength&&(R=this._range.from+this._contentLength-1),this._currentRequestRange={from:B,to:R},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(_,B){this._lastTimeLoaded=0;let R=_.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?R=this._currentRedirectedURL:_.redirectedURL!=null&&(R=_.redirectedURL));let j=this._seekHandler.getConfig(R,B);this._currentRequestURL=j.url;let Q=this._xhr=new XMLHttpRequest;if(Q.open("GET",j.url,!0),Q.responseType="arraybuffer",Q.onreadystatechange=this._onReadyStateChange.bind(this),Q.onprogress=this._onProgress.bind(this),Q.onload=this._onLoad.bind(this),Q.onerror=this._onXhrError.bind(this),_.withCredentials&&(Q.withCredentials=!0),typeof j.headers=="object"){let Ee=j.headers;for(let we in Ee)Ee.hasOwnProperty(we)&&Q.setRequestHeader(we,Ee[we])}if(typeof this._config.headers=="object"){let Ee=this._config.headers;for(let we in Ee)Ee.hasOwnProperty(we)&&Q.setRequestHeader(we,Ee[we])}Q.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=L.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(_){let B=_.target;if(B.readyState===2){if(B.responseURL!=null){let R=this._seekHandler.removeURLParameters(B.responseURL);B.responseURL!==this._currentRequestURL&&R!==this._currentRedirectedURL&&(this._currentRedirectedURL=R,this._onURLRedirect&&this._onURLRedirect(R))}if(B.status>=200&&B.status<=299){if(this._waitForTotalLength)return;this._status=L.kBuffering}else if(this._status=L.kError,this._onError)this._onError(d.HTTP_STATUS_CODE_INVALID,{code:B.status,msg:B.statusText});else throw new T("RangeLoader: Http code invalid, "+B.status+" "+B.statusText)}}_onProgress(_){if(this._status===L.kError)return;if(this._contentLength===null){let R=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,R=!0;let j=_.total;this._internalAbort(),j!=null&j!==0&&(this._totalLength=j)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,R){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let B=_.loaded-this._lastTimeLoaded;this._lastTimeLoaded=_.loaded,this._speedSampler.addBytes(B)}_normalizeSpeed(_){let B=this._chunkSizeKBList,R=B.length-1,j=0,Q=0,Ee=R;if(_<B[0])return B[0];for(;Q<=Ee;){if(j=Q+Math.floor((Ee-Q)/2),j===R||_>=B[j]&&_<B[j+1])return B[j];B[j]<_?Q=j+1:Ee=j-1}}_onLoad(_){if(this._status===L.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let B=this._speedSampler.lastSecondKBps;if(B===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(B=this._speedSampler.currentKBps)),B!==0){let Ee=this._normalizeSpeed(B);this._currentSpeedNormalized!==Ee&&(this._currentSpeedNormalized=Ee,this._currentChunkSizeKB=Ee)}let R=_.target.response,j=this._range.from+this._receivedLength;this._receivedLength+=R.byteLength;let Q=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():Q=!0,this._onDataArrival&&this._onDataArrival(R,j,this._receivedLength),Q&&(this._status=L.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(_){this._status=L.kError;let B=0,R=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(B=d.EARLY_EOF,R={code:-1,msg:"RangeLoader meet Early-Eof"}):(B=d.EXCEPTION,R={code:-1,msg:_.constructor.name+" "+_.type}),this._onError)this._onError(B,R);else throw new T(R.msg)}}var W=k;class z extends g{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(_){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(_){try{let B=this._ws=new self.WebSocket(_.url);B.binaryType="arraybuffer",B.onopen=this._onWebSocketOpen.bind(this),B.onclose=this._onWebSocketClose.bind(this),B.onmessage=this._onWebSocketMessage.bind(this),B.onerror=this._onWebSocketError.bind(this),this._status=L.kConnecting}catch(B){this._status=L.kError;let R={code:B.code,msg:B.message};if(this._onError)this._onError(d.EXCEPTION,R);else throw new T(R.msg)}}abort(){let _=this._ws;_&&(_.readyState===0||_.readyState===1)&&(this._requestAbort=!0,_.close()),this._ws=null,this._status=L.kComplete}_onWebSocketOpen(_){this._status=L.kBuffering}_onWebSocketClose(_){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=L.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(_){if(_.data instanceof ArrayBuffer)this._dispatchArrayBuffer(_.data);else if(_.data instanceof Blob){let B=new FileReader;B.onload=()=>{this._dispatchArrayBuffer(B.result)},B.readAsArrayBuffer(_.data)}else{this._status=L.kError;let B={code:-1,msg:"Unsupported WebSocket message type: "+_.data.constructor.name};if(this._onError)this._onError(d.EXCEPTION,B);else throw new T(B.msg)}}_dispatchArrayBuffer(_){let B=_,R=this._receivedLength;this._receivedLength+=B.byteLength,this._onDataArrival&&this._onDataArrival(B,R,this._receivedLength)}_onWebSocketError(_){this._status=L.kError;let B={code:_.code,msg:_.message};if(this._onError)this._onError(d.EXCEPTION,B);else throw new T(B.msg)}}var Z=z;class J{constructor(_){this._zeroStart=_||!1}getConfig(_,B){let R={};if(B.from!==0||B.to!==-1){let j;B.to!==-1?j=`bytes=${B.from.toString()}-${B.to.toString()}`:j=`bytes=${B.from.toString()}-`,R.Range=j}else this._zeroStart&&(R.Range="bytes=0-");return{url:_,headers:R}}removeURLParameters(_){return _}}var ee=J;class ${constructor(_,B){this._startName=_,this._endName=B}getConfig(_,B){let R=_;if(B.from!==0||B.to!==-1){let j=!0;R.indexOf("?")===-1&&(R+="?",j=!1),j&&(R+="&"),R+=`${this._startName}=${B.from.toString()}`,B.to!==-1&&(R+=`&${this._endName}=${B.to.toString()}`)}return{url:R,headers:{}}}removeURLParameters(_){let B=_.split("?")[0],R,j=_.indexOf("?");j!==-1&&(R=_.substring(j+1));let Q="";if(R!=null&&R.length>0){let Ee=R.split("&");for(let we=0;we<Ee.length;we++){let De=Ee[we].split("="),ye=we>0;De[0]!==this._startName&&De[0]!==this._endName&&(ye&&(Q+="&"),Q+=Ee[we])}}return Q.length===0?B:B+"?"+Q}}var ie=$;class se{constructor(_,B,R){this.TAG="IOController",this._config=B,this._extraData=R,this._stashInitialSize=1024*384,B.stashInitialSize!=null&&B.stashInitialSize>0&&(this._stashInitialSize=B.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,B.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=_,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(_.url),this._refTotalLength=_.filesize?_.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new y,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(_){this._extraData=_}get onDataArrival(){return this._onDataArrival}set onDataArrival(_){this._onDataArrival=_}get onSeeked(){return this._onSeeked}set onSeeked(_){this._onSeeked=_}get onError(){return this._onError}set onError(_){this._onError=_}get onComplete(){return this._onComplete}set onComplete(_){this._onComplete=_}get onRedirect(){return this._onRedirect}set onRedirect(_){this._onRedirect=_}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(_){this._onRecoveredEarlyEof=_}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===W?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let _=this._config;if(_.seekType==="range")this._seekHandler=new ee(this._config.rangeLoadZeroStart);else if(_.seekType==="param"){let B=_.seekParamStart||"bstart",R=_.seekParamEnd||"bend";this._seekHandler=new ie(B,R)}else if(_.seekType==="custom"){if(typeof _.customSeekHandler!="function")throw new p("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new _.customSeekHandler}else throw new p(`Invalid seekType in config: ${_.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=Z;else if(I.isSupported())this._loaderClass=I;else if(f.isSupported())this._loaderClass=f;else if(W.isSupported())this._loaderClass=W;else throw new T("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(_){this._currentRange={from:0,to:-1},_&&(this._currentRange.from=_),this._speedSampler.reset(),_||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let _=this._resumeFrom;this._resumeFrom=0,this._internalSeek(_,!0)}}seek(_){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(_,!0)}_internalSeek(_,B){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(B),this._loader.destroy(),this._loader=null;let R={from:_,to:-1};this._currentRange={from:R.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,R),this._onSeeked&&this._onSeeked()}updateUrl(_){if(!_||typeof _!="string"||_.length===0)throw new p("Url must be a non-empty string!");this._dataSource.url=_}_expandBuffer(_){let B=this._stashSize;for(;B+1024*1024*1<_;)B*=2;if(B+=1024*1024*1,B===this._bufferSize)return;let R=new ArrayBuffer(B);if(this._stashUsed>0){let j=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(R,0,B).set(j,0)}this._stashBuffer=R,this._bufferSize=B}_normalizeSpeed(_){let B=this._speedNormalizeList,R=B.length-1,j=0,Q=0,Ee=R;if(_<B[0])return B[0];for(;Q<=Ee;){if(j=Q+Math.floor((Ee-Q)/2),j===R||_>=B[j]&&_<B[j+1])return B[j];B[j]<_?Q=j+1:Ee=j-1}}_adjustStashSize(_){let B=0;this._config.isLive||_<512?B=_:_>=512&&_<=1024?B=Math.floor(_*1.5):B=_*2,B>8192&&(B=8192);let R=B*1024+1024*1024*1;this._bufferSize<R&&this._expandBuffer(R),this._stashSize=B*1024}_dispatchChunks(_,B){return this._currentRange.to=B+_.byteLength-1,this._onDataArrival(_,B)}_onURLRedirect(_){this._redirectedURL=_,this._onRedirect&&this._onRedirect(_)}_onContentLengthKnown(_){_&&this._fullRequestFlag&&(this._totalLength=_,this._fullRequestFlag=!1)}_onLoaderChunkArrival(_,B,R){if(!this._onDataArrival)throw new x("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(_.byteLength);let j=this._speedSampler.lastSecondKBps;if(j!==0){let Q=this._normalizeSpeed(j);this._speedNormalized!==Q&&(this._speedNormalized=Q,this._adjustStashSize(Q))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=B),this._stashUsed+_.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(_),this._stashUsed),this._stashUsed+=_.byteLength;else{let Q=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Ee=this._stashBuffer.slice(0,this._stashUsed),we=this._dispatchChunks(Ee,this._stashByteStart);if(we<Ee.byteLength){if(we>0){let De=new Uint8Array(Ee,we);Q.set(De,0),this._stashUsed=De.byteLength,this._stashByteStart+=we}}else this._stashUsed=0,this._stashByteStart+=we;this._stashUsed+_.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+_.byteLength),Q=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Q.set(new Uint8Array(_),this._stashUsed),this._stashUsed+=_.byteLength}else{let Ee=this._dispatchChunks(_,B);if(Ee<_.byteLength){let we=_.byteLength-Ee;we>this._bufferSize&&(this._expandBuffer(we),Q=new Uint8Array(this._stashBuffer,0,this._bufferSize)),Q.set(new Uint8Array(_,Ee),0),this._stashUsed+=we,this._stashByteStart=B+Ee}}}else if(this._stashUsed===0){let Q=this._dispatchChunks(_,B);if(Q<_.byteLength){let Ee=_.byteLength-Q;Ee>this._bufferSize&&this._expandBuffer(Ee),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(_,Q),0),this._stashUsed+=Ee,this._stashByteStart=B+Q}}else{this._stashUsed+_.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+_.byteLength);let Q=new Uint8Array(this._stashBuffer,0,this._bufferSize);Q.set(new Uint8Array(_),this._stashUsed),this._stashUsed+=_.byteLength;let Ee=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Ee<this._stashUsed&&Ee>0){let we=new Uint8Array(this._stashBuffer,Ee);Q.set(we,0)}this._stashUsed-=Ee,this._stashByteStart+=Ee}}_flushStashBuffer(_){if(this._stashUsed>0){let B=this._stashBuffer.slice(0,this._stashUsed),R=this._dispatchChunks(B,this._stashByteStart),j=B.byteLength-R;if(R<B.byteLength)if(_)C.w(this.TAG,`${j} bytes unconsumed data remain when flush buffer, dropped`);else{if(R>0){let Q=new Uint8Array(this._stashBuffer,0,this._bufferSize),Ee=new Uint8Array(B,R);Q.set(Ee,0),this._stashUsed=Ee.byteLength,this._stashByteStart+=R}return 0}return this._stashUsed=0,this._stashByteStart=0,j}return 0}_onLoaderComplete(_,B){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(_,B){switch(C.e(this.TAG,`Loader error, code = ${B.code}, msg = ${B.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,_=d.UNRECOVERABLE_EARLY_EOF),_){case d.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let R=this._currentRange.to+1;R<this._totalLength&&(C.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(R,!1));return}_=d.UNRECOVERABLE_EARLY_EOF;break}case d.UNRECOVERABLE_EARLY_EOF:case d.CONNECTING_TIMEOUT:case d.HTTP_STATUS_CODE_INVALID:case d.EXCEPTION:break}if(this._onError)this._onError(_,B);else throw new T("IOException: "+B.msg)}}var ne=se;const ce={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function ae(){return Object.assign({},ce)}class fe{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let _=new ne({},ae()),B=_.loaderType;return _.destroy(),B=="fetch-stream-loader"||B=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let _=new ne({},ae()),B=_.loaderType;return _.destroy(),B}static supportNativeMediaPlayback(_){fe.videoElement==null&&(fe.videoElement=window.document.createElement("video"));let B=fe.videoElement.canPlayType(_);return B==="probably"||B=="maybe"}static getFeatureList(){let _={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return _.mseFlvPlayback=fe.supportMSEH264Playback(),_.networkStreamIO=fe.supportNetworkStreamIO(),_.networkLoaderName=fe.getNetworkLoaderTypeName(),_.mseLiveFlvPlayback=_.mseFlvPlayback&&_.networkStreamIO,_.nativeMP4H264Playback=fe.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),_.nativeWebmVP8Playback=fe.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),_.nativeWebmVP9Playback=fe.supportNativeMediaPlayback('video/webm; codecs="vp9"'),_}}var oe=fe,_e={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class de{static get forceGlobalTag(){return C.FORCE_GLOBAL_TAG}static set forceGlobalTag(_){C.FORCE_GLOBAL_TAG=_,de._notifyChange()}static get globalTag(){return C.GLOBAL_TAG}static set globalTag(_){C.GLOBAL_TAG=_,de._notifyChange()}static get enableAll(){return C.ENABLE_VERBOSE&&C.ENABLE_DEBUG&&C.ENABLE_INFO&&C.ENABLE_WARN&&C.ENABLE_ERROR}static set enableAll(_){C.ENABLE_VERBOSE=_,C.ENABLE_DEBUG=_,C.ENABLE_INFO=_,C.ENABLE_WARN=_,C.ENABLE_ERROR=_,de._notifyChange()}static get enableDebug(){return C.ENABLE_DEBUG}static set enableDebug(_){C.ENABLE_DEBUG=_,de._notifyChange()}static get enableVerbose(){return C.ENABLE_VERBOSE}static set enableVerbose(_){C.ENABLE_VERBOSE=_,de._notifyChange()}static get enableInfo(){return C.ENABLE_INFO}static set enableInfo(_){C.ENABLE_INFO=_,de._notifyChange()}static get enableWarn(){return C.ENABLE_WARN}static set enableWarn(_){C.ENABLE_WARN=_,de._notifyChange()}static get enableError(){return C.ENABLE_ERROR}static set enableError(_){C.ENABLE_ERROR=_,de._notifyChange()}static getConfig(){return{globalTag:C.GLOBAL_TAG,forceGlobalTag:C.FORCE_GLOBAL_TAG,enableVerbose:C.ENABLE_VERBOSE,enableDebug:C.ENABLE_DEBUG,enableInfo:C.ENABLE_INFO,enableWarn:C.ENABLE_WARN,enableError:C.ENABLE_ERROR,enableCallback:C.ENABLE_CALLBACK}}static applyConfig(_){C.GLOBAL_TAG=_.globalTag,C.FORCE_GLOBAL_TAG=_.forceGlobalTag,C.ENABLE_VERBOSE=_.enableVerbose,C.ENABLE_DEBUG=_.enableDebug,C.ENABLE_INFO=_.enableInfo,C.ENABLE_WARN=_.enableWarn,C.ENABLE_ERROR=_.enableError,C.ENABLE_CALLBACK=_.enableCallback}static _notifyChange(){let _=de.emitter;if(_.listenerCount("change")>0){let B=de.getConfig();_.emit("change",B)}}static registerListener(_){de.emitter.addListener("change",_)}static removeListener(_){de.emitter.removeListener("change",_)}static addLogListener(_){C.emitter.addListener("log",_),C.emitter.listenerCount("log")>0&&(C.ENABLE_CALLBACK=!0,de._notifyChange())}static removeLogListener(_){C.emitter.removeListener("log",_),C.emitter.listenerCount("log")===0&&(C.ENABLE_CALLBACK=!1,de._notifyChange())}}de.emitter=new(b());var be=de;class Ae{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let _=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,B=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&_&&B}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(_){if(this.keyframesIndex==null)return null;let B=this.keyframesIndex,R=this._search(B.times,_);return{index:R,milliseconds:B.times[R],fileposition:B.filepositions[R]}}_search(_,B){let R=0,j=_.length-1,Q=0,Ee=0,we=j;for(B<_[0]&&(R=0,Ee=we+1);Ee<=we;)if(Q=Ee+Math.floor((we-Ee)/2),Q===j||B>=_[Q]&&B<_[Q+1]){R=Q;break}else _[Q]<B?Ee=Q+1:we=Q-1;return R}}var Fe=Ae;function Ue(me,_,B){let R=me;if(_+B<R.length){for(;B--;)if((R[++_]&192)!==128)return!1;return!0}else return!1}function it(me){let _=[],B=me,R=0,j=me.length;for(;R<j;){if(B[R]<128){_.push(String.fromCharCode(B[R])),++R;continue}else if(!(B[R]<192)){if(B[R]<224){if(Ue(B,R,1)){let Q=(B[R]&31)<<6|B[R+1]&63;if(Q>=128){_.push(String.fromCharCode(Q&65535)),R+=2;continue}}}else if(B[R]<240){if(Ue(B,R,2)){let Q=(B[R]&15)<<12|(B[R+1]&63)<<6|B[R+2]&63;if(Q>=2048&&(Q&63488)!==55296){_.push(String.fromCharCode(Q&65535)),R+=3;continue}}}else if(B[R]<248&&Ue(B,R,3)){let Q=(B[R]&7)<<18|(B[R+1]&63)<<12|(B[R+2]&63)<<6|B[R+3]&63;if(Q>65536&&Q<1114112){Q-=65536,_.push(String.fromCharCode(Q>>>10|55296)),_.push(String.fromCharCode(Q&1023|56320)),R+=4;continue}}}_.push("\uFFFD"),++R}return _.join("")}var tt=it;let et=function(){let me=new ArrayBuffer(2);return new DataView(me).setInt16(0,256,!0),new Int16Array(me)[0]===256}();class vt{static parseScriptData(_,B,R){let j={};try{let Q=vt.parseValue(_,B,R),Ee=vt.parseValue(_,B+Q.size,R-Q.size);j[Q.data]=Ee.data}catch(Q){C.e("AMF",Q.toString())}return j}static parseObject(_,B,R){if(R<3)throw new x("Data not enough when parse ScriptDataObject");let j=vt.parseString(_,B,R),Q=vt.parseValue(_,B+j.size,R-j.size),Ee=Q.objectEnd;return{data:{name:j.data,value:Q.data},size:j.size+Q.size,objectEnd:Ee}}static parseVariable(_,B,R){return vt.parseObject(_,B,R)}static parseString(_,B,R){if(R<2)throw new x("Data not enough when parse String");let Q=new DataView(_,B,R).getUint16(0,!et),Ee;return Q>0?Ee=tt(new Uint8Array(_,B+2,Q)):Ee="",{data:Ee,size:2+Q}}static parseLongString(_,B,R){if(R<4)throw new x("Data not enough when parse LongString");let Q=new DataView(_,B,R).getUint32(0,!et),Ee;return Q>0?Ee=tt(new Uint8Array(_,B+4,Q)):Ee="",{data:Ee,size:4+Q}}static parseDate(_,B,R){if(R<10)throw new x("Data size invalid when parse Date");let j=new DataView(_,B,R),Q=j.getFloat64(0,!et),Ee=j.getInt16(8,!et);return Q+=Ee*60*1e3,{data:new Date(Q),size:10}}static parseValue(_,B,R){if(R<1)throw new x("Data not enough when parse Value");let j=new DataView(_,B,R),Q=1,Ee=j.getUint8(0),we,De=!1;try{switch(Ee){case 0:we=j.getFloat64(1,!et),Q+=8;break;case 1:{we=!!j.getUint8(1),Q+=1;break}case 2:{let ye=vt.parseString(_,B+1,R-1);we=ye.data,Q+=ye.size;break}case 3:{we={};let ye=0;for((j.getUint32(R-4,!et)&16777215)===9&&(ye=3);Q<R-4;){let Me=vt.parseObject(_,B+Q,R-Q-ye);if(Me.objectEnd)break;we[Me.data.name]=Me.data.value,Q+=Me.size}Q<=R-3&&(j.getUint32(Q-1,!et)&16777215)===9&&(Q+=3);break}case 8:{we={},Q+=4;let ye=0;for((j.getUint32(R-4,!et)&16777215)===9&&(ye=3);Q<R-8;){let Me=vt.parseVariable(_,B+Q,R-Q-ye);if(Me.objectEnd)break;we[Me.data.name]=Me.data.value,Q+=Me.size}Q<=R-3&&(j.getUint32(Q-1,!et)&16777215)===9&&(Q+=3);break}case 9:we=void 0,Q=1,De=!0;break;case 10:{we=[];let ye=j.getUint32(1,!et);Q+=4;for(let Me=0;Me<ye;Me++){let Be=vt.parseValue(_,B+Q,R-Q);we.push(Be.data),Q+=Be.size}break}case 11:{let ye=vt.parseDate(_,B+1,R-1);we=ye.data,Q+=ye.size;break}case 12:{let ye=vt.parseString(_,B+1,R-1);we=ye.data,Q+=ye.size;break}default:Q=R,C.w("AMF","Unsupported AMF value type "+Ee)}}catch(ye){C.e("AMF",ye.toString())}return{data:we,size:Q,objectEnd:De}}}var dt=vt;class je{constructor(_){this.TAG="ExpGolomb",this._buffer=_,this._buffer_index=0,this._total_bytes=_.byteLength,this._total_bits=_.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let _=this._total_bytes-this._buffer_index;if(_<=0)throw new x("ExpGolomb: _fillCurrentWord() but no bytes available");let B=Math.min(4,_),R=new Uint8Array(4);R.set(this._buffer.subarray(this._buffer_index,this._buffer_index+B)),this._current_word=new DataView(R.buffer).getUint32(0,!1),this._buffer_index+=B,this._current_word_bits_left=B*8}readBits(_){if(_>32)throw new p("ExpGolomb: readBits() bits exceeded max 32bits!");if(_<=this._current_word_bits_left){let Ee=this._current_word>>>32-_;return this._current_word<<=_,this._current_word_bits_left-=_,Ee}let B=this._current_word_bits_left?this._current_word:0;B=B>>>32-this._current_word_bits_left;let R=_-this._current_word_bits_left;this._fillCurrentWord();let j=Math.min(R,this._current_word_bits_left),Q=this._current_word>>>32-j;return this._current_word<<=j,this._current_word_bits_left-=j,B=B<<j|Q,B}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let _;for(_=0;_<this._current_word_bits_left;_++)if(this._current_word&2147483648>>>_)return this._current_word<<=_,this._current_word_bits_left-=_,_;return this._fillCurrentWord(),_+this._skipLeadingZero()}readUEG(){let _=this._skipLeadingZero();return this.readBits(_+1)-1}readSEG(){let _=this.readUEG();return _&1?_+1>>>1:-1*(_>>>1)}}var nt=je;class rt{static _ebsp2rbsp(_){let B=_,R=B.byteLength,j=new Uint8Array(R),Q=0;for(let Ee=0;Ee<R;Ee++)Ee>=2&&B[Ee]===3&&B[Ee-1]===0&&B[Ee-2]===0||(j[Q]=B[Ee],Q++);return new Uint8Array(j.buffer,0,Q)}static parseSPS(_){let B=rt._ebsp2rbsp(_),R=new nt(B);R.readByte();let j=R.readByte();R.readByte();let Q=R.readByte();R.readUEG();let Ee=rt.getProfileString(j),we=rt.getLevelString(Q),De=1,ye=420,Me=[0,420,422,444],Be=8;if((j===100||j===110||j===122||j===244||j===44||j===83||j===86||j===118||j===128||j===138||j===144)&&(De=R.readUEG(),De===3&&R.readBits(1),De<=3&&(ye=Me[De]),Be=R.readUEG()+8,R.readUEG(),R.readBits(1),R.readBool())){let ln=De!==3?8:12;for(let nn=0;nn<ln;nn++)R.readBool()&&(nn<6?rt._skipScalingList(R,16):rt._skipScalingList(R,64))}R.readUEG();let He=R.readUEG();if(He===0)R.readUEG();else if(He===1){R.readBits(1),R.readSEG(),R.readSEG();let ln=R.readUEG();for(let nn=0;nn<ln;nn++)R.readSEG()}let Ge=R.readUEG();R.readBits(1);let Ve=R.readUEG(),Ke=R.readUEG(),at=R.readBits(1);at===0&&R.readBits(1),R.readBits(1);let Le=0,Qe=0,ut=0,bt=0;R.readBool()&&(Le=R.readUEG(),Qe=R.readUEG(),ut=R.readUEG(),bt=R.readUEG());let Ct=1,_t=1,St=0,Bt=!0,$e=0,xt=0;if(R.readBool()){if(R.readBool()){let ln=R.readByte(),nn=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Pn=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];ln>0&&ln<16?(Ct=nn[ln-1],_t=Pn[ln-1]):ln===255&&(Ct=R.readByte()<<8|R.readByte(),_t=R.readByte()<<8|R.readByte())}if(R.readBool()&&R.readBool(),R.readBool()&&(R.readBits(4),R.readBool()&&R.readBits(24)),R.readBool()&&(R.readUEG(),R.readUEG()),R.readBool()){let ln=R.readBits(32),nn=R.readBits(32);Bt=R.readBool(),$e=nn,xt=ln*2,St=$e/xt}}let Mt=1;(Ct!==1||_t!==1)&&(Mt=Ct/_t);let rn=0,Ft=0;if(De===0)rn=1,Ft=2-at;else{let ln=De===3?1:2,nn=De===1?2:1;rn=ln,Ft=nn*(2-at)}let Yt=(Ve+1)*16,qt=(2-at)*((Ke+1)*16);Yt-=(Le+Qe)*rn,qt-=(ut+bt)*Ft;let cn=Math.ceil(Yt*Mt);return R.destroy(),R=null,{profile_string:Ee,level_string:we,bit_depth:Be,ref_frames:Ge,chroma_format:ye,chroma_format_string:rt.getChromaFormatString(ye),frame_rate:{fixed:Bt,fps:St,fps_den:xt,fps_num:$e},sar_ratio:{width:Ct,height:_t},codec_size:{width:Yt,height:qt},present_size:{width:cn,height:qt}}}static _skipScalingList(_,B){let R=8,j=8,Q=0;for(let Ee=0;Ee<B;Ee++)j!==0&&(Q=_.readSEG(),j=(R+Q+256)%256),R=j===0?R:j}static getProfileString(_){switch(_){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(_){return(_/10).toFixed(1)}static getChromaFormatString(_){switch(_){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var ft=rt,wt={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function Re(me){return me>>>8&255|(me&255)<<8}function We(me){return(me&4278190080)>>>24|(me&16711680)>>>8|(me&65280)<<8|(me&255)<<24}function Pe(me,_){return me[_]<<24|me[_+1]<<16|me[_+2]<<8|me[_+3]}class ke{constructor(_,B){this.TAG="FLVDemuxer",this._config=B,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=_.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=_.hasAudioTrack,this._hasVideo=_.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new Fe,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let R=new ArrayBuffer(2);return new DataView(R).setInt16(0,256,!0),new Int16Array(R)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(_){let B=new Uint8Array(_),R={match:!1};if(B[0]!==70||B[1]!==76||B[2]!==86||B[3]!==1)return R;let j=(B[4]&4)>>>2!==0,Q=(B[4]&1)!==0,Ee=Pe(B,5);return Ee<9?R:{match:!0,consumed:Ee,dataOffset:Ee,hasAudioTrack:j,hasVideoTrack:Q}}bindDataSource(_){return _.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(_){this._onTrackMetadata=_}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(_){this._onMediaInfo=_}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(_){this._onMetaDataArrived=_}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(_){this._onScriptDataArrived=_}get onError(){return this._onError}set onError(_){this._onError=_}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(_){this._onDataAvailable=_}get timestampBase(){return this._timestampBase}set timestampBase(_){this._timestampBase=_}get overridedDuration(){return this._duration}set overridedDuration(_){this._durationOverrided=!0,this._duration=_,this._mediaInfo.duration=_}set overridedHasAudio(_){this._hasAudioFlagOverrided=!0,this._hasAudio=_,this._mediaInfo.hasAudio=_}set overridedHasVideo(_){this._hasVideoFlagOverrided=!0,this._hasVideo=_,this._mediaInfo.hasVideo=_}resetMediaInfo(){this._mediaInfo=new Fe}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(_,B){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new x("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let R=0,j=this._littleEndian;if(B===0)if(_.byteLength>13)R=ke.probe(_).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,B+R!==this._dataOffset&&C.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(_,R).getUint32(0,!j)!==0&&C.w(this.TAG,"PrevTagSize0 !== 0 !!!"),R+=4);R<_.byteLength;){this._dispatch=!0;let Q=new DataView(_,R);if(R+11+4>_.byteLength)break;let Ee=Q.getUint8(0),we=Q.getUint32(0,!j)&16777215;if(R+11+we+4>_.byteLength)break;if(Ee!==8&&Ee!==9&&Ee!==18){C.w(this.TAG,`Unsupported tag type ${Ee}, skipped`),R+=11+we+4;continue}let De=Q.getUint8(4),ye=Q.getUint8(5),Me=Q.getUint8(6),Be=Q.getUint8(7),He=Me|ye<<8|De<<16|Be<<24;(Q.getUint32(7,!j)&16777215)!==0&&C.w(this.TAG,"Meet tag which has StreamID != 0!");let Ve=R+11;switch(Ee){case 8:this._parseAudioData(_,Ve,we,He);break;case 9:this._parseVideoData(_,Ve,we,He,B+R);break;case 18:this._parseScriptData(_,Ve,we);break}let Ke=Q.getUint32(11+we,!j);Ke!==11+we&&C.w(this.TAG,`Invalid PrevTagSize ${Ke}`),R+=11+we+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),R}_parseScriptData(_,B,R){let j=dt.parseScriptData(_,B,R);if(j.hasOwnProperty("onMetaData")){if(j.onMetaData==null||typeof j.onMetaData!="object"){C.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&C.w(this.TAG,"Found another onMetaData tag!"),this._metadata=j;let Q=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},Q)),typeof Q.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=Q.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof Q.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=Q.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof Q.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=Q.audiodatarate),typeof Q.videodatarate=="number"&&(this._mediaInfo.videoDataRate=Q.videodatarate),typeof Q.width=="number"&&(this._mediaInfo.width=Q.width),typeof Q.height=="number"&&(this._mediaInfo.height=Q.height),typeof Q.duration=="number"){if(!this._durationOverrided){let Ee=Math.floor(Q.duration*this._timescale);this._duration=Ee,this._mediaInfo.duration=Ee}}else this._mediaInfo.duration=0;if(typeof Q.framerate=="number"){let Ee=Math.floor(Q.framerate*1e3);if(Ee>0){let we=Ee/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=we,this._referenceFrameRate.fps_num=Ee,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=we}}if(typeof Q.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Ee=Q.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Ee),Q.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=Q,C.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(j).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},j))}_parseKeyframesIndex(_){let B=[],R=[];for(let j=1;j<_.times.length;j++){let Q=this._timestampBase+Math.floor(_.times[j]*1e3);B.push(Q),R.push(_.filepositions[j])}return{times:B,filepositions:R}}_parseAudioData(_,B,R,j){if(R<=1){C.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let Q=this._littleEndian,we=new DataView(_,B,R).getUint8(0),De=we>>>4;if(De!==2&&De!==10){this._onError(wt.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+De);return}let ye=0,Me=(we&12)>>>2;if(Me>=0&&Me<=4)ye=this._flvSoundRateTable[Me];else{this._onError(wt.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+Me);return}let Be=(we&2)>>>1,He=we&1,Ge=this._audioMetadata,Ve=this._audioTrack;if(Ge||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),Ge=this._audioMetadata={},Ge.type="audio",Ge.id=Ve.id,Ge.timescale=this._timescale,Ge.duration=this._duration,Ge.audioSampleRate=ye,Ge.channelCount=He===0?1:2),De===10){let Ke=this._parseAACAudioData(_,B+1,R-1);if(Ke==null)return;if(Ke.packetType===0){Ge.config&&C.w(this.TAG,"Found another AudioSpecificConfig!");let at=Ke.data;Ge.audioSampleRate=at.samplingRate,Ge.channelCount=at.channelCount,Ge.codec=at.codec,Ge.originalCodec=at.originalCodec,Ge.config=at.config,Ge.refSampleDuration=1024/Ge.audioSampleRate*Ge.timescale,C.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",Ge);let Le=this._mediaInfo;Le.audioCodec=Ge.originalCodec,Le.audioSampleRate=Ge.audioSampleRate,Le.audioChannelCount=Ge.channelCount,Le.hasVideo?Le.videoCodec!=null&&(Le.mimeType='video/x-flv; codecs="'+Le.videoCodec+","+Le.audioCodec+'"'):Le.mimeType='video/x-flv; codecs="'+Le.audioCodec+'"',Le.isComplete()&&this._onMediaInfo(Le)}else if(Ke.packetType===1){let at=this._timestampBase+j,Le={unit:Ke.data,length:Ke.data.byteLength,dts:at,pts:at};Ve.samples.push(Le),Ve.length+=Ke.data.length}else C.e(this.TAG,`Flv: Unsupported AAC data type ${Ke.packetType}`)}else if(De===2){if(!Ge.codec){let Qe=this._parseMP3AudioData(_,B+1,R-1,!0);if(Qe==null)return;Ge.audioSampleRate=Qe.samplingRate,Ge.channelCount=Qe.channelCount,Ge.codec=Qe.codec,Ge.originalCodec=Qe.originalCodec,Ge.refSampleDuration=1152/Ge.audioSampleRate*Ge.timescale,C.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",Ge);let ut=this._mediaInfo;ut.audioCodec=Ge.codec,ut.audioSampleRate=Ge.audioSampleRate,ut.audioChannelCount=Ge.channelCount,ut.audioDataRate=Qe.bitRate,ut.hasVideo?ut.videoCodec!=null&&(ut.mimeType='video/x-flv; codecs="'+ut.videoCodec+","+ut.audioCodec+'"'):ut.mimeType='video/x-flv; codecs="'+ut.audioCodec+'"',ut.isComplete()&&this._onMediaInfo(ut)}let Ke=this._parseMP3AudioData(_,B+1,R-1,!1);if(Ke==null)return;let at=this._timestampBase+j,Le={unit:Ke,length:Ke.byteLength,dts:at,pts:at};Ve.samples.push(Le),Ve.length+=Ke.length}}_parseAACAudioData(_,B,R){if(R<=1){C.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let j={},Q=new Uint8Array(_,B,R);return j.packetType=Q[0],Q[0]===0?j.data=this._parseAACAudioSpecificConfig(_,B+1,R-1):j.data=Q.subarray(1),j}_parseAACAudioSpecificConfig(_,B,R){let j=new Uint8Array(_,B,R),Q=null,Ee=0,we=0,De=null,ye=0,Me=null;if(Ee=we=j[0]>>>3,ye=(j[0]&7)<<1|j[1]>>>7,ye<0||ye>=this._mpegSamplingRates.length){this._onError(wt.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let Be=this._mpegSamplingRates[ye],He=(j[1]&120)>>>3;if(He<0||He>=8){this._onError(wt.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Ee===5&&(Me=(j[1]&7)<<1|j[2]>>>7,De=(j[2]&124)>>>2);let Ge=self.navigator.userAgent.toLowerCase();return Ge.indexOf("firefox")!==-1?ye>=6?(Ee=5,Q=new Array(4),Me=ye-3):(Ee=2,Q=new Array(2),Me=ye):Ge.indexOf("android")!==-1?(Ee=2,Q=new Array(2),Me=ye):(Ee=5,Me=ye,Q=new Array(4),ye>=6?Me=ye-3:He===1&&(Ee=2,Q=new Array(2),Me=ye)),Q[0]=Ee<<3,Q[0]|=(ye&15)>>>1,Q[1]=(ye&15)<<7,Q[1]|=(He&15)<<3,Ee===5&&(Q[1]|=(Me&15)>>>1,Q[2]=(Me&1)<<7,Q[2]|=8,Q[3]=0),{config:Q,samplingRate:Be,channelCount:He,codec:"mp4a.40."+Ee,originalCodec:"mp4a.40."+we}}_parseMP3AudioData(_,B,R,j){if(R<4){C.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let Q=this._littleEndian,Ee=new Uint8Array(_,B,R),we=null;if(j){if(Ee[0]!==255)return;let De=Ee[1]>>>3&3,ye=(Ee[1]&6)>>1,Me=(Ee[2]&240)>>>4,Be=(Ee[2]&12)>>>2,Ge=(Ee[3]>>>6&3)!==3?2:1,Ve=0,Ke=0,at=34,Le="mp3";switch(De){case 0:Ve=this._mpegAudioV25SampleRateTable[Be];break;case 2:Ve=this._mpegAudioV20SampleRateTable[Be];break;case 3:Ve=this._mpegAudioV10SampleRateTable[Be];break}switch(ye){case 1:at=34,Me<this._mpegAudioL3BitRateTable.length&&(Ke=this._mpegAudioL3BitRateTable[Me]);break;case 2:at=33,Me<this._mpegAudioL2BitRateTable.length&&(Ke=this._mpegAudioL2BitRateTable[Me]);break;case 3:at=32,Me<this._mpegAudioL1BitRateTable.length&&(Ke=this._mpegAudioL1BitRateTable[Me]);break}we={bitRate:Ke,samplingRate:Ve,channelCount:Ge,codec:Le,originalCodec:Le}}else we=Ee;return we}_parseVideoData(_,B,R,j,Q){if(R<=1){C.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Ee=new Uint8Array(_,B,R)[0],we=(Ee&240)>>>4,De=Ee&15;if(De!==7){this._onError(wt.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${De}`);return}this._parseAVCVideoPacket(_,B+1,R-1,j,Q,we)}_parseAVCVideoPacket(_,B,R,j,Q,Ee){if(R<4){C.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let we=this._littleEndian,De=new DataView(_,B,R),ye=De.getUint8(0),Be=(De.getUint32(0,!we)&16777215)<<8>>8;if(ye===0)this._parseAVCDecoderConfigurationRecord(_,B+4,R-4);else if(ye===1)this._parseAVCVideoData(_,B+4,R-4,j,Q,Ee,Be);else if(ye!==2){this._onError(wt.FORMAT_ERROR,`Flv: Invalid video packet type ${ye}`);return}}_parseAVCDecoderConfigurationRecord(_,B,R){if(R<7){C.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let j=this._videoMetadata,Q=this._videoTrack,Ee=this._littleEndian,we=new DataView(_,B,R);j?typeof j.avcc!="undefined"&&C.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),j=this._videoMetadata={},j.type="video",j.id=Q.id,j.timescale=this._timescale,j.duration=this._duration);let De=we.getUint8(0),ye=we.getUint8(1),Me=we.getUint8(2),Be=we.getUint8(3);if(De!==1||ye===0){this._onError(wt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(we.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(wt.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let He=we.getUint8(5)&31;if(He===0){this._onError(wt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else He>1&&C.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${He}`);let Ge=6;for(let Ke=0;Ke<He;Ke++){let at=we.getUint16(Ge,!Ee);if(Ge+=2,at===0)continue;let Le=new Uint8Array(_,B+Ge,at);Ge+=at;let Qe=ft.parseSPS(Le);if(Ke!==0)continue;j.codecWidth=Qe.codec_size.width,j.codecHeight=Qe.codec_size.height,j.presentWidth=Qe.present_size.width,j.presentHeight=Qe.present_size.height,j.profile=Qe.profile_string,j.level=Qe.level_string,j.bitDepth=Qe.bit_depth,j.chromaFormat=Qe.chroma_format,j.sarRatio=Qe.sar_ratio,j.frameRate=Qe.frame_rate,(Qe.frame_rate.fixed===!1||Qe.frame_rate.fps_num===0||Qe.frame_rate.fps_den===0)&&(j.frameRate=this._referenceFrameRate);let ut=j.frameRate.fps_den,bt=j.frameRate.fps_num;j.refSampleDuration=j.timescale*(ut/bt);let It=Le.subarray(1,4),Ct="avc1.";for(let St=0;St<3;St++){let Bt=It[St].toString(16);Bt.length<2&&(Bt="0"+Bt),Ct+=Bt}j.codec=Ct;let _t=this._mediaInfo;_t.width=j.codecWidth,_t.height=j.codecHeight,_t.fps=j.frameRate.fps,_t.profile=j.profile,_t.level=j.level,_t.refFrames=Qe.ref_frames,_t.chromaFormat=Qe.chroma_format_string,_t.sarNum=j.sarRatio.width,_t.sarDen=j.sarRatio.height,_t.videoCodec=Ct,_t.hasAudio?_t.audioCodec!=null&&(_t.mimeType='video/x-flv; codecs="'+_t.videoCodec+","+_t.audioCodec+'"'):_t.mimeType='video/x-flv; codecs="'+_t.videoCodec+'"',_t.isComplete()&&this._onMediaInfo(_t)}let Ve=we.getUint8(Ge);if(Ve===0){this._onError(wt.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else Ve>1&&C.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${Ve}`);Ge++;for(let Ke=0;Ke<Ve;Ke++){let at=we.getUint16(Ge,!Ee);Ge+=2,at!==0&&(Ge+=at)}j.avcc=new Uint8Array(R),j.avcc.set(new Uint8Array(_,B,R),0),C.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",j)}_parseAVCVideoData(_,B,R,j,Q,Ee,we){let De=this._littleEndian,ye=new DataView(_,B,R),Me=[],Be=0,He=0;const Ge=this._naluLengthSize;let Ve=this._timestampBase+j,Ke=Ee===1;for(;He<R;){if(He+4>=R){C.w(this.TAG,`Malformed Nalu near timestamp ${Ve}, offset = ${He}, dataSize = ${R}`);break}let at=ye.getUint32(He,!De);if(Ge===3&&(at>>>=8),at>R-Ge){C.w(this.TAG,`Malformed Nalus near timestamp ${Ve}, NaluSize > DataSize!`);return}let Le=ye.getUint8(He+Ge)&31;Le===5&&(Ke=!0);let Qe=new Uint8Array(_,B+He,Ge+at),ut={type:Le,data:Qe};Me.push(ut),Be+=Qe.byteLength,He+=Ge+at}if(Me.length){let at=this._videoTrack,Le={units:Me,length:Be,isKeyframe:Ke,dts:Ve,cts:we,pts:Ve+we};Ke&&(Le.fileposition=Q),at.samples.push(Le),at.length+=Be}}}var Ze=ke;class Ie{static init(){Ie.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let B in Ie.types)Ie.types.hasOwnProperty(B)&&(Ie.types[B]=[B.charCodeAt(0),B.charCodeAt(1),B.charCodeAt(2),B.charCodeAt(3)]);let _=Ie.constants={};_.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),_.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),_.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),_.STSC=_.STCO=_.STTS,_.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),_.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),_.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),_.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),_.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),_.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(_){let B=8,R=null,j=Array.prototype.slice.call(arguments,1),Q=j.length;for(let we=0;we<Q;we++)B+=j[we].byteLength;R=new Uint8Array(B),R[0]=B>>>24&255,R[1]=B>>>16&255,R[2]=B>>>8&255,R[3]=B&255,R.set(_,4);let Ee=8;for(let we=0;we<Q;we++)R.set(j[we],Ee),Ee+=j[we].byteLength;return R}static generateInitSegment(_){let B=Ie.box(Ie.types.ftyp,Ie.constants.FTYP),R=Ie.moov(_),j=new Uint8Array(B.byteLength+R.byteLength);return j.set(B,0),j.set(R,B.byteLength),j}static moov(_){let B=Ie.mvhd(_.timescale,_.duration),R=Ie.trak(_),j=Ie.mvex(_);return Ie.box(Ie.types.moov,B,R,j)}static mvhd(_,B){return Ie.box(Ie.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,_>>>24&255,_>>>16&255,_>>>8&255,_&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(_){return Ie.box(Ie.types.trak,Ie.tkhd(_),Ie.mdia(_))}static tkhd(_){let B=_.id,R=_.duration,j=_.presentWidth,Q=_.presentHeight;return Ie.box(Ie.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,0,0,0,R>>>24&255,R>>>16&255,R>>>8&255,R&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,j>>>8&255,j&255,0,0,Q>>>8&255,Q&255,0,0]))}static mdia(_){return Ie.box(Ie.types.mdia,Ie.mdhd(_),Ie.hdlr(_),Ie.minf(_))}static mdhd(_){let B=_.timescale,R=_.duration;return Ie.box(Ie.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,R>>>24&255,R>>>16&255,R>>>8&255,R&255,85,196,0,0]))}static hdlr(_){let B=null;return _.type==="audio"?B=Ie.constants.HDLR_AUDIO:B=Ie.constants.HDLR_VIDEO,Ie.box(Ie.types.hdlr,B)}static minf(_){let B=null;return _.type==="audio"?B=Ie.box(Ie.types.smhd,Ie.constants.SMHD):B=Ie.box(Ie.types.vmhd,Ie.constants.VMHD),Ie.box(Ie.types.minf,B,Ie.dinf(),Ie.stbl(_))}static dinf(){return Ie.box(Ie.types.dinf,Ie.box(Ie.types.dref,Ie.constants.DREF))}static stbl(_){return Ie.box(Ie.types.stbl,Ie.stsd(_),Ie.box(Ie.types.stts,Ie.constants.STTS),Ie.box(Ie.types.stsc,Ie.constants.STSC),Ie.box(Ie.types.stsz,Ie.constants.STSZ),Ie.box(Ie.types.stco,Ie.constants.STCO))}static stsd(_){return _.type==="audio"?_.codec==="mp3"?Ie.box(Ie.types.stsd,Ie.constants.STSD_PREFIX,Ie.mp3(_)):Ie.box(Ie.types.stsd,Ie.constants.STSD_PREFIX,Ie.mp4a(_)):Ie.box(Ie.types.stsd,Ie.constants.STSD_PREFIX,Ie.avc1(_))}static mp3(_){let B=_.channelCount,R=_.audioSampleRate,j=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,B,0,16,0,0,0,0,R>>>8&255,R&255,0,0]);return Ie.box(Ie.types[".mp3"],j)}static mp4a(_){let B=_.channelCount,R=_.audioSampleRate,j=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,B,0,16,0,0,0,0,R>>>8&255,R&255,0,0]);return Ie.box(Ie.types.mp4a,j,Ie.esds(_))}static esds(_){let B=_.config||[],R=B.length,j=new Uint8Array([0,0,0,0,3,23+R,0,1,0,4,15+R,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([R]).concat(B).concat([6,1,2]));return Ie.box(Ie.types.esds,j)}static avc1(_){let B=_.avcc,R=_.codecWidth,j=_.codecHeight,Q=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,R>>>8&255,R&255,j>>>8&255,j&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Ie.box(Ie.types.avc1,Q,Ie.box(Ie.types.avcC,B))}static mvex(_){return Ie.box(Ie.types.mvex,Ie.trex(_))}static trex(_){let B=_.id,R=new Uint8Array([0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Ie.box(Ie.types.trex,R)}static moof(_,B){return Ie.box(Ie.types.moof,Ie.mfhd(_.sequenceNumber),Ie.traf(_,B))}static mfhd(_){let B=new Uint8Array([0,0,0,0,_>>>24&255,_>>>16&255,_>>>8&255,_&255]);return Ie.box(Ie.types.mfhd,B)}static traf(_,B){let R=_.id,j=Ie.box(Ie.types.tfhd,new Uint8Array([0,0,0,0,R>>>24&255,R>>>16&255,R>>>8&255,R&255])),Q=Ie.box(Ie.types.tfdt,new Uint8Array([0,0,0,0,B>>>24&255,B>>>16&255,B>>>8&255,B&255])),Ee=Ie.sdtp(_),we=Ie.trun(_,Ee.byteLength+16+16+8+16+8+8);return Ie.box(Ie.types.traf,j,Q,we,Ee)}static sdtp(_){let B=_.samples||[],R=B.length,j=new Uint8Array(4+R);for(let Q=0;Q<R;Q++){let Ee=B[Q].flags;j[Q+4]=Ee.isLeading<<6|Ee.dependsOn<<4|Ee.isDependedOn<<2|Ee.hasRedundancy}return Ie.box(Ie.types.sdtp,j)}static trun(_,B){let R=_.samples||[],j=R.length,Q=12+16*j,Ee=new Uint8Array(Q);B+=8+Q,Ee.set([0,0,15,1,j>>>24&255,j>>>16&255,j>>>8&255,j&255,B>>>24&255,B>>>16&255,B>>>8&255,B&255],0);for(let we=0;we<j;we++){let De=R[we].duration,ye=R[we].size,Me=R[we].flags,Be=R[we].cts;Ee.set([De>>>24&255,De>>>16&255,De>>>8&255,De&255,ye>>>24&255,ye>>>16&255,ye>>>8&255,ye&255,Me.isLeading<<2|Me.dependsOn,Me.isDependedOn<<6|Me.hasRedundancy<<4|Me.isNonSync,0,0,Be>>>24&255,Be>>>16&255,Be>>>8&255,Be&255],12+16*we)}return Ie.box(Ie.types.trun,Ee)}static mdat(_){return Ie.box(Ie.types.mdat,_)}}Ie.init();var Ye=Ie;class qe{static getSilentFrame(_,B){if(_==="mp4a.40.2"){if(B===1)return new Uint8Array([0,200,0,128,35,128]);if(B===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(B===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(B===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(B===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(B===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(B===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(B===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(B===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var ot=qe;class gt{constructor(_,B,R,j,Q){this.dts=_,this.pts=B,this.duration=R,this.originalDts=j,this.isSyncPoint=Q,this.fileposition=null}}class pt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(_){_.isSyncPoint=!0,this.syncPoints.push(_)}}class Lt{constructor(){this._list=[]}clear(){this._list=[]}appendArray(_){let B=this._list;_.length!==0&&(B.length>0&&_[0].originalDts<B[B.length-1].originalDts&&this.clear(),Array.prototype.push.apply(B,_))}getLastSyncPointBeforeDts(_){if(this._list.length==0)return null;let B=this._list,R=0,j=B.length-1,Q=0,Ee=0,we=j;for(_<B[0].dts&&(R=0,Ee=we+1);Ee<=we;)if(Q=Ee+Math.floor((we-Ee)/2),Q===j||_>=B[Q].dts&&_<B[Q+1].dts){R=Q;break}else B[Q].dts<_?Ee=Q+1:we=Q-1;return this._list[R]}}class Tt{constructor(_){this._type=_,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(_){let B=this._list;if(B.length===0)return-2;let R=B.length-1,j=0,Q=0,Ee=R,we=0;if(_<B[0].originalBeginDts)return we=-1,we;for(;Q<=Ee;)if(j=Q+Math.floor((Ee-Q)/2),j===R||_>B[j].lastSample.originalDts&&_<B[j+1].originalBeginDts){we=j;break}else B[j].originalBeginDts<_?Q=j+1:Ee=j-1;return we}_searchNearestSegmentAfter(_){return this._searchNearestSegmentBefore(_)+1}append(_){let B=this._list,R=_,j=this._lastAppendLocation,Q=0;j!==-1&&j<B.length&&R.originalBeginDts>=B[j].lastSample.originalDts&&(j===B.length-1||j<B.length-1&&R.originalBeginDts<B[j+1].originalBeginDts)?Q=j+1:B.length>0&&(Q=this._searchNearestSegmentBefore(R.originalBeginDts)+1),this._lastAppendLocation=Q,this._list.splice(Q,0,R)}getLastSegmentBefore(_){let B=this._searchNearestSegmentBefore(_);return B>=0?this._list[B]:null}getLastSampleBefore(_){let B=this.getLastSegmentBefore(_);return B!=null?B.lastSample:null}getLastSyncPointBefore(_){let B=this._searchNearestSegmentBefore(_),R=this._list[B].syncPoints;for(;R.length===0&&B>0;)B--,R=this._list[B].syncPoints;return R.length>0?R[R.length-1]:null}}class Nt{constructor(_){this.TAG="MP4Remuxer",this._config=_,this._isLive=_.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new Tt("audio"),this._videoSegmentInfoList=new Tt("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(O.chrome&&(O.version.major<50||O.version.major===50&&O.version.build<2661)),this._fillSilentAfterSeek=O.msedge||O.msie,this._mp3UseMpegAudio=!O.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(_){return _.onDataAvailable=this.remux.bind(this),_.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(_){this._onInitSegment=_}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(_){this._onMediaSegment=_}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(_){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(_,B){if(!this._onMediaSegment)throw new x("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(_,B),this._remuxVideo(B),this._remuxAudio(_)}_onTrackMetadataReceived(_,B){let R=null,j="mp4",Q=B.codec;if(_==="audio")this._audioMeta=B,B.codec==="mp3"&&this._mp3UseMpegAudio?(j="mpeg",Q="",R=new Uint8Array):R=Ye.generateInitSegment(B);else if(_==="video")this._videoMeta=B,R=Ye.generateInitSegment(B);else return;if(!this._onInitSegment)throw new x("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(_,{type:_,data:R.buffer,codec:Q,container:`${_}/${j}`,mediaDuration:B.duration})}_calculateDtsBase(_,B){this._dtsBaseInited||(_.samples&&_.samples.length&&(this._audioDtsBase=_.samples[0].dts),B.samples&&B.samples.length&&(this._videoDtsBase=B.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let _=this._videoStashedLastSample,B=this._audioStashedLastSample,R={type:"video",id:1,sequenceNumber:0,samples:[],length:0};_!=null&&(R.samples.push(_),R.length=_.length);let j={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};B!=null&&(j.samples.push(B),j.length=B.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(R,!0),this._remuxAudio(j,!0)}_remuxAudio(_,B){if(this._audioMeta==null)return;let R=_,j=R.samples,Q,Ee=-1,we=-1,De=-1,ye=this._audioMeta.refSampleDuration,Me=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,Be=this._dtsBaseInited&&this._audioNextDts===void 0,He=!1;if(!j||j.length===0||j.length===1&&!B)return;let Ge=0,Ve=null,Ke=0;Me?(Ge=0,Ke=R.length):(Ge=8,Ke=8+R.length);let at=null;if(j.length>1&&(at=j.pop(),Ke-=at.length),this._audioStashedLastSample!=null){let _t=this._audioStashedLastSample;this._audioStashedLastSample=null,j.unshift(_t),Ke+=_t.length}at!=null&&(this._audioStashedLastSample=at);let Le=j[0].dts-this._dtsBase;if(this._audioNextDts)Q=Le-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())Q=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(He=!0);else{let _t=this._audioSegmentInfoList.getLastSampleBefore(Le);if(_t!=null){let St=Le-(_t.originalDts+_t.duration);St<=3&&(St=0);let Bt=_t.dts+_t.duration+St;Q=Le-Bt}else Q=0}if(He){let _t=Le-Q,St=this._videoSegmentInfoList.getLastSegmentBefore(Le);if(St!=null&&St.beginDts<_t){let Bt=ot.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(Bt){let $e=St.beginDts,xt=_t-St.beginDts;C.v(this.TAG,`InsertPrefixSilentAudio: dts: ${$e}, duration: ${xt}`),j.unshift({unit:Bt,dts:$e,pts:$e}),Ke+=Bt.byteLength}}else He=!1}let Qe=[];for(let _t=0;_t<j.length;_t++){let St=j[_t],Bt=St.unit,$e=St.dts-this._dtsBase,xt=$e-Q;Ee===-1&&(Ee=xt);let Rt=0;_t!==j.length-1?Rt=j[_t+1].dts-this._dtsBase-Q-xt:at!=null?Rt=at.dts-this._dtsBase-Q-xt:Qe.length>=1?Rt=Qe[Qe.length-1].duration:Rt=Math.floor(ye);let Mt=!1,rn=null;if(Rt>ye*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!O.safari){Mt=!0;let Ft=Math.abs(Rt-ye),Yt=Math.ceil(Ft/ye),qt=xt+ye;C.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${xt+Rt} ms, expected: ${xt+Math.round(ye)} ms, delta: ${Math.round(Ft)} ms, generate: ${Yt} frames`);let cn=ot.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);cn==null&&(C.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),cn=Bt),rn=[];for(let nn=0;nn<Yt;nn++){let Pn=Math.round(qt);if(rn.length>0){let hn=rn[rn.length-1];hn.duration=Pn-hn.dts}let Nn={dts:Pn,pts:Pn,cts:0,unit:cn,size:cn.byteLength,duration:0,originalDts:$e,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};rn.push(Nn),Ke+=Nn.size,qt+=ye}let ln=rn[rn.length-1];ln.duration=xt+Rt-ln.dts,Rt=Math.round(ye)}Qe.push({dts:xt,pts:xt,cts:0,unit:St.unit,size:St.unit.byteLength,duration:Rt,originalDts:$e,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),Mt&&Qe.push.apply(Qe,rn)}Me?Ve=new Uint8Array(Ke):(Ve=new Uint8Array(Ke),Ve[0]=Ke>>>24&255,Ve[1]=Ke>>>16&255,Ve[2]=Ke>>>8&255,Ve[3]=Ke&255,Ve.set(Ye.types.mdat,4));for(let _t=0;_t<Qe.length;_t++){let St=Qe[_t].unit;Ve.set(St,Ge),Ge+=St.byteLength}let ut=Qe[Qe.length-1];we=ut.dts+ut.duration,this._audioNextDts=we;let bt=new pt;bt.beginDts=Ee,bt.endDts=we,bt.beginPts=Ee,bt.endPts=we,bt.originalBeginDts=Qe[0].originalDts,bt.originalEndDts=ut.originalDts+ut.duration,bt.firstSample=new gt(Qe[0].dts,Qe[0].pts,Qe[0].duration,Qe[0].originalDts,!1),bt.lastSample=new gt(ut.dts,ut.pts,ut.duration,ut.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(bt),R.samples=Qe,R.sequenceNumber++;let It=null;Me?It=new Uint8Array:It=Ye.moof(R,Ee),R.samples=[],R.length=0;let Ct={type:"audio",data:this._mergeBoxes(It,Ve).buffer,sampleCount:Qe.length,info:bt};Me&&Be&&(Ct.timestampOffset=Ee),this._onMediaSegment("audio",Ct)}_remuxVideo(_,B){if(this._videoMeta==null)return;let R=_,j=R.samples,Q,Ee=-1,we=-1,De=-1,ye=-1;if(!j||j.length===0||j.length===1&&!B)return;let Me=8,Be=null,He=8+_.length,Ge=null;if(j.length>1&&(Ge=j.pop(),He-=Ge.length),this._videoStashedLastSample!=null){let ut=this._videoStashedLastSample;this._videoStashedLastSample=null,j.unshift(ut),He+=ut.length}Ge!=null&&(this._videoStashedLastSample=Ge);let Ve=j[0].dts-this._dtsBase;if(this._videoNextDts)Q=Ve-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())Q=0;else{let ut=this._videoSegmentInfoList.getLastSampleBefore(Ve);if(ut!=null){let bt=Ve-(ut.originalDts+ut.duration);bt<=3&&(bt=0);let It=ut.dts+ut.duration+bt;Q=Ve-It}else Q=0}let Ke=new pt,at=[];for(let ut=0;ut<j.length;ut++){let bt=j[ut],It=bt.dts-this._dtsBase,Ct=bt.isKeyframe,_t=It-Q,St=bt.cts,Bt=_t+St;Ee===-1&&(Ee=_t,De=Bt);let $e=0;if(ut!==j.length-1?$e=j[ut+1].dts-this._dtsBase-Q-_t:Ge!=null?$e=Ge.dts-this._dtsBase-Q-_t:at.length>=1?$e=at[at.length-1].duration:$e=Math.floor(this._videoMeta.refSampleDuration),Ct){let xt=new gt(_t,Bt,$e,bt.dts,!0);xt.fileposition=bt.fileposition,Ke.appendSyncPoint(xt)}at.push({dts:_t,pts:Bt,cts:St,units:bt.units,size:bt.length,isKeyframe:Ct,duration:$e,originalDts:It,flags:{isLeading:0,dependsOn:Ct?2:1,isDependedOn:Ct?1:0,hasRedundancy:0,isNonSync:Ct?0:1}})}Be=new Uint8Array(He),Be[0]=He>>>24&255,Be[1]=He>>>16&255,Be[2]=He>>>8&255,Be[3]=He&255,Be.set(Ye.types.mdat,4);for(let ut=0;ut<at.length;ut++){let bt=at[ut].units;for(;bt.length;){let Ct=bt.shift().data;Be.set(Ct,Me),Me+=Ct.byteLength}}let Le=at[at.length-1];if(we=Le.dts+Le.duration,ye=Le.pts+Le.duration,this._videoNextDts=we,Ke.beginDts=Ee,Ke.endDts=we,Ke.beginPts=De,Ke.endPts=ye,Ke.originalBeginDts=at[0].originalDts,Ke.originalEndDts=Le.originalDts+Le.duration,Ke.firstSample=new gt(at[0].dts,at[0].pts,at[0].duration,at[0].originalDts,at[0].isKeyframe),Ke.lastSample=new gt(Le.dts,Le.pts,Le.duration,Le.originalDts,Le.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Ke),R.samples=at,R.sequenceNumber++,this._forceFirstIDR){let ut=at[0].flags;ut.dependsOn=2,ut.isNonSync=0}let Qe=Ye.moof(R,Ee);R.samples=[],R.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(Qe,Be).buffer,sampleCount:at.length,info:Ke})}_mergeBoxes(_,B){let R=new Uint8Array(_.byteLength+B.byteLength);return R.set(_,0),R.set(B,_.byteLength),R}}var jt=Nt,Ot={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class Kt{constructor(_,B){this.TAG="TransmuxingController",this._emitter=new(b()),this._config=B,_.segments||(_.segments=[{duration:_.duration,filesize:_.filesize,url:_.url}]),typeof _.cors!="boolean"&&(_.cors=!0),typeof _.withCredentials!="boolean"&&(_.withCredentials=!1),this._mediaDataSource=_,this._currentSegmentIndex=0;let R=0;this._mediaDataSource.segments.forEach(j=>{j.timestampBase=R,R+=j.duration,j.cors=_.cors,j.withCredentials=_.withCredentials,B.referrerPolicy&&(j.referrerPolicy=B.referrerPolicy)}),!isNaN(R)&&this._mediaDataSource.duration!==R&&(this._mediaDataSource.duration=R),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(_,B){this._emitter.addListener(_,B)}off(_,B){this._emitter.removeListener(_,B)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(_,B){this._currentSegmentIndex=_;let R=this._mediaDataSource.segments[_],j=this._ioctl=new ne(R,this._config,_);j.onError=this._onIOException.bind(this),j.onSeeked=this._onIOSeeked.bind(this),j.onComplete=this._onIOComplete.bind(this),j.onRedirect=this._onIORedirect.bind(this),j.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),B?this._demuxer.bindDataSource(this._ioctl):j.onDataArrival=this._onInitChunkArrival.bind(this),j.open(B)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(_){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let B=this._searchSegmentIndexContains(_);if(B===this._currentSegmentIndex){let R=this._mediaInfo.segments[B];if(R==null)this._pendingSeekTime=_;else{let j=R.getNearestKeyframe(_);this._remuxer.seek(j.milliseconds),this._ioctl.seek(j.fileposition),this._pendingResolveSeekPoint=j.milliseconds}}else{let R=this._mediaInfo.segments[B];if(R==null)this._pendingSeekTime=_,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(B);else{let j=R.getNearestKeyframe(_);this._internalAbort(),this._remuxer.seek(_),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[B].timestampBase,this._loadSegment(B,j.fileposition),this._pendingResolveSeekPoint=j.milliseconds,this._reportSegmentMediaInfo(B)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(_){let B=this._mediaDataSource.segments,R=B.length-1;for(let j=0;j<B.length;j++)if(_<B[j].timestampBase){R=j-1;break}return R}_onInitChunkArrival(_,B){let R=null,j=0;if(B>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,j=this._demuxer.parseChunks(_,B);else if((R=Ze.probe(_)).match){this._demuxer=new Ze(R,this._config),this._remuxer||(this._remuxer=new jt(this._config));let Q=this._mediaDataSource;Q.duration!=null&&!isNaN(Q.duration)&&(this._demuxer.overridedDuration=Q.duration),typeof Q.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=Q.hasAudio),typeof Q.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=Q.hasVideo),this._demuxer.timestampBase=Q.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),j=this._demuxer.parseChunks(_,B)}else R=null,C.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Ot.DEMUX_ERROR,wt.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),j=0;return j}_onMediaInfo(_){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},_),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,Fe.prototype));let B=Object.assign({},_);Object.setPrototypeOf(B,Fe.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=B,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let R=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(R)})}_onMetaDataArrived(_){this._emitter.emit(Ot.METADATA_ARRIVED,_)}_onScriptDataArrived(_){this._emitter.emit(Ot.SCRIPTDATA_ARRIVED,_)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(_){let R=_+1;R<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(R)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Ot.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(_){let B=this._ioctl.extraData;this._mediaDataSource.segments[B].redirectedURL=_}_onIORecoveredEarlyEof(){this._emitter.emit(Ot.RECOVERED_EARLY_EOF)}_onIOException(_,B){C.e(this.TAG,`IOException: type = ${_}, code = ${B.code}, msg = ${B.msg}`),this._emitter.emit(Ot.IO_ERROR,_,B),this._disableStatisticsReporter()}_onDemuxException(_,B){C.e(this.TAG,`DemuxException: type = ${_}, info = ${B}`),this._emitter.emit(Ot.DEMUX_ERROR,_,B)}_onRemuxerInitSegmentArrival(_,B){this._emitter.emit(Ot.INIT_SEGMENT,_,B)}_onRemuxerMediaSegmentArrival(_,B){if(this._pendingSeekTime==null&&(this._emitter.emit(Ot.MEDIA_SEGMENT,_,B),this._pendingResolveSeekPoint!=null&&_==="video")){let R=B.info.syncPoints,j=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,O.safari&&R.length>0&&R[0].originalDts===j&&(j=R[0].pts),this._emitter.emit(Ot.RECOMMEND_SEEKPOINT,j)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(_){let B=this._mediaInfo.segments[_],R=Object.assign({},B);R.duration=this._mediaInfo.duration,R.segmentCount=this._mediaInfo.segmentCount,delete R.segments,delete R.keyframesIndex,this._emitter.emit(Ot.MEDIA_INFO,R)}_reportStatisticsInfo(){let _={};_.url=this._ioctl.currentURL,_.hasRedirect=this._ioctl.hasRedirect,_.hasRedirect&&(_.redirectedURL=this._ioctl.currentRedirectedURL),_.speed=this._ioctl.currentSpeed,_.loaderType=this._ioctl.loaderType,_.currentSegmentIndex=this._currentSegmentIndex,_.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Ot.STATISTICS_INFO,_)}}var gn=Kt,On=function(me){let _="TransmuxingWorker",B=null,R=Ke.bind(this);re.install(),me.addEventListener("message",function(at){switch(at.data.cmd){case"init":B=new gn(at.data.param[0],at.data.param[1]),B.on(Ot.IO_ERROR,He.bind(this)),B.on(Ot.DEMUX_ERROR,Ge.bind(this)),B.on(Ot.INIT_SEGMENT,j.bind(this)),B.on(Ot.MEDIA_SEGMENT,Q.bind(this)),B.on(Ot.LOADING_COMPLETE,Ee.bind(this)),B.on(Ot.RECOVERED_EARLY_EOF,we.bind(this)),B.on(Ot.MEDIA_INFO,De.bind(this)),B.on(Ot.METADATA_ARRIVED,ye.bind(this)),B.on(Ot.SCRIPTDATA_ARRIVED,Me.bind(this)),B.on(Ot.STATISTICS_INFO,Be.bind(this)),B.on(Ot.RECOMMEND_SEEKPOINT,Ve.bind(this));break;case"destroy":B&&(B.destroy(),B=null),me.postMessage({msg:"destroyed"});break;case"start":B.start();break;case"stop":B.stop();break;case"seek":B.seek(at.data.param);break;case"pause":B.pause();break;case"resume":B.resume();break;case"logging_config":{let Le=at.data.param;be.applyConfig(Le),Le.enableCallback===!0?be.addLogListener(R):be.removeLogListener(R);break}}});function j(at,Le){let Qe={msg:Ot.INIT_SEGMENT,data:{type:at,data:Le}};me.postMessage(Qe,[Le.data])}function Q(at,Le){let Qe={msg:Ot.MEDIA_SEGMENT,data:{type:at,data:Le}};me.postMessage(Qe,[Le.data])}function Ee(){let at={msg:Ot.LOADING_COMPLETE};me.postMessage(at)}function we(){let at={msg:Ot.RECOVERED_EARLY_EOF};me.postMessage(at)}function De(at){let Le={msg:Ot.MEDIA_INFO,data:at};me.postMessage(Le)}function ye(at){let Le={msg:Ot.METADATA_ARRIVED,data:at};me.postMessage(Le)}function Me(at){let Le={msg:Ot.SCRIPTDATA_ARRIVED,data:at};me.postMessage(Le)}function Be(at){let Le={msg:Ot.STATISTICS_INFO,data:at};me.postMessage(Le)}function He(at,Le){me.postMessage({msg:Ot.IO_ERROR,data:{type:at,info:Le}})}function Ge(at,Le){me.postMessage({msg:Ot.DEMUX_ERROR,data:{type:at,info:Le}})}function Ve(at){me.postMessage({msg:Ot.RECOMMEND_SEEKPOINT,data:at})}function Ke(at,Le){me.postMessage({msg:"logcat_callback",data:{type:at,logcat:Le}})}};class ir{constructor(_,B){if(this.TAG="Transmuxer",this._emitter=new(b()),B.enableWorker&&typeof Worker!="undefined")try{let R=Y(82059);this._worker=R(On),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[_,B]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},be.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:be.getConfig()})}catch(R){C.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new gn(_,B)}else this._controller=new gn(_,B);if(this._controller){let R=this._controller;R.on(Ot.IO_ERROR,this._onIOError.bind(this)),R.on(Ot.DEMUX_ERROR,this._onDemuxError.bind(this)),R.on(Ot.INIT_SEGMENT,this._onInitSegment.bind(this)),R.on(Ot.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),R.on(Ot.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),R.on(Ot.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),R.on(Ot.MEDIA_INFO,this._onMediaInfo.bind(this)),R.on(Ot.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),R.on(Ot.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),R.on(Ot.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),R.on(Ot.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),be.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(_,B){this._emitter.addListener(_,B)}off(_,B){this._emitter.removeListener(_,B)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(_){this._worker?this._worker.postMessage({cmd:"seek",param:_}):this._controller.seek(_)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(_,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.INIT_SEGMENT,_,B)})}_onMediaSegment(_,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.MEDIA_SEGMENT,_,B)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Ot.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Ot.RECOVERED_EARLY_EOF)})}_onMediaInfo(_){Promise.resolve().then(()=>{this._emitter.emit(Ot.MEDIA_INFO,_)})}_onMetaDataArrived(_){Promise.resolve().then(()=>{this._emitter.emit(Ot.METADATA_ARRIVED,_)})}_onScriptDataArrived(_){Promise.resolve().then(()=>{this._emitter.emit(Ot.SCRIPTDATA_ARRIVED,_)})}_onStatisticsInfo(_){Promise.resolve().then(()=>{this._emitter.emit(Ot.STATISTICS_INFO,_)})}_onIOError(_,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.IO_ERROR,_,B)})}_onDemuxError(_,B){Promise.resolve().then(()=>{this._emitter.emit(Ot.DEMUX_ERROR,_,B)})}_onRecommendSeekpoint(_){Promise.resolve().then(()=>{this._emitter.emit(Ot.RECOMMEND_SEEKPOINT,_)})}_onLoggingConfigChanged(_){this._worker&&this._worker.postMessage({cmd:"logging_config",param:_})}_onWorkerMessage(_){let B=_.data,R=B.data;if(B.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(B.msg){case Ot.INIT_SEGMENT:case Ot.MEDIA_SEGMENT:this._emitter.emit(B.msg,R.type,R.data);break;case Ot.LOADING_COMPLETE:case Ot.RECOVERED_EARLY_EOF:this._emitter.emit(B.msg);break;case Ot.MEDIA_INFO:Object.setPrototypeOf(R,Fe.prototype),this._emitter.emit(B.msg,R);break;case Ot.METADATA_ARRIVED:case Ot.SCRIPTDATA_ARRIVED:case Ot.STATISTICS_INFO:this._emitter.emit(B.msg,R);break;case Ot.IO_ERROR:case Ot.DEMUX_ERROR:this._emitter.emit(B.msg,R.type,R.info);break;case Ot.RECOMMEND_SEEKPOINT:this._emitter.emit(B.msg,R);break;case"logcat_callback":C.emitter.emit("log",R.type,R.logcat);break;default:break}}}var mr=ir,Vn={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class Rr{constructor(_){this.TAG="MSEController",this._config=_,this._emitter=new(b()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Lt}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(_,B){this._emitter.addListener(_,B)}off(_,B){this._emitter.removeListener(_,B)}attachMediaElement(_){if(this._mediaSource)throw new x("MediaSource has been attached to an HTMLMediaElement!");let B=this._mediaSource=new window.MediaSource;B.addEventListener("sourceopen",this.e.onSourceOpen),B.addEventListener("sourceended",this.e.onSourceEnded),B.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=_,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),_.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let _=this._mediaSource;for(let B in this._sourceBuffers){let R=this._pendingSegments[B];R.splice(0,R.length),this._pendingSegments[B]=null,this._pendingRemoveRanges[B]=null,this._lastInitSegments[B]=null;let j=this._sourceBuffers[B];if(j){if(_.readyState!=="closed"){try{_.removeSourceBuffer(j)}catch(Q){C.e(this.TAG,Q.message)}j.removeEventListener("error",this.e.onSourceBufferError),j.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[B]=null,this._sourceBuffers[B]=null}}if(_.readyState==="open")try{_.endOfStream()}catch(B){C.e(this.TAG,B.message)}_.removeEventListener("sourceopen",this.e.onSourceOpen),_.removeEventListener("sourceended",this.e.onSourceEnded),_.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(_,B){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(_),this._pendingSegments[_.type].push(_);return}let R=_,j=`${R.container}`;R.codec&&R.codec.length>0&&(j+=`;codecs=${R.codec}`);let Q=!1;if(C.v(this.TAG,"Received Initialization Segment, mimeType: "+j),this._lastInitSegments[R.type]=R,j!==this._mimeTypes[R.type]){if(this._mimeTypes[R.type])C.v(this.TAG,`Notice: ${R.type} mimeType changed, origin: ${this._mimeTypes[R.type]}, target: ${j}`);else{Q=!0;try{let Ee=this._sourceBuffers[R.type]=this._mediaSource.addSourceBuffer(j);Ee.addEventListener("error",this.e.onSourceBufferError),Ee.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Ee){C.e(this.TAG,Ee.message),this._emitter.emit(Vn.ERROR,{code:Ee.code,msg:Ee.message});return}}this._mimeTypes[R.type]=j}B||this._pendingSegments[R.type].push(R),Q||this._sourceBuffers[R.type]&&!this._sourceBuffers[R.type].updating&&this._doAppendSegments(),O.safari&&R.container==="audio/mpeg"&&R.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=R.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(_){let B=_;this._pendingSegments[B.type].push(B),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let R=this._sourceBuffers[B.type];R&&!R.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(_){for(let B in this._sourceBuffers){if(!this._sourceBuffers[B])continue;let R=this._sourceBuffers[B];if(this._mediaSource.readyState==="open")try{R.abort()}catch(Q){C.e(this.TAG,Q.message)}this._idrList.clear();let j=this._pendingSegments[B];if(j.splice(0,j.length),this._mediaSource.readyState!=="closed"){for(let Q=0;Q<R.buffered.length;Q++){let Ee=R.buffered.start(Q),we=R.buffered.end(Q);this._pendingRemoveRanges[B].push({start:Ee,end:we})}if(R.updating||this._doRemoveRanges(),O.safari){let Q=this._lastInitSegments[B];Q&&(this._pendingSegments[B].push(Q),R.updating||this._doAppendSegments())}}}}endOfStream(){let _=this._mediaSource,B=this._sourceBuffers;if(!_||_.readyState!=="open"){_&&_.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}B.video&&B.video.updating||B.audio&&B.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,_.endOfStream())}getNearestKeyframe(_){return this._idrList.getLastSyncPointBeforeDts(_)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let _=this._mediaElement.currentTime;for(let B in this._sourceBuffers){let R=this._sourceBuffers[B];if(R){let j=R.buffered;if(j.length>=1&&_-j.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let _=this._mediaElement.currentTime;for(let B in this._sourceBuffers){let R=this._sourceBuffers[B];if(R){let j=R.buffered,Q=!1;for(let Ee=0;Ee<j.length;Ee++){let we=j.start(Ee),De=j.end(Ee);if(we<=_&&_<De+3){if(_-we>=this._config.autoCleanupMaxBackwardDuration){Q=!0;let ye=_-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[B].push({start:we,end:ye})}}else De<_&&(Q=!0,this._pendingRemoveRanges[B].push({start:we,end:De}))}Q&&!R.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let _=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||_.video&&_.video.updating||_.audio&&_.audio.updating)return;let B=this._mediaSource.duration,R=this._pendingMediaDuration;R>0&&(isNaN(B)||R>B)&&(C.v(this.TAG,`Update MediaSource duration from ${B} to ${R}`),this._mediaSource.duration=R),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let _ in this._pendingRemoveRanges){if(!this._sourceBuffers[_]||this._sourceBuffers[_].updating)continue;let B=this._sourceBuffers[_],R=this._pendingRemoveRanges[_];for(;R.length&&!B.updating;){let j=R.shift();B.remove(j.start,j.end)}}}_doAppendSegments(){let _=this._pendingSegments;for(let B in _)if(!(!this._sourceBuffers[B]||this._sourceBuffers[B].updating)&&_[B].length>0){let R=_[B].shift();if(R.timestampOffset){let j=this._sourceBuffers[B].timestampOffset,Q=R.timestampOffset/1e3;Math.abs(j-Q)>.1&&(C.v(this.TAG,`Update MPEG audio timestampOffset from ${j} to ${Q}`),this._sourceBuffers[B].timestampOffset=Q),delete R.timestampOffset}if(!R.data||R.data.byteLength===0)continue;try{this._sourceBuffers[B].appendBuffer(R.data),this._isBufferFull=!1,B==="video"&&R.hasOwnProperty("info")&&this._idrList.appendArray(R.info.syncPoints)}catch(j){this._pendingSegments[B].unshift(R),j.code===22?(this._isBufferFull||this._emitter.emit(Vn.BUFFER_FULL),this._isBufferFull=!0):(C.e(this.TAG,j.message),this._emitter.emit(Vn.ERROR,{code:j.code,msg:j.message}))}}}_onSourceOpen(){if(C.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let _=this._pendingSourceBufferInit;for(;_.length;){let B=_.shift();this.appendInitSegment(B,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(Vn.SOURCE_OPEN)}_onSourceEnded(){C.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){C.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let _=this._pendingSegments;return _.video.length>0||_.audio.length>0}_hasPendingRemoveRanges(){let _=this._pendingRemoveRanges;return _.video.length>0||_.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(Vn.UPDATE_END)}_onSourceBufferError(_){C.e(this.TAG,`SourceBuffer Error: ${_}`)}}var er=Rr;const an={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},$t={NETWORK_EXCEPTION:d.EXCEPTION,NETWORK_STATUS_CODE_INVALID:d.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:d.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:d.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:wt.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:wt.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:wt.CODEC_UNSUPPORTED};class mn{constructor(_,B){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(b()),this._config=ae(),typeof B=="object"&&Object.assign(this._config,B),_.type.toLowerCase()!=="flv")throw new p("FlvPlayer requires an flv MediaDataSource input!");_.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=_,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let R=O.chrome&&(O.version.major<50||O.version.major===50&&O.version.build<2661);this._alwaysSeekKeyframe=!!(R||O.msedge||O.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(_,B){_===_e.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(_e.MEDIA_INFO,this.mediaInfo)}):_===_e.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit(_e.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(_,B)}off(_,B){this._emitter.removeListener(_,B)}attachMediaElement(_){if(this._mediaElement=_,_.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),_.addEventListener("seeking",this.e.onvSeeking),_.addEventListener("canplay",this.e.onvCanPlay),_.addEventListener("stalled",this.e.onvStalled),_.addEventListener("progress",this.e.onvProgress),this._msectl=new er(this._config),this._msectl.on(Vn.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(Vn.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(Vn.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(Vn.ERROR,B=>{this._emitter.emit(_e.ERROR,an.MEDIA_ERROR,$t.MEDIA_MSE_ERROR,B)}),this._msectl.attachMediaElement(_),this._pendingSeekTime!=null)try{_.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(B){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new x("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new x("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new mr(this._mediaDataSource,this._config),this._transmuxer.on(Ot.INIT_SEGMENT,(_,B)=>{this._msectl.appendInitSegment(B)}),this._transmuxer.on(Ot.MEDIA_SEGMENT,(_,B)=>{if(this._msectl.appendMediaSegment(B),this._config.lazyLoad&&!this._config.isLive){let R=this._mediaElement.currentTime;B.info.endDts>=(R+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(C.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Ot.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit(_e.LOADING_COMPLETE)}),this._transmuxer.on(Ot.RECOVERED_EARLY_EOF,()=>{this._emitter.emit(_e.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Ot.IO_ERROR,(_,B)=>{this._emitter.emit(_e.ERROR,an.NETWORK_ERROR,_,B)}),this._transmuxer.on(Ot.DEMUX_ERROR,(_,B)=>{this._emitter.emit(_e.ERROR,an.MEDIA_ERROR,_,{code:-1,msg:B})}),this._transmuxer.on(Ot.MEDIA_INFO,_=>{this._mediaInfo=_,this._emitter.emit(_e.MEDIA_INFO,Object.assign({},_))}),this._transmuxer.on(Ot.METADATA_ARRIVED,_=>{this._emitter.emit(_e.METADATA_ARRIVED,_)}),this._transmuxer.on(Ot.SCRIPTDATA_ARRIVED,_=>{this._emitter.emit(_e.SCRIPTDATA_ARRIVED,_)}),this._transmuxer.on(Ot.STATISTICS_INFO,_=>{this._statisticsInfo=this._fillStatisticsInfo(_),this._emitter.emit(_e.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Ot.RECOMMEND_SEEKPOINT,_=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=_/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(_){this._mediaElement.volume=_}get muted(){return this._mediaElement.muted}set muted(_){this._mediaElement.muted=_}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(_){this._mediaElement?this._internalSeek(_):this._pendingSeekTime=_}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(_){if(_.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return _;let B=!0,R=0,j=0;if(this._mediaElement.getVideoPlaybackQuality){let Q=this._mediaElement.getVideoPlaybackQuality();R=Q.totalVideoFrames,j=Q.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(R=this._mediaElement.webkitDecodedFrameCount,j=this._mediaElement.webkitDroppedFrameCount):B=!1;return B&&(_.decodedFrames=R,_.droppedFrames=j),_}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let _=this._mediaElement.buffered,B=this._mediaElement.currentTime,R=0,j=0;for(let Q=0;Q<_.length;Q++){let Ee=_.start(Q),we=_.end(Q);if(Ee<=B&&B<we){R=Ee,j=we;break}}j>=B+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(C.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){C.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let _=this._mediaElement.currentTime,B=this._mediaElement.buffered,R=!1;for(let j=0;j<B.length;j++){let Q=B.start(j),Ee=B.end(j);if(_>=Q&&_<Ee){_>=Ee-this._config.lazyLoadRecoverDuration&&(R=!0);break}}R&&(window.clearInterval(this._progressChecker),this._progressChecker=null,R&&(C.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(_){let B=this._mediaElement.buffered;for(let R=0;R<B.length;R++){let j=B.start(R),Q=B.end(R);if(_>=j&&_<Q)return!0}return!1}_internalSeek(_){let B=this._isTimepointBuffered(_),R=!1,j=0;if(_<1&&this._mediaElement.buffered.length>0){let Q=this._mediaElement.buffered.start(0);(Q<1&&_<Q||O.safari)&&(R=!0,j=O.safari?.1:Q)}if(R)this._requestSetTime=!0,this._mediaElement.currentTime=j;else if(B){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=_;else{let Q=this._msectl.getNearestKeyframe(Math.floor(_*1e3));this._requestSetTime=!0,Q!=null?this._mediaElement.currentTime=Q.dts/1e3:this._mediaElement.currentTime=_}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(_),this._transmuxer.seek(Math.floor(_*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=_)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let _=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(_)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(_),this._transmuxer.seek(Math.floor(_*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=_))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(_){let B=this._mediaElement;if(_||!this._receivedCanPlay||B.readyState<2){let R=B.buffered;R.length>0&&B.currentTime<R.start(0)&&(C.w(this.TAG,`Playback seems stuck at ${B.currentTime}, seek to ${R.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=R.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(_){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(_){let B=this._mediaElement.currentTime,R=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(B<1&&R.length>0){let j=R.start(0);if(j<1&&B<j||O.safari){this._requestSetTime=!0,this._mediaElement.currentTime=O.safari?.1:j;return}}if(this._isTimepointBuffered(B)){if(this._alwaysSeekKeyframe){let j=this._msectl.getNearestKeyframe(Math.floor(B*1e3));j!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=j.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:B,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(_){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(_){this._checkAndResumeStuckPlayback(!0)}_onvProgress(_){this._checkAndResumeStuckPlayback()}}var Xt=mn;class Fn{constructor(_,B){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(b()),this._config=ae(),typeof B=="object"&&Object.assign(this._config,B),_.type.toLowerCase()==="flv")throw new p("NativePlayer does't support flv MediaDataSource input!");if(_.hasOwnProperty("segments"))throw new p(`NativePlayer(${_.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=_,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(_,B){_===_e.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(_e.MEDIA_INFO,this.mediaInfo)}):_===_e.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit(_e.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(_,B)}off(_,B){this._emitter.removeListener(_,B)}attachMediaElement(_){if(this._mediaElement=_,_.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{_.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(B){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new x("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(_){this._mediaElement.volume=_}get muted(){return this._mediaElement.muted}set muted(_){this._mediaElement.muted=_}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(_){this._mediaElement?this._mediaElement.currentTime=_:this._pendingSeekTime=_}get mediaInfo(){let B={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(B.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(B.width=this._mediaElement.videoWidth,B.height=this._mediaElement.videoHeight)),B}get statisticsInfo(){let _={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return _;let B=!0,R=0,j=0;if(this._mediaElement.getVideoPlaybackQuality){let Q=this._mediaElement.getVideoPlaybackQuality();R=Q.totalVideoFrames,j=Q.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(R=this._mediaElement.webkitDecodedFrameCount,j=this._mediaElement.webkitDroppedFrameCount):B=!1;return B&&(_.decodedFrames=R,_.droppedFrames=j),_}_onvLoadedMetadata(_){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit(_e.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit(_e.STATISTICS_INFO,this.statisticsInfo)}}var sr=Fn;re.install();function Cn(me,_){let B=me;if(B==null||typeof B!="object")throw new p("MediaDataSource must be an javascript object!");if(!B.hasOwnProperty("type"))throw new p("MediaDataSource must has type field to indicate video file type!");switch(B.type){case"flv":return new Xt(B,_);default:return new sr(B,_)}}function tr(){return oe.supportMSEH264Playback()}function lr(){return oe.getFeatureList()}let or={};or.createPlayer=Cn,or.isSupported=tr,or.getFeatureList=lr,or.BaseLoader=g,or.LoaderStatus=L,or.LoaderErrors=d,or.Events=_e,or.ErrorTypes=an,or.ErrorDetails=$t,or.FlvPlayer=Xt,or.NativePlayer=sr,or.LoggingControl=be,Object.defineProperty(or,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var Ut=or},95484:function(Se,Ce,Y){"use strict";var X,re=Object.defineProperty,V=me=>{throw TypeError(me)},b=Math.pow,U=(me,_,B)=>_ in me?re(me,_,{enumerable:!0,configurable:!0,writable:!0,value:B}):me[_]=B,C=(me,_,B)=>U(me,typeof _!="symbol"?_+"":_,B),w=(me,_,B)=>_.has(me)||V("Cannot "+B),y=(me,_,B)=>(w(me,_,"read from private field"),B?B.call(me):_.get(me)),T=(me,_,B)=>_.has(me)?V("Cannot add the same private member more than once"):_ instanceof WeakSet?_.add(me):_.set(me,B),x=(me,_,B,R)=>(w(me,_,"write to private field"),R?R.call(me,B):_.set(me,B),B),p=(me,_,B)=>(w(me,_,"access private method"),B),m,L,d;X={value:!0};var g=Y(34634),A=Y(34402);const M=" ".repeat(2),O=" ".repeat(4);function S(){return I(this)}function I(me,_={}){const{maxRows:B=15,maxColumns:R=10,maxNumSize:j=8,padMinus:Q="auto"}=_;return`${me.constructor.name} {
|
|
|
${M}[
|
|
|
${O}${c(me,B,R,j,Q)}
|
|
|
${M}]
|
|
|
${M}rows: ${me.rows}
|
|
|
${M}columns: ${me.columns}
|
|
|
}`}function c(me,_,B,R,j){const{rows:Q,columns:Ee}=me,we=Math.min(Q,_),De=Math.min(Ee,B),ye=[];if(j==="auto"){j=!1;e:for(let Me=0;Me<we;Me++)for(let Be=0;Be<De;Be++)if(me.get(Me,Be)<0){j=!0;break e}}for(let Me=0;Me<we;Me++){let Be=[];for(let He=0;He<De;He++)Be.push(f(me.get(Me,He),R,j));ye.push(`${Be.join(" ")}`)}return De!==Ee&&(ye[ye.length-1]+=` ... ${Ee-B} more columns`),we!==Q&&ye.push(`... ${Q-_} more rows`),ye.join(`
|
|
|
${O}`)}function f(me,_,B){return(me>=0&&B?` ${P(me,_-1)}`:P(me,_)).padEnd(_)}function P(me,_){let B=me.toString();if(B.length<=_)return B;let R=me.toFixed(_);if(R.length>_&&(R=me.toFixed(Math.max(0,_-(R.length-_)))),R.length<=_&&!R.startsWith("0.000")&&!R.startsWith("-0.000"))return R;let j=me.toExponential(_);return j.length>_&&(j=me.toExponential(Math.max(0,_-(j.length-_)))),j.slice(0)}function N(me,_){me.prototype.add=function(R){return typeof R=="number"?this.addS(R):this.addM(R)},me.prototype.addS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)+R);return this},me.prototype.addM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)+R.get(j,Q));return this},me.add=function(R,j){return new _(R).add(j)},me.prototype.sub=function(R){return typeof R=="number"?this.subS(R):this.subM(R)},me.prototype.subS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)-R);return this},me.prototype.subM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)-R.get(j,Q));return this},me.sub=function(R,j){return new _(R).sub(j)},me.prototype.subtract=me.prototype.sub,me.prototype.subtractS=me.prototype.subS,me.prototype.subtractM=me.prototype.subM,me.subtract=me.sub,me.prototype.mul=function(R){return typeof R=="number"?this.mulS(R):this.mulM(R)},me.prototype.mulS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)*R);return this},me.prototype.mulM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)*R.get(j,Q));return this},me.mul=function(R,j){return new _(R).mul(j)},me.prototype.multiply=me.prototype.mul,me.prototype.multiplyS=me.prototype.mulS,me.prototype.multiplyM=me.prototype.mulM,me.multiply=me.mul,me.prototype.div=function(R){return typeof R=="number"?this.divS(R):this.divM(R)},me.prototype.divS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)/R);return this},me.prototype.divM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)/R.get(j,Q));return this},me.div=function(R,j){return new _(R).div(j)},me.prototype.divide=me.prototype.div,me.prototype.divideS=me.prototype.divS,me.prototype.divideM=me.prototype.divM,me.divide=me.div,me.prototype.mod=function(R){return typeof R=="number"?this.modS(R):this.modM(R)},me.prototype.modS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)%R);return this},me.prototype.modM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)%R.get(j,Q));return this},me.mod=function(R,j){return new _(R).mod(j)},me.prototype.modulus=me.prototype.mod,me.prototype.modulusS=me.prototype.modS,me.prototype.modulusM=me.prototype.modM,me.modulus=me.mod,me.prototype.and=function(R){return typeof R=="number"?this.andS(R):this.andM(R)},me.prototype.andS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)&R);return this},me.prototype.andM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)&R.get(j,Q));return this},me.and=function(R,j){return new _(R).and(j)},me.prototype.or=function(R){return typeof R=="number"?this.orS(R):this.orM(R)},me.prototype.orS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)|R);return this},me.prototype.orM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)|R.get(j,Q));return this},me.or=function(R,j){return new _(R).or(j)},me.prototype.xor=function(R){return typeof R=="number"?this.xorS(R):this.xorM(R)},me.prototype.xorS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)^R);return this},me.prototype.xorM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)^R.get(j,Q));return this},me.xor=function(R,j){return new _(R).xor(j)},me.prototype.leftShift=function(R){return typeof R=="number"?this.leftShiftS(R):this.leftShiftM(R)},me.prototype.leftShiftS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)<<R);return this},me.prototype.leftShiftM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)<<R.get(j,Q));return this},me.leftShift=function(R,j){return new _(R).leftShift(j)},me.prototype.signPropagatingRightShift=function(R){return typeof R=="number"?this.signPropagatingRightShiftS(R):this.signPropagatingRightShiftM(R)},me.prototype.signPropagatingRightShiftS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)>>R);return this},me.prototype.signPropagatingRightShiftM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)>>R.get(j,Q));return this},me.signPropagatingRightShift=function(R,j){return new _(R).signPropagatingRightShift(j)},me.prototype.rightShift=function(R){return typeof R=="number"?this.rightShiftS(R):this.rightShiftM(R)},me.prototype.rightShiftS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)>>>R);return this},me.prototype.rightShiftM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,this.get(j,Q)>>>R.get(j,Q));return this},me.rightShift=function(R,j){return new _(R).rightShift(j)},me.prototype.zeroFillRightShift=me.prototype.rightShift,me.prototype.zeroFillRightShiftS=me.prototype.rightShiftS,me.prototype.zeroFillRightShiftM=me.prototype.rightShiftM,me.zeroFillRightShift=me.rightShift,me.prototype.not=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,~this.get(R,j));return this},me.not=function(R){return new _(R).not()},me.prototype.abs=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.abs(this.get(R,j)));return this},me.abs=function(R){return new _(R).abs()},me.prototype.acos=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.acos(this.get(R,j)));return this},me.acos=function(R){return new _(R).acos()},me.prototype.acosh=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.acosh(this.get(R,j)));return this},me.acosh=function(R){return new _(R).acosh()},me.prototype.asin=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.asin(this.get(R,j)));return this},me.asin=function(R){return new _(R).asin()},me.prototype.asinh=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.asinh(this.get(R,j)));return this},me.asinh=function(R){return new _(R).asinh()},me.prototype.atan=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.atan(this.get(R,j)));return this},me.atan=function(R){return new _(R).atan()},me.prototype.atanh=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.atanh(this.get(R,j)));return this},me.atanh=function(R){return new _(R).atanh()},me.prototype.cbrt=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.cbrt(this.get(R,j)));return this},me.cbrt=function(R){return new _(R).cbrt()},me.prototype.ceil=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.ceil(this.get(R,j)));return this},me.ceil=function(R){return new _(R).ceil()},me.prototype.clz32=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.clz32(this.get(R,j)));return this},me.clz32=function(R){return new _(R).clz32()},me.prototype.cos=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.cos(this.get(R,j)));return this},me.cos=function(R){return new _(R).cos()},me.prototype.cosh=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.cosh(this.get(R,j)));return this},me.cosh=function(R){return new _(R).cosh()},me.prototype.exp=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.exp(this.get(R,j)));return this},me.exp=function(R){return new _(R).exp()},me.prototype.expm1=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.expm1(this.get(R,j)));return this},me.expm1=function(R){return new _(R).expm1()},me.prototype.floor=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.floor(this.get(R,j)));return this},me.floor=function(R){return new _(R).floor()},me.prototype.fround=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.fround(this.get(R,j)));return this},me.fround=function(R){return new _(R).fround()},me.prototype.log=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.log(this.get(R,j)));return this},me.log=function(R){return new _(R).log()},me.prototype.log1p=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.log1p(this.get(R,j)));return this},me.log1p=function(R){return new _(R).log1p()},me.prototype.log10=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.log10(this.get(R,j)));return this},me.log10=function(R){return new _(R).log10()},me.prototype.log2=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.log2(this.get(R,j)));return this},me.log2=function(R){return new _(R).log2()},me.prototype.round=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.round(this.get(R,j)));return this},me.round=function(R){return new _(R).round()},me.prototype.sign=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.sign(this.get(R,j)));return this},me.sign=function(R){return new _(R).sign()},me.prototype.sin=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.sin(this.get(R,j)));return this},me.sin=function(R){return new _(R).sin()},me.prototype.sinh=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.sinh(this.get(R,j)));return this},me.sinh=function(R){return new _(R).sinh()},me.prototype.sqrt=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.sqrt(this.get(R,j)));return this},me.sqrt=function(R){return new _(R).sqrt()},me.prototype.tan=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.tan(this.get(R,j)));return this},me.tan=function(R){return new _(R).tan()},me.prototype.tanh=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.tanh(this.get(R,j)));return this},me.tanh=function(R){return new _(R).tanh()},me.prototype.trunc=function(){for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.set(R,j,Math.trunc(this.get(R,j)));return this},me.trunc=function(R){return new _(R).trunc()},me.pow=function(R,j){return new _(R).pow(j)},me.prototype.pow=function(R){return typeof R=="number"?this.powS(R):this.powM(R)},me.prototype.powS=function(R){for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,b(this.get(j,Q),R));return this},me.prototype.powM=function(R){if(R=_.checkMatrix(R),this.rows!==R.rows||this.columns!==R.columns)throw new RangeError("Matrices dimensions must be equal");for(let j=0;j<this.rows;j++)for(let Q=0;Q<this.columns;Q++)this.set(j,Q,b(this.get(j,Q),R.get(j,Q)));return this}}function k(me,_,B){let R=B?me.rows:me.rows-1;if(_<0||_>R)throw new RangeError("Row index out of range")}function W(me,_,B){let R=B?me.columns:me.columns-1;if(_<0||_>R)throw new RangeError("Column index out of range")}function z(me,_){if(_.to1DArray&&(_=_.to1DArray()),_.length!==me.columns)throw new RangeError("vector size must be the same as the number of columns");return _}function Z(me,_){if(_.to1DArray&&(_=_.to1DArray()),_.length!==me.rows)throw new RangeError("vector size must be the same as the number of rows");return _}function J(me,_){if(!g.isAnyArray(_))throw new TypeError("row indices must be an array");for(let B=0;B<_.length;B++)if(_[B]<0||_[B]>=me.rows)throw new RangeError("row indices are out of range")}function ee(me,_){if(!g.isAnyArray(_))throw new TypeError("column indices must be an array");for(let B=0;B<_.length;B++)if(_[B]<0||_[B]>=me.columns)throw new RangeError("column indices are out of range")}function $(me,_,B,R,j){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(se("startRow",_),se("endRow",B),se("startColumn",R),se("endColumn",j),_>B||R>j||_<0||_>=me.rows||B<0||B>=me.rows||R<0||R>=me.columns||j<0||j>=me.columns)throw new RangeError("Submatrix indices are out of range")}function ie(me,_=0){let B=[];for(let R=0;R<me;R++)B.push(_);return B}function se(me,_){if(typeof _!="number")throw new TypeError(`${me} must be a number`)}function ne(me){if(me.isEmpty())throw new Error("Empty matrix has no elements to index")}function ce(me){let _=ie(me.rows);for(let B=0;B<me.rows;++B)for(let R=0;R<me.columns;++R)_[B]+=me.get(B,R);return _}function ae(me){let _=ie(me.columns);for(let B=0;B<me.rows;++B)for(let R=0;R<me.columns;++R)_[R]+=me.get(B,R);return _}function fe(me){let _=0;for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)_+=me.get(B,R);return _}function oe(me){let _=ie(me.rows,1);for(let B=0;B<me.rows;++B)for(let R=0;R<me.columns;++R)_[B]*=me.get(B,R);return _}function pe(me){let _=ie(me.columns,1);for(let B=0;B<me.rows;++B)for(let R=0;R<me.columns;++R)_[R]*=me.get(B,R);return _}function _e(me){let _=1;for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)_*=me.get(B,R);return _}function de(me,_,B){const R=me.rows,j=me.columns,Q=[];for(let Ee=0;Ee<R;Ee++){let we=0,De=0,ye=0;for(let Me=0;Me<j;Me++)ye=me.get(Ee,Me)-B[Ee],we+=ye,De+=ye*ye;_?Q.push((De-we*we/j)/(j-1)):Q.push((De-we*we/j)/j)}return Q}function be(me,_,B){const R=me.rows,j=me.columns,Q=[];for(let Ee=0;Ee<j;Ee++){let we=0,De=0,ye=0;for(let Me=0;Me<R;Me++)ye=me.get(Me,Ee)-B[Ee],we+=ye,De+=ye*ye;_?Q.push((De-we*we/R)/(R-1)):Q.push((De-we*we/R)/R)}return Q}function Ae(me,_,B){const R=me.rows,j=me.columns,Q=R*j;let Ee=0,we=0,De=0;for(let ye=0;ye<R;ye++)for(let Me=0;Me<j;Me++)De=me.get(ye,Me)-B,Ee+=De,we+=De*De;return _?(we-Ee*Ee/Q)/(Q-1):(we-Ee*Ee/Q)/Q}function Fe(me,_){for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)me.set(B,R,me.get(B,R)-_[B])}function Ue(me,_){for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)me.set(B,R,me.get(B,R)-_[R])}function it(me,_){for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)me.set(B,R,me.get(B,R)-_)}function tt(me){const _=[];for(let B=0;B<me.rows;B++){let R=0;for(let j=0;j<me.columns;j++)R+=b(me.get(B,j),2)/(me.columns-1);_.push(Math.sqrt(R))}return _}function et(me,_){for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)me.set(B,R,me.get(B,R)/_[B])}function vt(me){const _=[];for(let B=0;B<me.columns;B++){let R=0;for(let j=0;j<me.rows;j++)R+=b(me.get(j,B),2)/(me.rows-1);_.push(Math.sqrt(R))}return _}function dt(me,_){for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)me.set(B,R,me.get(B,R)/_[R])}function je(me){const _=me.size-1;let B=0;for(let R=0;R<me.columns;R++)for(let j=0;j<me.rows;j++)B+=b(me.get(j,R),2)/_;return Math.sqrt(B)}function nt(me,_){for(let B=0;B<me.rows;B++)for(let R=0;R<me.columns;R++)me.set(B,R,me.get(B,R)/_)}class rt{static from1DArray(_,B,R){if(_*B!==R.length)throw new RangeError("data length does not match given dimensions");let Q=new Re(_,B);for(let Ee=0;Ee<_;Ee++)for(let we=0;we<B;we++)Q.set(Ee,we,R[Ee*B+we]);return Q}static rowVector(_){let B=new Re(1,_.length);for(let R=0;R<_.length;R++)B.set(0,R,_[R]);return B}static columnVector(_){let B=new Re(_.length,1);for(let R=0;R<_.length;R++)B.set(R,0,_[R]);return B}static zeros(_,B){return new Re(_,B)}static ones(_,B){return new Re(_,B).fill(1)}static rand(_,B,R={}){if(typeof R!="object")throw new TypeError("options must be an object");const{random:j=Math.random}=R;let Q=new Re(_,B);for(let Ee=0;Ee<_;Ee++)for(let we=0;we<B;we++)Q.set(Ee,we,j());return Q}static randInt(_,B,R={}){if(typeof R!="object")throw new TypeError("options must be an object");const{min:j=0,max:Q=1e3,random:Ee=Math.random}=R;if(!Number.isInteger(j))throw new TypeError("min must be an integer");if(!Number.isInteger(Q))throw new TypeError("max must be an integer");if(j>=Q)throw new RangeError("min must be smaller than max");let we=Q-j,De=new Re(_,B);for(let ye=0;ye<_;ye++)for(let Me=0;Me<B;Me++){let Be=j+Math.round(Ee()*we);De.set(ye,Me,Be)}return De}static eye(_,B,R){B===void 0&&(B=_),R===void 0&&(R=1);let j=Math.min(_,B),Q=this.zeros(_,B);for(let Ee=0;Ee<j;Ee++)Q.set(Ee,Ee,R);return Q}static diag(_,B,R){let j=_.length;B===void 0&&(B=j),R===void 0&&(R=B);let Q=Math.min(j,B,R),Ee=this.zeros(B,R);for(let we=0;we<Q;we++)Ee.set(we,we,_[we]);return Ee}static min(_,B){_=this.checkMatrix(_),B=this.checkMatrix(B);let R=_.rows,j=_.columns,Q=new Re(R,j);for(let Ee=0;Ee<R;Ee++)for(let we=0;we<j;we++)Q.set(Ee,we,Math.min(_.get(Ee,we),B.get(Ee,we)));return Q}static max(_,B){_=this.checkMatrix(_),B=this.checkMatrix(B);let R=_.rows,j=_.columns,Q=new this(R,j);for(let Ee=0;Ee<R;Ee++)for(let we=0;we<j;we++)Q.set(Ee,we,Math.max(_.get(Ee,we),B.get(Ee,we)));return Q}static checkMatrix(_){return rt.isMatrix(_)?_:new Re(_)}static isMatrix(_){return _!=null&&_.klass==="Matrix"}get size(){return this.rows*this.columns}apply(_){if(typeof _!="function")throw new TypeError("callback must be a function");for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)_.call(this,B,R);return this}to1DArray(){let _=[];for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)_.push(this.get(B,R));return _}to2DArray(){let _=[];for(let B=0;B<this.rows;B++){_.push([]);for(let R=0;R<this.columns;R++)_[B].push(this.get(B,R))}return _}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 _=0;_<this.rows;_++)for(let B=0;B<=_;B++)if(this.get(_,B)!==this.get(B,_))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let _=0;_<this.rows;_++)if(this.get(_,_)!==0)return!1;return!0}isEchelonForm(){let _=0,B=0,R=-1,j=!0,Q=!1;for(;_<this.rows&&j;){for(B=0,Q=!1;B<this.columns&&Q===!1;)this.get(_,B)===0?B++:this.get(_,B)===1&&B>R?(Q=!0,R=B):(j=!1,Q=!0);_++}return j}isReducedEchelonForm(){let _=0,B=0,R=-1,j=!0,Q=!1;for(;_<this.rows&&j;){for(B=0,Q=!1;B<this.columns&&Q===!1;)this.get(_,B)===0?B++:this.get(_,B)===1&&B>R?(Q=!0,R=B):(j=!1,Q=!0);for(let Ee=B+1;Ee<this.rows;Ee++)this.get(_,Ee)!==0&&(j=!1);_++}return j}echelonForm(){let _=this.clone(),B=0,R=0;for(;B<_.rows&&R<_.columns;){let j=B;for(let Q=B;Q<_.rows;Q++)_.get(Q,R)>_.get(j,R)&&(j=Q);if(_.get(j,R)===0)R++;else{_.swapRows(B,j);let Q=_.get(B,R);for(let Ee=R;Ee<_.columns;Ee++)_.set(B,Ee,_.get(B,Ee)/Q);for(let Ee=B+1;Ee<_.rows;Ee++){let we=_.get(Ee,R)/_.get(B,R);_.set(Ee,R,0);for(let De=R+1;De<_.columns;De++)_.set(Ee,De,_.get(Ee,De)-_.get(B,De)*we)}B++,R++}}return _}reducedEchelonForm(){let _=this.echelonForm(),B=_.columns,R=_.rows,j=R-1;for(;j>=0;)if(_.maxRow(j)===0)j--;else{let Q=0,Ee=!1;for(;Q<R&&Ee===!1;)_.get(j,Q)===1?Ee=!0:Q++;for(let we=0;we<j;we++){let De=_.get(we,Q);for(let ye=Q;ye<B;ye++){let Me=_.get(we,ye)-De*_.get(j,ye);_.set(we,ye,Me)}}j--}return _}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(_={}){if(typeof _!="object")throw new TypeError("options must be an object");const{rows:B=1,columns:R=1}=_;if(!Number.isInteger(B)||B<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(R)||R<=0)throw new TypeError("columns must be a positive integer");let j=new Re(this.rows*B,this.columns*R);for(let Q=0;Q<B;Q++)for(let Ee=0;Ee<R;Ee++)j.setSubMatrix(this,this.rows*Q,this.columns*Ee);return j}fill(_){for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,_);return this}neg(){return this.mulS(-1)}getRow(_){k(this,_);let B=[];for(let R=0;R<this.columns;R++)B.push(this.get(_,R));return B}getRowVector(_){return Re.rowVector(this.getRow(_))}setRow(_,B){k(this,_),B=z(this,B);for(let R=0;R<this.columns;R++)this.set(_,R,B[R]);return this}swapRows(_,B){k(this,_),k(this,B);for(let R=0;R<this.columns;R++){let j=this.get(_,R);this.set(_,R,this.get(B,R)),this.set(B,R,j)}return this}getColumn(_){W(this,_);let B=[];for(let R=0;R<this.rows;R++)B.push(this.get(R,_));return B}getColumnVector(_){return Re.columnVector(this.getColumn(_))}setColumn(_,B){W(this,_),B=Z(this,B);for(let R=0;R<this.rows;R++)this.set(R,_,B[R]);return this}swapColumns(_,B){W(this,_),W(this,B);for(let R=0;R<this.rows;R++){let j=this.get(R,_);this.set(R,_,this.get(R,B)),this.set(R,B,j)}return this}addRowVector(_){_=z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)+_[R]);return this}subRowVector(_){_=z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)-_[R]);return this}mulRowVector(_){_=z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)*_[R]);return this}divRowVector(_){_=z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)/_[R]);return this}addColumnVector(_){_=Z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)+_[B]);return this}subColumnVector(_){_=Z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)-_[B]);return this}mulColumnVector(_){_=Z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)*_[B]);return this}divColumnVector(_){_=Z(this,_);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)this.set(B,R,this.get(B,R)/_[B]);return this}mulRow(_,B){k(this,_);for(let R=0;R<this.columns;R++)this.set(_,R,this.get(_,R)*B);return this}mulColumn(_,B){W(this,_);for(let R=0;R<this.rows;R++)this.set(R,_,this.get(R,_)*B);return this}max(_){if(this.isEmpty())return NaN;switch(_){case"row":{const B=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)>B[R]&&(B[R]=this.get(R,j));return B}case"column":{const B=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)>B[j]&&(B[j]=this.get(R,j));return B}case void 0:{let B=this.get(0,0);for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)>B&&(B=this.get(R,j));return B}default:throw new Error(`invalid option: ${_}`)}}maxIndex(){ne(this);let _=this.get(0,0),B=[0,0];for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)>_&&(_=this.get(R,j),B[0]=R,B[1]=j);return B}min(_){if(this.isEmpty())return NaN;switch(_){case"row":{const B=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)<B[R]&&(B[R]=this.get(R,j));return B}case"column":{const B=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)<B[j]&&(B[j]=this.get(R,j));return B}case void 0:{let B=this.get(0,0);for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)<B&&(B=this.get(R,j));return B}default:throw new Error(`invalid option: ${_}`)}}minIndex(){ne(this);let _=this.get(0,0),B=[0,0];for(let R=0;R<this.rows;R++)for(let j=0;j<this.columns;j++)this.get(R,j)<_&&(_=this.get(R,j),B[0]=R,B[1]=j);return B}maxRow(_){if(k(this,_),this.isEmpty())return NaN;let B=this.get(_,0);for(let R=1;R<this.columns;R++)this.get(_,R)>B&&(B=this.get(_,R));return B}maxRowIndex(_){k(this,_),ne(this);let B=this.get(_,0),R=[_,0];for(let j=1;j<this.columns;j++)this.get(_,j)>B&&(B=this.get(_,j),R[1]=j);return R}minRow(_){if(k(this,_),this.isEmpty())return NaN;let B=this.get(_,0);for(let R=1;R<this.columns;R++)this.get(_,R)<B&&(B=this.get(_,R));return B}minRowIndex(_){k(this,_),ne(this);let B=this.get(_,0),R=[_,0];for(let j=1;j<this.columns;j++)this.get(_,j)<B&&(B=this.get(_,j),R[1]=j);return R}maxColumn(_){if(W(this,_),this.isEmpty())return NaN;let B=this.get(0,_);for(let R=1;R<this.rows;R++)this.get(R,_)>B&&(B=this.get(R,_));return B}maxColumnIndex(_){W(this,_),ne(this);let B=this.get(0,_),R=[0,_];for(let j=1;j<this.rows;j++)this.get(j,_)>B&&(B=this.get(j,_),R[0]=j);return R}minColumn(_){if(W(this,_),this.isEmpty())return NaN;let B=this.get(0,_);for(let R=1;R<this.rows;R++)this.get(R,_)<B&&(B=this.get(R,_));return B}minColumnIndex(_){W(this,_),ne(this);let B=this.get(0,_),R=[0,_];for(let j=1;j<this.rows;j++)this.get(j,_)<B&&(B=this.get(j,_),R[0]=j);return R}diag(){let _=Math.min(this.rows,this.columns),B=[];for(let R=0;R<_;R++)B.push(this.get(R,R));return B}norm(_="frobenius"){switch(_){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${_}`)}}cumulativeSum(){let _=0;for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)_+=this.get(B,R),this.set(B,R,_);return this}dot(_){rt.isMatrix(_)&&(_=_.to1DArray());let B=this.to1DArray();if(B.length!==_.length)throw new RangeError("vectors do not have the same size");let R=0;for(let j=0;j<B.length;j++)R+=B[j]*_[j];return R}mmul(_){_=Re.checkMatrix(_);let B=this.rows,R=this.columns,j=_.columns,Q=new Re(B,j),Ee=new Float64Array(R);for(let we=0;we<j;we++){for(let De=0;De<R;De++)Ee[De]=_.get(De,we);for(let De=0;De<B;De++){let ye=0;for(let Me=0;Me<R;Me++)ye+=this.get(De,Me)*Ee[Me];Q.set(De,we,ye)}}return Q}mpow(_){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger(_)||_<0)throw new RangeError("Exponent must be a non-negative integer");let B=Re.eye(this.rows),R=this;for(let j=_;j>=1;j/=2)j&1&&(B=B.mmul(R)),R=R.mmul(R);return B}strassen2x2(_){_=Re.checkMatrix(_);let B=new Re(2,2);const R=this.get(0,0),j=_.get(0,0),Q=this.get(0,1),Ee=_.get(0,1),we=this.get(1,0),De=_.get(1,0),ye=this.get(1,1),Me=_.get(1,1),Be=(R+ye)*(j+Me),He=(we+ye)*j,Ge=R*(Ee-Me),Ve=ye*(De-j),Ke=(R+Q)*Me,at=(we-R)*(j+Ee),Le=(Q-ye)*(De+Me),Qe=Be+Ve-Ke+Le,ut=Ge+Ke,bt=He+Ve,It=Be-He+Ge+at;return B.set(0,0,Qe),B.set(0,1,ut),B.set(1,0,bt),B.set(1,1,It),B}strassen3x3(_){_=Re.checkMatrix(_);let B=new Re(3,3);const R=this.get(0,0),j=this.get(0,1),Q=this.get(0,2),Ee=this.get(1,0),we=this.get(1,1),De=this.get(1,2),ye=this.get(2,0),Me=this.get(2,1),Be=this.get(2,2),He=_.get(0,0),Ge=_.get(0,1),Ve=_.get(0,2),Ke=_.get(1,0),at=_.get(1,1),Le=_.get(1,2),Qe=_.get(2,0),ut=_.get(2,1),bt=_.get(2,2),It=(R+j+Q-Ee-we-Me-Be)*at,Ct=(R-Ee)*(-Ge+at),_t=we*(-He+Ge+Ke-at-Le-Qe+bt),St=(-R+Ee+we)*(He-Ge+at),Bt=(Ee+we)*(-He+Ge),$e=R*He,xt=(-R+ye+Me)*(He-Ve+Le),Rt=(-R+ye)*(Ve-Le),Mt=(ye+Me)*(-He+Ve),rn=(R+j+Q-we-De-ye-Me)*Le,Ft=Me*(-He+Ve+Ke-at-Le-Qe+ut),Yt=(-Q+Me+Be)*(at+Qe-ut),qt=(Q-Be)*(at-ut),cn=Q*Qe,ln=(Me+Be)*(-Qe+ut),nn=(-Q+we+De)*(Le+Qe-bt),Pn=(Q-De)*(Le-bt),Nn=(we+De)*(-Qe+bt),hn=j*Ke,wn=De*ut,Zn=Ee*Ve,Wn=ye*Ge,Tn=Be*bt,nr=$e+cn+hn,En=It+St+Bt+$e+Yt+cn+ln,Kn=$e+xt+Mt+rn+cn+nn+Nn,kr=Ct+_t+St+$e+cn+nn+Pn,xi=Ct+St+Bt+$e+wn,ri=cn+nn+Pn+Nn+Zn,br=$e+xt+Rt+Ft+Yt+qt+cn,bi=Yt+qt+cn+ln+Wn,Cr=$e+xt+Rt+Mt+Tn;return B.set(0,0,nr),B.set(0,1,En),B.set(0,2,Kn),B.set(1,0,kr),B.set(1,1,xi),B.set(1,2,ri),B.set(2,0,br),B.set(2,1,bi),B.set(2,2,Cr),B}mmulStrassen(_){_=Re.checkMatrix(_);let B=this.clone(),R=B.rows,j=B.columns,Q=_.rows,Ee=_.columns;j!==Q&&console.warn(`Multiplying ${R} x ${j} and ${Q} x ${Ee} matrix: dimensions do not match.`);function we(Be,He,Ge){let Ve=Be.rows,Ke=Be.columns;if(Ve===He&&Ke===Ge)return Be;{let at=rt.zeros(He,Ge);return at=at.setSubMatrix(Be,0,0),at}}let De=Math.max(R,Q),ye=Math.max(j,Ee);B=we(B,De,ye),_=we(_,De,ye);function Me(Be,He,Ge,Ve){if(Ge<=512||Ve<=512)return Be.mmul(He);Ge%2===1&&Ve%2===1?(Be=we(Be,Ge+1,Ve+1),He=we(He,Ge+1,Ve+1)):Ge%2===1?(Be=we(Be,Ge+1,Ve),He=we(He,Ge+1,Ve)):Ve%2===1&&(Be=we(Be,Ge,Ve+1),He=we(He,Ge,Ve+1));let Ke=parseInt(Be.rows/2,10),at=parseInt(Be.columns/2,10),Le=Be.subMatrix(0,Ke-1,0,at-1),Qe=He.subMatrix(0,Ke-1,0,at-1),ut=Be.subMatrix(0,Ke-1,at,Be.columns-1),bt=He.subMatrix(0,Ke-1,at,He.columns-1),It=Be.subMatrix(Ke,Be.rows-1,0,at-1),Ct=He.subMatrix(Ke,He.rows-1,0,at-1),_t=Be.subMatrix(Ke,Be.rows-1,at,Be.columns-1),St=He.subMatrix(Ke,He.rows-1,at,He.columns-1),Bt=Me(rt.add(Le,_t),rt.add(Qe,St),Ke,at),$e=Me(rt.add(It,_t),Qe,Ke,at),xt=Me(Le,rt.sub(bt,St),Ke,at),Rt=Me(_t,rt.sub(Ct,Qe),Ke,at),Mt=Me(rt.add(Le,ut),St,Ke,at),rn=Me(rt.sub(It,Le),rt.add(Qe,bt),Ke,at),Ft=Me(rt.sub(ut,_t),rt.add(Ct,St),Ke,at),Yt=rt.add(Bt,Rt);Yt.sub(Mt),Yt.add(Ft);let qt=rt.add(xt,Mt),cn=rt.add($e,Rt),ln=rt.sub(Bt,$e);ln.add(xt),ln.add(rn);let nn=rt.zeros(2*Yt.rows,2*Yt.columns);return nn=nn.setSubMatrix(Yt,0,0),nn=nn.setSubMatrix(qt,Yt.rows,0),nn=nn.setSubMatrix(cn,0,Yt.columns),nn=nn.setSubMatrix(ln,Yt.rows,Yt.columns),nn.subMatrix(0,Ge-1,0,Ve-1)}return Me(B,_,De,ye)}scaleRows(_={}){if(typeof _!="object")throw new TypeError("options must be an object");const{min:B=0,max:R=1}=_;if(!Number.isFinite(B))throw new TypeError("min must be a number");if(!Number.isFinite(R))throw new TypeError("max must be a number");if(B>=R)throw new RangeError("min must be smaller than max");let j=new Re(this.rows,this.columns);for(let Q=0;Q<this.rows;Q++){const Ee=this.getRow(Q);Ee.length>0&&A(Ee,{min:B,max:R,output:Ee}),j.setRow(Q,Ee)}return j}scaleColumns(_={}){if(typeof _!="object")throw new TypeError("options must be an object");const{min:B=0,max:R=1}=_;if(!Number.isFinite(B))throw new TypeError("min must be a number");if(!Number.isFinite(R))throw new TypeError("max must be a number");if(B>=R)throw new RangeError("min must be smaller than max");let j=new Re(this.rows,this.columns);for(let Q=0;Q<this.columns;Q++){const Ee=this.getColumn(Q);Ee.length&&A(Ee,{min:B,max:R,output:Ee}),j.setColumn(Q,Ee)}return j}flipRows(){const _=Math.ceil(this.columns/2);for(let B=0;B<this.rows;B++)for(let R=0;R<_;R++){let j=this.get(B,R),Q=this.get(B,this.columns-1-R);this.set(B,R,Q),this.set(B,this.columns-1-R,j)}return this}flipColumns(){const _=Math.ceil(this.rows/2);for(let B=0;B<this.columns;B++)for(let R=0;R<_;R++){let j=this.get(R,B),Q=this.get(this.rows-1-R,B);this.set(R,B,Q),this.set(this.rows-1-R,B,j)}return this}kroneckerProduct(_){_=Re.checkMatrix(_);let B=this.rows,R=this.columns,j=_.rows,Q=_.columns,Ee=new Re(B*j,R*Q);for(let we=0;we<B;we++)for(let De=0;De<R;De++)for(let ye=0;ye<j;ye++)for(let Me=0;Me<Q;Me++)Ee.set(j*we+ye,Q*De+Me,this.get(we,De)*_.get(ye,Me));return Ee}kroneckerSum(_){if(_=Re.checkMatrix(_),!this.isSquare()||!_.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let B=this.rows,R=_.rows,j=this.kroneckerProduct(Re.eye(R,R)),Q=Re.eye(B,B).kroneckerProduct(_);return j.add(Q)}transpose(){let _=new Re(this.columns,this.rows);for(let B=0;B<this.rows;B++)for(let R=0;R<this.columns;R++)_.set(R,B,this.get(B,R));return _}sortRows(_=ft){for(let B=0;B<this.rows;B++)this.setRow(B,this.getRow(B).sort(_));return this}sortColumns(_=ft){for(let B=0;B<this.columns;B++)this.setColumn(B,this.getColumn(B).sort(_));return this}subMatrix(_,B,R,j){$(this,_,B,R,j);let Q=new Re(B-_+1,j-R+1);for(let Ee=_;Ee<=B;Ee++)for(let we=R;we<=j;we++)Q.set(Ee-_,we-R,this.get(Ee,we));return Q}subMatrixRow(_,B,R){if(B===void 0&&(B=0),R===void 0&&(R=this.columns-1),B>R||B<0||B>=this.columns||R<0||R>=this.columns)throw new RangeError("Argument out of range");let j=new Re(_.length,R-B+1);for(let Q=0;Q<_.length;Q++)for(let Ee=B;Ee<=R;Ee++){if(_[Q]<0||_[Q]>=this.rows)throw new RangeError(`Row index out of range: ${_[Q]}`);j.set(Q,Ee-B,this.get(_[Q],Ee))}return j}subMatrixColumn(_,B,R){if(B===void 0&&(B=0),R===void 0&&(R=this.rows-1),B>R||B<0||B>=this.rows||R<0||R>=this.rows)throw new RangeError("Argument out of range");let j=new Re(R-B+1,_.length);for(let Q=0;Q<_.length;Q++)for(let Ee=B;Ee<=R;Ee++){if(_[Q]<0||_[Q]>=this.columns)throw new RangeError(`Column index out of range: ${_[Q]}`);j.set(Ee-B,Q,this.get(Ee,_[Q]))}return j}setSubMatrix(_,B,R){if(_=Re.checkMatrix(_),_.isEmpty())return this;let j=B+_.rows-1,Q=R+_.columns-1;$(this,B,j,R,Q);for(let Ee=0;Ee<_.rows;Ee++)for(let we=0;we<_.columns;we++)this.set(B+Ee,R+we,_.get(Ee,we));return this}selection(_,B){J(this,_),ee(this,B);let R=new Re(_.length,B.length);for(let j=0;j<_.length;j++){let Q=_[j];for(let Ee=0;Ee<B.length;Ee++){let we=B[Ee];R.set(j,Ee,this.get(Q,we))}}return R}trace(){let _=Math.min(this.rows,this.columns),B=0;for(let R=0;R<_;R++)B+=this.get(R,R);return B}clone(){return this.constructor.copy(this,new Re(this.rows,this.columns))}static copy(_,B){for(const[R,j,Q]of _.entries())B.set(R,j,Q);return B}sum(_){switch(_){case"row":return ce(this);case"column":return ae(this);case void 0:return fe(this);default:throw new Error(`invalid option: ${_}`)}}product(_){switch(_){case"row":return oe(this);case"column":return pe(this);case void 0:return _e(this);default:throw new Error(`invalid option: ${_}`)}}mean(_){const B=this.sum(_);switch(_){case"row":{for(let R=0;R<this.rows;R++)B[R]/=this.columns;return B}case"column":{for(let R=0;R<this.columns;R++)B[R]/=this.rows;return B}case void 0:return B/this.size;default:throw new Error(`invalid option: ${_}`)}}variance(_,B={}){if(typeof _=="object"&&(B=_,_=void 0),typeof B!="object")throw new TypeError("options must be an object");const{unbiased:R=!0,mean:j=this.mean(_)}=B;if(typeof R!="boolean")throw new TypeError("unbiased must be a boolean");switch(_){case"row":{if(!g.isAnyArray(j))throw new TypeError("mean must be an array");return de(this,R,j)}case"column":{if(!g.isAnyArray(j))throw new TypeError("mean must be an array");return be(this,R,j)}case void 0:{if(typeof j!="number")throw new TypeError("mean must be a number");return Ae(this,R,j)}default:throw new Error(`invalid option: ${_}`)}}standardDeviation(_,B){typeof _=="object"&&(B=_,_=void 0);const R=this.variance(_,B);if(_===void 0)return Math.sqrt(R);for(let j=0;j<R.length;j++)R[j]=Math.sqrt(R[j]);return R}center(_,B={}){if(typeof _=="object"&&(B=_,_=void 0),typeof B!="object")throw new TypeError("options must be an object");const{center:R=this.mean(_)}=B;switch(_){case"row":{if(!g.isAnyArray(R))throw new TypeError("center must be an array");return Fe(this,R),this}case"column":{if(!g.isAnyArray(R))throw new TypeError("center must be an array");return Ue(this,R),this}case void 0:{if(typeof R!="number")throw new TypeError("center must be a number");return it(this,R),this}default:throw new Error(`invalid option: ${_}`)}}scale(_,B={}){if(typeof _=="object"&&(B=_,_=void 0),typeof B!="object")throw new TypeError("options must be an object");let R=B.scale;switch(_){case"row":{if(R===void 0)R=tt(this);else if(!g.isAnyArray(R))throw new TypeError("scale must be an array");return et(this,R),this}case"column":{if(R===void 0)R=vt(this);else if(!g.isAnyArray(R))throw new TypeError("scale must be an array");return dt(this,R),this}case void 0:{if(R===void 0)R=je(this);else if(typeof R!="number")throw new TypeError("scale must be a number");return nt(this,R),this}default:throw new Error(`invalid option: ${_}`)}}toString(_){return I(this,_)}[Symbol.iterator](){return this.entries()}*entries(){for(let _=0;_<this.rows;_++)for(let B=0;B<this.columns;B++)yield[_,B,this.get(_,B)]}*values(){for(let _=0;_<this.rows;_++)for(let B=0;B<this.columns;B++)yield this.get(_,B)}}rt.prototype.klass="Matrix",typeof Symbol!="undefined"&&(rt.prototype[Symbol.for("nodejs.util.inspect.custom")]=S);function ft(me,_){return me-_}function lt(me){return me.every(_=>typeof _=="number")}rt.random=rt.rand,rt.randomInt=rt.randInt,rt.diagonal=rt.diag,rt.prototype.diagonal=rt.prototype.diag,rt.identity=rt.eye,rt.prototype.negate=rt.prototype.neg,rt.prototype.tensorProduct=rt.prototype.kroneckerProduct;const wt=class Fp extends rt{constructor(_,B){if(super(),T(this,m),C(this,"data"),Fp.isMatrix(_))p(this,m,L).call(this,_.rows,_.columns),Fp.copy(_,this);else if(Number.isInteger(_)&&_>=0)p(this,m,L).call(this,_,B);else if(g.isAnyArray(_)){const R=_;if(_=R.length,B=_?R[0].length:0,typeof B!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let j=0;j<_;j++){if(R[j].length!==B)throw new RangeError("Inconsistent array dimensions");if(!lt(R[j]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(R[j]))}this.rows=_,this.columns=B}else throw new TypeError("First argument must be a positive number or an array")}set(_,B,R){return this.data[_][B]=R,this}get(_,B){return this.data[_][B]}removeRow(_){return k(this,_),this.data.splice(_,1),this.rows-=1,this}addRow(_,B){return B===void 0&&(B=_,_=this.rows),k(this,_,!0),B=Float64Array.from(z(this,B)),this.data.splice(_,0,B),this.rows+=1,this}removeColumn(_){W(this,_);for(let B=0;B<this.rows;B++){const R=new Float64Array(this.columns-1);for(let j=0;j<_;j++)R[j]=this.data[B][j];for(let j=_+1;j<this.columns;j++)R[j-1]=this.data[B][j];this.data[B]=R}return this.columns-=1,this}addColumn(_,B){typeof B=="undefined"&&(B=_,_=this.columns),W(this,_,!0),B=Z(this,B);for(let R=0;R<this.rows;R++){const j=new Float64Array(this.columns+1);let Q=0;for(;Q<_;Q++)j[Q]=this.data[R][Q];for(j[Q++]=B[R];Q<this.columns+1;Q++)j[Q]=this.data[R][Q-1];this.data[R]=j}return this.columns+=1,this}};m=new WeakSet,L=function(me,_){if(this.data=[],Number.isInteger(_)&&_>=0)for(let B=0;B<me;B++)this.data.push(new Float64Array(_));else throw new TypeError("nColumns must be a positive integer");this.rows=me,this.columns=_};let Re=wt;N(rt,Re);const We=class zp extends rt{constructor(_){if(super(),T(this,d),Re.isMatrix(_)){if(!_.isSymmetric())throw new TypeError("not symmetric data");x(this,d,Re.copy(_,new Re(_.rows,_.rows)))}else if(Number.isInteger(_)&&_>=0)x(this,d,new Re(_,_));else if(x(this,d,new Re(_)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return y(this,d).size}get rows(){return y(this,d).rows}get columns(){return y(this,d).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(_){return Re.isMatrix(_)&&_.klassType==="SymmetricMatrix"}static zeros(_){return new this(_)}static ones(_){return new this(_).fill(1)}clone(){const _=new zp(this.diagonalSize);for(const[B,R,j]of this.upperRightEntries())_.set(B,R,j);return _}toMatrix(){return new Re(this)}get(_,B){return y(this,d).get(_,B)}set(_,B,R){return y(this,d).set(_,B,R),y(this,d).set(B,_,R),this}removeCross(_){return y(this,d).removeRow(_),y(this,d).removeColumn(_),this}addCross(_,B){B===void 0&&(B=_,_=this.diagonalSize);const R=B.slice();return R.splice(_,1),y(this,d).addRow(_,R),y(this,d).addColumn(_,B),this}applyMask(_){if(_.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const B=[];for(const[R,j]of _.entries())j||B.push(R);B.reverse();for(const R of B)this.removeCross(R);return this}toCompact(){const{diagonalSize:_}=this,B=new Array(_*(_+1)/2);for(let R=0,j=0,Q=0;Q<B.length;Q++)B[Q]=this.get(j,R),++R>=_&&(R=++j);return B}static fromCompact(_){const B=_.length,R=(Math.sqrt(8*B+1)-1)/2;if(!Number.isInteger(R))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(_)}`);const j=new zp(R);for(let Q=0,Ee=0,we=0;we<B;we++)j.set(Q,Ee,_[we]),++Q>=R&&(Q=++Ee);return j}*upperRightEntries(){for(let _=0,B=0;_<this.diagonalSize;void 0){const R=this.get(_,B);yield[_,B,R],++B>=this.diagonalSize&&(B=++_)}}*upperRightValues(){for(let _=0,B=0;_<this.diagonalSize;void 0)yield this.get(_,B),++B>=this.diagonalSize&&(B=++_)}};d=new WeakMap;let Pe=We;Pe.prototype.klassType="SymmetricMatrix";class ke extends Pe{static isDistanceMatrix(_){return Pe.isSymmetricMatrix(_)&&_.klassSubType==="DistanceMatrix"}constructor(_){if(super(_),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(_,B,R){return _===B&&(R=0),super.set(_,B,R)}addCross(_,B){return B===void 0&&(B=_,_=this.diagonalSize),B=B.slice(),B[_]=0,super.addCross(_,B)}toSymmetricMatrix(){return new Pe(this)}clone(){const _=new ke(this.diagonalSize);for(const[B,R,j]of this.upperRightEntries())B!==R&&_.set(B,R,j);return _}toCompact(){const{diagonalSize:_}=this,B=(_-1)*_/2,R=new Array(B);for(let j=1,Q=0,Ee=0;Ee<R.length;Ee++)R[Ee]=this.get(Q,j),++j>=_&&(j=++Q+1);return R}static fromCompact(_){const B=_.length;if(B===0)return new this(0);const R=(Math.sqrt(8*B+1)+1)/2;if(!Number.isInteger(R))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(_)}`);const j=new this(R);for(let Q=1,Ee=0,we=0;we<B;we++)j.set(Q,Ee,_[we]),++Q>=R&&(Q=++Ee+1);return j}}ke.prototype.klassSubType="DistanceMatrix";class Ze extends rt{constructor(_,B,R){super(),this.matrix=_,this.rows=B,this.columns=R}}class Ie extends Ze{constructor(_,B){W(_,B),super(_,_.rows,1),this.column=B}set(_,B,R){return this.matrix.set(_,this.column,R),this}get(_){return this.matrix.get(_,this.column)}}class Ye extends Ze{constructor(_,B){ee(_,B),super(_,_.rows,B.length),this.columnIndices=B}set(_,B,R){return this.matrix.set(_,this.columnIndices[B],R),this}get(_,B){return this.matrix.get(_,this.columnIndices[B])}}class qe extends Ze{constructor(_){super(_,_.rows,_.columns)}set(_,B,R){return this.matrix.set(_,this.columns-B-1,R),this}get(_,B){return this.matrix.get(_,this.columns-B-1)}}class ot extends Ze{constructor(_){super(_,_.rows,_.columns)}set(_,B,R){return this.matrix.set(this.rows-_-1,B,R),this}get(_,B){return this.matrix.get(this.rows-_-1,B)}}class gt extends Ze{constructor(_,B){k(_,B),super(_,1,_.columns),this.row=B}set(_,B,R){return this.matrix.set(this.row,B,R),this}get(_,B){return this.matrix.get(this.row,B)}}class pt extends Ze{constructor(_,B){J(_,B),super(_,B.length,_.columns),this.rowIndices=B}set(_,B,R){return this.matrix.set(this.rowIndices[_],B,R),this}get(_,B){return this.matrix.get(this.rowIndices[_],B)}}class Lt extends Ze{constructor(_,B,R){J(_,B),ee(_,R),super(_,B.length,R.length),this.rowIndices=B,this.columnIndices=R}set(_,B,R){return this.matrix.set(this.rowIndices[_],this.columnIndices[B],R),this}get(_,B){return this.matrix.get(this.rowIndices[_],this.columnIndices[B])}}class Tt extends Ze{constructor(_,B,R,j,Q){$(_,B,R,j,Q),super(_,R-B+1,Q-j+1),this.startRow=B,this.startColumn=j}set(_,B,R){return this.matrix.set(this.startRow+_,this.startColumn+B,R),this}get(_,B){return this.matrix.get(this.startRow+_,this.startColumn+B)}}class Nt extends Ze{constructor(_){super(_,_.columns,_.rows)}set(_,B,R){return this.matrix.set(B,_,R),this}get(_,B){return this.matrix.get(B,_)}}class jt extends rt{constructor(_,B={}){const{rows:R=1}=B;if(_.length%R!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=R,this.columns=_.length/R,this.data=_}set(_,B,R){let j=this._calculateIndex(_,B);return this.data[j]=R,this}get(_,B){let R=this._calculateIndex(_,B);return this.data[R]}_calculateIndex(_,B){return _*this.columns+B}}class zt extends rt{constructor(_){super(),this.data=_,this.rows=_.length,this.columns=_[0].length}set(_,B,R){return this.data[_][B]=R,this}get(_,B){return this.data[_][B]}}function Ot(me,_){if(g.isAnyArray(me))return me[0]&&g.isAnyArray(me[0])?new zt(me):new jt(me,_);throw new Error("the argument is not an array")}class Kt{constructor(_){_=zt.checkMatrix(_);let B=_.clone(),R=B.rows,j=B.columns,Q=new Float64Array(R),Ee=1,we,De,ye,Me,Be,He,Ge,Ve,Ke;for(we=0;we<R;we++)Q[we]=we;for(Ve=new Float64Array(R),De=0;De<j;De++){for(we=0;we<R;we++)Ve[we]=B.get(we,De);for(we=0;we<R;we++){for(Ke=Math.min(we,De),Be=0,ye=0;ye<Ke;ye++)Be+=B.get(we,ye)*Ve[ye];Ve[we]-=Be,B.set(we,De,Ve[we])}for(Me=De,we=De+1;we<R;we++)Math.abs(Ve[we])>Math.abs(Ve[Me])&&(Me=we);if(Me!==De){for(ye=0;ye<j;ye++)He=B.get(Me,ye),B.set(Me,ye,B.get(De,ye)),B.set(De,ye,He);Ge=Q[Me],Q[Me]=Q[De],Q[De]=Ge,Ee=-Ee}if(De<R&&B.get(De,De)!==0)for(we=De+1;we<R;we++)B.set(we,De,B.get(we,De)/B.get(De,De))}this.LU=B,this.pivotVector=Q,this.pivotSign=Ee}isSingular(){let _=this.LU,B=_.columns;for(let R=0;R<B;R++)if(_.get(R,R)===0)return!0;return!1}solve(_){_=Re.checkMatrix(_);let B=this.LU;if(B.rows!==_.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let j=_.columns,Q=_.subMatrixRow(this.pivotVector,0,j-1),Ee=B.columns,we,De,ye;for(ye=0;ye<Ee;ye++)for(we=ye+1;we<Ee;we++)for(De=0;De<j;De++)Q.set(we,De,Q.get(we,De)-Q.get(ye,De)*B.get(we,ye));for(ye=Ee-1;ye>=0;ye--){for(De=0;De<j;De++)Q.set(ye,De,Q.get(ye,De)/B.get(ye,ye));for(we=0;we<ye;we++)for(De=0;De<j;De++)Q.set(we,De,Q.get(we,De)-Q.get(ye,De)*B.get(we,ye))}return Q}get determinant(){let _=this.LU;if(!_.isSquare())throw new Error("Matrix must be square");let B=this.pivotSign,R=_.columns;for(let j=0;j<R;j++)B*=_.get(j,j);return B}get lowerTriangularMatrix(){let _=this.LU,B=_.rows,R=_.columns,j=new Re(B,R);for(let Q=0;Q<B;Q++)for(let Ee=0;Ee<R;Ee++)Q>Ee?j.set(Q,Ee,_.get(Q,Ee)):Q===Ee?j.set(Q,Ee,1):j.set(Q,Ee,0);return j}get upperTriangularMatrix(){let _=this.LU,B=_.rows,R=_.columns,j=new Re(B,R);for(let Q=0;Q<B;Q++)for(let Ee=0;Ee<R;Ee++)Q<=Ee?j.set(Q,Ee,_.get(Q,Ee)):j.set(Q,Ee,0);return j}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function gn(me,_){let B=0;return Math.abs(me)>Math.abs(_)?(B=_/me,Math.abs(me)*Math.sqrt(1+B*B)):_!==0?(B=me/_,Math.abs(_)*Math.sqrt(1+B*B)):0}class $n{constructor(_){_=zt.checkMatrix(_);let B=_.clone(),R=_.rows,j=_.columns,Q=new Float64Array(j),Ee,we,De,ye;for(De=0;De<j;De++){let Me=0;for(Ee=De;Ee<R;Ee++)Me=gn(Me,B.get(Ee,De));if(Me!==0){for(B.get(De,De)<0&&(Me=-Me),Ee=De;Ee<R;Ee++)B.set(Ee,De,B.get(Ee,De)/Me);for(B.set(De,De,B.get(De,De)+1),we=De+1;we<j;we++){for(ye=0,Ee=De;Ee<R;Ee++)ye+=B.get(Ee,De)*B.get(Ee,we);for(ye=-ye/B.get(De,De),Ee=De;Ee<R;Ee++)B.set(Ee,we,B.get(Ee,we)+ye*B.get(Ee,De))}}Q[De]=-Me}this.QR=B,this.Rdiag=Q}solve(_){_=Re.checkMatrix(_);let B=this.QR,R=B.rows;if(_.rows!==R)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let j=_.columns,Q=_.clone(),Ee=B.columns,we,De,ye,Me;for(ye=0;ye<Ee;ye++)for(De=0;De<j;De++){for(Me=0,we=ye;we<R;we++)Me+=B.get(we,ye)*Q.get(we,De);for(Me=-Me/B.get(ye,ye),we=ye;we<R;we++)Q.set(we,De,Q.get(we,De)+Me*B.get(we,ye))}for(ye=Ee-1;ye>=0;ye--){for(De=0;De<j;De++)Q.set(ye,De,Q.get(ye,De)/this.Rdiag[ye]);for(we=0;we<ye;we++)for(De=0;De<j;De++)Q.set(we,De,Q.get(we,De)-Q.get(ye,De)*B.get(we,ye))}return Q.subMatrix(0,Ee-1,0,j-1)}isFullRank(){let _=this.QR.columns;for(let B=0;B<_;B++)if(this.Rdiag[B]===0)return!1;return!0}get upperTriangularMatrix(){let _=this.QR,B=_.columns,R=new Re(B,B),j,Q;for(j=0;j<B;j++)for(Q=0;Q<B;Q++)j<Q?R.set(j,Q,_.get(j,Q)):j===Q?R.set(j,Q,this.Rdiag[j]):R.set(j,Q,0);return R}get orthogonalMatrix(){let _=this.QR,B=_.rows,R=_.columns,j=new Re(B,R),Q,Ee,we,De;for(we=R-1;we>=0;we--){for(Q=0;Q<B;Q++)j.set(Q,we,0);for(j.set(we,we,1),Ee=we;Ee<R;Ee++)if(_.get(we,we)!==0){for(De=0,Q=we;Q<B;Q++)De+=_.get(Q,we)*j.get(Q,Ee);for(De=-De/_.get(we,we),Q=we;Q<B;Q++)j.set(Q,Ee,j.get(Q,Ee)+De*_.get(Q,we))}}return j}}class On{constructor(_,B={}){if(_=zt.checkMatrix(_),_.isEmpty())throw new Error("Matrix must be non-empty");let R=_.rows,j=_.columns;const{computeLeftSingularVectors:Q=!0,computeRightSingularVectors:Ee=!0,autoTranspose:we=!1}=B;let De=!!Q,ye=!!Ee,Me=!1,Be;if(R<j)if(!we)Be=_.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{Be=_.transpose(),R=Be.rows,j=Be.columns,Me=!0;let $e=De;De=ye,ye=$e}else Be=_.clone();let He=Math.min(R,j),Ge=Math.min(R+1,j),Ve=new Float64Array(Ge),Ke=new Re(R,He),at=new Re(j,j),Le=new Float64Array(j),Qe=new Float64Array(R),ut=new Float64Array(Ge);for(let $e=0;$e<Ge;$e++)ut[$e]=$e;let bt=Math.min(R-1,j),It=Math.max(0,Math.min(j-2,R)),Ct=Math.max(bt,It);for(let $e=0;$e<Ct;$e++){if($e<bt){Ve[$e]=0;for(let xt=$e;xt<R;xt++)Ve[$e]=gn(Ve[$e],Be.get(xt,$e));if(Ve[$e]!==0){Be.get($e,$e)<0&&(Ve[$e]=-Ve[$e]);for(let xt=$e;xt<R;xt++)Be.set(xt,$e,Be.get(xt,$e)/Ve[$e]);Be.set($e,$e,Be.get($e,$e)+1)}Ve[$e]=-Ve[$e]}for(let xt=$e+1;xt<j;xt++){if($e<bt&&Ve[$e]!==0){let Rt=0;for(let Mt=$e;Mt<R;Mt++)Rt+=Be.get(Mt,$e)*Be.get(Mt,xt);Rt=-Rt/Be.get($e,$e);for(let Mt=$e;Mt<R;Mt++)Be.set(Mt,xt,Be.get(Mt,xt)+Rt*Be.get(Mt,$e))}Le[xt]=Be.get($e,xt)}if(De&&$e<bt)for(let xt=$e;xt<R;xt++)Ke.set(xt,$e,Be.get(xt,$e));if($e<It){Le[$e]=0;for(let xt=$e+1;xt<j;xt++)Le[$e]=gn(Le[$e],Le[xt]);if(Le[$e]!==0){Le[$e+1]<0&&(Le[$e]=0-Le[$e]);for(let xt=$e+1;xt<j;xt++)Le[xt]/=Le[$e];Le[$e+1]+=1}if(Le[$e]=-Le[$e],$e+1<R&&Le[$e]!==0){for(let xt=$e+1;xt<R;xt++)Qe[xt]=0;for(let xt=$e+1;xt<R;xt++)for(let Rt=$e+1;Rt<j;Rt++)Qe[xt]+=Le[Rt]*Be.get(xt,Rt);for(let xt=$e+1;xt<j;xt++){let Rt=-Le[xt]/Le[$e+1];for(let Mt=$e+1;Mt<R;Mt++)Be.set(Mt,xt,Be.get(Mt,xt)+Rt*Qe[Mt])}}if(ye)for(let xt=$e+1;xt<j;xt++)at.set(xt,$e,Le[xt])}}let _t=Math.min(j,R+1);if(bt<j&&(Ve[bt]=Be.get(bt,bt)),R<_t&&(Ve[_t-1]=0),It+1<_t&&(Le[It]=Be.get(It,_t-1)),Le[_t-1]=0,De){for(let $e=bt;$e<He;$e++){for(let xt=0;xt<R;xt++)Ke.set(xt,$e,0);Ke.set($e,$e,1)}for(let $e=bt-1;$e>=0;$e--)if(Ve[$e]!==0){for(let xt=$e+1;xt<He;xt++){let Rt=0;for(let Mt=$e;Mt<R;Mt++)Rt+=Ke.get(Mt,$e)*Ke.get(Mt,xt);Rt=-Rt/Ke.get($e,$e);for(let Mt=$e;Mt<R;Mt++)Ke.set(Mt,xt,Ke.get(Mt,xt)+Rt*Ke.get(Mt,$e))}for(let xt=$e;xt<R;xt++)Ke.set(xt,$e,-Ke.get(xt,$e));Ke.set($e,$e,1+Ke.get($e,$e));for(let xt=0;xt<$e-1;xt++)Ke.set(xt,$e,0)}else{for(let xt=0;xt<R;xt++)Ke.set(xt,$e,0);Ke.set($e,$e,1)}}if(ye)for(let $e=j-1;$e>=0;$e--){if($e<It&&Le[$e]!==0)for(let xt=$e+1;xt<j;xt++){let Rt=0;for(let Mt=$e+1;Mt<j;Mt++)Rt+=at.get(Mt,$e)*at.get(Mt,xt);Rt=-Rt/at.get($e+1,$e);for(let Mt=$e+1;Mt<j;Mt++)at.set(Mt,xt,at.get(Mt,xt)+Rt*at.get(Mt,$e))}for(let xt=0;xt<j;xt++)at.set(xt,$e,0);at.set($e,$e,1)}let St=_t-1,Bt=Number.EPSILON;for(;_t>0;){let $e,xt;for($e=_t-2;$e>=-1&&$e!==-1;$e--){const Rt=Number.MIN_VALUE+Bt*Math.abs(Ve[$e]+Math.abs(Ve[$e+1]));if(Math.abs(Le[$e])<=Rt||Number.isNaN(Le[$e])){Le[$e]=0;break}}if($e===_t-2)xt=4;else{let Rt;for(Rt=_t-1;Rt>=$e&&Rt!==$e;Rt--){let Mt=(Rt!==_t?Math.abs(Le[Rt]):0)+(Rt!==$e+1?Math.abs(Le[Rt-1]):0);if(Math.abs(Ve[Rt])<=Bt*Mt){Ve[Rt]=0;break}}Rt===$e?xt=3:Rt===_t-1?xt=1:(xt=2,$e=Rt)}switch($e++,xt){case 1:{let Rt=Le[_t-2];Le[_t-2]=0;for(let Mt=_t-2;Mt>=$e;Mt--){let rn=gn(Ve[Mt],Rt),Ft=Ve[Mt]/rn,Yt=Rt/rn;if(Ve[Mt]=rn,Mt!==$e&&(Rt=-Yt*Le[Mt-1],Le[Mt-1]=Ft*Le[Mt-1]),ye)for(let qt=0;qt<j;qt++)rn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(Tn,hn,wn);if(wn=gn(Pn,Nn),wn===0&&(wn=Number.MIN_VALUE),Zn=Pn/wn,Wn=Nn/wn,Ve[hn]=wn,Pn=Zn*Le[hn]+Wn*Ve[hn+1],Ve[hn+1]=-Wn*Le[hn]+Zn*Ve[hn+1],Nn=Wn*Le[hn+1],Le[hn+1]=Zn*Le[hn+1],De&&hn<R-1)for(let Tn=0;Tn<R;Tn++)wn=Zn*Ke.get(Tn,hn)+Wn*Ke.get(Tn,hn+1),Ke.set(Tn,hn+1,-Wn*Ke.get(Tn,hn)+Zn*Ke.get(Tn,hn+1)),Ke.set(Tn,hn,wn)}Le[_t-2]=Pn;break}case 4:{if(Ve[$e]<=0&&(Ve[$e]=Ve[$e]<0?-Ve[$e]:0,ye))for(let Rt=0;Rt<=St;Rt++)at.set(Rt,$e,-at.get(Rt,$e));for(;$e<St&&!(Ve[$e]>=Ve[$e+1]);){let Rt=Ve[$e];if(Ve[$e]=Ve[$e+1],Ve[$e+1]=Rt,ye&&$e<j-1)for(let Mt=0;Mt<j;Mt++)Rt=at.get(Mt,$e+1),at.set(Mt,$e+1,at.get(Mt,$e)),at.set(Mt,$e,Rt);if(De&&$e<R-1)for(let Mt=0;Mt<R;Mt++)Rt=Ke.get(Mt,$e+1),Ke.set(Mt,$e+1,Ke.get(Mt,$e)),Ke.set(Mt,$e,Rt);$e++}_t--;break}}}if(Me){let $e=at;at=Ke,Ke=$e}this.m=R,this.n=j,this.s=Ve,this.U=Ke,this.V=at}solve(_){let B=_,R=this.threshold,j=this.s.length,Q=Re.zeros(j,j);for(let He=0;He<j;He++)Math.abs(this.s[He])<=R?Q.set(He,He,0):Q.set(He,He,1/this.s[He]);let Ee=this.U,we=this.rightSingularVectors,De=we.mmul(Q),ye=we.rows,Me=Ee.rows,Be=Re.zeros(ye,Me);for(let He=0;He<ye;He++)for(let Ge=0;Ge<Me;Ge++){let Ve=0;for(let Ke=0;Ke<j;Ke++)Ve+=De.get(He,Ke)*Ee.get(Ge,Ke);Be.set(He,Ge,Ve)}return Be.mmul(B)}solveForDiagonal(_){return this.solve(Re.diag(_))}inverse(){let _=this.V,B=this.threshold,R=_.rows,j=_.columns,Q=new Re(R,this.s.length);for(let Me=0;Me<R;Me++)for(let Be=0;Be<j;Be++)Math.abs(this.s[Be])>B&&Q.set(Me,Be,_.get(Me,Be)/this.s[Be]);let Ee=this.U,we=Ee.rows,De=Ee.columns,ye=new Re(R,we);for(let Me=0;Me<R;Me++)for(let Be=0;Be<we;Be++){let He=0;for(let Ge=0;Ge<De;Ge++)He+=Q.get(Me,Ge)*Ee.get(Be,Ge);ye.set(Me,Be,He)}return ye}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let _=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,B=0,R=this.s;for(let j=0,Q=R.length;j<Q;j++)R[j]>_&&B++;return B}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 Re.diag(this.s)}}function ir(me,_=!1){return me=zt.checkMatrix(me),_?new On(me).inverse():mr(me,Re.eye(me.rows))}function mr(me,_,B=!1){return me=zt.checkMatrix(me),_=zt.checkMatrix(_),B?new On(me).solve(_):me.isSquare()?new Kt(me).solve(_):new $n(me).solve(_)}function ar(me){if(me=Re.checkMatrix(me),me.isSquare()){if(me.columns===0)return 1;let _,B,R,j;if(me.columns===2)return _=me.get(0,0),B=me.get(0,1),R=me.get(1,0),j=me.get(1,1),_*j-B*R;if(me.columns===3){let Q,Ee,we;return Q=new Lt(me,[1,2],[1,2]),Ee=new Lt(me,[1,2],[0,2]),we=new Lt(me,[1,2],[0,1]),_=me.get(0,0),B=me.get(0,1),R=me.get(0,2),_*ar(Q)-B*ar(Ee)+R*ar(we)}else return new Kt(me).determinant}else throw Error("determinant can only be calculated for a square matrix")}function Vn(me,_){let B=[];for(let R=0;R<me;R++)R!==_&&B.push(R);return B}function Rr(me,_,B,R=1e-9,j=1e-9){if(me>j)return new Array(_.rows+1).fill(0);{let Q=_.addRow(B,[0]);for(let Ee=0;Ee<Q.rows;Ee++)Math.abs(Q.get(Ee,0))<R&&Q.set(Ee,0,0);return Q.to1DArray()}}function er(me,_={}){const{thresholdValue:B=1e-9,thresholdError:R=1e-9}=_;me=Re.checkMatrix(me);let j=me.rows,Q=new Re(j,j);for(let Ee=0;Ee<j;Ee++){let we=Re.columnVector(me.getRow(Ee)),De=me.subMatrixRow(Vn(j,Ee)).transpose(),Me=new On(De).solve(we),Be=Re.sub(we,De.mmul(Me)).abs().max();Q.setRow(Ee,Rr(Be,Me,Ee,B,R))}return Q}function an(me,_=Number.EPSILON){if(me=Re.checkMatrix(me),me.isEmpty())return me.transpose();let B=new On(me,{autoTranspose:!0}),R=B.leftSingularVectors,j=B.rightSingularVectors,Q=B.diagonal;for(let Ee=0;Ee<Q.length;Ee++)Math.abs(Q[Ee])>_?Q[Ee]=1/Q[Ee]:Q[Ee]=0;return j.mmul(Re.diag(Q).mmul(R.transpose()))}function $t(me,_=me,B={}){me=new Re(me);let R=!1;if(typeof _=="object"&&!Re.isMatrix(_)&&!g.isAnyArray(_)?(B=_,_=me,R=!0):_=new Re(_),me.rows!==_.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:j=!0}=B;j&&(me=me.center("column"),R||(_=_.center("column")));const Q=me.transpose().mmul(_);for(let Ee=0;Ee<Q.rows;Ee++)for(let we=0;we<Q.columns;we++)Q.set(Ee,we,Q.get(Ee,we)*(1/(me.rows-1)));return Q}function mn(me,_=me,B={}){me=new Re(me);let R=!1;if(typeof _=="object"&&!Re.isMatrix(_)&&!g.isAnyArray(_)?(B=_,_=me,R=!0):_=new Re(_),me.rows!==_.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:j=!0,scale:Q=!0}=B;j&&(me.center("column"),R||_.center("column")),Q&&(me.scale("column"),R||_.scale("column"));const Ee=me.standardDeviation("column",{unbiased:!0}),we=R?Ee:_.standardDeviation("column",{unbiased:!0}),De=me.transpose().mmul(_);for(let ye=0;ye<De.rows;ye++)for(let Me=0;Me<De.columns;Me++)De.set(ye,Me,De.get(ye,Me)*(1/(Ee[ye]*we[Me]))*(1/(me.rows-1)));return De}class Xt{constructor(_,B={}){const{assumeSymmetric:R=!1}=B;if(_=zt.checkMatrix(_),!_.isSquare())throw new Error("Matrix is not a square matrix");if(_.isEmpty())throw new Error("Matrix must be non-empty");let j=_.columns,Q=new Re(j,j),Ee=new Float64Array(j),we=new Float64Array(j),De=_,ye,Me,Be=!1;if(R?Be=!0:Be=_.isSymmetric(),Be){for(ye=0;ye<j;ye++)for(Me=0;Me<j;Me++)Q.set(ye,Me,De.get(ye,Me));Fn(j,we,Ee,Q),sr(j,we,Ee,Q)}else{let He=new Re(j,j),Ge=new Float64Array(j);for(Me=0;Me<j;Me++)for(ye=0;ye<j;ye++)He.set(ye,Me,De.get(ye,Me));Cn(j,He,Ge,Q),tr(j,we,Ee,Q,He)}this.n=j,this.e=we,this.d=Ee,this.V=Q}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let _=this.n,B=this.e,R=this.d,j=new Re(_,_),Q,Ee;for(Q=0;Q<_;Q++){for(Ee=0;Ee<_;Ee++)j.set(Q,Ee,0);j.set(Q,Q,R[Q]),B[Q]>0?j.set(Q,Q+1,B[Q]):B[Q]<0&&j.set(Q,Q-1,B[Q])}return j}}function Fn(me,_,B,R){let j,Q,Ee,we,De,ye,Me,Be;for(De=0;De<me;De++)B[De]=R.get(me-1,De);for(we=me-1;we>0;we--){for(Be=0,Ee=0,ye=0;ye<we;ye++)Be=Be+Math.abs(B[ye]);if(Be===0)for(_[we]=B[we-1],De=0;De<we;De++)B[De]=R.get(we-1,De),R.set(we,De,0),R.set(De,we,0);else{for(ye=0;ye<we;ye++)B[ye]/=Be,Ee+=B[ye]*B[ye];for(j=B[we-1],Q=Math.sqrt(Ee),j>0&&(Q=-Q),_[we]=Be*Q,Ee=Ee-j*Q,B[we-1]=j-Q,De=0;De<we;De++)_[De]=0;for(De=0;De<we;De++){for(j=B[De],R.set(De,we,j),Q=_[De]+R.get(De,De)*j,ye=De+1;ye<=we-1;ye++)Q+=R.get(ye,De)*B[ye],_[ye]+=R.get(ye,De)*j;_[De]=Q}for(j=0,De=0;De<we;De++)_[De]/=Ee,j+=_[De]*B[De];for(Me=j/(Ee+Ee),De=0;De<we;De++)_[De]-=Me*B[De];for(De=0;De<we;De++){for(j=B[De],Q=_[De],ye=De;ye<=we-1;ye++)R.set(ye,De,R.get(ye,De)-(j*_[ye]+Q*B[ye]));B[De]=R.get(we-1,De),R.set(we,De,0)}}B[we]=Ee}for(we=0;we<me-1;we++){if(R.set(me-1,we,R.get(we,we)),R.set(we,we,1),Ee=B[we+1],Ee!==0){for(ye=0;ye<=we;ye++)B[ye]=R.get(ye,we+1)/Ee;for(De=0;De<=we;De++){for(Q=0,ye=0;ye<=we;ye++)Q+=R.get(ye,we+1)*R.get(ye,De);for(ye=0;ye<=we;ye++)R.set(ye,De,R.get(ye,De)-Q*B[ye])}}for(ye=0;ye<=we;ye++)R.set(ye,we+1,0)}for(De=0;De<me;De++)B[De]=R.get(me-1,De),R.set(me-1,De,0);R.set(me-1,me-1,1),_[0]=0}function sr(me,_,B,R){let j,Q,Ee,we,De,ye,Me,Be,He,Ge,Ve,Ke,at,Le,Qe,ut;for(Ee=1;Ee<me;Ee++)_[Ee-1]=_[Ee];_[me-1]=0;let bt=0,It=0,Ct=Number.EPSILON;for(ye=0;ye<me;ye++){for(It=Math.max(It,Math.abs(B[ye])+Math.abs(_[ye])),Me=ye;Me<me&&!(Math.abs(_[Me])<=Ct*It);)Me++;if(Me>ye)do{for(j=B[ye],Be=(B[ye+1]-j)/(2*_[ye]),He=gn(Be,1),Be<0&&(He=-He),B[ye]=_[ye]/(Be+He),B[ye+1]=_[ye]*(Be+He),Ge=B[ye+1],Q=j-B[ye],Ee=ye+2;Ee<me;Ee++)B[Ee]-=Q;for(bt=bt+Q,Be=B[Me],Ve=1,Ke=Ve,at=Ve,Le=_[ye+1],Qe=0,ut=0,Ee=Me-1;Ee>=ye;Ee--)for(at=Ke,Ke=Ve,ut=Qe,j=Ve*_[Ee],Q=Ve*Be,He=gn(Be,_[Ee]),_[Ee+1]=Qe*He,Qe=_[Ee]/He,Ve=Be/He,Be=Ve*B[Ee]-Qe*j,B[Ee+1]=Q+Qe*(Ve*j+Qe*B[Ee]),De=0;De<me;De++)Q=R.get(De,Ee+1),R.set(De,Ee+1,Qe*R.get(De,Ee)+Ve*Q),R.set(De,Ee,Ve*R.get(De,Ee)-Qe*Q);Be=-Qe*ut*at*Le*_[ye]/Ge,_[ye]=Qe*Be,B[ye]=Ve*Be}while(Math.abs(_[ye])>Ct*It);B[ye]=B[ye]+bt,_[ye]=0}for(Ee=0;Ee<me-1;Ee++){for(De=Ee,Be=B[Ee],we=Ee+1;we<me;we++)B[we]<Be&&(De=we,Be=B[we]);if(De!==Ee)for(B[De]=B[Ee],B[Ee]=Be,we=0;we<me;we++)Be=R.get(we,Ee),R.set(we,Ee,R.get(we,De)),R.set(we,De,Be)}}function Cn(me,_,B,R){let j=0,Q=me-1,Ee,we,De,ye,Me,Be,He;for(Be=j+1;Be<=Q-1;Be++){for(He=0,ye=Be;ye<=Q;ye++)He=He+Math.abs(_.get(ye,Be-1));if(He!==0){for(De=0,ye=Q;ye>=Be;ye--)B[ye]=_.get(ye,Be-1)/He,De+=B[ye]*B[ye];for(we=Math.sqrt(De),B[Be]>0&&(we=-we),De=De-B[Be]*we,B[Be]=B[Be]-we,Me=Be;Me<me;Me++){for(Ee=0,ye=Q;ye>=Be;ye--)Ee+=B[ye]*_.get(ye,Me);for(Ee=Ee/De,ye=Be;ye<=Q;ye++)_.set(ye,Me,_.get(ye,Me)-Ee*B[ye])}for(ye=0;ye<=Q;ye++){for(Ee=0,Me=Q;Me>=Be;Me--)Ee+=B[Me]*_.get(ye,Me);for(Ee=Ee/De,Me=Be;Me<=Q;Me++)_.set(ye,Me,_.get(ye,Me)-Ee*B[Me])}B[Be]=He*B[Be],_.set(Be,Be-1,He*we)}}for(ye=0;ye<me;ye++)for(Me=0;Me<me;Me++)R.set(ye,Me,ye===Me?1:0);for(Be=Q-1;Be>=j+1;Be--)if(_.get(Be,Be-1)!==0){for(ye=Be+1;ye<=Q;ye++)B[ye]=_.get(ye,Be-1);for(Me=Be;Me<=Q;Me++){for(we=0,ye=Be;ye<=Q;ye++)we+=B[ye]*R.get(ye,Me);for(we=we/B[Be]/_.get(Be,Be-1),ye=Be;ye<=Q;ye++)R.set(ye,Me,R.get(ye,Me)+we*B[ye])}}}function tr(me,_,B,R,j){let Q=me-1,Ee=0,we=me-1,De=Number.EPSILON,ye=0,Me=0,Be=0,He=0,Ge=0,Ve=0,Ke=0,at=0,Le,Qe,ut,bt,It,Ct,_t,St,Bt,$e,xt,Rt,Mt,rn,Ft;for(Le=0;Le<me;Le++)for((Le<Ee||Le>we)&&(B[Le]=j.get(Le,Le),_[Le]=0),Qe=Math.max(Le-1,0);Qe<me;Qe++)Me=Me+Math.abs(j.get(Le,Qe));for(;Q>=Ee;){for(bt=Q;bt>Ee&&(Ve=Math.abs(j.get(bt-1,bt-1))+Math.abs(j.get(bt,bt)),Ve===0&&(Ve=Me),!(Math.abs(j.get(bt,bt-1))<De*Ve));)bt--;if(bt===Q)j.set(Q,Q,j.get(Q,Q)+ye),B[Q]=j.get(Q,Q),_[Q]=0,Q--,at=0;else if(bt===Q-1){if(_t=j.get(Q,Q-1)*j.get(Q-1,Q),Be=(j.get(Q-1,Q-1)-j.get(Q,Q))/2,He=Be*Be+_t,Ke=Math.sqrt(Math.abs(He)),j.set(Q,Q,j.get(Q,Q)+ye),j.set(Q-1,Q-1,j.get(Q-1,Q-1)+ye),St=j.get(Q,Q),He>=0){for(Ke=Be>=0?Be+Ke:Be-Ke,B[Q-1]=St+Ke,B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abs(Be)+Math.abs(He)+Math.abs(Ge),Be=Be/Ve,He=He/Ve,Ge=Ge/Ve,!(It===bt||Math.abs(j.get(It,It-1))*(Math.abs(He)+Math.abs(Ge))<De*(Math.abs(Be)*(Math.abs(j.get(It-1,It-1))+Math.abs(Ke)+Math.abs(j.get(It+1,It+1))))));)It--;for(Le=It+2;Le<=Q;Le++)j.set(Le,Le-2,0),Le>It+2&&j.set(Le,Le-3,0);for(ut=It;ut<=Q-1&&(rn=ut!==Q-1,ut!==It&&(Be=j.get(ut,ut-1),He=j.get(ut+1,ut-1),Ge=rn?j.get(ut+2,ut-1):0,St=Math.abs(Be)+Math.abs(He)+Math.abs(Ge),St!==0&&(Be=Be/St,He=He/St,Ge=Ge/St)),St!==0);ut++)if(Ve=Math.sqrt(Be*Be+He*He+Ge*Ge),Be<0&&(Ve=-Ve),Ve!==0){for(ut!==It?j.set(ut,ut-1,-Ve*St):bt!==It&&j.set(ut,ut-1,-j.get(ut,ut-1)),Be=Be+Ve,St=Be/Ve,Bt=He/Ve,Ke=Ge/Ve,He=He/Be,Ge=Ge/Be,Qe=ut;Qe<me;Qe++)Be=j.get(ut,Qe)+He*j.get(ut+1,Qe),rn&&(Be=Be+Ge*j.get(ut+2,Qe),j.set(ut+2,Qe,j.get(ut+2,Qe)-Be*Ke)),j.set(ut,Qe,j.get(ut,Qe)-Be*St),j.set(ut+1,Qe,j.get(ut+1,Qe)-Be*Bt);for(Le=0;Le<=Math.min(Q,ut+3);Le++)Be=St*j.get(Le,ut)+Bt*j.get(Le,ut+1),rn&&(Be=Be+Ke*j.get(Le,ut+2),j.set(Le,ut+2,j.get(Le,ut+2)-Be*Ge)),j.set(Le,ut,j.get(Le,ut)-Be),j.set(Le,ut+1,j.get(Le,ut+1)-Be*He);for(Le=Ee;Le<=we;Le++)Be=St*R.get(Le,ut)+Bt*R.get(Le,ut+1),rn&&(Be=Be+Ke*R.get(Le,ut+2),R.set(Le,ut+2,R.get(Le,ut+2)-Be*Ge)),R.set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Le+1),Bt=j.get(Le+1,Le),Rt=(B[Le]-Be)*(B[Le]-Be)+_[Le]*_[Le]-He*He,Mt=(B[Le]-Be)*2*He,Rt===0&&Mt===0&&(Rt=De*Me*(Math.abs(_t)+Math.abs(He)+Math.abs(St)+Math.abs(Bt)+Math.abs(Ke))),Ft=lr(St*Ge-Ke*$e+He*xt,St*Ve-Ke*xt-He*$e,Rt,Mt),j.set(Le,Q-1,Ft[0]),j.set(Le,Q,Ft[1]),Math.abs(St)>Math.abs(Ke)+Math.abs(He)?(j.set(Le+1,Q-1,(-$e-_t*j.get(Le,Q-1)+He*j.get(Le,Q))/St),j.set(Le+1,Q,(-xt-_t*j.get(Le,Q)-He*j.get(Le,Q-1))/St)):(Ft=lr(-Ge-Bt*j.get(Le,Q-1),-Ve-Bt*j.get(Le,Q),Ke,He),j.set(Le+1,Q-1,Ft[0]),j.set(Le+1,Q,Ft[1]))),Ct=Math.max(Math.abs(j.get(Le,Q-1)),Math.abs(j.get(Le,Q))),De*Ct*Ct>1)for(Qe=Le;Qe<=Q;Qe++)j.set(Qe,Q-1,j.get(Qe,Q-1)/Ct),j.set(Qe,Q,j.get(Qe,Q)/Ct)}for(Le=0;Le<me;Le++)if(Le<Ee||Le>we)for(Qe=Le;Qe<me;Qe++)R.set(Le,Qe,j.get(Le,Qe));for(Qe=me-1;Qe>=Ee;Qe--)for(Le=Ee;Le<=we;Le++){for(Ke=0,ut=Ee;ut<=Math.min(Qe,we);ut++)Ke=Ke+R.get(Le,ut)*j.get(ut,Qe);R.set(Le,Qe,Ke)}}}function lr(me,_,B,R){let j,Q;return Math.abs(B)>Math.abs(R)?(j=R/B,Q=B+j*R,[(me+j*_)/Q,(_-j*me)/Q]):(j=B/R,Q=R+j*B,[(j*me+_)/Q,(j*_-me)/Q])}class or{constructor(_){if(_=zt.checkMatrix(_),!_.isSymmetric())throw new Error("Matrix is not symmetric");let B=_,R=B.rows,j=new Re(R,R),Q=!0,Ee,we,De;for(we=0;we<R;we++){let ye=0;for(De=0;De<we;De++){let Me=0;for(Ee=0;Ee<De;Ee++)Me+=j.get(De,Ee)*j.get(we,Ee);Me=(B.get(we,De)-Me)/j.get(De,De),j.set(we,De,Me),ye=ye+Me*Me}for(ye=B.get(we,we)-ye,Q&&(Q=ye>0),j.set(we,we,Math.sqrt(Math.max(ye,0))),De=we+1;De<R;De++)j.set(we,De,0)}this.L=j,this.positiveDefinite=Q}isPositiveDefinite(){return this.positiveDefinite}solve(_){_=zt.checkMatrix(_);let B=this.L,R=B.rows;if(_.rows!==R)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let j=_.columns,Q=_.clone(),Ee,we,De;for(De=0;De<R;De++)for(we=0;we<j;we++){for(Ee=0;Ee<De;Ee++)Q.set(De,we,Q.get(De,we)-Q.get(Ee,we)*B.get(De,Ee));Q.set(De,we,Q.get(De,we)/B.get(De,De))}for(De=R-1;De>=0;De--)for(we=0;we<j;we++){for(Ee=De+1;Ee<R;Ee++)Q.set(De,we,Q.get(De,we)-Q.get(Ee,we)*B.get(Ee,De));Q.set(De,we,Q.get(De,we)/B.get(De,De))}return Q}get lowerTriangularMatrix(){return this.L}}class Ut{constructor(_,B={}){_=zt.checkMatrix(_);let{Y:R}=B;const{scaleScores:j=!1,maxIterations:Q=1e3,terminationCriteria:Ee=1e-10}=B;let we;if(R){if(g.isAnyArray(R)&&typeof R[0]=="number"?R=Re.columnVector(R):R=zt.checkMatrix(R),R.rows!==_.rows)throw new Error("Y should have the same number of rows as X");we=R.getColumnVector(0)}else we=_.getColumnVector(0);let De=1,ye,Me,Be,He;for(let Ge=0;Ge<Q&&De>Ee;Ge++)Be=_.transpose().mmul(we).div(we.transpose().mmul(we).get(0,0)),Be=Be.div(Be.norm()),ye=_.mmul(Be).div(Be.transpose().mmul(Be).get(0,0)),Ge>0&&(De=ye.clone().sub(He).pow(2).sum()),He=ye.clone(),R?(Me=R.transpose().mmul(ye).div(ye.transpose().mmul(ye).get(0,0)),Me=Me.div(Me.norm()),we=R.mmul(Me).div(Me.transpose().mmul(Me).get(0,0))):we=ye;if(R){let Ge=_.transpose().mmul(ye).div(ye.transpose().mmul(ye).get(0,0));Ge=Ge.div(Ge.norm());let Ve=_.clone().sub(ye.clone().mmul(Ge.transpose())),Ke=we.transpose().mmul(ye).div(ye.transpose().mmul(ye).get(0,0)),at=R.clone().sub(ye.clone().mulS(Ke.get(0,0)).mmul(Me.transpose()));this.t=ye,this.p=Ge.transpose(),this.w=Be.transpose(),this.q=Me,this.u=we,this.s=ye.transpose().mmul(ye),this.xResidual=Ve,this.yResidual=at,this.betas=Ke}else this.w=Be.transpose(),this.s=ye.transpose().mmul(ye).sqrt(),j?this.t=ye.clone().div(this.s.get(0,0)):this.t=ye,this.xResidual=_.sub(ye.mmul(Be.transpose()))}}Ce.XA=rt,Ce.a_=or,Ce.yQ=or,Ce.Hs=ke,Ce.Ec=Xt,Ce.dx=Xt,Ce.LU=Kt,Ce.Rm=Kt,Ce.y3=Re,Ce.qK=Ye,Ce.pb=Ie,Ce.j=qe,Ce.sO=ot,Ce.BZ=pt,Ce.EK=gt,Ce.Db=Lt,Ce.Fx=Tt,Ce.tU=Nt,Ce.Ym=Ut,Ce.rs=Ut,Ce.QR=$n,Ce.TB=$n,Ce.oH=On,Ce.Sc=On,Ce.BN=Pe,Ce.it=jt,Ce.$r=zt,Ce.QM=mn,Ce.AV=$t,X=Re,Ce.GH=ar,Ce.SO=ir,Ce.uZ=er,Ce.yU=an,Ce.F1=mr,Ce.re=Ot},45411:function(Se){"use strict";Se.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(Se,Ce,Y){var X=Y(45411),re=Y(75029),V=Object.hasOwnProperty,b=Object.create(null);for(var U in X)V.call(X,U)&&(b[X[U]]=U);var C=Se.exports={to:{},get:{}};C.get=function(T){var x=T.substring(0,3).toLowerCase(),p,m;switch(x){case"hsl":p=C.get.hsl(T),m="hsl";break;case"hwb":p=C.get.hwb(T),m="hwb";break;default:p=C.get.rgb(T),m="rgb";break}return p?{model:m,value:p}:null},C.get.rgb=function(T){if(!T)return null;var x=/^#([a-f0-9]{3,4})$/i,p=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,m=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,L=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,d=/^(\w+)$/,g=[0,0,0,1],A,M,O;if(A=T.match(p)){for(O=A[2],A=A[1],M=0;M<3;M++){var S=M*2;g[M]=parseInt(A.slice(S,S+2),16)}O&&(g[3]=parseInt(O,16)/255)}else if(A=T.match(x)){for(A=A[1],O=A[3],M=0;M<3;M++)g[M]=parseInt(A[M]+A[M],16);O&&(g[3]=parseInt(O+O,16)/255)}else if(A=T.match(m)){for(M=0;M<3;M++)g[M]=parseInt(A[M+1],0);A[4]&&(A[5]?g[3]=parseFloat(A[4])*.01:g[3]=parseFloat(A[4]))}else if(A=T.match(L)){for(M=0;M<3;M++)g[M]=Math.round(parseFloat(A[M+1])*2.55);A[4]&&(A[5]?g[3]=parseFloat(A[4])*.01:g[3]=parseFloat(A[4]))}else return(A=T.match(d))?A[1]==="transparent"?[0,0,0,0]:V.call(X,A[1])?(g=X[A[1]],g[3]=1,g):null:null;for(M=0;M<3;M++)g[M]=w(g[M],0,255);return g[3]=w(g[3],0,1),g},C.get.hsl=function(T){if(!T)return null;var x=/^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*)?\)$/,p=T.match(x);if(p){var m=parseFloat(p[4]),L=(parseFloat(p[1])%360+360)%360,d=w(parseFloat(p[2]),0,100),g=w(parseFloat(p[3]),0,100),A=w(isNaN(m)?1:m,0,1);return[L,d,g,A]}return null},C.get.hwb=function(T){if(!T)return null;var x=/^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*)?\)$/,p=T.match(x);if(p){var m=parseFloat(p[4]),L=(parseFloat(p[1])%360+360)%360,d=w(parseFloat(p[2]),0,100),g=w(parseFloat(p[3]),0,100),A=w(isNaN(m)?1:m,0,1);return[L,d,g,A]}return null},C.to.hex=function(){var T=re(arguments);return"#"+y(T[0])+y(T[1])+y(T[2])+(T[3]<1?y(Math.round(T[3]*255)):"")},C.to.rgb=function(){var T=re(arguments);return T.length<4||T[3]===1?"rgb("+Math.round(T[0])+", "+Math.round(T[1])+", "+Math.round(T[2])+")":"rgba("+Math.round(T[0])+", "+Math.round(T[1])+", "+Math.round(T[2])+", "+T[3]+")"},C.to.rgb.percent=function(){var T=re(arguments),x=Math.round(T[0]/255*100),p=Math.round(T[1]/255*100),m=Math.round(T[2]/255*100);return T.length<4||T[3]===1?"rgb("+x+"%, "+p+"%, "+m+"%)":"rgba("+x+"%, "+p+"%, "+m+"%, "+T[3]+")"},C.to.hsl=function(){var T=re(arguments);return T.length<4||T[3]===1?"hsl("+T[0]+", "+T[1]+"%, "+T[2]+"%)":"hsla("+T[0]+", "+T[1]+"%, "+T[2]+"%, "+T[3]+")"},C.to.hwb=function(){var T=re(arguments),x="";return T.length>=4&&T[3]!==1&&(x=", "+T[3]),"hwb("+T[0]+", "+T[1]+"%, "+T[2]+"%"+x+")"},C.to.keyword=function(T){return b[T.slice(0,3)]};function w(T,x,p){return Math.min(Math.max(x,T),p)}function y(T){var x=Math.round(T).toString(16).toUpperCase();return x.length<2?"0"+x:x}},92546:function(Se,Ce,Y){Se.exports={graphlib:Y(76626),layout:Y(47194),debug:Y(11303),util:{time:Y(53063).time,notime:Y(53063).notime},version:Y(11897)}},81255:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(39240);Se.exports={run:V,undo:U};function V(C){var w=C.graph().acyclicer==="greedy"?re(C,y(C)):b(C);X.forEach(w,function(T){var x=C.edge(T);C.removeEdge(T),x.forwardName=T.name,x.reversed=!0,C.setEdge(T.w,T.v,x,X.uniqueId("rev"))});function y(T){return function(x){return T.edge(x).weight}}}function b(C){var w=[],y={},T={};function x(p){X.has(T,p)||(T[p]=!0,y[p]=!0,X.forEach(C.outEdges(p),function(m){X.has(y,m.w)?w.push(m):x(m.w)}),delete y[p])}return X.forEach(C.nodes(),x),w}function U(C){X.forEach(C.edges(),function(w){var y=C.edge(w);if(y.reversed){C.removeEdge(w);var T=y.forwardName;delete y.reversed,delete y.forwardName,C.setEdge(w.w,w.v,y,T)}})}},60765:function(Se,Ce,Y){var X=Y(72361),re=Y(53063);Se.exports=V;function V(U){function C(w){var y=U.children(w),T=U.node(w);if(y.length&&X.forEach(y,C),X.has(T,"minRank")){T.borderLeft=[],T.borderRight=[];for(var x=T.minRank,p=T.maxRank+1;x<p;++x)b(U,"borderLeft","_bl",w,T,x),b(U,"borderRight","_br",w,T,x)}}X.forEach(U.children(),C)}function b(U,C,w,y,T,x){var p={width:0,height:0,rank:x,borderType:C},m=T[C][x-1],L=re.addDummyNode(U,"border",p,w);T[C][x]=L,U.setParent(L,y),m&&U.setEdge(m,L,{weight:1})}},13257:function(Se,Ce,Y){"use strict";var X=Y(72361);Se.exports={adjust:re,undo:V};function re(x){var p=x.graph().rankdir.toLowerCase();(p==="lr"||p==="rl")&&b(x)}function V(x){var p=x.graph().rankdir.toLowerCase();(p==="bt"||p==="rl")&&C(x),(p==="lr"||p==="rl")&&(y(x),b(x))}function b(x){X.forEach(x.nodes(),function(p){U(x.node(p))}),X.forEach(x.edges(),function(p){U(x.edge(p))})}function U(x){var p=x.width;x.width=x.height,x.height=p}function C(x){X.forEach(x.nodes(),function(p){w(x.node(p))}),X.forEach(x.edges(),function(p){var m=x.edge(p);X.forEach(m.points,w),X.has(m,"y")&&w(m)})}function w(x){x.y=-x.y}function y(x){X.forEach(x.nodes(),function(p){T(x.node(p))}),X.forEach(x.edges(),function(p){var m=x.edge(p);X.forEach(m.points,T),X.has(m,"x")&&T(m)})}function T(x){var p=x.x;x.x=x.y,x.y=p}},21135:function(Se){Se.exports=Ce;function Ce(){var re={};re._next=re._prev=re,this._sentinel=re}Ce.prototype.dequeue=function(){var re=this._sentinel,V=re._prev;if(V!==re)return Y(V),V},Ce.prototype.enqueue=function(re){var V=this._sentinel;re._prev&&re._next&&Y(re),re._next=V._next,V._next._prev=re,V._next=re,re._prev=V},Ce.prototype.toString=function(){for(var re=[],V=this._sentinel,b=V._prev;b!==V;)re.push(JSON.stringify(b,X)),b=b._prev;return"["+re.join(", ")+"]"};function Y(re){re._prev._next=re._next,re._next._prev=re._prev,delete re._next,delete re._prev}function X(re,V){if(re!=="_next"&&re!=="_prev")return V}},11303:function(Se,Ce,Y){var X=Y(72361),re=Y(53063),V=Y(76626).Graph;Se.exports={debugOrdering:b};function b(U){var C=re.buildLayerMatrix(U),w=new V({compound:!0,multigraph:!0}).setGraph({});return X.forEach(U.nodes(),function(y){w.setNode(y,{label:y}),w.setParent(y,"layer"+U.node(y).rank)}),X.forEach(U.edges(),function(y){w.setEdge(y.v,y.w,{},y.name)}),X.forEach(C,function(y,T){var x="layer"+T;w.setNode(x,{rank:"same"}),X.reduce(y,function(p,m){return w.setEdge(p,m,{style:"invis"}),m})}),w}},76626:function(Se,Ce,Y){var X;try{X=Y(75172)}catch(re){}X||(X=window.graphlib),Se.exports=X},39240:function(Se,Ce,Y){var X=Y(72361),re=Y(76626).Graph,V=Y(21135);Se.exports=U;var b=X.constant(1);function U(x,p){if(x.nodeCount()<=1)return[];var m=y(x,p||b),L=C(m.graph,m.buckets,m.zeroIdx);return X.flatten(X.map(L,function(d){return x.outEdges(d.v,d.w)}),!0)}function C(x,p,m){for(var L=[],d=p[p.length-1],g=p[0],A;x.nodeCount();){for(;A=g.dequeue();)w(x,p,m,A);for(;A=d.dequeue();)w(x,p,m,A);if(x.nodeCount()){for(var M=p.length-2;M>0;--M)if(A=p[M].dequeue(),A){L=L.concat(w(x,p,m,A,!0));break}}}return L}function w(x,p,m,L,d){var g=d?[]:void 0;return X.forEach(x.inEdges(L.v),function(A){var M=x.edge(A),O=x.node(A.v);d&&g.push({v:A.v,w:A.w}),O.out-=M,T(p,m,O)}),X.forEach(x.outEdges(L.v),function(A){var M=x.edge(A),O=A.w,S=x.node(O);S.in-=M,T(p,m,S)}),x.removeNode(L.v),g}function y(x,p){var m=new re,L=0,d=0;X.forEach(x.nodes(),function(M){m.setNode(M,{v:M,in:0,out:0})}),X.forEach(x.edges(),function(M){var O=m.edge(M.v,M.w)||0,S=p(M),I=O+S;m.setEdge(M.v,M.w,I),d=Math.max(d,m.node(M.v).out+=S),L=Math.max(L,m.node(M.w).in+=S)});var g=X.range(d+L+3).map(function(){return new V}),A=L+1;return X.forEach(m.nodes(),function(M){T(g,A,m.node(M))}),{graph:m,buckets:g,zeroIdx:A}}function T(x,p,m){m.out?m.in?x[m.out-m.in+p].enqueue(m):x[x.length-1].enqueue(m):x[0].enqueue(m)}},47194:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(81255),V=Y(27163),b=Y(64505),U=Y(53063).normalizeRanks,C=Y(71970),w=Y(53063).removeEmptyRanks,y=Y(31733),T=Y(60765),x=Y(13257),p=Y(62852),m=Y(93021),L=Y(53063),d=Y(76626).Graph;Se.exports=g;function g(de,be){var Ae=be&&be.debugTiming?L.time:L.notime;Ae("layout",function(){var Fe=Ae(" buildLayoutGraph",function(){return W(de)});Ae(" runLayout",function(){A(Fe,Ae)}),Ae(" updateInputGraph",function(){M(de,Fe)})})}function A(de,be){be(" makeSpaceForEdgeLabels",function(){z(de)}),be(" removeSelfEdges",function(){ae(de)}),be(" acyclic",function(){re.run(de)}),be(" nestingGraph.run",function(){y.run(de)}),be(" rank",function(){b(L.asNonCompoundGraph(de))}),be(" injectEdgeLabelProxies",function(){Z(de)}),be(" removeEmptyRanks",function(){w(de)}),be(" nestingGraph.cleanup",function(){y.cleanup(de)}),be(" normalizeRanks",function(){U(de)}),be(" assignRankMinMax",function(){J(de)}),be(" removeEdgeLabelProxies",function(){ee(de)}),be(" normalize.run",function(){V.run(de)}),be(" parentDummyChains",function(){C(de)}),be(" addBorderSegments",function(){T(de)}),be(" order",function(){p(de)}),be(" insertSelfEdges",function(){fe(de)}),be(" adjustCoordinateSystem",function(){x.adjust(de)}),be(" position",function(){m(de)}),be(" positionSelfEdges",function(){oe(de)}),be(" removeBorderNodes",function(){ce(de)}),be(" normalize.undo",function(){V.undo(de)}),be(" fixupEdgeLabelCoords",function(){se(de)}),be(" undoCoordinateSystem",function(){x.undo(de)}),be(" translateGraph",function(){$(de)}),be(" assignNodeIntersects",function(){ie(de)}),be(" reversePoints",function(){ne(de)}),be(" acyclic.undo",function(){re.undo(de)})}function M(de,be){X.forEach(de.nodes(),function(Ae){var Fe=de.node(Ae),Ue=be.node(Ae);Fe&&(Fe.x=Ue.x,Fe.y=Ue.y,be.children(Ae).length&&(Fe.width=Ue.width,Fe.height=Ue.height))}),X.forEach(de.edges(),function(Ae){var Fe=de.edge(Ae),Ue=be.edge(Ae);Fe.points=Ue.points,X.has(Ue,"x")&&(Fe.x=Ue.x,Fe.y=Ue.y)}),de.graph().width=be.graph().width,de.graph().height=be.graph().height}var O=["nodesep","edgesep","ranksep","marginx","marginy"],S={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],c=["width","height"],f={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],N={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},k=["labelpos"];function W(de){var be=new d({multigraph:!0,compound:!0}),Ae=_e(de.graph());return be.setGraph(X.merge({},S,pe(Ae,O),X.pick(Ae,I))),X.forEach(de.nodes(),function(Fe){var Ue=_e(de.node(Fe));be.setNode(Fe,X.defaults(pe(Ue,c),f)),be.setParent(Fe,de.parent(Fe))}),X.forEach(de.edges(),function(Fe){var Ue=_e(de.edge(Fe));be.setEdge(Fe,X.merge({},N,pe(Ue,P),X.pick(Ue,k)))}),be}function z(de){var be=de.graph();be.ranksep/=2,X.forEach(de.edges(),function(Ae){var Fe=de.edge(Ae);Fe.minlen*=2,Fe.labelpos.toLowerCase()!=="c"&&(be.rankdir==="TB"||be.rankdir==="BT"?Fe.width+=Fe.labeloffset:Fe.height+=Fe.labeloffset)})}function Z(de){X.forEach(de.edges(),function(be){var Ae=de.edge(be);if(Ae.width&&Ae.height){var Fe=de.node(be.v),Ue=de.node(be.w),it={rank:(Ue.rank-Fe.rank)/2+Fe.rank,e:be};L.addDummyNode(de,"edge-proxy",it,"_ep")}})}function J(de){var be=0;X.forEach(de.nodes(),function(Ae){var Fe=de.node(Ae);Fe.borderTop&&(Fe.minRank=de.node(Fe.borderTop).rank,Fe.maxRank=de.node(Fe.borderBottom).rank,be=X.max(be,Fe.maxRank))}),de.graph().maxRank=be}function ee(de){X.forEach(de.nodes(),function(be){var Ae=de.node(be);Ae.dummy==="edge-proxy"&&(de.edge(Ae.e).labelRank=Ae.rank,de.removeNode(be))})}function $(de){var be=Number.POSITIVE_INFINITY,Ae=0,Fe=Number.POSITIVE_INFINITY,Ue=0,it=de.graph(),tt=it.marginx||0,et=it.marginy||0;function vt(dt){var je=dt.x,nt=dt.y,rt=dt.width,ft=dt.height;be=Math.min(be,je-rt/2),Ae=Math.max(Ae,je+rt/2),Fe=Math.min(Fe,nt-ft/2),Ue=Math.max(Ue,nt+ft/2)}X.forEach(de.nodes(),function(dt){vt(de.node(dt))}),X.forEach(de.edges(),function(dt){var je=de.edge(dt);X.has(je,"x")&&vt(je)}),be-=tt,Fe-=et,X.forEach(de.nodes(),function(dt){var je=de.node(dt);je.x-=be,je.y-=Fe}),X.forEach(de.edges(),function(dt){var je=de.edge(dt);X.forEach(je.points,function(nt){nt.x-=be,nt.y-=Fe}),X.has(je,"x")&&(je.x-=be),X.has(je,"y")&&(je.y-=Fe)}),it.width=Ae-be+tt,it.height=Ue-Fe+et}function ie(de){X.forEach(de.edges(),function(be){var Ae=de.edge(be),Fe=de.node(be.v),Ue=de.node(be.w),it,tt;Ae.points?(it=Ae.points[0],tt=Ae.points[Ae.points.length-1]):(Ae.points=[],it=Ue,tt=Fe),Ae.points.unshift(L.intersectRect(Fe,it)),Ae.points.push(L.intersectRect(Ue,tt))})}function se(de){X.forEach(de.edges(),function(be){var Ae=de.edge(be);if(X.has(Ae,"x"))switch((Ae.labelpos==="l"||Ae.labelpos==="r")&&(Ae.width-=Ae.labeloffset),Ae.labelpos){case"l":Ae.x-=Ae.width/2+Ae.labeloffset;break;case"r":Ae.x+=Ae.width/2+Ae.labeloffset;break}})}function ne(de){X.forEach(de.edges(),function(be){var Ae=de.edge(be);Ae.reversed&&Ae.points.reverse()})}function ce(de){X.forEach(de.nodes(),function(be){if(de.children(be).length){var Ae=de.node(be),Fe=de.node(Ae.borderTop),Ue=de.node(Ae.borderBottom),it=de.node(X.last(Ae.borderLeft)),tt=de.node(X.last(Ae.borderRight));Ae.width=Math.abs(tt.x-it.x),Ae.height=Math.abs(Ue.y-Fe.y),Ae.x=it.x+Ae.width/2,Ae.y=Fe.y+Ae.height/2}}),X.forEach(de.nodes(),function(be){de.node(be).dummy==="border"&&de.removeNode(be)})}function ae(de){X.forEach(de.edges(),function(be){if(be.v===be.w){var Ae=de.node(be.v);Ae.selfEdges||(Ae.selfEdges=[]),Ae.selfEdges.push({e:be,label:de.edge(be)}),de.removeEdge(be)}})}function fe(de){var be=L.buildLayerMatrix(de);X.forEach(be,function(Ae){var Fe=0;X.forEach(Ae,function(Ue,it){var tt=de.node(Ue);tt.order=it+Fe,X.forEach(tt.selfEdges,function(et){L.addDummyNode(de,"selfedge",{width:et.label.width,height:et.label.height,rank:tt.rank,order:it+ ++Fe,e:et.e,label:et.label},"_se")}),delete tt.selfEdges})})}function oe(de){X.forEach(de.nodes(),function(be){var Ae=de.node(be);if(Ae.dummy==="selfedge"){var Fe=de.node(Ae.e.v),Ue=Fe.x+Fe.width/2,it=Fe.y,tt=Ae.x-Ue,et=Fe.height/2;de.setEdge(Ae.e,Ae.label),de.removeNode(be),Ae.label.points=[{x:Ue+2*tt/3,y:it-et},{x:Ue+5*tt/6,y:it-et},{x:Ue+tt,y:it},{x:Ue+5*tt/6,y:it+et},{x:Ue+2*tt/3,y:it+et}],Ae.label.x=Ae.x,Ae.label.y=Ae.y}})}function pe(de,be){return X.mapValues(X.pick(de,be),Number)}function _e(de){var be={};return X.forEach(de,function(Ae,Fe){be[Fe.toLowerCase()]=Ae}),be}},72361:function(Se,Ce,Y){var X;try{X={cloneDeep:Y(20250),constant:Y(13503),defaults:Y(28548),each:Y(76934),filter:Y(64725),find:Y(79785),flatten:Y(40151),forEach:Y(99204),forIn:Y(23190),has:Y(99946),isUndefined:Y(16513),last:Y(10611),map:Y(9924),mapValues:Y(70642),max:Y(95987),merge:Y(28440),min:Y(73376),minBy:Y(83296),now:Y(5795),pick:Y(89409),range:Y(60859),reduce:Y(16473),sortBy:Y(351),uniqueId:Y(95708),values:Y(81229),zipObject:Y(65441)}}catch(re){}X||(X=window._),Se.exports=X},31733:function(Se,Ce,Y){var X=Y(72361),re=Y(53063);Se.exports={run:V,cleanup:w};function V(y){var T=re.addDummyNode(y,"root",{},"_root"),x=U(y),p=X.max(X.values(x))-1,m=2*p+1;y.graph().nestingRoot=T,X.forEach(y.edges(),function(d){y.edge(d).minlen*=m});var L=C(y)+1;X.forEach(y.children(),function(d){b(y,T,m,L,p,x,d)}),y.graph().nodeRankFactor=m}function b(y,T,x,p,m,L,d){var g=y.children(d);if(!g.length){d!==T&&y.setEdge(T,d,{weight:0,minlen:x});return}var A=re.addBorderNode(y,"_bt"),M=re.addBorderNode(y,"_bb"),O=y.node(d);y.setParent(A,d),O.borderTop=A,y.setParent(M,d),O.borderBottom=M,X.forEach(g,function(S){b(y,T,x,p,m,L,S);var I=y.node(S),c=I.borderTop?I.borderTop:S,f=I.borderBottom?I.borderBottom:S,P=I.borderTop?p:2*p,N=c!==f?1:m-L[d]+1;y.setEdge(A,c,{weight:P,minlen:N,nestingEdge:!0}),y.setEdge(f,M,{weight:P,minlen:N,nestingEdge:!0})}),y.parent(d)||y.setEdge(T,A,{weight:0,minlen:m+L[d]})}function U(y){var T={};function x(p,m){var L=y.children(p);L&&L.length&&X.forEach(L,function(d){x(d,m+1)}),T[p]=m}return X.forEach(y.children(),function(p){x(p,1)}),T}function C(y){return X.reduce(y.edges(),function(T,x){return T+y.edge(x).weight},0)}function w(y){var T=y.graph();y.removeNode(T.nestingRoot),delete T.nestingRoot,X.forEach(y.edges(),function(x){var p=y.edge(x);p.nestingEdge&&y.removeEdge(x)})}},27163:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(53063);Se.exports={run:V,undo:U};function V(C){C.graph().dummyChains=[],X.forEach(C.edges(),function(w){b(C,w)})}function b(C,w){var y=w.v,T=C.node(y).rank,x=w.w,p=C.node(x).rank,m=w.name,L=C.edge(w),d=L.labelRank;if(p!==T+1){C.removeEdge(w);var g,A,M;for(M=0,++T;T<p;++M,++T)L.points=[],A={width:0,height:0,edgeLabel:L,edgeObj:w,rank:T},g=re.addDummyNode(C,"edge",A,"_d"),T===d&&(A.width=L.width,A.height=L.height,A.dummy="edge-label",A.labelpos=L.labelpos),C.setEdge(y,g,{weight:L.weight},m),M===0&&C.graph().dummyChains.push(g),y=g;C.setEdge(y,x,{weight:L.weight},m)}}function U(C){X.forEach(C.graph().dummyChains,function(w){var y=C.node(w),T=y.edgeLabel,x;for(C.setEdge(y.edgeObj,T);y.dummy;)x=C.successors(w)[0],C.removeNode(w),T.points.push({x:y.x,y:y.y}),y.dummy==="edge-label"&&(T.x=y.x,T.y=y.y,T.width=y.width,T.height=y.height),w=x,y=C.node(w)})}},52205:function(Se,Ce,Y){var X=Y(72361);Se.exports=re;function re(V,b,U){var C={},w;X.forEach(U,function(y){for(var T=V.parent(y),x,p;T;){if(x=V.parent(T),x?(p=C[x],C[x]=T):(p=w,w=T),p&&p!==T){b.setEdge(p,T);return}T=x}})}},99506:function(Se,Ce,Y){var X=Y(72361);Se.exports=re;function re(V,b){return X.map(b,function(U){var C=V.inEdges(U);if(C.length){var w=X.reduce(C,function(y,T){var x=V.edge(T),p=V.node(T.v);return{sum:y.sum+x.weight*p.order,weight:y.weight+x.weight}},{sum:0,weight:0});return{v:U,barycenter:w.sum/w.weight,weight:w.weight}}else return{v:U}})}},59105:function(Se,Ce,Y){var X=Y(72361),re=Y(76626).Graph;Se.exports=V;function V(U,C,w){var y=b(U),T=new re({compound:!0}).setGraph({root:y}).setDefaultNodeLabel(function(x){return U.node(x)});return X.forEach(U.nodes(),function(x){var p=U.node(x),m=U.parent(x);(p.rank===C||p.minRank<=C&&C<=p.maxRank)&&(T.setNode(x),T.setParent(x,m||y),X.forEach(U[w](x),function(L){var d=L.v===x?L.w:L.v,g=T.edge(d,x),A=X.isUndefined(g)?0:g.weight;T.setEdge(d,x,{weight:U.edge(L).weight+A})}),X.has(p,"minRank")&&T.setNode(x,{borderLeft:p.borderLeft[C],borderRight:p.borderRight[C]}))}),T}function b(U){for(var C;U.hasNode(C=X.uniqueId("_root")););return C}},45456:function(Se,Ce,Y){"use strict";var X=Y(72361);Se.exports=re;function re(b,U){for(var C=0,w=1;w<U.length;++w)C+=V(b,U[w-1],U[w]);return C}function V(b,U,C){for(var w=X.zipObject(C,X.map(C,function(L,d){return d})),y=X.flatten(X.map(U,function(L){return X.sortBy(X.map(b.outEdges(L),function(d){return{pos:w[d.w],weight:b.edge(d).weight}}),"pos")}),!0),T=1;T<C.length;)T<<=1;var x=2*T-1;T-=1;var p=X.map(new Array(x),function(){return 0}),m=0;return X.forEach(y.forEach(function(L){var d=L.pos+T;p[d]+=L.weight;for(var g=0;d>0;)d%2&&(g+=p[d+1]),d=d-1>>1,p[d]+=L.weight;m+=L.weight*g})),m}},62852:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(18043),V=Y(45456),b=Y(86490),U=Y(59105),C=Y(52205),w=Y(76626).Graph,y=Y(53063);Se.exports=T;function T(L){var d=y.maxRank(L),g=x(L,X.range(1,d+1),"inEdges"),A=x(L,X.range(d-1,-1,-1),"outEdges"),M=re(L);m(L,M);for(var O=Number.POSITIVE_INFINITY,S,I=0,c=0;c<4;++I,++c){p(I%2?g:A,I%4>=2),M=y.buildLayerMatrix(L);var f=V(L,M);f<O&&(c=0,S=X.cloneDeep(M),O=f)}m(L,S)}function x(L,d,g){return X.map(d,function(A){return U(L,A,g)})}function p(L,d){var g=new w;X.forEach(L,function(A){var M=A.graph().root,O=b(A,M,g,d);X.forEach(O.vs,function(S,I){A.node(S).order=I}),C(A,g,O.vs)})}function m(L,d){X.forEach(d,function(g){X.forEach(g,function(A,M){L.node(A).order=M})})}},18043:function(Se,Ce,Y){"use strict";var X=Y(72361);Se.exports=re;function re(V){var b={},U=X.filter(V.nodes(),function(x){return!V.children(x).length}),C=X.max(X.map(U,function(x){return V.node(x).rank})),w=X.map(X.range(C+1),function(){return[]});function y(x){if(!X.has(b,x)){b[x]=!0;var p=V.node(x);w[p.rank].push(x),X.forEach(V.successors(x),y)}}var T=X.sortBy(U,function(x){return V.node(x).rank});return X.forEach(T,y),w}},45926:function(Se,Ce,Y){"use strict";var X=Y(72361);Se.exports=re;function re(U,C){var w={};X.forEach(U,function(T,x){var p=w[T.v]={indegree:0,in:[],out:[],vs:[T.v],i:x};X.isUndefined(T.barycenter)||(p.barycenter=T.barycenter,p.weight=T.weight)}),X.forEach(C.edges(),function(T){var x=w[T.v],p=w[T.w];!X.isUndefined(x)&&!X.isUndefined(p)&&(p.indegree++,x.out.push(w[T.w]))});var y=X.filter(w,function(T){return!T.indegree});return V(y)}function V(U){var C=[];function w(x){return function(p){p.merged||(X.isUndefined(p.barycenter)||X.isUndefined(x.barycenter)||p.barycenter>=x.barycenter)&&b(x,p)}}function y(x){return function(p){p.in.push(x),--p.indegree===0&&U.push(p)}}for(;U.length;){var T=U.pop();C.push(T),X.forEach(T.in.reverse(),w(T)),X.forEach(T.out,y(T))}return X.map(X.filter(C,function(x){return!x.merged}),function(x){return X.pick(x,["vs","i","barycenter","weight"])})}function b(U,C){var w=0,y=0;U.weight&&(w+=U.barycenter*U.weight,y+=U.weight),C.weight&&(w+=C.barycenter*C.weight,y+=C.weight),U.vs=C.vs.concat(U.vs),U.barycenter=w/y,U.weight=y,U.i=Math.min(C.i,U.i),C.merged=!0}},86490:function(Se,Ce,Y){var X=Y(72361),re=Y(99506),V=Y(45926),b=Y(1349);Se.exports=U;function U(y,T,x,p){var m=y.children(T),L=y.node(T),d=L?L.borderLeft:void 0,g=L?L.borderRight:void 0,A={};d&&(m=X.filter(m,function(f){return f!==d&&f!==g}));var M=re(y,m);X.forEach(M,function(f){if(y.children(f.v).length){var P=U(y,f.v,x,p);A[f.v]=P,X.has(P,"barycenter")&&w(f,P)}});var O=V(M,x);C(O,A);var S=b(O,p);if(d&&(S.vs=X.flatten([d,S.vs,g],!0),y.predecessors(d).length)){var I=y.node(y.predecessors(d)[0]),c=y.node(y.predecessors(g)[0]);X.has(S,"barycenter")||(S.barycenter=0,S.weight=0),S.barycenter=(S.barycenter*S.weight+I.order+c.order)/(S.weight+2),S.weight+=2}return S}function C(y,T){X.forEach(y,function(x){x.vs=X.flatten(x.vs.map(function(p){return T[p]?T[p].vs:p}),!0)})}function w(y,T){X.isUndefined(y.barycenter)?(y.barycenter=T.barycenter,y.weight=T.weight):(y.barycenter=(y.barycenter*y.weight+T.barycenter*T.weight)/(y.weight+T.weight),y.weight+=T.weight)}},1349:function(Se,Ce,Y){var X=Y(72361),re=Y(53063);Se.exports=V;function V(C,w){var y=re.partition(C,function(A){return X.has(A,"barycenter")}),T=y.lhs,x=X.sortBy(y.rhs,function(A){return-A.i}),p=[],m=0,L=0,d=0;T.sort(U(!!w)),d=b(p,x,d),X.forEach(T,function(A){d+=A.vs.length,p.push(A.vs),m+=A.barycenter*A.weight,L+=A.weight,d=b(p,x,d)});var g={vs:X.flatten(p,!0)};return L&&(g.barycenter=m/L,g.weight=L),g}function b(C,w,y){for(var T;w.length&&(T=X.last(w)).i<=y;)w.pop(),C.push(T.vs),y++;return y}function U(C){return function(w,y){return w.barycenter<y.barycenter?-1:w.barycenter>y.barycenter?1:C?y.i-w.i:w.i-y.i}}},71970:function(Se,Ce,Y){var X=Y(72361);Se.exports=re;function re(U){var C=b(U);X.forEach(U.graph().dummyChains,function(w){for(var y=U.node(w),T=y.edgeObj,x=V(U,C,T.v,T.w),p=x.path,m=x.lca,L=0,d=p[L],g=!0;w!==T.w;){if(y=U.node(w),g){for(;(d=p[L])!==m&&U.node(d).maxRank<y.rank;)L++;d===m&&(g=!1)}if(!g){for(;L<p.length-1&&U.node(d=p[L+1]).minRank<=y.rank;)L++;d=p[L]}U.setParent(w,d),w=U.successors(w)[0]}})}function V(U,C,w,y){var T=[],x=[],p=Math.min(C[w].low,C[y].low),m=Math.max(C[w].lim,C[y].lim),L,d;L=w;do L=U.parent(L),T.push(L);while(L&&(C[L].low>p||m>C[L].lim));for(d=L,L=y;(L=U.parent(L))!==d;)x.push(L);return{path:T.concat(x.reverse()),lca:d}}function b(U){var C={},w=0;function y(T){var x=w;X.forEach(U.children(T),y),C[T]={low:x,lim:w++}}return X.forEach(U.children(),y),C}},92080:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(76626).Graph,V=Y(53063);Se.exports={positionX:g,findType1Conflicts:b,findType2Conflicts:U,addConflict:w,hasConflict:y,verticalAlignment:T,horizontalCompaction:x,alignCoordinates:L,findSmallestWidthAlignment:m,balance:d};function b(O,S){var I={};function c(f,P){var N=0,k=0,W=f.length,z=X.last(P);return X.forEach(P,function(Z,J){var ee=C(O,Z),$=ee?O.node(ee).order:W;(ee||Z===z)&&(X.forEach(P.slice(k,J+1),function(ie){X.forEach(O.predecessors(ie),function(se){var ne=O.node(se),ce=ne.order;(ce<N||$<ce)&&!(ne.dummy&&O.node(ie).dummy)&&w(I,se,ie)})}),k=J+1,N=$)}),P}return X.reduce(S,c),I}function U(O,S){var I={};function c(P,N,k,W,z){var Z;X.forEach(X.range(N,k),function(J){Z=P[J],O.node(Z).dummy&&X.forEach(O.predecessors(Z),function(ee){var $=O.node(ee);$.dummy&&($.order<W||$.order>z)&&w(I,ee,Z)})})}function f(P,N){var k=-1,W,z=0;return X.forEach(N,function(Z,J){if(O.node(Z).dummy==="border"){var ee=O.predecessors(Z);ee.length&&(W=O.node(ee[0]).order,c(N,z,J,k,W),z=J,k=W)}c(N,z,N.length,W,P.length)}),N}return X.reduce(S,f),I}function C(O,S){if(O.node(S).dummy)return X.find(O.predecessors(S),function(I){return O.node(I).dummy})}function w(O,S,I){if(S>I){var c=S;S=I,I=c}var f=O[S];f||(O[S]=f={}),f[I]=!0}function y(O,S,I){if(S>I){var c=S;S=I,I=c}return X.has(O[S],I)}function T(O,S,I,c){var f={},P={},N={};return X.forEach(S,function(k){X.forEach(k,function(W,z){f[W]=W,P[W]=W,N[W]=z})}),X.forEach(S,function(k){var W=-1;X.forEach(k,function(z){var Z=c(z);if(Z.length){Z=X.sortBy(Z,function(se){return N[se]});for(var J=(Z.length-1)/2,ee=Math.floor(J),$=Math.ceil(J);ee<=$;++ee){var ie=Z[ee];P[z]===z&&W<N[ie]&&!y(I,z,ie)&&(P[ie]=z,P[z]=f[z]=f[ie],W=N[ie])}}})}),{root:f,align:P}}function x(O,S,I,c,f){var P={},N=p(O,S,I,f),k=f?"borderLeft":"borderRight";function W(J,ee){for(var $=N.nodes(),ie=$.pop(),se={};ie;)se[ie]?J(ie):(se[ie]=!0,$.push(ie),$=$.concat(ee(ie))),ie=$.pop()}function z(J){P[J]=N.inEdges(J).reduce(function(ee,$){return Math.max(ee,P[$.v]+N.edge($))},0)}function Z(J){var ee=N.outEdges(J).reduce(function(ie,se){return Math.min(ie,P[se.w]-N.edge(se))},Number.POSITIVE_INFINITY),$=O.node(J);ee!==Number.POSITIVE_INFINITY&&$.borderType!==k&&(P[J]=Math.max(P[J],ee))}return W(z,N.predecessors.bind(N)),W(Z,N.successors.bind(N)),X.forEach(c,function(J){P[J]=P[I[J]]}),P}function p(O,S,I,c){var f=new re,P=O.graph(),N=A(P.nodesep,P.edgesep,c);return X.forEach(S,function(k){var W;X.forEach(k,function(z){var Z=I[z];if(f.setNode(Z),W){var J=I[W],ee=f.edge(J,Z);f.setEdge(J,Z,Math.max(N(O,z,W),ee||0))}W=z})}),f}function m(O,S){return X.minBy(X.values(S),function(I){var c=Number.NEGATIVE_INFINITY,f=Number.POSITIVE_INFINITY;return X.forIn(I,function(P,N){var k=M(O,N)/2;c=Math.max(P+k,c),f=Math.min(P-k,f)}),c-f})}function L(O,S){var I=X.values(S),c=X.min(I),f=X.max(I);X.forEach(["u","d"],function(P){X.forEach(["l","r"],function(N){var k=P+N,W=O[k],z;if(W!==S){var Z=X.values(W);z=N==="l"?c-X.min(Z):f-X.max(Z),z&&(O[k]=X.mapValues(W,function(J){return J+z}))}})})}function d(O,S){return X.mapValues(O.ul,function(I,c){if(S)return O[S.toLowerCase()][c];var f=X.sortBy(X.map(O,c));return(f[1]+f[2])/2})}function g(O){var S=V.buildLayerMatrix(O),I=X.merge(b(O,S),U(O,S)),c={},f;X.forEach(["u","d"],function(N){f=N==="u"?S:X.values(S).reverse(),X.forEach(["l","r"],function(k){k==="r"&&(f=X.map(f,function(J){return X.values(J).reverse()}));var W=(N==="u"?O.predecessors:O.successors).bind(O),z=T(O,f,I,W),Z=x(O,f,z.root,z.align,k==="r");k==="r"&&(Z=X.mapValues(Z,function(J){return-J})),c[N+k]=Z})});var P=m(O,c);return L(c,P),d(c,O.graph().align)}function A(O,S,I){return function(c,f,P){var N=c.node(f),k=c.node(P),W=0,z;if(W+=N.width/2,X.has(N,"labelpos"))switch(N.labelpos.toLowerCase()){case"l":z=-N.width/2;break;case"r":z=N.width/2;break}if(z&&(W+=I?z:-z),z=0,W+=(N.dummy?S:O)/2,W+=(k.dummy?S:O)/2,W+=k.width/2,X.has(k,"labelpos"))switch(k.labelpos.toLowerCase()){case"l":z=k.width/2;break;case"r":z=-k.width/2;break}return z&&(W+=I?z:-z),z=0,W}}function M(O,S){return O.node(S).width}},93021:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(53063),V=Y(92080).positionX;Se.exports=b;function b(C){C=re.asNonCompoundGraph(C),U(C),X.forEach(V(C),function(w,y){C.node(y).x=w})}function U(C){var w=re.buildLayerMatrix(C),y=C.graph().ranksep,T=0;X.forEach(w,function(x){var p=X.max(X.map(x,function(m){return C.node(m).height}));X.forEach(x,function(m){C.node(m).y=T+p/2}),T+=p+y})}},61031:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(76626).Graph,V=Y(2416).slack;Se.exports=b;function b(y){var T=new re({directed:!1}),x=y.nodes()[0],p=y.nodeCount();T.setNode(x,{});for(var m,L;U(T,y)<p;)m=C(T,y),L=T.hasNode(m.v)?V(y,m):-V(y,m),w(T,y,L);return T}function U(y,T){function x(p){X.forEach(T.nodeEdges(p),function(m){var L=m.v,d=p===L?m.w:L;!y.hasNode(d)&&!V(T,m)&&(y.setNode(d,{}),y.setEdge(p,d,{}),x(d))})}return X.forEach(y.nodes(),x),y.nodeCount()}function C(y,T){return X.minBy(T.edges(),function(x){if(y.hasNode(x.v)!==y.hasNode(x.w))return V(T,x)})}function w(y,T,x){X.forEach(y.nodes(),function(p){T.node(p).rank+=x})}},64505:function(Se,Ce,Y){"use strict";var X=Y(2416),re=X.longestPath,V=Y(61031),b=Y(77076);Se.exports=U;function U(T){switch(T.graph().ranker){case"network-simplex":y(T);break;case"tight-tree":w(T);break;case"longest-path":C(T);break;default:y(T)}}var C=re;function w(T){re(T),V(T)}function y(T){b(T)}},77076:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(61031),V=Y(2416).slack,b=Y(2416).longestPath,U=Y(76626).alg.preorder,C=Y(76626).alg.postorder,w=Y(53063).simplify;Se.exports=y,y.initLowLimValues=m,y.initCutValues=T,y.calcCutValue=p,y.leaveEdge=d,y.enterEdge=g,y.exchangeEdges=A;function y(I){I=w(I),b(I);var c=re(I);m(c),T(c,I);for(var f,P;f=d(c);)P=g(c,I,f),A(c,I,f,P)}function T(I,c){var f=C(I,I.nodes());f=f.slice(0,f.length-1),X.forEach(f,function(P){x(I,c,P)})}function x(I,c,f){var P=I.node(f),N=P.parent;I.edge(f,N).cutvalue=p(I,c,f)}function p(I,c,f){var P=I.node(f),N=P.parent,k=!0,W=c.edge(f,N),z=0;return W||(k=!1,W=c.edge(N,f)),z=W.weight,X.forEach(c.nodeEdges(f),function(Z){var J=Z.v===f,ee=J?Z.w:Z.v;if(ee!==N){var $=J===k,ie=c.edge(Z).weight;if(z+=$?ie:-ie,O(I,f,ee)){var se=I.edge(f,ee).cutvalue;z+=$?-se:se}}}),z}function m(I,c){arguments.length<2&&(c=I.nodes()[0]),L(I,{},1,c)}function L(I,c,f,P,N){var k=f,W=I.node(P);return c[P]=!0,X.forEach(I.neighbors(P),function(z){X.has(c,z)||(f=L(I,c,f,z,P))}),W.low=k,W.lim=f++,N?W.parent=N:delete W.parent,f}function d(I){return X.find(I.edges(),function(c){return I.edge(c).cutvalue<0})}function g(I,c,f){var P=f.v,N=f.w;c.hasEdge(P,N)||(P=f.w,N=f.v);var k=I.node(P),W=I.node(N),z=k,Z=!1;k.lim>W.lim&&(z=W,Z=!0);var J=X.filter(c.edges(),function(ee){return Z===S(I,I.node(ee.v),z)&&Z!==S(I,I.node(ee.w),z)});return X.minBy(J,function(ee){return V(c,ee)})}function A(I,c,f,P){var N=f.v,k=f.w;I.removeEdge(N,k),I.setEdge(P.v,P.w,{}),m(I),T(I,c),M(I,c)}function M(I,c){var f=X.find(I.nodes(),function(N){return!c.node(N).parent}),P=U(I,f);P=P.slice(1),X.forEach(P,function(N){var k=I.node(N).parent,W=c.edge(N,k),z=!1;W||(W=c.edge(k,N),z=!0),c.node(N).rank=c.node(k).rank+(z?W.minlen:-W.minlen)})}function O(I,c,f){return I.hasEdge(c,f)}function S(I,c,f){return f.low<=c.lim&&c.lim<=f.lim}},2416:function(Se,Ce,Y){"use strict";var X=Y(72361);Se.exports={longestPath:re,slack:V};function re(b){var U={};function C(w){var y=b.node(w);if(X.has(U,w))return y.rank;U[w]=!0;var T=X.min(X.map(b.outEdges(w),function(x){return C(x.w)-b.edge(x).minlen}));return(T===Number.POSITIVE_INFINITY||T===void 0||T===null)&&(T=0),y.rank=T}X.forEach(b.sources(),C)}function V(b,U){return b.node(U.w).rank-b.node(U.v).rank-b.edge(U).minlen}},53063:function(Se,Ce,Y){"use strict";var X=Y(72361),re=Y(76626).Graph;Se.exports={addDummyNode:V,simplify:b,asNonCompoundGraph:U,successorWeights:C,predecessorWeights:w,intersectRect:y,buildLayerMatrix:T,normalizeRanks:x,removeEmptyRanks:p,addBorderNode:m,maxRank:L,partition:d,time:g,notime:A};function V(M,O,S,I){var c;do c=X.uniqueId(I);while(M.hasNode(c));return S.dummy=O,M.setNode(c,S),c}function b(M){var O=new re().setGraph(M.graph());return X.forEach(M.nodes(),function(S){O.setNode(S,M.node(S))}),X.forEach(M.edges(),function(S){var I=O.edge(S.v,S.w)||{weight:0,minlen:1},c=M.edge(S);O.setEdge(S.v,S.w,{weight:I.weight+c.weight,minlen:Math.max(I.minlen,c.minlen)})}),O}function U(M){var O=new re({multigraph:M.isMultigraph()}).setGraph(M.graph());return X.forEach(M.nodes(),function(S){M.children(S).length||O.setNode(S,M.node(S))}),X.forEach(M.edges(),function(S){O.setEdge(S,M.edge(S))}),O}function C(M){var O=X.map(M.nodes(),function(S){var I={};return X.forEach(M.outEdges(S),function(c){I[c.w]=(I[c.w]||0)+M.edge(c).weight}),I});return X.zipObject(M.nodes(),O)}function w(M){var O=X.map(M.nodes(),function(S){var I={};return X.forEach(M.inEdges(S),function(c){I[c.v]=(I[c.v]||0)+M.edge(c).weight}),I});return X.zipObject(M.nodes(),O)}function y(M,O){var S=M.x,I=M.y,c=O.x-S,f=O.y-I,P=M.width/2,N=M.height/2;if(!c&&!f)throw new Error("Not possible to find intersection inside of the rectangle");var k,W;return Math.abs(f)*P>Math.abs(c)*N?(f<0&&(N=-N),k=N*c/f,W=N):(c<0&&(P=-P),k=P,W=P*f/c),{x:S+k,y:I+W}}function T(M){var O=X.map(X.range(L(M)+1),function(){return[]});return X.forEach(M.nodes(),function(S){var I=M.node(S),c=I.rank;X.isUndefined(c)||(O[c][I.order]=S)}),O}function x(M){var O=X.min(X.map(M.nodes(),function(S){return M.node(S).rank}));X.forEach(M.nodes(),function(S){var I=M.node(S);X.has(I,"rank")&&(I.rank-=O)})}function p(M){var O=X.min(X.map(M.nodes(),function(f){return M.node(f).rank})),S=[];X.forEach(M.nodes(),function(f){var P=M.node(f).rank-O;S[P]||(S[P]=[]),S[P].push(f)});var I=0,c=M.graph().nodeRankFactor;X.forEach(S,function(f,P){X.isUndefined(f)&&P%c!==0?--I:I&&X.forEach(f,function(N){M.node(N).rank+=I})})}function m(M,O,S,I){var c={width:0,height:0};return arguments.length>=4&&(c.rank=S,c.order=I),V(M,"border",c,O)}function L(M){return X.max(X.map(M.nodes(),function(O){var S=M.node(O).rank;if(!X.isUndefined(S))return S}))}function d(M,O){var S={lhs:[],rhs:[]};return X.forEach(M,function(I){O(I)?S.lhs.push(I):S.rhs.push(I)}),S}function g(M,O){var S=X.now();try{return O()}finally{console.log(M+" time: "+(X.now()-S)+"ms")}}function A(M,O){return O()}},11897:function(Se){Se.exports="0.8.5"},97774:function(Se,Ce,Y){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.default=void 0;var X=Object.assign||function(A){for(var M=1;M<arguments.length;M++){var O=arguments[M];for(var S in O)Object.prototype.hasOwnProperty.call(O,S)&&(A[S]=O[S])}return A},re=function(){function A(M,O){for(var S=0;S<O.length;S++){var I=O[S];I.enumerable=I.enumerable||!1,I.configurable=!0,"value"in I&&(I.writable=!0),Object.defineProperty(M,I.key,I)}}return function(M,O,S){return O&&A(M.prototype,O),S&&A(M,S),M}}(),V=Y(59301),b=p(V),U=Y(12708),C=p(U),w=Y(53291),y=p(w),T=Y(47242),x=Y(65429);function p(A){return A&&A.__esModule?A:{default:A}}function m(A,M){if(!(A instanceof M))throw new TypeError("Cannot call a class as a function")}function L(A,M){if(!A)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return M&&(typeof M=="object"||typeof M=="function")?M:A}function d(A,M){if(typeof M!="function"&&M!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof M);A.prototype=Object.create(M&&M.prototype,{constructor:{value:A,enumerable:!1,writable:!0,configurable:!0}}),M&&(Object.setPrototypeOf?Object.setPrototypeOf(A,M):A.__proto__=M)}var g=function(A){d(M,A);function M(O){m(this,M);var S=L(this,(M.__proto__||Object.getPrototypeOf(M)).call(this,O));return S.getEchartsInstance=function(){return S.echartsLib.getInstanceByDom(S.echartsElement)||S.echartsLib.init(S.echartsElement,S.props.theme,S.props.opts)},S.dispose=function(){if(S.echartsElement){try{(0,T.clear)(S.echartsElement)}catch(I){console.warn(I)}S.echartsLib.dispose(S.echartsElement)}},S.rerender=function(){var I=S.props,c=I.onEvents,f=I.onChartReady,P=S.renderEchartDom();S.bindEvents(P,c||{}),typeof f=="function"&&S.props.onChartReady(P),S.echartsElement&&(0,T.bind)(S.echartsElement,function(){try{P.resize()}catch(N){console.warn(N)}})},S.bindEvents=function(I,c){var f=function(k,W){typeof k=="string"&&typeof W=="function"&&I.on(k,function(z){W(z,I)})};for(var P in c)Object.prototype.hasOwnProperty.call(c,P)&&f(P,c[P])},S.renderEchartDom=function(){var I=S.getEchartsInstance();return I.setOption(S.props.option,S.props.notMerge||!1,S.props.lazyUpdate||!1),S.props.showLoading?I.showLoading(S.props.loadingOption||null):I.hideLoading(),I},S.echartsLib=O.echarts,S.echartsElement=null,S}return re(M,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(S){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(S,this.props))){if(!(0,y.default)(S.theme,this.props.theme)||!(0,y.default)(S.opts,this.props.opts)||!(0,y.default)(S.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var I=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,y.default)((0,x.pick)(this.props,I),(0,x.pick)(S,I))){var c=this.renderEchartDom();if(!(0,y.default)(S.style,this.props.style)||!(0,y.default)(S.className,this.props.className))try{c.resize()}catch(f){console.warn(f)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var S=this,I=this.props,c=I.style,f=I.className,P=X({height:300},c);return b.default.createElement("div",{ref:function(k){S.echartsElement=k},style:P,className:"echarts-for-react "+f})}}]),M}(V.Component);Ce.default=g,g.propTypes={option:C.default.object.isRequired,echarts:C.default.object,notMerge:C.default.bool,lazyUpdate:C.default.bool,style:C.default.object,className:C.default.string,theme:C.default.oneOfType([C.default.string,C.default.object]),onChartReady:C.default.func,showLoading:C.default.bool,loadingOption:C.default.object,onEvents:C.default.object,opts:C.default.shape({devicePixelRatio:C.default.number,renderer:C.default.oneOf(["canvas","svg"]),width:C.default.oneOfType([C.default.number,C.default.oneOf([null,void 0,"auto"])]),height:C.default.oneOfType([C.default.number,C.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:C.default.func},g.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(Se,Ce,Y){"use strict";var X;X={value:!0},Ce.Z=void 0;var re=Y(76411),V=C(re),b=Y(97774),U=C(b);function C(p){return p&&p.__esModule?p:{default:p}}function w(p,m){if(!(p instanceof m))throw new TypeError("Cannot call a class as a function")}function y(p,m){if(!p)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m&&(typeof m=="object"||typeof m=="function")?m:p}function T(p,m){if(typeof m!="function"&&m!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof m);p.prototype=Object.create(m&&m.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),m&&(Object.setPrototypeOf?Object.setPrototypeOf(p,m):p.__proto__=m)}var x=function(p){T(m,p);function m(L){w(this,m);var d=y(this,(m.__proto__||Object.getPrototypeOf(m)).call(this,L));return d.echartsLib=V.default,d}return m}(U.default);Ce.Z=x},65429:function(Se,Ce){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0});var Y=Ce.pick=function(re,V){var b={};return V.forEach(function(U){b[U]=re[U]}),b}},48961:function(Se,Ce,Y){(function(re,V){Se.exports=V(Y(76411))})(this,function(X){return function(re){var V={};function b(U){if(V[U])return V[U].exports;var C=V[U]={i:U,l:!1,exports:{}};return re[U].call(C.exports,C,C.exports,b),C.l=!0,C.exports}return b.m=re,b.c=V,b.d=function(U,C,w){b.o(U,C)||Object.defineProperty(U,C,{configurable:!1,enumerable:!0,get:w})},b.n=function(U){var C=U&&U.__esModule?function(){return U.default}:function(){return U};return b.d(C,"a",C),C},b.o=function(U,C){return Object.prototype.hasOwnProperty.call(U,C)},b.p="",b(b.s=87)}([function(re,V){re.exports=X},function(re,V,b){(function(U){"use strict";var C={};C.exports=V,function(w){if(!y)var y=1e-6;if(!T)var T=typeof Float32Array!="undefined"?Float32Array:Array;if(!x)var x=Math.random;var p={};p.setMatrixArrayType=function(c){T=c},typeof w!="undefined"&&(w.glMatrix=p);var m=Math.PI/180;p.toRadian=function(c){return c*m};var L={};L.create=function(){var c=new T(2);return c[0]=0,c[1]=0,c},L.clone=function(c){var f=new T(2);return f[0]=c[0],f[1]=c[1],f},L.fromValues=function(c,f){var P=new T(2);return P[0]=c,P[1]=f,P},L.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c},L.set=function(c,f,P){return c[0]=f,c[1]=P,c},L.add=function(c,f,P){return c[0]=f[0]+P[0],c[1]=f[1]+P[1],c},L.subtract=function(c,f,P){return c[0]=f[0]-P[0],c[1]=f[1]-P[1],c},L.sub=L.subtract,L.multiply=function(c,f,P){return c[0]=f[0]*P[0],c[1]=f[1]*P[1],c},L.mul=L.multiply,L.divide=function(c,f,P){return c[0]=f[0]/P[0],c[1]=f[1]/P[1],c},L.div=L.divide,L.min=function(c,f,P){return c[0]=Math.min(f[0],P[0]),c[1]=Math.min(f[1],P[1]),c},L.max=function(c,f,P){return c[0]=Math.max(f[0],P[0]),c[1]=Math.max(f[1],P[1]),c},L.scale=function(c,f,P){return c[0]=f[0]*P,c[1]=f[1]*P,c},L.scaleAndAdd=function(c,f,P,N){return c[0]=f[0]+P[0]*N,c[1]=f[1]+P[1]*N,c},L.distance=function(c,f){var P=f[0]-c[0],N=f[1]-c[1];return Math.sqrt(P*P+N*N)},L.dist=L.distance,L.squaredDistance=function(c,f){var P=f[0]-c[0],N=f[1]-c[1];return P*P+N*N},L.sqrDist=L.squaredDistance,L.length=function(c){var f=c[0],P=c[1];return Math.sqrt(f*f+P*P)},L.len=L.length,L.squaredLength=function(c){var f=c[0],P=c[1];return f*f+P*P},L.sqrLen=L.squaredLength,L.negate=function(c,f){return c[0]=-f[0],c[1]=-f[1],c},L.inverse=function(c,f){return c[0]=1/f[0],c[1]=1/f[1],c},L.normalize=function(c,f){var P=f[0],N=f[1],k=P*P+N*N;return k>0&&(k=1/Math.sqrt(k),c[0]=f[0]*k,c[1]=f[1]*k),c},L.dot=function(c,f){return c[0]*f[0]+c[1]*f[1]},L.cross=function(c,f,P){var N=f[0]*P[1]-f[1]*P[0];return c[0]=c[1]=0,c[2]=N,c},L.lerp=function(c,f,P,N){var k=f[0],W=f[1];return c[0]=k+N*(P[0]-k),c[1]=W+N*(P[1]-W),c},L.random=function(c,f){f=f||1;var P=x()*2*Math.PI;return c[0]=Math.cos(P)*f,c[1]=Math.sin(P)*f,c},L.transformMat2=function(c,f,P){var N=f[0],k=f[1];return c[0]=P[0]*N+P[2]*k,c[1]=P[1]*N+P[3]*k,c},L.transformMat2d=function(c,f,P){var N=f[0],k=f[1];return c[0]=P[0]*N+P[2]*k+P[4],c[1]=P[1]*N+P[3]*k+P[5],c},L.transformMat3=function(c,f,P){var N=f[0],k=f[1];return c[0]=P[0]*N+P[3]*k+P[6],c[1]=P[1]*N+P[4]*k+P[7],c},L.transformMat4=function(c,f,P){var N=f[0],k=f[1];return c[0]=P[0]*N+P[4]*k+P[12],c[1]=P[1]*N+P[5]*k+P[13],c},L.forEach=function(){var c=L.create();return function(f,P,N,k,W,z){var Z,J;for(P||(P=2),N||(N=0),k?J=Math.min(k*P+N,f.length):J=f.length,Z=N;Z<J;Z+=P)c[0]=f[Z],c[1]=f[Z+1],W(c,c,z),f[Z]=c[0],f[Z+1]=c[1];return f}}(),L.str=function(c){return"vec2("+c[0]+", "+c[1]+")"},typeof w!="undefined"&&(w.vec2=L);var d={};d.create=function(){var c=new T(3);return c[0]=0,c[1]=0,c[2]=0,c},d.clone=function(c){var f=new T(3);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f},d.fromValues=function(c,f,P){var N=new T(3);return N[0]=c,N[1]=f,N[2]=P,N},d.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c},d.set=function(c,f,P,N){return c[0]=f,c[1]=P,c[2]=N,c},d.add=function(c,f,P){return c[0]=f[0]+P[0],c[1]=f[1]+P[1],c[2]=f[2]+P[2],c},d.subtract=function(c,f,P){return c[0]=f[0]-P[0],c[1]=f[1]-P[1],c[2]=f[2]-P[2],c},d.sub=d.subtract,d.multiply=function(c,f,P){return c[0]=f[0]*P[0],c[1]=f[1]*P[1],c[2]=f[2]*P[2],c},d.mul=d.multiply,d.divide=function(c,f,P){return c[0]=f[0]/P[0],c[1]=f[1]/P[1],c[2]=f[2]/P[2],c},d.div=d.divide,d.min=function(c,f,P){return c[0]=Math.min(f[0],P[0]),c[1]=Math.min(f[1],P[1]),c[2]=Math.min(f[2],P[2]),c},d.max=function(c,f,P){return c[0]=Math.max(f[0],P[0]),c[1]=Math.max(f[1],P[1]),c[2]=Math.max(f[2],P[2]),c},d.scale=function(c,f,P){return c[0]=f[0]*P,c[1]=f[1]*P,c[2]=f[2]*P,c},d.scaleAndAdd=function(c,f,P,N){return c[0]=f[0]+P[0]*N,c[1]=f[1]+P[1]*N,c[2]=f[2]+P[2]*N,c},d.distance=function(c,f){var P=f[0]-c[0],N=f[1]-c[1],k=f[2]-c[2];return Math.sqrt(P*P+N*N+k*k)},d.dist=d.distance,d.squaredDistance=function(c,f){var P=f[0]-c[0],N=f[1]-c[1],k=f[2]-c[2];return P*P+N*N+k*k},d.sqrDist=d.squaredDistance,d.length=function(c){var f=c[0],P=c[1],N=c[2];return Math.sqrt(f*f+P*P+N*N)},d.len=d.length,d.squaredLength=function(c){var f=c[0],P=c[1],N=c[2];return f*f+P*P+N*N},d.sqrLen=d.squaredLength,d.negate=function(c,f){return c[0]=-f[0],c[1]=-f[1],c[2]=-f[2],c},d.inverse=function(c,f){return c[0]=1/f[0],c[1]=1/f[1],c[2]=1/f[2],c},d.normalize=function(c,f){var P=f[0],N=f[1],k=f[2],W=P*P+N*N+k*k;return W>0&&(W=1/Math.sqrt(W),c[0]=f[0]*W,c[1]=f[1]*W,c[2]=f[2]*W),c},d.dot=function(c,f){return c[0]*f[0]+c[1]*f[1]+c[2]*f[2]},d.cross=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=P[0],Z=P[1],J=P[2];return c[0]=k*J-W*Z,c[1]=W*z-N*J,c[2]=N*Z-k*z,c},d.lerp=function(c,f,P,N){var k=f[0],W=f[1],z=f[2];return c[0]=k+N*(P[0]-k),c[1]=W+N*(P[1]-W),c[2]=z+N*(P[2]-z),c},d.random=function(c,f){f=f||1;var P=x()*2*Math.PI,N=x()*2-1,k=Math.sqrt(1-N*N)*f;return c[0]=Math.cos(P)*k,c[1]=Math.sin(P)*k,c[2]=N*f,c},d.transformMat4=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=P[3]*N+P[7]*k+P[11]*W+P[15];return z=z||1,c[0]=(P[0]*N+P[4]*k+P[8]*W+P[12])/z,c[1]=(P[1]*N+P[5]*k+P[9]*W+P[13])/z,c[2]=(P[2]*N+P[6]*k+P[10]*W+P[14])/z,c},d.transformMat3=function(c,f,P){var N=f[0],k=f[1],W=f[2];return c[0]=N*P[0]+k*P[3]+W*P[6],c[1]=N*P[1]+k*P[4]+W*P[7],c[2]=N*P[2]+k*P[5]+W*P[8],c},d.transformQuat=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=P[0],Z=P[1],J=P[2],ee=P[3],$=ee*N+Z*W-J*k,ie=ee*k+J*N-z*W,se=ee*W+z*k-Z*N,ne=-z*N-Z*k-J*W;return c[0]=$*ee+ne*-z+ie*-J-se*-Z,c[1]=ie*ee+ne*-Z+se*-z-$*-J,c[2]=se*ee+ne*-J+$*-Z-ie*-z,c},d.rotateX=function(c,f,P,N){var k=[],W=[];return k[0]=f[0]-P[0],k[1]=f[1]-P[1],k[2]=f[2]-P[2],W[0]=k[0],W[1]=k[1]*Math.cos(N)-k[2]*Math.sin(N),W[2]=k[1]*Math.sin(N)+k[2]*Math.cos(N),c[0]=W[0]+P[0],c[1]=W[1]+P[1],c[2]=W[2]+P[2],c},d.rotateY=function(c,f,P,N){var k=[],W=[];return k[0]=f[0]-P[0],k[1]=f[1]-P[1],k[2]=f[2]-P[2],W[0]=k[2]*Math.sin(N)+k[0]*Math.cos(N),W[1]=k[1],W[2]=k[2]*Math.cos(N)-k[0]*Math.sin(N),c[0]=W[0]+P[0],c[1]=W[1]+P[1],c[2]=W[2]+P[2],c},d.rotateZ=function(c,f,P,N){var k=[],W=[];return k[0]=f[0]-P[0],k[1]=f[1]-P[1],k[2]=f[2]-P[2],W[0]=k[0]*Math.cos(N)-k[1]*Math.sin(N),W[1]=k[0]*Math.sin(N)+k[1]*Math.cos(N),W[2]=k[2],c[0]=W[0]+P[0],c[1]=W[1]+P[1],c[2]=W[2]+P[2],c},d.forEach=function(){var c=d.create();return function(f,P,N,k,W,z){var Z,J;for(P||(P=3),N||(N=0),k?J=Math.min(k*P+N,f.length):J=f.length,Z=N;Z<J;Z+=P)c[0]=f[Z],c[1]=f[Z+1],c[2]=f[Z+2],W(c,c,z),f[Z]=c[0],f[Z+1]=c[1],f[Z+2]=c[2];return f}}(),d.angle=function(c,f){var P=d.fromValues(c[0],c[1],c[2]),N=d.fromValues(f[0],f[1],f[2]);d.normalize(P,P),d.normalize(N,N);var k=d.dot(P,N);return k>1?0:Math.acos(k)},d.str=function(c){return"vec3("+c[0]+", "+c[1]+", "+c[2]+")"},typeof w!="undefined"&&(w.vec3=d);var g={};g.create=function(){var c=new T(4);return c[0]=0,c[1]=0,c[2]=0,c[3]=0,c},g.clone=function(c){var f=new T(4);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f},g.fromValues=function(c,f,P,N){var k=new T(4);return k[0]=c,k[1]=f,k[2]=P,k[3]=N,k},g.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c},g.set=function(c,f,P,N,k){return c[0]=f,c[1]=P,c[2]=N,c[3]=k,c},g.add=function(c,f,P){return c[0]=f[0]+P[0],c[1]=f[1]+P[1],c[2]=f[2]+P[2],c[3]=f[3]+P[3],c},g.subtract=function(c,f,P){return c[0]=f[0]-P[0],c[1]=f[1]-P[1],c[2]=f[2]-P[2],c[3]=f[3]-P[3],c},g.sub=g.subtract,g.multiply=function(c,f,P){return c[0]=f[0]*P[0],c[1]=f[1]*P[1],c[2]=f[2]*P[2],c[3]=f[3]*P[3],c},g.mul=g.multiply,g.divide=function(c,f,P){return c[0]=f[0]/P[0],c[1]=f[1]/P[1],c[2]=f[2]/P[2],c[3]=f[3]/P[3],c},g.div=g.divide,g.min=function(c,f,P){return c[0]=Math.min(f[0],P[0]),c[1]=Math.min(f[1],P[1]),c[2]=Math.min(f[2],P[2]),c[3]=Math.min(f[3],P[3]),c},g.max=function(c,f,P){return c[0]=Math.max(f[0],P[0]),c[1]=Math.max(f[1],P[1]),c[2]=Math.max(f[2],P[2]),c[3]=Math.max(f[3],P[3]),c},g.scale=function(c,f,P){return c[0]=f[0]*P,c[1]=f[1]*P,c[2]=f[2]*P,c[3]=f[3]*P,c},g.scaleAndAdd=function(c,f,P,N){return c[0]=f[0]+P[0]*N,c[1]=f[1]+P[1]*N,c[2]=f[2]+P[2]*N,c[3]=f[3]+P[3]*N,c},g.distance=function(c,f){var P=f[0]-c[0],N=f[1]-c[1],k=f[2]-c[2],W=f[3]-c[3];return Math.sqrt(P*P+N*N+k*k+W*W)},g.dist=g.distance,g.squaredDistance=function(c,f){var P=f[0]-c[0],N=f[1]-c[1],k=f[2]-c[2],W=f[3]-c[3];return P*P+N*N+k*k+W*W},g.sqrDist=g.squaredDistance,g.length=function(c){var f=c[0],P=c[1],N=c[2],k=c[3];return Math.sqrt(f*f+P*P+N*N+k*k)},g.len=g.length,g.squaredLength=function(c){var f=c[0],P=c[1],N=c[2],k=c[3];return f*f+P*P+N*N+k*k},g.sqrLen=g.squaredLength,g.negate=function(c,f){return c[0]=-f[0],c[1]=-f[1],c[2]=-f[2],c[3]=-f[3],c},g.inverse=function(c,f){return c[0]=1/f[0],c[1]=1/f[1],c[2]=1/f[2],c[3]=1/f[3],c},g.normalize=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=P*P+N*N+k*k+W*W;return z>0&&(z=1/Math.sqrt(z),c[0]=f[0]*z,c[1]=f[1]*z,c[2]=f[2]*z,c[3]=f[3]*z),c},g.dot=function(c,f){return c[0]*f[0]+c[1]*f[1]+c[2]*f[2]+c[3]*f[3]},g.lerp=function(c,f,P,N){var k=f[0],W=f[1],z=f[2],Z=f[3];return c[0]=k+N*(P[0]-k),c[1]=W+N*(P[1]-W),c[2]=z+N*(P[2]-z),c[3]=Z+N*(P[3]-Z),c},g.random=function(c,f){return f=f||1,c[0]=x(),c[1]=x(),c[2]=x(),c[3]=x(),g.normalize(c,c),g.scale(c,c,f),c},g.transformMat4=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3];return c[0]=P[0]*N+P[4]*k+P[8]*W+P[12]*z,c[1]=P[1]*N+P[5]*k+P[9]*W+P[13]*z,c[2]=P[2]*N+P[6]*k+P[10]*W+P[14]*z,c[3]=P[3]*N+P[7]*k+P[11]*W+P[15]*z,c},g.transformQuat=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=P[0],Z=P[1],J=P[2],ee=P[3],$=ee*N+Z*W-J*k,ie=ee*k+J*N-z*W,se=ee*W+z*k-Z*N,ne=-z*N-Z*k-J*W;return c[0]=$*ee+ne*-z+ie*-J-se*-Z,c[1]=ie*ee+ne*-Z+se*-z-$*-J,c[2]=se*ee+ne*-J+$*-Z-ie*-z,c},g.forEach=function(){var c=g.create();return function(f,P,N,k,W,z){var Z,J;for(P||(P=4),N||(N=0),k?J=Math.min(k*P+N,f.length):J=f.length,Z=N;Z<J;Z+=P)c[0]=f[Z],c[1]=f[Z+1],c[2]=f[Z+2],c[3]=f[Z+3],W(c,c,z),f[Z]=c[0],f[Z+1]=c[1],f[Z+2]=c[2],f[Z+3]=c[3];return f}}(),g.str=function(c){return"vec4("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+")"},typeof w!="undefined"&&(w.vec4=g);var A={};A.create=function(){var c=new T(4);return c[0]=1,c[1]=0,c[2]=0,c[3]=1,c},A.clone=function(c){var f=new T(4);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f},A.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c},A.identity=function(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=1,c},A.transpose=function(c,f){if(c===f){var P=f[1];c[1]=f[2],c[2]=P}else c[0]=f[0],c[1]=f[2],c[2]=f[1],c[3]=f[3];return c},A.invert=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=P*W-k*N;return z?(z=1/z,c[0]=W*z,c[1]=-N*z,c[2]=-k*z,c[3]=P*z,c):null},A.adjoint=function(c,f){var P=f[0];return c[0]=f[3],c[1]=-f[1],c[2]=-f[2],c[3]=P,c},A.determinant=function(c){return c[0]*c[3]-c[2]*c[1]},A.multiply=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=P[0],J=P[1],ee=P[2],$=P[3];return c[0]=N*Z+W*J,c[1]=k*Z+z*J,c[2]=N*ee+W*$,c[3]=k*ee+z*$,c},A.mul=A.multiply,A.rotate=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(P),J=Math.cos(P);return c[0]=N*J+W*Z,c[1]=k*J+z*Z,c[2]=N*-Z+W*J,c[3]=k*-Z+z*J,c},A.scale=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=P[0],J=P[1];return c[0]=N*Z,c[1]=k*Z,c[2]=W*J,c[3]=z*J,c},A.str=function(c){return"mat2("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+")"},A.frob=function(c){return Math.sqrt(Math.pow(c[0],2)+Math.pow(c[1],2)+Math.pow(c[2],2)+Math.pow(c[3],2))},A.LDU=function(c,f,P,N){return c[2]=N[2]/N[0],P[0]=N[0],P[1]=N[1],P[3]=N[3]-c[2]*P[1],[c,f,P]},typeof w!="undefined"&&(w.mat2=A);var M={};M.create=function(){var c=new T(6);return c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c},M.clone=function(c){var f=new T(6);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f[4]=c[4],f[5]=c[5],f},M.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c},M.identity=function(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=1,c[4]=0,c[5]=0,c},M.invert=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=f[4],Z=f[5],J=P*W-N*k;return J?(J=1/J,c[0]=W*J,c[1]=-N*J,c[2]=-k*J,c[3]=P*J,c[4]=(k*Z-W*z)*J,c[5]=(N*z-P*Z)*J,c):null},M.determinant=function(c){return c[0]*c[3]-c[1]*c[2]},M.multiply=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=P[0],$=P[1],ie=P[2],se=P[3],ne=P[4],ce=P[5];return c[0]=N*ee+W*$,c[1]=k*ee+z*$,c[2]=N*ie+W*se,c[3]=k*ie+z*se,c[4]=N*ne+W*ce+Z,c[5]=k*ne+z*ce+J,c},M.mul=M.multiply,M.rotate=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=Math.sin(P),$=Math.cos(P);return c[0]=N*$+W*ee,c[1]=k*$+z*ee,c[2]=N*-ee+W*$,c[3]=k*-ee+z*$,c[4]=Z,c[5]=J,c},M.scale=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=P[0],$=P[1];return c[0]=N*ee,c[1]=k*ee,c[2]=W*$,c[3]=z*$,c[4]=Z,c[5]=J,c},M.translate=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=P[0],$=P[1];return c[0]=N,c[1]=k,c[2]=W,c[3]=z,c[4]=N*ee+W*$+Z,c[5]=k*ee+z*$+J,c},M.str=function(c){return"mat2d("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+", "+c[4]+", "+c[5]+")"},M.frob=function(c){return Math.sqrt(Math.pow(c[0],2)+Math.pow(c[1],2)+Math.pow(c[2],2)+Math.pow(c[3],2)+Math.pow(c[4],2)+Math.pow(c[5],2)+1)},typeof w!="undefined"&&(w.mat2d=M);var O={};O.create=function(){var c=new T(9);return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=1,c[5]=0,c[6]=0,c[7]=0,c[8]=1,c},O.fromMat4=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[4],c[4]=f[5],c[5]=f[6],c[6]=f[8],c[7]=f[9],c[8]=f[10],c},O.clone=function(c){var f=new T(9);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f[4]=c[4],f[5]=c[5],f[6]=c[6],f[7]=c[7],f[8]=c[8],f},O.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=f[6],c[7]=f[7],c[8]=f[8],c},O.identity=function(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=1,c[5]=0,c[6]=0,c[7]=0,c[8]=1,c},O.transpose=function(c,f){if(c===f){var P=f[1],N=f[2],k=f[5];c[1]=f[3],c[2]=f[6],c[3]=P,c[5]=f[7],c[6]=N,c[7]=k}else c[0]=f[0],c[1]=f[3],c[2]=f[6],c[3]=f[1],c[4]=f[4],c[5]=f[7],c[6]=f[2],c[7]=f[5],c[8]=f[8];return c},O.invert=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=f[4],Z=f[5],J=f[6],ee=f[7],$=f[8],ie=$*z-Z*ee,se=-$*W+Z*J,ne=ee*W-z*J,ce=P*ie+N*se+k*ne;return ce?(ce=1/ce,c[0]=ie*ce,c[1]=(-$*N+k*ee)*ce,c[2]=(Z*N-k*z)*ce,c[3]=se*ce,c[4]=($*P-k*J)*ce,c[5]=(-Z*P+k*W)*ce,c[6]=ne*ce,c[7]=(-ee*P+N*J)*ce,c[8]=(z*P-N*W)*ce,c):null},O.adjoint=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=f[4],Z=f[5],J=f[6],ee=f[7],$=f[8];return c[0]=z*$-Z*ee,c[1]=k*ee-N*$,c[2]=N*Z-k*z,c[3]=Z*J-W*$,c[4]=P*$-k*J,c[5]=k*W-P*Z,c[6]=W*ee-z*J,c[7]=N*J-P*ee,c[8]=P*z-N*W,c},O.determinant=function(c){var f=c[0],P=c[1],N=c[2],k=c[3],W=c[4],z=c[5],Z=c[6],J=c[7],ee=c[8];return f*(ee*W-z*J)+P*(-ee*k+z*Z)+N*(J*k-W*Z)},O.multiply=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=f[6],$=f[7],ie=f[8],se=P[0],ne=P[1],ce=P[2],ae=P[3],fe=P[4],oe=P[5],pe=P[6],_e=P[7],de=P[8];return c[0]=se*N+ne*z+ce*ee,c[1]=se*k+ne*Z+ce*$,c[2]=se*W+ne*J+ce*ie,c[3]=ae*N+fe*z+oe*ee,c[4]=ae*k+fe*Z+oe*$,c[5]=ae*W+fe*J+oe*ie,c[6]=pe*N+_e*z+de*ee,c[7]=pe*k+_e*Z+de*$,c[8]=pe*W+_e*J+de*ie,c},O.mul=O.multiply,O.translate=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=f[6],$=f[7],ie=f[8],se=P[0],ne=P[1];return c[0]=N,c[1]=k,c[2]=W,c[3]=z,c[4]=Z,c[5]=J,c[6]=se*N+ne*z+ee,c[7]=se*k+ne*Z+$,c[8]=se*W+ne*J+ie,c},O.rotate=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=f[6],$=f[7],ie=f[8],se=Math.sin(P),ne=Math.cos(P);return c[0]=ne*N+se*z,c[1]=ne*k+se*Z,c[2]=ne*W+se*J,c[3]=ne*z-se*N,c[4]=ne*Z-se*k,c[5]=ne*J-se*W,c[6]=ee,c[7]=$,c[8]=ie,c},O.scale=function(c,f,P){var N=P[0],k=P[1];return c[0]=N*f[0],c[1]=N*f[1],c[2]=N*f[2],c[3]=k*f[3],c[4]=k*f[4],c[5]=k*f[5],c[6]=f[6],c[7]=f[7],c[8]=f[8],c},O.fromMat2d=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=0,c[3]=f[2],c[4]=f[3],c[5]=0,c[6]=f[4],c[7]=f[5],c[8]=1,c},O.fromQuat=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=P+P,Z=N+N,J=k+k,ee=P*z,$=N*z,ie=N*Z,se=k*z,ne=k*Z,ce=k*J,ae=W*z,fe=W*Z,oe=W*J;return c[0]=1-ie-ce,c[3]=$-oe,c[6]=se+fe,c[1]=$+oe,c[4]=1-ee-ce,c[7]=ne-ae,c[2]=se-fe,c[5]=ne+ae,c[8]=1-ee-ie,c},O.normalFromMat4=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=f[4],Z=f[5],J=f[6],ee=f[7],$=f[8],ie=f[9],se=f[10],ne=f[11],ce=f[12],ae=f[13],fe=f[14],oe=f[15],pe=P*Z-N*z,_e=P*J-k*z,de=P*ee-W*z,be=N*J-k*Z,Ae=N*ee-W*Z,Fe=k*ee-W*J,Ue=$*ae-ie*ce,it=$*fe-se*ce,tt=$*oe-ne*ce,et=ie*fe-se*ae,vt=ie*oe-ne*ae,dt=se*oe-ne*fe,je=pe*dt-_e*vt+de*et+be*tt-Ae*it+Fe*Ue;return je?(je=1/je,c[0]=(Z*dt-J*vt+ee*et)*je,c[1]=(J*tt-z*dt-ee*it)*je,c[2]=(z*vt-Z*tt+ee*Ue)*je,c[3]=(k*vt-N*dt-W*et)*je,c[4]=(P*dt-k*tt+W*it)*je,c[5]=(N*tt-P*vt-W*Ue)*je,c[6]=(ae*Fe-fe*Ae+oe*be)*je,c[7]=(fe*de-ce*Fe-oe*_e)*je,c[8]=(ce*Ae-ae*de+oe*pe)*je,c):null},O.str=function(c){return"mat3("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+", "+c[4]+", "+c[5]+", "+c[6]+", "+c[7]+", "+c[8]+")"},O.frob=function(c){return Math.sqrt(Math.pow(c[0],2)+Math.pow(c[1],2)+Math.pow(c[2],2)+Math.pow(c[3],2)+Math.pow(c[4],2)+Math.pow(c[5],2)+Math.pow(c[6],2)+Math.pow(c[7],2)+Math.pow(c[8],2))},typeof w!="undefined"&&(w.mat3=O);var S={};S.create=function(){var c=new T(16);return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},S.clone=function(c){var f=new T(16);return f[0]=c[0],f[1]=c[1],f[2]=c[2],f[3]=c[3],f[4]=c[4],f[5]=c[5],f[6]=c[6],f[7]=c[7],f[8]=c[8],f[9]=c[9],f[10]=c[10],f[11]=c[11],f[12]=c[12],f[13]=c[13],f[14]=c[14],f[15]=c[15],f},S.copy=function(c,f){return c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c[4]=f[4],c[5]=f[5],c[6]=f[6],c[7]=f[7],c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15],c},S.identity=function(c){return c[0]=1,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=1,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=1,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},S.transpose=function(c,f){if(c===f){var P=f[1],N=f[2],k=f[3],W=f[6],z=f[7],Z=f[11];c[1]=f[4],c[2]=f[8],c[3]=f[12],c[4]=P,c[6]=f[9],c[7]=f[13],c[8]=N,c[9]=W,c[11]=f[14],c[12]=k,c[13]=z,c[14]=Z}else c[0]=f[0],c[1]=f[4],c[2]=f[8],c[3]=f[12],c[4]=f[1],c[5]=f[5],c[6]=f[9],c[7]=f[13],c[8]=f[2],c[9]=f[6],c[10]=f[10],c[11]=f[14],c[12]=f[3],c[13]=f[7],c[14]=f[11],c[15]=f[15];return c},S.invert=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=f[4],Z=f[5],J=f[6],ee=f[7],$=f[8],ie=f[9],se=f[10],ne=f[11],ce=f[12],ae=f[13],fe=f[14],oe=f[15],pe=P*Z-N*z,_e=P*J-k*z,de=P*ee-W*z,be=N*J-k*Z,Ae=N*ee-W*Z,Fe=k*ee-W*J,Ue=$*ae-ie*ce,it=$*fe-se*ce,tt=$*oe-ne*ce,et=ie*fe-se*ae,vt=ie*oe-ne*ae,dt=se*oe-ne*fe,je=pe*dt-_e*vt+de*et+be*tt-Ae*it+Fe*Ue;return je?(je=1/je,c[0]=(Z*dt-J*vt+ee*et)*je,c[1]=(k*vt-N*dt-W*et)*je,c[2]=(ae*Fe-fe*Ae+oe*be)*je,c[3]=(se*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$*(N*ee-W*Z)),c[12]=-(z*(ie*fe-se*ae)-$*(Z*fe-J*ae)+ce*(Z*se-J*ie)),c[13]=P*(ie*fe-se*ae)-$*(N*fe-k*ae)+ce*(N*se-k*ie),c[14]=-(P*(Z*fe-J*ae)-z*(N*fe-k*ae)+ce*(N*J-k*Z)),c[15]=P*(Z*se-J*ie)-z*(N*se-k*ie)+$*(N*J-k*Z),c},S.determinant=function(c){var f=c[0],P=c[1],N=c[2],k=c[3],W=c[4],z=c[5],Z=c[6],J=c[7],ee=c[8],$=c[9],ie=c[10],se=c[11],ne=c[12],ce=c[13],ae=c[14],fe=c[15],oe=f*z-P*W,pe=f*Z-N*W,_e=f*J-k*W,de=P*Z-N*z,be=P*J-k*z,Ae=N*J-k*Z,Fe=ee*ce-$*ne,Ue=ee*ae-ie*ne,it=ee*fe-se*ne,tt=$*ae-ie*ce,et=$*fe-se*ce,vt=ie*fe-se*ae;return oe*vt-pe*et+_e*tt+de*it-be*Ue+Ae*Fe},S.multiply=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=f[4],J=f[5],ee=f[6],$=f[7],ie=f[8],se=f[9],ne=f[10],ce=f[11],ae=f[12],fe=f[13],oe=f[14],pe=f[15],_e=P[0],de=P[1],be=P[2],Ae=P[3];return c[0]=_e*N+de*Z+be*ie+Ae*ae,c[1]=_e*k+de*J+be*se+Ae*fe,c[2]=_e*W+de*ee+be*ne+Ae*oe,c[3]=_e*z+de*$+be*ce+Ae*pe,_e=P[4],de=P[5],be=P[6],Ae=P[7],c[4]=_e*N+de*Z+be*ie+Ae*ae,c[5]=_e*k+de*J+be*se+Ae*fe,c[6]=_e*W+de*ee+be*ne+Ae*oe,c[7]=_e*z+de*$+be*ce+Ae*pe,_e=P[8],de=P[9],be=P[10],Ae=P[11],c[8]=_e*N+de*Z+be*ie+Ae*ae,c[9]=_e*k+de*J+be*se+Ae*fe,c[10]=_e*W+de*ee+be*ne+Ae*oe,c[11]=_e*z+de*$+be*ce+Ae*pe,_e=P[12],de=P[13],be=P[14],Ae=P[15],c[12]=_e*N+de*Z+be*ie+Ae*ae,c[13]=_e*k+de*J+be*se+Ae*fe,c[14]=_e*W+de*ee+be*ne+Ae*oe,c[15]=_e*z+de*$+be*ce+Ae*pe,c},S.multiplyAffine=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[4],Z=f[5],J=f[6],ee=f[8],$=f[9],ie=f[10],se=f[12],ne=f[13],ce=f[14],ae=P[0],fe=P[1],oe=P[2];return c[0]=ae*N+fe*z+oe*ee,c[1]=ae*k+fe*Z+oe*$,c[2]=ae*W+fe*J+oe*ie,ae=P[4],fe=P[5],oe=P[6],c[4]=ae*N+fe*z+oe*ee,c[5]=ae*k+fe*Z+oe*$,c[6]=ae*W+fe*J+oe*ie,ae=P[8],fe=P[9],oe=P[10],c[8]=ae*N+fe*z+oe*ee,c[9]=ae*k+fe*Z+oe*$,c[10]=ae*W+fe*J+oe*ie,ae=P[12],fe=P[13],oe=P[14],c[12]=ae*N+fe*z+oe*ee+se,c[13]=ae*k+fe*Z+oe*$+ne,c[14]=ae*W+fe*J+oe*ie+ce,c},S.mul=S.multiply,S.mulAffine=S.multiplyAffine,S.translate=function(c,f,P){var N=P[0],k=P[1],W=P[2],z,Z,J,ee,$,ie,se,ne,ce,ae,fe,oe;return f===c?(c[12]=f[0]*N+f[4]*k+f[8]*W+f[12],c[13]=f[1]*N+f[5]*k+f[9]*W+f[13],c[14]=f[2]*N+f[6]*k+f[10]*W+f[14],c[15]=f[3]*N+f[7]*k+f[11]*W+f[15]):(z=f[0],Z=f[1],J=f[2],ee=f[3],$=f[4],ie=f[5],se=f[6],ne=f[7],ce=f[8],ae=f[9],fe=f[10],oe=f[11],c[0]=z,c[1]=Z,c[2]=J,c[3]=ee,c[4]=$,c[5]=ie,c[6]=se,c[7]=ne,c[8]=ce,c[9]=ae,c[10]=fe,c[11]=oe,c[12]=z*N+$*k+ce*W+f[12],c[13]=Z*N+ie*k+ae*W+f[13],c[14]=J*N+se*k+fe*W+f[14],c[15]=ee*N+ne*k+oe*W+f[15]),c},S.scale=function(c,f,P){var N=P[0],k=P[1],W=P[2];return c[0]=f[0]*N,c[1]=f[1]*N,c[2]=f[2]*N,c[3]=f[3]*N,c[4]=f[4]*k,c[5]=f[5]*k,c[6]=f[6]*k,c[7]=f[7]*k,c[8]=f[8]*W,c[9]=f[9]*W,c[10]=f[10]*W,c[11]=f[11]*W,c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15],c},S.rotate=function(c,f,P,N){var k=N[0],W=N[1],z=N[2],Z=Math.sqrt(k*k+W*W+z*z),J,ee,$,ie,se,ne,ce,ae,fe,oe,pe,_e,de,be,Ae,Fe,Ue,it,tt,et,vt,dt,je,nt;return Math.abs(Z)<y?null:(Z=1/Z,k*=Z,W*=Z,z*=Z,J=Math.sin(P),ee=Math.cos(P),$=1-ee,ie=f[0],se=f[1],ne=f[2],ce=f[3],ae=f[4],fe=f[5],oe=f[6],pe=f[7],_e=f[8],de=f[9],be=f[10],Ae=f[11],Fe=k*k*$+ee,Ue=W*k*$+z*J,it=z*k*$-W*J,tt=k*W*$-z*J,et=W*W*$+ee,vt=z*W*$+k*J,dt=k*z*$+W*J,je=W*z*$-k*J,nt=z*z*$+ee,c[0]=ie*Fe+ae*Ue+_e*it,c[1]=se*Fe+fe*Ue+de*it,c[2]=ne*Fe+oe*Ue+be*it,c[3]=ce*Fe+pe*Ue+Ae*it,c[4]=ie*tt+ae*et+_e*vt,c[5]=se*tt+fe*et+de*vt,c[6]=ne*tt+oe*et+be*vt,c[7]=ce*tt+pe*et+Ae*vt,c[8]=ie*dt+ae*je+_e*nt,c[9]=se*dt+fe*je+de*nt,c[10]=ne*dt+oe*je+be*nt,c[11]=ce*dt+pe*je+Ae*nt,f!==c&&(c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15]),c)},S.rotateX=function(c,f,P){var N=Math.sin(P),k=Math.cos(P),W=f[4],z=f[5],Z=f[6],J=f[7],ee=f[8],$=f[9],ie=f[10],se=f[11];return f!==c&&(c[0]=f[0],c[1]=f[1],c[2]=f[2],c[3]=f[3],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15]),c[4]=W*k+ee*N,c[5]=z*k+$*N,c[6]=Z*k+ie*N,c[7]=J*k+se*N,c[8]=ee*k-W*N,c[9]=$*k-z*N,c[10]=ie*k-Z*N,c[11]=se*k-J*N,c},S.rotateY=function(c,f,P){var N=Math.sin(P),k=Math.cos(P),W=f[0],z=f[1],Z=f[2],J=f[3],ee=f[8],$=f[9],ie=f[10],se=f[11];return f!==c&&(c[4]=f[4],c[5]=f[5],c[6]=f[6],c[7]=f[7],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15]),c[0]=W*k-ee*N,c[1]=z*k-$*N,c[2]=Z*k-ie*N,c[3]=J*k-se*N,c[8]=W*N+ee*k,c[9]=z*N+$*k,c[10]=Z*N+ie*k,c[11]=J*N+se*k,c},S.rotateZ=function(c,f,P){var N=Math.sin(P),k=Math.cos(P),W=f[0],z=f[1],Z=f[2],J=f[3],ee=f[4],$=f[5],ie=f[6],se=f[7];return f!==c&&(c[8]=f[8],c[9]=f[9],c[10]=f[10],c[11]=f[11],c[12]=f[12],c[13]=f[13],c[14]=f[14],c[15]=f[15]),c[0]=W*k+ee*N,c[1]=z*k+$*N,c[2]=Z*k+ie*N,c[3]=J*k+se*N,c[4]=ee*k-W*N,c[5]=$*k-z*N,c[6]=ie*k-Z*N,c[7]=se*k-J*N,c},S.fromRotationTranslation=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=N+N,J=k+k,ee=W+W,$=N*Z,ie=N*J,se=N*ee,ne=k*J,ce=k*ee,ae=W*ee,fe=z*Z,oe=z*J,pe=z*ee;return c[0]=1-(ne+ae),c[1]=ie+pe,c[2]=se-oe,c[3]=0,c[4]=ie-pe,c[5]=1-($+ae),c[6]=ce+fe,c[7]=0,c[8]=se+oe,c[9]=ce-fe,c[10]=1-($+ne),c[11]=0,c[12]=P[0],c[13]=P[1],c[14]=P[2],c[15]=1,c},S.fromQuat=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=P+P,Z=N+N,J=k+k,ee=P*z,$=N*z,ie=N*Z,se=k*z,ne=k*Z,ce=k*J,ae=W*z,fe=W*Z,oe=W*J;return c[0]=1-ie-ce,c[1]=$+oe,c[2]=se-fe,c[3]=0,c[4]=$-oe,c[5]=1-ee-ce,c[6]=ne+ae,c[7]=0,c[8]=se+fe,c[9]=ne-ae,c[10]=1-ee-ie,c[11]=0,c[12]=0,c[13]=0,c[14]=0,c[15]=1,c},S.frustum=function(c,f,P,N,k,W,z){var Z=1/(P-f),J=1/(k-N),ee=1/(W-z);return c[0]=W*2*Z,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=W*2*J,c[6]=0,c[7]=0,c[8]=(P+f)*Z,c[9]=(k+N)*J,c[10]=(z+W)*ee,c[11]=-1,c[12]=0,c[13]=0,c[14]=z*W*2*ee,c[15]=0,c},S.perspective=function(c,f,P,N,k){var W=1/Math.tan(f/2),z=1/(N-k);return c[0]=W/P,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=W,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=(k+N)*z,c[11]=-1,c[12]=0,c[13]=0,c[14]=2*k*N*z,c[15]=0,c},S.ortho=function(c,f,P,N,k,W,z){var Z=1/(f-P),J=1/(N-k),ee=1/(W-z);return c[0]=-2*Z,c[1]=0,c[2]=0,c[3]=0,c[4]=0,c[5]=-2*J,c[6]=0,c[7]=0,c[8]=0,c[9]=0,c[10]=2*ee,c[11]=0,c[12]=(f+P)*Z,c[13]=(k+N)*J,c[14]=(z+W)*ee,c[15]=1,c},S.lookAt=function(c,f,P,N){var k,W,z,Z,J,ee,$,ie,se,ne,ce=f[0],ae=f[1],fe=f[2],oe=N[0],pe=N[1],_e=N[2],de=P[0],be=P[1],Ae=P[2];return Math.abs(ce-de)<y&&Math.abs(ae-be)<y&&Math.abs(fe-Ae)<y?S.identity(c):($=ce-de,ie=ae-be,se=fe-Ae,ne=1/Math.sqrt($*$+ie*ie+se*se),$*=ne,ie*=ne,se*=ne,k=pe*se-_e*ie,W=_e*$-oe*se,z=oe*ie-pe*$,ne=Math.sqrt(k*k+W*W+z*z),ne?(ne=1/ne,k*=ne,W*=ne,z*=ne):(k=0,W=0,z=0),Z=ie*z-se*W,J=se*k-$*z,ee=$*W-ie*k,ne=Math.sqrt(Z*Z+J*J+ee*ee),ne?(ne=1/ne,Z*=ne,J*=ne,ee*=ne):(Z=0,J=0,ee=0),c[0]=k,c[1]=Z,c[2]=$,c[3]=0,c[4]=W,c[5]=J,c[6]=ie,c[7]=0,c[8]=z,c[9]=ee,c[10]=se,c[11]=0,c[12]=-(k*ce+W*ae+z*fe),c[13]=-(Z*ce+J*ae+ee*fe),c[14]=-($*ce+ie*ae+se*fe),c[15]=1,c)},S.str=function(c){return"mat4("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+", "+c[4]+", "+c[5]+", "+c[6]+", "+c[7]+", "+c[8]+", "+c[9]+", "+c[10]+", "+c[11]+", "+c[12]+", "+c[13]+", "+c[14]+", "+c[15]+")"},S.frob=function(c){return Math.sqrt(Math.pow(c[0],2)+Math.pow(c[1],2)+Math.pow(c[2],2)+Math.pow(c[3],2)+Math.pow(c[4],2)+Math.pow(c[5],2)+Math.pow(c[6],2)+Math.pow(c[7],2)+Math.pow(c[8],2)+Math.pow(c[9],2)+Math.pow(c[10],2)+Math.pow(c[11],2)+Math.pow(c[12],2)+Math.pow(c[13],2)+Math.pow(c[14],2)+Math.pow(c[15],2))},typeof w!="undefined"&&(w.mat4=S);var I={};I.create=function(){var c=new T(4);return c[0]=0,c[1]=0,c[2]=0,c[3]=1,c},I.rotationTo=function(){var c=d.create(),f=d.fromValues(1,0,0),P=d.fromValues(0,1,0);return function(N,k,W){var z=d.dot(k,W);return z<-.999999?(d.cross(c,f,k),d.length(c)<1e-6&&d.cross(c,P,k),d.normalize(c,c),I.setAxisAngle(N,c,Math.PI),N):z>.999999?(N[0]=0,N[1]=0,N[2]=0,N[3]=1,N):(d.cross(c,k,W),N[0]=c[0],N[1]=c[1],N[2]=c[2],N[3]=1+z,I.normalize(N,N))}}(),I.setAxes=function(){var c=O.create();return function(f,P,N,k){return c[0]=N[0],c[3]=N[1],c[6]=N[2],c[1]=k[0],c[4]=k[1],c[7]=k[2],c[2]=-P[0],c[5]=-P[1],c[8]=-P[2],I.normalize(f,I.fromMat3(f,c))}}(),I.clone=g.clone,I.fromValues=g.fromValues,I.copy=g.copy,I.set=g.set,I.identity=function(c){return c[0]=0,c[1]=0,c[2]=0,c[3]=1,c},I.setAxisAngle=function(c,f,P){P=P*.5;var N=Math.sin(P);return c[0]=N*f[0],c[1]=N*f[1],c[2]=N*f[2],c[3]=Math.cos(P),c},I.add=g.add,I.multiply=function(c,f,P){var N=f[0],k=f[1],W=f[2],z=f[3],Z=P[0],J=P[1],ee=P[2],$=P[3];return c[0]=N*$+z*Z+k*ee-W*J,c[1]=k*$+z*J+W*Z-N*ee,c[2]=W*$+z*ee+N*J-k*Z,c[3]=z*$-N*Z-k*J-W*ee,c},I.mul=I.multiply,I.scale=g.scale,I.rotateX=function(c,f,P){P*=.5;var N=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(P),J=Math.cos(P);return c[0]=N*J+z*Z,c[1]=k*J+W*Z,c[2]=W*J-k*Z,c[3]=z*J-N*Z,c},I.rotateY=function(c,f,P){P*=.5;var N=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(P),J=Math.cos(P);return c[0]=N*J-W*Z,c[1]=k*J+z*Z,c[2]=W*J+N*Z,c[3]=z*J-k*Z,c},I.rotateZ=function(c,f,P){P*=.5;var N=f[0],k=f[1],W=f[2],z=f[3],Z=Math.sin(P),J=Math.cos(P);return c[0]=N*J+k*Z,c[1]=k*J-N*Z,c[2]=W*J+z*Z,c[3]=z*J-W*Z,c},I.calculateW=function(c,f){var P=f[0],N=f[1],k=f[2];return c[0]=P,c[1]=N,c[2]=k,c[3]=Math.sqrt(Math.abs(1-P*P-N*N-k*k)),c},I.dot=g.dot,I.lerp=g.lerp,I.slerp=function(c,f,P,N){var k=f[0],W=f[1],z=f[2],Z=f[3],J=P[0],ee=P[1],$=P[2],ie=P[3],se,ne,ce,ae,fe;return ne=k*J+W*ee+z*$+Z*ie,ne<0&&(ne=-ne,J=-J,ee=-ee,$=-$,ie=-ie),1-ne>1e-6?(se=Math.acos(ne),ce=Math.sin(se),ae=Math.sin((1-N)*se)/ce,fe=Math.sin(N*se)/ce):(ae=1-N,fe=N),c[0]=ae*k+fe*J,c[1]=ae*W+fe*ee,c[2]=ae*z+fe*$,c[3]=ae*Z+fe*ie,c},I.invert=function(c,f){var P=f[0],N=f[1],k=f[2],W=f[3],z=P*P+N*N+k*k+W*W,Z=z?1/z:0;return c[0]=-P*Z,c[1]=-N*Z,c[2]=-k*Z,c[3]=W*Z,c},I.conjugate=function(c,f){return c[0]=-f[0],c[1]=-f[1],c[2]=-f[2],c[3]=f[3],c},I.length=g.length,I.len=I.length,I.squaredLength=g.squaredLength,I.sqrLen=I.squaredLength,I.normalize=g.normalize,I.fromMat3=function(c,f){var P=f[0]+f[4]+f[8],N;if(P>0)N=Math.sqrt(P+1),c[3]=.5*N,N=.5/N,c[0]=(f[5]-f[7])*N,c[1]=(f[6]-f[2])*N,c[2]=(f[1]-f[3])*N;else{var k=0;f[4]>f[0]&&(k=1),f[8]>f[k*3+k]&&(k=2);var W=(k+1)%3,z=(k+2)%3;N=Math.sqrt(f[k*3+k]-f[W*3+W]-f[z*3+z]+1),c[k]=.5*N,N=.5/N,c[3]=(f[W*3+z]-f[z*3+W])*N,c[W]=(f[W*3+k]+f[k*3+W])*N,c[z]=(f[z*3+k]+f[k*3+z])*N}return c},I.str=function(c){return"quat("+c[0]+", "+c[1]+", "+c[2]+", "+c[3]+")"},typeof w!="undefined"&&(w.quat=I)}(C.exports)})(this)},function(re,V,b){"use strict";var U=b(24),C=b(46),w=b(5),y=b(6),T=b(7),x=b(17),p=b(28),m=b(13),L=b(0),d=b.n(L),g=b(29),A=b(53),M=b.n(A),O=b(54),S=b(106),I=b(107),c=b(113),f=b(114),P=b(3),N=b(68),k=b(37),W=b(69),z=b(116),Z=b(70),J=b(71),ee=b(72),$=b(36),ie=b(30),se=b(23),ne=b(4),ce=b(117),ae=b(50),fe=b(118),oe=b(119),pe=b(120),_e=b(9),de=b(67),be=b(49),Ae=b(15),Fe=b(52),Ue=b(121),it=b(126),tt=b(63),et=b(127),vt=b(128),dt=b(129),je=b(130),nt=b(131),rt=b(132);d.a.util.extend(p.a.prototype,Ue.a),T.a.import(it.a),T.a.import(tt.a),T.a.import(et.a),T.a.import(vt.a),T.a.import(dt.a),T.a.import(je.a),T.a.import(nt.a),T.a.import(rt.a);function ft(Ye){return!Ye||Ye==="none"}function lt(Ye){return Ye instanceof HTMLCanvasElement||Ye instanceof HTMLImageElement||Ye instanceof Image}function wt(Ye){return Ye.getZr&&Ye.setOption}var Re=g.a.prototype.addToScene,We=g.a.prototype.removeFromScene;g.a.prototype.addToScene=function(Ye){if(Re.call(this,Ye),this.__zr){var qe=this.__zr;Ye.traverse(function(ot){ot.__zr=qe,ot.addAnimatorsToZr&&ot.addAnimatorsToZr(qe)})}},g.a.prototype.removeFromScene=function(Ye){We.call(this,Ye),Ye.traverse(function(qe){var ot=qe.__zr;qe.__zr=null,ot&&qe.removeAnimatorsFromZr&&qe.removeAnimatorsFromZr(ot)})},x.a.prototype.setTextureImage=function(Ye,qe,ot,gt){if(this.shader){var pt=ot.getZr(),Lt=this,Tt;return Lt.autoUpdateTextureStatus=!1,Lt.disableTexture(Ye),ft(qe)||(Tt=Pe.loadTexture(qe,ot,gt,function(Nt){Lt.enableTexture(Ye),pt&&pt.refresh()}),Lt.set(Ye,Tt)),Tt}};var Pe={};Pe.Renderer=C.a,Pe.Node=p.a,Pe.Mesh=U.a,Pe.Shader=T.a,Pe.Material=x.a,Pe.Texture=y.a,Pe.Texture2D=w.a,Pe.Geometry=m.a,Pe.SphereGeometry=N.a,Pe.PlaneGeometry=k.a,Pe.CubeGeometry=W.a,Pe.AmbientLight=z.a,Pe.DirectionalLight=Z.a,Pe.PointLight=J.a,Pe.SpotLight=ee.a,Pe.PerspectiveCamera=$.a,Pe.OrthographicCamera=ie.a,Pe.Vector2=se.a,Pe.Vector3=ne.a,Pe.Vector4=ce.a,Pe.Quaternion=ae.a,Pe.Matrix2=fe.a,Pe.Matrix2d=oe.a,Pe.Matrix3=pe.a,Pe.Matrix4=_e.a,Pe.Plane=de.a,Pe.Ray=be.a,Pe.BoundingBox=Ae.a,Pe.Frustum=Fe.a;var ke=O.a.createBlank("rgba(255,255,255,0)").image;function Ze(Ye){return Math.pow(2,Math.round(Math.log(Ye)/Math.LN2))}function Ie(Ye){if((Ye.wrapS===y.a.REPEAT||Ye.wrapT===y.a.REPEAT)&&Ye.image){var qe=Ze(Ye.width),ot=Ze(Ye.height);if(qe!==Ye.width||ot!==Ye.height){var gt=document.createElement("canvas");gt.width=qe,gt.height=ot;var pt=gt.getContext("2d");pt.drawImage(Ye.image,0,0,qe,ot),Ye.image=gt}}}Pe.loadTexture=function(Ye,qe,ot,gt){typeof ot=="function"&&(gt=ot,ot={}),ot=ot||{};for(var pt=Object.keys(ot).sort(),Lt="",Tt=0;Tt<pt.length;Tt++)Lt+=pt[Tt]+"_"+ot[pt[Tt]]+"_";var Nt=qe.__textureCache=qe.__textureCache||new M.a(20);if(wt(Ye)){var jt=Ye.__textureid__,zt=Nt.get(Lt+jt);if(zt)zt.texture.surface.setECharts(Ye),gt&>(zt.texture);else{var Ot=new S.a(Ye);Ot.onupdate=function(){qe.getZr().refresh()},zt={texture:Ot.getTexture()};for(var Tt=0;Tt<pt.length;Tt++)zt.texture[pt[Tt]]=ot[pt[Tt]];jt=Ye.__textureid__||"__ecgl_ec__"+zt.texture.__uid__,Ye.__textureid__=jt,Nt.put(Lt+jt,zt),gt&>(zt.texture)}return zt.texture}else if(lt(Ye)){var jt=Ye.__textureid__,zt=Nt.get(Lt+jt);if(!zt){zt={texture:new Pe.Texture2D({image:Ye})};for(var Tt=0;Tt<pt.length;Tt++)zt.texture[pt[Tt]]=ot[pt[Tt]];jt=Ye.__textureid__||"__ecgl_image__"+zt.texture.__uid__,Ye.__textureid__=jt,Nt.put(Lt+jt,zt),Ie(zt.texture),gt&>(zt.texture)}return zt.texture}else{var zt=Nt.get(Lt+Ye);if(zt)zt.callbacks?zt.callbacks.push(gt):gt&>(zt.texture);else if(Ye.match(/.hdr$|^data:application\/octet-stream/)){zt={callbacks:[gt]};var Kt=O.a.loadTexture(Ye,{exposure:ot.exposure,fileType:"hdr"},function(){Kt.dirty(),zt.callbacks.forEach(function(On){On&&On(Kt)}),zt.callbacks=null});zt.texture=Kt,Nt.put(Lt+Ye,zt)}else{for(var Kt=new Pe.Texture2D({image:new Image}),Tt=0;Tt<pt.length;Tt++)Kt[pt[Tt]]=ot[pt[Tt]];zt={texture:Kt,callbacks:[gt]};var gn=Kt.image;gn.onload=function(){Kt.image=gn,Ie(Kt),Kt.dirty(),zt.callbacks.forEach(function(ir){ir&&ir(Kt)}),zt.callbacks=null},gn.src=Ye,Kt.image=ke,Nt.put(Lt+Ye,zt)}return zt.texture}},Pe.createAmbientCubemap=function(Ye,qe,ot,gt){Ye=Ye||{};var pt=Ye.texture,Lt=P.a.firstNotNull(Ye.exposure,1),Tt=new I.a({intensity:P.a.firstNotNull(Ye.specularIntensity,1)}),Nt=new c.a({intensity:P.a.firstNotNull(Ye.diffuseIntensity,1),coefficients:[.844,.712,.691,-.037,.083,.167,.343,.288,.299,-.041,-.021,-.009,-.003,-.041,-.064,-.011,-.007,-.004,-.031,.034,.081,-.06,-.049,-.06,.046,.056,.05]});return Tt.cubemap=Pe.loadTexture(pt,ot,{exposure:Lt},function(){Tt.cubemap.flipY=!1,Tt.prefilter(qe,32),Nt.coefficients=f.a.projectEnvironmentMap(qe,Tt.cubemap,{lod:1}),gt&>()}),{specular:Tt,diffuse:Nt}},Pe.createBlankTexture=O.a.createBlank,Pe.isImage=lt,Pe.additiveBlend=function(Ye){Ye.blendEquation(Ye.FUNC_ADD),Ye.blendFunc(Ye.SRC_ALPHA,Ye.ONE)},Pe.parseColor=function(Ye,qe){return Ye instanceof Array?(qe||(qe=[]),qe[0]=Ye[0],qe[1]=Ye[1],qe[2]=Ye[2],Ye.length>3?qe[3]=Ye[3]:qe[3]=1,qe):(qe=d.a.color.parse(Ye||"#000",qe)||[0,0,0,0],qe[0]/=255,qe[1]/=255,qe[2]/=255,qe)},Pe.directionFromAlphaBeta=function(Ye,qe){var ot=Ye/180*Math.PI+Math.PI/2,gt=-qe/180*Math.PI+Math.PI/2,pt=[],Lt=Math.sin(ot);return pt[0]=Lt*Math.cos(gt),pt[1]=-Math.cos(ot),pt[2]=Lt*Math.sin(gt),pt},Pe.getShadowResolution=function(Ye){var qe=1024;switch(Ye){case"low":qe=512;break;case"medium":break;case"high":qe=2048;break;case"ultra":qe=4096;break}return qe},Pe.COMMON_SHADERS=["lambert","color","realistic","hatching"],Pe.createShader=function(Ye){var qe=T.a.source(Ye+".vertex"),ot=T.a.source(Ye+".fragment");qe||console.error("Vertex shader of '%s' not exits",Ye),ot||console.error("Fragment shader of '%s' not exits",Ye);var gt=new T.a(qe,ot);return gt.name=Ye,gt},Pe.createMaterial=function(Ye,qe){qe instanceof Array||(qe=[qe]);var ot=Pe.createShader(Ye),gt=new x.a({shader:ot});return qe.forEach(function(pt){typeof pt=="string"&>.define(pt)}),gt},Pe.setMaterialFromModel=function(Ye,qe,ot,gt){qe.autoUpdateTextureStatus=!1;var pt=ot.getModel(Ye+"Material"),Lt=pt.get("detailTexture"),Tt=P.a.firstNotNull(pt.get("textureTiling"),1),Nt=P.a.firstNotNull(pt.get("textureOffset"),0);typeof Tt=="number"&&(Tt=[Tt,Tt]),typeof Nt=="number"&&(Nt=[Nt,Nt]);var jt=Tt[0]>1||Tt[1]>1?Pe.Texture.REPEAT:Pe.Texture.CLAMP_TO_EDGE,zt={anisotropic:8,wrapS:jt,wrapT:jt};if(Ye==="realistic"){var Ot=pt.get("roughness"),Kt=pt.get("metalness");Kt!=null?isNaN(Kt)&&(qe.setTextureImage("metalnessMap",Kt,gt,zt),Kt=P.a.firstNotNull(pt.get("metalnessAdjust"),.5)):Kt=0,Ot!=null?isNaN(Ot)&&(qe.setTextureImage("roughnessMap",Ot,gt,zt),Ot=P.a.firstNotNull(pt.get("roughnessAdjust"),.5)):Ot=.5;var gn=pt.get("normalTexture");qe.setTextureImage("detailMap",Lt,gt,zt),qe.setTextureImage("normalMap",gn,gt,zt),qe.set({roughness:Ot,metalness:Kt,detailUvRepeat:Tt,detailUvOffset:Nt})}else if(Ye==="lambert")qe.setTextureImage("detailMap",Lt,gt,zt),qe.set({detailUvRepeat:Tt,detailUvOffset:Nt});else if(Ye==="color")qe.setTextureImage("detailMap",Lt,gt,zt),qe.set({detailUvRepeat:Tt,detailUvOffset:Nt});else if(Ye==="hatching"){var $n=pt.get("hatchingTextures")||[];$n.length<6&&console.error("Invalid hatchingTextures.");for(var On=0;On<6;On++)qe.setTextureImage("hatch"+(On+1),$n[On],gt,{anisotropic:8,wrapS:Pe.Texture.REPEAT,wrapT:Pe.Texture.REPEAT});qe.set({detailUvRepeat:Tt,detailUvOffset:Nt})}},Pe.updateVertexAnimation=function(Ye,qe,ot,gt){var pt=gt.get("animation"),Lt=gt.get("animationDurationUpdate"),Tt=gt.get("animationEasingUpdate"),Nt=ot.shadowDepthMaterial;if(pt&&qe&&Lt>0&&qe.geometry.vertexCount===ot.geometry.vertexCount){ot.material.define("vertex","VERTEX_ANIMATION"),ot.ignorePreZ=!0,Nt&&Nt.define("vertex","VERTEX_ANIMATION");for(var jt=0;jt<Ye.length;jt++)ot.geometry.attributes[Ye[jt][0]].value=qe.geometry.attributes[Ye[jt][1]].value;ot.geometry.dirty(),ot.__percent=0,ot.material.set("percent",0),ot.stopAnimation(),ot.animate().when(Lt,{__percent:1}).during(function(){ot.material.set("percent",ot.__percent),Nt&&Nt.set("percent",ot.__percent)}).done(function(){ot.ignorePreZ=!1,ot.material.undefine("vertex","VERTEX_ANIMATION"),Nt&&Nt.undefine("vertex","VERTEX_ANIMATION")}).start(Tt)}else ot.material.undefine("vertex","VERTEX_ANIMATION"),Nt&&Nt.undefine("vertex","VERTEX_ANIMATION")},V.a=Pe},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w={firstNotNull:function(){for(var y=0,T=arguments.length;y<T;y++)if(arguments[y]!=null)return arguments[y]},queryDataIndex:function(y,T){if(T.dataIndexInside!=null)return T.dataIndexInside;if(T.dataIndex!=null)return C.a.util.isArray(T.dataIndex)?C.a.util.map(T.dataIndex,function(x){return y.indexOfRawIndex(x)}):y.indexOfRawIndex(T.dataIndex);if(T.name!=null)return C.a.util.isArray(T.name)?C.a.util.map(T.name,function(x){return y.indexOfName(x)}):y.indexOfName(T.name)}};V.a=w},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.vec3,y=function(g,A,M){g=g||0,A=A||0,M=M||0,this.array=w.fromValues(g,A,M),this._dirty=!0};y.prototype={constructor:y,add:function(g){return w.add(this.array,this.array,g.array),this._dirty=!0,this},set:function(g,A,M){return this.array[0]=g,this.array[1]=A,this.array[2]=M,this._dirty=!0,this},setArray:function(g){return this.array[0]=g[0],this.array[1]=g[1],this.array[2]=g[2],this._dirty=!0,this},clone:function(){return new y(this.x,this.y,this.z)},copy:function(g){return w.copy(this.array,g.array),this._dirty=!0,this},cross:function(g,A){return w.cross(this.array,g.array,A.array),this._dirty=!0,this},dist:function(g){return w.dist(this.array,g.array)},distance:function(g){return w.distance(this.array,g.array)},div:function(g){return w.div(this.array,this.array,g.array),this._dirty=!0,this},divide:function(g){return w.divide(this.array,this.array,g.array),this._dirty=!0,this},dot:function(g){return w.dot(this.array,g.array)},len:function(){return w.len(this.array)},length:function(){return w.length(this.array)},lerp:function(g,A,M){return w.lerp(this.array,g.array,A.array,M),this._dirty=!0,this},min:function(g){return w.min(this.array,this.array,g.array),this._dirty=!0,this},max:function(g){return w.max(this.array,this.array,g.array),this._dirty=!0,this},mul:function(g){return w.mul(this.array,this.array,g.array),this._dirty=!0,this},multiply:function(g){return w.multiply(this.array,this.array,g.array),this._dirty=!0,this},negate:function(){return w.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return w.normalize(this.array,this.array),this._dirty=!0,this},random:function(g){return w.random(this.array,g),this._dirty=!0,this},scale:function(g){return w.scale(this.array,this.array,g),this._dirty=!0,this},scaleAndAdd:function(g,A){return w.scaleAndAdd(this.array,this.array,g.array,A),this._dirty=!0,this},sqrDist:function(g){return w.sqrDist(this.array,g.array)},squaredDistance:function(g){return w.squaredDistance(this.array,g.array)},sqrLen:function(){return w.sqrLen(this.array)},squaredLength:function(){return w.squaredLength(this.array)},sub:function(g){return w.sub(this.array,this.array,g.array),this._dirty=!0,this},subtract:function(g){return w.subtract(this.array,this.array,g.array),this._dirty=!0,this},transformMat3:function(g){return w.transformMat3(this.array,this.array,g.array),this._dirty=!0,this},transformMat4:function(g){return w.transformMat4(this.array,this.array,g.array),this._dirty=!0,this},transformQuat:function(g){return w.transformQuat(this.array,this.array,g.array),this._dirty=!0,this},applyProjection:function(g){var A=this.array;if(g=g.array,g[15]===0){var M=-1/A[2];A[0]=g[0]*A[0]*M,A[1]=g[5]*A[1]*M,A[2]=(g[10]*A[2]+g[14])*M}else A[0]=g[0]*A[0]+g[12],A[1]=g[5]*A[1]+g[13],A[2]=g[10]*A[2]+g[14];return this._dirty=!0,this},eulerFromQuat:function(g,A){y.eulerFromQuat(this,g,A)},eulerFromMat3:function(g,A){y.eulerFromMat3(this,g,A)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var T=Object.defineProperty;if(T){var x=y.prototype;T(x,"x",{get:function(){return this.array[0]},set:function(g){this.array[0]=g,this._dirty=!0}}),T(x,"y",{get:function(){return this.array[1]},set:function(g){this.array[1]=g,this._dirty=!0}}),T(x,"z",{get:function(){return this.array[2]},set:function(g){this.array[2]=g,this._dirty=!0}})}y.add=function(g,A,M){return w.add(g.array,A.array,M.array),g._dirty=!0,g},y.set=function(g,A,M,O){w.set(g.array,A,M,O),g._dirty=!0},y.copy=function(g,A){return w.copy(g.array,A.array),g._dirty=!0,g},y.cross=function(g,A,M){return w.cross(g.array,A.array,M.array),g._dirty=!0,g},y.dist=function(g,A){return w.distance(g.array,A.array)},y.distance=y.dist,y.div=function(g,A,M){return w.divide(g.array,A.array,M.array),g._dirty=!0,g},y.divide=y.div,y.dot=function(g,A){return w.dot(g.array,A.array)},y.len=function(g){return w.length(g.array)},y.lerp=function(g,A,M,O){return w.lerp(g.array,A.array,M.array,O),g._dirty=!0,g},y.min=function(g,A,M){return w.min(g.array,A.array,M.array),g._dirty=!0,g},y.max=function(g,A,M){return w.max(g.array,A.array,M.array),g._dirty=!0,g},y.mul=function(g,A,M){return w.multiply(g.array,A.array,M.array),g._dirty=!0,g},y.multiply=y.mul,y.negate=function(g,A){return w.negate(g.array,A.array),g._dirty=!0,g},y.normalize=function(g,A){return w.normalize(g.array,A.array),g._dirty=!0,g},y.random=function(g,A){return w.random(g.array,A),g._dirty=!0,g},y.scale=function(g,A,M){return w.scale(g.array,A.array,M),g._dirty=!0,g},y.scaleAndAdd=function(g,A,M,O){return w.scaleAndAdd(g.array,A.array,M.array,O),g._dirty=!0,g},y.sqrDist=function(g,A){return w.sqrDist(g.array,A.array)},y.squaredDistance=y.sqrDist,y.sqrLen=function(g){return w.sqrLen(g.array)},y.squaredLength=y.sqrLen,y.sub=function(g,A,M){return w.subtract(g.array,A.array,M.array),g._dirty=!0,g},y.subtract=y.sub,y.transformMat3=function(g,A,M){return w.transformMat3(g.array,A.array,M.array),g._dirty=!0,g},y.transformMat4=function(g,A,M){return w.transformMat4(g.array,A.array,M.array),g._dirty=!0,g},y.transformQuat=function(g,A,M){return w.transformQuat(g.array,A.array,M.array),g._dirty=!0,g};function p(g,A,M){return g<A?A:g>M?M:g}var m=Math.atan2,L=Math.asin,d=Math.abs;y.eulerFromQuat=function(g,A,z){g._dirty=!0,A=A.array;var O=g.array,S=A[0],I=A[1],c=A[2],f=A[3],P=S*S,N=I*I,k=c*c,W=f*f,z=(z||"XYZ").toUpperCase();switch(z){case"XYZ":O[0]=m(2*(S*f-I*c),W-P-N+k),O[1]=L(p(2*(S*c+I*f),-1,1)),O[2]=m(2*(c*f-S*I),W+P-N-k);break;case"YXZ":O[0]=L(p(2*(S*f-I*c),-1,1)),O[1]=m(2*(S*c+I*f),W-P-N+k),O[2]=m(2*(S*I+c*f),W-P+N-k);break;case"ZXY":O[0]=L(p(2*(S*f+I*c),-1,1)),O[1]=m(2*(I*f-c*S),W-P-N+k),O[2]=m(2*(c*f-S*I),W-P+N-k);break;case"ZYX":O[0]=m(2*(S*f+c*I),W-P-N+k),O[1]=L(p(2*(I*f-S*c),-1,1)),O[2]=m(2*(S*I+c*f),W+P-N-k);break;case"YZX":O[0]=m(2*(S*f-c*I),W-P+N-k),O[1]=m(2*(I*f-S*c),W+P-N-k),O[2]=L(p(2*(S*I+c*f),-1,1));break;case"XZY":O[0]=m(2*(S*f+I*c),W-P+N-k),O[1]=m(2*(S*c+I*f),W+P-N-k),O[2]=L(p(2*(c*f-S*I),-1,1));break;default:console.warn("Unkown order: "+z)}return g},y.eulerFromMat3=function(g,A,J){var O=A.array,S=O[0],I=O[3],c=O[6],f=O[1],P=O[4],N=O[7],k=O[2],W=O[5],z=O[8],Z=g.array,J=(J||"XYZ").toUpperCase();switch(J){case"XYZ":Z[1]=L(p(c,-1,1)),d(c)<.99999?(Z[0]=m(-N,z),Z[2]=m(-I,S)):(Z[0]=m(W,P),Z[2]=0);break;case"YXZ":Z[0]=L(-p(N,-1,1)),d(N)<.99999?(Z[1]=m(c,z),Z[2]=m(f,P)):(Z[1]=m(-k,S),Z[2]=0);break;case"ZXY":Z[0]=L(p(W,-1,1)),d(W)<.99999?(Z[1]=m(-k,z),Z[2]=m(-I,P)):(Z[1]=0,Z[2]=m(f,S));break;case"ZYX":Z[1]=L(-p(k,-1,1)),d(k)<.99999?(Z[0]=m(W,z),Z[2]=m(f,S)):(Z[0]=0,Z[2]=m(-I,P));break;case"YZX":Z[2]=L(p(f,-1,1)),d(f)<.99999?(Z[0]=m(-N,P),Z[1]=m(-k,S)):(Z[0]=0,Z[1]=m(c,z));break;case"XZY":Z[2]=L(-p(I,-1,1)),d(I)<.99999?(Z[0]=m(W,P),Z[1]=m(c,S)):(Z[0]=m(-N,z),Z[1]=0);break;default:console.warn("Unkown order: "+J)}return g._dirty=!0,g},y.POSITIVE_X=new y(1,0,0),y.NEGATIVE_X=new y(-1,0,0),y.POSITIVE_Y=new y(0,1,0),y.NEGATIVE_Y=new y(0,-1,0),y.POSITIVE_Z=new y(0,0,1),y.NEGATIVE_Z=new y(0,0,-1),y.UP=new y(0,1,0),y.ZERO=new y(0,0,0),V.a=y},function(re,V,b){"use strict";var U=b(6),C=b(11),w=b(66),y=w.a.isPowerOfTwo,T=U.a.extend(function(){return{image:null,pixels:null,mipmaps:[]}},{update:function(x){var p=x.gl;p.bindTexture(p.TEXTURE_2D,this._cache.get("webgl_texture")),this.updateCommon(x);var m=this.format,L=this.type;p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_S,this.getAvailableWrapS()),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_WRAP_T,this.getAvailableWrapT()),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),p.texParameteri(p.TEXTURE_2D,p.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var d=x.getGLExtension("EXT_texture_filter_anisotropic");if(d&&this.anisotropic>1&&p.texParameterf(p.TEXTURE_2D,d.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),L===36193){var g=x.getGLExtension("OES_texture_half_float");g||(L=C.a.FLOAT)}if(this.mipmaps.length)for(var A=this.width,M=this.height,O=0;O<this.mipmaps.length;O++){var S=this.mipmaps[O];this._updateTextureData(p,S,O,A,M,m,L),A/=2,M/=2}else this._updateTextureData(p,this,0,this.width,this.height,m,L),this.useMipmap&&!this.NPOT&&p.generateMipmap(p.TEXTURE_2D);p.bindTexture(p.TEXTURE_2D,null)},_updateTextureData:function(x,p,m,L,d,g,A){p.image?x.texImage2D(x.TEXTURE_2D,m,g,g,A,p.image):g<=U.a.COMPRESSED_RGBA_S3TC_DXT5_EXT&&g>=U.a.COMPRESSED_RGB_S3TC_DXT1_EXT?x.compressedTexImage2D(x.TEXTURE_2D,m,g,L,d,0,p.pixels):x.texImage2D(x.TEXTURE_2D,m,g,L,d,0,g,A,p.pixels)},generateMipmap:function(x){var p=x.gl;this.useMipmap&&!this.NPOT&&(p.bindTexture(p.TEXTURE_2D,this._cache.get("webgl_texture")),p.generateMipmap(p.TEXTURE_2D))},isPowerOfTwo:function(){var x,p;return this.image?(x=this.image.width,p=this.image.height):(x=this.width,p=this.height),y(x)&&y(p)},isRenderable:function(){return this.image?this.image.nodeName==="CANVAS"||this.image.nodeName==="VIDEO"||this.image.complete:!!(this.width&&this.height)},bind:function(x){x.gl.bindTexture(x.gl.TEXTURE_2D,this.getWebGLTexture(x))},unbind:function(x){x.gl.bindTexture(x.gl.TEXTURE_2D,null)},load:function(x,p){var m=new Image;p&&(m.crossOrigin=p);var L=this;return m.onload=function(){L.dirty(),L.trigger("success",L),m.onload=null},m.onerror=function(){L.trigger("error",L),m.onerror=null},m.src=x,this.image=m,this}});Object.defineProperty(T.prototype,"width",{get:function(){return this.image?this.image.width:this._width},set:function(x){this.image?console.warn("Texture from image can't set width"):(this._width!==x&&this.dirty(),this._width=x)}}),Object.defineProperty(T.prototype,"height",{get:function(){return this.image?this.image.height:this._height},set:function(x){this.image?console.warn("Texture from image can't set height"):(this._height!==x&&this.dirty(),this._height=x)}}),V.a=T},function(re,V,b){"use strict";var U=b(8),C=b(11),w=b(48),y=U.a.extend({width:512,height:512,type:C.a.UNSIGNED_BYTE,format:C.a.RGBA,wrapS:C.a.REPEAT,wrapT:C.a.REPEAT,minFilter:C.a.LINEAR_MIPMAP_LINEAR,magFilter:C.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,sRGB:!0,unpackAlignment:4,premultiplyAlpha:!1,dynamic:!1,NPOT:!1},function(){this._cache=new w.a},{getWebGLTexture:function(T){var x=T.gl,p=this._cache;return p.use(T.__uid__),p.miss("webgl_texture")&&p.put("webgl_texture",x.createTexture()),this.dynamic?this.update(T):p.isDirty()&&(this.update(T),p.fresh()),p.get("webgl_texture")},bind:function(){},unbind:function(){},dirty:function(){this._cache&&this._cache.dirtyAll()},update:function(T){},updateCommon:function(T){var x=T.gl;x.pixelStorei(x.UNPACK_FLIP_Y_WEBGL,this.flipY),x.pixelStorei(x.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this.premultiplyAlpha),x.pixelStorei(x.UNPACK_ALIGNMENT,this.unpackAlignment),this.format===C.a.DEPTH_COMPONENT&&(this.useMipmap=!1);var p=T.getGLExtension("EXT_sRGB");this.format===y.SRGB&&!p&&(this.format=y.RGB),this.format===y.SRGB_ALPHA&&!p&&(this.format=y.RGBA),this.NPOT=!this.isPowerOfTwo()},getAvailableWrapS:function(){return this.NPOT?C.a.CLAMP_TO_EDGE:this.wrapS},getAvailableWrapT:function(){return this.NPOT?C.a.CLAMP_TO_EDGE:this.wrapT},getAvailableMinFilter:function(){var T=this.minFilter;return this.NPOT||!this.useMipmap?T==C.a.NEAREST_MIPMAP_NEAREST||T==C.a.NEAREST_MIPMAP_LINEAR?C.a.NEAREST:T==C.a.LINEAR_MIPMAP_LINEAR||T==C.a.LINEAR_MIPMAP_NEAREST?C.a.LINEAR:T:T},getAvailableMagFilter:function(){return this.magFilter},nextHighestPowerOfTwo:function(T){--T;for(var x=1;x<32;x<<=1)T=T|T>>x;return T+1},dispose:function(T){var x=this._cache;x.use(T.__uid__);var p=x.get("webgl_texture");p&&T.gl.deleteTexture(p),x.deleteContext(T.__uid__)},isRenderable:function(){},isPowerOfTwo:function(){}});Object.defineProperty(y.prototype,"width",{get:function(){return this._width},set:function(T){this._width=T}}),Object.defineProperty(y.prototype,"height",{get:function(){return this._height},set:function(T){this._height=T}}),y.BYTE=C.a.BYTE,y.UNSIGNED_BYTE=C.a.UNSIGNED_BYTE,y.SHORT=C.a.SHORT,y.UNSIGNED_SHORT=C.a.UNSIGNED_SHORT,y.INT=C.a.INT,y.UNSIGNED_INT=C.a.UNSIGNED_INT,y.FLOAT=C.a.FLOAT,y.HALF_FLOAT=36193,y.UNSIGNED_INT_24_8_WEBGL=34042,y.DEPTH_COMPONENT=C.a.DEPTH_COMPONENT,y.DEPTH_STENCIL=C.a.DEPTH_STENCIL,y.ALPHA=C.a.ALPHA,y.RGB=C.a.RGB,y.RGBA=C.a.RGBA,y.LUMINANCE=C.a.LUMINANCE,y.LUMINANCE_ALPHA=C.a.LUMINANCE_ALPHA,y.SRGB=35904,y.SRGB_ALPHA=35906,y.COMPRESSED_RGB_S3TC_DXT1_EXT=33776,y.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777,y.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778,y.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779,y.NEAREST=C.a.NEAREST,y.LINEAR=C.a.LINEAR,y.NEAREST_MIPMAP_NEAREST=C.a.NEAREST_MIPMAP_NEAREST,y.LINEAR_MIPMAP_NEAREST=C.a.LINEAR_MIPMAP_NEAREST,y.NEAREST_MIPMAP_LINEAR=C.a.NEAREST_MIPMAP_LINEAR,y.LINEAR_MIPMAP_LINEAR=C.a.LINEAR_MIPMAP_LINEAR,y.REPEAT=C.a.REPEAT,y.CLAMP_TO_EDGE=C.a.CLAMP_TO_EDGE,y.MIRRORED_REPEAT=C.a.MIRRORED_REPEAT,V.a=y},function(re,V,b){"use strict";var U=b(21),C=b(18),w=b(1),y=b.n(w),T=y.a.mat2,x=y.a.mat3,p=y.a.mat4,m=/uniform\s+(bool|float|int|vec2|vec3|vec4|ivec2|ivec3|ivec4|mat2|mat3|mat4|sampler2D|samplerCube)\s+([\w\,]+)?(\[.*?\])?\s*(:\s*([\S\s]+?))?;/g,L=/attribute\s+(float|int|vec2|vec3|vec4)\s+(\w*)\s*(:\s*(\w+))?;/g,d=/#define\s+(\w+)?(\s+[\w-.]+)?\s*;?\s*\n/g,g={bool:"1i",int:"1i",sampler2D:"t",samplerCube:"t",float:"1f",vec2:"2f",vec3:"3f",vec4:"4f",ivec2:"2i",ivec3:"3i",ivec4:"4i",mat2:"m2",mat3:"m3",mat4:"m4"},A={bool:function(){return!0},int:function(){return 0},float:function(){return 0},sampler2D:function(){return null},samplerCube:function(){return null},vec2:function(){return[0,0]},vec3:function(){return[0,0,0]},vec4:function(){return[0,0,0,0]},ivec2:function(){return[0,0]},ivec3:function(){return[0,0,0]},ivec4:function(){return[0,0,0,0]},mat2:function(){return T.create()},mat3:function(){return x.create()},mat4:function(){return p.create()},array:function(){return[]}},M=["POSITION","NORMAL","BINORMAL","TANGENT","TEXCOORD","TEXCOORD_0","TEXCOORD_1","COLOR","JOINT","WEIGHT"],O=["SKIN_MATRIX","VIEWPORT_SIZE","VIEWPORT","DEVICEPIXELRATIO","WINDOW_SIZE","NEAR","FAR","TIME"],S=["WORLD","VIEW","PROJECTION","WORLDVIEW","VIEWPROJECTION","WORLDVIEWPROJECTION","WORLDINVERSE","VIEWINVERSE","PROJECTIONINVERSE","WORLDVIEWINVERSE","VIEWPROJECTIONINVERSE","WORLDVIEWPROJECTIONINVERSE","WORLDTRANSPOSE","VIEWTRANSPOSE","PROJECTIONTRANSPOSE","WORLDVIEWTRANSPOSE","VIEWPROJECTIONTRANSPOSE","WORLDVIEWPROJECTIONTRANSPOSE","WORLDINVERSETRANSPOSE","VIEWINVERSETRANSPOSE","PROJECTIONINVERSETRANSPOSE","WORLDVIEWINVERSETRANSPOSE","VIEWPROJECTIONINVERSETRANSPOSE","WORLDVIEWPROJECTIONINVERSETRANSPOSE"],I={},c={};function f(W,z){var Z="vertex:"+W+"fragment:"+z;if(I[Z])return I[Z];var J=U.a.genGUID();return I[Z]=J,c[J]={vertex:W,fragment:z},J}function P(W,z){typeof W=="object"&&(z=W.fragment,W=W.vertex),this._shaderID=f(W,z),this._vertexCode=P.parseImport(W),this._fragmentCode=P.parseImport(z),this.attributeSemantics={},this.matrixSemantics={},this.uniformSemantics={},this.matrixSemanticKeys=[],this.uniformTemplates={},this.attributes={},this.textures={},this.vertexDefines={},this.fragmentDefines={},this._parseAttributes(),this._parseUniforms(),this._parseDefines()}P.prototype={constructor:P,createUniforms:function(){var W={};for(var z in this.uniformTemplates){var Z=this.uniformTemplates[z];W[z]={type:Z.type,value:Z.value()}}return W},_parseImport:function(){this._vertexCode=P.parseImport(this.vertex),this._fragmentCode=P.parseImport(this.fragment)},_parseUniforms:function(){var W={},z=this,Z="vertex";this._uniformList=[],this._vertexCode=this._vertexCode.replace(m,J),Z="fragment",this._fragmentCode=this._fragmentCode.replace(m,J),z.matrixSemanticKeys=Object.keys(this.matrixSemantics);function J(ee,$,ie,se,ne,ce){if($&&ie){var ae=g[$],fe=!0,oe;if(ae){if(z._uniformList.push(ie),($==="sampler2D"||$==="samplerCube")&&(z.textures[ie]={shaderType:Z,type:$}),se&&(ae+="v"),ce)if(M.indexOf(ce)>=0)z.attributeSemantics[ce]={symbol:ie,type:ae},fe=!1;else if(S.indexOf(ce)>=0){var pe=!1,_e=ce;ce.match(/TRANSPOSE$/)&&(pe=!0,_e=ce.slice(0,-9)),z.matrixSemantics[ce]={symbol:ie,type:ae,isTranspose:pe,semanticNoTranspose:_e},fe=!1}else if(O.indexOf(ce)>=0)z.uniformSemantics[ce]={symbol:ie,type:ae},fe=!1;else if(ce==="unconfigurable")fe=!1;else if(oe=z._parseDefaultValue($,ce),oe)ce="";else throw new Error('Unkown semantic "'+ce+'"');fe&&(W[ie]={type:ae,value:se?A.array:oe||A[$],semantic:ce||null})}return["uniform",$,ie,se].join(" ")+`;
|
|
|
`}}this.uniformTemplates=W},_parseDefaultValue:function(W,z){var Z=/\[\s*(.*)\s*\]/;if(W==="vec2"||W==="vec3"||W==="vec4"){var J=Z.exec(z)[1];if(J){var ee=J.split(/\s*,\s*/);return function(){return new C.a.Float32Array(ee)}}else return}else{if(W==="bool")return function(){return z.toLowerCase()==="true"};if(W==="float")return function(){return parseFloat(z)};if(W==="int")return function(){return parseInt(z)}}},_parseAttributes:function(){var W={},z=this;this._vertexCode=this._vertexCode.replace(L,Z);function Z(J,ee,$,ie,se){if(ee&&$){var ne=1;switch(ee){case"vec4":ne=4;break;case"vec3":ne=3;break;case"vec2":ne=2;break;case"float":ne=1;break}if(W[$]={type:"float",size:ne,semantic:se||null},se){if(M.indexOf(se)<0)throw new Error('Unkown semantic "'+se+'"');z.attributeSemantics[se]={symbol:$,type:ee}}}return["attribute",ee,$].join(" ")+`;
|
|
|
`}this.attributes=W},_parseDefines:function(){var W=this,z="vertex";this._vertexCode=this._vertexCode.replace(d,Z),z="fragment",this._fragmentCode=this._fragmentCode.replace(d,Z);function Z(J,ee,$){var ie=z==="vertex"?W.vertexDefines:W.fragmentDefines;return ie[ee]||($=="false"?ie[ee]=!1:$=="true"?ie[ee]=!0:ie[ee]=$?isNaN(parseFloat($))?$.trim():parseFloat($):null),""}},clone:function(){var W=c[this._shaderID],z=new P(W.vertex,W.fragment);return z}},Object.defineProperty&&(Object.defineProperty(P.prototype,"shaderID",{get:function(){return this._shaderID}}),Object.defineProperty(P.prototype,"vertex",{get:function(){return this._vertexCode}}),Object.defineProperty(P.prototype,"fragment",{get:function(){return this._fragmentCode}}),Object.defineProperty(P.prototype,"uniforms",{get:function(){return this._uniformList}}));var N=/(@import)\s*([0-9a-zA-Z_\-\.]*)/g;P.parseImport=function(W){return W=W.replace(N,function(ee,Z,J){var ee=P.source(J);return ee?P.parseImport(ee):(console.error('Shader chunk "'+J+'" not existed in library'),"")}),W};var k=/(@export)\s*([0-9a-zA-Z_\-\.]*)\s*\n([\s\S]*?)@end/g;P.import=function(W){W.replace(k,function(z,Z,J,$){var $=$.replace(/(^[\s\t\xa0\u3000]+)|([\u3000\xa0\s\t]+\x24)/g,"");if($){for(var ie=J.split("."),se=P.codes,ne=0,ce;ne<ie.length-1;)ce=ie[ne++],se[ce]||(se[ce]={}),se=se[ce];ce=ie[ne],se[ce]=$}return $})},P.codes={},P.source=function(W){for(var z=W.split("."),Z=P.codes,J=0;Z&&J<z.length;){var ee=z[J++];Z=Z[ee]}return typeof Z!="string"?(console.error('Shader "'+W+'" not existed in library'),""):Z},V.a=P},function(re,V,b){"use strict";var U=b(91),C=b(47),w=b(21),y=function(){this.__uid__=w.a.genGUID()};y.__initializers__=[function(T){w.a.extend(this,T)}],w.a.extend(y,U.a),w.a.extend(y.prototype,C.a),V.a=y},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=b(4),y=C.a.mat4,T=C.a.vec3,x=C.a.mat3,p=C.a.quat,m=function(){this._axisX=new w.a,this._axisY=new w.a,this._axisZ=new w.a,this.array=y.create(),this._dirty=!0};m.prototype={constructor:m,setArray:function(g){for(var A=0;A<this.array.length;A++)this.array[A]=g[A];return this._dirty=!0,this},adjoint:function(){return y.adjoint(this.array,this.array),this._dirty=!0,this},clone:function(){return new m().copy(this)},copy:function(g){return y.copy(this.array,g.array),this._dirty=!0,this},determinant:function(){return y.determinant(this.array)},fromQuat:function(g){return y.fromQuat(this.array,g.array),this._dirty=!0,this},fromRotationTranslation:function(g,A){return y.fromRotationTranslation(this.array,g.array,A.array),this._dirty=!0,this},fromMat2d:function(g){return m.fromMat2d(this,g),this},frustum:function(g,A,M,O,S,I){return y.frustum(this.array,g,A,M,O,S,I),this._dirty=!0,this},identity:function(){return y.identity(this.array),this._dirty=!0,this},invert:function(){return y.invert(this.array,this.array),this._dirty=!0,this},lookAt:function(g,A,M){return y.lookAt(this.array,g.array,A.array,M.array),this._dirty=!0,this},mul:function(g){return y.mul(this.array,this.array,g.array),this._dirty=!0,this},mulLeft:function(g){return y.mul(this.array,g.array,this.array),this._dirty=!0,this},multiply:function(g){return y.multiply(this.array,this.array,g.array),this._dirty=!0,this},multiplyLeft:function(g){return y.multiply(this.array,g.array,this.array),this._dirty=!0,this},ortho:function(g,A,M,O,S,I){return y.ortho(this.array,g,A,M,O,S,I),this._dirty=!0,this},perspective:function(g,A,M,O){return y.perspective(this.array,g,A,M,O),this._dirty=!0,this},rotate:function(g,A){return y.rotate(this.array,this.array,g,A.array),this._dirty=!0,this},rotateX:function(g){return y.rotateX(this.array,this.array,g),this._dirty=!0,this},rotateY:function(g){return y.rotateY(this.array,this.array,g),this._dirty=!0,this},rotateZ:function(g){return y.rotateZ(this.array,this.array,g),this._dirty=!0,this},scale:function(g){return y.scale(this.array,this.array,g.array),this._dirty=!0,this},translate:function(g){return y.translate(this.array,this.array,g.array),this._dirty=!0,this},transpose:function(){return y.transpose(this.array,this.array),this._dirty=!0,this},decomposeMatrix:function(){var g=T.create(),A=T.create(),M=T.create(),O=x.create();return function(S,I,c){var f=this.array;T.set(g,f[0],f[1],f[2]),T.set(A,f[4],f[5],f[6]),T.set(M,f[8],f[9],f[10]);var P=T.length(g),N=T.length(A),k=T.length(M),W=this.determinant();W<0&&(P=-P),S&&S.set(P,N,k),c.set(f[12],f[13],f[14]),x.fromMat4(O,f),O[0]/=P,O[1]/=P,O[2]/=P,O[3]/=N,O[4]/=N,O[5]/=N,O[6]/=k,O[7]/=k,O[8]/=k,p.fromMat3(I.array,O),p.normalize(I.array,I.array),I._dirty=!0,c._dirty=!0}}(),toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var L=Object.defineProperty;if(L){var d=m.prototype;L(d,"z",{get:function(){var g=this.array;return this._axisZ.set(g[8],g[9],g[10]),this._axisZ},set:function(g){var A=this.array;g=g.array,A[8]=g[0],A[9]=g[1],A[10]=g[2],this._dirty=!0}}),L(d,"y",{get:function(){var g=this.array;return this._axisY.set(g[4],g[5],g[6]),this._axisY},set:function(g){var A=this.array;g=g.array,A[4]=g[0],A[5]=g[1],A[6]=g[2],this._dirty=!0}}),L(d,"x",{get:function(){var g=this.array;return this._axisX.set(g[0],g[1],g[2]),this._axisX},set:function(g){var A=this.array;g=g.array,A[0]=g[0],A[1]=g[1],A[2]=g[2],this._dirty=!0}})}m.adjoint=function(g,A){return y.adjoint(g.array,A.array),g._dirty=!0,g},m.copy=function(g,A){return y.copy(g.array,A.array),g._dirty=!0,g},m.determinant=function(g){return y.determinant(g.array)},m.identity=function(g){return y.identity(g.array),g._dirty=!0,g},m.ortho=function(g,A,M,O,S,I,c){return y.ortho(g.array,A,M,O,S,I,c),g._dirty=!0,g},m.perspective=function(g,A,M,O,S){return y.perspective(g.array,A,M,O,S),g._dirty=!0,g},m.lookAt=function(g,A,M,O){return y.lookAt(g.array,A.array,M.array,O.array),g._dirty=!0,g},m.invert=function(g,A){return y.invert(g.array,A.array),g._dirty=!0,g},m.mul=function(g,A,M){return y.mul(g.array,A.array,M.array),g._dirty=!0,g},m.multiply=m.mul,m.fromQuat=function(g,A){return y.fromQuat(g.array,A.array),g._dirty=!0,g},m.fromRotationTranslation=function(g,A,M){return y.fromRotationTranslation(g.array,A.array,M.array),g._dirty=!0,g},m.fromMat2d=function(O,M){O._dirty=!0;var M=M.array,O=O.array;return O[0]=M[0],O[4]=M[2],O[12]=M[4],O[1]=M[1],O[5]=M[3],O[13]=M[5],O},m.rotate=function(g,A,M,O){return y.rotate(g.array,A.array,M,O.array),g._dirty=!0,g},m.rotateX=function(g,A,M){return y.rotateX(g.array,A.array,M),g._dirty=!0,g},m.rotateY=function(g,A,M){return y.rotateY(g.array,A.array,M),g._dirty=!0,g},m.rotateZ=function(g,A,M){return y.rotateZ(g.array,A.array,M),g._dirty=!0,g},m.scale=function(g,A,M){return y.scale(g.array,A.array,M.array),g._dirty=!0,g},m.transpose=function(g,A){return y.transpose(g.array,A.array),g._dirty=!0,g},m.translate=function(g,A,M){return y.translate(g.array,A.array,M.array),g._dirty=!0,g},V.a=m},function(re,V,b){"use strict";var U=b(8),C=b(6),w=b(25),y=b(11),T=b(48),x="framebuffer",p="renderbuffer",m=p+"_width",L=p+"_height",d=p+"_attached",g="depthtexture_attached",A=y.a.FRAMEBUFFER,M=y.a.RENDERBUFFER,O=y.a.DEPTH_ATTACHMENT,S=y.a.COLOR_ATTACHMENT0,I=U.a.extend({depthBuffer:!0,viewport:null,_width:0,_height:0,_textures:null,_boundRenderer:null},function(){this._cache=new T.a,this._textures={}},{getTextureWidth:function(){return this._width},getTextureHeight:function(){return this._height},bind:function(c){if(c.__currentFrameBuffer){if(c.__currentFrameBuffer===this)return;console.warn("Renderer already bound with another framebuffer. Unbind it first")}c.__currentFrameBuffer=this;var f=c.gl;f.bindFramebuffer(A,this._getFrameBufferGL(c)),this._boundRenderer=c;var P=this._cache;P.put("viewport",c.viewport);var N=!1,k,W;for(var z in this._textures){N=!0;var Z=this._textures[z];Z&&(k=Z.texture.width,W=Z.texture.height,this._doAttach(c,Z.texture,z,Z.target))}this._width=k,this._height=W,!N&&this.depthBuffer&&console.error("Must attach texture before bind, or renderbuffer may have incorrect width and height."),this.viewport?c.setViewport(this.viewport):c.setViewport(0,0,k,W,1);var J=P.get("attached_textures");if(J){for(var z in J)if(!this._textures[z]){var ee=J[z];this._doDetach(f,z,ee)}}if(!P.get(g)&&this.depthBuffer){P.miss(p)&&P.put(p,f.createRenderbuffer());var $=P.get(p);(k!==P.get(m)||W!==P.get(L))&&(f.bindRenderbuffer(M,$),f.renderbufferStorage(M,f.DEPTH_COMPONENT16,k,W),P.put(m,k),P.put(L,W),f.bindRenderbuffer(M,null)),P.get(d)||(f.framebufferRenderbuffer(A,O,M,$),P.put(d,!0))}},unbind:function(c){c.__currentFrameBuffer=null;var f=c.gl;f.bindFramebuffer(A,null),this._boundRenderer=null,this._cache.use(c.__uid__);var P=this._cache.get("viewport");P&&c.setViewport(P),this.updateMipmap(c)},updateMipmap:function(c){var f=c.gl;for(var P in this._textures){var N=this._textures[P];if(N){var k=N.texture;if(!k.NPOT&&k.useMipmap&&k.minFilter===C.a.LINEAR_MIPMAP_LINEAR){var W=k instanceof w.a?y.a.TEXTURE_CUBE_MAP:y.a.TEXTURE_2D;f.bindTexture(W,k.getWebGLTexture(c)),f.generateMipmap(W),f.bindTexture(W,null)}}}},checkStatus:function(c){return c.checkFramebufferStatus(A)},_getFrameBufferGL:function(c){var f=this._cache;return f.use(c.__uid__),f.miss(x)&&f.put(x,c.gl.createFramebuffer()),f.get(x)},attach:function(c,f,P){if(!c.width)throw new Error("The texture attached to color buffer is not a valid.");f=f||S,P=P||y.a.TEXTURE_2D;var N=this._boundRenderer,k=N&&N.gl,W;if(k){var z=this._cache;z.use(N.__uid__),W=z.get("attached_textures")}var Z=this._textures[f];if(!(Z&&Z.target===P&&Z.texture===c&&W&&W[f]!=null)){var J=!0;N&&(J=this._doAttach(N,c,f,P),this.viewport||N.setViewport(0,0,c.width,c.height,1)),J&&(this._textures[f]=this._textures[f]||{},this._textures[f].texture=c,this._textures[f].target=P)}},_doAttach:function(c,f,P,N){var k=c.gl,W=f.getWebGLTexture(c),z=this._cache.get("attached_textures");if(z&&z[P]){var Z=z[P];if(Z.texture===f&&Z.target===N)return}P=+P;var J=!0;if(P===O||P===y.a.DEPTH_STENCIL_ATTACHMENT){var ee=c.getGLExtension("WEBGL_depth_texture");if(ee||(console.error("Depth texture is not supported by the browser"),J=!1),f.format!==y.a.DEPTH_COMPONENT&&f.format!==y.a.DEPTH_STENCIL&&(console.error("The texture attached to depth buffer is not a valid."),J=!1),J){var $=this._cache.get(p);$&&(k.framebufferRenderbuffer(A,O,M,null),k.deleteRenderbuffer($),this._cache.put(p,!1)),this._cache.put(d,!1),this._cache.put(g,!0)}}return k.framebufferTexture2D(A,P,N,W,0),z||(z={},this._cache.put("attached_textures",z)),z[P]=z[P]||{},z[P].texture=f,z[P].target=N,J},_doDetach:function(c,f,P){c.framebufferTexture2D(A,f,P,null,0);var N=this._cache.get("attached_textures");N&&N[f]&&(N[f]=null),(f===O||f===y.a.DEPTH_STENCIL_ATTACHMENT)&&this._cache.put(g,!1)},detach:function(c,f){if(this._textures[c]=null,this._boundRenderer){var P=this._cache;P.use(this._boundRenderer.__uid__),this._doDetach(this._boundRenderer.gl,c,f)}},dispose:function(c){var f=c.gl,P=this._cache;P.use(c.__uid__);var N=P.get(p);N&&f.deleteRenderbuffer(N);var k=P.get(x);k&&f.deleteFramebuffer(k),P.deleteContext(c.__uid__),this._textures={}}});I.DEPTH_ATTACHMENT=O,I.COLOR_ATTACHMENT0=S,I.STENCIL_ATTACHMENT=y.a.STENCIL_ATTACHMENT,I.DEPTH_STENCIL_ATTACHMENT=y.a.DEPTH_STENCIL_ATTACHMENT,V.a=I},function(re,V,b){"use strict";V.a={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,FUNC_ADD:32774,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,BLEND_COLOR:32773,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,STREAM_DRAW:35040,STATIC_DRAW:35044,DYNAMIC_DRAW:35048,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,CULL_FACE:2884,BLEND:3042,DITHER:3024,STENCIL_TEST:2960,DEPTH_TEST:2929,SCISSOR_TEST:3089,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CW:2304,CCW:2305,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_UNIFORMS:35718,ACTIVE_ATTRIBUTES:35721,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,NOTEQUAL:517,GEQUAL:518,ALWAYS:519,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,VENDOR:7936,RENDERER:7937,VERSION:7938,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,TEXTURE1:33985,TEXTURE2:33986,TEXTURE3:33987,TEXTURE4:33988,TEXTURE5:33989,TEXTURE6:33990,TEXTURE7:33991,TEXTURE8:33992,TEXTURE9:33993,TEXTURE10:33994,TEXTURE11:33995,TEXTURE12:33996,TEXTURE13:33997,TEXTURE14:33998,TEXTURE15:33999,TEXTURE16:34e3,TEXTURE17:34001,TEXTURE18:34002,TEXTURE19:34003,TEXTURE20:34004,TEXTURE21:34005,TEXTURE22:34006,TEXTURE23:34007,TEXTURE24:34008,TEXTURE25:34009,TEXTURE26:34010,TEXTURE27:34011,TEXTURE28:34012,TEXTURE29:34013,TEXTURE30:34014,TEXTURE31:34015,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,COMPILE_STATUS:35713,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,CONTEXT_LOST_WEBGL:37442,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,BROWSER_DEFAULT_WEBGL:37444}},function(re,V){var b={"[object Function]":1,"[object RegExp]":1,"[object Date]":1,"[object Error]":1,"[object CanvasGradient]":1,"[object CanvasPattern]":1,"[object Image]":1,"[object Canvas]":1},U={"[object Int8Array]":1,"[object Uint8Array]":1,"[object Uint8ClampedArray]":1,"[object Int16Array]":1,"[object Uint16Array]":1,"[object Int32Array]":1,"[object Uint32Array]":1,"[object Float32Array]":1,"[object Float64Array]":1},C=Object.prototype.toString,w=Array.prototype,y=w.forEach,T=w.filter,x=w.slice,p=w.map,m=w.reduce,L={};function d(Re,We){L[Re]=We}function g(Re){if(Re==null||typeof Re!="object")return Re;var We=Re,Pe=C.call(Re);if(Pe==="[object Array]"){if(!dt(Re)){We=[];for(var ke=0,Ze=Re.length;ke<Ze;ke++)We[ke]=g(Re[ke])}}else if(U[Pe]){if(!dt(Re)){var Ie=Re.constructor;if(Re.constructor.from)We=Ie.from(Re);else{We=new Ie(Re.length);for(var ke=0,Ze=Re.length;ke<Ze;ke++)We[ke]=g(Re[ke])}}}else if(!b[Pe]&&!dt(Re)&&!_e(Re)){We={};for(var Ye in Re)Re.hasOwnProperty(Ye)&&(We[Ye]=g(Re[Ye]))}return We}function A(Re,We,Pe){if(!fe(We)||!fe(Re))return Pe?g(We):Re;for(var ke in We)if(We.hasOwnProperty(ke)){var Ze=Re[ke],Ie=We[ke];fe(Ie)&&fe(Ze)&&!ne(Ie)&&!ne(Ze)&&!_e(Ie)&&!_e(Ze)&&!oe(Ie)&&!oe(Ze)&&!dt(Ie)&&!dt(Ze)?A(Ze,Ie,Pe):(Pe||!(ke in Re))&&(Re[ke]=g(We[ke],!0))}return Re}function M(Re,We){for(var Pe=Re[0],ke=1,Ze=Re.length;ke<Ze;ke++)Pe=A(Pe,Re[ke],We);return Pe}function O(Re,We){for(var Pe in We)We.hasOwnProperty(Pe)&&(Re[Pe]=We[Pe]);return Re}function S(Re,We,Pe){for(var ke in We)We.hasOwnProperty(ke)&&(Pe?We[ke]!=null:Re[ke]==null)&&(Re[ke]=We[ke]);return Re}var I=function(){return L.createCanvas()};L.createCanvas=function(){return document.createElement("canvas")};var c;function f(){return c||(c=I().getContext("2d")),c}function P(Re,We){if(Re){if(Re.indexOf)return Re.indexOf(We);for(var Pe=0,ke=Re.length;Pe<ke;Pe++)if(Re[Pe]===We)return Pe}return-1}function N(Re,We){var Pe=Re.prototype;function ke(){}ke.prototype=We.prototype,Re.prototype=new ke;for(var Ze in Pe)Re.prototype[Ze]=Pe[Ze];Re.prototype.constructor=Re,Re.superClass=We}function k(Re,We,Pe){Re="prototype"in Re?Re.prototype:Re,We="prototype"in We?We.prototype:We,S(Re,We,Pe)}function W(Re){if(Re)return typeof Re=="string"?!1:typeof Re.length=="number"}function z(Re,We,Pe){if(Re&&We)if(Re.forEach&&Re.forEach===y)Re.forEach(We,Pe);else if(Re.length===+Re.length)for(var ke=0,Ze=Re.length;ke<Ze;ke++)We.call(Pe,Re[ke],ke,Re);else for(var Ie in Re)Re.hasOwnProperty(Ie)&&We.call(Pe,Re[Ie],Ie,Re)}function Z(Re,We,Pe){if(Re&&We){if(Re.map&&Re.map===p)return Re.map(We,Pe);for(var ke=[],Ze=0,Ie=Re.length;Ze<Ie;Ze++)ke.push(We.call(Pe,Re[Ze],Ze,Re));return ke}}function J(Re,We,Pe,ke){if(Re&&We){if(Re.reduce&&Re.reduce===m)return Re.reduce(We,Pe,ke);for(var Ze=0,Ie=Re.length;Ze<Ie;Ze++)Pe=We.call(ke,Pe,Re[Ze],Ze,Re);return Pe}}function ee(Re,We,Pe){if(Re&&We){if(Re.filter&&Re.filter===T)return Re.filter(We,Pe);for(var ke=[],Ze=0,Ie=Re.length;Ze<Ie;Ze++)We.call(Pe,Re[Ze],Ze,Re)&&ke.push(Re[Ze]);return ke}}function $(Re,We,Pe){if(Re&&We){for(var ke=0,Ze=Re.length;ke<Ze;ke++)if(We.call(Pe,Re[ke],ke,Re))return Re[ke]}}function ie(Re,We){var Pe=x.call(arguments,2);return function(){return Re.apply(We,Pe.concat(x.call(arguments)))}}function se(Re){var We=x.call(arguments,1);return function(){return Re.apply(this,We.concat(x.call(arguments)))}}function ne(Re){return C.call(Re)==="[object Array]"}function ce(Re){return typeof Re=="function"}function ae(Re){return C.call(Re)==="[object String]"}function fe(Re){var We=typeof Re;return We==="function"||!!Re&&We=="object"}function oe(Re){return!!b[C.call(Re)]}function pe(Re){return!!U[C.call(Re)]}function _e(Re){return typeof Re=="object"&&typeof Re.nodeType=="number"&&typeof Re.ownerDocument=="object"}function de(Re){return Re!==Re}function be(Re){for(var We=0,Pe=arguments.length;We<Pe;We++)if(arguments[We]!=null)return arguments[We]}function Ae(Re,We){return Re!=null?Re:We}function Fe(Re,We,Pe){return Re!=null?Re:We!=null?We:Pe}function Ue(){return Function.call.apply(x,arguments)}function it(Re){if(typeof Re=="number")return[Re,Re,Re,Re];var We=Re.length;return We===2?[Re[0],Re[1],Re[0],Re[1]]:We===3?[Re[0],Re[1],Re[2],Re[1]]:Re}function tt(Re,We){if(!Re)throw new Error(We)}var et="__ec_primitive__";function vt(Re){Re[et]=!0}function dt(Re){return Re[et]}function je(Re){var We=ne(Re);Re&&z(Re,function(Pe,ke){We?this.set(Pe,1):this.set(ke,Pe)},this)}var nt="_ec_",rt=4;je.prototype={constructor:je,get:function(Re){return this[nt+Re]},set:function(Re,We){return this[nt+Re]=We,We},each:function(Re,We){We!==void 0&&(Re=ie(Re,We));for(var Pe in this)this.hasOwnProperty(Pe)&&Re(this[Pe],Pe.slice(rt))},removeKey:function(Re){delete this[nt+Re]}};function ft(Re){return new je(Re)}function lt(Re,We){for(var Pe=new Re.constructor(Re.length+We.length),ke=0;ke<Re.length;ke++)Pe[ke]=Re[ke];var Ze=Re.length;for(ke=0;ke<We.length;ke++)Pe[ke+Ze]=We[ke];return Pe}function wt(){}V.$override=d,V.clone=g,V.merge=A,V.mergeAll=M,V.extend=O,V.defaults=S,V.createCanvas=I,V.getContext=f,V.indexOf=P,V.inherits=N,V.mixin=k,V.isArrayLike=W,V.each=z,V.map=Z,V.reduce=J,V.filter=ee,V.find=$,V.bind=ie,V.curry=se,V.isArray=ne,V.isFunction=ce,V.isString=ae,V.isObject=fe,V.isBuiltInObject=oe,V.isTypedArray=pe,V.isDom=_e,V.eqNaN=de,V.retrieve=be,V.retrieve2=Ae,V.retrieve3=Fe,V.slice=Ue,V.normalizeCssArray=it,V.assert=tt,V.setAsPrimitive=vt,V.isPrimitive=dt,V.createHashMap=ft,V.concatArray=lt,V.noop=wt},function(re,V,b){"use strict";var U=b(8),C=b(11),w=b(48),y=b(18),T=b(1),x=b.n(T),p=b(15),m=x.a.vec3,L=x.a.mat4,d=m.create,g=m.add,A=m.set;function M(P){return{byte:y.a.Int8Array,ubyte:y.a.Uint8Array,short:y.a.Int16Array,ushort:y.a.Uint16Array}[P]||y.a.Float32Array}function O(P){return"attr_"+P}function S(P,N,k,W){switch(this.name=P,this.type=N,this.size=k,this.semantic=W||"",this.value=null,k){case 1:this.get=function(z){return this.value[z]},this.set=function(z,Z){this.value[z]=Z},this.copy=function(z,Z){this.value[z]=this.value[z]};break;case 2:this.get=function(z,Z){var J=this.value;return Z[0]=J[z*2],Z[1]=J[z*2+1],Z},this.set=function(z,Z){var J=this.value;J[z*2]=Z[0],J[z*2+1]=Z[1]},this.copy=function(z,Z){var J=this.value;Z*=2,z*=2,J[z]=J[Z],J[z+1]=J[Z+1]};break;case 3:this.get=function(z,Z){var J=z*3,ee=this.value;return Z[0]=ee[J],Z[1]=ee[J+1],Z[2]=ee[J+2],Z},this.set=function(z,Z){var J=z*3,ee=this.value;ee[J]=Z[0],ee[J+1]=Z[1],ee[J+2]=Z[2]},this.copy=function(z,Z){var J=this.value;Z*=3,z*=3,J[z]=J[Z],J[z+1]=J[Z+1],J[z+2]=J[Z+2]};break;case 4:this.get=function(z,Z){var J=this.value,ee=z*4;return Z[0]=J[ee],Z[1]=J[ee+1],Z[2]=J[ee+2],Z[3]=J[ee+3],Z},this.set=function(z,Z){var J=this.value,ee=z*4;J[ee]=Z[0],J[ee+1]=Z[1],J[ee+2]=Z[2],J[ee+3]=Z[3]},this.copy=function(z,Z){var J=this.value;Z*=4,z*=4,J[z]=J[Z],J[z+1]=J[Z+1],J[z+2]=J[Z+2],J[z+3]=J[Z+3]}}}S.prototype.init=function(P){if(!this.value||this.value.length!=P*this.size){var N=M(this.type);this.value=new N(P*this.size)}},S.prototype.fromArray=function(P){var N=M(this.type),k;if(P[0]&&P[0].length){var W=0,z=this.size;k=new N(P.length*z);for(var Z=0;Z<P.length;Z++)for(var J=0;J<z;J++)k[W++]=P[Z][J]}else k=new N(P);this.value=k},S.prototype.clone=function(P){var N=new S(this.name,this.type,this.size,this.semantic);return P&&console.warn("todo"),N};function I(P,N,k,W,z){this.name=P,this.type=N,this.buffer=k,this.size=W,this.semantic=z,this.symbol="",this.needsRemove=!1}function c(P){this.buffer=P,this.count=0}var f=U.a.extend(function(){return{attributes:{position:new S("position","float",3,"POSITION"),texcoord0:new S("texcoord0","float",2,"TEXCOORD_0"),texcoord1:new S("texcoord1","float",2,"TEXCOORD_1"),normal:new S("normal","float",3,"NORMAL"),tangent:new S("tangent","float",4,"TANGENT"),color:new S("color","float",4,"COLOR"),weight:new S("weight","float",3,"WEIGHT"),joint:new S("joint","float",4,"JOINT"),barycentric:new S("barycentric","float",3,null)},boundingBox:null,indices:null,dynamic:!0,_enabledAttributes:null}},function(){this._cache=new w.a,this._attributeList=Object.keys(this.attributes)},{mainAttribute:"position",pick:null,pickByRay:null,updateBoundingBox:function(){var P=this.boundingBox;P||(P=this.boundingBox=new p.a);var N=this.attributes.position.value;if(N&&N.length){var k=P.min,W=P.max,z=k.array,Z=W.array;m.set(z,N[0],N[1],N[2]),m.set(Z,N[0],N[1],N[2]);for(var J=3;J<N.length;){var ee=N[J++],$=N[J++],ie=N[J++];ee<z[0]&&(z[0]=ee),$<z[1]&&(z[1]=$),ie<z[2]&&(z[2]=ie),ee>Z[0]&&(Z[0]=ee),$>Z[1]&&(Z[1]=$),ie>Z[2]&&(Z[2]=ie)}k._dirty=!0,W._dirty=!0}},dirty:function(){for(var P=this.getEnabledAttributes(),N=0;N<P.length;N++)this.dirtyAttribute(P[N]);this.dirtyIndices(),this._enabledAttributes=null,this._cache.dirty("any")},dirtyIndices:function(){this._cache.dirtyAll("indices")},dirtyAttribute:function(P){this._cache.dirtyAll(O(P)),this._cache.dirtyAll("attributes")},getTriangleIndices:function(P,N){if(P<this.triangleCount&&P>=0){N||(N=d());var k=this.indices;return N[0]=k[P*3],N[1]=k[P*3+1],N[2]=k[P*3+2],N}},setTriangleIndices:function(P,N){var k=this.indices;k[P*3]=N[0],k[P*3+1]=N[1],k[P*3+2]=N[2]},isUseIndices:function(){return!!this.indices},initIndicesFromArray:function(P){var N,k=this.vertexCount>65535?y.a.Uint32Array:y.a.Uint16Array;if(P[0]&&P[0].length){var W=0,z=3;N=new k(P.length*z);for(var Z=0;Z<P.length;Z++)for(var J=0;J<z;J++)N[W++]=P[Z][J]}else N=new k(P);this.indices=N},createAttribute:function(P,N,k,W){var z=new S(P,N,k,W);return this.attributes[P]&&this.removeAttribute(P),this.attributes[P]=z,this._attributeList.push(P),z},removeAttribute:function(P){var N=this._attributeList,k=N.indexOf(P);return k>=0?(N.splice(k,1),delete this.attributes[P],!0):!1},getAttribute:function(P){return this.attributes[P]},getEnabledAttributes:function(){var P=this._enabledAttributes,N=this._attributeList;if(P)return P;for(var k=[],W=this.vertexCount,z=0;z<N.length;z++){var Z=N[z],J=this.attributes[Z];J.value&&J.value.length===W*J.size&&k.push(Z)}return this._enabledAttributes=k,k},getBufferChunks:function(P){var N=this._cache;N.use(P.__uid__);var k=N.isDirty("attributes"),W=N.isDirty("indices");if(k||W){this._updateBuffer(P.gl,k,W);for(var z=this.getEnabledAttributes(),Z=0;Z<z.length;Z++)N.fresh(O(z[Z]));N.fresh("attributes"),N.fresh("indices")}return N.fresh("any"),N.get("chunks")},_updateBuffer:function(P,N,k){var W=this._cache,z=W.get("chunks"),Z=!1;z||(z=[],z[0]={attributeBuffers:[],indicesBuffer:null},W.put("chunks",z),Z=!0);var J=z[0],ee=J.attributeBuffers,$=J.indicesBuffer;if(N||Z){var ie=this.getEnabledAttributes(),se={};if(!Z)for(var ne=0;ne<ee.length;ne++)se[ee[ne].name]=ee[ne];for(var ce=0;ce<ie.length;ce++){var ae=ie[ce],fe=this.attributes[ae],oe;Z||(oe=se[ae]);var pe;oe?pe=oe.buffer:pe=P.createBuffer(),W.isDirty(O(ae))&&(P.bindBuffer(P.ARRAY_BUFFER,pe),P.bufferData(P.ARRAY_BUFFER,fe.value,this.dynamic?C.a.DYNAMIC_DRAW:C.a.STATIC_DRAW)),ee[ce]=new I(ae,fe.type,pe,fe.size,fe.semantic)}for(var ne=ce;ne<ee.length;ne++)P.deleteBuffer(ee[ne].buffer);ee.length=ce}this.isUseIndices()&&(k||Z)&&($||($=new c(P.createBuffer()),J.indicesBuffer=$),$.count=this.indices.length,P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,$.buffer),P.bufferData(P.ELEMENT_ARRAY_BUFFER,this.indices,this.dynamic?C.a.DYNAMIC_DRAW:C.a.STATIC_DRAW))},generateVertexNormals:function(){if(this.vertexCount){var P=this.indices,N=this.attributes,k=N.position.value,W=N.normal.value;if(!W||W.length!==k.length)W=N.normal.value=new y.a.Float32Array(k.length);else for(var z=0;z<W.length;z++)W[z]=0;for(var Z=d(),J=d(),ee=d(),$=d(),ie=d(),se=d(),ne=P?P.length:this.vertexCount,ce,ae,fe,oe=0;oe<ne;){P?(ce=P[oe++],ae=P[oe++],fe=P[oe++]):(ce=oe++,ae=oe++,fe=oe++),A(Z,k[ce*3],k[ce*3+1],k[ce*3+2]),A(J,k[ae*3],k[ae*3+1],k[ae*3+2]),A(ee,k[fe*3],k[fe*3+1],k[fe*3+2]),m.sub($,Z,J),m.sub(ie,J,ee),m.cross(se,$,ie);for(var z=0;z<3;z++)W[ce*3+z]=W[ce*3+z]+se[z],W[ae*3+z]=W[ae*3+z]+se[z],W[fe*3+z]=W[fe*3+z]+se[z]}for(var z=0;z<W.length;)A(se,W[z],W[z+1],W[z+2]),m.normalize(se,se),W[z++]=se[0],W[z++]=se[1],W[z++]=se[2];this.dirty()}},generateFaceNormals:function(){if(this.vertexCount){this.isUniqueVertex()||this.generateUniqueVertex();var P=this.indices,N=this.attributes,k=N.position.value,W=N.normal.value,z=d(),Z=d(),J=d(),ee=d(),$=d(),ie=d();W||(W=N.normal.value=new Float32Array(k.length));for(var se=P?P.length:this.vertexCount,ne,ce,ae,fe=0;fe<se;){P?(ne=P[fe++],ce=P[fe++],ae=P[fe++]):(ne=fe++,ce=fe++,ae=fe++),A(z,k[ne*3],k[ne*3+1],k[ne*3+2]),A(Z,k[ce*3],k[ce*3+1],k[ce*3+2]),A(J,k[ae*3],k[ae*3+1],k[ae*3+2]),m.sub(ee,z,Z),m.sub($,Z,J),m.cross(ie,ee,$),m.normalize(ie,ie);for(var oe=0;oe<3;oe++)W[ne*3+oe]=ie[oe],W[ce*3+oe]=ie[oe],W[ae*3+oe]=ie[oe]}this.dirty()}},generateTangents:function(){if(this.vertexCount){var P=this.vertexCount,N=this.attributes;N.tangent.value||(N.tangent.value=new Float32Array(P*4));var k=N.texcoord0.value,W=N.position.value,z=N.tangent.value,Z=N.normal.value;if(!k){console.warn("Geometry without texcoords can't generate tangents.");return}for(var J=[],ee=[],$=0;$<P;$++)J[$]=[0,0,0],ee[$]=[0,0,0];for(var ie=[0,0,0],se=[0,0,0],ne=this.indices,ce=ne?ne.length:this.vertexCount,ae,fe,oe,$=0;$<ce;){ne?(ae=ne[$++],fe=ne[$++],oe=ne[$++]):(ae=$++,fe=$++,oe=$++);var pe=k[ae*2],_e=k[fe*2],de=k[oe*2],be=k[ae*2+1],Ae=k[fe*2+1],Fe=k[oe*2+1],Ue=W[ae*3],it=W[fe*3],tt=W[oe*3],et=W[ae*3+1],vt=W[fe*3+1],dt=W[oe*3+1],je=W[ae*3+2],nt=W[fe*3+2],rt=W[oe*3+2],ft=it-Ue,lt=tt-Ue,wt=vt-et,Re=dt-et,We=nt-je,Pe=rt-je,ke=_e-pe,Ze=de-pe,Ie=Ae-be,Ye=Fe-be,qe=1/(ke*Ye-Ie*Ze);ie[0]=(Ye*ft-Ie*lt)*qe,ie[1]=(Ye*wt-Ie*Re)*qe,ie[2]=(Ye*We-Ie*Pe)*qe,se[0]=(ke*lt-Ze*ft)*qe,se[1]=(ke*Re-Ze*wt)*qe,se[2]=(ke*Pe-Ze*We)*qe,g(J[ae],J[ae],ie),g(J[fe],J[fe],ie),g(J[oe],J[oe],ie),g(ee[ae],ee[ae],se),g(ee[fe],ee[fe],se),g(ee[oe],ee[oe],se)}for(var ot=d(),gt=d(),pt=d(),$=0;$<P;$++){pt[0]=Z[$*3],pt[1]=Z[$*3+1],pt[2]=Z[$*3+2];var Lt=J[$];m.scale(ot,pt,m.dot(pt,Lt)),m.sub(ot,Lt,ot),m.normalize(ot,ot),m.cross(gt,pt,Lt),z[$*4]=ot[0],z[$*4+1]=ot[1],z[$*4+2]=ot[2],z[$*4+3]=m.dot(gt,ee[$])<0?-1:1}this.dirty()}},isUniqueVertex:function(){return this.isUseIndices()?this.vertexCount===this.indices.length:!0},generateUniqueVertex:function(){if(!(!this.vertexCount||!this.indices)){this.indices.length>65535&&(this.indices=new y.a.Uint32Array(this.indices));for(var P=this.attributes,N=this.indices,k=this.getEnabledAttributes(),W={},z=0;z<k.length;z++){var Z=k[z];W[Z]=P[Z].value,P[Z].init(this.indices.length)}for(var J=0,ee=0;ee<N.length;ee++){for(var $=N[ee],z=0;z<k.length;z++)for(var Z=k[z],ie=P[Z].value,se=P[Z].size,ne=0;ne<se;ne++)ie[J*se+ne]=W[Z][$*se+ne];N[ee]=J,J++}this.dirty()}},generateBarycentric:function(){if(this.vertexCount){this.isUniqueVertex()||this.generateUniqueVertex();var P=this.attributes,N=P.barycentric.value,k=this.indices;if(!(N&&N.length===k.length*3)){N=P.barycentric.value=new Float32Array(k.length*3);for(var W=0;W<(k?k.length:this.vertexCount/3);)for(var z=0;z<3;z++){var Z=k?k[W++]:W*3+z;N[Z*3+z]=1}this.dirty()}}},applyTransform:function(P){var N=this.attributes,k=N.position.value,W=N.normal.value,z=N.tangent.value;P=P.array;var Z=L.create();L.invert(Z,P),L.transpose(Z,Z);var J=m.transformMat4,ee=m.forEach;ee(k,3,0,null,J,P),W&&ee(W,3,0,null,J,Z),z&&ee(z,4,0,null,J,Z),this.boundingBox&&this.updateBoundingBox()},dispose:function(P){var N=this._cache;N.use(P.__uid__);var k=N.get("chunks");if(k)for(var W=0;W<k.length;W++){for(var z=k[W],Z=0;Z<z.attributeBuffers.length;Z++){var J=z.attributeBuffers[Z];P.gl.deleteBuffer(J.buffer)}z.indicesBuffer&&P.gl.deleteBuffer(z.indicesBuffer.buffer)}N.deleteContext(P.__uid__)}});Object.defineProperty&&(Object.defineProperty(f.prototype,"vertexCount",{enumerable:!1,get:function(){var P=this.attributes[this.mainAttribute];return!P||!P.value?0:P.value.length/P.size}}),Object.defineProperty(f.prototype,"triangleCount",{enumerable:!1,get:function(){var P=this.indices;return P?P.length/3:0}})),f.STATIC_DRAW=C.a.STATIC_DRAW,f.DYNAMIC_DRAW=C.a.DYNAMIC_DRAW,f.STREAM_DRAW=C.a.STREAM_DRAW,f.AttributeBuffer=I,f.IndicesBuffer=c,f.Attribute=S,V.a=f},function(re,V,b){"use strict";var U=b(8),C=b(30),w=b(37),y=b(7),T=b(17),x=b(24),p=b(11),m=b(109);y.a.import(m.a);var L=new w.a,d=new x.a({geometry:L,frustumCulling:!1}),g=new C.a,A=U.a.extend(function(){return{fragment:"",outputs:null,material:null,blendWithPrevious:!1,clearColor:!1,clearDepth:!0}},function(){var M=new y.a(y.a.source("clay.compositor.vertex"),this.fragment),O=new T.a({shader:M});O.enableTexturesAll(),this.material=O},{setUniform:function(M,O){this.material.setUniform(M,O)},getUniform:function(M){var O=this.material.uniforms[M];if(O)return O.value},attachOutput:function(M,O){this.outputs||(this.outputs={}),O=O||p.a.COLOR_ATTACHMENT0,this.outputs[O]=M},detachOutput:function(M){for(var O in this.outputs)this.outputs[O]===M&&(this.outputs[O]=null)},bind:function(M,O){if(this.outputs)for(var S in this.outputs){var I=this.outputs[S];I&&O.attach(I,S)}O&&O.bind(M)},unbind:function(M,O){O.unbind(M)},render:function(M,O){var S=M.gl;if(O){this.bind(M,O);var I=M.getGLExtension("EXT_draw_buffers");if(I&&this.outputs){var c=[];for(var f in this.outputs)f=+f,f>=S.COLOR_ATTACHMENT0&&f<=S.COLOR_ATTACHMENT0+8&&c.push(f);I.drawBuffersEXT(c)}}this.trigger("beforerender",this,M);var P=this.clearDepth?S.DEPTH_BUFFER_BIT:0;if(S.depthMask(!0),this.clearColor){P=P|S.COLOR_BUFFER_BIT,S.colorMask(!0,!0,!0,!0);var N=this.clearColor;Array.isArray(N)&&S.clearColor(N[0],N[1],N[2],N[3])}S.clear(P),this.blendWithPrevious?(S.enable(S.BLEND),this.material.transparent=!0):(S.disable(S.BLEND),this.material.transparent=!1),this.renderQuad(M),this.trigger("afterrender",this,M),O&&this.unbind(M,O)},renderQuad:function(M){d.material=this.material,M.renderPass([d],g)},dispose:function(M){}});V.a=A},function(re,V,b){"use strict";var U=b(4),C=b(1),w=b.n(C),y=w.a.vec3,T=y.copy,x=y.set,p=function(m,L){this.min=m||new U.a(1/0,1/0,1/0),this.max=L||new U.a(-1/0,-1/0,-1/0)};p.prototype={constructor:p,updateFromVertices:function(m){if(m.length>0){var L=this.min,d=this.max,g=L.array,A=d.array;T(g,m[0]),T(A,m[0]);for(var M=1;M<m.length;M++){var O=m[M];O[0]<g[0]&&(g[0]=O[0]),O[1]<g[1]&&(g[1]=O[1]),O[2]<g[2]&&(g[2]=O[2]),O[0]>A[0]&&(A[0]=O[0]),O[1]>A[1]&&(A[1]=O[1]),O[2]>A[2]&&(A[2]=O[2])}L._dirty=!0,d._dirty=!0}},union:function(m){var L=this.min,d=this.max;return y.min(L.array,L.array,m.min.array),y.max(d.array,d.array,m.max.array),L._dirty=!0,d._dirty=!0,this},intersection:function(m){var L=this.min,d=this.max;return y.max(L.array,L.array,m.min.array),y.min(d.array,d.array,m.max.array),L._dirty=!0,d._dirty=!0,this},intersectBoundingBox:function(m){var L=this.min.array,d=this.max.array,g=m.min.array,A=m.max.array;return!(L[0]>A[0]||L[1]>A[1]||L[2]>A[2]||d[0]<g[0]||d[1]<g[1]||d[2]<g[2])},containBoundingBox:function(m){var L=this.min.array,d=this.max.array,g=m.min.array,A=m.max.array;return L[0]<=g[0]&&L[1]<=g[1]&&L[2]<=g[2]&&d[0]>=A[0]&&d[1]>=A[1]&&d[2]>=A[2]},containPoint:function(m){var L=this.min.array,d=this.max.array,g=m.array;return L[0]<=g[0]&&L[1]<=g[1]&&L[2]<=g[2]&&d[0]>=g[0]&&d[1]>=g[1]&&d[2]>=g[2]},isFinite:function(){var m=this.min.array,L=this.max.array;return isFinite(m[0])&&isFinite(m[1])&&isFinite(m[2])&&isFinite(L[0])&&isFinite(L[1])&&isFinite(L[2])},applyTransform:function(){var m=y.create(),L=y.create(),d=y.create(),g=y.create(),A=y.create(),M=y.create();return function(O){var S=this.min.array,I=this.max.array,c=O.array;return m[0]=c[0]*S[0],m[1]=c[1]*S[0],m[2]=c[2]*S[0],L[0]=c[0]*I[0],L[1]=c[1]*I[0],L[2]=c[2]*I[0],d[0]=c[4]*S[1],d[1]=c[5]*S[1],d[2]=c[6]*S[1],g[0]=c[4]*I[1],g[1]=c[5]*I[1],g[2]=c[6]*I[1],A[0]=c[8]*S[2],A[1]=c[9]*S[2],A[2]=c[10]*S[2],M[0]=c[8]*I[2],M[1]=c[9]*I[2],M[2]=c[10]*I[2],S[0]=Math.min(m[0],L[0])+Math.min(d[0],g[0])+Math.min(A[0],M[0])+c[12],S[1]=Math.min(m[1],L[1])+Math.min(d[1],g[1])+Math.min(A[1],M[1])+c[13],S[2]=Math.min(m[2],L[2])+Math.min(d[2],g[2])+Math.min(A[2],M[2])+c[14],I[0]=Math.max(m[0],L[0])+Math.max(d[0],g[0])+Math.max(A[0],M[0])+c[12],I[1]=Math.max(m[1],L[1])+Math.max(d[1],g[1])+Math.max(A[1],M[1])+c[13],I[2]=Math.max(m[2],L[2])+Math.max(d[2],g[2])+Math.max(A[2],M[2])+c[14],this.min._dirty=!0,this.max._dirty=!0,this}}(),applyProjection:function(m){var L=this.min.array,d=this.max.array,g=m.array,A=L[0],M=L[1],O=L[2],S=d[0],I=d[1],c=L[2],f=d[0],P=d[1],N=d[2];if(g[15]===1)L[0]=g[0]*A+g[12],L[1]=g[5]*M+g[13],d[2]=g[10]*O+g[14],d[0]=g[0]*f+g[12],d[1]=g[5]*P+g[13],L[2]=g[10]*N+g[14];else{var k=-1/O;L[0]=g[0]*A*k,L[1]=g[5]*M*k,d[2]=(g[10]*O+g[14])*k,k=-1/c,d[0]=g[0]*S*k,d[1]=g[5]*I*k,k=-1/N,L[2]=(g[10]*N+g[14])*k}return this.min._dirty=!0,this.max._dirty=!0,this},updateVertices:function(){var m=this.vertices;if(!m){for(var m=[],L=0;L<8;L++)m[L]=y.fromValues(0,0,0);this.vertices=m}var d=this.min.array,g=this.max.array;return x(m[0],d[0],d[1],d[2]),x(m[1],d[0],g[1],d[2]),x(m[2],g[0],d[1],d[2]),x(m[3],g[0],g[1],d[2]),x(m[4],d[0],d[1],g[2]),x(m[5],d[0],g[1],g[2]),x(m[6],g[0],d[1],g[2]),x(m[7],g[0],g[1],g[2]),this},copy:function(m){var L=this.min,d=this.max;return T(L.array,m.min.array),T(d.array,m.max.array),L._dirty=!0,d._dirty=!0,this},clone:function(){var m=new p;return m.copy(this),m}},V.a=p},function(re,V,b){"use strict";V.a=function(U,C,w){return{seriesType:U,reset:function(y,T){var x=y.getData(),p=y.visualColorAccessPath.split(".");p[p.length-1]="opacity";var m=y.get(p);x.setVisual("opacity",m==null?1:m);function L(d){var g=x.getItemModel(d),A=g.get(p);A!=null&&x.setItemVisual(d,"opacity",A)}return{dataEach:x.hasItemOption?L:null}}}}},function(re,V,b){"use strict";var U=b(8),C=b(6),w=b(21),y=b(93),T=y.a.parseToFloat,x={};function p(d,g,A){var M=Object.keys(d);M.sort();for(var O=[],S=0;S<M.length;S++){var I=M[S],c=d[I];c===null?O.push(I):O.push(I+" "+c.toString())}return O.join(`
|
|
|
`)}function m(d,g,A){A.sort();for(var M=[],O=0;O<A.length;O++){var S=A[O];M.push(S)}var I=p(d)+`
|
|
|
`+p(g)+`
|
|
|
`+M.join(`
|
|
|
`);if(x[I])return x[I];var c=w.a.genGUID();return x[I]=c,c}var L=U.a.extend(function(){return{name:"",depthTest:!0,depthMask:!0,transparent:!1,blend:null,autoUpdateTextureStatus:!0,uniforms:{},vertexDefines:{},fragmentDefines:{},_textureStatus:{},_enabledUniforms:null}},function(){this.name||(this.name="MATERIAL_"+this.__uid__),this.shader&&this.attachShader(this.shader,!0)},{precision:"highp",bind:function(d,g,A,M){for(var O=d.gl,S=g.currentTextureSlot(),I=0;I<this._enabledUniforms.length;I++){var c=this._enabledUniforms[I],f=this.uniforms[c].value;if(f instanceof C.a)f.__slot=-1;else if(Array.isArray(f))for(var P=0;P<f.length;P++)f[P]instanceof C.a&&(f[P].__slot=-1)}for(var I=0;I<this._enabledUniforms.length;I++){var c=this._enabledUniforms[I],N=this.uniforms[c],f=N.value;if(f===null){if(N.type==="t"){var k=g.currentTextureSlot(),W=g.setUniform(O,"1i",c,k);W&&g.takeCurrentTextureSlot(d,null)}continue}else if(f instanceof C.a)if(f.__slot<0){var k=g.currentTextureSlot(),W=g.setUniform(O,"1i",c,k);if(!W)continue;g.takeCurrentTextureSlot(d,f),f.__slot=k}else g.setUniform(O,"1i",c,f.__slot);else if(Array.isArray(f)){if(f.length===0)continue;var z=f[0];if(z instanceof C.a){if(!g.hasUniform(c))continue;for(var Z=[],P=0;P<f.length;P++){var J=f[P];if(J.__slot<0){var k=g.currentTextureSlot();Z.push(k),g.takeCurrentTextureSlot(d,J),J.__slot=k}else Z.push(J.__slot)}g.setUniform(O,"1iv",c,Z)}else g.setUniform(O,N.type,c,f)}else g.setUniform(O,N.type,c,f)}g.resetTextureSlot(S)},setUniform:function(d,g){g===void 0&&console.warn('Uniform value "'+d+'" is undefined');var A=this.uniforms[d];A&&(typeof g=="string"&&(g=T(g)||g),A.value=g,this.autoUpdateTextureStatus&&A.type==="t"&&(g?this.enableTexture(d):this.disableTexture(d)))},setUniforms:function(d){for(var g in d){var A=d[g];this.setUniform(g,A)}},isUniformEnabled:function(d){return this._enabledUniforms.indexOf(d)>=0},getEnabledUniforms:function(){return this._enabledUniforms},getTextureUniforms:function(){return this._textureUniforms},set:function(d,g){if(typeof d=="object")for(var A in d){var M=d[A];this.setUniform(A,M)}else this.setUniform(d,g)},get:function(d){var g=this.uniforms[d];if(g)return g.value},attachShader:function(d,g){var A=this.uniforms;this.uniforms=d.createUniforms(),this.shader=d;var M=this.uniforms;this._enabledUniforms=Object.keys(M),this._enabledUniforms.sort(),this._textureUniforms=this._enabledUniforms.filter(function(P){var N=this.uniforms[P].type;return N==="t"||N==="tv"},this);var O=this.vertexDefines,S=this.fragmentDefines;if(this.vertexDefines=w.a.clone(d.vertexDefines),this.fragmentDefines=w.a.clone(d.fragmentDefines),g){for(var I in A)M[I]&&(M[I].value=A[I].value);w.a.defaults(this.vertexDefines,O),w.a.defaults(this.fragmentDefines,S)}var c={};for(var f in d.textures)c[f]={shaderType:d.textures[f].shaderType,type:d.textures[f].type,enabled:g&&this._textureStatus[f]?this._textureStatus[f].enabled:!1};this._textureStatus=c,this._programKey=""},clone:function(){var d=new this.constructor({name:this.name,shader:this.shader});for(var g in this.uniforms)d.uniforms[g].value=this.uniforms[g].value;return d.depthTest=this.depthTest,d.depthMask=this.depthMask,d.transparent=this.transparent,d.blend=this.blend,d.vertexDefines=w.a.clone(this.vertexDefines),d.fragmentDefines=w.a.clone(this.fragmentDefines),d.enableTexture(this.getEnabledTextures()),d.precision=this.precision,d},define:function(d,g,A){var M=this.vertexDefines,O=this.fragmentDefines;d!=="vertex"&&d!=="fragment"&&d!=="both"&&arguments.length<3&&(A=g,g=d,d="both"),A=A!=null?A:null,(d==="vertex"||d==="both")&&M[g]!==A&&(M[g]=A,this._programKey=""),(d==="fragment"||d==="both")&&O[g]!==A&&(O[g]=A,d!=="both"&&(this._programKey=""))},undefine:function(d,g){d!=="vertex"&&d!=="fragment"&&d!=="both"&&arguments.length<2&&(g=d,d="both"),(d==="vertex"||d==="both")&&this.isDefined("vertex",g)&&(delete this.vertexDefines[g],this._programKey=""),(d==="fragment"||d==="both")&&this.isDefined("fragment",g)&&(delete this.fragmentDefines[g],d!=="both"&&(this._programKey=""))},isDefined:function(d,g){switch(d){case"vertex":return this.vertexDefines[g]!==void 0;case"fragment":return this.fragmentDefines[g]!==void 0}},getDefine:function(d,g){switch(d){case"vertex":return this.vertexDefines[g];case"fragment":return this.fragmentDefines[g]}},enableTexture:function(d){if(Array.isArray(d)){for(var g=0;g<d.length;g++)this.enableTexture(d[g]);return}var A=this._textureStatus[d];if(A){var M=A.enabled;M||(A.enabled=!0,this._programKey="")}},enableTexturesAll:function(){var d=this._textureStatus;for(var g in d)d[g].enabled=!0;this._programKey=""},disableTexture:function(d){if(Array.isArray(d)){for(var g=0;g<d.length;g++)this.disableTexture(d[g]);return}var A=this._textureStatus[d];if(A){var M=!A.enabled;M||(A.enabled=!1,this._programKey="")}},disableTexturesAll:function(){var d=this._textureStatus;for(var g in d)d[g].enabled=!1;this._programKey=""},isTextureEnabled:function(d){var g=this._textureStatus;return!!g[d]&&g[d].enabled},getEnabledTextures:function(){var d=[],g=this._textureStatus;for(var A in g)g[A].enabled&&d.push(A);return d},dirtyDefines:function(){this._programKey=""}});Object.defineProperty&&(Object.defineProperty(L.prototype,"shader",{get:function(){return this._shader||null},set:function(d){this._shader=d}}),Object.defineProperty(L.prototype,"programKey",{get:function(){return this._programKey||(this._programKey=m(this.vertexDefines,this.fragmentDefines,this.getEnabledTextures())),this._programKey}})),V.a=L},function(re,V,b){"use strict";var U=!0;try{var C=document.createElement("canvas"),w=C.getContext("webgl")||C.getContext("experimental-webgl");if(!w)throw new Error}catch(T){U=!1}var y={};y.supportWebGL=function(){return U},y.Int8Array=typeof Int8Array=="undefined"?Array:Int8Array,y.Uint8Array=typeof Uint8Array=="undefined"?Array:Uint8Array,y.Uint16Array=typeof Uint16Array=="undefined"?Array:Uint16Array,y.Uint32Array=typeof Uint32Array=="undefined"?Array:Uint32Array,y.Int16Array=typeof Int16Array=="undefined"?Array:Int16Array,y.Float32Array=typeof Float32Array=="undefined"?Array:Float32Array,y.Float64Array=typeof Float64Array=="undefined"?Array:Float64Array,V.a=y},function(re,V,b){"use strict";var U=b(28),C=U.a.extend(function(){return{color:[1,1,1],intensity:1,castShadow:!0,shadowResolution:512,group:0}},{type:"",clone:function(){var w=U.a.prototype.clone.call(this);return w.color=Array.prototype.slice.call(this.color),w.intensity=this.intensity,w.castShadow=this.castShadow,w.shadowResolution=this.shadowResolution,w}});V.a=C},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(29),y=b(152),T=b(36),x=b(30),p=b(9),m=b(4),L=b(23),d=b(47),g=b(155),A=b(182),M=b(43);function O(I){I=I||"perspective",this.layer=null,this.scene=new w.a,this.rootNode=this.scene,this.viewport={x:0,y:0,width:0,height:0},this.setProjection(I),this._compositor=new g.a,this._temporalSS=new A.a,this._shadowMapPass=new y.a;for(var c=[],f=0,P=0;P<30;P++){for(var N=[],k=0;k<6;k++)N.push(Object(M.a)(f,2)*4-2),N.push(Object(M.a)(f,3)*4-2),f++;c.push(N)}this._pcfKernels=c,this.scene.on("beforerender",function(W,z,Z){this.needsTemporalSS()&&this._temporalSS.jitterProjection(W,Z)},this)}O.prototype.setProjection=function(I){var c=this.camera;c&&c.update(),I==="perspective"?this.camera instanceof T.a||(this.camera=new T.a,c&&this.camera.setLocalTransform(c.localTransform)):this.camera instanceof x.a||(this.camera=new x.a,c&&this.camera.setLocalTransform(c.localTransform)),this.camera.near=.1,this.camera.far=2e3},O.prototype.setViewport=function(I,c,f,P,N){this.camera instanceof T.a&&(this.camera.aspect=f/P),N=N||1,this.viewport.x=I,this.viewport.y=c,this.viewport.width=f,this.viewport.height=P,this.viewport.devicePixelRatio=N,this._compositor.resize(f*N,P*N),this._temporalSS.resize(f*N,P*N)},O.prototype.containPoint=function(I,c){var f=this.viewport,P=this.layer.renderer.getHeight();return c=P-c,I>=f.x&&c>=f.y&&I<=f.x+f.width&&c<=f.y+f.height};var S=new L.a;O.prototype.castRay=function(I,c,f){var P=this.layer.renderer,N=P.viewport;return P.viewport=this.viewport,P.screenToNDC(I,c,S),this.camera.castRay(S,f),P.viewport=N,f},O.prototype.prepareRender=function(){this.scene.update(),this.camera.update(),this._needsSortProgressively=!1;for(var I=0;I<this.scene.transparentList.length;I++){var c=this.scene.transparentList[I],f=c.geometry;f.needsSortVerticesProgressively&&f.needsSortVerticesProgressively()&&(this._needsSortProgressively=!0),f.needsSortTrianglesProgressively&&f.needsSortTrianglesProgressively()&&(this._needsSortProgressively=!0)}this._frame=0,this._temporalSS.resetFrame()},O.prototype.render=function(I,c){this._doRender(I,c,this._frame),this._frame++},O.prototype.needsAccumulate=function(){return this.needsTemporalSS()||this._needsSortProgressively},O.prototype.needsTemporalSS=function(){var I=this._enableTemporalSS;return I=="auto"&&(I=this._enablePostEffect),I},O.prototype.hasDOF=function(){return this._enableDOF},O.prototype.isAccumulateFinished=function(){return this.needsTemporalSS()?this._temporalSS.isFinished():this._frame>30},O.prototype._doRender=function(I,c,f){var P=this.scene,N=this.camera;if(f=f||0,this._updateTransparent(I,P,N,f),c||(this._shadowMapPass.kernelPCF=this._pcfKernels[0],this._shadowMapPass.render(I,P,N,!0)),this._updateShadowPCFKernel(f),I.gl.clearColor(0,0,0,0),this._enablePostEffect&&(this.needsTemporalSS()&&this._temporalSS.jitterProjection(I,N),this._compositor.updateNormal(I,P,N,this._temporalSS.getFrame())),this._updateSSAO(I,P,N,this._temporalSS.getFrame()),this._enablePostEffect){var k=this._compositor.getSourceFrameBuffer();k.bind(I),I.gl.clear(I.gl.DEPTH_BUFFER_BIT|I.gl.COLOR_BUFFER_BIT),I.render(P,N,!0,!0),k.unbind(I),this.needsTemporalSS()&&c?(this._compositor.composite(I,N,this._temporalSS.getSourceFrameBuffer(),this._temporalSS.getFrame()),I.setViewport(this.viewport),this._temporalSS.render(I)):(I.setViewport(this.viewport),this._compositor.composite(I,N,null,0))}else if(this.needsTemporalSS()&&c){var k=this._temporalSS.getSourceFrameBuffer();k.bind(I),I.saveClear(),I.clearBit=I.gl.DEPTH_BUFFER_BIT|I.gl.COLOR_BUFFER_BIT,I.render(P,N,!0,!0),I.restoreClear(),k.unbind(I),I.setViewport(this.viewport),this._temporalSS.render(I)}else I.setViewport(this.viewport),I.render(P,N,!0,!0)},O.prototype._updateTransparent=function(I,c,f,P){for(var N=new m.a,k=new p.a,W=f.getWorldPosition(),z=0;z<c.transparentList.length;z++){var Z=c.transparentList[z],J=Z.geometry;p.a.invert(k,Z.worldTransform),m.a.transformMat4(N,W,k),J.needsSortTriangles&&J.needsSortTriangles()&&J.doSortTriangles(N,P),J.needsSortVertices&&J.needsSortVertices()&&J.doSortVertices(N,P)}},O.prototype._updateSSAO=function(I,c,f,P){var N=this._enableSSAO&&this._enablePostEffect;N&&this._compositor.updateSSAO(I,c,f,this._temporalSS.getFrame());for(var k=0;k<c.opaqueList.length;k++){var W=c.opaqueList[k];W.renderNormal&&W.material[N?"enableTexture":"disableTexture"]("ssaoMap"),N&&W.material.set("ssaoMap",this._compositor.getSSAOTexture())}},O.prototype._updateShadowPCFKernel=function(I){for(var c=this._pcfKernels[I%this._pcfKernels.length],f=this.scene.opaqueList,P=0;P<f.length;P++)f[P].receiveShadow&&(f[P].material.set("pcfKernel",c),f[P].material.define("fragment","PCF_KERNEL_SIZE",c.length/2))},O.prototype.dispose=function(I){this._compositor.dispose(I.gl),this._temporalSS.dispose(I.gl),this._shadowMapPass.dispose(I)},O.prototype.setPostEffect=function(I,c){var f=this._compositor;this._enablePostEffect=I.get("enable");var P=I.getModel("bloom"),N=I.getModel("edge"),k=I.getModel("DOF",I.getModel("depthOfField")),W=I.getModel("SSAO",I.getModel("screenSpaceAmbientOcclusion")),z=I.getModel("SSR",I.getModel("screenSpaceReflection")),Z=I.getModel("FXAA"),J=I.getModel("colorCorrection");P.get("enable")?f.enableBloom():f.disableBloom(),k.get("enable")?f.enableDOF():f.disableDOF(),z.get("enable")?f.enableSSR():f.disableSSR(),J.get("enable")?f.enableColorCorrection():f.disableColorCorrection(),N.get("enable")?f.enableEdge():f.disableEdge(),Z.get("enable")?f.enableFXAA():f.disableFXAA(),this._enableDOF=k.get("enable"),this._enableSSAO=W.get("enable"),this._enableSSAO?f.enableSSAO():f.disableSSAO(),f.setBloomIntensity(P.get("intensity")),f.setEdgeColor(N.get("color")),f.setColorLookupTexture(J.get("lookupTexture"),c),f.setExposure(J.get("exposure")),["radius","quality","intensity"].forEach(function(ee){f.setSSAOParameter(ee,W.get(ee))}),["quality","maxRoughness"].forEach(function(ee){f.setSSRParameter(ee,z.get(ee))}),["quality","focalDistance","focalRange","blurRadius","fstop"].forEach(function(ee){f.setDOFParameter(ee,k.get(ee))}),["brightness","contrast","saturation"].forEach(function(ee){f.setColorCorrection(ee,J.get(ee))})},O.prototype.setDOFFocusOnPoint=function(I){if(this._enablePostEffect)return I>this.camera.far||I<this.camera.near?void 0:(this._compositor.setDOFParameter("focalDistance",I),!0)},O.prototype.setTemporalSuperSampling=function(I){this._enableTemporalSS=I.get("enable")},O.prototype.isLinearSpace=function(){return this._enablePostEffect},O.prototype.setRootNode=function(I){if(this.rootNode!==I){for(var c=this.rootNode.children(),f=0;f<c.length;f++)I.add(c[f]);I!==this.scene&&this.scene.add(I),this.rootNode=I}},O.prototype.add=function(I){this.rootNode.add(I)},O.prototype.remove=function(I){this.rootNode.remove(I)},O.prototype.removeAll=function(I){this.rootNode.removeAll(I)},C.a.util.extend(O.prototype,d.a),V.a=O},function(re,V,b){"use strict";var U=0,C=Array.prototype,w=C.forEach,y={genGUID:function(){return++U},relative2absolute:function(T,x){if(!x||T.match(/^\//))return T;for(var p=T.split("/"),m=x.split("/"),L=p[0];L==="."||L==="..";)L===".."&&m.pop(),p.shift(),L=p[0];return m.join("/")+"/"+p.join("/")},extend:function(T,x){if(x)for(var p in x)x.hasOwnProperty(p)&&(T[p]=x[p]);return T},defaults:function(T,x){if(x)for(var p in x)T[p]===void 0&&(T[p]=x[p]);return T},extendWithPropList:function(T,x,p){if(x)for(var m=0;m<p.length;m++){var L=p[m];T[L]=x[L]}return T},defaultsWithPropList:function(T,x,p){if(x)for(var m=0;m<p.length;m++){var L=p[m];T[L]==null&&(T[L]=x[L])}return T},each:function(T,x,p){if(T&&x)if(T.forEach&&T.forEach===w)T.forEach(x,p);else if(T.length===+T.length)for(var m=0,L=T.length;m<L;m++)x.call(p,T[m],m,T);else for(var d in T)T.hasOwnProperty(d)&&x.call(p,T[d],d,T)},isObject:function(T){return T===Object(T)},isArray:function(T){return Array.isArray(T)},isArrayLike:function(T){return T?T.length===+T.length:!1},clone:function(T){if(y.isObject(T)){if(y.isArray(T))return T.slice();if(y.isArrayLike(T)){for(var x=new T.constructor(T.length),p=0;p<T.length;p++)x[p]=T[p];return x}else return y.extend({},T)}else return T}};V.a=y},function(re,V,b){"use strict";var U=b(13),C=b(0),w=b.n(C),y=b(33),T=b(1),x=b.n(T),p=x.a.vec3,m=[[0,0],[1,1]],L=U.a.extend(function(){return{segmentScale:1,dynamic:!0,useNativeLine:!0,attributes:{position:new U.a.Attribute("position","float",3,"POSITION"),positionPrev:new U.a.Attribute("positionPrev","float",3),positionNext:new U.a.Attribute("positionNext","float",3),prevPositionPrev:new U.a.Attribute("prevPositionPrev","float",3),prevPosition:new U.a.Attribute("prevPosition","float",3),prevPositionNext:new U.a.Attribute("prevPositionNext","float",3),offset:new U.a.Attribute("offset","float",1),color:new U.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(d){var g=this.attributes;this.vertexCount!==d&&(g.position.init(d),g.color.init(d),this.useNativeLine||(g.positionPrev.init(d),g.positionNext.init(d),g.offset.init(d)),d>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(d){this.triangleCount!==d&&(d===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(d*3):new Uint16Array(d*3))},_getCubicCurveApproxStep:function(d,g,A,M){var O=p.dist(d,g)+p.dist(A,g)+p.dist(M,A),S=1/(O+1)*this.segmentScale;return S},getCubicCurveVertexCount:function(d,g,A,M){var O=this._getCubicCurveApproxStep(d,g,A,M),S=Math.ceil(1/O);return this.useNativeLine?S*2:S*2+2},getCubicCurveTriangleCount:function(d,g,A,M){var O=this._getCubicCurveApproxStep(d,g,A,M),S=Math.ceil(1/O);return this.useNativeLine?0:S*2},getLineVertexCount:function(){return this.getPolylineVertexCount(m)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(m)},getPolylineVertexCount:function(d){var g;if(typeof d=="number")g=d;else{var A=typeof d[0]!="number";g=A?d.length:d.length/3}return this.useNativeLine?(g-1)*2:(g-1)*2+2},getPolylineTriangleCount:function(d){var g;if(typeof d=="number")g=d;else{var A=typeof d[0]!="number";g=A?d.length:d.length/3}return this.useNativeLine?0:Math.max(g-1,0)*2},addCubicCurve:function(d,g,A,M,O,S){S==null&&(S=1);for(var I=d[0],c=d[1],f=d[2],P=g[0],N=g[1],k=g[2],W=A[0],z=A[1],Z=A[2],J=M[0],ee=M[1],$=M[2],ie=this._getCubicCurveApproxStep(d,g,A,M),se=ie*ie,ne=se*ie,ce=3*ie,ae=3*se,fe=6*se,oe=6*ne,pe=I-P*2+W,_e=c-N*2+z,de=f-k*2+Z,be=(P-W)*3-I+J,Ae=(N-z)*3-c+ee,Fe=(k-Z)*3-f+$,Ue=I,it=c,tt=f,et=(P-I)*ce+pe*ae+be*ne,vt=(N-c)*ce+_e*ae+Ae*ne,dt=(k-f)*ce+de*ae+Fe*ne,je=pe*fe+be*oe,nt=_e*fe+Ae*oe,rt=de*fe+Fe*oe,ft=be*oe,lt=Ae*oe,wt=Fe*oe,Re=0,We=0,Pe=Math.ceil(1/ie),ke=new Float32Array((Pe+1)*3),ke=[],Ze=0,We=0;We<Pe+1;We++)ke[Ze++]=Ue,ke[Ze++]=it,ke[Ze++]=tt,Ue+=et,it+=vt,tt+=dt,et+=je,vt+=nt,dt+=rt,je+=ft,nt+=lt,rt+=wt,Re+=ie,Re>1&&(Ue=et>0?Math.min(Ue,J):Math.max(Ue,J),it=vt>0?Math.min(it,ee):Math.max(it,ee),tt=dt>0?Math.min(tt,$):Math.max(tt,$));return this.addPolyline(ke,O,S)},addLine:function(d,g,A,M){return this.addPolyline([d,g],A,M)},addPolyline:function(d,g,A,M,O){if(d.length){var S=typeof d[0]!="number";if(O==null&&(O=S?d.length:d.length/3),!(O<2)){M==null&&(M=0),A==null&&(A=1),this._itemVertexOffsets.push(this._vertexOffset);var S=typeof d[0]!="number",I=S?typeof g[0]!="number":g.length/4===O,c=this.attributes.position,f=this.attributes.positionPrev,P=this.attributes.positionNext,N=this.attributes.color,k=this.attributes.offset,W=this.indices,z=this._vertexOffset,Z,J;A=Math.max(A,.01);for(var ee=M;ee<O;ee++){if(S)Z=d[ee],I?J=g[ee]:J=g;else{var $=ee*3;if(Z=Z||[],Z[0]=d[$],Z[1]=d[$+1],Z[2]=d[$+2],I){var ie=ee*4;J=J||[],J[0]=g[ie],J[1]=g[ie+1],J[2]=g[ie+2],J[3]=g[ie+3]}else J=g}if(this.useNativeLine?ee>1&&(c.copy(z,z-1),N.copy(z,z-1),z++):(ee<O-1&&(f.set(z+2,Z),f.set(z+3,Z)),ee>0&&(P.set(z-2,Z),P.set(z-1,Z)),c.set(z,Z),c.set(z+1,Z),N.set(z,J),N.set(z+1,J),k.set(z,A/2),k.set(z+1,-A/2),z+=2),this.useNativeLine)N.set(z,J),c.set(z,Z),z++;else if(ee>0){var se=this._triangleOffset*3,W=this.indices;W[se]=z-4,W[se+1]=z-3,W[se+2]=z-2,W[se+3]=z-3,W[se+4]=z-1,W[se+5]=z-2,this._triangleOffset+=2}}if(!this.useNativeLine){var ne=this._vertexOffset,ce=this._vertexOffset+O*2;f.copy(ne,ne+2),f.copy(ne+1,ne+3),P.copy(ce-1,ce-3),P.copy(ce-2,ce-4)}return this._vertexOffset=z,this._vertexOffset}}},setItemColor:function(d,g){for(var A=this._itemVertexOffsets[d],M=d<this._itemVertexOffsets.length-1?this._itemVertexOffsets[d+1]:this._vertexOffset,O=A;O<M;O++)this.attributes.color.set(O,g);this.dirty("color")},currentTriangleOffset:function(){return this._triangleOffset},currentVertexOffset:function(){return this._vertexOffset}});w.a.util.defaults(L.prototype,y.a),V.a=L},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.vec2,y=function(x,p){x=x||0,p=p||0,this.array=w.fromValues(x,p),this._dirty=!0};if(y.prototype={constructor:y,add:function(x){return w.add(this.array,this.array,x.array),this._dirty=!0,this},set:function(x,p){return this.array[0]=x,this.array[1]=p,this._dirty=!0,this},setArray:function(x){return this.array[0]=x[0],this.array[1]=x[1],this._dirty=!0,this},clone:function(){return new y(this.x,this.y)},copy:function(x){return w.copy(this.array,x.array),this._dirty=!0,this},cross:function(x,p){return w.cross(x.array,this.array,p.array),x._dirty=!0,this},dist:function(x){return w.dist(this.array,x.array)},distance:function(x){return w.distance(this.array,x.array)},div:function(x){return w.div(this.array,this.array,x.array),this._dirty=!0,this},divide:function(x){return w.divide(this.array,this.array,x.array),this._dirty=!0,this},dot:function(x){return w.dot(this.array,x.array)},len:function(){return w.len(this.array)},length:function(){return w.length(this.array)},lerp:function(x,p,m){return w.lerp(this.array,x.array,p.array,m),this._dirty=!0,this},min:function(x){return w.min(this.array,this.array,x.array),this._dirty=!0,this},max:function(x){return w.max(this.array,this.array,x.array),this._dirty=!0,this},mul:function(x){return w.mul(this.array,this.array,x.array),this._dirty=!0,this},multiply:function(x){return w.multiply(this.array,this.array,x.array),this._dirty=!0,this},negate:function(){return w.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return w.normalize(this.array,this.array),this._dirty=!0,this},random:function(x){return w.random(this.array,x),this._dirty=!0,this},scale:function(x){return w.scale(this.array,this.array,x),this._dirty=!0,this},scaleAndAdd:function(x,p){return w.scaleAndAdd(this.array,this.array,x.array,p),this._dirty=!0,this},sqrDist:function(x){return w.sqrDist(this.array,x.array)},squaredDistance:function(x){return w.squaredDistance(this.array,x.array)},sqrLen:function(){return w.sqrLen(this.array)},squaredLength:function(){return w.squaredLength(this.array)},sub:function(x){return w.sub(this.array,this.array,x.array),this._dirty=!0,this},subtract:function(x){return w.subtract(this.array,this.array,x.array),this._dirty=!0,this},transformMat2:function(x){return w.transformMat2(this.array,this.array,x.array),this._dirty=!0,this},transformMat2d:function(x){return w.transformMat2d(this.array,this.array,x.array),this._dirty=!0,this},transformMat3:function(x){return w.transformMat3(this.array,this.array,x.array),this._dirty=!0,this},transformMat4:function(x){return w.transformMat4(this.array,this.array,x.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},Object.defineProperty){var T=y.prototype;Object.defineProperty(T,"x",{get:function(){return this.array[0]},set:function(x){this.array[0]=x,this._dirty=!0}}),Object.defineProperty(T,"y",{get:function(){return this.array[1]},set:function(x){this.array[1]=x,this._dirty=!0}})}y.add=function(x,p,m){return w.add(x.array,p.array,m.array),x._dirty=!0,x},y.set=function(x,p,m){return w.set(x.array,p,m),x._dirty=!0,x},y.copy=function(x,p){return w.copy(x.array,p.array),x._dirty=!0,x},y.cross=function(x,p,m){return w.cross(x.array,p.array,m.array),x._dirty=!0,x},y.dist=function(x,p){return w.distance(x.array,p.array)},y.distance=y.dist,y.div=function(x,p,m){return w.divide(x.array,p.array,m.array),x._dirty=!0,x},y.divide=y.div,y.dot=function(x,p){return w.dot(x.array,p.array)},y.len=function(x){return w.length(x.array)},y.lerp=function(x,p,m,L){return w.lerp(x.array,p.array,m.array,L),x._dirty=!0,x},y.min=function(x,p,m){return w.min(x.array,p.array,m.array),x._dirty=!0,x},y.max=function(x,p,m){return w.max(x.array,p.array,m.array),x._dirty=!0,x},y.mul=function(x,p,m){return w.multiply(x.array,p.array,m.array),x._dirty=!0,x},y.multiply=y.mul,y.negate=function(x,p){return w.negate(x.array,p.array),x._dirty=!0,x},y.normalize=function(x,p){return w.normalize(x.array,p.array),x._dirty=!0,x},y.random=function(x,p){return w.random(x.array,p),x._dirty=!0,x},y.scale=function(x,p,m){return w.scale(x.array,p.array,m),x._dirty=!0,x},y.scaleAndAdd=function(x,p,m,L){return w.scaleAndAdd(x.array,p.array,m.array,L),x._dirty=!0,x},y.sqrDist=function(x,p){return w.sqrDist(x.array,p.array)},y.squaredDistance=y.sqrDist,y.sqrLen=function(x){return w.sqrLen(x.array)},y.squaredLength=y.sqrLen,y.sub=function(x,p,m){return w.subtract(x.array,p.array,m.array),x._dirty=!0,x},y.subtract=y.sub,y.transformMat2=function(x,p,m){return w.transformMat2(x.array,p.array,m.array),x._dirty=!0,x},y.transformMat2d=function(x,p,m){return w.transformMat2d(x.array,p.array,m.array),x._dirty=!0,x},y.transformMat3=function(x,p,m){return w.transformMat3(x.array,p.array,m.array),x._dirty=!0,x},y.transformMat4=function(x,p,m){return w.transformMat4(x.array,p.array,m.array),x._dirty=!0,x},V.a=y},function(re,V,b){"use strict";var U=b(64),C=b(11),w=b(5),y=U.a.extend({skeleton:null,joints:null,useSkinMatricesTexture:!1},function(){this.joints||(this.joints=[])},{isSkinnedMesh:function(){return!!(this.skeleton&&this.joints&&this.joints.length>0)},render:function(T,x,p){var m=T.gl;if(this.skeleton){this.skeleton.update();var L=this.skeleton.getSubSkinMatrices(this.__uid__,this.joints);p.setUniformOfSemantic(m,"SKIN_MATRIX",L)}return U.a.prototype.render.call(this,T,x,p)},getSkinMatricesTexture:function(){return this._skinMatricesTexture=this._skinMatricesTexture||new w.a({type:C.a.FLOAT,minFilter:C.a.NEAREST,magFilter:C.a.NEAREST,useMipmap:!1,flipY:!1}),this._skinMatricesTexture}});y.POINTS=C.a.POINTS,y.LINES=C.a.LINES,y.LINE_LOOP=C.a.LINE_LOOP,y.LINE_STRIP=C.a.LINE_STRIP,y.TRIANGLES=C.a.TRIANGLES,y.TRIANGLE_STRIP=C.a.TRIANGLE_STRIP,y.TRIANGLE_FAN=C.a.TRIANGLE_FAN,y.BACK=C.a.BACK,y.FRONT=C.a.FRONT,y.FRONT_AND_BACK=C.a.FRONT_AND_BACK,y.CW=C.a.CW,y.CCW=C.a.CCW,V.a=y},function(re,V,b){"use strict";var U=b(6),C=b(11),w=b(21),y=b(66),T=y.a.isPowerOfTwo,x=["px","nx","py","ny","pz","nz"],p=U.a.extend(function(){return{image:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},pixels:{px:null,nx:null,py:null,ny:null,pz:null,nz:null},mipmaps:[]}},{update:function(L){var d=L.gl;d.bindTexture(d.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),this.updateCommon(L);var g=this.format,A=this.type;d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_WRAP_S,this.getAvailableWrapS()),d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_WRAP_T,this.getAvailableWrapT()),d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_MAG_FILTER,this.getAvailableMagFilter()),d.texParameteri(d.TEXTURE_CUBE_MAP,d.TEXTURE_MIN_FILTER,this.getAvailableMinFilter());var M=L.getGLExtension("EXT_texture_filter_anisotropic");if(M&&this.anisotropic>1&&d.texParameterf(d.TEXTURE_CUBE_MAP,M.TEXTURE_MAX_ANISOTROPY_EXT,this.anisotropic),A===36193){var O=L.getGLExtension("OES_texture_half_float");O||(A=C.a.FLOAT)}if(this.mipmaps.length)for(var S=this.width,I=this.height,c=0;c<this.mipmaps.length;c++){var f=this.mipmaps[c];this._updateTextureData(d,f,c,S,I,g,A),S/=2,I/=2}else this._updateTextureData(d,this,0,this.width,this.height,g,A),!this.NPOT&&this.useMipmap&&d.generateMipmap(d.TEXTURE_CUBE_MAP);d.bindTexture(d.TEXTURE_CUBE_MAP,null)},_updateTextureData:function(L,d,g,A,M,O,S){for(var I=0;I<6;I++){var c=x[I],f=d.image&&d.image[c];f?L.texImage2D(L.TEXTURE_CUBE_MAP_POSITIVE_X+I,g,O,O,S,f):L.texImage2D(L.TEXTURE_CUBE_MAP_POSITIVE_X+I,g,O,A,M,0,O,S,d.pixels&&d.pixels[c])}},generateMipmap:function(L){var d=L.gl;this.useMipmap&&!this.NPOT&&(d.bindTexture(d.TEXTURE_CUBE_MAP,this._cache.get("webgl_texture")),d.generateMipmap(d.TEXTURE_CUBE_MAP))},bind:function(L){L.gl.bindTexture(L.gl.TEXTURE_CUBE_MAP,this.getWebGLTexture(L))},unbind:function(L){L.gl.bindTexture(L.gl.TEXTURE_CUBE_MAP,null)},isPowerOfTwo:function(){return this.image.px?T(this.image.px.width)&&T(this.image.px.height):T(this.width)&&T(this.height)},isRenderable:function(){return this.image.px?m(this.image.px)&&m(this.image.nx)&&m(this.image.py)&&m(this.image.ny)&&m(this.image.pz)&&m(this.image.nz):!!(this.width&&this.height)},load:function(L,d){var g=0,A=this;return w.a.each(L,function(M,O){var S=new Image;d&&(S.crossOrigin=d),S.onload=function(){g--,g===0&&(A.dirty(),A.trigger("success",A)),S.onload=null},S.onerror=function(){g--,S.onerror=null},g++,S.src=M,A.image[O]=S}),this}});Object.defineProperty(p.prototype,"width",{get:function(){return this.image&&this.image.px?this.image.px.width:this._width},set:function(L){this.image&&this.image.px?console.warn("Texture from image can't set width"):(this._width!==L&&this.dirty(),this._width=L)}}),Object.defineProperty(p.prototype,"height",{get:function(){return this.image&&this.image.px?this.image.px.height:this._height},set:function(L){this.image&&this.image.px?console.warn("Texture from image can't set height"):(this._height!==L&&this.dirty(),this._height=L)}});function m(L){return L.nodeName==="CANVAS"||L.nodeName==="VIDEO"||L.complete}V.a=p},function(re,V,b){"use strict";V.a={defaultOption:{shading:null,realisticMaterial:{textureTiling:1,textureOffset:0,detailTexture:null},lambertMaterial:{textureTiling:1,textureOffset:0,detailTexture:null},colorMaterial:{textureTiling:1,textureOffset:0,detailTexture:null},hatchingMaterial:{textureTiling:1,textureOffset:0,paperColor:"#fff"}}}},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w={};w.getFormattedLabel=function(y,T,x,p,m){x=x||"normal";var L=y.getData(p),d=L.getItemModel(T),g=y.getDataParams(T,p);m!=null&&g.value instanceof Array&&(g.value=g.value[m]);var A=d.get(x==="normal"?["label","formatter"]:["emphasis","label","formatter"]);A==null&&(A=d.get(["label","formatter"]));var M;return typeof A=="function"?(g.status=x,M=A(g)):typeof A=="string"&&(M=C.a.format.formatTpl(A,g)),M},w.normalizeToArray=function(y){return y instanceof Array?y:y==null?[]:[y]},V.a=w},function(re,V,b){"use strict";var U=b(8),C=b(4),w=b(50),y=b(9),T=b(1),x=b.n(T),p=b(15),m=x.a.mat4,L=0,d=U.a.extend({name:"",position:null,rotation:null,scale:null,worldTransform:null,localTransform:null,autoUpdateLocalTransform:!0,_parent:null,_scene:null,_needsUpdateWorldTransform:!0,_inIterating:!1,__depth:0},function(){this.name||(this.name=(this.type||"NODE")+"_"+L++),this.position||(this.position=new C.a),this.rotation||(this.rotation=new w.a),this.scale||(this.scale=new C.a(1,1,1)),this.worldTransform=new y.a,this.localTransform=new y.a,this._children=[]},{target:null,invisible:!1,isSkinnedMesh:function(){return!1},isRenderable:function(){return!1},setName:function(g){var A=this._scene;if(A){var M=A._nodeRepository;delete M[this.name],M[g]=this}this.name=g},add:function(g){this._inIterating&&console.warn("Add operation can cause unpredictable error when in iterating");var A=g._parent;if(A!==this){A&&A.remove(g),g._parent=this,this._children.push(g);var M=this._scene;M&&M!==g.scene&&g.traverse(this._addSelfToScene,this),g._needsUpdateWorldTransform=!0}},remove:function(g){this._inIterating&&console.warn("Remove operation can cause unpredictable error when in iterating");var A=this._children,M=A.indexOf(g);M<0||(A.splice(M,1),g._parent=null,this._scene&&g.traverse(this._removeSelfFromScene,this))},removeAll:function(){for(var g=this._children,A=0;A<g.length;A++)g[A]._parent=null,this._scene&&g[A].traverse(this._removeSelfFromScene,this);this._children=[]},getScene:function(){return this._scene},getParent:function(){return this._parent},_removeSelfFromScene:function(g){g._scene.removeFromScene(g),g._scene=null},_addSelfToScene:function(g){this._scene.addToScene(g),g._scene=this._scene},isAncestor:function(g){for(var A=g._parent;A;){if(A===this)return!0;A=A._parent}return!1},children:function(){return this._children.slice()},childAt:function(g){return this._children[g]},getChildByName:function(g){for(var A=this._children,M=0;M<A.length;M++)if(A[M].name===g)return A[M]},getDescendantByName:function(g){for(var A=this._children,M=0;M<A.length;M++){var O=A[M];if(O.name===g)return O;var S=O.getDescendantByName(g);if(S)return S}},queryNode:function(g){if(g){for(var A=g.split("/"),M=this,O=0;O<A.length;O++){var S=A[O];if(S){for(var I=!1,c=M._children,f=0;f<c.length;f++){var P=c[f];if(P.name===S){M=P,I=!0;break}}if(!I)return}}return M}},getPath:function(g){if(!this._parent)return"/";for(var A=this._parent,M=this.name;A._parent&&(M=A.name+"/"+M,A._parent!=g);)A=A._parent;return!A._parent&&g?null:M},traverse:function(g,A,M){this._inIterating=!0,(!M||M.call(A,this))&&g.call(A,this);for(var O=this._children,S=0,I=O.length;S<I;S++)O[S].traverse(g,A,M);this._inIterating=!1},eachChild:function(g,A,M){this._inIterating=!0;for(var O=this._children,S=M==null,I=0,c=O.length;I<c;I++){var f=O[I];(S||f.constructor===M)&&g.call(A,f,I)}this._inIterating=!1},setLocalTransform:function(g){m.copy(this.localTransform.array,g.array),this.decomposeLocalTransform()},decomposeLocalTransform:function(g){var A=g?null:this.scale;this.localTransform.decomposeMatrix(A,this.rotation,this.position)},setWorldTransform:function(g){m.copy(this.worldTransform.array,g.array),this.decomposeWorldTransform()},decomposeWorldTransform:function(){var g=m.create();return function(A){var M=this.localTransform,O=this.worldTransform;this._parent?(m.invert(g,this._parent.worldTransform.array),m.multiply(M.array,g,O.array)):m.copy(M.array,O.array);var S=A?null:this.scale;M.decomposeMatrix(S,this.rotation,this.position)}}(),transformNeedsUpdate:function(){return this.position._dirty||this.rotation._dirty||this.scale._dirty},updateLocalTransform:function(){var g=this.position,A=this.rotation,M=this.scale;if(this.transformNeedsUpdate()){var O=this.localTransform.array;m.fromRotationTranslation(O,A.array,g.array),m.scale(O,O,M.array),A._dirty=!1,M._dirty=!1,g._dirty=!1,this._needsUpdateWorldTransform=!0}},_updateWorldTransformTopDown:function(){var g=this.localTransform.array,A=this.worldTransform.array;this._parent?m.multiplyAffine(A,this._parent.worldTransform.array,g):m.copy(A,g)},updateWorldTransform:function(){for(var g=this;g&&g.getParent()&&g.getParent().transformNeedsUpdate();)g=g.getParent();g.update()},update:function(g){this.autoUpdateLocalTransform?this.updateLocalTransform():g=!0,(g||this._needsUpdateWorldTransform)&&(this._updateWorldTransformTopDown(),g=!0,this._needsUpdateWorldTransform=!1);for(var A=this._children,M=0,O=A.length;M<O;M++)A[M].update(g)},getBoundingBox:function(){function g(S){return!S.invisible&&S.geometry}var A=new p.a,M=new y.a,O=new y.a;return function(S,I){return I=I||new p.a,S=S||g,this._parent?y.a.invert(O,this._parent.worldTransform):y.a.identity(O),this.traverse(function(c){c.geometry&&c.geometry.boundingBox&&(A.copy(c.geometry.boundingBox),y.a.multiply(M,O,c.worldTransform),A.applyTransform(M),I.union(A))},this,g),I}}(),getWorldPosition:function(g){this.transformNeedsUpdate()&&this.updateWorldTransform();var A=this.worldTransform.array;if(g){var M=g.array;return M[0]=A[12],M[1]=A[13],M[2]=A[14],g}else return new C.a(A[12],A[13],A[14])},clone:function(){var g=new this.constructor,A=this._children;g.setName(this.name),g.position.copy(this.position),g.rotation.copy(this.rotation),g.scale.copy(this.scale);for(var M=0;M<A.length;M++)g.add(A[M].clone());return g},rotateAround:function(){var g=new C.a,A=new y.a;return function(M,O,S){g.copy(this.position).subtract(M);var I=this.localTransform;I.identity(),I.translate(M),I.rotate(S,O),A.fromRotationTranslation(this.rotation,g),I.multiply(A),I.scale(this.scale),this.decomposeLocalTransform(),this._needsUpdateWorldTransform=!0}}(),lookAt:function(){var g=new y.a;return function(A,M){g.lookAt(this.position,A,M||this.localTransform.y).invert(),this.setLocalTransform(g),this.target=A}}()});V.a=d},function(re,V,b){"use strict";var U=b(28),C=b(19),w=b(51),y=b(15),T=b(21),x={};function p(d){var g=[],A=Object.keys(d);A.sort();for(var M=0;M<A.length;M++){var O=d[M];g.push(O+" "+d[O])}var S=g.join(`
|
|
|
`);if(x[S])return x[S];var I=T.a.genGUID();return x[S]=I,I}var m=U.a.extend(function(){return{material:null,autoUpdate:!0,opaqueList:[],transparentList:[],lights:[],viewBoundingBoxLastFrame:new y.a,shadowUniforms:{},_cameraList:[],_lightUniforms:{},_previousLightNumber:{},_lightNumber:{},_lightProgramKeys:{},_opaqueObjectCount:0,_transparentObjectCount:0,_nodeRepository:{}}},function(){this._scene=this},{addToScene:function(d){d instanceof w.a&&(this._cameraList.length>0&&console.warn("Found multiple camera in one scene. Use the fist one."),this._cameraList.push(d)),d.name&&(this._nodeRepository[d.name]=d)},removeFromScene:function(d){if(d instanceof w.a){var g=this._cameraList.indexOf(d);g>=0&&this._cameraList.splice(g,1)}d.name&&delete this._nodeRepository[d.name]},getNode:function(d){return this._nodeRepository[d]},cloneNode:function(d){var g=d.clone(),A={},M=function(S,I){S.skeleton&&(I.skeleton=S.skeleton.clone(d,g),I.joints=S.joints.slice()),S.material&&(A[S.material.__uid__]={oldMat:S.material});for(var c=0;c<S._children.length;c++)M(S._children[c],I._children[c])};M(d,g);for(var O in A)A[O].newMat=A[O].oldMat.clone();return g.traverse(function(S){S.material&&(S.material=A[S.material.__uid__].newMat)}),g},update:function(d,g){if(this.autoUpdate||d){U.a.prototype.update.call(this,d);var A=this.lights,M=this.material&&this.material.transparent;if(this._opaqueObjectCount=0,this._transparentObjectCount=0,A.length=0,this._updateRenderList(this,M),this.opaqueList.length=this._opaqueObjectCount,this.transparentList.length=this._transparentObjectCount,!g){this._previousLightNumber=this._lightNumber;for(var O={},S=0;S<A.length;S++){var I=A[S],c=I.group;O[c]||(O[c]={}),O[c][I.type]=O[c][I.type]||0,O[c][I.type]++}this._lightNumber=O;for(var f in O)this._lightProgramKeys[f]=p(O[f]);this._updateLightUniforms()}}},getMainCamera:function(){return this._cameraList[0]},_updateRenderList:function(d,g){if(!d.invisible)for(var A=0;A<d._children.length;A++){var M=d._children[A];M instanceof C.a?this.lights.push(M):M.isRenderable()&&(M.material.transparent||g?this.transparentList[this._transparentObjectCount++]=M:this.opaqueList[this._opaqueObjectCount++]=M),M._children.length>0&&this._updateRenderList(M)}},_updateLightUniforms:function(){var d=this.lights;d.sort(L);var g=this._lightUniforms;for(var A in g)for(var M in g[A])g[A][M].value.length=0;for(var O=0;O<d.length;O++){var S=d[O],A=S.group;for(var M in S.uniformTemplates){var I=S.uniformTemplates[M],c=I.value(S);if(c!=null){g[A]||(g[A]={}),g[A][M]||(g[A][M]={type:"",value:[]});var f=g[A][M];switch(f.type=I.type+"v",I.type){case"1i":case"1f":case"t":f.value.push(c);break;case"2f":case"3f":case"4f":for(var P=0;P<c.length;P++)f.value.push(c[P]);break;default:console.error("Unkown light uniform type "+I.type)}}}}},getLightGroups:function(){var d=[];for(var g in this._lightNumber)d.push(g);return d},getNumberChangedLightGroups:function(){var d=[];for(var g in this._lightNumber)this.isLightNumberChanged(g)&&d.push(g);return d},isLightNumberChanged:function(d){var g=this._previousLightNumber,A=this._lightNumber;for(var M in A[d])if(!g[d]||A[d][M]!==g[d][M])return!0;for(var M in g[d])if(!A[d]||A[d][M]!==g[d][M])return!0;return!1},getLightsNumbers:function(d){return this._lightNumber[d]},getProgramKey:function(d){return this._lightProgramKeys[d]},setLightUniforms:function(){function d(g,A,M){for(var O in g){var S=g[O];if(S.type==="tv"){if(!A.hasUniform(O))continue;for(var I=[],c=0;c<S.value.length;c++){var f=S.value[c],P=A.takeCurrentTextureSlot(M,f);I.push(P)}A.setUniform(M.gl,"1iv",O,I)}else A.setUniform(M.gl,S.type,O,S.value)}}return function(g,A,M){d(this._lightUniforms[A],g,M),d(this.shadowUniforms,g,M)}}(),dispose:function(){this.material=null,this.opaqueList=[],this.transparentList=[],this.lights=[],this._lightUniforms={},this._lightNumber={},this._nodeRepository={}}});function L(d,g){if(g.castShadow&&!d.castShadow)return!0}V.a=m},function(re,V,b){"use strict";var U=b(51),C=U.a.extend({left:-1,right:1,near:-1,far:1,top:1,bottom:-1},{updateProjectionMatrix:function(){this.projectionMatrix.ortho(this.left,this.right,this.bottom,this.top,this.near,this.far)},decomposeProjectionMatrix:function(){var w=this.projectionMatrix.array;this.left=(-1-w[12])/w[0],this.right=(1-w[12])/w[0],this.top=(1-w[13])/w[5],this.bottom=(-1-w[13])/w[5],this.near=-(-1-w[14])/w[10],this.far=-(1-w[14])/w[10]},clone:function(){var w=U.a.prototype.clone.call(this);return w.left=this.left,w.right=this.right,w.near=this.near,w.far=this.far,w.top=this.top,w.bottom=this.bottom,w}});V.a=C},function(re,V,b){"use strict";V.a={defaultOption:{postEffect:{enable:!1,bloom:{enable:!0,intensity:.1},depthOfField:{enable:!1,focalRange:20,focalDistance:50,blurRadius:10,fstop:2.8,quality:"medium"},screenSpaceAmbientOcclusion:{enable:!1,radius:2,quality:"medium",intensity:1},screenSpaceReflection:{enable:!1,quality:"medium",maxRoughness:.8},colorCorrection:{enable:!0,exposure:0,brightness:0,contrast:1,saturation:1,lookupTexture:""},edge:{enable:!1},FXAA:{enable:!1}},temporalSuperSampling:{enable:"auto"}}}},function(re,V,b){"use strict";V.a={defaultOption:{light:{main:{shadow:!1,shadowQuality:"high",color:"#fff",intensity:1,alpha:0,beta:0},ambient:{color:"#fff",intensity:.2},ambientCubemap:{texture:null,exposure:1,diffuseIntensity:.5,specularIntensity:.5}}}}},function(re,V,b){"use strict";V.a={convertToDynamicArray:function(U){U&&this.resetOffset();var C=this.attributes;for(var w in C)U||!C[w].value?C[w].value=[]:C[w].value=Array.prototype.slice.call(C[w].value);U||!this.indices?this.indices=[]:this.indices=Array.prototype.slice.call(this.indices)},convertToTypedArray:function(){var U=this.attributes;for(var C in U)U[C].value&&U[C].value.length>0?U[C].value=new Float32Array(U[C].value):U[C].value=null;this.indices&&this.indices.length>0&&(this.indices=this.vertexCount>65535?new Uint32Array(this.indices):new Uint16Array(this.indices)),this.dirty()}}},function(re,V,b){"use strict";var U=b(2),C=b(57),w=b(56),y=b(0),T=b.n(y);function x(){}x.prototype={constructor:x,setScene:function(p){this._scene=p,this._skybox&&this._skybox.attachScene(this._scene)},initLight:function(p){this._lightRoot=p,this.mainLight=new U.a.DirectionalLight({shadowBias:.005}),this.ambientLight=new U.a.AmbientLight,p.add(this.mainLight),p.add(this.ambientLight)},dispose:function(){this._lightRoot&&(this._lightRoot.remove(this.mainLight),this._lightRoot.remove(this.ambientLight))},updateLight:function(p){var m=this.mainLight,L=this.ambientLight,d=p.getModel("light"),g=d.getModel("main"),A=d.getModel("ambient");m.intensity=g.get("intensity"),L.intensity=A.get("intensity"),m.color=U.a.parseColor(g.get("color")).slice(0,3),L.color=U.a.parseColor(A.get("color")).slice(0,3);var M=g.get("alpha")||0,O=g.get("beta")||0;m.position.setArray(U.a.directionFromAlphaBeta(M,O)),m.lookAt(U.a.Vector3.ZERO),m.castShadow=g.get("shadow"),m.shadowResolution=U.a.getShadowResolution(g.get("shadowQuality"))},updateAmbientCubemap:function(p,m,L){var d=m.getModel("light.ambientCubemap"),g=d.get("texture");if(g){this._cubemapLightsCache=this._cubemapLightsCache||{};var A=this._cubemapLightsCache[g];if(!A){var M=this;A=this._cubemapLightsCache[g]=U.a.createAmbientCubemap(d.option,p,L,function(){M._skybox instanceof C.a&&M._skybox.setEnvironmentMap(A.specular.cubemap),L.getZr().refresh()})}this._lightRoot.add(A.diffuse),this._lightRoot.add(A.specular),this._currentCubemapLights=A}else this._currentCubemapLights&&(this._lightRoot.remove(this._currentCubemapLights.diffuse),this._lightRoot.remove(this._currentCubemapLights.specular),this._currentCubemapLights=null)},updateSkybox:function(p,m,L){var d=m.get("environment"),g=this;function A(){return g._skybox instanceof C.a||(g._skybox&&g._skybox.dispose(p),g._skybox=new C.a),g._skybox}function M(){return g._skybox instanceof w.a||(g._skybox&&g._skybox.dispose(p),g._skybox=new w.a),g._skybox}if(d&&d!=="none")if(d==="auto")if(this._currentCubemapLights){var O=A(),S=this._currentCubemapLights.specular.cubemap;O.setEnvironmentMap(S),this._scene&&O.attachScene(this._scene),O.material.set("lod",2)}else this._skybox&&this._skybox.detachScene();else if(typeof d=="object"&&d.colorStops||typeof d=="string"&&T.a.color.parse(d)){var I=M(),c=new U.a.Texture2D({anisotropic:8,flipY:!1});I.setEnvironmentMap(c);var f=c.image=document.createElement("canvas");f.width=f.height=16;var P=f.getContext("2d"),N=new T.a.graphic.Rect({shape:{x:0,y:0,width:16,height:16},style:{fill:d}});N.brush(P),I.attachScene(this._scene)}else{var I=M(),c=U.a.loadTexture(d,L,{anisotropic:8,flipY:!1});I.setEnvironmentMap(c),I.attachScene(this._scene)}else this._skybox&&this._skybox.detachScene(this._scene),this._skybox=null;var k=m.coordinateSystem;if(this._skybox)if(k&&k.viewGL&&d!=="auto"&&!(d.match&&d.match(/.hdr$/))){var W=k.viewGL.isLinearSpace()?"define":"undefine";this._skybox.material[W]("fragment","SRGB_DECODE")}else this._skybox.material.undefine("fragment","SRGB_DECODE")}},V.a=x},function(re,V,b){"use strict";var U=b(0),C=b.n(U);function w(y,T){var x=[];return C.a.util.each(y.dimensions,function(p){var m=y.getDimensionInfo(p),L=m.otherDims,d=L[T];d!=null&&d!==!1&&(x[d]=m.name)}),x}V.a=function(y,T,x){function p(S){var I=!0,c=[],f=w(m,"tooltip");f.length?C.a.util.each(f,function(N){P(m.get(N,T),N)}):C.a.util.each(S,P);function P(N,k){var W=m.getDimensionInfo(k);if(!(!W||W.otherDims.tooltip===!1)){var z=W.type,Z=(I?"- "+(W.tooltipName||W.name)+": ":"")+(z==="ordinal"?N+"":z==="time"?x?"":C.a.format.formatTime("yyyy/MM/dd hh:mm:ss",N):C.a.format.addCommas(N));Z&&c.push(C.a.format.encodeHTML(Z))}}return(I?"<br/>":"")+c.join(I?"<br/>":", ")}var m=y.getData(),L=y.getRawValue(T),d=C.a.util.isArray(L)?p(L):C.a.format.encodeHTML(C.a.format.addCommas(L)),g=m.getName(T),A=m.getItemVisual(T,"color");C.a.util.isObject(A)&&A.colorStops&&(A=(A.colorStops[0]||{}).color),A=A||"transparent";var M=C.a.format.getTooltipMarker(A),O=y.name;return O==="\0-"&&(O=""),O=O?C.a.format.encodeHTML(O)+(x?": ":"<br/>"):"",x?M+O+d:O+M+(g?C.a.format.encodeHTML(g)+": "+d:d)}},function(re,V,b){"use strict";var U=b(51),C=U.a.extend({fov:50,aspect:1,near:.1,far:2e3},{updateProjectionMatrix:function(){var w=this.fov/180*Math.PI;this.projectionMatrix.perspective(w,this.aspect,this.near,this.far)},decomposeProjectionMatrix:function(){var w=this.projectionMatrix.array,y=Math.atan(1/w[5])*2;this.fov=y/Math.PI*180,this.aspect=w[5]/w[0],this.near=w[14]/(w[10]-1),this.far=w[14]/(w[10]+1)},clone:function(){var w=U.a.prototype.clone.call(this);return w.fov=this.fov,w.aspect=this.aspect,w.near=this.near,w.far=this.far,w}});V.a=C},function(re,V,b){"use strict";var U=b(13),C=b(15),w=U.a.extend({dynamic:!1,widthSegments:1,heightSegments:1},function(){this.build()},{build:function(){for(var y=this.heightSegments,T=this.widthSegments,x=this.attributes,p=[],m=[],L=[],d=[],g=0;g<=y;g++)for(var A=g/y,M=0;M<=T;M++){var O=M/T;if(p.push([2*O-1,2*A-1,0]),m&&m.push([O,A]),L&&L.push([0,0,1]),M<T&&g<y){var S=M+g*(T+1);d.push([S,S+1,S+T+1]),d.push([S+T+1,S+1,S+T+2])}}x.position.fromArray(p),x.texcoord0.fromArray(m),x.normal.fromArray(L),this.initIndicesFromArray(d),this.boundingBox=new C.a,this.boundingBox.min.set(-1,-1,0),this.boundingBox.max.set(1,1,0)}});V.a=w},function(re,V,b){"use strict";V.a={defaultOption:{viewControl:{projection:"perspective",autoRotate:!1,autoRotateDirection:"cw",autoRotateSpeed:10,autoRotateAfterStill:3,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",distance:150,minDistance:40,maxDistance:400,orthographicSize:150,maxOrthographicSize:400,minOrthographicSize:20,center:[0,0,0],alpha:0,beta:0,minAlpha:-90,maxAlpha:90}},setView:function(U){U=U||{},this.option.viewControl=this.option.viewControl||{},U.alpha!=null&&(this.option.viewControl.alpha=U.alpha),U.beta!=null&&(this.option.viewControl.beta=U.beta),U.distance!=null&&(this.option.viewControl.distance=U.distance),U.center!=null&&(this.option.viewControl.center=U.center)}}},function(re,V,b){"use strict";var U=b(8),C=b(23),w=b(4),y=b(50),T=b(3),x=T.a.firstNotNull,p={left:0,middle:1,right:2};function m(d){return d instanceof Array||(d=[d,d]),d}var L=U.a.extend(function(){return{zr:null,viewGL:null,_center:new w.a,minDistance:.5,maxDistance:1.5,maxOrthographicSize:300,minOrthographicSize:30,minAlpha:-90,maxAlpha:90,minBeta:-1/0,maxBeta:1/0,autoRotateAfterStill:0,autoRotateDirection:"cw",autoRotateSpeed:60,damping:.8,rotateSensitivity:1,zoomSensitivity:1,panSensitivity:1,panMouseButton:"middle",rotateMouseButton:"left",_mode:"rotate",_camera:null,_needsUpdate:!1,_rotating:!1,_phi:0,_theta:0,_mouseX:0,_mouseY:0,_rotateVelocity:new C.a,_panVelocity:new C.a,_distance:500,_zoomSpeed:0,_stillTimeout:0,_animators:[]}},function(){["_mouseDownHandler","_mouseWheelHandler","_mouseMoveHandler","_mouseUpHandler","_pinchHandler","_contextMenuHandler","_update"].forEach(function(d){this[d]=this[d].bind(this)},this)},{init:function(){var d=this.zr;d&&(d.on("mousedown",this._mouseDownHandler),d.on("globalout",this._mouseUpHandler),d.on("mousewheel",this._mouseWheelHandler),d.on("pinch",this._pinchHandler),d.animation.on("frame",this._update),d.dom.addEventListener("contextmenu",this._contextMenuHandler))},dispose:function(){var d=this.zr;d&&(d.off("mousedown",this._mouseDownHandler),d.off("mousemove",this._mouseMoveHandler),d.off("mouseup",this._mouseUpHandler),d.off("mousewheel",this._mouseWheelHandler),d.off("pinch",this._pinchHandler),d.off("globalout",this._mouseUpHandler),d.dom.removeEventListener("contextmenu",this._contextMenuHandler),d.animation.off("frame",this._update)),this.stopAllAnimation()},getDistance:function(){return this._distance},setDistance:function(d){this._distance=d,this._needsUpdate=!0},getOrthographicSize:function(){return this._orthoSize},setOrthographicSize:function(d){this._orthoSize=d,this._needsUpdate=!0},getAlpha:function(){return this._theta/Math.PI*180},getBeta:function(){return-this._phi/Math.PI*180},getCenter:function(){return this._center.toArray()},setAlpha:function(d){d=Math.max(Math.min(this.maxAlpha,d),this.minAlpha),this._theta=d/180*Math.PI,this._needsUpdate=!0},setBeta:function(d){d=Math.max(Math.min(this.maxBeta,d),this.minBeta),this._phi=-d/180*Math.PI,this._needsUpdate=!0},setCenter:function(d){this._center.setArray(d)},setViewGL:function(d){this.viewGL=d},getCamera:function(){return this.viewGL.camera},setFromViewControlModel:function(d,g){g=g||{};var A=g.baseDistance||0,M=g.baseOrthoSize||1,O=d.get("projection");O!=="perspective"&&O!=="orthographic"&&O!=="isometric"&&(console.error("Unkown projection type %s, use perspective projection instead.",O),O="perspective"),this._projection=O,this.viewGL.setProjection(O);var S=d.get("distance")+A,I=d.get("orthographicSize")+M;[["damping",.8],["autoRotate",!1],["autoRotateAfterStill",3],["autoRotateDirection","cw"],["autoRotateSpeed",10],["minDistance",30],["maxDistance",400],["minOrthographicSize",30],["maxOrthographicSize",300],["minAlpha",-90],["maxAlpha",90],["minBeta",-1/0],["maxBeta",1/0],["rotateSensitivity",1],["zoomSensitivity",1],["panSensitivity",1],["panMouseButton","left"],["rotateMouseButton","middle"]].forEach(function(W){this[W[0]]=x(d.get(W[0]),W[1])},this),this.minDistance+=A,this.maxDistance+=A,this.minOrthographicSize+=M,this.maxOrthographicSize+=M;var c=d.ecModel,f={};["animation","animationDurationUpdate","animationEasingUpdate"].forEach(function(W){f[W]=x(d.get(W),c&&c.get(W))});var P=x(g.alpha,d.get("alpha"))||0,N=x(g.beta,d.get("beta"))||0,k=x(g.center,d.get("center"))||[0,0,0];f.animation&&f.animationDurationUpdate>0&&this._notFirst?this.animateTo({alpha:P,beta:N,center:k,distance:S,targetOrthographicSize:I,easing:f.animationEasingUpdate,duration:f.animationDurationUpdate}):(this.setDistance(S),this.setAlpha(P),this.setBeta(N),this.setCenter(k),this.setOrthographicSize(I)),this._notFirst=!0,this._validateProperties()},_validateProperties:function(){p[this.panMouseButton]==null&&console.error("Unkown panMouseButton %s. It should be left|middle|right",this.panMouseButton),p[this.rotateMouseButton]==null&&console.error("Unkown rotateMouseButton %s. It should be left|middle|right",this.rotateMouseButton),this.autoRotateDirection!=="cw"&&this.autoRotateDirection!=="ccw"&&console.error("Unkown autoRotateDirection %s. It should be cw|ccw",this.autoRotateDirection)},animateTo:function(d){var g=this.zr,A=this,M={},O={};return d.distance!=null&&(M.distance=this.getDistance(),O.distance=d.distance),d.orthographicSize!=null&&(M.orthographicSize=this.getOrthographicSize(),O.orthographicSize=d.orthographicSize),d.alpha!=null&&(M.alpha=this.getAlpha(),O.alpha=d.alpha),d.beta!=null&&(M.beta=this.getBeta(),O.beta=d.beta),d.center!=null&&(M.center=this.getCenter(),O.center=d.center),this._addAnimator(g.animation.animate(M).when(d.duration||1e3,O).during(function(){M.alpha!=null&&A.setAlpha(M.alpha),M.beta!=null&&A.setBeta(M.beta),M.distance!=null&&A.setDistance(M.distance),M.center!=null&&A.setCenter(M.center),M.orthographicSize!=null&&A.setOrthographicSize(M.orthographicSize),A._needsUpdate=!0})).start(d.easing||"linear")},stopAllAnimation:function(){for(var d=0;d<this._animators.length;d++)this._animators[d].stop();this._animators.length=0},_isAnimating:function(){return this._animators.length>0},_update:function(d){if(this._rotating){var g=(this.autoRotateDirection==="cw"?1:-1)*this.autoRotateSpeed/180*Math.PI;this._phi-=g*d/1e3,this._needsUpdate=!0}else this._rotateVelocity.len()>0&&(this._needsUpdate=!0);(Math.abs(this._zoomSpeed)>.1||this._panVelocity.len()>0)&&(this._needsUpdate=!0),this._needsUpdate&&(d=Math.min(d,50),this._updateDistanceOrSize(d),this._updatePan(d),this._updateRotate(d),this._updateTransform(),this.getCamera().update(),this.zr&&this.zr.refresh(),this.trigger("update"),this._needsUpdate=!1)},_updateRotate:function(d){var g=this._rotateVelocity;this._phi=g.y*d/20+this._phi,this._theta=g.x*d/20+this._theta,this.setAlpha(this.getAlpha()),this.setBeta(this.getBeta()),this._vectorDamping(g,Math.pow(this.damping,d/16))},_updateDistanceOrSize:function(d){this._projection==="perspective"?this._setDistance(this._distance+this._zoomSpeed*d/20):this._setOrthoSize(this._orthoSize+this._zoomSpeed*d/20),this._zoomSpeed*=Math.pow(this.damping,d/16)},_setDistance:function(d){this._distance=Math.max(Math.min(d,this.maxDistance),this.minDistance)},_setOrthoSize:function(d){this._orthoSize=Math.max(Math.min(d,this.maxOrthographicSize),this.minOrthographicSize);var g=this.getCamera(),A=this._orthoSize,M=A/this.viewGL.viewport.height*this.viewGL.viewport.width;g.left=-M/2,g.right=M/2,g.top=A/2,g.bottom=-A/2},_updatePan:function(d){var g=this._panVelocity,A=this._distance,M=this.getCamera(),O=M.worldTransform.y,S=M.worldTransform.x;this._center.scaleAndAdd(S,-g.x*A/200).scaleAndAdd(O,-g.y*A/200),this._vectorDamping(g,0)},_updateTransform:function(){var d=this.getCamera(),g=new w.a,A=this._theta+Math.PI/2,M=this._phi+Math.PI/2,O=Math.sin(A);g.x=O*Math.cos(M),g.y=-Math.cos(A),g.z=O*Math.sin(M),d.position.copy(this._center).scaleAndAdd(g,this._distance),d.rotation.identity().rotateY(-this._phi).rotateX(-this._theta)},_startCountingStill:function(){clearTimeout(this._stillTimeout);var d=this.autoRotateAfterStill,g=this;!isNaN(d)&&d>0&&(this._stillTimeout=setTimeout(function(){g._rotating=!0},d*1e3))},_vectorDamping:function(d,g){var A=d.len();A=A*g,A<1e-4&&(A=0),d.normalize().scale(A)},_decomposeTransform:function(){if(this.getCamera()){this.getCamera().updateWorldTransform();var d=this.getCamera().worldTransform.z,g=Math.asin(d.y),A=Math.atan2(d.x,d.z);this._theta=g,this._phi=-A,this.setBeta(this.getBeta()),this.setAlpha(this.getAlpha()),this.getCamera().aspect?this._setDistance(this.getCamera().position.dist(this._center)):this._setOrthoSize(this.getCamera().top-this.getCamera().bottom)}},_mouseDownHandler:function(d){if(!d.target&&!this._isAnimating()){var g=d.offsetX,A=d.offsetY;this.viewGL&&!this.viewGL.containPoint(g,A)||(this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler),d.event.targetTouches?d.event.targetTouches.length===1&&(this._mode="rotate"):d.event.button===p[this.rotateMouseButton]?this._mode="rotate":d.event.button===p[this.panMouseButton]?this._mode="pan":this._mode="",this._rotateVelocity.set(0,0),this._rotating=!1,this.autoRotate&&this._startCountingStill(),this._mouseX=d.offsetX,this._mouseY=d.offsetY)}},_mouseMoveHandler:function(d){if(!(d.target&&d.target.__isGLToZRProxy)&&!this._isAnimating()){var g=m(this.panSensitivity),A=m(this.rotateSensitivity);this._mode==="rotate"?(this._rotateVelocity.y=(d.offsetX-this._mouseX)/this.zr.getHeight()*2*A[0],this._rotateVelocity.x=(d.offsetY-this._mouseY)/this.zr.getWidth()*2*A[1]):this._mode==="pan"&&(this._panVelocity.x=(d.offsetX-this._mouseX)/this.zr.getWidth()*g[0]*400,this._panVelocity.y=(-d.offsetY+this._mouseY)/this.zr.getHeight()*g[1]*400),this._mouseX=d.offsetX,this._mouseY=d.offsetY,d.event.preventDefault()}},_mouseWheelHandler:function(d){if(!this._isAnimating()){var g=d.event.wheelDelta||-d.event.detail;this._zoomHandler(d,g)}},_pinchHandler:function(d){this._isAnimating()||(this._zoomHandler(d,d.pinchScale>1?1:-1),this._mode="")},_zoomHandler:function(d,g){if(g!==0){var A=d.offsetX,M=d.offsetY;if(!(this.viewGL&&!this.viewGL.containPoint(A,M))){var O;this._projection==="perspective"?O=Math.max(Math.max(Math.min(this._distance-this.minDistance,this.maxDistance-this._distance))/20,.5):O=Math.max(Math.max(Math.min(this._orthoSize-this.minOrthographicSize,this.maxOrthographicSize-this._orthoSize))/20,.5),this._zoomSpeed=(g>0?-1:1)*O*this.zoomSensitivity,this._rotating=!1,this.autoRotate&&this._mode==="rotate"&&this._startCountingStill(),d.event.preventDefault()}}},_mouseUpHandler:function(){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_isRightMouseButtonUsed:function(){return this.rotateMouseButton==="right"||this.panMouseButton==="right"},_contextMenuHandler:function(d){this._isRightMouseButtonUsed()&&d.preventDefault()},_addAnimator:function(d){var g=this._animators;return g.push(d),d.done(function(){var A=g.indexOf(d);A>=0&&g.splice(A,1)}),d}});Object.defineProperty(L.prototype,"autoRotate",{get:function(d){return this._autoRotate},set:function(d){this._autoRotate=d,this._rotating=d}}),V.a=L},function(re,V,b){"use strict";V.a=`@export ecgl.lines3D.vertex
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
attribute vec3 position: POSITION;
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_Position = worldViewProjection * vec4(position, 1.0);
|
|
|
v_Color = a_Color;
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.lines3D.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor = sRGBToLinear(color * v_Color);
|
|
|
#else
|
|
|
gl_FragColor = color * v_Color;
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.lines3D.clipNear
|
|
|
|
|
|
vec4 clipNear(vec4 p1, vec4 p2) {
|
|
|
float n = (p1.w - near) / (p1.w - p2.w);
|
|
|
return vec4(mix(p1.xy, p2.xy, n), -near, near);
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.lines3D.expandLine
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
vec4 prevProj = worldViewProjection * vec4(mix(prevPositionPrev, positionPrev, percent), 1.0);
|
|
|
vec4 currProj = worldViewProjection * vec4(mix(prevPosition, position, percent), 1.0);
|
|
|
vec4 nextProj = worldViewProjection * vec4(mix(prevPositionNext, positionNext, percent), 1.0);
|
|
|
#else
|
|
|
vec4 prevProj = worldViewProjection * vec4(positionPrev, 1.0);
|
|
|
vec4 currProj = worldViewProjection * vec4(position, 1.0);
|
|
|
vec4 nextProj = worldViewProjection * vec4(positionNext, 1.0);
|
|
|
#endif
|
|
|
|
|
|
if (currProj.w < 0.0) {
|
|
|
if (nextProj.w > 0.0) {
|
|
|
currProj = clipNear(currProj, nextProj);
|
|
|
}
|
|
|
else if (prevProj.w > 0.0) {
|
|
|
currProj = clipNear(currProj, prevProj);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
vec2 prevScreen = (prevProj.xy / abs(prevProj.w) + 1.0) * 0.5 * viewport.zw;
|
|
|
vec2 currScreen = (currProj.xy / abs(currProj.w) + 1.0) * 0.5 * viewport.zw;
|
|
|
vec2 nextScreen = (nextProj.xy / abs(nextProj.w) + 1.0) * 0.5 * viewport.zw;
|
|
|
|
|
|
vec2 dir;
|
|
|
float len = offset;
|
|
|
if (position == positionPrev) {
|
|
|
dir = normalize(nextScreen - currScreen);
|
|
|
}
|
|
|
else if (position == positionNext) {
|
|
|
dir = normalize(currScreen - prevScreen);
|
|
|
}
|
|
|
else {
|
|
|
vec2 dirA = normalize(currScreen - prevScreen);
|
|
|
vec2 dirB = normalize(nextScreen - currScreen);
|
|
|
|
|
|
vec2 tanget = normalize(dirA + dirB);
|
|
|
|
|
|
float miter = 1.0 / max(dot(tanget, dirA), 0.5);
|
|
|
len *= miter;
|
|
|
dir = tanget;
|
|
|
}
|
|
|
|
|
|
dir = vec2(-dir.y, dir.x) * len;
|
|
|
currScreen += dir;
|
|
|
|
|
|
currProj.xy = (currScreen / viewport.zw - 0.5) * 2.0 * abs(currProj.w);
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.meshLines3D.vertex
|
|
|
|
|
|
attribute vec3 position: POSITION;
|
|
|
attribute vec3 positionPrev;
|
|
|
attribute vec3 positionNext;
|
|
|
attribute float offset;
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
attribute vec3 prevPosition;
|
|
|
attribute vec3 prevPositionPrev;
|
|
|
attribute vec3 prevPositionNext;
|
|
|
uniform float percent : 1.0;
|
|
|
#endif
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform vec4 viewport : VIEWPORT;
|
|
|
uniform float near : NEAR;
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexHeader
|
|
|
|
|
|
@import ecgl.lines3D.clipNear
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
@import ecgl.lines3D.expandLine
|
|
|
|
|
|
gl_Position = currProj;
|
|
|
|
|
|
v_Color = a_Color;
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexMain
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.meshLines3D.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor = sRGBToLinear(color * v_Color);
|
|
|
#else
|
|
|
gl_FragColor = color * v_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentMain
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){var U=b(12),C=b(75),w=b(78),y=w.parsePercent,T=b(149),x=U.each,p=["left","right","top","bottom","width","height"],m=[["width","left","right"],["height","top","bottom"]];function L(N,k,W,z,Z){var J=0,ee=0;z==null&&(z=1/0),Z==null&&(Z=1/0);var $=0;k.eachChild(function(ie,se){var ne=ie.position,ce=ie.getBoundingRect(),ae=k.childAt(se+1),fe=ae&&ae.getBoundingRect(),oe,pe;if(N==="horizontal"){var _e=ce.width+(fe?-fe.x+ce.x:0);oe=J+_e,oe>z||ie.newline?(J=0,oe=_e,ee+=$+W,$=ce.height):$=Math.max($,ce.height)}else{var de=ce.height+(fe?-fe.y+ce.y:0);pe=ee+de,pe>Z||ie.newline?(J+=$+W,ee=0,pe=de,$=ce.width):$=Math.max($,ce.width)}ie.newline||(ne[0]=J,ne[1]=ee,N==="horizontal"?J=oe+W:ee=pe+W)})}var d=L,g=U.curry(L,"vertical"),A=U.curry(L,"horizontal");function M(N,k,W){var z=k.width,Z=k.height,J=y(N.x,z),ee=y(N.y,Z),$=y(N.x2,z),ie=y(N.y2,Z);return(isNaN(J)||isNaN(parseFloat(N.x)))&&(J=0),(isNaN($)||isNaN(parseFloat(N.x2)))&&($=z),(isNaN(ee)||isNaN(parseFloat(N.y)))&&(ee=0),(isNaN(ie)||isNaN(parseFloat(N.y2)))&&(ie=Z),W=T.normalizeCssArray(W||0),{width:Math.max($-J-W[1]-W[3],0),height:Math.max(ie-ee-W[0]-W[2],0)}}function O(N,k,W){W=T.normalizeCssArray(W||0);var z=k.width,Z=k.height,J=y(N.left,z),ee=y(N.top,Z),$=y(N.right,z),ie=y(N.bottom,Z),se=y(N.width,z),ne=y(N.height,Z),ce=W[2]+W[0],ae=W[1]+W[3],fe=N.aspect;switch(isNaN(se)&&(se=z-$-ae-J),isNaN(ne)&&(ne=Z-ie-ce-ee),fe!=null&&(isNaN(se)&&isNaN(ne)&&(fe>z/Z?se=z*.8:ne=Z*.8),isNaN(se)&&(se=fe*ne),isNaN(ne)&&(ne=se/fe)),isNaN(J)&&(J=z-$-se-ae),isNaN(ee)&&(ee=Z-ie-ne-ce),N.left||N.right){case"center":J=z/2-se/2-W[3];break;case"right":J=z-se-ae;break}switch(N.top||N.bottom){case"middle":case"center":ee=Z/2-ne/2-W[0];break;case"bottom":ee=Z-ne-ce;break}J=J||0,ee=ee||0,isNaN(se)&&(se=z-ae-J-($||0)),isNaN(ne)&&(ne=Z-ce-ee-(ie||0));var oe=new C(J+W[3],ee+W[0],se,ne);return oe.margin=W,oe}function S(N,k,W,z,Z){var J=!Z||!Z.hv||Z.hv[0],ee=!Z||!Z.hv||Z.hv[1],$=Z&&Z.boundingMode||"all";if(!(!J&&!ee)){var ie;if($==="raw")ie=N.type==="group"?new C(0,0,+k.width||0,+k.height||0):N.getBoundingRect();else if(ie=N.getBoundingRect(),N.needLocalTransform()){var se=N.getLocalTransform();ie=ie.clone(),ie.applyTransform(se)}k=O(U.defaults({width:ie.width,height:ie.height},k),W,z);var ne=N.position,ce=J?k.x-ie.x:0,ae=ee?k.y-ie.y:0;N.attr("position",$==="raw"?[ce,ae]:[ne[0]+ce,ne[1]+ae])}}function I(N,k){return N[m[k][0]]!=null||N[m[k][1]]!=null&&N[m[k][2]]!=null}function c(N,k,W){!U.isObject(W)&&(W={});var z=W.ignoreSize;!U.isArray(z)&&(z=[z,z]);var Z=ee(m[0],0),J=ee(m[1],1);se(m[0],N,Z),se(m[1],N,J);function ee(ne,ce){var ae={},fe=0,oe={},pe=0,_e=2;if(x(ne,function(Ae){oe[Ae]=N[Ae]}),x(ne,function(Ae){$(k,Ae)&&(ae[Ae]=oe[Ae]=k[Ae]),ie(ae,Ae)&&fe++,ie(oe,Ae)&&pe++}),z[ce])return ie(k,ne[1])?oe[ne[2]]=null:ie(k,ne[2])&&(oe[ne[1]]=null),oe;if(pe===_e||!fe)return oe;if(fe>=_e)return ae;for(var de=0;de<ne.length;de++){var be=ne[de];if(!$(ae,be)&&$(N,be)){ae[be]=N[be];break}}return ae}function $(ne,ce){return ne.hasOwnProperty(ce)}function ie(ne,ce){return ne[ce]!=null&&ne[ce]!=="auto"}function se(ne,ce,ae){x(ne,function(fe){ce[fe]=ae[fe]})}}function f(N){return P({},N)}function P(N,k){return k&&N&&x(p,function(W){k.hasOwnProperty(W)&&(N[W]=k[W])}),N}V.LOCATION_PARAMS=p,V.HV_NAMES=m,V.box=d,V.vbox=g,V.hbox=A,V.getAvailableSize=M,V.getLayoutRect=O,V.positionElement=S,V.sizeCalculable=I,V.mergeLayoutParam=c,V.getLayoutParams=f,V.copyLayoutParams=P},function(re,V,b){"use strict";var U=b(8),C=U.a.extend(function(){return{name:"",inputLinks:{},outputLinks:{},_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}},{updateParameter:function(w,y){var T=this.outputs[w],x=T.parameters,p=T._parametersCopy;if(p||(p=T._parametersCopy={}),x)for(var m in x)m!=="width"&&m!=="height"&&(p[m]=x[m]);var L,d;return x.width instanceof Function?L=x.width.call(this,y):L=x.width,x.height instanceof Function?d=x.height.call(this,y):d=x.height,(p.width!==L||p.height!==d)&&this._outputTextures[w]&&this._outputTextures[w].dispose(y.gl),p.width=L,p.height=d,p},setParameter:function(w,y){},getParameter:function(w){},setParameters:function(w){for(var y in w)this.setParameter(y,w[y])},render:function(){},getOutput:function(w,y){if(y==null)return y=w,this._outputTextures[y];var T=this.outputs[y];if(T)return this._rendered?T.outputLastFrame?this._prevOutputTextures[y]:this._outputTextures[y]:this._rendering?(this._prevOutputTextures[y]||(this._prevOutputTextures[y]=this._compositor.allocateTexture(T.parameters||{})),this._prevOutputTextures[y]):(this.render(w),this._outputTextures[y])},removeReference:function(w){if(this._outputReferences[w]--,this._outputReferences[w]===0){var y=this.outputs[w];y.keepLastFrame?(this._prevOutputTextures[w]&&this._compositor.releaseTexture(this._prevOutputTextures[w]),this._prevOutputTextures[w]=this._outputTextures[w]):this._compositor.releaseTexture(this._outputTextures[w])}},link:function(w,y,T){this.inputLinks[w]={node:y,pin:T},y.outputLinks[T]||(y.outputLinks[T]=[]),y.outputLinks[T].push({node:this,pin:w}),this.pass.material.enableTexture(w)},clear:function(){this.inputLinks={},this.outputLinks={}},updateReference:function(w){if(!this._rendering){this._rendering=!0;for(var y in this.inputLinks){var T=this.inputLinks[y];T.node.updateReference(T.pin)}this._rendering=!1}w&&this._outputReferences[w]++},beforeFrame:function(){this._rendered=!1;for(var w in this.outputLinks)this._outputReferences[w]=0},afterFrame:function(){for(var w in this.outputLinks)if(this._outputReferences[w]>0){var y=this.outputs[w];y.keepLastFrame?(this._prevOutputTextures[w]&&this._compositor.releaseTexture(this._prevOutputTextures[w]),this._prevOutputTextures[w]=this._outputTextures[w]):this._compositor.releaseTexture(this._outputTextures[w])}}});V.a=C},function(re,V,b){"use strict";function U(C,w){for(var y=0,T=1/w,x=C;x>0;)y=y+T*(x%w),x=Math.floor(x/w),T=T/w;return y}V.a=U},function(re,V,b){"use strict";var U=b(0),C=b.n(U);V.a=function(w,y,T){T=T||w.getSource();var x=y||C.a.getCoordinateSystemDimensions(w.get("coordinateSystem"))||["x","y","z"],p=C.a.helper.createDimensions(T,{dimensionsDefine:T.dimensionsDefine||w.get("dimensions"),encodeDefine:T.encodeDefine||w.get("encode"),coordDimensions:x.map(function(L){var d=w.getReferringComponents(L+"Axis3D")[0];return{type:d&&d.get("type")==="category"?"ordinal":"float",name:L,stackable:L==="z"}})});w.get("coordinateSystem")==="cartesian3D"&&p.forEach(function(L){if(x.indexOf(L.coordDim)>=0){var d=w.getReferringComponents(L.coordDim+"Axis3D")[0];d&&d.get("type")==="category"&&(L.ordinalMeta=d.getOrdinalMeta())}});var m=new C.a.List(p,w);return m.initData(T),m}},function(re,V){function b(U,C,w){return{seriesType:U,performRawSeries:!0,reset:function(y,T,x){var p=y.getData(),m=y.get("symbol")||C,L=y.get("symbolSize");if(p.setVisual({legendSymbol:w||m,symbol:m,symbolSize:L}),T.isSeriesFiltered(y))return;var d=typeof L=="function";function g(A,M){if(typeof L=="function"){var O=y.getRawValue(M),S=y.getDataParams(M);A.setItemVisual(M,"symbolSize",L(O,S))}if(A.hasItemOption){var I=A.getItemModel(M),c=I.getShallow("symbol",!0),f=I.getShallow("symbolSize",!0);c!=null&&A.setItemVisual(M,"symbol",c),f!=null&&A.setItemVisual(M,"symbolSize",f)}}return{dataEach:p.hasItemOption||d?g:null}}}}re.exports=b},function(re,V,b){"use strict";var U=b(8),C=b(92),w=b(11),y=b(18),T=b(15),x=b(9),p=b(17),m=b(23),L=b(96),d=b(7),g=b(98),A=b(63),M=b(1),O=b.n(M);d.a.import(g.a),d.a.import(A.a);var S=O.a.mat4,I=O.a.vec3,c=S.create,f={};function P(z){return z.material}function N(){}var k=U.a.extend(function(){return{canvas:null,_width:100,_height:100,devicePixelRatio:window.devicePixelRatio||1,clearColor:[0,0,0,0],clearBit:17664,alpha:!0,depth:!0,stencil:!1,antialias:!0,premultipliedAlpha:!0,preserveDrawingBuffer:!1,throwError:!0,gl:null,viewport:{},__currentFrameBuffer:null,_viewportStack:[],_clearStack:[],_sceneRendering:null}},function(){this.canvas||(this.canvas=document.createElement("canvas"));var z=this.canvas;try{var Z={alpha:this.alpha,depth:this.depth,stencil:this.stencil,antialias:this.antialias,premultipliedAlpha:this.premultipliedAlpha,preserveDrawingBuffer:this.preserveDrawingBuffer};if(this.gl=z.getContext("webgl",Z)||z.getContext("experimental-webgl",Z),!this.gl)throw new Error;this._glinfo=new C.a(this.gl),this.gl.targetRenderer&&console.error("Already created a renderer"),this.gl.targetRenderer=this,this.resize()}catch(J){throw"Error creating WebGL Context "+J}this._programMgr=new L.a(this)},{resize:function(z,Z){var J=this.canvas,ee=this.devicePixelRatio;z!=null?(J.style.width=z+"px",J.style.height=Z+"px",J.width=z*ee,J.height=Z*ee,this._width=z,this._height=Z):(this._width=J.width/ee,this._height=J.height/ee),this.setViewport(0,0,this._width,this._height)},getWidth:function(){return this._width},getHeight:function(){return this._height},getViewportAspect:function(){var z=this.viewport;return z.width/z.height},setDevicePixelRatio:function(z){this.devicePixelRatio=z,this.resize(this._width,this._height)},getDevicePixelRatio:function(){return this.devicePixelRatio},getGLExtension:function(z){return this._glinfo.getExtension(z)},getGLParameter:function(z){return this._glinfo.getParameter(z)},setViewport:function(z,Z,J,ee,$){if(typeof z=="object"){var ie=z;z=ie.x,Z=ie.y,J=ie.width,ee=ie.height,$=ie.devicePixelRatio}$=$||this.devicePixelRatio,this.gl.viewport(z*$,Z*$,J*$,ee*$),this.viewport={x:z,y:Z,width:J,height:ee,devicePixelRatio:$}},saveViewport:function(){this._viewportStack.push(this.viewport)},restoreViewport:function(){this._viewportStack.length>0&&this.setViewport(this._viewportStack.pop())},saveClear:function(){this._clearStack.push({clearBit:this.clearBit,clearColor:this.clearColor})},restoreClear:function(){if(this._clearStack.length>0){var z=this._clearStack.pop();this.clearColor=z.clearColor,this.clearBit=z.clearBit}},bindSceneRendering:function(z){this._sceneRendering=z},render:function(z,Z,J,ee){var $=this.gl,ie=this.clearColor;if(this.clearBit){$.colorMask(!0,!0,!0,!0),$.depthMask(!0);var se=this.viewport,ne=!1,ce=se.devicePixelRatio;(se.width!==this._width||se.height!==this._height||ce&&ce!==this.devicePixelRatio||se.x||se.y)&&(ne=!0,$.enable($.SCISSOR_TEST),$.scissor(se.x*ce,se.y*ce,se.width*ce,se.height*ce)),$.clearColor(ie[0],ie[1],ie[2],ie[3]),$.clear(this.clearBit),ne&&$.disable($.SCISSOR_TEST)}if(J||z.update(!1),Z=Z||z.getMainCamera(),!Z){console.error("Can't find camera in the scene.");return}Z.getScene()||Z.update(!0),this._sceneRendering=z,z.viewBoundingBoxLastFrame.min.set(1/0,1/0,1/0),z.viewBoundingBoxLastFrame.max.set(-1/0,-1/0,-1/0);var ae=this.cullRenderList(z.opaqueList,z,Z),fe=this.cullRenderList(z.transparentList,z,Z),oe=z.material;z.trigger("beforerender",this,z,Z),ee?(this.renderPreZ(ae,z,Z),$.depthFunc($.LEQUAL)):$.depthFunc($.LESS);for(var pe=c(),_e=I.create(),de=0;de<fe.length;de++){var be=fe[de];S.multiplyAffine(pe,Z.viewMatrix.array,be.worldTransform.array),I.transformMat4(_e,be.position.array,pe),be.__depth=_e[2]}var Ae=this.renderPass(ae,Z,{getMaterial:function(tt){return oe||tt.material},sortCompare:this.opaqueSortCompare}),Fe=this.renderPass(fe,Z,{getMaterial:function(tt){return oe||tt.material},sortCompare:this.transparentSortCompare}),Ue={};for(var it in Ae)Ue[it]=Ae[it]+Fe[it];return z.trigger("afterrender",this,z,Z,Ue),this._sceneRendering=null,Ue},getProgram:function(z,Z,J){return Z=Z||z.material,this._programMgr.getProgram(z,Z,J)},validateProgram:function(z){if(z.__error){var Z=z.__error;if(f[z.__uid__])return;if(f[z.__uid__]=!0,this.throwError)throw new Error(Z);this.trigger("error",Z)}},updatePrograms:function(z,Z,J){var ee=J&&J.getMaterial||P;Z=Z||null;for(var $=0;$<z.length;$++){var ie=z[$],se=ee.call(this,ie);if($>0){var ne=z[$-1],ce=ne.joints?ne.joints.length:0,ae=ie.joints.length?ie.joints.length:0;if(ae===ce&&ie.material===ne.material&&ie.lightGroup===ne.lightGroup){ie.__program=ne.__program;continue}}var fe=this._programMgr.getProgram(ie,se,Z);this.validateProgram(fe),ie.__program=fe}},cullRenderList:function(z,Z,J){for(var ee=[],$=0;$<z.length;$++){var ie=z[$],se=ie.isSkinnedMesh()?W.IDENTITY:ie.worldTransform.array,ne=ie.geometry;S.multiplyAffine(W.WORLDVIEW,J.viewMatrix.array,se),!(ne.boundingBox&&this.isFrustumCulled(ie,Z,J,W.WORLDVIEW,J.projectionMatrix.array))&&ee.push(ie)}return ee},renderPass:function(z,Z,J){this.trigger("beforerenderpass",this,z,Z,J);var ee={triangleCount:0,vertexCount:0,drawCallCount:0,meshCount:z.length,renderedMeshCount:0};J=J||{},J.getMaterial=J.getMaterial||P,J.beforeRender=J.beforeRender||N,J.afterRender=J.afterRender||N,this.updatePrograms(z,this._sceneRendering,J),J.sortCompare&&z.sort(J.sortCompare);var $=this.viewport,ie=$.devicePixelRatio,se=[$.x*ie,$.y*ie,$.width*ie,$.height*ie],ne=this.devicePixelRatio,ce=this.__currentFrameBuffer?[this.__currentFrameBuffer.getTextureWidth(),this.__currentFrameBuffer.getTextureHeight()]:[this._width*ne,this._height*ne],ae=[se[2],se[3]],fe=Date.now();S.copy(W.VIEW,Z.viewMatrix.array),S.copy(W.PROJECTION,Z.projectionMatrix.array),S.multiply(W.VIEWPROJECTION,Z.projectionMatrix.array,W.VIEW),S.copy(W.VIEWINVERSE,Z.worldTransform.array),S.invert(W.PROJECTIONINVERSE,W.PROJECTION),S.invert(W.VIEWPROJECTIONINVERSE,W.VIEWPROJECTION);for(var oe=this.gl,pe=this._sceneRendering,_e,de,be,Ae,Fe,Ue,it,tt,et=0;et<z.length;et++){var vt=z[et];if(!(J.ifRender&&!J.ifRender(vt))){var dt=vt.isSkinnedMesh()?W.IDENTITY:vt.worldTransform.array,je=J.getMaterial.call(this,vt),nt=vt.__program,rt=je.shader;S.copy(W.WORLD,dt),S.multiply(W.WORLDVIEWPROJECTION,W.VIEWPROJECTION,dt),(rt.matrixSemantics.WORLDINVERSE||rt.matrixSemantics.WORLDINVERSETRANSPOSE)&&S.invert(W.WORLDINVERSE,dt),(rt.matrixSemantics.WORLDVIEWINVERSE||rt.matrixSemantics.WORLDVIEWINVERSETRANSPOSE)&&S.invert(W.WORLDVIEWINVERSE,W.WORLDVIEW),(rt.matrixSemantics.WORLDVIEWPROJECTIONINVERSE||rt.matrixSemantics.WORLDVIEWPROJECTIONINVERSETRANSPOSE)&&S.invert(W.WORLDVIEWPROJECTIONINVERSE,W.WORLDVIEWPROJECTION),vt.beforeRender(this),J.beforeRender.call(this,vt,je,_e);var ft=nt!==de;ft?(nt.bind(this),nt.setUniformOfSemantic(oe,"VIEWPORT",se),nt.setUniformOfSemantic(oe,"WINDOW_SIZE",ce),nt.setUniformOfSemantic(oe,"NEAR",Z.near),nt.setUniformOfSemantic(oe,"FAR",Z.far),nt.setUniformOfSemantic(oe,"DEVICEPIXELRATIO",ie),nt.setUniformOfSemantic(oe,"TIME",fe),nt.setUniformOfSemantic(oe,"VIEWPORT_SIZE",ae),pe&&pe.setLightUniforms(nt,vt.lightGroup,this)):nt=de,(_e!==je||ft)&&(je.depthTest!==be&&(je.depthTest?oe.enable(oe.DEPTH_TEST):oe.disable(oe.DEPTH_TEST),be=je.depthTest),je.depthMask!==Ae&&(oe.depthMask(je.depthMask),Ae=je.depthMask),je.transparent!==tt&&(je.transparent?oe.enable(oe.BLEND):oe.disable(oe.BLEND),tt=je.transparent),je.transparent&&(je.blend?je.blend(oe):(oe.blendEquationSeparate(oe.FUNC_ADD,oe.FUNC_ADD),oe.blendFuncSeparate(oe.SRC_ALPHA,oe.ONE_MINUS_SRC_ALPHA,oe.ONE,oe.ONE_MINUS_SRC_ALPHA))),je.bind(this,nt,_e,de),_e=je);for(var lt=rt.matrixSemanticKeys,wt=0;wt<lt.length;wt++){var Re=lt[wt],We=rt.matrixSemantics[Re],Pe=W[Re];if(We.isTranspose){var ke=W[We.semanticNoTranspose];S.transpose(Pe,ke)}nt.setUniform(oe,We.type,We.symbol,Pe)}vt.cullFace!==Ue&&(Ue=vt.cullFace,oe.cullFace(Ue)),vt.frontFace!==it&&(it=vt.frontFace,oe.frontFace(it)),vt.culling!==Fe&&(Fe=vt.culling,Fe?oe.enable(oe.CULL_FACE):oe.disable(oe.CULL_FACE));var Ze=vt.render(this,je,nt);Ze&&(ee.triangleCount+=Ze.triangleCount,ee.vertexCount+=Ze.vertexCount,ee.drawCallCount+=Ze.drawCallCount,ee.renderedMeshCount++),J.afterRender.call(this,vt,Ze),vt.afterRender(this,Ze),de=nt}}for(var et=0;et<z.length;et++)z[et].__program=null;return this.trigger("afterrenderpass",this,z,Z,J),ee},renderPreZ:function(z,Z,J){var ee=this.gl,$=this._prezMaterial||new p.a({shader:new d.a(d.a.source("clay.prez.vertex"),d.a.source("clay.prez.fragment"))});this._prezMaterial=$,ee.colorMask(!1,!1,!1,!1),ee.depthMask(!0),this.renderPass(z,J,{ifRender:function(ie){return!ie.ignorePreZ},getMaterial:function(){return $},sort:this.opaqueSortCompare}),ee.colorMask(!0,!0,!0,!0),ee.depthMask(!0)},isFrustumCulled:function(){var z=new T.a,Z=new x.a;return function(J,ee,$,ie,se){var ne=J.boundingBox||J.geometry.boundingBox;if(Z.array=ie,z.copy(ne),z.applyTransform(Z),ee&&J.isRenderable()&&J.castShadow&&ee.viewBoundingBoxLastFrame.union(z),J.frustumCulling&&!J.isSkinnedMesh()){if(!z.intersectBoundingBox($.frustum.boundingBox))return!0;Z.array=se,z.max.array[2]>0&&z.min.array[2]<0&&(z.max.array[2]=-1e-20),z.applyProjection(Z);var ce=z.min.array,ae=z.max.array;if(ae[0]<-1||ce[0]>1||ae[1]<-1||ce[1]>1||ae[2]<-1||ce[2]>1)return!0}return!1}}(),disposeScene:function(z){this.disposeNode(z,!0,!0),z.dispose()},disposeNode:function(z,Z,J){z.getParent()&&z.getParent().remove(z),z.traverse(function(ee){ee.geometry&&Z&&ee.geometry.dispose(this),ee.dispose&&ee.dispose(this)},this)},disposeGeometry:function(z){z.dispose(this)},disposeTexture:function(z){z.dispose(this)},disposeFrameBuffer:function(z){z.dispose(this)},dispose:function(){},screenToNDC:function(z,Z,J){J||(J=new m.a),Z=this._height-Z;var ee=this.viewport,$=J.array;return $[0]=(z-ee.x)/ee.width,$[0]=$[0]*2-1,$[1]=(Z-ee.y)/ee.height,$[1]=$[1]*2-1,J}});k.opaqueSortCompare=k.prototype.opaqueSortCompare=function(z,Z){return z.renderOrder===Z.renderOrder?z.__program===Z.__program?z.material===Z.material?z.geometry.__uid__-Z.geometry.__uid__:z.material.__uid__-Z.material.__uid__:z.__program&&Z.__program?z.__program.__uid__-Z.__program.__uid__:0:z.renderOrder-Z.renderOrder},k.transparentSortCompare=k.prototype.transparentSortCompare=function(z,Z){return z.renderOrder===Z.renderOrder?z.__depth===Z.__depth?z.__program===Z.__program?z.material===Z.material?z.geometry.__uid__-Z.geometry.__uid__:z.material.__uid__-Z.material.__uid__:z.__program&&Z.__program?z.__program.__uid__-Z.__program.__uid__:0:z.__depth-Z.__depth:z.renderOrder-Z.renderOrder};var W={IDENTITY:c(),WORLD:c(),VIEW:c(),PROJECTION:c(),WORLDVIEW:c(),VIEWPROJECTION:c(),WORLDVIEWPROJECTION:c(),WORLDINVERSE:c(),VIEWINVERSE:c(),PROJECTIONINVERSE:c(),WORLDVIEWINVERSE:c(),VIEWPROJECTIONINVERSE:c(),WORLDVIEWPROJECTIONINVERSE:c(),WORLDTRANSPOSE:c(),VIEWTRANSPOSE:c(),PROJECTIONTRANSPOSE:c(),WORLDVIEWTRANSPOSE:c(),VIEWPROJECTIONTRANSPOSE:c(),WORLDVIEWPROJECTIONTRANSPOSE:c(),WORLDINVERSETRANSPOSE:c(),VIEWINVERSETRANSPOSE:c(),PROJECTIONINVERSETRANSPOSE:c(),WORLDVIEWINVERSETRANSPOSE:c(),VIEWPROJECTIONINVERSETRANSPOSE:c(),WORLDVIEWPROJECTIONINVERSETRANSPOSE:c()};k.COLOR_BUFFER_BIT=w.a.COLOR_BUFFER_BIT,k.DEPTH_BUFFER_BIT=w.a.DEPTH_BUFFER_BIT,k.STENCIL_BUFFER_BIT=w.a.STENCIL_BUFFER_BIT,V.a=k},function(re,V,b){"use strict";function U(w,y){this.action=w,this.context=y}var C={trigger:function(w){if(this.hasOwnProperty("__handlers__")&&this.__handlers__.hasOwnProperty(w)){var y=this.__handlers__[w],T=y.length,x=-1,p=arguments;switch(p.length){case 1:for(;++x<T;)y[x].action.call(y[x].context);return;case 2:for(;++x<T;)y[x].action.call(y[x].context,p[1]);return;case 3:for(;++x<T;)y[x].action.call(y[x].context,p[1],p[2]);return;case 4:for(;++x<T;)y[x].action.call(y[x].context,p[1],p[2],p[3]);return;case 5:for(;++x<T;)y[x].action.call(y[x].context,p[1],p[2],p[3],p[4]);return;default:for(;++x<T;)y[x].action.apply(y[x].context,Array.prototype.slice.call(p,1));return}}},on:function(w,y,T){if(!(!w||!y)){var x=this.__handlers__||(this.__handlers__={});if(!x[w])x[w]=[];else if(this.has(w,y))return;var p=new U(y,T||this);return x[w].push(p),this}},once:function(w,y,T){if(!w||!y)return;var x=this;function p(){x.off(w,p),y.apply(this,arguments)}return this.on(w,p,T)},before:function(w,y,T){if(!(!w||!y))return w="before"+w,this.on(w,y,T)},after:function(w,y,T){if(!(!w||!y))return w="after"+w,this.on(w,y,T)},success:function(w,y){return this.once("success",w,y)},error:function(w,y){return this.once("error",w,y)},off:function(w,y){var T=this.__handlers__||(this.__handlers__={});if(!y){T[w]=[];return}if(T[w]){for(var x=T[w],p=[],m=0;m<x.length;m++)y&&x[m].action!==y&&p.push(x[m]);T[w]=p}return this},has:function(w,y){var T=this.__handlers__;if(!T||!T[w])return!1;for(var x=T[w],p=0;p<x.length;p++)if(x[p].action===y)return!0}};V.a=C},function(re,V,b){"use strict";var U="__dt__",C=function(){this._contextId=0,this._caches=[],this._context={}};C.prototype={use:function(w,y){var T=this._caches;T[w]||(T[w]={},y&&(T[w]=y())),this._contextId=w,this._context=T[w]},put:function(w,y){this._context[w]=y},get:function(w){return this._context[w]},dirty:function(w){w=w||"";var y=U+w;this.put(y,!0)},dirtyAll:function(w){w=w||"";for(var y=U+w,T=this._caches,x=0;x<T.length;x++)T[x]&&(T[x][y]=!0)},fresh:function(w){w=w||"";var y=U+w;this.put(y,!1)},freshAll:function(w){w=w||"";for(var y=U+w,T=this._caches,x=0;x<T.length;x++)T[x]&&(T[x][y]=!1)},isDirty:function(w){w=w||"";var y=U+w,T=this._context;return!T.hasOwnProperty(y)||T[y]===!0},deleteContext:function(w){delete this._caches[w],this._context={}},delete:function(w){delete this._context[w]},clearAll:function(){this._caches={}},getContext:function(){return this._context},eachContext:function(w,y){var T=Object.keys(this._caches);T.forEach(function(x){w&&w.call(y,x)})},miss:function(w){return!this._context.hasOwnProperty(w)}},C.prototype.constructor=C,V.a=C},function(re,V,b){"use strict";var U=b(4),C=b(1),w=b.n(C),y=w.a.vec3,T=1e-5,x=function(p,m){this.origin=p||new U.a,this.direction=m||new U.a};x.prototype={constructor:x,intersectPlane:function(p,m){var L=p.normal.array,d=p.distance,g=this.origin.array,A=this.direction.array,M=y.dot(L,A);if(M===0)return null;m||(m=new U.a);var O=(y.dot(L,g)-d)/M;return y.scaleAndAdd(m.array,g,A,-O),m._dirty=!0,m},mirrorAgainstPlane:function(p){var m=y.dot(p.normal.array,this.direction.array);y.scaleAndAdd(this.direction.array,this.direction.array,p.normal.array,-m*2),this.direction._dirty=!0},distanceToPoint:function(){var p=y.create();return function(m){y.sub(p,m,this.origin.array);var L=y.dot(p,this.direction.array);if(L<0)return y.distance(this.origin.array,m);var d=y.lenSquared(p);return Math.sqrt(d-L*L)}}(),intersectSphere:function(){var p=y.create();return function(m,L,d){var g=this.origin.array,A=this.direction.array;m=m.array,y.sub(p,m,g);var M=y.dot(p,A),O=y.squaredLength(p),S=O-M*M,I=L*L;if(!(S>I)){var c=Math.sqrt(I-S),f=M-c,P=M+c;return d||(d=new U.a),f<0?P<0?null:(y.scaleAndAdd(d.array,g,A,P),d):(y.scaleAndAdd(d.array,g,A,f),d)}}}(),intersectBoundingBox:function(p,m){var L=this.direction.array,d=this.origin.array,g=p.min.array,A=p.max.array,M=1/L[0],O=1/L[1],S=1/L[2],I,c,f,P,N,k;if(M>=0?(I=(g[0]-d[0])*M,c=(A[0]-d[0])*M):(c=(g[0]-d[0])*M,I=(A[0]-d[0])*M),O>=0?(f=(g[1]-d[1])*O,P=(A[1]-d[1])*O):(P=(g[1]-d[1])*O,f=(A[1]-d[1])*O),I>P||f>c||((f>I||I!==I)&&(I=f),(P<c||c!==c)&&(c=P),S>=0?(N=(g[2]-d[2])*S,k=(A[2]-d[2])*S):(k=(g[2]-d[2])*S,N=(A[2]-d[2])*S),I>k||N>c)||((N>I||I!==I)&&(I=N),(k<c||c!==c)&&(c=k),c<0))return null;var W=I>=0?I:c;return m||(m=new U.a),y.scaleAndAdd(m.array,d,L,W),m},intersectTriangle:function(){var p=y.create(),m=y.create(),L=y.create(),d=y.create();return function(g,A,M,O,S,I){var c=this.direction.array,f=this.origin.array;g=g.array,A=A.array,M=M.array,y.sub(p,A,g),y.sub(m,M,g),y.cross(d,m,c);var P=y.dot(p,d);if(O){if(P>-T)return null}else if(P>-T&&P<T)return null;y.sub(L,f,g);var N=y.dot(d,L)/P;if(N<0||N>1)return null;y.cross(d,p,L);var k=y.dot(c,d)/P;if(k<0||k>1||N+k>1)return null;y.cross(d,p,m);var W=-y.dot(L,d)/P;return W<0?null:(S||(S=new U.a),I&&U.a.set(I,1-N-k,N,k),y.scaleAndAdd(S.array,f,c,W),S)}}(),applyTransform:function(p){U.a.add(this.direction,this.direction,this.origin),U.a.transformMat4(this.origin,this.origin,p),U.a.transformMat4(this.direction,this.direction,p),U.a.sub(this.direction,this.direction,this.origin),U.a.normalize(this.direction,this.direction)},copy:function(p){U.a.copy(this.origin,p.origin),U.a.copy(this.direction,p.direction)},clone:function(){var p=new x;return p.copy(this),p}},V.a=x},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.quat,y=function(p,m,L,d){p=p||0,m=m||0,L=L||0,d=d===void 0?1:d,this.array=w.fromValues(p,m,L,d),this._dirty=!0};y.prototype={constructor:y,add:function(p){return w.add(this.array,this.array,p.array),this._dirty=!0,this},calculateW:function(){return w.calculateW(this.array,this.array),this._dirty=!0,this},set:function(p,m,L,d){return this.array[0]=p,this.array[1]=m,this.array[2]=L,this.array[3]=d,this._dirty=!0,this},setArray:function(p){return this.array[0]=p[0],this.array[1]=p[1],this.array[2]=p[2],this.array[3]=p[3],this._dirty=!0,this},clone:function(){return new y(this.x,this.y,this.z,this.w)},conjugate:function(){return w.conjugate(this.array,this.array),this._dirty=!0,this},copy:function(p){return w.copy(this.array,p.array),this._dirty=!0,this},dot:function(p){return w.dot(this.array,p.array)},fromMat3:function(p){return w.fromMat3(this.array,p.array),this._dirty=!0,this},fromMat4:function(){var p=C.a.mat3,m=p.create();return function(L){return p.fromMat4(m,L.array),p.transpose(m,m),w.fromMat3(this.array,m),this._dirty=!0,this}}(),identity:function(){return w.identity(this.array),this._dirty=!0,this},invert:function(){return w.invert(this.array,this.array),this._dirty=!0,this},len:function(){return w.len(this.array)},length:function(){return w.length(this.array)},lerp:function(p,m,L){return w.lerp(this.array,p.array,m.array,L),this._dirty=!0,this},mul:function(p){return w.mul(this.array,this.array,p.array),this._dirty=!0,this},mulLeft:function(p){return w.multiply(this.array,p.array,this.array),this._dirty=!0,this},multiply:function(p){return w.multiply(this.array,this.array,p.array),this._dirty=!0,this},multiplyLeft:function(p){return w.multiply(this.array,p.array,this.array),this._dirty=!0,this},normalize:function(){return w.normalize(this.array,this.array),this._dirty=!0,this},rotateX:function(p){return w.rotateX(this.array,this.array,p),this._dirty=!0,this},rotateY:function(p){return w.rotateY(this.array,this.array,p),this._dirty=!0,this},rotateZ:function(p){return w.rotateZ(this.array,this.array,p),this._dirty=!0,this},rotationTo:function(p,m){return w.rotationTo(this.array,p.array,m.array),this._dirty=!0,this},setAxes:function(p,m,L){return w.setAxes(this.array,p.array,m.array,L.array),this._dirty=!0,this},setAxisAngle:function(p,m){return w.setAxisAngle(this.array,p.array,m),this._dirty=!0,this},slerp:function(p,m,L){return w.slerp(this.array,p.array,m.array,L),this._dirty=!0,this},sqrLen:function(){return w.sqrLen(this.array)},squaredLength:function(){return w.squaredLength(this.array)},fromEuler:function(p,m){return y.fromEuler(this,p,m)},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var T=Object.defineProperty;if(T){var x=y.prototype;T(x,"x",{get:function(){return this.array[0]},set:function(p){this.array[0]=p,this._dirty=!0}}),T(x,"y",{get:function(){return this.array[1]},set:function(p){this.array[1]=p,this._dirty=!0}}),T(x,"z",{get:function(){return this.array[2]},set:function(p){this.array[2]=p,this._dirty=!0}}),T(x,"w",{get:function(){return this.array[3]},set:function(p){this.array[3]=p,this._dirty=!0}})}y.add=function(p,m,L){return w.add(p.array,m.array,L.array),p._dirty=!0,p},y.set=function(p,m,L,d,g){w.set(p.array,m,L,d,g),p._dirty=!0},y.copy=function(p,m){return w.copy(p.array,m.array),p._dirty=!0,p},y.calculateW=function(p,m){return w.calculateW(p.array,m.array),p._dirty=!0,p},y.conjugate=function(p,m){return w.conjugate(p.array,m.array),p._dirty=!0,p},y.identity=function(p){return w.identity(p.array),p._dirty=!0,p},y.invert=function(p,m){return w.invert(p.array,m.array),p._dirty=!0,p},y.dot=function(p,m){return w.dot(p.array,m.array)},y.len=function(p){return w.length(p.array)},y.lerp=function(p,m,L,d){return w.lerp(p.array,m.array,L.array,d),p._dirty=!0,p},y.slerp=function(p,m,L,d){return w.slerp(p.array,m.array,L.array,d),p._dirty=!0,p},y.mul=function(p,m,L){return w.multiply(p.array,m.array,L.array),p._dirty=!0,p},y.multiply=y.mul,y.rotateX=function(p,m,L){return w.rotateX(p.array,m.array,L),p._dirty=!0,p},y.rotateY=function(p,m,L){return w.rotateY(p.array,m.array,L),p._dirty=!0,p},y.rotateZ=function(p,m,L){return w.rotateZ(p.array,m.array,L),p._dirty=!0,p},y.setAxisAngle=function(p,m,L){return w.setAxisAngle(p.array,m.array,L),p._dirty=!0,p},y.normalize=function(p,m){return w.normalize(p.array,m.array),p._dirty=!0,p},y.sqrLen=function(p){return w.sqrLen(p.array)},y.squaredLength=y.sqrLen,y.fromMat3=function(p,m){return w.fromMat3(p.array,m.array),p._dirty=!0,p},y.setAxes=function(p,m,L,d){return w.setAxes(p.array,m.array,L.array,d.array),p._dirty=!0,p},y.rotationTo=function(p,m,L){return w.rotationTo(p.array,m.array,L.array),p._dirty=!0,p},y.fromEuler=function(p,m,c){p._dirty=!0,m=m.array;var d=p.array,g=Math.cos(m[0]/2),A=Math.cos(m[1]/2),M=Math.cos(m[2]/2),O=Math.sin(m[0]/2),S=Math.sin(m[1]/2),I=Math.sin(m[2]/2),c=(c||"XYZ").toUpperCase();switch(c){case"XYZ":d[0]=O*A*M+g*S*I,d[1]=g*S*M-O*A*I,d[2]=g*A*I+O*S*M,d[3]=g*A*M-O*S*I;break;case"YXZ":d[0]=O*A*M+g*S*I,d[1]=g*S*M-O*A*I,d[2]=g*A*I-O*S*M,d[3]=g*A*M+O*S*I;break;case"ZXY":d[0]=O*A*M-g*S*I,d[1]=g*S*M+O*A*I,d[2]=g*A*I+O*S*M,d[3]=g*A*M-O*S*I;break;case"ZYX":d[0]=O*A*M-g*S*I,d[1]=g*S*M+O*A*I,d[2]=g*A*I-O*S*M,d[3]=g*A*M+O*S*I;break;case"YZX":d[0]=O*A*M+g*S*I,d[1]=g*S*M+O*A*I,d[2]=g*A*I-O*S*M,d[3]=g*A*M-O*S*I;break;case"XZY":d[0]=O*A*M-g*S*I,d[1]=g*S*M-O*A*I,d[2]=g*A*I+O*S*M,d[3]=g*A*M+O*S*I;break}},V.a=y},function(re,V,b){"use strict";var U=b(28),C=b(9),w=b(52),y=b(49),T=b(1),x=b.n(T),p=x.a.vec3,m=x.a.vec4,L=U.a.extend(function(){return{projectionMatrix:new C.a,invProjectionMatrix:new C.a,viewMatrix:new C.a,frustum:new w.a}},function(){this.update(!0)},{update:function(d){U.a.prototype.update.call(this,d),C.a.invert(this.viewMatrix,this.worldTransform),this.updateProjectionMatrix(),C.a.invert(this.invProjectionMatrix,this.projectionMatrix),this.frustum.setFromProjection(this.projectionMatrix)},setViewMatrix:function(d){C.a.copy(this.viewMatrix,d),C.a.invert(this.worldTransform,d),this.decomposeWorldTransform()},decomposeProjectionMatrix:function(){},setProjectionMatrix:function(d){C.a.copy(this.projectionMatrix,d),C.a.invert(this.invProjectionMatrix,d),this.decomposeProjectionMatrix()},updateProjectionMatrix:function(){},castRay:function(){var d=m.create();return function(g,A){var M=A!==void 0?A:new y.a,O=g.array[0],S=g.array[1];return m.set(d,O,S,-1,1),m.transformMat4(d,d,this.invProjectionMatrix.array),m.transformMat4(d,d,this.worldTransform.array),p.scale(M.origin.array,d,1/d[3]),m.set(d,O,S,1,1),m.transformMat4(d,d,this.invProjectionMatrix.array),m.transformMat4(d,d,this.worldTransform.array),p.scale(d,d,1/d[3]),p.sub(M.direction.array,d,M.origin.array),p.normalize(M.direction.array,M.direction.array),M.direction._dirty=!0,M.origin._dirty=!0,M}}()});V.a=L},function(re,V,b){"use strict";var U=b(4),C=b(15),w=b(67),y=b(1),T=b.n(y),x=T.a.vec3,p=x.set,m=x.copy,L=x.transformMat4,d=Math.min,g=Math.max,A=function(){this.planes=[];for(var M=0;M<6;M++)this.planes.push(new w.a);this.boundingBox=new C.a,this.vertices=[];for(var M=0;M<8;M++)this.vertices[M]=x.fromValues(0,0,0)};A.prototype={setFromProjection:function(M){var O=this.planes,S=M.array,I=S[0],c=S[1],f=S[2],P=S[3],N=S[4],k=S[5],W=S[6],z=S[7],Z=S[8],J=S[9],ee=S[10],$=S[11],ie=S[12],se=S[13],ne=S[14],ce=S[15];p(O[0].normal.array,P-I,z-N,$-Z),O[0].distance=-(ce-ie),O[0].normalize(),p(O[1].normal.array,P+I,z+N,$+Z),O[1].distance=-(ce+ie),O[1].normalize(),p(O[2].normal.array,P+c,z+k,$+J),O[2].distance=-(ce+se),O[2].normalize(),p(O[3].normal.array,P-c,z-k,$-J),O[3].distance=-(ce-se),O[3].normalize(),p(O[4].normal.array,P-f,z-W,$-ee),O[4].distance=-(ce-ne),O[4].normalize(),p(O[5].normal.array,P+f,z+W,$+ee),O[5].distance=-(ce+ne),O[5].normalize();var ae=this.boundingBox;if(ce===0){var fe=k/I,oe=-ne/(ee-1),pe=-ne/(ee+1),_e=-pe/k,de=-oe/k;ae.min.set(-_e*fe,-_e,pe),ae.max.set(_e*fe,_e,oe);var be=this.vertices;p(be[0],-_e*fe,-_e,pe),p(be[1],-_e*fe,_e,pe),p(be[2],_e*fe,-_e,pe),p(be[3],_e*fe,_e,pe),p(be[4],-de*fe,-de,oe),p(be[5],-de*fe,de,oe),p(be[6],de*fe,-de,oe),p(be[7],de*fe,de,oe)}else{var Ae=(-1-ie)/I,Fe=(1-ie)/I,Ue=(1-se)/k,it=(-1-se)/k,tt=(-1-ne)/ee,et=(1-ne)/ee;ae.min.set(Math.min(Ae,Fe),Math.min(it,Ue),Math.min(et,tt)),ae.max.set(Math.max(Fe,Ae),Math.max(Ue,it),Math.max(tt,et));var vt=ae.min.array,dt=ae.max.array,be=this.vertices;p(be[0],vt[0],vt[1],vt[2]),p(be[1],vt[0],dt[1],vt[2]),p(be[2],dt[0],vt[1],vt[2]),p(be[3],dt[0],dt[1],vt[2]),p(be[4],vt[0],vt[1],dt[2]),p(be[5],vt[0],dt[1],dt[2]),p(be[6],dt[0],vt[1],dt[2]),p(be[7],dt[0],dt[1],dt[2])}},getTransformedBoundingBox:function(){var M=x.create();return function(O,S){var I=this.vertices,c=S.array,f=O.min,P=O.max,N=f.array,k=P.array,W=I[0];L(M,W,c),m(N,M),m(k,M);for(var z=1;z<8;z++)W=I[z],L(M,W,c),N[0]=d(M[0],N[0]),N[1]=d(M[1],N[1]),N[2]=d(M[2],N[2]),k[0]=g(M[0],k[0]),k[1]=g(M[1],k[1]),k[2]=g(M[2],k[2]);return f._dirty=!0,P._dirty=!0,O}}()},V.a=A},function(re,V){var b=function(){this.head=null,this.tail=null,this._len=0},U=b.prototype;U.insert=function(x){var p=new C(x);return this.insertEntry(p),p},U.insertEntry=function(x){this.head?(this.tail.next=x,x.prev=this.tail,x.next=null,this.tail=x):this.head=this.tail=x,this._len++},U.remove=function(x){var p=x.prev,m=x.next;p?p.next=m:this.head=m,m?m.prev=p:this.tail=p,x.next=x.prev=null,this._len--},U.len=function(){return this._len},U.clear=function(){this.head=this.tail=null,this._len=0};var C=function(x){this.value=x,this.next,this.prev},w=function(x){this._list=new b,this._map={},this._maxSize=x||10,this._lastRemovedEntry=null},y=w.prototype;y.put=function(x,p){var m=this._list,L=this._map,d=null;if(L[x]==null){var g=m.len(),A=this._lastRemovedEntry;if(g>=this._maxSize&&g>0){var M=m.head;m.remove(M),delete L[M.key],d=M.value,this._lastRemovedEntry=M}A?A.value=p:A=new C(p),A.key=x,m.insertEntry(A),L[x]=A}return d},y.get=function(x){var p=this._map[x],m=this._list;if(p!=null)return p!==m.tail&&(m.remove(p),m.insertEntry(p)),p.value},y.clear=function(){this._list.clear(),this._map={}};var T=w;re.exports=T},function(re,V,b){"use strict";var U=b(5),C=b(25),w=b(102),y=b(55),T=b(56),x=b(29),p=b(104),m=b(105),L={loadTexture:function(d,g,A,M){var O;if(typeof g=="function"?(A=g,M=A,g={}):g=g||{},typeof d=="string"){if(d.match(/.hdr$/)||g.fileType==="hdr")return O=new U.a({width:0,height:0,sRGB:!1}),L._fetchTexture(d,function(S){m.a.parseRGBE(S,O,g.exposure),O.dirty(),A&&A(O)},M),O;d.match(/.dds$/)||g.fileType==="dds"?(O=new U.a({width:0,height:0}),L._fetchTexture(d,function(S){p.a.parse(S,O),O.dirty(),A&&A(O)},M)):(O=new U.a,O.load(d),O.success(A),O.error(M))}else if(typeof d=="object"&&typeof d.px!="undefined"){var O=new C.a;O.load(d),O.success(A),O.error(M)}return O},loadPanorama:function(d,g,A,M,O,S){var I=this;typeof M=="function"?(O=M,S=O,M={}):M=M||{},L.loadTexture(g,M,function(c){c.flipY=M.flipY||!1,I.panoramaToCubeMap(d,c,A,M),c.dispose(d),O&&O(A)},S)},panoramaToCubeMap:function(d,g,A,M){var O=new y.a,S=new T.a({scene:new x.a});return S.material.set("diffuseMap",g),M=M||{},M.encodeRGBM&&S.material.define("fragment","RGBM_ENCODE"),A.sRGB=g.sRGB,O.texture=A,O.render(d,S.scene),O.texture=null,O.dispose(d),A},heightToNormal:function(d,g){var A=document.createElement("canvas"),M=A.width=d.width,O=A.height=d.height,S=A.getContext("2d");S.drawImage(d,0,0,M,O),g=g||!1;for(var I=S.getImageData(0,0,M,O),c=S.createImageData(M,O),f=0;f<I.data.length;f+=4){if(g){var P=I.data[f],N=I.data[f+1],k=I.data[f+2],W=Math.abs(P-N)+Math.abs(N-k);if(W>20)return console.warn("Given image is not a height map"),d}var z,Z,J,ee;f%(M*4)===0?(z=I.data[f],J=I.data[f+4]):f%(M*4)===(M-1)*4?(z=I.data[f-4],J=I.data[f]):(z=I.data[f-4],J=I.data[f+4]),f<M*4?(Z=I.data[f],ee=I.data[f+M*4]):f>M*(O-1)*4?(Z=I.data[f-M*4],ee=I.data[f]):(Z=I.data[f-M*4],ee=I.data[f+M*4]),c.data[f]=z-J+127,c.data[f+1]=Z-ee+127,c.data[f+2]=255,c.data[f+3]=255}return S.putImageData(c,0,0),A},isHeightImage:function(d,g,A){if(!d||!d.width||!d.height)return!1;var M=document.createElement("canvas"),O=M.getContext("2d"),S=g||32;A=A||20,M.width=M.height=S,O.drawImage(d,0,0,S,S);for(var I=O.getImageData(0,0,S,S),c=0;c<I.data.length;c+=4){var f=I.data[c],P=I.data[c+1],N=I.data[c+2],k=Math.abs(f-P)+Math.abs(P-N);if(k>A)return!1}return!0},_fetchTexture:function(d,g,A){w.a.get({url:d,responseType:"arraybuffer",onload:g,onerror:A})},createChessboard:function(d,g,A,M){d=d||512,g=g||64,A=A||"black",M=M||"white";var O=Math.ceil(d/g),S=document.createElement("canvas");S.width=d,S.height=d;var I=S.getContext("2d");I.fillStyle=M,I.fillRect(0,0,d,d),I.fillStyle=A;for(var c=0;c<O;c++)for(var f=0;f<O;f++){var P=f%2?c%2:c%2-1;P&&I.fillRect(c*g,f*g,g,g)}var N=new U.a({image:S,anisotropic:8});return N},createBlank:function(d){var g=document.createElement("canvas");g.width=1,g.height=1;var A=g.getContext("2d");A.fillStyle=d,A.fillRect(0,0,1,1);var M=new U.a({image:g});return M}};V.a=L},function(re,V,b){"use strict";var U=b(8),C=b(4),w=b(36),y=b(10),T=["px","nx","py","ny","pz","nz"],x=U.a.extend(function(){var p={position:new C.a,far:1e3,near:.1,texture:null,shadowMapPass:null},m=p._cameras={px:new w.a({fov:90}),nx:new w.a({fov:90}),py:new w.a({fov:90}),ny:new w.a({fov:90}),pz:new w.a({fov:90}),nz:new w.a({fov:90})};return m.px.lookAt(C.a.POSITIVE_X,C.a.NEGATIVE_Y),m.nx.lookAt(C.a.NEGATIVE_X,C.a.NEGATIVE_Y),m.py.lookAt(C.a.POSITIVE_Y,C.a.POSITIVE_Z),m.ny.lookAt(C.a.NEGATIVE_Y,C.a.NEGATIVE_Z),m.pz.lookAt(C.a.POSITIVE_Z,C.a.NEGATIVE_Y),m.nz.lookAt(C.a.NEGATIVE_Z,C.a.NEGATIVE_Y),p._frameBuffer=new y.a,p},{getCamera:function(p){return this._cameras[p]},render:function(p,m,L){var d=p.gl;L||m.update();for(var g=this.texture.width,A=2*Math.atan(g/(g-.5))/Math.PI*180,M=0;M<6;M++){var O=T[M],S=this._cameras[O];if(C.a.copy(S.position,this.position),S.far=this.far,S.near=this.near,S.fov=A,this.shadowMapPass){S.update();var I=m.getBoundingBox();I.applyTransform(S.viewMatrix),m.viewBoundingBoxLastFrame.copy(I),this.shadowMapPass.render(p,m,S,!0)}this._frameBuffer.attach(this.texture,d.COLOR_ATTACHMENT0,d.TEXTURE_CUBE_MAP_POSITIVE_X+M),this._frameBuffer.bind(p),p.render(m,S,!0),this._frameBuffer.unbind(p)}},dispose:function(p){this._frameBuffer.dispose(p)}});V.a=x},function(re,V,b){"use strict";var U=b(24),C=b(68),w=b(7),y=b(17),T=b(103);w.a.import(T.a);var x=U.a.extend(function(){var p=new w.a(w.a.source("clay.basic.vertex"),w.a.source("clay.basic.fragment")),m=new y.a({shader:p,depthMask:!1});return m.enableTexture("diffuseMap"),{scene:null,geometry:new C.a({widthSegments:30,heightSegments:30}),material:m,environmentMap:null,culling:!1}},function(){var p=this.scene;p&&this.attachScene(p),this.environmentMap&&this.setEnvironmentMap(this.environmentMap)},{attachScene:function(p){this.scene&&this.detachScene(),p.skydome=this,this.scene=p,p.on("beforerender",this._beforeRenderScene,this)},detachScene:function(){this.scene&&(this.scene.off("beforerender",this._beforeRenderScene),this.scene.skydome=null),this.scene=null},_beforeRenderScene:function(p,m,L){this.position.copy(L.getWorldPosition()),this.update(),p.renderPass([this],L)},setEnvironmentMap:function(p){this.material.set("diffuseMap",p)},getEnvironmentMap:function(){return this.material.get("diffuseMap")},dispose:function(p){this.detachScene(),this.geometry.dispose(p)}});V.a=x},function(re,V,b){"use strict";var U=b(24),C=b(69),w=b(7),y=b(17),T=b(110);w.a.import(T.a);var x=U.a.extend(function(){var p=new w.a({vertex:w.a.source("clay.skybox.vertex"),fragment:w.a.source("clay.skybox.fragment")}),m=new y.a({shader:p,depthMask:!1});return{scene:null,geometry:new C.a,material:m,environmentMap:null,culling:!1}},function(){var p=this.scene;p&&this.attachScene(p),this.environmentMap&&this.setEnvironmentMap(this.environmentMap)},{attachScene:function(p){this.scene&&this.detachScene(),p.skybox=this,this.scene=p,p.on("beforerender",this._beforeRenderScene,this)},detachScene:function(){this.scene&&(this.scene.off("beforerender",this._beforeRenderScene),this.scene.skybox=null),this.scene=null},dispose:function(p){this.detachScene(),this.geometry.dispose(p)},setEnvironmentMap:function(p){this.material.set("environmentMap",p)},getEnvironmentMap:function(){return this.material.get("environmentMap")},_beforeRenderScene:function(p,m,L){this.renderSkybox(p,L)},renderSkybox:function(p,m){this.position.copy(m.getWorldPosition()),this.update(),p.gl.disable(p.gl.BLEND),this.material.get("lod")>0?this.material.define("fragment","LOD"):this.material.undefine("fragment","LOD"),p.renderPass([this],m)}});V.a=x},function(re,V,b){"use strict";var U=b(2),C=b(143),w=b(144);U.a.Shader.import(w.a),V.a=U.a.Mesh.extend(function(){var y=new C.a({dynamic:!0}),T=new U.a.Material({shader:U.a.createShader("ecgl.labels"),transparent:!0,depthMask:!1});return{geometry:y,material:T,culling:!1,castShadow:!1,ignorePicking:!0}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(186),T=b(22),x=b(3),p=b(1),m=b.n(p),L=b(60),d=b(61),g=b(40),A=m.a.vec3;w.a.Shader.import(g.a);function M(O){this.rootNode=new w.a.Node,this._triangulationResults={},this._shadersMap=w.a.COMMON_SHADERS.reduce(function(I,c){return I[c]=w.a.createShader("ecgl."+c),I},{}),this._linesShader=w.a.createShader("ecgl.meshLines3D");var S={};w.a.COMMON_SHADERS.forEach(function(I){S[I]=new w.a.Material({shader:w.a.createShader("ecgl."+I)})}),this._groundMaterials=S,this._groundMesh=new w.a.Mesh({geometry:new w.a.PlaneGeometry({dynamic:!0}),castShadow:!1,renderNormal:!0,$ignorePicking:!0}),this._groundMesh.rotation.rotateX(-Math.PI/2),this._labelsBuilder=new d.a(512,512,O),this._labelsBuilder.getMesh().renderOrder=100,this._labelsBuilder.getMesh().material.depthTest=!1,this.rootNode.add(this._labelsBuilder.getMesh()),this._initMeshes(),this._api=O}M.prototype={constructor:M,extrudeY:!0,update:function(O,S,I,c,f){var P=O.getData();c==null&&(c=0),f==null&&(f=P.count()),this._startIndex=c,this._endIndex=f-1,this._triangulation(O,c,f);var N=this._getShader(O.get("shading"));this._prepareMesh(O,N,I,c,f),this.rootNode.updateWorldTransform(),this._updateRegionMesh(O,I,c,f);var k=O.coordinateSystem;k.type==="geo3D"&&this._updateGroundPlane(O,k,I);var W=this;this._labelsBuilder.updateData(P,c,f),this._labelsBuilder.getLabelPosition=function(z,Z,J){var ee=P.getName(z),$,ie=J;if(k.type==="geo3D"){var se=k.getRegion(ee);return $=se.center,k.dataToPoint([$[0],$[1],ie])}else var ne=W._triangulationResults[z-W._startIndex],$=W.extrudeY?[(ne.max[0]+ne.min[0])/2,ne.max[1]+ie,(ne.max[2]+ne.min[2])/2]:[(ne.max[0]+ne.min[0])/2,(ne.max[1]+ne.min[1])/2,ne.max[2]+ie]},this._data=P,this._labelsBuilder.updateLabels(),this._updateDebugWireframe(O),this._lastHoverDataIndex=0},_initMeshes:function(){this.rootNode.removeAll();var O=this;function S(){var f=new w.a.Mesh({name:"Polygon",material:new w.a.Material({shader:O._shadersMap.lambert}),culling:!1,geometry:new w.a.Geometry({sortTriangles:!0,dynamic:!0}),ignorePicking:!0,renderNormal:!0});return C.a.util.extend(f.geometry,L.a),f}var I=S(),c=new w.a.Mesh({material:new w.a.Material({shader:this._linesShader}),castShadow:!1,ignorePicking:!0,$ignorePicking:!0,geometry:new T.a({useNativeLine:!1})});this.rootNode.add(I),this.rootNode.add(c),I.material.define("both","VERTEX_COLOR"),I.material.define("fragment","DOUBLE_SIDED"),this._polygonMesh=I,this._linesMesh=c,this.rootNode.add(this._groundMesh)},_getShader:function(O){var S=this._shadersMap[O];return S||(console.warn("Unkown shading "+O),S=this._shadersMap.lambert),S.__shading=O,S},_prepareMesh:function(O,S,I,c,f){for(var P=0,N=0,k=0,W=0,z=c;z<f;z++){var Z=this._getRegionPolygonInfo(z),J=this._getRegionLinesInfo(z,O,this._linesMesh.geometry);P+=Z.vertexCount,N+=Z.triangleCount,k+=J.vertexCount,W+=J.triangleCount}var ee=this._polygonMesh,$=ee.geometry;["position","normal","texcoord0","color"].forEach(function(ie){$.attributes[ie].init(P)}),$.indices=P>65535?new Uint32Array(N*3):new Uint16Array(N*3),ee.material.shader!==S&&ee.material.attachShader(S,!0),w.a.setMaterialFromModel(S.__shading,ee.material,O,I),k>0&&(this._linesMesh.geometry.resetOffset(),this._linesMesh.geometry.setVertexCount(k),this._linesMesh.geometry.setTriangleCount(W)),this._dataIndexOfVertex=new Uint32Array(P),this._vertexRangeOfDataIndex=new Uint32Array((f-c)*2)},_updateRegionMesh:function(O,S,I,c){for(var f=O.getData(),P=0,N=0,k=!1,_e=this._polygonMesh,W=this._linesMesh,z=I;z<c;z++){var Z=O.getRegionModel(z),J=Z.getModel("itemStyle"),ee=J.get("color"),$=x.a.firstNotNull(J.get("opacity"),1),ie=f.getItemVisual(z,"color",!0);ie!=null&&f.hasValue(z)&&(ee=ie),f.setItemVisual(z,"color",ee),f.setItemVisual(z,"opacity",$),ee=w.a.parseColor(ee);var se=w.a.parseColor(J.get("borderColor"));ee[3]*=$,se[3]*=$;var ne=ee[3]<.99;_e.material.set("color",[1,1,1,1]),k=k||ne;for(var ce=x.a.firstNotNull(Z.get("height",!0),O.get("regionHeight")),ae=this._updatePolygonGeometry(O,_e.geometry,z,ce,P,N,ee),fe=P;fe<ae.vertexOffset;fe++)this._dataIndexOfVertex[fe]=z;this._vertexRangeOfDataIndex[(z-I)*2]=P,this._vertexRangeOfDataIndex[(z-I)*2+1]=ae.vertexOffset,P=ae.vertexOffset,N=ae.triangleOffset;var oe=J.get("borderWidth"),pe=oe>0;pe&&(oe*=S.getDevicePixelRatio(),this._updateLinesGeometry(W.geometry,O,z,ce,oe,O.coordinateSystem.transform)),W.invisible=!pe,W.material.set({color:se})}var _e=this._polygonMesh;_e.material.transparent=k,_e.material.depthMask=!k,_e.geometry.updateBoundingBox(),_e.material.get("normalMap")&&_e.geometry.generateTangents(),_e.seriesIndex=O.seriesIndex,_e.on("mousemove",this._onmousemove,this),_e.on("mouseout",this._onmouseout,this)},_updateDebugWireframe:function(O){var S=O.getModel("debug.wireframe");if(S.get("show")){var I=w.a.parseColor(S.get("lineStyle.color")||"rgba(0,0,0,0.5)"),c=x.a.firstNotNull(S.get("lineStyle.width"),1),f=this._polygonMesh;f.geometry.generateBarycentric(),f.material.define("both","WIREFRAME_TRIANGLE"),f.material.set("wireframeLineColor",I),f.material.set("wireframeLineWidth",c)}},_onmousemove:function(O){var S=this._dataIndexOfVertex[O.triangle[0]];S==null&&(S=-1),S!==this._lastHoverDataIndex&&(this.downplay(this._lastHoverDataIndex),this.highlight(S)),this._lastHoverDataIndex=S,this._polygonMesh.dataIndex=S},_onmouseover:function(O){if(O.target){var S=O.target.eventData?this._data.indexOfName(O.target.eventData.name):O.target.dataIndex;S!=null&&(this.highlight(S),this._labelsBuilder.updateLabels([S]))}},_onmouseout:function(O){O.target&&(this.downplay(this._lastHoverDataIndex),this._lastHoverDataIndex=-1,this._polygonMesh.dataIndex=-1)},_updateGroundPlane:function(O,S,I){var c=O.getModel("groundPlane",O);if(this._groundMesh.invisible=!c.get("show",!0),!this._groundMesh.invisible){var f=O.get("shading"),P=this._groundMaterials[f];P||(console.warn("Unkown shading "+f),P=this._groundMaterials.lambert),w.a.setMaterialFromModel(f,P,c,I),P.get("normalMap")&&this._groundMesh.geometry.generateTangents(),this._groundMesh.material=P,this._groundMesh.material.set("color",w.a.parseColor(c.get("color"))),this._groundMesh.scale.set(S.size[0],S.size[2],1)}},_triangulation:function(O,S,I){this._triangulationResults=[];for(var c=[1/0,1/0,1/0],f=[-1/0,-1/0,-1/0],P=O.coordinateSystem,N=S;N<I;N++){for(var k=[],W=O.getRegionPolygonCoords(N),z=0;z<W.length;z++){var Z=W[z].exterior,J=W[z].interiors,ee=[],$=[];if(!(Z.length<3)){for(var ie=0,se=0;se<Z.length;se++){var ne=Z[se];ee[ie++]=ne[0],ee[ie++]=ne[1]}for(var se=0;se<J.length;se++)if(!(J[se].length<3)){for(var ce=ee.length/2,ae=0;ae<J[se].length;ae++){var ne=J[se][ae];ee.push(ne[0]),ee.push(ne[1])}$.push(ce)}for(var fe=Object(y.a)(ee,$),oe=new Float64Array(ee.length/2*3),pe=[],_e=[1/0,1/0,1/0],de=[-1/0,-1/0,-1/0],be=0,se=0;se<ee.length;)A.set(pe,ee[se++],0,ee[se++]),P&&P.transform&&A.transformMat4(pe,pe,P.transform),A.min(_e,_e,pe),A.max(de,de,pe),oe[be++]=pe[0],oe[be++]=pe[1],oe[be++]=pe[2];A.min(c,c,_e),A.max(f,f,de),k.push({points:oe,indices:fe,min:_e,max:de})}}this._triangulationResults.push(k)}this._geoBoundingBox=[c,f]},_getRegionPolygonInfo:function(O){for(var S=this._triangulationResults[O-this._startIndex],I=0,c=0,f=0;f<S.length;f++)I+=S[f].points.length/3,c+=S[f].indices.length/3;var P=I*2+I*4,N=c*2+I*2;return{vertexCount:P,triangleCount:N}},_updatePolygonGeometry:function(O,S,I,c,f,P,N){var k=O.get("projectUVOnGround"),W=S.attributes.position,z=S.attributes.normal,Z=S.attributes.texcoord0,J=S.attributes.color,ee=this._triangulationResults[I-this._startIndex],$=J.value&&N,ie=S.indices,se=this.extrudeY?1:2,ne=this.extrudeY?2:1,ce=[this.rootNode.worldTransform.x.len(),this.rootNode.worldTransform.y.len(),this.rootNode.worldTransform.z.len()],ae=A.mul([],this._geoBoundingBox[0],ce),fe=A.mul([],this._geoBoundingBox[1],ce),oe=Math.max(fe[0]-ae[0],fe[2]-ae[2]);function pe(Ie,Ye,qe){for(var ot=Ie.points,gt=ot.length,pt=[],Lt=[],Tt=0;Tt<gt;Tt+=3)pt[0]=ot[Tt],pt[se]=Ye,pt[ne]=ot[Tt+2],Lt[0]=(ot[Tt]*ce[0]-ae[0])/oe,Lt[1]=(ot[Tt+2]*ce[ne]-ae[2])/oe,W.set(f,pt),$&&J.set(f,N),Z.set(f++,Lt)}function _e(Ie,Ye,qe){var ot=f;pe(Ie,Ye,qe);for(var gt=0;gt<Ie.indices.length;gt++)ie[P*3+gt]=Ie.indices[gt]+ot;P+=Ie.indices.length/3}for(var de=this.extrudeY?[0,1,0]:[0,0,1],be=A.negate([],de),Ae=0;Ae<ee.length;Ae++){var Fe=f,Ue=ee[Ae];_e(Ue,0,0),_e(Ue,c,0);for(var it=Ue.points.length/3,tt=0;tt<it;tt++)z.set(Fe+tt,be),z.set(Fe+tt+it,de);for(var et=[0,3,1,1,3,2],vt=[[],[],[],[]],dt=[],je=[],nt=[],rt=[],ft=0,tt=0;tt<it;tt++){for(var lt=(tt+1)%it,wt=(Ue.points[lt*3]-Ue.points[tt*3])*ce[0],Re=(Ue.points[lt*3+2]-Ue.points[tt*3+2])*ce[ne],We=Math.sqrt(wt*wt+Re*Re),Pe=0;Pe<4;Pe++){var ke=Pe===0||Pe===3,Ze=(ke?tt:lt)*3;vt[Pe][0]=Ue.points[Ze],vt[Pe][se]=Pe>1?c:0,vt[Pe][ne]=Ue.points[Ze+2],W.set(f+Pe,vt[Pe]),k?(rt[0]=(Ue.points[Ze]*ce[0]-ae[0])/oe,rt[1]=(Ue.points[Ze+2]*ce[ne]-ae[ne])/oe):(rt[0]=(ke?ft:ft+We)/oe,rt[1]=(vt[Pe][se]*ce[se]-ae[se])/oe),Z.set(f+Pe,rt)}A.sub(dt,vt[1],vt[0]),A.sub(je,vt[3],vt[0]),A.cross(nt,dt,je),A.normalize(nt,nt);for(var Pe=0;Pe<4;Pe++)z.set(f+Pe,nt),$&&J.set(f+Pe,N);for(var Pe=0;Pe<6;Pe++)ie[P*3+Pe]=et[Pe]+f;f+=4,P+=2,ft+=We}}return S.dirty(),{vertexOffset:f,triangleOffset:P}},_getRegionLinesInfo:function(O,S,I){var c=0,f=0,P=S.getRegionModel(O),N=P.getModel("itemStyle"),k=N.get("borderWidth");if(k>0){var W=S.getRegionPolygonCoords(O);W.forEach(function(z){var Z=z.exterior,J=z.interiors;c+=I.getPolylineVertexCount(Z),f+=I.getPolylineTriangleCount(Z);for(var ee=0;ee<J.length;ee++)c+=I.getPolylineVertexCount(J[ee]),f+=I.getPolylineTriangleCount(J[ee])},this)}return{vertexCount:c,triangleCount:f}},_updateLinesGeometry:function(O,S,I,c,f,P){function N(z){for(var Z=new Float64Array(z.length*3),J=0,ee=[],$=0;$<z.length;$++)ee[0]=z[$][0],ee[1]=c+.1,ee[2]=z[$][1],P&&A.transformMat4(ee,ee,P),Z[J++]=ee[0],Z[J++]=ee[1],Z[J++]=ee[2];return Z}var k=[1,1,1,1],W=S.getRegionPolygonCoords(I);W.forEach(function(z){var Z=z.exterior,J=z.interiors;O.addPolyline(N(Z),k,f);for(var ee=0;ee<J.length;ee++)O.addPolyline(N(J[ee]),k,f)})},highlight:function(O){var S=this._data;if(S){var I=S.getItemModel(O),c=I.getModel("emphasis.itemStyle"),f=c.get("color"),P=x.a.firstNotNull(c.get("opacity"),S.getItemVisual(O,"opacity"),1);if(f==null){var N=S.getItemVisual(O,"color");f=C.a.color.lift(N,-.4)}P==null&&(P=S.getItemVisual(O,"opacity"));var k=w.a.parseColor(f);k[3]*=P,this._setColorOfDataIndex(S,O,k)}},downplay:function(O){var S=this._data;if(S){var I=S.getItemVisual(O,"color"),c=x.a.firstNotNull(S.getItemVisual(O,"opacity"),1),f=w.a.parseColor(I);f[3]*=c,this._setColorOfDataIndex(S,O,f)}},_setColorOfDataIndex:function(O,S,I){if(!(S<this._startIndex&&S>this._endIndex)){S-=this._startIndex;for(var c=this._vertexRangeOfDataIndex[S*2];c<this._vertexRangeOfDataIndex[S*2+1];c++)this._polygonMesh.geometry.attributes.color.set(c,I);this._polygonMesh.geometry.dirty(),this._api.getZr().refresh()}}},V.a=M},function(re,V,b){"use strict";var U=b(81),C=b(1),w=b.n(C),y=w.a.vec3,T=y.create(),x=y.create(),p=y.create();V.a={needsSortTriangles:function(){return this.indices&&this.sortTriangles},needsSortTrianglesProgressively:function(){return this.needsSortTriangles()&&this.triangleCount>=2e4},doSortTriangles:function(m,L){var d=this.indices;if(L===0){var g=this.attributes.position,m=m.array;(!this._triangleZList||this._triangleZList.length!==this.triangleCount)&&(this._triangleZList=new Float32Array(this.triangleCount),this._sortedTriangleIndices=new Uint32Array(this.triangleCount),this._indicesTmp=new d.constructor(d.length),this._triangleZListTmp=new Float32Array(this.triangleCount));for(var A=0,M,O=0;O<d.length;){g.get(d[O++],T),g.get(d[O++],x),g.get(d[O++],p);var S=y.sqrDist(T,m),I=y.sqrDist(x,m),c=y.sqrDist(p,m),f=Math.min(S,I);f=Math.min(f,c),O===3?(M=f,f=0):f=f-M,this._triangleZList[A++]=f}}for(var P=this._sortedTriangleIndices,O=0;O<P.length;O++)P[O]=O;if(this.triangleCount<2e4)L===0&&this._simpleSort(!0);else for(var O=0;O<3;O++)this._progressiveQuickSort(L*3+O);for(var N=this._indicesTmp,k=this._triangleZListTmp,W=this._triangleZList,O=0;O<this.triangleCount;O++){var z=P[O]*3,Z=O*3;N[Z++]=d[z++],N[Z++]=d[z++],N[Z]=d[z],k[O]=W[P[O]]}var J=this._indicesTmp;this._indicesTmp=this.indices,this.indices=J;var J=this._triangleZListTmp;this._triangleZListTmp=this._triangleZList,this._triangleZList=J,this.dirtyIndices()},_simpleSort:function(m){var L=this._triangleZList,d=this._sortedTriangleIndices;function g(A,M){return L[M]-L[A]}m?Array.prototype.sort.call(d,g):U.a.sort(d,g,0,d.length-1)},_progressiveQuickSort:function(m){var L=this._triangleZList,d=this._sortedTriangleIndices;this._quickSort=this._quickSort||new U.a,this._quickSort.step(d,function(g,A){return L[A]-L[g]},m)}}},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(73),y=b(58),T=b(3),x=1,p=2;function m(L,d,g){this._labelsMesh=new y.a,this._labelTextureSurface=new w.a({width:512,height:512,devicePixelRatio:g.getDevicePixelRatio(),onupdate:function(){g.getZr().refresh()}}),this._api=g,this._labelsMesh.material.set("textureAtlas",this._labelTextureSurface.getTexture())}m.prototype.getLabelPosition=function(L,d,g){return[0,0,0]},m.prototype.getLabelDistance=function(L,d,g){return 0},m.prototype.getMesh=function(){return this._labelsMesh},m.prototype.updateData=function(L,d,g){d==null&&(d=0),g==null&&(g=L.count()),(!this._labelsVisibilitiesBits||this._labelsVisibilitiesBits.length!==g-d)&&(this._labelsVisibilitiesBits=new Uint8Array(g-d));for(var A=["label","show"],M=["emphasis","label","show"],O=d;O<g;O++){var S=L.getItemModel(O),I=S.get(A),c=S.get(M);c==null&&(c=I);var f=(I?x:0)|(c?p:0);this._labelsVisibilitiesBits[O-d]=f}this._start=d,this._end=g,this._data=L},m.prototype.updateLabels=function(L){if(this._data){L=L||[];for(var d=L.length>0,g={},A=0;A<L.length;A++)g[L[A]]=!0;this._labelsMesh.geometry.convertToDynamicArray(!0),this._labelTextureSurface.clear();for(var M=["label"],O=["emphasis","label"],S=this._data.hostModel,I=this._data,c=S.getModel(M),f=S.getModel(O,c),P={left:"right",right:"left",top:"center",bottom:"center"},N={left:"middle",right:"middle",top:"bottom",bottom:"top"},k=this._start;k<this._end;k++){var W=!1;d&&g[k]&&(W=!0);var z=this._labelsVisibilitiesBits[k-this._start]&(W?p:x);if(z){var Z=I.getItemModel(k),J=Z.getModel(W?O:M,W?f:c),ee=J.get("distance")||0,$=J.get("position"),ie=J.getModel("textStyle"),se=this._api.getDevicePixelRatio(),ne=S.getFormattedLabel(k,W?"emphasis":"normal");if(ne==null||ne==="")return;var ce=new C.a.graphic.Text;C.a.graphic.setTextStyle(ce.style,ie,{text:ne,textFill:ie.get("color")||I.getItemVisual(k,"color")||"#000",textAlign:"left",textVerticalAlign:"top",opacity:T.a.firstNotNull(ie.get("opacity"),I.getItemVisual(k,"opacity"),1)});var ae=ce.getBoundingRect(),fe=1.2;ae.height*=fe;var oe=this._labelTextureSurface.add(ce),pe=P[$]||"center",_e=N[$]||"bottom";this._labelsMesh.geometry.addSprite(this.getLabelPosition(k,$,ee),[ae.width*se,ae.height*se],oe,pe,_e,this.getLabelDistance(k,$,ee)*se)}}this._labelsMesh.material.set("uvScale",this._labelTextureSurface.getCoordsScale()),this._labelTextureSurface.getZr().refreshImmediately(),this._labelsMesh.geometry.convertToTypedArray(),this._labelsMesh.geometry.dirty()}},V.a=m},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(216),T=b(217),x=b(61),p=b(9),m=b(3),L=20,d=-10;function g(M,O){return M&&O&&M[0]===O[0]&&M[1]===O[1]}function A(M,O){this.rootNode=new w.a.Node,this.is2D=M,this._labelsBuilder=new x.a(256,256,O),this._labelsBuilder.getMesh().renderOrder=100,this.rootNode.add(this._labelsBuilder.getMesh()),this._api=O,this._spriteImageCanvas=document.createElement("canvas"),this._startDataIndex=0,this._endDataIndex=0,this._sizeScale=1}A.prototype={constructor:A,highlightOnMouseover:!0,update:function(M,O,S,I,c){var f=this._prevMesh;this._prevMesh=this._mesh,this._mesh=f;var P=M.getData();if(I==null&&(I=0),c==null&&(c=P.count()),this._startDataIndex=I,this._endDataIndex=c-1,!this._mesh){var N=this._prevMesh&&this._prevMesh.material;this._mesh=new T.a({renderOrder:10,frustumCulling:!1}),N&&(this._mesh.material=N)}var N=this._mesh.material,k=this._mesh.geometry,W=k.attributes;this.rootNode.remove(this._prevMesh),this.rootNode.add(this._mesh),this._setPositionTextureToMesh(this._mesh,this._positionTexture);var z=this._getSymbolInfo(M,I,c),Z=S.getDevicePixelRatio(),J=M.getModel("itemStyle").getItemStyle(),ee=M.get("large"),$=1;z.maxSize>2?($=this._updateSymbolSprite(M,J,z,Z),N.enableTexture("sprite")):N.disableTexture("sprite"),W.position.init(c-I);var ie=[];if(ee){N.undefine("VERTEX_SIZE"),N.undefine("VERTEX_COLOR");var se=P.getVisual("color"),ne=P.getVisual("opacity");w.a.parseColor(se,ie),ie[3]*=ne,N.set({color:ie,u_Size:z.maxSize*this._sizeScale})}else N.set({color:[1,1,1,1]}),N.define("VERTEX_SIZE"),N.define("VERTEX_COLOR"),W.size.init(c-I),W.color.init(c-I),this._originalOpacity=new Float32Array(c-I);for(var ce=P.getLayout("points"),ae=W.position.value,fe=!1,oe=0;oe<c-I;oe++){var pe=oe*3,_e=oe*2;if(this.is2D?(ae[pe]=ce[_e],ae[pe+1]=ce[_e+1],ae[pe+2]=d):(ae[pe]=ce[pe],ae[pe+1]=ce[pe+1],ae[pe+2]=ce[pe+2]),!ee){var se=P.getItemVisual(oe,"color"),ne=P.getItemVisual(oe,"opacity");w.a.parseColor(se,ie),ie[3]*=ne,W.color.set(oe,ie),ie[3]<.99&&(fe=!0);var de=P.getItemVisual(oe,"symbolSize");de=de instanceof Array?Math.max(de[0],de[1]):de,isNaN(de)&&(de=0),W.size.value[oe]=de*$*this._sizeScale,this._originalOpacity[oe]=ie[3]}}this._mesh.sizeScale=$,k.updateBoundingBox(),k.dirty(),this._updateMaterial(M,J);var be=M.coordinateSystem;if(be&&be.viewGL){var Ae=be.viewGL.isLinearSpace()?"define":"undefine";N[Ae]("fragment","SRGB_DECODE")}ee||this._updateLabelBuilder(M,I,c),this._updateHandler(M,O,S),this._updateAnimation(M),this._api=S},getPointsMesh:function(){return this._mesh},updateLabels:function(M){this._labelsBuilder.updateLabels(M)},hideLabels:function(){this.rootNode.remove(this._labelsBuilder.getMesh())},showLabels:function(){this.rootNode.add(this._labelsBuilder.getMesh())},_updateSymbolSprite:function(M,O,S,I){S.maxSize=Math.min(S.maxSize*2,200);var c=[];return S.aspect>1?(c[0]=S.maxSize,c[1]=S.maxSize/S.aspect):(c[1]=S.maxSize,c[0]=S.maxSize*S.aspect),c[0]=c[0]||1,c[1]=c[1]||1,(this._symbolType!==S.type||!g(this._symbolSize,c)||this._lineWidth!==O.lineWidth)&&(y.a.createSymbolSprite(S.type,c,{fill:"#fff",lineWidth:O.lineWidth,stroke:"transparent",shadowColor:"transparent",minMargin:Math.min(c[0]/2,10)},this._spriteImageCanvas),y.a.createSDFFromCanvas(this._spriteImageCanvas,Math.min(this._spriteImageCanvas.width,32),L,this._mesh.material.get("sprite").image),this._symbolType=S.type,this._symbolSize=c,this._lineWidth=O.lineWidth),this._spriteImageCanvas.width/S.maxSize*I},_updateMaterial:function(M,O){var S=M.get("blendMode")==="lighter"?w.a.additiveBlend:null,I=this._mesh.material;I.blend=S,I.set("lineWidth",O.lineWidth/L);var c=w.a.parseColor(O.stroke);I.set("strokeColor",c),I.transparent=!0,I.depthMask=!1,I.depthTest=!this.is2D,I.sortVertices=!this.is2D},_updateLabelBuilder:function(M,P,S){var I=M.getData(),c=this._mesh.geometry,f=c.attributes.position.value,P=this._startDataIndex,N=this._mesh.sizeScale;this._labelsBuilder.updateData(I,P,S),this._labelsBuilder.getLabelPosition=function(k,W,z){var Z=(k-P)*3;return[f[Z],f[Z+1],f[Z+2]]},this._labelsBuilder.getLabelDistance=function(k,W,z){var Z=c.attributes.size.get(k-P)/N;return Z/2+z},this._labelsBuilder.updateLabels()},_updateAnimation:function(M){w.a.updateVertexAnimation([["prevPosition","position"],["prevSize","size"]],this._prevMesh,this._mesh,M)},_updateHandler:function(M,O,S){var I=M.getData(),c=this._mesh,f=this,P=-1,N=M.coordinateSystem&&M.coordinateSystem.type==="cartesian3D",k;N&&(k=M.coordinateSystem.model),c.seriesIndex=M.seriesIndex,c.off("mousemove"),c.off("mouseout"),c.on("mousemove",function(W){var z=W.vertexIndex+f._startDataIndex;z!==P&&(this.highlightOnMouseover&&(this.downplay(I,P),this.highlight(I,z),this._labelsBuilder.updateLabels([z])),N&&S.dispatchAction({type:"grid3DShowAxisPointer",value:[I.get(M.coordDimToDataDim("x")[0],z),I.get(M.coordDimToDataDim("y")[0],z),I.get(M.coordDimToDataDim("z")[0],z)],grid3DIndex:k.componentIndex})),c.dataIndex=z,P=z},this),c.on("mouseout",function(W){var z=W.vertexIndex+f._startDataIndex;this.highlightOnMouseover&&(this.downplay(I,z),this._labelsBuilder.updateLabels()),P=-1,c.dataIndex=-1,N&&S.dispatchAction({type:"grid3DHideAxisPointer",grid3DIndex:k.componentIndex})},this)},updateLayout:function(M,O,S){var I=M.getData();if(this._mesh){var c=this._mesh.geometry.attributes.position.value,f=I.getLayout("points");if(this.is2D)for(var P=0;P<f.length/2;P++){var N=P*3,k=P*2;c[N]=f[k],c[N+1]=f[k+1],c[N+2]=d}else for(var P=0;P<f.length;P++)c[P]=f[P];this._mesh.geometry.dirty(),S.getZr().refresh()}},updateView:function(M){if(this._mesh){var O=new p.a;p.a.mul(O,M.viewMatrix,this._mesh.worldTransform),p.a.mul(O,M.projectionMatrix,O),this._mesh.updateNDCPosition(O,this.is2D,this._api)}},highlight:function(M,O){if(!(O>this._endDataIndex||O<this._startDataIndex)){var S=M.getItemModel(O),I=S.getModel("emphasis.itemStyle"),c=I.get("color"),f=I.get("opacity");if(c==null){var P=M.getItemVisual(O,"color");c=C.a.color.lift(P,-.4)}f==null&&(f=M.getItemVisual(O,"opacity"));var N=w.a.parseColor(c);N[3]*=f,this._mesh.geometry.attributes.color.set(O-this._startDataIndex,N),this._mesh.geometry.dirtyAttribute("color"),this._api.getZr().refresh()}},downplay:function(M,O){if(!(O>this._endDataIndex||O<this._startDataIndex)){var S=M.getItemVisual(O,"color"),I=M.getItemVisual(O,"opacity"),c=w.a.parseColor(S);c[3]*=I,this._mesh.geometry.attributes.color.set(O-this._startDataIndex,c),this._mesh.geometry.dirtyAttribute("color"),this._api.getZr().refresh()}},fadeOutAll:function(M){if(this._originalOpacity){for(var O=this._mesh.geometry,S=0;S<O.vertexCount;S++){var I=this._originalOpacity[S]*M;O.attributes.color.value[S*4+3]=I}O.dirtyAttribute("color"),this._api.getZr().refresh()}},fadeInAll:function(){this.fadeOutAll(1)},setPositionTexture:function(M){this._mesh&&this._setPositionTextureToMesh(this._mesh,M),this._positionTexture=M},removePositionTexture:function(){this._positionTexture=null,this._mesh&&this._setPositionTextureToMesh(this._mesh,null)},setSizeScale:function(M){if(M!==this._sizeScale){if(this._mesh){var O=this._mesh.material.get("u_Size");this._mesh.material.set("u_Size",O/this._sizeScale*M);var S=this._mesh.geometry.attributes;if(S.size.value)for(var I=0;I<S.size.value.length;I++)S.size.value[I]=S.size.value[I]/this._sizeScale*M}this._sizeScale=M}},_setPositionTextureToMesh:function(M,O){O&&M.material.set("positionTexture",O),M.material[O?"enableTexture":"disableTexture"]("positionTexture")},_getSymbolInfo:function(M,O,S){if(M.get("large")){var I=m.a.firstNotNull(M.get("symbolSize"),1),W,f;return I instanceof Array?(W=Math.max(I[0],I[1]),f=I[0]/I[1]):(W=I,f=1),{maxSize:I,type:M.get("symbol"),aspect:f}}for(var c=M.getData(),f,P=!1,N=c.getItemVisual(0,"symbol")||"circle",k=!1,W=0,z=O;z<S;z++){var I=c.getItemVisual(z,"symbolSize"),Z=c.getItemVisual(z,"symbol"),J;if(I instanceof Array)J=I[0]/I[1],W=Math.max(Math.max(I[0],I[1]),W);else{if(isNaN(I))return;J=1,W=Math.max(I,W)}f!=null&&Math.abs(J-f)>.05&&(P=!0),Z!==N&&(k=!0),N=Z,f=J}return P&&console.warn("Different symbol width / height ratio will be ignored."),k&&console.warn("Different symbol type will be ignored."),{maxSize:W,type:N,aspect:f}}},V.a=A},function(re,V,b){"use strict";V.a=`@export clay.prez.vertex
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
attribute vec3 position : POSITION;
|
|
|
@import clay.chunk.skinning_header
|
|
|
void main()
|
|
|
{
|
|
|
vec3 skinnedPosition = position;
|
|
|
#ifdef SKINNING
|
|
|
@import clay.chunk.skin_matrix
|
|
|
skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;
|
|
|
#endif
|
|
|
gl_Position = worldViewProjection * vec4(skinnedPosition, 1.0);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.prez.fragment
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";var U=b(28),C=b(11),w=0,y=null,T=!0,x,p=function(){this.triangleCount=0,this.vertexCount=0,this.drawCallCount=0};function m(d,g,A){this.availableAttributes=d,this.availableAttributeSymbols=g,this.indicesBuffer=A,this.vao=null}var L=U.a.extend({material:null,geometry:null,mode:C.a.TRIANGLES,_drawCache:null,_renderInfo:null},function(){this._drawCache={},this._renderInfo=new p},{__program:null,lightGroup:0,renderOrder:0,lineWidth:1,culling:!0,cullFace:C.a.BACK,frontFace:C.a.CCW,frustumCulling:!0,receiveShadow:!0,castShadow:!0,ignorePicking:!1,ignorePreZ:!1,ignoreGBuffer:!1,isRenderable:function(){return this.geometry&&this.material&&this.material.shader&&!this.invisible&&this.geometry.vertexCount>0},beforeRender:function(d){},afterRender:function(d,g){},getBoundingBox:function(d,g){return g=U.a.prototype.getBoundingBox.call(this,d,g),this.geometry&&this.geometry.boundingBox&&g.union(this.geometry.boundingBox),g},render:function(d,g,A){var M=d.gl;g=g||this.material;var O=g.shader,S=this.geometry,I=this.mode,c=S.vertexCount,f=S.isUseIndices(),P=d.getGLExtension("OES_element_index_uint"),N=P&&c>65535,k=N?M.UNSIGNED_INT:M.UNSIGNED_SHORT,W=d.getGLExtension("OES_vertex_array_object"),z=!S.dynamic,Z=this._renderInfo;Z.vertexCount=c,Z.triangleCount=0,Z.drawCallCount=0;var J=!1;if(x=d.__uid__+"-"+S.__uid__+"-"+A.__uid__,(x!==w||W&&z||S._cache.isDirty("any"))&&(J=!0),w=x,!J)T?(M.drawElements(I,y.count,k,0),Z.triangleCount=y.count/3):M.drawArrays(I,0,c),Z.drawCallCount=1;else{var ee=this._drawCache[x];if(!ee){var $=S.getBufferChunks(d);if(!$)return;ee=[];for(var ie=0;ie<$.length;ie++){for(var se=$[ie],ne=se.attributeBuffers,ce=se.indicesBuffer,ae=[],fe=[],oe=0;oe<ne.length;oe++){var pe=ne[oe],_e=pe.name,de=pe.semantic,be;if(de){var Ae=O.attributeSemantics[de];be=Ae&&Ae.symbol}else be=_e;be&&A.attributes[be]&&(ae.push(pe),fe.push(be))}var Fe=new m(ae,fe,ce);ee.push(Fe)}z&&(this._drawCache[x]=ee)}for(var Ue=0;Ue<ee.length;Ue++){var Fe=ee[Ue],it=!0;W&&z&&(Fe.vao==null?Fe.vao=W.createVertexArrayOES():it=!1,W.bindVertexArrayOES(Fe.vao));var ae=Fe.availableAttributes,ce=Fe.indicesBuffer;if(it)for(var tt=A.enableAttributes(d,Fe.availableAttributeSymbols,W&&z&&Fe.vao),oe=0;oe<ae.length;oe++){var et=tt[oe];if(et!==-1){var pe=ae[oe],vt=pe.buffer,dt=pe.size,je;switch(pe.type){case"float":je=M.FLOAT;break;case"byte":je=M.BYTE;break;case"ubyte":je=M.UNSIGNED_BYTE;break;case"short":je=M.SHORT;break;case"ushort":je=M.UNSIGNED_SHORT;break;default:je=M.FLOAT;break}M.bindBuffer(M.ARRAY_BUFFER,vt),M.vertexAttribPointer(et,dt,je,!1,0,0)}}(I==C.a.LINES||I==C.a.LINE_STRIP||I==C.a.LINE_LOOP)&&M.lineWidth(this.lineWidth),y=ce,T=S.isUseIndices(),T?(it&&M.bindBuffer(M.ELEMENT_ARRAY_BUFFER,ce.buffer),M.drawElements(I,ce.count,k,0),Z.triangleCount+=ce.count/3):M.drawArrays(I,0,c),W&&z&&W.bindVertexArrayOES(null),Z.drawCallCount++}}return Z},clone:function(){var d=["castShadow","receiveShadow","mode","culling","cullFace","frontFace","frustumCulling","renderOrder","lineWidth","ignorePicking","ignorePreZ","ignoreGBuffer"];return function(){var g=U.a.prototype.clone.call(this);g.geometry=this.geometry,g.material=this.material;for(var A=0;A<d.length;A++){var M=d[A];g[M]!==this[M]&&(g[M]=this[M])}return g}}()});L.POINTS=C.a.POINTS,L.LINES=C.a.LINES,L.LINE_LOOP=C.a.LINE_LOOP,L.LINE_STRIP=C.a.LINE_STRIP,L.TRIANGLES=C.a.TRIANGLES,L.TRIANGLE_STRIP=C.a.TRIANGLE_STRIP,L.TRIANGLE_FAN=C.a.TRIANGLE_FAN,L.BACK=C.a.BACK,L.FRONT=C.a.FRONT,L.FRONT_AND_BACK=C.a.FRONT_AND_BACK,L.CW=C.a.CW,L.CCW=C.a.CCW,L.RenderInfo=p,V.a=L},function(re,V){var b=typeof window!="undefined"&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(U){setTimeout(U,16)};re.exports=b},function(re,V,b){"use strict";var U={};U.isPowerOfTwo=function(C){return(C&C-1)===0},U.nextPowerOfTwo=function(C){return C--,C|=C>>1,C|=C>>2,C|=C>>4,C|=C>>8,C|=C>>16,C++,C},U.nearestPowerOfTwo=function(C){return Math.pow(2,Math.round(Math.log(C)/Math.LN2))},V.a=U},function(re,V,b){"use strict";var U=b(4),C=b(1),w=b.n(C),y=w.a.vec3,T=w.a.mat4,x=w.a.vec4,p=function(m,L){this.normal=m||new U.a(0,1,0),this.distance=L||0};p.prototype={constructor:p,distanceToPoint:function(m){return y.dot(m.array,this.normal.array)-this.distance},projectPoint:function(m,L){L||(L=new U.a);var d=this.distanceToPoint(m);return y.scaleAndAdd(L.array,m.array,this.normal.array,-d),L._dirty=!0,L},normalize:function(){var m=1/y.len(this.normal.array);y.scale(this.normal.array,m),this.distance*=m},intersectFrustum:function(m){for(var L=m.vertices,d=this.normal.array,g=y.dot(L[0].array,d)>this.distance,A=1;A<8;A++)if(y.dot(L[A].array,d)>this.distance!=g)return!0},intersectLine:function(){var m=y.create();return function(L,d,g){var A=this.distanceToPoint(L),M=this.distanceToPoint(d);if(A>0&&M>0||A<0&&M<0)return null;var O=this.normal.array,S=this.distance,I=L.array;y.sub(m,d.array,L.array),y.normalize(m,m);var c=y.dot(O,m);if(c===0)return null;g||(g=new U.a);var f=(y.dot(O,I)-S)/c;return y.scaleAndAdd(g.array,I,m,-f),g._dirty=!0,g}}(),applyTransform:function(){var m=T.create(),L=x.create(),d=x.create();return d[3]=1,function(g){g=g.array,y.scale(d,this.normal.array,this.distance),x.transformMat4(d,d,g),this.distance=y.dot(d,this.normal.array),T.invert(m,g),T.transpose(m,m),L[3]=0,y.copy(L,this.normal.array),x.transformMat4(L,L,m),y.copy(this.normal.array,L)}}(),copy:function(m){y.copy(this.normal.array,m.normal.array),this.normal._dirty=!0,this.distance=m.distance},clone:function(){var m=new p;return m.copy(this),m}},V.a=p},function(re,V,b){"use strict";var U=b(13),C=b(15),w=U.a.extend({dynamic:!1,widthSegments:40,heightSegments:20,phiStart:0,phiLength:Math.PI*2,thetaStart:0,thetaLength:Math.PI,radius:1},function(){this.build()},{build:function(){var y=this.heightSegments,T=this.widthSegments,x=this.attributes.position,p=this.attributes.texcoord0,m=this.attributes.normal,L=(T+1)*(y+1);x.init(L),p.init(L),m.init(L);var d=L>65535?Uint32Array:Uint16Array,g=this.indices=new d(T*y*6),A,M,O,S,I,c,f,z=this.radius,P=this.phiStart,N=this.phiLength,k=this.thetaStart,W=this.thetaLength,z=this.radius,Z=[],J=[],ee=0,$=1/z;for(f=0;f<=y;f++)for(c=0;c<=T;c++)S=c/T,I=f/y,A=-z*Math.cos(P+S*N)*Math.sin(k+I*W),M=z*Math.cos(k+I*W),O=z*Math.sin(P+S*N)*Math.sin(k+I*W),Z[0]=A,Z[1]=M,Z[2]=O,J[0]=S,J[1]=I,x.set(ee,Z),p.set(ee,J),Z[0]*=$,Z[1]*=$,Z[2]*=$,m.set(ee,Z),ee++;var ie,se,ne,ce,ae=T+1,fe=0;for(f=0;f<y;f++)for(c=0;c<T;c++)se=f*ae+c,ie=f*ae+c+1,ce=(f+1)*ae+c+1,ne=(f+1)*ae+c,g[fe++]=ie,g[fe++]=se,g[fe++]=ce,g[fe++]=se,g[fe++]=ne,g[fe++]=ce;this.boundingBox=new C.a,this.boundingBox.max.set(z,z,z),this.boundingBox.min.set(-z,-z,-z)}});V.a=w},function(re,V,b){"use strict";var U=b(13),C=b(37),w=b(9),y=b(4),T=b(15),x=b(18),p=new w.a,m=U.a.extend({dynamic:!1,widthSegments:1,heightSegments:1,depthSegments:1,inside:!1},function(){this.build()},{build:function(){var d={px:L("px",this.depthSegments,this.heightSegments),nx:L("nx",this.depthSegments,this.heightSegments),py:L("py",this.widthSegments,this.depthSegments),ny:L("ny",this.widthSegments,this.depthSegments),pz:L("pz",this.widthSegments,this.heightSegments),nz:L("nz",this.widthSegments,this.heightSegments)},g=["position","texcoord0","normal"],A=0,M=0;for(var O in d)A+=d[O].vertexCount,M+=d[O].indices.length;for(var S=0;S<g.length;S++)this.attributes[g[S]].init(A);this.indices=new x.a.Uint16Array(M);var I=0,c=0;for(var O in d){for(var f=d[O],S=0;S<g.length;S++)for(var P=g[S],N=f.attributes[P].value,k=f.attributes[P].size,W=P==="normal",z=0;z<N.length;z++){var Z=N[z];this.inside&&W&&(Z=-Z),this.attributes[P].value[z+k*c]=Z}for(var J=f.indices.length,z=0;z<f.indices.length;z++)this.indices[z+I]=c+f.indices[this.inside?J-z-1:z];I+=f.indices.length,c+=f.vertexCount}this.boundingBox=new T.a,this.boundingBox.max.set(1,1,1),this.boundingBox.min.set(-1,-1,-1)}});function L(d,g,A){p.identity();var M=new C.a({widthSegments:g,heightSegments:A});switch(d){case"px":w.a.translate(p,p,y.a.POSITIVE_X),w.a.rotateY(p,p,Math.PI/2);break;case"nx":w.a.translate(p,p,y.a.NEGATIVE_X),w.a.rotateY(p,p,-Math.PI/2);break;case"py":w.a.translate(p,p,y.a.POSITIVE_Y),w.a.rotateX(p,p,-Math.PI/2);break;case"ny":w.a.translate(p,p,y.a.NEGATIVE_Y),w.a.rotateX(p,p,Math.PI/2);break;case"pz":w.a.translate(p,p,y.a.POSITIVE_Z);break;case"nz":w.a.translate(p,p,y.a.NEGATIVE_Z),w.a.rotateY(p,p,Math.PI);break}return M.applyTransform(p),M}V.a=m},function(re,V,b){"use strict";var U=b(19),C=b(4),w=U.a.extend({shadowBias:.001,shadowSlopeScale:2,shadowCascade:1,cascadeSplitLogFactor:.2},{type:"DIRECTIONAL_LIGHT",uniformTemplates:{directionalLightDirection:{type:"3f",value:function(y){return y.__dir=y.__dir||new C.a,y.__dir.copy(y.worldTransform.z).normalize().negate().array}},directionalLightColor:{type:"3f",value:function(y){var T=y.color,x=y.intensity;return[T[0]*x,T[1]*x,T[2]*x]}}},clone:function(){var y=U.a.prototype.clone.call(this);return y.shadowBias=this.shadowBias,y.shadowSlopeScale=this.shadowSlopeScale,y}});V.a=w},function(re,V,b){"use strict";var U=b(19),C=U.a.extend({range:100,castShadow:!1},{type:"POINT_LIGHT",uniformTemplates:{pointLightPosition:{type:"3f",value:function(w){return w.getWorldPosition().array}},pointLightRange:{type:"1f",value:function(w){return w.range}},pointLightColor:{type:"3f",value:function(w){var y=w.color,T=w.intensity;return[y[0]*T,y[1]*T,y[2]*T]}}},clone:function(){var w=U.a.prototype.clone.call(this);return w.range=this.range,w}});V.a=C},function(re,V,b){"use strict";var U=b(19),C=b(4),w=U.a.extend({range:20,umbraAngle:30,penumbraAngle:45,falloffFactor:2,shadowBias:2e-4,shadowSlopeScale:2},{type:"SPOT_LIGHT",uniformTemplates:{spotLightPosition:{type:"3f",value:function(y){return y.getWorldPosition().array}},spotLightRange:{type:"1f",value:function(y){return y.range}},spotLightUmbraAngleCosine:{type:"1f",value:function(y){return Math.cos(y.umbraAngle*Math.PI/180)}},spotLightPenumbraAngleCosine:{type:"1f",value:function(y){return Math.cos(y.penumbraAngle*Math.PI/180)}},spotLightFalloffFactor:{type:"1f",value:function(y){return y.falloffFactor}},spotLightDirection:{type:"3f",value:function(y){return y.__dir=y.__dir||new C.a,y.__dir.copy(y.worldTransform.z).negate().array}},spotLightColor:{type:"3f",value:function(y){var T=y.color,x=y.intensity;return[T[0]*x,T[1]*x,T[2]*x]}}},clone:function(){var y=U.a.prototype.clone.call(this);return y.range=this.range,y.umbraAngle=this.umbraAngle,y.penumbraAngle=this.penumbraAngle,y.falloffFactor=this.falloffFactor,y.shadowBias=this.shadowBias,y.shadowSlopeScale=this.shadowSlopeScale,y}});V.a=w},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(5);function y(x,p,m,L,d,g,A){this._zr=x,this._x=0,this._y=0,this._rowHeight=0,this.width=L,this.height=d,this.offsetX=p,this.offsetY=m,this.dpr=A,this.gap=g}y.prototype={constructor:y,clear:function(){this._x=0,this._y=0,this._rowHeight=0},add:function(x,p,m){var L=x.getBoundingRect();p==null&&(p=L.width),m==null&&(m=L.height),p*=this.dpr,m*=this.dpr,this._fitElement(x,p,m);var d=this._x,g=this._y,A=this.width*this.dpr,M=this.height*this.dpr,O=this.gap;if(d+p+O>A&&(d=this._x=0,g+=this._rowHeight+O,this._y=g,this._rowHeight=0),this._x+=p+O,this._rowHeight=Math.max(this._rowHeight,m),g+m+O>M)return null;x.position[0]+=this.offsetX*this.dpr+d,x.position[1]+=this.offsetY*this.dpr+g,this._zr.add(x);var S=[this.offsetX/this.width,this.offsetY/this.height],I=[[d/A+S[0],g/M+S[1]],[(d+p)/A+S[0],(g+m)/M+S[1]]];return I},_fitElement:function(x,p,m){var L=x.getBoundingRect(),d=p/L.width,g=m/L.height;x.position=[-L.x*d,-L.y*g],x.scale=[d,g],x.update()}};function T(x){x=x||{},x.width=x.width||512,x.height=x.height||512,x.devicePixelRatio=x.devicePixelRatio||1,x.gap=x.gap==null?2:x.gap;var p=document.createElement("canvas");p.width=x.width*x.devicePixelRatio,p.height=x.height*x.devicePixelRatio,this._canvas=p,this._texture=new w.a({image:p,flipY:!1});var m=this;this._zr=C.a.zrender.init(p);var L=this._zr.refreshImmediately;this._zr.refreshImmediately=function(){L.call(this),m._texture.dirty(),m.onupdate&&m.onupdate()},this._dpr=x.devicePixelRatio,this._coords={},this.onupdate=x.onupdate,this._gap=x.gap,this._textureAtlasNodes=[new y(this._zr,0,0,x.width,x.height,this._gap,this._dpr)],this._nodeWidth=x.width,this._nodeHeight=x.height,this._currentNodeIdx=0}T.prototype={clear:function(){for(var x=0;x<this._textureAtlasNodes.length;x++)this._textureAtlasNodes[x].clear();this._currentNodeIdx=0,this._zr.clear(),this._coords={}},getWidth:function(){return this._width},getHeight:function(){return this._height},getTexture:function(){return this._texture},getDevicePixelRatio:function(){return this._dpr},getZr:function(){return this._zr},_getCurrentNode:function(){return this._textureAtlasNodes[this._currentNodeIdx]},_expand:function(){if(this._currentNodeIdx++,this._textureAtlasNodes[this._currentNodeIdx])return this._textureAtlasNodes[this._currentNodeIdx];var x=4096/this._dpr,p=this._textureAtlasNodes,m=p.length,L=m*this._nodeWidth%x,d=Math.floor(m*this._nodeWidth/x)*this._nodeHeight;if(d>=x){console.error("Too much labels. Some will be ignored.");return}var g=(L+this._nodeWidth)*this._dpr,A=(d+this._nodeHeight)*this._dpr;try{this._zr.resize({width:g,height:A})}catch(O){this._canvas.width=g,this._canvas.height=A}var M=new y(this._zr,L,d,this._nodeWidth,this._nodeHeight,this._gap,this._dpr);return this._textureAtlasNodes.push(M),M},add:function(x,p,m){if(this._coords[x.id])return console.warn("Element already been add"),this._coords[x.id];var L=this._getCurrentNode().add(x,p,m);if(!L){var d=this._expand();if(!d)return;L=d.add(x,p,m)}return this._coords[x.id]=L,L},getCoordsScale:function(){var x=this._dpr;return[this._nodeWidth/this._canvas.width*x,this._nodeHeight/this._canvas.height*x]},getCoords:function(x){return this._coords[x]}},V.a=T},function(re,V,b){"use strict";V.a=U;function U(C,w,y){var T,x=C.scale;return x.type==="ordinal"&&(typeof y=="function"?(T=x.getTicks()[w],!y(T,x.getLabel(T))):w%(y+1))}},function(re,V,b){var U=b(76),C=b(77),w=U.applyTransform,y=Math.min,T=Math.max;function x(m,L,d,g){d<0&&(m=m+d,d=-d),g<0&&(L=L+g,g=-g),this.x=m,this.y=L,this.width=d,this.height=g}x.prototype={constructor:x,union:function(m){var L=y(m.x,this.x),d=y(m.y,this.y);this.width=T(m.x+m.width,this.x+this.width)-L,this.height=T(m.y+m.height,this.y+this.height)-d,this.x=L,this.y=d},applyTransform:function(){var m=[],L=[],d=[],g=[];return function(A){if(A){m[0]=d[0]=this.x,m[1]=g[1]=this.y,L[0]=g[0]=this.x+this.width,L[1]=d[1]=this.y+this.height,w(m,m,A),w(L,L,A),w(d,d,A),w(g,g,A),this.x=y(m[0],L[0],d[0],g[0]),this.y=y(m[1],L[1],d[1],g[1]);var M=T(m[0],L[0],d[0],g[0]),O=T(m[1],L[1],d[1],g[1]);this.width=M-this.x,this.height=O-this.y}}}(),calculateTransform:function(m){var L=this,d=m.width/L.width,g=m.height/L.height,A=C.create();return C.translate(A,A,[-L.x,-L.y]),C.scale(A,A,[d,g]),C.translate(A,A,[m.x,m.y]),A},intersect:function(m){if(!m)return!1;m instanceof x||(m=x.create(m));var L=this,d=L.x,g=L.x+L.width,A=L.y,M=L.y+L.height,O=m.x,S=m.x+m.width,I=m.y,c=m.y+m.height;return!(g<O||S<d||M<I||c<A)},contain:function(m,L){var d=this;return m>=d.x&&m<=d.x+d.width&&L>=d.y&&L<=d.y+d.height},clone:function(){return new x(this.x,this.y,this.width,this.height)},copy:function(m){this.x=m.x,this.y=m.y,this.width=m.width,this.height=m.height},plain:function(){return{x:this.x,y:this.y,width:this.width,height:this.height}}},x.create=function(m){return new x(m.x,m.y,m.width,m.height)};var p=x;re.exports=p},function(re,V){var b=typeof Float32Array=="undefined"?Array:Float32Array;function U(ee,$){var ie=new b(2);return ee==null&&(ee=0),$==null&&($=0),ie[0]=ee,ie[1]=$,ie}function C(ee,$){return ee[0]=$[0],ee[1]=$[1],ee}function w(ee){var $=new b(2);return $[0]=ee[0],$[1]=ee[1],$}function y(ee,$,ie){return ee[0]=$,ee[1]=ie,ee}function T(ee,$,ie){return ee[0]=$[0]+ie[0],ee[1]=$[1]+ie[1],ee}function x(ee,$,ie,se){return ee[0]=$[0]+ie[0]*se,ee[1]=$[1]+ie[1]*se,ee}function p(ee,$,ie){return ee[0]=$[0]-ie[0],ee[1]=$[1]-ie[1],ee}function m(ee){return Math.sqrt(d(ee))}var L=m;function d(ee){return ee[0]*ee[0]+ee[1]*ee[1]}var g=d;function A(ee,$,ie){return ee[0]=$[0]*ie[0],ee[1]=$[1]*ie[1],ee}function M(ee,$,ie){return ee[0]=$[0]/ie[0],ee[1]=$[1]/ie[1],ee}function O(ee,$){return ee[0]*$[0]+ee[1]*$[1]}function S(ee,$,ie){return ee[0]=$[0]*ie,ee[1]=$[1]*ie,ee}function I(ee,$){var ie=m($);return ie===0?(ee[0]=0,ee[1]=0):(ee[0]=$[0]/ie,ee[1]=$[1]/ie),ee}function c(ee,$){return Math.sqrt((ee[0]-$[0])*(ee[0]-$[0])+(ee[1]-$[1])*(ee[1]-$[1]))}var f=c;function P(ee,$){return(ee[0]-$[0])*(ee[0]-$[0])+(ee[1]-$[1])*(ee[1]-$[1])}var N=P;function k(ee,$){return ee[0]=-$[0],ee[1]=-$[1],ee}function W(ee,$,ie,se){return ee[0]=$[0]+se*(ie[0]-$[0]),ee[1]=$[1]+se*(ie[1]-$[1]),ee}function z(ee,$,ie){var se=$[0],ne=$[1];return ee[0]=ie[0]*se+ie[2]*ne+ie[4],ee[1]=ie[1]*se+ie[3]*ne+ie[5],ee}function Z(ee,$,ie){return ee[0]=Math.min($[0],ie[0]),ee[1]=Math.min($[1],ie[1]),ee}function J(ee,$,ie){return ee[0]=Math.max($[0],ie[0]),ee[1]=Math.max($[1],ie[1]),ee}V.create=U,V.copy=C,V.clone=w,V.set=y,V.add=T,V.scaleAndAdd=x,V.sub=p,V.len=m,V.length=L,V.lenSquare=d,V.lengthSquare=g,V.mul=A,V.div=M,V.dot=O,V.scale=S,V.normalize=I,V.distance=c,V.dist=f,V.distanceSquare=P,V.distSquare=N,V.negate=k,V.lerp=W,V.applyTransform=z,V.min=Z,V.max=J},function(re,V){var b=typeof Float32Array=="undefined"?Array:Float32Array;function U(){var d=new b(6);return C(d),d}function C(d){return d[0]=1,d[1]=0,d[2]=0,d[3]=1,d[4]=0,d[5]=0,d}function w(d,g){return d[0]=g[0],d[1]=g[1],d[2]=g[2],d[3]=g[3],d[4]=g[4],d[5]=g[5],d}function y(d,g,A){var M=g[0]*A[0]+g[2]*A[1],O=g[1]*A[0]+g[3]*A[1],S=g[0]*A[2]+g[2]*A[3],I=g[1]*A[2]+g[3]*A[3],c=g[0]*A[4]+g[2]*A[5]+g[4],f=g[1]*A[4]+g[3]*A[5]+g[5];return d[0]=M,d[1]=O,d[2]=S,d[3]=I,d[4]=c,d[5]=f,d}function T(d,g,A){return d[0]=g[0],d[1]=g[1],d[2]=g[2],d[3]=g[3],d[4]=g[4]+A[0],d[5]=g[5]+A[1],d}function x(d,g,A){var M=g[0],O=g[2],S=g[4],I=g[1],c=g[3],f=g[5],P=Math.sin(A),N=Math.cos(A);return d[0]=M*N+I*P,d[1]=-M*P+I*N,d[2]=O*N+c*P,d[3]=-O*P+N*c,d[4]=N*S+P*f,d[5]=N*f-P*S,d}function p(d,g,A){var M=A[0],O=A[1];return d[0]=g[0]*M,d[1]=g[1]*O,d[2]=g[2]*M,d[3]=g[3]*O,d[4]=g[4]*M,d[5]=g[5]*O,d}function m(d,g){var A=g[0],M=g[2],O=g[4],S=g[1],I=g[3],c=g[5],f=A*I-S*M;return f?(f=1/f,d[0]=I*f,d[1]=-S*f,d[2]=-M*f,d[3]=A*f,d[4]=(M*c-I*O)*f,d[5]=(S*O-A*c)*f,d):null}function L(d){var g=U();return w(g,d),g}V.create=U,V.identity=C,V.copy=w,V.mul=y,V.translate=T,V.rotate=x,V.scale=p,V.invert=m,V.clone=L},function(re,V,b){var U=b(12),C=1e-4;function w(W){return W.replace(/^\s+/,"").replace(/\s+$/,"")}function y(W,z,Z,J){var ee=z[1]-z[0],$=Z[1]-Z[0];if(ee===0)return $===0?Z[0]:(Z[0]+Z[1])/2;if(J)if(ee>0){if(W<=z[0])return Z[0];if(W>=z[1])return Z[1]}else{if(W>=z[0])return Z[0];if(W<=z[1])return Z[1]}else{if(W===z[0])return Z[0];if(W===z[1])return Z[1]}return(W-z[0])/ee*$+Z[0]}function T(W,z){switch(W){case"center":case"middle":W="50%";break;case"left":case"top":W="0%";break;case"right":case"bottom":W="100%";break}return typeof W=="string"?w(W).match(/%$/)?parseFloat(W)/100*z:parseFloat(W):W==null?NaN:+W}function x(W,z,Z){return z==null&&(z=10),z=Math.min(Math.max(0,z),20),W=(+W).toFixed(z),Z?W:+W}function p(W){return W.sort(function(z,Z){return z-Z}),W}function m(W){if(W=+W,isNaN(W))return 0;for(var z=1,Z=0;Math.round(W*z)/z!==W;)z*=10,Z++;return Z}function L(W){var z=W.toString(),Z=z.indexOf("e");if(Z>0){var J=+z.slice(Z+1);return J<0?-J:0}else{var ee=z.indexOf(".");return ee<0?0:z.length-1-ee}}function d(W,z){var Z=Math.log,J=Math.LN10,ee=Math.floor(Z(W[1]-W[0])/J),$=Math.round(Z(Math.abs(z[1]-z[0]))/J),ie=Math.min(Math.max(-ee+$,0),20);return isFinite(ie)?ie:20}function g(W,z,Z){if(!W[z])return 0;var J=U.reduce(W,function(_e,de){return _e+(isNaN(de)?0:de)},0);if(J===0)return 0;for(var ee=Math.pow(10,Z),$=U.map(W,function(_e){return(isNaN(_e)?0:_e)/J*ee*100}),ie=ee*100,se=U.map($,function(_e){return Math.floor(_e)}),ne=U.reduce(se,function(_e,de){return _e+de},0),ce=U.map($,function(_e,de){return _e-se[de]});ne<ie;){for(var ae=Number.NEGATIVE_INFINITY,fe=null,oe=0,pe=ce.length;oe<pe;++oe)ce[oe]>ae&&(ae=ce[oe],fe=oe);++se[fe],ce[fe]=0,++ne}return se[z]/ee}var A=9007199254740991;function M(W){var z=Math.PI*2;return(W%z+z)%z}function O(W){return W>-C&&W<C}var S=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d\d)(?::(\d\d)(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function I(W){if(W instanceof Date)return W;if(typeof W=="string"){var z=S.exec(W);if(!z)return new Date(NaN);if(z[8]){var Z=+z[4]||0;return z[8].toUpperCase()!=="Z"&&(Z-=z[8].slice(0,3)),new Date(Date.UTC(+z[1],+(z[2]||1)-1,+z[3]||1,Z,+(z[5]||0),+z[6]||0,+z[7]||0))}else return new Date(+z[1],+(z[2]||1)-1,+z[3]||1,+z[4]||0,+(z[5]||0),+z[6]||0,+z[7]||0)}else if(W==null)return new Date(NaN);return new Date(Math.round(W))}function c(W){return Math.pow(10,f(W))}function f(W){return Math.floor(Math.log(W)/Math.LN10)}function P(W,z){var Z=f(W),J=Math.pow(10,Z),ee=W/J,$;return z?ee<1.5?$=1:ee<2.5?$=2:ee<4?$=3:ee<7?$=5:$=10:ee<1?$=1:ee<2?$=2:ee<3?$=3:ee<5?$=5:$=10,W=$*J,Z>=-20?+W.toFixed(Z<0?-Z:0):W}function N(W){W.sort(function(ne,ce){return se(ne,ce,0)?-1:1});for(var z=-1/0,Z=1,J=0;J<W.length;){for(var ee=W[J].interval,$=W[J].close,ie=0;ie<2;ie++)ee[ie]<=z&&(ee[ie]=z,$[ie]=ie?1:1-Z),z=ee[ie],Z=$[ie];ee[0]===ee[1]&&$[0]*$[1]!==1?W.splice(J,1):J++}return W;function se(ne,ce,ae){return ne.interval[ae]<ce.interval[ae]||ne.interval[ae]===ce.interval[ae]&&(ne.close[ae]-ce.close[ae]===(ae?-1:1)||!ae&&se(ne,ce,1))}}function k(W){return W-parseFloat(W)>=0}V.linearMap=y,V.parsePercent=T,V.round=x,V.asc=p,V.getPrecision=m,V.getPrecisionSafe=L,V.getPixelPrecision=d,V.getPercentWithPrecision=g,V.MAX_SAFE_INTEGER=A,V.remRadian=M,V.isRadianAroundZero=O,V.parseDate=I,V.quantity=c,V.nice=P,V.reformIntervals=N,V.isNumeric=k},function(re,V,b){"use strict";var U=b(5),C=b(11),w=b(21),y=function(){this._pool={},this._allocatedTextures=[]};y.prototype={constructor:y,get:function(d){var g=p(d);this._pool.hasOwnProperty(g)||(this._pool[g]=[]);var A=this._pool[g];if(!A.length){var M=new U.a(d);return this._allocatedTextures.push(M),M}return A.pop()},put:function(d){var g=p(d);this._pool.hasOwnProperty(g)||(this._pool[g]=[]);var A=this._pool[g];A.push(d)},clear:function(d){for(var g=0;g<this._allocatedTextures.length;g++)this._allocatedTextures[g].dispose(d);this._pool={},this._allocatedTextures=[]}};var T={width:512,height:512,type:C.a.UNSIGNED_BYTE,format:C.a.RGBA,wrapS:C.a.CLAMP_TO_EDGE,wrapT:C.a.CLAMP_TO_EDGE,minFilter:C.a.LINEAR_MIPMAP_LINEAR,magFilter:C.a.LINEAR,useMipmap:!0,anisotropic:1,flipY:!0,unpackAlignment:4,premultiplyAlpha:!1},x=Object.keys(T);function p(d){w.a.defaultsWithPropList(d,T,x),m(d);for(var g="",A=0;A<x.length;A++){var M=x[A],O=d[M].toString();g+=O}return g}function m(d){var g=L(d.width,d.height);d.format===C.a.DEPTH_COMPONENT&&(d.useMipmap=!1),(!g||!d.useMipmap)&&(d.minFilter==C.a.NEAREST_MIPMAP_NEAREST||d.minFilter==C.a.NEAREST_MIPMAP_LINEAR?d.minFilter=C.a.NEAREST:(d.minFilter==C.a.LINEAR_MIPMAP_LINEAR||d.minFilter==C.a.LINEAR_MIPMAP_NEAREST)&&(d.minFilter=C.a.LINEAR)),g||(d.wrapS=C.a.CLAMP_TO_EDGE,d.wrapT=C.a.CLAMP_TO_EDGE)}function L(d,g){return(d&d-1)===0&&(g&g-1)===0}V.a=y},function(re,V,b){"use strict";var U=b(0),C=b.n(U);V.a={getFilledRegions:function(w,y){var T=(w||[]).slice(),x;if(typeof y=="string"?(y=C.a.getMap(y),x=y&&y.geoJson):y&&y.features&&(x=y),!x)return console.error("Map "+y+" not exists. You can download map file on http://echarts.baidu.com/download-map.html"),x.features||console.error("Invalid GeoJSON for map3D"),[];for(var p={},m=x.features,L=0;L<T.length;L++)p[T[L].name]=T[L];for(var L=0;L<m.length;L++){var d=m[L].properties.name;p[d]||T.push({name:d})}return T},defaultOption:{show:!0,zlevel:-10,map:"",left:0,top:0,width:"100%",height:"100%",boxWidth:100,boxHeight:10,boxDepth:"auto",regionHeight:3,environment:"auto",groundPlane:{show:!1,color:"#aaa"},shading:"lambert",light:{main:{alpha:40,beta:30}},viewControl:{alpha:40,beta:0,distance:100,orthographicSize:60,minAlpha:5,minBeta:-80,maxBeta:80},label:{show:!1,distance:2,textStyle:{fontSize:20,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:4}},itemStyle:{color:"#fff",borderWidth:0,borderColor:"#333"},emphasis:{itemStyle:{color:"#639fc0"},label:{show:!0}}}}},function(re,V,b){"use strict";function U(T,x,p){var m=T[x];T[x]=T[p],T[p]=m}function C(T,x,p,m,L){var d=p,g=T[x];U(T,x,m);for(var A=p;A<m;A++)L(T[A],g)<0&&(U(T,A,d),d++);return U(T,m,d),d}function w(T,x,p,m){if(p<m){var L=Math.floor((p+m)/2),d=C(T,L,p,m,x);w(T,x,p,d-1),w(T,x,d+1,m)}}function y(){this._parts=[]}y.prototype.step=function(T,x,p){var m=T.length;if(p===0){this._parts=[],this._sorted=!1;var L=Math.floor(m/2);this._parts.push({pivot:L,left:0,right:m-1}),this._currentSortPartIdx=0}if(!this._sorted){var d=this._parts;if(d.length===0)return this._sorted=!0,!0;if(d.length<512){for(var g=0;g<d.length;g++)d[g].pivot=C(T,d[g].pivot,d[g].left,d[g].right,x);for(var A=[],g=0;g<d.length;g++){var M=d[g].left,O=d[g].pivot-1;O>M&&A.push({pivot:Math.floor((O+M)/2),left:M,right:O});var M=d[g].pivot+1,O=d[g].right;O>M&&A.push({pivot:Math.floor((O+M)/2),left:M,right:O})}d=this._parts=A}else for(var g=0;g<Math.floor(d.length/10);g++){var S=d.length-1-this._currentSortPartIdx;if(w(T,x,d[S].left,d[S].right),this._currentSortPartIdx++,this._currentSortPartIdx===d.length)return this._sorted=!0,!0}return!1}},y.sort=w,V.a=y},function(re,V,b){"use strict";var U=b(83),C=b(0),w=b.n(C),y=b(41),T=b.n(y),x=b(20),p=b(3);function m(M,O){var S=M.getBoxLayoutParams(),I=T.a.getLayoutRect(S,{width:O.getWidth(),height:O.getHeight()});I.y=O.getHeight()-I.y-I.height,this.viewGL.setViewport(I.x,I.y,I.width,I.height,O.getDevicePixelRatio());var c=this.getGeoBoundingRect(),f=c.width/c.height*(M.get("aspectScale")||.75),P=M.get("boxWidth"),N=M.get("boxDepth"),k=M.get("boxHeight");k==null&&(k=5),isNaN(P)&&isNaN(N)&&(P=100),isNaN(N)?N=P/f:isNaN(P)&&(P=N/f),this.setSize(P,k,N),this.regionHeight=M.get("regionHeight"),this.altitudeAxis&&this.altitudeAxis.setExtent(0,Math.max(k-this.regionHeight,0))}function L(M,O){var S=[1/0,-1/0];if(M.eachSeries(function(c){if(c.coordinateSystem===this&&c.type!=="series.map3D"){var f=c.getData(),P=c.coordDimToDataDim("alt")[0];if(P){var N=f.getDataExtent(P,!0);S[0]=Math.min(S[0],N[0]),S[1]=Math.max(S[1],N[1])}}},this),S&&isFinite(S[1]-S[0])){var I=w.a.helper.createScale(S,{type:"value",min:"dataMin",max:"dataMax"});this.altitudeAxis=new w.a.Axis("altitude",I),this.resize(this.model,O)}}var d=function(M){console.error("Map "+M+" not exists. You can download map file on http://echarts.baidu.com/download-map.html")},g=0,A={dimensions:U.a.prototype.dimensions,create:function(M,O){var S=[];if(!w.a.getMap)throw new Error("geo3D component depends on geo component");function I(c,f){var P=A.createGeo3D(c);c.__viewGL=c.__viewGL||new x.a,P.viewGL=c.__viewGL,c.coordinateSystem=P,P.model=c,S.push(P),P.resize=m,P.resize(c,O),P.update=L}return M.eachComponent("geo3D",function(c,f){I(c,f)}),M.eachSeriesByType("map3D",function(c,f){var P=c.get("coordinateSystem");P==null&&(P="geo3D"),P==="geo3D"&&I(c,f)}),M.eachSeries(function(c){if(c.get("coordinateSystem")==="geo3D"){if(c.type==="series.map3D")return;var f=c.getReferringComponents("geo3D")[0];if(f||(f=M.getComponent("geo3D")),!f)throw new Error('geo "'+p.a.firstNotNull(c.get("geo3DIndex"),c.get("geo3DId"),0)+'" not found');c.coordinateSystem=f.coordinateSystem}}),S},createGeo3D:function(M){var O=M.get("map"),S;if(typeof O=="string"?(S=O,O=w.a.getMap(O)):O&&O.features&&(O={geoJson:O}),O||d(O),!O.geoJson.features)throw new Error("Invalid GeoJSON for map3D");return S==null&&(S="GEO_ANONYMOUS_"+g++),new U.a(S+g++,S,O&&O.geoJson,O&&O.specialAreas,M.get("nameMap"))}};w.a.registerCoordinateSystem("geo3D",A),V.a=A},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(1),y=b.n(w),T=b(187),x=b.n(T),p=b(188),m=b.n(p),L=y.a.vec3,d=y.a.mat4,g=[x.a,m.a];function A(M,O,S,I,c){this.name=M,this.map=O,this.regionHeight=0,this.regions=[],this._nameCoordMap={},this.loadGeoJson(S,I,c),this.transform=d.identity(new Float64Array(16)),this.invTransform=d.identity(new Float64Array(16)),this.extrudeY=!0,this.altitudeAxis}A.prototype={constructor:A,type:"geo3D",dimensions:["lng","lat","alt"],containPoint:function(){},loadGeoJson:function(M,O,S){var I=C.a.parseGeoJSON||C.a.parseGeoJson;try{this.regions=M?I(M):[]}catch(W){throw`Invalid geoJson format
|
|
|
`+W}O=O||{},S=S||{};for(var c=this.regions,f={},P=0;P<c.length;P++){var N=c[P].name;N=S[N]||N,c[P].name=N,f[N]=c[P],this.addGeoCoord(N,c[P].center);var k=O[N];k&&c[P].transformTo(k.left,k.top,k.width,k.height)}this._regionsMap=f,this._geoRect=null,g.forEach(function(W){W(this)},this)},getGeoBoundingRect:function(){if(this._geoRect)return this._geoRect;for(var M,O=this.regions,S=0;S<O.length;S++){var I=O[S].getBoundingRect();M=M||I.clone(),M.union(I)}return this._geoRect=M||new C.a.graphic.BoundingRect(0,0,0,0)},addGeoCoord:function(M,O){this._nameCoordMap[M]=O},getRegion:function(M){return this._regionsMap[M]},getRegionByCoord:function(M){for(var O=this.regions,S=0;S<O.length;S++)if(O[S].contain(M))return O[S]},setSize:function(M,O,S){this.size=[M,O,S];var I=this.getGeoBoundingRect(),c=M/I.width,f=-S/I.height,P=-M/2-I.x*c,N=S/2-I.y*f,k=this.extrudeY?[P,0,N]:[P,N,0],W=this.extrudeY?[c,1,f]:[c,f,1],z=this.transform;d.identity(z),d.translate(z,z,k),d.scale(z,z,W),d.invert(this.invTransform,z)},dataToPoint:function(M,O){O=O||[];var S=this.extrudeY?1:2,I=this.extrudeY?2:1,c=M[2];return isNaN(c)&&(c=0),O[0]=M[0],O[I]=M[1],this.altitudeAxis?O[S]=this.altitudeAxis.dataToCoord(c):O[S]=0,O[S]+=this.regionHeight,L.transformMat4(O,O,this.transform),O},pointToData:function(M,O){}},V.a=A},function(re,V,b){"use strict";var U=b(77),C=b.n(U),w=b(76),y=b.n(w);function T(x){this.viewGL=x}T.prototype.reset=function(x,p){this._updateCamera(p.getWidth(),p.getHeight(),p.getDevicePixelRatio()),this._viewTransform=C.a.create(),this.updateTransform(x,p)},T.prototype.updateTransform=function(x,p){var m=x.coordinateSystem;m.getRoamTransform&&(C.a.invert(this._viewTransform,m.getRoamTransform()),this._setCameraTransform(this._viewTransform),p.getZr().refresh())},T.prototype.dataToPoint=function(x,p,m){m=x.dataToPoint(p,null,m);var L=this._viewTransform;L&&y.a.applyTransform(m,m,L)},T.prototype.removeTransformInPoint=function(x){return this._viewTransform&&y.a.applyTransform(x,x,this._viewTransform),x},T.prototype.getZoom=function(){if(this._viewTransform){var x=this._viewTransform;return 1/Math.max(Math.sqrt(x[0]*x[0]+x[1]*x[1]),Math.sqrt(x[2]*x[2]+x[3]*x[3]))}return 1},T.prototype._setCameraTransform=function(x){var p=this.viewGL.camera;p.position.set(x[4],x[5],0),p.scale.set(Math.sqrt(x[0]*x[0]+x[1]*x[1]),Math.sqrt(x[2]*x[2]+x[3]*x[3]),1)},T.prototype._updateCamera=function(x,p,m){this.viewGL.setViewport(0,0,x,p,m);var L=this.viewGL.camera;L.left=L.top=0,L.bottom=p,L.right=x,L.near=0,L.far=100},V.a=T},function(re,V,b){(function(U){var C;typeof window!="undefined"?C=window.__DEV__:typeof U!="undefined"&&(C=U.__DEV__),typeof C=="undefined"&&(C=!0);var w=C;V.__DEV__=w}).call(V,b(243))},function(re,V,b){"use strict";var U=b(13),C=b(0),w=b.n(C),y=b(33),T=b(1),x=b.n(T),p=x.a.vec2,m=[[0,0],[1,1]],L=U.a.extend(function(){return{segmentScale:4,dynamic:!0,useNativeLine:!0,attributes:{position:new U.a.Attribute("position","float",2,"POSITION"),normal:new U.a.Attribute("normal","float",2),offset:new U.a.Attribute("offset","float",1),color:new U.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0,this._itemVertexOffsets=[]},setVertexCount:function(d){var g=this.attributes;this.vertexCount!==d&&(g.position.init(d),g.color.init(d),this.useNativeLine||(g.offset.init(d),g.normal.init(d)),d>65535?this.indices instanceof Uint16Array&&(this.indices=new Uint32Array(this.indices)):this.indices instanceof Uint32Array&&(this.indices=new Uint16Array(this.indices)))},setTriangleCount:function(d){this.triangleCount!==d&&(d===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(d*3):new Uint16Array(d*3))},_getCubicCurveApproxStep:function(d,g,A,M){var O=p.dist(d,g)+p.dist(A,g)+p.dist(M,A),S=1/(O+1)*this.segmentScale;return S},getCubicCurveVertexCount:function(d,g,A,M){var O=this._getCubicCurveApproxStep(d,g,A,M),S=Math.ceil(1/O);return this.useNativeLine?S*2:S*2+2},getCubicCurveTriangleCount:function(d,g,A,M){var O=this._getCubicCurveApproxStep(d,g,A,M),S=Math.ceil(1/O);return this.useNativeLine?0:S*2},getLineVertexCount:function(){return this.getPolylineVertexCount(m)},getLineTriangleCount:function(){return this.getPolylineTriangleCount(m)},getPolylineVertexCount:function(d){var g;if(typeof d=="number")g=d;else{var A=typeof d[0]!="number";g=A?d.length:d.length/2}return this.useNativeLine?(g-1)*2:(g-1)*2+2},getPolylineTriangleCount:function(d){var g;if(typeof d=="number")g=d;else{var A=typeof d[0]!="number";g=A?d.length:d.length/2}return this.useNativeLine?0:(g-1)*2},addCubicCurve:function(d,g,A,M,O,S){S==null&&(S=1);for(var I=d[0],c=d[1],f=g[0],P=g[1],N=A[0],k=A[1],W=M[0],z=M[1],Z=this._getCubicCurveApproxStep(d,g,A,M),J=Z*Z,ee=J*Z,$=3*Z,ie=3*J,se=6*J,ne=6*ee,ce=I-f*2+N,ae=c-P*2+k,fe=(f-N)*3-I+W,oe=(P-k)*3-c+z,pe=I,_e=c,de=(f-I)*$+ce*ie+fe*ee,be=(P-c)*$+ae*ie+oe*ee,Ae=ce*se+fe*ne,Fe=ae*se+oe*ne,Ue=fe*ne,it=oe*ne,tt=0,et=0,vt=Math.ceil(1/Z),dt=new Float32Array((vt+1)*3),dt=[],je=0,et=0;et<vt+1;et++)dt[je++]=pe,dt[je++]=_e,pe+=de,_e+=be,de+=Ae,be+=Fe,Ae+=Ue,Fe+=it,tt+=Z,tt>1&&(pe=de>0?Math.min(pe,W):Math.max(pe,W),_e=be>0?Math.min(_e,z):Math.max(_e,z));this.addPolyline(dt,O,S)},addLine:function(d,g,A,M){this.addPolyline([d,g],A,M)},addPolyline:function(){var d=p.create(),g=p.create(),A=p.create(),M=p.create(),O=[],S=[],I=[];return function(c,f,P,N,k){if(c.length){var W=typeof c[0]!="number";if(k==null&&(k=W?c.length:c.length/2),!(k<2)){N==null&&(N=0),P==null&&(P=1),this._itemVertexOffsets.push(this._vertexOffset);for(var z=W?typeof f[0]!="number":f.length/4===k,Z=this.attributes.position,J=this.attributes.color,ee=this.attributes.offset,$=this.attributes.normal,ie=this.indices,se=this._vertexOffset,ne,ce=0;ce<k;ce++){if(W)O=c[ce+N],z?ne=f[ce+N]:ne=f;else{var ae=ce*2+N;if(O=O||[],O[0]=c[ae],O[1]=c[ae+1],z){var fe=ce*4+N;ne=ne||[],ne[0]=f[fe],ne[1]=f[fe+1],ne[2]=f[fe+2],ne[3]=f[fe+3]}else ne=f}if(this.useNativeLine)ce>1&&(Z.copy(se,se-1),J.copy(se,se-1),se++);else{var oe;if(ce<k-1){if(W)p.copy(S,c[ce+1]);else{var ae=(ce+1)*2+N;S=S||[],S[0]=c[ae],S[1]=c[ae+1]}if(ce>0){p.sub(d,O,I),p.sub(g,S,O),p.normalize(d,d),p.normalize(g,g),p.add(M,d,g),p.normalize(M,M);var pe=P/2*Math.min(1/p.dot(d,M),2);A[0]=-M[1],A[1]=M[0],oe=pe}else p.sub(d,S,O),p.normalize(d,d),A[0]=-d[1],A[1]=d[0],oe=P/2}else p.sub(d,O,I),p.normalize(d,d),A[0]=-d[1],A[1]=d[0],oe=P/2;$.set(se,A),$.set(se+1,A),ee.set(se,oe),ee.set(se+1,-oe),p.copy(I,O),Z.set(se,O),Z.set(se+1,O),J.set(se,ne),J.set(se+1,ne),se+=2}if(this.useNativeLine)J.set(se,ne),Z.set(se,O),se++;else if(ce>0){var _e=this._faceOffset*3,ie=this.indices;ie[_e]=se-4,ie[_e+1]=se-3,ie[_e+2]=se-2,ie[_e+3]=se-3,ie[_e+4]=se-1,ie[_e+5]=se-2,this._faceOffset+=2}}this._vertexOffset=se}}}}(),setItemColor:function(d,g){for(var A=this._itemVertexOffsets[d],M=d<this._itemVertexOffsets.length-1?this._itemVertexOffsets[d+1]:this._vertexOffset,O=A;O<M;O++)this.attributes.color.set(O,g);this.dirty("color")}});w.a.util.defaults(L.prototype,y.a),V.a=L},function(re,V,b){"use strict";Object.defineProperty(V,"__esModule",{value:!0});var U=b(88),C=b(133),w=b(183),y=b(189),T=b(195),x=b(202),p=b(209),m=b(213),L=b(220),d=b(226),g=b(229),A=b(233),M=b(236),O=b(239),S=b(253),I=b(259)},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(89),y=b(90),T=b(101),x=b(2),p={version:"1.0.0",dependencies:{echarts:"4.0.0",claygl:"1.0.0"}},m=p.dependencies;function L(O){throw new Error(O+" version is too old, needs "+m[O]+" or higher")}function d(O,S){O.replace(".","")-0<m[S].replace(".","")-0&&L(S),console.log("Loaded "+S+", version "+O)}d(w.a,"claygl"),d(C.a.version,"echarts");function g(O){this._layers={},this._zr=O}g.prototype.update=function(O,S){var I=this,c=S.getZr();if(!c.getWidth()||!c.getHeight()){console.warn("Dom has no width or height");return}function f(k){var W;k.coordinateSystem&&k.coordinateSystem.model,W=k.get("zlevel");var z=I._layers,Z=z[W];if(!Z){if(Z=z[W]=new y.a("gl-"+W,c),c.painter.isSingleCanvas()){Z.virtual=!0;var J=new C.a.graphic.Image({z:1e4,style:{image:Z.renderer.canvas},silent:!0});Z.__hostImage=J,c.add(J)}c.painter.insertLayer(W,Z)}return Z.__hostImage&&Z.__hostImage.setStyle({width:Z.renderer.getWidth(),height:Z.renderer.getHeight()}),Z}function P(k,W){k&&k.traverse(function(z){z.isRenderable&&z.isRenderable()&&(z.ignorePicking=z.$ignorePicking!=null?z.$ignorePicking:W)})}for(var N in this._layers)this._layers[N].removeViewsAll();O.eachComponent(function(k,W){if(k!=="series"){var z=S.getViewOfComponentModel(W),Z=W.coordinateSystem;if(z.__ecgl__){var J;if(Z){if(!Z.viewGL){console.error("Can't find viewGL in coordinateSystem of component "+W.id);return}J=Z.viewGL}else{if(!W.viewGL){console.error("Can't find viewGL of component "+W.id);return}J=Z.viewGL}var J=Z.viewGL,ee=f(W);ee.addView(J),z.afterRender&&z.afterRender(W,O,S,ee),P(z.groupGL,W.get("silent"))}}}),O.eachSeries(function(k){var W=S.getViewOfSeriesModel(k),z=k.coordinateSystem;if(W.__ecgl__){if(z&&!z.viewGL&&!W.viewGL){console.error("Can't find viewGL of series "+W.id);return}var Z=z&&z.viewGL||W.viewGL,J=f(k);J.addView(Z),W.afterRender&&W.afterRender(k,O,S,J),P(W.groupGL,k.get("silent"))}})};var A=C.a.init;C.a.init=function(){var O=A.apply(this,arguments);return O.getZr().painter.getRenderedCanvas=function(S){if(S=S||{},this._singleCanvas)return this._layers[0].dom;var I=document.createElement("canvas"),c=S.pixelRatio||this.dpr;I.width=this.getWidth()*c,I.height=this.getHeight()*c;var f=I.getContext("2d");f.dpr=c,f.clearRect(0,0,I.width,I.height),S.backgroundColor&&(f.fillStyle=S.backgroundColor,f.fillRect(0,0,I.width,I.height));var P=this.storage.getDisplayList(!0),N={},k,W=this;function z($,ie){var se=W._zlevelList;$==null&&($=-1/0);for(var ne,ce=0;ce<se.length;ce++){var ae=se[ce],fe=W._layers[ae];if(!fe.__builtin__&&ae>$&&ae<ie){ne=fe;break}}ne&&ne.renderToCanvas&&(f.save(),ne.renderToCanvas(f),f.restore())}for(var Z={ctx:f},J=0;J<P.length;J++){var ee=P[J];ee.zlevel!==k&&(z(k,ee.zlevel),k=ee.zlevel),this._doPaintEl(ee,Z,!0,N)}return z(k,1/0),I},O},C.a.registerPostUpdate(function(O,S){var I=S.getZr(),c=I.__egl=I.__egl||new g(I);c.update(O,S)}),C.a.registerPreprocessor(T.a),C.a.graphicGL=x.a;var M=g},function(re,V,b){"use strict";V.a="1.0.0"},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(46),y=b(100),T=b(6),x=b(47),p=b(65),m=b.n(p),L=function(I,c){this.id=I,this.zr=c;try{this.renderer=new w.a({clearBit:0,devicePixelRatio:c.painter.dpr,preserveDrawingBuffer:!0,premultipliedAlpha:!0}),this.renderer.resize(c.painter.getWidth(),c.painter.getHeight())}catch(P){this.renderer=null,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute; left: 0; top: 0; right: 0; bottom: 0;",this.dom.className="ecgl-nowebgl",this.dom.innerHTML="Sorry, your browser does support WebGL",console.error(P);return}this.onglobalout=this.onglobalout.bind(this),c.on("globalout",this.onglobalout),this.dom=this.renderer.canvas;var f=this.dom.style;f.position="absolute",f.left="0",f.top="0",this.views=[],this._picking=new y.a({renderer:this.renderer}),this._viewsToDispose=[],this._accumulatingId=0,this._zrEventProxy=new C.a.graphic.Rect({shape:{x:-1,y:-1,width:2,height:2},__isGLToZRProxy:!0})};L.prototype.addView=function(I){if(I.layer!==this){var c=this._viewsToDispose.indexOf(I);c>=0&&this._viewsToDispose.splice(c,1),this.views.push(I),I.layer=this;var f=this.zr;I.scene.traverse(function(P){P.__zr=f,P.addAnimatorsToZr&&P.addAnimatorsToZr(f)})}};function d(I){var c=I.__zr;I.__zr=null,c&&I.removeAnimatorsFromZr&&I.removeAnimatorsFromZr(c)}L.prototype.removeView=function(I){if(I.layer===this){var c=this.views.indexOf(I);c>=0&&(this.views.splice(c,1),I.scene.traverse(d,this),I.layer=null,this._viewsToDispose.push(I))}},L.prototype.removeViewsAll=function(){this.views.forEach(function(I){I.scene.traverse(d,this),I.layer=null,this._viewsToDispose.push(I)},this),this.views.length=0},L.prototype.resize=function(I,c){var f=this.renderer;f.resize(I,c)},L.prototype.clear=function(){var I=this.renderer.gl;I.clearColor(0,0,0,0),I.depthMask(!0),I.colorMask(!0,!0,!0,!0),I.clear(I.DEPTH_BUFFER_BIT|I.COLOR_BUFFER_BIT)},L.prototype.clearDepth=function(){var I=this.renderer.gl;I.clear(I.DEPTH_BUFFER_BIT)},L.prototype.clearColor=function(){var I=this.renderer.gl;I.clearColor(0,0,0,0),I.clear(I.COLOR_BUFFER_BIT)},L.prototype.needsRefresh=function(){this.zr.refresh()},L.prototype.refresh=function(){for(var I=0;I<this.views.length;I++)this.views[I].prepareRender();this._doRender(!1),this._trackAndClean();for(var I=0;I<this._viewsToDispose.length;I++)this._viewsToDispose[I].dispose(this.renderer);this._viewsToDispose.length=0,this._startAccumulating()},L.prototype.renderToCanvas=function(I){this._startAccumulating(!0),I.drawImage(this.dom,0,0,I.canvas.width,I.canvas.height)},L.prototype._doRender=function(I){this.clear(),this.renderer.saveViewport();for(var c=0;c<this.views.length;c++)this.views[c].render(this.renderer,I);this.renderer.restoreViewport()},L.prototype._stopAccumulating=function(){this._accumulatingId=0,clearTimeout(this._accumulatingTimeout)};var g=1;L.prototype._startAccumulating=function(I){var c=this;this._stopAccumulating();for(var f=!1,P=0;P<this.views.length;P++)f=this.views[P].needsAccumulate()||f;if(!f)return;function N(k){if(!(!c._accumulatingId||k!==c._accumulatingId)){for(var W=!0,z=0;z<c.views.length;z++)W=c.views[z].isAccumulateFinished()&&f;W||(c._doRender(!0),I?N(k):m()(function(){N(k)}))}}this._accumulatingId=g++,I?N(c._accumulatingId):this._accumulatingTimeout=setTimeout(function(){N(c._accumulatingId)},50)},L.prototype._trackAndClean=function(){var I=[],c=[];this._textureList&&(A(this._textureList),A(this._geometriesList));for(var f=0;f<this.views.length;f++)S(this.views[f].scene,I,c);this._textureList&&(M(this.renderer,this._textureList),M(this.renderer,this._geometriesList)),this._textureList=I,this._geometriesList=c};function A(I){for(var c=0;c<I.length;c++)I[c].__used__=0}function M(I,c){for(var f=0;f<c.length;f++)c[f].__used__||c[f].dispose(I)}function O(I,c){I.__used__=I.__used__||0,I.__used__++,I.__used__===1&&c.push(I)}function S(I,c,f){function P(k){for(var W,z,Z=0;Z<k.length;Z++){var J=k[Z],ee=J.geometry,$=J.material;if($!==W)for(var ie=$.getTextureUniforms(),se=0;se<ie.length;se++){var ne=ie[se],ce=$.uniforms[ne].value;if(ce){if(ce instanceof T.a)O(ce,c);else if(ce instanceof Array)for(var ae=0;ae<ce.length;ae++)ce[ae]instanceof T.a&&O(ce[ae],c)}}ee!==z&&O(ee,f),W=$,z=ee}}P(I.opaqueList),P(I.transparentList);for(var N=0;N<I.lights.length;N++)I.lights[N].cubemap&&O(I.lights[N].cubemap,c)}L.prototype.dispose=function(){this._stopAccumulating(),this.renderer.disposeScene(this.scene),this.zr.off("globalout",this.onglobalout)},L.prototype.onmousedown=function(I){if(!(I.target&&I.target.__isGLToZRProxy)){I=I.event;var c=this.pickObject(I.offsetX,I.offsetY);c&&(this._dispatchEvent("mousedown",I,c),this._dispatchDataEvent("mousedown",I,c)),this._downX=I.offsetX,this._downY=I.offsetY}},L.prototype.onmousemove=function(I){if(!(I.target&&I.target.__isGLToZRProxy)){I=I.event;var c=this.pickObject(I.offsetX,I.offsetY),f=c&&c.target,P=this._hovered;this._hovered=c,P&&f!==P.target&&(P.relatedTarget=f,this._dispatchEvent("mouseout",I,P),this.zr.setCursorStyle("default")),this._dispatchEvent("mousemove",I,c),c&&(this.zr.setCursorStyle("pointer"),(!P||f!==P.target)&&this._dispatchEvent("mouseover",I,c)),this._dispatchDataEvent("mousemove",I,c)}},L.prototype.onmouseup=function(I){if(!(I.target&&I.target.__isGLToZRProxy)){I=I.event;var c=this.pickObject(I.offsetX,I.offsetY);c&&(this._dispatchEvent("mouseup",I,c),this._dispatchDataEvent("mouseup",I,c)),this._upX=I.offsetX,this._upY=I.offsetY}},L.prototype.onclick=L.prototype.dblclick=function(I){if(!(I.target&&I.target.__isGLToZRProxy)){var c=this._upX-this._downX,f=this._upY-this._downY;if(!(Math.sqrt(c*c+f*f)>20)){I=I.event;var P=this.pickObject(I.offsetX,I.offsetY);P&&(this._dispatchEvent(I.type,I,P),this._dispatchDataEvent(I.type,I,P));var N=this._clickToSetFocusPoint(I);if(N){var k=N.view.setDOFFocusOnPoint(N.distance);k&&this.zr.refresh()}}}},L.prototype._clickToSetFocusPoint=function(I){for(var c=this.renderer,f=c.viewport,P=this.views.length-1;P>=0;P--){var N=this.views[P];if(N.hasDOF()&&N.containPoint(I.offsetX,I.offsetY)){this._picking.scene=N.scene,this._picking.camera=N.camera,c.viewport=N.viewport;var k=this._picking.pick(I.offsetX,I.offsetY,!0);if(k)return k.view=N,k}}c.viewport=f},L.prototype.onglobalout=function(I){var c=this._hovered;c&&this._dispatchEvent("mouseout",I,{target:c.target})},L.prototype.pickObject=function(I,c){for(var f=[],P=this.renderer,N=P.viewport,k=0;k<this.views.length;k++){var W=this.views[k];W.containPoint(I,c)&&(this._picking.scene=W.scene,this._picking.camera=W.camera,P.viewport=W.viewport,this._picking.pickAll(I,c,f))}return P.viewport=N,f.sort(function(z,Z){return z.distance-Z.distance}),f[0]},L.prototype._dispatchEvent=function(I,c,f){f||(f={});var P=f.target;for(f.cancelBubble=!1,f.event=c,f.type=I,f.offsetX=c.offsetX,f.offsetY=c.offsetY;P&&(P.trigger(I,f),P=P.getParent(),!f.cancelBubble););this._dispatchToView(I,f)},L.prototype._dispatchDataEvent=function(I,c,f){var P=f&&f.target,N=P&&P.dataIndex,k=P&&P.seriesIndex,W=P&&P.eventData,z=!1,Z=this._zrEventProxy;Z.position=[c.offsetX,c.offsetY],Z.update();var J={target:Z};I==="mousemove"&&(N!=null?N!==this._lastDataIndex&&(parseInt(this._lastDataIndex,10)>=0&&(Z.dataIndex=this._lastDataIndex,Z.seriesIndex=this._lastSeriesIndex,this.zr.handler.dispatchToElement(J,"mouseout",c)),z=!0):W!=null&&W!==this._lastEventData&&(this._lastEventData!=null&&(Z.eventData=this._lastEventData,this.zr.handler.dispatchToElement(J,"mouseout",c)),z=!0),this._lastEventData=W,this._lastDataIndex=N,this._lastSeriesIndex=k),Z.eventData=W,Z.dataIndex=N,Z.seriesIndex=k,(W!=null||parseInt(N,10)>=0)&&(this.zr.handler.dispatchToElement(J,I,c),z&&this.zr.handler.dispatchToElement(J,"mouseover",c))},L.prototype._dispatchToView=function(I,c){for(var f=0;f<this.views.length;f++)this.views[f].containPoint(c.offsetX,c.offsetY)&&this.views[f].trigger(I,c)},C.a.util.extend(L.prototype,x.a),V.a=L},function(re,V,b){"use strict";function U(y,T,x){typeof T=="object"&&(x=T,T=null);var p=this,m;if(!(y instanceof Function)){m=[];for(var L in y)y.hasOwnProperty(L)&&m.push(L)}var d=function(A){if(p.apply(this,arguments),y instanceof Function?C(this,y.call(this,A)):w(this,y,m),this.constructor===d)for(var M=d.__initializers__,O=0;O<M.length;O++)M[O].apply(this,arguments)};d.__super__=p,p.__initializers__?d.__initializers__=p.__initializers__.slice():d.__initializers__=[],T&&d.__initializers__.push(T);var g=function(){};return g.prototype=p.prototype,d.prototype=new g,d.prototype.constructor=d,C(d.prototype,x),d.extend=p.extend,d.derive=p.extend,d}function C(y,T){if(T)for(var x in T)T.hasOwnProperty(x)&&(y[x]=T[x])}function w(y,T,x){for(var p=0;p<x.length;p++){var m=x[p];y[m]=T[m]}}V.a={extend:U,derive:U}},function(re,V,b){"use strict";var U=["OES_texture_float","OES_texture_half_float","OES_texture_float_linear","OES_texture_half_float_linear","OES_standard_derivatives","OES_vertex_array_object","OES_element_index_uint","WEBGL_compressed_texture_s3tc","WEBGL_depth_texture","EXT_texture_filter_anisotropic","EXT_shader_texture_lod","WEBGL_draw_buffers","EXT_frag_depth","EXT_sRGB"],C=["MAX_TEXTURE_SIZE","MAX_CUBE_MAP_TEXTURE_SIZE"];function w(y){for(var T={},x={},p=0;p<U.length;p++){var m=U[p];d(m)}for(var p=0;p<C.length;p++){var L=C[p];x[L]=y.getParameter(y[L])}this.getExtension=function(g){return g in T||d(g),T[g]},this.getParameter=function(g){return x[g]};function d(g){var A=y.getExtension(g);A||(A=y.getExtension("MOZ_"+g)),A||(A=y.getExtension("WEBKIT_"+g)),T[g]=A}}V.a=w},function(re,V,b){"use strict";var U=b(94),C={},w={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function y(f){return f=Math.round(f),f<0?0:f>255?255:f}function T(f){return f=Math.round(f),f<0?0:f>360?360:f}function x(f){return f<0?0:f>1?1:f}function p(f){return f.length&&f.charAt(f.length-1)==="%"?y(parseFloat(f)/100*255):y(parseInt(f,10))}function m(f){return f.length&&f.charAt(f.length-1)==="%"?x(parseFloat(f)/100):x(parseFloat(f))}function L(f,P,N){return N<0?N+=1:N>1&&(N-=1),N*6<1?f+(P-f)*N*6:N*2<1?P:N*3<2?f+(P-f)*(2/3-N)*6:f}function d(f,P,N){return f+(P-f)*N}function g(f,P,N,k,W){return f[0]=P,f[1]=N,f[2]=k,f[3]=W,f}function A(f,P){return f[0]=P[0],f[1]=P[1],f[2]=P[2],f[3]=P[3],f}var M=new U.a(20),O=null;function S(f,P){O&&A(O,P),O=M.put(f,O||P.slice())}C.parse=function(f,P){if(f){P=P||[];var N=M.get(f);if(N)return A(P,N);f=f+"";var k=f.replace(/ /g,"").toLowerCase();if(k in w)return A(P,w[k]),S(f,P),P;if(k.charAt(0)==="#"){if(k.length===4){var W=parseInt(k.substr(1),16);if(!(W>=0&&W<=4095)){g(P,0,0,0,1);return}return g(P,(W&3840)>>4|(W&3840)>>8,W&240|(W&240)>>4,W&15|(W&15)<<4,1),S(f,P),P}else if(k.length===7){var W=parseInt(k.substr(1),16);if(!(W>=0&&W<=16777215)){g(P,0,0,0,1);return}return g(P,(W&16711680)>>16,(W&65280)>>8,W&255,1),S(f,P),P}return}var z=k.indexOf("("),Z=k.indexOf(")");if(z!==-1&&Z+1===k.length){var J=k.substr(0,z),ee=k.substr(z+1,Z-(z+1)).split(","),$=1;switch(J){case"rgba":if(ee.length!==4){g(P,0,0,0,1);return}$=m(ee.pop());case"rgb":if(ee.length!==3){g(P,0,0,0,1);return}return g(P,p(ee[0]),p(ee[1]),p(ee[2]),$),S(f,P),P;case"hsla":if(ee.length!==4){g(P,0,0,0,1);return}return ee[3]=m(ee[3]),I(ee,P),S(f,P),P;case"hsl":if(ee.length!==3){g(P,0,0,0,1);return}return I(ee,P),S(f,P),P;default:return}}g(P,0,0,0,1)}},C.parseToFloat=function(f,P){if(P=C.parse(f,P),!!P)return P[0]/=255,P[1]/=255,P[2]/=255,P};function I(f,P){var N=(parseFloat(f[0])%360+360)%360/360,k=m(f[1]),W=m(f[2]),z=W<=.5?W*(k+1):W+k-W*k,Z=W*2-z;return P=P||[],g(P,y(L(Z,z,N+1/3)*255),y(L(Z,z,N)*255),y(L(Z,z,N-1/3)*255),1),f.length===4&&(P[3]=f[3]),P}function c(f){if(f){var P=f[0]/255,N=f[1]/255,k=f[2]/255,W=Math.min(P,N,k),z=Math.max(P,N,k),Z=z-W,J=(z+W)/2,ee,$;if(Z===0)ee=0,$=0;else{J<.5?$=Z/(z+W):$=Z/(2-z-W);var ie=((z-P)/6+Z/2)/Z,se=((z-N)/6+Z/2)/Z,ne=((z-k)/6+Z/2)/Z;P===z?ee=ne-se:N===z?ee=1/3+ie-ne:k===z&&(ee=2/3+se-ie),ee<0&&(ee+=1),ee>1&&(ee-=1)}var ce=[ee*360,$,J];return f[3]!=null&&ce.push(f[3]),ce}}C.lift=function(f,P){var N=C.parse(f);if(N){for(var k=0;k<3;k++)P<0?N[k]=N[k]*(1-P)|0:N[k]=(255-N[k])*P+N[k]|0;return C.stringify(N,N.length===4?"rgba":"rgb")}},C.toHex=function(f){var P=C.parse(f);if(P)return((1<<24)+(P[0]<<16)+(P[1]<<8)+ +P[2]).toString(16).slice(1)},C.fastLerp=function(f,P,N){if(!(!(P&&P.length)||!(f>=0&&f<=1))){N=N||[];var k=f*(P.length-1),W=Math.floor(k),z=Math.ceil(k),Z=P[W],J=P[z],ee=k-W;return N[0]=y(d(Z[0],J[0],ee)),N[1]=y(d(Z[1],J[1],ee)),N[2]=y(d(Z[2],J[2],ee)),N[3]=x(d(Z[3],J[3],ee)),N}},C.fastMapToColor=C.fastLerp,C.lerp=function(f,P,N){if(!(!(P&&P.length)||!(f>=0&&f<=1))){var k=f*(P.length-1),W=Math.floor(k),z=Math.ceil(k),Z=C.parse(P[W]),J=C.parse(P[z]),ee=k-W,$=C.stringify([y(d(Z[0],J[0],ee)),y(d(Z[1],J[1],ee)),y(d(Z[2],J[2],ee)),x(d(Z[3],J[3],ee))],"rgba");return N?{color:$,leftIndex:W,rightIndex:z,value:k}:$}},C.mapToColor=C.lerp,C.modifyHSL=function(f,P,N,k){if(f=C.parse(f),f)return f=c(f),P!=null&&(f[0]=T(P)),N!=null&&(f[1]=m(N)),k!=null&&(f[2]=m(k)),C.stringify(I(f),"rgba")},C.modifyAlpha=function(f,P){if(f=C.parse(f),f&&P!=null)return f[3]=x(P),C.stringify(f,"rgba")},C.stringify=function(f,P){if(!(!f||!f.length)){var N=f[0]+","+f[1]+","+f[2];return(P==="rgba"||P==="hsva"||P==="hsla")&&(N+=","+f[3]),P+"("+N+")"}},V.a=C},function(re,V,b){"use strict";var U=b(95),C=function(w){this._list=new U.a,this._map={},this._maxSize=w||10};C.prototype.setMaxSize=function(w){this._maxSize=w},C.prototype.put=function(w,y){if(typeof this._map[w]=="undefined"){var T=this._list.length();if(T>=this._maxSize&&T>0){var x=this._list.head;this._list.remove(x),delete this._map[x.key]}var p=this._list.insert(y);p.key=w,this._map[w]=p}},C.prototype.get=function(w){var y=this._map[w];if(typeof y!="undefined")return y!==this._list.tail&&(this._list.remove(y),this._list.insertEntry(y)),y.value},C.prototype.remove=function(w){var y=this._map[w];typeof y!="undefined"&&(delete this._map[w],this._list.remove(y))},C.prototype.clear=function(){this._list.clear(),this._map={}},V.a=C},function(re,V,b){"use strict";var U=function(){this.head=null,this.tail=null,this._length=0};U.prototype.insert=function(C){var w=new U.Entry(C);return this.insertEntry(w),w},U.prototype.insertAt=function(C,w){if(!(C<0)){for(var y=this.head,T=0;y&&T!=C;)y=y.next,T++;if(y){var x=new U.Entry(w),p=y.prev;p?(p.next=x,x.prev=p):this.head=x,x.next=y,y.prev=x}else this.insert(w)}},U.prototype.insertBeforeEntry=function(C,w){var y=new U.Entry(C),T=w.prev;T?(T.next=y,y.prev=T):this.head=y,y.next=w,w.prev=y,this._length++},U.prototype.insertEntry=function(C){this.head?(this.tail.next=C,C.prev=this.tail,this.tail=C):this.head=this.tail=C,this._length++},U.prototype.remove=function(C){var w=C.prev,y=C.next;w?w.next=y:this.head=y,y?y.prev=w:this.tail=w,C.next=C.prev=null,this._length--},U.prototype.removeAt=function(C){if(!(C<0)){for(var w=this.head,y=0;w&&y!=C;)w=w.next,y++;if(w)return this.remove(w),w.value}},U.prototype.getHead=function(){if(this.head)return this.head.value},U.prototype.getTail=function(){if(this.tail)return this.tail.value},U.prototype.getAt=function(C){if(!(C<0)){for(var w=this.head,y=0;w&&y!=C;)w=w.next,y++;return w.value}},U.prototype.indexOf=function(C){for(var w=this.head,y=0;w;){if(w.value===C)return y;w=w.next,y++}},U.prototype.length=function(){return this._length},U.prototype.isEmpty=function(){return this._length===0},U.prototype.forEach=function(C,w){for(var y=this.head,T=0,x=typeof w!="undefined";y;)x?C.call(w,y.value,T):C(y.value,T),y=y.next,T++},U.prototype.clear=function(){this.tail=this.head=null,this._length=0},U.Entry=function(C){this.value=C,this.next=null,this.prev=null},V.a=U},function(re,V,b){"use strict";var U=b(97),C=/for\s*?\(int\s*?_idx_\s*\=\s*([\w-]+)\;\s*_idx_\s*<\s*([\w-]+);\s*_idx_\s*\+\+\s*\)\s*\{\{([\s\S]+?)(?=\}\})\}\}/g;function w(m,L,d){function g(O,S,I,c){var f="";isNaN(S)&&(S in L?S=L[S]:S=A[S]),isNaN(I)&&(I in L?I=L[I]:I=A[I]);for(var P=parseInt(S);P<parseInt(I);P++)f+="{"+c.replace(/float\s*\(\s*_idx_\s*\)/g,P.toFixed(1)).replace(/_idx_/g,P)+"}";return f}var A={};for(var M in d)A[M+"_COUNT"]=d[M];return m.replace(C,g)}function y(m,L,d){var g=[];if(L)for(var A in L){var M=L[A];M>0&&g.push("#define "+A.toUpperCase()+"_COUNT "+M)}if(d)for(var O=0;O<d.length;O++){var S=d[O];g.push("#define "+S.toUpperCase()+"_ENABLED")}for(var S in m){var I=m[S];I===null?g.push("#define "+S):g.push("#define "+S+" "+I.toString())}return g.join(`
|
|
|
`)}function T(m){for(var L=[],d=0;d<m.length;d++)L.push("#extension GL_"+m[d]+" : enable");return L.join(`
|
|
|
`)}function x(m){return["precision",m,"float"].join(" ")+`;
|
|
|
`+["precision",m,"int"].join(" ")+`;
|
|
|
`+["precision",m,"sampler2D"].join(" ")+`;
|
|
|
`}function p(m){this._renderer=m,this._cache={}}p.prototype.getProgram=function(m,L,d){var g=this._cache,A="s"+L.shader.shaderID+"m"+L.programKey;d&&(A+="se"+d.getProgramKey(m.lightGroup)),m.isSkinnedMesh()&&(A+=","+m.joints.length);var Z=g[A];if(Z)return Z;var M=d?d.getLightsNumbers(m.lightGroup):{},O=this._renderer,S=O.gl,I=L.getEnabledTextures(),c="";m.isSkinnedMesh()&&(c=`
|
|
|
`+y({SKINNING:null,JOINT_COUNT:m.joints.length})+`
|
|
|
`);var f=c+y(L.vertexDefines,M,I),P=c+y(L.fragmentDefines,M,I),N=f+`
|
|
|
`+L.shader.vertex,k=T(["OES_standard_derivatives","EXT_shader_texture_lod"])+`
|
|
|
`+x(L.precision)+`
|
|
|
`+P+`
|
|
|
`+L.shader.fragment,W=w(N,L.vertexDefines,M),z=w(k,L.fragmentDefines,M),Z=new U.a;Z.uniformSemantics=L.shader.uniformSemantics,Z.attributes=L.shader.attributes;var J=Z.buildProgram(S,L.shader,W,z);return Z.__error=J,g[A]=Z,Z},V.a=p},function(re,V,b){"use strict";var U=b(18),C=b(8),w=1,y=2,T=3,x={};function p(d){for(var g=d.split(`
|
|
|
`),A=0,M=g.length;A<M;A++)g[A]=A+1+": "+g[A];return g.join(`
|
|
|
`)}function m(d,g,A){if(!d.getShaderParameter(g,d.COMPILE_STATUS))return[d.getShaderInfoLog(g),p(A)].join(`
|
|
|
`)}var L=C.a.extend({uniformSemantics:{},attributes:{}},function(){this._locations={},this._textureSlot=0,this._program=null},{bind:function(d){this._textureSlot=0,d.gl.useProgram(this._program)},hasUniform:function(d){var g=this._locations[d];return g!=null},useTextureSlot:function(d,g,A){g&&(d.gl.activeTexture(d.gl.TEXTURE0+A),g.isRenderable()?g.bind(d):g.unbind(d))},currentTextureSlot:function(){return this._textureSlot},resetTextureSlot:function(d){this._textureSlot=d||0},takeCurrentTextureSlot:function(d,g){var A=this._textureSlot;return this.useTextureSlot(d,g,A),this._textureSlot++,A},setUniform:function(d,g,A,M){var O=this._locations,S=O[A];if(S==null)return!1;switch(g){case"m4":d.uniformMatrix4fv(S,!1,M);break;case"2i":d.uniform2i(S,M[0],M[1]);break;case"2f":d.uniform2f(S,M[0],M[1]);break;case"3i":d.uniform3i(S,M[0],M[1],M[2]);break;case"3f":d.uniform3f(S,M[0],M[1],M[2]);break;case"4i":d.uniform4i(S,M[0],M[1],M[2],M[3]);break;case"4f":d.uniform4f(S,M[0],M[1],M[2],M[3]);break;case"1i":d.uniform1i(S,M);break;case"1f":d.uniform1f(S,M);break;case"1fv":d.uniform1fv(S,M);break;case"1iv":d.uniform1iv(S,M);break;case"2iv":d.uniform2iv(S,M);break;case"2fv":d.uniform2fv(S,M);break;case"3iv":d.uniform3iv(S,M);break;case"3fv":d.uniform3fv(S,M);break;case"4iv":d.uniform4iv(S,M);break;case"4fv":d.uniform4fv(S,M);break;case"m2":case"m2v":d.uniformMatrix2fv(S,!1,M);break;case"m3":case"m3v":d.uniformMatrix3fv(S,!1,M);break;case"m4v":if(Array.isArray(M)){for(var I=new U.a.Float32Array(M.length*16),c=0,f=0;f<M.length;f++)for(var P=M[f],N=0;N<16;N++)I[c++]=P[N];d.uniformMatrix4fv(S,!1,I)}else M instanceof U.a.Float32Array&&d.uniformMatrix4fv(S,!1,M);break}return!0},setUniformOfSemantic:function(d,g,A){var M=this.uniformSemantics[g];return M?this.setUniform(d,M.type,M.symbol,A):!1},enableAttributes:function(d,g,A){var M=d.gl,O=this._program,S=this._locations,I;A?I=A.__enabledAttributeList:I=x[d.__uid__],I||(A?I=A.__enabledAttributeList=[]:I=x[d.__uid__]=[]);for(var c=[],f=0;f<g.length;f++){var P=g[f];if(!this.attributes[P]){c[f]=-1;continue}var N=S[P];if(N==null){if(N=M.getAttribLocation(O,P),N===-1){c[f]=-1;continue}S[P]=N}c[f]=N,I[N]?I[N]=y:I[N]=w}for(var f=0;f<I.length;f++)switch(I[f]){case w:M.enableVertexAttribArray(f),I[f]=T;break;case y:I[f]=T;break;case T:M.disableVertexAttribArray(f),I[f]=0;break}return c},buildProgram:function(d,g,A,M){var O=d.createShader(d.VERTEX_SHADER),S=d.createProgram();d.shaderSource(O,A),d.compileShader(O);var I=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(I,M),d.compileShader(I);var c=m(d,O,A);if(c||(c=m(d,I,M),c))return c;if(d.attachShader(S,O),d.attachShader(S,I),g.attributeSemantics.POSITION)d.bindAttribLocation(S,0,g.attributeSemantics.POSITION.symbol);else{var f=Object.keys(this.attributes);d.bindAttribLocation(S,0,f[0])}if(d.linkProgram(S),!d.getProgramParameter(S,d.LINK_STATUS))return`Could not link program
|
|
|
VALIDATE_STATUS: `+d.getProgramParameter(S,d.VALIDATE_STATUS)+", gl error ["+d.getError()+"]";for(var P=0;P<g.uniforms.length;P++){var N=g.uniforms[P];this._locations[N]=d.getUniformLocation(S,N)}d.deleteShader(O),d.deleteShader(I),this._program=S,this.vertexCode=A,this.fragmentCode=M}});V.a=L},function(re,V,b){"use strict";var U=b(99),C="uniform vec3 ",w="uniform float ",y="@export clay.header.",T="@end",x=":unconfigurable;";V.a=[y+"directional_light",C+"directionalLightDirection[DIRECTIONAL_LIGHT_COUNT]"+x,C+"directionalLightColor[DIRECTIONAL_LIGHT_COUNT]"+x,T,y+"ambient_light",C+"ambientLightColor[AMBIENT_LIGHT_COUNT]"+x,T,y+"ambient_sh_light",C+"ambientSHLightColor[AMBIENT_SH_LIGHT_COUNT]"+x,C+"ambientSHLightCoefficients[AMBIENT_SH_LIGHT_COUNT * 9]"+x,U.a,T,y+"ambient_cubemap_light",C+"ambientCubemapLightColor[AMBIENT_CUBEMAP_LIGHT_COUNT]"+x,"uniform samplerCube ambientCubemapLightCubemap[AMBIENT_CUBEMAP_LIGHT_COUNT]"+x,"uniform sampler2D ambientCubemapLightBRDFLookup[AMBIENT_CUBEMAP_LIGHT_COUNT]"+x,T,y+"point_light",C+"pointLightPosition[POINT_LIGHT_COUNT]"+x,w+"pointLightRange[POINT_LIGHT_COUNT]"+x,C+"pointLightColor[POINT_LIGHT_COUNT]"+x,T,y+"spot_light",C+"spotLightPosition[SPOT_LIGHT_COUNT]"+x,C+"spotLightDirection[SPOT_LIGHT_COUNT]"+x,w+"spotLightRange[SPOT_LIGHT_COUNT]"+x,w+"spotLightUmbraAngleCosine[SPOT_LIGHT_COUNT]"+x,w+"spotLightPenumbraAngleCosine[SPOT_LIGHT_COUNT]"+x,w+"spotLightFalloffFactor[SPOT_LIGHT_COUNT]"+x,C+"spotLightColor[SPOT_LIGHT_COUNT]"+x,T].join(`
|
|
|
`)},function(re,V,b){"use strict";V.a=`vec3 calcAmbientSHLight(int idx, vec3 N) {
|
|
|
int offset = 9 * idx;
|
|
|
return ambientSHLightCoefficients[0]
|
|
|
+ ambientSHLightCoefficients[1] * N.x
|
|
|
+ ambientSHLightCoefficients[2] * N.y
|
|
|
+ ambientSHLightCoefficients[3] * N.z
|
|
|
+ ambientSHLightCoefficients[4] * N.x * N.z
|
|
|
+ ambientSHLightCoefficients[5] * N.z * N.y
|
|
|
+ ambientSHLightCoefficients[6] * N.y * N.x
|
|
|
+ ambientSHLightCoefficients[7] * (3.0 * N.z * N.z - 1.0)
|
|
|
+ ambientSHLightCoefficients[8] * (N.x * N.x - N.y * N.y);
|
|
|
}`},function(re,V,b){"use strict";var U=b(8),C=b(49),w=b(23),y=b(4),T=b(9),x=b(64),p=b(11),m=b(1),L=b.n(m),d=L.a.vec3,g=U.a.extend({scene:null,camera:null,renderer:null},function(){this._ray=new C.a,this._ndc=new w.a},{pick:function(A,M,O){var S=this.pickAll(A,M,[],O);return S[0]||null},pickAll:function(A,M,O,S){return this.renderer.screenToNDC(A,M,this._ndc),this.camera.castRay(this._ndc,this._ray),O=O||[],this._intersectNode(this.scene,O,S||!1),O.sort(this._intersectionCompareFunc),O},_intersectNode:function(A,M,O){A instanceof x.a&&A.isRenderable()&&(!A.ignorePicking||O)&&(A.mode===p.a.TRIANGLES&&A.geometry.isUseIndices()||A.geometry.pickByRay||A.geometry.pick)&&this._intersectRenderable(A,M);for(var S=0;S<A._children.length;S++)this._intersectNode(A._children[S],M,O)},_intersectRenderable:function(){var A=new y.a,M=new y.a,O=new y.a,S=new C.a,I=new T.a;return function(c,f){var P=c.isSkinnedMesh();S.copy(this._ray),T.a.invert(I,c.worldTransform),P||S.applyTransform(I);var N=c.geometry;if(!(!P&&N.boundingBox&&!S.intersectBoundingBox(N.boundingBox))){if(N.pick){N.pick(this._ndc.x,this._ndc.y,this.renderer,this.camera,c,f);return}else if(N.pickByRay){N.pickByRay(S,c,f);return}var k=c.cullFace===p.a.BACK&&c.frontFace===p.a.CCW||c.cullFace===p.a.FRONT&&c.frontFace===p.a.CW,W,z=N.indices,Z=N.attributes.position,J=N.attributes.weight,ee=N.attributes.joint,$,ie=[];if(!(!Z||!Z.value||!z)){if(P){$=c.skeleton.getSubSkinMatrices(c.__uid__,c.joints);for(var se=0;se<c.joints.length;se++){ie[se]=ie[se]||[];for(var ne=0;ne<16;ne++)ie[se][ne]=$[se*16+ne]}var ce=[],ae=[],fe=[],oe=[],pe=[],_e=N.attributes.skinnedPosition;(!_e||!_e.value)&&(N.createAttribute("skinnedPosition","f",3),_e=N.attributes.skinnedPosition,_e.init(N.vertexCount));for(var se=0;se<N.vertexCount;se++){Z.get(se,ce),J.get(se,ae),ee.get(se,fe),ae[3]=1-ae[0]-ae[1]-ae[2],d.set(oe,0,0,0);for(var ne=0;ne<4;ne++)fe[ne]>=0&&ae[ne]>1e-4&&(d.transformMat4(pe,ce,ie[fe[ne]]),d.scaleAndAdd(oe,oe,pe,ae[ne]));_e.set(se,oe)}}for(var se=0;se<z.length;se+=3){var de=z[se],be=z[se+1],Ae=z[se+2],Fe=P?N.attributes.skinnedPosition:Z;if(Fe.get(de,A.array),Fe.get(be,M.array),Fe.get(Ae,O.array),k?W=S.intersectTriangle(A,M,O,c.culling):W=S.intersectTriangle(A,O,M,c.culling),W){var Ue=new y.a;P?y.a.copy(Ue,W):y.a.transformMat4(Ue,W,c.worldTransform),f.push(new g.Intersection(W,Ue,c,[de,be,Ae],se/3,y.a.dist(Ue,this._ray.origin)))}}}}}}(),_intersectionCompareFunc:function(A,M){return A.distance-M.distance}});g.Intersection=function(A,M,O,S,I,c){this.point=A,this.pointWorld=M,this.target=O,this.triangle=S,this.triangleIndex=I,this.distance=c},V.a=g},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=["bar3D","line3D","map3D","scatter3D","surface","lines3D","scatterGL","scatter3D"];function y(p,m){if(p&&p[m]&&(p[m].normal||p[m].emphasis)){var L=p[m].normal,d=p[m].emphasis;L&&(p[m]=L),d&&(p.emphasis=p.emphasis||{},p.emphasis[m]=d)}}function T(p){y(p,"itemStyle"),y(p,"lineStyle"),y(p,"areaStyle"),y(p,"label")}function x(p){p&&(p instanceof Array||(p=[p]),C.a.util.each(p,function(m){if(m.axisLabel){var L=m.axisLabel;C.a.util.extend(L,L.textStyle),L.textStyle=null}}))}V.a=function(p){C.a.util.each(p.series,function(m){C.a.util.indexOf(w,m.type)>=0&&(T(m),m.coordinateSystem==="mapbox"&&(m.coordinateSystem="mapbox3D",p.mapbox3D=p.mapbox))}),x(p.xAxis3D),x(p.yAxis3D),x(p.zAxis3D),x(p.grid3D),y(p.geo3D)}},function(re,V,b){"use strict";function U(C){var w=new XMLHttpRequest;w.open("get",C.url),w.responseType=C.responseType||"text",C.onprogress&&(w.onprogress=function(y){if(y.lengthComputable){var T=y.loaded/y.total;C.onprogress(T,y.loaded,y.total)}else C.onprogress(null)}),w.onload=function(y){w.status>=400?C.onerror&&C.onerror():C.onload&&C.onload(w.response)},C.onerror&&(w.onerror=C.onerror),w.send(null)}V.a={get:U}},function(re,V,b){"use strict";V.a=`@export clay.basic.vertex
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform vec2 uvRepeat : [1.0, 1.0];
|
|
|
uniform vec2 uvOffset : [0.0, 0.0];
|
|
|
attribute vec2 texcoord : TEXCOORD_0;
|
|
|
attribute vec3 position : POSITION;
|
|
|
attribute vec3 barycentric;
|
|
|
@import clay.chunk.skinning_header
|
|
|
varying vec2 v_Texcoord;
|
|
|
varying vec3 v_Barycentric;
|
|
|
#ifdef VERTEX_COLOR
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
void main()
|
|
|
{
|
|
|
vec3 skinnedPosition = position;
|
|
|
#ifdef SKINNING
|
|
|
@import clay.chunk.skin_matrix
|
|
|
skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;
|
|
|
#endif
|
|
|
v_Texcoord = texcoord * uvRepeat + uvOffset;
|
|
|
v_Barycentric = barycentric;
|
|
|
gl_Position = worldViewProjection * vec4(skinnedPosition, 1.0);
|
|
|
#ifdef VERTEX_COLOR
|
|
|
v_Color = a_Color;
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.basic.fragment
|
|
|
varying vec2 v_Texcoord;
|
|
|
uniform sampler2D diffuseMap;
|
|
|
uniform vec3 color : [1.0, 1.0, 1.0];
|
|
|
uniform vec3 emission : [0.0, 0.0, 0.0];
|
|
|
uniform float alpha : 1.0;
|
|
|
#ifdef ALPHA_TEST
|
|
|
uniform float alphaCutoff: 0.9;
|
|
|
#endif
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
uniform float lineWidth : 0.0;
|
|
|
uniform vec4 lineColor : [0.0, 0.0, 0.0, 0.6];
|
|
|
varying vec3 v_Barycentric;
|
|
|
@import clay.util.edge_factor
|
|
|
@import clay.util.rgbm
|
|
|
@import clay.util.srgb
|
|
|
@import clay.util.ACES
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef RENDER_TEXCOORD
|
|
|
gl_FragColor = vec4(v_Texcoord, 1.0, 1.0);
|
|
|
return;
|
|
|
#endif
|
|
|
gl_FragColor = vec4(color, alpha);
|
|
|
#ifdef VERTEX_COLOR
|
|
|
gl_FragColor *= v_Color;
|
|
|
#endif
|
|
|
#ifdef DIFFUSEMAP_ENABLED
|
|
|
vec4 tex = decodeHDR(texture2D(diffuseMap, v_Texcoord));
|
|
|
#ifdef SRGB_DECODE
|
|
|
tex = sRGBToLinear(tex);
|
|
|
#endif
|
|
|
#if defined(DIFFUSEMAP_ALPHA_ALPHA)
|
|
|
gl_FragColor.a = tex.a;
|
|
|
#endif
|
|
|
gl_FragColor.rgb *= tex.rgb;
|
|
|
#endif
|
|
|
gl_FragColor.rgb += emission;
|
|
|
if( lineWidth > 0.)
|
|
|
{
|
|
|
gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor(lineWidth)) * lineColor.a);
|
|
|
}
|
|
|
#ifdef ALPHA_TEST
|
|
|
if (gl_FragColor.a < alphaCutoff) {
|
|
|
discard;
|
|
|
}
|
|
|
#endif
|
|
|
#ifdef TONEMAPPING
|
|
|
gl_FragColor.rgb = ACESToneMapping(gl_FragColor.rgb);
|
|
|
#endif
|
|
|
#ifdef SRGB_ENCODE
|
|
|
gl_FragColor = linearTosRGB(gl_FragColor);
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(gl_FragColor);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";var U=b(6),C=b(5),w=b(25),y=542327876,T=1,x=2,p=4,m=8,L=4096,d=131072,g=524288,A=8388608,M=8,O=4194304,S=4096,I=512,c=1024,f=2048,P=4096,N=8192,k=16384,W=32768,z=2097152,Z=1,J=2,ee=4,$=64,ie=512,se=131072;function ne(rt){return rt.charCodeAt(0)+(rt.charCodeAt(1)<<8)+(rt.charCodeAt(2)<<16)+(rt.charCodeAt(3)<<24)}function ce(rt){return String.fromCharCode(rt&255,rt>>8&255,rt>>16&255,rt>>24&255)}var ae=31,fe=ne("DXT1"),oe=ne("DXT3"),pe=ne("DXT5"),_e=0,de=1,be=2,Ae=3,Fe=4,Ue=7,it=20,tt=21,et=27,vt=28,dt=29,je=30,nt={parse:function(rt,ft){var lt=new Int32Array(rt,0,ae);if(lt[_e]!==y||!lt(it)&ee)return null;var wt=lt(tt),Re=lt[Fe],We=lt[Ae],Pe=lt[vt]&I,ke=lt[be]&d,Ze,Ie;switch(wt){case fe:Ze=8,Ie=U.a.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case oe:Ze=16,Ie=U.a.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case pe:Ze=16,Ie=U.a.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return null}var Ye=lt[de]+4,qe=Pe?6:1,ot=1;ke&&(ot=Math.max(1,lt[Ue]));for(var gt=[],pt=0;pt<qe;pt++){var Lt=Re,Tt=We;gt[pt]=new C.a({width:Lt,height:Tt,format:Ie});for(var Nt=[],jt=0;jt<ot;jt++){var zt=Math.max(4,Lt)/4*Math.max(4,Tt)/4*Ze,Ot=new Uint8Array(rt,Ye,zt);Ye+=zt,Lt*=.5,Tt*=.5,Nt[jt]=Ot}gt[pt].pixels=Nt[0],ke&&(gt[pt].mipmaps=Nt)}if(ft)ft.width=gt[0].width,ft.height=gt[0].height,ft.format=gt[0].format,ft.pixels=gt[0].pixels,ft.mipmaps=gt[0].mipmaps;else return gt[0]}};V.a=nt},function(re,V,b){"use strict";var U=b(6),C=b(5),w=String.fromCharCode,y=8,T=32767;function x(A,M,O,S){if(A[3]>0){var I=Math.pow(2,A[3]-128-8+S);M[O+0]=A[0]*I,M[O+1]=A[1]*I,M[O+2]=A[2]*I}else M[O+0]=0,M[O+1]=0,M[O+2]=0;return M[O+3]=1,M}function p(A,M,O){for(var S="",I=M;I<O;I++)S+=w(A[I]);return S}function m(A,M){M[0]=A[0],M[1]=A[1],M[2]=A[2],M[3]=A[3]}function L(A,M,O,S){for(var I=0,c=0,f=S;f>0;)if(A[c][0]=M[O++],A[c][1]=M[O++],A[c][2]=M[O++],A[c][3]=M[O++],A[c][0]===1&&A[c][1]===1&&A[c][2]===1){for(var P=A[c][3]<<I>>>0;P>0;P--)m(A[c-1],A[c]),c++,f--;I+=8}else c++,f--,I=0;return O}function d(A,M,O,S){if(S<y|S>T)return L(A,M,O,S);var I=M[O++];if(I!=2)return L(A,M,O-1,S);if(A[0][1]=M[O++],A[0][2]=M[O++],I=M[O++],(A[0][2]<<8>>>0|I)>>>0!==S)return null;for(var I=0;I<4;I++)for(var c=0;c<S;){var f=M[O++];if(f>128){f=(f&127)>>>0;for(var P=M[O++];f--;)A[c++][I]=P}else for(;f--;)A[c++][I]=M[O++]}return O}var g={parseRGBE:function(A,M,O){O==null&&(O=0);var S=new Uint8Array(A),I=S.length;if(p(S,0,2)==="#?"){for(var c=2;c<I&&!(w(S[c])===`
|
|
|
`&&w(S[c+1])===`
|
|
|
`);c++);if(!(c>=I)){c+=2;for(var f="";c<I;c++){var P=w(S[c]);if(P===`
|
|
|
`)break;f+=P}var N=f.split(" "),k=parseInt(N[1]),W=parseInt(N[3]);if(!(!W||!k)){for(var z=c+1,Z=[],J=0;J<W;J++){Z[J]=[];for(var ee=0;ee<4;ee++)Z[J][ee]=0}for(var $=new Float32Array(W*k*4),ie=0,se=0;se<k;se++){var z=d(Z,S,z,W);if(!z)return null;for(var J=0;J<W;J++)x(Z[J],$,ie,O),ie+=4}return M||(M=new C.a),M.width=W,M.height=k,M.pixels=$,M.type=U.a.FLOAT,M}}}},parseRGBEFromPNG:function(A){}};V.a=g},function(re,V,b){"use strict";var U=b(5),C=b(4),w=b(23),y=["mousedown","mouseup","mousemove","mouseover","mouseout","click","dblclick","contextmenu"];function T(p){return"_on"+p}var x=function(p){var m=this;this._texture=new U.a({anisotropic:32,flipY:!1,surface:this,dispose:function(L){m.dispose(),U.a.prototype.dispose.call(this,L)}}),y.forEach(function(L){this[T(L)]=function(d){d.triangle&&this._meshes.forEach(function(g){this.dispatchEvent(L,g,d.triangle,d.point)},this)}},this),this._meshes=[],p&&this.setECharts(p),this.onupdate=null};x.prototype={constructor:x,getTexture:function(){return this._texture},setECharts:function(p){this._chart=p;var m=p.getDom();if(!(m instanceof HTMLCanvasElement))console.error("ECharts must init on canvas if it is used as texture."),m=document.createElement("canvas");else{var L=this,d=p.getZr(),g=d.__oldRefreshImmediately||d.refreshImmediately;d.refreshImmediately=function(){g.call(this),L._texture.dirty(),L.onupdate&&L.onupdate()},d.__oldRefreshImmediately=g}this._texture.image=m,this._texture.dirty(),this.onupdate&&this.onupdate()},dispatchEvent:function(){var p=new C.a,m=new C.a,L=new C.a,d=new w.a,g=new w.a,A=new w.a,M=new w.a,O=new C.a;return function(S,I,c,f){var P=I.geometry,N=P.attributes.position,k=P.attributes.texcoord0,W=C.a.dot,z=C.a.cross;N.get(c[0],p.array),N.get(c[1],m.array),N.get(c[2],L.array),k.get(c[0],d.array),k.get(c[1],g.array),k.get(c[2],A.array),z(O,m,L);var Z=W(p,O),J=W(f,O)/Z;z(O,L,p);var ee=W(f,O)/Z;z(O,p,m);var $=W(f,O)/Z;w.a.scale(M,d,J),w.a.scaleAndAdd(M,M,g,ee),w.a.scaleAndAdd(M,M,A,$);var ie=M.x*this._chart.getWidth(),se=M.y*this._chart.getHeight();this._chart.getZr().handler.dispatch(S,{zrX:ie,zrY:se})}}(),attachToMesh:function(p){this._meshes.indexOf(p)>=0||(y.forEach(function(m){p.on(m,this[T(m)],this)},this),this._meshes.push(p))},detachFromMesh:function(p){var m=this._meshes.indexOf(p);m>=0&&this._meshes.splice(m,1),y.forEach(function(L){p.off(L,this[T(L)])},this)},dispose:function(){this._meshes.forEach(function(p){this.detachFromMesh(p)},this)}},V.a=x},function(re,V,b){"use strict";var U=b(19),C=b(108),w=U.a.extend({cubemap:null,castShadow:!1,_normalDistribution:null,_brdfLookup:null},{type:"AMBIENT_CUBEMAP_LIGHT",prefilter:function(y,T){this._brdfLookup||(this._normalDistribution=C.a.generateNormalDistribution(),this._brdfLookup=C.a.integrateBRDF(y,this._normalDistribution));var x=this.cubemap;if(!x.__prefiltered){var p=C.a.prefilterEnvironmentMap(y,x,{encodeRGBM:!0,width:T,height:T},this._normalDistribution,this._brdfLookup);this.cubemap=p.environmentMap,this.cubemap.__prefiltered=!0,x.dispose(y)}},uniformTemplates:{ambientCubemapLightColor:{type:"3f",value:function(y){var T=y.color,x=y.intensity;return[T[0]*x,T[1]*x,T[2]*x]}},ambientCubemapLightCubemap:{type:"t",value:function(y){return y.cubemap}},ambientCubemapLightBRDFLookup:{type:"t",value:function(y){return y._brdfLookup}}}});V.a=w},function(re,V,b){"use strict";var U=b(5),C=b(25),w=b(6),y=b(10),T=b(14),x=b(17),p=b(7),m=b(57),L=b(29),d=b(55),g=b(18),A=b(54),M=b(111),O=b(112),S={},I=["px","nx","py","ny","pz","nz"];S.prefilterEnvironmentMap=function(c,f,P,N,k){(!k||!N)&&(N=S.generateNormalDistribution(),k=S.integrateBRDF(c,N)),P=P||{};var W=P.width||64,z=P.height||64,Z=P.type||f.type,J=new C.a({width:W,height:z,type:Z,flipY:!1,mipmaps:[]});J.isPowerOfTwo()||console.warn("Width and height must be power of two to enable mipmap.");var ee=Math.min(W,z),$=Math.log(ee)/Math.log(2)+1,ie=new x.a({shader:new p.a({vertex:p.a.source("clay.skybox.vertex"),fragment:O.a})});ie.set("normalDistribution",N),P.encodeRGBM&&ie.define("fragment","RGBM_ENCODE"),P.decodeRGBM&&ie.define("fragment","RGBM_DECODE");var se=new L.a,ne;if(f instanceof U.a){var ce=new C.a({width:W,height:z,type:Z===w.a.FLOAT?w.a.HALF_FLOAT:Z});A.a.panoramaToCubeMap(c,f,ce,{encodeRGBM:P.decodeRGBM}),f=ce}ne=new m.a({scene:se,material:ie}),ne.material.set("environmentMap",f);var ae=new d.a({texture:J});P.encodeRGBM&&(Z=J.type=w.a.UNSIGNED_BYTE);for(var fe=new U.a({width:W,height:z,type:Z}),oe=new y.a({depthBuffer:!1}),pe=g.a[Z===w.a.UNSIGNED_BYTE?"Uint8Array":"Float32Array"],_e=0;_e<$;_e++){J.mipmaps[_e]={pixels:{}},ne.material.set("roughness",_e/(I.length-1));for(var de=fe.width,be=2*Math.atan(de/(de-.5))/Math.PI*180,Ae=0;Ae<I.length;Ae++){var Fe=new pe(fe.width*fe.height*4);oe.attach(fe),oe.bind(c);var Ue=ae.getCamera(I[Ae]);Ue.fov=be,c.render(se,Ue),c.gl.readPixels(0,0,fe.width,fe.height,w.a.RGBA,Z,Fe),oe.unbind(c),J.mipmaps[_e].pixels[I[Ae]]=Fe}fe.width/=2,fe.height/=2,fe.dirty()}return oe.dispose(c),fe.dispose(c),ne.dispose(c),N.dispose(c),{environmentMap:J,brdfLookup:k,normalDistribution:N,maxMipmapLevel:$}},S.integrateBRDF=function(c,f){f=f||S.generateNormalDistribution();var P=new y.a({depthBuffer:!1}),N=new T.a({fragment:M.a}),k=new U.a({width:512,height:256,type:w.a.HALF_FLOAT,minFilter:w.a.NEAREST,magFilter:w.a.NEAREST,useMipmap:!1});return N.setUniform("normalDistribution",f),N.setUniform("viewportSize",[512,256]),N.attachOutput(k),N.render(c,P),P.dispose(c),k},S.generateNormalDistribution=function(P,N){for(var P=P||256,N=N||1024,k=new U.a({width:P,height:N,type:w.a.FLOAT,minFilter:w.a.NEAREST,magFilter:w.a.NEAREST,useMipmap:!1}),W=new Float32Array(N*P*4),z=0;z<N;z++){var Z=z/N,J=(z<<16|z>>>16)>>>0;J=((J&1431655765)<<1|(J&2863311530)>>>1)>>>0,J=((J&858993459)<<2|(J&3435973836)>>>2)>>>0,J=((J&252645135)<<4|(J&4042322160)>>>4)>>>0,J=(((J&16711935)<<8|(J&4278255360)>>>8)>>>0)/4294967296;for(var ee=0;ee<P;ee++){var $=ee/P,ie=$*$,se=2*Math.PI*Z,ne=Math.sqrt((1-J)/(1+(ie*ie-1)*J)),ce=Math.sqrt(1-ne*ne),ae=(z*P+ee)*4;W[ae]=ce*Math.cos(se),W[ae+1]=ce*Math.sin(se),W[ae+2]=ne,W[ae+3]=1}}return k.pixels=W,k},V.a=S},function(re,V,b){"use strict";V.a=`
|
|
|
@export clay.compositor.vertex
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
attribute vec3 position : POSITION;
|
|
|
attribute vec2 texcoord : TEXCOORD_0;
|
|
|
varying vec2 v_Texcoord;
|
|
|
void main()
|
|
|
{
|
|
|
v_Texcoord = texcoord;
|
|
|
gl_Position = worldViewProjection * vec4(position, 1.0);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export clay.skybox.vertex
|
|
|
uniform mat4 world : WORLD;
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
attribute vec3 position : POSITION;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
void main()
|
|
|
{
|
|
|
v_WorldPosition = (world * vec4(position, 1.0)).xyz;
|
|
|
gl_Position = worldViewProjection * vec4(position, 1.0);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.skybox.fragment
|
|
|
uniform mat4 viewInverse : VIEWINVERSE;
|
|
|
uniform samplerCube environmentMap;
|
|
|
uniform float lod: 0.0;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
@import clay.util.rgbm
|
|
|
@import clay.util.srgb
|
|
|
@import clay.util.ACES
|
|
|
void main()
|
|
|
{
|
|
|
vec3 eyePos = viewInverse[3].xyz;
|
|
|
vec3 viewDirection = normalize(v_WorldPosition - eyePos);
|
|
|
#ifdef LOD
|
|
|
vec4 texel = decodeHDR(textureCubeLodEXT(environmentMap, viewDirection, lod));
|
|
|
#else
|
|
|
vec4 texel = decodeHDR(textureCube(environmentMap, viewDirection));
|
|
|
#endif
|
|
|
#ifdef SRGB_DECODE
|
|
|
texel = sRGBToLinear(texel);
|
|
|
#endif
|
|
|
#ifdef TONEMAPPING
|
|
|
texel.rgb = ACESToneMapping(texel.rgb);
|
|
|
#endif
|
|
|
#ifdef SRGB_ENCODE
|
|
|
texel = linearTosRGB(texel);
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(vec4(texel.rgb, 1.0));
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`#define SAMPLE_NUMBER 1024
|
|
|
#define PI 3.14159265358979
|
|
|
uniform sampler2D normalDistribution;
|
|
|
uniform vec2 viewportSize : [512, 256];
|
|
|
const vec3 N = vec3(0.0, 0.0, 1.0);
|
|
|
const float fSampleNumber = float(SAMPLE_NUMBER);
|
|
|
vec3 importanceSampleNormal(float i, float roughness, vec3 N) {
|
|
|
vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;
|
|
|
vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
|
|
|
vec3 tangentX = normalize(cross(upVector, N));
|
|
|
vec3 tangentY = cross(N, tangentX);
|
|
|
return tangentX * H.x + tangentY * H.y + N * H.z;
|
|
|
}
|
|
|
float G_Smith(float roughness, float NoV, float NoL) {
|
|
|
float k = roughness * roughness / 2.0;
|
|
|
float G1V = NoV / (NoV * (1.0 - k) + k);
|
|
|
float G1L = NoL / (NoL * (1.0 - k) + k);
|
|
|
return G1L * G1V;
|
|
|
}
|
|
|
void main() {
|
|
|
vec2 uv = gl_FragCoord.xy / viewportSize;
|
|
|
float NoV = uv.x;
|
|
|
float roughness = uv.y;
|
|
|
vec3 V;
|
|
|
V.x = sqrt(1.0 - NoV * NoV);
|
|
|
V.y = 0.0;
|
|
|
V.z = NoV;
|
|
|
float A = 0.0;
|
|
|
float B = 0.0;
|
|
|
for (int i = 0; i < SAMPLE_NUMBER; i++) {
|
|
|
vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);
|
|
|
vec3 L = reflect(-V, H);
|
|
|
float NoL = clamp(L.z, 0.0, 1.0);
|
|
|
float NoH = clamp(H.z, 0.0, 1.0);
|
|
|
float VoH = clamp(dot(V, H), 0.0, 1.0);
|
|
|
if (NoL > 0.0) {
|
|
|
float G = G_Smith(roughness, NoV, NoL);
|
|
|
float G_Vis = G * VoH / (NoH * NoV);
|
|
|
float Fc = pow(1.0 - VoH, 5.0);
|
|
|
A += (1.0 - Fc) * G_Vis;
|
|
|
B += Fc * G_Vis;
|
|
|
}
|
|
|
}
|
|
|
gl_FragColor = vec4(vec2(A, B) / fSampleNumber, 0.0, 1.0);
|
|
|
}
|
|
|
`},function(re,V,b){"use strict";V.a=`#define SAMPLE_NUMBER 1024
|
|
|
#define PI 3.14159265358979
|
|
|
uniform mat4 viewInverse : VIEWINVERSE;
|
|
|
uniform samplerCube environmentMap;
|
|
|
uniform sampler2D normalDistribution;
|
|
|
uniform float roughness : 0.5;
|
|
|
varying vec2 v_Texcoord;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
const float fSampleNumber = float(SAMPLE_NUMBER);
|
|
|
@import clay.util.rgbm
|
|
|
vec3 importanceSampleNormal(float i, float roughness, vec3 N) {
|
|
|
vec3 H = texture2D(normalDistribution, vec2(roughness, i)).rgb;
|
|
|
vec3 upVector = abs(N.z) < 0.999 ? vec3(0.0, 0.0, 1.0) : vec3(1.0, 0.0, 0.0);
|
|
|
vec3 tangentX = normalize(cross(upVector, N));
|
|
|
vec3 tangentY = cross(N, tangentX);
|
|
|
return tangentX * H.x + tangentY * H.y + N * H.z;
|
|
|
}
|
|
|
void main() {
|
|
|
vec3 eyePos = viewInverse[3].xyz;
|
|
|
vec3 V = normalize(v_WorldPosition - eyePos);
|
|
|
vec3 N = V;
|
|
|
vec3 R = V;
|
|
|
vec3 prefilteredColor = vec3(0.0);
|
|
|
float totalWeight = 0.0;
|
|
|
for (int i = 0; i < SAMPLE_NUMBER; i++) {
|
|
|
vec3 H = importanceSampleNormal(float(i) / fSampleNumber, roughness, N);
|
|
|
vec3 L = reflect(-V, H);
|
|
|
float NoL = clamp(dot(N, L), 0.0, 1.0);
|
|
|
if (NoL > 0.0) {
|
|
|
prefilteredColor += decodeHDR(textureCube(environmentMap, L)).rgb * NoL;
|
|
|
totalWeight += NoL;
|
|
|
}
|
|
|
}
|
|
|
gl_FragColor = encodeHDR(vec4(prefilteredColor / totalWeight, 1.0));
|
|
|
}
|
|
|
`},function(re,V,b){"use strict";var U=b(19),C=b(18),w=U.a.extend({castShadow:!1,coefficients:[]},function(){this._coefficientsTmpArr=new C.a.Float32Array(9*3)},{type:"AMBIENT_SH_LIGHT",uniformTemplates:{ambientSHLightColor:{type:"3f",value:function(y){var T=y.color,x=y.intensity;return[T[0]*x,T[1]*x,T[2]*x]}},ambientSHLightCoefficients:{type:"3f",value:function(y){for(var T=y._coefficientsTmpArr,x=0;x<y.coefficients.length;x++)T[x]=y.coefficients[x];return T}}}});V.a=w},function(re,V,b){"use strict";var U=b(6),C=b(10),w=b(5),y=b(14),T=b(18),x=b(57),p=b(56),m=b(55),L=b(29),d=b(1),g=b.n(d),A=b(115),M=g.a.vec3,O={},S=["px","nx","py","ny","pz","nz"];function I(N,k){var W=new w.a({width:9,height:1,type:U.a.FLOAT}),z=new y.a({fragment:A.a});z.material.define("fragment","TEXTURE_SIZE",k.width),z.setUniform("environmentMap",k);var Z=new C.a;Z.attach(W),z.render(N,Z),Z.bind(N);var J=new T.a.Float32Array(9*4);N.gl.readPixels(0,0,9,1,U.a.RGBA,U.a.FLOAT,J);for(var ee=new T.a.Float32Array(9*3),$=0;$<9;$++)ee[$*3]=J[$*4],ee[$*3+1]=J[$*4+1],ee[$*3+2]=J[$*4+2];return Z.unbind(N),Z.dispose(N),z.dispose(N),ee}function c(N,k){var W=N[0],z=N[1],Z=N[2];return k===0?1:k===1?W:k===2?z:k===3?Z:k===4?W*Z:k===5?z*Z:k===6?W*z:k===7?3*Z*Z-1:W*W-z*z}var f={px:[2,1,0,-1,-1,1],nx:[2,1,0,1,-1,-1],py:[0,2,1,1,-1,-1],ny:[0,2,1,1,1,1],pz:[0,1,2,-1,-1,-1],nz:[0,1,2,1,-1,1]};function P(N,k,W,z){for(var Z=new T.a.Float32Array(27),J=M.create(),ee=M.create(),$=M.create(),ie=0;ie<9;ie++){for(var se=M.create(),ne=0;ne<S.length;ne++){for(var ce=k[S[ne]],ae=M.create(),fe=0,oe=0,pe=f[S[ne]],_e=0;_e<z;_e++)for(var de=0;de<W;de++){J[0]=de/(W-1)*2-1,J[1]=_e/(z-1)*2-1,J[2]=-1,M.normalize(J,J),$[0]=J[pe[0]]*pe[3],$[1]=J[pe[1]]*pe[4],$[2]=J[pe[2]]*pe[5],ee[0]=ce[oe++]/255,ee[1]=ce[oe++]/255,ee[2]=ce[oe++]/255;var be=ce[oe++]/255*51.5;ee[0]*=be,ee[1]*=be,ee[2]*=be,M.scaleAndAdd(ae,ae,ee,c($,ie)*-J[2]),fe+=-J[2]}M.scaleAndAdd(se,se,ae,1/fe)}Z[ie*3]=se[0]/6,Z[ie*3+1]=se[1]/6,Z[ie*3+2]=se[2]/6}return Z}O.projectEnvironmentMap=function(N,k,W){W=W||{},W.lod=W.lod||0;var z,Z=new L.a,J=64;k instanceof w.a?z=new p.a({scene:Z,environmentMap:k}):(J=k.image&&k.image.px?k.image.px.width:k.width,z=new x.a({scene:Z,environmentMap:k}));var ee=Math.ceil(J/Math.pow(2,W.lod)),$=Math.ceil(J/Math.pow(2,W.lod)),ie=new w.a({width:ee,height:$}),se=new C.a;z.material.define("fragment","RGBM_ENCODE"),W.decodeRGBM&&z.material.define("fragment","RGBM_DECODE"),z.material.set("lod",W.lod);for(var ne=new m.a({texture:ie}),ce={},ae=0;ae<S.length;ae++){ce[S[ae]]=new Uint8Array(ee*$*4);var fe=ne.getCamera(S[ae]);fe.fov=90,se.attach(ie),se.bind(N),N.render(Z,fe),N.gl.readPixels(0,0,ee,$,U.a.RGBA,U.a.UNSIGNED_BYTE,ce[S[ae]]),se.unbind(N)}return z.dispose(N),se.dispose(N),ie.dispose(N),P(N,ce,ee,$)},V.a=O},function(re,V,b){"use strict";V.a=`uniform samplerCube environmentMap;
|
|
|
varying vec2 v_Texcoord;
|
|
|
#define TEXTURE_SIZE 16
|
|
|
mat3 front = mat3(
|
|
|
1.0, 0.0, 0.0,
|
|
|
0.0, 1.0, 0.0,
|
|
|
0.0, 0.0, 1.0
|
|
|
);
|
|
|
mat3 back = mat3(
|
|
|
-1.0, 0.0, 0.0,
|
|
|
0.0, 1.0, 0.0,
|
|
|
0.0, 0.0, -1.0
|
|
|
);
|
|
|
mat3 left = mat3(
|
|
|
0.0, 0.0, -1.0,
|
|
|
0.0, 1.0, 0.0,
|
|
|
1.0, 0.0, 0.0
|
|
|
);
|
|
|
mat3 right = mat3(
|
|
|
0.0, 0.0, 1.0,
|
|
|
0.0, 1.0, 0.0,
|
|
|
-1.0, 0.0, 0.0
|
|
|
);
|
|
|
mat3 up = mat3(
|
|
|
1.0, 0.0, 0.0,
|
|
|
0.0, 0.0, 1.0,
|
|
|
0.0, -1.0, 0.0
|
|
|
);
|
|
|
mat3 down = mat3(
|
|
|
1.0, 0.0, 0.0,
|
|
|
0.0, 0.0, -1.0,
|
|
|
0.0, 1.0, 0.0
|
|
|
);
|
|
|
float harmonics(vec3 normal){
|
|
|
int index = int(gl_FragCoord.x);
|
|
|
float x = normal.x;
|
|
|
float y = normal.y;
|
|
|
float z = normal.z;
|
|
|
if(index==0){
|
|
|
return 1.0;
|
|
|
}
|
|
|
else if(index==1){
|
|
|
return x;
|
|
|
}
|
|
|
else if(index==2){
|
|
|
return y;
|
|
|
}
|
|
|
else if(index==3){
|
|
|
return z;
|
|
|
}
|
|
|
else if(index==4){
|
|
|
return x*z;
|
|
|
}
|
|
|
else if(index==5){
|
|
|
return y*z;
|
|
|
}
|
|
|
else if(index==6){
|
|
|
return x*y;
|
|
|
}
|
|
|
else if(index==7){
|
|
|
return 3.0*z*z - 1.0;
|
|
|
}
|
|
|
else{
|
|
|
return x*x - y*y;
|
|
|
}
|
|
|
}
|
|
|
vec3 sampleSide(mat3 rot)
|
|
|
{
|
|
|
vec3 result = vec3(0.0);
|
|
|
float divider = 0.0;
|
|
|
for (int i = 0; i < TEXTURE_SIZE * TEXTURE_SIZE; i++) {
|
|
|
float x = mod(float(i), float(TEXTURE_SIZE));
|
|
|
float y = float(i / TEXTURE_SIZE);
|
|
|
vec2 sidecoord = ((vec2(x, y) + vec2(0.5, 0.5)) / vec2(TEXTURE_SIZE)) * 2.0 - 1.0;
|
|
|
vec3 normal = normalize(vec3(sidecoord, -1.0));
|
|
|
vec3 fetchNormal = rot * normal;
|
|
|
vec3 texel = textureCube(environmentMap, fetchNormal).rgb;
|
|
|
result += harmonics(fetchNormal) * texel * -normal.z;
|
|
|
divider += -normal.z;
|
|
|
}
|
|
|
return result / divider;
|
|
|
}
|
|
|
void main()
|
|
|
{
|
|
|
vec3 result = (
|
|
|
sampleSide(front) +
|
|
|
sampleSide(back) +
|
|
|
sampleSide(left) +
|
|
|
sampleSide(right) +
|
|
|
sampleSide(up) +
|
|
|
sampleSide(down)
|
|
|
) / 6.0;
|
|
|
gl_FragColor = vec4(result, 1.0);
|
|
|
}`},function(re,V,b){"use strict";var U=b(19),C=U.a.extend({castShadow:!1},{type:"AMBIENT_LIGHT",uniformTemplates:{ambientLightColor:{type:"3f",value:function(w){var y=w.color,T=w.intensity;return[y[0]*T,y[1]*T,y[2]*T]}}}});V.a=C},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.vec4,y=function(p,m,L,d){p=p||0,m=m||0,L=L||0,d=d||0,this.array=w.fromValues(p,m,L,d),this._dirty=!0};y.prototype={constructor:y,add:function(p){return w.add(this.array,this.array,p.array),this._dirty=!0,this},set:function(p,m,L,d){return this.array[0]=p,this.array[1]=m,this.array[2]=L,this.array[3]=d,this._dirty=!0,this},setArray:function(p){return this.array[0]=p[0],this.array[1]=p[1],this.array[2]=p[2],this.array[3]=p[3],this._dirty=!0,this},clone:function(){return new y(this.x,this.y,this.z,this.w)},copy:function(p){return w.copy(this.array,p.array),this._dirty=!0,this},dist:function(p){return w.dist(this.array,p.array)},distance:function(p){return w.distance(this.array,p.array)},div:function(p){return w.div(this.array,this.array,p.array),this._dirty=!0,this},divide:function(p){return w.divide(this.array,this.array,p.array),this._dirty=!0,this},dot:function(p){return w.dot(this.array,p.array)},len:function(){return w.len(this.array)},length:function(){return w.length(this.array)},lerp:function(p,m,L){return w.lerp(this.array,p.array,m.array,L),this._dirty=!0,this},min:function(p){return w.min(this.array,this.array,p.array),this._dirty=!0,this},max:function(p){return w.max(this.array,this.array,p.array),this._dirty=!0,this},mul:function(p){return w.mul(this.array,this.array,p.array),this._dirty=!0,this},multiply:function(p){return w.multiply(this.array,this.array,p.array),this._dirty=!0,this},negate:function(){return w.negate(this.array,this.array),this._dirty=!0,this},normalize:function(){return w.normalize(this.array,this.array),this._dirty=!0,this},random:function(p){return w.random(this.array,p),this._dirty=!0,this},scale:function(p){return w.scale(this.array,this.array,p),this._dirty=!0,this},scaleAndAdd:function(p,m){return w.scaleAndAdd(this.array,this.array,p.array,m),this._dirty=!0,this},sqrDist:function(p){return w.sqrDist(this.array,p.array)},squaredDistance:function(p){return w.squaredDistance(this.array,p.array)},sqrLen:function(){return w.sqrLen(this.array)},squaredLength:function(){return w.squaredLength(this.array)},sub:function(p){return w.sub(this.array,this.array,p.array),this._dirty=!0,this},subtract:function(p){return w.subtract(this.array,this.array,p.array),this._dirty=!0,this},transformMat4:function(p){return w.transformMat4(this.array,this.array,p.array),this._dirty=!0,this},transformQuat:function(p){return w.transformQuat(this.array,this.array,p.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}};var T=Object.defineProperty;if(T){var x=y.prototype;T(x,"x",{get:function(){return this.array[0]},set:function(p){this.array[0]=p,this._dirty=!0}}),T(x,"y",{get:function(){return this.array[1]},set:function(p){this.array[1]=p,this._dirty=!0}}),T(x,"z",{get:function(){return this.array[2]},set:function(p){this.array[2]=p,this._dirty=!0}}),T(x,"w",{get:function(){return this.array[3]},set:function(p){this.array[3]=p,this._dirty=!0}})}y.add=function(p,m,L){return w.add(p.array,m.array,L.array),p._dirty=!0,p},y.set=function(p,m,L,d,g){w.set(p.array,m,L,d,g),p._dirty=!0},y.copy=function(p,m){return w.copy(p.array,m.array),p._dirty=!0,p},y.dist=function(p,m){return w.distance(p.array,m.array)},y.distance=y.dist,y.div=function(p,m,L){return w.divide(p.array,m.array,L.array),p._dirty=!0,p},y.divide=y.div,y.dot=function(p,m){return w.dot(p.array,m.array)},y.len=function(p){return w.length(p.array)},y.lerp=function(p,m,L,d){return w.lerp(p.array,m.array,L.array,d),p._dirty=!0,p},y.min=function(p,m,L){return w.min(p.array,m.array,L.array),p._dirty=!0,p},y.max=function(p,m,L){return w.max(p.array,m.array,L.array),p._dirty=!0,p},y.mul=function(p,m,L){return w.multiply(p.array,m.array,L.array),p._dirty=!0,p},y.multiply=y.mul,y.negate=function(p,m){return w.negate(p.array,m.array),p._dirty=!0,p},y.normalize=function(p,m){return w.normalize(p.array,m.array),p._dirty=!0,p},y.random=function(p,m){return w.random(p.array,m),p._dirty=!0,p},y.scale=function(p,m,L){return w.scale(p.array,m.array,L),p._dirty=!0,p},y.scaleAndAdd=function(p,m,L,d){return w.scaleAndAdd(p.array,m.array,L.array,d),p._dirty=!0,p},y.sqrDist=function(p,m){return w.sqrDist(p.array,m.array)},y.squaredDistance=y.sqrDist,y.sqrLen=function(p){return w.sqrLen(p.array)},y.squaredLength=y.sqrLen,y.sub=function(p,m,L){return w.subtract(p.array,m.array,L.array),p._dirty=!0,p},y.subtract=y.sub,y.transformMat4=function(p,m,L){return w.transformMat4(p.array,m.array,L.array),p._dirty=!0,p},y.transformQuat=function(p,m,L){return w.transformQuat(p.array,m.array,L.array),p._dirty=!0,p},V.a=y},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.mat2,y=function(){this.array=w.create(),this._dirty=!0};y.prototype={constructor:y,setArray:function(T){for(var x=0;x<this.array.length;x++)this.array[x]=T[x];return this._dirty=!0,this},clone:function(){return new y().copy(this)},copy:function(T){return w.copy(this.array,T.array),this._dirty=!0,this},adjoint:function(){return w.adjoint(this.array,this.array),this._dirty=!0,this},determinant:function(){return w.determinant(this.array)},identity:function(){return w.identity(this.array),this._dirty=!0,this},invert:function(){return w.invert(this.array,this.array),this._dirty=!0,this},mul:function(T){return w.mul(this.array,this.array,T.array),this._dirty=!0,this},mulLeft:function(T){return w.mul(this.array,T.array,this.array),this._dirty=!0,this},multiply:function(T){return w.multiply(this.array,this.array,T.array),this._dirty=!0,this},multiplyLeft:function(T){return w.multiply(this.array,T.array,this.array),this._dirty=!0,this},rotate:function(T){return w.rotate(this.array,this.array,T),this._dirty=!0,this},scale:function(T){return w.scale(this.array,this.array,T.array),this._dirty=!0,this},transpose:function(){return w.transpose(this.array,this.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},y.adjoint=function(T,x){return w.adjoint(T.array,x.array),T._dirty=!0,T},y.copy=function(T,x){return w.copy(T.array,x.array),T._dirty=!0,T},y.determinant=function(T){return w.determinant(T.array)},y.identity=function(T){return w.identity(T.array),T._dirty=!0,T},y.invert=function(T,x){return w.invert(T.array,x.array),T._dirty=!0,T},y.mul=function(T,x,p){return w.mul(T.array,x.array,p.array),T._dirty=!0,T},y.multiply=y.mul,y.rotate=function(T,x,p){return w.rotate(T.array,x.array,p),T._dirty=!0,T},y.scale=function(T,x,p){return w.scale(T.array,x.array,p.array),T._dirty=!0,T},y.transpose=function(T,x){return w.transpose(T.array,x.array),T._dirty=!0,T},V.a=y},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.mat2d,y=function(){this.array=w.create(),this._dirty=!0};y.prototype={constructor:y,setArray:function(T){for(var x=0;x<this.array.length;x++)this.array[x]=T[x];return this._dirty=!0,this},clone:function(){return new y().copy(this)},copy:function(T){return w.copy(this.array,T.array),this._dirty=!0,this},determinant:function(){return w.determinant(this.array)},identity:function(){return w.identity(this.array),this._dirty=!0,this},invert:function(){return w.invert(this.array,this.array),this._dirty=!0,this},mul:function(T){return w.mul(this.array,this.array,T.array),this._dirty=!0,this},mulLeft:function(T){return w.mul(this.array,T.array,this.array),this._dirty=!0,this},multiply:function(T){return w.multiply(this.array,this.array,T.array),this._dirty=!0,this},multiplyLeft:function(T){return w.multiply(this.array,T.array,this.array),this._dirty=!0,this},rotate:function(T){return w.rotate(this.array,this.array,T),this._dirty=!0,this},scale:function(T){return w.scale(this.array,this.array,T.array),this._dirty=!0,this},translate:function(T){return w.translate(this.array,this.array,T.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},y.copy=function(T,x){return w.copy(T.array,x.array),T._dirty=!0,T},y.determinant=function(T){return w.determinant(T.array)},y.identity=function(T){return w.identity(T.array),T._dirty=!0,T},y.invert=function(T,x){return w.invert(T.array,x.array),T._dirty=!0,T},y.mul=function(T,x,p){return w.mul(T.array,x.array,p.array),T._dirty=!0,T},y.multiply=y.mul,y.rotate=function(T,x,p){return w.rotate(T.array,x.array,p),T._dirty=!0,T},y.scale=function(T,x,p){return w.scale(T.array,x.array,p.array),T._dirty=!0,T},y.translate=function(T,x,p){return w.translate(T.array,x.array,p.array),T._dirty=!0,T},V.a=y},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.mat3,y=function(){this.array=w.create(),this._dirty=!0};y.prototype={constructor:y,setArray:function(T){for(var x=0;x<this.array.length;x++)this.array[x]=T[x];return this._dirty=!0,this},adjoint:function(){return w.adjoint(this.array,this.array),this._dirty=!0,this},clone:function(){return new y().copy(this)},copy:function(T){return w.copy(this.array,T.array),this._dirty=!0,this},determinant:function(){return w.determinant(this.array)},fromMat2d:function(T){return w.fromMat2d(this.array,T.array),this._dirty=!0,this},fromMat4:function(T){return w.fromMat4(this.array,T.array),this._dirty=!0,this},fromQuat:function(T){return w.fromQuat(this.array,T.array),this._dirty=!0,this},identity:function(){return w.identity(this.array),this._dirty=!0,this},invert:function(){return w.invert(this.array,this.array),this._dirty=!0,this},mul:function(T){return w.mul(this.array,this.array,T.array),this._dirty=!0,this},mulLeft:function(T){return w.mul(this.array,T.array,this.array),this._dirty=!0,this},multiply:function(T){return w.multiply(this.array,this.array,T.array),this._dirty=!0,this},multiplyLeft:function(T){return w.multiply(this.array,T.array,this.array),this._dirty=!0,this},rotate:function(T){return w.rotate(this.array,this.array,T),this._dirty=!0,this},scale:function(T){return w.scale(this.array,this.array,T.array),this._dirty=!0,this},translate:function(T){return w.translate(this.array,this.array,T.array),this._dirty=!0,this},normalFromMat4:function(T){return w.normalFromMat4(this.array,T.array),this._dirty=!0,this},transpose:function(){return w.transpose(this.array,this.array),this._dirty=!0,this},toString:function(){return"["+Array.prototype.join.call(this.array,",")+"]"},toArray:function(){return Array.prototype.slice.call(this.array)}},y.adjoint=function(T,x){return w.adjoint(T.array,x.array),T._dirty=!0,T},y.copy=function(T,x){return w.copy(T.array,x.array),T._dirty=!0,T},y.determinant=function(T){return w.determinant(T.array)},y.identity=function(T){return w.identity(T.array),T._dirty=!0,T},y.invert=function(T,x){return w.invert(T.array,x.array),T},y.mul=function(T,x,p){return w.mul(T.array,x.array,p.array),T._dirty=!0,T},y.multiply=y.mul,y.fromMat2d=function(T,x){return w.fromMat2d(T.array,x.array),T._dirty=!0,T},y.fromMat4=function(T,x){return w.fromMat4(T.array,x.array),T._dirty=!0,T},y.fromQuat=function(T,x){return w.fromQuat(T.array,x.array),T._dirty=!0,T},y.normalFromMat4=function(T,x){return w.normalFromMat4(T.array,x.array),T._dirty=!0,T},y.rotate=function(T,x,p){return w.rotate(T.array,x.array,p),T._dirty=!0,T},y.scale=function(T,x,p){return w.scale(T.array,x.array,p.array),T._dirty=!0,T},y.transpose=function(T,x){return w.transpose(T.array,x.array),T._dirty=!0,T},y.translate=function(T,x,p){return w.translate(T.array,x.array,p.array),T._dirty=!0,T},V.a=y},function(re,V,b){"use strict";var U=b(122),C=b.n(U),w={_animators:null,getAnimators:function(){return this._animators=this._animators||[],this._animators},animate:function(y,T){this._animators=this._animators||[];var x=this,p;if(y){for(var m=y.split("."),L=x,d=0,g=m.length;d<g;d++)L&&(L=L[m[d]]);L&&(p=L)}else p=x;if(p==null)throw new Error("Target "+y+" not exists");var A=this._animators,M=new C.a(p,T),O=this;return M.during(function(){O.__zr&&O.__zr.refresh()}).done(function(){var S=A.indexOf(M);S>=0&&A.splice(S,1)}),A.push(M),this.__zr&&this.__zr.animation.addAnimator(M),M},stopAnimation:function(y){this._animators=this._animators||[];for(var T=this._animators,x=T.length,p=0;p<x;p++)T[p].stop(y);return T.length=0,this},addAnimatorsToZr:function(y){if(this._animators)for(var T=0;T<this._animators.length;T++)y.animation.addAnimator(this._animators[T])},removeAnimatorsFromZr:function(y){if(this._animators)for(var T=0;T<this._animators.length;T++)y.animation.removeAnimator(this._animators[T])}};V.a=w},function(re,V,b){var U=b(123),C=b(125),w=b(12),y=w.isArrayLike,T=Array.prototype.slice;function x(k,W){return k[W]}function p(k,W,z){k[W]=z}function m(k,W,z){return(W-k)*z+k}function L(k,W,z){return z>.5?W:k}function d(k,W,z,Z,J){var ee=k.length;if(J==1)for(var $=0;$<ee;$++)Z[$]=m(k[$],W[$],z);else for(var ie=ee&&k[0].length,$=0;$<ee;$++)for(var se=0;se<ie;se++)Z[$][se]=m(k[$][se],W[$][se],z)}function g(k,W,z){var Z=k.length,J=W.length;if(Z!==J){var ee=Z>J;if(ee)k.length=J;else for(var $=Z;$<J;$++)k.push(z===1?W[$]:T.call(W[$]))}for(var ie=k[0]&&k[0].length,$=0;$<k.length;$++)if(z===1)isNaN(k[$])&&(k[$]=W[$]);else for(var se=0;se<ie;se++)isNaN(k[$][se])&&(k[$][se]=W[$][se])}function A(k,W,z){if(k===W)return!0;var Z=k.length;if(Z!==W.length)return!1;if(z===1){for(var J=0;J<Z;J++)if(k[J]!==W[J])return!1}else for(var ee=k[0].length,J=0;J<Z;J++)for(var $=0;$<ee;$++)if(k[J][$]!==W[J][$])return!1;return!0}function M(k,W,z,Z,J,ee,$,ie,se){var ne=k.length;if(se==1)for(var ce=0;ce<ne;ce++)ie[ce]=O(k[ce],W[ce],z[ce],Z[ce],J,ee,$);else for(var ae=k[0].length,ce=0;ce<ne;ce++)for(var fe=0;fe<ae;fe++)ie[ce][fe]=O(k[ce][fe],W[ce][fe],z[ce][fe],Z[ce][fe],J,ee,$)}function O(k,W,z,Z,J,ee,$){var ie=(z-k)*.5,se=(Z-W)*.5;return(2*(W-z)+ie+se)*$+(-3*(W-z)-2*ie-se)*ee+ie*J+W}function S(k){if(y(k)){var W=k.length;if(y(k[0])){for(var z=[],Z=0;Z<W;Z++)z.push(T.call(k[Z]));return z}return T.call(k)}return k}function I(k){return k[0]=Math.floor(k[0]),k[1]=Math.floor(k[1]),k[2]=Math.floor(k[2]),"rgba("+k.join(",")+")"}function c(k){var W=k[k.length-1].value;return y(W&&W[0])?2:1}function f(k,W,z,Z,J,ee){var $=k._getter,ie=k._setter,se=W==="spline",ne=Z.length;if(ne){var ce=Z[0].value,ae=y(ce),fe=!1,oe=!1,pe=ae?c(Z):0,_e;Z.sort(function(ke,Ze){return ke.time-Ze.time}),_e=Z[ne-1].time;for(var de=[],be=[],Ae=Z[0].value,Fe=!0,Ue=0;Ue<ne;Ue++){de.push(Z[Ue].time/_e);var it=Z[Ue].value;if(ae&&A(it,Ae,pe)||!ae&&it===Ae||(Fe=!1),Ae=it,typeof it=="string"){var tt=C.parse(it);tt?(it=tt,fe=!0):oe=!0}be.push(it)}if(!(!ee&&Fe)){for(var et=be[ne-1],Ue=0;Ue<ne-1;Ue++)ae?g(be[Ue],et,pe):isNaN(be[Ue])&&!isNaN(et)&&!oe&&!fe&&(be[Ue]=et);ae&&g($(k._target,J),et,pe);var vt=0,dt=0,je,nt,rt,ft,lt,wt;if(fe)var Re=[0,0,0,0];var We=function(ke,Ze){var Ie;if(Ze<0)Ie=0;else if(Ze<dt){for(je=Math.min(vt+1,ne-1),Ie=je;Ie>=0&&!(de[Ie]<=Ze);Ie--);Ie=Math.min(Ie,ne-2)}else{for(Ie=vt;Ie<ne&&!(de[Ie]>Ze);Ie++);Ie=Math.min(Ie-1,ne-2)}vt=Ie,dt=Ze;var Ye=de[Ie+1]-de[Ie];if(Ye!==0)if(nt=(Ze-de[Ie])/Ye,se)if(ft=be[Ie],rt=be[Ie===0?Ie:Ie-1],lt=be[Ie>ne-2?ne-1:Ie+1],wt=be[Ie>ne-3?ne-1:Ie+2],ae)M(rt,ft,lt,wt,nt,nt*nt,nt*nt*nt,$(ke,J),pe);else{var qe;if(fe)qe=M(rt,ft,lt,wt,nt,nt*nt,nt*nt*nt,Re,1),qe=I(Re);else{if(oe)return L(ft,lt,nt);qe=O(rt,ft,lt,wt,nt,nt*nt,nt*nt*nt)}ie(ke,J,qe)}else if(ae)d(be[Ie],be[Ie+1],nt,$(ke,J),pe);else{var qe;if(fe)d(be[Ie],be[Ie+1],nt,Re,1),qe=I(Re);else{if(oe)return L(be[Ie],be[Ie+1],nt);qe=m(be[Ie],be[Ie+1],nt)}ie(ke,J,qe)}},Pe=new U({target:k._target,life:_e,loop:k._loop,delay:k._delay,onframe:We,ondestroy:z});return W&&W!=="spline"&&(Pe.easing=W),Pe}}}var P=function(k,W,z,Z){this._tracks={},this._target=k,this._loop=W||!1,this._getter=z||x,this._setter=Z||p,this._clipCount=0,this._delay=0,this._doneList=[],this._onframeList=[],this._clipList=[]};P.prototype={when:function(k,W){var z=this._tracks;for(var Z in W)if(W.hasOwnProperty(Z)){if(!z[Z]){z[Z]=[];var J=this._getter(this._target,Z);if(J==null)continue;k!==0&&z[Z].push({time:0,value:S(J)})}z[Z].push({time:k,value:W[Z]})}return this},during:function(k){return this._onframeList.push(k),this},pause:function(){for(var k=0;k<this._clipList.length;k++)this._clipList[k].pause();this._paused=!0},resume:function(){for(var k=0;k<this._clipList.length;k++)this._clipList[k].resume();this._paused=!1},isPaused:function(){return!!this._paused},_doneCallback:function(){this._tracks={},this._clipList.length=0;for(var k=this._doneList,W=k.length,z=0;z<W;z++)k[z].call(this)},start:function(k,W){var z=this,Z=0,J=function(){Z--,Z||z._doneCallback()},ee;for(var $ in this._tracks)if(this._tracks.hasOwnProperty($)){var ie=f(this,k,J,this._tracks[$],$,W);ie&&(this._clipList.push(ie),Z++,this.animation&&this.animation.addClip(ie),ee=ie)}if(ee){var se=ee.onframe;ee.onframe=function(ne,ce){se(ne,ce);for(var ae=0;ae<z._onframeList.length;ae++)z._onframeList[ae](ne,ce)}}return Z||this._doneCallback(),this},stop:function(k){for(var W=this._clipList,z=this.animation,Z=0;Z<W.length;Z++){var J=W[Z];k&&J.onframe(this._target,1),z&&z.removeClip(J)}W.length=0},delay:function(k){return this._delay=k,this},done:function(k){return k&&this._doneList.push(k),this},getClips:function(){return this._clipList}};var N=P;re.exports=N},function(re,V,b){var U=b(124);function C(y){this._target=y.target,this._life=y.life||1e3,this._delay=y.delay||0,this._initialized=!1,this.loop=y.loop==null?!1:y.loop,this.gap=y.gap||0,this.easing=y.easing||"Linear",this.onframe=y.onframe,this.ondestroy=y.ondestroy,this.onrestart=y.onrestart,this._pausedTime=0,this._paused=!1}C.prototype={constructor:C,step:function(y,T){if(this._initialized||(this._startTime=y+this._delay,this._initialized=!0),this._paused){this._pausedTime+=T;return}var x=(y-this._startTime-this._pausedTime)/this._life;if(!(x<0)){x=Math.min(x,1);var p=this.easing,m=typeof p=="string"?U[p]:p,L=typeof m=="function"?m(x):x;return this.fire("frame",L),x==1?this.loop?(this.restart(y),"restart"):(this._needsRemove=!0,"destroy"):null}},restart:function(y){var T=(y-this._startTime-this._pausedTime)%this._life;this._startTime=y-T+this.gap,this._pausedTime=0,this._needsRemove=!1},fire:function(y,T){y="on"+y,this[y]&&this[y](this._target,T)},pause:function(){this._paused=!0},resume:function(){this._paused=!1}};var w=C;re.exports=w},function(re,V){var b={linear:function(C){return C},quadraticIn:function(C){return C*C},quadraticOut:function(C){return C*(2-C)},quadraticInOut:function(C){return(C*=2)<1?.5*C*C:-.5*(--C*(C-2)-1)},cubicIn:function(C){return C*C*C},cubicOut:function(C){return--C*C*C+1},cubicInOut:function(C){return(C*=2)<1?.5*C*C*C:.5*((C-=2)*C*C+2)},quarticIn:function(C){return C*C*C*C},quarticOut:function(C){return 1- --C*C*C*C},quarticInOut:function(C){return(C*=2)<1?.5*C*C*C*C:-.5*((C-=2)*C*C*C-2)},quinticIn:function(C){return C*C*C*C*C},quinticOut:function(C){return--C*C*C*C*C+1},quinticInOut:function(C){return(C*=2)<1?.5*C*C*C*C*C:.5*((C-=2)*C*C*C*C+2)},sinusoidalIn:function(C){return 1-Math.cos(C*Math.PI/2)},sinusoidalOut:function(C){return Math.sin(C*Math.PI/2)},sinusoidalInOut:function(C){return .5*(1-Math.cos(Math.PI*C))},exponentialIn:function(C){return C===0?0:Math.pow(1024,C-1)},exponentialOut:function(C){return C===1?1:1-Math.pow(2,-10*C)},exponentialInOut:function(C){return C===0?0:C===1?1:(C*=2)<1?.5*Math.pow(1024,C-1):.5*(-Math.pow(2,-10*(C-1))+2)},circularIn:function(C){return 1-Math.sqrt(1-C*C)},circularOut:function(C){return Math.sqrt(1- --C*C)},circularInOut:function(C){return(C*=2)<1?-.5*(Math.sqrt(1-C*C)-1):.5*(Math.sqrt(1-(C-=2)*C)+1)},elasticIn:function(C){var w,y=.1,T=.4;return C===0?0:C===1?1:(!y||y<1?(y=1,w=T/4):w=T*Math.asin(1/y)/(2*Math.PI),-(y*Math.pow(2,10*(C-=1))*Math.sin((C-w)*(2*Math.PI)/T)))},elasticOut:function(C){var w,y=.1,T=.4;return C===0?0:C===1?1:(!y||y<1?(y=1,w=T/4):w=T*Math.asin(1/y)/(2*Math.PI),y*Math.pow(2,-10*C)*Math.sin((C-w)*(2*Math.PI)/T)+1)},elasticInOut:function(C){var w,y=.1,T=.4;return C===0?0:C===1?1:(!y||y<1?(y=1,w=T/4):w=T*Math.asin(1/y)/(2*Math.PI),(C*=2)<1?-.5*(y*Math.pow(2,10*(C-=1))*Math.sin((C-w)*(2*Math.PI)/T)):y*Math.pow(2,-10*(C-=1))*Math.sin((C-w)*(2*Math.PI)/T)*.5+1)},backIn:function(C){var w=1.70158;return C*C*((w+1)*C-w)},backOut:function(C){var w=1.70158;return--C*C*((w+1)*C+w)+1},backInOut:function(C){var w=2.5949095;return(C*=2)<1?.5*(C*C*((w+1)*C-w)):.5*((C-=2)*C*((w+1)*C+w)+2)},bounceIn:function(C){return 1-b.bounceOut(1-C)},bounceOut:function(C){return C<.36363636363636365?7.5625*C*C:C<.7272727272727273?7.5625*(C-=.5454545454545454)*C+.75:C<.9090909090909091?7.5625*(C-=.8181818181818182)*C+.9375:7.5625*(C-=.9545454545454546)*C+.984375},bounceInOut:function(C){return C<.5?b.bounceIn(C*2)*.5:b.bounceOut(C*2-1)*.5+.5}},U=b;re.exports=U},function(re,V,b){var U=b(53),C={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function w($){return $=Math.round($),$<0?0:$>255?255:$}function y($){return $=Math.round($),$<0?0:$>360?360:$}function T($){return $<0?0:$>1?1:$}function x($){return $.length&&$.charAt($.length-1)==="%"?w(parseFloat($)/100*255):w(parseInt($,10))}function p($){return $.length&&$.charAt($.length-1)==="%"?T(parseFloat($)/100):T(parseFloat($))}function m($,ie,se){return se<0?se+=1:se>1&&(se-=1),se*6<1?$+(ie-$)*se*6:se*2<1?ie:se*3<2?$+(ie-$)*(2/3-se)*6:$}function L($,ie,se){return $+(ie-$)*se}function d($,ie,se,ne,ce){return $[0]=ie,$[1]=se,$[2]=ne,$[3]=ce,$}function g($,ie){return $[0]=ie[0],$[1]=ie[1],$[2]=ie[2],$[3]=ie[3],$}var A=new U(20),M=null;function O($,ie){M&&g(M,ie),M=A.put($,M||ie.slice())}function S($,ie){if($){ie=ie||[];var se=A.get($);if(se)return g(ie,se);$=$+"";var ne=$.replace(/ /g,"").toLowerCase();if(ne in C)return g(ie,C[ne]),O($,ie),ie;if(ne.charAt(0)==="#"){if(ne.length===4){var ce=parseInt(ne.substr(1),16);if(!(ce>=0&&ce<=4095)){d(ie,0,0,0,1);return}return d(ie,(ce&3840)>>4|(ce&3840)>>8,ce&240|(ce&240)>>4,ce&15|(ce&15)<<4,1),O($,ie),ie}else if(ne.length===7){var ce=parseInt(ne.substr(1),16);if(!(ce>=0&&ce<=16777215)){d(ie,0,0,0,1);return}return d(ie,(ce&16711680)>>16,(ce&65280)>>8,ce&255,1),O($,ie),ie}return}var ae=ne.indexOf("("),fe=ne.indexOf(")");if(ae!==-1&&fe+1===ne.length){var oe=ne.substr(0,ae),pe=ne.substr(ae+1,fe-(ae+1)).split(","),_e=1;switch(oe){case"rgba":if(pe.length!==4){d(ie,0,0,0,1);return}_e=p(pe.pop());case"rgb":if(pe.length!==3){d(ie,0,0,0,1);return}return d(ie,x(pe[0]),x(pe[1]),x(pe[2]),_e),O($,ie),ie;case"hsla":if(pe.length!==4){d(ie,0,0,0,1);return}return pe[3]=p(pe[3]),I(pe,ie),O($,ie),ie;case"hsl":if(pe.length!==3){d(ie,0,0,0,1);return}return I(pe,ie),O($,ie),ie;default:return}}d(ie,0,0,0,1)}}function I($,ie){var se=(parseFloat($[0])%360+360)%360/360,ne=p($[1]),ce=p($[2]),ae=ce<=.5?ce*(ne+1):ce+ne-ce*ne,fe=ce*2-ae;return ie=ie||[],d(ie,w(m(fe,ae,se+1/3)*255),w(m(fe,ae,se)*255),w(m(fe,ae,se-1/3)*255),1),$.length===4&&(ie[3]=$[3]),ie}function c($){if($){var ie=$[0]/255,se=$[1]/255,ne=$[2]/255,ce=Math.min(ie,se,ne),ae=Math.max(ie,se,ne),fe=ae-ce,oe=(ae+ce)/2,pe,_e;if(fe===0)pe=0,_e=0;else{oe<.5?_e=fe/(ae+ce):_e=fe/(2-ae-ce);var de=((ae-ie)/6+fe/2)/fe,be=((ae-se)/6+fe/2)/fe,Ae=((ae-ne)/6+fe/2)/fe;ie===ae?pe=Ae-be:se===ae?pe=1/3+de-Ae:ne===ae&&(pe=2/3+be-de),pe<0&&(pe+=1),pe>1&&(pe-=1)}var Fe=[pe*360,_e,oe];return $[3]!=null&&Fe.push($[3]),Fe}}function f($,ie){var se=S($);if(se){for(var ne=0;ne<3;ne++)ie<0?se[ne]=se[ne]*(1-ie)|0:se[ne]=(255-se[ne])*ie+se[ne]|0;return ee(se,se.length===4?"rgba":"rgb")}}function P($){var ie=S($);if(ie)return((1<<24)+(ie[0]<<16)+(ie[1]<<8)+ +ie[2]).toString(16).slice(1)}function N($,ie,se){if(!(!(ie&&ie.length)||!($>=0&&$<=1))){se=se||[];var ne=$*(ie.length-1),ce=Math.floor(ne),ae=Math.ceil(ne),fe=ie[ce],oe=ie[ae],pe=ne-ce;return se[0]=w(L(fe[0],oe[0],pe)),se[1]=w(L(fe[1],oe[1],pe)),se[2]=w(L(fe[2],oe[2],pe)),se[3]=T(L(fe[3],oe[3],pe)),se}}var k=N;function W($,ie,se){if(!(!(ie&&ie.length)||!($>=0&&$<=1))){var ne=$*(ie.length-1),ce=Math.floor(ne),ae=Math.ceil(ne),fe=S(ie[ce]),oe=S(ie[ae]),pe=ne-ce,_e=ee([w(L(fe[0],oe[0],pe)),w(L(fe[1],oe[1],pe)),w(L(fe[2],oe[2],pe)),T(L(fe[3],oe[3],pe))],"rgba");return se?{color:_e,leftIndex:ce,rightIndex:ae,value:ne}:_e}}var z=W;function Z($,ie,se,ne){if($=S($),$)return $=c($),ie!=null&&($[0]=y(ie)),se!=null&&($[1]=p(se)),ne!=null&&($[2]=p(ne)),ee(I($),"rgba")}function J($,ie){if($=S($),$&&ie!=null)return $[3]=T(ie),ee($,"rgba")}function ee($,ie){if(!(!$||!$.length)){var se=$[0]+","+$[1]+","+$[2];return(ie==="rgba"||ie==="hsva"||ie==="hsla")&&(se+=","+$[3]),ie+"("+se+")"}}V.parse=S,V.lift=f,V.toHex=P,V.fastLerp=N,V.fastMapToColor=k,V.lerp=W,V.mapToColor=z,V.modifyHSL=Z,V.modifyAlpha=J,V.stringify=ee},function(re,V,b){"use strict";V.a=`
|
|
|
@export clay.util.rand
|
|
|
highp float rand(vec2 uv) {
|
|
|
const highp float a = 12.9898, b = 78.233, c = 43758.5453;
|
|
|
highp float dt = dot(uv.xy, vec2(a,b)), sn = mod(dt, 3.141592653589793);
|
|
|
return fract(sin(sn) * c);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.calculate_attenuation
|
|
|
uniform float attenuationFactor : 5.0;
|
|
|
float lightAttenuation(float dist, float range)
|
|
|
{
|
|
|
float attenuation = 1.0;
|
|
|
attenuation = dist*dist/(range*range+1.0);
|
|
|
float att_s = attenuationFactor;
|
|
|
attenuation = 1.0/(attenuation*att_s+1.0);
|
|
|
att_s = 1.0/(att_s+1.0);
|
|
|
attenuation = attenuation - att_s;
|
|
|
attenuation /= 1.0 - att_s;
|
|
|
return clamp(attenuation, 0.0, 1.0);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.edge_factor
|
|
|
float edgeFactor(float width)
|
|
|
{
|
|
|
vec3 d = fwidth(v_Barycentric);
|
|
|
vec3 a3 = smoothstep(vec3(0.0), d * width, v_Barycentric);
|
|
|
return min(min(a3.x, a3.y), a3.z);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.encode_float
|
|
|
vec4 encodeFloat(const in float depth)
|
|
|
{
|
|
|
const vec4 bitShifts = vec4(256.0*256.0*256.0, 256.0*256.0, 256.0, 1.0);
|
|
|
const vec4 bit_mask = vec4(0.0, 1.0/256.0, 1.0/256.0, 1.0/256.0);
|
|
|
vec4 res = fract(depth * bitShifts);
|
|
|
res -= res.xxyz * bit_mask;
|
|
|
return res;
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.decode_float
|
|
|
float decodeFloat(const in vec4 color)
|
|
|
{
|
|
|
const vec4 bitShifts = vec4(1.0/(256.0*256.0*256.0), 1.0/(256.0*256.0), 1.0/256.0, 1.0);
|
|
|
return dot(color, bitShifts);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.float
|
|
|
@import clay.util.encode_float
|
|
|
@import clay.util.decode_float
|
|
|
@end
|
|
|
@export clay.util.rgbm_decode
|
|
|
vec3 RGBMDecode(vec4 rgbm, float range) {
|
|
|
return range * rgbm.rgb * rgbm.a;
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.rgbm_encode
|
|
|
vec4 RGBMEncode(vec3 color, float range) {
|
|
|
if (dot(color, color) == 0.0) {
|
|
|
return vec4(0.0);
|
|
|
}
|
|
|
vec4 rgbm;
|
|
|
color /= range;
|
|
|
rgbm.a = clamp(max(max(color.r, color.g), max(color.b, 1e-6)), 0.0, 1.0);
|
|
|
rgbm.a = ceil(rgbm.a * 255.0) / 255.0;
|
|
|
rgbm.rgb = color / rgbm.a;
|
|
|
return rgbm;
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.rgbm
|
|
|
@import clay.util.rgbm_decode
|
|
|
@import clay.util.rgbm_encode
|
|
|
vec4 decodeHDR(vec4 color)
|
|
|
{
|
|
|
#if defined(RGBM_DECODE) || defined(RGBM)
|
|
|
return vec4(RGBMDecode(color, 51.5), 1.0);
|
|
|
#else
|
|
|
return color;
|
|
|
#endif
|
|
|
}
|
|
|
vec4 encodeHDR(vec4 color)
|
|
|
{
|
|
|
#if defined(RGBM_ENCODE) || defined(RGBM)
|
|
|
return RGBMEncode(color.xyz, 51.5);
|
|
|
#else
|
|
|
return color;
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.srgb
|
|
|
vec4 sRGBToLinear(in vec4 value) {
|
|
|
return vec4(mix(pow(value.rgb * 0.9478672986 + vec3(0.0521327014), vec3(2.4)), value.rgb * 0.0773993808, vec3(lessThanEqual(value.rgb, vec3(0.04045)))), value.w);
|
|
|
}
|
|
|
vec4 linearTosRGB(in vec4 value) {
|
|
|
return vec4(mix(pow(value.rgb, vec3(0.41666)) * 1.055 - vec3(0.055), value.rgb * 12.92, vec3(lessThanEqual(value.rgb, vec3(0.0031308)))), value.w);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.chunk.skinning_header
|
|
|
#ifdef SKINNING
|
|
|
attribute vec3 weight : WEIGHT;
|
|
|
attribute vec4 joint : JOINT;
|
|
|
uniform mat4 skinMatrix[JOINT_COUNT] : SKIN_MATRIX;
|
|
|
mat4 getSkinMatrix(float idx) {
|
|
|
return skinMatrix[int(idx)];
|
|
|
}
|
|
|
#endif
|
|
|
@end
|
|
|
@export clay.chunk.skin_matrix
|
|
|
mat4 skinMatrixWS = getSkinMatrix(joint.x) * weight.x;
|
|
|
if (weight.y > 1e-4)
|
|
|
{
|
|
|
skinMatrixWS += getSkinMatrix(joint.y) * weight.y;
|
|
|
}
|
|
|
if (weight.z > 1e-4)
|
|
|
{
|
|
|
skinMatrixWS += getSkinMatrix(joint.z) * weight.z;
|
|
|
}
|
|
|
float weightW = 1.0-weight.x-weight.y-weight.z;
|
|
|
if (weightW > 1e-4)
|
|
|
{
|
|
|
skinMatrixWS += getSkinMatrix(joint.w) * weightW;
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.parallax_correct
|
|
|
vec3 parallaxCorrect(in vec3 dir, in vec3 pos, in vec3 boxMin, in vec3 boxMax) {
|
|
|
vec3 first = (boxMax - pos) / dir;
|
|
|
vec3 second = (boxMin - pos) / dir;
|
|
|
vec3 further = max(first, second);
|
|
|
float dist = min(further.x, min(further.y, further.z));
|
|
|
vec3 fixedPos = pos + dir * dist;
|
|
|
vec3 boxCenter = (boxMax + boxMin) * 0.5;
|
|
|
return normalize(fixedPos - boxCenter);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.clamp_sample
|
|
|
vec4 clampSample(const in sampler2D texture, const in vec2 coord)
|
|
|
{
|
|
|
#ifdef STEREO
|
|
|
float eye = step(0.5, coord.x) * 0.5;
|
|
|
vec2 coordClamped = clamp(coord, vec2(eye, 0.0), vec2(0.5 + eye, 1.0));
|
|
|
#else
|
|
|
vec2 coordClamped = clamp(coord, vec2(0.0), vec2(1.0));
|
|
|
#endif
|
|
|
return texture2D(texture, coordClamped);
|
|
|
}
|
|
|
@end
|
|
|
@export clay.util.ACES
|
|
|
vec3 ACESToneMapping(vec3 color)
|
|
|
{
|
|
|
const float A = 2.51;
|
|
|
const float B = 0.03;
|
|
|
const float C = 2.43;
|
|
|
const float D = 0.59;
|
|
|
const float E = 0.14;
|
|
|
return (color * (A * color + B)) / (color * (C * color + D) + E);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`
|
|
|
@export ecgl.common.transformUniforms
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform mat4 worldInverseTranspose : WORLDINVERSETRANSPOSE;
|
|
|
uniform mat4 world : WORLD;
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.attributes
|
|
|
attribute vec3 position : POSITION;
|
|
|
attribute vec2 texcoord : TEXCOORD_0;
|
|
|
attribute vec3 normal : NORMAL;
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.uv.header
|
|
|
uniform vec2 uvRepeat : [1.0, 1.0];
|
|
|
uniform vec2 uvOffset : [0.0, 0.0];
|
|
|
uniform vec2 detailUvRepeat : [1.0, 1.0];
|
|
|
uniform vec2 detailUvOffset : [0.0, 0.0];
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
varying vec2 v_DetailTexcoord;
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.uv.main
|
|
|
v_Texcoord = texcoord * uvRepeat + uvOffset;
|
|
|
v_DetailTexcoord = texcoord * detailUvRepeat + detailUvOffset;
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.uv.fragmentHeader
|
|
|
varying vec2 v_Texcoord;
|
|
|
varying vec2 v_DetailTexcoord;
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.common.albedo.main
|
|
|
|
|
|
vec4 albedoTexel = vec4(1.0);
|
|
|
#ifdef DIFFUSEMAP_ENABLED
|
|
|
albedoTexel = texture2D(diffuseMap, v_Texcoord);
|
|
|
#ifdef SRGB_DECODE
|
|
|
albedoTexel = sRGBToLinear(albedoTexel);
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
#ifdef DETAILMAP_ENABLED
|
|
|
vec4 detailTexel = texture2D(detailMap, v_DetailTexcoord);
|
|
|
#ifdef SRGB_DECODE
|
|
|
detailTexel = sRGBToLinear(detailTexel);
|
|
|
#endif
|
|
|
albedoTexel.rgb = mix(albedoTexel.rgb, detailTexel.rgb, detailTexel.a);
|
|
|
albedoTexel.a = detailTexel.a + (1.0 - detailTexel.a) * albedoTexel.a;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.wireframe.vertexHeader
|
|
|
|
|
|
#ifdef WIREFRAME_QUAD
|
|
|
attribute vec4 barycentric;
|
|
|
varying vec4 v_Barycentric;
|
|
|
#elif defined(WIREFRAME_TRIANGLE)
|
|
|
attribute vec3 barycentric;
|
|
|
varying vec3 v_Barycentric;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.wireframe.vertexMain
|
|
|
|
|
|
#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)
|
|
|
v_Barycentric = barycentric;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
uniform float wireframeLineWidth : 1;
|
|
|
uniform vec4 wireframeLineColor: [0, 0, 0, 0.5];
|
|
|
|
|
|
#ifdef WIREFRAME_QUAD
|
|
|
varying vec4 v_Barycentric;
|
|
|
float edgeFactor () {
|
|
|
vec4 d = fwidth(v_Barycentric);
|
|
|
vec4 a4 = smoothstep(vec4(0.0), d * wireframeLineWidth, v_Barycentric);
|
|
|
return min(min(min(a4.x, a4.y), a4.z), a4.w);
|
|
|
}
|
|
|
#elif defined(WIREFRAME_TRIANGLE)
|
|
|
varying vec3 v_Barycentric;
|
|
|
float edgeFactor () {
|
|
|
vec3 d = fwidth(v_Barycentric);
|
|
|
vec3 a3 = smoothstep(vec3(0.0), d * wireframeLineWidth, v_Barycentric);
|
|
|
return min(min(a3.x, a3.y), a3.z);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.common.wireframe.fragmentMain
|
|
|
|
|
|
#if defined(WIREFRAME_QUAD) || defined(WIREFRAME_TRIANGLE)
|
|
|
if (wireframeLineWidth > 0.) {
|
|
|
vec4 lineColor = wireframeLineColor;
|
|
|
#ifdef SRGB_DECODE
|
|
|
lineColor = sRGBToLinear(lineColor);
|
|
|
#endif
|
|
|
|
|
|
gl_FragColor.rgb = mix(gl_FragColor.rgb, lineColor.rgb, (1.0 - edgeFactor()) * lineColor.a);
|
|
|
}
|
|
|
#endif
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.common.bumpMap.header
|
|
|
|
|
|
#ifdef BUMPMAP_ENABLED
|
|
|
uniform sampler2D bumpMap;
|
|
|
uniform float bumpScale : 1.0;
|
|
|
|
|
|
|
|
|
vec3 bumpNormal(vec3 surfPos, vec3 surfNormal, vec3 baseNormal)
|
|
|
{
|
|
|
vec2 dSTdx = dFdx(v_Texcoord);
|
|
|
vec2 dSTdy = dFdy(v_Texcoord);
|
|
|
|
|
|
float Hll = bumpScale * texture2D(bumpMap, v_Texcoord).x;
|
|
|
float dHx = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdx).x - Hll;
|
|
|
float dHy = bumpScale * texture2D(bumpMap, v_Texcoord + dSTdy).x - Hll;
|
|
|
|
|
|
vec3 vSigmaX = dFdx(surfPos);
|
|
|
vec3 vSigmaY = dFdy(surfPos);
|
|
|
vec3 vN = surfNormal;
|
|
|
|
|
|
vec3 R1 = cross(vSigmaY, vN);
|
|
|
vec3 R2 = cross(vN, vSigmaX);
|
|
|
|
|
|
float fDet = dot(vSigmaX, R1);
|
|
|
|
|
|
vec3 vGrad = sign(fDet) * (dHx * R1 + dHy * R2);
|
|
|
return normalize(abs(fDet) * baseNormal - vGrad);
|
|
|
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.normalMap.vertexHeader
|
|
|
|
|
|
#ifdef NORMALMAP_ENABLED
|
|
|
attribute vec4 tangent : TANGENT;
|
|
|
varying vec3 v_Tangent;
|
|
|
varying vec3 v_Bitangent;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.normalMap.vertexMain
|
|
|
|
|
|
#ifdef NORMALMAP_ENABLED
|
|
|
if (dot(tangent, tangent) > 0.0) {
|
|
|
v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);
|
|
|
v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.common.normalMap.fragmentHeader
|
|
|
|
|
|
#ifdef NORMALMAP_ENABLED
|
|
|
uniform sampler2D normalMap;
|
|
|
varying vec3 v_Tangent;
|
|
|
varying vec3 v_Bitangent;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.normalMap.fragmentMain
|
|
|
#ifdef NORMALMAP_ENABLED
|
|
|
if (dot(v_Tangent, v_Tangent) > 0.0) {
|
|
|
vec3 normalTexel = texture2D(normalMap, v_DetailTexcoord).xyz;
|
|
|
if (dot(normalTexel, normalTexel) > 0.0) { N = normalTexel * 2.0 - 1.0;
|
|
|
mat3 tbn = mat3(v_Tangent, v_Bitangent, v_Normal);
|
|
|
N = normalize(tbn * N);
|
|
|
}
|
|
|
}
|
|
|
#endif
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.common.vertexAnimation.header
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
attribute vec3 prevPosition;
|
|
|
attribute vec3 prevNormal;
|
|
|
uniform float percent;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.vertexAnimation.main
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
vec3 pos = mix(prevPosition, position, percent);
|
|
|
vec3 norm = mix(prevNormal, normal, percent);
|
|
|
#else
|
|
|
vec3 pos = position;
|
|
|
vec3 norm = normal;
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.common.ssaoMap.header
|
|
|
#ifdef SSAOMAP_ENABLED
|
|
|
uniform sampler2D ssaoMap;
|
|
|
uniform vec4 viewport : VIEWPORT;
|
|
|
#endif
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.ssaoMap.main
|
|
|
float ao = 1.0;
|
|
|
#ifdef SSAOMAP_ENABLED
|
|
|
ao = texture2D(ssaoMap, (gl_FragCoord.xy - viewport.xy) / viewport.zw).r;
|
|
|
#endif
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.common.diffuseLayer.header
|
|
|
|
|
|
#if (LAYER_DIFFUSEMAP_COUNT > 0)
|
|
|
uniform float layerDiffuseIntensity[LAYER_DIFFUSEMAP_COUNT];
|
|
|
uniform sampler2D layerDiffuseMap[LAYER_DIFFUSEMAP_COUNT];
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.emissiveLayer.header
|
|
|
|
|
|
#if (LAYER_EMISSIVEMAP_COUNT > 0)
|
|
|
uniform float layerEmissionIntensity[LAYER_EMISSIVEMAP_COUNT];
|
|
|
uniform sampler2D layerEmissiveMap[LAYER_EMISSIVEMAP_COUNT];
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.layers.header
|
|
|
@import ecgl.common.diffuseLayer.header
|
|
|
@import ecgl.common.emissiveLayer.header
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.diffuseLayer.main
|
|
|
|
|
|
#if (LAYER_DIFFUSEMAP_COUNT > 0)
|
|
|
for (int _idx_ = 0; _idx_ < LAYER_DIFFUSEMAP_COUNT; _idx_++) {{
|
|
|
float intensity = layerDiffuseIntensity[_idx_];
|
|
|
vec4 texel2 = texture2D(layerDiffuseMap[_idx_], v_Texcoord);
|
|
|
#ifdef SRGB_DECODE
|
|
|
texel2 = sRGBToLinear(texel2);
|
|
|
#endif
|
|
|
albedoTexel.rgb = mix(albedoTexel.rgb, texel2.rgb * intensity, texel2.a);
|
|
|
albedoTexel.a = texel2.a + (1.0 - texel2.a) * albedoTexel.a;
|
|
|
}}
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.common.emissiveLayer.main
|
|
|
|
|
|
#if (LAYER_EMISSIVEMAP_COUNT > 0)
|
|
|
for (int _idx_ = 0; _idx_ < LAYER_EMISSIVEMAP_COUNT; _idx_++)
|
|
|
{{
|
|
|
vec4 texel2 = texture2D(layerEmissiveMap[_idx_], v_Texcoord) * layerEmissionIntensity[_idx_];
|
|
|
#ifdef SRGB_DECODE
|
|
|
texel2 = sRGBToLinear(texel2);
|
|
|
#endif
|
|
|
float intensity = layerEmissionIntensity[_idx_];
|
|
|
gl_FragColor.rgb += texel2.rgb * texel2.a * intensity;
|
|
|
}}
|
|
|
#endif
|
|
|
|
|
|
@end
|
|
|
`},function(re,V,b){"use strict";V.a=`@export ecgl.color.vertex
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
@import ecgl.common.uv.header
|
|
|
|
|
|
attribute vec2 texcoord : TEXCOORD_0;
|
|
|
attribute vec3 position: POSITION;
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexHeader
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
attribute vec3 prevPosition;
|
|
|
uniform float percent : 1.0;
|
|
|
#endif
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
vec3 pos = mix(prevPosition, position, percent);
|
|
|
#else
|
|
|
vec3 pos = position;
|
|
|
#endif
|
|
|
|
|
|
gl_Position = worldViewProjection * vec4(pos, 1.0);
|
|
|
|
|
|
@import ecgl.common.uv.main
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
v_Color = a_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexMain
|
|
|
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.color.fragment
|
|
|
|
|
|
#define LAYER_DIFFUSEMAP_COUNT 0
|
|
|
#define LAYER_EMISSIVEMAP_COUNT 0
|
|
|
|
|
|
uniform sampler2D diffuseMap;
|
|
|
uniform sampler2D detailMap;
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.layers.header
|
|
|
|
|
|
@import ecgl.common.uv.fragmentHeader
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor = sRGBToLinear(color);
|
|
|
#else
|
|
|
gl_FragColor = color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
gl_FragColor *= v_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.albedo.main
|
|
|
|
|
|
@import ecgl.common.diffuseLayer.main
|
|
|
|
|
|
gl_FragColor *= albedoTexel;
|
|
|
|
|
|
@import ecgl.common.emissiveLayer.main
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentMain
|
|
|
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`/**
|
|
|
* http: */
|
|
|
|
|
|
@export ecgl.lambert.vertex
|
|
|
|
|
|
@import ecgl.common.transformUniforms
|
|
|
|
|
|
@import ecgl.common.uv.header
|
|
|
|
|
|
|
|
|
@import ecgl.common.attributes
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexHeader
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@import ecgl.common.vertexAnimation.header
|
|
|
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
@import ecgl.common.uv.main
|
|
|
|
|
|
@import ecgl.common.vertexAnimation.main
|
|
|
|
|
|
|
|
|
gl_Position = worldViewProjection * vec4(pos, 1.0);
|
|
|
|
|
|
v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);
|
|
|
v_WorldPosition = (world * vec4(pos, 1.0)).xyz;
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
v_Color = a_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexMain
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.lambert.fragment
|
|
|
|
|
|
#define LAYER_DIFFUSEMAP_COUNT 0
|
|
|
#define LAYER_EMISSIVEMAP_COUNT 0
|
|
|
|
|
|
#define NORMAL_UP_AXIS 1
|
|
|
#define NORMAL_FRONT_AXIS 2
|
|
|
|
|
|
@import ecgl.common.uv.fragmentHeader
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
uniform sampler2D diffuseMap;
|
|
|
uniform sampler2D detailMap;
|
|
|
|
|
|
@import ecgl.common.layers.header
|
|
|
|
|
|
uniform float emissionIntensity: 1.0;
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
uniform mat4 viewInverse : VIEWINVERSE;
|
|
|
|
|
|
#ifdef AMBIENT_LIGHT_COUNT
|
|
|
@import clay.header.ambient_light
|
|
|
#endif
|
|
|
#ifdef AMBIENT_SH_LIGHT_COUNT
|
|
|
@import clay.header.ambient_sh_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
@import clay.header.directional_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@import ecgl.common.ssaoMap.header
|
|
|
|
|
|
@import ecgl.common.bumpMap.header
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
@import clay.plugin.compute_shadow_map
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor = sRGBToLinear(color);
|
|
|
#else
|
|
|
gl_FragColor = color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor *= sRGBToLinear(v_Color);
|
|
|
#else
|
|
|
gl_FragColor *= v_Color;
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.albedo.main
|
|
|
|
|
|
@import ecgl.common.diffuseLayer.main
|
|
|
|
|
|
gl_FragColor *= albedoTexel;
|
|
|
|
|
|
vec3 N = v_Normal;
|
|
|
#ifdef DOUBLE_SIDED
|
|
|
vec3 eyePos = viewInverse[3].xyz;
|
|
|
vec3 V = normalize(eyePos - v_WorldPosition);
|
|
|
|
|
|
if (dot(N, V) < 0.0) {
|
|
|
N = -N;
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
float ambientFactor = 1.0;
|
|
|
|
|
|
#ifdef BUMPMAP_ENABLED
|
|
|
N = bumpNormal(v_WorldPosition, v_Normal, N);
|
|
|
ambientFactor = dot(v_Normal, N);
|
|
|
#endif
|
|
|
|
|
|
vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);
|
|
|
|
|
|
vec3 diffuseColor = vec3(0.0, 0.0, 0.0);
|
|
|
|
|
|
@import ecgl.common.ssaoMap.main
|
|
|
|
|
|
#ifdef AMBIENT_LIGHT_COUNT
|
|
|
for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)
|
|
|
{
|
|
|
diffuseColor += ambientLightColor[i] * ambientFactor * ao;
|
|
|
}
|
|
|
#endif
|
|
|
#ifdef AMBIENT_SH_LIGHT_COUNT
|
|
|
for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)
|
|
|
{{
|
|
|
diffuseColor += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;
|
|
|
}}
|
|
|
#endif
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];
|
|
|
if(shadowEnabled)
|
|
|
{
|
|
|
computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);
|
|
|
}
|
|
|
#endif
|
|
|
for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)
|
|
|
{
|
|
|
vec3 lightDirection = -directionalLightDirection[i];
|
|
|
vec3 lightColor = directionalLightColor[i];
|
|
|
|
|
|
float shadowContrib = 1.0;
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
if (shadowEnabled)
|
|
|
{
|
|
|
shadowContrib = shadowContribsDir[i];
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
float ndl = dot(N, normalize(lightDirection)) * shadowContrib;
|
|
|
|
|
|
diffuseColor += lightColor * clamp(ndl, 0.0, 1.0);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
gl_FragColor.rgb *= diffuseColor;
|
|
|
|
|
|
@import ecgl.common.emissiveLayer.main
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentMain
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export ecgl.realistic.vertex
|
|
|
|
|
|
@import ecgl.common.transformUniforms
|
|
|
|
|
|
@import ecgl.common.uv.header
|
|
|
|
|
|
@import ecgl.common.attributes
|
|
|
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexHeader
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef NORMALMAP_ENABLED
|
|
|
attribute vec4 tangent : TANGENT;
|
|
|
varying vec3 v_Tangent;
|
|
|
varying vec3 v_Bitangent;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.vertexAnimation.header
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
|
|
|
@import ecgl.common.uv.main
|
|
|
|
|
|
@import ecgl.common.vertexAnimation.main
|
|
|
|
|
|
gl_Position = worldViewProjection * vec4(pos, 1.0);
|
|
|
|
|
|
v_Normal = normalize((worldInverseTranspose * vec4(norm, 0.0)).xyz);
|
|
|
v_WorldPosition = (world * vec4(pos, 1.0)).xyz;
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
v_Color = a_Color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef NORMALMAP_ENABLED
|
|
|
v_Tangent = normalize((worldInverseTranspose * vec4(tangent.xyz, 0.0)).xyz);
|
|
|
v_Bitangent = normalize(cross(v_Normal, v_Tangent) * tangent.w);
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexMain
|
|
|
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.realistic.fragment
|
|
|
|
|
|
#define LAYER_DIFFUSEMAP_COUNT 0
|
|
|
#define LAYER_EMISSIVEMAP_COUNT 0
|
|
|
#define PI 3.14159265358979
|
|
|
#define ROUGHNESS_CHANEL 0
|
|
|
#define METALNESS_CHANEL 1
|
|
|
|
|
|
#define NORMAL_UP_AXIS 1
|
|
|
#define NORMAL_FRONT_AXIS 2
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.uv.fragmentHeader
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
uniform sampler2D diffuseMap;
|
|
|
|
|
|
uniform sampler2D detailMap;
|
|
|
uniform sampler2D metalnessMap;
|
|
|
uniform sampler2D roughnessMap;
|
|
|
|
|
|
@import ecgl.common.layers.header
|
|
|
|
|
|
uniform float emissionIntensity: 1.0;
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
uniform float metalness : 0.0;
|
|
|
uniform float roughness : 0.5;
|
|
|
|
|
|
uniform mat4 viewInverse : VIEWINVERSE;
|
|
|
|
|
|
#ifdef AMBIENT_LIGHT_COUNT
|
|
|
@import clay.header.ambient_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef AMBIENT_SH_LIGHT_COUNT
|
|
|
@import clay.header.ambient_sh_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT
|
|
|
@import clay.header.ambient_cubemap_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
@import clay.header.directional_light
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.normalMap.fragmentHeader
|
|
|
|
|
|
@import ecgl.common.ssaoMap.header
|
|
|
|
|
|
@import ecgl.common.bumpMap.header
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
@import clay.util.rgbm
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
@import clay.plugin.compute_shadow_map
|
|
|
|
|
|
vec3 F_Schlick(float ndv, vec3 spec) {
|
|
|
return spec + (1.0 - spec) * pow(1.0 - ndv, 5.0);
|
|
|
}
|
|
|
|
|
|
float D_Phong(float g, float ndh) {
|
|
|
float a = pow(8192.0, g);
|
|
|
return (a + 2.0) / 8.0 * pow(ndh, a);
|
|
|
}
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 albedoColor = color;
|
|
|
|
|
|
vec3 eyePos = viewInverse[3].xyz;
|
|
|
vec3 V = normalize(eyePos - v_WorldPosition);
|
|
|
#ifdef VERTEX_COLOR
|
|
|
#ifdef SRGB_DECODE
|
|
|
albedoColor *= sRGBToLinear(v_Color);
|
|
|
#else
|
|
|
albedoColor *= v_Color;
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.albedo.main
|
|
|
|
|
|
@import ecgl.common.diffuseLayer.main
|
|
|
|
|
|
albedoColor *= albedoTexel;
|
|
|
|
|
|
float m = metalness;
|
|
|
|
|
|
#ifdef METALNESSMAP_ENABLED
|
|
|
float m2 = texture2D(metalnessMap, v_DetailTexcoord)[METALNESS_CHANEL];
|
|
|
m = clamp(m2 + (m - 0.5) * 2.0, 0.0, 1.0);
|
|
|
#endif
|
|
|
|
|
|
vec3 baseColor = albedoColor.rgb;
|
|
|
albedoColor.rgb = baseColor * (1.0 - m);
|
|
|
vec3 specFactor = mix(vec3(0.04), baseColor, m);
|
|
|
|
|
|
float g = 1.0 - roughness;
|
|
|
|
|
|
#ifdef ROUGHNESSMAP_ENABLED
|
|
|
float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];
|
|
|
g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);
|
|
|
#endif
|
|
|
|
|
|
vec3 N = v_Normal;
|
|
|
|
|
|
#ifdef DOUBLE_SIDED
|
|
|
if (dot(N, V) < 0.0) {
|
|
|
N = -N;
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
float ambientFactor = 1.0;
|
|
|
|
|
|
#ifdef BUMPMAP_ENABLED
|
|
|
N = bumpNormal(v_WorldPosition, v_Normal, N);
|
|
|
ambientFactor = dot(v_Normal, N);
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.normalMap.fragmentMain
|
|
|
|
|
|
vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);
|
|
|
|
|
|
vec3 diffuseTerm = vec3(0.0);
|
|
|
vec3 specularTerm = vec3(0.0);
|
|
|
|
|
|
float ndv = clamp(dot(N, V), 0.0, 1.0);
|
|
|
vec3 fresnelTerm = F_Schlick(ndv, specFactor);
|
|
|
|
|
|
@import ecgl.common.ssaoMap.main
|
|
|
|
|
|
#ifdef AMBIENT_LIGHT_COUNT
|
|
|
for(int _idx_ = 0; _idx_ < AMBIENT_LIGHT_COUNT; _idx_++)
|
|
|
{{
|
|
|
diffuseTerm += ambientLightColor[_idx_] * ambientFactor * ao;
|
|
|
}}
|
|
|
#endif
|
|
|
|
|
|
#ifdef AMBIENT_SH_LIGHT_COUNT
|
|
|
for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)
|
|
|
{{
|
|
|
diffuseTerm += calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_] * ao;
|
|
|
}}
|
|
|
#endif
|
|
|
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];
|
|
|
if(shadowEnabled)
|
|
|
{
|
|
|
computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);
|
|
|
}
|
|
|
#endif
|
|
|
for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++)
|
|
|
{{
|
|
|
vec3 L = -directionalLightDirection[_idx_];
|
|
|
vec3 lc = directionalLightColor[_idx_];
|
|
|
|
|
|
vec3 H = normalize(L + V);
|
|
|
float ndl = clamp(dot(N, normalize(L)), 0.0, 1.0);
|
|
|
float ndh = clamp(dot(N, H), 0.0, 1.0);
|
|
|
|
|
|
float shadowContrib = 1.0;
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
if (shadowEnabled)
|
|
|
{
|
|
|
shadowContrib = shadowContribsDir[_idx_];
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
vec3 li = lc * ndl * shadowContrib;
|
|
|
|
|
|
diffuseTerm += li;
|
|
|
specularTerm += li * fresnelTerm * D_Phong(g, ndh);
|
|
|
}}
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#ifdef AMBIENT_CUBEMAP_LIGHT_COUNT
|
|
|
vec3 L = reflect(-V, N);
|
|
|
L = vec3(L.x, L[NORMAL_UP_AXIS], L[NORMAL_FRONT_AXIS]);
|
|
|
float rough2 = clamp(1.0 - g, 0.0, 1.0);
|
|
|
float bias2 = rough2 * 5.0;
|
|
|
vec2 brdfParam2 = texture2D(ambientCubemapLightBRDFLookup[0], vec2(rough2, ndv)).xy;
|
|
|
vec3 envWeight2 = specFactor * brdfParam2.x + brdfParam2.y;
|
|
|
vec3 envTexel2;
|
|
|
for(int _idx_ = 0; _idx_ < AMBIENT_CUBEMAP_LIGHT_COUNT; _idx_++)
|
|
|
{{
|
|
|
envTexel2 = RGBMDecode(textureCubeLodEXT(ambientCubemapLightCubemap[_idx_], L, bias2), 51.5);
|
|
|
specularTerm += ambientCubemapLightColor[_idx_] * envTexel2 * envWeight2 * ao;
|
|
|
}}
|
|
|
#endif
|
|
|
|
|
|
gl_FragColor.rgb = albedoColor.rgb * diffuseTerm + specularTerm;
|
|
|
gl_FragColor.a = albedoColor.a;
|
|
|
|
|
|
#ifdef SRGB_ENCODE
|
|
|
gl_FragColor = linearTosRGB(gl_FragColor);
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.emissiveLayer.main
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentMain
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export ecgl.hatching.vertex
|
|
|
|
|
|
@import ecgl.realistic.vertex
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.hatching.fragment
|
|
|
|
|
|
#define NORMAL_UP_AXIS 1
|
|
|
#define NORMAL_FRONT_AXIS 2
|
|
|
|
|
|
@import ecgl.common.uv.fragmentHeader
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
uniform vec4 color : [0.0, 0.0, 0.0, 1.0];
|
|
|
uniform vec4 paperColor : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
uniform mat4 viewInverse : VIEWINVERSE;
|
|
|
|
|
|
#ifdef AMBIENT_LIGHT_COUNT
|
|
|
@import clay.header.ambient_light
|
|
|
#endif
|
|
|
#ifdef AMBIENT_SH_LIGHT_COUNT
|
|
|
@import clay.header.ambient_sh_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
@import clay.header.directional_light
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
|
|
|
@import ecgl.common.ssaoMap.header
|
|
|
|
|
|
@import ecgl.common.bumpMap.header
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
@import clay.plugin.compute_shadow_map
|
|
|
|
|
|
uniform sampler2D hatch1;
|
|
|
uniform sampler2D hatch2;
|
|
|
uniform sampler2D hatch3;
|
|
|
uniform sampler2D hatch4;
|
|
|
uniform sampler2D hatch5;
|
|
|
uniform sampler2D hatch6;
|
|
|
|
|
|
float shade(in float tone) {
|
|
|
vec4 c = vec4(1. ,1., 1., 1.);
|
|
|
float step = 1. / 6.;
|
|
|
vec2 uv = v_DetailTexcoord;
|
|
|
if (tone <= step / 2.0) {
|
|
|
c = mix(vec4(0.), texture2D(hatch6, uv), 12. * tone);
|
|
|
}
|
|
|
else if (tone <= step) {
|
|
|
c = mix(texture2D(hatch6, uv), texture2D(hatch5, uv), 6. * tone);
|
|
|
}
|
|
|
if(tone > step && tone <= 2. * step){
|
|
|
c = mix(texture2D(hatch5, uv), texture2D(hatch4, uv) , 6. * (tone - step));
|
|
|
}
|
|
|
if(tone > 2. * step && tone <= 3. * step){
|
|
|
c = mix(texture2D(hatch4, uv), texture2D(hatch3, uv), 6. * (tone - 2. * step));
|
|
|
}
|
|
|
if(tone > 3. * step && tone <= 4. * step){
|
|
|
c = mix(texture2D(hatch3, uv), texture2D(hatch2, uv), 6. * (tone - 3. * step));
|
|
|
}
|
|
|
if(tone > 4. * step && tone <= 5. * step){
|
|
|
c = mix(texture2D(hatch2, uv), texture2D(hatch1, uv), 6. * (tone - 4. * step));
|
|
|
}
|
|
|
if(tone > 5. * step){
|
|
|
c = mix(texture2D(hatch1, uv), vec4(1.), 6. * (tone - 5. * step));
|
|
|
}
|
|
|
|
|
|
return c.r;
|
|
|
}
|
|
|
|
|
|
const vec3 w = vec3(0.2125, 0.7154, 0.0721);
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef SRGB_DECODE
|
|
|
vec4 inkColor = sRGBToLinear(color);
|
|
|
#else
|
|
|
vec4 inkColor = color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
#ifdef SRGB_DECODE
|
|
|
inkColor *= sRGBToLinear(v_Color);
|
|
|
#else
|
|
|
inkColor *= v_Color;
|
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
vec3 N = v_Normal;
|
|
|
#ifdef DOUBLE_SIDED
|
|
|
vec3 eyePos = viewInverse[3].xyz;
|
|
|
vec3 V = normalize(eyePos - v_WorldPosition);
|
|
|
|
|
|
if (dot(N, V) < 0.0) {
|
|
|
N = -N;
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
float tone = 0.0;
|
|
|
|
|
|
float ambientFactor = 1.0;
|
|
|
|
|
|
#ifdef BUMPMAP_ENABLED
|
|
|
N = bumpNormal(v_WorldPosition, v_Normal, N);
|
|
|
ambientFactor = dot(v_Normal, N);
|
|
|
#endif
|
|
|
|
|
|
vec3 N2 = vec3(N.x, N[NORMAL_UP_AXIS], N[NORMAL_FRONT_AXIS]);
|
|
|
|
|
|
@import ecgl.common.ssaoMap.main
|
|
|
|
|
|
#ifdef AMBIENT_LIGHT_COUNT
|
|
|
for(int i = 0; i < AMBIENT_LIGHT_COUNT; i++)
|
|
|
{
|
|
|
tone += dot(ambientLightColor[i], w) * ambientFactor * ao;
|
|
|
}
|
|
|
#endif
|
|
|
#ifdef AMBIENT_SH_LIGHT_COUNT
|
|
|
for(int _idx_ = 0; _idx_ < AMBIENT_SH_LIGHT_COUNT; _idx_++)
|
|
|
{{
|
|
|
tone += dot(calcAmbientSHLight(_idx_, N2) * ambientSHLightColor[_idx_], w) * ao;
|
|
|
}}
|
|
|
#endif
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];
|
|
|
if(shadowEnabled)
|
|
|
{
|
|
|
computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);
|
|
|
}
|
|
|
#endif
|
|
|
for(int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++)
|
|
|
{
|
|
|
vec3 lightDirection = -directionalLightDirection[i];
|
|
|
float lightTone = dot(directionalLightColor[i], w);
|
|
|
|
|
|
float shadowContrib = 1.0;
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
if (shadowEnabled)
|
|
|
{
|
|
|
shadowContrib = shadowContribsDir[i];
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
float ndl = dot(N, normalize(lightDirection)) * shadowContrib;
|
|
|
|
|
|
tone += lightTone * clamp(ndl, 0.0, 1.0);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
gl_FragColor = mix(inkColor, paperColor, shade(clamp(tone, 0.0, 1.0)));
|
|
|
}
|
|
|
@end
|
|
|
`},function(re,V,b){"use strict";V.a=`@export ecgl.sm.depth.vertex
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
attribute vec3 position : POSITION;
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
attribute vec3 prevPosition;
|
|
|
uniform float percent : 1.0;
|
|
|
#endif
|
|
|
|
|
|
varying vec4 v_ViewPosition;
|
|
|
|
|
|
void main(){
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
vec3 pos = mix(prevPosition, position, percent);
|
|
|
#else
|
|
|
vec3 pos = position;
|
|
|
#endif
|
|
|
|
|
|
v_ViewPosition = worldViewProjection * vec4(pos, 1.0);
|
|
|
gl_Position = v_ViewPosition;
|
|
|
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.sm.depth.fragment
|
|
|
|
|
|
@import clay.sm.depth.fragment
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";var U=b(134),C=b(138),w=b(139),y=b(145),T=b(0),x=b.n(T);x.a.registerAction({type:"grid3DChangeCamera",event:"grid3dcamerachanged",update:"series:updateCamera"},function(p,m){m.eachComponent({mainType:"grid3D",query:p},function(L){L.setView(p)})}),x.a.registerAction({type:"grid3DShowAxisPointer",event:"grid3dshowaxispointer",update:"grid3D:showAxisPointer"},function(p,m){}),x.a.registerAction({type:"grid3DHideAxisPointer",event:"grid3dhideaxispointer",update:"grid3D:hideAxisPointer"},function(p,m){})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(135),y=C.a.extendComponentModel({type:"cartesian3DAxis",axis:null,getCoordSysModel:function(){return this.ecModel.queryComponents({mainType:"grid3D",index:this.option.gridIndex,id:this.option.gridId})[0]}});C.a.helper.mixinAxisModelCommonMethods(y);function T(x,p){return p.type||(p.data?"category":"value")}Object(w.a)("x",y,T,{name:"X"}),Object(w.a)("y",y,T,{name:"Y"}),Object(w.a)("z",y,T,{name:"Z"})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(136),y=b(137),T=b.n(y),x=["value","category","time","log"];V.a=function(p,m,L,d){C.a.util.each(x,function(g){m.extend({type:p+"Axis3D."+g,__ordinalMeta:null,mergeDefaultAndTheme:function(A,M){var O=M.getTheme();C.a.util.merge(A,O.get(g+"Axis3D")),C.a.util.merge(A,this.getDefaultOption()),A.type=L(p,A)},optionUpdated:function(){var A=this.option;A.type==="category"&&(this.__ordinalMeta=T.a.createByAxisModel(this))},getCategories:function(){if(this.option.type==="category")return this.__ordinalMeta.categories},getOrdinalMeta:function(){return this.__ordinalMeta},defaultOption:C.a.util.merge(C.a.util.clone(w.a[g+"Axis3D"]),d||{},!0)})}),m.superClass.registerSubTypeDefaulter(p+"Axis3D",C.a.util.curry(L,p))}},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w={show:!0,grid3DIndex:0,inverse:!1,name:"",nameLocation:"middle",nameTextStyle:{fontSize:16},nameGap:20,axisPointer:{},axisLine:{},axisTick:{},axisLabel:{},splitArea:{}},y=C.a.util.merge({boundaryGap:!0,axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"},axisPointer:{label:{show:!1}}},w),T=C.a.util.merge({boundaryGap:[0,0],splitNumber:5,axisPointer:{label:{}}},w),x=C.a.util.defaults({scale:!0,min:"dataMin",max:"dataMax"},T),p=C.a.util.defaults({logBase:10},T);p.scale=!0,V.a={categoryAxis3D:y,valueAxis3D:T,timeAxis3D:x,logAxis3D:p}},function(re,V,b){var U=b(12),C=U.createHashMap,w=U.isObject,y=U.map;function T(d){this.categories=d.categories||[],this._needCollect=d.needCollect,this._deduplication=d.deduplication,this._map}T.createByAxisModel=function(d){var g=d.option,A=g.data,M=A&&y(A,m);return new T({categories:M,needCollect:!M,deduplication:g.dedplication!==!1})};var x=T.prototype;x.getOrdinal=function(d){return p(this).get(d)},x.parseAndCollect=function(d){var g,A=this._needCollect;if(typeof d!="string"&&!A)return d;if(A&&!this._deduplication)return g=this.categories.length,this.categories[g]=d,g;var M=p(this);return g=M.get(d),g==null&&(A?(g=this.categories.length,this.categories[g]=d,M.set(d,g)):g=NaN),g};function p(d){return d._map||(d._map=C(d.categories))}function m(d){return w(d)&&d.value!=null?d.value:d+""}var L=T;re.exports=L},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(38),y=b(31),T=b(32),x=C.a.extendComponentModel({type:"grid3D",dependencies:["xAxis3D","yAxis3D","zAxis3D"],defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",boxWidth:100,boxHeight:100,boxDepth:100,axisPointer:{show:!0,lineStyle:{color:"rgba(0, 0, 0, 0.8)",width:1},label:{show:!0,formatter:null,margin:8,textStyle:{fontSize:14,color:"#fff",backgroundColor:"rgba(0,0,0,0.5)",padding:3,borderRadius:3}}},axisLine:{show:!0,lineStyle:{color:"#333",width:2,type:"solid"}},axisTick:{show:!0,inside:!1,length:3,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,margin:8,textStyle:{fontSize:12}},splitLine:{show:!0,lineStyle:{color:["#ccc"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.3)","rgba(200,200,200,0.3)"]}},light:{main:{alpha:30,beta:40},ambient:{intensity:.4}},viewControl:{alpha:20,beta:40,autoRotate:!1,distance:200,minDistance:40,maxDistance:400}}});C.a.util.merge(x.prototype,w.a),C.a.util.merge(x.prototype,y.a),C.a.util.merge(x.prototype,T.a);var p=x},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(39),T=b(22),x=b(3),p=b(73),m=b(34),L=b(140),d=b(142),g=b(58),A=b(40),M=x.a.firstNotNull;w.a.Shader.import(A.a),["x","y","z"].forEach(function(I){C.a.extendComponentView({type:I+"Axis3D"})});var O={x:0,y:2,z:1},S=C.a.extendComponentView({type:"grid3D",__ecgl__:!0,init:function(I,c){var f=[["y","z","x",-1,"left"],["y","z","x",1,"right"],["x","y","z",-1,"bottom"],["x","y","z",1,"top"],["x","z","y",-1,"far"],["x","z","y",1,"near"]],P=["x","y","z"],N=new w.a.Material({shader:w.a.createShader("ecgl.color"),depthMask:!1,transparent:!0}),k=new w.a.Material({shader:w.a.createShader("ecgl.meshLines3D"),depthMask:!1,transparent:!0});N.define("fragment","DOUBLE_SIDED"),N.define("both","VERTEX_COLOR"),this.groupGL=new w.a.Node,this._control=new y.a({zr:c.getZr()}),this._control.init(),this._faces=f.map(function(z){var Z=new L.a(z,k,N);return this.groupGL.add(Z.rootNode),Z},this),this._axes=P.map(function(z){var Z=new d.a(z,k);return this.groupGL.add(Z.rootNode),Z},this);var W=c.getDevicePixelRatio();this._axisLabelSurface=new p.a({width:256,height:256,devicePixelRatio:W}),this._axisLabelSurface.onupdate=function(){c.getZr().refresh()},this._axisPointerLineMesh=new w.a.Mesh({geometry:new T.a({useNativeLine:!1}),material:k,castShadow:!1,ignorePicking:!0,renderOrder:3}),this.groupGL.add(this._axisPointerLineMesh),this._axisPointerLabelsSurface=new p.a({width:128,height:128,devicePixelRatio:W}),this._axisPointerLabelsMesh=new g.a({ignorePicking:!0,renderOrder:4,castShadow:!1}),this._axisPointerLabelsMesh.material.set("textureAtlas",this._axisPointerLabelsSurface.getTexture()),this.groupGL.add(this._axisPointerLabelsMesh),this._lightRoot=new w.a.Node,this._sceneHelper=new m.a,this._sceneHelper.initLight(this._lightRoot)},render:function(I,c,f){this._model=I,this._api=f;var P=I.coordinateSystem;P.viewGL.add(this._lightRoot),I.get("show")?P.viewGL.add(this.groupGL):P.viewGL.remove(this.groupGL);var N=this._control;N.setViewGL(P.viewGL);var k=I.getModel("viewControl");N.setFromViewControlModel(k,0),this._axisLabelSurface.clear();var W=["x","y","z"].reduce(function(z,Z){var J=P.getAxis(Z),ee=J.model;return z[Z]=M(ee.get("axisLabel.interval"),I.get("axisLabel.interval")),J.scale.type==="ordinal"&&(z[Z]==null||z[Z]=="auto")&&(z[Z]=Math.floor(J.scale.getTicks().length/8)),z},{});N.off("update"),I.get("show")&&(this._faces.forEach(function(z){z.update(W,I,c,f)},this),this._axes.forEach(function(z){z.update(I,W,this._axisLabelSurface,f)},this)),N.on("update",this._onCameraChange.bind(this,I,f),this),this._sceneHelper.setScene(P.viewGL.scene),this._sceneHelper.updateLight(I),P.viewGL.setPostEffect(I.getModel("postEffect"),f),P.viewGL.setTemporalSuperSampling(I.getModel("temporalSuperSampling")),this._initMouseHandler(I)},afterRender:function(I,c,f,P){var N=P.renderer;this._sceneHelper.updateAmbientCubemap(N,I,f),this._sceneHelper.updateSkybox(N,I,f)},showAxisPointer:function(I,c,f,P){this._doShowAxisPointer(),this._updateAxisPointer(P.value)},hideAxisPointer:function(I,c,f,P){this._doHideAxisPointer()},_initMouseHandler:function(I){var c=I.coordinateSystem,f=c.viewGL;I.get("show")&&I.get("axisPointer.show")?f.on("mousemove",this._updateAxisPointerOnMousePosition,this):f.off("mousemove",this._updateAxisPointerOnMousePosition)},_updateAxisPointerOnMousePosition:function(I){if(!I.target){for(var c=this._model,f=c.coordinateSystem,P=f.viewGL,N=P.castRay(I.offsetX,I.offsetY,new w.a.Ray),k,W=0;W<this._faces.length;W++){var z=this._faces[W];if(!z.rootNode.invisible){z.plane.normal.dot(P.camera.worldTransform.z)<0&&z.plane.normal.negate();var Z=N.intersectPlane(z.plane);if(Z){var J=f.getAxis(z.faceInfo[0]),ee=f.getAxis(z.faceInfo[1]),$=O[z.faceInfo[0]],ie=O[z.faceInfo[1]];J.contain(Z.array[$])&&ee.contain(Z.array[ie])&&(k=Z)}}}if(k){var se=f.pointToData(k.array,[],!0);this._updateAxisPointer(se),this._doShowAxisPointer()}else this._doHideAxisPointer()}},_onCameraChange:function(I,c){I.get("show")&&(this._updateFaceVisibility(),this._updateAxisLinePosition());var f=this._control;c.dispatchAction({type:"grid3DChangeCamera",alpha:f.getAlpha(),beta:f.getBeta(),distance:f.getDistance(),center:f.getCenter(),from:this.uid,grid3DId:I.id})},_updateFaceVisibility:function(){var I=this._control.getCamera(),c=new w.a.Vector3;I.update();for(var f=0;f<this._faces.length/2;f++){for(var P=[],N=0;N<2;N++){var k=this._faces[f*2+N];k.rootNode.getWorldPosition(c),c.transformMat4(I.viewMatrix),P[N]=c.z}var W=P[0]>P[1]?0:1,z=this._faces[f*2+W],Z=this._faces[f*2+1-W];z.rootNode.invisible=!0,Z.rootNode.invisible=!1}},_updateAxisLinePosition:function(){var I=this._model.coordinateSystem,c=I.getAxis("x"),f=I.getAxis("y"),P=I.getAxis("z"),N=P.getExtentMax(),k=P.getExtentMin(),W=c.getExtentMin(),z=c.getExtentMax(),Z=f.getExtentMax(),J=f.getExtentMin(),ee=this._axes[0].rootNode,$=this._axes[1].rootNode,ie=this._axes[2].rootNode,se=this._faces,ne=se[4].rootNode.invisible?J:Z,ce=se[2].rootNode.invisible?N:k,ae=se[0].rootNode.invisible?W:z,fe=se[2].rootNode.invisible?N:k,oe=se[0].rootNode.invisible?z:W,pe=se[4].rootNode.invisible?J:Z;ee.rotation.identity(),$.rotation.identity(),ie.rotation.identity(),se[4].rootNode.invisible&&(this._axes[0].flipped=!0,ee.rotation.rotateX(Math.PI)),se[0].rootNode.invisible&&(this._axes[1].flipped=!0,$.rotation.rotateZ(Math.PI)),se[4].rootNode.invisible&&(this._axes[2].flipped=!0,ie.rotation.rotateY(Math.PI)),ee.position.set(0,ce,ne),$.position.set(ae,fe,0),ie.position.set(oe,0,pe),ee.update(),$.update(),ie.update(),this._updateAxisLabelAlign()},_updateAxisLabelAlign:function(){var I=this._control.getCamera(),c=[new w.a.Vector4,new w.a.Vector4],f=new w.a.Vector4;this.groupGL.getWorldPosition(f),f.w=1,f.transformMat4(I.viewMatrix).transformMat4(I.projectionMatrix),f.x/=f.w,f.y/=f.w,this._axes.forEach(function(P){for(var N=P.axisLineCoords,k=P.labelsMesh.geometry,W=0;W<c.length;W++)c[W].setArray(N[W]),c[W].w=1,c[W].transformMat4(P.rootNode.worldTransform).transformMat4(I.viewMatrix).transformMat4(I.projectionMatrix),c[W].x/=c[W].w,c[W].y/=c[W].w;var z=c[1].x-c[0].x,Z=c[1].y-c[0].y,J=(c[1].x+c[0].x)/2,ee=(c[1].y+c[0].y)/2,$,ie;Math.abs(Z/z)<.5?($="center",ie=ee>f.y?"bottom":"top"):(ie="middle",$=J>f.x?"left":"right"),P.setSpriteAlign($,ie,this._api)},this)},_doShowAxisPointer:function(){this._axisPointerLineMesh.invisible&&(this._axisPointerLineMesh.invisible=!1,this._axisPointerLabelsMesh.invisible=!1,this._api.getZr().refresh())},_doHideAxisPointer:function(){this._axisPointerLineMesh.invisible||(this._axisPointerLineMesh.invisible=!0,this._axisPointerLabelsMesh.invisible=!0,this._api.getZr().refresh())},_updateAxisPointer:function(I){var c=this._model.coordinateSystem,f=c.dataToPoint(I),P=this._axisPointerLineMesh,N=P.geometry,k=this._model.getModel("axisPointer"),W=this._api.getDevicePixelRatio();N.convertToDynamicArray(!0);function z(Fe){return x.a.firstNotNull(Fe.model.get("axisPointer.show"),k.get("show"))}function Z(Fe){var Ue=Fe.model.getModel("axisPointer",k),it=Ue.getModel("lineStyle"),tt=w.a.parseColor(it.get("color")),et=M(it.get("width"),1),vt=M(it.get("opacity"),1);return tt[3]*=vt,{color:tt,lineWidth:et}}for(var J=0;J<this._faces.length;J++){var ee=this._faces[J];if(!ee.rootNode.invisible){for(var $=ee.faceInfo,ie=$[3]<0?c.getAxis($[2]).getExtentMin():c.getAxis($[2]).getExtentMax(),se=O[$[2]],ne=0;ne<2;ne++){var ce=$[ne],ae=$[1-ne],fe=c.getAxis(ce),oe=c.getAxis(ae);if(z(fe)){var pe=[0,0,0],_e=[0,0,0],de=O[ce],be=O[ae];pe[de]=_e[de]=f[de],pe[se]=_e[se]=ie,pe[be]=oe.getExtentMin(),_e[be]=oe.getExtentMax();var Ae=Z(fe);N.addLine(pe,_e,Ae.color,Ae.lineWidth*W)}}if(z(c.getAxis($[2]))){var pe=f.slice(),_e=f.slice();_e[se]=ie;var Ae=Z(c.getAxis($[2]));N.addLine(pe,_e,Ae.color,Ae.lineWidth*W)}}}N.convertToTypedArray(),this._updateAxisPointerLabelsMesh(I),this._api.getZr().refresh()},_updateAxisPointerLabelsMesh:function(I){var c=this._model,f=this._axisPointerLabelsMesh,P=this._axisPointerLabelsSurface,N=c.coordinateSystem,k=c.getModel("axisPointer");f.geometry.convertToDynamicArray(!0),P.clear();var W={x:"y",y:"x",z:"y"};this._axes.forEach(function(z,Z){var J=N.getAxis(z.dim),ee=J.model,$=ee.getModel("axisPointer",k),ie=$.getModel("label"),se=$.get("lineStyle.color");if(!(!ie.get("show")||!$.get("show"))){var ne=I[Z],ce=ie.get("formatter"),ae=J.scale.getLabel(ne);if(ce!=null)ae=ce(ae,I);else if(J.scale.type==="interval"||J.scale.type==="log"){var fe=C.a.number.getPrecisionSafe(J.scale.getTicks()[0]);ae=ne.toFixed(fe+2)}var oe=ie.getModel("textStyle"),pe=oe.get("color"),_e=new C.a.graphic.Text;C.a.graphic.setTextStyle(_e.style,oe,{text:ae,textFill:pe||se,textAlign:"left",textVerticalAlign:"top"});var de=P.add(_e),be=_e.getBoundingRect(),Ae=this._api.getDevicePixelRatio(),Fe=z.rootNode.position.toArray(),Ue=O[W[z.dim]];Fe[Ue]+=(z.flipped?-1:1)*ie.get("margin"),Fe[O[z.dim]]=J.dataToCoord(I[Z]),f.geometry.addSprite(Fe,[be.width*Ae,be.height*Ae],de,z.textAlign,z.textVerticalAlign)}},this),P.getZr().refreshImmediately(),f.material.set("uvScale",P.getCoordsScale()),f.geometry.convertToTypedArray()},dispose:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(3),T=b(22),x=b(141),p=b(74),m=y.a.firstNotNull,L={x:0,y:2,z:1};function d(A,M,O,S){var I=[0,0,0],c=S<0?O.getExtentMin():O.getExtentMax();I[L[O.dim]]=c,A.position.setArray(I),A.rotation.identity(),M.distance=-Math.abs(c),M.normal.set(0,0,0),O.dim==="x"?(A.rotation.rotateY(S*Math.PI/2),M.normal.x=-S):O.dim==="z"?(A.rotation.rotateX(-S*Math.PI/2),M.normal.y=-S):(S>0&&A.rotation.rotateY(Math.PI),M.normal.z=-S)}function g(A,M,O){this.rootNode=new w.a.Node;var S=new w.a.Mesh({geometry:new T.a({useNativeLine:!1}),material:M,castShadow:!1,ignorePicking:!0,renderOrder:1}),I=new w.a.Mesh({geometry:new x.a,material:O,castShadow:!1,culling:!1,ignorePicking:!0,renderOrder:0});this.rootNode.add(I),this.rootNode.add(S),this.faceInfo=A,this.plane=new w.a.Plane,this.linesMesh=S,this.quadsMesh=I}g.prototype.update=function(A,M,O,S){var I=M.coordinateSystem,c=[I.getAxis(this.faceInfo[0]),I.getAxis(this.faceInfo[1])],f=this.linesMesh.geometry,P=this.quadsMesh.geometry;f.convertToDynamicArray(!0),P.convertToDynamicArray(!0),this._updateSplitLines(f,c,M,A,S),this._udpateSplitAreas(P,c,M,A,S),f.convertToTypedArray(),P.convertToTypedArray();var N=I.getAxis(this.faceInfo[2]);d(this.rootNode,this.plane,N,this.faceInfo[3])},g.prototype._updateSplitLines=function(A,M,O,S,I){var c=I.getDevicePixelRatio();M.forEach(function(f,P){var N=f.model,k=M[1-P].getExtent();if(!f.scale.isBlank()){var W=N.getModel("splitLine",O.getModel("splitLine"));if(W.get("show")){var z=W.getModel("lineStyle"),Z=z.get("color"),J=m(z.get("opacity"),1),ee=m(z.get("width"),1),$=W.get("interval");($==null||$==="auto")&&($=S[f.dim]),Z=C.a.util.isArray(Z)?Z:[Z];for(var ie=f.getTicksCoords(),se=0,ne=0;ne<ie.length;ne++)if(!Object(p.a)(f,ne,$)){var ce=ie[ne],ae=w.a.parseColor(Z[se%Z.length]);ae[3]*=J;var fe=[0,0,0],oe=[0,0,0];fe[P]=oe[P]=ce,fe[1-P]=k[0],oe[1-P]=k[1],A.addLine(fe,oe,ae,ee*c),se++}}}})},g.prototype._udpateSplitAreas=function(A,M,O,S,I){M.forEach(function(c,f){var P=c.model,N=M[1-f].getExtent();if(!c.scale.isBlank()){var k=P.getModel("splitArea",O.getModel("splitArea"));if(k.get("show")){var W=k.getModel("areaStyle"),z=W.get("color"),Z=m(W.get("opacity"),1),J=k.get("interval");(J==null||J==="auto")&&(J=S[c.dim]),z=C.a.util.isArray(z)?z:[z];for(var ee=c.getTicksCoords(),$=0,ie=[0,0,0],se=[0,0,0],ne=0;ne<ee.length;ne++){var ce=ee[ne],ae=[0,0,0],fe=[0,0,0];if(ae[f]=fe[f]=ce,ae[1-f]=N[0],fe[1-f]=N[1],ne===0){ie=ae,se=fe;continue}if(!Object(p.a)(c,ne,J)){var oe=w.a.parseColor(z[$%z.length]);oe[3]*=Z,A.addQuad([ie,ae,fe,se],oe),ie=ae,se=fe,$++}}}}})},V.a=g},function(re,V,b){"use strict";var U=b(13),C=b(0),w=b.n(C),y=b(33),T=b(1),x=b.n(T),p=x.a.vec3,m=U.a.extend(function(){return{segmentScale:1,useNativeLine:!0,attributes:{position:new U.a.Attribute("position","float",3,"POSITION"),normal:new U.a.Attribute("normal","float",3,"NORMAL"),color:new U.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setQuadCount:function(L){var d=this.attributes,g=this.getQuadVertexCount()*L,A=this.getQuadTriangleCount()*L;this.vertexCount!==g&&(d.position.init(g),d.normal.init(g),d.color.init(g)),this.triangleCount!==A&&(this.indices=g>65535?new Uint32Array(A*3):new Uint16Array(A*3))},getQuadVertexCount:function(){return 4},getQuadTriangleCount:function(){return 2},addQuad:function(){var L=p.create(),d=p.create(),g=p.create(),A=[0,3,1,3,2,1];return function(M,O){var S=this.attributes.position,I=this.attributes.normal,c=this.attributes.color;p.sub(L,M[1],M[0]),p.sub(d,M[2],M[1]),p.cross(g,L,d),p.normalize(g,g);for(var f=0;f<4;f++)S.set(this._vertexOffset+f,M[f]),c.set(this._vertexOffset+f,O),I.set(this._vertexOffset+f,g);for(var P=this._faceOffset*3,f=0;f<6;f++)this.indices[P+f]=A[f]+this._vertexOffset;this._vertexOffset+=4,this._faceOffset+=2}}()});w.a.util.defaults(m.prototype,y.a),V.a=m},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(22),T=b(3),x=b(58),p=b(74),m=T.a.firstNotNull,L={x:0,y:2,z:1};function d(A,M){var O=new w.a.Mesh({geometry:new y.a({useNativeLine:!1}),material:M,castShadow:!1,ignorePicking:!0,renderOrder:2}),S=new x.a;S.material.depthMask=!1;var I=new w.a.Node;I.add(O),I.add(S),this.rootNode=I,this.dim=A,this.linesMesh=O,this.labelsMesh=S,this.axisLineCoords=null,this.labelElements=[]}var g={x:"y",y:"x",z:"y"};d.prototype.update=function(A,M,O,S){var I=A.coordinateSystem,c=I.getAxis(this.dim),f=M[this.dim],P=this.linesMesh.geometry,N=this.labelsMesh.geometry;P.convertToDynamicArray(!0),N.convertToDynamicArray(!0);var k=c.model,W=c.getExtent(),it=S.getDevicePixelRatio(),z=k.getModel("axisLine",A.getModel("axisLine")),Z=k.getModel("axisTick",A.getModel("axisTick")),J=k.getModel("axisLabel",A.getModel("axisLabel")),ee=z.get("lineStyle.color");if(z.get("show")){var $=z.getModel("lineStyle"),ie=[0,0,0],se=[0,0,0],ne=L[c.dim];ie[ne]=W[0],se[ne]=W[1],this.axisLineCoords=[ie,se];var ce=w.a.parseColor(ee),ae=m($.get("width"),1),fe=m($.get("opacity"),1);ce[3]*=fe,P.addLine(ie,se,ce,ae*it)}if(Z.get("show")){var oe=Z.getModel("lineStyle"),pe=w.a.parseColor(m(oe.get("color"),ee)),ae=m(oe.get("width"),1);pe[3]*=m(oe.get("opacity"),1);var _e=c.getTicksCoords(),de=Z.get("interval");(de==null||de==="auto")&&(de=f);for(var be=Z.get("length"),Ae=0;Ae<_e.length;Ae++)if(!Object(p.a)(c,Ae,de)){var Fe=_e[Ae],ie=[0,0,0],se=[0,0,0],ne=L[c.dim],Ue=L[g[c.dim]];ie[ne]=se[ne]=Fe,se[Ue]=be,P.addLine(ie,se,pe,ae*it)}}this.labelElements=[];var it=S.getDevicePixelRatio();if(J.get("show")){for(var tt=c.getLabelsCoords(),et=k.get("data"),de=f,vt=J.get("margin"),dt=k.getFormattedLabels(),je=c.scale.getTicks(),Ae=0;Ae<tt.length;Ae++)if(!Object(p.a)(c,Ae,de)){var Fe=tt[Ae],nt=[0,0,0],ne=L[c.dim],Ue=L[g[c.dim]];nt[ne]=nt[ne]=Fe,nt[Ue]=vt;var rt=J;et&&et[je[Ae]]&&et[je[Ae]].textStyle&&(rt=new C.a.Model(et[je[Ae]].textStyle,J,k.ecModel));var ft=m(rt.get("color"),ee),lt=new C.a.graphic.Text;C.a.graphic.setTextStyle(lt.style,rt,{text:dt[Ae],textFill:typeof ft=="function"?ft(c.type==="category"?dt[Ae]:c.type==="value"?je[Ae]+"":je[Ae],Ae):ft,textVerticalAlign:"top",textAlign:"left"});var wt=O.add(lt),Re=lt.getBoundingRect();N.addSprite(nt,[Re.width*it,Re.height*it],wt),this.labelElements.push(lt)}}if(k.get("name")){var We=k.getModel("nameTextStyle"),nt=[0,0,0],ne=L[c.dim],Ue=L[g[c.dim]],Pe=m(We.get("color"),ee),ke=We.get("borderColor"),ae=We.get("borderWidth");nt[ne]=nt[ne]=(W[0]+W[1])/2,nt[Ue]=k.get("nameGap");var lt=new C.a.graphic.Text;C.a.graphic.setTextStyle(lt.style,We,{text:k.get("name"),textFill:Pe,textStroke:ke,lineWidth:ae});var wt=O.add(lt),Re=lt.getBoundingRect();N.addSprite(nt,[Re.width*it,Re.height*it],wt),lt.__idx=this.labelElements.length,this.nameLabelElement=lt}this.labelsMesh.material.set("textureAtlas",O.getTexture()),this.labelsMesh.material.set("uvScale",O.getCoordsScale()),P.convertToTypedArray(),N.convertToTypedArray()},d.prototype.setSpriteAlign=function(A,M,O){for(var S=O.getDevicePixelRatio(),I=this.labelsMesh.geometry,c=0;c<this.labelElements.length;c++){var f=this.labelElements[c],P=f.getBoundingRect();I.setSpriteAlign(c,[P.width*S,P.height*S],A,M)}var N=this.nameLabelElement;if(N){var P=N.getBoundingRect();I.setSpriteAlign(N.__idx,[P.width*S,P.height*S],A,M),I.dirty()}this.textAlign=A,this.textVerticalAlign=M},V.a=d},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(13),y=b(33),T=[0,1,2,0,2,3],x=w.a.extend(function(){return{attributes:{position:new w.a.Attribute("position","float",3,"POSITION"),texcoord:new w.a.Attribute("texcoord","float",2,"TEXCOORD_0"),offset:new w.a.Attribute("offset","float",2),color:new w.a.Attribute("color","float",4,"COLOR")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setSpriteCount:function(p){this._spriteCount=p;var m=p*4,L=p*2;this.vertexCount!==m&&(this.attributes.position.init(m),this.attributes.offset.init(m),this.attributes.color.init(m)),this.triangleCount!==L&&(this.indices=m>65535?new Uint32Array(L*3):new Uint16Array(L*3))},setSpriteAlign:function(p,m,L,d,g){L==null&&(L="left"),d==null&&(d="top");var A,M,O,S;switch(g=g||0,L){case"left":A=g,O=m[0]+g;break;case"center":case"middle":A=-m[0]/2,O=m[0]/2;break;case"right":A=-m[0]-g,O=-g;break}switch(d){case"bottom":M=g,S=m[1]+g;break;case"middle":M=-m[1]/2,S=m[1]/2;break;case"top":M=-m[1]-g,S=-g;break}var I=p*4,c=this.attributes.offset;c.set(I,[A,S]),c.set(I+1,[O,S]),c.set(I+2,[O,M]),c.set(I+3,[A,M])},addSprite:function(p,m,L,d,g,A){var M=this._vertexOffset;this.setSprite(this._vertexOffset/4,p,m,L,d,g,A);for(var O=0;O<T.length;O++)this.indices[this._faceOffset*3+O]=T[O]+M;return this._faceOffset+=2,this._vertexOffset+=4,M/4},setSprite:function(p,m,L,d,g,A,M){for(var O=p*4,S=this.attributes,I=0;I<4;I++)S.position.set(O+I,m);var c=S.texcoord;c.set(O,[d[0][0],d[0][1]]),c.set(O+1,[d[1][0],d[0][1]]),c.set(O+2,[d[1][0],d[1][1]]),c.set(O+3,[d[0][0],d[1][1]]),this.setSpriteAlign(p,L,g,A,M)}});C.a.util.defaults(x.prototype,y.a),V.a=x},function(re,V,b){"use strict";V.a=`@export ecgl.labels.vertex
|
|
|
|
|
|
attribute vec3 position: POSITION;
|
|
|
attribute vec2 texcoord: TEXCOORD_0;
|
|
|
attribute vec2 offset;
|
|
|
#ifdef VERTEX_COLOR
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform vec4 viewport : VIEWPORT;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 proj = worldViewProjection * vec4(position, 1.0);
|
|
|
|
|
|
vec2 screen = (proj.xy / abs(proj.w) + 1.0) * 0.5 * viewport.zw;
|
|
|
|
|
|
screen += offset;
|
|
|
|
|
|
proj.xy = (screen / viewport.zw - 0.5) * 2.0 * abs(proj.w);
|
|
|
gl_Position = proj;
|
|
|
#ifdef VERTEX_COLOR
|
|
|
v_Color = a_Color;
|
|
|
#endif
|
|
|
v_Texcoord = texcoord;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.labels.fragment
|
|
|
|
|
|
uniform vec3 color : [1.0, 1.0, 1.0];
|
|
|
uniform float alpha : 1.0;
|
|
|
uniform sampler2D textureAtlas;
|
|
|
uniform vec2 uvScale: [1.0, 1.0];
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
varying float v_Miter;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = vec4(color, alpha) * texture2D(textureAtlas, v_Texcoord * uvScale);
|
|
|
#ifdef VERTEX_COLOR
|
|
|
gl_FragColor *= v_Color;
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";var U=b(146),C=b(148),w=b(0),y=b.n(w),T=b(41),x=b.n(T),p=b(20),m=b(3);function L(M,O){var S=M.getBoxLayoutParams(),I=x.a.getLayoutRect(S,{width:O.getWidth(),height:O.getHeight()});I.y=O.getHeight()-I.y-I.height,this.viewGL.setViewport(I.x,I.y,I.width,I.height,O.getDevicePixelRatio());var c=M.get("boxWidth"),f=M.get("boxHeight"),P=M.get("boxDepth");["x","y","z"].forEach(function(N){if(!this.getAxis(N))throw new Error("Grid"+M.id+" don't have "+N+"Axis")},this),this.getAxis("x").setExtent(-c/2,c/2),this.getAxis("y").setExtent(P/2,-P/2),this.getAxis("z").setExtent(-f/2,f/2),this.size=[c,f,P]}function d(M,O){var S={};function I(c,f){S[c]=S[c]||[1/0,-1/0],S[c][0]=Math.min(f[0],S[c][0]),S[c][1]=Math.max(f[1],S[c][1])}M.eachSeries(function(c){if(c.coordinateSystem===this){var f=c.getData();["x","y","z"].forEach(function(P){I(P,f.getDataExtent(c.coordDimToDataDim(P)[0],!0))})}},this),["xAxis3D","yAxis3D","zAxis3D"].forEach(function(c){M.eachComponent(c,function(f){var P=c.charAt(0),N=f.getReferringComponents("grid3D")[0],k=N.coordinateSystem;if(k===this){var W=k.getAxis(P);if(W){console.warn("Can't have two %s in one grid3D",c);return}var z=y.a.helper.createScale(S[P]||[1/0,-1/0],f);W=new C.a(P,z),W.type=f.get("type");var Z=W.type==="category";W.onBand=Z&&f.get("boundaryGap"),W.inverse=f.get("inverse"),f.axis=W,W.model=f,k.addAxis(W)}},this)},this),this.resize(this.model,O)}var g={dimensions:U.a.prototype.dimensions,create:function(M,O){var S=[];M.eachComponent("grid3D",function(f){f.__viewGL=f.__viewGL||new p.a;var P=new U.a;P.model=f,P.viewGL=f.__viewGL,f.coordinateSystem=P,S.push(P),P.resize=L,P.update=d});var I=["xAxis3D","yAxis3D","zAxis3D"];function c(f,P){return I.map(function(N){var k=f.getReferringComponents(N)[0];if(k==null&&(k=P.getComponent(N)),!k)throw new Error(N+' "'+m.a.firstNotNull(f.get(N+"Index"),f.get(N+"Id"),0)+'" not found');return k})}return M.eachSeries(function(f){if(f.get("coordinateSystem")==="cartesian3D"){var P=f.getReferringComponents("grid3D")[0];if(P==null){var N=c(f,M),P=N[0].getCoordSysModel();N.forEach(function(z){var Z=z.getCoordSysModel();if(!Z)throw new Error('grid3D "'+m.a.firstNotNull(z.get("gridIndex"),z.get("gridId"),0)+'" not found');if(Z!==P)throw new Error("xAxis3D, yAxis3D, zAxis3D must use the same grid")})}var k=P.coordinateSystem;f.coordinateSystem=k}}),S}};y.a.registerCoordinateSystem("grid3D",g);var A=g},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(147),y=b.n(w);function T(x){y.a.call(this,x),this.size=[0,0,0]}T.prototype={constructor:T,type:"cartesian3D",dimensions:["x","y","z"],model:null,containPoint:function(x){return this.getAxis("x").contain(x[0])&&this.getAxis("y").contain(x[2])&&this.getAxis("z").contain(x[1])},containData:function(x){return this.getAxis("x").containData(x[0])&&this.getAxis("y").containData(x[1])&&this.getAxis("z").containData(x[2])},dataToPoint:function(x,p,m){return p=p||[],p[0]=this.getAxis("x").dataToCoord(x[0],m),p[2]=this.getAxis("y").dataToCoord(x[1],m),p[1]=this.getAxis("z").dataToCoord(x[2],m),p},pointToData:function(x,p,m){return p=p||[],p[0]=this.getAxis("x").coordToData(x[0],m),p[1]=this.getAxis("y").coordToData(x[2],m),p[2]=this.getAxis("z").coordToData(x[1],m),p}},C.a.util.inherits(T,y.a),V.a=T},function(re,V,b){var U=b(12);function C(T){return this._axes[T]}var w=function(T){this._axes={},this._dimList=[],this.name=T||""};w.prototype={constructor:w,type:"cartesian",getAxis:function(T){return this._axes[T]},getAxes:function(){return U.map(this._dimList,C,this)},getAxesByScale:function(T){return T=T.toLowerCase(),U.filter(this.getAxes(),function(x){return x.scale.type===T})},addAxis:function(T){var x=T.dim;this._axes[x]=T,this._dimList.push(x)},dataToCoord:function(T){return this._dataCoordConvert(T,"dataToCoord")},coordToData:function(T){return this._dataCoordConvert(T,"coordToData")},_dataCoordConvert:function(T,x){for(var p=this._dimList,m=T instanceof Array?[]:{},L=0;L<p.length;L++){var d=p[L],g=this._axes[d];m[d]=g[x](T[d])}return m}};var y=w;re.exports=y},function(re,V,b){"use strict";var U=b(0),C=b.n(U);function w(y,T,x){C.a.Axis.call(this,y,T,x)}w.prototype={constructor:w,getExtentMin:function(){var y=this._extent;return Math.min(y[0],y[1])},getExtentMax:function(){var y=this._extent;return Math.max(y[0],y[1])}},C.a.util.inherits(w,C.a.Axis),V.a=w},function(re,V,b){var U=b(12),C=b(150),w=b(78);function y(f){return isNaN(f)?"-":(f=(f+"").split("."),f[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(f.length>1?"."+f[1]:""))}function T(f,P){return f=(f||"").toLowerCase().replace(/-(.)/g,function(N,k){return k.toUpperCase()}),P&&f&&(f=f.charAt(0).toUpperCase()+f.slice(1)),f}var x=U.normalizeCssArray;function p(f){return String(f).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}var m=["a","b","c","d","e","f","g"],L=function(f,P){return"{"+f+(P==null?"":P)+"}"};function d(f,P,N){U.isArray(P)||(P=[P]);var k=P.length;if(!k)return"";for(var W=P[0].$vars||[],z=0;z<W.length;z++){var Z=m[z];f=f.replace(L(Z),L(Z,0))}for(var J=0;J<k;J++)for(var ee=0;ee<W.length;ee++){var $=P[J][W[ee]];f=f.replace(L(m[ee],J),N?p($):$)}return f}function g(f,P,N){return U.each(P,function(k,W){f=f.replace("{"+W+"}",N?p(k):k)}),f}function A(f,W){f=U.isString(f)?{color:f,extraCssText:W}:f||{};var N=f.color,k=f.type,W=f.extraCssText;return N?k==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+p(N)+";"+(W||"")+'"></span>':'<span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:'+p(N)+";"+(W||"")+'"></span>':""}var M=function(f){return f<10?"0"+f:f};function O(f,P,N){(f==="week"||f==="month"||f==="quarter"||f==="half-year"||f==="year")&&(f=`MM-dd
|
|
|
yyyy`);var k=w.parseDate(P),W=N?"UTC":"",z=k["get"+W+"FullYear"](),Z=k["get"+W+"Month"]()+1,J=k["get"+W+"Date"](),ee=k["get"+W+"Hours"](),$=k["get"+W+"Minutes"](),ie=k["get"+W+"Seconds"]();return f=f.replace("MM",M(Z)).replace("M",Z).replace("yyyy",z).replace("yy",z%100).replace("dd",M(J)).replace("d",J).replace("hh",M(ee)).replace("h",ee).replace("mm",M($)).replace("m",$).replace("ss",M(ie)).replace("s",ie),f}function S(f){return f&&f.charAt(0).toUpperCase()+f.substr(1)}var I=C.truncateText,c=C.getBoundingRect;V.addCommas=y,V.toCamelCase=T,V.normalizeCssArray=x,V.encodeHTML=p,V.formatTpl=d,V.formatTplSimple=g,V.getTooltipMarker=A,V.formatTime=O,V.capitalFirst=S,V.truncateText=I,V.getTextRect=c},function(re,V,b){var U=b(75),C=b(151),w=b(12),y=w.getContext,T=w.extend,x=w.retrieve2,p=w.retrieve3,m={},L=0,d=5e3,g=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g,A="12px sans-serif",M={};function O(ae,fe){M[ae]=fe}function S(ae,fe){fe=fe||A;var oe=ae+":"+fe;if(m[oe])return m[oe];for(var pe=(ae+"").split(`
|
|
|
`),_e=0,de=0,be=pe.length;de<be;de++)_e=Math.max($(pe[de],fe).width,_e);return L>d&&(L=0,m={}),L++,m[oe]=_e,_e}function I(ae,fe,oe,pe,_e,de,be){return de?f(ae,fe,oe,pe,_e,de,be):c(ae,fe,oe,pe,_e,be)}function c(ae,fe,oe,pe,_e,de){var be=ie(ae,fe,_e,de),Ae=S(ae,fe);_e&&(Ae+=_e[1]+_e[3]);var Fe=be.outerHeight,Ue=P(0,Ae,oe),it=N(0,Fe,pe),tt=new U(Ue,it,Ae,Fe);return tt.lineHeight=be.lineHeight,tt}function f(ae,fe,oe,pe,_e,de,be){var Ae=se(ae,{rich:de,truncate:be,font:fe,textAlign:oe,textPadding:_e}),Fe=Ae.outerWidth,Ue=Ae.outerHeight,it=P(0,Fe,oe),tt=N(0,Ue,pe);return new U(it,tt,Fe,Ue)}function P(ae,fe,oe){return oe==="right"?ae-=fe:oe==="center"&&(ae-=fe/2),ae}function N(ae,fe,oe){return oe==="middle"?ae-=fe/2:oe==="bottom"&&(ae-=fe),ae}function k(ae,fe,oe){var pe=fe.x,_e=fe.y,de=fe.height,be=fe.width,Ae=de/2,Fe="left",Ue="top";switch(ae){case"left":pe-=oe,_e+=Ae,Fe="right",Ue="middle";break;case"right":pe+=oe+be,_e+=Ae,Ue="middle";break;case"top":pe+=be/2,_e-=oe,Fe="center",Ue="bottom";break;case"bottom":pe+=be/2,_e+=de+oe,Fe="center";break;case"inside":pe+=be/2,_e+=Ae,Fe="center",Ue="middle";break;case"insideLeft":pe+=oe,_e+=Ae,Ue="middle";break;case"insideRight":pe+=be-oe,_e+=Ae,Fe="right",Ue="middle";break;case"insideTop":pe+=be/2,_e+=oe,Fe="center";break;case"insideBottom":pe+=be/2,_e+=de-oe,Fe="center",Ue="bottom";break;case"insideTopLeft":pe+=oe,_e+=oe;break;case"insideTopRight":pe+=be-oe,_e+=oe,Fe="right";break;case"insideBottomLeft":pe+=oe,_e+=de-oe,Ue="bottom";break;case"insideBottomRight":pe+=be-oe,_e+=de-oe,Fe="right",Ue="bottom";break}return{x:pe,y:_e,textAlign:Fe,textVerticalAlign:Ue}}function W(ae,fe,oe,pe,_e){if(!fe)return"";var de=(ae+"").split(`
|
|
|
`);_e=z(fe,oe,pe,_e);for(var be=0,Ae=de.length;be<Ae;be++)de[be]=Z(de[be],_e);return de.join(`
|
|
|
`)}function z(ae,fe,_e,pe){pe=T({},pe),pe.font=fe;var _e=x(_e,"...");pe.maxIterations=x(pe.maxIterations,2);var de=pe.minChar=x(pe.minChar,0);pe.cnCharWidth=S("\u56FD",fe);var be=pe.ascCharWidth=S("a",fe);pe.placeholder=x(pe.placeholder,"");for(var Ae=ae=Math.max(0,ae-1),Fe=0;Fe<de&&Ae>=be;Fe++)Ae-=be;var Ue=S(_e);return Ue>Ae&&(_e="",Ue=0),Ae=ae-Ue,pe.ellipsis=_e,pe.ellipsisWidth=Ue,pe.contentWidth=Ae,pe.containerWidth=ae,pe}function Z(ae,fe){var oe=fe.containerWidth,pe=fe.font,_e=fe.contentWidth;if(!oe)return"";var de=S(ae,pe);if(de<=oe)return ae;for(var be=0;;be++){if(de<=_e||be>=fe.maxIterations){ae+=fe.ellipsis;break}var Ae=be===0?J(ae,_e,fe.ascCharWidth,fe.cnCharWidth):de>0?Math.floor(ae.length*_e/de):0;ae=ae.substr(0,Ae),de=S(ae,pe)}return ae===""&&(ae=fe.placeholder),ae}function J(ae,fe,oe,pe){for(var _e=0,de=0,be=ae.length;de<be&&_e<fe;de++){var Ae=ae.charCodeAt(de);_e+=0<=Ae&&Ae<=127?oe:pe}return de}function ee(ae){return S("\u56FD",ae)}function $(ae,fe){return M.measureText(ae,fe)}M.measureText=function(ae,fe){var oe=y();return oe.font=fe||A,oe.measureText(ae)};function ie(ae,fe,oe,pe){ae!=null&&(ae+="");var _e=ee(fe),de=ae?ae.split(`
|
|
|
`):[],be=de.length*_e,Ae=be;if(oe&&(Ae+=oe[0]+oe[2]),ae&&pe){var Fe=pe.outerHeight,Ue=pe.outerWidth;if(Fe!=null&&Ae>Fe)ae="",de=[];else if(Ue!=null)for(var it=z(Ue-(oe?oe[1]+oe[3]:0),fe,pe.ellipsis,{minChar:pe.minChar,placeholder:pe.placeholder}),tt=0,et=de.length;tt<et;tt++)de[tt]=Z(de[tt],it)}return{lines:de,height:be,outerHeight:Ae,lineHeight:_e}}function se(ae,fe){var oe={lines:[],width:0,height:0};if(ae!=null&&(ae+=""),!ae)return oe;for(var pe=g.lastIndex=0,_e;(_e=g.exec(ae))!=null;){var de=_e.index;de>pe&&ne(oe,ae.substring(pe,de)),ne(oe,_e[2],_e[1]),pe=g.lastIndex}pe<ae.length&&ne(oe,ae.substring(pe,ae.length));var be=oe.lines,Ae=0,Fe=0,Ue=[],it=fe.textPadding,tt=fe.truncate,et=tt&&tt.outerWidth,vt=tt&&tt.outerHeight;it&&(et!=null&&(et-=it[1]+it[3]),vt!=null&&(vt-=it[0]+it[2]));for(var dt=0;dt<be.length;dt++){for(var je=be[dt],nt=0,rt=0,ft=0;ft<je.tokens.length;ft++){var lt=je.tokens[ft],wt=lt.styleName&&fe.rich[lt.styleName]||{},Re=lt.textPadding=wt.textPadding,We=lt.font=wt.font||fe.font,Pe=lt.textHeight=x(wt.textHeight,ee(We));if(Re&&(Pe+=Re[0]+Re[2]),lt.height=Pe,lt.lineHeight=p(wt.textLineHeight,fe.textLineHeight,Pe),lt.textAlign=wt&&wt.textAlign||fe.textAlign,lt.textVerticalAlign=wt&&wt.textVerticalAlign||"middle",vt!=null&&Ae+lt.lineHeight>vt)return{lines:[],width:0,height:0};lt.textWidth=S(lt.text,We);var ke=wt.textWidth,Ze=ke==null||ke==="auto";if(typeof ke=="string"&&ke.charAt(ke.length-1)==="%")lt.percentWidth=ke,Ue.push(lt),ke=0;else{if(Ze){ke=lt.textWidth;var Ie=wt.textBackgroundColor,Ye=Ie&&Ie.image;Ye&&(Ye=C.findExistImage(Ye),C.isImageReady(Ye)&&(ke=Math.max(ke,Ye.width*Pe/Ye.height)))}var qe=Re?Re[1]+Re[3]:0;ke+=qe;var ot=et!=null?et-rt:null;ot!=null&&ot<ke&&(!Ze||ot<qe?(lt.text="",lt.textWidth=ke=0):(lt.text=W(lt.text,ot-qe,We,tt.ellipsis,{minChar:tt.minChar}),lt.textWidth=S(lt.text,We),ke=lt.textWidth+qe))}rt+=lt.width=ke,wt&&(nt=Math.max(nt,lt.lineHeight))}je.width=rt,je.lineHeight=nt,Ae+=nt,Fe=Math.max(Fe,rt)}oe.outerWidth=oe.width=x(fe.textWidth,Fe),oe.outerHeight=oe.height=x(fe.textHeight,Ae),it&&(oe.outerWidth+=it[1]+it[3],oe.outerHeight+=it[0]+it[2]);for(var dt=0;dt<Ue.length;dt++){var lt=Ue[dt],gt=lt.percentWidth;lt.width=parseInt(gt,10)/100*Fe}return oe}function ne(ae,fe,oe){for(var pe=fe==="",_e=fe.split(`
|
|
|
`),de=ae.lines,be=0;be<_e.length;be++){var Ae=_e[be],Fe={styleName:oe,text:Ae,isLineHolder:!Ae&&!pe};if(be)de.push({tokens:[Fe]});else{var Ue=(de[de.length-1]||(de[0]={tokens:[]})).tokens,it=Ue.length;it===1&&Ue[0].isLineHolder?Ue[0]=Fe:(Ae||!it||pe)&&Ue.push(Fe)}}}function ce(ae){return(ae.fontSize||ae.fontFamily)&&[ae.fontStyle,ae.fontWeight,(ae.fontSize||12)+"px",ae.fontFamily||"sans-serif"].join(" ")||ae.textFont||ae.font}V.DEFAULT_FONT=A,V.$override=O,V.getWidth=S,V.getBoundingRect=I,V.adjustTextX=P,V.adjustTextY=N,V.adjustTextPositionOnRect=k,V.truncateText=W,V.getLineHeight=ee,V.measureText=$,V.parsePlainText=ie,V.parseRichText=se,V.makeFont=ce},function(re,V,b){var U=b(53),C=new U(50);function w(p){if(typeof p=="string"){var m=C.get(p);return m&&m.image}else return p}function y(p,m,L,d,g){if(p)if(typeof p=="string"){if(m&&m.__zrImageSrc===p||!L)return m;var A=C.get(p),M={hostEl:L,cb:d,cbPayload:g};return A?(m=A.image,!x(m)&&A.pending.push(M)):(!m&&(m=new Image),m.onload=T,C.put(p,m.__cachedImgObj={image:m,pending:[M]}),m.src=m.__zrImageSrc=p),m}else return p;else return m}function T(){var p=this.__cachedImgObj;this.onload=this.__cachedImgObj=null;for(var m=0;m<p.pending.length;m++){var L=p.pending[m],d=L.cb;d&&d(this,L.cbPayload),L.hostEl.dirty()}p.pending.length=0}function x(p){return p&&p.width&&p.height}V.findExistImage=w,V.createOrUpdateImage=y,V.isImageReady=x},function(re,V,b){"use strict";var U=b(8),C=b(11),w=b(4),y=b(15),T=b(52),x=b(9),p=b(46),m=b(7),L=b(19),d=b(24),g=b(72),A=b(70),M=b(71),O=b(153),S=b(17),I=b(10),c=b(6),f=b(5),P=b(25),N=b(36),k=b(30),W=b(14),z=b(79),Z=b(1),J=b.n(Z),ee=b(154),$=J.a.mat4,ie=J.a.vec3,se=["px","nx","py","ny","pz","nz"];m.a.import(ee.a);var ne=U.a.extend(function(){return{softShadow:ne.PCF,shadowBlur:1,lightFrustumBias:"auto",kernelPCF:new Float32Array([1,0,1,1,-1,1,0,1,-1,0,-1,-1,1,-1,0,-1]),precision:"mediump",_lastRenderNotCastShadow:!1,_frameBuffer:new I.a,_textures:{},_shadowMapNumber:{POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},_depthMaterials:{},_distanceMaterials:{},_opaqueCasters:[],_receivers:[],_lightsCastShadow:[],_lightCameras:{},_lightMaterials:{},_texturePool:new z.a}},function(){this._gaussianPassH=new W.a({fragment:m.a.source("clay.compositor.gaussian_blur")}),this._gaussianPassV=new W.a({fragment:m.a.source("clay.compositor.gaussian_blur")}),this._gaussianPassH.setUniform("blurSize",this.shadowBlur),this._gaussianPassH.setUniform("blurDir",0),this._gaussianPassV.setUniform("blurSize",this.shadowBlur),this._gaussianPassV.setUniform("blurDir",1),this._outputDepthPass=new W.a({fragment:m.a.source("clay.sm.debug_depth")})},{render:function(ce,ae,fe,oe){fe||(fe=ae.getMainCamera()),this.trigger("beforerender",this,ce,ae,fe),this._renderShadowPass(ce,ae,fe,oe),this.trigger("afterrender",this,ce,ae,fe)},renderDebug:function(ce,ae){ce.saveClear();var fe=ce.viewport,oe=0,pe=0,_e=ae||fe.width/4,de=_e;this.softShadow===ne.VSM?this._outputDepthPass.material.define("fragment","USE_VSM"):this._outputDepthPass.material.undefine("fragment","USE_VSM");for(var be in this._textures){var Ae=this._textures[be];ce.setViewport(oe,pe,_e*Ae.width/Ae.height,de),this._outputDepthPass.setUniform("depthMap",Ae),this._outputDepthPass.render(ce),oe+=_e*Ae.width/Ae.height}ce.setViewport(fe),ce.restoreClear()},_updateCasterAndReceiver:function(ce,ae){if(ae.castShadow&&this._opaqueCasters.push(ae),ae.receiveShadow?(this._receivers.push(ae),ae.material.set("shadowEnabled",1),ae.material.set("pcfKernel",this.kernelPCF)):ae.material.set("shadowEnabled",0),!ae.material.shader&&ae.material.updateShader&&ae.material.updateShader(ce),this.softShadow===ne.VSM)ae.material.define("fragment","USE_VSM"),ae.material.undefine("fragment","PCF_KERNEL_SIZE");else{ae.material.undefine("fragment","USE_VSM");var fe=this.kernelPCF;fe&&fe.length?ae.material.define("fragment","PCF_KERNEL_SIZE",fe.length/2):ae.material.undefine("fragment","PCF_KERNEL_SIZE")}},_update:function(ce,ae){for(var fe=0;fe<ae.opaqueList.length;fe++)this._updateCasterAndReceiver(ce,ae.opaqueList[fe]);for(var fe=0;fe<ae.transparentList.length;fe++)this._updateCasterAndReceiver(ce,ae.transparentList[fe]);for(var fe=0;fe<ae.lights.length;fe++){var oe=ae.lights[fe];oe.castShadow&&this._lightsCastShadow.push(oe)}},_renderShadowPass:function(ce,ae,fe,oe){for(var pe in this._shadowMapNumber)this._shadowMapNumber[pe]=0;this._lightsCastShadow.length=0,this._opaqueCasters.length=0,this._receivers.length=0;var _e=ce.gl;if(oe||ae.update(),fe&&fe.update(),this._update(ce,ae),!this._lightsCastShadow.length&&this._lastRenderNotCastShadow)return;this._lastRenderNotCastShadow=this._lightsCastShadow===0,_e.enable(_e.DEPTH_TEST),_e.depthMask(!0),_e.disable(_e.BLEND),_e.clearColor(1,1,1,1);for(var de=[],be=[],Ae=[],Fe=[],Ue=[],it=[],tt,et=0;et<this._lightsCastShadow.length;et++){var vt=this._lightsCastShadow[et];if(vt instanceof A.a){if(tt){console.warn("Only one direectional light supported with shadow cascade");continue}if(vt.shadowCascade>4){console.warn("Support at most 4 cascade");continue}vt.shadowCascade>1&&(tt=vt.shadowCascade),this.renderDirectionalLightShadow(ce,ae,fe,vt,this._opaqueCasters,Ue,Fe,Ae)}else vt instanceof g.a?this.renderSpotLightShadow(ce,ae,vt,this._opaqueCasters,be,de):vt instanceof M.a&&this.renderPointLightShadow(ce,ae,vt,this._opaqueCasters,it);this._shadowMapNumber[vt.type]++}for(var dt in this._shadowMapNumber)for(var je=this._shadowMapNumber[dt],nt=dt+"_SHADOWMAP_COUNT",et=0;et<this._receivers.length;et++){var rt=this._receivers[et],ft=rt.material;ft.fragmentDefines[nt]!==je&&(je>0?ft.define("fragment",nt,je):ft.isDefined("fragment",nt)&&ft.undefine("fragment",nt))}for(var et=0;et<this._receivers.length;et++){var rt=this._receivers[et],ft=rt.material;tt?ft.define("fragment","SHADOW_CASCADE",tt.shadowCascade):ft.undefine("fragment","SHADOW_CASCADE")}var lt=ae.shadowUniforms;function wt(Ze){return Ze.height}if(Ae.length>0){var Re=Ae.map(wt);if(lt.directionalLightShadowMaps={value:Ae,type:"tv"},lt.directionalLightMatrices={value:Fe,type:"m4v"},lt.directionalLightShadowMapSizes={value:Re,type:"1fv"},tt){var We=Ue.slice(),Pe=Ue.slice();We.pop(),Pe.shift(),We.reverse(),Pe.reverse(),Fe.reverse(),lt.shadowCascadeClipsNear={value:We,type:"1fv"},lt.shadowCascadeClipsFar={value:Pe,type:"1fv"}}}if(de.length>0){var ke=de.map(wt),lt=ae.shadowUniforms;lt.spotLightShadowMaps={value:de,type:"tv"},lt.spotLightMatrices={value:be,type:"m4v"},lt.spotLightShadowMapSizes={value:ke,type:"1fv"}}it.length>0&&(lt.pointLightShadowMaps={value:it,type:"tv"})},renderDirectionalLightShadow:function(){var ce=new T.a,ae=new x.a,fe=new y.a,oe=new x.a,pe=new x.a,_e=new x.a,de=new x.a;return function(be,Ae,Fe,Ue,it,tt,et,vt){var dt=this._getDepthMaterial(Ue),je={getMaterial:function(Kt){return Kt.shadowDepthMaterial||dt},sortCompare:p.a.opaqueSortCompare};if(!Ae.viewBoundingBoxLastFrame.isFinite()){var nt=Ae.getBoundingBox();Ae.viewBoundingBoxLastFrame.copy(nt).applyTransform(Fe.viewMatrix)}var rt=Math.min(-Ae.viewBoundingBoxLastFrame.min.z,Fe.far),ft=Math.max(-Ae.viewBoundingBoxLastFrame.max.z,Fe.near),lt=this._getDirectionalLightCamera(Ue,Ae,Fe),wt=_e.array;de.copy(lt.projectionMatrix),$.invert(pe.array,lt.worldTransform.array),$.multiply(pe.array,pe.array,Fe.worldTransform.array),$.multiply(wt,de.array,pe.array);for(var Re=[],We=Fe instanceof N.a,Pe=(Fe.near+Fe.far)/(Fe.near-Fe.far),ke=2*Fe.near*Fe.far/(Fe.near-Fe.far),Ze=0;Ze<=Ue.shadowCascade;Ze++){var Ie=ft*Math.pow(rt/ft,Ze/Ue.shadowCascade),Ye=ft+(rt-ft)*Ze/Ue.shadowCascade,qe=Ie*Ue.cascadeSplitLogFactor+Ye*(1-Ue.cascadeSplitLogFactor);Re.push(qe),tt.push(-(-qe*Pe+ke)/-qe)}var ot=this._getTexture(Ue,Ue.shadowCascade);vt.push(ot);var gt=be.viewport,pt=be.gl;this._frameBuffer.attach(ot),this._frameBuffer.bind(be),pt.clear(pt.COLOR_BUFFER_BIT|pt.DEPTH_BUFFER_BIT);for(var Ze=0;Ze<Ue.shadowCascade;Ze++){var Lt=Re[Ze],Tt=Re[Ze+1];We?$.perspective(ae.array,Fe.fov/180*Math.PI,Fe.aspect,Lt,Tt):$.ortho(ae.array,Fe.left,Fe.right,Fe.bottom,Fe.top,Lt,Tt),ce.setFromProjection(ae),ce.getTransformedBoundingBox(fe,pe),fe.applyProjection(de);var Nt=fe.min.array,jt=fe.max.array;Nt[0]=Math.max(Nt[0],-1),Nt[1]=Math.max(Nt[1],-1),jt[0]=Math.min(jt[0],1),jt[1]=Math.min(jt[1],1),oe.ortho(Nt[0],jt[0],Nt[1],jt[1],1,-1),lt.projectionMatrix.multiplyLeft(oe);var zt=Ue.shadowResolution||512;be.setViewport((Ue.shadowCascade-Ze-1)*zt,0,zt,zt,1),be.renderPass(it,lt,je),this.softShadow===ne.VSM&&this._gaussianFilter(be,ot,ot.width);var Ot=new x.a;Ot.copy(lt.viewMatrix).multiplyLeft(lt.projectionMatrix),et.push(Ot.array),lt.projectionMatrix.copy(de)}this._frameBuffer.unbind(be),be.setViewport(gt)}}(),renderSpotLightShadow:function(ce,ae,fe,oe,pe,_e){var de=this._getTexture(fe),be=this._getSpotLightCamera(fe),Ae=ce.gl;this._frameBuffer.attach(de),this._frameBuffer.bind(ce),Ae.clear(Ae.COLOR_BUFFER_BIT|Ae.DEPTH_BUFFER_BIT);var Fe=this._getDepthMaterial(fe),Ue={getMaterial:function(tt){return tt.shadowDepthMaterial||Fe},sortCompare:p.a.opaqueSortCompare};ce.renderPass(ce.cullRenderList(oe,null,be),be,Ue),this._frameBuffer.unbind(ce),this.softShadow===ne.VSM&&this._gaussianFilter(ce,de,de.width);var it=new x.a;it.copy(be.worldTransform).invert().multiplyLeft(be.projectionMatrix),_e.push(de),pe.push(it.array)},renderPointLightShadow:function(ce,ae,fe,oe,pe){var _e=this._getTexture(fe),de=ce.gl;pe.push(_e);for(var be=this._getDepthMaterial(fe),Ae={getMaterial:function(tt){return tt.shadowDepthMaterial||be},sortCompare:p.a.opaqueSortCompare},Fe=0;Fe<6;Fe++){var Ue=se[Fe],it=this._getPointLightCamera(fe,Ue);this._frameBuffer.attach(_e,de.COLOR_ATTACHMENT0,de.TEXTURE_CUBE_MAP_POSITIVE_X+Fe),this._frameBuffer.bind(ce),de.clear(de.COLOR_BUFFER_BIT|de.DEPTH_BUFFER_BIT),ce.renderPass(ce.cullRenderList(oe,null,it),it,Ae)}this._frameBuffer.unbind(ce)},_getDepthMaterial:function(ce){var ae=this._lightMaterials[ce.__uid__],fe=ce instanceof M.a;if(!ae){var oe=fe?"clay.sm.distance.":"clay.sm.depth.";ae=new S.a({precision:this.precision,shader:new m.a(m.a.source(oe+"vertex"),m.a.source(oe+"fragment"))}),this._lightMaterials[ce.__uid__]=ae}return ce.shadowSlopeScale!=null&&ae.setUniform("slopeScale",ce.shadowSlopeScale),ce.shadowBias!=null&&ae.setUniform("shadowBias",ce.shadowBias),this.softShadow===ne.VSM?ae.define("fragment","USE_VSM"):ae.undefine("fragment","USE_VSM"),fe&&(ae.set("lightPosition",ce.getWorldPosition().array),ae.set("range",ce.range)),ae},_gaussianFilter:function(ce,ae,fe){var oe={width:fe,height:fe,type:c.a.FLOAT},pe=this._texturePool.get(oe);this._frameBuffer.attach(pe),this._frameBuffer.bind(ce),this._gaussianPassH.setUniform("texture",ae),this._gaussianPassH.setUniform("textureWidth",fe),this._gaussianPassH.render(ce),this._frameBuffer.attach(ae),this._gaussianPassV.setUniform("texture",pe),this._gaussianPassV.setUniform("textureHeight",fe),this._gaussianPassV.render(ce),this._frameBuffer.unbind(ce),this._texturePool.put(pe)},_getTexture:function(ce,ae){var fe=ce.__uid__,oe=this._textures[fe],pe=ce.shadowResolution||512;return ae=ae||1,oe||(ce instanceof M.a?oe=new P.a:oe=new f.a,oe.width=pe*ae,oe.height=pe,this.softShadow===ne.VSM?(oe.type=c.a.FLOAT,oe.anisotropic=4):(oe.minFilter=C.a.NEAREST,oe.magFilter=C.a.NEAREST,oe.useMipmap=!1),this._textures[fe]=oe),oe},_getPointLightCamera:function(ce,ae){this._lightCameras.point||(this._lightCameras.point={px:new N.a,nx:new N.a,py:new N.a,ny:new N.a,pz:new N.a,nz:new N.a});var fe=this._lightCameras.point[ae];switch(fe.far=ce.range,fe.fov=90,fe.position.set(0,0,0),ae){case"px":fe.lookAt(w.a.POSITIVE_X,w.a.NEGATIVE_Y);break;case"nx":fe.lookAt(w.a.NEGATIVE_X,w.a.NEGATIVE_Y);break;case"py":fe.lookAt(w.a.POSITIVE_Y,w.a.POSITIVE_Z);break;case"ny":fe.lookAt(w.a.NEGATIVE_Y,w.a.NEGATIVE_Z);break;case"pz":fe.lookAt(w.a.POSITIVE_Z,w.a.NEGATIVE_Y);break;case"nz":fe.lookAt(w.a.NEGATIVE_Z,w.a.NEGATIVE_Y);break}return ce.getWorldPosition(fe.position),fe.update(),fe},_getDirectionalLightCamera:function(){var ce=new x.a,ae=new y.a,fe=new y.a;return function(oe,pe,_e){this._lightCameras.directional||(this._lightCameras.directional=new k.a);var de=this._lightCameras.directional;ae.copy(pe.viewBoundingBoxLastFrame),ae.intersection(_e.frustum.boundingBox),de.position.copy(ae.min).add(ae.max).scale(.5).transformMat4(_e.worldTransform),de.rotation.copy(oe.rotation),de.scale.copy(oe.scale),de.updateWorldTransform(),x.a.invert(ce,de.worldTransform),x.a.multiply(ce,ce,_e.worldTransform),fe.copy(ae).applyTransform(ce);var be=fe.min.array,Ae=fe.max.array;return de.position.set((be[0]+Ae[0])/2,(be[1]+Ae[1])/2,Ae[2]).transformMat4(de.worldTransform),de.near=0,de.far=-be[2]+Ae[2],isNaN(this.lightFrustumBias)?de.far*=4:de.far+=this.lightFrustumBias,de.left=be[0],de.right=Ae[0],de.top=Ae[1],de.bottom=be[1],de.update(!0),de}}(),_getSpotLightCamera:function(ce){this._lightCameras.spot||(this._lightCameras.spot=new N.a);var ae=this._lightCameras.spot;return ae.fov=ce.penumbraAngle*2,ae.far=ce.range,ae.worldTransform.copy(ce.worldTransform),ae.updateProjectionMatrix(),$.invert(ae.viewMatrix.array,ae.worldTransform.array),ae},dispose:function(ce){var ae=ce.gl||ce;this._frameBuffer&&this._frameBuffer.dispose(ae);for(var fe in this._textures)this._textures[fe].dispose(ae);this._texturePool.clear(ce.gl),this._depthMaterials={},this._distanceMaterials={},this._textures={},this._lightCameras={},this._shadowMapNumber={POINT_LIGHT:0,DIRECTIONAL_LIGHT:0,SPOT_LIGHT:0},this._meshMaterials={};for(var oe=0;oe<this._receivers.length;oe++){var pe=this._receivers[oe];if(pe.material&&pe.material.shader){var _e=pe.material,de=_e.shader;de.undefine("fragment","POINT_LIGHT_SHADOW_COUNT"),de.undefine("fragment","DIRECTIONAL_LIGHT_SHADOW_COUNT"),de.undefine("fragment","AMBIENT_LIGHT_SHADOW_COUNT"),_e.set("shadowEnabled",0)}}this._opaqueCasters=[],this._receivers=[],this._lightsCastShadow=[]}});ne.VSM=1,ne.PCF=2,V.a=ne},function(re,V,b){"use strict";var U=b(7),C={};function w(){this._pool={}}w.prototype.get=function(p){var m=p;if(this._pool[m])return this._pool[m];var L=C[p];if(!L){console.error('Shader "'+p+'" is not in the library');return}var d=new U.a(L.vertex,L.fragment);return this._pool[m]=d,d},w.prototype.clear=function(){this._pool={}};function y(p,m,L){C[p]={vertex:m,fragment:L}}var T=new w,x={createLibrary:function(){return new w},get:function(){return T.get.apply(T,arguments)},template:y,clear:function(){return T.clear()}}},function(re,V,b){"use strict";V.a=`@export clay.sm.depth.vertex
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
attribute vec3 position : POSITION;
|
|
|
#ifdef SHADOW_TRANSPARENT
|
|
|
attribute vec2 texcoord : TEXCOORD_0;
|
|
|
#endif
|
|
|
@import clay.chunk.skinning_header
|
|
|
varying vec4 v_ViewPosition;
|
|
|
#ifdef SHADOW_TRANSPARENT
|
|
|
varying vec2 v_Texcoord;
|
|
|
#endif
|
|
|
void main(){
|
|
|
vec3 skinnedPosition = position;
|
|
|
#ifdef SKINNING
|
|
|
@import clay.chunk.skin_matrix
|
|
|
skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;
|
|
|
#endif
|
|
|
v_ViewPosition = worldViewProjection * vec4(skinnedPosition, 1.0);
|
|
|
gl_Position = v_ViewPosition;
|
|
|
#ifdef SHADOW_TRANSPARENT
|
|
|
v_Texcoord = texcoord;
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.sm.depth.fragment
|
|
|
varying vec4 v_ViewPosition;
|
|
|
#ifdef SHADOW_TRANSPARENT
|
|
|
varying vec2 v_Texcoord;
|
|
|
#endif
|
|
|
uniform float bias : 0.001;
|
|
|
uniform float slopeScale : 1.0;
|
|
|
#ifdef SHADOW_TRANSPARENT
|
|
|
uniform sampler2D transparentMap;
|
|
|
#endif
|
|
|
@import clay.util.encode_float
|
|
|
void main(){
|
|
|
float depth = v_ViewPosition.z / v_ViewPosition.w;
|
|
|
#ifdef USE_VSM
|
|
|
depth = depth * 0.5 + 0.5;
|
|
|
float moment1 = depth;
|
|
|
float moment2 = depth * depth;
|
|
|
float dx = dFdx(depth);
|
|
|
float dy = dFdy(depth);
|
|
|
moment2 += 0.25*(dx*dx+dy*dy);
|
|
|
gl_FragColor = vec4(moment1, moment2, 0.0, 1.0);
|
|
|
#else
|
|
|
float dx = dFdx(depth);
|
|
|
float dy = dFdy(depth);
|
|
|
depth += sqrt(dx*dx + dy*dy) * slopeScale + bias;
|
|
|
#ifdef SHADOW_TRANSPARENT
|
|
|
if (texture2D(transparentMap, v_Texcoord).a <= 0.1) {
|
|
|
gl_FragColor = encodeFloat(0.9999);
|
|
|
return;
|
|
|
}
|
|
|
#endif
|
|
|
gl_FragColor = encodeFloat(depth * 0.5 + 0.5);
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.sm.debug_depth
|
|
|
uniform sampler2D depthMap;
|
|
|
varying vec2 v_Texcoord;
|
|
|
@import clay.util.decode_float
|
|
|
void main() {
|
|
|
vec4 tex = texture2D(depthMap, v_Texcoord);
|
|
|
#ifdef USE_VSM
|
|
|
gl_FragColor = vec4(tex.rgb, 1.0);
|
|
|
#else
|
|
|
float depth = decodeFloat(tex);
|
|
|
gl_FragColor = vec4(depth, depth, depth, 1.0);
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.sm.distance.vertex
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform mat4 world : WORLD;
|
|
|
attribute vec3 position : POSITION;
|
|
|
@import clay.chunk.skinning_header
|
|
|
varying vec3 v_WorldPosition;
|
|
|
void main (){
|
|
|
vec3 skinnedPosition = position;
|
|
|
#ifdef SKINNING
|
|
|
@import clay.chunk.skin_matrix
|
|
|
skinnedPosition = (skinMatrixWS * vec4(position, 1.0)).xyz;
|
|
|
#endif
|
|
|
gl_Position = worldViewProjection * vec4(skinnedPosition , 1.0);
|
|
|
v_WorldPosition = (world * vec4(skinnedPosition, 1.0)).xyz;
|
|
|
}
|
|
|
@end
|
|
|
@export clay.sm.distance.fragment
|
|
|
uniform vec3 lightPosition;
|
|
|
uniform float range : 100;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
@import clay.util.encode_float
|
|
|
void main(){
|
|
|
float dist = distance(lightPosition, v_WorldPosition);
|
|
|
#ifdef USE_VSM
|
|
|
gl_FragColor = vec4(dist, dist * dist, 0.0, 0.0);
|
|
|
#else
|
|
|
dist = dist / range;
|
|
|
gl_FragColor = encodeFloat(dist);
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.plugin.shadow_map_common
|
|
|
@import clay.util.decode_float
|
|
|
float tapShadowMap(sampler2D map, vec2 uv, float z){
|
|
|
vec4 tex = texture2D(map, uv);
|
|
|
return step(z, decodeFloat(tex) * 2.0 - 1.0);
|
|
|
}
|
|
|
float pcf(sampler2D map, vec2 uv, float z, float textureSize, vec2 scale) {
|
|
|
float shadowContrib = tapShadowMap(map, uv, z);
|
|
|
vec2 offset = vec2(1.0 / textureSize) * scale;
|
|
|
#ifdef PCF_KERNEL_SIZE
|
|
|
for (int _idx_ = 0; _idx_ < PCF_KERNEL_SIZE; _idx_++) {{
|
|
|
shadowContrib += tapShadowMap(map, uv + offset * pcfKernel[_idx_], z);
|
|
|
}}
|
|
|
return shadowContrib / float(PCF_KERNEL_SIZE + 1);
|
|
|
#else
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(offset.x, 0.0), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(offset.x, offset.y), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, offset.y), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(0.0, offset.y), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, 0.0), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(-offset.x, -offset.y), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(offset.x, -offset.y), z);
|
|
|
shadowContrib += tapShadowMap(map, uv+vec2(0.0, -offset.y), z);
|
|
|
return shadowContrib / 9.0;
|
|
|
#endif
|
|
|
}
|
|
|
float pcf(sampler2D map, vec2 uv, float z, float textureSize) {
|
|
|
return pcf(map, uv, z, textureSize, vec2(1.0));
|
|
|
}
|
|
|
float chebyshevUpperBound(vec2 moments, float z){
|
|
|
float p = 0.0;
|
|
|
z = z * 0.5 + 0.5;
|
|
|
if (z <= moments.x) {
|
|
|
p = 1.0;
|
|
|
}
|
|
|
float variance = moments.y - moments.x * moments.x;
|
|
|
variance = max(variance, 0.0000001);
|
|
|
float mD = moments.x - z;
|
|
|
float pMax = variance / (variance + mD * mD);
|
|
|
pMax = clamp((pMax-0.4)/(1.0-0.4), 0.0, 1.0);
|
|
|
return max(p, pMax);
|
|
|
}
|
|
|
float computeShadowContrib(
|
|
|
sampler2D map, mat4 lightVPM, vec3 position, float textureSize, vec2 scale, vec2 offset
|
|
|
) {
|
|
|
vec4 posInLightSpace = lightVPM * vec4(position, 1.0);
|
|
|
posInLightSpace.xyz /= posInLightSpace.w;
|
|
|
float z = posInLightSpace.z;
|
|
|
if(all(greaterThan(posInLightSpace.xyz, vec3(-0.99, -0.99, -1.0))) &&
|
|
|
all(lessThan(posInLightSpace.xyz, vec3(0.99, 0.99, 1.0)))){
|
|
|
vec2 uv = (posInLightSpace.xy+1.0) / 2.0;
|
|
|
#ifdef USE_VSM
|
|
|
vec2 moments = texture2D(map, uv * scale + offset).xy;
|
|
|
return chebyshevUpperBound(moments, z);
|
|
|
#else
|
|
|
return pcf(map, uv * scale + offset, z, textureSize, scale);
|
|
|
#endif
|
|
|
}
|
|
|
return 1.0;
|
|
|
}
|
|
|
float computeShadowContrib(sampler2D map, mat4 lightVPM, vec3 position, float textureSize) {
|
|
|
return computeShadowContrib(map, lightVPM, position, textureSize, vec2(1.0), vec2(0.0));
|
|
|
}
|
|
|
float computeShadowContribOmni(samplerCube map, vec3 direction, float range)
|
|
|
{
|
|
|
float dist = length(direction);
|
|
|
vec4 shadowTex = textureCube(map, direction);
|
|
|
#ifdef USE_VSM
|
|
|
vec2 moments = shadowTex.xy;
|
|
|
float variance = moments.y - moments.x * moments.x;
|
|
|
float mD = moments.x - dist;
|
|
|
float p = variance / (variance + mD * mD);
|
|
|
if(moments.x + 0.001 < dist){
|
|
|
return clamp(p, 0.0, 1.0);
|
|
|
}else{
|
|
|
return 1.0;
|
|
|
}
|
|
|
#else
|
|
|
return step(dist, (decodeFloat(shadowTex) + 0.0002) * range);
|
|
|
#endif
|
|
|
}
|
|
|
@end
|
|
|
@export clay.plugin.compute_shadow_map
|
|
|
#if defined(SPOT_LIGHT_SHADOWMAP_COUNT) || defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT) || defined(POINT_LIGHT_SHADOWMAP_COUNT)
|
|
|
#ifdef SPOT_LIGHT_SHADOWMAP_COUNT
|
|
|
uniform sampler2D spotLightShadowMaps[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
uniform mat4 spotLightMatrices[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
uniform float spotLightShadowMapSizes[SPOT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
#endif
|
|
|
#ifdef DIRECTIONAL_LIGHT_SHADOWMAP_COUNT
|
|
|
#if defined(SHADOW_CASCADE)
|
|
|
uniform sampler2D directionalLightShadowMaps[1]:unconfigurable;
|
|
|
uniform mat4 directionalLightMatrices[SHADOW_CASCADE]:unconfigurable;
|
|
|
uniform float directionalLightShadowMapSizes[1]:unconfigurable;
|
|
|
uniform float shadowCascadeClipsNear[SHADOW_CASCADE]:unconfigurable;
|
|
|
uniform float shadowCascadeClipsFar[SHADOW_CASCADE]:unconfigurable;
|
|
|
#else
|
|
|
uniform sampler2D directionalLightShadowMaps[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
uniform mat4 directionalLightMatrices[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
uniform float directionalLightShadowMapSizes[DIRECTIONAL_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
#endif
|
|
|
#endif
|
|
|
#ifdef POINT_LIGHT_SHADOWMAP_COUNT
|
|
|
uniform samplerCube pointLightShadowMaps[POINT_LIGHT_SHADOWMAP_COUNT]:unconfigurable;
|
|
|
#endif
|
|
|
uniform bool shadowEnabled : true;
|
|
|
#ifdef PCF_KERNEL_SIZE
|
|
|
uniform vec2 pcfKernel[PCF_KERNEL_SIZE];
|
|
|
#endif
|
|
|
@import clay.plugin.shadow_map_common
|
|
|
#if defined(SPOT_LIGHT_SHADOWMAP_COUNT)
|
|
|
void computeShadowOfSpotLights(vec3 position, inout float shadowContribs[SPOT_LIGHT_COUNT] ) {
|
|
|
float shadowContrib;
|
|
|
for(int _idx_ = 0; _idx_ < SPOT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{
|
|
|
shadowContrib = computeShadowContrib(
|
|
|
spotLightShadowMaps[_idx_], spotLightMatrices[_idx_], position,
|
|
|
spotLightShadowMapSizes[_idx_]
|
|
|
);
|
|
|
shadowContribs[_idx_] = shadowContrib;
|
|
|
}}
|
|
|
for(int _idx_ = SPOT_LIGHT_SHADOWMAP_COUNT; _idx_ < SPOT_LIGHT_COUNT; _idx_++){{
|
|
|
shadowContribs[_idx_] = 1.0;
|
|
|
}}
|
|
|
}
|
|
|
#endif
|
|
|
#if defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
#ifdef SHADOW_CASCADE
|
|
|
void computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){
|
|
|
float depth = (2.0 * gl_FragCoord.z - gl_DepthRange.near - gl_DepthRange.far)
|
|
|
/ (gl_DepthRange.far - gl_DepthRange.near);
|
|
|
float shadowContrib;
|
|
|
shadowContribs[0] = 1.0;
|
|
|
for (int _idx_ = 0; _idx_ < SHADOW_CASCADE; _idx_++) {{
|
|
|
if (
|
|
|
depth >= shadowCascadeClipsNear[_idx_] &&
|
|
|
depth <= shadowCascadeClipsFar[_idx_]
|
|
|
) {
|
|
|
shadowContrib = computeShadowContrib(
|
|
|
directionalLightShadowMaps[0], directionalLightMatrices[_idx_], position,
|
|
|
directionalLightShadowMapSizes[0],
|
|
|
vec2(1.0 / float(SHADOW_CASCADE), 1.0),
|
|
|
vec2(float(_idx_) / float(SHADOW_CASCADE), 0.0)
|
|
|
);
|
|
|
shadowContribs[0] = shadowContrib;
|
|
|
}
|
|
|
}}
|
|
|
for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{
|
|
|
shadowContribs[_idx_] = 1.0;
|
|
|
}}
|
|
|
}
|
|
|
#else
|
|
|
void computeShadowOfDirectionalLights(vec3 position, inout float shadowContribs[DIRECTIONAL_LIGHT_COUNT]){
|
|
|
float shadowContrib;
|
|
|
for(int _idx_ = 0; _idx_ < DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_++) {{
|
|
|
shadowContrib = computeShadowContrib(
|
|
|
directionalLightShadowMaps[_idx_], directionalLightMatrices[_idx_], position,
|
|
|
directionalLightShadowMapSizes[_idx_]
|
|
|
);
|
|
|
shadowContribs[_idx_] = shadowContrib;
|
|
|
}}
|
|
|
for(int _idx_ = DIRECTIONAL_LIGHT_SHADOWMAP_COUNT; _idx_ < DIRECTIONAL_LIGHT_COUNT; _idx_++) {{
|
|
|
shadowContribs[_idx_] = 1.0;
|
|
|
}}
|
|
|
}
|
|
|
#endif
|
|
|
#endif
|
|
|
#if defined(POINT_LIGHT_SHADOWMAP_COUNT)
|
|
|
void computeShadowOfPointLights(vec3 position, inout float shadowContribs[POINT_LIGHT_COUNT] ){
|
|
|
vec3 lightPosition;
|
|
|
vec3 direction;
|
|
|
for(int _idx_ = 0; _idx_ < POINT_LIGHT_SHADOWMAP_COUNT; _idx_++) {{
|
|
|
lightPosition = pointLightPosition[_idx_];
|
|
|
direction = position - lightPosition;
|
|
|
shadowContribs[_idx_] = computeShadowContribOmni(pointLightShadowMaps[_idx_], direction, pointLightRange[_idx_]);
|
|
|
}}
|
|
|
for(int _idx_ = POINT_LIGHT_SHADOWMAP_COUNT; _idx_ < POINT_LIGHT_COUNT; _idx_++) {{
|
|
|
shadowContribs[_idx_] = 1.0;
|
|
|
}}
|
|
|
}
|
|
|
#endif
|
|
|
#endif
|
|
|
@end`},function(re,V,b){"use strict";var U=b(7),C=b(5),w=b(6),y=b(10),T=b(156),x=b(162),p=b(164),m=b(166),L=b(2),d=b(167),g=b(169),A=b(9),M=b(170),O=b(171),S=b(172),I=b(173),c=b(174),f=b(175),P=b(176),N=b(177),k=b(178),W=b(179),z=b(180),Z=b(181);U.a.import(O.a),U.a.import(S.a),U.a.import(I.a),U.a.import(c.a),U.a.import(f.a),U.a.import(P.a),U.a.import(N.a),U.a.import(k.a),U.a.import(W.a),U.a.import(z.a),U.a.import(Z.a);var J={color:{parameters:{width:function(ie){return ie.getWidth()},height:function(ie){return ie.getHeight()}}}},ee=["composite","FXAA"];function $(){this._sourceTexture=new C.a({type:w.a.HALF_FLOAT}),this._depthTexture=new C.a({format:w.a.DEPTH_COMPONENT,type:w.a.UNSIGNED_INT}),this._framebuffer=new y.a,this._framebuffer.attach(this._sourceTexture),this._framebuffer.attach(this._depthTexture,y.a.DEPTH_ATTACHMENT),this._normalPass=new d.a,this._compositor=Object(T.a)(M.a);var ie=this._compositor.getNodeByName("source");ie.texture=this._sourceTexture;var se=this._compositor.getNodeByName("coc");this._sourceNode=ie,this._cocNode=se,this._compositeNode=this._compositor.getNodeByName("composite"),this._fxaaNode=this._compositor.getNodeByName("FXAA"),this._dofBlurNodes=["dof_far_blur","dof_near_blur","dof_coc_blur"].map(function(ce){return this._compositor.getNodeByName(ce)},this),this._dofBlurKernel=0,this._dofBlurKernelSize=new Float32Array(0),this._finalNodesChain=ee.map(function(ce){return this._compositor.getNodeByName(ce)},this);var ne={normalTexture:this._normalPass.getNormalTexture(),depthTexture:this._normalPass.getDepthTexture()};this._ssaoPass=new x.a(ne),this._ssrPass=new p.a(ne),this._edgePass=new g.a(ne)}$.prototype.resize=function(ce,ae,ne){ne=ne||1;var ce=ce*ne,ae=ae*ne,fe=this._sourceTexture,oe=this._depthTexture;fe.width=ce,fe.height=ae,oe.width=ce,oe.height=ae},$.prototype._ifRenderNormalPass=function(){return this._enableSSAO||this._enableEdge||this._enableSSR},$.prototype._getPrevNode=function(ie){for(var se=ee.indexOf(ie.name)-1,ne=this._finalNodesChain[se];ne&&!this._compositor.getNodeByName(ne.name);)se-=1,ne=this._finalNodesChain[se];return ne},$.prototype._getNextNode=function(ie){for(var se=ee.indexOf(ie.name)+1,ne=this._finalNodesChain[se];ne&&!this._compositor.getNodeByName(ne.name);)se+=1,ne=this._finalNodesChain[se];return ne},$.prototype._addChainNode=function(ie){var se=this._getPrevNode(ie),ne=this._getNextNode(ie);se&&(se.outputs=J,ie.inputs.texture=se.name,ne?(ie.outputs=J,ne.inputs.texture=ie.name):ie.outputs=null,this._compositor.addNode(ie))},$.prototype._removeChainNode=function(ie){var se=this._getPrevNode(ie),ne=this._getNextNode(ie);se&&(ne?(se.outputs=J,ne.inputs.texture=se.name):se.outputs=null,this._compositor.removeNode(ie))},$.prototype.updateNormal=function(ie,se,ne,ce){this._ifRenderNormalPass()&&this._normalPass.update(ie,se,ne)},$.prototype.updateSSAO=function(ie,se,ne,ce){this._ssaoPass.update(ie,ne,ce)},$.prototype.enableSSAO=function(){this._enableSSAO=!0},$.prototype.disableSSAO=function(){this._enableSSAO=!1},$.prototype.enableSSR=function(){this._enableSSR=!0},$.prototype.disableSSR=function(){this._enableSSR=!1},$.prototype.getSSAOTexture=function(ie,se,ne,ce){return this._ssaoPass.getTargetTexture()},$.prototype.getSourceFrameBuffer=function(){return this._framebuffer},$.prototype.getSourceTexture=function(){return this._sourceTexture},$.prototype.disableFXAA=function(){this._removeChainNode(this._fxaaNode)},$.prototype.enableFXAA=function(){this._addChainNode(this._fxaaNode)},$.prototype.enableBloom=function(){this._compositeNode.inputs.bloom="bloom_composite",this._compositor.dirty()},$.prototype.disableBloom=function(){this._compositeNode.inputs.bloom=null,this._compositor.dirty()},$.prototype.enableDOF=function(){this._compositeNode.inputs.texture="dof_composite",this._compositor.dirty()},$.prototype.disableDOF=function(){this._compositeNode.inputs.texture="source",this._compositor.dirty()},$.prototype.enableColorCorrection=function(){this._compositeNode.define("COLOR_CORRECTION"),this._enableColorCorrection=!0},$.prototype.disableColorCorrection=function(){this._compositeNode.undefine("COLOR_CORRECTION"),this._enableColorCorrection=!1},$.prototype.enableEdge=function(){this._enableEdge=!0},$.prototype.disableEdge=function(){this._enableEdge=!1},$.prototype.setBloomIntensity=function(ie){this._compositeNode.setParameter("bloomIntensity",ie)},$.prototype.setSSAOParameter=function(ie,se){switch(ie){case"quality":var ne={low:6,medium:12,high:32,ultra:62}[se]||12;this._ssaoPass.setParameter("kernelSize",ne);break;case"radius":this._ssaoPass.setParameter(ie,se),this._ssaoPass.setParameter("bias",se/200);break;case"intensity":this._ssaoPass.setParameter(ie,se);break;default:console.warn("Unkown SSAO parameter "+ie)}},$.prototype.setDOFParameter=function(ie,se){switch(ie){case"focalDistance":case"focalRange":case"fstop":this._cocNode.setParameter(ie,se);break;case"blurRadius":for(var ne=0;ne<this._dofBlurNodes.length;ne++)this._dofBlurNodes[ne].setParameter("blurRadius",se);break;case"quality":var ce={low:4,medium:8,high:16,ultra:32}[se]||8;this._dofBlurKernelSize=ce;for(var ne=0;ne<this._dofBlurNodes.length;ne++)this._dofBlurNodes[ne].pass.material.define("POISSON_KERNEL_SIZE",ce);this._dofBlurKernel=new Float32Array(ce*2);break;default:console.warn("Unkown DOF parameter "+ie)}},$.prototype.setSSRParameter=function(ie,se){switch(ie){case"quality":var ne={low:10,medium:20,high:40,ultra:80}[se]||20,ce={low:32,medium:16,high:8,ultra:4}[se]||16;this._ssrPass.setParameter("maxIteration",ne),this._ssrPass.setParameter("pixelStride",ce);break;case"maxRoughness":this._ssrPass.setParameter("minGlossiness",Math.max(Math.min(1-se,1),0));break;default:console.warn("Unkown SSR parameter "+ie)}},$.prototype.setEdgeColor=function(ie){var se=L.a.parseColor(ie);this._edgePass.setParameter("edgeColor",se)},$.prototype.setExposure=function(ie){this._compositeNode.setParameter("exposure",Math.pow(2,ie))},$.prototype.setColorLookupTexture=function(ie,se){this._compositeNode.pass.material.setTextureImage("lut",this._enableColorCorrection?ie:"none",se,{minFilter:L.a.Texture.NEAREST,magFilter:L.a.Texture.NEAREST,flipY:!1})},$.prototype.setColorCorrection=function(ie,se){this._compositeNode.setParameter(ie,se)},$.prototype.composite=function(ie,se,ne,ce){var ae=this._sourceTexture,fe=ae;this._enableEdge&&(this._edgePass.update(ie,se,ae,ce),ae=fe=this._edgePass.getTargetTexture()),this._enableSSR&&(this._ssrPass.update(ie,se,ae,ce),fe=this._ssrPass.getTargetTexture(),this._ssrPass.setSSAOTexture(this._enableSSAO?this._ssaoPass.getTargetTexture():null)),this._sourceNode.texture=fe,this._cocNode.setParameter("depth",this._depthTexture);for(var oe=this._dofBlurKernel,pe=this._dofBlurKernelSize,_e=Math.floor(m.a.length/2/pe),de=ce%_e,be=0;be<pe*2;be++)oe[be]=m.a[be+de*pe*2];for(var be=0;be<this._dofBlurNodes.length;be++)this._dofBlurNodes[be].setParameter("percent",ce/30),this._dofBlurNodes[be].setParameter("poissonKernel",oe);this._cocNode.setParameter("zNear",se.near),this._cocNode.setParameter("zFar",se.far),this._compositor.render(ie,ne)},$.prototype.dispose=function(ie){this._sourceTexture.dispose(ie),this._depthTexture.dispose(ie),this._framebuffer.dispose(ie),this._compositor.dispose(ie),this._normalPass.dispose(ie),this._ssaoPass.dispose(ie)},V.a=$},function(re,V,b){"use strict";var U=b(21),C=b(157),w=b(159),y=b(160),T=b(161),x=b(7),p=b(6),m=b(5),L=b(25),d=/^#source\((.*?)\)/;function g(f,P){var N=new C.a;P=P||{};var k={textures:{},parameters:{}},W=function(J,ee){for(var $=0;$<f.nodes.length;$++){var ie=f.nodes[$],se=A(ie,k,P);se&&N.addNode(se)}};for(var z in f.parameters){var Z=f.parameters[z];k.parameters[z]=M(Z)}return O(f,k,P,function(J){k.textures=J,W()}),N}function A(f,P,N){var k=f.type||"filter",W,z,Z;if(k==="filter"){var J=f.shader.trim(),ee=d.exec(J);if(ee?W=x.a.source(ee[1].trim()):J.charAt(0)==="#"&&(W=P.shaders[J.substr(1)]),W||(W=J),!W)return}if(f.inputs){z={};for(var $ in f.inputs)typeof f.inputs[$]=="string"?z[$]=f.inputs[$]:z[$]={node:f.inputs[$].node,pin:f.inputs[$].pin}}if(f.outputs){Z={};for(var $ in f.outputs){var ie=f.outputs[$];Z[$]={},ie.attachment!=null&&(Z[$].attachment=ie.attachment),ie.keepLastFrame!=null&&(Z[$].keepLastFrame=ie.keepLastFrame),ie.outputLastFrame!=null&&(Z[$].outputLastFrame=ie.outputLastFrame),ie.parameters&&(Z[$].parameters=M(ie.parameters))}}var se;if(k==="scene"?se=new w.a({name:f.name,scene:N.scene,camera:N.camera,outputs:Z}):k==="texture"?se=new y.a({name:f.name,outputs:Z}):se=new T.a({name:f.name,shader:W,inputs:z,outputs:Z}),se){if(f.parameters)for(var $ in f.parameters){var ne=f.parameters[$];typeof ne=="string"&&(ne=ne.trim(),ne.charAt(0)==="#"?ne=P.textures[ne.substr(1)]:se.on("beforerender",S($,c(ne)))),se.setParameter($,ne)}if(f.defines&&se.pass)for(var $ in f.defines){var ne=f.defines[$];se.pass.material.define("fragment",$,ne)}}return se}function M(f){var P={};return f&&(["type","minFilter","magFilter","wrapS","wrapT","flipY","useMipmap"].forEach(function(N){var k=f[N];k!=null&&(typeof k=="string"&&(k=p.a[k]),P[N]=k)}),["width","height"].forEach(function(N){if(f[N]!=null){var k=f[N];typeof k=="string"?(k=k.trim(),P[N]=I(N,c(k))):P[N]=k}}),f.useMipmap!=null&&(P.useMipmap=f.useMipmap)),P}function O(f,P,N,k){if(!f.textures){k({});return}var W={},z=0,Z=!1,J=N.textureRootPath;U.a.each(f.textures,function(ee,$){var ie,se=ee.path,ne=M(ee.parameters);if(Array.isArray(se)&&se.length===6)J&&(se=se.map(function(ce){return U.a.relative2absolute(ce,J)})),ie=new L.a(ne);else if(typeof se=="string")J&&(se=U.a.relative2absolute(se,J)),ie=new m.a(ne);else return;ie.load(se),z++,ie.once("success",function(){W[$]=ie,z--,z===0&&(k(W),Z=!0)})}),z===0&&!Z&&k(W)}function S(f,P){return function(N){var k=N.getDevicePixelRatio(),W=N.getWidth(),z=N.getHeight(),Z=P(W,z,k);this.setParameter(f,Z)}}function I(f,P){return function(N){var k=N.getDevicePixelRatio(),W=N.getWidth(),z=N.getHeight();return P(W,z,k)}}function c(f){var P=/^expr\((.*)\)$/.exec(f);if(P)try{var N=new Function("width","height","dpr","return "+P[1]);return N(1,1),N}catch(k){throw new Error("Invalid expression.")}}V.a=g},function(re,V,b){"use strict";var U=b(158),C=b(79),w=b(10),y=U.a.extend(function(){return{_outputs:[],_texturePool:new C.a,_frameBuffer:new w.a({depthBuffer:!1})}},{addNode:function(T){U.a.prototype.addNode.call(this,T),T._compositor=this},render:function(T,x){if(this._dirty){this.update(),this._dirty=!1,this._outputs.length=0;for(var p=0;p<this.nodes.length;p++)this.nodes[p].outputs||this._outputs.push(this.nodes[p])}for(var p=0;p<this.nodes.length;p++)this.nodes[p].beforeFrame();for(var p=0;p<this._outputs.length;p++)this._outputs[p].updateReference();for(var p=0;p<this._outputs.length;p++)this._outputs[p].render(T,x);for(var p=0;p<this.nodes.length;p++)this.nodes[p].afterFrame()},allocateTexture:function(T){return this._texturePool.get(T)},releaseTexture:function(T){this._texturePool.put(T)},getFrameBuffer:function(){return this._frameBuffer},dispose:function(T){this._texturePool.clear(T)}});V.a=y},function(re,V,b){"use strict";var U=b(8),C=b(42),w=U.a.extend(function(){return{nodes:[]}},{dirty:function(){this._dirty=!0},addNode:function(y){this.nodes.indexOf(y)>=0||(this.nodes.push(y),this._dirty=!0)},removeNode:function(y){typeof y=="string"&&(y=this.getNodeByName(y));var T=this.nodes.indexOf(y);T>=0&&(this.nodes.splice(T,1),this._dirty=!0)},getNodeByName:function(y){for(var T=0;T<this.nodes.length;T++)if(this.nodes[T].name===y)return this.nodes[T]},update:function(){for(var y=0;y<this.nodes.length;y++)this.nodes[y].clear();for(var y=0;y<this.nodes.length;y++){var T=this.nodes[y];if(T.inputs){for(var x in T.inputs)if(T.inputs[x]){if(T.pass&&!T.pass.material.isUniformEnabled(x)){console.warn("Pin "+T.name+"."+x+" not used.");continue}var p=T.inputs[x],m=this.findPin(p);m?T.link(x,m.node,m.pin):console.warn(typeof p=="string"?"Node "+p+" not exist":"Pin of "+p.node+"."+p.pin+" not exist")}}}},findPin:function(y){var T;if((typeof y=="string"||y instanceof C.a)&&(y={node:y}),typeof y.node=="string")for(var x=0;x<this.nodes.length;x++){var p=this.nodes[x];p.name===y.node&&(T=p)}else T=y.node;if(T){var m=y.pin;if(m||T.outputs&&(m=Object.keys(T.outputs)[0]),T.outputs[m])return{node:T,pin:m}}}});V.a=w},function(re,V,b){"use strict";var U=b(42),C=b(11),w=b(10),y=U.a.extend({name:"scene",scene:null,camera:null,autoUpdateScene:!0,preZ:!1},function(){this.frameBuffer=new w.a},{render:function(T){this._rendering=!0;var x=T.gl;this.trigger("beforerender");var p;if(!this.outputs)p=T.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ);else{var m=this.frameBuffer;for(var L in this.outputs){var d=this.updateParameter(L,T),g=this.outputs[L],A=this._compositor.allocateTexture(d);this._outputTextures[L]=A;var M=g.attachment||x.COLOR_ATTACHMENT0;typeof M=="string"&&(M=x[M]),m.attach(A,M)}m.bind(T);var O=T.getGLExtension("EXT_draw_buffers");if(O){var S=[];for(var M in this.outputs)M=parseInt(M),M>=x.COLOR_ATTACHMENT0&&M<=x.COLOR_ATTACHMENT0+8&&S.push(M);O.drawBuffersEXT(S)}T.saveClear(),T.clearBit=C.a.DEPTH_BUFFER_BIT|C.a.COLOR_BUFFER_BIT,p=T.render(this.scene,this.camera,!this.autoUpdateScene,this.preZ),T.restoreClear(),m.unbind(T)}this.trigger("afterrender",p),this._rendering=!1,this._rendered=!0}});V.a=y},function(re,V,b){"use strict";var U=b(42),C=U.a.extend(function(){return{texture:null,outputs:{color:{}}}},function(){},{getOutput:function(w,y){return this.texture},beforeFrame:function(){},afterFrame:function(){}});V.a=C},function(re,V,b){"use strict";var U=b(14),C=b(42),w=C.a.extend(function(){return{name:"",inputs:{},outputs:null,shader:"",inputLinks:{},outputLinks:{},pass:null,_prevOutputTextures:{},_outputTextures:{},_outputReferences:{},_rendering:!1,_rendered:!1,_compositor:null}},function(){var y=new U.a({fragment:this.shader});this.pass=y},{render:function(y,T){this.trigger("beforerender",y),this._rendering=!0;var x=y.gl;for(var p in this.inputLinks){var m=this.inputLinks[p],L=m.node.getOutput(y,m.pin);this.pass.setUniform(p,L)}if(!this.outputs)this.pass.outputs=null,this._compositor.getFrameBuffer().unbind(y),this.pass.render(y,T);else{this.pass.outputs={};var d={};for(var g in this.outputs){var A=this.updateParameter(g,y);isNaN(A.width)&&this.updateParameter(g,y);var M=this.outputs[g],O=this._compositor.allocateTexture(A);this._outputTextures[g]=O;var S=M.attachment||x.COLOR_ATTACHMENT0;typeof S=="string"&&(S=x[S]),d[S]=O}this._compositor.getFrameBuffer().bind(y);for(var S in d)this._compositor.getFrameBuffer().attach(d[S],S);this.pass.render(y),this._compositor.getFrameBuffer().updateMipmap(y.gl)}for(var p in this.inputLinks){var m=this.inputLinks[p];m.node.removeReference(m.pin)}this._rendering=!1,this._rendered=!0,this.trigger("afterrender",y)},updateParameter:function(y,T){var x=this.outputs[y],p=x.parameters,m=x._parametersCopy;if(m||(m=x._parametersCopy={}),p)for(var L in p)L!=="width"&&L!=="height"&&(m[L]=p[L]);var d,g;return p.width instanceof Function?d=p.width.call(this,T):d=p.width,p.height instanceof Function?g=p.height.call(this,T):g=p.height,(m.width!==d||m.height!==g)&&this._outputTextures[y]&&this._outputTextures[y].dispose(T),m.width=d,m.height=g,m},setParameter:function(y,T){this.pass.setUniform(y,T)},getParameter:function(y){return this.pass.getUniform(y)},setParameters:function(y){for(var T in y)this.setParameter(T,y[T])},define:function(y,T){this.pass.material.define("fragment",y,T)},undefine:function(y){this.pass.material.undefine("fragment",y)},removeReference:function(y){if(this._outputReferences[y]--,this._outputReferences[y]===0){var T=this.outputs[y];T.keepLastFrame?(this._prevOutputTextures[y]&&this._compositor.releaseTexture(this._prevOutputTextures[y]),this._prevOutputTextures[y]=this._outputTextures[y]):this._compositor.releaseTexture(this._outputTextures[y])}},clear:function(){C.a.prototype.clear.call(this),this.pass.material.disableTexturesAll()}});V.a=w},function(re,V,b){"use strict";var U=b(9),C=b(4),w=b(5),y=b(6),T=b(14),x=b(7),p=b(10),m=b(43),L=b(163);x.a.import(L.a);function d(O){for(var S=new Uint8Array(O*O*4),I=0,c=new C.a,f=0;f<O;f++)for(var P=0;P<O;P++)c.set(Math.random()*2-1,Math.random()*2-1,0).normalize(),S[I++]=(c.x*.5+.5)*255,S[I++]=(c.y*.5+.5)*255,S[I++]=0,S[I++]=255;return S}function g(O){return new w.a({pixels:d(O),wrapS:y.a.REPEAT,wrapT:y.a.REPEAT,width:O,height:O})}function A(O,S,I){var c=new Float32Array(O*3);S=S||0;for(var f=0;f<O;f++){var P=Object(m.a)(f+S,2)*(I?1:2)*Math.PI,N=Object(m.a)(f+S,3)*Math.PI,k=Math.random(),W=Math.cos(P)*Math.sin(N)*k,z=Math.cos(N)*k,Z=Math.sin(P)*Math.sin(N)*k;c[f*3]=W,c[f*3+1]=z,c[f*3+2]=Z}return c}function M(O){O=O||{},this._ssaoPass=new T.a({fragment:x.a.source("ecgl.ssao.estimate")}),this._blurPass=new T.a({fragment:x.a.source("ecgl.ssao.blur")}),this._framebuffer=new p.a({depthBuffer:!1}),this._ssaoTexture=new w.a,this._blurTexture=new w.a,this._blurTexture2=new w.a,this._depthTex=O.depthTexture,this._normalTex=O.normalTexture,this.setNoiseSize(4),this.setKernelSize(O.kernelSize||12),O.radius!=null&&this.setParameter("radius",O.radius),O.power!=null&&this.setParameter("power",O.power),this._normalTex||(this._ssaoPass.material.disableTexture("normalTex"),this._blurPass.material.disableTexture("normalTex")),this._depthTex||this._blurPass.material.disableTexture("depthTex"),this._blurPass.material.setUniform("normalTex",this._normalTex),this._blurPass.material.setUniform("depthTex",this._depthTex)}M.prototype.setDepthTexture=function(O){this._depthTex=O},M.prototype.setNormalTexture=function(O){this._normalTex=O,this._ssaoPass.material[O?"enableTexture":"disableTexture"]("normalTex"),this.setKernelSize(this._kernelSize)},M.prototype.update=function(O,S,I){var c=O.getWidth(),f=O.getHeight(),P=this._ssaoPass,N=this._blurPass;P.setUniform("kernel",this._kernels[I%this._kernels.length]),P.setUniform("depthTex",this._depthTex),this._normalTex!=null&&P.setUniform("normalTex",this._normalTex),P.setUniform("depthTexSize",[this._depthTex.width,this._depthTex.height]);var k=new U.a;U.a.transpose(k,S.worldTransform),P.setUniform("projection",S.projectionMatrix.array),P.setUniform("projectionInv",S.invProjectionMatrix.array),P.setUniform("viewInverseTranspose",k.array);var W=this._ssaoTexture,z=this._blurTexture,Z=this._blurTexture2;W.width=c/2,W.height=f/2,z.width=c,z.height=f,Z.width=c,Z.height=f,this._framebuffer.attach(W),this._framebuffer.bind(O),O.gl.clearColor(1,1,1,1),O.gl.clear(O.gl.COLOR_BUFFER_BIT),P.render(O),N.setUniform("textureSize",[c/2,f/2]),N.setUniform("projection",S.projectionMatrix.array),this._framebuffer.attach(z),N.setUniform("direction",0),N.setUniform("ssaoTexture",W),N.render(O),this._framebuffer.attach(Z),N.setUniform("textureSize",[c,f]),N.setUniform("direction",1),N.setUniform("ssaoTexture",z),N.render(O),this._framebuffer.unbind(O);var J=O.clearColor;O.gl.clearColor(J[0],J[1],J[2],J[3])},M.prototype.getTargetTexture=function(){return this._blurTexture2},M.prototype.setParameter=function(O,S){O==="noiseTexSize"?this.setNoiseSize(S):O==="kernelSize"?this.setKernelSize(S):O==="intensity"?this._ssaoPass.material.set("intensity",S):this._ssaoPass.setUniform(O,S)},M.prototype.setKernelSize=function(O){this._kernelSize=O,this._ssaoPass.material.define("fragment","KERNEL_SIZE",O),this._kernels=this._kernels||[];for(var S=0;S<30;S++)this._kernels[S]=A(O,S*O,!!this._normalTex)},M.prototype.setNoiseSize=function(O){var S=this._ssaoPass.getUniform("noiseTex");S?(S.data=d(O),S.width=S.height=O,S.dirty()):(S=g(O),this._ssaoPass.setUniform("noiseTex",g(O))),this._ssaoPass.setUniform("noiseTexSize",[O,O])},M.prototype.dispose=function(O){this._blurTexture.dispose(O),this._ssaoTexture.dispose(O),this._blurTexture2.dispose(O)},V.a=M},function(re,V,b){"use strict";V.a=`@export ecgl.ssao.estimate
|
|
|
|
|
|
uniform sampler2D depthTex;
|
|
|
|
|
|
uniform sampler2D normalTex;
|
|
|
|
|
|
uniform sampler2D noiseTex;
|
|
|
|
|
|
uniform vec2 depthTexSize;
|
|
|
|
|
|
uniform vec2 noiseTexSize;
|
|
|
|
|
|
uniform mat4 projection;
|
|
|
|
|
|
uniform mat4 projectionInv;
|
|
|
|
|
|
uniform mat4 viewInverseTranspose;
|
|
|
|
|
|
uniform vec3 kernel[KERNEL_SIZE];
|
|
|
|
|
|
uniform float radius : 1;
|
|
|
|
|
|
uniform float power : 1;
|
|
|
|
|
|
uniform float bias: 1e-2;
|
|
|
|
|
|
uniform float intensity: 1.0;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
float ssaoEstimator(in vec3 originPos, in mat3 kernelBasis) {
|
|
|
float occlusion = 0.0;
|
|
|
|
|
|
for (int i = 0; i < KERNEL_SIZE; i++) {
|
|
|
vec3 samplePos = kernel[i];
|
|
|
#ifdef NORMALTEX_ENABLED
|
|
|
samplePos = kernelBasis * samplePos;
|
|
|
#endif
|
|
|
samplePos = samplePos * radius + originPos;
|
|
|
|
|
|
vec4 texCoord = projection * vec4(samplePos, 1.0);
|
|
|
texCoord.xy /= texCoord.w;
|
|
|
|
|
|
vec4 depthTexel = texture2D(depthTex, texCoord.xy * 0.5 + 0.5);
|
|
|
|
|
|
float sampleDepth = depthTexel.r * 2.0 - 1.0;
|
|
|
if (projection[3][3] == 0.0) {
|
|
|
sampleDepth = projection[3][2] / (sampleDepth * projection[2][3] - projection[2][2]);
|
|
|
}
|
|
|
else {
|
|
|
sampleDepth = (sampleDepth - projection[3][2]) / projection[2][2];
|
|
|
}
|
|
|
|
|
|
float rangeCheck = smoothstep(0.0, 1.0, radius / abs(originPos.z - sampleDepth));
|
|
|
occlusion += rangeCheck * step(samplePos.z, sampleDepth - bias);
|
|
|
}
|
|
|
#ifdef NORMALTEX_ENABLED
|
|
|
occlusion = 1.0 - occlusion / float(KERNEL_SIZE);
|
|
|
#else
|
|
|
occlusion = 1.0 - clamp((occlusion / float(KERNEL_SIZE) - 0.6) * 2.5, 0.0, 1.0);
|
|
|
#endif
|
|
|
return pow(occlusion, power);
|
|
|
}
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
|
|
|
vec4 depthTexel = texture2D(depthTex, v_Texcoord);
|
|
|
|
|
|
#ifdef NORMALTEX_ENABLED
|
|
|
vec4 tex = texture2D(normalTex, v_Texcoord);
|
|
|
if (dot(tex.rgb, tex.rgb) == 0.0) {
|
|
|
gl_FragColor = vec4(1.0);
|
|
|
return;
|
|
|
}
|
|
|
vec3 N = tex.rgb * 2.0 - 1.0;
|
|
|
N = (viewInverseTranspose * vec4(N, 0.0)).xyz;
|
|
|
|
|
|
vec2 noiseTexCoord = depthTexSize / vec2(noiseTexSize) * v_Texcoord;
|
|
|
vec3 rvec = texture2D(noiseTex, noiseTexCoord).rgb * 2.0 - 1.0;
|
|
|
vec3 T = normalize(rvec - N * dot(rvec, N));
|
|
|
vec3 BT = normalize(cross(N, T));
|
|
|
mat3 kernelBasis = mat3(T, BT, N);
|
|
|
#else
|
|
|
if (depthTexel.r > 0.99999) {
|
|
|
gl_FragColor = vec4(1.0);
|
|
|
return;
|
|
|
}
|
|
|
mat3 kernelBasis;
|
|
|
#endif
|
|
|
|
|
|
float z = depthTexel.r * 2.0 - 1.0;
|
|
|
|
|
|
vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);
|
|
|
vec4 p4 = projectionInv * projectedPos;
|
|
|
|
|
|
vec3 position = p4.xyz / p4.w;
|
|
|
|
|
|
float ao = ssaoEstimator(position, kernelBasis);
|
|
|
ao = clamp(1.0 - (1.0 - ao) * intensity, 0.0, 1.0);
|
|
|
gl_FragColor = vec4(vec3(ao), 1.0);
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.ssao.blur
|
|
|
#define SHADER_NAME SSAO_BLUR
|
|
|
|
|
|
uniform sampler2D ssaoTexture;
|
|
|
|
|
|
#ifdef NORMALTEX_ENABLED
|
|
|
uniform sampler2D normalTex;
|
|
|
#endif
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
uniform vec2 textureSize;
|
|
|
uniform float blurSize : 1.0;
|
|
|
|
|
|
uniform int direction: 0.0;
|
|
|
|
|
|
#ifdef DEPTHTEX_ENABLED
|
|
|
uniform sampler2D depthTex;
|
|
|
uniform mat4 projection;
|
|
|
uniform float depthRange : 0.5;
|
|
|
|
|
|
float getLinearDepth(vec2 coord)
|
|
|
{
|
|
|
float depth = texture2D(depthTex, coord).r * 2.0 - 1.0;
|
|
|
return projection[3][2] / (depth * projection[2][3] - projection[2][2]);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
float kernel[5];
|
|
|
kernel[0] = 0.122581;
|
|
|
kernel[1] = 0.233062;
|
|
|
kernel[2] = 0.288713;
|
|
|
kernel[3] = 0.233062;
|
|
|
kernel[4] = 0.122581;
|
|
|
|
|
|
vec2 off = vec2(0.0);
|
|
|
if (direction == 0) {
|
|
|
off[0] = blurSize / textureSize.x;
|
|
|
}
|
|
|
else {
|
|
|
off[1] = blurSize / textureSize.y;
|
|
|
}
|
|
|
|
|
|
vec2 coord = v_Texcoord;
|
|
|
|
|
|
float sum = 0.0;
|
|
|
float weightAll = 0.0;
|
|
|
|
|
|
#ifdef NORMALTEX_ENABLED
|
|
|
vec3 centerNormal = texture2D(normalTex, v_Texcoord).rgb * 2.0 - 1.0;
|
|
|
#endif
|
|
|
#if defined(DEPTHTEX_ENABLED)
|
|
|
float centerDepth = getLinearDepth(v_Texcoord);
|
|
|
#endif
|
|
|
|
|
|
for (int i = 0; i < 5; i++) {
|
|
|
vec2 coord = clamp(v_Texcoord + vec2(float(i) - 2.0) * off, vec2(0.0), vec2(1.0));
|
|
|
|
|
|
float w = kernel[i];
|
|
|
#ifdef NORMALTEX_ENABLED
|
|
|
vec3 normal = texture2D(normalTex, coord).rgb * 2.0 - 1.0;
|
|
|
w *= clamp(dot(normal, centerNormal), 0.0, 1.0);
|
|
|
#endif
|
|
|
#ifdef DEPTHTEX_ENABLED
|
|
|
float d = getLinearDepth(coord);
|
|
|
w *= (1.0 - smoothstep(abs(centerDepth - d) / depthRange, 0.0, 1.0));
|
|
|
#endif
|
|
|
|
|
|
weightAll += w;
|
|
|
sum += texture2D(ssaoTexture, coord).r * w;
|
|
|
}
|
|
|
|
|
|
gl_FragColor = vec4(vec3(sum / weightAll), 1.0);
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
`},function(re,V,b){"use strict";var U=b(9),C=b(4),w=b(5),y=b(6),T=b(14),x=b(7),p=b(10),m=b(43),L=b(165);x.a.import(L.a);function d(g){g=g||{},this._ssrPass=new T.a({fragment:x.a.source("ecgl.ssr.main"),clearColor:[0,0,0,0]}),this._blurPass1=new T.a({fragment:x.a.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._blurPass2=new T.a({fragment:x.a.source("ecgl.ssr.blur"),clearColor:[0,0,0,0]}),this._ssrPass.setUniform("gBufferTexture1",g.normalTexture),this._ssrPass.setUniform("gBufferTexture2",g.depthTexture),this._blurPass1.setUniform("gBufferTexture1",g.normalTexture),this._blurPass1.setUniform("gBufferTexture2",g.depthTexture),this._blurPass2.setUniform("gBufferTexture1",g.normalTexture),this._blurPass2.setUniform("gBufferTexture2",g.depthTexture),this._blurPass2.material.define("fragment","VERTICAL"),this._blurPass2.material.define("fragment","BLEND"),this._texture1=new w.a({type:y.a.HALF_FLOAT}),this._texture2=new w.a({type:y.a.HALF_FLOAT}),this._texture3=new w.a({type:y.a.HALF_FLOAT}),this._frameBuffer=new p.a({depthBuffer:!1})}d.prototype.update=function(g,A,M,O){var S=g.getWidth(),I=g.getHeight(),c=g.getDevicePixelRatio(),f=this._texture1,P=this._texture2,N=this._texture3;P.width=S/2,P.height=I/2,f.width=S,f.height=I,N.width=S*c,N.height=I*c;var k=this._frameBuffer,W=this._ssrPass,z=this._blurPass1,Z=this._blurPass2,J=new U.a;U.a.transpose(J,A.worldTransform),W.setUniform("sourceTexture",M),W.setUniform("projection",A.projectionMatrix.array),W.setUniform("projectionInv",A.invProjectionMatrix.array),W.setUniform("viewInverseTranspose",J.array),W.setUniform("nearZ",A.near),W.setUniform("jitterOffset",O/30),z.setUniform("textureSize",[S/2,I/2]),Z.setUniform("textureSize",[S,I]),Z.setUniform("sourceTexture",M),z.setUniform("projection",A.projectionMatrix.array),Z.setUniform("projection",A.projectionMatrix.array),k.attach(f),k.bind(g),W.render(g),k.attach(P),z.setUniform("texture",f),z.render(g),k.attach(N),Z.setUniform("texture",P),Z.render(g),k.unbind(g)},d.prototype.getTargetTexture=function(){return this._texture3},d.prototype.setParameter=function(g,A){g==="maxIteration"?this._ssrPass.material.define("fragment","MAX_ITERATION",A):this._ssrPass.setUniform(g,A)},d.prototype.setSSAOTexture=function(g){var A=this._blurPass2;g?(A.material.enableTexture("ssaoTex"),A.material.set("ssaoTex",g)):A.material.disableTexture("ssaoTex")},d.prototype.dispose=function(g){this._texture1.dispose(g),this._texture2.dispose(g),this._texture3.dispose(g),this._frameBuffer.dispose(g)},V.a=d},function(re,V,b){"use strict";V.a=`@export ecgl.ssr.main
|
|
|
|
|
|
#define MAX_ITERATION 20;
|
|
|
|
|
|
uniform sampler2D sourceTexture;
|
|
|
uniform sampler2D gBufferTexture1;
|
|
|
uniform sampler2D gBufferTexture2;
|
|
|
|
|
|
uniform mat4 projection;
|
|
|
uniform mat4 projectionInv;
|
|
|
uniform mat4 viewInverseTranspose;
|
|
|
|
|
|
uniform float maxRayDistance: 50;
|
|
|
|
|
|
uniform float pixelStride: 16;
|
|
|
uniform float pixelStrideZCutoff: 50;
|
|
|
uniform float screenEdgeFadeStart: 0.9;
|
|
|
uniform float eyeFadeStart : 0.2; uniform float eyeFadeEnd: 0.8;
|
|
|
uniform float minGlossiness: 0.2; uniform float zThicknessThreshold: 10;
|
|
|
|
|
|
uniform float nearZ;
|
|
|
uniform vec2 viewportSize : VIEWPORT_SIZE;
|
|
|
|
|
|
uniform float jitterOffset: 0;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
#ifdef DEPTH_DECODE
|
|
|
@import clay.util.decode_float
|
|
|
#endif
|
|
|
|
|
|
float fetchDepth(sampler2D depthTexture, vec2 uv)
|
|
|
{
|
|
|
vec4 depthTexel = texture2D(depthTexture, uv);
|
|
|
return depthTexel.r * 2.0 - 1.0;
|
|
|
}
|
|
|
|
|
|
float linearDepth(float depth)
|
|
|
{
|
|
|
if (projection[3][3] == 0.0) {
|
|
|
return projection[3][2] / (depth * projection[2][3] - projection[2][2]);
|
|
|
}
|
|
|
else {
|
|
|
return (depth - projection[3][2]) / projection[2][2];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
bool rayIntersectDepth(float rayZNear, float rayZFar, vec2 hitPixel)
|
|
|
{
|
|
|
if (rayZFar > rayZNear)
|
|
|
{
|
|
|
float t = rayZFar; rayZFar = rayZNear; rayZNear = t;
|
|
|
}
|
|
|
float cameraZ = linearDepth(fetchDepth(gBufferTexture2, hitPixel));
|
|
|
return rayZFar <= cameraZ && rayZNear >= cameraZ - zThicknessThreshold;
|
|
|
}
|
|
|
|
|
|
|
|
|
bool traceScreenSpaceRay(
|
|
|
vec3 rayOrigin, vec3 rayDir, float jitter,
|
|
|
out vec2 hitPixel, out vec3 hitPoint, out float iterationCount
|
|
|
)
|
|
|
{
|
|
|
float rayLength = ((rayOrigin.z + rayDir.z * maxRayDistance) > -nearZ)
|
|
|
? (-nearZ - rayOrigin.z) / rayDir.z : maxRayDistance;
|
|
|
|
|
|
vec3 rayEnd = rayOrigin + rayDir * rayLength;
|
|
|
|
|
|
vec4 H0 = projection * vec4(rayOrigin, 1.0);
|
|
|
vec4 H1 = projection * vec4(rayEnd, 1.0);
|
|
|
|
|
|
float k0 = 1.0 / H0.w, k1 = 1.0 / H1.w;
|
|
|
|
|
|
vec3 Q0 = rayOrigin * k0, Q1 = rayEnd * k1;
|
|
|
|
|
|
vec2 P0 = (H0.xy * k0 * 0.5 + 0.5) * viewportSize;
|
|
|
vec2 P1 = (H1.xy * k1 * 0.5 + 0.5) * viewportSize;
|
|
|
|
|
|
P1 += dot(P1 - P0, P1 - P0) < 0.0001 ? 0.01 : 0.0;
|
|
|
vec2 delta = P1 - P0;
|
|
|
|
|
|
bool permute = false;
|
|
|
if (abs(delta.x) < abs(delta.y)) {
|
|
|
permute = true;
|
|
|
delta = delta.yx;
|
|
|
P0 = P0.yx;
|
|
|
P1 = P1.yx;
|
|
|
}
|
|
|
float stepDir = sign(delta.x);
|
|
|
float invdx = stepDir / delta.x;
|
|
|
|
|
|
vec3 dQ = (Q1 - Q0) * invdx;
|
|
|
float dk = (k1 - k0) * invdx;
|
|
|
|
|
|
vec2 dP = vec2(stepDir, delta.y * invdx);
|
|
|
|
|
|
float strideScaler = 1.0 - min(1.0, -rayOrigin.z / pixelStrideZCutoff);
|
|
|
float pixStride = 1.0 + strideScaler * pixelStride;
|
|
|
|
|
|
dP *= pixStride; dQ *= pixStride; dk *= pixStride;
|
|
|
|
|
|
vec4 pqk = vec4(P0, Q0.z, k0);
|
|
|
vec4 dPQK = vec4(dP, dQ.z, dk);
|
|
|
|
|
|
pqk += dPQK * jitter;
|
|
|
float rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);
|
|
|
float rayZNear;
|
|
|
|
|
|
bool intersect = false;
|
|
|
|
|
|
vec2 texelSize = 1.0 / viewportSize;
|
|
|
|
|
|
iterationCount = 0.0;
|
|
|
|
|
|
for (int i = 0; i < MAX_ITERATION; i++)
|
|
|
{
|
|
|
pqk += dPQK;
|
|
|
|
|
|
rayZNear = rayZFar;
|
|
|
rayZFar = (dPQK.z * 0.5 + pqk.z) / (dPQK.w * 0.5 + pqk.w);
|
|
|
|
|
|
hitPixel = permute ? pqk.yx : pqk.xy;
|
|
|
hitPixel *= texelSize;
|
|
|
|
|
|
intersect = rayIntersectDepth(rayZNear, rayZFar, hitPixel);
|
|
|
|
|
|
iterationCount += 1.0;
|
|
|
|
|
|
if (intersect) {
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
Q0.xy += dQ.xy * iterationCount;
|
|
|
Q0.z = pqk.z;
|
|
|
hitPoint = Q0 / pqk.w;
|
|
|
|
|
|
return intersect;
|
|
|
}
|
|
|
|
|
|
float calculateAlpha(
|
|
|
float iterationCount, float reflectivity,
|
|
|
vec2 hitPixel, vec3 hitPoint, float dist, vec3 rayDir
|
|
|
)
|
|
|
{
|
|
|
float alpha = clamp(reflectivity, 0.0, 1.0);
|
|
|
alpha *= 1.0 - (iterationCount / float(MAX_ITERATION));
|
|
|
vec2 hitPixelNDC = hitPixel * 2.0 - 1.0;
|
|
|
float maxDimension = min(1.0, max(abs(hitPixelNDC.x), abs(hitPixelNDC.y)));
|
|
|
alpha *= 1.0 - max(0.0, maxDimension - screenEdgeFadeStart) / (1.0 - screenEdgeFadeStart);
|
|
|
|
|
|
float _eyeFadeStart = eyeFadeStart;
|
|
|
float _eyeFadeEnd = eyeFadeEnd;
|
|
|
if (_eyeFadeStart > _eyeFadeEnd) {
|
|
|
float tmp = _eyeFadeEnd;
|
|
|
_eyeFadeEnd = _eyeFadeStart;
|
|
|
_eyeFadeStart = tmp;
|
|
|
}
|
|
|
|
|
|
float eyeDir = clamp(rayDir.z, _eyeFadeStart, _eyeFadeEnd);
|
|
|
alpha *= 1.0 - (eyeDir - _eyeFadeStart) / (_eyeFadeEnd - _eyeFadeStart);
|
|
|
|
|
|
alpha *= 1.0 - clamp(dist / maxRayDistance, 0.0, 1.0);
|
|
|
|
|
|
return alpha;
|
|
|
}
|
|
|
|
|
|
@import clay.util.rand
|
|
|
|
|
|
@import clay.util.rgbm
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 normalAndGloss = texture2D(gBufferTexture1, v_Texcoord);
|
|
|
|
|
|
if (dot(normalAndGloss.rgb, vec3(1.0)) == 0.0) {
|
|
|
discard;
|
|
|
}
|
|
|
|
|
|
float g = normalAndGloss.a;
|
|
|
if (g <= minGlossiness) {
|
|
|
discard;
|
|
|
}
|
|
|
|
|
|
float reflectivity = (g - minGlossiness) / (1.0 - minGlossiness);
|
|
|
|
|
|
vec3 N = normalAndGloss.rgb * 2.0 - 1.0;
|
|
|
N = normalize((viewInverseTranspose * vec4(N, 0.0)).xyz);
|
|
|
|
|
|
vec4 projectedPos = vec4(v_Texcoord * 2.0 - 1.0, fetchDepth(gBufferTexture2, v_Texcoord), 1.0);
|
|
|
vec4 pos = projectionInv * projectedPos;
|
|
|
vec3 rayOrigin = pos.xyz / pos.w;
|
|
|
|
|
|
vec3 rayDir = normalize(reflect(normalize(rayOrigin), N));
|
|
|
vec2 hitPixel;
|
|
|
vec3 hitPoint;
|
|
|
float iterationCount;
|
|
|
|
|
|
vec2 uv2 = v_Texcoord * viewportSize;
|
|
|
float jitter = rand(fract(v_Texcoord + jitterOffset));
|
|
|
|
|
|
bool intersect = traceScreenSpaceRay(rayOrigin, rayDir, jitter, hitPixel, hitPoint, iterationCount);
|
|
|
|
|
|
float dist = distance(rayOrigin, hitPoint);
|
|
|
|
|
|
float alpha = calculateAlpha(iterationCount, reflectivity, hitPixel, hitPoint, dist, rayDir) * float(intersect);
|
|
|
|
|
|
vec3 hitNormal = texture2D(gBufferTexture1, hitPixel).rgb * 2.0 - 1.0;
|
|
|
hitNormal = normalize((viewInverseTranspose * vec4(hitNormal, 0.0)).xyz);
|
|
|
|
|
|
if (dot(hitNormal, rayDir) >= 0.0) {
|
|
|
discard;
|
|
|
}
|
|
|
|
|
|
|
|
|
if (!intersect) {
|
|
|
discard;
|
|
|
}
|
|
|
vec4 color = decodeHDR(texture2D(sourceTexture, hitPixel));
|
|
|
gl_FragColor = encodeHDR(vec4(color.rgb * alpha, color.a));
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.ssr.blur
|
|
|
|
|
|
uniform sampler2D texture;
|
|
|
uniform sampler2D gBufferTexture1;
|
|
|
uniform sampler2D gBufferTexture2;
|
|
|
uniform mat4 projection;
|
|
|
uniform float depthRange : 0.05;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
uniform vec2 textureSize;
|
|
|
uniform float blurSize : 4.0;
|
|
|
|
|
|
#ifdef BLEND
|
|
|
#ifdef SSAOTEX_ENABLED
|
|
|
uniform sampler2D ssaoTex;
|
|
|
#endif
|
|
|
uniform sampler2D sourceTexture;
|
|
|
#endif
|
|
|
|
|
|
float getLinearDepth(vec2 coord)
|
|
|
{
|
|
|
float depth = texture2D(gBufferTexture2, coord).r * 2.0 - 1.0;
|
|
|
return projection[3][2] / (depth * projection[2][3] - projection[2][2]);
|
|
|
}
|
|
|
|
|
|
@import clay.util.rgbm
|
|
|
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
@import clay.compositor.kernel.gaussian_9
|
|
|
|
|
|
vec4 centerNTexel = texture2D(gBufferTexture1, v_Texcoord);
|
|
|
float g = centerNTexel.a;
|
|
|
float maxBlurSize = clamp(1.0 - g + 0.1, 0.0, 1.0) * blurSize;
|
|
|
#ifdef VERTICAL
|
|
|
vec2 off = vec2(0.0, maxBlurSize / textureSize.y);
|
|
|
#else
|
|
|
vec2 off = vec2(maxBlurSize / textureSize.x, 0.0);
|
|
|
#endif
|
|
|
|
|
|
vec2 coord = v_Texcoord;
|
|
|
|
|
|
vec4 sum = vec4(0.0);
|
|
|
float weightAll = 0.0;
|
|
|
|
|
|
vec3 cN = centerNTexel.rgb * 2.0 - 1.0;
|
|
|
float cD = getLinearDepth(v_Texcoord);
|
|
|
for (int i = 0; i < 9; i++) {
|
|
|
vec2 coord = clamp((float(i) - 4.0) * off + v_Texcoord, vec2(0.0), vec2(1.0));
|
|
|
float w = gaussianKernel[i]
|
|
|
* clamp(dot(cN, texture2D(gBufferTexture1, coord).rgb * 2.0 - 1.0), 0.0, 1.0);
|
|
|
float d = getLinearDepth(coord);
|
|
|
w *= (1.0 - smoothstep(abs(cD - d) / depthRange, 0.0, 1.0));
|
|
|
|
|
|
weightAll += w;
|
|
|
sum += decodeHDR(texture2D(texture, coord)) * w;
|
|
|
}
|
|
|
|
|
|
#ifdef BLEND
|
|
|
float aoFactor = 1.0;
|
|
|
#ifdef SSAOTEX_ENABLED
|
|
|
aoFactor = texture2D(ssaoTex, v_Texcoord).r;
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(
|
|
|
sum / weightAll * aoFactor + decodeHDR(texture2D(sourceTexture, v_Texcoord))
|
|
|
);
|
|
|
#else
|
|
|
gl_FragColor = encodeHDR(sum / weightAll);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";V.a=[0,0,-.321585265978,-.154972575841,.458126042375,.188473391593,.842080129861,.527766490688,.147304551086,-.659453822776,-.331943915203,-.940619700594,.0479226680259,.54812163202,.701581552186,-.709825561388,-.295436780218,.940589268233,-.901489676764,.237713156085,.973570876096,-.109899459384,-.866792314779,-.451805525005,.330975007087,.800048655954,-.344275183665,.381779221166,-.386139432542,-.437418421534,-.576478634965,-.0148463392551,.385798197415,-.262426961053,-.666302061145,.682427250835,-.628010632582,-.732836215494,.10163141741,-.987658134403,.711995289051,-.320024291314,.0296005138058,.950296523438,.0130612307608,-.351024443122,-.879596633704,-.10478487883,.435712737232,.504254490347,.779203817497,.206477676721,.388264289969,-.896736162545,-.153106280781,-.629203242522,-.245517550697,.657969239148,.126830499058,.26862328493,-.634888119007,-.302301223431,.617074219636,.779817204925]},function(re,V,b){"use strict";var U=b(5),C=b(6),w=b(7),y=b(10),T=b(17),x=b(14),p=b(54),m=b(168);w.a.import(m.a);function L(A,M,O,S,I){var c=A.gl;M.setUniform(c,"1i",O,I),c.activeTexture(c.TEXTURE0+I),S.isRenderable()?S.bind(A):S.unbind(A)}function d(A,M,O,S,I){var c,f,P,N,k=A.gl;return function(W,z,Z){if(!(N&&N.material===W.material)){var J=W.material,ee=W.__program,$=J.get("roughness");$==null&&($=1);var ie=J.get("normalMap")||M,se=J.get("roughnessMap"),ne=J.get("bumpMap"),ce=J.get("uvRepeat"),ae=J.get("uvOffset"),fe=J.get("detailUvRepeat"),oe=J.get("detailUvOffset"),pe=!!ne&&J.isTextureEnabled("bumpMap"),_e=!!se&&J.isTextureEnabled("roughnessMap"),de=J.isDefined("fragment","DOUBLE_SIDED");ne=ne||O,se=se||S,Z!==z?(z.set("normalMap",ie),z.set("bumpMap",ne),z.set("roughnessMap",se),z.set("useBumpMap",pe),z.set("useRoughnessMap",_e),z.set("doubleSide",de),ce!=null&&z.set("uvRepeat",ce),ae!=null&&z.set("uvOffset",ae),fe!=null&&z.set("detailUvRepeat",fe),oe!=null&&z.set("detailUvOffset",oe),z.set("roughness",$)):(ee.setUniform(k,"1f","roughness",$),c!==ie&&L(A,ee,"normalMap",ie,0),f!==ne&&ne&&L(A,ee,"bumpMap",ne,1),P!==se&&se&&L(A,ee,"roughnessMap",se,2),ce!=null&&ee.setUniform(k,"2f","uvRepeat",ce),ae!=null&&ee.setUniform(k,"2f","uvOffset",ae),fe!=null&&ee.setUniform(k,"2f","detailUvRepeat",fe),oe!=null&&ee.setUniform(k,"2f","detailUvOffset",oe),ee.setUniform(k,"1i","useBumpMap",+pe),ee.setUniform(k,"1i","useRoughnessMap",+_e),ee.setUniform(k,"1i","doubleSide",+de)),c=ie,f=ne,P=se,N=W}}}function g(A){A=A||{},this._depthTex=new U.a({format:C.a.DEPTH_COMPONENT,type:C.a.UNSIGNED_INT}),this._normalTex=new U.a({type:C.a.HALF_FLOAT}),this._framebuffer=new y.a,this._framebuffer.attach(this._normalTex),this._framebuffer.attach(this._depthTex,y.a.DEPTH_ATTACHMENT),this._normalMaterial=new T.a({shader:new w.a(w.a.source("ecgl.normal.vertex"),w.a.source("ecgl.normal.fragment"))}),this._normalMaterial.enableTexture(["normalMap","bumpMap","roughnessMap"]),this._defaultNormalMap=p.a.createBlank("#000"),this._defaultBumpMap=p.a.createBlank("#000"),this._defaultRoughessMap=p.a.createBlank("#000"),this._debugPass=new x.a({fragment:w.a.source("clay.compositor.output")}),this._debugPass.setUniform("texture",this._normalTex),this._debugPass.material.undefine("fragment","OUTPUT_ALPHA")}g.prototype.getDepthTexture=function(){return this._depthTex},g.prototype.getNormalTexture=function(){return this._normalTex},g.prototype.update=function(A,M,O){var S=A.getWidth(),I=A.getHeight(),c=this._depthTex,f=this._normalTex,P=this._normalMaterial;c.width=S,c.height=I,f.width=S,f.height=I;var N=M.opaqueList;this._framebuffer.bind(A),A.gl.clearColor(0,0,0,0),A.gl.clear(A.gl.COLOR_BUFFER_BIT|A.gl.DEPTH_BUFFER_BIT),A.gl.disable(A.gl.BLEND),A.renderPass(N,O,{getMaterial:function(){return P},ifRender:function(k){return k.renderNormal},beforeRender:d(A,this._defaultNormalMap,this._defaultBumpMap,this._defaultRoughessMap,this._normalMaterial),sort:A.opaqueSortCompare}),this._framebuffer.unbind(A)},g.prototype.renderDebug=function(A){this._debugPass.render(A)},g.prototype.dispose=function(A){this._depthTex.dispose(A),this._normalTex.dispose(A)},V.a=g},function(re,V,b){"use strict";V.a=`@export ecgl.normal.vertex
|
|
|
|
|
|
@import ecgl.common.transformUniforms
|
|
|
|
|
|
@import ecgl.common.uv.header
|
|
|
|
|
|
@import ecgl.common.attributes
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
@import ecgl.common.normalMap.vertexHeader
|
|
|
|
|
|
@import ecgl.common.vertexAnimation.header
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
|
|
|
@import ecgl.common.vertexAnimation.main
|
|
|
|
|
|
@import ecgl.common.uv.main
|
|
|
|
|
|
v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);
|
|
|
v_WorldPosition = (world * vec4(pos, 1.0)).xyz;
|
|
|
|
|
|
@import ecgl.common.normalMap.vertexMain
|
|
|
|
|
|
gl_Position = worldViewProjection * vec4(pos, 1.0);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.normal.fragment
|
|
|
|
|
|
#define ROUGHNESS_CHANEL 0
|
|
|
|
|
|
uniform bool useBumpMap;
|
|
|
uniform bool useRoughnessMap;
|
|
|
uniform bool doubleSide;
|
|
|
uniform float roughness;
|
|
|
|
|
|
@import ecgl.common.uv.fragmentHeader
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
uniform mat4 viewInverse : VIEWINVERSE;
|
|
|
|
|
|
@import ecgl.common.normalMap.fragmentHeader
|
|
|
@import ecgl.common.bumpMap.header
|
|
|
|
|
|
uniform sampler2D roughnessMap;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec3 N = v_Normal;
|
|
|
|
|
|
bool flipNormal = false;
|
|
|
if (doubleSide) {
|
|
|
vec3 eyePos = viewInverse[3].xyz;
|
|
|
vec3 V = normalize(eyePos - v_WorldPosition);
|
|
|
|
|
|
if (dot(N, V) < 0.0) {
|
|
|
flipNormal = true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@import ecgl.common.normalMap.fragmentMain
|
|
|
|
|
|
if (useBumpMap) {
|
|
|
N = bumpNormal(v_WorldPosition, v_Normal, N);
|
|
|
}
|
|
|
|
|
|
float g = 1.0 - roughness;
|
|
|
|
|
|
if (useRoughnessMap) {
|
|
|
float g2 = 1.0 - texture2D(roughnessMap, v_DetailTexcoord)[ROUGHNESS_CHANEL];
|
|
|
g = clamp(g2 + (g - 0.5) * 2.0, 0.0, 1.0);
|
|
|
}
|
|
|
|
|
|
if (flipNormal) {
|
|
|
N = -N;
|
|
|
}
|
|
|
|
|
|
gl_FragColor.rgb = (N.xyz + 1.0) * 0.5;
|
|
|
gl_FragColor.a = g;
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";var U=b(9),C=b(4),w=b(5),y=b(6),T=b(14),x=b(7),p=b(10);function m(L){L=L||{},this._edgePass=new T.a({fragment:x.a.source("ecgl.edge")}),this._edgePass.setUniform("normalTexture",L.normalTexture),this._edgePass.setUniform("depthTexture",L.depthTexture),this._targetTexture=new w.a({type:y.a.HALF_FLOAT}),this._frameBuffer=new p.a,this._frameBuffer.attach(this._targetTexture)}m.prototype.update=function(L,d,g,A){var M=L.getWidth(),O=L.getHeight(),S=this._targetTexture;S.width=M,S.height=O;var I=this._frameBuffer;I.bind(L),this._edgePass.setUniform("projectionInv",d.invProjectionMatrix.array),this._edgePass.setUniform("textureSize",[M,O]),this._edgePass.setUniform("texture",g),this._edgePass.render(L),I.unbind(L)},m.prototype.getTargetTexture=function(){return this._targetTexture},m.prototype.setParameter=function(L,d){this._edgePass.setUniform(L,d)},m.prototype.dispose=function(L){this._targetTexture.dispose(L),this._frameBuffer.dispose(L)},V.a=m},function(re,V,b){"use strict";V.a={type:"compositor",nodes:[{name:"source",type:"texture",outputs:{color:{}}},{name:"source_half",shader:"#source(clay.compositor.downsample)",inputs:{texture:"source"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bright",shader:"#source(clay.compositor.bright)",inputs:{texture:"source_half"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{threshold:2,scale:4,textureSize:"expr([width * 1.0 / 2, height / 2])"}},{name:"bright_downsample_4",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 2, height / 2] )"}},{name:"bright_downsample_8",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 4, height / 4] )"}},{name:"bright_downsample_16",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 8, height / 8] )"}},{name:"bright_downsample_32",shader:"#source(clay.compositor.downsample)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 32)",height:"expr(height * 1.0 / 32)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0 / 16, height / 16] )"}},{name:"bright_upsample_16_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_32"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 32, height / 32] )"}},{name:"bright_upsample_16_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_16_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 16)",height:"expr(height * 1.0 / 16)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_16"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 16, height * 1.0 / 16] )"}},{name:"bright_upsample_8_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_8_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_8_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_8_blur_v",texture2:"bright_upsample_16_blur_v"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 8)",height:"expr(height * 1.0 / 8)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_4_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_8"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 8, height * 1.0 / 8] )"}},{name:"bright_upsample_4_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_4_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_4_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_4_blur_v",texture2:"bright_upsample_8_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 4)",height:"expr(height * 1.0 / 4)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_2_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_downsample_4"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 4, height * 1.0 / 4] )"}},{name:"bright_upsample_2_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_2_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_2_blend",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_2_blur_v",texture2:"bright_upsample_4_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0 / 2)",height:"expr(height * 1.0 / 2)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"bright_upsample_full_blur_h",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:0,textureSize:"expr( [width * 1.0 / 2, height * 1.0 / 2] )"}},{name:"bright_upsample_full_blur_v",shader:"#source(clay.compositor.gaussian_blur)",inputs:{texture:"bright_upsample_full_blur_h"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{blurSize:1,blurDir:1,textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"bloom_composite",shader:"#source(clay.compositor.blend)",inputs:{texture1:"bright_upsample_full_blur_v",texture2:"bright_upsample_2_blend"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{weight1:.3,weight2:.7}},{name:"coc",shader:"#source(ecgl.dof.coc)",outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{focalDist:50,focalRange:30}},{name:"dof_far_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"}},{name:"dof_near_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"source",coc:"coc"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_NEARFIELD:null}},{name:"dof_coc_blur",shader:"#source(ecgl.dof.diskBlur)",inputs:{texture:"coc"},outputs:{color:{parameters:{minFilter:"NEAREST",magFilter:"NEAREST",width:"expr(width * 1.0)",height:"expr(height * 1.0)"}}},parameters:{textureSize:"expr( [width * 1.0, height * 1.0] )"},defines:{BLUR_COC:null}},{name:"dof_composite",shader:"#source(ecgl.dof.composite)",inputs:{original:"source",blurred:"dof_far_blur",nearfield:"dof_near_blur",coc:"coc",nearcoc:"dof_coc_blur"},outputs:{color:{parameters:{width:"expr(width * 1.0)",height:"expr(height * 1.0)",type:"HALF_FLOAT"}}}},{name:"composite",shader:"#source(clay.compositor.hdr.composite)",inputs:{texture:"source",bloom:"bloom_composite"},defines:{}},{name:"FXAA",shader:"#source(clay.compositor.fxaa)",inputs:{texture:"composite"}}]}},function(re,V,b){"use strict";V.a=`@export clay.compositor.kernel.gaussian_9
|
|
|
float gaussianKernel[9];
|
|
|
gaussianKernel[0] = 0.07;
|
|
|
gaussianKernel[1] = 0.09;
|
|
|
gaussianKernel[2] = 0.12;
|
|
|
gaussianKernel[3] = 0.14;
|
|
|
gaussianKernel[4] = 0.16;
|
|
|
gaussianKernel[5] = 0.14;
|
|
|
gaussianKernel[6] = 0.12;
|
|
|
gaussianKernel[7] = 0.09;
|
|
|
gaussianKernel[8] = 0.07;
|
|
|
@end
|
|
|
@export clay.compositor.kernel.gaussian_13
|
|
|
float gaussianKernel[13];
|
|
|
gaussianKernel[0] = 0.02;
|
|
|
gaussianKernel[1] = 0.03;
|
|
|
gaussianKernel[2] = 0.06;
|
|
|
gaussianKernel[3] = 0.08;
|
|
|
gaussianKernel[4] = 0.11;
|
|
|
gaussianKernel[5] = 0.13;
|
|
|
gaussianKernel[6] = 0.14;
|
|
|
gaussianKernel[7] = 0.13;
|
|
|
gaussianKernel[8] = 0.11;
|
|
|
gaussianKernel[9] = 0.08;
|
|
|
gaussianKernel[10] = 0.06;
|
|
|
gaussianKernel[11] = 0.03;
|
|
|
gaussianKernel[12] = 0.02;
|
|
|
@end
|
|
|
@export clay.compositor.gaussian_blur
|
|
|
#define SHADER_NAME gaussian_blur
|
|
|
uniform sampler2D texture;varying vec2 v_Texcoord;
|
|
|
uniform float blurSize : 2.0;
|
|
|
uniform vec2 textureSize : [512.0, 512.0];
|
|
|
uniform float blurDir : 0.0;
|
|
|
@import clay.util.rgbm
|
|
|
@import clay.util.clamp_sample
|
|
|
void main (void)
|
|
|
{
|
|
|
@import clay.compositor.kernel.gaussian_9
|
|
|
vec2 off = blurSize / textureSize;
|
|
|
off *= vec2(1.0 - blurDir, blurDir);
|
|
|
vec4 sum = vec4(0.0);
|
|
|
float weightAll = 0.0;
|
|
|
for (int i = 0; i < 9; i++) {
|
|
|
float w = gaussianKernel[i];
|
|
|
vec4 texel = decodeHDR(clampSample(texture, v_Texcoord + float(i - 4) * off));
|
|
|
sum += texel * w;
|
|
|
weightAll += w;
|
|
|
}
|
|
|
gl_FragColor = encodeHDR(sum / max(weightAll, 0.01));
|
|
|
}
|
|
|
@end
|
|
|
`},function(re,V,b){"use strict";V.a=`
|
|
|
@export clay.compositor.lut
|
|
|
varying vec2 v_Texcoord;
|
|
|
uniform sampler2D texture;
|
|
|
uniform sampler2D lookup;
|
|
|
void main()
|
|
|
{
|
|
|
vec4 tex = texture2D(texture, v_Texcoord);
|
|
|
float blueColor = tex.b * 63.0;
|
|
|
vec2 quad1;
|
|
|
quad1.y = floor(floor(blueColor) / 8.0);
|
|
|
quad1.x = floor(blueColor) - (quad1.y * 8.0);
|
|
|
vec2 quad2;
|
|
|
quad2.y = floor(ceil(blueColor) / 8.0);
|
|
|
quad2.x = ceil(blueColor) - (quad2.y * 8.0);
|
|
|
vec2 texPos1;
|
|
|
texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);
|
|
|
texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);
|
|
|
vec2 texPos2;
|
|
|
texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.r);
|
|
|
texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * tex.g);
|
|
|
vec4 newColor1 = texture2D(lookup, texPos1);
|
|
|
vec4 newColor2 = texture2D(lookup, texPos2);
|
|
|
vec4 newColor = mix(newColor1, newColor2, fract(blueColor));
|
|
|
gl_FragColor = vec4(newColor.rgb, tex.w);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export clay.compositor.output
|
|
|
#define OUTPUT_ALPHA
|
|
|
varying vec2 v_Texcoord;
|
|
|
uniform sampler2D texture;
|
|
|
@import clay.util.rgbm
|
|
|
void main()
|
|
|
{
|
|
|
vec4 tex = decodeHDR(texture2D(texture, v_Texcoord));
|
|
|
gl_FragColor.rgb = tex.rgb;
|
|
|
#ifdef OUTPUT_ALPHA
|
|
|
gl_FragColor.a = tex.a;
|
|
|
#else
|
|
|
gl_FragColor.a = 1.0;
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(gl_FragColor);
|
|
|
#ifdef PREMULTIPLY_ALPHA
|
|
|
gl_FragColor.rgb *= gl_FragColor.a;
|
|
|
#endif
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export clay.compositor.bright
|
|
|
uniform sampler2D texture;
|
|
|
uniform float threshold : 1;
|
|
|
uniform float scale : 1.0;
|
|
|
uniform vec2 textureSize: [512, 512];
|
|
|
varying vec2 v_Texcoord;
|
|
|
const vec3 lumWeight = vec3(0.2125, 0.7154, 0.0721);
|
|
|
@import clay.util.rgbm
|
|
|
vec4 median(vec4 a, vec4 b, vec4 c)
|
|
|
{
|
|
|
return a + b + c - min(min(a, b), c) - max(max(a, b), c);
|
|
|
}
|
|
|
void main()
|
|
|
{
|
|
|
vec4 texel = decodeHDR(texture2D(texture, v_Texcoord));
|
|
|
#ifdef ANTI_FLICKER
|
|
|
vec3 d = 1.0 / textureSize.xyx * vec3(1.0, 1.0, 0.0);
|
|
|
vec4 s1 = decodeHDR(texture2D(texture, v_Texcoord - d.xz));
|
|
|
vec4 s2 = decodeHDR(texture2D(texture, v_Texcoord + d.xz));
|
|
|
vec4 s3 = decodeHDR(texture2D(texture, v_Texcoord - d.zy));
|
|
|
vec4 s4 = decodeHDR(texture2D(texture, v_Texcoord + d.zy));
|
|
|
texel = median(median(texel, s1, s2), s3, s4);
|
|
|
#endif
|
|
|
float lum = dot(texel.rgb , lumWeight);
|
|
|
vec4 color;
|
|
|
if (lum > threshold && texel.a > 0.0)
|
|
|
{
|
|
|
color = vec4(texel.rgb * scale, texel.a * scale);
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
color = vec4(0.0);
|
|
|
}
|
|
|
gl_FragColor = encodeHDR(color);
|
|
|
}
|
|
|
@end
|
|
|
`},function(re,V,b){"use strict";V.a=`@export clay.compositor.downsample
|
|
|
uniform sampler2D texture;
|
|
|
uniform vec2 textureSize : [512, 512];
|
|
|
varying vec2 v_Texcoord;
|
|
|
@import clay.util.rgbm
|
|
|
float brightness(vec3 c)
|
|
|
{
|
|
|
return max(max(c.r, c.g), c.b);
|
|
|
}
|
|
|
@import clay.util.clamp_sample
|
|
|
void main()
|
|
|
{
|
|
|
vec4 d = vec4(-1.0, -1.0, 1.0, 1.0) / textureSize.xyxy;
|
|
|
#ifdef ANTI_FLICKER
|
|
|
vec3 s1 = decodeHDR(clampSample(texture, v_Texcoord + d.xy)).rgb;
|
|
|
vec3 s2 = decodeHDR(clampSample(texture, v_Texcoord + d.zy)).rgb;
|
|
|
vec3 s3 = decodeHDR(clampSample(texture, v_Texcoord + d.xw)).rgb;
|
|
|
vec3 s4 = decodeHDR(clampSample(texture, v_Texcoord + d.zw)).rgb;
|
|
|
float s1w = 1.0 / (brightness(s1) + 1.0);
|
|
|
float s2w = 1.0 / (brightness(s2) + 1.0);
|
|
|
float s3w = 1.0 / (brightness(s3) + 1.0);
|
|
|
float s4w = 1.0 / (brightness(s4) + 1.0);
|
|
|
float oneDivideSum = 1.0 / (s1w + s2w + s3w + s4w);
|
|
|
vec4 color = vec4(
|
|
|
(s1 * s1w + s2 * s2w + s3 * s3w + s4 * s4w) * oneDivideSum,
|
|
|
1.0
|
|
|
);
|
|
|
#else
|
|
|
vec4 color = decodeHDR(clampSample(texture, v_Texcoord + d.xy));
|
|
|
color += decodeHDR(clampSample(texture, v_Texcoord + d.zy));
|
|
|
color += decodeHDR(clampSample(texture, v_Texcoord + d.xw));
|
|
|
color += decodeHDR(clampSample(texture, v_Texcoord + d.zw));
|
|
|
color *= 0.25;
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(color);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`
|
|
|
@export clay.compositor.upsample
|
|
|
#define HIGH_QUALITY
|
|
|
uniform sampler2D texture;
|
|
|
uniform vec2 textureSize : [512, 512];
|
|
|
uniform float sampleScale: 0.5;
|
|
|
varying vec2 v_Texcoord;
|
|
|
@import clay.util.rgbm
|
|
|
@import clay.util.clamp_sample
|
|
|
void main()
|
|
|
{
|
|
|
#ifdef HIGH_QUALITY
|
|
|
vec4 d = vec4(1.0, 1.0, -1.0, 0.0) / textureSize.xyxy * sampleScale;
|
|
|
vec4 s;
|
|
|
s = decodeHDR(clampSample(texture, v_Texcoord - d.xy));
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord - d.wy)) * 2.0;
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord - d.zy));
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.zw)) * 2.0;
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord )) * 4.0;
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.xw)) * 2.0;
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.wy)) * 2.0;
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.xy));
|
|
|
gl_FragColor = encodeHDR(s / 16.0);
|
|
|
#else
|
|
|
vec4 d = vec4(-1.0, -1.0, +1.0, +1.0) / textureSize.xyxy;
|
|
|
vec4 s;
|
|
|
s = decodeHDR(clampSample(texture, v_Texcoord + d.xy));
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.zy));
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.xw));
|
|
|
s += decodeHDR(clampSample(texture, v_Texcoord + d.zw));
|
|
|
gl_FragColor = encodeHDR(s / 4.0);
|
|
|
#endif
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export clay.compositor.hdr.composite
|
|
|
uniform sampler2D texture;
|
|
|
#ifdef BLOOM_ENABLED
|
|
|
uniform sampler2D bloom;
|
|
|
#endif
|
|
|
#ifdef LENSFLARE_ENABLED
|
|
|
uniform sampler2D lensflare;
|
|
|
uniform sampler2D lensdirt;
|
|
|
#endif
|
|
|
#ifdef LUM_ENABLED
|
|
|
uniform sampler2D lum;
|
|
|
#endif
|
|
|
#ifdef LUT_ENABLED
|
|
|
uniform sampler2D lut;
|
|
|
#endif
|
|
|
#ifdef COLOR_CORRECTION
|
|
|
uniform float brightness : 0.0;
|
|
|
uniform float contrast : 1.0;
|
|
|
uniform float saturation : 1.0;
|
|
|
#endif
|
|
|
#ifdef VIGNETTE
|
|
|
uniform float vignetteDarkness: 1.0;
|
|
|
uniform float vignetteOffset: 1.0;
|
|
|
#endif
|
|
|
uniform float exposure : 1.0;
|
|
|
uniform float bloomIntensity : 0.25;
|
|
|
uniform float lensflareIntensity : 1;
|
|
|
varying vec2 v_Texcoord;
|
|
|
@import clay.util.srgb
|
|
|
vec3 ACESToneMapping(vec3 color)
|
|
|
{
|
|
|
const float A = 2.51;
|
|
|
const float B = 0.03;
|
|
|
const float C = 2.43;
|
|
|
const float D = 0.59;
|
|
|
const float E = 0.14;
|
|
|
return (color * (A * color + B)) / (color * (C * color + D) + E);
|
|
|
}
|
|
|
float eyeAdaption(float fLum)
|
|
|
{
|
|
|
return mix(0.2, fLum, 0.5);
|
|
|
}
|
|
|
#ifdef LUT_ENABLED
|
|
|
vec3 lutTransform(vec3 color) {
|
|
|
float blueColor = color.b * 63.0;
|
|
|
vec2 quad1;
|
|
|
quad1.y = floor(floor(blueColor) / 8.0);
|
|
|
quad1.x = floor(blueColor) - (quad1.y * 8.0);
|
|
|
vec2 quad2;
|
|
|
quad2.y = floor(ceil(blueColor) / 8.0);
|
|
|
quad2.x = ceil(blueColor) - (quad2.y * 8.0);
|
|
|
vec2 texPos1;
|
|
|
texPos1.x = (quad1.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);
|
|
|
texPos1.y = (quad1.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);
|
|
|
vec2 texPos2;
|
|
|
texPos2.x = (quad2.x * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.r);
|
|
|
texPos2.y = (quad2.y * 0.125) + 0.5/512.0 + ((0.125 - 1.0/512.0) * color.g);
|
|
|
vec4 newColor1 = texture2D(lut, texPos1);
|
|
|
vec4 newColor2 = texture2D(lut, texPos2);
|
|
|
vec4 newColor = mix(newColor1, newColor2, fract(blueColor));
|
|
|
return newColor.rgb;
|
|
|
}
|
|
|
#endif
|
|
|
@import clay.util.rgbm
|
|
|
void main()
|
|
|
{
|
|
|
vec4 texel = vec4(0.0);
|
|
|
vec4 originalTexel = vec4(0.0);
|
|
|
#ifdef TEXTURE_ENABLED
|
|
|
texel = decodeHDR(texture2D(texture, v_Texcoord));
|
|
|
originalTexel = texel;
|
|
|
#endif
|
|
|
#ifdef BLOOM_ENABLED
|
|
|
vec4 bloomTexel = decodeHDR(texture2D(bloom, v_Texcoord));
|
|
|
texel.rgb += bloomTexel.rgb * bloomIntensity;
|
|
|
texel.a += bloomTexel.a * bloomIntensity;
|
|
|
#endif
|
|
|
#ifdef LENSFLARE_ENABLED
|
|
|
texel += decodeHDR(texture2D(lensflare, v_Texcoord)) * texture2D(lensdirt, v_Texcoord) * lensflareIntensity;
|
|
|
#endif
|
|
|
texel.a = min(texel.a, 1.0);
|
|
|
#ifdef LUM_ENABLED
|
|
|
float fLum = texture2D(lum, vec2(0.5, 0.5)).r;
|
|
|
float adaptedLumDest = 3.0 / (max(0.1, 1.0 + 10.0*eyeAdaption(fLum)));
|
|
|
float exposureBias = adaptedLumDest * exposure;
|
|
|
#else
|
|
|
float exposureBias = exposure;
|
|
|
#endif
|
|
|
texel.rgb *= exposureBias;
|
|
|
texel.rgb = ACESToneMapping(texel.rgb);
|
|
|
texel = linearTosRGB(texel);
|
|
|
#ifdef LUT_ENABLED
|
|
|
texel.rgb = lutTransform(clamp(texel.rgb,vec3(0.0),vec3(1.0)));
|
|
|
#endif
|
|
|
#ifdef COLOR_CORRECTION
|
|
|
texel.rgb = clamp(texel.rgb + vec3(brightness), 0.0, 1.0);
|
|
|
texel.rgb = clamp((texel.rgb - vec3(0.5))*contrast+vec3(0.5), 0.0, 1.0);
|
|
|
float lum = dot(texel.rgb, vec3(0.2125, 0.7154, 0.0721));
|
|
|
texel.rgb = mix(vec3(lum), texel.rgb, saturation);
|
|
|
#endif
|
|
|
#ifdef VIGNETTE
|
|
|
vec2 uv = (v_Texcoord - vec2(0.5)) * vec2(vignetteOffset);
|
|
|
texel.rgb = mix(texel.rgb, vec3(1.0 - vignetteDarkness), dot(uv, uv));
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(texel);
|
|
|
#ifdef DEBUG
|
|
|
#if DEBUG == 1
|
|
|
gl_FragColor = encodeHDR(decodeHDR(texture2D(texture, v_Texcoord)));
|
|
|
#elif DEBUG == 2
|
|
|
gl_FragColor = encodeHDR(decodeHDR(texture2D(bloom, v_Texcoord)) * bloomIntensity);
|
|
|
#elif DEBUG == 3
|
|
|
gl_FragColor = encodeHDR(decodeHDR(texture2D(lensflare, v_Texcoord) * lensflareIntensity));
|
|
|
#endif
|
|
|
#endif
|
|
|
if (originalTexel.a <= 0.01 && gl_FragColor.a > 1e-5) {
|
|
|
gl_FragColor.a = dot(gl_FragColor.rgb, vec3(0.2125, 0.7154, 0.0721));
|
|
|
}
|
|
|
#ifdef PREMULTIPLY_ALPHA
|
|
|
gl_FragColor.rgb *= gl_FragColor.a;
|
|
|
#endif
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export clay.compositor.blend
|
|
|
#define SHADER_NAME blend
|
|
|
#ifdef TEXTURE1_ENABLED
|
|
|
uniform sampler2D texture1;
|
|
|
uniform float weight1 : 1.0;
|
|
|
#endif
|
|
|
#ifdef TEXTURE2_ENABLED
|
|
|
uniform sampler2D texture2;
|
|
|
uniform float weight2 : 1.0;
|
|
|
#endif
|
|
|
#ifdef TEXTURE3_ENABLED
|
|
|
uniform sampler2D texture3;
|
|
|
uniform float weight3 : 1.0;
|
|
|
#endif
|
|
|
#ifdef TEXTURE4_ENABLED
|
|
|
uniform sampler2D texture4;
|
|
|
uniform float weight4 : 1.0;
|
|
|
#endif
|
|
|
#ifdef TEXTURE5_ENABLED
|
|
|
uniform sampler2D texture5;
|
|
|
uniform float weight5 : 1.0;
|
|
|
#endif
|
|
|
#ifdef TEXTURE6_ENABLED
|
|
|
uniform sampler2D texture6;
|
|
|
uniform float weight6 : 1.0;
|
|
|
#endif
|
|
|
varying vec2 v_Texcoord;
|
|
|
@import clay.util.rgbm
|
|
|
void main()
|
|
|
{
|
|
|
vec4 tex = vec4(0.0);
|
|
|
#ifdef TEXTURE1_ENABLED
|
|
|
tex += decodeHDR(texture2D(texture1, v_Texcoord)) * weight1;
|
|
|
#endif
|
|
|
#ifdef TEXTURE2_ENABLED
|
|
|
tex += decodeHDR(texture2D(texture2, v_Texcoord)) * weight2;
|
|
|
#endif
|
|
|
#ifdef TEXTURE3_ENABLED
|
|
|
tex += decodeHDR(texture2D(texture3, v_Texcoord)) * weight3;
|
|
|
#endif
|
|
|
#ifdef TEXTURE4_ENABLED
|
|
|
tex += decodeHDR(texture2D(texture4, v_Texcoord)) * weight4;
|
|
|
#endif
|
|
|
#ifdef TEXTURE5_ENABLED
|
|
|
tex += decodeHDR(texture2D(texture5, v_Texcoord)) * weight5;
|
|
|
#endif
|
|
|
#ifdef TEXTURE6_ENABLED
|
|
|
tex += decodeHDR(texture2D(texture6, v_Texcoord)) * weight6;
|
|
|
#endif
|
|
|
gl_FragColor = encodeHDR(tex);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export clay.compositor.fxaa
|
|
|
uniform sampler2D texture;
|
|
|
uniform vec4 viewport : VIEWPORT;
|
|
|
varying vec2 v_Texcoord;
|
|
|
#define FXAA_REDUCE_MIN (1.0/128.0)
|
|
|
#define FXAA_REDUCE_MUL (1.0/8.0)
|
|
|
#define FXAA_SPAN_MAX 8.0
|
|
|
@import clay.util.rgbm
|
|
|
void main()
|
|
|
{
|
|
|
vec2 resolution = 1.0 / viewport.zw;
|
|
|
vec3 rgbNW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, -1.0 ) ) * resolution ) ).xyz;
|
|
|
vec3 rgbNE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, -1.0 ) ) * resolution ) ).xyz;
|
|
|
vec3 rgbSW = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( -1.0, 1.0 ) ) * resolution ) ).xyz;
|
|
|
vec3 rgbSE = decodeHDR( texture2D( texture, ( gl_FragCoord.xy + vec2( 1.0, 1.0 ) ) * resolution ) ).xyz;
|
|
|
vec4 rgbaM = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution ) );
|
|
|
vec3 rgbM = rgbaM.xyz;
|
|
|
float opacity = rgbaM.w;
|
|
|
vec3 luma = vec3( 0.299, 0.587, 0.114 );
|
|
|
float lumaNW = dot( rgbNW, luma );
|
|
|
float lumaNE = dot( rgbNE, luma );
|
|
|
float lumaSW = dot( rgbSW, luma );
|
|
|
float lumaSE = dot( rgbSE, luma );
|
|
|
float lumaM = dot( rgbM, luma );
|
|
|
float lumaMin = min( lumaM, min( min( lumaNW, lumaNE ), min( lumaSW, lumaSE ) ) );
|
|
|
float lumaMax = max( lumaM, max( max( lumaNW, lumaNE) , max( lumaSW, lumaSE ) ) );
|
|
|
vec2 dir;
|
|
|
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
|
|
|
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
|
|
|
float dirReduce = max( ( lumaNW + lumaNE + lumaSW + lumaSE ) * ( 0.25 * FXAA_REDUCE_MUL ), FXAA_REDUCE_MIN );
|
|
|
float rcpDirMin = 1.0 / ( min( abs( dir.x ), abs( dir.y ) ) + dirReduce );
|
|
|
dir = min( vec2( FXAA_SPAN_MAX, FXAA_SPAN_MAX),
|
|
|
max( vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
|
|
|
dir * rcpDirMin)) * resolution;
|
|
|
vec3 rgbA = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 1.0 / 3.0 - 0.5 ) ) ).xyz;
|
|
|
rgbA += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * ( 2.0 / 3.0 - 0.5 ) ) ).xyz;
|
|
|
rgbA *= 0.5;
|
|
|
vec3 rgbB = decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * -0.5 ) ).xyz;
|
|
|
rgbB += decodeHDR( texture2D( texture, gl_FragCoord.xy * resolution + dir * 0.5 ) ).xyz;
|
|
|
rgbB *= 0.25;
|
|
|
rgbB += rgbA * 0.5;
|
|
|
float lumaB = dot( rgbB, luma );
|
|
|
if ( ( lumaB < lumaMin ) || ( lumaB > lumaMax ) )
|
|
|
{
|
|
|
gl_FragColor = vec4( rgbA, opacity );
|
|
|
}
|
|
|
else {
|
|
|
gl_FragColor = vec4( rgbB, opacity );
|
|
|
}
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export ecgl.dof.coc
|
|
|
|
|
|
uniform sampler2D depth;
|
|
|
|
|
|
uniform float zNear: 0.1;
|
|
|
uniform float zFar: 2000;
|
|
|
|
|
|
uniform float focalDistance: 3;
|
|
|
uniform float focalRange: 1;
|
|
|
uniform float focalLength: 30;
|
|
|
uniform float fstop: 2.8;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
@import clay.util.encode_float
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
float z = texture2D(depth, v_Texcoord).r * 2.0 - 1.0;
|
|
|
|
|
|
float dist = 2.0 * zNear * zFar / (zFar + zNear - z * (zFar - zNear));
|
|
|
|
|
|
float aperture = focalLength / fstop;
|
|
|
|
|
|
float coc;
|
|
|
|
|
|
float uppper = focalDistance + focalRange;
|
|
|
float lower = focalDistance - focalRange;
|
|
|
if (dist <= uppper && dist >= lower) {
|
|
|
coc = 0.5;
|
|
|
}
|
|
|
else {
|
|
|
float focalAdjusted = dist > uppper ? uppper : lower;
|
|
|
|
|
|
coc = abs(aperture * (focalLength * (dist - focalAdjusted)) / (dist * (focalAdjusted - focalLength)));
|
|
|
coc = clamp(coc, 0.0, 2.0) / 2.00001;
|
|
|
|
|
|
if (dist < lower) {
|
|
|
coc = -coc;
|
|
|
}
|
|
|
coc = coc * 0.5 + 0.5;
|
|
|
}
|
|
|
|
|
|
gl_FragColor = encodeFloat(coc);
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.dof.composite
|
|
|
|
|
|
#define DEBUG 0
|
|
|
|
|
|
uniform sampler2D original;
|
|
|
uniform sampler2D blurred;
|
|
|
uniform sampler2D nearfield;
|
|
|
uniform sampler2D coc;
|
|
|
uniform sampler2D nearcoc;
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
@import clay.util.rgbm
|
|
|
@import clay.util.float
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 blurredColor = decodeHDR(texture2D(blurred, v_Texcoord));
|
|
|
vec4 originalColor = decodeHDR(texture2D(original, v_Texcoord));
|
|
|
|
|
|
float fCoc = decodeFloat(texture2D(coc, v_Texcoord));
|
|
|
|
|
|
fCoc = abs(fCoc * 2.0 - 1.0);
|
|
|
|
|
|
float weight = smoothstep(0.0, 1.0, fCoc);
|
|
|
|
|
|
#ifdef NEARFIELD_ENABLED
|
|
|
vec4 nearfieldColor = decodeHDR(texture2D(nearfield, v_Texcoord));
|
|
|
float fNearCoc = decodeFloat(texture2D(nearcoc, v_Texcoord));
|
|
|
fNearCoc = abs(fNearCoc * 2.0 - 1.0);
|
|
|
|
|
|
gl_FragColor = encodeHDR(
|
|
|
mix(
|
|
|
nearfieldColor, mix(originalColor, blurredColor, weight),
|
|
|
pow(1.0 - fNearCoc, 4.0)
|
|
|
)
|
|
|
);
|
|
|
#else
|
|
|
gl_FragColor = encodeHDR(mix(originalColor, blurredColor, weight));
|
|
|
#endif
|
|
|
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
|
@export ecgl.dof.diskBlur
|
|
|
|
|
|
#define POISSON_KERNEL_SIZE 16;
|
|
|
|
|
|
uniform sampler2D texture;
|
|
|
uniform sampler2D coc;
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
uniform float blurRadius : 10.0;
|
|
|
uniform vec2 textureSize : [512.0, 512.0];
|
|
|
|
|
|
uniform vec2 poissonKernel[POISSON_KERNEL_SIZE];
|
|
|
|
|
|
uniform float percent;
|
|
|
|
|
|
float nrand(const in vec2 n) {
|
|
|
return fract(sin(dot(n.xy ,vec2(12.9898,78.233))) * 43758.5453);
|
|
|
}
|
|
|
|
|
|
@import clay.util.rgbm
|
|
|
@import clay.util.float
|
|
|
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec2 offset = blurRadius / textureSize;
|
|
|
|
|
|
float rnd = 6.28318 * nrand(v_Texcoord + 0.07 * percent );
|
|
|
float cosa = cos(rnd);
|
|
|
float sina = sin(rnd);
|
|
|
vec4 basis = vec4(cosa, -sina, sina, cosa);
|
|
|
|
|
|
#if !defined(BLUR_NEARFIELD) && !defined(BLUR_COC)
|
|
|
offset *= abs(decodeFloat(texture2D(coc, v_Texcoord)) * 2.0 - 1.0);
|
|
|
#endif
|
|
|
|
|
|
#ifdef BLUR_COC
|
|
|
float cocSum = 0.0;
|
|
|
#else
|
|
|
vec4 color = vec4(0.0);
|
|
|
#endif
|
|
|
|
|
|
|
|
|
float weightSum = 0.0;
|
|
|
|
|
|
for (int i = 0; i < POISSON_KERNEL_SIZE; i++) {
|
|
|
vec2 ofs = poissonKernel[i];
|
|
|
|
|
|
ofs = vec2(dot(ofs, basis.xy), dot(ofs, basis.zw));
|
|
|
|
|
|
vec2 uv = v_Texcoord + ofs * offset;
|
|
|
vec4 texel = texture2D(texture, uv);
|
|
|
|
|
|
float w = 1.0;
|
|
|
#ifdef BLUR_COC
|
|
|
float fCoc = decodeFloat(texel) * 2.0 - 1.0;
|
|
|
cocSum += clamp(fCoc, -1.0, 0.0) * w;
|
|
|
#else
|
|
|
texel = decodeHDR(texel);
|
|
|
#if !defined(BLUR_NEARFIELD)
|
|
|
float fCoc = decodeFloat(texture2D(coc, uv)) * 2.0 - 1.0;
|
|
|
w *= abs(fCoc);
|
|
|
#endif
|
|
|
color += texel * w;
|
|
|
#endif
|
|
|
|
|
|
weightSum += w;
|
|
|
}
|
|
|
|
|
|
#ifdef BLUR_COC
|
|
|
gl_FragColor = encodeFloat(clamp(cocSum / weightSum, -1.0, 0.0) * 0.5 + 0.5);
|
|
|
#else
|
|
|
color /= weightSum;
|
|
|
gl_FragColor = encodeHDR(color);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";V.a=`@export ecgl.edge
|
|
|
|
|
|
uniform sampler2D texture;
|
|
|
|
|
|
uniform sampler2D normalTexture;
|
|
|
uniform sampler2D depthTexture;
|
|
|
|
|
|
uniform mat4 projectionInv;
|
|
|
|
|
|
uniform vec2 textureSize;
|
|
|
|
|
|
uniform vec4 edgeColor: [0,0,0,0.8];
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
vec3 packColor(vec2 coord) {
|
|
|
float z = texture2D(depthTexture, coord).r * 2.0 - 1.0;
|
|
|
vec4 p = vec4(v_Texcoord * 2.0 - 1.0, z, 1.0);
|
|
|
vec4 p4 = projectionInv * p;
|
|
|
|
|
|
return vec3(
|
|
|
texture2D(normalTexture, coord).rg,
|
|
|
-p4.z / p4.w / 5.0
|
|
|
);
|
|
|
}
|
|
|
|
|
|
void main() {
|
|
|
vec2 cc = v_Texcoord;
|
|
|
vec3 center = packColor(cc);
|
|
|
|
|
|
float size = clamp(1.0 - (center.z - 10.0) / 100.0, 0.0, 1.0) * 0.5;
|
|
|
float dx = size / textureSize.x;
|
|
|
float dy = size / textureSize.y;
|
|
|
|
|
|
vec2 coord;
|
|
|
vec3 topLeft = packColor(cc+vec2(-dx, -dy));
|
|
|
vec3 top = packColor(cc+vec2(0.0, -dy));
|
|
|
vec3 topRight = packColor(cc+vec2(dx, -dy));
|
|
|
vec3 left = packColor(cc+vec2(-dx, 0.0));
|
|
|
vec3 right = packColor(cc+vec2(dx, 0.0));
|
|
|
vec3 bottomLeft = packColor(cc+vec2(-dx, dy));
|
|
|
vec3 bottom = packColor(cc+vec2(0.0, dy));
|
|
|
vec3 bottomRight = packColor(cc+vec2(dx, dy));
|
|
|
|
|
|
vec3 v = -topLeft-2.0*top-topRight+bottomLeft+2.0*bottom+bottomRight;
|
|
|
vec3 h = -bottomLeft-2.0*left-topLeft+bottomRight+2.0*right+topRight;
|
|
|
|
|
|
float edge = sqrt(dot(h, h) + dot(v, v));
|
|
|
|
|
|
edge = smoothstep(0.8, 1.0, edge);
|
|
|
|
|
|
gl_FragColor = mix(texture2D(texture, v_Texcoord), vec4(edgeColor.rgb, 1.0), edgeColor.a * edge);
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";var U=b(43),C=b(14),w=b(10),y=b(5),T=b(7),x=b(9);function p(m){for(var L=[],d=0;d<30;d++)L.push([Object(U.a)(d,2),Object(U.a)(d,3)]);this._haltonSequence=L,this._frame=0,this._sourceTex=new y.a,this._sourceFb=new w.a,this._sourceFb.attach(this._sourceTex),this._prevFrameTex=new y.a,this._outputTex=new y.a;var g=this._blendPass=new C.a({fragment:T.a.source("clay.compositor.blend")});g.material.disableTexturesAll(),g.material.enableTexture(["texture1","texture2"]),this._blendFb=new w.a({depthBuffer:!1}),this._outputPass=new C.a({fragment:T.a.source("clay.compositor.output"),blendWithPrevious:!0}),this._outputPass.material.define("fragment","OUTPUT_ALPHA"),this._outputPass.material.blend=function(A){A.blendEquationSeparate(A.FUNC_ADD,A.FUNC_ADD),A.blendFuncSeparate(A.ONE,A.ONE_MINUS_SRC_ALPHA,A.ONE,A.ONE_MINUS_SRC_ALPHA)}}p.prototype={constructor:p,jitterProjection:function(m,L){var d=m.viewport,g=d.devicePixelRatio||m.getDevicePixelRatio(),A=d.width*g,M=d.height*g,O=this._haltonSequence[this._frame%this._haltonSequence.length],S=new x.a;S.array[12]=(O[0]*2-1)/A,S.array[13]=(O[1]*2-1)/M,x.a.mul(L.projectionMatrix,S,L.projectionMatrix),x.a.invert(L.invProjectionMatrix,L.projectionMatrix)},resetFrame:function(){this._frame=0},getFrame:function(){return this._frame},getSourceFrameBuffer:function(){return this._sourceFb},getOutputTexture:function(){return this._outputTex},resize:function(m,L){this._prevFrameTex.width=m,this._prevFrameTex.height=L,this._outputTex.width=m,this._outputTex.height=L,this._sourceTex.width=m,this._sourceTex.height=L,this._prevFrameTex.dirty(),this._outputTex.dirty(),this._sourceTex.dirty()},isFinished:function(){return this._frame>=this._haltonSequence.length},render:function(m,L,d){var g=this._blendPass;this._frame===0?(g.setUniform("weight1",0),g.setUniform("weight2",1)):(g.setUniform("weight1",.9),g.setUniform("weight2",.1)),g.setUniform("texture1",this._prevFrameTex),g.setUniform("texture2",L||this._sourceTex),this._blendFb.attach(this._outputTex),this._blendFb.bind(m),g.render(m),this._blendFb.unbind(m),d||(this._outputPass.setUniform("texture",this._outputTex),this._outputPass.render(m));var A=this._prevFrameTex;this._prevFrameTex=this._outputTex,this._outputTex=A,this._frame++},dispose:function(m){this._sourceFb.dispose(m),this._blendFb.dispose(m),this._prevFrameTex.dispose(m),this._outputTex.dispose(m),this._sourceTex.dispose(m),this._outputPass.dispose(m),this._blendPass.dispose(m)}},V.a=p},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(184),y=b(185),T=b(82);C.a.registerAction({type:"geo3DChangeCamera",event:"geo3dcamerachanged",update:"series:updateCamera"},function(x,p){p.eachComponent({mainType:"geo3D",query:x},function(m){m.setView(x)})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(38),y=b(31),T=b(32),x=b(26),p=b(80),m=C.a.extendComponentModel({type:"geo3D",layoutMode:"box",coordinateSystem:null,optionUpdated:function(){var d=this.option;d.regions=this.getFilledRegions(d.regions,d.map);var g=C.a.helper.completeDimensions(["value"],d.data,{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),A=new C.a.List(g,this);A.initData(d.regions);var M={};A.each(function(O){var S=A.getName(O),I=A.getItemModel(O);M[S]=I}),this._regionModelMap=M,this._data=A},getData:function(){return this._data},getRegionModel:function(d){var g=this.getData().getName(d);return this._regionModelMap[g]||new C.a.Model(null,this)},getRegionPolygonCoords:function(d){var g=this.getData().getName(d),A=this.coordinateSystem.getRegion(g);return A?A.geometries:[]},getFormattedLabel:function(d,g){var A=this._data.getName(d),M=this.getRegionModel(A),O=M.get(g==="normal"?["label","formatter"]:["emphasis","label","formatter"]);O==null&&(O=M.get(["label","formatter"]));var S={name:A};if(typeof O=="function")return S.status=g,O(S);if(typeof O=="string"){var I=S.seriesName;return O.replace("{a}",I!=null?I:"")}else return A},defaultOption:{regions:[]}});C.a.util.merge(m.prototype,p.a),C.a.util.merge(m.prototype,w.a),C.a.util.merge(m.prototype,y.a),C.a.util.merge(m.prototype,T.a),C.a.util.merge(m.prototype,x.a);var L=m},function(re,V,b){"use strict";var U=b(59),C=b(0),w=b.n(C),y=b(2),T=b(39),x=b(34),p=w.a.extendComponentView({type:"geo3D",__ecgl__:!0,init:function(m,L){this._geo3DBuilder=new U.a(L),this.groupGL=new y.a.Node,this._lightRoot=new y.a.Node,this._sceneHelper=new x.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot),this._control=new T.a({zr:L.getZr()}),this._control.init()},render:function(m,L,d){this.groupGL.add(this._geo3DBuilder.rootNode);var g=m.coordinateSystem;if(!(!g||!g.viewGL)){g.viewGL.add(this._lightRoot),m.get("show")?g.viewGL.add(this.groupGL):g.viewGL.remove(this.groupGL);var A=this._control;A.setViewGL(g.viewGL);var M=m.getModel("viewControl");A.setFromViewControlModel(M,0),this._sceneHelper.setScene(g.viewGL.scene),this._sceneHelper.updateLight(m),g.viewGL.setPostEffect(m.getModel("postEffect"),d),g.viewGL.setTemporalSuperSampling(m.getModel("temporalSuperSampling")),this._geo3DBuilder.update(m,L,d,0,m.getData().count());var O=g.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse(function(S){S.material&&S.material[O]("fragment","SRGB_DECODE")}),A.off("update"),A.on("update",function(){d.dispatchAction({type:"geo3DChangeCamera",alpha:A.getAlpha(),beta:A.getBeta(),distance:A.getDistance(),center:A.getCenter(),from:this.uid,geo3DId:m.id})})}},afterRender:function(m,L,d,g){var A=g.renderer;this._sceneHelper.updateAmbientCubemap(A,m,d),this._sceneHelper.updateSkybox(A,m,d)},dispose:function(){this._control.dispose()}})},function(re,V,b){"use strict";V.a=U;function U(ne,ce,ae){ae=ae||2;var fe=ce&&ce.length,oe=fe?ce[0]*ae:ne.length,pe=C(ne,0,oe,ae,!0),_e=[];if(!pe)return _e;var de,be,Ae,Fe,Ue,it,tt;if(fe&&(pe=L(ne,ce,pe,ae)),ne.length>80*ae){de=Ae=ne[0],be=Fe=ne[1];for(var et=ae;et<oe;et+=ae)Ue=ne[et],it=ne[et+1],Ue<de&&(de=Ue),it<be&&(be=it),Ue>Ae&&(Ae=Ue),it>Fe&&(Fe=it);tt=Math.max(Ae-de,Fe-be)}return y(pe,_e,ae,de,be,tt),_e}function C(ne,ce,ae,fe,oe){var pe,_e;if(oe===se(ne,ce,ae,fe)>0)for(pe=ce;pe<ae;pe+=fe)_e=ee(pe,ne[pe],ne[pe+1],_e);else for(pe=ae-fe;pe>=ce;pe-=fe)_e=ee(pe,ne[pe],ne[pe+1],_e);return _e&&N(_e,_e.next)&&($(_e),_e=_e.next),_e}function w(ne,ce){if(!ne)return ne;ce||(ce=ne);var ae=ne,fe;do if(fe=!1,!ae.steiner&&(N(ae,ae.next)||P(ae.prev,ae,ae.next)===0)){if($(ae),ae=ce=ae.prev,ae===ae.next)return null;fe=!0}else ae=ae.next;while(fe||ae!==ce);return ce}function y(ne,ce,ae,fe,oe,pe,_e){if(ne){!_e&&pe&&M(ne,fe,oe,pe);for(var de=ne,be,Ae;ne.prev!==ne.next;){if(be=ne.prev,Ae=ne.next,pe?x(ne,fe,oe,pe):T(ne)){ce.push(be.i/ae),ce.push(ne.i/ae),ce.push(Ae.i/ae),$(ne),ne=Ae.next,de=Ae.next;continue}if(ne=Ae,ne===de){_e?_e===1?(ne=p(ne,ce,ae),y(ne,ce,ae,fe,oe,pe,2)):_e===2&&m(ne,ce,ae,fe,oe,pe):y(w(ne),ce,ae,fe,oe,pe,1);break}}}}function T(ne){var ce=ne.prev,ae=ne,fe=ne.next;if(P(ce,ae,fe)>=0)return!1;for(var oe=ne.next.next;oe!==ne.prev;){if(c(ce.x,ce.y,ae.x,ae.y,fe.x,fe.y,oe.x,oe.y)&&P(oe.prev,oe,oe.next)>=0)return!1;oe=oe.next}return!0}function x(ne,ce,ae,fe){var oe=ne.prev,pe=ne,_e=ne.next;if(P(oe,pe,_e)>=0)return!1;for(var de=oe.x<pe.x?oe.x<_e.x?oe.x:_e.x:pe.x<_e.x?pe.x:_e.x,be=oe.y<pe.y?oe.y<_e.y?oe.y:_e.y:pe.y<_e.y?pe.y:_e.y,Ae=oe.x>pe.x?oe.x>_e.x?oe.x:_e.x:pe.x>_e.x?pe.x:_e.x,Fe=oe.y>pe.y?oe.y>_e.y?oe.y:_e.y:pe.y>_e.y?pe.y:_e.y,Ue=S(de,be,ce,ae,fe),it=S(Ae,Fe,ce,ae,fe),tt=ne.nextZ;tt&&tt.z<=it;){if(tt!==ne.prev&&tt!==ne.next&&c(oe.x,oe.y,pe.x,pe.y,_e.x,_e.y,tt.x,tt.y)&&P(tt.prev,tt,tt.next)>=0)return!1;tt=tt.nextZ}for(tt=ne.prevZ;tt&&tt.z>=Ue;){if(tt!==ne.prev&&tt!==ne.next&&c(oe.x,oe.y,pe.x,pe.y,_e.x,_e.y,tt.x,tt.y)&&P(tt.prev,tt,tt.next)>=0)return!1;tt=tt.prevZ}return!0}function p(ne,ce,ae){var fe=ne;do{var oe=fe.prev,pe=fe.next.next;!N(oe,pe)&&k(oe,fe,fe.next,pe)&&z(oe,pe)&&z(pe,oe)&&(ce.push(oe.i/ae),ce.push(fe.i/ae),ce.push(pe.i/ae),$(fe),$(fe.next),fe=ne=pe),fe=fe.next}while(fe!==ne);return fe}function m(ne,ce,ae,fe,oe,pe){var _e=ne;do{for(var de=_e.next.next;de!==_e.prev;){if(_e.i!==de.i&&f(_e,de)){var be=J(_e,de);_e=w(_e,_e.next),be=w(be,be.next),y(_e,ce,ae,fe,oe,pe),y(be,ce,ae,fe,oe,pe);return}de=de.next}_e=_e.next}while(_e!==ne)}function L(ne,ce,ae,fe){var oe=[],pe,_e,de,be,Ae;for(pe=0,_e=ce.length;pe<_e;pe++)de=ce[pe]*fe,be=pe<_e-1?ce[pe+1]*fe:ne.length,Ae=C(ne,de,be,fe,!1),Ae===Ae.next&&(Ae.steiner=!0),oe.push(I(Ae));for(oe.sort(d),pe=0;pe<oe.length;pe++)g(oe[pe],ae),ae=w(ae,ae.next);return ae}function d(ne,ce){return ne.x-ce.x}function g(ne,ce){if(ce=A(ne,ce),ce){var ae=J(ce,ne);w(ae,ae.next)}}function A(ne,ce){var ae=ce,fe=ne.x,oe=ne.y,pe=-1/0,_e;do{if(oe<=ae.y&&oe>=ae.next.y&&ae.next.y!==ae.y){var de=ae.x+(oe-ae.y)*(ae.next.x-ae.x)/(ae.next.y-ae.y);if(de<=fe&&de>pe){if(pe=de,de===fe){if(oe===ae.y)return ae;if(oe===ae.next.y)return ae.next}_e=ae.x<ae.next.x?ae:ae.next}}ae=ae.next}while(ae!==ce);if(!_e)return null;if(fe===pe)return _e.prev;var be=_e,Ae=_e.x,Fe=_e.y,Ue=1/0,it;for(ae=_e.next;ae!==be;)fe>=ae.x&&ae.x>=Ae&&fe!==ae.x&&c(oe<Fe?fe:pe,oe,Ae,Fe,oe<Fe?pe:fe,oe,ae.x,ae.y)&&(it=Math.abs(oe-ae.y)/(fe-ae.x),(it<Ue||it===Ue&&ae.x>_e.x)&&z(ae,ne)&&(_e=ae,Ue=it)),ae=ae.next;return _e}function M(ne,ce,ae,fe){var oe=ne;do oe.z===null&&(oe.z=S(oe.x,oe.y,ce,ae,fe)),oe.prevZ=oe.prev,oe.nextZ=oe.next,oe=oe.next;while(oe!==ne);oe.prevZ.nextZ=null,oe.prevZ=null,O(oe)}function O(ne){var ce,ae,fe,oe,pe,_e,de,be,Ae=1;do{for(ae=ne,ne=null,pe=null,_e=0;ae;){for(_e++,fe=ae,de=0,ce=0;ce<Ae&&(de++,fe=fe.nextZ,!!fe);ce++);for(be=Ae;de>0||be>0&&fe;)de!==0&&(be===0||!fe||ae.z<=fe.z)?(oe=ae,ae=ae.nextZ,de--):(oe=fe,fe=fe.nextZ,be--),pe?pe.nextZ=oe:ne=oe,oe.prevZ=pe,pe=oe;ae=fe}pe.nextZ=null,Ae*=2}while(_e>1);return ne}function S(ne,ce,ae,fe,oe){return ne=32767*(ne-ae)/oe,ce=32767*(ce-fe)/oe,ne=(ne|ne<<8)&16711935,ne=(ne|ne<<4)&252645135,ne=(ne|ne<<2)&858993459,ne=(ne|ne<<1)&1431655765,ce=(ce|ce<<8)&16711935,ce=(ce|ce<<4)&252645135,ce=(ce|ce<<2)&858993459,ce=(ce|ce<<1)&1431655765,ne|ce<<1}function I(ne){var ce=ne,ae=ne;do ce.x<ae.x&&(ae=ce),ce=ce.next;while(ce!==ne);return ae}function c(ne,ce,ae,fe,oe,pe,_e,de){return(oe-_e)*(ce-de)-(ne-_e)*(pe-de)>=0&&(ne-_e)*(fe-de)-(ae-_e)*(ce-de)>=0&&(ae-_e)*(pe-de)-(oe-_e)*(fe-de)>=0}function f(ne,ce){return ne.next.i!==ce.i&&ne.prev.i!==ce.i&&!W(ne,ce)&&z(ne,ce)&&z(ce,ne)&&Z(ne,ce)}function P(ne,ce,ae){return(ce.y-ne.y)*(ae.x-ce.x)-(ce.x-ne.x)*(ae.y-ce.y)}function N(ne,ce){return ne.x===ce.x&&ne.y===ce.y}function k(ne,ce,ae,fe){return N(ne,ce)&&N(ae,fe)||N(ne,fe)&&N(ae,ce)?!0:P(ne,ce,ae)>0!=P(ne,ce,fe)>0&&P(ae,fe,ne)>0!=P(ae,fe,ce)>0}function W(ne,ce){var ae=ne;do{if(ae.i!==ne.i&&ae.next.i!==ne.i&&ae.i!==ce.i&&ae.next.i!==ce.i&&k(ae,ae.next,ne,ce))return!0;ae=ae.next}while(ae!==ne);return!1}function z(ne,ce){return P(ne.prev,ne,ne.next)<0?P(ne,ce,ne.next)>=0&&P(ne,ne.prev,ce)>=0:P(ne,ce,ne.prev)<0||P(ne,ne.next,ce)<0}function Z(ne,ce){var ae=ne,fe=!1,oe=(ne.x+ce.x)/2,pe=(ne.y+ce.y)/2;do ae.y>pe!=ae.next.y>pe&&ae.next.y!==ae.y&&oe<(ae.next.x-ae.x)*(pe-ae.y)/(ae.next.y-ae.y)+ae.x&&(fe=!fe),ae=ae.next;while(ae!==ne);return fe}function J(ne,ce){var ae=new ie(ne.i,ne.x,ne.y),fe=new ie(ce.i,ce.x,ce.y),oe=ne.next,pe=ce.prev;return ne.next=ce,ce.prev=ne,ae.next=oe,oe.prev=ae,fe.next=ae,ae.prev=fe,pe.next=fe,fe.prev=pe,fe}function ee(ne,ce,ae,fe){var oe=new ie(ne,ce,ae);return fe?(oe.next=fe.next,oe.prev=fe,fe.next.prev=oe,fe.next=oe):(oe.prev=oe,oe.next=oe),oe}function $(ne){ne.next.prev=ne.prev,ne.prev.next=ne.next,ne.prevZ&&(ne.prevZ.nextZ=ne.nextZ),ne.nextZ&&(ne.nextZ.prevZ=ne.prevZ)}function ie(ne,ce,ae){this.i=ne,this.x=ce,this.y=ae,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}U.deviation=function(ne,ce,ae,fe){var oe=ce&&ce.length,pe=oe?ce[0]*ae:ne.length,_e=Math.abs(se(ne,0,pe,ae));if(oe)for(var de=0,be=ce.length;de<be;de++){var Ae=ce[de]*ae,Fe=de<be-1?ce[de+1]*ae:ne.length;_e-=Math.abs(se(ne,Ae,Fe,ae))}var Ue=0;for(de=0;de<fe.length;de+=3){var it=fe[de]*ae,tt=fe[de+1]*ae,et=fe[de+2]*ae;Ue+=Math.abs((ne[it]-ne[et])*(ne[tt+1]-ne[it+1])-(ne[it]-ne[tt])*(ne[et+1]-ne[it+1]))}return _e===0&&Ue===0?0:Math.abs((Ue-_e)/_e)};function se(ne,ce,ae,fe){for(var oe=0,pe=ce,_e=ae-fe;pe<ae;pe+=fe)oe+=(ne[_e]-ne[pe])*(ne[pe+1]+ne[_e+1]),_e=pe;return oe}},function(re,V,b){var U=b(12),C={\u5357\u6D77\u8BF8\u5C9B:[32,80],\u5E7F\u4E1C:[0,-10],\u9999\u6E2F:[10,5],\u6FB3\u95E8:[-10,10],\u5929\u6D25:[5,5]};function w(y){U.each(y.regions,function(T){var x=C[T.name];if(x){var p=T.center;p[0]+=x[0]/10.5,p[1]+=-x[1]/(10.5/.75)}})}re.exports=w},function(re,V,b){var U=b(12),C={Russia:[100,60],"United States":[-99,38],"United States of America":[-99,38]};function w(y){U.each(y.regions,function(T){var x=C[T.name];if(x){var p=T.center;p[0]=x[0],p[1]=x[1]}})}re.exports=w},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(190),y=b(191),T=b(193);C.a.registerAction({type:"globeChangeCamera",event:"globecamerachanged",update:"series:updateCamera"},function(x,p){p.eachComponent({mainType:"globe",query:x},function(m){m.setView(x)})}),C.a.registerAction({type:"globeUpdateDisplacment",event:"globedisplacementupdated",update:"update"},function(x,p){})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(38),y=b(31),T=b(32),x=b(26);function p(d,g){d.id=d.id||d.name||g+""}var m=C.a.extendComponentModel({type:"globe",layoutMode:"box",coordinateSystem:null,init:function(){m.superApply(this,"init",arguments),C.a.util.each(this.option.layers,function(d,g){C.a.util.merge(d,this.defaultLayerOption),p(d,g)},this)},mergeOption:function(d){var g=this.option.layers;this.option.layers=null,m.superApply(this,"mergeOption",arguments);function A(I){return C.a.util.reduce(I,function(c,f,P){return p(f,P),c[f.id]=f,c},{})}if(g&&g.length){var M=A(d.layers),O=A(g);for(var S in M)O[S]?C.a.util.merge(O[S],M[S],!0):g.push(d.layers[S]);this.option.layers=g}C.a.util.each(this.option.layers,function(I){C.a.util.merge(I,this.defaultLayerOption)},this)},optionUpdated:function(){this.updateDisplacementHash()},defaultLayerOption:{show:!0,type:"overlay"},defaultOption:{show:!0,zlevel:-10,left:0,top:0,width:"100%",height:"100%",environment:"auto",baseColor:"#fff",baseTexture:"",heightTexture:"",displacementTexture:"",displacementScale:0,displacementQuality:"medium",globeRadius:100,globeOuterRadius:150,shading:"lambert",light:{main:{time:""}},viewControl:{autoRotate:!0,panSensitivity:0,targetCoord:null},layers:[]},setDisplacementData:function(d,g,A){this.displacementData=d,this.displacementWidth=g,this.displacementHeight=A},getDisplacementTexture:function(){return this.get("displacementTexture")||this.get("heightTexture")},getDisplacemenScale:function(){var d=this.getDisplacementTexture(),g=this.get("displacementScale");return(!d||d==="none")&&(g=0),g},hasDisplacement:function(){return this.getDisplacemenScale()>0},_displacementChanged:!0,_displacementScale:0,updateDisplacementHash:function(){var d=this.getDisplacementTexture(),g=this.getDisplacemenScale();this._displacementChanged=this._displacementTexture!==d||this._displacementScale!==g,this._displacementTexture=d,this._displacementScale=g},isDisplacementChanged:function(){return this._displacementChanged}});C.a.util.merge(m.prototype,w.a),C.a.util.merge(m.prototype,y.a),C.a.util.merge(m.prototype,T.a),C.a.util.merge(m.prototype,x.a);var L=m},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(39),T=b(34),x=b(192),p=b(3),m=C.a.extendComponentView({type:"globe",__ecgl__:!0,_displacementScale:0,init:function(L,d){this.groupGL=new w.a.Node,this._sphereGeometry=new w.a.SphereGeometry({widthSegments:200,heightSegments:100,dynamic:!0}),this._overlayGeometry=new w.a.SphereGeometry({widthSegments:80,heightSegments:40}),this._planeGeometry=new w.a.PlaneGeometry,this._earthMesh=new w.a.Mesh({renderNormal:!0}),this._lightRoot=new w.a.Node,this._sceneHelper=new T.a,this._sceneHelper.initLight(this._lightRoot),this.groupGL.add(this._earthMesh),this._control=new y.a({zr:d.getZr()}),this._control.init(),this._layerMeshes={}},render:function(L,d,g){var A=L.coordinateSystem,M=L.get("shading");A.viewGL.add(this._lightRoot),L.get("show")?A.viewGL.add(this.groupGL):A.viewGL.remove(this.groupGL),this._sceneHelper.setScene(A.viewGL.scene),A.viewGL.setPostEffect(L.getModel("postEffect"),g),A.viewGL.setTemporalSuperSampling(L.getModel("temporalSuperSampling"));var O=this._earthMesh;O.geometry=this._sphereGeometry;var S="ecgl."+M;(!O.material||O.material.shader.name!==S)&&(O.material=w.a.createMaterial(S)),w.a.setMaterialFromModel(M,O.material,L,g),["roughnessMap","metalnessMap","detailMap","normalMap"].forEach(function(P){var N=O.material.get(P);N&&(N.flipY=!1)}),O.material.set("color",w.a.parseColor(L.get("baseColor")));var I=A.radius*.99;O.scale.set(I,I,I);var c=O.material.setTextureImage("diffuseMap",L.get("baseTexture"),g,{flipY:!1,anisotropic:8});c&&c.surface&&c.surface.attachToMesh(O);var f=O.material.setTextureImage("bumpMap",L.get("heightTexture"),g,{flipY:!1,anisotropic:8});f&&f.surface&&f.surface.attachToMesh(O),O.material[L.get("postEffect.enable")?"define":"undefine"]("fragment","SRGB_DECODE"),this._updateLight(L,g),this._displaceVertices(L,g),this._updateViewControl(L,g),this._updateLayers(L,g)},afterRender:function(L,d,g,A){var M=A.renderer;this._sceneHelper.updateAmbientCubemap(M,L,g),this._sceneHelper.updateSkybox(M,L,g)},_updateLayers:function(L,d){var g=L.coordinateSystem,A=L.get("layers"),M=g.radius,O=[],S=[],I=[],c=[];C.a.util.each(A,function(W){var z=new C.a.Model(W),Z=z.get("type"),J=w.a.loadTexture(z.get("texture"),d,{flipY:!1,anisotropic:8});if(J.surface&&J.surface.attachToMesh(this._earthMesh),Z==="blend"){var ee=z.get("blendTo"),$=p.a.firstNotNull(z.get("intensity"),1);ee==="emission"?(I.push(J),c.push($)):(O.push(J),S.push($))}else{var ie=z.get("id"),se=this._layerMeshes[ie];se||(se=this._layerMeshes[ie]=new w.a.Mesh({geometry:this._overlayGeometry,castShadow:!1,ignorePicking:!0}));var ne=z.get("shading");ne==="lambert"?(se.material=se.__lambertMaterial||new w.a.Material({autoUpdateTextureStatus:!1,shader:w.a.createShader("ecgl.lambert"),transparent:!0,depthMask:!1}),se.__lambertMaterial=se.material):(se.material=se.__colorMaterial||new w.a.Material({autoUpdateTextureStatus:!1,shader:w.a.createShader("ecgl.color"),transparent:!0,depthMask:!1}),se.__colorMaterial=se.material),se.material.enableTexture("diffuseMap");var ce=z.get("distance"),ae=M+(ce==null?g.radius/100:ce);se.scale.set(ae,ae,ae),M=ae;var fe=this._blankTexture||(this._blankTexture=w.a.createBlankTexture("rgba(255, 255, 255, 0)"));se.material.set("diffuseMap",fe),w.a.loadTexture(z.get("texture"),d,{flipY:!1,anisotropic:8},function(oe){oe.surface&&oe.surface.attachToMesh(se),se.material.set("diffuseMap",oe),d.getZr().refresh()}),z.get("show")?this.groupGL.add(se):this.groupGL.remove(se)}},this);var f=this._earthMesh.material;f.define("fragment","LAYER_DIFFUSEMAP_COUNT",O.length),f.define("fragment","LAYER_EMISSIVEMAP_COUNT",I.length),f.set("layerDiffuseMap",O),f.set("layerDiffuseIntensity",S),f.set("layerEmissiveMap",I),f.set("layerEmissionIntensity",c);var P=L.getModel("debug.wireframe");if(P.get("show")){f.define("both","WIREFRAME_TRIANGLE");var N=w.a.parseColor(P.get("lineStyle.color")||"rgba(0,0,0,0.5)"),k=p.a.firstNotNull(P.get("lineStyle.width"),1);f.set("wireframeLineWidth",k),f.set("wireframeLineColor",N)}else f.undefine("both","WIREFRAME_TRIANGLE")},_updateViewControl:function(L,d){var g=L.coordinateSystem,A=L.getModel("viewControl"),M=g.viewGL.camera,O=this;function S(){return{type:"globeChangeCamera",alpha:I.getAlpha(),beta:I.getBeta(),distance:I.getDistance()-g.radius,center:I.getCenter(),from:O.uid,globeId:L.id}}var I=this._control;I.setViewGL(g.viewGL);var c=A.get("targetCoord"),f,P;c!=null&&(P=c[0]+90,f=c[1]),I.setFromViewControlModel(A,{baseDistance:g.radius,alpha:f,beta:P}),I.off("update"),I.on("update",function(){d.dispatchAction(S())})},_displaceVertices:function(L,d){var g=L.get("displacementQuality"),A=L.get("debug.wireframe.show"),M=L.coordinateSystem;if(!(!L.isDisplacementChanged()&&g===this._displacementQuality&&A===this._showDebugWireframe)){this._displacementQuality=g,this._showDebugWireframe=A;var O=this._sphereGeometry,S={low:100,medium:200,high:400,ultra:800}[g]||200,I=S/2;(O.widthSegments!==S||A)&&(O.widthSegments=S,O.heightSegments=I,O.build()),this._doDisplaceVertices(O,M),A&&O.generateBarycentric()}},_doDisplaceVertices:function(L,d){var g=L.attributes.position.value,A=L.attributes.texcoord0.value,M=L.__originalPosition;(!M||M.length!==g.length)&&(M=new Float32Array(g.length),M.set(g),L.__originalPosition=M);for(var O=d.displacementWidth,S=d.displacementHeight,I=d.displacementData,c=0;c<L.vertexCount;c++){var f=c*3,P=c*2,N=M[f+1],k=M[f+2],W=M[f+3],z=A[P++],Z=A[P++],J=Math.round(z*(O-1)),ee=Math.round(Z*(S-1)),$=ee*O+J,ie=I?I[$]:0;g[f+1]=N+N*ie,g[f+2]=k+k*ie,g[f+3]=W+W*ie}L.generateVertexNormals(),L.dirty(),L.updateBoundingBox()},_updateLight:function(L,d){var g=this._earthMesh;this._sceneHelper.updateLight(L);var A=this._sceneHelper.mainLight,M=L.get("light.main.time")||new Date,O=x.a.getPosition(C.a.number.parseDate(M),0,0),S=Math.cos(O.altitude);A.position.y=-S*Math.cos(O.azimuth),A.position.x=Math.sin(O.altitude),A.position.z=S*Math.sin(O.azimuth),A.lookAt(g.getWorldPosition())},dispose:function(L,d){this.groupGL.removeAll(),this._control.dispose()}})},function(re,V,b){"use strict";var U=Math.PI,C=Math.sin,w=Math.cos,y=Math.tan,T=Math.asin,x=Math.atan2,p=U/180,m=1e3*60*60*24,L=2440588,d=2451545;function g(z){return z.valueOf()/m-.5+L}function A(z){return g(z)-d}var M=p*23.4397;function O(z,Z){return x(C(z)*w(M)-y(Z)*C(M),w(z))}function S(z,Z){return T(C(Z)*w(M)+w(Z)*C(M)*C(z))}function I(z,Z,J){return x(C(z),w(z)*C(Z)-y(J)*w(Z))}function c(z,Z,J){return T(C(Z)*C(J)+w(Z)*w(J)*w(z))}function f(z,Z){return p*(280.16+360.9856235*z)-Z}function P(z){return p*(357.5291+.98560028*z)}function N(z){var Z=p*(1.9148*C(z)+.02*C(2*z)+3e-4*C(3*z)),J=p*102.9372;return z+Z+J+U}function k(z){var Z=P(z),J=N(Z);return{dec:S(J,0),ra:O(J,0)}}var W={};W.getPosition=function(z,Z,J){var ee=p*-J,$=p*Z,ie=A(z),se=k(ie),ne=f(ie,ee)-se.ra;return{azimuth:I(ne,$,se.dec),altitude:c(ne,$,se.dec)}},V.a=W},function(re,V,b){"use strict";var U=b(194),C=b(0),w=b.n(C),y=b(41),T=b.n(y),x=b(20),p=b(3),m=b(2);function L(O,S){var I=document.createElement("canvas"),c=I.getContext("2d"),f=O.width,P=O.height;I.width=f,I.height=P,c.drawImage(O,0,0,f,P);for(var N=c.getImageData(0,0,f,P).data,k=new Float32Array(N.length/4),W=0;W<N.length/4;W++){var z=N[W*4];k[W]=z/255*S}return{data:k,width:f,height:P}}function d(O,S){var I=O.getBoxLayoutParams(),c=T.a.getLayoutRect(I,{width:S.getWidth(),height:S.getHeight()});c.y=S.getHeight()-c.y-c.height,this.viewGL.setViewport(c.x,c.y,c.width,c.height,S.getDevicePixelRatio()),this.radius=O.get("globeRadius");var f=O.get("globeOuterRadius");this.altitudeAxis&&this.altitudeAxis.setExtent(0,f-this.radius)}function g(O,S){var I=[1/0,-1/0];if(O.eachSeries(function(f){if(f.coordinateSystem===this){var P=f.getData(),N=f.coordDimToDataDim("alt")[0];if(N){var k=P.getDataExtent(N,!0);I[0]=Math.min(I[0],k[0]),I[1]=Math.max(I[1],k[1])}}},this),I&&isFinite(I[1]-I[0])){var c=w.a.helper.createScale(I,{type:"value",min:"dataMin",max:"dataMax"});this.altitudeAxis=new w.a.Axis("altitude",c),this.resize(this.model,S)}}var A={dimensions:U.a.prototype.dimensions,create:function(O,S){var I=[];return O.eachComponent("globe",function(c){c.__viewGL=c.__viewGL||new x.a;var f=new U.a;f.viewGL=c.__viewGL,c.coordinateSystem=f,f.model=c,I.push(f),f.resize=d,f.resize(c,S),f.update=g}),O.eachSeries(function(c){if(c.get("coordinateSystem")==="globe"){var f=c.getReferringComponents("globe")[0];if(f||(f=O.getComponent("globe")),!f)throw new Error('globe "'+p.a.firstNotNull(c.get("globe3DIndex"),c.get("globe3DId"),0)+'" not found');var P=f.coordinateSystem;c.coordinateSystem=P}}),O.eachComponent("globe",function(c,f){var P=c.coordinateSystem,N=c.getDisplacementTexture(),k=c.getDisplacemenScale();if(c.isDisplacementChanged()){if(c.hasDisplacement()){var W=!0;m.a.loadTexture(N,S,function(z){var Z=z.image,J=L(Z,k);c.setDisplacementData(J.data,J.width,J.height),W||S.dispatchAction({type:"globeUpdateDisplacment"})}),W=!1}else P.setDisplacementData(null,0,0);P.setDisplacementData(c.displacementData,c.displacementWidth,c.displacementHeight)}}),I}};w.a.registerCoordinateSystem("globe",A);var M=A},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.vec3;function y(T){this.radius=T,this.viewGL=null,this.altitudeAxis,this.displacementData=null,this.displacementWidth,this.displacementHeight}y.prototype={constructor:y,dimensions:["lng","lat","alt"],type:"globe",containPoint:function(){},setDisplacementData:function(T,x,p){this.displacementData=T,this.displacementWidth=x,this.displacementHeight=p},_getDisplacementScale:function(T,x){var p=(T+180)/360*(this.displacementWidth-1),m=(90-x)/180*(this.displacementHeight-1),L=Math.round(p)+Math.round(m)*this.displacementWidth;return this.displacementData[L]},dataToPoint:function(T,x){var p=T[0],m=T[1],L=T[2]||0,d=this.radius;this.displacementData&&(d*=1+this._getDisplacementScale(p,m)),this.altitudeAxis&&(d+=this.altitudeAxis.dataToCoord(L)),p=p*Math.PI/180,m=m*Math.PI/180;var g=Math.cos(m)*d;return x=x||[],x[0]=-g*Math.cos(p+Math.PI),x[1]=Math.sin(m)*d,x[2]=g*Math.sin(p+Math.PI),x},pointToData:function(T,x){var p=T[0],m=T[1],L=T[2],d=w.len(T);p/=d,m/=d,L/=d;var g=Math.asin(m),A=Math.atan2(L,-p);A<0&&(A=Math.PI*2+A);var M=g*180/Math.PI,O=A*180/Math.PI-180;return x=x||[],x[0]=O,x[1]=M,x[2]=d-this.radius,this.altitudeAxis&&(x[2]=this.altitudeAxis.coordToData(x[2])),x}},V.a=y},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(196),y=b(198),T=b(199);C.a.registerAction({type:"mapbox3DChangeCamera",event:"mapbox3dcamerachanged",update:"mapbox3D:updateCamera"},function(x,p){p.eachComponent({mainType:"mapbox3D",query:x},function(m){m.setMapboxCameraOption(x)})})},function(re,V,b){"use strict";var U=b(197),C=b(0),w=b.n(C),y=b(3),T=b(2),x=b(20);function p(g,A){var M=A.getWidth(),O=A.getHeight(),S=A.getDevicePixelRatio();this.viewGL.setViewport(0,0,M,O,S),this.width=M,this.height=O,this.altitudeScale=g.get("altitudeScale"),this.boxHeight=g.get("boxHeight")}function m(g,A){if(this.model.get("boxHeight")!=="auto"){var M=[1/0,-1/0];g.eachSeries(function(O){if(O.coordinateSystem===this){var S=O.getData(),I=O.coordDimToDataDim("alt")[0];if(I){var c=S.getDataExtent(I,!0);M[0]=Math.min(M[0],c[0]),M[1]=Math.max(M[1],c[1])}}},this),M&&isFinite(M[1]-M[0])&&(this.altitudeExtent=M)}}var L={dimensions:U.a.prototype.dimensions,create:function(g,A){var M=[];return g.eachComponent("mapbox3D",function(O){var S=O.__viewGL;S||(S=O.__viewGL=new x.a,S.setRootNode(new T.a.Node));var I=new U.a;I.viewGL=O.__viewGL,I.resize=p,I.resize(O,A),M.push(I),O.coordinateSystem=I,I.model=O,I.setCameraOption(O.getMapboxCameraOption()),I.update=m}),g.eachSeries(function(O){if(O.get("coordinateSystem")==="mapbox3D"){var S=O.getReferringComponents("mapbox3D")[0];if(S||(S=g.getComponent("mapbox3D")),!S)throw new Error('mapbox3D "'+y.a.firstNotNull(O.get("mapbox3DIndex"),O.get("mapbox3DId"),0)+'" not found');O.coordinateSystem=S.coordinateSystem}}),M}};w.a.registerCoordinateSystem("mapbox3D",L);var d=L},function(re,V,b){"use strict";var U=b(1),C=b.n(U),w=C.a.mat4,y=512,T=.6435011087932844,x=Math.PI,p=1/10;function m(){this.width=0,this.height=0,this.altitudeScale=1,this.boxHeight="auto",this.altitudeExtent,this.bearing=0,this.pitch=0,this.center=[0,0],this._origin,this.zoom=0,this._initialZoom}m.prototype={constructor:m,type:"mapbox3D",dimensions:["lng","lat","alt"],containPoint:function(){},setCameraOption:function(L){this.bearing=L.bearing,this.pitch=L.pitch,this.center=L.center,this.zoom=L.zoom,this._origin||(this._origin=this.projectOnTileWithScale(this.center,y)),this._initialZoom==null&&(this._initialZoom=this.zoom),this.updateTransform()},updateTransform:function(){if(this.height){var L=.5/Math.tan(T/2)*this.height*p,d=Math.max(Math.min(this.pitch,60),0)/180*Math.PI,g=T/2,A=Math.PI/2+d,M=Math.sin(g)*L/Math.sin(Math.PI-A-g),O=Math.cos(Math.PI/2-d)*M+L,S=O*1.1,I=new Float64Array(16);w.perspective(I,T,this.width/this.height,1,S),this.viewGL.camera.projectionMatrix.setArray(I),this.viewGL.camera.decomposeProjectionMatrix();var I=w.identity(new Float64Array(16)),c=this.dataToPoint(this.center);w.scale(I,I,[1,-1,1]),w.translate(I,I,[0,0,-L]),w.rotateX(I,I,d),w.rotateZ(I,I,-this.bearing/180*Math.PI),w.translate(I,I,[-c[0]*this.getScale()*p,-c[1]*this.getScale()*p,0]),this.viewGL.camera.viewMatrix.array=I;var f=new Float64Array(16);w.invert(f,I),this.viewGL.camera.worldTransform.array=f,this.viewGL.camera.decomposeWorldTransform();var P=y*this.getScale(),N;if(this.altitudeExtent&&!isNaN(this.boxHeight)){var k=this.altitudeExtent[1]-this.altitudeExtent[0];N=this.boxHeight/k*this.getScale()/Math.pow(2,this._initialZoom)}else N=P/(2*Math.PI*6378e3*Math.abs(Math.cos(this.center[1]*(Math.PI/180))))*this.altitudeScale*p;this.viewGL.rootNode.scale.set(this.getScale()*p,this.getScale()*p,N)}},getScale:function(){return Math.pow(2,this.zoom)},projectOnTile:function(L,d){return this.projectOnTileWithScale(L,this.getScale()*y,d)},projectOnTileWithScale:function(L,d,g){var A=L[0],M=L[1],O=A*x/180,S=M*x/180,I=d*(O+x)/(2*x),c=d*(x-Math.log(Math.tan(x/4+S*.5)))/(2*x);return g=g||[],g[0]=I,g[1]=c,g},unprojectFromTile:function(L,d){return this.unprojectOnTileWithScale(L,this.getScale()*y,d)},unprojectOnTileWithScale:function(L,d,g){var A=L[0],M=L[1],O=A/d*(2*x)-x,S=2*(Math.atan(Math.exp(x-M/d*(2*x)))-x/4);return g=g||[],g[0]=O*180/x,g[1]=S*180/x,g},dataToPoint:function(L,d){return d=this.projectOnTileWithScale(L,y,d),d[0]-=this._origin[0],d[1]-=this._origin[1],d[2]=isNaN(L[2])?0:L[2],isNaN(L[2])||(d[2]=L[2],this.altitudeExtent&&(d[2]-=this.altitudeExtent[0])),d}},V.a=m},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(31),y=b(32),T=["zoom","center","pitch","bearing"],x=C.a.extendComponentModel({type:"mapbox3D",layoutMode:"box",coordinateSystem:null,defaultOption:{zlevel:-10,style:"mapbox://styles/mapbox/light-v9",center:[0,0],zoom:0,pitch:0,bearing:0,light:{main:{alpha:20,beta:30}},altitudeScale:1,boxHeight:"auto"},getMapboxCameraOption:function(){var m=this;return T.reduce(function(L,d){return L[d]=m.get(d),L},{})},setMapboxCameraOption:function(m){m!=null&&T.forEach(function(L){m[L]!=null&&(this.option[L]=m[L])},this)},getMapbox:function(){return this._mapbox},setMapbox:function(m){this._mapbox=m}});C.a.util.merge(x.prototype,w.a),C.a.util.merge(x.prototype,y.a);var p=x},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(200),y=b(34),T=b(2),x=b(201);T.a.Shader.import(x.a);var p=512,m=C.a.extendComponentView({type:"mapbox3D",__ecgl__:!0,init:function(L,d){var g=d.getZr();this._zrLayer=new w.a("mapbox3D",g),g.painter.insertLayer(-1e3,this._zrLayer),this._lightRoot=new T.a.Node,this._sceneHelper=new y.a(this._lightRoot),this._sceneHelper.initLight(this._lightRoot);var A=this._zrLayer.getMapbox(),M=this._dispatchInteractAction.bind(this,d,A);["zoom","rotate","drag","pitch","rotate","move"].forEach(function(O){A.on(O,M)}),this._groundMesh=new T.a.Mesh({geometry:new T.a.PlaneGeometry,material:new T.a.Material({shader:new T.a.Shader({vertex:T.a.Shader.source("ecgl.displayShadow.vertex"),fragment:T.a.Shader.source("ecgl.displayShadow.fragment")}),depthMask:!1}),renderOrder:-100,culling:!1,castShadow:!1,$ignorePicking:!0,renderNormal:!0})},render:function(L,d,g){var A=this._zrLayer.getMapbox(),M=L.get("style"),O=JSON.stringify(M);O!==this._oldStyleStr&&M&&A.setStyle(M),this._oldStyleStr=O,A.setCenter(L.get("center")),A.setZoom(L.get("zoom")),A.setPitch(L.get("pitch")),A.setBearing(L.get("bearing")),L.setMapbox(A);var S=L.coordinateSystem;S.viewGL.scene.add(this._lightRoot),S.viewGL.add(this._groundMesh),this._updateGroundMesh(),this._sceneHelper.setScene(S.viewGL.scene),this._sceneHelper.updateLight(L),S.viewGL.setPostEffect(L.getModel("postEffect"),g),S.viewGL.setTemporalSuperSampling(L.getModel("temporalSuperSampling")),this._mapbox3DModel=L},afterRender:function(L,d,g,A){var M=A.renderer;this._sceneHelper.updateAmbientCubemap(M,L,g),this._sceneHelper.updateSkybox(M,L,g),L.coordinateSystem.viewGL.scene.traverse(function(O){O.material&&(O.material.define("fragment","NORMAL_UP_AXIS",2),O.material.define("fragment","NORMAL_FRONT_AXIS",1))})},updateCamera:function(L,d,g,A){L.coordinateSystem.setCameraOption(A),this._updateGroundMesh(),g.getZr().refresh()},_dispatchInteractAction:function(L,d,g){L.dispatchAction({type:"mapbox3DChangeCamera",pitch:d.getPitch(),zoom:d.getZoom(),center:d.getCenter().toArray(),bearing:d.getBearing(),mapbox3DId:this._mapbox3DModel&&this._mapbox3DModel.id})},_updateGroundMesh:function(){if(this._mapbox3DModel){var L=this._mapbox3DModel.coordinateSystem,d=L.dataToPoint(L.center);this._groundMesh.position.set(d[0],d[1],-.001);var g=new T.a.Plane(new T.a.Vector3(0,0,1),0),A=L.viewGL.camera.castRay(new T.a.Vector2(-1,-1)),M=L.viewGL.camera.castRay(new T.a.Vector2(1,1)),O=A.intersectPlane(g),S=M.intersectPlane(g),I=O.dist(S)/L.viewGL.rootNode.scale.x;this._groundMesh.scale.set(I,I,1)}},dispose:function(L,d){d.getZr().delLayer(-1e3)}})},function(re,V,b){"use strict";function U(w,y){if(this.id=w,this.zr=y,this.dom=document.createElement("div"),this.dom.style.cssText="position:absolute;left:0;right:0;top:0;bottom:0;",!mapboxgl)throw new Error("Mapbox GL library must be included. See https://www.mapbox.com/mapbox-gl-js/api/");this._mapbox=new mapboxgl.Map({container:this.dom}),this._initEvents()}U.prototype.resize=function(){this._mapbox.resize()},U.prototype.getMapbox=function(){return this._mapbox},U.prototype.clear=function(){},U.prototype.refresh=function(){this._mapbox.resize()};var C=["mousedown","mouseup","click","dblclick","mousemove","mousewheel","wheel","touchstart","touchend","touchmove","touchcancel"];U.prototype._initEvents=function(){var w=this._mapbox.getCanvasContainer();this._handlers=this._handlers||{contextmenu:function(y){return y.preventDefault(),!1}},C.forEach(function(y){this._handlers[y]=function(T){var x={};for(var p in T)x[p]=T[p];x.bubbles=!1;var m=new T.constructor(T.type,x);w.dispatchEvent(m)},this.zr.dom.addEventListener(y,this._handlers[y])},this),this.zr.dom.addEventListener("contextmenu",this._handlers.contextmenu)},U.prototype.dispose=function(){C.forEach(function(w){this.zr.dom.removeEventListener(w,this._handlers[w])},this)},V.a=U},function(re,V,b){"use strict";V.a=`
|
|
|
@export ecgl.displayShadow.vertex
|
|
|
|
|
|
@import ecgl.common.transformUniforms
|
|
|
|
|
|
@import ecgl.common.uv.header
|
|
|
|
|
|
@import ecgl.common.attributes
|
|
|
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
@import ecgl.common.uv.main
|
|
|
v_Normal = normalize((worldInverseTranspose * vec4(normal, 0.0)).xyz);
|
|
|
|
|
|
v_WorldPosition = (world * vec4(position, 1.0)).xyz;
|
|
|
gl_Position = worldViewProjection * vec4(position, 1.0);
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.displayShadow.fragment
|
|
|
|
|
|
@import ecgl.common.uv.fragmentHeader
|
|
|
|
|
|
varying vec3 v_Normal;
|
|
|
varying vec3 v_WorldPosition;
|
|
|
|
|
|
uniform float roughness: 0.2;
|
|
|
|
|
|
#ifdef DIRECTIONAL_LIGHT_COUNT
|
|
|
@import clay.header.directional_light
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.ssaoMap.header
|
|
|
|
|
|
@import clay.plugin.compute_shadow_map
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
float shadow = 1.0;
|
|
|
|
|
|
@import ecgl.common.ssaoMap.main
|
|
|
|
|
|
#if defined(DIRECTIONAL_LIGHT_COUNT) && defined(DIRECTIONAL_LIGHT_SHADOWMAP_COUNT)
|
|
|
float shadowContribsDir[DIRECTIONAL_LIGHT_COUNT];
|
|
|
if(shadowEnabled)
|
|
|
{
|
|
|
computeShadowOfDirectionalLights(v_WorldPosition, shadowContribsDir);
|
|
|
}
|
|
|
for (int i = 0; i < DIRECTIONAL_LIGHT_COUNT; i++) {
|
|
|
shadow = min(shadow, shadowContribsDir[i] * 0.5 + 0.5);
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
shadow *= 0.5 + ao * 0.5;
|
|
|
shadow = clamp(shadow, 0.0, 1.0);
|
|
|
|
|
|
gl_FragColor = vec4(vec3(0.0), 1.0 - shadow);
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(203),y=b(206),T=b(208),x=b(16);C.a.registerVisual(Object(x.a)("bar3D")),C.a.registerProcessor(function(p,m){p.eachSeriesByType("bar3d",function(L){var d=L.getData();d.filterSelf(function(g){return d.hasValue(g)})})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(4),y=b(1),T=b.n(y),x=b(204),p=b(205),m=T.a.vec3;function L(A,M){var O=A.getData(),S=A.get("minHeight")||0,I=A.get("barSize"),c=["lng","lat","alt"].map(function(N){return A.coordDimToDataDim(N)[0]});if(I==null){var f=M.radius*Math.PI,P=Object(p.a)(O,c[0],c[1]);I=[f/Math.sqrt(O.count()/P),f/Math.sqrt(O.count()/P)]}else C.a.util.isArray(I)||(I=[I,I]);O.each(c,function(N,k,W,z){var Z=O.get(c[2],z,!0),J=O.stackedOn?Z-W:M.altitudeAxis.scale.getExtent()[0],ee=Math.max(M.altitudeAxis.dataToCoord(W),S),$=M.dataToPoint([N,k,J]),ie=M.dataToPoint([N,k,Z]),se=m.sub([],ie,$);m.normalize(se,se);var ne=[I[0],ee,I[1]];O.setItemLayout(z,[$,se,ne])}),O.setLayout("orient",w.a.UP.array)}function d(A,M){var O=A.getData(),S=A.get("barSize"),I=A.get("minHeight")||0,c=["lng","lat","alt"].map(function(k){return A.coordDimToDataDim(k)[0]});if(S==null){var f=Math.min(M.size[0],M.size[2]),P=Object(p.a)(O,c[0],c[1]);S=[f/Math.sqrt(O.count()/P),f/Math.sqrt(O.count()/P)]}else C.a.util.isArray(S)||(S=[S,S]);var N=[0,1,0];O.each(c,function(k,W,z,Z){var J=O.get(c[2],Z,!0),ee=O.stackedOn?J-z:M.altitudeAxis.scale.getExtent()[0],$=Math.max(M.altitudeAxis.dataToCoord(z),I),ie=M.dataToPoint([k,W,ee]),se=[S[0],$,S[1]];O.setItemLayout(Z,[ie,N,se])}),O.setLayout("orient",[1,0,0])}function g(A,M){var O=A.getData(),S=A.coordDimToDataDim("lng")[0],I=A.coordDimToDataDim("lat")[0],c=A.coordDimToDataDim("alt")[0],f=A.get("barSize"),P=A.get("minHeight")||0;if(f==null){var N=O.getDataExtent(S),k=O.getDataExtent(I),W=M.dataToPoint([N[0],k[0]]),z=M.dataToPoint([N[1],k[1]]),Z=Math.min(Math.abs(W[0]-z[0]),Math.abs(W[1]-z[1]))||1,J=Object(p.a)(O,S,I);f=[Z/Math.sqrt(O.count()/J),Z/Math.sqrt(O.count()/J)]}else C.a.util.isArray(f)||(f=[f,f]),f[0]/=M.getScale()/16,f[1]/=M.getScale()/16;var ee=[0,0,1];O.each([S,I,c],function($,ie,se,ne){var ce=O.get(c,ne,!0),ae=O.stackedOn?ce-se:0,fe=M.dataToPoint([$,ie,ae]),oe=M.dataToPoint([$,ie,ce]),pe=Math.max(oe[2]-fe[2],P),_e=[f[0],pe,f[1]];O.setItemLayout(ne,[fe,ee,_e])}),O.setLayout("orient",[1,0,0])}C.a.registerLayout(function(A,M){A.eachSeriesByType("bar3D",function(O){var S=O.coordinateSystem,I=S&&S.type;if(I==="globe")L(O,S);else if(I==="cartesian3D")Object(x.a)(O,S);else if(I==="geo3D")d(O,S);else if(I==="mapbox3D")g(O,S);else throw S?new Error("bar3D doesn't support coordinate system "+S.type):new Error("bar3D doesn't have coordinate system.")})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(1),y=b.n(w),T=y.a.vec3;function x(m){var L=m[0],d=m[1];return!(L>0&&d>0||L<0&&d<0)}function p(m,L){var d=m.getData(),g=m.get("barSize");if(g==null){var A=L.size,M,O,S=L.getAxis("x"),I=L.getAxis("y");S.type==="category"?M=S.getBandWidth()*.7:M=Math.round(A[0]/Math.sqrt(d.count()))*.6,I.type==="category"?O=I.getBandWidth()*.7:O=Math.round(A[1]/Math.sqrt(d.count()))*.6,g=[M,O]}else C.a.util.isArray(g)||(g=[g,g]);var c=L.getAxis("z").scale.getExtent(),f=x(c),P=["x","y","z"].map(function(N){return m.coordDimToDataDim(N)[0]});d.each(P,function(N,k,W,z){var Z=d.get(P[2],z,!0),J=d.stackedOn?Z-W:f?0:c[0],ee=L.dataToPoint([N,k,J]),$=L.dataToPoint([N,k,Z]),ie=T.dist(ee,$),se=[0,$[1]<ee[1]?-1:1,0];Math.abs(ie)===0&&(ie=.1);var ne=[g[0],ie,g[1]];d.setItemLayout(z,[ee,se,ne])}),d.setLayout("orient",[1,0,0])}V.a=p},function(re,V,b){"use strict";V.a=function(U,C,w){for(var y=U.getDataExtent(C),T=U.getDataExtent(w),x=y[1]-y[0]||y[0],p=T[1]-T[0]||T[0],m=50,L=new Uint8Array(m*m),d=0;d<U.count();d++){var g=U.get(C,d),A=U.get(w,d),M=Math.floor((g-y[0])/x*(m-1)),O=Math.floor((A-T[0])/p*(m-1)),S=O*m+M;L[S]=L[S]||1}for(var I=0,d=0;d<L.length;d++)L[d]&&I++;return I/L.length}},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(3),T=b(27),x=b(207),p=b(61),m=b(1),L=b.n(m),d=L.a.vec3,g=C.a.extendChartView({type:"bar3D",__ecgl__:!0,init:function(A,M){this.groupGL=new w.a.Node,this._api=M,this._labelsBuilder=new p.a(256,256,M);var O=this;this._labelsBuilder.getLabelPosition=function(S,I,c){if(O._data){var f=O._data.getItemLayout(S),P=f[0],N=f[1],k=f[2][1];return d.scaleAndAdd([],P,N,c+k)}else return[0,0]},this._labelsBuilder.getMesh().renderOrder=100},render:function(A,M,O){var S=this._prevBarMesh;this._prevBarMesh=this._barMesh,this._barMesh=S,this._barMesh||(this._barMesh=new w.a.Mesh({geometry:new x.a,shadowDepthMaterial:new w.a.Material({shader:new w.a.Shader(w.a.Shader.source("ecgl.sm.depth.vertex"),w.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:A.coordinateSystem.type==="cartesian3D",renderOrder:10,renderNormal:!0})),this.groupGL.remove(this._prevBarMesh),this.groupGL.add(this._barMesh),this.groupGL.add(this._labelsBuilder.getMesh());var I=A.coordinateSystem;if(this._doRender(A,O),I&&I.viewGL){I.viewGL.add(this.groupGL);var c=I.viewGL.isLinearSpace()?"define":"undefine";this._barMesh.material[c]("fragment","SRGB_DECODE")}this._data=A.getData(),this._labelsBuilder.updateData(this._data),this._labelsBuilder.updateLabels(),this._updateAnimation(A)},_updateAnimation:function(A){w.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevBarMesh,this._barMesh,A)},_doRender:function(A,M){var O=A.getData(),S=A.get("shading"),I=S!=="color",c=this,f=this._barMesh,P="ecgl."+S;(!f.material||f.material.shader.name!==P)&&(f.material=w.a.createMaterial(P,["VERTEX_COLOR"])),w.a.setMaterialFromModel(S,f.material,A,M),f.geometry.enableNormal=I,f.geometry.resetOffset();var N=A.get("bevelSize"),k=A.get("bevelSmoothness");f.geometry.bevelSegments=k,f.geometry.bevelSize=N;var W=[],z=new Float32Array(O.count()*4),Z=0,ie=0,J=!1;O.each(function(ne){if(O.hasValue(ne)){var ce=O.getItemVisual(ne,"color"),ae=O.getItemVisual(ne,"opacity");ae==null&&(ae=1),w.a.parseColor(ce,W),W[3]*=ae,z[Z++]=W[0],z[Z++]=W[1],z[Z++]=W[2],z[Z++]=W[3],W[3]>0&&(ie++,W[3]<.99&&(J=!0))}}),f.geometry.setBarCount(ie);var ee=O.getLayout("orient"),$=this._barIndexOfData=new Int32Array(O.count()),ie=0;O.each(function(ne){if(!O.hasValue(ne)){$[ne]=-1;return}var ce=O.getItemLayout(ne),ae=ce[0],fe=ce[1],oe=ce[2],pe=ne*4;W[0]=z[pe++],W[1]=z[pe++],W[2]=z[pe++],W[3]=z[pe++],W[3]>0&&(c._barMesh.geometry.addBar(ae,fe,ee,oe,W,ne),$[ne]=ie++)}),f.geometry.dirty(),f.geometry.updateBoundingBox();var se=f.material;se.transparent=J,se.depthMask=!J,f.geometry.sortTriangles=J,this._initHandler(A,M)},_initHandler:function(A,M){var O=A.getData(),S=this._barMesh,I=A.coordinateSystem.type==="cartesian3D";S.seriesIndex=A.seriesIndex;var c=-1;S.off("mousemove"),S.off("mouseout"),S.on("mousemove",function(f){var P=S.geometry.getDataIndexOfVertex(f.triangle[0]);P!==c&&(this._downplay(c),this._highlight(P),this._labelsBuilder.updateLabels([P]),I&&M.dispatchAction({type:"grid3DShowAxisPointer",value:[O.get("x",P),O.get("y",P),O.get("z",P,!0)]})),c=P,S.dataIndex=P},this),S.on("mouseout",function(f){this._downplay(c),this._labelsBuilder.updateLabels(),c=-1,S.dataIndex=-1,I&&M.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_highlight:function(A){var M=this._data;if(M){var O=this._barIndexOfData[A];if(!(O<0)){var S=M.getItemModel(A),I=S.getModel("emphasis.itemStyle"),c=I.get("color"),f=I.get("opacity");if(c==null){var P=M.getItemVisual(A,"color");c=C.a.color.lift(P,-.4)}f==null&&(f=M.getItemVisual(A,"opacity"));var N=w.a.parseColor(c);N[3]*=f,this._barMesh.geometry.setColor(O,N),this._api.getZr().refresh()}}},_downplay:function(A){var M=this._data;if(M){var O=this._barIndexOfData[A];if(!(O<0)){var S=M.getItemVisual(A,"color"),I=M.getItemVisual(A,"opacity"),c=w.a.parseColor(S);c[3]*=I,this._barMesh.geometry.setColor(O,c),this._api.getZr().refresh()}}},highlight:function(A,M,O,S){this._toggleStatus("highlight",A,M,O,S)},downplay:function(A,M,O,S){this._toggleStatus("downplay",A,M,O,S)},_toggleStatus:function(A,M,O,S,I){var c=M.getData(),f=y.a.queryDataIndex(c,I),P=this;f!=null?C.a.util.each(T.a.normalizeToArray(f),function(N){A==="highlight"?this._highlight(N):this._downplay(N)},this):c.each(function(N){A==="highlight"?P._highlight(N):P._downplay(N)})},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(33),y=b(60),T=b(13),x=b(1),p=b.n(x),m=p.a.vec3,L=p.a.mat3,d=T.a.extend(function(){return{attributes:{position:new T.a.Attribute("position","float",3,"POSITION"),normal:new T.a.Attribute("normal","float",3,"NORMAL"),color:new T.a.Attribute("color","float",4,"COLOR"),prevPosition:new T.a.Attribute("prevPosition","float",3),prevNormal:new T.a.Attribute("prevNormal","float",3)},dynamic:!0,enableNormal:!1,bevelSize:1,bevelSegments:0,_dataIndices:null,_vertexOffset:0,_triangleOffset:0}},{resetOffset:function(){this._vertexOffset=0,this._triangleOffset=0},setBarCount:function(g){var A=this.enableNormal,M=this.getBarVertexCount()*g,O=this.getBarTriangleCount()*g;this.vertexCount!==M&&(this.attributes.position.init(M),A?this.attributes.normal.init(M):this.attributes.normal.value=null,this.attributes.color.init(M)),this.triangleCount!==O&&(this.indices=M>65535?new Uint32Array(O*3):new Uint16Array(O*3),this._dataIndices=new Uint32Array(M))},getBarVertexCount:function(){var g=this.bevelSize>0?this.bevelSegments:0;return g>0?this._getBevelBarVertexCount(g):this.enableNormal?24:8},getBarTriangleCount:function(){var g=this.bevelSize>0?this.bevelSegments:0;return g>0?this._getBevelBarTriangleCount(g):12},_getBevelBarVertexCount:function(g){return(g+1)*4*(g+1)*2},_getBevelBarTriangleCount:function(g){var A=g*4+3,M=g*2+1;return(A+1)*M*2+4},setColor:function(g,A){for(var M=this.getBarVertexCount(),O=M*g,S=M*(g+1),I=O;I<S;I++)this.attributes.color.set(I,A);this.dirtyAttribute("color")},getDataIndexOfVertex:function(g){return this._dataIndices?this._dataIndices[g]:null},addBar:function(){for(var g=m.create,A=m.scaleAndAdd,M=g(),O=g(),S=g(),I=g(),c=g(),f=g(),P=g(),N=[],k=[],W=0;W<8;W++)N[W]=g();for(var z=[[0,1,5,4],[2,3,7,6],[4,5,6,7],[3,2,1,0],[0,4,7,3],[1,2,6,5]],Z=[0,1,2,0,2,3],J=[],W=0;W<z.length;W++)for(var ee=z[W],$=0;$<2;$++){for(var ie=[],se=0;se<3;se++)ie.push(ee[Z[$*3+se]]);J.push(ie)}return function(ne,ce,ae,fe,oe,pe){var _e=this._vertexOffset;if(this.bevelSize>0&&this.bevelSegments>0)this._addBevelBar(ne,ce,ae,fe,this.bevelSize,this.bevelSegments,oe);else{m.copy(S,ce),m.normalize(S,S),m.cross(I,ae,S),m.normalize(I,I),m.cross(O,S,I),m.normalize(I,I),m.negate(c,O),m.negate(f,S),m.negate(P,I),A(N[0],ne,O,fe[0]/2),A(N[0],N[0],I,fe[2]/2),A(N[1],ne,O,fe[0]/2),A(N[1],N[1],P,fe[2]/2),A(N[2],ne,c,fe[0]/2),A(N[2],N[2],P,fe[2]/2),A(N[3],ne,c,fe[0]/2),A(N[3],N[3],I,fe[2]/2),A(M,ne,S,fe[1]),A(N[4],M,O,fe[0]/2),A(N[4],N[4],I,fe[2]/2),A(N[5],M,O,fe[0]/2),A(N[5],N[5],P,fe[2]/2),A(N[6],M,c,fe[0]/2),A(N[6],N[6],P,fe[2]/2),A(N[7],M,c,fe[0]/2),A(N[7],N[7],I,fe[2]/2);var de=this.attributes;if(this.enableNormal){k[0]=O,k[1]=c,k[2]=S,k[3]=f,k[4]=I,k[5]=P;for(var be=this._vertexOffset,Ae=0;Ae<z.length;Ae++){for(var Fe=this._triangleOffset*3,Ue=0;Ue<6;Ue++)this.indices[Fe++]=be+Z[Ue];be+=4,this._triangleOffset+=2}for(var Ae=0;Ae<z.length;Ae++)for(var it=k[Ae],Ue=0;Ue<4;Ue++){var tt=z[Ae][Ue];de.position.set(this._vertexOffset,N[tt]),de.normal.set(this._vertexOffset,it),de.color.set(this._vertexOffset++,oe)}}else{for(var Ae=0;Ae<J.length;Ae++){for(var Fe=this._triangleOffset*3,Ue=0;Ue<3;Ue++)this.indices[Fe+Ue]=J[Ae][Ue]+this._vertexOffset;this._triangleOffset++}for(var Ae=0;Ae<N.length;Ae++)de.position.set(this._vertexOffset,N[Ae]),de.color.set(this._vertexOffset++,oe)}}for(var et=this._vertexOffset,Ae=_e;Ae<et;Ae++)this._dataIndices[Ae]=pe}}(),_addBevelBar:function(){var g=m.create(),A=m.create(),M=m.create(),O=L.create(),S=[],I=[1,-1,-1,1],c=[1,1,-1,-1],f=[2,0];return function(P,N,k,W,z,Z,J){m.copy(A,N),m.normalize(A,A),m.cross(M,k,A),m.normalize(M,M),m.cross(g,A,M),m.normalize(M,M),O[0]=g[0],O[1]=g[1],O[2]=g[2],O[3]=A[0],O[4]=A[1],O[5]=A[2],O[6]=M[0],O[7]=M[1],O[8]=M[2],z=Math.min(W[0],W[2])/2*z;for(var ee=0;ee<3;ee++)S[ee]=Math.max(W[ee]-z*2,0);for(var $=(W[0]-S[0])/2,ie=(W[1]-S[1])/2,se=(W[2]-S[2])/2,ne=[],ce=[],ae=this._vertexOffset,fe=[],ee=0;ee<2;ee++){fe[ee]=fe[ee]=[];for(var oe=0;oe<=Z;oe++)for(var pe=0;pe<4;pe++){(oe===0&&ee===0||ee===1&&oe===Z)&&fe[ee].push(ae);for(var _e=0;_e<=Z;_e++){var de=_e/Z*Math.PI/2+Math.PI/2*pe,be=oe/Z*Math.PI/2+Math.PI/2*ee;ce[0]=$*Math.cos(de)*Math.sin(be),ce[1]=ie*Math.cos(be),ce[2]=se*Math.sin(de)*Math.sin(be),ne[0]=ce[0]+I[pe]*S[0]/2,ne[1]=ce[1]+ie+f[ee]*S[1]/2,ne[2]=ce[2]+c[pe]*S[2]/2,Math.abs($-ie)<1e-6&&Math.abs(ie-se)<1e-6||(ce[0]/=$*$,ce[1]/=ie*ie,ce[2]/=se*se),m.normalize(ce,ce),m.transformMat3(ne,ne,O),m.transformMat3(ce,ce,O),m.add(ne,ne,P),this.attributes.position.set(ae,ne),this.enableNormal&&this.attributes.normal.set(ae,ce),this.attributes.color.set(ae,J),ae++}}}for(var Ae=Z*4+3,Fe=Z*2+1,Ue=Ae+1,pe=0;pe<Fe;pe++)for(var ee=0;ee<=Ae;ee++){var it=pe*Ue+ee+this._vertexOffset,tt=pe*Ue+(ee+1)%Ue+this._vertexOffset,et=(pe+1)*Ue+(ee+1)%Ue+this._vertexOffset,vt=(pe+1)*Ue+ee+this._vertexOffset;this.setTriangleIndices(this._triangleOffset++,[et,it,tt]),this.setTriangleIndices(this._triangleOffset++,[et,vt,it])}this.setTriangleIndices(this._triangleOffset++,[fe[0][0],fe[0][2],fe[0][1]]),this.setTriangleIndices(this._triangleOffset++,[fe[0][0],fe[0][3],fe[0][2]]),this.setTriangleIndices(this._triangleOffset++,[fe[1][0],fe[1][1],fe[1][2]]),this.setTriangleIndices(this._triangleOffset++,[fe[1][0],fe[1][2],fe[1][3]]),this._vertexOffset=ae}}()});C.a.util.defaults(d.prototype,w.a),C.a.util.defaults(d.prototype,y.a),V.a=d},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(26),y=b(27),T=b(35),x=b(44),p=C.a.extendSeriesModel({type:"series.bar3D",dependencies:["globe"],visualColorAccessPath:"itemStyle.color",getInitialData:function(L,d){return Object(x.a)(this)},getFormattedLabel:function(L,d,g,A){var M=y.a.getFormattedLabel(this,L,d,g,A);return M==null&&(M=this.getData().get("z",L)),M},formatTooltip:function(L){return Object(T.a)(this,L)},defaultOption:{coordinateSystem:"cartesian3D",globeIndex:0,grid3DIndex:0,zlevel:-10,bevelSize:0,bevelSmoothness:2,onGridPlane:"xy",shading:"color",minHeight:0,itemStyle:{opacity:1},label:{show:!1,distance:2,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},emphasis:{label:{show:!0}},animationDurationUpdate:500}});C.a.util.merge(p.prototype,w.a);var m=p},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(210),y=b(211),T=b(45),x=b.n(T),p=b(16);C.a.registerVisual(x()("line3D","circle",null)),C.a.registerVisual(Object(p.a)("line3D")),C.a.registerLayout(function(m,L){m.eachSeriesByType("line3D",function(d){var g=d.getData(),A=d.coordinateSystem;if(A){if(A.type!=="cartesian3D"){console.error("line3D needs cartesian3D coordinateSystem");return}var M=new Float32Array(g.count()*3),O=[],S=[],I=A.dimensions,c=I.map(function(f){return d.coordDimToDataDim(f)[0]});A&&g.each(c,function(f,P,N,k){O[0]=f,O[1]=P,O[2]=N,A.dataToPoint(O,S),M[k*3]=S[0],M[k*3+1]=S[1],M[k*3+2]=S[2]}),g.setLayout("points",M)}})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(35),y=b(44),T=C.a.extendSeriesModel({type:"series.line3D",dependencies:["grid3D"],visualColorAccessPath:"lineStyle.color",getInitialData:function(p,m){return Object(y.a)(this)},formatTooltip:function(p){return Object(w.a)(this,p)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,lineStyle:{width:2},animationDurationUpdate:500}}),x=T},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(3),T=b(22),x=b(9),p=b(4),m=b(212),L=b.n(m),d=b(1),g=b.n(d),A=b(40),M=g.a.vec3;w.a.Shader.import(A.a);var O=C.a.extendChartView({type:"line3D",__ecgl__:!0,init:function(S,I){this.groupGL=new w.a.Node,this._api=I},render:function(S,I,c){var f=this._prevLine3DMesh;this._prevLine3DMesh=this._line3DMesh,this._line3DMesh=f,this._line3DMesh||(this._line3DMesh=new w.a.Mesh({geometry:new T.a({useNativeLine:!1,sortTriangles:!0}),material:new w.a.Material({shader:w.a.createShader("ecgl.meshLines3D")}),renderOrder:10}),this._line3DMesh.geometry.pick=this._pick.bind(this)),this.groupGL.remove(this._prevLine3DMesh),this.groupGL.add(this._line3DMesh);var P=S.coordinateSystem;if(P&&P.viewGL){P.viewGL.add(this.groupGL);var N=P.viewGL.isLinearSpace()?"define":"undefine";this._line3DMesh.material[N]("fragment","SRGB_DECODE")}this._doRender(S,c),this._data=S.getData(),this._camera=P.viewGL.camera,this.updateCamera(),this._updateAnimation(S)},updateCamera:function(){this._updateNDCPosition()},_doRender:function(S,I){var c=S.getData(),f=this._line3DMesh;f.geometry.resetOffset();var P=c.getLayout("points"),N=[],k=new Float32Array(P.length/3*4),W=0,z=!1;c.each(function(ee){var $=c.getItemVisual(ee,"color"),ie=c.getItemVisual(ee,"opacity");ie==null&&(ie=1),w.a.parseColor($,N),N[3]*=ie,k[W++]=N[0],k[W++]=N[1],k[W++]=N[2],k[W++]=N[3],N[3]<.99&&(z=!0)}),f.geometry.setVertexCount(f.geometry.getPolylineVertexCount(P)),f.geometry.setTriangleCount(f.geometry.getPolylineTriangleCount(P)),f.geometry.addPolyline(P,k,y.a.firstNotNull(S.get("lineStyle.width"),1)),f.geometry.dirty(),f.geometry.updateBoundingBox();var Z=f.material;Z.transparent=z,Z.depthMask=!z;var J=S.getModel("debug.wireframe");J.get("show")?(f.geometry.createAttribute("barycentric","float",3),f.geometry.generateBarycentric(),f.material.set("both","WIREFRAME_TRIANGLE"),f.material.set("wireframeLineColor",w.a.parseColor(J.get("lineStyle.color")||"rgba(0,0,0,0.5)")),f.material.set("wireframeLineWidth",y.a.firstNotNull(J.get("lineStyle.width"),1))):f.material.set("both","WIREFRAME_TRIANGLE"),this._points=P,this._initHandler(S,I)},_updateAnimation:function(S){w.a.updateVertexAnimation([["prevPosition","position"],["prevPositionPrev","positionPrev"],["prevPositionNext","positionNext"]],this._prevLine3DMesh,this._line3DMesh,S)},_initHandler:function(S,I){var c=S.getData(),f=S.coordinateSystem,P=this._line3DMesh,N=-1;P.seriesIndex=S.seriesIndex,P.off("mousemove"),P.off("mouseout"),P.on("mousemove",function(k){var W=f.pointToData(k.point.array),z=c.indicesOfNearest("x",W[0])[0];z!==N&&(I.dispatchAction({type:"grid3DShowAxisPointer",value:[c.get("x",z),c.get("y",z),c.get("z",z)]}),P.dataIndex=z),N=z},this),P.on("mouseout",function(k){N=-1,P.dataIndex=-1,I.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_updateNDCPosition:function(){var S=new x.a,I=this._camera;x.a.multiply(S,I.projectionMatrix,I.viewMatrix);var c=this._positionNDC,f=this._points,P=f.length/3;(!c||c.length/2!==P)&&(c=this._positionNDC=new Float32Array(P*2));for(var N=[],k=0;k<P;k++){var W=k*3,z=k*2;N[0]=f[W],N[1]=f[W+1],N[2]=f[W+2],N[3]=1,M.transformMat4(N,N,S.array),c[z]=N[0]/N[3],c[z+1]=N[1]/N[3]}},_pick:function(S,I,c,f,P,N){var k=this._positionNDC,W=this._data.hostModel,z=W.get("lineStyle.width"),Z=-1,J=c.viewport.width,ee=c.viewport.height,$=J*.5,ie=ee*.5;S=(S+1)*$,I=(I+1)*ie;for(var se=1;se<k.length/2;se++){var ne=(k[(se-1)*2]+1)*$,ce=(k[(se-1)*2+1]+1)*ie,ae=(k[se*2]+1)*$,fe=(k[se*2+1]+1)*ie;if(L.a.containStroke(ne,ce,ae,fe,z,S,I)){var oe=(ne-S)*(ne-S)+(ce-I)*(ce-I),pe=(ae-S)*(ae-S)+(fe-I)*(fe-I);Z=oe<pe?se-1:se}}if(Z>=0){var _e=Z*3,de=new p.a(this._points[_e],this._points[_e+1],this._points[_e+2]);N.push({dataIndex:Z,point:de,pointWorld:de.clone(),target:this._line3DMesh,distance:this._camera.getWorldPosition().dist(de)})}},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(re,V){function b(U,C,w,y,T,x,p){if(T===0)return!1;var m=T,L=0,d=U;if(p>C+m&&p>y+m||p<C-m&&p<y-m||x>U+m&&x>w+m||x<U-m&&x<w-m)return!1;if(U!==w)L=(C-y)/(U-w),d=(U*y-w*C)/(U-w);else return Math.abs(x-U)<=m/2;var g=L*x-p+d,A=g*g/(L*L+1);return A<=m/2*m/2}V.containStroke=b},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(214),y=b(215),T=b(45),x=b.n(T),p=b(16);C.a.registerVisual(x()("scatter3D","circle",null)),C.a.registerVisual(Object(p.a)("scatter3D")),C.a.registerLayout({seriesType:"scatter3D",reset:function(m){var L=m.coordinateSystem;if(L){var d=L.dimensions;if(d.length<3){console.error("scatter3D needs 3D coordinateSystem");return}var g=d.map(function(O){return m.coordDimToDataDim(O)[0]}),A=[],M=[];return{progress:function(O,S){for(var I=new Float32Array((O.end-O.start)*3),c=O.start;c<O.end;c++){var f=(c-O.start)*3;A[0]=S.get(g[0],c),A[1]=S.get(g[1],c),A[2]=S.get(g[2],c),L.dataToPoint(A,M),I[f]=M[0],I[f+1]=M[1],I[f+2]=M[2]}S.setLayout("points",I)}}}}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(27),y=b(35),T=b(44);C.a.extendSeriesModel({type:"series.scatter3D",dependencies:["globe","grid3D","geo3D"],visualColorAccessPath:"itemStyle.color",getInitialData:function(x,p){return Object(T.a)(this)},getFormattedLabel:function(x,p,m,L){var d=w.a.getFormattedLabel(this,x,p,m,L);if(d==null){var g=this.getData(),A=g.dimensions[g.dimensions.length-1];d=g.get(A,x)}return d},formatTooltip:function(x){return Object(y.a)(this,x)},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,progressive:1e5,progressiveThreshold:1e5,grid3DIndex:0,globeIndex:0,symbol:"circle",symbolSize:10,blendMode:"source-over",label:{show:!1,position:"right",distance:5,textStyle:{fontSize:14,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:3}},itemStyle:{opacity:.8},emphasis:{label:{show:!0}},animationDurationUpdate:500}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(3),T=b(27),x=b(62);C.a.extendChartView({type:"scatter3D",__ecgl__:!0,init:function(p,m){this.groupGL=new w.a.Node,this._pointsBuilderList=[],this._currentStep=0},render:function(p,m,L){if(this.groupGL.removeAll(),!!p.getData().count()){var d=p.coordinateSystem;if(d&&d.viewGL){d.viewGL.add(this.groupGL),this._camera=d.viewGL.camera;var g=this._pointsBuilderList[0];g||(g=this._pointsBuilderList[0]=new x.a(!1,L)),this._pointsBuilderList.length=1,this.groupGL.add(g.rootNode),g.update(p,m,L),g.updateView(d.viewGL.camera)}else throw new Error("Invalid coordinate system")}},incrementalPrepareRender:function(p,m,L){var d=p.coordinateSystem;if(d&&d.viewGL)d.viewGL.add(this.groupGL),this._camera=d.viewGL.camera;else throw new Error("Invalid coordinate system");this.groupGL.removeAll(),this._currentStep=0},incrementalRender:function(p,m,L,d){if(!(p.end<=p.start)){var g=this._pointsBuilderList[this._currentStep];g||(g=new x.a(!1,d),this._pointsBuilderList[this._currentStep]=g),this.groupGL.add(g.rootNode),g.update(m,L,d,p.start,p.end),g.updateView(m.coordinateSystem.viewGL.camera),this._currentStep++}},updateCamera:function(){this._pointsBuilderList.forEach(function(p){p.updateView(this._camera)},this)},highlight:function(p,m,L,d){this._toggleStatus("highlight",p,m,L,d)},downplay:function(p,m,L,d){this._toggleStatus("downplay",p,m,L,d)},_toggleStatus:function(p,m,L,d,g){var A=m.getData(),M=y.a.queryDataIndex(A,g),O=p==="highlight";M!=null?C.a.util.each(T.a.normalizeToArray(M),function(S){for(var I=0;I<this._pointsBuilderList.length;I++){var c=this._pointsBuilderList[I];O?c.highlight(A,S):c.downplay(A,S)}},this):A.each(function(S){for(var I=0;I<this._pointsBuilderList.length;I++){var c=this._pointsBuilderList[I];O?c.highlight(A,S):c.downplay(A,S)}})},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U);function w(p,d,L){var d=d||document.createElement("canvas");d.width=p,d.height=p;var g=d.getContext("2d");return L&&L(g),d}function y(p,m,L,d){C.a.util.isArray(m)||(m=[m,m]);var g=x.getMarginByStyle(L,d),A=m[0]+g.left+g.right,M=m[1]+g.top+g.bottom,O=C.a.helper.createSymbol(p,0,0,m[0],m[1]),S=Math.max(A,M);O.position=[g.left,g.top],A>M?O.position[1]+=(S-M)/2:O.position[0]+=(S-A)/2;var I=O.getBoundingRect();return O.position[0]-=I.x,O.position[1]-=I.y,O.setStyle(L),O.update(),O.__size=S,O}function T(p,m,L){var d=m.width,g=m.height,A=p.canvas.width,M=p.canvas.height,O=d/A,S=g/M;function I(Z){return Z<128?1:-1}function c(Z,J){var ee=1/0;Z=Math.floor(Z*O),J=Math.floor(J*S);for(var $=J*d+Z,ie=m.data[$*4],se=I(ie),ne=Math.max(J-L,0);ne<Math.min(J+L,g);ne++)for(var ce=Math.max(Z-L,0);ce<Math.min(Z+L,d);ce++){var $=ne*d+ce,ae=m.data[$*4],fe=I(ae),oe=ce-Z,pe=ne-J;if(se!==fe){var _e=oe*oe+pe*pe;_e<ee&&(ee=_e)}}return se*Math.sqrt(ee)}for(var f=p.createImageData(A,M),P=0;P<M;P++)for(var N=0;N<A;N++){var k=c(N,P),W=k/L*.5+.5,z=(P*A+N)*4;f.data[z++]=(1-W)*255,f.data[z++]=(1-W)*255,f.data[z++]=(1-W)*255,f.data[z++]=255}return f}var x={getMarginByStyle:function(p){var m=p.minMargin||0,L=0;p.stroke&&p.stroke!=="none"&&(L=p.lineWidth==null?1:p.lineWidth);var d=p.shadowBlur||0,g=p.shadowOffsetX||0,A=p.shadowOffsetY||0,M={};return M.left=Math.max(L/2,-g+d,m),M.right=Math.max(L/2,g+d,m),M.top=Math.max(L/2,-A+d,m),M.bottom=Math.max(L/2,A+d,m),M},createSymbolSprite:function(p,m,L,d){var g=y(p,m,L),A=x.getMarginByStyle(L);return{image:w(g.__size,d,function(M){g.brush(M)}),margin:A}},createSDFFromCanvas:function(p,m,L,d){return w(m,d,function(g){var A=p.getContext("2d"),M=A.getImageData(0,0,p.width,p.height);g.putImageData(T(g,M,L),0,0)})},createSimpleSprite:function(p,m){return w(p,m,function(L){var d=p/2;L.beginPath(),L.arc(d,d,60,0,Math.PI*2,!1),L.closePath();var g=L.createRadialGradient(d,d,0,d,d,d);g.addColorStop(0,"rgba(255, 255, 255, 1)"),g.addColorStop(.5,"rgba(255, 255, 255, 0.5)"),g.addColorStop(1,"rgba(255, 255, 255, 0)"),L.fillStyle=g,L.fill()})}};V.a=x},function(re,V,b){"use strict";var U=b(2),C=b(218),w=b(0),y=b.n(w),T=b(1),x=b.n(T),p=b(219),m=x.a.vec4;U.a.Shader.import(p.a);var L=U.a.Mesh.extend(function(){var d=new U.a.Geometry({dynamic:!0,attributes:{color:new U.a.Geometry.Attribute("color","float",4,"COLOR"),position:new U.a.Geometry.Attribute("position","float",3,"POSITION"),size:new U.a.Geometry.Attribute("size","float",1),prevPosition:new U.a.Geometry.Attribute("prevPosition","float",3),prevSize:new U.a.Geometry.Attribute("prevSize","float",1)}});y.a.util.extend(d,C.a);var g=new U.a.Material({shader:U.a.createShader("ecgl.sdfSprite"),transparent:!0,depthMask:!1});g.enableTexture("sprite"),g.define("both","VERTEX_COLOR"),g.define("both","VERTEX_SIZE");var A=new U.a.Texture2D({image:document.createElement("canvas"),flipY:!1});return g.set("sprite",A),d.pick=this._pick.bind(this),{geometry:d,material:g,mode:U.a.Mesh.POINTS,sizeScale:1}},{_pick:function(d,g,A,M,O,S){var I=this._positionNDC;if(I)for(var c=A.viewport,f=2/c.width,P=2/c.height,N=this.geometry.vertexCount-1;N>=0;N--){var k;this.geometry.indices?k=this.geometry.indices[N]:k=N;var W=I[k*2],z=I[k*2+1],Z=this.geometry.attributes.size.get(k)/this.sizeScale,J=Z/2;if(d>W-J*f&&d<W+J*f&&g>z-J*P&&g<z+J*P){var ee=new U.a.Vector3,$=new U.a.Vector3;this.geometry.attributes.position.get(k,ee.array),U.a.Vector3.transformMat4($,ee,this.worldTransform),S.push({vertexIndex:k,point:ee,pointWorld:$,target:this,distance:$.distance(M.getWorldPosition())})}}},updateNDCPosition:function(d,g,A){var M=this._positionNDC,O=this.geometry;(!M||M.length/2!==O.vertexCount)&&(M=this._positionNDC=new Float32Array(O.vertexCount*2));for(var S=m.create(),I=0;I<O.vertexCount;I++)O.attributes.position.get(I,S),S[3]=1,m.transformMat4(S,S,d.array),m.scale(S,S,1/S[3]),M[I*2]=S[0],M[I*2+1]=S[1]}});V.a=L},function(re,V,b){"use strict";var U=b(81),C=b(1),w=b.n(C),y=w.a.vec3;V.a={needsSortVertices:function(){return this.sortVertices},needsSortVerticesProgressively:function(){return this.needsSortVertices()&&this.vertexCount>=2e4},doSortVertices:function(T,x){var p=this.indices,m=y.create();if(!p){p=this.indices=this.vertexCount>65535?new Uint32Array(this.vertexCount):new Uint16Array(this.vertexCount);for(var L=0;L<p.length;L++)p[L]=L}if(x===0){var d=this.attributes.position,T=T.array,g=0;(!this._zList||this._zList.length!==this.vertexCount)&&(this._zList=new Float32Array(this.vertexCount));for(var A,L=0;L<this.vertexCount;L++){d.get(L,m);var M=y.sqrDist(m,T);isNaN(M)&&(M=1e7,g++),L===0?(A=M,M=0):M=M-A,this._zList[L]=M}this._noneCount=g}if(this.vertexCount<2e4)x===0&&this._simpleSort(this._noneCount/this.vertexCount>.05);else for(var L=0;L<3;L++)this._progressiveQuickSort(x*3+L);this.dirtyIndices()},_simpleSort:function(T){var x=this._zList,p=this.indices;function m(L,d){return x[d]-x[L]}T?Array.prototype.sort.call(p,m):U.a.sort(p,m,0,p.length-1)},_progressiveQuickSort:function(T){var x=this._zList,p=this.indices;this._quickSort=this._quickSort||new U.a,this._quickSort.step(p,function(m,L){return x[L]-x[m]},T)}}},function(re,V,b){"use strict";V.a=`@export ecgl.sdfSprite.vertex
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform float elapsedTime : 0;
|
|
|
|
|
|
attribute vec3 position : POSITION;
|
|
|
|
|
|
#ifdef VERTEX_SIZE
|
|
|
attribute float size;
|
|
|
#else
|
|
|
uniform float u_Size;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
attribute vec4 a_FillColor: COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
attribute vec3 prevPosition;
|
|
|
attribute float prevSize;
|
|
|
uniform float percent : 1.0;
|
|
|
#endif
|
|
|
|
|
|
|
|
|
#ifdef POSITIONTEXTURE_ENABLED
|
|
|
uniform sampler2D positionTexture;
|
|
|
#endif
|
|
|
|
|
|
varying float v_Size;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
|
|
|
#ifdef POSITIONTEXTURE_ENABLED
|
|
|
gl_Position = worldViewProjection * vec4(texture2D(positionTexture, position.xy).xy, -10.0, 1.0);
|
|
|
#else
|
|
|
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
vec3 pos = mix(prevPosition, position, percent);
|
|
|
#else
|
|
|
vec3 pos = position;
|
|
|
#endif
|
|
|
gl_Position = worldViewProjection * vec4(pos, 1.0);
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_SIZE
|
|
|
#ifdef VERTEX_ANIMATION
|
|
|
v_Size = mix(prevSize, size, percent);
|
|
|
#else
|
|
|
v_Size = size;
|
|
|
#endif
|
|
|
#else
|
|
|
v_Size = u_Size;
|
|
|
#endif
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
v_Color = a_FillColor;
|
|
|
#endif
|
|
|
|
|
|
gl_PointSize = v_Size;
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.sdfSprite.fragment
|
|
|
|
|
|
uniform vec4 color: [1, 1, 1, 1];
|
|
|
uniform vec4 strokeColor: [1, 1, 1, 1];
|
|
|
uniform float smoothing: 0.07;
|
|
|
|
|
|
uniform float lineWidth: 0.0;
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
varying vec4 v_Color;
|
|
|
#endif
|
|
|
|
|
|
varying float v_Size;
|
|
|
|
|
|
uniform sampler2D sprite;
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = color;
|
|
|
|
|
|
vec4 _strokeColor = strokeColor;
|
|
|
|
|
|
#ifdef VERTEX_COLOR
|
|
|
gl_FragColor *= v_Color;
|
|
|
#endif
|
|
|
|
|
|
#ifdef SPRITE_ENABLED
|
|
|
float d = texture2D(sprite, gl_PointCoord).r;
|
|
|
gl_FragColor.a *= smoothstep(0.5 - smoothing, 0.5 + smoothing, d);
|
|
|
|
|
|
if (lineWidth > 0.0) {
|
|
|
float sLineWidth = lineWidth / 2.0;
|
|
|
|
|
|
float outlineMaxValue0 = 0.5 + sLineWidth;
|
|
|
float outlineMaxValue1 = 0.5 + sLineWidth + smoothing;
|
|
|
float outlineMinValue0 = 0.5 - sLineWidth - smoothing;
|
|
|
float outlineMinValue1 = 0.5 - sLineWidth;
|
|
|
|
|
|
if (d <= outlineMaxValue1 && d >= outlineMinValue0) {
|
|
|
float a = _strokeColor.a;
|
|
|
if (d <= outlineMinValue1) {
|
|
|
a = a * smoothstep(outlineMinValue0, outlineMinValue1, d);
|
|
|
}
|
|
|
else {
|
|
|
a = a * smoothstep(outlineMaxValue1, outlineMaxValue0, d);
|
|
|
}
|
|
|
gl_FragColor.rgb = mix(gl_FragColor.rgb * gl_FragColor.a, _strokeColor.rgb, a);
|
|
|
gl_FragColor.a = gl_FragColor.a * (1.0 - a) + a;
|
|
|
}
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor = sRGBToLinear(gl_FragColor);
|
|
|
#endif
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(221),y=b(222),T=b(225),x=b(16);C.a.registerVisual(Object(x.a)("lines3D")),C.a.registerAction({type:"lines3DPauseEffect",event:"lines3deffectpaused",update:"series.lines3D:pauseEffect"},function(){}),C.a.registerAction({type:"lines3DResumeEffect",event:"lines3deffectresumed",update:"series.lines3D:resumeEffect"},function(){}),C.a.registerAction({type:"lines3DToggleEffect",event:"lines3deffectchanged",update:"series.lines3D:toggleEffect"},function(){})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(1),y=b.n(w),T=y.a.vec3,x=y.a.vec2,p=T.normalize,m=T.cross,L=T.sub,d=T.add,g=T.create,A=g(),M=g(),O=g(),S=g(),I=[],c=[];function f(Z,J){x.copy(I,Z[0]),x.copy(c,Z[1]);var ee=[],$=ee[0]=g(),ie=ee[1]=g(),se=ee[2]=g(),ne=ee[3]=g();J.dataToPoint(I,$),J.dataToPoint(c,ne),p(A,$),L(M,ne,$),p(M,M),m(O,M,A),p(O,O),m(M,A,O),d(ie,A,M),p(ie,ie),p(A,ne),L(M,$,ne),p(M,M),m(O,M,A),p(O,O),m(M,A,O),d(se,A,M),p(se,se),d(S,$,ne),p(S,S);var ce=T.dot($,S),ae=T.dot(S,ie),fe=(Math.max(T.len($),T.len(ne))-ce)/ae*2;return T.scaleAndAdd(ie,$,ie,fe),T.scaleAndAdd(se,ne,se,fe),ee}function P(Z,J,ee){var $=[],ie=$[0]=T.create(),se=$[1]=T.create(),ne=$[2]=T.create(),ce=$[3]=T.create();J.dataToPoint(Z[0],ie),J.dataToPoint(Z[1],ce);var ae=T.dist(ie,ce);return T.lerp(se,ie,ce,.3),T.lerp(ne,ie,ce,.3),T.scaleAndAdd(se,se,ee,Math.min(ae*.1,10)),T.scaleAndAdd(ne,ne,ee,Math.min(ae*.1,10)),$}function N(Z,J){for(var ee=new Float32Array(Z.length*3),$=0,ie=[],se=0;se<Z.length;se++)J.dataToPoint(Z[se],ie),ee[$++]=ie[0],ee[$++]=ie[1],ee[$++]=ie[2];return ee}function k(Z){var J=[];return Z.each(function(ee){var $=Z.getItemModel(ee),ie=$.option instanceof Array?$.option:$.getShallow("coords",!0);if(!(ie instanceof Array&&ie.length>0&&ie[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(ie)+". Lines must have 2d coords array in data item.");J.push(ie)}),{coordsList:J}}function W(Z,J){var ee=Z.getData(),$=Z.get("polyline");ee.setLayout("lineType",$?"polyline":"cubicBezier");var ie=k(ee);ee.each(function(se){var ne=ie.coordsList[se],ce=$?N:f;ee.setItemLayout(se,ce(ne,J))})}function z(Z,J,ee){var $=Z.getData(),ie=Z.get("polyline"),se=k($);$.setLayout("lineType",ie?"polyline":"cubicBezier"),$.each(function(ne){var ce=se.coordsList[ne],ae=ie?N(ce,J):P(ce,J,ee);$.setItemLayout(ne,ae)})}C.a.registerLayout(function(Z,J){Z.eachSeriesByType("lines3D",function(ee){var $=ee.coordinateSystem;$.type==="globe"?W(ee,$):$.type==="geo3D"?z(ee,$,[0,1,0]):$.type==="mapbox3D"&&z(ee,$,[0,0,1])})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(22),T=b(223),x=b(40);w.a.Shader.import(x.a);function p(L){return L.radius!=null?L.radius:L.size!=null?Math.max(L.size[0],L.size[1],L.size[2]):100}var m=C.a.extendChartView({type:"lines3D",__ecgl__:!0,init:function(L,d){this.groupGL=new w.a.Node,this._meshLinesMaterial=new w.a.Material({shader:w.a.createShader("ecgl.meshLines3D"),transparent:!0,depthMask:!1}),this._linesMesh=new w.a.Mesh({geometry:new y.a,material:this._meshLinesMaterial,$ignorePicking:!0}),this._trailMesh=new T.a},render:function(L,d,g){this.groupGL.add(this._linesMesh);var A=L.coordinateSystem,M=L.getData();if(A&&A.viewGL){var O=A.viewGL;O.add(this.groupGL),this._updateLines(L,d,g);var S=A.viewGL.isLinearSpace()?"define":"undefine";this._linesMesh.material[S]("fragment","SRGB_DECODE"),this._trailMesh.material[S]("fragment","SRGB_DECODE")}var I=this._trailMesh;if(I.stopAnimation(),L.get("effect.show")){this.groupGL.add(I),I.updateData(M,g,this._linesMesh.geometry),I.__time=I.__time||0;var c=3600*1e3;this._curveEffectsAnimator=I.animate("",{loop:!0}).when(c,{__time:c}).during(function(){I.setAnimationTime(I.__time)}).start()}else this.groupGL.remove(I),this._curveEffectsAnimator=null;this._linesMesh.material.blend=this._trailMesh.material.blend=L.get("blendMode")==="lighter"?w.a.additiveBlend:null},pauseEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.pause()},resumeEffect:function(){this._curveEffectsAnimator&&this._curveEffectsAnimator.resume()},toggleEffect:function(){var L=this._curveEffectsAnimator;L&&(L.isPaused()?L.resume():L.pause())},_updateLines:function(L,d,g){var A=L.getData(),M=L.coordinateSystem,O=this._linesMesh.geometry,S=L.get("polyline");O.expandLine=!0;var I=p(M);O.segmentScale=I/20;var c="lineStyle.width".split("."),f=g.getDevicePixelRatio(),P=0;A.each(function(z){var Z=A.getItemModel(z),J=Z.get(c);J==null&&(J=1),A.setItemVisual(z,"lineWidth",J),P=Math.max(J,P)}),O.useNativeLine=!1;var N=0,k=0;A.each(function(z){var Z=A.getItemLayout(z);S?(N+=O.getPolylineVertexCount(Z),k+=O.getPolylineTriangleCount(Z)):(N+=O.getCubicCurveVertexCount(Z[0],Z[1],Z[2],Z[3]),k+=O.getCubicCurveTriangleCount(Z[0],Z[1],Z[2],Z[3]))}),O.setVertexCount(N),O.setTriangleCount(k),O.resetOffset();var W=[];A.each(function(z){var Z=A.getItemLayout(z),J=A.getItemVisual(z,"color"),ee=A.getItemVisual(z,"opacity"),$=A.getItemVisual(z,"lineWidth")*f;ee==null&&(ee=1),W=w.a.parseColor(J,W),W[3]*=ee,S?O.addPolyline(Z,W,$):O.addCubicCurve(Z[0],Z[1],Z[2],Z[3],W,$)}),O.dirty()},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(1),T=b.n(y),x=b(22),p=b(224),m=T.a.vec3;function L(d){return d>0?1:-1}w.a.Shader.import(p.a),V.a=w.a.Mesh.extend(function(){var d=new w.a.Material({shader:new w.a.Shader(w.a.Shader.source("ecgl.trail2.vertex"),w.a.Shader.source("ecgl.trail2.fragment")),transparent:!0,depthMask:!1}),g=new x.a({dynamic:!0});return g.createAttribute("dist","float",1),g.createAttribute("distAll","float",1),g.createAttribute("start","float",1),{geometry:g,material:d,culling:!1,$ignorePicking:!0}},{updateData:function(d,g,A){var M=d.hostModel,O=this.geometry,S=M.getModel("effect"),I=S.get("trailWidth")*g.getDevicePixelRatio(),c=S.get("trailLength"),f=M.get("effect.constantSpeed"),P=M.get("effect.period")*1e3,N=f!=null;this.getScene()||console.error("TrailMesh must been add to scene before updateData"),N?this.material.set("speed",f/1e3):this.material.set("period",P),this.material[N?"define":"undefine"]("vertex","CONSTANT_SPEED");var k=M.get("polyline");O.trailLength=c,this.material.set("trailLength",c),O.resetOffset(),["position","positionPrev","positionNext"].forEach(function(fe){O.attributes[fe].value=A.attributes[fe].value});var W=["dist","distAll","start","offset","color"];W.forEach(function(fe){O.attributes[fe].init(O.vertexCount)}),O.indices=A.indices;var z=[],Z=S.get("trailColor"),J=S.get("trailOpacity"),ee=Z!=null,$=J!=null;this.updateWorldTransform();var ie=this.worldTransform.x.len(),se=this.worldTransform.y.len(),ne=this.worldTransform.z.len(),ce=0,ae=0;d.each(function(fe){var oe=d.getItemLayout(fe),pe=$?J:d.getItemVisual(fe,"opacity"),_e=d.getItemVisual(fe,"color");pe==null&&(pe=1),z=w.a.parseColor(ee?Z:_e,z),z[3]*=pe;for(var de=k?A.getPolylineVertexCount(oe):A.getCubicCurveVertexCount(oe[0],oe[1],oe[2],oe[3]),be=0,Ae=[],Fe=[],Ue=ce;Ue<ce+de;Ue++)O.attributes.position.get(Ue,Ae),Ae[0]*=ie,Ae[1]*=se,Ae[2]*=ne,Ue>ce&&(be+=m.dist(Ae,Fe)),O.attributes.dist.set(Ue,be),m.copy(Fe,Ae);ae=Math.max(ae,be);for(var it=Math.random()*(N?be:P),Ue=ce;Ue<ce+de;Ue++)O.attributes.distAll.set(Ue,be),O.attributes.start.set(Ue,it),O.attributes.offset.set(Ue,L(A.attributes.offset.get(Ue))*I/2),O.attributes.color.set(Ue,z);ce+=de}),this.material.set("spotSize",ae*.1*c),this.material.set("spotIntensity",S.get("spotIntensity")),O.dirty()},setAnimationTime:function(d){this.material.set("time",d)}})},function(re,V,b){"use strict";V.a=`@export ecgl.trail2.vertex
|
|
|
attribute vec3 position: POSITION;
|
|
|
attribute vec3 positionPrev;
|
|
|
attribute vec3 positionNext;
|
|
|
attribute float offset;
|
|
|
attribute float dist;
|
|
|
attribute float distAll;
|
|
|
attribute float start;
|
|
|
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform vec4 viewport : VIEWPORT;
|
|
|
uniform float near : NEAR;
|
|
|
|
|
|
uniform float speed : 0;
|
|
|
uniform float trailLength: 0.3;
|
|
|
uniform float time;
|
|
|
uniform float period: 1000;
|
|
|
|
|
|
uniform float spotSize: 1;
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
varying float v_Percent;
|
|
|
varying float v_SpotPercent;
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexHeader
|
|
|
|
|
|
@import ecgl.lines3D.clipNear
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
@import ecgl.lines3D.expandLine
|
|
|
|
|
|
gl_Position = currProj;
|
|
|
|
|
|
v_Color = a_Color;
|
|
|
|
|
|
@import ecgl.common.wireframe.vertexMain
|
|
|
|
|
|
#ifdef CONSTANT_SPEED
|
|
|
float t = mod((speed * time + start) / distAll, 1. + trailLength) - trailLength;
|
|
|
#else
|
|
|
float t = mod((time + start) / period, 1. + trailLength) - trailLength;
|
|
|
#endif
|
|
|
|
|
|
float trailLen = distAll * trailLength;
|
|
|
|
|
|
v_Percent = (dist - t * distAll) / trailLen;
|
|
|
|
|
|
v_SpotPercent = spotSize / distAll;
|
|
|
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.trail2.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
uniform float spotIntensity: 5;
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
varying float v_Percent;
|
|
|
varying float v_SpotPercent;
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentHeader
|
|
|
|
|
|
@import clay.util.srgb
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
if (v_Percent > 1.0 || v_Percent < 0.0) {
|
|
|
discard;
|
|
|
}
|
|
|
|
|
|
float fade = v_Percent;
|
|
|
|
|
|
#ifdef SRGB_DECODE
|
|
|
gl_FragColor = sRGBToLinear(color * v_Color);
|
|
|
#else
|
|
|
gl_FragColor = color * v_Color;
|
|
|
#endif
|
|
|
|
|
|
@import ecgl.common.wireframe.fragmentMain
|
|
|
|
|
|
if (v_Percent > (1.0 - v_SpotPercent)) {
|
|
|
gl_FragColor.rgb *= spotIntensity;
|
|
|
}
|
|
|
|
|
|
gl_FragColor.a *= fade;
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";var U=b(0),C=b.n(U);C.a.extendSeriesModel({type:"series.lines3D",dependencies:["globe"],visualColorAccessPath:"lineStyle.color",getInitialData:function(w,y){var T=new C.a.List(["value"],this);return T.hasItemOption=!1,T.initData(w.data,[],function(x,p,m,L){if(x instanceof Array)return NaN;T.hasItemOption=!0;var d=x.value;if(d!=null)return d instanceof Array?d[L]:d}),T},defaultOption:{coordinateSystem:"globe",globeIndex:0,geo3DIndex:0,zlevel:-10,polyline:!1,effect:{show:!1,period:4,trailWidth:4,trailLength:.2,spotIntensity:6},silent:!0,blendMode:"source-over",lineStyle:{width:1,opacity:.5}}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(227),y=b(228),T=b(16);C.a.registerVisual(Object(T.a)("polygons3D"))},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(26);function y(p,m){for(var L=[],d=0;d<m.length;d++)L.push(p.dataToPoint(m[d]));return L}var T=C.a.extendSeriesModel({type:"series.polygons3D",getRegionModel:function(p){return this.getData().getItemModel(p)},getRegionPolygonCoords:function(p){var m=this.coordinateSystem,L=this.getData().getItemModel(p),d=L.option instanceof Array?L.option:L.getShallow("coords");L.get("multiPolygon")||(d=[d]);for(var g=[],A=0;A<d.length;A++){for(var M=[],O=1;O<d[A].length;O++)M.push(y(m,d[A][O]));g.push({exterior:y(m,d[A][0]),interiors:M})}return g},getInitialData:function(p){var m=new C.a.List(["value"],this);return m.hasItemOption=!1,m.initData(p.data,[],function(L,d,g,A){if(L instanceof Array)return NaN;m.hasItemOption=!0;var M=L.value;if(M!=null)return M instanceof Array?M[A]:M}),m},defaultOption:{show:!0,data:null,multiPolygon:!1,progressiveThreshold:1e3,progressive:1e3,zlevel:-10,label:{show:!1,distance:2,textStyle:{fontSize:20,color:"#000",backgroundColor:"rgba(255,255,255,0.7)",padding:3,borderRadius:4}},itemStyle:{color:"#fff",borderWidth:0,borderColor:"#333"},emphasis:{itemStyle:{color:"#639fc0"},label:{show:!0}}}});C.a.util.merge(T.prototype,w.a);var x=T},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(59),y=b(2);C.a.extendChartView({type:"polygons3D",__ecgl__:!0,init:function(T,x){this.groupGL=new y.a.Node,this._geo3DBuilderList=[],this._currentStep=0},render:function(T,x,p){this.groupGL.removeAll();var m=T.coordinateSystem;m&&m.viewGL&&m.viewGL.add(this.groupGL);var L=this._geo3DBuilderList[0];L||(L=new w.a(p),L.extrudeY=m.type!=="mapbox3D",this._geo3DBuilderList[0]=L),this._updateShaderDefines(m,L),L.update(T,x,p),this._geo3DBuilderList.length=1,this.groupGL.add(L.rootNode)},incrementalPrepareRender:function(T,x,p){this.groupGL.removeAll();var m=T.coordinateSystem;m&&m.viewGL&&m.viewGL.add(this.groupGL),this._currentStep=0},incrementalRender:function(T,x,p,m){var L=this._geo3DBuilderList[this._currentStep],d=x.coordinateSystem;L||(L=new w.a(m),L.extrudeY=d.type!=="mapbox3D",this._geo3DBuilderList[this._currentStep]=L),L.update(x,p,m,T.start,T.end),this.groupGL.add(L.rootNode),this._updateShaderDefines(d,L),this._currentStep++},_updateShaderDefines:function(T,x){var p=T.viewGL.isLinearSpace()?"define":"undefine";x.rootNode.traverse(function(m){m.material&&(m.material[p]("fragment","SRGB_DECODE"),T.type==="mapbox3D"&&(m.material.define("fragment","NORMAL_UP_AXIS",2),m.material.define("fragment","NORMAL_FRONT_AXIS",1)))})},remove:function(){this.groupGL.removeAll()},dispose:function(){this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(230),y=b(231),T=b(232),x=b(16);C.a.registerVisual(Object(x.a)("surface"))},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(26),y=b(35),T=b(44),x=C.a.extendSeriesModel({type:"series.surface",dependencies:["globe","grid3D","geo3D"],visualColorAccessPath:"itemStyle.color",formatTooltip:function(m){return Object(y.a)(this,m)},getInitialData:function(m,L){var d=m.data;function g(oe){return!(isNaN(oe.min)||isNaN(oe.max)||isNaN(oe.step))}function A(oe){var pe=C.a.number.getPrecisionSafe;return Math.max(pe(oe.min),pe(oe.max),pe(oe.step))+1}if(!d)if(d=[],m.parametric){var z=m.parametricEquation||{},Z=z.u||{},J=z.v||{};["u","v"].forEach(function(oe){if(!g(z[oe])){console.error("Invalid parametricEquation.%s",oe);return}}),["x","y","z"].forEach(function(oe){if(typeof z[oe]!="function"){console.error("parametricEquation.%s needs to be function",oe);return}});for(var ee=A(Z),$=A(J),ie=J.min;ie<J.max+J.step*.999;ie+=J.step)for(var se=Z.min;se<Z.max+Z.step*.999;se+=Z.step){var ne=C.a.number.round(Math.min(se,Z.max),ee),ce=C.a.number.round(Math.min(ie,J.max),$),P=z.x(ne,ce),f=z.y(ne,ce),W=z.z(ne,ce);d.push([P,f,W,ne,ce])}}else{var M=m.equation||{},O=M.x||{},S=M.y||{};if(["x","y"].forEach(function(oe){if(!g(M[oe])){console.error("Invalid equation.%s",oe);return}}),typeof M.z!="function"){console.error("equation.z needs to be function");return}for(var I=A(O),c=A(S),f=S.min;f<S.max+S.step*.999;f+=S.step)for(var P=O.min;P<O.max+O.step*.999;P+=O.step){var N=C.a.number.round(Math.min(P,O.max),I),k=C.a.number.round(Math.min(f,S.max),c),W=M.z(N,k);d.push([N,k,W])}}var ae=["x","y","z"];m.parametric&&ae.push("u","v");var fe=Object(T.a)(this,ae,m.data||d);return fe},defaultOption:{coordinateSystem:"cartesian3D",zlevel:-10,grid3DIndex:0,shading:"lambert",parametric:!1,wireframe:{show:!0,lineStyle:{color:"rgba(0,0,0,0.5)",width:1}},equation:{x:{min:-1,max:1,step:.1},y:{min:-1,max:1,step:.1},z:null},parametricEquation:{u:{min:-1,max:1,step:.1},v:{min:-1,max:1,step:.1},x:null,y:null,z:null},itemStyle:{},animationDurationUpdate:500}});C.a.util.merge(x.prototype,w.a);var p=x},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(3),T=b(1),x=b.n(T),p=b(60),m=x.a.vec3;function L(d){return isNaN(d[0])||isNaN(d[1])||isNaN(d[2])}C.a.extendChartView({type:"surface",__ecgl__:!0,init:function(d,g){this.groupGL=new w.a.Node},render:function(d,g,A){var M=this._prevSurfaceMesh;this._prevSurfaceMesh=this._surfaceMesh,this._surfaceMesh=M,this._surfaceMesh||(this._surfaceMesh=this._createSurfaceMesh()),this.groupGL.remove(this._prevSurfaceMesh),this.groupGL.add(this._surfaceMesh);var O=d.coordinateSystem,S=d.get("shading"),I=d.getData(),c="ecgl."+S;if((!this._surfaceMesh.material||this._surfaceMesh.material.shader.name!==c)&&(this._surfaceMesh.material=w.a.createMaterial(c,["VERTEX_COLOR","DOUBLE_SIDED"])),w.a.setMaterialFromModel(S,this._surfaceMesh.material,d,A),O&&O.viewGL){O.viewGL.add(this.groupGL);var f=O.viewGL.isLinearSpace()?"define":"undefine";this._surfaceMesh.material[f]("fragment","SRGB_DECODE")}var P=d.get("parametric"),N=this._getDataShape(I,P),k=d.getModel("wireframe"),W=k.get("lineStyle.width"),z=k.get("show")&&W>0;this._updateSurfaceMesh(this._surfaceMesh,d,N,z);var Z=this._surfaceMesh.material;z?(Z.define("WIREFRAME_QUAD"),Z.set("wireframeLineWidth",W),Z.set("wireframeLineColor",w.a.parseColor(k.get("lineStyle.color")))):Z.undefine("WIREFRAME_QUAD"),this._initHandler(d,A),this._updateAnimation(d)},_updateAnimation:function(d){w.a.updateVertexAnimation([["prevPosition","position"],["prevNormal","normal"]],this._prevSurfaceMesh,this._surfaceMesh,d)},_createSurfaceMesh:function(){var d=new w.a.Mesh({geometry:new w.a.Geometry({dynamic:!0,sortTriangles:!0}),shadowDepthMaterial:new w.a.Material({shader:new w.a.Shader(w.a.Shader.source("ecgl.sm.depth.vertex"),w.a.Shader.source("ecgl.sm.depth.fragment"))}),culling:!1,renderOrder:10,renderNormal:!0});return d.geometry.createAttribute("barycentric","float",4),d.geometry.createAttribute("prevPosition","float",3),d.geometry.createAttribute("prevNormal","float",3),C.a.util.extend(d.geometry,p.a),d},_initHandler:function(d,g){var A=d.getData(),M=this._surfaceMesh,O=d.coordinateSystem;function S(c,f){for(var P=1/0,N=-1,k=[],W=0;W<c.length;W++){M.geometry.attributes.position.get(c[W],k);var z=m.dist(f.array,k);z<P&&(P=z,N=c[W])}return N}M.seriesIndex=d.seriesIndex;var I=-1;M.off("mousemove"),M.off("mouseout"),M.on("mousemove",function(c){var f=S(c.triangle,c.point);if(f>=0){var P=[];M.geometry.attributes.position.get(f,P);for(var N=O.pointToData(P),k=1/0,W=-1,z=[],Z=0;Z<A.count();Z++){z[0]=A.get("x",Z),z[1]=A.get("y",Z),z[2]=A.get("z",Z);var J=m.squaredDistance(z,N);J<k&&(W=Z,k=J)}W!==I&&g.dispatchAction({type:"grid3DShowAxisPointer",value:N}),I=W,M.dataIndex=W}else M.dataIndex=-1},this),M.on("mouseout",function(c){I=-1,M.dataIndex=-1,g.dispatchAction({type:"grid3DHideAxisPointer"})},this)},_updateSurfaceMesh:function(d,g,A,M){var O=d.geometry,S=g.getData(),I=S.getLayout("points"),c=0;S.each(function(Ye){S.hasValue(Ye)||c++});var f=c||M,P=O.attributes.position,N=O.attributes.normal,k=O.attributes.texcoord0,W=O.attributes.barycentric,z=O.attributes.color,Z=A.row,J=A.column,ee=g.get("shading"),$=ee!=="color";if(f){var ie=(Z-1)*(J-1)*4;P.init(ie),M&&W.init(ie)}else P.value=new Float32Array(I);z.init(O.vertexCount),k.init(O.vertexCount);var se=[0,3,1,1,3,2],ne=[[1,1,0,0],[0,1,0,1],[1,0,0,1],[1,0,1,0]],ce=O.indices=new(O.vertexCount>65535?Uint32Array:Uint16Array)((Z-1)*(J-1)*6),ae=function(Ye,qe,ot){ot[1]=Ye*J+qe,ot[0]=Ye*J+qe+1,ot[3]=(Ye+1)*J+qe+1,ot[2]=(Ye+1)*J+qe},fe=!1;if(f){var oe=[],pe=[],_e=0;$?N.init(O.vertexCount):N.value=null;for(var de=[[],[],[]],be=[],Ae=[],Fe=m.create(),Ue=function(Ye,qe,ot){var gt=qe*3;return ot[0]=Ye[gt],ot[1]=Ye[gt+1],ot[2]=Ye[gt+2],ot},it=new Float32Array(I.length),tt=new Float32Array(I.length/3*4),et=0;et<S.count();et++)if(S.hasValue(et)){var ke=w.a.parseColor(S.getItemVisual(et,"color")),vt=S.getItemVisual(et,"opacity");ke[3]*=vt,ke[3]<.99&&(fe=!0);for(var dt=0;dt<4;dt++)tt[et*4+dt]=ke[dt]}for(var je=[1e7,1e7,1e7],et=0;et<Z-1;et++)for(var nt=0;nt<J-1;nt++){var rt=et*(J-1)+nt,ft=rt*4;ae(et,nt,oe);for(var lt=!1,dt=0;dt<4;dt++)Ue(I,oe[dt],pe),L(pe)&&(lt=!0);for(var dt=0;dt<4;dt++)lt?P.set(ft+dt,je):(Ue(I,oe[dt],pe),P.set(ft+dt,pe)),M&&W.set(ft+dt,ne[dt]);for(var dt=0;dt<6;dt++)ce[_e++]=se[dt]+ft;if($&&!lt)for(var dt=0;dt<2;dt++){for(var wt=dt*3,Re=0;Re<3;Re++){var We=oe[se[wt]+Re];Ue(I,We,de[Re])}m.sub(be,de[0],de[1]),m.sub(Ae,de[1],de[2]),m.cross(Fe,be,Ae);for(var Re=0;Re<3;Re++){var Pe=oe[se[wt]+Re]*3;it[Pe]=it[Pe]+Fe[0],it[Pe+1]=it[Pe+1]+Fe[1],it[Pe+2]=it[Pe+2]+Fe[2]}}}if($)for(var et=0;et<it.length/3;et++)Ue(it,et,Fe),m.normalize(Fe,Fe),it[et*3]=Fe[0],it[et*3+1]=Fe[1],it[et*3+2]=Fe[2];for(var ke=[],Ze=[],et=0;et<Z-1;et++)for(var nt=0;nt<J-1;nt++){var rt=et*(J-1)+nt,ft=rt*4;ae(et,nt,oe);for(var dt=0;dt<4;dt++){for(var Re=0;Re<4;Re++)ke[Re]=tt[oe[dt]*4+Re];z.set(ft+dt,ke),$&&(Ue(it,oe[dt],Fe),N.set(ft+dt,Fe));var We=oe[dt];Ze[0]=We%J/(J-1),Ze[1]=Math.floor(We/J)/(Z-1),k.set(ft+dt,Ze)}rt++}}else{for(var Ze=[],et=0;et<S.count();et++){Ze[0]=et%J/(J-1),Ze[1]=Math.floor(et/J)/(Z-1);var ke=w.a.parseColor(S.getItemVisual(et,"color")),vt=S.getItemVisual(et,"opacity");ke[3]*=vt,ke[3]<.99&&(fe=!0),z.set(et,ke),k.set(et,Ze)}for(var oe=[],Ie=0,et=0;et<Z-1;et++)for(var nt=0;nt<J-1;nt++){ae(et,nt,oe);for(var dt=0;dt<6;dt++)ce[Ie++]=oe[se[dt]]}$?O.generateVertexNormals():N.value=null}d.material.get("normalMap")&&O.generateTangents(),O.updateBoundingBox(),O.dirty(),d.material.transparent=fe,d.material.depthMask=!fe},_getDataShape:function(d,g){for(var A=-1/0,M=0,O=0,S=0,I=g?"u":"x",c=0;c<d.count();c++){var f=d.get(I,c);if(f<A){if(S&&S!==O)throw new Error("Invalid data. data should be a row major 2d array.");S=O,O=0,M++}A=f,O++}return{row:M+1,column:O}},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U);C.a.registerLayout(function(w,y){w.eachSeriesByType("surface",function(T){var x=T.coordinateSystem;(!x||x.type!=="cartesian3D")&&console.error("Surface chart only support cartesian3D coordinateSystem");var p=T.getData(),m=new Float32Array(3*p.count()),L=[NaN,NaN,NaN];if(x&&x.type==="cartesian3D"){var d=x.dimensions,g=d.map(function(A){return T.coordDimToDataDim(A)[0]});p.each(g,function(A,M,O,S){var I;p.hasValue(S)?I=x.dataToPoint([A,M,O]):I=L,m[S*3]=I[0],m[S*3+1]=I[1],m[S*3+2]=I[2]})}p.setLayout("points",m)})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(83),y=b(234),T=b(235),x=b(16);C.a.registerVisual(Object(x.a)("map3D")),C.a.registerAction({type:"map3DChangeCamera",event:"map3dcamerachanged",update:"series:updateCamera"},function(p,m){m.eachComponent({mainType:"series",subType:"map3D",query:p},function(L){L.setView(p)})})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(38),y=b(31),T=b(32),x=b(26),p=b(80),m=b(27),L=b(35),d=b(82);function g(O,S){for(var I=[],c=0;c<S.length;c++)I.push(O.dataToPoint(S[c]));return I}var A=C.a.extendSeriesModel({type:"series.map3D",layoutMode:"box",coordinateSystem:null,visualColorAccessPath:"itemStyle.color",optionUpdated:function(O){O=O||{};var S=this.get("coordinateSystem");if(!(S==null||S==="geo3D")){var I=["left","top","width","height","boxWidth","boxDepth","boxHeight","light","viewControl","postEffect","temporalSuperSampling","environment","groundPlane"],c=[];I.forEach(function(f){O[f]!=null&&c.push(f)}),c.length&&console.warn("Property %s in map3D series will be ignored if coordinate system is %s",c.join(", "),S),this.get("groundPlane.show")&&(this.option.groundPlane.show=!1),this._geo=null}},getInitialData:function(O){O.data=this.getFilledRegions(O.data,O.map);var S=C.a.helper.completeDimensions(["value"],O.data),I=new C.a.List(S,this);I.initData(O.data);var c={};return I.each(function(f){var P=I.getName(f),N=I.getItemModel(f);c[P]=N}),this._regionModelMap=c,I},formatTooltip:function(O){return Object(L.a)(this,O)},getRegionModel:function(O){var S=this.getData().getName(O);return this._regionModelMap[S]||new C.a.Model(null,this)},getRegionPolygonCoords:function(O){var S=this.coordinateSystem,I=this.getData().getName(O);if(S.transform){var c=S.getRegion(I);return c?c.geometries:[]}else{this._geo||(this._geo=d.a.createGeo3D(this));for(var c=this._geo.getRegion(I),f=[],P=0;P<c.geometries.length;P++){var N=c.geometries[P],k=[],W=g(S,N.exterior);if(k&&k.length)for(var z=0;z<N.interiors.length;z++)k.push(g(S,k[z]));f.push({interiors:k,exterior:W})}return f}},getFormattedLabel:function(O,S){var I=m.a.getFormattedLabel(this,O,S);return I==null&&(I=this.getData().getName(O)),I},defaultOption:{coordinateSystem:"geo3D",data:null}});C.a.util.merge(A.prototype,p.a),C.a.util.merge(A.prototype,w.a),C.a.util.merge(A.prototype,y.a),C.a.util.merge(A.prototype,T.a),C.a.util.merge(A.prototype,x.a);var M=A},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(39),T=b(34),x=b(59),p=C.a.extendChartView({type:"map3D",__ecgl__:!0,init:function(m,L){this._geo3DBuilder=new x.a(L),this.groupGL=new w.a.Node},render:function(m,L,d){var g=m.coordinateSystem;if(!(!g||!g.viewGL)){this.groupGL.add(this._geo3DBuilder.rootNode),g.viewGL.add(this.groupGL);var A;if(g.type==="geo3D"){A=g,this._sceneHelper||(this._sceneHelper=new T.a,this._sceneHelper.initLight(this.groupGL)),this._sceneHelper.setScene(g.viewGL.scene),this._sceneHelper.updateLight(m),g.viewGL.setPostEffect(m.getModel("postEffect"),d),g.viewGL.setTemporalSuperSampling(m.getModel("temporalSuperSampling"));var M=this._control;M||(M=this._control=new y.a({zr:d.getZr()}),this._control.init());var O=m.getModel("viewControl");M.setViewGL(g.viewGL),M.setFromViewControlModel(O,0),M.off("update"),M.on("update",function(){d.dispatchAction({type:"map3DChangeCamera",alpha:M.getAlpha(),beta:M.getBeta(),distance:M.getDistance(),from:this.uid,map3DId:m.id})}),this._geo3DBuilder.extrudeY=!0}else this._control&&(this._control.dispose(),this._control=null),this._sceneHelper&&(this._sceneHelper.dispose(),this._sceneHelper=null),A=m.getData().getLayout("geo3D"),this._geo3DBuilder.extrudeY=!1;this._geo3DBuilder.update(m,L,d,0,m.getData().count());var S=g.viewGL.isLinearSpace()?"define":"undefine";this._geo3DBuilder.rootNode.traverse(function(I){I.material&&I.material[S]("fragment","SRGB_DECODE")})}},afterRender:function(m,L,d,g){var A=g.renderer,M=m.coordinateSystem;M&&M.type==="geo3D"&&(this._sceneHelper.updateAmbientCubemap(A,m,d),this._sceneHelper.updateSkybox(A,m,d))},dispose:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(237),y=b(238),T=b(45),x=b.n(T),p=b(16);C.a.registerVisual(x()("scatterGL","circle",null)),C.a.registerVisual(Object(p.a)("scatterGL")),C.a.registerLayout({seriesType:"scatterGL",reset:function(m){var L=m.coordinateSystem,d;if(L){var g=L.dimensions,A=[];g.length===1?d=function(M,O){for(var S=new Float32Array((M.end-M.start)*2),I=M.start;I<M.end;I++){var c=(I-M.start)*2,f=O.get(g[0],I),P=L.dataToPoint(f);S[c]=P[0],S[c+1]=P[1]}O.setLayout("points",S)}:g.length===2&&(d=function(M,O){for(var S=new Float32Array((M.end-M.start)*2),I=M.start;I<M.end;I++){var c=(I-M.start)*2,f=O.get(g[0],I),P=O.get(g[1],I);A[0]=f,A[1]=P,A=L.dataToPoint(A),S[c]=A[0],S[c+1]=A[1]}O.setLayout("points",S)})}return{progress:d}}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U);C.a.extendSeriesModel({type:"series.scatterGL",dependencies:["grid","polar","geo","singleAxis"],visualColorAccessPath:"itemStyle.color",getInitialData:function(){return C.a.helper.createList(this)},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,progressive:1e5,progressiveThreshold:1e5,large:!1,symbol:"circle",symbolSize:10,zoomScale:0,blendMode:"source-over",itemStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(20),T=b(62),x=b(84),p=b(3);C.a.extendChartView({type:"scatterGL",__ecgl__:!0,init:function(m,L){this.groupGL=new w.a.Node,this.viewGL=new y.a("orthographic"),this.viewGL.add(this.groupGL),this._pointsBuilderList=[],this._currentStep=0,this._sizeScale=1,this._glViewHelper=new x.a(this.viewGL)},render:function(m,L,d){if(this.groupGL.removeAll(),this._glViewHelper.reset(m,d),!!m.getData().count()){var g=this._pointsBuilderList[0];g||(g=this._pointsBuilderList[0]=new T.a(!0,d)),this._pointsBuilderList.length=1,this.groupGL.add(g.rootNode),this._removeTransformInPoints(m.getData().getLayout("points")),g.update(m,L,d),this.viewGL.setPostEffect(m.getModel("postEffect"),d)}},incrementalPrepareRender:function(m,L,d){this.groupGL.removeAll(),this._glViewHelper.reset(m,d),this._currentStep=0,this.viewGL.setPostEffect(m.getModel("postEffect"),d)},incrementalRender:function(m,L,d,g){if(!(m.end<=m.start)){var A=this._pointsBuilderList[this._currentStep];A||(A=new T.a(!0,g),this._pointsBuilderList[this._currentStep]=A),this.groupGL.add(A.rootNode),this._removeTransformInPoints(L.getData().getLayout("points")),A.setSizeScale(this._sizeScale),A.update(L,d,g,m.start,m.end),g.getZr().refresh(),this._currentStep++}},updateTransform:function(m,L,d){if(m.coordinateSystem.getRoamTransform){this._glViewHelper.updateTransform(m,d);var g=this._glViewHelper.getZoom(),A=Math.max((m.get("zoomScale")||0)*(g-1)+1,0);this._sizeScale=A,this._pointsBuilderList.forEach(function(M){M.setSizeScale(A)})}},_removeTransformInPoints:function(m){if(m)for(var L=[],d=0;d<m.length;d+=2)L[0]=m[d],L[1]=m[d+1],this._glViewHelper.removeTransformInPoint(L),m[d]=L[0],m[d+1]=L[1]},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(240),y=b(246),T=b(45),x=b.n(T),p=b(16);C.a.registerVisual(x()("graphGL","circle",null)),C.a.registerVisual(Object(p.a)("graphGL")),C.a.registerVisual(function(L){var d={};L.eachSeriesByType("graphGL",function(g){var A=g.getCategoriesData(),M=g.getData(),O={};A.each(function(S){var I=A.getName(S);O[I]=S;var c=A.getItemModel(S),f=c.get("itemStyle.color")||g.getColorFromPalette(I,d);A.setItemVisual(S,"color",f)}),A.count()&&M.each(function(S){var I=M.getItemModel(S),c=I.getShallow("category");c!=null&&(typeof c=="string"&&(c=O[c]),M.getItemVisual(S,"color",!0)||M.setItemVisual(S,"color",A.getItemVisual(c,"color")))})})}),C.a.registerVisual(function(L){L.eachSeriesByType("graphGL",function(d){var g=d.getGraph(),A=d.getEdgeData(),M="lineStyle.color".split("."),O="lineStyle.opacity".split(".");A.setVisual("color",d.get(M)),A.setVisual("opacity",d.get(O)),A.each(function(S){var I=A.getItemModel(S),c=g.getEdgeByIndex(S),f=I.get(M),P=I.get(O);switch(f){case"source":f=c.node1.getVisual("color");break;case"target":f=c.node2.getVisual("color");break}c.setVisual("color",f),c.setVisual("opacity",P)})})}),C.a.registerAction({type:"graphGLRoam",event:"graphglroam",update:"series.graphGL:roam"},function(L,d){d.eachComponent({mainType:"series",query:L},function(g){g.setView(L)})});function m(){}C.a.registerAction({type:"graphGLStartLayout",event:"graphgllayoutstarted",update:"series.graphGL:startLayout"},m),C.a.registerAction({type:"graphGLStopLayout",event:"graphgllayoutstopped",update:"series.graphGL:stopLayout"},m),C.a.registerAction({type:"graphGLFocusNodeAdjacency",event:"graphGLFocusNodeAdjacency",update:"series.graphGL:focusNodeAdjacency"},m),C.a.registerAction({type:"graphGLUnfocusNodeAdjacency",event:"graphGLUnfocusNodeAdjacency",update:"series.graphGL:unfocusNodeAdjacency"},m)},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(241),y=b(27),T=C.a.extendSeriesModel({type:"series.graphGL",visualColorAccessPath:"itemStyle.color",init:function(p){T.superApply(this,"init",arguments),this.legendDataProvider=function(){return this._categoriesData},this._updateCategoriesData()},mergeOption:function(p){T.superApply(this,"mergeOption",arguments),this._updateCategoriesData()},getFormattedLabel:function(p,m,L,d){var g=y.a.getFormattedLabel(this,p,m,L,d);if(g==null){var A=this.getData(),M=A.dimensions[A.dimensions.length-1];g=A.get(M,p)}return g},getInitialData:function(p,m){var L=p.edges||p.links||[],d=p.data||p.nodes||[],g=this;if(d&&L)return Object(w.a)(d,L,this,!0,A).data;function A(M,O){M.wrapMethod("getItemModel",function(f){var P=g._categoriesModels,N=f.getShallow("category"),k=P[N];return k&&(k.parentModel=f.parentModel,f.parentModel=k),f});var S=g.getModel("edgeLabel"),I=new C.a.Model({label:S.option},S.parentModel,m);O.wrapMethod("getItemModel",function(f){return f.customizeGetParent(c),f});function c(f){return f=this.parsePath(f),f&&f[0]==="label"?I:this.parentModel}}},getGraph:function(){return this.getData().graph},getEdgeData:function(){return this.getGraph().edgeData},getCategoriesData:function(){return this._categoriesData},formatTooltip:function(p,m,L){if(L==="edge"){var d=this.getData(),g=this.getDataParams(p,L),A=d.graph.getEdgeByIndex(p),M=d.getName(A.node1.dataIndex),O=d.getName(A.node2.dataIndex),S=[];return M!=null&&S.push(M),O!=null&&S.push(O),S=C.a.format.encodeHTML(S.join(" > ")),g.value&&(S+=" : "+C.a.format.encodeHTML(g.value)),S}else return T.superApply(this,"formatTooltip",arguments)},_updateCategoriesData:function(){var p=(this.option.categories||[]).map(function(L){return L.value!=null?L:C.a.util.extend({value:0},L)}),m=new C.a.List(["value"],this);m.initData(p),this._categoriesData=m,this._categoriesModels=m.mapArray(function(L){return m.getItemModel(L,!0)})},setView:function(p){p.zoom!=null&&(this.option.zoom=p.zoom),p.offset!=null&&(this.option.offset=p.offset)},setNodePosition:function(p){for(var m=0;m<p.length/2;m++){var L=p[m*2],d=p[m*2+1],g=this.getData().getRawDataItem(m);g.x=L,g.y=d}},isAnimationEnabled:function(){return T.superCall(this,"isAnimationEnabled")&&!(this.get("layout")==="force"&&this.get("force.layoutAnimation"))},defaultOption:{zlevel:10,z:2,legendHoverLink:!0,layout:"forceAtlas2",forceAtlas2:{initLayout:null,GPU:!0,steps:1,maxSteps:1e3,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,edgeWeightInfluence:1,edgeWeight:[1,4],nodeWeight:[1,4],preventOverlap:!1,gravityCenter:null},focusNodeAdjacency:!0,focusNodeAdjacencyOn:"mouseover",left:"center",top:"center",symbol:"circle",symbolSize:5,roam:!1,center:null,zoom:1,label:{show:!1,formatter:"{b}",position:"right",distance:5,textStyle:{fontSize:14}},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{label:{show:!0}},animation:!1}}),x=T},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(242),y=b.n(w),T=b(245),x=b.n(T),p=b(3);V.a=function(m,L,d,g,A){for(var M=new y.a(g),O=0;O<m.length;O++)M.addNode(p.a.firstNotNull(m[O].id,m[O].name,O),O);for(var S=[],I=[],c=0,O=0;O<L.length;O++){var f=L[O],P=f.source,N=f.target;M.addEdge(P,N,c)&&(I.push(f),S.push(p.a.firstNotNull(f.id,P+" > "+N)),c++)}var k,W=C.a.helper.completeDimensions(["value"],m);k=new C.a.List(W,d),k.initData(m);var z=new C.a.List(["value"],d);return z.initData(I,S),A&&A(k,z),x()({mainData:k,struct:M,structAttr:"graph",datas:{node:k,edge:z},datasAttr:{node:"data",edge:"edgeData"}}),M.update(),M}},function(re,V,b){var U=b(85),C=U.__DEV__,w=b(12),y=b(244),T=y.enableClassCheck;function x(M){return"_EC_"+M}var p=function(M){this._directed=M||!1,this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this.data,this.edgeData},m=p.prototype;m.type="graph",m.isDirected=function(){return this._directed},m.addNode=function(M,O){M=M||""+O;var S=this._nodesMap;if(!S[x(M)]){var I=new L(M,O);return I.hostGraph=this,this.nodes.push(I),S[x(M)]=I,I}},m.getNodeByIndex=function(M){var O=this.data.getRawIndex(M);return this.nodes[O]},m.getNodeById=function(M){return this._nodesMap[x(M)]},m.addEdge=function(M,O,S){var I=this._nodesMap,c=this._edgesMap;if(typeof M=="number"&&(M=this.nodes[M]),typeof O=="number"&&(O=this.nodes[O]),L.isInstance(M)||(M=I[x(M)]),L.isInstance(O)||(O=I[x(O)]),!(!M||!O)){var f=M.id+"-"+O.id;if(!c[f]){var P=new d(M,O,S);return P.hostGraph=this,this._directed&&(M.outEdges.push(P),O.inEdges.push(P)),M.edges.push(P),M!==O&&O.edges.push(P),this.edges.push(P),c[f]=P,P}}},m.getEdgeByIndex=function(M){var O=this.edgeData.getRawIndex(M);return this.edges[O]},m.getEdge=function(M,O){L.isInstance(M)&&(M=M.id),L.isInstance(O)&&(O=O.id);var S=this._edgesMap;return this._directed?S[M+"-"+O]:S[M+"-"+O]||S[O+"-"+M]},m.eachNode=function(M,O){for(var S=this.nodes,I=S.length,c=0;c<I;c++)S[c].dataIndex>=0&&M.call(O,S[c],c)},m.eachEdge=function(M,O){for(var S=this.edges,I=S.length,c=0;c<I;c++)S[c].dataIndex>=0&&S[c].node1.dataIndex>=0&&S[c].node2.dataIndex>=0&&M.call(O,S[c],c)},m.breadthFirstTraverse=function(M,O,S,I){if(L.isInstance(O)||(O=this._nodesMap[x(O)]),!!O){for(var c=S==="out"?"outEdges":S==="in"?"inEdges":"edges",f=0;f<this.nodes.length;f++)this.nodes[f].__visited=!1;if(!M.call(I,O,null))for(var P=[O];P.length;)for(var N=P.shift(),k=N[c],f=0;f<k.length;f++){var W=k[f],z=W.node1===N?W.node2:W.node1;if(!z.__visited){if(M.call(I,z,N))return;P.push(z),z.__visited=!0}}}},m.update=function(){for(var M=this.data,O=this.edgeData,S=this.nodes,I=this.edges,c=0,f=S.length;c<f;c++)S[c].dataIndex=-1;for(var c=0,f=M.count();c<f;c++)S[M.getRawIndex(c)].dataIndex=c;O.filterSelf(function(P){var N=I[O.getRawIndex(P)];return N.node1.dataIndex>=0&&N.node2.dataIndex>=0});for(var c=0,f=I.length;c<f;c++)I[c].dataIndex=-1;for(var c=0,f=O.count();c<f;c++)I[O.getRawIndex(c)].dataIndex=c},m.clone=function(){for(var M=new p(this._directed),O=this.nodes,S=this.edges,I=0;I<O.length;I++)M.addNode(O[I].id,O[I].dataIndex);for(var I=0;I<S.length;I++){var c=S[I];M.addEdge(c.node1.id,c.node2.id,c.dataIndex)}return M};function L(M,O){this.id=M==null?"":M,this.inEdges=[],this.outEdges=[],this.edges=[],this.hostGraph,this.dataIndex=O==null?-1:O}L.prototype={constructor:L,degree:function(){return this.edges.length},inDegree:function(){return this.inEdges.length},outDegree:function(){return this.outEdges.length},getModel:function(M){if(!(this.dataIndex<0)){var O=this.hostGraph,S=O.data.getItemModel(this.dataIndex);return S.getModel(M)}}};function d(M,O,S){this.node1=M,this.node2=O,this.dataIndex=S==null?-1:S}d.prototype.getModel=function(M){if(!(this.dataIndex<0)){var O=this.hostGraph,S=O.edgeData.getItemModel(this.dataIndex);return S.getModel(M)}};var g=function(M,O){return{getValue:function(S){var I=this[M][O];return I.get(I.getDimension(S||"value"),this.dataIndex)},setVisual:function(S,I){this.dataIndex>=0&&this[M][O].setItemVisual(this.dataIndex,S,I)},getVisual:function(S,I){return this[M][O].getItemVisual(this.dataIndex,S,I)},setLayout:function(S,I){this.dataIndex>=0&&this[M][O].setItemLayout(this.dataIndex,S,I)},getLayout:function(){return this[M][O].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[M][O].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[M][O].getRawIndex(this.dataIndex)}}};w.mixin(L,g("hostGraph","data")),w.mixin(d,g("hostGraph","edgeData")),p.Node=L,p.Edge=d,T(L),T(d);var A=p;re.exports=A},function(re,V){var b;b=function(){return this}();try{b=b||Function("return this")()||(0,eval)("this")}catch(U){typeof window=="object"&&(b=window)}re.exports=b},function(re,V,b){var U=b(85),C=U.__DEV__,w=b(12),y=".",T="___EC__COMPONENT__CONTAINER___";function x(S){var I={main:"",sub:""};return S&&(S=S.split(y),I.main=S[0]||"",I.sub=S[1]||""),I}function p(S){w.assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(S),'componentType "'+S+'" illegal')}function m(S,I){S.$constructor=S,S.extend=function(c){var f=this,P=function(){c.$constructor?c.$constructor.apply(this,arguments):f.apply(this,arguments)};return w.extend(P.prototype,c),P.extend=this.extend,P.superCall=g,P.superApply=A,w.inherits(P,this),P.superClass=f,P}}var L=0;function d(S){var I=["__\0is_clz",L++,Math.random().toFixed(3)].join("_");S.prototype[I]=!0,S.isInstance=function(c){return!!(c&&c[I])}}function g(S,I){var c=w.slice(arguments,2);return this.superClass.prototype[I].apply(S,c)}function A(S,I,c){return this.superClass.prototype[I].apply(S,c)}function M(S,I){I=I||{};var c={};S.registerClass=function(N,k){if(k){if(p(k),k=x(k),!k.sub)c[k.main]=N;else if(k.sub!==T){var W=f(k);W[k.sub]=N}}return N},S.getClass=function(N,k,W){var z=c[N];if(z&&z[T]&&(z=k?z[k]:null),W&&!z)throw new Error(k?"Component "+N+"."+(k||"")+" not exists. Load it first.":N+".type should be specified.");return z},S.getClassesByMainType=function(N){N=x(N);var k=[],W=c[N.main];return W&&W[T]?w.each(W,function(z,Z){Z!==T&&k.push(z)}):k.push(W),k},S.hasClass=function(N){return N=x(N),!!c[N.main]},S.getAllClassMainTypes=function(){var N=[];return w.each(c,function(k,W){N.push(W)}),N},S.hasSubTypes=function(N){N=x(N);var k=c[N.main];return k&&k[T]},S.parseClassType=x;function f(N){var k=c[N.main];return(!k||!k[T])&&(k=c[N.main]={},k[T]=!0),k}if(I.registerWhenExtend){var P=S.extend;P&&(S.extend=function(N){var k=P.call(this,N);return S.registerClass(k,N.type)})}return S}function O(S,I){}V.parseClassType=x,V.enableClassExtend=m,V.enableClassCheck=d,V.enableClassManagement=M,V.setReadOnly=O},function(re,V,b){var U=b(12),C=U.each,w="\0__link_datas",y="\0__link_mainData";function T(O){var S=O.mainData,I=O.datas;I||(I={main:S},O.datasAttr={main:"data"}),O.datas=O.mainData=null,g(S,I,O),C(I,function(c){C(S.TRANSFERABLE_METHODS,function(f){c.wrapMethod(f,U.curry(x,O))})}),S.wrapMethod("cloneShallow",U.curry(m,O)),C(S.CHANGABLE_METHODS,function(c){S.wrapMethod(c,U.curry(p,O))}),U.assert(I[S.dataType]===S)}function x(O,S){if(d(this)){var I=U.extend({},this[w]);I[this.dataType]=S,g(S,I,O)}else A(S,this.dataType,this[y],O);return S}function p(O,S){return O.struct&&O.struct.update(this),S}function m(O,S){return C(S[w],function(I,c){I!==S&&A(I.cloneShallow(),c,S,O)}),S}function L(O){var S=this[y];return O==null||S==null?S:S[w][O]}function d(O){return O[y]===O}function g(O,S,I){O[w]={},C(S,function(c,f){A(c,f,O,I)})}function A(O,S,I,c){I[w][S]=O,O[y]=I,O.dataType=S,c.struct&&(O[c.structAttr]=c.struct,c.struct[c.datasAttr[S]]=O),O.getLinkedData=L}var M=T;re.exports=M},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(41),y=b.n(w),T=b(2),x=b(20),p=b(86),m=b(3),L=b(247),d=b(249),g=b(65),A=b.n(g),M=b(1),O=b.n(M),S=b(251),I=b(62),c=b(252),f=O.a.vec2;T.a.Shader.import(c.a);var P=1;C.a.extendChartView({type:"graphGL",__ecgl__:!0,init:function(N,k){this.groupGL=new T.a.Node,this.viewGL=new x.a("orthographic"),this.viewGL.camera.left=this.viewGL.camera.right=0,this.viewGL.add(this.groupGL),this._pointsBuilder=new I.a(!0,k),this._forceEdgesMesh=new T.a.Mesh({material:new T.a.Material({shader:T.a.createShader("ecgl.forceAtlas2.edges"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new T.a.Geometry({attributes:{node:new T.a.Geometry.Attribute("node","float",2),color:new T.a.Geometry.Attribute("color","float",4,"COLOR")},dynamic:!0,mainAttribute:"node"}),renderOrder:-1,mode:T.a.Mesh.LINES}),this._edgesMesh=new T.a.Mesh({material:new T.a.Material({shader:T.a.createShader("ecgl.meshLines2D"),transparent:!0,depthMask:!1,depthTest:!1}),$ignorePicking:!0,geometry:new p.a({useNativeLine:!1,dynamic:!0}),renderOrder:-1,culling:!1}),this._layoutId=0,this._control=new S.a({zr:k.getZr(),viewGL:this.viewGL}),this._control.setTarget(this.groupGL),this._control.init(),this._clickHandler=this._clickHandler.bind(this)},render:function(N,k,W){this.groupGL.add(this._pointsBuilder.rootNode),this._model=N,this._api=W,this._initLayout(N,k,W),this._pointsBuilder.update(N,k,W),this._forceLayoutInstance instanceof L.a||this.groupGL.remove(this._forceEdgesMesh),this._updateCamera(N,W),this._control.off("update"),this._control.on("update",function(){W.dispatchAction({type:"graphGLRoam",seriesId:N.id,zoom:this._control.getZoom(),offset:this._control.getOffset()}),this._pointsBuilder.updateView(this.viewGL.camera)},this),this._control.setZoom(m.a.firstNotNull(N.get("zoom"),1)),this._control.setOffset(N.get("offset")||[0,0]);var z=this._pointsBuilder.getPointsMesh();if(z.off("mousemove",this._mousemoveHandler),z.off("mouseout",this._mouseOutHandler,this),W.getZr().off("click",this._clickHandler),this._pointsBuilder.highlightOnMouseover=!0,N.get("focusNodeAdjacency")){var Z=N.get("focusNodeAdjacencyOn");Z==="click"?W.getZr().on("click",this._clickHandler):Z==="mouseover"?(z.on("mousemove",this._mousemoveHandler,this),z.on("mouseout",this._mouseOutHandler,this),this._pointsBuilder.highlightOnMouseover=!1):console.warn("Unkown focusNodeAdjacencyOn value s"+Z)}this._lastMouseOverDataIndex=-1},_clickHandler:function(N){if(!this._layouting){var k=this._pointsBuilder.getPointsMesh().dataIndex;k>=0?this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:k}):this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id})}},_mousemoveHandler:function(N){if(!this._layouting){var k=this._pointsBuilder.getPointsMesh().dataIndex;k>=0?k!==this._lastMouseOverDataIndex&&this._api.dispatchAction({type:"graphGLFocusNodeAdjacency",seriesId:this._model.id,dataIndex:k}):this._mouseOutHandler(N),this._lastMouseOverDataIndex=k}},_mouseOutHandler:function(N){this._layouting||(this._api.dispatchAction({type:"graphGLUnfocusNodeAdjacency",seriesId:this._model.id}),this._lastMouseOverDataIndex=-1)},_updateForceEdgesGeometry:function(N,k){var W=this._forceEdgesMesh.geometry,z=k.getEdgeData(),Z=0,J=this._forceLayoutInstance,ee=z.count()*2;W.attributes.node.init(ee),W.attributes.color.init(ee),z.each(function($){var ie=N[$];W.attributes.node.set(Z,J.getNodeUV(ie.node1)),W.attributes.node.set(Z+1,J.getNodeUV(ie.node2));var se=z.getItemVisual(ie.dataIndex,"color"),ne=T.a.parseColor(se);ne[3]*=m.a.firstNotNull(z.getItemVisual(ie.dataIndex,"opacity"),1),W.attributes.color.set(Z,ne),W.attributes.color.set(Z+1,ne),Z+=2}),W.dirty()},_updateMeshLinesGeometry:function(){var k=this._model.getEdgeData(),N=this._edgesMesh.geometry,k=this._model.getEdgeData(),W=this._model.getData().getLayout("points");N.resetOffset(),N.setVertexCount(k.count()*N.getLineVertexCount()),N.setTriangleCount(k.count()*N.getLineTriangleCount());var z=[],Z=[],J=["lineStyle","width"];this._originalEdgeColors=new Float32Array(k.count()*4),this._edgeIndicesMap=new Float32Array(k.count()),k.each(function(ee){var $=k.graph.getEdgeByIndex(ee),ie=$.node1.dataIndex*2,se=$.node2.dataIndex*2;z[0]=W[ie],z[1]=W[ie+1],Z[0]=W[se],Z[1]=W[se+1];var ne=k.getItemVisual($.dataIndex,"color"),ce=T.a.parseColor(ne);ce[3]*=m.a.firstNotNull(k.getItemVisual($.dataIndex,"opacity"),1);var ae=k.getItemModel($.dataIndex),fe=m.a.firstNotNull(ae.get(J),1)*this._api.getDevicePixelRatio();N.addLine(z,Z,ce,fe);for(var oe=0;oe<4;oe++)this._originalEdgeColors[$.dataIndex*4+oe]=ce[oe];this._edgeIndicesMap[$.dataIndex]=ee},!1,this),N.dirty()},_updateForceNodesGeometry:function(N){for(var k=this._pointsBuilder.getPointsMesh(),W=[],z=0;z<N.count();z++)this._forceLayoutInstance.getNodeUV(z,W),k.geometry.attributes.position.set(z,W);k.geometry.dirty("position")},_initLayout:function(N,k,W){var z=N.get("layout"),Z=N.getGraph(),J=N.getBoxLayoutParams(),ee=y.a.getLayoutRect(J,{width:W.getWidth(),height:W.getHeight()});z==="force"&&(console.warn("Currently only forceAtlas2 layout supported."),z="forceAtlas2"),this.stopLayout(N,k,W,{beforeLayout:!0});var $=N.getData(),ie=N.getData();if(z==="forceAtlas2"){var se=N.getModel("forceAtlas2"),ne=this._forceLayoutInstance,ce=[],ae=[],fe=$.getDataExtent("value"),oe=ie.getDataExtent("value"),pe=m.a.firstNotNull(se.get("edgeWeight"),1),_e=m.a.firstNotNull(se.get("nodeWeight"),1);typeof pe=="number"&&(pe=[pe,pe]),typeof _e=="number"&&(_e=[_e,_e]);var de=0,be={},Ae=new Float32Array($.count()*2);if(Z.eachNode(function(Ue){var it=Ue.dataIndex,tt=$.get("value",it),et,vt;if($.hasItemOption){var dt=$.getItemModel(it);et=dt.get("x"),vt=dt.get("y")}et==null&&(et=ee.x+Math.random()*ee.width,vt=ee.y+Math.random()*ee.height),Ae[de*2]=et,Ae[de*2+1]=vt,be[Ue.id]=de++;var je=C.a.number.linearMap(tt,fe,_e);isNaN(je)&&(isNaN(_e[0])?je=1:je=_e[0]),ce.push({x:et,y:vt,mass:je,size:$.getItemVisual(it,"symbolSize")})}),$.setLayout("points",Ae),Z.eachEdge(function(Ue){var it=Ue.dataIndex,tt=$.get("value",it),et=C.a.number.linearMap(tt,oe,pe);isNaN(et)&&(isNaN(pe[0])?et=1:et=pe[0]),ae.push({node1:be[Ue.node1.id],node2:be[Ue.node2.id],weight:et,dataIndex:it})}),!ne){var Fe=se.get("GPU");this._forceLayoutInstance&&(Fe&&!(this._forceLayoutInstance instanceof L.a)||!Fe&&!(this._forceLayoutInstance instanceof d.a))&&(this._forceLayoutInstanceToDispose=this._forceLayoutInstance),ne=this._forceLayoutInstance=Fe?new L.a:new d.a}ne.initData(ce,ae),ne.updateOption(se.option),this._updateForceEdgesGeometry(ne.getEdges(),N),this._updatePositionTexture(),W.dispatchAction({type:"graphGLStartLayout",from:this.uid})}else{var Ae=new Float32Array($.count()*2),de=0;Z.eachNode(function(tt){var et=tt.dataIndex,vt,dt;if($.hasItemOption){var je=$.getItemModel(et);vt=je.get("x"),dt=je.get("y")}Ae[de++]=vt,Ae[de++]=dt}),$.setLayout("points",Ae),this._updateAfterLayout(N,k,W)}},_updatePositionTexture:function(){var N=this._forceLayoutInstance.getNodePositionTexture();this._pointsBuilder.setPositionTexture(N),this._forceEdgesMesh.material.set("positionTex",N)},startLayout:function(N,k,J,z){if(!(z&&z.from!=null&&z.from!==this.uid)){var Z=this.viewGL,J=this._api,ee=this._forceLayoutInstance,$=this._model.getData(),ie=this._model.getModel("forceAtlas2");if(!ee){console.error("None layout don't have startLayout action");return}if(this.groupGL.remove(this._edgesMesh),this.groupGL.add(this._forceEdgesMesh),!!this._forceLayoutInstance){this._updateForceNodesGeometry(N.getData()),this._pointsBuilder.hideLabels();var se=this,ne=this._layoutId=P++,ce=ie.getShallow("maxSteps"),ae=ie.getShallow("steps"),fe=0,oe=Math.max(ae*2,20),pe=function(_e){if(_e===se._layoutId){if(ee.isFinished(ce)){J.dispatchAction({type:"graphGLStopLayout",from:se.uid}),J.dispatchAction({type:"graphGLFinishLayout",points:$.getLayout("points"),from:se.uid});return}ee.update(Z.layer.renderer,ae,function(){se._updatePositionTexture(),fe+=ae,fe>=oe&&(se._syncNodePosition(N),fe=0),J.getZr().refresh(),A()(function(){pe(_e)})})}};A()(function(){se._forceLayoutInstanceToDispose&&(se._forceLayoutInstanceToDispose.dispose(Z.layer.renderer),se._forceLayoutInstanceToDispose=null),pe(ne)}),this._layouting=!0}}},stopLayout:function(N,k,W,z){z&&z.from!=null&&z.from!==this.uid||(this._layoutId=0,this.groupGL.remove(this._forceEdgesMesh),this.groupGL.add(this._edgesMesh),this._forceLayoutInstance&&this.viewGL.layer&&(z&&z.beforeLayout||(this._syncNodePosition(N),this._updateAfterLayout(N,k,W)),this._api.getZr().refresh(),this._layouting=!1))},_syncNodePosition:function(N){var k=this._forceLayoutInstance.getNodePosition(this.viewGL.layer.renderer);N.getData().setLayout("points",k),N.setNodePosition(k)},_updateAfterLayout:function(N,k,W){this._updateMeshLinesGeometry(),this._pointsBuilder.removePositionTexture(),this._pointsBuilder.updateLayout(N,k,W),this._pointsBuilder.updateView(this.viewGL.camera),this._pointsBuilder.updateLabels(),this._pointsBuilder.showLabels()},focusNodeAdjacency:function(N,k,W,z){var Z=this._model.getData();this._downplayAll();var J=z.dataIndex,ee=Z.graph,$=[],ie=ee.getNodeByIndex(J);$.push(ie),ie.edges.forEach(function(ne){ne.dataIndex<0||(ne.node1!==ie&&$.push(ne.node1),ne.node2!==ie&&$.push(ne.node2))},this),this._pointsBuilder.fadeOutAll(.05),this._fadeOutEdgesAll(.05),$.forEach(function(ne){this._pointsBuilder.highlight(Z,ne.dataIndex)},this),this._pointsBuilder.updateLabels($.map(function(ne){return ne.dataIndex}));var se=[];ie.edges.forEach(function(ne){ne.dataIndex>=0&&(this._highlightEdge(ne.dataIndex),se.push(ne))},this),this._focusNodes=$,this._focusEdges=se},unfocusNodeAdjacency:function(N,k,W,z){this._downplayAll(),this._pointsBuilder.fadeInAll(),this._fadeInEdgesAll(),this._pointsBuilder.updateLabels()},_highlightEdge:function(N){var k=this._model.getEdgeData().getItemModel(N),W=T.a.parseColor(k.get("emphasis.lineStyle.color")||k.get("lineStyle.color")),z=m.a.firstNotNull(k.get("emphasis.lineStyle.opacity"),k.get("lineStyle.opacity"),1);W[3]*=z,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[N],W)},_downplayAll:function(){this._focusNodes&&this._focusNodes.forEach(function(N){this._pointsBuilder.downplay(this._model.getData(),N.dataIndex)},this),this._focusEdges&&this._focusEdges.forEach(function(N){this._downplayEdge(N.dataIndex)},this)},_downplayEdge:function(N){var k=this._getColor(N,[]);this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[N],k)},_setEdgeFade:function(){var N=[];return function(k,W){this._getColor(k,N),N[3]*=W,this._edgesMesh.geometry.setItemColor(this._edgeIndicesMap[k],N)}}(),_getColor:function(N,k){for(var W=0;W<4;W++)k[W]=this._originalEdgeColors[N*4+W];return k},_fadeOutEdgesAll:function(N){var k=this._model.getData().graph;k.eachEdge(function(W){this._setEdgeFade(W.dataIndex,N)},this)},_fadeInEdgesAll:function(){this._fadeOutEdgesAll(1)},_updateCamera:function(N,k){this.viewGL.setViewport(0,0,k.getWidth(),k.getHeight(),k.getDevicePixelRatio());for(var W=this.viewGL.camera,z=N.getData(),Z=z.getLayout("points"),J=f.create(1/0,1/0),ee=f.create(-1/0,-1/0),$=[],ie=0;ie<Z.length;)$[0]=Z[ie++],$[1]=Z[ie++],f.min(J,J,$),f.max(ee,ee,$);var se=(ee[1]+J[1])/2,ne=(ee[0]+J[0])/2;if(!(ne>W.left&&ne<W.right&&se<W.bottom&&se>W.top)){var ce=Math.max(ee[0]-J[0],10),ae=ce/k.getWidth()*k.getHeight();ce*=1.4,ae*=1.4,J[0]-=ce*.2,W.left=J[0],W.top=se-ae/2,W.bottom=se+ae/2,W.right=ce+J[0],W.near=0,W.far=100}},dispose:function(){var N=this.viewGL.layer.renderer;this._forceLayoutInstance&&this._forceLayoutInstance.dispose(N),this.groupGL.removeAll(),this._layoutId=-1},remove:function(){this.groupGL.removeAll(),this._control.dispose()}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(14),T=b(10),x=b(248);w.a.Shader.import(x.a);var p={repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null};function m(L){var d={type:w.a.Texture.FLOAT,minFilter:w.a.Texture.NEAREST,magFilter:w.a.Texture.NEAREST};this._positionSourceTex=new w.a.Texture2D(d),this._positionSourceTex.flipY=!1,this._positionTex=new w.a.Texture2D(d),this._positionPrevTex=new w.a.Texture2D(d),this._forceTex=new w.a.Texture2D(d),this._forcePrevTex=new w.a.Texture2D(d),this._weightedSumTex=new w.a.Texture2D(d),this._weightedSumTex.width=this._weightedSumTex.height=1,this._globalSpeedTex=new w.a.Texture2D(d),this._globalSpeedPrevTex=new w.a.Texture2D(d),this._globalSpeedTex.width=this._globalSpeedTex.height=1,this._globalSpeedPrevTex.width=this._globalSpeedPrevTex.height=1,this._nodeRepulsionPass=new y.a({fragment:w.a.Shader.source("ecgl.forceAtlas2.updateNodeRepulsion")}),this._positionPass=new y.a({fragment:w.a.Shader.source("ecgl.forceAtlas2.updatePosition")}),this._globalSpeedPass=new y.a({fragment:w.a.Shader.source("ecgl.forceAtlas2.calcGlobalSpeed")}),this._copyPass=new y.a({fragment:w.a.Shader.source("clay.compositor.output")});var g=function(A){A.blendEquation(A.FUNC_ADD),A.blendFunc(A.ONE,A.ONE)};this._edgeForceMesh=new w.a.Mesh({geometry:new w.a.Geometry({attributes:{node1:new w.a.Geometry.Attribute("node1","float",2),node2:new w.a.Geometry.Attribute("node2","float",2),weight:new w.a.Geometry.Attribute("weight","float",1)},dynamic:!0,mainAttribute:"node1"}),material:new w.a.Material({transparent:!0,shader:w.a.createShader("ecgl.forceAtlas2.updateEdgeAttraction"),blend:g,depthMask:!1,depthText:!1}),mode:w.a.Mesh.POINTS}),this._weightedSumMesh=new w.a.Mesh({geometry:new w.a.Geometry({attributes:{node:new w.a.Geometry.Attribute("node","float",2)},dynamic:!0,mainAttribute:"node"}),material:new w.a.Material({transparent:!0,shader:w.a.createShader("ecgl.forceAtlas2.calcWeightedSum"),blend:g,depthMask:!1,depthText:!1}),mode:w.a.Mesh.POINTS}),this._framebuffer=new T.a({depthBuffer:!1}),this._dummyCamera=new w.a.OrthographicCamera({left:-1,right:1,top:1,bottom:-1,near:0,far:100}),this._globalSpeed=0}m.prototype.updateOption=function(L){for(var d in p)this[d]=p[d];var g=this._nodes.length;if(g>5e4?this.jitterTolerence=10:g>5e3?this.jitterTolerence=1:this.jitterTolerence=.1,g>100?this.scaling=2:this.scaling=10,L)for(var d in p)L[d]!=null&&(this[d]=L[d]);if(this.repulsionByDegree)for(var A=this._positionSourceTex.pixels,M=0;M<this._nodes.length;M++)A[M*4+2]=(this._nodes[M].degree||0)+1},m.prototype._updateGravityCenter=function(L){var d=this._nodes,g=this._edges;if(this.gravityCenter)this._gravityCenter=this.gravityCenter;else{for(var A=[1/0,1/0],M=[-1/0,-1/0],O=0;O<d.length;O++)A[0]=Math.min(d[O].x,A[0]),A[1]=Math.min(d[O].y,A[1]),M[0]=Math.max(d[O].x,M[0]),M[1]=Math.max(d[O].y,M[1]);this._gravityCenter=[(A[0]+M[0])*.5,(A[1]+M[1])*.5]}for(var O=0;O<g.length;O++){var S=g[O].node1,I=g[O].node2;d[S].degree=(d[S].degree||0)+1,d[I].degree=(d[I].degree||0)+1}},m.prototype.initData=function(L,d){this._nodes=L,this._edges=d,this._updateGravityCenter();var g=Math.ceil(Math.sqrt(L.length)),A=g,M=new Float32Array(g*A*4);this._resize(g,A);for(var O=0,S=0;S<L.length;S++){var I=L[S];M[O++]=I.x||0,M[O++]=I.y||0,M[O++]=I.mass||1,M[O++]=I.size||1}this._positionSourceTex.pixels=M;var c=this._edgeForceMesh.geometry,f=d.length;c.attributes.node1.init(f*2),c.attributes.node2.init(f*2),c.attributes.weight.init(f*2);for(var P=[],S=0;S<d.length;S++){var N=c.attributes,k=d[S].weight;k==null&&(k=1),N.node1.set(S,this.getNodeUV(d[S].node1,P)),N.node2.set(S,this.getNodeUV(d[S].node2,P)),N.weight.set(S,k),N.node1.set(S+f,this.getNodeUV(d[S].node2,P)),N.node2.set(S+f,this.getNodeUV(d[S].node1,P)),N.weight.set(S+f,k)}var W=this._weightedSumMesh.geometry;W.attributes.node.init(L.length);for(var S=0;S<L.length;S++)W.attributes.node.set(S,this.getNodeUV(S,P));c.dirty(),W.dirty(),this._nodeRepulsionPass.material.define("fragment","NODE_COUNT",L.length),this._nodeRepulsionPass.material.setUniform("textureSize",[g,A]),this._inited=!1,this._frame=0},m.prototype.getNodes=function(){return this._nodes},m.prototype.getEdges=function(){return this._edges},m.prototype.step=function(L){this._inited||(this._initFromSource(L),this._inited=!0),this._frame++,this._framebuffer.attach(this._forceTex),this._framebuffer.bind(L);var d=this._nodeRepulsionPass;d.setUniform("strongGravityMode",this.strongGravityMode),d.setUniform("gravity",this.gravity),d.setUniform("gravityCenter",this._gravityCenter),d.setUniform("scaling",this.scaling),d.setUniform("preventOverlap",this.preventOverlap),d.setUniform("positionTex",this._positionPrevTex),d.render(L);var g=this._edgeForceMesh;g.material.set("linLogMode",this.linLogMode),g.material.set("edgeWeightInfluence",this.edgeWeightInfluence),g.material.set("preventOverlap",this.preventOverlap),g.material.set("positionTex",this._positionPrevTex),L.gl.enable(L.gl.BLEND),L.renderPass([g],this._dummyCamera),this._framebuffer.attach(this._weightedSumTex),L.gl.clearColor(0,0,0,0),L.gl.clear(L.gl.COLOR_BUFFER_BIT),L.gl.enable(L.gl.BLEND);var A=this._weightedSumMesh;A.material.set("positionTex",this._positionPrevTex),A.material.set("forceTex",this._forceTex),A.material.set("forcePrevTex",this._forcePrevTex),L.renderPass([A],this._dummyCamera),this._framebuffer.attach(this._globalSpeedTex);var M=this._globalSpeedPass;M.setUniform("globalSpeedPrevTex",this._globalSpeedPrevTex),M.setUniform("weightedSumTex",this._weightedSumTex),M.setUniform("jitterTolerence",this.jitterTolerence),L.gl.disable(L.gl.BLEND),M.render(L);var O=this._positionPass;this._framebuffer.attach(this._positionTex),O.setUniform("globalSpeedTex",this._globalSpeedTex),O.setUniform("positionTex",this._positionPrevTex),O.setUniform("forceTex",this._forceTex),O.setUniform("forcePrevTex",this._forcePrevTex),O.render(L),this._framebuffer.unbind(L),this._swapTexture()},m.prototype.update=function(L,d,g){d==null&&(d=1),d=Math.max(d,1);for(var A=0;A<d;A++)this.step(L);g&&g()},m.prototype.getNodePositionTexture=function(){return this._inited?this._positionPrevTex:this._positionSourceTex},m.prototype.getNodeUV=function(L,d){d=d||[];var g=this._positionTex.width,A=this._positionTex.height;return d[0]=L%g/(g-1),d[1]=Math.floor(L/g)/(A-1)||0,d},m.prototype.getNodePosition=function(L,d){var g=this._positionArr,A=this._positionTex.width,M=this._positionTex.height,O=A*M;(!g||g.length!==O*4)&&(g=this._positionArr=new Float32Array(O*4)),this._framebuffer.bind(L),this._framebuffer.attach(this._positionPrevTex),L.gl.readPixels(0,0,A,M,L.gl.RGBA,L.gl.FLOAT,g),this._framebuffer.unbind(L),d||(d=new Float32Array(this._nodes.length*2));for(var S=0;S<this._nodes.length;S++)d[S*2]=g[S*4],d[S*2+1]=g[S*4+1];return d},m.prototype.getTextureData=function(L,d){var g=this["_"+d+"Tex"],A=g.width,M=g.height;this._framebuffer.bind(L),this._framebuffer.attach(g);var O=new Float32Array(A*M*4);return L.gl.readPixels(0,0,A,M,L.gl.RGBA,L.gl.FLOAT,O),this._framebuffer.unbind(L),O},m.prototype.getTextureSize=function(){return{width:this._positionTex.width,height:this._positionTex.height}},m.prototype.isFinished=function(L){return this._frame>L},m.prototype._swapTexture=function(){var L=this._positionPrevTex;this._positionPrevTex=this._positionTex,this._positionTex=L;var L=this._forcePrevTex;this._forcePrevTex=this._forceTex,this._forceTex=L;var L=this._globalSpeedPrevTex;this._globalSpeedPrevTex=this._globalSpeedTex,this._globalSpeedTex=L},m.prototype._initFromSource=function(L){this._framebuffer.attach(this._positionPrevTex),this._framebuffer.bind(L),this._copyPass.setUniform("texture",this._positionSourceTex),this._copyPass.render(L),L.gl.clearColor(0,0,0,0),this._framebuffer.attach(this._forcePrevTex),L.gl.clear(L.gl.COLOR_BUFFER_BIT),this._framebuffer.attach(this._globalSpeedPrevTex),L.gl.clear(L.gl.COLOR_BUFFER_BIT),this._framebuffer.unbind(L)},m.prototype._resize=function(L,d){["_positionSourceTex","_positionTex","_positionPrevTex","_forceTex","_forcePrevTex"].forEach(function(g){this[g].width=L,this[g].height=d,this[g].dirty()},this)},m.prototype.dispose=function(L){this._framebuffer.dispose(L),this._copyPass.dispose(L),this._nodeRepulsionPass.dispose(L),this._positionPass.dispose(L),this._globalSpeedPass.dispose(L),this._edgeForceMesh.geometry.dispose(L),this._weightedSumMesh.geometry.dispose(L),this._positionSourceTex.dispose(L),this._positionTex.dispose(L),this._positionPrevTex.dispose(L),this._forceTex.dispose(L),this._forcePrevTex.dispose(L),this._weightedSumTex.dispose(L),this._globalSpeedTex.dispose(L),this._globalSpeedPrevTex.dispose(L)},C.a.ForceAtlas2GPU=m,V.a=m},function(re,V,b){"use strict";V.a=`@export ecgl.forceAtlas2.updateNodeRepulsion
|
|
|
|
|
|
#define NODE_COUNT 0
|
|
|
|
|
|
uniform sampler2D positionTex;
|
|
|
|
|
|
uniform vec2 textureSize;
|
|
|
uniform float gravity;
|
|
|
uniform float scaling;
|
|
|
uniform vec2 gravityCenter;
|
|
|
|
|
|
uniform bool strongGravityMode;
|
|
|
uniform bool preventOverlap;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 n0 = texture2D(positionTex, v_Texcoord);
|
|
|
|
|
|
vec2 force = vec2(0.0);
|
|
|
for (int i = 0; i < NODE_COUNT; i++) {
|
|
|
vec2 uv = vec2(
|
|
|
mod(float(i), textureSize.x) / (textureSize.x - 1.0),
|
|
|
floor(float(i) / textureSize.x) / (textureSize.y - 1.0)
|
|
|
);
|
|
|
vec4 n1 = texture2D(positionTex, uv);
|
|
|
|
|
|
vec2 dir = n0.xy - n1.xy;
|
|
|
float d2 = dot(dir, dir);
|
|
|
|
|
|
if (d2 > 0.0) {
|
|
|
float factor = 0.0;
|
|
|
if (preventOverlap) {
|
|
|
float d = sqrt(d2);
|
|
|
d = d - n0.w - n1.w;
|
|
|
if (d > 0.0) {
|
|
|
factor = scaling * n0.z * n1.z / (d * d);
|
|
|
}
|
|
|
else if (d < 0.0) {
|
|
|
factor = scaling * 100.0 * n0.z * n1.z;
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
factor = scaling * n0.z * n1.z / d2;
|
|
|
}
|
|
|
force += dir * factor;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
vec2 dir = gravityCenter - n0.xy;
|
|
|
float d = 1.0;
|
|
|
if (!strongGravityMode) {
|
|
|
d = length(dir);
|
|
|
}
|
|
|
|
|
|
force += dir * n0.z * gravity / (d + 1.0);
|
|
|
|
|
|
gl_FragColor = vec4(force, 0.0, 1.0);
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.updateEdgeAttraction.vertex
|
|
|
|
|
|
attribute vec2 node1;
|
|
|
attribute vec2 node2;
|
|
|
attribute float weight;
|
|
|
|
|
|
uniform sampler2D positionTex;
|
|
|
uniform float edgeWeightInfluence;
|
|
|
uniform bool preventOverlap;
|
|
|
uniform bool linLogMode;
|
|
|
|
|
|
uniform vec2 windowSize: WINDOW_SIZE;
|
|
|
|
|
|
varying vec2 v_Force;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
vec4 n0 = texture2D(positionTex, node1);
|
|
|
vec4 n1 = texture2D(positionTex, node2);
|
|
|
|
|
|
vec2 dir = n1.xy - n0.xy;
|
|
|
float d = length(dir);
|
|
|
float w;
|
|
|
if (edgeWeightInfluence == 0.0) {
|
|
|
w = 1.0;
|
|
|
}
|
|
|
else if (edgeWeightInfluence == 1.0) {
|
|
|
w = weight;
|
|
|
}
|
|
|
else {
|
|
|
w = pow(weight, edgeWeightInfluence);
|
|
|
}
|
|
|
vec2 offset = vec2(1.0 / windowSize.x, 1.0 / windowSize.y);
|
|
|
vec2 scale = vec2((windowSize.x - 1.0) / windowSize.x, (windowSize.y - 1.0) / windowSize.y);
|
|
|
vec2 pos = node1 * scale * 2.0 - 1.0;
|
|
|
gl_Position = vec4(pos + offset, 0.0, 1.0);
|
|
|
gl_PointSize = 1.0;
|
|
|
|
|
|
float factor;
|
|
|
if (preventOverlap) {
|
|
|
d = d - n1.w - n0.w;
|
|
|
}
|
|
|
if (d <= 0.0) {
|
|
|
v_Force = vec2(0.0);
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
if (linLogMode) {
|
|
|
factor = w * log(d) / d;
|
|
|
}
|
|
|
else {
|
|
|
factor = w;
|
|
|
}
|
|
|
v_Force = dir * factor;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.updateEdgeAttraction.fragment
|
|
|
|
|
|
varying vec2 v_Force;
|
|
|
|
|
|
void main() {
|
|
|
gl_FragColor = vec4(v_Force, 0.0, 0.0);
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.calcWeightedSum.vertex
|
|
|
|
|
|
attribute vec2 node;
|
|
|
|
|
|
varying vec2 v_NodeUv;
|
|
|
|
|
|
void main() {
|
|
|
|
|
|
v_NodeUv = node;
|
|
|
gl_Position = vec4(0.0, 0.0, 0.0, 1.0);
|
|
|
gl_PointSize = 1.0;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.calcWeightedSum.fragment
|
|
|
|
|
|
varying vec2 v_NodeUv;
|
|
|
|
|
|
uniform sampler2D positionTex;
|
|
|
uniform sampler2D forceTex;
|
|
|
uniform sampler2D forcePrevTex;
|
|
|
|
|
|
void main() {
|
|
|
vec2 force = texture2D(forceTex, v_NodeUv).rg;
|
|
|
vec2 forcePrev = texture2D(forcePrevTex, v_NodeUv).rg;
|
|
|
|
|
|
float mass = texture2D(positionTex, v_NodeUv).z;
|
|
|
float swing = length(force - forcePrev) * mass;
|
|
|
float traction = length(force + forcePrev) * 0.5 * mass;
|
|
|
|
|
|
gl_FragColor = vec4(swing, traction, 0.0, 0.0);
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.calcGlobalSpeed
|
|
|
|
|
|
uniform sampler2D globalSpeedPrevTex;
|
|
|
uniform sampler2D weightedSumTex;
|
|
|
uniform float jitterTolerence;
|
|
|
|
|
|
void main() {
|
|
|
vec2 weightedSum = texture2D(weightedSumTex, vec2(0.5)).xy;
|
|
|
float prevGlobalSpeed = texture2D(globalSpeedPrevTex, vec2(0.5)).x;
|
|
|
float globalSpeed = jitterTolerence * jitterTolerence
|
|
|
* weightedSum.y / weightedSum.x;
|
|
|
if (prevGlobalSpeed > 0.0) {
|
|
|
globalSpeed = min(globalSpeed / prevGlobalSpeed, 1.5) * prevGlobalSpeed;
|
|
|
}
|
|
|
gl_FragColor = vec4(globalSpeed, 0.0, 0.0, 1.0);
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.updatePosition
|
|
|
|
|
|
uniform sampler2D forceTex;
|
|
|
uniform sampler2D forcePrevTex;
|
|
|
uniform sampler2D positionTex;
|
|
|
uniform sampler2D globalSpeedTex;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
void main() {
|
|
|
vec2 force = texture2D(forceTex, v_Texcoord).xy;
|
|
|
vec2 forcePrev = texture2D(forcePrevTex, v_Texcoord).xy;
|
|
|
vec4 node = texture2D(positionTex, v_Texcoord);
|
|
|
|
|
|
float globalSpeed = texture2D(globalSpeedTex, vec2(0.5)).r;
|
|
|
float swing = length(force - forcePrev);
|
|
|
float speed = 0.1 * globalSpeed / (0.1 + globalSpeed * sqrt(swing));
|
|
|
|
|
|
float df = length(force);
|
|
|
if (df > 0.0) {
|
|
|
speed = min(df * speed, 10.0) / df;
|
|
|
|
|
|
gl_FragColor = vec4(node.xy + speed * force, node.zw);
|
|
|
}
|
|
|
else {
|
|
|
gl_FragColor = node;
|
|
|
}
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.edges.vertex
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
attribute vec2 node;
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
uniform sampler2D positionTex;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_Position = worldViewProjection * vec4(
|
|
|
texture2D(positionTex, node).xy, -10.0, 1.0
|
|
|
);
|
|
|
v_Color = a_Color;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.forceAtlas2.edges.fragment
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
varying vec4 v_Color;
|
|
|
void main() {
|
|
|
gl_FragColor = color * v_Color;
|
|
|
}
|
|
|
@end`},function(re,V,b){"use strict";var U=b(5),C=b(6),w=b(250),y=w.a.toString();y=y.slice(y.indexOf("{")+1,y.lastIndexOf("}"));var T={barnesHutOptimize:!0,barnesHutTheta:1.5,repulsionByDegree:!0,linLogMode:!1,strongGravityMode:!1,gravity:1,scaling:1,edgeWeightInfluence:1,jitterTolerence:.1,preventOverlap:!1,dissuadeHubs:!1,gravityCenter:null},x=function(p){for(var m in T)this[m]=T[m];if(p)for(var m in p)this[m]=p[m];this._nodes=[],this._edges=[],this._disposed=!1,this._positionTex=new U.a({type:C.a.FLOAT,flipY:!1,minFilter:C.a.NEAREST,magFilter:C.a.NEAREST})};x.prototype.initData=function(p,m){var L=new Blob([y]),d=window.URL.createObjectURL(L);this._worker=new Worker(d),this._worker.onmessage=this._$onupdate.bind(this),this._nodes=p,this._edges=m,this._frame=0;for(var g=p.length,A=m.length,M=new Float32Array(g*2),O=new Float32Array(g),S=new Float32Array(g),I=new Float32Array(A*2),c=new Float32Array(A),f=0;f<p.length;f++){var P=p[f];M[f*2]=P.x,M[f*2+1]=P.y,O[f]=P.mass==null?1:P.mass,S[f]=P.size==null?1:P.size}for(var f=0;f<m.length;f++){var N=m[f],k=N.node1,W=N.node2;I[f*2]=k,I[f*2+1]=W,c[f]=N.weight==null?1:N.weight}var z=Math.ceil(Math.sqrt(p.length)),Z=z,J=new Float32Array(z*Z*4),ee=this._positionTex;ee.width=z,ee.height=Z,ee.pixels=J,this._worker.postMessage({cmd:"init",nodesPosition:M,nodesMass:O,nodesSize:S,edges:I,edgesWeight:c}),this._globalSpeed=1/0},x.prototype.updateOption=function(p){var m={};for(var L in T)m[L]=T[L];var d=this._nodes,g=this._edges,A=d.length;if(A>5e4?m.jitterTolerence=10:A>5e3?m.jitterTolerence=1:m.jitterTolerence=.1,A>100?m.scaling=2:m.scaling=10,A>1e3?m.barnesHutOptimize=!0:m.barnesHutOptimize=!1,p)for(var L in T)p[L]!=null&&(m[L]=p[L]);if(!m.gravityCenter){for(var M=[1/0,1/0],O=[-1/0,-1/0],S=0;S<d.length;S++)M[0]=Math.min(d[S].x,M[0]),M[1]=Math.min(d[S].y,M[1]),O[0]=Math.max(d[S].x,O[0]),O[1]=Math.max(d[S].y,O[1]);m.gravityCenter=[(M[0]+O[0])*.5,(M[1]+O[1])*.5]}for(var S=0;S<g.length;S++){var I=g[S].node1,c=g[S].node2;d[I].degree=(d[I].degree||0)+1,d[c].degree=(d[c].degree||0)+1}this._worker&&this._worker.postMessage({cmd:"updateConfig",config:m})},x.prototype.update=function(p,m,L){m==null&&(m=1),m=Math.max(m,1),this._frame+=m,this._onupdate=L,this._worker&&this._worker.postMessage({cmd:"update",steps:Math.round(m)})},x.prototype._$onupdate=function(p){if(!this._disposed){var m=new Float32Array(p.data.buffer);this._globalSpeed=p.data.globalSpeed,this._positionArr=m,this._updateTexture(m),this._onupdate&&this._onupdate()}},x.prototype.getNodePositionTexture=function(){return this._positionTex},x.prototype.getNodeUV=function(p,m){m=m||[];var L=this._positionTex.width,d=this._positionTex.height;return m[0]=p%L/(L-1),m[1]=Math.floor(p/L)/(d-1),m},x.prototype.getNodes=function(){return this._nodes},x.prototype.getEdges=function(){return this._edges},x.prototype.isFinished=function(p){return this._frame>p},x.prototype.getNodePosition=function(p,m){if(m||(m=new Float32Array(this._nodes.length*2)),this._positionArr)for(var L=0;L<this._positionArr.length;L++)m[L]=this._positionArr[L];return m},x.prototype._updateTexture=function(p){for(var m=this._positionTex.pixels,L=0,d=0;d<p.length;)m[L++]=p[d++],m[L++]=p[d++],m[L++]=1,m[L++]=1;this._positionTex.dirty()},x.prototype.dispose=function(p){this._disposed=!0,this._worker=null},V.a=x},function(re,V,b){"use strict";function U(){var C={create:function(){return new Float32Array(2)},dist:function(d,g){var A=g[0]-d[0],M=g[1]-d[1];return Math.sqrt(A*A+M*M)},len:function(d){var g=d[0],A=d[1];return Math.sqrt(g*g+A*A)},scaleAndAdd:function(d,g,A,M){return d[0]=g[0]+A[0]*M,d[1]=g[1]+A[1]*M,d},scale:function(d,g,A){return d[0]=g[0]*A,d[1]=g[1]*A,d},add:function(d,g,A){return d[0]=g[0]+A[0],d[1]=g[1]+A[1],d},sub:function(d,g,A){return d[0]=g[0]-A[0],d[1]=g[1]-A[1],d},normalize:function(d,g){var A=g[0],M=g[1],O=A*A+M*M;return O>0&&(O=1/Math.sqrt(O),d[0]=g[0]*O,d[1]=g[1]*O),d},negate:function(d,g){return d[0]=-g[0],d[1]=-g[1],d},copy:function(d,g){return d[0]=g[0],d[1]=g[1],d},set:function(d,g,A){return d[0]=g,d[1]=A,d}};function w(){this.subRegions=[],this.nSubRegions=0,this.node=null,this.mass=0,this.centerOfMass=null,this.bbox=new Float32Array(4),this.size=0}var y=w.prototype;y.beforeUpdate=function(){for(var d=0;d<this.nSubRegions;d++)this.subRegions[d].beforeUpdate();this.mass=0,this.centerOfMass&&(this.centerOfMass[0]=0,this.centerOfMass[1]=0),this.nSubRegions=0,this.node=null},y.afterUpdate=function(){this.subRegions.length=this.nSubRegions;for(var d=0;d<this.nSubRegions;d++)this.subRegions[d].afterUpdate()},y.addNode=function(d){if(this.nSubRegions===0)if(this.node==null){this.node=d;return}else this._addNodeToSubRegion(this.node),this.node=null;this._addNodeToSubRegion(d),this._updateCenterOfMass(d)},y.findSubRegion=function(d,g){for(var A=0;A<this.nSubRegions;A++){var M=this.subRegions[A];if(M.contain(d,g))return M}},y.contain=function(d,g){return this.bbox[0]<=d&&this.bbox[2]>=d&&this.bbox[1]<=g&&this.bbox[3]>=g},y.setBBox=function(d,g,A,M){this.bbox[0]=d,this.bbox[1]=g,this.bbox[2]=A,this.bbox[3]=M,this.size=(A-d+M-g)/2},y._newSubRegion=function(){var d=this.subRegions[this.nSubRegions];return d||(d=new w,this.subRegions[this.nSubRegions]=d),this.nSubRegions++,d},y._addNodeToSubRegion=function(d){var g=this.findSubRegion(d.position[0],d.position[1]),A=this.bbox;if(!g){var M=(A[0]+A[2])/2,O=(A[1]+A[3])/2,S=(A[2]-A[0])/2,I=(A[3]-A[1])/2,c=d.position[0]>=M?1:0,f=d.position[1]>=O?1:0,g=this._newSubRegion();g.setBBox(c*S+A[0],f*I+A[1],(c+1)*S+A[0],(f+1)*I+A[1])}g.addNode(d)},y._updateCenterOfMass=function(d){this.centerOfMass==null&&(this.centerOfMass=new Float32Array(2));var g=this.centerOfMass[0]*this.mass,A=this.centerOfMass[1]*this.mass;g+=d.position[0]*d.mass,A+=d.position[1]*d.mass,this.mass+=d.mass,this.centerOfMass[0]=g/this.mass,this.centerOfMass[1]=A/this.mass};function T(){this.position=new Float32Array(2),this.force=C.create(),this.forcePrev=C.create(),this.mass=1,this.inDegree=0,this.outDegree=0}function x(d,g){this.source=d,this.target=g,this.weight=1}function p(){this.autoSettings=!0,this.barnesHutOptimize=!0,this.barnesHutTheta=1.5,this.repulsionByDegree=!0,this.linLogMode=!1,this.strongGravityMode=!1,this.gravity=1,this.scaling=1,this.edgeWeightInfluence=1,this.jitterTolerence=.1,this.preventOverlap=!1,this.dissuadeHubs=!1,this.rootRegion=new w,this.rootRegion.centerOfMass=C.create(),this.nodes=[],this.edges=[],this.bbox=new Float32Array(4),this.gravityCenter=null,this._massArr=null,this._swingingArr=null,this._sizeArr=null,this._globalSpeed=0}var m=p.prototype;m.initNodes=function(d,g,A){var M=g.length;this.nodes.length=0;for(var O=typeof A!="undefined",S=0;S<M;S++){var I=new T;I.position[0]=d[S*2],I.position[1]=d[S*2+1],I.mass=g[S],O&&(I.size=A[S]),this.nodes.push(I)}this._massArr=g,this._swingingArr=new Float32Array(M),O&&(this._sizeArr=A)},m.initEdges=function(d,g){var A=d.length/2;this.edges.length=0;for(var M=0;M<A;M++){var O=d[M*2],S=d[M*2+1],I=this.nodes[O],c=this.nodes[S];if(!I||!c){console.error("Node not exists, try initNodes before initEdges");return}I.outDegree++,c.inDegree++;var f=new x(I,c);g&&(f.weight=g[M]),this.edges.push(f)}},m.updateSettings=function(){if(this.repulsionByDegree)for(var d=0;d<this.nodes.length;d++){var g=this.nodes[d];g.mass=g.inDegree+g.outDegree+1}else for(var d=0;d<this.nodes.length;d++){var g=this.nodes[d];g.mass=this._massArr[d]}},m.update=function(){var d=this.nodes.length;if(this.updateSettings(),this.updateBBox(),this.barnesHutOptimize){this.rootRegion.setBBox(this.bbox[0],this.bbox[1],this.bbox[2],this.bbox[3]),this.rootRegion.beforeUpdate();for(var g=0;g<d;g++)this.rootRegion.addNode(this.nodes[g]);this.rootRegion.afterUpdate()}for(var g=0;g<d;g++){var A=this.nodes[g];C.copy(A.forcePrev,A.force),C.set(A.force,0,0)}for(var g=0;g<d;g++){var M=this.nodes[g];if(this.barnesHutOptimize)this.applyRegionToNodeRepulsion(this.rootRegion,M);else for(var O=g+1;O<d;O++){var S=this.nodes[O];this.applyNodeToNodeRepulsion(M,S,!1)}this.gravity>0&&(this.strongGravityMode?this.applyNodeStrongGravity(M):this.applyNodeGravity(M))}for(var g=0;g<this.edges.length;g++)this.applyEdgeAttraction(this.edges[g]);for(var I=0,c=0,f=C.create(),g=0;g<d;g++){var A=this.nodes[g],P=C.dist(A.force,A.forcePrev);I+=P*A.mass,C.add(f,A.force,A.forcePrev);var N=C.len(f)*.5;c+=N*A.mass,this._swingingArr[g]=P}var k=this.jitterTolerence*this.jitterTolerence*c/I;this._globalSpeed>0&&(k=Math.min(k/this._globalSpeed,1.5)*this._globalSpeed),this._globalSpeed=k;for(var g=0;g<d;g++){var A=this.nodes[g],P=this._swingingArr[g],W=.1*k/(1+k*Math.sqrt(P)),z=C.len(A.force);z>0&&(W=Math.min(z*W,10)/z,C.scaleAndAdd(A.position,A.position,A.force,W))}},m.applyRegionToNodeRepulsion=function(){var d=C.create();return function(A,M){if(A.node)this.applyNodeToNodeRepulsion(A.node,M,!0);else{C.sub(d,M.position,A.centerOfMass);var O=d[0]*d[0]+d[1]*d[1];if(O>this.barnesHutTheta*A.size*A.size){var S=this.scaling*M.mass*A.mass/O;C.scaleAndAdd(M.force,M.force,d,S)}else for(var I=0;I<A.nSubRegions;I++)this.applyRegionToNodeRepulsion(A.subRegions[I],M)}}}(),m.applyNodeToNodeRepulsion=function(){var d=C.create();return function(A,M,O){if(A!=M){C.sub(d,A.position,M.position);var S=d[0]*d[0]+d[1]*d[1];if(S!==0){var I;if(this.preventOverlap){var c=Math.sqrt(S);if(c=c-A.size-M.size,c>0)I=this.scaling*A.mass*M.mass/(c*c);else if(c<0)I=this.scaling*100*A.mass*M.mass;else return}else I=this.scaling*A.mass*M.mass/S;C.scaleAndAdd(A.force,A.force,d,I),C.scaleAndAdd(M.force,M.force,d,-I)}}}}(),m.applyEdgeAttraction=function(){var d=C.create();return function(A){var M=A.source,O=A.target;C.sub(d,M.position,O.position);var S=C.len(d),I;this.edgeWeightInfluence===0?I=1:this.edgeWeightInfluence===1?I=A.weight:I=Math.pow(A.weight,this.edgeWeightInfluence);var c;this.preventOverlap&&(S=S-M.size-O.size,S<=0)||(this.linLogMode?c=-I*Math.log(S+1)/(S+1):c=-I,C.scaleAndAdd(M.force,M.force,d,c),C.scaleAndAdd(O.force,O.force,d,-c))}}(),m.applyNodeGravity=function(){var d=C.create();return function(g){C.sub(d,this.gravityCenter,g.position);var A=C.len(d);C.scaleAndAdd(g.force,g.force,d,this.gravity*g.mass/(A+1))}}(),m.applyNodeStrongGravity=function(){var d=C.create();return function(g){C.sub(d,this.gravityCenter,g.position),C.scaleAndAdd(g.force,g.force,d,this.gravity*g.mass)}}(),m.updateBBox=function(){for(var d=1/0,g=1/0,A=-1/0,M=-1/0,O=0;O<this.nodes.length;O++){var S=this.nodes[O].position;d=Math.min(d,S[0]),g=Math.min(g,S[1]),A=Math.max(A,S[0]),M=Math.max(M,S[1])}this.bbox[0]=d,this.bbox[1]=g,this.bbox[2]=A,this.bbox[3]=M},m.getGlobalSpeed=function(){return this._globalSpeed};var L=null;self.onmessage=function(d){switch(d.data.cmd){case"init":L=new p,L.initNodes(d.data.nodesPosition,d.data.nodesMass,d.data.nodesSize),L.initEdges(d.data.edges,d.data.edgesWeight);break;case"updateConfig":if(L)for(var g in d.data.config)L[g]=d.data.config[g];break;case"update":var A=d.data.steps;if(L){for(var M=0;M<A;M++)L.update();for(var O=L.nodes.length,S=new Float32Array(O*2),M=0;M<O;M++){var I=L.nodes[M];S[M*2]=I.position[0],S[M*2+1]=I.position[1]}self.postMessage({buffer:S.buffer,globalSpeed:L.getGlobalSpeed()},[S.buffer])}else{var c=new Float32Array;self.postMessage({buffer:c.buffer,globalSpeed:L.getGlobalSpeed()},[c.buffer])}break}}}V.a=U},function(re,V,b){"use strict";var U=b(8),C=b(3),w=U.a.extend(function(){return{zr:null,viewGL:null,minZoom:.2,maxZoom:5,_needsUpdate:!1,_dx:0,_dy:0,_zoom:1}},function(){this._mouseDownHandler=this._mouseDownHandler.bind(this),this._mouseWheelHandler=this._mouseWheelHandler.bind(this),this._mouseMoveHandler=this._mouseMoveHandler.bind(this),this._mouseUpHandler=this._mouseUpHandler.bind(this),this._update=this._update.bind(this)},{init:function(){var y=this.zr;y.on("mousedown",this._mouseDownHandler),y.on("mousewheel",this._mouseWheelHandler),y.on("globalout",this._mouseUpHandler),y.animation.on("frame",this._update)},setTarget:function(y){this._target=y},setZoom:function(y){this._zoom=Math.max(Math.min(y,this.maxZoom),this.minZoom),this._needsUpdate=!0},setOffset:function(y){this._dx=y[0],this._dy=y[1],this._needsUpdate=!0},getZoom:function(){return this._zoom},getOffset:function(){return[this._dx,this._dy]},_update:function(){if(this._target&&this._needsUpdate){var y=this._target,T=this._zoom;y.position.x=this._dx,y.position.y=this._dy,y.scale.set(T,T,T),this.zr.refresh(),this._needsUpdate=!1,this.trigger("update")}},_mouseDownHandler:function(y){if(!y.target){var T=y.offsetX,x=y.offsetY;if(!(this.viewGL&&!this.viewGL.containPoint(T,x))){this.zr.on("mousemove",this._mouseMoveHandler),this.zr.on("mouseup",this._mouseUpHandler);var p=this._convertPos(T,x);this._x=p.x,this._y=p.y}}},_convertPos:function(y,T){var x=this.viewGL.camera,p=this.viewGL.viewport;return{x:(y-p.x)/p.width*(x.right-x.left)+x.left,y:(T-p.y)/p.height*(x.bottom-x.top)+x.top}},_mouseMoveHandler:function(y){var T=this._convertPos(y.offsetX,y.offsetY);this._dx+=T.x-this._x,this._dy+=T.y-this._y,this._x=T.x,this._y=T.y,this._needsUpdate=!0},_mouseUpHandler:function(y){this.zr.off("mousemove",this._mouseMoveHandler),this.zr.off("mouseup",this._mouseUpHandler)},_mouseWheelHandler:function(y){y=y.event;var T=y.wheelDelta||-y.detail;if(T!==0){var x=y.offsetX,p=y.offsetY;if(!(this.viewGL&&!this.viewGL.containPoint(x,p))){var m=T>0?1.1:.9,L=Math.max(Math.min(this._zoom*m,this.maxZoom),this.minZoom);m=L/this._zoom;var d=this._convertPos(x,p),g=(d.x-this._dx)*(m-1),A=(d.y-this._dy)*(m-1);this._dx-=g,this._dy-=A,this._zoom=L,this._needsUpdate=!0}}},dispose:function(){var y=this.zr;y.off("mousedown",this._mouseDownHandler),y.off("mousemove",this._mouseMoveHandler),y.off("mouseup",this._mouseUpHandler),y.off("mousewheel",this._mouseWheelHandler),y.off("globalout",this._mouseUpHandler),y.animation.off("frame",this._update)}});V.a=w},function(re,V,b){"use strict";V.a=`@export ecgl.lines2D.vertex
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
attribute vec2 position: POSITION;
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
#ifdef POSITIONTEXTURE_ENABLED
|
|
|
uniform sampler2D positionTexture;
|
|
|
#endif
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);
|
|
|
|
|
|
v_Color = a_Color;
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.lines2D.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = color * v_Color;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.meshLines2D.vertex
|
|
|
|
|
|
attribute vec2 position: POSITION;
|
|
|
attribute vec2 normal;
|
|
|
attribute float offset;
|
|
|
attribute vec4 a_Color : COLOR;
|
|
|
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
uniform vec4 viewport : VIEWPORT;
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
varying float v_Miter;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 p2 = worldViewProjection * vec4(position + normal, -10.0, 1.0);
|
|
|
gl_Position = worldViewProjection * vec4(position, -10.0, 1.0);
|
|
|
|
|
|
p2.xy /= p2.w;
|
|
|
gl_Position.xy /= gl_Position.w;
|
|
|
|
|
|
vec2 N = normalize(p2.xy - gl_Position.xy);
|
|
|
gl_Position.xy += N * offset / viewport.zw * 2.0;
|
|
|
|
|
|
gl_Position.xy *= gl_Position.w;
|
|
|
|
|
|
v_Color = a_Color;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
|
|
|
@export ecgl.meshLines2D.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
|
|
|
varying vec4 v_Color;
|
|
|
varying float v_Miter;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = color * v_Color;
|
|
|
}
|
|
|
|
|
|
@end`},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(254),y=b(258)},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(3),T=b(20),x=b(255);C.a.extendChartView({type:"flowGL",__ecgl__:!0,init:function(p,m){this.viewGL=new T.a("orthographic"),this.groupGL=new w.a.Node,this.viewGL.add(this.groupGL),this._particleSurface=new x.a;var L=new w.a.Mesh({geometry:new w.a.PlaneGeometry,material:new w.a.Material({shader:new w.a.Shader({vertex:w.a.Shader.source("ecgl.color.vertex"),fragment:w.a.Shader.source("ecgl.color.fragment")}),transparent:!0})});L.material.enableTexture("diffuseMap"),this.groupGL.add(L),this._planeMesh=L},render:function(p,m,L){var d=this._particleSurface;d.setParticleType(p.get("particleType")),d.setSupersampling(p.get("supersampling")),this._updateData(p,L),this._updateCamera(L.getWidth(),L.getHeight(),L.getDevicePixelRatio());var g=y.a.firstNotNull(p.get("particleDensity"),128);d.setParticleDensity(g,g);var A=this._planeMesh,M=+new Date,O=this,S=!0;A.__percent=0,A.stopAnimation(),A.animate("",{loop:!0}).when(1e5,{__percent:1}).during(function(){var f=+new Date,P=Math.min(f-M,20);M=M+P,O._renderer&&(d.update(O._renderer,L,P/1e3,S),A.material.set("diffuseMap",d.getSurfaceTexture())),S=!1}).start();var I=p.getModel("itemStyle"),c=w.a.parseColor(I.get("color"));c[3]*=y.a.firstNotNull(I.get("opacity"),1),A.material.set("color",c),d.setColorTextureImage(p.get("colorTexture"),L),d.setParticleSize(p.get("particleSize")),d.particleSpeedScaling=p.get("particleSpeed"),d.motionBlurFactor=1-Math.pow(.1,p.get("particleTrail"))},updateTransform:function(p,m,L){this._updateData(p,L)},afterRender:function(p,m,L,d){var g=d.renderer;this._renderer=g},_updateData:function(p,m){var L=p.coordinateSystem,d=L.dimensions.map(function(J){return p.coordDimToDataDim(J)[0]}),g=p.getData(),A=g.getDataExtent(d[0]),M=g.getDataExtent(d[1]),O=p.get("gridWidth"),S=p.get("gridHeight");if(O==null||O==="auto"){var I=(A[1]-A[0])/(M[1]-M[0]);O=Math.round(Math.sqrt(I*g.count()))}(S==null||S==="auto")&&(S=Math.ceil(g.count()/O));var c=this._particleSurface.vectorFieldTexture,f=c.pixels;if(!f||f.length!==S*O*4)f=c.pixels=new Float32Array(O*S*4);else for(var P=0;P<f.length;P++)f[P]=0;var N=0,k=1/0,W=new Float32Array(g.count()*2),z=0,Z=[[1/0,1/0],[-1/0,-1/0]];g.each([d[0],d[1],"vx","vy"],function(J,ee,$,ie){var se=L.dataToPoint([J,ee]);W[z++]=se[0],W[z++]=se[1],Z[0][0]=Math.min(se[0],Z[0][0]),Z[0][1]=Math.min(se[1],Z[0][1]),Z[1][0]=Math.max(se[0],Z[1][0]),Z[1][1]=Math.max(se[1],Z[1][1]);var ne=Math.sqrt($*$+ie*ie);N=Math.max(N,ne),k=Math.min(k,ne)}),g.each(["vx","vy"],function(J,ee,$){var ie=Math.round((W[$*2]-Z[0][0])/(Z[1][0]-Z[0][0])*(O-1)),se=S-1-Math.round((W[$*2+1]-Z[0][1])/(Z[1][1]-Z[0][1])*(S-1)),ne=(se*O+ie)*4;f[ne]=J/N*.5+.5,f[ne+1]=ee/N*.5+.5,f[ne+3]=1}),c.width=O,c.height=S,p.get("coordinateSystem")==="bmap"&&this._fillEmptyPixels(c),c.dirty(),this._updatePlanePosition(Z[0],Z[1],p,m),this._updateGradientTexture(g.getVisual("visualMeta"),[k,N])},_fillEmptyPixels:function(p){var m=p.pixels,L=p.width,d=p.height;function g(W,z,Z){W=Math.max(Math.min(W,L-1),0),z=Math.max(Math.min(z,d-1),0);var J=(z*(L-1)+W)*4;return m[J+3]===0?!1:(Z[0]=m[J],Z[1]=m[J+1],!0)}function A(W,z,Z){Z[0]=W[0]+z[0],Z[1]=W[1]+z[1]}for(var M=[],O=[],S=[],I=[],c=[],f=0,P=0;P<d;P++)for(var N=0;N<L;N++){var k=(P*(L-1)+N)*4;m[k+3]===0&&(f=M[0]=M[1]=0,g(N-1,P,O)&&(f++,A(O,M,M)),g(N+1,P,S)&&(f++,A(S,M,M)),g(N,P-1,I)&&(f++,A(I,M,M)),g(N,P+1,c)&&(f++,A(c,M,M)),M[0]/=f,M[1]/=f,m[k]=M[0],m[k+1]=M[1]),m[k+3]=1}},_updateGradientTexture:function(p,m){if(!p||!p.length){this._particleSurface.setGradientTexture(null);return}this._gradientTexture=this._gradientTexture||new w.a.Texture2D({image:document.createElement("canvas")});var L=this._gradientTexture,d=L.image;d.width=200,d.height=1;var g=d.getContext("2d"),A=g.createLinearGradient(0,.5,d.width,.5);p[0].stops.forEach(function(M){var O;m[1]===m[0]?O=0:(O=M.value/m[1],O=Math.min(Math.max(O,0),1)),A.addColorStop(O,M.color)}),g.fillStyle=A,g.fillRect(0,0,d.width,d.height),L.dirty(),this._particleSurface.setGradientTexture(this._gradientTexture)},_updatePlanePosition:function(p,m,L,d){var g=this._limitInViewportAndFullFill(p,m,L,d);p=g.leftTop,m=g.rightBottom,this._particleSurface.setRegion(g.region),this._planeMesh.position.set((p[0]+m[0])/2,d.getHeight()-(p[1]+m[1])/2,0);var A=m[0]-p[0],M=m[1]-p[1];this._planeMesh.scale.set(A/2,M/2,1),this._particleSurface.resize(Math.max(Math.min(A,2048),1),Math.max(Math.min(M,2048),1)),this._renderer&&this._particleSurface.clearFrame(this._renderer)},_limitInViewportAndFullFill:function(p,m,L,d){var g=[Math.max(p[0],0),Math.max(p[1],0)],A=[Math.min(m[0],d.getWidth()),Math.min(m[1],d.getHeight())];if(L.get("coordinateSystem")==="bmap"){var M=L.getData().getDataExtent(L.coordDimToDataDim("lng")[0]),O=Math.floor(M[1]-M[0])>=359;O&&(g[0]>0&&(g[0]=0),A[0]<d.getWidth()&&(A[0]=d.getWidth()))}var S=m[0]-p[0],I=m[1]-p[1],c=A[0]-g[0],f=A[1]-g[1],P=[(g[0]-p[0])/S,1-f/I-(g[1]-p[1])/I,c/S,f/I];return{leftTop:g,rightBottom:A,region:P}},_updateCamera:function(p,m,L){this.viewGL.setViewport(0,0,p,m,L);var d=this.viewGL.camera;d.left=d.bottom=0,d.top=m,d.right=p,d.near=0,d.far=100,d.position.z=10},remove:function(){this._planeMesh.stopAnimation(),this.groupGL.removeAll()},dispose:function(){this._renderer&&this._particleSurface.dispose(this._renderer),this.groupGL.removeAll()}})},function(re,V,b){"use strict";var U=b(14),C=b(13),w=b(24),y=b(17),T=b(7),x=b(5),p=b(6),m=b(30),L=b(37),d=b(10),g=b(256),A=b(257);T.a.import(A.a);function M(S){var I=document.createElement("canvas");I.width=I.height=S;var c=I.getContext("2d");return c.fillStyle="#fff",c.arc(S/2,S/2,S/2,0,Math.PI*2),c.fill(),I}var O=function(){this.motionBlurFactor=.99,this.vectorFieldTexture=new x.a({type:p.a.FLOAT,flipY:!1}),this.particleLife=[5,20],this._particleType="point",this._particleSize=1,this.particleColor=[1,1,1,1],this.particleSpeedScaling=1,this._thisFrameTexture=null,this._particlePass=null,this._spawnTexture=null,this._particleTexture0=null,this._particleTexture1=null,this._particlePointsMesh=null,this._surfaceFrameBuffer=null,this._elapsedTime=0,this._scene=null,this._camera=null,this._lastFrameTexture=null,this._supersampling=1,this._downsampleTextures=[],this._width=512,this._height=512,this.init()};O.prototype={constructor:O,init:function(){var S={type:p.a.FLOAT,minFilter:p.a.NEAREST,magFilter:p.a.NEAREST,useMipmap:!1};this._spawnTexture=new x.a(S),this._particleTexture0=new x.a(S),this._particleTexture1=new x.a(S),this._frameBuffer=new d.a({depthBuffer:!1}),this._particlePass=new U.a({fragment:T.a.source("ecgl.vfParticle.particle.fragment")}),this._particlePass.setUniform("velocityTexture",this.vectorFieldTexture),this._particlePass.setUniform("spawnTexture",this._spawnTexture),this._downsamplePass=new U.a({fragment:T.a.source("clay.compositor.downsample")});var I=new w.a({renderOrder:10,material:new y.a({shader:new T.a(T.a.source("ecgl.vfParticle.renderPoints.vertex"),T.a.source("ecgl.vfParticle.renderPoints.fragment"))}),mode:w.a.POINTS,geometry:new C.a({dynamic:!0,mainAttribute:"texcoord0"})}),c=new w.a({renderOrder:10,material:new y.a({shader:new T.a(T.a.source("ecgl.vfParticle.renderLines.vertex"),T.a.source("ecgl.vfParticle.renderLines.fragment"))}),geometry:new g.a,culling:!1}),f=new w.a({material:new y.a({shader:new T.a(T.a.source("ecgl.color.vertex"),T.a.source("ecgl.color.fragment"))}),geometry:new L.a});f.material.enableTexture("diffuseMap"),this._particlePointsMesh=I,this._particleLinesMesh=c,this._lastFrameFullQuadMesh=f,this._camera=new m.a,this._thisFrameTexture=new x.a,this._lastFrameTexture=new x.a},setParticleDensity:function(S,I){for(var c=S*I,f=new Float32Array(c*4),P=0,N=this.particleLife,k=0;k<S;k++)for(var W=0;W<I;W++,P++){f[P*4]=Math.random(),f[P*4+1]=Math.random(),f[P*4+2]=Math.random();var z=(N[1]-N[0])*Math.random()+N[0];f[P*4+3]=z}this._particleType==="line"?this._setLineGeometry(S,I):this._setPointsGeometry(S,I),this._spawnTexture.width=S,this._spawnTexture.height=I,this._spawnTexture.pixels=f,this._particleTexture0.width=this._particleTexture1.width=S,this._particleTexture0.height=this._particleTexture1.height=I,this._particlePass.setUniform("textureSize",[S,I])},_setPointsGeometry:function(S,I){var c=S*I,f=this._particlePointsMesh.geometry,P=f.attributes;P.texcoord0.init(c);for(var N=0,k=0;k<S;k++)for(var W=0;W<I;W++,N++)P.texcoord0.value[N*2]=k/S,P.texcoord0.value[N*2+1]=W/I;f.dirty()},_setLineGeometry:function(S,I){var c=S*I,f=this._getParticleMesh().geometry;f.setLineCount(c),f.resetOffset();for(var P=0;P<S;P++)for(var N=0;N<I;N++)f.addLine([P/S,N/I]);f.dirty()},_getParticleMesh:function(){return this._particleType==="line"?this._particleLinesMesh:this._particlePointsMesh},update:function(S,I,c,f){var P=this._getParticleMesh(),N=this._frameBuffer,k=this._particlePass;f&&this._updateDownsampleTextures(S,I),P.material.set("size",this._particleSize*this._supersampling),P.material.set("color",this.particleColor),k.setUniform("speedScaling",this.particleSpeedScaling),N.attach(this._particleTexture1),k.setUniform("firstFrameTime",f?(this.particleLife[1]+this.particleLife[0])/2:0),k.setUniform("particleTexture",this._particleTexture0),k.setUniform("deltaTime",c),k.setUniform("elapsedTime",this._elapsedTime),k.render(S,N),P.material.set("particleTexture",this._particleTexture1),P.material.set("prevParticleTexture",this._particleTexture0),N.attach(this._thisFrameTexture),N.bind(S),S.gl.clear(S.gl.DEPTH_BUFFER_BIT|S.gl.COLOR_BUFFER_BIT);var W=this._lastFrameFullQuadMesh;W.material.set("diffuseMap",this._lastFrameTexture),W.material.set("color",[1,1,1,this.motionBlurFactor]),this._camera.update(!0),S.renderPass([W,P],this._camera),N.unbind(S),this._downsample(S),this._swapTexture(),this._elapsedTime+=c},_downsample:function(S){var I=this._downsampleTextures;if(I.length!==0)for(var c=0,f=this._thisFrameTexture,P=I[c];P;)this._frameBuffer.attach(P),this._downsamplePass.setUniform("texture",f),this._downsamplePass.setUniform("textureSize",[f.width,f.height]),this._downsamplePass.render(S,this._frameBuffer),f=P,P=I[++c]},getSurfaceTexture:function(){var S=this._downsampleTextures;return S.length>0?S[S.length-1]:this._lastFrameTexture},setRegion:function(S){this._particlePass.setUniform("region",S)},resize:function(S,I){this._lastFrameTexture.width=S*this._supersampling,this._lastFrameTexture.height=I*this._supersampling,this._thisFrameTexture.width=S*this._supersampling,this._thisFrameTexture.height=I*this._supersampling,this._width=S,this._height=I},setParticleSize:function(S){var I=this._getParticleMesh();if(S<=2){I.material.disableTexture("spriteTexture"),I.material.transparent=!1;return}this._spriteTexture||(this._spriteTexture=new x.a),(!this._spriteTexture.image||this._spriteTexture.image.width!==S)&&(this._spriteTexture.image=M(S),this._spriteTexture.dirty()),I.material.transparent=!0,I.material.enableTexture("spriteTexture"),I.material.set("spriteTexture",this._spriteTexture),this._particleSize=S},setGradientTexture:function(S){var I=this._getParticleMesh().material;I[S?"enableTexture":"disableTexture"]("gradientTexture"),I.setUniform("gradientTexture",S)},setColorTextureImage:function(S,I){var c=this._getParticleMesh().material;c.setTextureImage("colorTexture",S,I,{flipY:!0})},setParticleType:function(S){this._particleType=S},clearFrame:function(S){var I=this._frameBuffer;I.attach(this._lastFrameTexture),I.bind(S),S.gl.clear(S.gl.DEPTH_BUFFER_BIT|S.gl.COLOR_BUFFER_BIT),I.unbind(S)},setSupersampling:function(S){this._supersampling=S,this.resize(this._width,this._height)},_updateDownsampleTextures:function(S,I){for(var c=this._downsampleTextures,f=Math.max(Math.floor(Math.log(this._supersampling/I.getDevicePixelRatio())/Math.log(2)),0),P=2,N=this._width*this._supersampling,k=this._height*this._supersampling,W=0;W<f;W++)c[W]=c[W]||new x.a,c[W].width=N/P,c[W].height=k/P,P*=2;for(;W<c.length;W++)c[W].dispose(S);c.length=f},_swapTexture:function(){var S=this._particleTexture0;this._particleTexture0=this._particleTexture1,this._particleTexture1=S;var S=this._thisFrameTexture;this._thisFrameTexture=this._lastFrameTexture,this._lastFrameTexture=S},dispose:function(S){S.disposeFrameBuffer(this._frameBuffer),S.disposeTexture(this.vectorFieldTexture),S.disposeTexture(this._spawnTexture),S.disposeTexture(this._particleTexture0),S.disposeTexture(this._particleTexture1),S.disposeTexture(this._thisFrameTexture),S.disposeTexture(this._lastFrameTexture),S.disposeGeometry(this._particleLinesMesh.geometry),S.disposeGeometry(this._particlePointsMesh.geometry),S.disposeGeometry(this._lastFrameFullQuadMesh.geometry),this._spriteTexture&&S.disposeTexture(this._spriteTexture),this._particlePass.dispose(S),this._downsamplePass.dispose(S),this._downsampleTextures.forEach(function(I){I.dispose(S)})}},V.a=O},function(re,V,b){"use strict";var U=b(13),C=b(0),w=b.n(C),y=U.a.extend(function(){return{dynamic:!0,attributes:{position:new U.a.Attribute("position","float",3,"POSITION")}}},{resetOffset:function(){this._vertexOffset=0,this._faceOffset=0},setLineCount:function(T){var x=this.attributes,p=4*T,m=2*T;this.vertexCount!==p&&x.position.init(p),this.triangleCount!==m&&(m===0?this.indices=null:this.indices=this.vertexCount>65535?new Uint32Array(m*3):new Uint16Array(m*3))},addLine:function(T){var x=this._vertexOffset;this.attributes.position.set(x,[T[0],T[1],1]),this.attributes.position.set(x+1,[T[0],T[1],-1]),this.attributes.position.set(x+2,[T[0],T[1],2]),this.attributes.position.set(x+3,[T[0],T[1],-2]),this.setTriangleIndices(this._faceOffset++,[x,x+1,x+2]),this.setTriangleIndices(this._faceOffset++,[x+1,x+2,x+3]),this._vertexOffset+=4}});V.a=y},function(re,V,b){"use strict";V.a=`@export ecgl.vfParticle.particle.fragment
|
|
|
|
|
|
uniform sampler2D particleTexture;
|
|
|
uniform sampler2D spawnTexture;
|
|
|
uniform sampler2D velocityTexture;
|
|
|
|
|
|
uniform float deltaTime;
|
|
|
uniform float elapsedTime;
|
|
|
|
|
|
uniform float speedScaling : 1.0;
|
|
|
|
|
|
uniform vec2 textureSize;
|
|
|
uniform vec4 region : [0, 0, 1, 1];
|
|
|
uniform float firstFrameTime;
|
|
|
|
|
|
varying vec2 v_Texcoord;
|
|
|
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 p = texture2D(particleTexture, v_Texcoord);
|
|
|
bool spawn = false;
|
|
|
if (p.w <= 0.0) {
|
|
|
p = texture2D(spawnTexture, fract(v_Texcoord + elapsedTime / 10.0));
|
|
|
p.w -= firstFrameTime;
|
|
|
spawn = true;
|
|
|
}
|
|
|
vec2 v = texture2D(velocityTexture, fract(p.xy * region.zw + region.xy)).xy;
|
|
|
v = (v - 0.5) * 2.0;
|
|
|
p.z = length(v);
|
|
|
p.xy += v * deltaTime / 10.0 * speedScaling;
|
|
|
p.w -= deltaTime;
|
|
|
|
|
|
if (spawn || p.xy != fract(p.xy)) {
|
|
|
p.z = 0.0;
|
|
|
}
|
|
|
p.xy = fract(p.xy);
|
|
|
|
|
|
gl_FragColor = p;
|
|
|
}
|
|
|
@end
|
|
|
|
|
|
@export ecgl.vfParticle.renderPoints.vertex
|
|
|
|
|
|
#define PI 3.1415926
|
|
|
|
|
|
attribute vec2 texcoord : TEXCOORD_0;
|
|
|
|
|
|
uniform sampler2D particleTexture;
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
uniform float size : 1.0;
|
|
|
|
|
|
varying float v_Mag;
|
|
|
varying vec2 v_Uv;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 p = texture2D(particleTexture, texcoord);
|
|
|
|
|
|
if (p.w > 0.0 && p.z > 1e-5) {
|
|
|
gl_Position = worldViewProjection * vec4(p.xy * 2.0 - 1.0, 0.0, 1.0);
|
|
|
}
|
|
|
else {
|
|
|
gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);
|
|
|
}
|
|
|
|
|
|
v_Mag = p.z;
|
|
|
v_Uv = p.xy;
|
|
|
|
|
|
gl_PointSize = size;
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.vfParticle.renderPoints.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
uniform sampler2D gradientTexture;
|
|
|
uniform sampler2D colorTexture;
|
|
|
uniform sampler2D spriteTexture;
|
|
|
|
|
|
varying float v_Mag;
|
|
|
varying vec2 v_Uv;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = color;
|
|
|
#ifdef SPRITETEXTURE_ENABLED
|
|
|
gl_FragColor *= texture2D(spriteTexture, gl_PointCoord);
|
|
|
if (color.a == 0.0) {
|
|
|
discard;
|
|
|
}
|
|
|
#endif
|
|
|
#ifdef GRADIENTTEXTURE_ENABLED
|
|
|
gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));
|
|
|
#endif
|
|
|
#ifdef COLORTEXTURE_ENABLED
|
|
|
gl_FragColor *= texture2D(colorTexture, v_Uv);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.vfParticle.renderLines.vertex
|
|
|
|
|
|
#define PI 3.1415926
|
|
|
|
|
|
attribute vec3 position : POSITION;
|
|
|
|
|
|
uniform sampler2D particleTexture;
|
|
|
uniform sampler2D prevParticleTexture;
|
|
|
|
|
|
uniform float size : 1.0;
|
|
|
uniform vec4 vp: VIEWPORT;
|
|
|
uniform mat4 worldViewProjection : WORLDVIEWPROJECTION;
|
|
|
|
|
|
varying float v_Mag;
|
|
|
varying vec2 v_Uv;
|
|
|
|
|
|
@import clay.util.rand
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
vec4 p = texture2D(particleTexture, position.xy);
|
|
|
vec4 p2 = texture2D(prevParticleTexture, position.xy);
|
|
|
|
|
|
p.xy = p.xy * 2.0 - 1.0;
|
|
|
p2.xy = p2.xy * 2.0 - 1.0;
|
|
|
|
|
|
if (p.w > 0.0 && p.z > 1e-5) {
|
|
|
vec2 dir = normalize(p.xy - p2.xy);
|
|
|
vec2 norm = vec2(dir.y / vp.z, -dir.x / vp.w) * sign(position.z) * size;
|
|
|
if (abs(position.z) == 2.0) {
|
|
|
gl_Position = vec4(p.xy + norm, 0.0, 1.0);
|
|
|
v_Uv = p.xy;
|
|
|
v_Mag = p.z;
|
|
|
}
|
|
|
else {
|
|
|
gl_Position = vec4(p2.xy + norm, 0.0, 1.0);
|
|
|
v_Mag = p2.z;
|
|
|
v_Uv = p2.xy;
|
|
|
}
|
|
|
gl_Position = worldViewProjection * gl_Position;
|
|
|
}
|
|
|
else {
|
|
|
gl_Position = vec4(100000.0, 100000.0, 100000.0, 1.0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
|
|
|
@export ecgl.vfParticle.renderLines.fragment
|
|
|
|
|
|
uniform vec4 color : [1.0, 1.0, 1.0, 1.0];
|
|
|
uniform sampler2D gradientTexture;
|
|
|
uniform sampler2D colorTexture;
|
|
|
|
|
|
varying float v_Mag;
|
|
|
varying vec2 v_Uv;
|
|
|
|
|
|
void main()
|
|
|
{
|
|
|
gl_FragColor = color;
|
|
|
#ifdef GRADIENTTEXTURE_ENABLED
|
|
|
gl_FragColor *= texture2D(gradientTexture, vec2(v_Mag, 0.5));
|
|
|
#endif
|
|
|
#ifdef COLORTEXTURE_ENABLED
|
|
|
gl_FragColor *= texture2D(colorTexture, v_Uv);
|
|
|
#endif
|
|
|
}
|
|
|
|
|
|
@end
|
|
|
`},function(re,V,b){"use strict";var U=b(0),C=b.n(U);C.a.extendSeriesModel({type:"series.flowGL",dependencies:["geo","grid","bmap"],visualColorAccessPath:"itemStyle.color",getInitialData:function(w,y){var T=C.a.getCoordinateSystemDimensions(this.get("coordinateSystem"))||["x","y"];if(T.length>2)throw new Error("flowGL can only be used on 2d coordinate systems.");T.push("vx","vy");var x=C.a.helper.completeDimensions(T,this.getSource(),{encodeDef:this.get("encode"),dimsDef:this.get("dimensions")}),p=new C.a.List(x,this);return p.initData(this.getSource()),p},defaultOption:{coordinateSystem:"cartesian2d",zlevel:10,supersampling:1,particleType:"point",particleDensity:128,particleSize:1,particleSpeed:1,particleTrail:2,colorTexture:null,gridWidth:"auto",gridHeight:"auto",itemStyle:{color:"#fff",opacity:.8}}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(260),y=b(261),T=b(16);C.a.registerVisual(Object(T.a)("linesGL"))},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(12),y=b.n(w),T=C.a.extendSeriesModel({type:"series.linesGL",dependencies:["grid","geo"],visualColorAccessPath:"lineStyle.color",streamEnabled:!0,init:function(x){var p=this._processFlatCoordsArray(x.data);this._flatCoords=p.flatCoords,this._flatCoordsOffset=p.flatCoordsOffset,p.flatCoords&&(x.data=new Float32Array(p.count)),T.superApply(this,"init",arguments)},mergeOption:function(x){var p=this._processFlatCoordsArray(x.data);this._flatCoords=p.flatCoords,this._flatCoordsOffset=p.flatCoordsOffset,p.flatCoords&&(x.data=new Float32Array(p.count)),T.superApply(this,"mergeOption",arguments)},appendData:function(x){var p=this._processFlatCoordsArray(x.data);p.flatCoords&&(this._flatCoords?(this._flatCoords=Object(w.concatArray)(this._flatCoords,p.flatCoords),this._flatCoordsOffset=Object(w.concatArray)(this._flatCoordsOffset,p.flatCoordsOffset)):(this._flatCoords=p.flatCoords,this._flatCoordsOffset=p.flatCoordsOffset),x.data=new Float32Array(p.count)),this.getRawData().appendData(x.data)},_getCoordsFromItemModel:function(x){var p=this.getData().getItemModel(x),m=p.option instanceof Array?p.option:p.getShallow("coords");if(!(m instanceof Array&&m.length>0&&m[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(m)+". Lines must have 2d coords array in data item.");return m},getLineCoordsCount:function(x){return this._flatCoordsOffset?this._flatCoordsOffset[x*2+1]:this._getCoordsFromItemModel(x).length},getLineCoords:function(x,p){if(this._flatCoordsOffset){for(var m=this._flatCoordsOffset[x*2],L=this._flatCoordsOffset[x*2+1],d=0;d<L;d++)p[d]=p[d]||[],p[d][0]=this._flatCoords[m+d*2],p[d][1]=this._flatCoords[m+d*2+1];return L}else{for(var g=this._getCoordsFromItemModel(x),d=0;d<g.length;d++)p[d]=p[d]||[],p[d][0]=g[d][0],p[d][1]=g[d][1];return g.length}},_processFlatCoordsArray:function(x){var p=0;if(this._flatCoords&&(p=this._flatCoords.length),typeof x[0]=="number"){for(var m=x.length,L=new Uint32Array(m),d=new Float64Array(m),g=0,A=0,M=0,O=0;O<m;){M++;var S=x[O++];L[A++]=g+p,L[A++]=S;for(var I=0;I<S;I++){var c=x[O++],f=x[O++];if(d[g++]=c,d[g++]=f,O>m)throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(L.buffer,0,A),flatCoords:d,count:M}}return{flatCoordsOffset:null,flatCoords:null,count:x.length}},getInitialData:function(x,p){var m=new C.a.List(["value"],this);return m.hasItemOption=!1,m.initData(x.data,[],function(L,d,g,A){if(L instanceof Array)return NaN;m.hasItemOption=!0;var M=L.value;if(M!=null)return M instanceof Array?M[A]:M}),m},defaultOption:{coordinateSystem:"geo",zlevel:10,progressive:1e4,progressiveThreshold:5e4,blendMode:"source-over",lineStyle:{opacity:.8},postEffect:{enable:!1,colorCorrection:{exposure:0,brightness:0,contrast:1,saturation:1,enable:!0}}}})},function(re,V,b){"use strict";var U=b(0),C=b.n(U),w=b(2),y=b(20),T=b(86),x=b(84),p=b(3);C.a.extendChartView({type:"linesGL",__ecgl__:!0,init:function(m,L){this.groupGL=new w.a.Node,this.viewGL=new y.a("orthographic"),this.viewGL.add(this.groupGL),this._glViewHelper=new x.a(this.viewGL),this._nativeLinesShader=w.a.createShader("ecgl.lines3D"),this._meshLinesShader=w.a.createShader("ecgl.meshLines3D"),this._linesMeshes=[],this._currentStep=0},render:function(m,L,d){this.groupGL.removeAll(),this._glViewHelper.reset(m,d);var g=this._linesMeshes[0];g||(g=this._linesMeshes[0]=this._createLinesMesh(m)),this._linesMeshes.length=1,this.groupGL.add(g),this._updateLinesMesh(m,g,0,m.getData().count()),this.viewGL.setPostEffect(m.getModel("postEffect"),d)},incrementalPrepareRender:function(m,L,d){this.groupGL.removeAll(),this._glViewHelper.reset(m,d),this._currentStep=0,this.viewGL.setPostEffect(m.getModel("postEffect"),d)},incrementalRender:function(m,L,d,g){var A=this._linesMeshes[this._currentStep];A||(A=this._createLinesMesh(L),this._linesMeshes[this._currentStep]=A),this._updateLinesMesh(L,A,m.start,m.end),this.groupGL.add(A),g.getZr().refresh(),this._currentStep++},updateTransform:function(m,L,d){m.coordinateSystem.getRoamTransform&&this._glViewHelper.updateTransform(m,d)},_createLinesMesh:function(m){var L=new w.a.Mesh({$ignorePicking:!0,material:new w.a.Material({shader:w.a.createShader("ecgl.lines3D"),transparent:!0,depthMask:!1,depthTest:!1}),geometry:new T.a({segmentScale:10,useNativeLine:!0,dynamic:!1}),mode:w.a.Mesh.LINES,culling:!1});return L},_updateLinesMesh:function(m,L,d,g){var A=m.getData();L.material.blend=m.get("blendMode")==="lighter"?w.a.additiveBlend:null;var M=m.get("lineStyle.curveness")||0,O=m.get("polyline"),S=L.geometry,I=m.coordinateSystem,c=p.a.firstNotNull(m.get("lineStyle.width"),1);c>1?(L.material.shader!==this._meshLinesShader&&L.material.attachShader(this._meshLinesShader),L.mode=w.a.Mesh.TRIANGLES):(L.material.shader!==this._nativeLinesShader&&L.material.attachShader(this._nativeLinesShader),L.mode=w.a.Mesh.LINES),d=d||0,g=g||A.count(),S.resetOffset();var f=0,P=0,N=[],k=[],W=[],z=[],Z=[],J=.3,ee=.7;function $(){k[0]=N[0]*ee+z[0]*J-(N[1]-z[1])*M,k[1]=N[1]*ee+z[1]*J-(z[0]-N[0])*M,W[0]=N[0]*J+z[0]*ee-(N[1]-z[1])*M,W[1]=N[1]*J+z[1]*ee-(z[0]-N[0])*M}if(O||M!==0)for(var ie=d;ie<g;ie++)if(O){var se=m.getLineCoordsCount(ie);f+=S.getPolylineVertexCount(se),P+=S.getPolylineTriangleCount(se)}else m.getLineCoords(ie,Z),this._glViewHelper.dataToPoint(I,Z[0],N),this._glViewHelper.dataToPoint(I,Z[1],z),$(),f+=S.getCubicCurveVertexCount(N,k,W,z),P+=S.getCubicCurveTriangleCount(N,k,W,z);else{var ne=g-d;f+=ne*S.getLineVertexCount(),P+=ne*S.getLineVertexCount()}S.setVertexCount(f),S.setTriangleCount(P);for(var ce=d,ae=[],ie=d;ie<g;ie++){w.a.parseColor(A.getItemVisual(ce,"color"),ae);var fe=p.a.firstNotNull(A.getItemVisual(ce,"opacity"),1);ae[3]*=fe;for(var se=m.getLineCoords(ie,Z),oe=0;oe<se;oe++)this._glViewHelper.dataToPoint(I,Z[oe],Z[oe]);O?S.addPolyline(Z,ae,c,0,se):M!==0?(N=Z[0],z=Z[1],$(),S.addCubicCurve(N,k,W,z,ae,c)):S.addPolyline(Z,ae,c,0,2),ce++}},dispose:function(){this.groupGL.removeAll()},remove:function(){this.groupGL.removeAll()}})}])})},3867:function(Se,Ce,Y){var X=Y(97671);(function(re,V){Se.exports=V()})(this,function(){"use strict";function re(Pe){var ke=typeof Pe;return Pe!==null&&(ke==="object"||ke==="function")}function V(Pe){return typeof Pe=="function"}var b=void 0;Array.isArray?b=Array.isArray:b=function(Pe){return Object.prototype.toString.call(Pe)==="[object Array]"};var U=b,C=0,w=void 0,y=void 0,T=function(ke,Ze){f[C]=ke,f[C+1]=Ze,C+=2,C===2&&(y?y(P):k())};function x(Pe){y=Pe}function p(Pe){T=Pe}var m=typeof window!="undefined"?window:void 0,L=m||{},d=L.MutationObserver||L.WebKitMutationObserver,g=typeof self=="undefined"&&typeof X!="undefined"&&{}.toString.call(X)==="[object process]",A=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function M(){return function(){return X.nextTick(P)}}function O(){return typeof w!="undefined"?function(){w(P)}:c()}function S(){var Pe=0,ke=new d(P),Ze=document.createTextNode("");return ke.observe(Ze,{characterData:!0}),function(){Ze.data=Pe=++Pe%2}}function I(){var Pe=new MessageChannel;return Pe.port1.onmessage=P,function(){return Pe.port2.postMessage(0)}}function c(){var Pe=setTimeout;return function(){return Pe(P,1)}}var f=new Array(1e3);function P(){for(var Pe=0;Pe<C;Pe+=2){var ke=f[Pe],Ze=f[Pe+1];ke(Ze),f[Pe]=void 0,f[Pe+1]=void 0}C=0}function N(){try{var Pe=Function("return this")().require("vertx");return w=Pe.runOnLoop||Pe.runOnContext,O()}catch(ke){return c()}}var k=void 0;g?k=M():d?k=S():A?k=I():m===void 0?k=N():k=c();function W(Pe,ke){var Ze=this,Ie=new this.constructor(J);Ie[Z]===void 0&&vt(Ie);var Ye=Ze._state;if(Ye){var qe=arguments[Ye-1];T(function(){return Ue(Ye,Ie,qe,Ze._result)})}else Ae(Ze,Ie,Pe,ke);return Ie}function z(Pe){var ke=this;if(Pe&&typeof Pe=="object"&&Pe.constructor===ke)return Pe;var Ze=new ke(J);return pe(Ze,Pe),Ze}var Z=Math.random().toString(36).substring(2);function J(){}var ee=void 0,$=1,ie=2;function se(){return new TypeError("You cannot resolve a promise with itself")}function ne(){return new TypeError("A promises callback cannot return that same promise.")}function ce(Pe,ke,Ze,Ie){try{Pe.call(ke,Ze,Ie)}catch(Ye){return Ye}}function ae(Pe,ke,Ze){T(function(Ie){var Ye=!1,qe=ce(Ze,ke,function(ot){Ye||(Ye=!0,ke!==ot?pe(Ie,ot):de(Ie,ot))},function(ot){Ye||(Ye=!0,be(Ie,ot))},"Settle: "+(Ie._label||" unknown promise"));!Ye&&qe&&(Ye=!0,be(Ie,qe))},Pe)}function fe(Pe,ke){ke._state===$?de(Pe,ke._result):ke._state===ie?be(Pe,ke._result):Ae(ke,void 0,function(Ze){return pe(Pe,Ze)},function(Ze){return be(Pe,Ze)})}function oe(Pe,ke,Ze){ke.constructor===Pe.constructor&&Ze===W&&ke.constructor.resolve===z?fe(Pe,ke):Ze===void 0?de(Pe,ke):V(Ze)?ae(Pe,ke,Ze):de(Pe,ke)}function pe(Pe,ke){if(Pe===ke)be(Pe,se());else if(re(ke)){var Ze=void 0;try{Ze=ke.then}catch(Ie){be(Pe,Ie);return}oe(Pe,ke,Ze)}else de(Pe,ke)}function _e(Pe){Pe._onerror&&Pe._onerror(Pe._result),Fe(Pe)}function de(Pe,ke){Pe._state===ee&&(Pe._result=ke,Pe._state=$,Pe._subscribers.length!==0&&T(Fe,Pe))}function be(Pe,ke){Pe._state===ee&&(Pe._state=ie,Pe._result=ke,T(_e,Pe))}function Ae(Pe,ke,Ze,Ie){var Ye=Pe._subscribers,qe=Ye.length;Pe._onerror=null,Ye[qe]=ke,Ye[qe+$]=Ze,Ye[qe+ie]=Ie,qe===0&&Pe._state&&T(Fe,Pe)}function Fe(Pe){var ke=Pe._subscribers,Ze=Pe._state;if(ke.length!==0){for(var Ie=void 0,Ye=void 0,qe=Pe._result,ot=0;ot<ke.length;ot+=3)Ie=ke[ot],Ye=ke[ot+Ze],Ie?Ue(Ze,Ie,Ye,qe):Ye(qe);Pe._subscribers.length=0}}function Ue(Pe,ke,Ze,Ie){var Ye=V(Ze),qe=void 0,ot=void 0,gt=!0;if(Ye){try{qe=Ze(Ie)}catch(pt){gt=!1,ot=pt}if(ke===qe){be(ke,ne());return}}else qe=Ie;ke._state!==ee||(Ye&>?pe(ke,qe):gt===!1?be(ke,ot):Pe===$?de(ke,qe):Pe===ie&&be(ke,qe))}function it(Pe,ke){try{ke(function(Ie){pe(Pe,Ie)},function(Ie){be(Pe,Ie)})}catch(Ze){be(Pe,Ze)}}var tt=0;function et(){return tt++}function vt(Pe){Pe[Z]=tt++,Pe._state=void 0,Pe._result=void 0,Pe._subscribers=[]}function dt(){return new Error("Array Methods must be provided an Array")}var je=function(){function Pe(ke,Ze){this._instanceConstructor=ke,this.promise=new ke(J),this.promise[Z]||vt(this.promise),U(Ze)?(this.length=Ze.length,this._remaining=Ze.length,this._result=new Array(this.length),this.length===0?de(this.promise,this._result):(this.length=this.length||0,this._enumerate(Ze),this._remaining===0&&de(this.promise,this._result))):be(this.promise,dt())}return Pe.prototype._enumerate=function(Ze){for(var Ie=0;this._state===ee&&Ie<Ze.length;Ie++)this._eachEntry(Ze[Ie],Ie)},Pe.prototype._eachEntry=function(Ze,Ie){var Ye=this._instanceConstructor,qe=Ye.resolve;if(qe===z){var ot=void 0,gt=void 0,pt=!1;try{ot=Ze.then}catch(Tt){pt=!0,gt=Tt}if(ot===W&&Ze._state!==ee)this._settledAt(Ze._state,Ie,Ze._result);else if(typeof ot!="function")this._remaining--,this._result[Ie]=Ze;else if(Ye===Re){var Lt=new Ye(J);pt?be(Lt,gt):oe(Lt,Ze,ot),this._willSettleAt(Lt,Ie)}else this._willSettleAt(new Ye(function(Tt){return Tt(Ze)}),Ie)}else this._willSettleAt(qe(Ze),Ie)},Pe.prototype._settledAt=function(Ze,Ie,Ye){var qe=this.promise;qe._state===ee&&(this._remaining--,Ze===ie?be(qe,Ye):this._result[Ie]=Ye),this._remaining===0&&de(qe,this._result)},Pe.prototype._willSettleAt=function(Ze,Ie){var Ye=this;Ae(Ze,void 0,function(qe){return Ye._settledAt($,Ie,qe)},function(qe){return Ye._settledAt(ie,Ie,qe)})},Pe}();function nt(Pe){return new je(this,Pe).promise}function rt(Pe){var ke=this;return U(Pe)?new ke(function(Ze,Ie){for(var Ye=Pe.length,qe=0;qe<Ye;qe++)ke.resolve(Pe[qe]).then(Ze,Ie)}):new ke(function(Ze,Ie){return Ie(new TypeError("You must pass an array to race."))})}function ft(Pe){var ke=this,Ze=new ke(J);return be(Ze,Pe),Ze}function lt(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function wt(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var Re=function(){function Pe(ke){this[Z]=et(),this._result=this._state=void 0,this._subscribers=[],J!==ke&&(typeof ke!="function"&<(),this instanceof Pe?it(this,ke):wt())}return Pe.prototype.catch=function(Ze){return this.then(null,Ze)},Pe.prototype.finally=function(Ze){var Ie=this,Ye=Ie.constructor;return V(Ze)?Ie.then(function(qe){return Ye.resolve(Ze()).then(function(){return qe})},function(qe){return Ye.resolve(Ze()).then(function(){throw qe})}):Ie.then(Ze,Ze)},Pe}();Re.prototype.then=W,Re.all=nt,Re.race=rt,Re.resolve=z,Re.reject=ft,Re._setScheduler=x,Re._setAsap=p,Re._asap=T;function We(){var Pe=void 0;if(typeof Y.g!="undefined")Pe=Y.g;else if(typeof self!="undefined")Pe=self;else try{Pe=Function("return this")()}catch(Ie){throw new Error("polyfill failed because global object is unavailable in this environment")}var ke=Pe.Promise;if(ke){var Ze=null;try{Ze=Object.prototype.toString.call(ke.resolve())}catch(Ie){}if(Ze==="[object Promise]"&&!ke.cast)return}Pe.Promise=Re}return Re.polyfill=We,Re.Promise=Re,Re})},37271:function(Se){"use strict";var Ce=Object.prototype.hasOwnProperty,Y="~";function X(){}Object.create&&(X.prototype=Object.create(null),new X().__proto__||(Y=!1));function re(C,w,y){this.fn=C,this.context=w,this.once=y||!1}function V(C,w,y,T,x){if(typeof y!="function")throw new TypeError("The listener must be a function");var p=new re(y,T||C,x),m=Y?Y+w:w;return C._events[m]?C._events[m].fn?C._events[m]=[C._events[m],p]:C._events[m].push(p):(C._events[m]=p,C._eventsCount++),C}function b(C,w){--C._eventsCount===0?C._events=new X:delete C._events[w]}function U(){this._events=new X,this._eventsCount=0}U.prototype.eventNames=function(){var w=[],y,T;if(this._eventsCount===0)return w;for(T in y=this._events)Ce.call(y,T)&&w.push(Y?T.slice(1):T);return Object.getOwnPropertySymbols?w.concat(Object.getOwnPropertySymbols(y)):w},U.prototype.listeners=function(w){var y=Y?Y+w:w,T=this._events[y];if(!T)return[];if(T.fn)return[T.fn];for(var x=0,p=T.length,m=new Array(p);x<p;x++)m[x]=T[x].fn;return m},U.prototype.listenerCount=function(w){var y=Y?Y+w:w,T=this._events[y];return T?T.fn?1:T.length:0},U.prototype.emit=function(w,y,T,x,p,m){var L=Y?Y+w:w;if(!this._events[L])return!1;var d=this._events[L],g=arguments.length,A,M;if(d.fn){switch(d.once&&this.removeListener(w,d.fn,void 0,!0),g){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,y),!0;case 3:return d.fn.call(d.context,y,T),!0;case 4:return d.fn.call(d.context,y,T,x),!0;case 5:return d.fn.call(d.context,y,T,x,p),!0;case 6:return d.fn.call(d.context,y,T,x,p,m),!0}for(M=1,A=new Array(g-1);M<g;M++)A[M-1]=arguments[M];d.fn.apply(d.context,A)}else{var O=d.length,S;for(M=0;M<O;M++)switch(d[M].once&&this.removeListener(w,d[M].fn,void 0,!0),g){case 1:d[M].fn.call(d[M].context);break;case 2:d[M].fn.call(d[M].context,y);break;case 3:d[M].fn.call(d[M].context,y,T);break;case 4:d[M].fn.call(d[M].context,y,T,x);break;default:if(!A)for(S=1,A=new Array(g-1);S<g;S++)A[S-1]=arguments[S];d[M].fn.apply(d[M].context,A)}}return!0},U.prototype.on=function(w,y,T){return V(this,w,y,T,!1)},U.prototype.once=function(w,y,T){return V(this,w,y,T,!0)},U.prototype.removeListener=function(w,y,T,x){var p=Y?Y+w:w;if(!this._events[p])return this;if(!y)return b(this,p),this;var m=this._events[p];if(m.fn)m.fn===y&&(!x||m.once)&&(!T||m.context===T)&&b(this,p);else{for(var L=0,d=[],g=m.length;L<g;L++)(m[L].fn!==y||x&&!m[L].once||T&&m[L].context!==T)&&d.push(m[L]);d.length?this._events[p]=d.length===1?d[0]:d:b(this,p)}return this},U.prototype.removeAllListeners=function(w){var y;return w?(y=Y?Y+w:w,this._events[y]&&b(this,y)):(this._events=new X,this._eventsCount=0),this},U.prototype.off=U.prototype.removeListener,U.prototype.addListener=U.prototype.on,U.prefixed=Y,U.EventEmitter=U,Se.exports=U},86204:function(Se){"use strict";var Ce=typeof Reflect=="object"?Reflect:null,Y=Ce&&typeof Ce.apply=="function"?Ce.apply:function(I,c,f){return Function.prototype.apply.call(I,c,f)},X;Ce&&typeof Ce.ownKeys=="function"?X=Ce.ownKeys:Object.getOwnPropertySymbols?X=function(I){return Object.getOwnPropertyNames(I).concat(Object.getOwnPropertySymbols(I))}:X=function(I){return Object.getOwnPropertyNames(I)};function re(S){console&&console.warn&&console.warn(S)}var V=Number.isNaN||function(I){return I!==I};function b(){b.init.call(this)}Se.exports=b,Se.exports.once=A,b.EventEmitter=b,b.prototype._events=void 0,b.prototype._eventsCount=0,b.prototype._maxListeners=void 0;var U=10;function C(S){if(typeof S!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof S)}Object.defineProperty(b,"defaultMaxListeners",{enumerable:!0,get:function(){return U},set:function(S){if(typeof S!="number"||S<0||V(S))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+S+".");U=S}}),b.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},b.prototype.setMaxListeners=function(I){if(typeof I!="number"||I<0||V(I))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+I+".");return this._maxListeners=I,this};function w(S){return S._maxListeners===void 0?b.defaultMaxListeners:S._maxListeners}b.prototype.getMaxListeners=function(){return w(this)},b.prototype.emit=function(I){for(var c=[],f=1;f<arguments.length;f++)c.push(arguments[f]);var P=I==="error",N=this._events;if(N!==void 0)P=P&&N.error===void 0;else if(!P)return!1;if(P){var k;if(c.length>0&&(k=c[0]),k instanceof Error)throw k;var W=new Error("Unhandled error."+(k?" ("+k.message+")":""));throw W.context=k,W}var z=N[I];if(z===void 0)return!1;if(typeof z=="function")Y(z,this,c);else for(var Z=z.length,J=L(z,Z),f=0;f<Z;++f)Y(J[f],this,c);return!0};function y(S,I,c,f){var P,N,k;if(C(c),N=S._events,N===void 0?(N=S._events=Object.create(null),S._eventsCount=0):(N.newListener!==void 0&&(S.emit("newListener",I,c.listener?c.listener:c),N=S._events),k=N[I]),k===void 0)k=N[I]=c,++S._eventsCount;else if(typeof k=="function"?k=N[I]=f?[c,k]:[k,c]:f?k.unshift(c):k.push(c),P=w(S),P>0&&k.length>P&&!k.warned){k.warned=!0;var W=new Error("Possible EventEmitter memory leak detected. "+k.length+" "+String(I)+" listeners added. Use emitter.setMaxListeners() to increase limit");W.name="MaxListenersExceededWarning",W.emitter=S,W.type=I,W.count=k.length,re(W)}return S}b.prototype.addListener=function(I,c){return y(this,I,c,!1)},b.prototype.on=b.prototype.addListener,b.prototype.prependListener=function(I,c){return y(this,I,c,!0)};function T(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function x(S,I,c){var f={fired:!1,wrapFn:void 0,target:S,type:I,listener:c},P=T.bind(f);return P.listener=c,f.wrapFn=P,P}b.prototype.once=function(I,c){return C(c),this.on(I,x(this,I,c)),this},b.prototype.prependOnceListener=function(I,c){return C(c),this.prependListener(I,x(this,I,c)),this},b.prototype.removeListener=function(I,c){var f,P,N,k,W;if(C(c),P=this._events,P===void 0)return this;if(f=P[I],f===void 0)return this;if(f===c||f.listener===c)--this._eventsCount===0?this._events=Object.create(null):(delete P[I],P.removeListener&&this.emit("removeListener",I,f.listener||c));else if(typeof f!="function"){for(N=-1,k=f.length-1;k>=0;k--)if(f[k]===c||f[k].listener===c){W=f[k].listener,N=k;break}if(N<0)return this;N===0?f.shift():d(f,N),f.length===1&&(P[I]=f[0]),P.removeListener!==void 0&&this.emit("removeListener",I,W||c)}return this},b.prototype.off=b.prototype.removeListener,b.prototype.removeAllListeners=function(I){var c,f,P;if(f=this._events,f===void 0)return this;if(f.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):f[I]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete f[I]),this;if(arguments.length===0){var N=Object.keys(f),k;for(P=0;P<N.length;++P)k=N[P],k!=="removeListener"&&this.removeAllListeners(k);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(c=f[I],typeof c=="function")this.removeListener(I,c);else if(c!==void 0)for(P=c.length-1;P>=0;P--)this.removeListener(I,c[P]);return this};function p(S,I,c){var f=S._events;if(f===void 0)return[];var P=f[I];return P===void 0?[]:typeof P=="function"?c?[P.listener||P]:[P]:c?g(P):L(P,P.length)}b.prototype.listeners=function(I){return p(this,I,!0)},b.prototype.rawListeners=function(I){return p(this,I,!1)},b.listenerCount=function(S,I){return typeof S.listenerCount=="function"?S.listenerCount(I):m.call(S,I)},b.prototype.listenerCount=m;function m(S){var I=this._events;if(I!==void 0){var c=I[S];if(typeof c=="function")return 1;if(c!==void 0)return c.length}return 0}b.prototype.eventNames=function(){return this._eventsCount>0?X(this._events):[]};function L(S,I){for(var c=new Array(I),f=0;f<I;++f)c[f]=S[f];return c}function d(S,I){for(;I+1<S.length;I++)S[I]=S[I+1];S.pop()}function g(S){for(var I=new Array(S.length),c=0;c<I.length;++c)I[c]=S[c].listener||S[c];return I}function A(S,I){return new Promise(function(c,f){function P(k){S.removeListener(I,N),f(k)}function N(){typeof S.removeListener=="function"&&S.removeListener("error",P),c([].slice.call(arguments))}O(S,I,N,{once:!0}),I!=="error"&&M(S,P,{once:!0})})}function M(S,I,c){typeof S.on=="function"&&O(S,"error",I,c)}function O(S,I,c,f){if(typeof S.on=="function")f.once?S.once(I,c):S.on(I,c);else if(typeof S.addEventListener=="function")S.addEventListener(I,function P(N){f.once&&S.removeEventListener(I,P),c(N)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof S)}},53291:function(Se){"use strict";var Ce=Array.isArray,Y=Object.keys,X=Object.prototype.hasOwnProperty;Se.exports=function re(V,b){if(V===b)return!0;if(V&&b&&typeof V=="object"&&typeof b=="object"){var U=Ce(V),C=Ce(b),w,y,T;if(U&&C){if(y=V.length,y!=b.length)return!1;for(w=y;w--!==0;)if(!re(V[w],b[w]))return!1;return!0}if(U!=C)return!1;var x=V instanceof Date,p=b instanceof Date;if(x!=p)return!1;if(x&&p)return V.getTime()==b.getTime();var m=V instanceof RegExp,L=b instanceof RegExp;if(m!=L)return!1;if(m&&L)return V.toString()==b.toString();var d=Y(V);if(y=d.length,y!==Y(b).length)return!1;for(w=y;w--!==0;)if(!X.call(b,d[w]))return!1;for(w=y;w--!==0;)if(T=d[w],!re(V[T],b[T]))return!1;return!0}return V!==V&&b!==b}},75172:function(Se,Ce,Y){var X=Y(89224);Se.exports={Graph:X.Graph,json:Y(17401),alg:Y(54613),version:X.version}},91606:function(Se,Ce,Y){var X=Y(95329);Se.exports=re;function re(V){var b={},U=[],C;function w(y){X.has(b,y)||(b[y]=!0,C.push(y),X.each(V.successors(y),w),X.each(V.predecessors(y),w))}return X.each(V.nodes(),function(y){C=[],w(y),C.length&&U.push(C)}),U}},21482:function(Se,Ce,Y){var X=Y(95329);Se.exports=re;function re(b,U,C){X.isArray(U)||(U=[U]);var w=(b.isDirected()?b.successors:b.neighbors).bind(b),y=[],T={};return X.each(U,function(x){if(!b.hasNode(x))throw new Error("Graph does not have node: "+x);V(b,x,C==="post",T,w,y)}),y}function V(b,U,C,w,y,T){X.has(w,U)||(w[U]=!0,C||T.push(U),X.each(y(U),function(x){V(b,x,C,w,y,T)}),C&&T.push(U))}},40845:function(Se,Ce,Y){var X=Y(13746),re=Y(95329);Se.exports=V;function V(b,U,C){return re.transform(b.nodes(),function(w,y){w[y]=X(b,y,U,C)},{})}},13746:function(Se,Ce,Y){var X=Y(95329),re=Y(36614);Se.exports=b;var V=X.constant(1);function b(C,w,y,T){return U(C,String(w),y||V,T||function(x){return C.outEdges(x)})}function U(C,w,y,T){var x={},p=new re,m,L,d=function(g){var A=g.v!==m?g.v:g.w,M=x[A],O=y(g),S=L.distance+O;if(O<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+g+" Weight: "+O);S<M.distance&&(M.distance=S,M.predecessor=m,p.decrease(A,S))};for(C.nodes().forEach(function(g){var A=g===w?0:Number.POSITIVE_INFINITY;x[g]={distance:A},p.add(g,A)});p.size()>0&&(m=p.removeMin(),L=x[m],L.distance!==Number.POSITIVE_INFINITY);)T(m).forEach(d);return x}},59324:function(Se,Ce,Y){var X=Y(95329),re=Y(94558);Se.exports=V;function V(b){return X.filter(re(b),function(U){return U.length>1||U.length===1&&b.hasEdge(U[0],U[0])})}},22893:function(Se,Ce,Y){var X=Y(95329);Se.exports=V;var re=X.constant(1);function V(U,C,w){return b(U,C||re,w||function(y){return U.outEdges(y)})}function b(U,C,w){var y={},T=U.nodes();return T.forEach(function(x){y[x]={},y[x][x]={distance:0},T.forEach(function(p){x!==p&&(y[x][p]={distance:Number.POSITIVE_INFINITY})}),w(x).forEach(function(p){var m=p.v===x?p.w:p.v,L=C(p);y[x][m]={distance:L,predecessor:x}})}),T.forEach(function(x){var p=y[x];T.forEach(function(m){var L=y[m];T.forEach(function(d){var g=L[x],A=p[d],M=L[d],O=g.distance+A.distance;O<M.distance&&(M.distance=O,M.predecessor=A.predecessor)})})}),y}},54613:function(Se,Ce,Y){Se.exports={components:Y(91606),dijkstra:Y(13746),dijkstraAll:Y(40845),findCycles:Y(59324),floydWarshall:Y(22893),isAcyclic:Y(588),postorder:Y(98049),preorder:Y(67158),prim:Y(66058),tarjan:Y(94558),topsort:Y(7793)}},588:function(Se,Ce,Y){var X=Y(7793);Se.exports=re;function re(V){try{X(V)}catch(b){if(b instanceof X.CycleException)return!1;throw b}return!0}},98049:function(Se,Ce,Y){var X=Y(21482);Se.exports=re;function re(V,b){return X(V,b,"post")}},67158:function(Se,Ce,Y){var X=Y(21482);Se.exports=re;function re(V,b){return X(V,b,"pre")}},66058:function(Se,Ce,Y){var X=Y(95329),re=Y(6349),V=Y(36614);Se.exports=b;function b(U,C){var w=new re,y={},T=new V,x;function p(L){var d=L.v===x?L.w:L.v,g=T.priority(d);if(g!==void 0){var A=C(L);A<g&&(y[d]=x,T.decrease(d,A))}}if(U.nodeCount()===0)return w;X.each(U.nodes(),function(L){T.add(L,Number.POSITIVE_INFINITY),w.setNode(L)}),T.decrease(U.nodes()[0],0);for(var m=!1;T.size()>0;){if(x=T.removeMin(),X.has(y,x))w.setEdge(x,y[x]);else{if(m)throw new Error("Input graph is not connected: "+U);m=!0}U.nodeEdges(x).forEach(p)}return w}},94558:function(Se,Ce,Y){var X=Y(95329);Se.exports=re;function re(V){var b=0,U=[],C={},w=[];function y(T){var x=C[T]={onStack:!0,lowlink:b,index:b++};if(U.push(T),V.successors(T).forEach(function(L){X.has(C,L)?C[L].onStack&&(x.lowlink=Math.min(x.lowlink,C[L].index)):(y(L),x.lowlink=Math.min(x.lowlink,C[L].lowlink))}),x.lowlink===x.index){var p=[],m;do m=U.pop(),C[m].onStack=!1,p.push(m);while(T!==m);w.push(p)}}return V.nodes().forEach(function(T){X.has(C,T)||y(T)}),w}},7793:function(Se,Ce,Y){var X=Y(95329);Se.exports=re,re.CycleException=V;function re(b){var U={},C={},w=[];function y(T){if(X.has(C,T))throw new V;X.has(U,T)||(C[T]=!0,U[T]=!0,X.each(b.predecessors(T),y),delete C[T],w.push(T))}if(X.each(b.sinks(),y),X.size(U)!==b.nodeCount())throw new V;return w}function V(){}V.prototype=new Error},36614:function(Se,Ce,Y){var X=Y(95329);Se.exports=re;function re(){this._arr=[],this._keyIndices={}}re.prototype.size=function(){return this._arr.length},re.prototype.keys=function(){return this._arr.map(function(V){return V.key})},re.prototype.has=function(V){return X.has(this._keyIndices,V)},re.prototype.priority=function(V){var b=this._keyIndices[V];if(b!==void 0)return this._arr[b].priority},re.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},re.prototype.add=function(V,b){var U=this._keyIndices;if(V=String(V),!X.has(U,V)){var C=this._arr,w=C.length;return U[V]=w,C.push({key:V,priority:b}),this._decrease(w),!0}return!1},re.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var V=this._arr.pop();return delete this._keyIndices[V.key],this._heapify(0),V.key},re.prototype.decrease=function(V,b){var U=this._keyIndices[V];if(b>this._arr[U].priority)throw new Error("New priority is greater than current priority. Key: "+V+" Old: "+this._arr[U].priority+" New: "+b);this._arr[U].priority=b,this._decrease(U)},re.prototype._heapify=function(V){var b=this._arr,U=2*V,C=U+1,w=V;U<b.length&&(w=b[U].priority<b[w].priority?U:w,C<b.length&&(w=b[C].priority<b[w].priority?C:w),w!==V&&(this._swap(V,w),this._heapify(w)))},re.prototype._decrease=function(V){for(var b=this._arr,U=b[V].priority,C;V!==0&&(C=V>>1,!(b[C].priority<U));)this._swap(V,C),V=C},re.prototype._swap=function(V,b){var U=this._arr,C=this._keyIndices,w=U[V],y=U[b];U[V]=y,U[b]=w,C[y.key]=V,C[w.key]=b}},6349:function(Se,Ce,Y){"use strict";var X=Y(95329);Se.exports=U;var re="\0",V="\0",b="";function U(p){this._isDirected=X.has(p,"directed")?p.directed:!0,this._isMultigraph=X.has(p,"multigraph")?p.multigraph:!1,this._isCompound=X.has(p,"compound")?p.compound:!1,this._label=void 0,this._defaultNodeLabelFn=X.constant(void 0),this._defaultEdgeLabelFn=X.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[V]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}U.prototype._nodeCount=0,U.prototype._edgeCount=0,U.prototype.isDirected=function(){return this._isDirected},U.prototype.isMultigraph=function(){return this._isMultigraph},U.prototype.isCompound=function(){return this._isCompound},U.prototype.setGraph=function(p){return this._label=p,this},U.prototype.graph=function(){return this._label},U.prototype.setDefaultNodeLabel=function(p){return X.isFunction(p)||(p=X.constant(p)),this._defaultNodeLabelFn=p,this},U.prototype.nodeCount=function(){return this._nodeCount},U.prototype.nodes=function(){return X.keys(this._nodes)},U.prototype.sources=function(){var p=this;return X.filter(this.nodes(),function(m){return X.isEmpty(p._in[m])})},U.prototype.sinks=function(){var p=this;return X.filter(this.nodes(),function(m){return X.isEmpty(p._out[m])})},U.prototype.setNodes=function(p,m){var L=arguments,d=this;return X.each(p,function(g){L.length>1?d.setNode(g,m):d.setNode(g)}),this},U.prototype.setNode=function(p,m){return X.has(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=m),this):(this._nodes[p]=arguments.length>1?m:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]=V,this._children[p]={},this._children[V][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)},U.prototype.node=function(p){return this._nodes[p]},U.prototype.hasNode=function(p){return X.has(this._nodes,p)},U.prototype.removeNode=function(p){var m=this;if(X.has(this._nodes,p)){var L=function(d){m.removeEdge(m._edgeObjs[d])};delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],X.each(this.children(p),function(d){m.setParent(d)}),delete this._children[p]),X.each(X.keys(this._in[p]),L),delete this._in[p],delete this._preds[p],X.each(X.keys(this._out[p]),L),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this},U.prototype.setParent=function(p,m){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(X.isUndefined(m))m=V;else{m+="";for(var L=m;!X.isUndefined(L);L=this.parent(L))if(L===p)throw new Error("Setting "+m+" as parent of "+p+" would create a cycle");this.setNode(m)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=m,this._children[m][p]=!0,this},U.prototype._removeFromParentsChildList=function(p){delete this._children[this._parent[p]][p]},U.prototype.parent=function(p){if(this._isCompound){var m=this._parent[p];if(m!==V)return m}},U.prototype.children=function(p){if(X.isUndefined(p)&&(p=V),this._isCompound){var m=this._children[p];if(m)return X.keys(m)}else{if(p===V)return this.nodes();if(this.hasNode(p))return[]}},U.prototype.predecessors=function(p){var m=this._preds[p];if(m)return X.keys(m)},U.prototype.successors=function(p){var m=this._sucs[p];if(m)return X.keys(m)},U.prototype.neighbors=function(p){var m=this.predecessors(p);if(m)return X.union(m,this.successors(p))},U.prototype.isLeaf=function(p){var m;return this.isDirected()?m=this.successors(p):m=this.neighbors(p),m.length===0},U.prototype.filterNodes=function(p){var m=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});m.setGraph(this.graph());var L=this;X.each(this._nodes,function(A,M){p(M)&&m.setNode(M,A)}),X.each(this._edgeObjs,function(A){m.hasNode(A.v)&&m.hasNode(A.w)&&m.setEdge(A,L.edge(A))});var d={};function g(A){var M=L.parent(A);return M===void 0||m.hasNode(M)?(d[A]=M,M):M in d?d[M]:g(M)}return this._isCompound&&X.each(m.nodes(),function(A){m.setParent(A,g(A))}),m},U.prototype.setDefaultEdgeLabel=function(p){return X.isFunction(p)||(p=X.constant(p)),this._defaultEdgeLabelFn=p,this},U.prototype.edgeCount=function(){return this._edgeCount},U.prototype.edges=function(){return X.values(this._edgeObjs)},U.prototype.setPath=function(p,m){var L=this,d=arguments;return X.reduce(p,function(g,A){return d.length>1?L.setEdge(g,A,m):L.setEdge(g,A),A}),this},U.prototype.setEdge=function(){var p,m,L,d,g=!1,A=arguments[0];typeof A=="object"&&A!==null&&"v"in A?(p=A.v,m=A.w,L=A.name,arguments.length===2&&(d=arguments[1],g=!0)):(p=A,m=arguments[1],L=arguments[3],arguments.length>2&&(d=arguments[2],g=!0)),p=""+p,m=""+m,X.isUndefined(L)||(L=""+L);var M=y(this._isDirected,p,m,L);if(X.has(this._edgeLabels,M))return g&&(this._edgeLabels[M]=d),this;if(!X.isUndefined(L)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(m),this._edgeLabels[M]=g?d:this._defaultEdgeLabelFn(p,m,L);var O=T(this._isDirected,p,m,L);return p=O.v,m=O.w,Object.freeze(O),this._edgeObjs[M]=O,C(this._preds[m],p),C(this._sucs[p],m),this._in[m][M]=O,this._out[p][M]=O,this._edgeCount++,this},U.prototype.edge=function(p,m,L){var d=arguments.length===1?x(this._isDirected,arguments[0]):y(this._isDirected,p,m,L);return this._edgeLabels[d]},U.prototype.hasEdge=function(p,m,L){var d=arguments.length===1?x(this._isDirected,arguments[0]):y(this._isDirected,p,m,L);return X.has(this._edgeLabels,d)},U.prototype.removeEdge=function(p,m,L){var d=arguments.length===1?x(this._isDirected,arguments[0]):y(this._isDirected,p,m,L),g=this._edgeObjs[d];return g&&(p=g.v,m=g.w,delete this._edgeLabels[d],delete this._edgeObjs[d],w(this._preds[m],p),w(this._sucs[p],m),delete this._in[m][d],delete this._out[p][d],this._edgeCount--),this},U.prototype.inEdges=function(p,m){var L=this._in[p];if(L){var d=X.values(L);return m?X.filter(d,function(g){return g.v===m}):d}},U.prototype.outEdges=function(p,m){var L=this._out[p];if(L){var d=X.values(L);return m?X.filter(d,function(g){return g.w===m}):d}},U.prototype.nodeEdges=function(p,m){var L=this.inEdges(p,m);if(L)return L.concat(this.outEdges(p,m))};function C(p,m){p[m]?p[m]++:p[m]=1}function w(p,m){--p[m]||delete p[m]}function y(p,m,L,d){var g=""+m,A=""+L;if(!p&&g>A){var M=g;g=A,A=M}return g+b+A+b+(X.isUndefined(d)?re:d)}function T(p,m,L,d){var g=""+m,A=""+L;if(!p&&g>A){var M=g;g=A,A=M}var O={v:g,w:A};return d&&(O.name=d),O}function x(p,m){return y(p,m.v,m.w,m.name)}},89224:function(Se,Ce,Y){Se.exports={Graph:Y(6349),version:Y(16544)}},17401:function(Se,Ce,Y){var X=Y(95329),re=Y(6349);Se.exports={write:V,read:C};function V(w){var y={options:{directed:w.isDirected(),multigraph:w.isMultigraph(),compound:w.isCompound()},nodes:b(w),edges:U(w)};return X.isUndefined(w.graph())||(y.value=X.clone(w.graph())),y}function b(w){return X.map(w.nodes(),function(y){var T=w.node(y),x=w.parent(y),p={v:y};return X.isUndefined(T)||(p.value=T),X.isUndefined(x)||(p.parent=x),p})}function U(w){return X.map(w.edges(),function(y){var T=w.edge(y),x={v:y.v,w:y.w};return X.isUndefined(y.name)||(x.name=y.name),X.isUndefined(T)||(x.value=T),x})}function C(w){var y=new re(w.options).setGraph(w.value);return X.each(w.nodes,function(T){y.setNode(T.v,T.value),T.parent&&y.setParent(T.v,T.parent)}),X.each(w.edges,function(T){y.setEdge({v:T.v,w:T.w,name:T.name},T.value)}),y}},95329:function(Se,Ce,Y){var X;try{X={clone:Y(76833),constant:Y(13503),each:Y(76934),filter:Y(64725),has:Y(99946),isArray:Y(80744),isEmpty:Y(61627),isFunction:Y(9363),isUndefined:Y(16513),keys:Y(55451),map:Y(9924),reduce:Y(16473),size:Y(40617),transform:Y(91116),union:Y(44065),values:Y(81229)}}catch(re){}X||(X=window._),Se.exports=X},16544:function(Se){Se.exports="2.1.8"},34634:function(Se,Ce,Y){"use strict";Y.r(Ce),Y.d(Ce,{isAnyArray:function(){return re}});const X=Object.prototype.toString;function re(V){const b=X.call(V);return b.endsWith("Array]")&&!b.includes("Big")}},22948:function(Se){Se.exports=function(Y){return!Y||typeof Y=="string"?!1:Y instanceof Array||Array.isArray(Y)||Y.length>=0&&(Y.splice instanceof Function||Object.getOwnPropertyDescriptor(Y,Y.length-1)&&Y.constructor.name!=="String")}},15584:function(Se,Ce,Y){var X=Y(73893),re=Y(33152),V=X(re,"DataView");Se.exports=V},97288:function(Se,Ce,Y){var X=Y(73893),re=Y(33152),V=X(re,"Promise");Se.exports=V},23599:function(Se,Ce,Y){var X=Y(73893),re=Y(33152),V=X(re,"Set");Se.exports=V},98924:function(Se,Ce,Y){var X=Y(52166),re=Y(34776),V=Y(40393);function b(U){var C=-1,w=U==null?0:U.length;for(this.__data__=new X;++C<w;)this.add(U[C])}b.prototype.add=b.prototype.push=re,b.prototype.has=V,Se.exports=b},26873:function(Se,Ce,Y){var X=Y(73893),re=Y(33152),V=X(re,"WeakMap");Se.exports=V},74809:function(Se){function Ce(Y,X){for(var re=-1,V=Y==null?0:Y.length;++re<V&&X(Y[re],re,Y)!==!1;);return Y}Se.exports=Ce},86952:function(Se){function Ce(Y,X){for(var re=-1,V=Y==null?0:Y.length,b=0,U=[];++re<V;){var C=Y[re];X(C,re,Y)&&(U[b++]=C)}return U}Se.exports=Ce},84271:function(Se,Ce,Y){var X=Y(17424);function re(V,b){var U=V==null?0:V.length;return!!U&&X(V,b,0)>-1}Se.exports=re},94874:function(Se){function Ce(Y,X,re){for(var V=-1,b=Y==null?0:Y.length;++V<b;)if(re(X,Y[V]))return!0;return!1}Se.exports=Ce},75010:function(Se){function Ce(Y,X){for(var re=-1,V=Y==null?0:Y.length,b=Array(V);++re<V;)b[re]=X(Y[re],re,Y);return b}Se.exports=Ce},57095:function(Se){function Ce(Y,X){for(var re=-1,V=X.length,b=Y.length;++re<V;)Y[b+re]=X[re];return Y}Se.exports=Ce},99861:function(Se){function Ce(Y,X,re,V){var b=-1,U=Y==null?0:Y.length;for(V&&U&&(re=Y[++b]);++b<U;)re=X(re,Y[b],b,Y);return re}Se.exports=Ce},64045:function(Se){function Ce(Y,X){for(var re=-1,V=Y==null?0:Y.length;++re<V;)if(X(Y[re],re,Y))return!0;return!1}Se.exports=Ce},26539:function(Se,Ce,Y){var X=Y(22310),re=X("length");Se.exports=re},91937:function(Se,Ce,Y){var X=Y(95378),re=Y(55451);function V(b,U){return b&&X(U,re(U),b)}Se.exports=V},26680:function(Se,Ce,Y){var X=Y(95378),re=Y(56730);function V(b,U){return b&&X(U,re(U),b)}Se.exports=V},99045:function(Se,Ce,Y){var X=Y(91866),re=Y(74809),V=Y(60348),b=Y(91937),U=Y(26680),C=Y(32315),w=Y(47760),y=Y(15168),T=Y(71678),x=Y(12076),p=Y(22675),m=Y(66139),L=Y(79264),d=Y(97541),g=Y(4084),A=Y(80744),M=Y(57835),O=Y(41626),S=Y(20816),I=Y(65226),c=Y(55451),f=Y(56730),P=1,N=2,k=4,W="[object Arguments]",z="[object Array]",Z="[object Boolean]",J="[object Date]",ee="[object Error]",$="[object Function]",ie="[object GeneratorFunction]",se="[object Map]",ne="[object Number]",ce="[object Object]",ae="[object RegExp]",fe="[object Set]",oe="[object String]",pe="[object Symbol]",_e="[object WeakMap]",de="[object ArrayBuffer]",be="[object DataView]",Ae="[object Float32Array]",Fe="[object Float64Array]",Ue="[object Int8Array]",it="[object Int16Array]",tt="[object Int32Array]",et="[object Uint8Array]",vt="[object Uint8ClampedArray]",dt="[object Uint16Array]",je="[object Uint32Array]",nt={};nt[W]=nt[z]=nt[de]=nt[be]=nt[Z]=nt[J]=nt[Ae]=nt[Fe]=nt[Ue]=nt[it]=nt[tt]=nt[se]=nt[ne]=nt[ce]=nt[ae]=nt[fe]=nt[oe]=nt[pe]=nt[et]=nt[vt]=nt[dt]=nt[je]=!0,nt[ee]=nt[$]=nt[_e]=!1;function rt(ft,lt,wt,Re,We,Pe){var ke,Ze=lt&P,Ie=lt&N,Ye=lt&k;if(wt&&(ke=We?wt(ft,Re,We,Pe):wt(ft)),ke!==void 0)return ke;if(!S(ft))return ft;var qe=A(ft);if(qe){if(ke=L(ft),!Ze)return w(ft,ke)}else{var ot=m(ft),gt=ot==$||ot==ie;if(M(ft))return C(ft,Ze);if(ot==ce||ot==W||gt&&!We){if(ke=Ie||gt?{}:g(ft),!Ze)return Ie?T(ft,U(ke,ft)):y(ft,b(ke,ft))}else{if(!nt[ot])return We?ft:{};ke=d(ft,ot,Ze)}}Pe||(Pe=new X);var pt=Pe.get(ft);if(pt)return pt;Pe.set(ft,ke),I(ft)?ft.forEach(function(Nt){ke.add(rt(Nt,lt,wt,Nt,ft,Pe))}):O(ft)&&ft.forEach(function(Nt,jt){ke.set(jt,rt(Nt,lt,wt,jt,ft,Pe))});var Lt=Ye?Ie?p:x:Ie?f:c,Tt=qe?void 0:Lt(ft);return re(Tt||ft,function(Nt,jt){Tt&&(jt=Nt,Nt=ft[jt]),V(ke,jt,rt(Nt,lt,wt,jt,ft,Pe))}),ke}Se.exports=rt},44107:function(Se,Ce,Y){var X=Y(1585),re=Y(49164),V=re(X);Se.exports=V},2659:function(Se,Ce,Y){var X=Y(45029);function re(V,b,U){for(var C=-1,w=V.length;++C<w;){var y=V[C],T=b(y);if(T!=null&&(x===void 0?T===T&&!X(T):U(T,x)))var x=T,p=y}return p}Se.exports=re},32872:function(Se,Ce,Y){var X=Y(44107);function re(V,b){var U=[];return X(V,function(C,w,y){b(C,w,y)&&U.push(C)}),U}Se.exports=re},51533:function(Se){function Ce(Y,X,re,V){for(var b=Y.length,U=re+(V?1:-1);V?U--:++U<b;)if(X(Y[U],U,Y))return U;return-1}Se.exports=Ce},9256:function(Se,Ce,Y){var X=Y(57095),re=Y(88133);function V(b,U,C,w,y){var T=-1,x=b.length;for(C||(C=re),y||(y=[]);++T<x;){var p=b[T];U>0&&C(p)?U>1?V(p,U-1,C,w,y):X(y,p):w||(y[y.length]=p)}return y}Se.exports=V},1585:function(Se,Ce,Y){var X=Y(14018),re=Y(55451);function V(b,U){return b&&X(b,U,re)}Se.exports=V},89147:function(Se,Ce,Y){var X=Y(1186),re=Y(9171);function V(b,U){U=X(U,b);for(var C=0,w=U.length;b!=null&&C<w;)b=b[re(U[C++])];return C&&C==w?b:void 0}Se.exports=V},75635:function(Se,Ce,Y){var X=Y(57095),re=Y(80744);function V(b,U,C){var w=U(b);return re(b)?w:X(w,C(b))}Se.exports=V},40302:function(Se){function Ce(Y,X){return Y>X}Se.exports=Ce},3251:function(Se){var Ce=Object.prototype,Y=Ce.hasOwnProperty;function X(re,V){return re!=null&&Y.call(re,V)}Se.exports=X},62348:function(Se){function Ce(Y,X){return Y!=null&&X in Object(Y)}Se.exports=Ce},17424:function(Se,Ce,Y){var X=Y(51533),re=Y(8373),V=Y(49237);function b(U,C,w){return C===C?V(U,C,w):X(U,re,w)}Se.exports=b},77295:function(Se,Ce,Y){var X=Y(84412),re=Y(93913);function V(b,U,C,w,y){return b===U?!0:b==null||U==null||!re(b)&&!re(U)?b!==b&&U!==U:X(b,U,C,w,V,y)}Se.exports=V},84412:function(Se,Ce,Y){var X=Y(91866),re=Y(50401),V=Y(57710),b=Y(4983),U=Y(66139),C=Y(80744),w=Y(57835),y=Y(18397),T=1,x="[object Arguments]",p="[object Array]",m="[object Object]",L=Object.prototype,d=L.hasOwnProperty;function g(A,M,O,S,I,c){var f=C(A),P=C(M),N=f?p:U(A),k=P?p:U(M);N=N==x?m:N,k=k==x?m:k;var W=N==m,z=k==m,Z=N==k;if(Z&&w(A)){if(!w(M))return!1;f=!0,W=!1}if(Z&&!W)return c||(c=new X),f||y(A)?re(A,M,O,S,I,c):V(A,M,N,O,S,I,c);if(!(O&T)){var J=W&&d.call(A,"__wrapped__"),ee=z&&d.call(M,"__wrapped__");if(J||ee){var $=J?A.value():A,ie=ee?M.value():M;return c||(c=new X),I($,ie,O,S,c)}}return Z?(c||(c=new X),b(A,M,O,S,I,c)):!1}Se.exports=g},55005:function(Se,Ce,Y){var X=Y(66139),re=Y(93913),V="[object Map]";function b(U){return re(U)&&X(U)==V}Se.exports=b},51524:function(Se,Ce,Y){var X=Y(91866),re=Y(77295),V=1,b=2;function U(C,w,y,T){var x=y.length,p=x,m=!T;if(C==null)return!p;for(C=Object(C);x--;){var L=y[x];if(m&&L[2]?L[1]!==C[L[0]]:!(L[0]in C))return!1}for(;++x<p;){L=y[x];var d=L[0],g=C[d],A=L[1];if(m&&L[2]){if(g===void 0&&!(d in C))return!1}else{var M=new X;if(T)var O=T(g,A,d,C,w,M);if(!(O===void 0?re(A,g,V|b,T,M):O))return!1}}return!0}Se.exports=U},8373:function(Se){function Ce(Y){return Y!==Y}Se.exports=Ce},38652:function(Se,Ce,Y){var X=Y(66139),re=Y(93913),V="[object Set]";function b(U){return re(U)&&X(U)==V}Se.exports=b},95979:function(Se,Ce,Y){var X=Y(17632),re=Y(38933),V=Y(46962),b=Y(80744),U=Y(35769);function C(w){return typeof w=="function"?w:w==null?V:typeof w=="object"?b(w)?re(w[0],w[1]):X(w):U(w)}Se.exports=C},6019:function(Se,Ce,Y){var X=Y(7975),re=Y(23730),V=Object.prototype,b=V.hasOwnProperty;function U(C){if(!X(C))return re(C);var w=[];for(var y in Object(C))b.call(C,y)&&y!="constructor"&&w.push(y);return w}Se.exports=U},93757:function(Se){function Ce(Y,X){return Y<X}Se.exports=Ce},65487:function(Se,Ce,Y){var X=Y(44107),re=Y(24665);function V(b,U){var C=-1,w=re(b)?Array(b.length):[];return X(b,function(y,T,x){w[++C]=U(y,T,x)}),w}Se.exports=V},17632:function(Se,Ce,Y){var X=Y(51524),re=Y(10261),V=Y(24122);function b(U){var C=re(U);return C.length==1&&C[0][2]?V(C[0][0],C[0][1]):function(w){return w===U||X(w,U,C)}}Se.exports=b},38933:function(Se,Ce,Y){var X=Y(77295),re=Y(44231),V=Y(37879),b=Y(86773),U=Y(88411),C=Y(24122),w=Y(9171),y=1,T=2;function x(p,m){return b(p)&&U(m)?C(w(p),m):function(L){var d=re(L,p);return d===void 0&&d===m?V(L,p):X(m,d,y|T)}}Se.exports=x},58506:function(Se,Ce,Y){var X=Y(75010),re=Y(89147),V=Y(95979),b=Y(65487),U=Y(33065),C=Y(38342),w=Y(11249),y=Y(46962),T=Y(80744);function x(p,m,L){m.length?m=X(m,function(A){return T(A)?function(M){return re(M,A.length===1?A[0]:A)}:A}):m=[y];var d=-1;m=X(m,C(V));var g=b(p,function(A,M,O){var S=X(m,function(I){return I(A)});return{criteria:S,index:++d,value:A}});return U(g,function(A,M){return w(A,M,L)})}Se.exports=x},88832:function(Se,Ce,Y){var X=Y(10867),re=Y(37879);function V(b,U){return X(b,U,function(C,w){return re(b,w)})}Se.exports=V},10867:function(Se,Ce,Y){var X=Y(89147),re=Y(36897),V=Y(1186);function b(U,C,w){for(var y=-1,T=C.length,x={};++y<T;){var p=C[y],m=X(U,p);w(m,p)&&re(x,V(p,U),m)}return x}Se.exports=b},22310:function(Se){function Ce(Y){return function(X){return X==null?void 0:X[Y]}}Se.exports=Ce},96916:function(Se,Ce,Y){var X=Y(89147);function re(V){return function(b){return X(b,V)}}Se.exports=re},36121:function(Se){var Ce=Math.ceil,Y=Math.max;function X(re,V,b,U){for(var C=-1,w=Y(Ce((V-re)/(b||1)),0),y=Array(w);w--;)y[U?w:++C]=re,re+=b;return y}Se.exports=X},30739:function(Se){function Ce(Y,X,re,V,b){return b(Y,function(U,C,w){re=V?(V=!1,U):X(re,U,C,w)}),re}Se.exports=Ce},36897:function(Se,Ce,Y){var X=Y(60348),re=Y(1186),V=Y(70213),b=Y(20816),U=Y(9171);function C(w,y,T,x){if(!b(w))return w;y=re(y,w);for(var p=-1,m=y.length,L=m-1,d=w;d!=null&&++p<m;){var g=U(y[p]),A=T;if(g==="__proto__"||g==="constructor"||g==="prototype")return w;if(p!=L){var M=d[g];A=x?x(M,g,d):void 0,A===void 0&&(A=b(M)?M:V(y[p+1])?[]:{})}X(d,g,A),d=d[g]}return w}Se.exports=C},33065:function(Se){function Ce(Y,X){var re=Y.length;for(Y.sort(X);re--;)Y[re]=Y[re].value;return Y}Se.exports=Ce},50230:function(Se,Ce,Y){var X=Y(91869),re=Y(75010),V=Y(80744),b=Y(45029),U=1/0,C=X?X.prototype:void 0,w=C?C.toString:void 0;function y(T){if(typeof T=="string")return T;if(V(T))return re(T,y)+"";if(b(T))return w?w.call(T):"";var x=T+"";return x=="0"&&1/T==-U?"-0":x}Se.exports=y},13927:function(Se,Ce,Y){var X=Y(15333),re=/^\s+/;function V(b){return b&&b.slice(0,X(b)+1).replace(re,"")}Se.exports=V},29098:function(Se,Ce,Y){var X=Y(98924),re=Y(84271),V=Y(94874),b=Y(1931),U=Y(47506),C=Y(79679),w=200;function y(T,x,p){var m=-1,L=re,d=T.length,g=!0,A=[],M=A;if(p)g=!1,L=V;else if(d>=w){var O=x?null:U(T);if(O)return C(O);g=!1,L=b,M=new X}else M=x?[]:A;e:for(;++m<d;){var S=T[m],I=x?x(S):S;if(S=p||S!==0?S:0,g&&I===I){for(var c=M.length;c--;)if(M[c]===I)continue e;x&&M.push(I),A.push(S)}else L(M,I,p)||(M!==A&&M.push(I),A.push(S))}return A}Se.exports=y},20720:function(Se,Ce,Y){var X=Y(75010);function re(V,b){return X(b,function(U){return V[U]})}Se.exports=re},94484:function(Se){function Ce(Y,X,re){for(var V=-1,b=Y.length,U=X.length,C={};++V<b;){var w=V<U?X[V]:void 0;re(C,Y[V],w)}return C}Se.exports=Ce},1931:function(Se){function Ce(Y,X){return Y.has(X)}Se.exports=Ce},11756:function(Se,Ce,Y){var X=Y(46962);function re(V){return typeof V=="function"?V:X}Se.exports=re},1186:function(Se,Ce,Y){var X=Y(80744),re=Y(86773),V=Y(40493),b=Y(44140);function U(C,w){return X(C)?C:re(C,w)?[C]:V(b(C))}Se.exports=U},27984:function(Se,Ce,Y){var X=Y(20188);function re(V,b){var U=b?X(V.buffer):V.buffer;return new V.constructor(U,V.byteOffset,V.byteLength)}Se.exports=re},78583:function(Se){var Ce=/\w*$/;function Y(X){var re=new X.constructor(X.source,Ce.exec(X));return re.lastIndex=X.lastIndex,re}Se.exports=Y},28757:function(Se,Ce,Y){var X=Y(91869),re=X?X.prototype:void 0,V=re?re.valueOf:void 0;function b(U){return V?Object(V.call(U)):{}}Se.exports=b},83018:function(Se,Ce,Y){var X=Y(45029);function re(V,b){if(V!==b){var U=V!==void 0,C=V===null,w=V===V,y=X(V),T=b!==void 0,x=b===null,p=b===b,m=X(b);if(!x&&!m&&!y&&V>b||y&&T&&p&&!x&&!m||C&&T&&p||!U&&p||!w)return 1;if(!C&&!y&&!m&&V<b||m&&U&&w&&!C&&!y||x&&U&&w||!T&&w||!p)return-1}return 0}Se.exports=re},11249:function(Se,Ce,Y){var X=Y(83018);function re(V,b,U){for(var C=-1,w=V.criteria,y=b.criteria,T=w.length,x=U.length;++C<T;){var p=X(w[C],y[C]);if(p){if(C>=x)return p;var m=U[C];return p*(m=="desc"?-1:1)}}return V.index-b.index}Se.exports=re},15168:function(Se,Ce,Y){var X=Y(95378),re=Y(58966);function V(b,U){return X(b,re(b),U)}Se.exports=V},71678:function(Se,Ce,Y){var X=Y(95378),re=Y(66817);function V(b,U){return X(b,re(b),U)}Se.exports=V},49164:function(Se,Ce,Y){var X=Y(24665);function re(V,b){return function(U,C){if(U==null)return U;if(!X(U))return V(U,C);for(var w=U.length,y=b?w:-1,T=Object(U);(b?y--:++y<w)&&C(T[y],y,T)!==!1;);return U}}Se.exports=re},19554:function(Se,Ce,Y){var X=Y(95979),re=Y(24665),V=Y(55451);function b(U){return function(C,w,y){var T=Object(C);if(!re(C)){var x=X(w,3);C=V(C),w=function(m){return x(T[m],m,T)}}var p=U(C,w,y);return p>-1?T[x?C[p]:p]:void 0}}Se.exports=b},76106:function(Se,Ce,Y){var X=Y(36121),re=Y(8138),V=Y(97341);function b(U){return function(C,w,y){return y&&typeof y!="number"&&re(C,w,y)&&(w=y=void 0),C=V(C),w===void 0?(w=C,C=0):w=V(w),y=y===void 0?C<w?1:-1:V(y),X(C,w,y,U)}}Se.exports=b},47506:function(Se,Ce,Y){var X=Y(23599),re=Y(9958),V=Y(79679),b=1/0,U=X&&1/V(new X([,-0]))[1]==b?function(C){return new X(C)}:re;Se.exports=U},50401:function(Se,Ce,Y){var X=Y(98924),re=Y(64045),V=Y(1931),b=1,U=2;function C(w,y,T,x,p,m){var L=T&b,d=w.length,g=y.length;if(d!=g&&!(L&&g>d))return!1;var A=m.get(w),M=m.get(y);if(A&&M)return A==y&&M==w;var O=-1,S=!0,I=T&U?new X:void 0;for(m.set(w,y),m.set(y,w);++O<d;){var c=w[O],f=y[O];if(x)var P=L?x(f,c,O,y,w,m):x(c,f,O,w,y,m);if(P!==void 0){if(P)continue;S=!1;break}if(I){if(!re(y,function(N,k){if(!V(I,k)&&(c===N||p(c,N,T,x,m)))return I.push(k)})){S=!1;break}}else if(!(c===f||p(c,f,T,x,m))){S=!1;break}}return m.delete(w),m.delete(y),S}Se.exports=C},57710:function(Se,Ce,Y){var X=Y(91869),re=Y(77945),V=Y(43607),b=Y(50401),U=Y(83383),C=Y(79679),w=1,y=2,T="[object Boolean]",x="[object Date]",p="[object Error]",m="[object Map]",L="[object Number]",d="[object RegExp]",g="[object Set]",A="[object String]",M="[object Symbol]",O="[object ArrayBuffer]",S="[object DataView]",I=X?X.prototype:void 0,c=I?I.valueOf:void 0;function f(P,N,k,W,z,Z,J){switch(k){case S:if(P.byteLength!=N.byteLength||P.byteOffset!=N.byteOffset)return!1;P=P.buffer,N=N.buffer;case O:return!(P.byteLength!=N.byteLength||!Z(new re(P),new re(N)));case T:case x:case L:return V(+P,+N);case p:return P.name==N.name&&P.message==N.message;case d:case A:return P==N+"";case m:var ee=U;case g:var $=W&w;if(ee||(ee=C),P.size!=N.size&&!$)return!1;var ie=J.get(P);if(ie)return ie==N;W|=y,J.set(P,N);var se=b(ee(P),ee(N),W,z,Z,J);return J.delete(P),se;case M:if(c)return c.call(P)==c.call(N)}return!1}Se.exports=f},4983:function(Se,Ce,Y){var X=Y(12076),re=1,V=Object.prototype,b=V.hasOwnProperty;function U(C,w,y,T,x,p){var m=y&re,L=X(C),d=L.length,g=X(w),A=g.length;if(d!=A&&!m)return!1;for(var M=d;M--;){var O=L[M];if(!(m?O in w:b.call(w,O)))return!1}var S=p.get(C),I=p.get(w);if(S&&I)return S==w&&I==C;var c=!0;p.set(C,w),p.set(w,C);for(var f=m;++M<d;){O=L[M];var P=C[O],N=w[O];if(T)var k=m?T(N,P,O,w,C,p):T(P,N,O,C,w,p);if(!(k===void 0?P===N||x(P,N,y,T,p):k)){c=!1;break}f||(f=O=="constructor")}if(c&&!f){var W=C.constructor,z=w.constructor;W!=z&&"constructor"in C&&"constructor"in w&&!(typeof W=="function"&&W instanceof W&&typeof z=="function"&&z instanceof z)&&(c=!1)}return p.delete(C),p.delete(w),c}Se.exports=U},522:function(Se,Ce,Y){var X=Y(40151),re=Y(19652),V=Y(71152);function b(U){return V(re(U,void 0,X),U+"")}Se.exports=b},12076:function(Se,Ce,Y){var X=Y(75635),re=Y(58966),V=Y(55451);function b(U){return X(U,V,re)}Se.exports=b},22675:function(Se,Ce,Y){var X=Y(75635),re=Y(66817),V=Y(56730);function b(U){return X(U,V,re)}Se.exports=b},10261:function(Se,Ce,Y){var X=Y(88411),re=Y(55451);function V(b){for(var U=re(b),C=U.length;C--;){var w=U[C],y=b[w];U[C]=[w,y,X(y)]}return U}Se.exports=V},58966:function(Se,Ce,Y){var X=Y(86952),re=Y(4134),V=Object.prototype,b=V.propertyIsEnumerable,U=Object.getOwnPropertySymbols,C=U?function(w){return w==null?[]:(w=Object(w),X(U(w),function(y){return b.call(w,y)}))}:re;Se.exports=C},66817:function(Se,Ce,Y){var X=Y(57095),re=Y(49217),V=Y(58966),b=Y(4134),U=Object.getOwnPropertySymbols,C=U?function(w){for(var y=[];w;)X(y,V(w)),w=re(w);return y}:b;Se.exports=C},66139:function(Se,Ce,Y){var X=Y(15584),re=Y(40164),V=Y(97288),b=Y(23599),U=Y(26873),C=Y(86756),w=Y(63256),y="[object Map]",T="[object Object]",x="[object Promise]",p="[object Set]",m="[object WeakMap]",L="[object DataView]",d=w(X),g=w(re),A=w(V),M=w(b),O=w(U),S=C;(X&&S(new X(new ArrayBuffer(1)))!=L||re&&S(new re)!=y||V&&S(V.resolve())!=x||b&&S(new b)!=p||U&&S(new U)!=m)&&(S=function(I){var c=C(I),f=c==T?I.constructor:void 0,P=f?w(f):"";if(P)switch(P){case d:return L;case g:return y;case A:return x;case M:return p;case O:return m}return c}),Se.exports=S},63100:function(Se,Ce,Y){var X=Y(1186),re=Y(13053),V=Y(80744),b=Y(70213),U=Y(11156),C=Y(9171);function w(y,T,x){T=X(T,y);for(var p=-1,m=T.length,L=!1;++p<m;){var d=C(T[p]);if(!(L=y!=null&&x(y,d)))break;y=y[d]}return L||++p!=m?L:(m=y==null?0:y.length,!!m&&U(m)&&b(d,m)&&(V(y)||re(y)))}Se.exports=w},55015:function(Se){var Ce="\\ud800-\\udfff",Y="\\u0300-\\u036f",X="\\ufe20-\\ufe2f",re="\\u20d0-\\u20ff",V=Y+X+re,b="\\ufe0e\\ufe0f",U="\\u200d",C=RegExp("["+U+Ce+V+b+"]");function w(y){return C.test(y)}Se.exports=w},79264:function(Se){var Ce=Object.prototype,Y=Ce.hasOwnProperty;function X(re){var V=re.length,b=new re.constructor(V);return V&&typeof re[0]=="string"&&Y.call(re,"index")&&(b.index=re.index,b.input=re.input),b}Se.exports=X},97541:function(Se,Ce,Y){var X=Y(20188),re=Y(27984),V=Y(78583),b=Y(28757),U=Y(78358),C="[object Boolean]",w="[object Date]",y="[object Map]",T="[object Number]",x="[object RegExp]",p="[object Set]",m="[object String]",L="[object Symbol]",d="[object ArrayBuffer]",g="[object DataView]",A="[object Float32Array]",M="[object Float64Array]",O="[object Int8Array]",S="[object Int16Array]",I="[object Int32Array]",c="[object Uint8Array]",f="[object Uint8ClampedArray]",P="[object Uint16Array]",N="[object Uint32Array]";function k(W,z,Z){var J=W.constructor;switch(z){case d:return X(W);case C:case w:return new J(+W);case g:return re(W,Z);case A:case M:case O:case S:case I:case c:case f:case P:case N:return U(W,Z);case y:return new J;case T:case m:return new J(W);case x:return V(W);case p:return new J;case L:return b(W)}}Se.exports=k},88133:function(Se,Ce,Y){var X=Y(91869),re=Y(13053),V=Y(80744),b=X?X.isConcatSpreadable:void 0;function U(C){return V(C)||re(C)||!!(b&&C&&C[b])}Se.exports=U},86773:function(Se,Ce,Y){var X=Y(80744),re=Y(45029),V=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,b=/^\w*$/;function U(C,w){if(X(C))return!1;var y=typeof C;return y=="number"||y=="symbol"||y=="boolean"||C==null||re(C)?!0:b.test(C)||!V.test(C)||w!=null&&C in Object(w)}Se.exports=U},88411:function(Se,Ce,Y){var X=Y(20816);function re(V){return V===V&&!X(V)}Se.exports=re},83383:function(Se){function Ce(Y){var X=-1,re=Array(Y.size);return Y.forEach(function(V,b){re[++X]=[b,V]}),re}Se.exports=Ce},24122:function(Se){function Ce(Y,X){return function(re){return re==null?!1:re[Y]===X&&(X!==void 0||Y in Object(re))}}Se.exports=Ce},26332:function(Se,Ce,Y){var X=Y(52858),re=500;function V(b){var U=X(b,function(w){return C.size===re&&C.clear(),w}),C=U.cache;return U}Se.exports=V},23730:function(Se,Ce,Y){var X=Y(31030),re=X(Object.keys,Object);Se.exports=re},34776:function(Se){var Ce="__lodash_hash_undefined__";function Y(X){return this.__data__.set(X,Ce),this}Se.exports=Y},40393:function(Se){function Ce(Y){return this.__data__.has(Y)}Se.exports=Ce},79679:function(Se){function Ce(Y){var X=-1,re=Array(Y.size);return Y.forEach(function(V){re[++X]=V}),re}Se.exports=Ce},49237:function(Se){function Ce(Y,X,re){for(var V=re-1,b=Y.length;++V<b;)if(Y[V]===X)return V;return-1}Se.exports=Ce},29405:function(Se,Ce,Y){var X=Y(26539),re=Y(55015),V=Y(60844);function b(U){return re(U)?V(U):X(U)}Se.exports=b},40493:function(Se,Ce,Y){var X=Y(26332),re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,V=/\\(\\)?/g,b=X(function(U){var C=[];return U.charCodeAt(0)===46&&C.push(""),U.replace(re,function(w,y,T,x){C.push(T?x.replace(V,"$1"):y||w)}),C});Se.exports=b},9171:function(Se,Ce,Y){var X=Y(45029),re=1/0;function V(b){if(typeof b=="string"||X(b))return b;var U=b+"";return U=="0"&&1/b==-re?"-0":U}Se.exports=V},15333:function(Se){var Ce=/\s/;function Y(X){for(var re=X.length;re--&&Ce.test(X.charAt(re)););return re}Se.exports=Y},60844:function(Se){var Ce="\\ud800-\\udfff",Y="\\u0300-\\u036f",X="\\ufe20-\\ufe2f",re="\\u20d0-\\u20ff",V=Y+X+re,b="\\ufe0e\\ufe0f",U="["+Ce+"]",C="["+V+"]",w="\\ud83c[\\udffb-\\udfff]",y="(?:"+C+"|"+w+")",T="[^"+Ce+"]",x="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",m="\\u200d",L=y+"?",d="["+b+"]?",g="(?:"+m+"(?:"+[T,x,p].join("|")+")"+d+L+")*",A=d+L+g,M="(?:"+[T+C+"?",C,x,p,U].join("|")+")",O=RegExp(w+"(?="+w+")|"+M+A,"g");function S(I){for(var c=O.lastIndex=0;O.test(I);)++c;return c}Se.exports=S},76833:function(Se,Ce,Y){var X=Y(99045),re=4;function V(b){return X(b,re)}Se.exports=V},20250:function(Se,Ce,Y){var X=Y(99045),re=1,V=4;function b(U){return X(U,re|V)}Se.exports=b},28548:function(Se,Ce,Y){var X=Y(92918),re=Y(43607),V=Y(8138),b=Y(56730),U=Object.prototype,C=U.hasOwnProperty,w=X(function(y,T){y=Object(y);var x=-1,p=T.length,m=p>2?T[2]:void 0;for(m&&V(T[0],T[1],m)&&(p=1);++x<p;)for(var L=T[x],d=b(L),g=-1,A=d.length;++g<A;){var M=d[g],O=y[M];(O===void 0||re(O,U[M])&&!C.call(y,M))&&(y[M]=L[M])}return y});Se.exports=w},76934:function(Se,Ce,Y){Se.exports=Y(99204)},64725:function(Se,Ce,Y){var X=Y(86952),re=Y(32872),V=Y(95979),b=Y(80744);function U(C,w){var y=b(C)?X:re;return y(C,V(w,3))}Se.exports=U},79785:function(Se,Ce,Y){var X=Y(19554),re=Y(9991),V=X(re);Se.exports=V},9991:function(Se,Ce,Y){var X=Y(51533),re=Y(95979),V=Y(12824),b=Math.max;function U(C,w,y){var T=C==null?0:C.length;if(!T)return-1;var x=y==null?0:V(y);return x<0&&(x=b(T+x,0)),X(C,re(w,3),x)}Se.exports=U},40151:function(Se,Ce,Y){var X=Y(9256);function re(V){var b=V==null?0:V.length;return b?X(V,1):[]}Se.exports=re},99204:function(Se,Ce,Y){var X=Y(74809),re=Y(44107),V=Y(11756),b=Y(80744);function U(C,w){var y=b(C)?X:re;return y(C,V(w))}Se.exports=U},23190:function(Se,Ce,Y){var X=Y(14018),re=Y(11756),V=Y(56730);function b(U,C){return U==null?U:X(U,re(C),V)}Se.exports=b},44231:function(Se,Ce,Y){var X=Y(89147);function re(V,b,U){var C=V==null?void 0:X(V,b);return C===void 0?U:C}Se.exports=re},99946:function(Se,Ce,Y){var X=Y(3251),re=Y(63100);function V(b,U){return b!=null&&re(b,U,X)}Se.exports=V},37879:function(Se,Ce,Y){var X=Y(62348),re=Y(63100);function V(b,U){return b!=null&&re(b,U,X)}Se.exports=V},61627:function(Se,Ce,Y){var X=Y(6019),re=Y(66139),V=Y(13053),b=Y(80744),U=Y(24665),C=Y(57835),w=Y(7975),y=Y(18397),T="[object Map]",x="[object Set]",p=Object.prototype,m=p.hasOwnProperty;function L(d){if(d==null)return!0;if(U(d)&&(b(d)||typeof d=="string"||typeof d.splice=="function"||C(d)||y(d)||V(d)))return!d.length;var g=re(d);if(g==T||g==x)return!d.size;if(w(d))return!X(d).length;for(var A in d)if(m.call(d,A))return!1;return!0}Se.exports=L},41626:function(Se,Ce,Y){var X=Y(55005),re=Y(38342),V=Y(52495),b=V&&V.isMap,U=b?re(b):X;Se.exports=U},65226:function(Se,Ce,Y){var X=Y(38652),re=Y(38342),V=Y(52495),b=V&&V.isSet,U=b?re(b):X;Se.exports=U},7941:function(Se,Ce,Y){var X=Y(86756),re=Y(80744),V=Y(93913),b="[object String]";function U(C){return typeof C=="string"||!re(C)&&V(C)&&X(C)==b}Se.exports=U},45029:function(Se,Ce,Y){var X=Y(86756),re=Y(93913),V="[object Symbol]";function b(U){return typeof U=="symbol"||re(U)&&X(U)==V}Se.exports=b},16513:function(Se){function Ce(Y){return Y===void 0}Se.exports=Ce},55451:function(Se,Ce,Y){var X=Y(63333),re=Y(6019),V=Y(24665);function b(U){return V(U)?X(U):re(U)}Se.exports=b},10611:function(Se){function Ce(Y){var X=Y==null?0:Y.length;return X?Y[X-1]:void 0}Se.exports=Ce},9924:function(Se,Ce,Y){var X=Y(75010),re=Y(95979),V=Y(65487),b=Y(80744);function U(C,w){var y=b(C)?X:V;return y(C,re(w,3))}Se.exports=U},70642:function(Se,Ce,Y){var X=Y(42813),re=Y(1585),V=Y(95979);function b(U,C){var w={};return C=V(C,3),re(U,function(y,T,x){X(w,T,C(y,T,x))}),w}Se.exports=b},95987:function(Se,Ce,Y){var X=Y(2659),re=Y(40302),V=Y(46962);function b(U){return U&&U.length?X(U,V,re):void 0}Se.exports=b},52858:function(Se,Ce,Y){var X=Y(52166),re="Expected a function";function V(b,U){if(typeof b!="function"||U!=null&&typeof U!="function")throw new TypeError(re);var C=function(){var w=arguments,y=U?U.apply(this,w):w[0],T=C.cache;if(T.has(y))return T.get(y);var x=b.apply(this,w);return C.cache=T.set(y,x)||T,x};return C.cache=new(V.Cache||X),C}V.Cache=X,Se.exports=V},73376:function(Se,Ce,Y){var X=Y(2659),re=Y(93757),V=Y(46962);function b(U){return U&&U.length?X(U,V,re):void 0}Se.exports=b},83296:function(Se,Ce,Y){var X=Y(2659),re=Y(95979),V=Y(93757);function b(U,C){return U&&U.length?X(U,re(C,2),V):void 0}Se.exports=b},9958:function(Se){function Ce(){}Se.exports=Ce},5795:function(Se,Ce,Y){var X=Y(33152),re=function(){return X.Date.now()};Se.exports=re},89409:function(Se,Ce,Y){var X=Y(88832),re=Y(522),V=re(function(b,U){return b==null?{}:X(b,U)});Se.exports=V},35769:function(Se,Ce,Y){var X=Y(22310),re=Y(96916),V=Y(86773),b=Y(9171);function U(C){return V(C)?X(b(C)):re(C)}Se.exports=U},60859:function(Se,Ce,Y){var X=Y(76106),re=X();Se.exports=re},16473:function(Se,Ce,Y){var X=Y(99861),re=Y(44107),V=Y(95979),b=Y(30739),U=Y(80744);function C(w,y,T){var x=U(w)?X:b,p=arguments.length<3;return x(w,V(y,4),T,p,re)}Se.exports=C},40617:function(Se,Ce,Y){var X=Y(6019),re=Y(66139),V=Y(24665),b=Y(7941),U=Y(29405),C="[object Map]",w="[object Set]";function y(T){if(T==null)return 0;if(V(T))return b(T)?U(T):T.length;var x=re(T);return x==C||x==w?T.size:X(T).length}Se.exports=y},351:function(Se,Ce,Y){var X=Y(9256),re=Y(58506),V=Y(92918),b=Y(8138),U=V(function(C,w){if(C==null)return[];var y=w.length;return y>1&&b(C,w[0],w[1])?w=[]:y>2&&b(w[0],w[1],w[2])&&(w=[w[0]]),re(C,X(w,1),[])});Se.exports=U},4134:function(Se){function Ce(){return[]}Se.exports=Ce},97341:function(Se,Ce,Y){var X=Y(59406),re=1/0,V=17976931348623157e292;function b(U){if(!U)return U===0?U:0;if(U=X(U),U===re||U===-re){var C=U<0?-1:1;return C*V}return U===U?U:0}Se.exports=b},12824:function(Se,Ce,Y){var X=Y(97341);function re(V){var b=X(V),U=b%1;return b===b?U?b-U:b:0}Se.exports=re},59406:function(Se,Ce,Y){var X=Y(13927),re=Y(20816),V=Y(45029),b=NaN,U=/^[-+]0x[0-9a-f]+$/i,C=/^0b[01]+$/i,w=/^0o[0-7]+$/i,y=parseInt;function T(x){if(typeof x=="number")return x;if(V(x))return b;if(re(x)){var p=typeof x.valueOf=="function"?x.valueOf():x;x=re(p)?p+"":p}if(typeof x!="string")return x===0?x:+x;x=X(x);var m=C.test(x);return m||w.test(x)?y(x.slice(2),m?2:8):U.test(x)?b:+x}Se.exports=T},44140:function(Se,Ce,Y){var X=Y(50230);function re(V){return V==null?"":X(V)}Se.exports=re},91116:function(Se,Ce,Y){var X=Y(74809),re=Y(35024),V=Y(1585),b=Y(95979),U=Y(49217),C=Y(80744),w=Y(57835),y=Y(9363),T=Y(20816),x=Y(18397);function p(m,L,d){var g=C(m),A=g||w(m)||x(m);if(L=b(L,4),d==null){var M=m&&m.constructor;A?d=g?new M:[]:T(m)?d=y(M)?re(U(m)):{}:d={}}return(A?X:V)(m,function(O,S,I){return L(d,O,S,I)}),d}Se.exports=p},44065:function(Se,Ce,Y){var X=Y(9256),re=Y(92918),V=Y(29098),b=Y(41590),U=re(function(C){return V(X(C,1,b,!0))});Se.exports=U},95708:function(Se,Ce,Y){var X=Y(44140),re=0;function V(b){var U=++re;return X(b)+U}Se.exports=V},81229:function(Se,Ce,Y){var X=Y(20720),re=Y(55451);function V(b){return b==null?[]:X(b,re(b))}Se.exports=V},65441:function(Se,Ce,Y){var X=Y(60348),re=Y(94484);function V(b,U){return re(b||[],U||[],X)}Se.exports=V},34402:function(Se,Ce,Y){"use strict";Y.r(Ce),Y.d(Ce,{default:function(){return b}});var X=Y(34634);function re(U){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,X.isAnyArray)(U))throw new TypeError("input must be an array");if(U.length===0)throw new TypeError("input must not be empty");var w=C.fromIndex,y=w===void 0?0:w,T=C.toIndex,x=T===void 0?U.length:T;if(y<0||y>=U.length||!Number.isInteger(y))throw new Error("fromIndex must be a positive integer smaller than length");if(x<=y||x>U.length||!Number.isInteger(x))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var p=U[y],m=y+1;m<x;m++)U[m]>p&&(p=U[m]);return p}function V(U){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,X.isAnyArray)(U))throw new TypeError("input must be an array");if(U.length===0)throw new TypeError("input must not be empty");var w=C.fromIndex,y=w===void 0?0:w,T=C.toIndex,x=T===void 0?U.length:T;if(y<0||y>=U.length||!Number.isInteger(y))throw new Error("fromIndex must be a positive integer smaller than length");if(x<=y||x>U.length||!Number.isInteger(x))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var p=U[y],m=y+1;m<x;m++)U[m]<p&&(p=U[m]);return p}function b(U){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,X.isAnyArray)(U)){if(U.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var w;if(C.output!==void 0){if(!(0,X.isAnyArray)(C.output))throw new TypeError("output option must be an array if specified");w=C.output}else w=new Array(U.length);var y=V(U),T=re(U);if(y===T)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var x=C.min,p=x===void 0?C.autoMinMax?y:0:x,m=C.max,L=m===void 0?C.autoMinMax?T:1:m;if(p>=L)throw new RangeError("min option must be smaller than max option");for(var d=(L-p)/(T-y),g=0;g<U.length;g++)w[g]=(U[g]-y)*d+p;return w}},25930:function(Se,Ce,Y){"use strict";Y.d(Ce,{Cd:function(){return Z}});var X=Y(72308),re=Y(77321),V=Y(74416),b=Y(59301),U=Y(92310),C=Y.n(U),w={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},y=function(){var $=(0,b.useRef)([]),ie=(0,b.useRef)(null);return(0,b.useEffect)(function(){var se=Date.now(),ne=!1;$.current.forEach(function(ce){if(ce){ne=!0;var ae=ce.style;ae.transitionDuration=".3s, .3s, .3s, .06s",ie.current&&se-ie.current<100&&(ae.transitionDuration="0s, 0s")}}),ne&&(ie.current=Date.now())}),$.current},T=["className","percent","prefixCls","strokeColor","strokeLinecap","strokeWidth","style","trailColor","trailWidth","transition"],x=function($){var ie=(0,re.Z)((0,re.Z)({},w),$),se=ie.className,ne=ie.percent,ce=ie.prefixCls,ae=ie.strokeColor,fe=ie.strokeLinecap,oe=ie.strokeWidth,pe=ie.style,_e=ie.trailColor,de=ie.trailWidth,be=ie.transition,Ae=(0,V.Z)(ie,T);delete Ae.gapPosition;var Fe=Array.isArray(ne)?ne:[ne],Ue=Array.isArray(ae)?ae:[ae],it=y(),tt=oe/2,et=100-oe/2,vt="M ".concat(fe==="round"?tt:0,",").concat(tt,`
|
|
|
L `).concat(fe==="round"?et:100,",").concat(tt),dt="0 0 100 ".concat(oe),je=0;return b.createElement("svg",(0,X.Z)({className:C()("".concat(ce,"-line"),se),viewBox:dt,preserveAspectRatio:"none",style:pe},Ae),b.createElement("path",{className:"".concat(ce,"-line-trail"),d:vt,strokeLinecap:fe,stroke:_e,strokeWidth:de||oe,fillOpacity:"0"}),Fe.map(function(nt,rt){var ft=1;switch(fe){case"round":ft=1-oe/100;break;case"square":ft=1-oe/2/100;break;default:ft=1;break}var lt={strokeDasharray:"".concat(nt*ft,"px, 100px"),strokeDashoffset:"-".concat(je,"px"),transition:be||"stroke-dashoffset 0.3s ease 0s, stroke-dasharray .3s ease 0s, stroke 0.3s linear"},wt=Ue[rt]||Ue[Ue.length-1];return je+=nt,b.createElement("path",{key:rt,className:"".concat(ce,"-line-path"),d:vt,strokeLinecap:fe,stroke:wt,strokeWidth:oe,fillOpacity:"0",ref:function(We){it[rt]=We},style:lt})}))},p=x,m=Y(62853),L=Y(52487),d=Y(47273),g=0,A=(0,d.Z)();function M(){var ee;return A?(ee=g,g+=1):ee="TEST_OR_SSR",ee}var O=function(ee){var $=b.useState(),ie=(0,L.Z)($,2),se=ie[0],ne=ie[1];return b.useEffect(function(){ne("rc_progress_".concat(M()))},[]),ee||se},S=function($){var ie=$.bg,se=$.children;return b.createElement("div",{style:{width:"100%",height:"100%",background:ie}},se)};function I(ee,$){return Object.keys(ee).map(function(ie){var se=parseFloat(ie),ne="".concat(Math.floor(se*$),"%");return"".concat(ee[ie]," ").concat(ne)})}var c=b.forwardRef(function(ee,$){var ie=ee.prefixCls,se=ee.color,ne=ee.gradientId,ce=ee.radius,ae=ee.style,fe=ee.ptg,oe=ee.strokeLinecap,pe=ee.strokeWidth,_e=ee.size,de=ee.gapDegree,be=se&&(0,m.Z)(se)==="object",Ae=be?"#FFF":void 0,Fe=_e/2,Ue=b.createElement("circle",{className:"".concat(ie,"-circle-path"),r:ce,cx:Fe,cy:Fe,stroke:Ae,strokeLinecap:oe,strokeWidth:pe,opacity:fe===0?0:1,style:ae,ref:$});if(!be)return Ue;var it="".concat(ne,"-conic"),tt=de?"".concat(180+de/2,"deg"):"0deg",et=I(se,(360-de)/360),vt=I(se,1),dt="conic-gradient(from ".concat(tt,", ").concat(et.join(", "),")"),je="linear-gradient(to ".concat(de?"bottom":"top",", ").concat(vt.join(", "),")");return b.createElement(b.Fragment,null,b.createElement("mask",{id:it},Ue),b.createElement("foreignObject",{x:0,y:0,width:_e,height:_e,mask:"url(#".concat(it,")")},b.createElement(S,{bg:je},b.createElement(S,{bg:dt}))))}),f=c,P=100,N=function($,ie,se,ne,ce,ae,fe,oe,pe,_e){var de=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,be=se/100*360*((360-ae)/360),Ae=ae===0?0:{bottom:0,top:180,left:90,right:-90}[fe],Fe=(100-ne)/100*ie;pe==="round"&&ne!==100&&(Fe+=_e/2,Fe>=ie&&(Fe=ie-.01));var Ue=P/2;return{stroke:typeof oe=="string"?oe:void 0,strokeDasharray:"".concat(ie,"px ").concat($),strokeDashoffset:Fe+de,transform:"rotate(".concat(ce+be+Ae,"deg)"),transformOrigin:"".concat(Ue,"px ").concat(Ue,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},k=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function W(ee){var $=ee!=null?ee:[];return Array.isArray($)?$:[$]}var z=function($){var ie=(0,re.Z)((0,re.Z)({},w),$),se=ie.id,ne=ie.prefixCls,ce=ie.steps,ae=ie.strokeWidth,fe=ie.trailWidth,oe=ie.gapDegree,pe=oe===void 0?0:oe,_e=ie.gapPosition,de=ie.trailColor,be=ie.strokeLinecap,Ae=ie.style,Fe=ie.className,Ue=ie.strokeColor,it=ie.percent,tt=(0,V.Z)(ie,k),et=P/2,vt=O(se),dt="".concat(vt,"-gradient"),je=et-ae/2,nt=Math.PI*2*je,rt=pe>0?90+pe/2:-90,ft=nt*((360-pe)/360),lt=(0,m.Z)(ce)==="object"?ce:{count:ce,gap:2},wt=lt.count,Re=lt.gap,We=W(it),Pe=W(Ue),ke=Pe.find(function(pt){return pt&&(0,m.Z)(pt)==="object"}),Ze=ke&&(0,m.Z)(ke)==="object",Ie=Ze?"butt":be,Ye=N(nt,ft,0,100,rt,pe,_e,de,Ie,ae),qe=y(),ot=function(){var Lt=0;return We.map(function(Tt,Nt){var jt=Pe[Nt]||Pe[Pe.length-1],zt=N(nt,ft,Lt,Tt,rt,pe,_e,jt,Ie,ae);return Lt+=Tt,b.createElement(f,{key:Nt,color:jt,ptg:Tt,radius:je,prefixCls:ne,gradientId:dt,style:zt,strokeLinecap:Ie,strokeWidth:ae,gapDegree:pe,ref:function(Kt){qe[Nt]=Kt},size:P})}).reverse()},gt=function(){var Lt=Math.round(wt*(We[0]/100)),Tt=100/wt,Nt=0;return new Array(wt).fill(null).map(function(jt,zt){var Ot=zt<=Lt-1?Pe[0]:de,Kt=Ot&&(0,m.Z)(Ot)==="object"?"url(#".concat(dt,")"):void 0,gn=N(nt,ft,Nt,Tt,rt,pe,_e,Ot,"butt",ae,Re);return Nt+=(ft-gn.strokeDashoffset+Re)*100/ft,b.createElement("circle",{key:zt,className:"".concat(ne,"-circle-path"),r:je,cx:et,cy:et,stroke:Kt,strokeWidth:ae,opacity:1,style:gn,ref:function(On){qe[zt]=On}})})};return b.createElement("svg",(0,X.Z)({className:C()("".concat(ne,"-circle"),Fe),viewBox:"0 0 ".concat(P," ").concat(P),style:Ae,id:se,role:"presentation"},tt),!wt&&b.createElement("circle",{className:"".concat(ne,"-circle-trail"),r:je,cx:et,cy:et,stroke:de,strokeLinecap:Ie,strokeWidth:fe||ae,style:Ye}),wt?gt():ot())},Z=z,J={Line:p,Circle:Z}},738:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return I}});var X=Y(72308),re=Y(49618),V=Y(52487),b=Y(74416),U=Y(92310),C=Y.n(U),w=Y(18929),y=Y(10228),T=Y(26112),x=Y(59301);function p(c,f){var P=c.disabled,N=c.prefixCls,k=c.character,W=c.characterRender,z=c.index,Z=c.count,J=c.value,ee=c.allowHalf,$=c.focused,ie=c.onHover,se=c.onClick,ne=function(be){ie(be,z)},ce=function(be){se(be,z)},ae=function(be){be.keyCode===y.Z.ENTER&&se(be,z)},fe=z+1,oe=new Set([N]);J===0&&z===0&&$?oe.add("".concat(N,"-focused")):ee&&J+.5>=fe&&J<fe?(oe.add("".concat(N,"-half")),oe.add("".concat(N,"-active")),$&&oe.add("".concat(N,"-focused"))):(fe<=J?oe.add("".concat(N,"-full")):oe.add("".concat(N,"-zero")),fe===J&&$&&oe.add("".concat(N,"-focused")));var pe=typeof k=="function"?k(c):k,_e=x.createElement("li",{className:C()(Array.from(oe)),ref:f},x.createElement("div",{onClick:P?null:ce,onKeyDown:P?null:ae,onMouseMove:P?null:ne,role:"radio","aria-checked":J>z?"true":"false","aria-posinset":z+1,"aria-setsize":Z,tabIndex:P?-1:0},x.createElement("div",{className:"".concat(N,"-first")},pe),x.createElement("div",{className:"".concat(N,"-second")},pe)));return W&&(_e=W(_e,c)),_e}var m=x.forwardRef(p);function L(){var c=x.useRef({});function f(N){return c.current[N]}function P(N){return function(k){c.current[N]=k}}return[f,P]}function d(c){var f=c.pageXOffset,P="scrollLeft";if(typeof f!="number"){var N=c.document;f=N.documentElement[P],typeof f!="number"&&(f=N.body[P])}return f}function g(c){var f,P,N=c.ownerDocument,k=N.body,W=N&&N.documentElement,z=c.getBoundingClientRect();return f=z.left,P=z.top,f-=W.clientLeft||k.clientLeft||0,P-=W.clientTop||k.clientTop||0,{left:f,top:P}}function A(c){var f=g(c),P=c.ownerDocument,N=P.defaultView||P.parentWindow;return f.left+=d(N),f.left}var M=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function O(c,f){var P=c.prefixCls,N=P===void 0?"rc-rate":P,k=c.className,W=c.defaultValue,z=c.value,Z=c.count,J=Z===void 0?5:Z,ee=c.allowHalf,$=ee===void 0?!1:ee,ie=c.allowClear,se=ie===void 0?!0:ie,ne=c.keyboard,ce=ne===void 0?!0:ne,ae=c.character,fe=ae===void 0?"\u2605":ae,oe=c.characterRender,pe=c.disabled,_e=c.direction,de=_e===void 0?"ltr":_e,be=c.tabIndex,Ae=be===void 0?0:be,Fe=c.autoFocus,Ue=c.onHoverChange,it=c.onChange,tt=c.onFocus,et=c.onBlur,vt=c.onKeyDown,dt=c.onMouseLeave,je=(0,b.Z)(c,M),nt=L(),rt=(0,V.Z)(nt,2),ft=rt[0],lt=rt[1],wt=x.useRef(null),Re=function(){if(!pe){var $t;($t=wt.current)===null||$t===void 0||$t.focus()}};x.useImperativeHandle(f,function(){return{focus:Re,blur:function(){if(!pe){var $t;($t=wt.current)===null||$t===void 0||$t.blur()}}}});var We=(0,w.Z)(W||0,{value:z}),Pe=(0,V.Z)(We,2),ke=Pe[0],Ze=Pe[1],Ie=(0,w.Z)(null),Ye=(0,V.Z)(Ie,2),qe=Ye[0],ot=Ye[1],gt=function($t,mn){var Xt=de==="rtl",Fn=$t+1;if($){var sr=ft($t),Cn=A(sr),tr=sr.clientWidth;(Xt&&mn-Cn>tr/2||!Xt&&mn-Cn<tr/2)&&(Fn-=.5)}return Fn},pt=function($t){Ze($t),it==null||it($t)},Lt=x.useState(!1),Tt=(0,V.Z)(Lt,2),Nt=Tt[0],jt=Tt[1],zt=function(){jt(!0),tt==null||tt()},Ot=function(){jt(!1),et==null||et()},Kt=x.useState(null),gn=(0,V.Z)(Kt,2),$n=gn[0],On=gn[1],ir=function($t,mn){var Xt=gt(mn,$t.pageX);Xt!==qe&&(On(Xt),ot(null)),Ue==null||Ue(Xt)},mr=function($t){pe||(On(null),ot(null),Ue==null||Ue(void 0)),$t&&(dt==null||dt($t))},ar=function($t,mn){var Xt=gt(mn,$t.pageX),Fn=!1;se&&(Fn=Xt===ke),mr(),pt(Fn?0:Xt),ot(Fn?Xt:null)},Vn=function($t){var mn=$t.keyCode,Xt=de==="rtl",Fn=$?.5:1;ce&&(mn===y.Z.RIGHT&&ke<J&&!Xt?(pt(ke+Fn),$t.preventDefault()):mn===y.Z.LEFT&&ke>0&&!Xt||mn===y.Z.RIGHT&&ke>0&&Xt?(pt(ke-Fn),$t.preventDefault()):mn===y.Z.LEFT&&ke<J&&Xt&&(pt(ke+Fn),$t.preventDefault())),vt==null||vt($t)};x.useEffect(function(){Fe&&!pe&&Re()},[]);var Rr=new Array(J).fill(0).map(function(an,$t){return x.createElement(m,{ref:lt($t),index:$t,count:J,disabled:pe,prefixCls:"".concat(N,"-star"),allowHalf:$,value:$n===null?ke:$n,onClick:ar,onHover:ir,key:an||$t,character:fe,characterRender:oe,focused:Nt})}),er=C()(N,k,(0,re.Z)((0,re.Z)({},"".concat(N,"-disabled"),pe),"".concat(N,"-rtl"),de==="rtl"));return x.createElement("ul",(0,X.Z)({className:er,onMouseLeave:mr,tabIndex:pe?-1:Ae,onFocus:pe?null:zt,onBlur:pe?null:Ot,onKeyDown:pe?null:Vn,ref:wt},(0,T.Z)(je,{aria:!0,data:!0,attr:!0})),Rr)}var S=x.forwardRef(O),I=S},69582:function(Se,Ce,Y){"use strict";Y.d(Ce,{ZP:function(){return w}});var X=Y(52487),re=Y(59301),V=Y(47273),b=0,U=(0,V.Z)();function C(){var y;return U?(y=b,b+=1):y="TEST_OR_SSR",y}function w(y){var T=re.useState(),x=(0,X.Z)(T,2),p=x[0],m=x[1];return re.useEffect(function(){m("rc_select_".concat(C()))},[]),y||p}},45560:function(Se,Ce,Y){"use strict";Y.d(Ce,{Ac:function(){return Lt},Xo:function(){return Nt},Wx:function(){return zt},ZP:function(){return De},lk:function(){return I}});var X=Y(72308),re=Y(80702),V=Y(49618),b=Y(77321),U=Y(52487),C=Y(74416),w=Y(62853),y=Y(18929),T=Y(48736),x=Y(59301),p=Y(92310),m=Y.n(p),L=Y(34280),d=Y(49658),g=Y(8654),A=function(Me){var Be=Me.className,He=Me.customizeIcon,Ge=Me.customizeIconProps,Ve=Me.children,Ke=Me.onMouseDown,at=Me.onClick,Le=typeof He=="function"?He(Ge):He;return x.createElement("span",{className:Be,onMouseDown:function(ut){ut.preventDefault(),Ke==null||Ke(ut)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:at,"aria-hidden":!0},Le!==void 0?Le:x.createElement("span",{className:m()(Be.split(/\s+/).map(function(Qe){return"".concat(Qe,"-icon")}))},Ve))},M=A,O=function(Me,Be,He,Ge,Ve){var Ke=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,at=arguments.length>6?arguments[6]:void 0,Le=arguments.length>7?arguments[7]:void 0,Qe=x.useMemo(function(){if((0,w.Z)(Ge)==="object")return Ge.clearIcon;if(Ve)return Ve},[Ge,Ve]),ut=x.useMemo(function(){return!!(!Ke&&Ge&&(He.length||at)&&!(Le==="combobox"&&at===""))},[Ge,Ke,He.length,at,Le]);return{allowClear:ut,clearIcon:x.createElement(M,{className:"".concat(Me,"-clear"),onMouseDown:Be,customizeIcon:Qe},"\xD7")}},S=x.createContext(null);function I(){return x.useContext(S)}function c(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Me=x.useState(!1),Be=(0,U.Z)(Me,2),He=Be[0],Ge=Be[1],Ve=x.useRef(null),Ke=function(){window.clearTimeout(Ve.current)};x.useEffect(function(){return Ke},[]);var at=function(Qe,ut){Ke(),Ve.current=window.setTimeout(function(){Ge(Qe),ut&&ut()},ye)};return[He,at,Ke]}function f(){var ye=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Me=x.useRef(null),Be=x.useRef(null);x.useEffect(function(){return function(){window.clearTimeout(Be.current)}},[]);function He(Ge){(Ge||Me.current===null)&&(Me.current=Ge),window.clearTimeout(Be.current),Be.current=window.setTimeout(function(){Me.current=null},ye)}return[function(){return Me.current},He]}function P(ye,Me,Be,He){var Ge=x.useRef(null);Ge.current={open:Me,triggerOpen:Be,customizedTrigger:He},x.useEffect(function(){function Ve(Ke){var at;if(!((at=Ge.current)!==null&&at!==void 0&&at.customizedTrigger)){var Le=Ke.target;Le.shadowRoot&&Ke.composed&&(Le=Ke.composedPath()[0]||Le),Ge.current.open&&ye().filter(function(Qe){return Qe}).every(function(Qe){return!Qe.contains(Le)&&Qe!==Le})&&Ge.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ve),function(){return window.removeEventListener("mousedown",Ve)}},[])}var N=Y(10228);function k(ye){return ye&&![N.Z.ESC,N.Z.SHIFT,N.Z.BACKSPACE,N.Z.TAB,N.Z.WIN_KEY,N.Z.ALT,N.Z.META,N.Z.WIN_KEY_RIGHT,N.Z.CTRL,N.Z.SEMICOLON,N.Z.EQUALS,N.Z.CAPS_LOCK,N.Z.CONTEXT_MENU,N.Z.F1,N.Z.F2,N.Z.F3,N.Z.F4,N.Z.F5,N.Z.F6,N.Z.F7,N.Z.F8,N.Z.F9,N.Z.F10,N.Z.F11,N.Z.F12].includes(ye)}var W=Y(26112),z=Y(11780),Z=function(Me,Be){var He,Ge=Me.prefixCls,Ve=Me.id,Ke=Me.inputElement,at=Me.disabled,Le=Me.tabIndex,Qe=Me.autoFocus,ut=Me.autoComplete,bt=Me.editable,It=Me.activeDescendantId,Ct=Me.value,_t=Me.maxLength,St=Me.onKeyDown,Bt=Me.onMouseDown,$e=Me.onChange,xt=Me.onPaste,Rt=Me.onCompositionStart,Mt=Me.onCompositionEnd,rn=Me.onBlur,Ft=Me.open,Yt=Me.attrs,qt=Ke||x.createElement("input",null),cn=qt,ln=cn.ref,nn=cn.props,Pn=nn.onKeyDown,Nn=nn.onChange,hn=nn.onMouseDown,wn=nn.onCompositionStart,Zn=nn.onCompositionEnd,Wn=nn.onBlur,Tn=nn.style;return(0,T.Kp)(!("maxLength"in qt.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),qt=x.cloneElement(qt,(0,b.Z)((0,b.Z)((0,b.Z)({type:"search"},nn),{},{id:Ve,ref:(0,g.sQ)(Be,ln),disabled:at,tabIndex:Le,autoComplete:ut||"off",autoFocus:Qe,className:m()("".concat(Ge,"-selection-search-input"),(He=qt)===null||He===void 0||(He=He.props)===null||He===void 0?void 0:He.className),role:"combobox","aria-expanded":Ft||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Ve,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Ve,"_list"),"aria-activedescendant":Ft?It:void 0},Yt),{},{value:bt?Ct:"",maxLength:_t,readOnly:!bt,unselectable:bt?null:"on",style:(0,b.Z)((0,b.Z)({},Tn),{},{opacity:bt?null:0}),onKeyDown:function(En){St(En),Pn&&Pn(En)},onMouseDown:function(En){Bt(En),hn&&hn(En)},onChange:function(En){$e(En),Nn&&Nn(En)},onCompositionStart:function(En){Rt(En),wn&&wn(En)},onCompositionEnd:function(En){Mt(En),Zn&&Zn(En)},onPaste:xt,onBlur:function(En){rn(En),Wn&&Wn(En)}})),qt},J=x.forwardRef(Z),ee=J;function $(ye){return Array.isArray(ye)?ye:ye!==void 0?[ye]:[]}var ie=typeof window!="undefined"&&window.document&&window.document.documentElement,se=ie;function ne(ye){return ye!=null}function ce(ye){return!ye&&ye!==0}function ae(ye){return["string","number"].includes((0,w.Z)(ye))}function fe(ye){var Me=void 0;return ye&&(ae(ye.title)?Me=ye.title.toString():ae(ye.label)&&(Me=ye.label.toString())),Me}function oe(ye,Me){se?x.useLayoutEffect(ye,Me):x.useEffect(ye,Me)}function pe(ye){var Me;return(Me=ye.key)!==null&&Me!==void 0?Me:ye.value}var _e=function(Me){Me.preventDefault(),Me.stopPropagation()},de=function(Me){var Be=Me.id,He=Me.prefixCls,Ge=Me.values,Ve=Me.open,Ke=Me.searchValue,at=Me.autoClearSearchValue,Le=Me.inputRef,Qe=Me.placeholder,ut=Me.disabled,bt=Me.mode,It=Me.showSearch,Ct=Me.autoFocus,_t=Me.autoComplete,St=Me.activeDescendantId,Bt=Me.tabIndex,$e=Me.removeIcon,xt=Me.maxTagCount,Rt=Me.maxTagTextLength,Mt=Me.maxTagPlaceholder,rn=Mt===void 0?function(ur){return"+ ".concat(ur.length," ...")}:Mt,Ft=Me.tagRender,Yt=Me.onToggleOpen,qt=Me.onRemove,cn=Me.onInputChange,ln=Me.onInputPaste,nn=Me.onInputKeyDown,Pn=Me.onInputMouseDown,Nn=Me.onInputCompositionStart,hn=Me.onInputCompositionEnd,wn=Me.onInputBlur,Zn=x.useRef(null),Wn=(0,x.useState)(0),Tn=(0,U.Z)(Wn,2),nr=Tn[0],En=Tn[1],Kn=(0,x.useState)(!1),kr=(0,U.Z)(Kn,2),xi=kr[0],ri=kr[1],br="".concat(He,"-selection"),bi=Ve||bt==="multiple"&&at===!1||bt==="tags"?Ke:"",Cr=bt==="tags"||bt==="multiple"&&at===!1||It&&(Ve||xi);oe(function(){En(Zn.current.scrollWidth)},[bi]);var fa=function(Gt,Vt,vn,Dn,Ln){return x.createElement("span",{title:fe(Gt),className:m()("".concat(br,"-item"),(0,V.Z)({},"".concat(br,"-item-disabled"),vn))},x.createElement("span",{className:"".concat(br,"-item-content")},Vt),Dn&&x.createElement(M,{className:"".concat(br,"-item-remove"),onMouseDown:_e,onClick:Ln,customizeIcon:$e},"\xD7"))},Vi=function(Gt,Vt,vn,Dn,Ln,Yr){var ii=function(Aa){_e(Aa),Yt(!Ve)};return x.createElement("span",{onMouseDown:ii},Ft({label:Vt,value:Gt,disabled:vn,closable:Dn,onClose:Ln,isMaxTag:!!Yr}))},di=function(Gt){var Vt=Gt.disabled,vn=Gt.label,Dn=Gt.value,Ln=!ut&&!Vt,Yr=vn;if(typeof Rt=="number"&&(typeof vn=="string"||typeof vn=="number")){var ii=String(Yr);ii.length>Rt&&(Yr="".concat(ii.slice(0,Rt),"..."))}var Ma=function(Hr){Hr&&Hr.stopPropagation(),qt(Gt)};return typeof Ft=="function"?Vi(Dn,Yr,Vt,Ln,Ma):fa(Gt,Yr,Vt,Ln,Ma)},Gn=function(Gt){if(!Ge.length)return null;var Vt=typeof rn=="function"?rn(Gt):rn;return typeof Ft=="function"?Vi(void 0,Vt,!1,!1,void 0,!0):fa({title:Vt},Vt,!1)},_n=x.createElement("div",{className:"".concat(br,"-search"),style:{width:nr},onFocus:function(){ri(!0)},onBlur:function(){ri(!1)}},x.createElement(ee,{ref:Le,open:Ve,prefixCls:He,id:Be,inputElement:null,disabled:ut,autoFocus:Ct,autoComplete:_t,editable:Cr,activeDescendantId:St,value:bi,onKeyDown:nn,onMouseDown:Pn,onChange:cn,onPaste:ln,onCompositionStart:Nn,onCompositionEnd:hn,onBlur:wn,tabIndex:Bt,attrs:(0,W.Z)(Me,!0)}),x.createElement("span",{ref:Zn,className:"".concat(br,"-search-mirror"),"aria-hidden":!0},bi,"\xA0")),Hn=x.createElement(z.Z,{prefixCls:"".concat(br,"-overflow"),data:Ge,renderItem:di,renderRest:Gn,suffix:_n,itemKey:pe,maxCount:xt});return x.createElement("span",{className:"".concat(br,"-wrap")},Hn,!Ge.length&&!bi&&x.createElement("span",{className:"".concat(br,"-placeholder")},Qe))},be=de,Ae=function(Me){var Be=Me.inputElement,He=Me.prefixCls,Ge=Me.id,Ve=Me.inputRef,Ke=Me.disabled,at=Me.autoFocus,Le=Me.autoComplete,Qe=Me.activeDescendantId,ut=Me.mode,bt=Me.open,It=Me.values,Ct=Me.placeholder,_t=Me.tabIndex,St=Me.showSearch,Bt=Me.searchValue,$e=Me.activeValue,xt=Me.maxLength,Rt=Me.onInputKeyDown,Mt=Me.onInputMouseDown,rn=Me.onInputChange,Ft=Me.onInputPaste,Yt=Me.onInputCompositionStart,qt=Me.onInputCompositionEnd,cn=Me.onInputBlur,ln=Me.title,nn=x.useState(!1),Pn=(0,U.Z)(nn,2),Nn=Pn[0],hn=Pn[1],wn=ut==="combobox",Zn=wn||St,Wn=It[0],Tn=Bt||"";wn&&$e&&!Nn&&(Tn=$e),x.useEffect(function(){wn&&hn(!1)},[wn,$e]);var nr=ut!=="combobox"&&!bt&&!St?!1:!!Tn,En=ln===void 0?fe(Wn):ln,Kn=x.useMemo(function(){return Wn?null:x.createElement("span",{className:"".concat(He,"-selection-placeholder"),style:nr?{visibility:"hidden"}:void 0},Ct)},[Wn,nr,Ct,He]);return x.createElement("span",{className:"".concat(He,"-selection-wrap")},x.createElement("span",{className:"".concat(He,"-selection-search")},x.createElement(ee,{ref:Ve,prefixCls:He,id:Ge,open:bt,inputElement:Be,disabled:Ke,autoFocus:at,autoComplete:Le,editable:Zn,activeDescendantId:Qe,value:Tn,onKeyDown:Rt,onMouseDown:Mt,onChange:function(xi){hn(!0),rn(xi)},onPaste:Ft,onCompositionStart:Yt,onCompositionEnd:qt,onBlur:cn,tabIndex:_t,attrs:(0,W.Z)(Me,!0),maxLength:wn?xt:void 0})),!wn&&Wn?x.createElement("span",{className:"".concat(He,"-selection-item"),title:En,style:nr?{visibility:"hidden"}:void 0},Wn.label):null,Kn)},Fe=Ae,Ue=function(Me,Be){var He=(0,x.useRef)(null),Ge=(0,x.useRef)(!1),Ve=Me.prefixCls,Ke=Me.open,at=Me.mode,Le=Me.showSearch,Qe=Me.tokenWithEnter,ut=Me.disabled,bt=Me.prefix,It=Me.autoClearSearchValue,Ct=Me.onSearch,_t=Me.onSearchSubmit,St=Me.onToggleOpen,Bt=Me.onInputKeyDown,$e=Me.onInputBlur,xt=Me.domRef;x.useImperativeHandle(Be,function(){return{focus:function(En){He.current.focus(En)},blur:function(){He.current.blur()}}});var Rt=f(0),Mt=(0,U.Z)(Rt,2),rn=Mt[0],Ft=Mt[1],Yt=function(En){var Kn=En.which,kr=He.current instanceof HTMLTextAreaElement;!kr&&Ke&&(Kn===N.Z.UP||Kn===N.Z.DOWN)&&En.preventDefault(),Bt&&Bt(En),Kn===N.Z.ENTER&&at==="tags"&&!Ge.current&&!Ke&&(_t==null||_t(En.target.value)),!(kr&&!Ke&&~[N.Z.UP,N.Z.DOWN,N.Z.LEFT,N.Z.RIGHT].indexOf(Kn))&&k(Kn)&&St(!0)},qt=function(){Ft(!0)},cn=(0,x.useRef)(null),ln=function(En){Ct(En,!0,Ge.current)!==!1&&St(!0)},nn=function(){Ge.current=!0},Pn=function(En){Ge.current=!1,at!=="combobox"&&ln(En.target.value)},Nn=function(En){var Kn=En.target.value;if(Qe&&cn.current&&/[\r\n]/.test(cn.current)){var kr=cn.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Kn=Kn.replace(kr,cn.current)}cn.current=null,ln(Kn)},hn=function(En){var Kn=En.clipboardData,kr=Kn==null?void 0:Kn.getData("text");cn.current=kr||""},wn=function(En){var Kn=En.target;if(Kn!==He.current){var kr=document.body.style.msTouchAction!==void 0;kr?setTimeout(function(){He.current.focus()}):He.current.focus()}},Zn=function(En){var Kn=rn();En.target!==He.current&&!Kn&&!(at==="combobox"&&ut)&&En.preventDefault(),(at!=="combobox"&&(!Le||!Kn)||!Ke)&&(Ke&&It!==!1&&Ct("",!0,!1),St())},Wn={inputRef:He,onInputKeyDown:Yt,onInputMouseDown:qt,onInputChange:Nn,onInputPaste:hn,onInputCompositionStart:nn,onInputCompositionEnd:Pn,onInputBlur:$e},Tn=at==="multiple"||at==="tags"?x.createElement(be,(0,X.Z)({},Me,Wn)):x.createElement(Fe,(0,X.Z)({},Me,Wn));return x.createElement("div",{ref:xt,className:"".concat(Ve,"-selector"),onClick:wn,onMouseDown:Zn},bt&&x.createElement("div",{className:"".concat(Ve,"-prefix")},bt),Tn)},it=x.forwardRef(Ue),tt=it,et=Y(65352),vt=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],dt=function(Me){var Be=Me===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Be,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Be,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Be,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Be,adjustY:1},htmlRegion:"scroll"}}},je=function(Me,Be){var He=Me.prefixCls,Ge=Me.disabled,Ve=Me.visible,Ke=Me.children,at=Me.popupElement,Le=Me.animation,Qe=Me.transitionName,ut=Me.dropdownStyle,bt=Me.dropdownClassName,It=Me.direction,Ct=It===void 0?"ltr":It,_t=Me.placement,St=Me.builtinPlacements,Bt=Me.dropdownMatchSelectWidth,$e=Me.dropdownRender,xt=Me.dropdownAlign,Rt=Me.getPopupContainer,Mt=Me.empty,rn=Me.getTriggerDOMNode,Ft=Me.onPopupVisibleChange,Yt=Me.onPopupMouseEnter,qt=(0,C.Z)(Me,vt),cn="".concat(He,"-dropdown"),ln=at;$e&&(ln=$e(at));var nn=x.useMemo(function(){return St||dt(Bt)},[St,Bt]),Pn=Le?"".concat(cn,"-").concat(Le):Qe,Nn=typeof Bt=="number",hn=x.useMemo(function(){return Nn?null:Bt===!1?"minWidth":"width"},[Bt,Nn]),wn=ut;Nn&&(wn=(0,b.Z)((0,b.Z)({},wn),{},{width:Bt}));var Zn=x.useRef(null);return x.useImperativeHandle(Be,function(){return{getPopupElement:function(){var Tn;return(Tn=Zn.current)===null||Tn===void 0?void 0:Tn.popupElement}}}),x.createElement(et.Z,(0,X.Z)({},qt,{showAction:Ft?["click"]:[],hideAction:Ft?["click"]:[],popupPlacement:_t||(Ct==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:nn,prefixCls:cn,popupTransitionName:Pn,popup:x.createElement("div",{onMouseEnter:Yt},ln),ref:Zn,stretch:hn,popupAlign:xt,popupVisible:Ve,getPopupContainer:Rt,popupClassName:m()(bt,(0,V.Z)({},"".concat(cn,"-empty"),Mt)),popupStyle:wn,getTriggerDOMNode:rn,onPopupVisibleChange:Ft}),Ke)},nt=x.forwardRef(je),rt=nt,ft=Y(68413);function lt(ye,Me){var Be=ye.key,He;return"value"in ye&&(He=ye.value),Be!=null?Be:He!==void 0?He:"rc-index-key-".concat(Me)}function wt(ye){return typeof ye!="undefined"&&!Number.isNaN(ye)}function Re(ye,Me){var Be=ye||{},He=Be.label,Ge=Be.value,Ve=Be.options,Ke=Be.groupLabel,at=He||(Me?"children":"label");return{label:at,value:Ge||"value",options:Ve||"options",groupLabel:Ke||at}}function We(ye){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Be=Me.fieldNames,He=Me.childrenAsData,Ge=[],Ve=Re(Be,!1),Ke=Ve.label,at=Ve.value,Le=Ve.options,Qe=Ve.groupLabel;function ut(bt,It){Array.isArray(bt)&&bt.forEach(function(Ct){if(It||!(Le in Ct)){var _t=Ct[at];Ge.push({key:lt(Ct,Ge.length),groupOption:It,data:Ct,label:Ct[Ke],value:_t})}else{var St=Ct[Qe];St===void 0&&He&&(St=Ct.label),Ge.push({key:lt(Ct,Ge.length),group:!0,data:Ct,label:St}),ut(Ct[Le],!0)}})}return ut(ye,!1),Ge}function Pe(ye){var Me=(0,b.Z)({},ye);return"props"in Me||Object.defineProperty(Me,"props",{get:function(){return(0,T.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Me}}),Me}var ke=function(Me,Be,He){if(!Be||!Be.length)return null;var Ge=!1,Ve=function at(Le,Qe){var ut=(0,ft.Z)(Qe),bt=ut[0],It=ut.slice(1);if(!bt)return[Le];var Ct=Le.split(bt);return Ge=Ge||Ct.length>1,Ct.reduce(function(_t,St){return[].concat((0,re.Z)(_t),(0,re.Z)(at(St,It)))},[]).filter(Boolean)},Ke=Ve(Me,Be);return Ge?typeof He!="undefined"?Ke.slice(0,He):Ke:null},Ze=x.createContext(null),Ie=Ze;function Ye(ye){var Me=ye.visible,Be=ye.values;if(!Me)return null;var He=50;return x.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Be.slice(0,He).map(function(Ge){var Ve=Ge.label,Ke=Ge.value;return["number","string"].includes((0,w.Z)(Ve))?Ve:Ke}).join(", ")),Be.length>He?", ...":null)}var qe=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],ot=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],gt=function(Me){return Me==="tags"||Me==="multiple"},pt=x.forwardRef(function(ye,Me){var Be,He=ye.id,Ge=ye.prefixCls,Ve=ye.className,Ke=ye.showSearch,at=ye.tagRender,Le=ye.direction,Qe=ye.omitDomProps,ut=ye.displayValues,bt=ye.onDisplayValuesChange,It=ye.emptyOptions,Ct=ye.notFoundContent,_t=Ct===void 0?"Not Found":Ct,St=ye.onClear,Bt=ye.mode,$e=ye.disabled,xt=ye.loading,Rt=ye.getInputElement,Mt=ye.getRawInputElement,rn=ye.open,Ft=ye.defaultOpen,Yt=ye.onDropdownVisibleChange,qt=ye.activeValue,cn=ye.onActiveValueChange,ln=ye.activeDescendantId,nn=ye.searchValue,Pn=ye.autoClearSearchValue,Nn=ye.onSearch,hn=ye.onSearchSplit,wn=ye.tokenSeparators,Zn=ye.allowClear,Wn=ye.prefix,Tn=ye.suffixIcon,nr=ye.clearIcon,En=ye.OptionList,Kn=ye.animation,kr=ye.transitionName,xi=ye.dropdownStyle,ri=ye.dropdownClassName,br=ye.dropdownMatchSelectWidth,bi=ye.dropdownRender,Cr=ye.dropdownAlign,fa=ye.placement,Vi=ye.builtinPlacements,di=ye.getPopupContainer,Gn=ye.showAction,_n=Gn===void 0?[]:Gn,Hn=ye.onFocus,ur=ye.onBlur,Gt=ye.onKeyUp,Vt=ye.onKeyDown,vn=ye.onMouseDown,Dn=(0,C.Z)(ye,qe),Ln=gt(Bt),Yr=(Ke!==void 0?Ke:Ln)||Bt==="combobox",ii=(0,b.Z)({},Dn);ot.forEach(function(cr){delete ii[cr]}),Qe==null||Qe.forEach(function(cr){delete ii[cr]});var Ma=x.useState(!1),Aa=(0,U.Z)(Ma,2),Hr=Aa[0],rs=Aa[1];x.useEffect(function(){rs((0,d.Z)())},[]);var lo=x.useRef(null),Ga=x.useRef(null),Zi=x.useRef(null),da=x.useRef(null),wi=x.useRef(null),ws=x.useRef(!1),uo=c(),Hs=(0,U.Z)(uo,3),Ha=Hs[0],Ta=Hs[1],Ll=Hs[2];x.useImperativeHandle(Me,function(){var cr,jn;return{focus:(cr=da.current)===null||cr===void 0?void 0:cr.focus,blur:(jn=da.current)===null||jn===void 0?void 0:jn.blur,scrollTo:function(ta){var ai;return(ai=wi.current)===null||ai===void 0?void 0:ai.scrollTo(ta)},nativeElement:lo.current||Ga.current}});var ja=x.useMemo(function(){var cr;if(Bt!=="combobox")return nn;var jn=(cr=ut[0])===null||cr===void 0?void 0:cr.value;return typeof jn=="string"||typeof jn=="number"?String(jn):""},[nn,Bt,ut]),bu=Bt==="combobox"&&typeof Rt=="function"&&Rt()||null,va=typeof Mt=="function"&&Mt(),zc=(0,g.x1)(Ga,va==null||(Be=va.props)===null||Be===void 0?void 0:Be.ref),wu=x.useState(!1),Mu=(0,U.Z)(wu,2),Uc=Mu[0],Au=Mu[1];(0,L.Z)(function(){Au(!0)},[]);var Tu=(0,y.Z)(!1,{defaultValue:Ft,value:rn}),co=(0,U.Z)(Tu,2),Rl=co[0],Il=co[1],vi=Uc?Rl:!1,Su=!_t&&It;($e||Su&&vi&&Bt==="combobox")&&(vi=!1);var Fr=Su?!1:vi,bn=x.useCallback(function(cr){var jn=cr!==void 0?cr:!vi;$e||(Il(jn),vi!==jn&&(Yt==null||Yt(jn)))},[$e,vi,Il,Yt]),Mn=x.useMemo(function(){return(wn||[]).some(function(cr){return[`
|
|
|
`,`\r
|
|
|
`].includes(cr)})},[wn]),Sn=x.useContext(Ie)||{},Rn=Sn.maxCount,Qn=Sn.rawValues,zr=function(jn,ea,ta){if(!(Ln&&wt(Rn)&&(Qn==null?void 0:Qn.size)>=Rn)){var ai=!0,Ci=jn;cn==null||cn(null);var Ss=ke(jn,wn,wt(Rn)?Rn-Qn.size:void 0),as=ta?null:Ss;return Bt!=="combobox"&&as&&(Ci="",hn==null||hn(as),bn(!1),ai=!1),Nn&&ja!==Ci&&Nn(Ci,{source:ea?"typing":"effect"}),ai}},Ms=function(jn){!jn||!jn.trim()||Nn(jn,{source:"submit"})};x.useEffect(function(){!vi&&!Ln&&Bt!=="combobox"&&zr("",!1,!1)},[vi]),x.useEffect(function(){Rl&&$e&&Il(!1),$e&&!ws.current&&Ta(!1)},[$e]);var is=f(),js=(0,U.Z)(is,2),Mi=js[0],As=js[1],ho=x.useRef(!1),Vo=function(jn){var ea=Mi(),ta=jn.key,ai=ta==="Enter";if(ai&&(Bt!=="combobox"&&jn.preventDefault(),vi||bn(!0)),As(!!ja),ta==="Backspace"&&!ea&&Ln&&!ja&&ut.length){for(var Ci=(0,re.Z)(ut),Ss=null,as=Ci.length-1;as>=0;as-=1){var fo=Ci[as];if(!fo.disabled){Ci.splice(as,1),Ss=fo;break}}Ss&&bt(Ci,{type:"remove",values:[Ss]})}for(var Ko=arguments.length,vo=new Array(Ko>1?Ko-1:0),Ou=1;Ou<Ko;Ou++)vo[Ou-1]=arguments[Ou];if(vi&&(!ai||!ho.current)){var Cu;ai&&(ho.current=!0),(Cu=wi.current)===null||Cu===void 0||Cu.onKeyDown.apply(Cu,[jn].concat(vo))}Vt==null||Vt.apply(void 0,[jn].concat(vo))},uv=function(jn){for(var ea=arguments.length,ta=new Array(ea>1?ea-1:0),ai=1;ai<ea;ai++)ta[ai-1]=arguments[ai];if(vi){var Ci;(Ci=wi.current)===null||Ci===void 0||Ci.onKeyUp.apply(Ci,[jn].concat(ta))}jn.key==="Enter"&&(ho.current=!1),Gt==null||Gt.apply(void 0,[jn].concat(ta))},Vs=function(jn){var ea=ut.filter(function(ta){return ta!==jn});bt(ea,{type:"remove",values:[jn]})},Ts=function(){ho.current=!1},Pu=x.useRef(!1),Nl=function(){Ta(!0),$e||(Hn&&!Pu.current&&Hn.apply(void 0,arguments),_n.includes("focus")&&bn(!0)),Pu.current=!0},Up=function(){ws.current=!0,Ta(!1,function(){Pu.current=!1,ws.current=!1,bn(!1)}),!$e&&(ja&&(Bt==="tags"?Nn(ja,{source:"submit"}):Bt==="multiple"&&Nn("",{source:"blur"})),ur&&ur.apply(void 0,arguments))},Zo=[];x.useEffect(function(){return function(){Zo.forEach(function(cr){return clearTimeout(cr)}),Zo.splice(0,Zo.length)}},[]);var cv=function(jn){var ea,ta=jn.target,ai=(ea=Zi.current)===null||ea===void 0?void 0:ea.getPopupElement();if(ai&&ai.contains(ta)){var Ci=setTimeout(function(){var Ko=Zo.indexOf(Ci);if(Ko!==-1&&Zo.splice(Ko,1),Ll(),!Hr&&!ai.contains(document.activeElement)){var vo;(vo=da.current)===null||vo===void 0||vo.focus()}});Zo.push(Ci)}for(var Ss=arguments.length,as=new Array(Ss>1?Ss-1:0),fo=1;fo<Ss;fo++)as[fo-1]=arguments[fo];vn==null||vn.apply(void 0,[jn].concat(as))},Bl=x.useState({}),Wc=(0,U.Z)(Bl,2),Wp=Wc[1];function Gc(){Wp({})}var Hc;va&&(Hc=function(jn){bn(jn)}),P(function(){var cr;return[lo.current,(cr=Zi.current)===null||cr===void 0?void 0:cr.getPopupElement()]},Fr,bn,!!va);var hv=x.useMemo(function(){return(0,b.Z)((0,b.Z)({},ye),{},{notFoundContent:_t,open:vi,triggerOpen:Fr,id:He,showSearch:Yr,multiple:Ln,toggleOpen:bn})},[ye,_t,Fr,vi,He,Yr,Ln,bn]),fv=!!Tn||xt,dv;fv&&(dv=x.createElement(M,{className:m()("".concat(Ge,"-arrow"),(0,V.Z)({},"".concat(Ge,"-arrow-loading"),xt)),customizeIcon:Tn,customizeIconProps:{loading:xt,searchValue:ja,open:vi,focused:Ha,showSearch:Yr}}));var Gp=function(){var jn;St==null||St(),(jn=da.current)===null||jn===void 0||jn.focus(),bt([],{type:"clear",values:ut}),zr("",!1,!1)},vv=O(Ge,Gp,ut,Zn,nr,$e,ja,Bt),Hp=vv.allowClear,kl=vv.clearIcon,jp=x.createElement(En,{ref:wi}),Vp=m()(Ge,Ve,(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({},"".concat(Ge,"-focused"),Ha),"".concat(Ge,"-multiple"),Ln),"".concat(Ge,"-single"),!Ln),"".concat(Ge,"-allow-clear"),Zn),"".concat(Ge,"-show-arrow"),fv),"".concat(Ge,"-disabled"),$e),"".concat(Ge,"-loading"),xt),"".concat(Ge,"-open"),vi),"".concat(Ge,"-customize-input"),bu),"".concat(Ge,"-show-search"),Yr)),gv=x.createElement(rt,{ref:Zi,disabled:$e,prefixCls:Ge,visible:Fr,popupElement:jp,animation:Kn,transitionName:kr,dropdownStyle:xi,dropdownClassName:ri,direction:Le,dropdownMatchSelectWidth:br,dropdownRender:bi,dropdownAlign:Cr,placement:fa,builtinPlacements:Vi,getPopupContainer:di,empty:It,getTriggerDOMNode:function(jn){return Ga.current||jn},onPopupVisibleChange:Hc,onPopupMouseEnter:Gc},va?x.cloneElement(va,{ref:zc}):x.createElement(tt,(0,X.Z)({},ye,{domRef:Ga,prefixCls:Ge,inputElement:bu,ref:da,id:He,prefix:Wn,showSearch:Yr,autoClearSearchValue:Pn,mode:Bt,activeDescendantId:ln,tagRender:at,values:ut,open:vi,onToggleOpen:bn,activeValue:qt,searchValue:ja,onSearch:zr,onSearchSubmit:Ms,onRemove:Vs,tokenWithEnter:Mn,onInputBlur:Ts}))),jc;return va?jc=gv:jc=x.createElement("div",(0,X.Z)({className:Vp},ii,{ref:lo,onMouseDown:cv,onKeyDown:Vo,onKeyUp:uv,onFocus:Nl,onBlur:Up}),x.createElement(Ye,{visible:Ha&&!vi,values:ut}),gv,dv,Hp&&kl),x.createElement(S.Provider,{value:hv},jc)}),Lt=pt,Tt=function(){return null};Tt.isSelectOptGroup=!0;var Nt=Tt,jt=function(){return null};jt.isSelectOption=!0;var zt=jt,Ot=Y(80547),Kt=Y(2738),gn=Y(45680);function $n(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var On=["disabled","title","children","style","className"];function ir(ye){return typeof ye=="string"||typeof ye=="number"}var mr=function(Me,Be){var He=I(),Ge=He.prefixCls,Ve=He.id,Ke=He.open,at=He.multiple,Le=He.mode,Qe=He.searchValue,ut=He.toggleOpen,bt=He.notFoundContent,It=He.onPopupScroll,Ct=x.useContext(Ie),_t=Ct.maxCount,St=Ct.flattenOptions,Bt=Ct.onActiveValue,$e=Ct.defaultActiveFirstOption,xt=Ct.onSelect,Rt=Ct.menuItemSelectedIcon,Mt=Ct.rawValues,rn=Ct.fieldNames,Ft=Ct.virtual,Yt=Ct.direction,qt=Ct.listHeight,cn=Ct.listItemHeight,ln=Ct.optionRender,nn="".concat(Ge,"-item"),Pn=(0,Ot.Z)(function(){return St},[Ke,St],function(Gn,_n){return _n[0]&&Gn[1]!==_n[1]}),Nn=x.useRef(null),hn=x.useMemo(function(){return at&&wt(_t)&&(Mt==null?void 0:Mt.size)>=_t},[at,_t,Mt==null?void 0:Mt.size]),wn=function(_n){_n.preventDefault()},Zn=function(_n){var Hn;(Hn=Nn.current)===null||Hn===void 0||Hn.scrollTo(typeof _n=="number"?{index:_n}:_n)},Wn=x.useCallback(function(Gn){return Le==="combobox"?!1:Mt.has(Gn)},[Le,(0,re.Z)(Mt).toString(),Mt.size]),Tn=function(_n){for(var Hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ur=Pn.length,Gt=0;Gt<ur;Gt+=1){var Vt=(_n+Gt*Hn+ur)%ur,vn=Pn[Vt]||{},Dn=vn.group,Ln=vn.data;if(!Dn&&!(Ln!=null&&Ln.disabled)&&(Wn(Ln.value)||!hn))return Vt}return-1},nr=x.useState(function(){return Tn(0)}),En=(0,U.Z)(nr,2),Kn=En[0],kr=En[1],xi=function(_n){var Hn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;kr(_n);var ur={source:Hn?"keyboard":"mouse"},Gt=Pn[_n];if(!Gt){Bt(null,-1,ur);return}Bt(Gt.value,_n,ur)};(0,x.useEffect)(function(){xi($e!==!1?Tn(0):-1)},[Pn.length,Qe]);var ri=x.useCallback(function(Gn){return Le==="combobox"?String(Gn).toLowerCase()===Qe.toLowerCase():Mt.has(Gn)},[Le,Qe,(0,re.Z)(Mt).toString(),Mt.size]);(0,x.useEffect)(function(){var Gn=setTimeout(function(){if(!at&&Ke&&Mt.size===1){var Hn=Array.from(Mt)[0],ur=Pn.findIndex(function(Gt){var Vt=Gt.data;return Vt.value===Hn});ur!==-1&&(xi(ur),Zn(ur))}});if(Ke){var _n;(_n=Nn.current)===null||_n===void 0||_n.scrollTo(void 0)}return function(){return clearTimeout(Gn)}},[Ke,Qe]);var br=function(_n){_n!==void 0&&xt(_n,{selected:!Mt.has(_n)}),at||ut(!1)};if(x.useImperativeHandle(Be,function(){return{onKeyDown:function(_n){var Hn=_n.which,ur=_n.ctrlKey;switch(Hn){case N.Z.N:case N.Z.P:case N.Z.UP:case N.Z.DOWN:{var Gt=0;if(Hn===N.Z.UP?Gt=-1:Hn===N.Z.DOWN?Gt=1:$n()&&ur&&(Hn===N.Z.N?Gt=1:Hn===N.Z.P&&(Gt=-1)),Gt!==0){var Vt=Tn(Kn+Gt,Gt);Zn(Vt),xi(Vt,!0)}break}case N.Z.TAB:case N.Z.ENTER:{var vn,Dn=Pn[Kn];Dn&&!(Dn!=null&&(vn=Dn.data)!==null&&vn!==void 0&&vn.disabled)&&!hn?br(Dn.value):br(void 0),Ke&&_n.preventDefault();break}case N.Z.ESC:ut(!1),Ke&&_n.stopPropagation()}},onKeyUp:function(){},scrollTo:function(_n){Zn(_n)}}}),Pn.length===0)return x.createElement("div",{role:"listbox",id:"".concat(Ve,"_list"),className:"".concat(nn,"-empty"),onMouseDown:wn},bt);var bi=Object.keys(rn).map(function(Gn){return rn[Gn]}),Cr=function(_n){return _n.label};function fa(Gn,_n){var Hn=Gn.group;return{role:Hn?"presentation":"option",id:"".concat(Ve,"_list_").concat(_n)}}var Vi=function(_n){var Hn=Pn[_n];if(!Hn)return null;var ur=Hn.data||{},Gt=ur.value,Vt=Hn.group,vn=(0,W.Z)(ur,!0),Dn=Cr(Hn);return Hn?x.createElement("div",(0,X.Z)({"aria-label":typeof Dn=="string"&&!Vt?Dn:null},vn,{key:_n},fa(Hn,_n),{"aria-selected":ri(Gt)}),Gt):null},di={role:"listbox",id:"".concat(Ve,"_list")};return x.createElement(x.Fragment,null,Ft&&x.createElement("div",(0,X.Z)({},di,{style:{height:0,width:0,overflow:"hidden"}}),Vi(Kn-1),Vi(Kn),Vi(Kn+1)),x.createElement(gn.Z,{itemKey:"key",ref:Nn,data:Pn,height:qt,itemHeight:cn,fullHeight:!1,onMouseDown:wn,onScroll:It,virtual:Ft,direction:Yt,innerProps:Ft?null:di},function(Gn,_n){var Hn=Gn.group,ur=Gn.groupOption,Gt=Gn.data,Vt=Gn.label,vn=Gn.value,Dn=Gt.key;if(Hn){var Ln,Yr=(Ln=Gt.title)!==null&&Ln!==void 0?Ln:ir(Vt)?Vt.toString():void 0;return x.createElement("div",{className:m()(nn,"".concat(nn,"-group"),Gt.className),title:Yr},Vt!==void 0?Vt:Dn)}var ii=Gt.disabled,Ma=Gt.title,Aa=Gt.children,Hr=Gt.style,rs=Gt.className,lo=(0,C.Z)(Gt,On),Ga=(0,Kt.Z)(lo,bi),Zi=Wn(vn),da=ii||!Zi&&hn,wi="".concat(nn,"-option"),ws=m()(nn,wi,rs,(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({},"".concat(wi,"-grouped"),ur),"".concat(wi,"-active"),Kn===_n&&!da),"".concat(wi,"-disabled"),da),"".concat(wi,"-selected"),Zi)),uo=Cr(Gn),Hs=!Rt||typeof Rt=="function"||Zi,Ha=typeof uo=="number"?uo:uo||vn,Ta=ir(Ha)?Ha.toString():void 0;return Ma!==void 0&&(Ta=Ma),x.createElement("div",(0,X.Z)({},(0,W.Z)(Ga),Ft?{}:fa(Gn,_n),{"aria-selected":ri(vn),className:ws,title:Ta,onMouseMove:function(){Kn===_n||da||xi(_n)},onClick:function(){da||br(vn)},style:Hr}),x.createElement("div",{className:"".concat(wi,"-content")},typeof ln=="function"?ln(Gn,{index:_n}):Ha),x.isValidElement(Rt)||Zi,Hs&&x.createElement(M,{className:"".concat(nn,"-option-state"),customizeIcon:Rt,customizeIconProps:{value:vn,disabled:da,isSelected:Zi}},Zi?"\u2713":null))}))},ar=x.forwardRef(mr),Vn=ar,Rr=function(ye,Me){var Be=x.useRef({values:new Map,options:new Map}),He=x.useMemo(function(){var Ve=Be.current,Ke=Ve.values,at=Ve.options,Le=ye.map(function(bt){if(bt.label===void 0){var It;return(0,b.Z)((0,b.Z)({},bt),{},{label:(It=Ke.get(bt.value))===null||It===void 0?void 0:It.label})}return bt}),Qe=new Map,ut=new Map;return Le.forEach(function(bt){Qe.set(bt.value,bt),ut.set(bt.value,Me.get(bt.value)||at.get(bt.value))}),Be.current.values=Qe,Be.current.options=ut,Le},[ye,Me]),Ge=x.useCallback(function(Ve){return Me.get(Ve)||Be.current.options.get(Ve)},[Me]);return[He,Ge]};function er(ye,Me){return $(ye).join("").toUpperCase().includes(Me)}var an=function(ye,Me,Be,He,Ge){return x.useMemo(function(){if(!Be||He===!1)return ye;var Ve=Me.options,Ke=Me.label,at=Me.value,Le=[],Qe=typeof He=="function",ut=Be.toUpperCase(),bt=Qe?He:function(Ct,_t){return Ge?er(_t[Ge],ut):_t[Ve]?er(_t[Ke!=="children"?Ke:"label"],ut):er(_t[at],ut)},It=Qe?function(Ct){return Pe(Ct)}:function(Ct){return Ct};return ye.forEach(function(Ct){if(Ct[Ve]){var _t=bt(Be,It(Ct));if(_t)Le.push(Ct);else{var St=Ct[Ve].filter(function(Bt){return bt(Be,It(Bt))});St.length&&Le.push((0,b.Z)((0,b.Z)({},Ct),{},(0,V.Z)({},Ve,St)))}return}bt(Be,It(Ct))&&Le.push(Ct)}),Le},[ye,He,Ge,Be,Me])},$t=Y(69582),mn=Y(11592),Xt=["children","value"],Fn=["children"];function sr(ye){var Me=ye,Be=Me.key,He=Me.props,Ge=He.children,Ve=He.value,Ke=(0,C.Z)(He,Xt);return(0,b.Z)({key:Be,value:Ve!==void 0?Ve:Be,children:Ge},Ke)}function Cn(ye){var Me=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,mn.Z)(ye).map(function(Be,He){if(!x.isValidElement(Be)||!Be.type)return null;var Ge=Be,Ve=Ge.type.isSelectOptGroup,Ke=Ge.key,at=Ge.props,Le=at.children,Qe=(0,C.Z)(at,Fn);return Me||!Ve?sr(Be):(0,b.Z)((0,b.Z)({key:"__RC_SELECT_GRP__".concat(Ke===null?He:Ke,"__"),label:Ke},Qe),{},{options:Cn(Le)})}).filter(function(Be){return Be})}var tr=function(Me,Be,He,Ge,Ve){return x.useMemo(function(){var Ke=Me,at=!Me;at&&(Ke=Cn(Be));var Le=new Map,Qe=new Map,ut=function(Ct,_t,St){St&&typeof St=="string"&&Ct.set(_t[St],_t)},bt=function It(Ct){for(var _t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,St=0;St<Ct.length;St+=1){var Bt=Ct[St];!Bt[He.options]||_t?(Le.set(Bt[He.value],Bt),ut(Qe,Bt,He.label),ut(Qe,Bt,Ge),ut(Qe,Bt,Ve)):It(Bt[He.options],!0)}};return bt(Ke),{options:Ke,valueOptions:Le,labelOptions:Qe}},[Me,Be,He,Ge,Ve])},lr=tr;function or(ye){var Me=x.useRef();Me.current=ye;var Be=x.useCallback(function(){return Me.current.apply(Me,arguments)},[]);return Be}function Ut(ye){var Me=ye.mode,Be=ye.options,He=ye.children,Ge=ye.backfill,Ve=ye.allowClear,Ke=ye.placeholder,at=ye.getInputElement,Le=ye.showSearch,Qe=ye.onSearch,ut=ye.defaultOpen,bt=ye.autoFocus,It=ye.labelInValue,Ct=ye.value,_t=ye.inputValue,St=ye.optionLabelProp,Bt=isMultiple(Me),$e=Le!==void 0?Le:Bt||Me==="combobox",xt=Be||convertChildrenToData(He);if(warning(Me!=="tags"||xt.every(function(Ft){return!Ft.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Me==="tags"||Me==="combobox"){var Rt=xt.some(function(Ft){return Ft.options?Ft.options.some(function(Yt){return typeof("value"in Yt?Yt.value:Yt.key)=="number"}):typeof("value"in Ft?Ft.value:Ft.key)=="number"});warning(!Rt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Me!=="combobox"||!St,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Me==="combobox"||!Ge,"`backfill` only works with `combobox` mode."),warning(Me==="combobox"||!at,"`getInputElement` only work with `combobox` mode."),noteOnce(Me!=="combobox"||!at||!Ve||!Ke,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Qe&&!$e&&Me!=="combobox"&&Me!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!ut||bt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),Ct!=null){var Mt=toArray(Ct);warning(!It||Mt.every(function(Ft){return _typeof(Ft)==="object"&&("key"in Ft||"value"in Ft)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!Bt||Array.isArray(Ct),"`value` should be array when `mode` is `multiple` or `tags`")}if(He){var rn=null;toNodeArray(He).some(function(Ft){if(!React.isValidElement(Ft)||!Ft.type)return!1;var Yt=Ft,qt=Yt.type;if(qt.isSelectOption)return!1;if(qt.isSelectOptGroup){var cn=toNodeArray(Ft.props.children).every(function(ln){return!React.isValidElement(ln)||!Ft.type||ln.type.isSelectOption?!0:(rn=ln.type,!1)});return!cn}return rn=qt,!0}),rn&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(rn.displayName||rn.name||rn,"`.")),warning(_t===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function me(ye,Me){if(ye){var Be=function He(Ge){for(var Ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ke=0;Ke<Ge.length;Ke++){var at=Ge[Ke];if(at[Me==null?void 0:Me.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ve&&Array.isArray(at[Me==null?void 0:Me.options])&&He(at[Me==null?void 0:Me.options],!0))break}};Be(ye)}}var _=null,B=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],R=["inputValue"];function j(ye){return!ye||(0,w.Z)(ye)!=="object"}var Q=x.forwardRef(function(ye,Me){var Be=ye.id,He=ye.mode,Ge=ye.prefixCls,Ve=Ge===void 0?"rc-select":Ge,Ke=ye.backfill,at=ye.fieldNames,Le=ye.inputValue,Qe=ye.searchValue,ut=ye.onSearch,bt=ye.autoClearSearchValue,It=bt===void 0?!0:bt,Ct=ye.onSelect,_t=ye.onDeselect,St=ye.dropdownMatchSelectWidth,Bt=St===void 0?!0:St,$e=ye.filterOption,xt=ye.filterSort,Rt=ye.optionFilterProp,Mt=ye.optionLabelProp,rn=ye.options,Ft=ye.optionRender,Yt=ye.children,qt=ye.defaultActiveFirstOption,cn=ye.menuItemSelectedIcon,ln=ye.virtual,nn=ye.direction,Pn=ye.listHeight,Nn=Pn===void 0?200:Pn,hn=ye.listItemHeight,wn=hn===void 0?20:hn,Zn=ye.labelRender,Wn=ye.value,Tn=ye.defaultValue,nr=ye.labelInValue,En=ye.onChange,Kn=ye.maxCount,kr=(0,C.Z)(ye,B),xi=(0,$t.ZP)(Be),ri=gt(He),br=!!(!rn&&Yt),bi=x.useMemo(function(){return $e===void 0&&He==="combobox"?!1:$e},[$e,He]),Cr=x.useMemo(function(){return Re(at,br)},[JSON.stringify(at),br]),fa=(0,y.Z)("",{value:Qe!==void 0?Qe:Le,postState:function(Mn){return Mn||""}}),Vi=(0,U.Z)(fa,2),di=Vi[0],Gn=Vi[1],_n=lr(rn,Yt,Cr,Rt,Mt),Hn=_n.valueOptions,ur=_n.labelOptions,Gt=_n.options,Vt=x.useCallback(function(bn){var Mn=$(bn);return Mn.map(function(Sn){var Rn,Qn,zr,Ms,is;if(j(Sn))Rn=Sn;else{var js;zr=Sn.key,Qn=Sn.label,Rn=(js=Sn.value)!==null&&js!==void 0?js:zr}var Mi=Hn.get(Rn);if(Mi){var As;if(Qn===void 0&&(Qn=Mi==null?void 0:Mi[Mt||Cr.label]),zr===void 0&&(zr=(As=Mi==null?void 0:Mi.key)!==null&&As!==void 0?As:Rn),Ms=Mi==null?void 0:Mi.disabled,is=Mi==null?void 0:Mi.title,0)var ho}return{label:Qn,value:Rn,key:zr,disabled:Ms,title:is}})},[Cr,Mt,Hn]),vn=(0,y.Z)(Tn,{value:Wn}),Dn=(0,U.Z)(vn,2),Ln=Dn[0],Yr=Dn[1],ii=x.useMemo(function(){var bn,Mn=ri&&Ln===null?[]:Ln,Sn=Vt(Mn);return He==="combobox"&&ce((bn=Sn[0])===null||bn===void 0?void 0:bn.value)?[]:Sn},[Ln,Vt,He,ri]),Ma=Rr(ii,Hn),Aa=(0,U.Z)(Ma,2),Hr=Aa[0],rs=Aa[1],lo=x.useMemo(function(){if(!He&&Hr.length===1){var bn=Hr[0];if(bn.value===null&&(bn.label===null||bn.label===void 0))return[]}return Hr.map(function(Mn){var Sn;return(0,b.Z)((0,b.Z)({},Mn),{},{label:(Sn=typeof Zn=="function"?Zn(Mn):Mn.label)!==null&&Sn!==void 0?Sn:Mn.value})})},[He,Hr,Zn]),Ga=x.useMemo(function(){return new Set(Hr.map(function(bn){return bn.value}))},[Hr]);x.useEffect(function(){if(He==="combobox"){var bn,Mn=(bn=Hr[0])===null||bn===void 0?void 0:bn.value;Gn(ne(Mn)?String(Mn):"")}},[Hr]);var Zi=or(function(bn,Mn){var Sn=Mn!=null?Mn:bn;return(0,V.Z)((0,V.Z)({},Cr.value,bn),Cr.label,Sn)}),da=x.useMemo(function(){if(He!=="tags")return Gt;var bn=(0,re.Z)(Gt),Mn=function(Rn){return Hn.has(Rn)};return(0,re.Z)(Hr).sort(function(Sn,Rn){return Sn.value<Rn.value?-1:1}).forEach(function(Sn){var Rn=Sn.value;Mn(Rn)||bn.push(Zi(Rn,Sn.label))}),bn},[Zi,Gt,Hn,Hr,He]),wi=an(da,Cr,di,bi,Rt),ws=x.useMemo(function(){return He!=="tags"||!di||wi.some(function(bn){return bn[Rt||"value"]===di})||wi.some(function(bn){return bn[Cr.value]===di})?wi:[Zi(di)].concat((0,re.Z)(wi))},[Zi,Rt,He,wi,di,Cr]),uo=function bn(Mn){var Sn=(0,re.Z)(Mn).sort(function(Rn,Qn){return xt(Rn,Qn,{searchValue:di})});return Sn.map(function(Rn){return Array.isArray(Rn.options)?(0,b.Z)((0,b.Z)({},Rn),{},{options:Rn.options.length>0?bn(Rn.options):Rn.options}):Rn})},Hs=x.useMemo(function(){return xt?uo(ws):ws},[ws,xt,di]),Ha=x.useMemo(function(){return We(Hs,{fieldNames:Cr,childrenAsData:br})},[Hs,Cr,br]),Ta=function(Mn){var Sn=Vt(Mn);if(Yr(Sn),En&&(Sn.length!==Hr.length||Sn.some(function(zr,Ms){var is;return((is=Hr[Ms])===null||is===void 0?void 0:is.value)!==(zr==null?void 0:zr.value)}))){var Rn=nr?Sn:Sn.map(function(zr){return zr.value}),Qn=Sn.map(function(zr){return Pe(rs(zr.value))});En(ri?Rn:Rn[0],ri?Qn:Qn[0])}},Ll=x.useState(null),ja=(0,U.Z)(Ll,2),bu=ja[0],va=ja[1],zc=x.useState(0),wu=(0,U.Z)(zc,2),Mu=wu[0],Uc=wu[1],Au=qt!==void 0?qt:He!=="combobox",Tu=x.useCallback(function(bn,Mn){var Sn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Rn=Sn.source,Qn=Rn===void 0?"keyboard":Rn;Uc(Mn),Ke&&He==="combobox"&&bn!==null&&Qn==="keyboard"&&va(String(bn))},[Ke,He]),co=function(Mn,Sn,Rn){var Qn=function(){var Vs,Ts=rs(Mn);return[nr?{label:Ts==null?void 0:Ts[Cr.label],value:Mn,key:(Vs=Ts==null?void 0:Ts.key)!==null&&Vs!==void 0?Vs:Mn}:Mn,Pe(Ts)]};if(Sn&&Ct){var zr=Qn(),Ms=(0,U.Z)(zr,2),is=Ms[0],js=Ms[1];Ct(is,js)}else if(!Sn&&_t&&Rn!=="clear"){var Mi=Qn(),As=(0,U.Z)(Mi,2),ho=As[0],Vo=As[1];_t(ho,Vo)}},Rl=or(function(bn,Mn){var Sn,Rn=ri?Mn.selected:!0;Rn?Sn=ri?[].concat((0,re.Z)(Hr),[bn]):[bn]:Sn=Hr.filter(function(Qn){return Qn.value!==bn}),Ta(Sn),co(bn,Rn),He==="combobox"?va(""):(!gt||It)&&(Gn(""),va(""))}),Il=function(Mn,Sn){Ta(Mn);var Rn=Sn.type,Qn=Sn.values;(Rn==="remove"||Rn==="clear")&&Qn.forEach(function(zr){co(zr.value,!1,Rn)})},vi=function(Mn,Sn){if(Gn(Mn),va(null),Sn.source==="submit"){var Rn=(Mn||"").trim();if(Rn){var Qn=Array.from(new Set([].concat((0,re.Z)(Ga),[Rn])));Ta(Qn),co(Rn,!0),Gn("")}return}Sn.source!=="blur"&&(He==="combobox"&&Ta(Mn),ut==null||ut(Mn))},Su=function(Mn){var Sn=Mn;He!=="tags"&&(Sn=Mn.map(function(Qn){var zr=ur.get(Qn);return zr==null?void 0:zr.value}).filter(function(Qn){return Qn!==void 0}));var Rn=Array.from(new Set([].concat((0,re.Z)(Ga),(0,re.Z)(Sn))));Ta(Rn),Rn.forEach(function(Qn){co(Qn,!0)})},Fr=x.useMemo(function(){var bn=ln!==!1&&Bt!==!1;return(0,b.Z)((0,b.Z)({},_n),{},{flattenOptions:Ha,onActiveValue:Tu,defaultActiveFirstOption:Au,onSelect:Rl,menuItemSelectedIcon:cn,rawValues:Ga,fieldNames:Cr,virtual:bn,direction:nn,listHeight:Nn,listItemHeight:wn,childrenAsData:br,maxCount:Kn,optionRender:Ft})},[Kn,_n,Ha,Tu,Au,Rl,cn,Ga,Cr,ln,Bt,nn,Nn,wn,br,Ft]);return x.createElement(Ie.Provider,{value:Fr},x.createElement(Lt,(0,X.Z)({},kr,{id:xi,prefixCls:Ve,ref:Me,omitDomProps:R,mode:He,displayValues:lo,onDisplayValuesChange:Il,direction:nn,searchValue:di,onSearch:vi,autoClearSearchValue:It,onSearchSplit:Su,dropdownMatchSelectWidth:Bt,OptionList:Vn,emptyOptions:!Ha.length,activeValue:bu,activeDescendantId:"".concat(xi,"_list_").concat(Mu)})))}),Ee=Q;Ee.Option=zt,Ee.OptGroup=Nt;var we=Ee,De=we},22711:function(Se,Ce,Y){"use strict";Y.r(Ce),Y.d(Ce,{ResizableTextArea:function(){return J},default:function(){return se}});var X=Y(72308),re=Y(49618),V=Y(77321),b=Y(80702),U=Y(52487),C=Y(74416),w=Y(92310),y=Y.n(w),T=Y(36901),x=Y(66003),p=Y(30292),m=Y(18929),L=Y(59301),d=Y(62853),g=Y(29301),A=Y(34280),M=Y(16089),O=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,S=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],I={},c;function f(ne){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=ne.getAttribute("id")||ne.getAttribute("data-reactid")||ne.getAttribute("name");if(ce&&I[ae])return I[ae];var fe=window.getComputedStyle(ne),oe=fe.getPropertyValue("box-sizing")||fe.getPropertyValue("-moz-box-sizing")||fe.getPropertyValue("-webkit-box-sizing"),pe=parseFloat(fe.getPropertyValue("padding-bottom"))+parseFloat(fe.getPropertyValue("padding-top")),_e=parseFloat(fe.getPropertyValue("border-bottom-width"))+parseFloat(fe.getPropertyValue("border-top-width")),de=S.map(function(Ae){return"".concat(Ae,":").concat(fe.getPropertyValue(Ae))}).join(";"),be={sizingStyle:de,paddingSize:pe,borderSize:_e,boxSizing:oe};return ce&&ae&&(I[ae]=be),be}function P(ne){var ce=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ae=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,fe=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;c||(c=document.createElement("textarea"),c.setAttribute("tab-index","-1"),c.setAttribute("aria-hidden","true"),c.setAttribute("name","hiddenTextarea"),document.body.appendChild(c)),ne.getAttribute("wrap")?c.setAttribute("wrap",ne.getAttribute("wrap")):c.removeAttribute("wrap");var oe=f(ne,ce),pe=oe.paddingSize,_e=oe.borderSize,de=oe.boxSizing,be=oe.sizingStyle;c.setAttribute("style","".concat(be,";").concat(O)),c.value=ne.value||ne.placeholder||"";var Ae=void 0,Fe=void 0,Ue,it=c.scrollHeight;if(de==="border-box"?it+=_e:de==="content-box"&&(it-=pe),ae!==null||fe!==null){c.value=" ";var tt=c.scrollHeight-pe;ae!==null&&(Ae=tt*ae,de==="border-box"&&(Ae=Ae+pe+_e),it=Math.max(Ae,it)),fe!==null&&(Fe=tt*fe,de==="border-box"&&(Fe=Fe+pe+_e),Ue=it>Fe?"":"hidden",it=Math.min(Fe,it))}var et={height:it,overflowY:Ue,resize:"none"};return Ae&&(et.minHeight=Ae),Fe&&(et.maxHeight=Fe),et}var N=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],k=0,W=1,z=2,Z=L.forwardRef(function(ne,ce){var ae=ne,fe=ae.prefixCls,oe=ae.defaultValue,pe=ae.value,_e=ae.autoSize,de=ae.onResize,be=ae.className,Ae=ae.style,Fe=ae.disabled,Ue=ae.onChange,it=ae.onInternalAutoSize,tt=(0,C.Z)(ae,N),et=(0,m.Z)(oe,{value:pe,postState:function(gn){return gn!=null?gn:""}}),vt=(0,U.Z)(et,2),dt=vt[0],je=vt[1],nt=function(gn){je(gn.target.value),Ue==null||Ue(gn)},rt=L.useRef();L.useImperativeHandle(ce,function(){return{textArea:rt.current}});var ft=L.useMemo(function(){return _e&&(0,d.Z)(_e)==="object"?[_e.minRows,_e.maxRows]:[]},[_e]),lt=(0,U.Z)(ft,2),wt=lt[0],Re=lt[1],We=!!_e,Pe=function(){try{if(document.activeElement===rt.current){var gn=rt.current,$n=gn.selectionStart,On=gn.selectionEnd,ir=gn.scrollTop;rt.current.setSelectionRange($n,On),rt.current.scrollTop=ir}}catch(mr){}},ke=L.useState(z),Ze=(0,U.Z)(ke,2),Ie=Ze[0],Ye=Ze[1],qe=L.useState(),ot=(0,U.Z)(qe,2),gt=ot[0],pt=ot[1],Lt=function(){Ye(k)};(0,A.Z)(function(){We&&Lt()},[pe,wt,Re,We]),(0,A.Z)(function(){if(Ie===k)Ye(W);else if(Ie===W){var Kt=P(rt.current,!1,wt,Re);Ye(z),pt(Kt)}else Pe()},[Ie]);var Tt=L.useRef(),Nt=function(){M.Z.cancel(Tt.current)},jt=function(gn){Ie===z&&(de==null||de(gn),_e&&(Nt(),Tt.current=(0,M.Z)(function(){Lt()})))};L.useEffect(function(){return Nt},[]);var zt=We?gt:null,Ot=(0,V.Z)((0,V.Z)({},Ae),zt);return(Ie===k||Ie===W)&&(Ot.overflowY="hidden",Ot.overflowX="hidden"),L.createElement(g.Z,{onResize:jt,disabled:!(_e||de)},L.createElement("textarea",(0,X.Z)({},tt,{ref:rt,style:Ot,className:y()(fe,be,(0,re.Z)({},"".concat(fe,"-disabled"),Fe)),disabled:Fe,value:dt,onChange:nt})))}),J=Z,ee=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],$=L.forwardRef(function(ne,ce){var ae,fe=ne.defaultValue,oe=ne.value,pe=ne.onFocus,_e=ne.onBlur,de=ne.onChange,be=ne.allowClear,Ae=ne.maxLength,Fe=ne.onCompositionStart,Ue=ne.onCompositionEnd,it=ne.suffix,tt=ne.prefixCls,et=tt===void 0?"rc-textarea":tt,vt=ne.showCount,dt=ne.count,je=ne.className,nt=ne.style,rt=ne.disabled,ft=ne.hidden,lt=ne.classNames,wt=ne.styles,Re=ne.onResize,We=ne.onClear,Pe=ne.onPressEnter,ke=ne.readOnly,Ze=ne.autoSize,Ie=ne.onKeyDown,Ye=(0,C.Z)(ne,ee),qe=(0,m.Z)(fe,{value:oe,defaultValue:fe}),ot=(0,U.Z)(qe,2),gt=ot[0],pt=ot[1],Lt=gt==null?"":String(gt),Tt=L.useState(!1),Nt=(0,U.Z)(Tt,2),jt=Nt[0],zt=Nt[1],Ot=L.useRef(!1),Kt=L.useState(null),gn=(0,U.Z)(Kt,2),$n=gn[0],On=gn[1],ir=(0,L.useRef)(null),mr=(0,L.useRef)(null),ar=function(){var ye;return(ye=mr.current)===null||ye===void 0?void 0:ye.textArea},Vn=function(){ar().focus()};(0,L.useImperativeHandle)(ce,function(){var De;return{resizableTextArea:mr.current,focus:Vn,blur:function(){ar().blur()},nativeElement:((De=ir.current)===null||De===void 0?void 0:De.nativeElement)||ar()}}),(0,L.useEffect)(function(){zt(function(De){return!rt&&De})},[rt]);var Rr=L.useState(null),er=(0,U.Z)(Rr,2),an=er[0],$t=er[1];L.useEffect(function(){if(an){var De;(De=ar()).setSelectionRange.apply(De,(0,b.Z)(an))}},[an]);var mn=(0,x.Z)(dt,vt),Xt=(ae=mn.max)!==null&&ae!==void 0?ae:Ae,Fn=Number(Xt)>0,sr=mn.strategy(Lt),Cn=!!Xt&&sr>Xt,tr=function(ye,Me){var Be=Me;!Ot.current&&mn.exceedFormatter&&mn.max&&mn.strategy(Me)>mn.max&&(Be=mn.exceedFormatter(Me,{max:mn.max}),Me!==Be&&$t([ar().selectionStart||0,ar().selectionEnd||0])),pt(Be),(0,p.rJ)(ye.currentTarget,ye,de,Be)},lr=function(ye){Ot.current=!0,Fe==null||Fe(ye)},or=function(ye){Ot.current=!1,tr(ye,ye.currentTarget.value),Ue==null||Ue(ye)},Ut=function(ye){tr(ye,ye.target.value)},me=function(ye){ye.key==="Enter"&&Pe&&Pe(ye),Ie==null||Ie(ye)},_=function(ye){zt(!0),pe==null||pe(ye)},B=function(ye){zt(!1),_e==null||_e(ye)},R=function(ye){pt(""),Vn(),(0,p.rJ)(ar(),ye,de)},j=it,Q;mn.show&&(mn.showFormatter?Q=mn.showFormatter({value:Lt,count:sr,maxLength:Xt}):Q="".concat(sr).concat(Fn?" / ".concat(Xt):""),j=L.createElement(L.Fragment,null,j,L.createElement("span",{className:y()("".concat(et,"-data-count"),lt==null?void 0:lt.count),style:wt==null?void 0:wt.count},Q)));var Ee=function(ye){var Me;Re==null||Re(ye),(Me=ar())!==null&&Me!==void 0&&Me.style.height&&On(!0)},we=!Ze&&!vt&&!be;return L.createElement(T.BaseInput,{ref:ir,value:Lt,allowClear:be,handleReset:R,suffix:j,prefixCls:et,classNames:(0,V.Z)((0,V.Z)({},lt),{},{affixWrapper:y()(lt==null?void 0:lt.affixWrapper,(0,re.Z)((0,re.Z)({},"".concat(et,"-show-count"),vt),"".concat(et,"-textarea-allow-clear"),be))}),disabled:rt,focused:jt,className:y()(je,Cn&&"".concat(et,"-out-of-range")),style:(0,V.Z)((0,V.Z)({},nt),$n&&!we?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Q=="string"?Q:void 0}},hidden:ft,readOnly:ke,onClear:We},L.createElement(J,(0,X.Z)({},Ye,{autoSize:Ze,maxLength:Ae,onKeyDown:me,onChange:Ut,onFocus:_,onBlur:B,onCompositionStart:lr,onCompositionEnd:or,className:y()(lt==null?void 0:lt.textarea),style:(0,V.Z)((0,V.Z)({},wt==null?void 0:wt.textarea),{},{resize:nt==null?void 0:nt.resize}),disabled:rt,prefixCls:et,onResize:Ee,ref:mr,readOnly:ke})))}),ie=$,se=ie},45680:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return dt}});var X=Y(72308),re=Y(62853),V=Y(77321),b=Y(49618),U=Y(52487),C=Y(74416),w=Y(92310),y=Y.n(w),T=Y(29301),x=Y(70425),p=Y(34280),m=Y(59301),L=Y(4676),d=m.forwardRef(function(je,nt){var rt=je.height,ft=je.offsetY,lt=je.offsetX,wt=je.children,Re=je.prefixCls,We=je.onInnerResize,Pe=je.innerProps,ke=je.rtl,Ze=je.extra,Ie={},Ye={display:"flex",flexDirection:"column"};return ft!==void 0&&(Ie={height:rt,position:"relative",overflow:"hidden"},Ye=(0,V.Z)((0,V.Z)({},Ye),{},(0,b.Z)((0,b.Z)((0,b.Z)((0,b.Z)((0,b.Z)({transform:"translateY(".concat(ft,"px)")},ke?"marginRight":"marginLeft",-lt),"position","absolute"),"left",0),"right",0),"top",0))),m.createElement("div",{style:Ie},m.createElement(T.Z,{onResize:function(ot){var gt=ot.offsetHeight;gt&&We&&We()}},m.createElement("div",(0,X.Z)({style:Ye,className:y()((0,b.Z)({},"".concat(Re,"-holder-inner"),Re)),ref:nt},Pe),wt,Ze)))});d.displayName="Filler";var g=d;function A(je){var nt=je.children,rt=je.setRef,ft=m.useCallback(function(lt){rt(lt)},[]);return m.cloneElement(nt,{ref:ft})}function M(je,nt,rt,ft,lt,wt,Re,We){var Pe=We.getKey;return je.slice(nt,rt+1).map(function(ke,Ze){var Ie=nt+Ze,Ye=Re(ke,Ie,{style:{width:ft},offsetX:lt}),qe=Pe(ke);return m.createElement(A,{key:qe,setRef:function(gt){return wt(ke,gt)}},Ye)})}function O(je,nt,rt,ft){var lt=rt-je,wt=nt-rt,Re=Math.min(lt,wt)*2;if(ft<=Re){var We=Math.floor(ft/2);return ft%2?rt+We+1:rt-We}return lt>wt?rt-(ft-wt):rt+(ft-lt)}function S(je,nt,rt){var ft=je.length,lt=nt.length,wt,Re;if(ft===0&<===0)return null;ft<lt?(wt=je,Re=nt):(wt=nt,Re=je);var We={__EMPTY_ITEM__:!0};function Pe(ot){return ot!==void 0?rt(ot):We}for(var ke=null,Ze=Math.abs(ft-lt)!==1,Ie=0;Ie<Re.length;Ie+=1){var Ye=Pe(wt[Ie]),qe=Pe(Re[Ie]);if(Ye!==qe){ke=Ie,Ze=Ze||Ye!==Pe(Re[Ie+1]);break}}return ke===null?null:{index:ke,multiple:Ze}}function I(je,nt,rt){var ft=m.useState(je),lt=(0,U.Z)(ft,2),wt=lt[0],Re=lt[1],We=m.useState(null),Pe=(0,U.Z)(We,2),ke=Pe[0],Ze=Pe[1];return m.useEffect(function(){var Ie=S(wt||[],je||[],nt);(Ie==null?void 0:Ie.index)!==void 0&&(rt==null||rt(Ie.index),Ze(je[Ie.index])),Re(je)},[je]),[ke]}var c=Y(16089),f=(typeof navigator=="undefined"?"undefined":(0,re.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),P=f,N=function(je,nt,rt,ft){var lt=(0,m.useRef)(!1),wt=(0,m.useRef)(null);function Re(){clearTimeout(wt.current),lt.current=!0,wt.current=setTimeout(function(){lt.current=!1},50)}var We=(0,m.useRef)({top:je,bottom:nt,left:rt,right:ft});return We.current.top=je,We.current.bottom=nt,We.current.left=rt,We.current.right=ft,function(Pe,ke){var Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Ie=Pe?ke<0&&We.current.left||ke>0&&We.current.right:ke<0&&We.current.top||ke>0&&We.current.bottom;return Ze&&Ie?(clearTimeout(wt.current),lt.current=!1):(!Ie||lt.current)&&Re(),!lt.current&&Ie}};function k(je,nt,rt,ft,lt,wt,Re){var We=(0,m.useRef)(0),Pe=(0,m.useRef)(null),ke=(0,m.useRef)(null),Ze=(0,m.useRef)(!1),Ie=N(nt,rt,ft,lt);function Ye(Tt,Nt){if(c.Z.cancel(Pe.current),!Ie(!1,Nt)){var jt=Tt;if(!jt._virtualHandled)jt._virtualHandled=!0;else return;We.current+=Nt,ke.current=Nt,P||jt.preventDefault(),Pe.current=(0,c.Z)(function(){var zt=Ze.current?10:1;Re(We.current*zt,!1),We.current=0})}}function qe(Tt,Nt){Re(Nt,!0),P||Tt.preventDefault()}var ot=(0,m.useRef)(null),gt=(0,m.useRef)(null);function pt(Tt){if(je){c.Z.cancel(gt.current),gt.current=(0,c.Z)(function(){ot.current=null},2);var Nt=Tt.deltaX,jt=Tt.deltaY,zt=Tt.shiftKey,Ot=Nt,Kt=jt;(ot.current==="sx"||!ot.current&&zt&&jt&&!Nt)&&(Ot=jt,Kt=0,ot.current="sx");var gn=Math.abs(Ot),$n=Math.abs(Kt);ot.current===null&&(ot.current=wt&&gn>$n?"x":"y"),ot.current==="y"?Ye(Tt,Kt):qe(Tt,Ot)}}function Lt(Tt){je&&(Ze.current=Tt.detail===ke.current)}return[pt,Lt]}function W(je,nt,rt,ft){var lt=m.useMemo(function(){return[new Map,[]]},[je,rt.id,ft]),wt=(0,U.Z)(lt,2),Re=wt[0],We=wt[1],Pe=function(Ze){var Ie=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ze,Ye=Re.get(Ze),qe=Re.get(Ie);if(Ye===void 0||qe===void 0)for(var ot=je.length,gt=We.length;gt<ot;gt+=1){var pt,Lt=je[gt],Tt=nt(Lt);Re.set(Tt,gt);var Nt=(pt=rt.get(Tt))!==null&&pt!==void 0?pt:ft;if(We[gt]=(We[gt-1]||0)+Nt,Tt===Ze&&(Ye=gt),Tt===Ie&&(qe=gt),Ye!==void 0&&qe!==void 0)break}return{top:We[Ye-1]||0,bottom:We[qe]}};return Pe}var z=Y(96949),Z=Y(55090),J=function(){function je(){(0,z.Z)(this,je),(0,b.Z)(this,"maps",void 0),(0,b.Z)(this,"id",0),(0,b.Z)(this,"diffKeys",new Set),this.maps=Object.create(null)}return(0,Z.Z)(je,[{key:"set",value:function(rt,ft){this.maps[rt]=ft,this.id+=1,this.diffKeys.add(rt)}},{key:"get",value:function(rt){return this.maps[rt]}},{key:"resetRecord",value:function(){this.diffKeys.clear()}},{key:"getRecord",value:function(){return this.diffKeys}}]),je}(),ee=J;function $(je){var nt=parseFloat(je);return isNaN(nt)?0:nt}function ie(je,nt,rt){var ft=m.useState(0),lt=(0,U.Z)(ft,2),wt=lt[0],Re=lt[1],We=(0,m.useRef)(new Map),Pe=(0,m.useRef)(new ee),ke=(0,m.useRef)(0);function Ze(){ke.current+=1}function Ie(){var qe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Ze();var ot=function(){var Lt=!1;We.current.forEach(function(Tt,Nt){if(Tt&&Tt.offsetParent){var jt=Tt.offsetHeight,zt=getComputedStyle(Tt),Ot=zt.marginTop,Kt=zt.marginBottom,gn=$(Ot),$n=$(Kt),On=jt+gn+$n;Pe.current.get(Nt)!==On&&(Pe.current.set(Nt,On),Lt=!0)}}),Lt&&Re(function(Tt){return Tt+1})};if(qe)ot();else{ke.current+=1;var gt=ke.current;Promise.resolve().then(function(){gt===ke.current&&ot()})}}function Ye(qe,ot){var gt=je(qe),pt=We.current.get(gt);ot?(We.current.set(gt,ot),Ie()):We.current.delete(gt),!pt!=!ot&&(ot?nt==null||nt(qe):rt==null||rt(qe))}return(0,m.useEffect)(function(){return Ze},[]),[Ye,Ie,Pe.current,wt]}var se=14/15;function ne(je,nt,rt){var ft=(0,m.useRef)(!1),lt=(0,m.useRef)(0),wt=(0,m.useRef)(0),Re=(0,m.useRef)(null),We=(0,m.useRef)(null),Pe,ke=function(qe){if(ft.current){var ot=Math.ceil(qe.touches[0].pageX),gt=Math.ceil(qe.touches[0].pageY),pt=lt.current-ot,Lt=wt.current-gt,Tt=Math.abs(pt)>Math.abs(Lt);Tt?lt.current=ot:wt.current=gt;var Nt=rt(Tt,Tt?pt:Lt,!1,qe);Nt&&qe.preventDefault(),clearInterval(We.current),Nt&&(We.current=setInterval(function(){Tt?pt*=se:Lt*=se;var jt=Math.floor(Tt?pt:Lt);(!rt(Tt,jt,!0)||Math.abs(jt)<=.1)&&clearInterval(We.current)},16))}},Ze=function(){ft.current=!1,Pe()},Ie=function(qe){Pe(),qe.touches.length===1&&!ft.current&&(ft.current=!0,lt.current=Math.ceil(qe.touches[0].pageX),wt.current=Math.ceil(qe.touches[0].pageY),Re.current=qe.target,Re.current.addEventListener("touchmove",ke,{passive:!1}),Re.current.addEventListener("touchend",Ze,{passive:!0}))};Pe=function(){Re.current&&(Re.current.removeEventListener("touchmove",ke),Re.current.removeEventListener("touchend",Ze))},(0,p.Z)(function(){return je&&nt.current.addEventListener("touchstart",Ie,{passive:!0}),function(){var Ye;(Ye=nt.current)===null||Ye===void 0||Ye.removeEventListener("touchstart",Ie),Pe(),clearInterval(We.current)}},[je])}function ce(je){return Math.floor(Math.pow(je,.5))}function ae(je,nt){var rt="touches"in je?je.touches[0]:je;return rt[nt?"pageX":"pageY"]-window[nt?"scrollX":"scrollY"]}function fe(je,nt,rt){m.useEffect(function(){var ft=nt.current;if(je&&ft){var lt=!1,wt,Re,We=function(){c.Z.cancel(wt)},Pe=function Ye(){We(),wt=(0,c.Z)(function(){rt(Re),Ye()})},ke=function(qe){if(!(qe.target.draggable||qe.button!==0)){var ot=qe;ot._virtualHandled||(ot._virtualHandled=!0,lt=!0)}},Ze=function(){lt=!1,We()},Ie=function(qe){if(lt){var ot=ae(qe,!1),gt=ft.getBoundingClientRect(),pt=gt.top,Lt=gt.bottom;if(ot<=pt){var Tt=pt-ot;Re=-ce(Tt),Pe()}else if(ot>=Lt){var Nt=ot-Lt;Re=ce(Nt),Pe()}else We()}};return ft.addEventListener("mousedown",ke),ft.ownerDocument.addEventListener("mouseup",Ze),ft.ownerDocument.addEventListener("mousemove",Ie),function(){ft.removeEventListener("mousedown",ke),ft.ownerDocument.removeEventListener("mouseup",Ze),ft.ownerDocument.removeEventListener("mousemove",Ie),We()}}},[je])}var oe=10;function pe(je,nt,rt,ft,lt,wt,Re,We){var Pe=m.useRef(),ke=m.useState(null),Ze=(0,U.Z)(ke,2),Ie=Ze[0],Ye=Ze[1];return(0,p.Z)(function(){if(Ie&&Ie.times<oe){if(!je.current){Ye(function(mn){return(0,V.Z)({},mn)});return}wt();var qe=Ie.targetAlign,ot=Ie.originAlign,gt=Ie.index,pt=Ie.offset,Lt=je.current.clientHeight,Tt=!1,Nt=qe,jt=null;if(Lt){for(var zt=qe||ot,Ot=0,Kt=0,gn=0,$n=Math.min(nt.length-1,gt),On=0;On<=$n;On+=1){var ir=lt(nt[On]);Kt=Ot;var mr=rt.get(ir);gn=Kt+(mr===void 0?ft:mr),Ot=gn}for(var ar=zt==="top"?pt:Lt-pt,Vn=$n;Vn>=0;Vn-=1){var Rr=lt(nt[Vn]),er=rt.get(Rr);if(er===void 0){Tt=!0;break}if(ar-=er,ar<=0)break}switch(zt){case"top":jt=Kt-pt;break;case"bottom":jt=gn-Lt+pt;break;default:{var an=je.current.scrollTop,$t=an+Lt;Kt<an?Nt="top":gn>$t&&(Nt="bottom")}}jt!==null&&Re(jt),jt!==Ie.lastTop&&(Tt=!0)}Tt&&Ye((0,V.Z)((0,V.Z)({},Ie),{},{times:Ie.times+1,targetAlign:Nt,lastTop:jt}))}},[Ie,je.current]),function(qe){if(qe==null){We();return}if(c.Z.cancel(Pe.current),typeof qe=="number")Re(qe);else if(qe&&(0,re.Z)(qe)==="object"){var ot,gt=qe.align;"index"in qe?ot=qe.index:ot=nt.findIndex(function(Tt){return lt(Tt)===qe.key});var pt=qe.offset,Lt=pt===void 0?0:pt;Ye({times:0,index:ot,offset:Lt,originAlign:gt})}}}var _e=m.forwardRef(function(je,nt){var rt=je.prefixCls,ft=je.rtl,lt=je.scrollOffset,wt=je.scrollRange,Re=je.onStartMove,We=je.onStopMove,Pe=je.onScroll,ke=je.horizontal,Ze=je.spinSize,Ie=je.containerSize,Ye=je.style,qe=je.thumbStyle,ot=je.showScrollBar,gt=m.useState(!1),pt=(0,U.Z)(gt,2),Lt=pt[0],Tt=pt[1],Nt=m.useState(null),jt=(0,U.Z)(Nt,2),zt=jt[0],Ot=jt[1],Kt=m.useState(null),gn=(0,U.Z)(Kt,2),$n=gn[0],On=gn[1],ir=!ft,mr=m.useRef(),ar=m.useRef(),Vn=m.useState(ot),Rr=(0,U.Z)(Vn,2),er=Rr[0],an=Rr[1],$t=m.useRef(),mn=function(){ot===!0||ot===!1||(clearTimeout($t.current),an(!0),$t.current=setTimeout(function(){an(!1)},3e3))},Xt=wt-Ie||0,Fn=Ie-Ze||0,sr=m.useMemo(function(){if(lt===0||Xt===0)return 0;var R=lt/Xt;return R*Fn},[lt,Xt,Fn]),Cn=function(j){j.stopPropagation(),j.preventDefault()},tr=m.useRef({top:sr,dragging:Lt,pageY:zt,startTop:$n});tr.current={top:sr,dragging:Lt,pageY:zt,startTop:$n};var lr=function(j){Tt(!0),Ot(ae(j,ke)),On(tr.current.top),Re(),j.stopPropagation(),j.preventDefault()};m.useEffect(function(){var R=function(we){we.preventDefault()},j=mr.current,Q=ar.current;return j.addEventListener("touchstart",R,{passive:!1}),Q.addEventListener("touchstart",lr,{passive:!1}),function(){j.removeEventListener("touchstart",R),Q.removeEventListener("touchstart",lr)}},[]);var or=m.useRef();or.current=Xt;var Ut=m.useRef();Ut.current=Fn,m.useEffect(function(){if(Lt){var R,j=function(we){var De=tr.current,ye=De.dragging,Me=De.pageY,Be=De.startTop;c.Z.cancel(R);var He=mr.current.getBoundingClientRect(),Ge=Ie/(ke?He.width:He.height);if(ye){var Ve=(ae(we,ke)-Me)*Ge,Ke=Be;!ir&&ke?Ke-=Ve:Ke+=Ve;var at=or.current,Le=Ut.current,Qe=Le?Ke/Le:0,ut=Math.ceil(Qe*at);ut=Math.max(ut,0),ut=Math.min(ut,at),R=(0,c.Z)(function(){Pe(ut,ke)})}},Q=function(){Tt(!1),We()};return window.addEventListener("mousemove",j,{passive:!0}),window.addEventListener("touchmove",j,{passive:!0}),window.addEventListener("mouseup",Q,{passive:!0}),window.addEventListener("touchend",Q,{passive:!0}),function(){window.removeEventListener("mousemove",j),window.removeEventListener("touchmove",j),window.removeEventListener("mouseup",Q),window.removeEventListener("touchend",Q),c.Z.cancel(R)}}},[Lt]),m.useEffect(function(){return mn(),function(){clearTimeout($t.current)}},[lt]),m.useImperativeHandle(nt,function(){return{delayHidden:mn}});var me="".concat(rt,"-scrollbar"),_={position:"absolute",visibility:er?null:"hidden"},B={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ke?(_.height=8,_.left=0,_.right=0,_.bottom=0,B.height="100%",B.width=Ze,ir?B.left=sr:B.right=sr):(_.width=8,_.top=0,_.bottom=0,ir?_.right=0:_.left=0,B.width="100%",B.height=Ze,B.top=sr),m.createElement("div",{ref:mr,className:y()(me,(0,b.Z)((0,b.Z)((0,b.Z)({},"".concat(me,"-horizontal"),ke),"".concat(me,"-vertical"),!ke),"".concat(me,"-visible"),er)),style:(0,V.Z)((0,V.Z)({},_),Ye),onMouseDown:Cn,onMouseMove:mn},m.createElement("div",{ref:ar,className:y()("".concat(me,"-thumb"),(0,b.Z)({},"".concat(me,"-thumb-moving"),Lt)),style:(0,V.Z)((0,V.Z)({},B),qe),onMouseDown:lr}))}),de=_e,be=20;function Ae(){var je=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,nt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,rt=je/nt*je;return isNaN(rt)&&(rt=0),rt=Math.max(rt,be),Math.floor(rt)}var Fe=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Ue=[],it={overflowY:"auto",overflowAnchor:"none"};function tt(je,nt){var rt=je.prefixCls,ft=rt===void 0?"rc-virtual-list":rt,lt=je.className,wt=je.height,Re=je.itemHeight,We=je.fullHeight,Pe=We===void 0?!0:We,ke=je.style,Ze=je.data,Ie=je.children,Ye=je.itemKey,qe=je.virtual,ot=je.direction,gt=je.scrollWidth,pt=je.component,Lt=pt===void 0?"div":pt,Tt=je.onScroll,Nt=je.onVirtualScroll,jt=je.onVisibleChange,zt=je.innerProps,Ot=je.extraRender,Kt=je.styles,gn=je.showScrollBar,$n=gn===void 0?"optional":gn,On=(0,C.Z)(je,Fe),ir=m.useCallback(function(Gt){return typeof Ye=="function"?Ye(Gt):Gt==null?void 0:Gt[Ye]},[Ye]),mr=ie(ir,null,null),ar=(0,U.Z)(mr,4),Vn=ar[0],Rr=ar[1],er=ar[2],an=ar[3],$t=!!(qe!==!1&&wt&&Re),mn=m.useMemo(function(){return Object.values(er.maps).reduce(function(Gt,Vt){return Gt+Vt},0)},[er.id,er.maps]),Xt=$t&&Ze&&(Math.max(Re*Ze.length,mn)>wt||!!gt),Fn=ot==="rtl",sr=y()(ft,(0,b.Z)({},"".concat(ft,"-rtl"),Fn),lt),Cn=Ze||Ue,tr=(0,m.useRef)(),lr=(0,m.useRef)(),or=(0,m.useRef)(),Ut=(0,m.useState)(0),me=(0,U.Z)(Ut,2),_=me[0],B=me[1],R=(0,m.useState)(0),j=(0,U.Z)(R,2),Q=j[0],Ee=j[1],we=(0,m.useState)(!1),De=(0,U.Z)(we,2),ye=De[0],Me=De[1],Be=function(){Me(!0)},He=function(){Me(!1)},Ge={getKey:ir};function Ve(Gt){B(function(Vt){var vn;typeof Gt=="function"?vn=Gt(Vt):vn=Gt;var Dn=nn(vn);return tr.current.scrollTop=Dn,Dn})}var Ke=(0,m.useRef)({start:0,end:Cn.length}),at=(0,m.useRef)(),Le=I(Cn,ir),Qe=(0,U.Z)(Le,1),ut=Qe[0];at.current=ut;var bt=m.useMemo(function(){if(!$t)return{scrollHeight:void 0,start:0,end:Cn.length-1,offset:void 0};if(!Xt){var Gt;return{scrollHeight:((Gt=lr.current)===null||Gt===void 0?void 0:Gt.offsetHeight)||0,start:0,end:Cn.length-1,offset:void 0}}for(var Vt=0,vn,Dn,Ln,Yr=Cn.length,ii=0;ii<Yr;ii+=1){var Ma=Cn[ii],Aa=ir(Ma),Hr=er.get(Aa),rs=Vt+(Hr===void 0?Re:Hr);rs>=_&&vn===void 0&&(vn=ii,Dn=Vt),rs>_+wt&&Ln===void 0&&(Ln=ii),Vt=rs}return vn===void 0&&(vn=0,Dn=0,Ln=Math.ceil(wt/Re)),Ln===void 0&&(Ln=Cn.length-1),Ln=Math.min(Ln+1,Cn.length-1),{scrollHeight:Vt,start:vn,end:Ln,offset:Dn}},[Xt,$t,_,Cn,an,wt]),It=bt.scrollHeight,Ct=bt.start,_t=bt.end,St=bt.offset;Ke.current.start=Ct,Ke.current.end=_t,m.useLayoutEffect(function(){var Gt=er.getRecord();if(Gt.size===1){var Vt=Array.from(Gt)[0],vn=Cn[Ct];if(vn){var Dn=ir(vn);if(Dn===Vt){var Ln=er.get(Vt),Yr=Ln-Re;Ve(function(ii){return ii+Yr})}}}er.resetRecord()},[It]);var Bt=m.useState({width:0,height:wt}),$e=(0,U.Z)(Bt,2),xt=$e[0],Rt=$e[1],Mt=function(Vt){Rt({width:Vt.offsetWidth,height:Vt.offsetHeight})},rn=(0,m.useRef)(),Ft=(0,m.useRef)(),Yt=m.useMemo(function(){return Ae(xt.width,gt)},[xt.width,gt]),qt=m.useMemo(function(){return Ae(xt.height,It)},[xt.height,It]),cn=It-wt,ln=(0,m.useRef)(cn);ln.current=cn;function nn(Gt){var Vt=Gt;return Number.isNaN(ln.current)||(Vt=Math.min(Vt,ln.current)),Vt=Math.max(Vt,0),Vt}var Pn=_<=0,Nn=_>=cn,hn=Q<=0,wn=Q>=gt,Zn=N(Pn,Nn,hn,wn),Wn=function(){return{x:Fn?-Q:Q,y:_}},Tn=(0,m.useRef)(Wn()),nr=(0,x.zX)(function(Gt){if(Nt){var Vt=(0,V.Z)((0,V.Z)({},Wn()),Gt);(Tn.current.x!==Vt.x||Tn.current.y!==Vt.y)&&(Nt(Vt),Tn.current=Vt)}});function En(Gt,Vt){var vn=Gt;Vt?((0,L.flushSync)(function(){Ee(vn)}),nr()):Ve(vn)}function Kn(Gt){var Vt=Gt.currentTarget.scrollTop;Vt!==_&&Ve(Vt),Tt==null||Tt(Gt),nr()}var kr=function(Vt){var vn=Vt,Dn=gt?gt-xt.width:0;return vn=Math.max(vn,0),vn=Math.min(vn,Dn),vn},xi=(0,x.zX)(function(Gt,Vt){Vt?((0,L.flushSync)(function(){Ee(function(vn){var Dn=vn+(Fn?-Gt:Gt);return kr(Dn)})}),nr()):Ve(function(vn){var Dn=vn+Gt;return Dn})}),ri=k($t,Pn,Nn,hn,wn,!!gt,xi),br=(0,U.Z)(ri,2),bi=br[0],Cr=br[1];ne($t,tr,function(Gt,Vt,vn,Dn){var Ln=Dn;return Zn(Gt,Vt,vn)?!1:!Ln||!Ln._virtualHandled?(Ln&&(Ln._virtualHandled=!0),bi({preventDefault:function(){},deltaX:Gt?Vt:0,deltaY:Gt?0:Vt}),!0):!1}),fe(Xt,tr,function(Gt){Ve(function(Vt){return Vt+Gt})}),(0,p.Z)(function(){function Gt(vn){var Dn=Pn&&vn.detail<0,Ln=Nn&&vn.detail>0;$t&&!Dn&&!Ln&&vn.preventDefault()}var Vt=tr.current;return Vt.addEventListener("wheel",bi,{passive:!1}),Vt.addEventListener("DOMMouseScroll",Cr,{passive:!0}),Vt.addEventListener("MozMousePixelScroll",Gt,{passive:!1}),function(){Vt.removeEventListener("wheel",bi),Vt.removeEventListener("DOMMouseScroll",Cr),Vt.removeEventListener("MozMousePixelScroll",Gt)}},[$t,Pn,Nn]),(0,p.Z)(function(){if(gt){var Gt=kr(Q);Ee(Gt),nr({x:Gt})}},[xt.width,gt]);var fa=function(){var Vt,vn;(Vt=rn.current)===null||Vt===void 0||Vt.delayHidden(),(vn=Ft.current)===null||vn===void 0||vn.delayHidden()},Vi=pe(tr,Cn,er,Re,ir,function(){return Rr(!0)},Ve,fa);m.useImperativeHandle(nt,function(){return{nativeElement:or.current,getScrollInfo:Wn,scrollTo:function(Vt){function vn(Dn){return Dn&&(0,re.Z)(Dn)==="object"&&("left"in Dn||"top"in Dn)}vn(Vt)?(Vt.left!==void 0&&Ee(kr(Vt.left)),Vi(Vt.top)):Vi(Vt)}}}),(0,p.Z)(function(){if(jt){var Gt=Cn.slice(Ct,_t+1);jt(Gt,Cn)}},[Ct,_t,Cn]);var di=W(Cn,ir,er,Re),Gn=Ot==null?void 0:Ot({start:Ct,end:_t,virtual:Xt,offsetX:Q,offsetY:St,rtl:Fn,getSize:di}),_n=M(Cn,Ct,_t,gt,Q,Vn,Ie,Ge),Hn=null;wt&&(Hn=(0,V.Z)((0,b.Z)({},Pe?"height":"maxHeight",wt),it),$t&&(Hn.overflowY="hidden",gt&&(Hn.overflowX="hidden"),ye&&(Hn.pointerEvents="none")));var ur={};return Fn&&(ur.dir="rtl"),m.createElement("div",(0,X.Z)({ref:or,style:(0,V.Z)((0,V.Z)({},ke),{},{position:"relative"}),className:sr},ur,On),m.createElement(T.Z,{onResize:Mt},m.createElement(Lt,{className:"".concat(ft,"-holder"),style:Hn,ref:tr,onScroll:Kn,onMouseEnter:fa},m.createElement(g,{prefixCls:ft,height:It,offsetX:Q,offsetY:St,scrollWidth:gt,onInnerResize:Rr,ref:lr,innerProps:zt,rtl:Fn,extra:Gn},_n))),Xt&&It>wt&&m.createElement(de,{ref:rn,prefixCls:ft,scrollOffset:_,scrollRange:It,rtl:Fn,onScroll:En,onStartMove:Be,onStopMove:He,spinSize:qt,containerSize:xt.height,style:Kt==null?void 0:Kt.verticalScrollBar,thumbStyle:Kt==null?void 0:Kt.verticalScrollBarThumb,showScrollBar:$n}),Xt&>>xt.width&&m.createElement(de,{ref:Ft,prefixCls:ft,scrollOffset:Q,scrollRange:gt,rtl:Fn,onScroll:En,onStartMove:Be,onStopMove:He,spinSize:Yt,containerSize:xt.width,horizontal:!0,style:Kt==null?void 0:Kt.horizontalScrollBar,thumbStyle:Kt==null?void 0:Kt.horizontalScrollBarThumb,showScrollBar:$n}))}var et=m.forwardRef(tt);et.displayName="List";var vt=et,dt=vt},75029:function(Se,Ce,Y){"use strict";var X=Y(22948),re=Array.prototype.concat,V=Array.prototype.slice,b=Se.exports=function(C){for(var w=[],y=0,T=C.length;y<T;y++){var x=C[y];X(x)?w=re.call(w,V.call(x)):w.push(x)}return w};b.wrap=function(U){return function(){return U(b(arguments))}}},27774:function(Se,Ce){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.SizeSensorId=Ce.SensorTabIndex=Ce.SensorClassName=void 0;var Y="size-sensor-id";Ce.SizeSensorId=Y;var X="size-sensor-object";Ce.SensorClassName=X;var re="-1";Ce.SensorTabIndex=re},79301:function(Se,Ce){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.default=void 0;var Y=function(re){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,b=null;return function(){for(var U=this,C=arguments.length,w=new Array(C),y=0;y<C;y++)w[y]=arguments[y];clearTimeout(b),b=setTimeout(function(){re.apply(U,w)},V)}};Ce.default=Y},79789:function(Se,Ce){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.default=void 0;var Y=1,X=function(){return"".concat(Y++)};Ce.default=X},47242:function(Se,Ce,Y){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.ver=Ce.clear=Ce.bind=void 0;var X=Y(95270),re=function(C,w){var y=(0,X.getSensor)(C);return y.bind(w),function(){y.unbind(w)}};Ce.bind=re;var V=function(C){var w=(0,X.getSensor)(C);(0,X.removeSensor)(w)};Ce.clear=V;var b="1.0.2";Ce.ver=b},95270:function(Se,Ce,Y){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.removeSensor=Ce.getSensor=Ce.Sensors=void 0;var X=b(Y(79789)),re=Y(57829),V=Y(27774);function b(T){return T&&T.__esModule?T:{default:T}}var U={};Ce.Sensors=U;function C(T){T&&U[T]&&delete U[T]}var w=function(x){var p=x.getAttribute(V.SizeSensorId);if(p&&U[p])return U[p];var m=(0,X.default)();x.setAttribute(V.SizeSensorId,m);var L=(0,re.createSensor)(x,function(){return C(m)});return U[m]=L,L};Ce.getSensor=w;var y=function(x){var p=x.element.getAttribute(V.SizeSensorId);x.destroy(),C(p)};Ce.removeSensor=y},57829:function(Se,Ce,Y){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createSensor=void 0;var X=Y(20953),re=Y(55202),V=typeof ResizeObserver!="undefined"?re.createSensor:X.createSensor;Ce.createSensor=V},20953:function(Se,Ce,Y){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createSensor=void 0;var X=V(Y(79301)),re=Y(27774);function V(U){return U&&U.__esModule?U:{default:U}}var b=function(C,w){var y=void 0,T=[],x=function(){getComputedStyle(C).position==="static"&&(C.style.position="relative");var A=document.createElement("object");return A.onload=function(){A.contentDocument.defaultView.addEventListener("resize",p),p()},A.style.display="block",A.style.position="absolute",A.style.top="0",A.style.left="0",A.style.height="100%",A.style.width="100%",A.style.overflow="hidden",A.style.pointerEvents="none",A.style.zIndex="-1",A.style.opacity="0",A.setAttribute("class",re.SensorClassName),A.setAttribute("tabindex",re.SensorTabIndex),A.type="text/html",C.appendChild(A),A.data="about:blank",A},p=(0,X.default)(function(){T.forEach(function(g){g(C)})}),m=function(A){y||(y=x()),T.indexOf(A)===-1&&T.push(A)},L=function(){y&&y.parentNode&&(y.contentDocument&&y.contentDocument.defaultView.removeEventListener("resize",p),y.parentNode.removeChild(y),C.removeAttribute(re.SizeSensorId),y=void 0,T=[],w&&w())},d=function(A){var M=T.indexOf(A);M!==-1&&T.splice(M,1),T.length===0&&y&&L()};return{element:C,bind:m,destroy:L,unbind:d}};Ce.createSensor=b},55202:function(Se,Ce,Y){"use strict";Object.defineProperty(Ce,"__esModule",{value:!0}),Ce.createSensor=void 0;var X=Y(27774),re=V(Y(79301));function V(U){return U&&U.__esModule?U:{default:U}}var b=function(C,w){var y=void 0,T=[],x=(0,re.default)(function(){T.forEach(function(g){g(C)})}),p=function(){var A=new ResizeObserver(x);return A.observe(C),x(),A},m=function(A){y||(y=p()),T.indexOf(A)===-1&&T.push(A)},L=function(){y.disconnect(),T=[],y=void 0,C.removeAttribute(X.SizeSensorId),w&&w()},d=function(A){var M=T.indexOf(A);M!==-1&&T.splice(M,1),T.length===0&&y&&L()};return{element:C,bind:m,destroy:L,unbind:d}};Ce.createSensor=b},82059:function(Se){var Ce=arguments[3],Y=arguments[4],X=arguments[5],re=JSON.stringify;Se.exports=function(V,b){for(var U,C=Object.keys(X),w=0,y=C.length;w<y;w++){var T=C[w],x=X[T].exports;if(x===V||x&&x.default===V){U=T;break}}if(!U){U=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var p={},w=0,y=C.length;w<y;w++){var T=C[w];p[T]=T}Y[U]=["function(require,module,exports){"+V+"(self); }",p]}var m=Math.floor(Math.pow(16,8)*Math.random()).toString(16),L={};L[U]=U,Y[m]=["function(require,module,exports){var f = require("+re(U)+");(f.default ? f.default : f)(self);}",L];var d={};g(m);function g(c){d[c]=!0;for(var f in Y[c][1]){var P=Y[c][1][f];d[P]||g(P)}}var A="("+Ce+")({"+Object.keys(d).map(function(c){return re(c)+":["+Y[c][0]+","+re(Y[c][1])+"]"}).join(",")+"},{},["+re(m)+"])",M=window.URL||window.webkitURL||window.mozURL||window.msURL,O=new Blob([A],{type:"text/javascript"});if(b&&b.bare)return O;var S=M.createObjectURL(O),I=new Worker(S);return I.objectURL=S,I}},93314:function(Se){"use strict";Se.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFU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lo8ahw6fNuc1cSGAff6O2XUt0Z2ulVSYRfjslNx33is9NpFFYiyw/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(Se){"use strict";Se.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABUCAYAAAB9czKDAAAAAXNSR0IArs4c6QAAD9VJREFUeF7tXWtsHFcVPrO7s4/Zlx9rx27IuiUkTeqEqk8VQYQqVYgfBYlSWS0tFQikAEKV2n8gEP7Bjz6iSK1KRalQW0RbCBIqlUBFqOIHCUIlTR8kbY1j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5qvjmvQ1vfS2J5xFybuE3W1llh8UdVr6Px6lebWenWctgobxTRXyFjic2yXrsClGenGh3IEgDPHpoMjk7dPljYu+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(Se){"use strict";Se.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAAAXNSR0IArs4c6QAAIABJREFUeF7tfXuwJFd53+/0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ZAleRIw2WZ2m7z3342LoBGM/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(Se){"use strict";Se.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAEKNJREFUeF7tnAuQFdWZx/+nH/c1M84MyAzOIBpjBYRgNujWqMFE86AUNYpbRGMqmlTMEtmEGC2yZrfUcTdhw6KbJyYQNUIFycbEVMgTDBoRMwQzBAyia5AFBKI4w7zuq1/nbJ1+3Nu3b9/b3ffeGZDNqbIGb58+ffp3/v2d7/vO6SaIWD71ezYpl0OLoCJhyIgzBtFsQrMasv+Ut+o64FvH82PFdvg1qh10rqxa/7D/lPbHOV+ErgGaQDHa1YKBxz9CfKtHRFS1Ognb2CeeZglqYLouoCUK4EYMQM1teBRQbaANAiomcWDbx8hQWCa11AsFfNGPmChNwmwiQHZLuC6lcmlV63HQE2HDDNNGlAETxrC37w6SqwVmmHNCAb95C+vWCaZOmNlooHmKKgoiYXD7J8mBMPBqqRMInDFGbtyEd4sxkKrAgyCFsfMRTEAU1ZaBqdJXQsHObM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HiWE7DMH2+kQfxP44ocwk/EQrl7VekYgyKY7fbjzcuDWHmA4A2P/UVU5PBDTRkejvQms2EZb1xQft5B7Ie5SuW2JFj2alpjbu8lDlr3tFNvkk3BnB5Gnd8bj7daWaZ6ZPEgI4a+DF4Ff+gibouaL37YKA6mmOj4nuX+aewbA1d4zvdRPrqxU60ihjRArTJXacnYYFKJV+x9holefNp137Ute9DVVcMFqJgsEswW9mIwPghkUxvuaGc/k6buFwlWHR/DemzWvW83OBX3x0yYT6vu1Pt+57ZyEIzuWIeh9UoMQ4jv5O8DfLhloq3ovDTQzYeaFege0UfdS1g4DPU/Bnv415amloKfQNCnzHmTtGnCO3w0yHbooIc8/URz42WGPOQxlecO0y3sZtW1XZ8P2u6y/BoggIaXR8gCKGhjIryIHwwD21iEXrWLnMYKUF7jIcGzHEhyu9GjUcrG32jnc1L68B7MYgeQ1Y+f9HV7oXxxd5eSCb7GZTHR/GcDCQsbx65RvFfDcc2v5PGZTHq96TGp3J1480EuCA1fPzZILVrNWZuDckt/5OzwEVBBwXNMRudFKb9RVf8Ha07MQlUNUKW20ygneQ4xAEIA2qpQvUhgGhpU15NVahONMmmcwA13exyZo4go6HmbiCvKGwrQRxiPyhRPkCPg0rEvIXXsp/ufxjxCjZuD8xL9fxaYaOrrrukGP21fWoQAfvFA/CEQDjzvXrJYjcuroFLk5DH+p1UMxTbUbCjcvqorpoBX2ati9qlnZQaA8o13tOmGejCDlhznu8KEy3rxrEg739lrfrqq1lIW/vYwJP/kOWomOJqr555TN3xOlySHmqlueNOL5NxSSd4GTgsdHC6zP796nUuB5FSoULs9AJQHZGQqG61G1e3D+Dy50RqLE9NSOAAAAAElFTkSuQmCC"},19150:function(Se){"use strict";Se.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABGCAYAAAA3mEEuAAAAAXNSR0IArs4c6QAAEaRJREFUeF7dnHuQHMV5wL+v57Fv3UvHoUMCvYUNBpMirsiOsMSpXEiOcABLgAAXkkicwoQ4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rwBIeWIk83ded0fucr5Z83LH0xRm9YsOFg3wfQDov8f3x0fYZAJUSSrrREK6JiGZSFQHwiQwFGroZUwoJxLlpTJVtP6CXbl6ubBacf7/A7kxJfsyNujOAAAAAElFTkSuQmCC"},97889:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return b}});var X=Y(75841),re=Y(47123),V=Y(73447);function b(U,C,w){return C=(0,X.Z)(C),(0,V.Z)(U,(0,re.Z)()?Reflect.construct(C,w||[],(0,X.Z)(U).constructor):C.apply(U,w))}},2826:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return re}});var X=Y(13873);function re(V,b){var U=typeof Symbol!="undefined"&&V[Symbol.iterator]||V["@@iterator"];if(!U){if(Array.isArray(V)||(U=(0,X.Z)(V))||b&&V&&typeof V.length=="number"){U&&(V=U);var C=0,w=function(){};return{s:w,n:function(){return C>=V.length?{done:!0}:{done:!1,value:V[C++]}},e:function(m){throw m},f:w}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var y,T=!0,x=!1;return{s:function(){U=U.call(V)},n:function(){var m=U.next();return T=m.done,m},e:function(m){x=!0,y=m},f:function(){try{T||U.return==null||U.return()}finally{if(x)throw y}}}}},16722:function(Se,Ce,Y){"use strict";Y.d(Ce,{Z:function(){return y}});const X=T=>typeof T=="object"&&T!=null&&T.nodeType===1,re=(T,x)=>(!x||T!=="hidden")&&T!=="visible"&&T!=="clip",V=(T,x)=>{if(T.clientHeight<T.scrollHeight||T.clientWidth<T.scrollWidth){const p=getComputedStyle(T,null);return re(p.overflowY,x)||re(p.overflowX,x)||(m=>{const L=(d=>{if(!d.ownerDocument||!d.ownerDocument.defaultView)return null;try{return d.ownerDocument.defaultView.frameElement}catch(g){return null}})(m);return!!L&&(L.clientHeight<m.scrollHeight||L.clientWidth<m.scrollWidth)})(T)}return!1},b=(T,x,p,m,L,d,g,A)=>d<T&&g>x||d>T&&g<x?0:d<=T&&A<=p||g>=x&&A>=p?d-T-m:g>x&&A<p||d<T&&A>p?g-x+L:0,U=T=>{const x=T.parentElement;return x==null?T.getRootNode().host||null:x},C=(T,x)=>{var p,m,L,d;if(typeof document=="undefined")return[];const{scrollMode:g,block:A,inline:M,boundary:O,skipOverflowHiddenElements:S}=x,I=typeof O=="function"?O:de=>de!==O;if(!X(T))throw new TypeError("Invalid target");const c=document.scrollingElement||document.documentElement,f=[];let P=T;for(;X(P)&&I(P);){if(P=U(P),P===c){f.push(P);break}P!=null&&P===document.body&&V(P)&&!V(document.documentElement)||P!=null&&V(P,S)&&f.push(P)}const N=(m=(p=window.visualViewport)==null?void 0:p.width)!=null?m:innerWidth,k=(d=(L=window.visualViewport)==null?void 0:L.height)!=null?d:innerHeight,{scrollX:W,scrollY:z}=window,{height:Z,width:J,top:ee,right:$,bottom:ie,left:se}=T.getBoundingClientRect(),{top:ne,right:ce,bottom:ae,left:fe}=(de=>{const be=window.getComputedStyle(de);return{top:parseFloat(be.scrollMarginTop)||0,right:parseFloat(be.scrollMarginRight)||0,bottom:parseFloat(be.scrollMarginBottom)||0,left:parseFloat(be.scrollMarginLeft)||0}})(T);let oe=A==="start"||A==="nearest"?ee-ne:A==="end"?ie+ae:ee+Z/2-ne+ae,pe=M==="center"?se+J/2-fe+ce:M==="end"?$+ce:se-fe;const _e=[];for(let de=0;de<f.length;de++){const be=f[de],{height:Ae,width:Fe,top:Ue,right:it,bottom:tt,left:et}=be.getBoundingClientRect();if(g==="if-needed"&&ee>=0&&se>=0&&ie<=k&&$<=N&&(be===c&&!V(be)||ee>=Ue&&ie<=tt&&se>=et&&$<=it))return _e;const vt=getComputedStyle(be),dt=parseInt(vt.borderLeftWidth,10),je=parseInt(vt.borderTopWidth,10),nt=parseInt(vt.borderRightWidth,10),rt=parseInt(vt.borderBottomWidth,10);let ft=0,lt=0;const wt="offsetWidth"in be?be.offsetWidth-be.clientWidth-dt-nt:0,Re="offsetHeight"in be?be.offsetHeight-be.clientHeight-je-rt:0,We="offsetWidth"in be?be.offsetWidth===0?0:Fe/be.offsetWidth:0,Pe="offsetHeight"in be?be.offsetHeight===0?0:Ae/be.offsetHeight:0;if(c===be)ft=A==="start"?oe:A==="end"?oe-k:A==="nearest"?b(z,z+k,k,je,rt,z+oe,z+oe+Z,Z):oe-k/2,lt=M==="start"?pe:M==="center"?pe-N/2:M==="end"?pe-N:b(W,W+N,N,dt,nt,W+pe,W+pe+J,J),ft=Math.max(0,ft+z),lt=Math.max(0,lt+W);else{ft=A==="start"?oe-Ue-je:A==="end"?oe-tt+rt+Re:A==="nearest"?b(Ue,tt,Ae,je,rt+Re,oe,oe+Z,Z):oe-(Ue+Ae/2)+Re/2,lt=M==="start"?pe-et-dt:M==="center"?pe-(et+Fe/2)+wt/2:M==="end"?pe-it+nt+wt:b(et,it,Fe,dt,nt+wt,pe,pe+J,J);const{scrollLeft:ke,scrollTop:Ze}=be;ft=Pe===0?0:Math.max(0,Math.min(Ze+ft/Pe,be.scrollHeight-Ae/Pe+Re)),lt=We===0?0:Math.max(0,Math.min(ke+lt/We,be.scrollWidth-Fe/We+wt)),oe+=Ze-ft,pe+=ke-lt}_e.push({el:be,top:ft,left:lt})}return _e},w=T=>T===!1?{block:"end",inline:"nearest"}:(x=>x===Object(x)&&Object.keys(x).length!==0)(T)?T:{block:"start",inline:"nearest"};function y(T,x){if(!T.isConnected||!(L=>{let d=L;for(;d&&d.parentNode;){if(d.parentNode===document)return!0;d=d.parentNode instanceof ShadowRoot?d.parentNode.host:d.parentNode}return!1})(T))return;const p=(L=>{const d=window.getComputedStyle(L);return{top:parseFloat(d.scrollMarginTop)||0,right:parseFloat(d.scrollMarginRight)||0,bottom:parseFloat(d.scrollMarginBottom)||0,left:parseFloat(d.scrollMarginLeft)||0}})(T);if((L=>typeof L=="object"&&typeof L.behavior=="function")(x))return x.behavior(C(T,x));const m=typeof x=="boolean"||x==null?void 0:x.behavior;for(const{el:L,top:d,left:g}of C(T,w(x))){const A=d-p.top+p.bottom,M=g-p.left+p.right;L.scroll({top:A,left:M,behavior:m})}}},80813:function(Se,Ce,Y){"use strict";Y.d(Ce,{CR:function(){return M},Jh:function(){return L},Q_:function(){return ee},XA:function(){return A},ZT:function(){return re},_T:function(){return b},ev:function(){return I},mG:function(){return m},pi:function(){return V},pr:function(){return S}});var X=function(oe,pe){return X=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_e,de){_e.__proto__=de}||function(_e,de){for(var be in de)Object.prototype.hasOwnProperty.call(de,be)&&(_e[be]=de[be])},X(oe,pe)};function re(oe,pe){if(typeof pe!="function"&&pe!==null)throw new TypeError("Class extends value "+String(pe)+" is not a constructor or null");X(oe,pe);function _e(){this.constructor=oe}oe.prototype=pe===null?Object.create(pe):(_e.prototype=pe.prototype,new _e)}var V=function(){return V=Object.assign||function(pe){for(var _e,de=1,be=arguments.length;de<be;de++){_e=arguments[de];for(var Ae in _e)Object.prototype.hasOwnProperty.call(_e,Ae)&&(pe[Ae]=_e[Ae])}return pe},V.apply(this,arguments)};function b(oe,pe){var _e={};for(var de in oe)Object.prototype.hasOwnProperty.call(oe,de)&&pe.indexOf(de)<0&&(_e[de]=oe[de]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var be=0,de=Object.getOwnPropertySymbols(oe);be<de.length;be++)pe.indexOf(de[be])<0&&Object.prototype.propertyIsEnumerable.call(oe,de[be])&&(_e[de[be]]=oe[de[be]]);return _e}function U(oe,pe,_e,de){var be=arguments.length,Ae=be<3?pe:de===null?de=Object.getOwnPropertyDescriptor(pe,_e):de,Fe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ae=Reflect.decorate(oe,pe,_e,de);else for(var Ue=oe.length-1;Ue>=0;Ue--)(Fe=oe[Ue])&&(Ae=(be<3?Fe(Ae):be>3?Fe(pe,_e,Ae):Fe(pe,_e))||Ae);return be>3&&Ae&&Object.defineProperty(pe,_e,Ae),Ae}function C(oe,pe){return function(_e,de){pe(_e,de,oe)}}function w(oe,pe,_e,de,be,Ae){function Fe(lt){if(lt!==void 0&&typeof lt!="function")throw new TypeError("Function expected");return lt}for(var Ue=de.kind,it=Ue==="getter"?"get":Ue==="setter"?"set":"value",tt=!pe&&oe?de.static?oe:oe.prototype:null,et=pe||(tt?Object.getOwnPropertyDescriptor(tt,de.name):{}),vt,dt=!1,je=_e.length-1;je>=0;je--){var nt={};for(var rt in de)nt[rt]=rt==="access"?{}:de[rt];for(var rt in de.access)nt.access[rt]=de.access[rt];nt.addInitializer=function(lt){if(dt)throw new TypeError("Cannot add initializers after decoration has completed");Ae.push(Fe(lt||null))};var ft=(0,_e[je])(Ue==="accessor"?{get:et.get,set:et.set}:et[it],nt);if(Ue==="accessor"){if(ft===void 0)continue;if(ft===null||typeof ft!="object")throw new TypeError("Object expected");(vt=Fe(ft.get))&&(et.get=vt),(vt=Fe(ft.set))&&(et.set=vt),(vt=Fe(ft.init))&&be.unshift(vt)}else(vt=Fe(ft))&&(Ue==="field"?be.unshift(vt):et[it]=vt)}tt&&Object.defineProperty(tt,de.name,et),dt=!0}function y(oe,pe,_e){for(var de=arguments.length>2,be=0;be<pe.length;be++)_e=de?pe[be].call(oe,_e):pe[be].call(oe);return de?_e:void 0}function T(oe){return typeof oe=="symbol"?oe:"".concat(oe)}function x(oe,pe,_e){return typeof pe=="symbol"&&(pe=pe.description?"[".concat(pe.description,"]"):""),Object.defineProperty(oe,"name",{configurable:!0,value:_e?"".concat(_e," ",pe):pe})}function p(oe,pe){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(oe,pe)}function m(oe,pe,_e,de){function be(Ae){return Ae instanceof _e?Ae:new _e(function(Fe){Fe(Ae)})}return new(_e||(_e=Promise))(function(Ae,Fe){function Ue(et){try{tt(de.next(et))}catch(vt){Fe(vt)}}function it(et){try{tt(de.throw(et))}catch(vt){Fe(vt)}}function tt(et){et.done?Ae(et.value):be(et.value).then(Ue,it)}tt((de=de.apply(oe,pe||[])).next())})}function L(oe,pe){var _e={label:0,sent:function(){if(Ae[0]&1)throw Ae[1];return Ae[1]},trys:[],ops:[]},de,be,Ae,Fe=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return Fe.next=Ue(0),Fe.throw=Ue(1),Fe.return=Ue(2),typeof Symbol=="function"&&(Fe[Symbol.iterator]=function(){return this}),Fe;function Ue(tt){return function(et){return it([tt,et])}}function it(tt){if(de)throw new TypeError("Generator is already executing.");for(;Fe&&(Fe=0,tt[0]&&(_e=0)),_e;)try{if(de=1,be&&(Ae=tt[0]&2?be.return:tt[0]?be.throw||((Ae=be.return)&&Ae.call(be),0):be.next)&&!(Ae=Ae.call(be,tt[1])).done)return Ae;switch(be=0,Ae&&(tt=[tt[0]&2,Ae.value]),tt[0]){case 0:case 1:Ae=tt;break;case 4:return _e.label++,{value:tt[1],done:!1};case 5:_e.label++,be=tt[1],tt=[0];continue;case 7:tt=_e.ops.pop(),_e.trys.pop();continue;default:if(Ae=_e.trys,!(Ae=Ae.length>0&&Ae[Ae.length-1])&&(tt[0]===6||tt[0]===2)){_e=0;continue}if(tt[0]===3&&(!Ae||tt[1]>Ae[0]&&tt[1]<Ae[3])){_e.label=tt[1];break}if(tt[0]===6&&_e.label<Ae[1]){_e.label=Ae[1],Ae=tt;break}if(Ae&&_e.label<Ae[2]){_e.label=Ae[2],_e.ops.push(tt);break}Ae[2]&&_e.ops.pop(),_e.trys.pop();continue}tt=pe.call(oe,_e)}catch(et){tt=[6,et],be=0}finally{de=Ae=0}if(tt[0]&5)throw tt[1];return{value:tt[0]?tt[1]:void 0,done:!0}}}var d=Object.create?function(oe,pe,_e,de){de===void 0&&(de=_e);var be=Object.getOwnPropertyDescriptor(pe,_e);(!be||("get"in be?!pe.__esModule:be.writable||be.configurable))&&(be={enumerable:!0,get:function(){return pe[_e]}}),Object.defineProperty(oe,de,be)}:function(oe,pe,_e,de){de===void 0&&(de=_e),oe[de]=pe[_e]};function g(oe,pe){for(var _e in oe)_e!=="default"&&!Object.prototype.hasOwnProperty.call(pe,_e)&&d(pe,oe,_e)}function A(oe){var pe=typeof Symbol=="function"&&Symbol.iterator,_e=pe&&oe[pe],de=0;if(_e)return _e.call(oe);if(oe&&typeof oe.length=="number")return{next:function(){return oe&&de>=oe.length&&(oe=void 0),{value:oe&&oe[de++],done:!oe}}};throw new TypeError(pe?"Object is not iterable.":"Symbol.iterator is not defined.")}function M(oe,pe){var _e=typeof Symbol=="function"&&oe[Symbol.iterator];if(!_e)return oe;var de=_e.call(oe),be,Ae=[],Fe;try{for(;(pe===void 0||pe-- >0)&&!(be=de.next()).done;)Ae.push(be.value)}catch(Ue){Fe={error:Ue}}finally{try{be&&!be.done&&(_e=de.return)&&_e.call(de)}finally{if(Fe)throw Fe.error}}return Ae}function O(){for(var oe=[],pe=0;pe<arguments.length;pe++)oe=oe.concat(M(arguments[pe]));return oe}function S(){for(var oe=0,pe=0,_e=arguments.length;pe<_e;pe++)oe+=arguments[pe].length;for(var de=Array(oe),be=0,pe=0;pe<_e;pe++)for(var Ae=arguments[pe],Fe=0,Ue=Ae.length;Fe<Ue;Fe++,be++)de[be]=Ae[Fe];return de}function I(oe,pe,_e){if(_e||arguments.length===2)for(var de=0,be=pe.length,Ae;de<be;de++)(Ae||!(de in pe))&&(Ae||(Ae=Array.prototype.slice.call(pe,0,de)),Ae[de]=pe[de]);return oe.concat(Ae||Array.prototype.slice.call(pe))}function c(oe){return this instanceof c?(this.v=oe,this):new c(oe)}function f(oe,pe,_e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var de=_e.apply(oe,pe||[]),be,Ae=[];return be=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),Ue("next"),Ue("throw"),Ue("return",Fe),be[Symbol.asyncIterator]=function(){return this},be;function Fe(je){return function(nt){return Promise.resolve(nt).then(je,vt)}}function Ue(je,nt){de[je]&&(be[je]=function(rt){return new Promise(function(ft,lt){Ae.push([je,rt,ft,lt])>1||it(je,rt)})},nt&&(be[je]=nt(be[je])))}function it(je,nt){try{tt(de[je](nt))}catch(rt){dt(Ae[0][3],rt)}}function tt(je){je.value instanceof c?Promise.resolve(je.value.v).then(et,vt):dt(Ae[0][2],je)}function et(je){it("next",je)}function vt(je){it("throw",je)}function dt(je,nt){je(nt),Ae.shift(),Ae.length&&it(Ae[0][0],Ae[0][1])}}function P(oe){var pe,_e;return pe={},de("next"),de("throw",function(be){throw be}),de("return"),pe[Symbol.iterator]=function(){return this},pe;function de(be,Ae){pe[be]=oe[be]?function(Fe){return(_e=!_e)?{value:c(oe[be](Fe)),done:!1}:Ae?Ae(Fe):Fe}:Ae}}function N(oe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var pe=oe[Symbol.asyncIterator],_e;return pe?pe.call(oe):(oe=typeof A=="function"?A(oe):oe[Symbol.iterator](),_e={},de("next"),de("throw"),de("return"),_e[Symbol.asyncIterator]=function(){return this},_e);function de(Ae){_e[Ae]=oe[Ae]&&function(Fe){return new Promise(function(Ue,it){Fe=oe[Ae](Fe),be(Ue,it,Fe.done,Fe.value)})}}function be(Ae,Fe,Ue,it){Promise.resolve(it).then(function(tt){Ae({value:tt,done:Ue})},Fe)}}function k(oe,pe){return Object.defineProperty?Object.defineProperty(oe,"raw",{value:pe}):oe.raw=pe,oe}var W=Object.create?function(oe,pe){Object.defineProperty(oe,"default",{enumerable:!0,value:pe})}:function(oe,pe){oe.default=pe},z=function(oe){return z=Object.getOwnPropertyNames||function(pe){var _e=[];for(var de in pe)Object.prototype.hasOwnProperty.call(pe,de)&&(_e[_e.length]=de);return _e},z(oe)};function Z(oe){if(oe&&oe.__esModule)return oe;var pe={};if(oe!=null)for(var _e=z(oe),de=0;de<_e.length;de++)_e[de]!=="default"&&d(pe,oe,_e[de]);return W(pe,oe),pe}function J(oe){return oe&&oe.__esModule?oe:{default:oe}}function ee(oe,pe,_e,de){if(_e==="a"&&!de)throw new TypeError("Private accessor was defined without a getter");if(typeof pe=="function"?oe!==pe||!de:!pe.has(oe))throw new TypeError("Cannot read private member from an object whose class did not declare it");return _e==="m"?de:_e==="a"?de.call(oe):de?de.value:pe.get(oe)}function $(oe,pe,_e,de,be){if(de==="m")throw new TypeError("Private method is not writable");if(de==="a"&&!be)throw new TypeError("Private accessor was defined without a setter");if(typeof pe=="function"?oe!==pe||!be:!pe.has(oe))throw new TypeError("Cannot write private member to an object whose class did not declare it");return de==="a"?be.call(oe,_e):be?be.value=_e:pe.set(oe,_e),_e}function ie(oe,pe){if(pe===null||typeof pe!="object"&&typeof pe!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof oe=="function"?pe===oe:oe.has(pe)}function se(oe,pe,_e){if(pe!=null){if(typeof pe!="object"&&typeof pe!="function")throw new TypeError("Object expected.");var de,be;if(_e){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");de=pe[Symbol.asyncDispose]}if(de===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");de=pe[Symbol.dispose],_e&&(be=de)}if(typeof de!="function")throw new TypeError("Object not disposable.");be&&(de=function(){try{be.call(this)}catch(Ae){return Promise.reject(Ae)}}),oe.stack.push({value:pe,dispose:de,async:_e})}else _e&&oe.stack.push({async:!0});return pe}var ne=typeof SuppressedError=="function"?SuppressedError:function(oe,pe,_e){var de=new Error(_e);return de.name="SuppressedError",de.error=oe,de.suppressed=pe,de};function ce(oe){function pe(Ae){oe.error=oe.hasError?new ne(Ae,oe.error,"An error was suppressed during disposal."):Ae,oe.hasError=!0}var _e,de=0;function be(){for(;_e=oe.stack.pop();)try{if(!_e.async&&de===1)return de=0,oe.stack.push(_e),Promise.resolve().then(be);if(_e.dispose){var Ae=_e.dispose.call(_e.value);if(_e.async)return de|=2,Promise.resolve(Ae).then(be,function(Fe){return pe(Fe),be()})}else de|=1}catch(Fe){pe(Fe)}if(de===1)return oe.hasError?Promise.reject(oe.error):Promise.resolve();if(oe.hasError)throw oe.error}return be()}function ae(oe,pe){return typeof oe=="string"&&/^\.\.?\//.test(oe)?oe.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(_e,de,be,Ae,Fe){return de?pe?".jsx":".js":be&&(!Ae||!Fe)?_e:be+Ae+"."+Fe.toLowerCase()+"js"}):oe}var fe={__extends:re,__assign:V,__rest:b,__decorate:U,__param:C,__esDecorate:w,__runInitializers:y,__propKey:T,__setFunctionName:x,__metadata:p,__awaiter:m,__generator:L,__createBinding:d,__exportStar:g,__values:A,__read:M,__spread:O,__spreadArrays:S,__spreadArray:I,__await:c,__asyncGenerator:f,__asyncDelegator:P,__asyncValues:N,__makeTemplateObject:k,__importStar:Z,__importDefault:J,__classPrivateFieldGet:ee,__classPrivateFieldSet:$,__classPrivateFieldIn:ie,__addDisposableResource:se,__disposeResources:ce,__rewriteRelativeImportExtension:ae}}}]);
|
|
|
}()); |