|
|
!(function(){var Gv=Object.defineProperty,Uv=Object.defineProperties;var Vv=Object.getOwnPropertyDescriptors;var af=Object.getOwnPropertySymbols;var Yv=Object.prototype.hasOwnProperty,Hv=Object.prototype.propertyIsEnumerable;var vc=Math.pow,ed=(bt,Et,y)=>Et in bt?Gv(bt,Et,{enumerable:!0,configurable:!0,writable:!0,value:y}):bt[Et]=y,_l=(bt,Et)=>{for(var y in Et||(Et={}))Yv.call(Et,y)&&ed(bt,y,Et[y]);if(af)for(var y of af(Et))Hv.call(Et,y)&&ed(bt,y,Et[y]);return bt},nd=(bt,Et)=>Uv(bt,Vv(Et));var Vi=(bt,Et,y)=>ed(bt,typeof Et!="symbol"?Et+"":Et,y);(self.webpackChunk=self.webpackChunk||[]).push([[7798],{55532:function(bt,Et,y){"use strict";y.d(Et,{ni:function(){return Qs},EF:function(){return Wi}});var c=function(X,ot){var xt=X.nodes,zt=X.edges,Qt=[],ee={};if(!xt)throw new Error("invalid nodes data!");return xt&&xt.forEach(function(De,_e){ee[De.id]=_e;var qe=[];Qt.push(qe)}),zt&&zt.forEach(function(De){var _e=De.source,qe=De.target,ln=ee[_e],en=ee[qe];!ln&&ln!==0||!en&&en!==0||(Qt[ln][en]=1,ot||(Qt[en][ln]=1))}),Qt},_=c,I=function(X,ot){return X===ot},z=function(){function At(X,ot){ot===void 0&&(ot=null),this.value=X,this.next=ot}return At.prototype.toString=function(X){return X?X(this.value):"".concat(this.value)},At}(),S=function(){function At(X){X===void 0&&(X=I),this.head=null,this.tail=null,this.compare=X}return At.prototype.prepend=function(X){var ot=new z(X,this.head);return this.head=ot,this.tail||(this.tail=ot),this},At.prototype.append=function(X){var ot=new z(X);return this.head?(this.tail.next=ot,this.tail=ot,this):(this.head=ot,this.tail=ot,this)},At.prototype.delete=function(X){if(!this.head)return null;for(var ot=null;this.head&&this.compare(this.head.value,X);)ot=this.head,this.head=this.head.next;var xt=this.head;if(xt!==null)for(;xt.next;)this.compare(xt.next.value,X)?(ot=xt.next,xt.next=xt.next.next):xt=xt.next;return this.compare(this.tail.value,X)&&(this.tail=xt),ot},At.prototype.find=function(X){var ot=X.value,xt=ot===void 0?void 0:ot,zt=X.callback,Qt=zt===void 0?void 0:zt;if(!this.head)return null;for(var ee=this.head;ee;){if(Qt&&Qt(ee.value)||xt!==void 0&&this.compare(ee.value,xt))return ee;ee=ee.next}return null},At.prototype.deleteTail=function(){var X=this.tail;if(this.head===this.tail)return this.head=null,this.tail=null,X;for(var ot=this.head;ot.next;)ot.next.next?ot=ot.next:ot.next=null;return this.tail=ot,X},At.prototype.deleteHead=function(){if(!this.head)return null;var X=this.head;return this.head.next?this.head=this.head.next:(this.head=null,this.tail=null),X},At.prototype.fromArray=function(X){var ot=this;return X.forEach(function(xt){return ot.append(xt)}),this},At.prototype.toArray=function(){for(var X=[],ot=this.head;ot;)X.push(ot),ot=ot.next;return X},At.prototype.reverse=function(){for(var X=this.head,ot=null,xt=null;X;)xt=X.next,X.next=ot,ot=X,X=xt;this.tail=this.head,this.head=ot},At.prototype.toString=function(X){return X===void 0&&(X=void 0),this.toArray().map(function(ot){return ot.toString(X)}).toString()},At}(),R=S,M=function(){function At(){this.linkedList=new R}return At.prototype.isEmpty=function(){return!this.linkedList.head},At.prototype.peek=function(){return this.linkedList.head?this.linkedList.head.value:null},At.prototype.enqueue=function(X){this.linkedList.append(X)},At.prototype.dequeue=function(){var X=this.linkedList.deleteHead();return X?X.value:null},At.prototype.toString=function(X){return this.linkedList.toString(X)},At}(),N=M,D=function(X,ot,xt){ot===void 0&&(ot=[]);var zt=ot.filter(function(_e){return _e.source===X||_e.target===X});if(xt==="target"){var Qt=function(qe){return qe.source===X};return zt.filter(Qt).map(function(_e){return _e.target})}if(xt==="source"){var ee=function(qe){return qe.target===X};return zt.filter(ee).map(function(_e){return _e.source})}var De=function(qe){return qe.source===X?qe.target:qe.source};return zt.map(De)},A=function(X,ot){return ot.filter(function(xt){return xt.source===X})},L=function(X,ot){return ot.filter(function(xt){return xt.source===X||xt.target===X})},F=function(X){X===void 0&&(X=0);var ot="".concat(Math.random()).split(".")[1].substr(0,5),xt="".concat(Math.random()).split(".")[1].substr(0,5);return"".concat(X,"-").concat(ot).concat(xt)};function rt(At){At===void 0&&(At={});var X=At,ot=function(){},xt=function(){var zt={};return function(Qt){var ee=Qt.next,De=ee;return zt[De]?!1:(zt[De]=!0,!0)}}();return X.allowTraversal=At.allowTraversal||xt,X.enter=At.enter||ot,X.leave=At.leave||ot,X}var G=function(X,ot,xt,zt){zt===void 0&&(zt=!0);var Qt=rt(xt),ee=new N,De=X.edges,_e=De===void 0?[]:De;ee.enqueue(ot);for(var qe="",ln=function(){var Sn=ee.dequeue();Qt.enter({current:Sn,previous:qe}),D(Sn,_e,zt?"target":void 0).forEach(function(bn){Qt.allowTraversal({previous:qe,current:Sn,next:bn})&&ee.enqueue(bn)}),Qt.leave({current:Sn,previous:qe}),qe=Sn};!ee.isEmpty();)ln()},kt=G,ft=function(X){for(var ot=X.nodes,xt=ot===void 0?[]:ot,zt=X.edges,Qt=zt===void 0?[]:zt,ee=[],De={},_e=[],qe=function bn(Pn){_e.push(Pn),De[Pn.id]=!0;for(var In=D(Pn.id,Qt),kn=function($n){var cr=In[$n];if(!De[cr]){var vr=xt.filter(function(hr){return hr.id===cr});vr.length>0&&bn(vr[0])}},Wn=0;Wn<In.length;++Wn)kn(Wn)},ln=0;ln<xt.length;ln++){var en=xt[ln];if(!De[en.id]){qe(en);for(var Sn=[];_e.length>0;)Sn.push(_e.pop());ee.push(Sn)}}return ee},J=function(X){for(var ot=X.nodes,xt=ot===void 0?[]:ot,zt=X.edges,Qt=zt===void 0?[]:zt,ee=[],De={},_e={},qe={},ln=[],en=0,Sn=function kn(Wn){_e[Wn.id]=en,qe[Wn.id]=en,en+=1,ee.push(Wn),De[Wn.id]=!0;for(var Jn=D(Wn.id,Qt,"target").filter(function(Lr){return xt.map(function(Tr){return Tr.id}).indexOf(Lr)>-1}),$n=function(Tr){var Nr=Jn[Tr];if(!_e[Nr]&&_e[Nr]!==0){var zr=xt.filter(function(_r){return _r.id===Nr});zr.length>0&&kn(zr[0]),qe[Wn.id]=Math.min(qe[Wn.id],qe[Nr])}else De[Nr]&&(qe[Wn.id]=Math.min(qe[Wn.id],_e[Nr]))},cr=0;cr<Jn.length;cr++)$n(cr);if(qe[Wn.id]===_e[Wn.id]){for(var vr=[];ee.length>0;){var hr=ee.pop();if(De[hr.id]=!1,vr.push(hr),hr===Wn)break}vr.length>0&&ln.push(vr)}},bn=0,Pn=xt;bn<Pn.length;bn++){var In=Pn[bn];!_e[In.id]&&_e[In.id]!==0&&Sn(In)}return ln};function Rt(At,X){return X?J(At):ft(At)}var Tt=function(X){var ot={},xt=X.nodes,zt=xt===void 0?[]:xt,Qt=X.edges,ee=Qt===void 0?[]:Qt;return zt.forEach(function(De){ot[De.id]={degree:0,inDegree:0,outDegree:0}}),ee.forEach(function(De){ot[De.source].degree++,ot[De.source].outDegree++,ot[De.target].degree++,ot[De.target].inDegree++}),ot},Vt=Tt,fe=function(X,ot){var xt=Tt(X);return xt[ot]?Tt(X)[ot].inDegree:0},ue=function(X,ot){var xt=Tt(X);return xt[ot]?Tt(X)[ot].outDegree:0};function Ce(At){At===void 0&&(At={});var X=At,ot=function(){},xt=function(){var zt={};return function(Qt){var ee=Qt.next;return zt[ee]?!1:(zt[ee]=!0,!0)}}();return X.allowTraversal=At.allowTraversal||xt,X.enter=At.enter||ot,X.leave=At.leave||ot,X}function be(At,X,ot,xt,zt){zt===void 0&&(zt=!0),xt.enter({current:X,previous:ot});var Qt=At.edges,ee=Qt===void 0?[]:Qt;D(X,ee,zt?"target":void 0).forEach(function(De){xt.allowTraversal({previous:ot,current:X,next:De})&&be(At,De,X,xt,zt)}),xt.leave({current:X,previous:ot})}function we(At,X,ot,xt){xt===void 0&&(xt=!0),be(At,X,"",Ce(ot),xt)}var ne=function(X){var ot=null,xt=X.nodes,zt=xt===void 0?[]:xt,Qt={},ee={},De={},_e={};zt.forEach(function(en){ee[en.id]=en});for(var qe={enter:function(Sn){var bn=Sn.current,Pn=Sn.previous;if(De[bn]){ot={};for(var In=bn,kn=Pn;kn!==bn;)ot[In]=kn,In=kn,kn=Qt[kn];ot[In]=kn}else De[bn]=bn,delete ee[bn],Qt[bn]=Pn},leave:function(Sn){var bn=Sn.current;_e[bn]=bn,delete De[bn]},allowTraversal:function(Sn){var bn=Sn.next;return ot?!1:!_e[bn]}};Object.keys(ee).length;){var ln=Object.keys(ee)[0];we(X,ln,qe)}return ot},We=function(X,ot,xt){var zt,Qt;xt===void 0&&(xt=!0);for(var ee=[],De=Rt(X,!1),_e=0,qe=De;_e<qe.length;_e++){var ln=qe[_e];if(ln.length)for(var en=ln[0],Sn=en.id,bn=[en],Pn=(zt={},zt[Sn]=en,zt),In=(Qt={},Qt[Sn]=new Set,Qt);bn.length>0;)for(var kn=bn.pop(),Wn=kn.id,Jn=D(Wn,X.edges),$n=function(hr){var Lr,Tr=Jn[hr],Nr=X.nodes.find(function(k){return k.id===Tr});if(Tr===Wn)ee.push((Lr={},Lr[Tr]=kn,Lr));else if(!(Tr in In))Pn[Tr]=kn,bn.push(Nr),In[Tr]=new Set([kn]);else if(!In[Wn].has(Nr)){for(var zr=!0,_r=[Nr,kn],j=Pn[Wn];In[Tr].size&&!In[Tr].has(j)&&(_r.push(j),j!==Pn[j.id]);)j=Pn[j.id];if(_r.push(j),ot&&xt?(zr=!1,_r.findIndex(function(k){return ot.indexOf(k.id)>-1})>-1&&(zr=!0)):ot&&!xt&&_r.findIndex(function(k){return ot.indexOf(k.id)>-1})>-1&&(zr=!1),zr){for(var B={},P=1;P<_r.length;P+=1)B[_r[P-1].id]=_r[P];_r.length&&(B[_r[_r.length-1].id]=_r[0]),ee.push(B)}In[Tr].add(kn)}},cr=0;cr<Jn.length;cr+=1)$n(cr)}return ee},rn=function(X,ot,xt){xt===void 0&&(xt=!0);for(var zt=[],Qt=new Set,ee=[],De=[],_e={},qe={},ln=function(j){for(var B=[j];B.length>0;){var P=B.pop();Qt.has(P)&&(Qt.delete(P),ee[P.id].forEach(function(k){B.push(k)}),ee[P.id].clear())}},en=function _r(j,B,P){var k=!1;if(ot&&xt===!1&&ot.indexOf(j.id)>-1)return k;zt.push(j),Qt.add(j);for(var U=P[j.id],at=0;at<U.length;at+=1){var ut=_e[U[at]];if(ut===B){for(var ct={},pt=1;pt<zt.length;pt+=1)ct[zt[pt-1].id]=zt[pt];zt.length&&(ct[zt[zt.length-1].id]=zt[0]),De.push(ct),k=!0}else Qt.has(ut)||_r(ut,B,P)&&(k=!0)}if(k)ln(j);else for(var at=0;at<U.length;at+=1){var ut=_e[U[at]];ee[ut.id].has(j)||ee[ut.id].add(j)}return zt.pop(),k},Sn=X.nodes,bn=Sn===void 0?[]:Sn,Pn=0;Pn<bn.length;Pn+=1){var In=bn[Pn],kn=In.id;qe[kn]=Pn,_e[Pn]=In}if(ot&&xt)for(var Wn=function(j){var B=ot[j];qe[bn[j].id]=qe[B],qe[B]=0,_e[0]=bn.find(function(P){return P.id===B}),_e[qe[bn[j].id]]=bn[j]},Pn=0;Pn<ot.length;Pn++)Wn(Pn);for(var Jn=function(j){for(var B,P,k=1/0,U=0;U<j.length;U+=1)for(var at=j[U],ut=0;ut<at.length;ut++){var ct=qe[at[ut].id];ct<k&&(k=ct,P=U)}for(var pt=j[P],Bt=[],U=0;U<pt.length;U+=1){var ae=pt[U];Bt[ae.id]=[];for(var pe=0,Te=D(ae.id,X.edges,"target").filter(function(fn){return pt.map(function(gn){return gn.id}).indexOf(fn)>-1});pe<Te.length;pe++){var Fe=Te[pe];Fe===ae.id&&!(xt===!1&&ot.indexOf(ae.id)>-1)?De.push((B={},B[ae.id]=ae,B)):Bt[ae.id].push(qe[Fe])}}return{component:pt,adjList:Bt,minIdx:k}},$n=0;$n<bn.length;){var cr=bn.filter(function(_r){return qe[_r.id]>=$n}),vr=J({nodes:cr,edges:X.edges}).filter(function(_r){return _r.length>1});if(vr.length===0)break;var hr=Jn(vr),Lr=hr.minIdx,Tr=hr.adjList,Nr=hr.component;if(Nr.length>1){Nr.forEach(function(_r){ee[_r.id]=new Set});var zr=_e[Lr];if(ot&&xt&&ot.indexOf(zr.id)===-1)return De;en(zr,zr,Tr),$n=Lr+1}else break}return De},Xe=function(X,ot,xt,zt){return zt===void 0&&(zt=!0),ot?rn(X,xt,zt):We(X,xt,zt)},pn=ne,Tn=y(80813),$e={}.toString,mn=function(At,X){return $e.call(At)==="[object "+X+"]"},It=mn,Ee=function(At){return It(At,"Function")},cn=function(At){return Array.isArray?Array.isArray(At):It(At,"Array")},sn=function(At){var X=typeof At;return At!==null&&X==="object"||X==="function"};function Pe(At,X){if(At){var ot;if(cn(At))for(var xt=0,zt=At.length;xt<zt&&(ot=X(At[xt],xt),ot!==!1);xt++);else if(sn(At)){for(var Qt in At)if(At.hasOwnProperty(Qt)&&(ot=X(At[Qt],Qt),ot===!1))break}}}var ze=Pe,Ke=Object.keys?function(At){return Object.keys(At)}:function(At){var X=[];return ze(At,function(ot,xt){Ee(At)&&xt==="prototype"||X.push(xt)}),X},le=null;function Ae(At,X){var ot=keys(X),xt=ot.length;if(isNil(At))return!xt;for(var zt=0;zt<xt;zt+=1){var Qt=ot[zt];if(X[Qt]!==At[Qt]||!(Qt in At))return!1}return!0}var Pt=null,wt=function(At){if(!isObjectLike(At)||!isType(At,"Object"))return!1;if(Object.getPrototypeOf(At)===null)return!0;for(var X=At;Object.getPrototypeOf(X)!==null;)X=Object.getPrototypeOf(X);return Object.getPrototypeOf(At)===X},de=null;function je(At,X){if(!isArray(At))return null;var ot;if(isFunction(X)&&(ot=X),isPlainObject(X)&&(ot=function(zt){return isMatch(zt,X)}),ot){for(var xt=0;xt<At.length;xt+=1)if(ot(At[xt]))return At[xt]}return null}var Re=null,ce=function(At,X){for(var ot=null,xt=0;xt<At.length;xt++){var zt=At[xt],Qt=zt[X];if(!isNil(Qt)){isArray(Qt)?ot=Qt[0]:ot=Qt;break}}return ot},Le=null,xe=function(At){if(!isArray(At))return[];for(var X=[],ot=0;ot<At.length;ot++)X=X.concat(At[ot]);return X},Ft=null,re=function(At,X){if(X===void 0&&(X=[]),!isArray(At))X.push(At);else for(var ot=0;ot<At.length;ot+=1)re(At[ot],X);return X},Me=null,O=function(At){if(isArray(At))return At.reduce(function(X,ot){return Math.max(X,ot)},At[0])},st=function(At){if(isArray(At))return At.reduce(function(X,ot){return Math.min(X,ot)},At[0])},ve=function(At){var X=At.filter(function(ee){return!isNaN(ee)});if(!X.length)return{min:0,max:0};if(isArray(At[0])){for(var ot=[],xt=0;xt<At.length;xt++)ot=ot.concat(At[xt]);X=ot}var zt=getMax(X),Qt=getMin(X);return{min:Qt,max:zt}},$t=null,Ie=Array.prototype,Ne=Ie.splice,tn=Ie.indexOf,Mt=function(At){for(var X=[],ot=1;ot<arguments.length;ot++)X[ot-1]=arguments[ot];for(var xt=0;xt<X.length;xt++)for(var zt=X[xt],Qt=-1;(Qt=tn.call(At,zt))>-1;)Ne.call(At,Qt,1);return At},q=null,Ct=Array.prototype.splice,Ht=function(X,ot){if(!isArrayLike(X))return[];for(var xt=X?ot.length:0,zt=xt-1;xt--;){var Qt=void 0,ee=ot[xt];(xt===zt||ee!==Qt)&&(Qt=ee,Ct.call(X,ee,1))}return X},Lt=null,_t=function(At,X,ot){if(!isArray(At)&&!isPlainObject(At))return At;var xt=ot;return each(At,function(zt,Qt){xt=X(xt,zt,Qt)}),xt},Ut=null,qt=function(At,X){var ot=[];if(!isArrayLike(At))return ot;for(var xt=-1,zt=[],Qt=At.length;++xt<Qt;){var ee=At[xt];X(ee,xt,At)&&(ot.push(ee),zt.push(xt))}return pullAt(At,zt),ot},se=null,te=function(At){return It(At,"String")};function ke(At,X){var ot;if(isFunction(X))ot=function(zt,Qt){return X(zt)-X(Qt)};else{var xt=[];isString(X)?xt.push(X):isArray(X)&&(xt=X),ot=function(zt,Qt){for(var ee=0;ee<xt.length;ee+=1){var De=xt[ee];if(zt[De]>Qt[De])return 1;if(zt[De]<Qt[De])return-1}return 0}}return At.sort(ot),At}var Ye=null;function Ve(At,X){X===void 0&&(X=new Map);var ot=[];if(Array.isArray(At))for(var xt=0,zt=At.length;xt<zt;xt++){var Qt=At[xt];X.has(Qt)||(ot.push(Qt),X.set(Qt,!0))}return ot}var on=function(At,X){for(var ot=[],xt={},zt=0;zt<At.length;zt++){var Qt=At[zt],ee=Qt[X];if(!isNil(ee)){isArray(ee)||(ee=[ee]);for(var De=0;De<ee.length;De++){var _e=ee[De];xt[_e]||(ot.push(_e),xt[_e]=!0)}}}return ot};function xn(At,X){return isArray(At)||isString(At)?At[0]===X:!1}var vn=null;function Qn(At,X){return isArray(At)||isString(At)?At[At.length-1]===X:!1}var Ln=null,_n=Object.prototype.hasOwnProperty;function me(At,X){if(!X||!isArray(At))return{};for(var ot={},xt=isFunction(X)?X:function(De){return De[X]},zt,Qt=0;Qt<At.length;Qt++){var ee=At[Qt];zt=xt(ee),_n.call(ot,zt)?ot[zt].push(ee):ot[zt]=[ee]}return ot}var pr=null;function Zn(At,X){if(!X)return{0:At};if(!isFunction(X)){var ot=isArray(X)?X:X.replace(/\s+/g,"").split("*");X=function(xt){for(var zt="_",Qt=0,ee=ot.length;Qt<ee;Qt++)zt+=xt[ot[Qt]]&&xt[ot[Qt]].toString();return zt}}return groupBy(At,X)}var kr=function(At,X){if(!X)return[At];var ot=groupToMap(At,X),xt=[];for(var zt in ot)xt.push(ot[zt]);return xt},Ar={};function ei(At){var X=Ar[At];if(!X){for(var ot=At.toString(16),xt=ot.length;xt<6;xt++)ot="0"+ot;X="#"+ot,Ar[At]=X}return X}var yi=null;function ui(At){var X=0,ot=0,xt=0,zt=0;return isArray(At)?At.length===1?X=ot=xt=zt=At[0]:At.length===2?(X=xt=At[0],ot=zt=At[1]):At.length===3?(X=At[0],ot=zt=At[1],xt=At[2]):(X=At[0],ot=At[1],xt=At[2],zt=At[3]):X=ot=xt=zt=At,{r1:X,r2:ot,r3:xt,r4:zt}}var Ur=null,ki=function(At){return It(At,"Number")},la=ki,Oi=function(At){return isNumber(At)&&At%1!==0},Zr=null,qn=function(At){return isNumber(At)&&At%2===0},Ti=null,Nt=Number.isInteger?Number.isInteger:function(At){return la(At)&&At%1===0},E=null,b=function(At){return isNumber(At)&&At<0},h=null,v=function(At){return isNumber(At)&&At%2!==0},w=null,Y=function(At){return isNumber(At)&&At>0},K=null,it=function(At,X){if(isArray(At)){for(var ot,xt=-1/0,zt=0;zt<At.length;zt++){var Qt=At[zt],ee=isFunction(X)?X(Qt):Qt[X];ee>xt&&(ot=Qt,xt=ee)}return ot}},ht=function(At,X){if(isArray(At)){for(var ot,xt=1/0,zt=0;zt<At.length;zt++){var Qt=At[zt],ee=isFunction(X)?X(Qt):Qt[X];ee<xt&&(ot=Qt,xt=ee)}return ot}},Zt=180/Math.PI,$=function(At){return Zt*At},Q=null,H=Math.PI/180,et=function(At){return H*At},yt=null,Xt=null,Ot=Object.values?function(At){return Object.values(At)}:function(At){var X=[];return ze(At,function(ot,xt){Ee(At)&&xt==="prototype"||X.push(ot)}),X},Kt=Ot,gt=function(At,X){return contains(values(At),X)},vt={}.toString,lt=function(At){return vt.call(At).replace(/^\[object /,"").replace(/]$/,"")},jt=null,Yt=function(At){return isType(At,"Arguments")},he=null,ye=function(At){return isType(At,"Boolean")},Wt=null,Oe=function(At){return isType(At,"Date")},He=null,Qe=function(At){return isType(At,"Error")},An=null;function Nn(At){return isNumber(At)&&isFinite(At)}var Cn=Object.prototype,Bn=function(At){var X=At&&At.constructor,ot=typeof X=="function"&&X.prototype||Cn;return At===ot},jn=null,or=function(At){return isType(At,"RegExp")},ir=null,lr=function(){for(var At=[],X=0;X<arguments.length;X++)At[X]=arguments[X];for(var ot=At[0],xt=1;xt<At.length;xt++){var zt=At[xt];isFunction(zt)&&(zt=zt.prototype),mix(ot.prototype,zt)}},Vn=null,nr=function(At){if(typeof At!="object"||At===null)return At;var X;if(cn(At)){X=[];for(var ot=0,xt=At.length;ot<xt;ot++)typeof At[ot]=="object"&&At[ot]!=null?X[ot]=nr(At[ot]):X[ot]=At[ot]}else{X={};for(var zt in At)typeof At[zt]=="object"&&At[zt]!=null?X[zt]=nr(At[zt]):X[zt]=At[zt]}return X},Or=nr,Kr=function(At,X){if(!Ee(At))throw new TypeError("Expected a function");var ot=function(){for(var xt=[],zt=0;zt<arguments.length;zt++)xt[zt]=arguments[zt];var Qt=X?X.apply(this,xt):xt[0],ee=ot.cache;if(ee.has(Qt))return ee.get(Qt);var De=At.apply(this,xt);return ee.set(Qt,De),De};return ot.cache=new Map,ot},Wr=5;function dr(At,X,ot,xt){ot=ot||0,xt=xt||Wr;for(var zt in X)if(X.hasOwnProperty(zt)){var Qt=X[zt];Qt!==null&&isPlainObject(Qt)?(isPlainObject(At[zt])||(At[zt]={}),ot<xt?dr(At[zt],Qt,ot+1,xt):At[zt]=X[zt]):isArray(Qt)?(At[zt]=[],At[zt]=At[zt].concat(Qt)):Qt!==void 0&&(At[zt]=Qt)}}var Fr=function(At){for(var X=[],ot=1;ot<arguments.length;ot++)X[ot-1]=arguments[ot];for(var xt=0;xt<X.length;xt+=1)dr(At,X[xt]);return At},xi=null,$r=function(At,X,ot,xt){isFunction(X)||(ot=X,X=At,At=function(){});var zt=Object.create?function(ee,De){return Object.create(ee,{constructor:{value:De}})}:function(ee,De){function _e(){}_e.prototype=ee;var qe=new _e;return qe.constructor=De,qe},Qt=zt(X.prototype,At);return At.prototype=mix(Qt,At.prototype),At.superclass=zt(X.prototype,X),mix(Qt,ot),mix(At,xt),At},pi=null,Ri=Object.prototype.hasOwnProperty;function Hi(At){if(isNil(At))return!0;if(isArrayLike(At))return!At.length;var X=getType(At);if(X==="Map"||X==="Set")return!At.size;if(isPrototype(At))return!Object.keys(At).length;for(var ot in At)if(Ri.call(At,ot))return!1;return!0}var Zi=null,ca=function(At){return typeof At=="object"&&At!==null},_a=ca,Za=function(At){return At!==null&&typeof At!="function"&&isFinite(At.length)},na=Za,wi=function(At,X){if(At===X)return!0;if(!At||!X||te(At)||te(X))return!1;if(na(At)||na(X)){if(At.length!==X.length)return!1;for(var ot=!0,xt=0;xt<At.length&&(ot=wi(At[xt],X[xt]),!!ot);xt++);return ot}if(_a(At)||_a(X)){var zt=Object.keys(At),Qt=Object.keys(X);if(zt.length!==Qt.length)return!1;for(var ot=!0,xt=0;xt<zt.length&&(ot=wi(At[zt[xt]],X[zt[xt]]),!!ot);xt++);return ot}return!1},fo=wi,ss=function(At,X,ot){return isFunction(ot)?!!ot(At,X):isEqual(At,X)},Yn=function(At,X,ot){for(var xt=0,zt=isString(X)?X.split("."):X;At&&xt<zt.length;)At=At[zt[xt++]];return At===void 0||xt<zt.length?ot:At},xs=function(At,X,ot){var xt=At,zt=isString(X)?X.split("."):X;return zt.forEach(function(Qt,ee){ee<zt.length-1?(isObject(xt[Qt])||(xt[Qt]=isNumber(zt[ee+1])?[]:{}),xt=xt[Qt]):xt[Qt]=ot}),At},Ca=Object.prototype.hasOwnProperty,La=function(At,X){if(At===null||!isPlainObject(At))return{};var ot={};return each(X,function(xt){Ca.call(At,xt)&&(ot[xt]=At[xt])}),ot},Na=function(At,X){return reduce(At,function(ot,xt,zt){return X.includes(zt)||(ot[zt]=xt),ot},{})},$a={},os=function(At){return At=At||"g",$a[At]?$a[At]+=1:$a[At]=1,At+$a[At]},za,ba=Kr(function(At,X){X===void 0&&(X={});var ot=X.fontSize,xt=X.fontFamily,zt=X.fontWeight,Qt=X.fontStyle,ee=X.fontVariant;return za||(za=document.createElement("canvas").getContext("2d")),za.font=[Qt,ee,zt,ot+"px",xt].join(" "),za.measureText(te(At)?At:"").width},function(At,X){return X===void 0&&(X={}),(0,Tn.pr)([At],Kt(X)).join("")}),ws=function(At,X,ot,xt){xt===void 0&&(xt="...");var zt=16,Qt=measureTextWidth(xt,ot),ee=isString(At)?At:toString(At),De=X,_e=[],qe,ln;if(measureTextWidth(At,ot)<=X)return At;for(;qe=ee.substr(0,zt),ln=measureTextWidth(qe,ot),!(ln+Qt>De&&ln>De);)if(_e.push(qe),De-=ln,ee=ee.substr(zt),!ee)return _e.join("");for(;qe=ee.substr(0,1),ln=measureTextWidth(qe,ot),!(ln+Qt>De);)if(_e.push(qe),De-=ln,ee=ee.substr(1),!ee)return _e.join("");return""+_e.join("")+xt},vo=function(){function At(){this.map={}}return At.prototype.has=function(X){return this.map[X]!==void 0},At.prototype.get=function(X,ot){var xt=this.map[X];return xt===void 0?ot:xt},At.prototype.set=function(X,ot){this.map[X]=ot},At.prototype.clear=function(){this.map={}},At.prototype.delete=function(X){delete this.map[X]},At.prototype.size=function(){return Object.keys(this.map).length},At}(),Ea=null,xa=function(X,ot,xt){for(var zt=1/0,Qt,ee=0;ee<ot.length;ee++){var De=ot[ee].id;!xt[De]&&X[De]<=zt&&(zt=X[De],Qt=ot[ee])}return Qt},Xs=function(X,ot,xt,zt){var Qt=X.nodes,ee=Qt===void 0?[]:Qt,De=X.edges,_e=De===void 0?[]:De,qe=[],ln={},en={},Sn={};ee.forEach(function($n,cr){var vr=$n.id;qe.push(vr),en[vr]=1/0,vr===ot&&(en[vr]=0)});for(var bn=ee.length,Pn=function(cr){var vr=xa(en,ee,ln),hr=vr.id;if(ln[hr]=!0,en[hr]===1/0)return"continue";var Lr=[];xt?Lr=A(hr,_e):Lr=L(hr,_e),Lr.forEach(function(Tr){var Nr=Tr.target,zr=Tr.source,_r=Nr===hr?zr:Nr,j=zt&&Tr[zt]?Tr[zt]:1;en[_r]>en[vr.id]+j?(en[_r]=en[vr.id]+j,Sn[_r]=[vr.id]):en[_r]===en[vr.id]+j&&Sn[_r].push(vr.id)})},In=0;In<bn;In++)Pn(In);Sn[ot]=[ot];var kn={};for(var Wn in en)en[Wn]!==1/0&&Ms(ot,Wn,Sn,kn);var Jn={};for(var Wn in kn)Jn[Wn]=kn[Wn][0];return{length:en,path:Jn,allPath:kn}},Ks=Xs;function Ms(At,X,ot,xt){if(At===X)return[At];if(xt[X])return xt[X];for(var zt=[],Qt=0,ee=ot[X];Qt<ee.length;Qt++){var De=ee[Qt],_e=Ms(At,De,ot,xt);if(!_e)return;for(var qe=0,ln=_e;qe<ln.length;qe++){var en=ln[qe];cn(en)?zt.push((0,Tn.ev)((0,Tn.ev)([],en,!0),[X],!1)):zt.push([en,X])}}return xt[X]=zt,xt[X]}var Qs=function(X,ot,xt,zt,Qt){var ee=Ks(X,ot,zt,Qt),De=ee.length,_e=ee.path,qe=ee.allPath;return{length:De[xt],path:_e[xt],allPath:qe[xt]}},Ss=function(X,ot,xt,zt){var Qt;if(ot===xt)return[[ot]];var ee=X.edges,De=ee===void 0?[]:ee,_e=[ot],qe=(Qt={},Qt[ot]=!0,Qt),ln=[],en=[],Sn=zt?D(ot,De,"target"):D(ot,De);for(ln.push(Sn);_e.length>0&&ln.length>0;){var bn=ln[ln.length-1];if(bn.length){var Pn=bn.shift();Pn&&(_e.push(Pn),qe[Pn]=!0,Sn=zt?D(Pn,De,"target"):D(Pn,De),ln.push(Sn.filter(function(Wn){return!qe[Wn]})))}else{var In=_e.pop();qe[In]=!1,ln.pop();continue}if(_e[_e.length-1]===xt){var kn=_e.map(function(Jn){return Jn});en.push(kn);var In=_e.pop();qe[In]=!1,ln.pop()}}return en},Ci=function(X,ot){for(var xt=_(X,ot),zt=[],Qt=xt.length,ee=0;ee<Qt;ee+=1){zt[ee]=[];for(var De=0;De<Qt;De+=1)ee===De?zt[ee][De]=0:xt[ee][De]===0||!xt[ee][De]?zt[ee][De]=1/0:zt[ee][De]=xt[ee][De]}for(var _e=0;_e<Qt;_e+=1)for(var ee=0;ee<Qt;ee+=1)for(var De=0;De<Qt;De+=1)zt[ee][De]>zt[ee][_e]+zt[_e][De]&&(zt[ee][De]=zt[ee][_e]+zt[_e][De]);return zt},qa=Ci,ls=function(X,ot,xt,zt){ot===void 0&&(ot=!1),xt===void 0&&(xt="weight"),zt===void 0&&(zt=1e3);var Qt=X.nodes,ee=Qt===void 0?[]:Qt,De=X.edges,_e=De===void 0?[]:De,qe={},ln={};ee.forEach(function(cr,vr){var hr=F();cr.clusterId=hr,qe[hr]={id:hr,nodes:[cr]},ln[cr.id]={node:cr,idx:vr}});var en=_(X,ot),Sn=[],bn={};en.forEach(function(cr,vr){var hr=0,Lr=ee[vr].id;bn[Lr]={},cr.forEach(function(Tr,Nr){if(Tr){hr+=Tr;var zr=ee[Nr].id;bn[Lr][zr]=Tr}}),Sn.push(hr)});for(var Pn=0,In=function(){var vr=!1;if(ee.forEach(function(hr){var Lr={};Object.keys(bn[hr.id]).forEach(function(k){var U=bn[hr.id][k],at=ln[k].node,ut=at.clusterId;Lr[ut]||(Lr[ut]=0),Lr[ut]+=U});var Tr=-1/0,Nr=[];if(Object.keys(Lr).forEach(function(k){Tr<Lr[k]?(Tr=Lr[k],Nr=[k]):Tr===Lr[k]&&Nr.push(k)}),!(Nr.length===1&&Nr[0]===hr.clusterId)){var zr=Nr.indexOf(hr.clusterId);if(zr>=0&&Nr.splice(zr,1),Nr&&Nr.length){vr=!0;var _r=qe[hr.clusterId],j=_r.nodes.indexOf(hr);_r.nodes.splice(j,1);var B=Math.floor(Math.random()*Nr.length),P=qe[Nr[B]];P.nodes.push(hr),hr.clusterId=P.id}}}),!vr)return"break";Pn++};Pn<zt;){var kn=In();if(kn==="break")break}Object.keys(qe).forEach(function(cr){var vr=qe[cr];(!vr.nodes||!vr.nodes.length)&&delete qe[cr]});var Wn=[],Jn={};_e.forEach(function(cr){var vr=cr.source,hr=cr.target,Lr=cr[xt]||1,Tr=ln[vr].node.clusterId,Nr=ln[hr].node.clusterId,zr="".concat(Tr,"---").concat(Nr);if(Jn[zr])Jn[zr].weight+=Lr,Jn[zr].count++;else{var _r={source:Tr,target:Nr,weight:Lr,count:1};Jn[zr]=_r,Wn.push(_r)}});var $n=[];return Object.keys(qe).forEach(function(cr){$n.push(qe[cr])}),{clusters:$n,clusterEdges:Wn}},Js=ls,ra=function(){function At(X){this.arr=X}return At.prototype.getArr=function(){return this.arr||[]},At.prototype.add=function(X){var ot,xt=X.arr;if(!(!((ot=this.arr)===null||ot===void 0)&&ot.length))return new At(xt);if(!(xt!=null&&xt.length))return new At(this.arr);if(this.arr.length===xt.length){var zt=[];for(var Qt in this.arr)zt[Qt]=this.arr[Qt]+xt[Qt];return new At(zt)}},At.prototype.subtract=function(X){var ot,xt=X.arr;if(!(!((ot=this.arr)===null||ot===void 0)&&ot.length))return new At(xt);if(!(xt!=null&&xt.length))return new At(this.arr);if(this.arr.length===xt.length){var zt=[];for(var Qt in this.arr)zt[Qt]=this.arr[Qt]-xt[Qt];return new At(zt)}},At.prototype.avg=function(X){var ot=[];if(X!==0)for(var xt in this.arr)ot[xt]=this.arr[xt]/X;return new At(ot)},At.prototype.negate=function(){var X=[];for(var ot in this.arr)X[ot]=-this.arr[ot];return new At(X)},At.prototype.squareEuclideanDistance=function(X){var ot,xt=X.arr;if(!(!((ot=this.arr)===null||ot===void 0)&&ot.length)||!(xt!=null&&xt.length))return 0;if(this.arr.length===xt.length){var zt=0;for(var Qt in this.arr)zt+=Math.pow(this.arr[Qt]-X.arr[Qt],2);return zt}},At.prototype.euclideanDistance=function(X){var ot,xt=X.arr;if(!(!((ot=this.arr)===null||ot===void 0)&&ot.length)||!(xt!=null&&xt.length))return 0;if(this.arr.length===xt.length){var zt=0;for(var Qt in this.arr)zt+=Math.pow(this.arr[Qt]-X.arr[Qt],2);return Math.sqrt(zt)}else console.error("The two vectors are unequal in length.")},At.prototype.normalize=function(){var X=[],ot=Or(this.arr);ot.sort(function(ee,De){return ee-De});var xt=ot[ot.length-1],zt=ot[0];for(var Qt in this.arr)X[Qt]=(this.arr[Qt]-zt)/(xt-zt);return new At(X)},At.prototype.norm2=function(){var X;if(!(!((X=this.arr)===null||X===void 0)&&X.length))return 0;var ot=0;for(var xt in this.arr)ot+=Math.pow(this.arr[xt],2);return Math.sqrt(ot)},At.prototype.dot=function(X){var ot,xt=X.arr;if(!(!((ot=this.arr)===null||ot===void 0)&&ot.length)||!(xt!=null&&xt.length))return 0;if(this.arr.length===xt.length){var zt=0;for(var Qt in this.arr)zt+=this.arr[Qt]*X.arr[Qt];return zt}else console.error("The two vectors are unequal in length.")},At.prototype.equal=function(X){var ot,xt=X.arr;if(((ot=this.arr)===null||ot===void 0?void 0:ot.length)!==(xt==null?void 0:xt.length))return!1;for(var zt in this.arr)if(this.arr[zt]!==xt[zt])return!1;return!0},At}(),$i=ra,Bs=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2})$/,zi=/^(\d{1,4})(-|\/)(\d{1,2})\2(\d{1,2}) (\d{1,2}):(\d{1,2}):(\d{1,2})$/,Xi=function(X,ot){X===void 0&&(X=[]),ot===void 0&&(ot=100);var xt={};X.forEach(function(Qt){Qt.properties&&Object.keys(Qt.properties).forEach(function(ee){if(ee==="id"||!"".concat(Qt.properties[ee]).match(Bs)&&!"".concat(Qt.properties[ee]).match(zi)&&isNaN(Number(Qt.properties[ee]))){xt.hasOwnProperty(ee)&&delete xt[ee];return}xt.hasOwnProperty(ee)?xt[ee]+=1:xt[ee]=1})});var zt=Object.keys(xt).sort(function(Qt,ee){return xt[ee]-xt[Qt]});return zt.length<ot?zt:zt.slice(0,ot)},As=function(X,ot){return ot.map(function(xt){return X.hasOwnProperty(xt)?X[xt]:0})},go=function(X){for(var ot=Xi(X),xt=[],zt=0;zt<X.length;zt++)xt[zt]=As(X[zt].properties,ot);return xt},Os=function(X,ot){ot===void 0&&(ot=void 0);var xt=[];return X.forEach(function(zt){ot===void 0&&xt.push(zt),zt[ot]!==void 0&&xt.push(zt[ot])}),xt},Fs={getAllSortProperties:Xi,getPropertyWeight:go,getAllProperties:Os},ji;(function(At){At.EuclideanDistance="euclideanDistance"})(ji||(ji={}));var ja=function(X,ot,xt){var zt=[];ot!=null&&ot.length?zt=ot:(X.forEach(function(ee){zt=zt.concat(Object.keys(ee))}),zt=Ve(zt));var Qt={};return zt.forEach(function(ee){var De=[];X.forEach(function(_e){_e[ee]!==void 0&&_e[ee]!==""&&De.push(_e[ee])}),De.length&&!(xt!=null&&xt.includes(ee))&&(Qt[ee]=Ve(De))}),Qt},cs=function(X,ot,xt){var zt=ja(X,ot,xt),Qt=[];if(!Object.keys(zt).length)return Qt;var ee=Object.values(zt),De=ee.every(function(_e){return _e.every(function(qe){return typeof qe=="number"})});return X.forEach(function(_e,qe){var ln=[];Object.keys(zt).forEach(function(en){var Sn=_e[en],bn=zt[en],Pn=bn.findIndex(function(Wn){return Sn===Wn}),In=[];if(De)In.push(Sn);else for(var kn=0;kn<bn.length;kn++)kn===Pn?In.push(1):In.push(0);ln=ln.concat(In)}),Qt[qe]=ln}),Qt},qi=function(X,ot,xt,zt){xt===void 0&&(xt=ji.EuclideanDistance);var Qt=0;switch(xt){case ji.EuclideanDistance:Qt=new $i(X).euclideanDistance(new $i(ot));break;default:break}return Qt},us={getAllKeyValueMap:ja,oneHot:cs,getDistance:qi},Ki=function(X,ot,xt,zt){for(var Qt=ot.length,ee=2*zt,De=0,_e=0;_e<Qt;_e++)for(var qe=X[_e].clusterId,ln=0;ln<Qt;ln++){var en=X[ln].clusterId;if(qe===en){var Sn=ot[_e][ln]||0,bn=xt[_e]||0,Pn=xt[ln]||0;De+=Sn-bn*Pn/ee}}return De*=1/ee,De},Va=function(X,ot){X===void 0&&(X=[]);for(var xt=X.length,zt=new $i([]),Qt=0;Qt<xt;Qt++)zt=zt.add(new $i(ot[Qt]));var ee=zt.avg(xt);ee.normalize();for(var De=0,Qt=0;Qt<xt;Qt++){var _e=new $i(ot[Qt]),qe=_e.squareEuclideanDistance(ee);De+=qe}var ln=[];X.forEach(function(){ln.push([])});for(var Qt=0;Qt<xt;Qt++){var _e=new $i(ot[Qt]);X[Qt].clusterInertial=0;for(var en=0;en<xt;en++){if(Qt===en){ln[Qt][en]=0;continue}var Sn=new $i(ot[en]);ln[Qt][en]=_e.squareEuclideanDistance(Sn),X[Qt].clusterInertial+=ln[Qt][en]}}for(var bn=0,Pn=2*xt*De,Qt=0;Qt<xt;Qt++)for(var In=X[Qt].clusterId,en=0;en<xt;en++){var kn=X[en].clusterId;if(!(Qt===en||In!==kn)){var Wn=X[Qt].clusterInertial*X[en].clusterInertial/Math.pow(Pn,2)-ln[Qt][en]/Pn;bn+=Wn}}return Number(bn.toFixed(4))},$s=function(X,ot,xt,zt,Qt,ee,De,_e,qe){ot===void 0&&(ot=!1),xt===void 0&&(xt="weight"),zt===void 0&&(zt=1e-4),Qt===void 0&&(Qt=!1),ee===void 0&&(ee=void 0),De===void 0&&(De=[]),_e===void 0&&(_e=["id"]),qe===void 0&&(qe=1);var ln=X.nodes,en=ln===void 0?[]:ln,Sn=X.edges,bn=Sn===void 0?[]:Sn,Pn=[];if(Qt){en.forEach(function(ct,pt){ct.properties=ct.properties||{},ct.originIndex=pt});var In=[];en.every(function(ct){return ct.hasOwnProperty("nodeType")})&&(In=Array.from(new Set(en.map(function(ct){return ct.nodeType}))),en.forEach(function(ct){ct.properties.nodeType=In.findIndex(function(pt){return pt===ct.nodeType})}));var kn=Os(en,ee);Pn=cs(kn,De,_e)}var Wn=1,Jn={},$n={};en.forEach(function(ct,pt){var Bt=String(Wn++);ct.clusterId=Bt,Jn[Bt]={id:Bt,nodes:[ct]},$n[ct.id]={node:ct,idx:pt}});var cr=_(X,ot),vr=[],hr={},Lr=0;cr.forEach(function(ct,pt){var Bt=0,ae=en[pt].id;hr[ae]={},ct.forEach(function(pe,Te){if(pe){Bt+=pe;var Fe=en[Te].id;hr[ae][Fe]=pe,Lr+=pe}}),vr.push(Bt)}),Lr/=2;for(var Tr=1/0,Nr=1/0,zr=0,_r=[],j={};;){Qt&&en.every(function(ct){return ct.hasOwnProperty("properties")})?Tr=Ki(en,cr,vr,Lr)+Va(en,Pn)*qe:Tr=Ki(en,cr,vr,Lr),zr===0&&(Nr=Tr,_r=en,j=Jn);var B=Tr>0&&Tr>Nr&&Tr-Nr<zt;if(Tr>Nr&&(_r=en.map(function(ct){return{node:ct,clusterId:ct.clusterId}}),j=Or(Jn),Nr=Tr),B||zr>100)break;zr++,Object.keys(Jn).forEach(function(ct){var pt=0;bn.forEach(function(Bt){var ae=Bt.source,pe=Bt.target,Te=$n[ae].node.clusterId,Fe=$n[pe].node.clusterId;(Te===ct&&Fe!==ct||Fe===ct&&Te!==ct)&&(pt=pt+(Bt[xt]||1))}),Jn[ct].sumTot=pt}),en.forEach(function(ct,pt){var Bt=Jn[ct.clusterId],ae=0,pe,Te=vr[pt]/(2*Lr),Fe=0,Ue=Bt.nodes;Ue.forEach(function(mr){var Dr=$n[mr.id].idx;Fe+=cr[pt][Dr]||0});var fn=Fe-Bt.sumTot*Te,gn=Ue.filter(function(mr){return mr.id!==ct.id}),On=[];gn.forEach(function(mr,Dr){On[Dr]=Pn[mr.originIndex]});var Rn=Va(gn,Pn)*qe,wn=hr[ct.id];if(Object.keys(wn).forEach(function(mr){var Dr=$n[mr].node,ai=Dr.clusterId;if(ai!==ct.clusterId){var ci=Jn[ai],Vr=ci.nodes;if(!(!Vr||!Vr.length)){var Er=0;Vr.forEach(function(si){var Jr=$n[si.id].idx;Er+=cr[pt][Jr]||0});var Br=Er-ci.sumTot*Te,Cr=Vr.concat([ct]),Hr=[];Cr.forEach(function(si,Jr){Hr[Jr]=Pn[si.originIndex]});var mi=Va(Cr,Pn)*qe,wr=Br-fn;Qt&&(wr=Br+mi-(fn+Rn)),wr>ae&&(ae=wr,pe=ci)}}}),ae>0){pe.nodes.push(ct);var Fn=ct.clusterId;ct.clusterId=pe.id;var Gn=Bt.nodes.indexOf(ct);Bt.nodes.splice(Gn,1);var Xn=0,rr=0;bn.forEach(function(mr){var Dr=mr.source,ai=mr.target,ci=$n[Dr].node.clusterId,Vr=$n[ai].node.clusterId;(ci===pe.id&&Vr!==pe.id||Vr===pe.id&&ci!==pe.id)&&(Xn=Xn+(mr[xt]||1)),(ci===Fn&&Vr!==Fn||Vr===Fn&&ci!==Fn)&&(rr=rr+(mr[xt]||1))}),pe.sumTot=Xn,Bt.sumTot=rr}})}var P={},k=0;Object.keys(j).forEach(function(ct){var pt=j[ct];if(!pt.nodes||!pt.nodes.length){delete j[ct];return}var Bt=String(k+1);Bt!==ct&&(pt.id=Bt,pt.nodes=pt.nodes.map(function(ae){return{id:ae.id,clusterId:Bt}}),j[Bt]=pt,P[ct]=Bt,delete j[ct],k++)}),_r.forEach(function(ct){var pt=ct.node,Bt=ct.clusterId;pt&&(pt.clusterId=Bt,pt.clusterId&&P[pt.clusterId]&&(pt.clusterId=P[pt.clusterId]))});var U=[],at={};bn.forEach(function(ct){var pt=ct.source,Bt=ct.target,ae=ct[xt]||1,pe=$n[pt].node.clusterId,Te=$n[Bt].node.clusterId;if(!(!pe||!Te)){var Fe="".concat(pe,"---").concat(Te);if(at[Fe])at[Fe].weight+=ae,at[Fe].count++;else{var Ue={source:pe,target:Te,weight:ae,count:1};at[Fe]=Ue,U.push(Ue)}}});var ut=[];return Object.keys(j).forEach(function(ct){ut.push(j[ct])}),{clusters:ut,clusterEdges:U}},ua=$s,bi=function(X,ot,xt,zt,Qt,ee,De,_e){return ot===void 0&&(ot=!1),xt===void 0&&(xt="weight"),zt===void 0&&(zt=1e-4),Qt===void 0&&(Qt=void 0),ee===void 0&&(ee=[]),De===void 0&&(De=["id"]),_e===void 0&&(_e=1),ua(X,ot,xt,zt,!0,Qt,ee,De,_e)},Kn=bi,wa=function(X,ot){var xt;ot===void 0&&(ot=1);for(var zt=Or(X),Qt=zt.nodes,ee=Qt===void 0?[]:Qt,De=zt.edges,_e=De===void 0?[]:De,qe=function(){var Sn=Vt({nodes:ee,edges:_e}),bn=Object.keys(Sn);bn.sort(function(kn,Wn){var Jn,$n;return((Jn=Sn[kn])===null||Jn===void 0?void 0:Jn.degree)-(($n=Sn[Wn])===null||$n===void 0?void 0:$n.degree)});var Pn=bn[0];if(!ee.length||((xt=Sn[Pn])===null||xt===void 0?void 0:xt.degree)>=ot)return"break";var In=ee.findIndex(function(kn){return kn.id===Pn});ee.splice(In,1),_e=_e.filter(function(kn){return!(kn.source===Pn||kn.target===Pn)})};;){var ln=qe();if(ln==="break")break}return{nodes:ee,edges:_e}},po=wa,mo=function(X,ot,xt){var zt=[];switch(X){case ji.EuclideanDistance:zt=ot[xt];break;default:zt=[];break}return zt},yo=function(X,ot,xt,zt,Qt,ee){ot===void 0&&(ot=3),xt===void 0&&(xt=void 0),zt===void 0&&(zt=[]),Qt===void 0&&(Qt=["id"]),ee===void 0&&(ee=ji.EuclideanDistance);var De=X.nodes,_e=De===void 0?[]:De,qe=X.edges,ln=qe===void 0?[]:qe,en={clusters:[{id:"0",nodes:_e}],clusterEdges:[]};if(ee===ji.EuclideanDistance&&!_e.every(function(Bt){return Bt.hasOwnProperty(xt)}))return en;var Sn=[],bn=[];if(ee===ji.EuclideanDistance&&(Sn=Os(_e,xt),bn=cs(Sn,zt,Qt)),!bn.length)return en;for(var Pn=Ve(bn.map(function(Bt){return Bt.join("")})),In=Math.min(ot,_e.length,Pn.length),kn=0;kn<_e.length;kn++)_e[kn].originIndex=kn;for(var Wn=[],Jn=[],$n=[],kn=0;kn<In;kn++)if(kn===0){var cr=Math.floor(Math.random()*_e.length);switch(ee){case ji.EuclideanDistance:Wn[kn]=bn[cr];break;default:Wn[kn]=[];break}Jn.push(cr),$n[kn]=[_e[cr]],_e[cr].clusterId=String(kn)}else{for(var vr=-1/0,hr=0,Lr=function(pe){if(!Jn.includes(pe)){for(var Te=0,Fe=0;Fe<Wn.length;Fe++){var Ue=0;switch(ee){case ji.EuclideanDistance:Ue=qi(bn[_e[pe].originIndex],Wn[Fe],ee);break;default:break}Te+=Ue}var fn=Te/Wn.length;fn>vr&&!Wn.find(function(gn){return fo(gn,mo(ee,bn,_e[pe].originIndex))})&&(vr=fn,hr=pe)}},Tr=0;Tr<_e.length;Tr++)Lr(Tr);Wn[kn]=mo(ee,bn,hr),Jn.push(hr),$n[kn]=[_e[hr]],_e[hr].clusterId=String(kn)}for(var Nr=0;;){for(var kn=0;kn<_e.length;kn++){var zr=0,_r=1/0;if(!(Nr===0&&Jn.includes(kn))){for(var j=0;j<Wn.length;j++){var B=0;switch(ee){case ji.EuclideanDistance:B=qi(bn[kn],Wn[j],ee);break;default:break}B<_r&&(_r=B,zr=j)}if(_e[kn].clusterId!==void 0)for(var P=$n[Number(_e[kn].clusterId)].length-1;P>=0;P--)$n[Number(_e[kn].clusterId)][P].id===_e[kn].id&&$n[Number(_e[kn].clusterId)].splice(P,1);_e[kn].clusterId=String(zr),$n[zr].push(_e[kn])}}for(var k=!1,kn=0;kn<$n.length;kn++){for(var U=$n[kn],at=new $i([]),j=0;j<U.length;j++)at=at.add(new $i(bn[U[j].originIndex]));var ut=at.avg(U.length);ut.equal(new $i(Wn[kn]))||(k=!0,Wn[kn]=ut.getArr())}if(Nr++,_e.every(function(Bt){return Bt.clusterId!==void 0})&&k||Nr>=1e3)break}var ct=[],pt={};return ln.forEach(function(Bt){var ae,pe,Te=Bt.source,Fe=Bt.target,Ue=(ae=_e.find(function(Rn){return Rn.id===Te}))===null||ae===void 0?void 0:ae.clusterId,fn=(pe=_e.find(function(Rn){return Rn.id===Fe}))===null||pe===void 0?void 0:pe.clusterId,gn="".concat(Ue,"---").concat(fn);if(pt[gn])pt[gn].count++;else{var On={source:Ue,target:fn,count:1};pt[gn]=On,ct.push(On)}}),{clusters:$n,clusterEdges:ct}},Da=yo,bo=function(X,ot){var xt=new $i(ot),zt=xt.norm2(),Qt=new $i(X),ee=Qt.norm2(),De=xt.dot(Qt),_e=zt*ee,qe=_e?De/_e:0;return qe},hs=bo,Fo=function(X,ot,xt,zt,Qt){X===void 0&&(X=[]),xt===void 0&&(xt=void 0),zt===void 0&&(zt=[]),Qt===void 0&&(Qt=[]);var ee=Or(X.filter(function(Sn){return Sn.id!==ot.id})),De=X.findIndex(function(Sn){return Sn.id===ot.id}),_e=Os(X,xt),qe=cs(_e,zt,Qt),ln=qe[De],en=[];return ee.forEach(function(Sn,bn){if(Sn.id!==ot.id){var Pn=qe[bn],In=hs(Pn,ln);en.push(In),Sn.cosineSimilarity=In}}),ee.sort(function(Sn,bn){return bn.cosineSimilarity-Sn.cosineSimilarity}),{allCosineSimilarity:en,similarNodes:ee}},_o=Fo,Ts=function(){function At(X){this.count=X.length,this.parent={};for(var ot=0,xt=X;ot<xt.length;ot++){var zt=xt[ot];this.parent[zt]=zt}}return At.prototype.find=function(X){for(;this.parent[X]!==X;)X=this.parent[X];return X},At.prototype.union=function(X,ot){var xt=this.find(X),zt=this.find(ot);xt!==zt&&(xt<zt?(this.parent[ot]!==ot&&this.union(this.parent[ot],X),this.parent[ot]=this.parent[X]):(this.parent[X]!==X&&this.union(this.parent[X],ot),this.parent[X]=this.parent[ot]))},At.prototype.connected=function(X,ot){return this.find(X)===this.find(ot)},At}(),ts=Ts,Ia=function(X,ot){return X-ot},_s=function(){function At(X){X===void 0&&(X=Ia),this.compareFn=X,this.list=[]}return At.prototype.getLeft=function(X){return 2*X+1},At.prototype.getRight=function(X){return 2*X+2},At.prototype.getParent=function(X){return X===0?null:Math.floor((X-1)/2)},At.prototype.isEmpty=function(){return this.list.length<=0},At.prototype.top=function(){return this.isEmpty()?void 0:this.list[0]},At.prototype.delMin=function(){var X=this.top(),ot=this.list.pop();return this.list.length>0&&(this.list[0]=ot,this.moveDown(0)),X},At.prototype.insert=function(X){if(X!==null){this.list.push(X);var ot=this.list.length-1;return this.moveUp(ot),!0}return!1},At.prototype.moveUp=function(X){for(var ot=this.getParent(X);X&&X>0&&this.compareFn(this.list[ot],this.list[X])>0;){var xt=this.list[ot];this.list[ot]=this.list[X],this.list[X]=xt,X=ot,ot=this.getParent(X)}},At.prototype.moveDown=function(X){var ot,xt=X,zt=this.getLeft(X),Qt=this.getRight(X),ee=this.list.length;zt!==null&&zt<ee&&this.compareFn(this.list[xt],this.list[zt])>0?xt=zt:Qt!==null&&Qt<ee&&this.compareFn(this.list[xt],this.list[Qt])>0&&(xt=Qt),X!==xt&&(ot=[this.list[xt],this.list[X]],this.list[X]=ot[0],this.list[xt]=ot[1],this.moveDown(xt))},At}(),Ya=_s,es=function(X,ot){var xt=[],zt=X.nodes,Qt=zt===void 0?[]:zt,ee=X.edges,De=ee===void 0?[]:ee;if(Qt.length===0)return xt;var _e=Qt[0],qe=new Set;qe.add(_e);var ln=function(kn,Wn){return ot?kn.weight-Wn.weight:0},en=new Ya(ln);for(L(_e.id,De).forEach(function(In){en.insert(In)});!en.isEmpty();){var Sn=en.delMin(),bn=Sn.source,Pn=Sn.target;qe.has(bn)&&qe.has(Pn)||(xt.push(Sn),qe.has(bn)||(qe.add(bn),L(bn,De).forEach(function(In){en.insert(In)})),qe.has(Pn)||(qe.add(Pn),L(Pn,De).forEach(function(In){en.insert(In)})))}return xt},ia=function(X,ot){var xt=[],zt=X.nodes,Qt=zt===void 0?[]:zt,ee=X.edges,De=ee===void 0?[]:ee;if(Qt.length===0)return xt;var _e=De.map(function(bn){return bn});ot&&_e.sort(function(bn,Pn){return bn.weight-Pn.weight});for(var qe=new ts(Qt.map(function(bn){return bn.id}));_e.length>0;){var ln=_e.shift(),en=ln.source,Sn=ln.target;qe.connected(en,Sn)||(xt.push(ln),qe.union(en,Sn))}return xt},Zs=function(X,ot,xt){var zt={prim:es,kruskal:ia};return xt?zt[xt](X,ot):ia(X,ot)},ha=Zs,di=function(X,ot,xt){typeof ot!="number"&&(ot=1e-6),typeof xt!="number"&&(xt=.85);for(var zt=1,Qt=0,ee=1e3,De=X.nodes,_e=De===void 0?[]:De,qe=X.edges,ln=qe===void 0?[]:qe,en=_e.length,Sn,bn={},Pn={},In=0;In<en;++In){var kn=_e[In],Wn=kn.id;bn[Wn]=1/en,Pn[Wn]=1/en}for(var Jn=Vt(X);ee>0&&zt>ot;){Qt=0;for(var In=0;In<en;++In){var kn=_e[In],Wn=kn.id;if(Sn=0,Jn[kn.id].inDegree===0)bn[Wn]=0;else{for(var $n=D(Wn,ln,"source"),cr=0;cr<$n.length;++cr){var vr=$n[cr],hr=Jn[vr].outDegree;hr>0&&(Sn+=Pn[vr]/hr)}bn[Wn]=xt*Sn,Qt+=bn[Wn]}}Qt=(1-Qt)/en,zt=0;for(var In=0;In<en;++In){var kn=_e[In],Wn=kn.id;Sn=bn[Wn]+Qt,zt+=Math.abs(Sn-Pn[Wn]),Pn[Wn]=Sn}ee-=1}return Pn},Wi=di,Ma=-1,Ha=-1,qs="-1",ta="-1",Cs=-1,Eo="-1",xo=function(){function At(X,ot,xt,zt){X===void 0&&(X=Ma),ot===void 0&&(ot=Ha),xt===void 0&&(xt=Ha),zt===void 0&&(zt=qs),this.id=X,this.from=ot,this.to=xt,this.label=zt}return At}(),wo=function(){function At(X,ot){X===void 0&&(X=Ha),ot===void 0&&(ot=ta),this.id=X,this.label=ot,this.edges=[],this.edgeMap={}}return At.prototype.addEdge=function(X){this.edges.push(X),this.edgeMap[X.id]=X},At}(),ds=function(){function At(X,ot,xt){X===void 0&&(X=Ha),ot===void 0&&(ot=!0),xt===void 0&&(xt=!1),this.id=X,this.edgeIdAutoIncrease=ot,this.edges=[],this.nodes=[],this.nodeMap={},this.edgeMap={},this.nodeLabelMap={},this.edgeLabelMap={},this.counter=0,this.directed=xt}return At.prototype.getNodeNum=function(){return this.nodes.length},At.prototype.addNode=function(X,ot){if(!this.nodeMap[X]){var xt=new wo(X,ot);this.nodes.push(xt),this.nodeMap[X]=xt,this.nodeLabelMap[ot]||(this.nodeLabelMap[ot]=[]),this.nodeLabelMap[ot].push(X)}},At.prototype.addEdge=function(X,ot,xt,zt){if((this.edgeIdAutoIncrease||X===void 0)&&(X=this.counter++),!(this.nodeMap[ot]&&this.nodeMap[xt]&&this.nodeMap[xt].edgeMap[X])){var Qt=new xo(X,ot,xt,zt);if(this.edges.push(Qt),this.edgeMap[X]=Qt,this.nodeMap[ot].addEdge(Qt),this.edgeLabelMap[zt]||(this.edgeLabelMap[zt]=[]),this.edgeLabelMap[zt].push(Qt),!this.directed){var ee=new xo(X,xt,ot,zt);this.nodeMap[xt].addEdge(ee),this.edgeLabelMap[zt].push(ee)}}},At}(),ns=function(){function At(X,ot,xt,zt,Qt){this.fromNode=X,this.toNode=ot,this.nodeEdgeNodeLabel={nodeLabel1:xt||ta,edgeLabel:zt||qs,nodeLabel2:Qt||ta}}return At.prototype.equalTo=function(X){return this.fromNode===X.formNode&&this.toNode===X.toNode&&this.nodeEdgeNodeLabel===X.nodeEdgeNodeLabel},At.prototype.notEqualTo=function(X){return!this.equalTo(X)},At}(),ii=function(){function At(){this.rmpath=[],this.dfsEdgeList=[]}return At.prototype.equalTo=function(X){var ot=this.dfsEdgeList.length,xt=X.length;if(ot!==xt)return!1;for(var zt=0;zt<ot;zt++)if(this.dfsEdgeList[zt]!==X[zt])return!1;return!0},At.prototype.notEqualTo=function(X){return!this.equalTo(X)},At.prototype.pushBack=function(X,ot,xt,zt,Qt){return this.dfsEdgeList.push(new ns(X,ot,xt,zt,Qt)),this.dfsEdgeList},At.prototype.toGraph=function(X,ot){X===void 0&&(X=Cs),ot===void 0&&(ot=!1);var xt=new ds(X,!0,ot);return this.dfsEdgeList.forEach(function(zt){var Qt=zt.fromNode,ee=zt.toNode,De=zt.nodeEdgeNodeLabel,_e=De.nodeLabel1,qe=De.edgeLabel,ln=De.nodeLabel2;_e!==ta&&xt.addNode(Qt,_e),ln!==ta&&xt.addNode(ee,ln),_e!==ta&&ln!==_e&&xt.addEdge(void 0,Qt,ee,qe)}),xt},At.prototype.buildRmpath=function(){this.rmpath=[];for(var X=void 0,ot=this.dfsEdgeList.length,xt=ot-1;xt>=0;xt--){var zt=this.dfsEdgeList[xt],Qt=zt.fromNode,ee=zt.toNode;Qt<ee&&(X===void 0||ee===X)&&(this.rmpath.push(xt),X=Qt)}return this.rmpath},At.prototype.getNodeNum=function(){var X={};return this.dfsEdgeList.forEach(function(ot){X[ot.fromNode]||(X[ot.fromNode]=!0),X[ot.toNode]||(X[ot.toNode]=!0)}),Object.keys(X).length},At}(),da=function(){function At(X){if(this.his={},this.nodesUsed={},this.edgesUsed={},this.edges=[],!!X){for(;X;){var ot=X.edge;this.edges.push(ot),this.nodesUsed[ot.from]=1,this.nodesUsed[ot.to]=1,this.edgesUsed[ot.id]=1,X=X.preNode}this.edges=this.edges.reverse()}}return At.prototype.hasNode=function(X){return this.nodesUsed[X.id]===1},At.prototype.hasEdge=function(X){return this.edgesUsed[X.id]===1},At}(),Mi=function(){function At(X){var ot=X.graphs,xt=X.minSupport,zt=xt===void 0?2:xt,Qt=X.minNodeNum,ee=Qt===void 0?1:Qt,De=X.maxNodeNum,_e=De===void 0?4:De,qe=X.top,ln=qe===void 0?10:qe,en=X.directed,Sn=en===void 0?!1:en,bn=X.verbose,Pn=bn===void 0?!1:bn;this.graphs=ot,this.dfsCode=new ii,this.support=0,this.frequentSize1Subgraphs=[],this.frequentSubgraphs=[],this.minSupport=zt,this.top=ln,this.directed=Sn,this.counter=0,this.maxNodeNum=_e,this.minNodeNum=ee,this.verbose=Pn,this.maxNodeNum<this.minNodeNum&&(this.maxNodeNum=this.minNodeNum),this.reportDF=[]}return At.prototype.findForwardRootEdges=function(X,ot){var xt=this,zt=[],Qt=X.nodeMap;return ot.edges.forEach(function(ee){(xt.directed||ot.label<=Qt[ee.to].label)&&zt.push(ee)}),zt},At.prototype.findBackwardEdge=function(X,ot,xt,zt){if(!this.directed&&ot===xt)return null;for(var Qt=X.nodeMap,ee=Qt[xt.to],De=ee.edges,_e=De.length,qe=0;qe<_e;qe++){var ln=De[qe];if(!(zt.hasEdge(ln)||ln.to!==ot.from)){if(this.directed){if(Qt[ot.from].label<Qt[xt.to].label||Qt[ot.from].label===Qt[xt.to].label&&ot.label<=ln.label)return ln}else if(ot.label<ln.label||ot.label===ln.label&&Qt[ot.to].label<=Qt[xt.to].label)return ln}}return null},At.prototype.findForwardPureEdges=function(X,ot,xt,zt){for(var Qt=[],ee=ot.to,De=X.nodeMap[ee].edges,_e=De.length,qe=0;qe<_e;qe++){var ln=De[qe],en=X.nodeMap[ln.to];xt<=en.label&&!zt.hasNode(en)&&Qt.push(ln)}return Qt},At.prototype.findForwardRmpathEdges=function(X,ot,xt,zt){for(var Qt=[],ee=X.nodeMap,De=ee[ot.to].label,_e=ee[ot.from],qe=_e.edges,ln=qe.length,en=0;en<ln;en++){var Sn=qe[en],bn=ee[Sn.to].label;ot.to===Sn.to||xt>bn||zt.hasNode(ee[Sn.to])||(ot.label<Sn.label||ot.label===Sn.label&&De<=bn)&&Qt.push(Sn)}return Qt},At.prototype.getSupport=function(X){var ot={};return X.forEach(function(xt){ot[xt.graphId]||(ot[xt.graphId]=!0)}),Object.keys(ot).length},At.prototype.findMinLabel=function(X){var ot=void 0;return Object.keys(X).forEach(function(xt){var zt=X[xt],Qt=zt.nodeLabel1,ee=zt.edgeLabel,De=zt.nodeLabel2;if(!ot){ot={nodeLabel1:Qt,edgeLabel:ee,nodeLabel2:De};return}(Qt<ot.nodeLabel1||Qt===ot.nodeLabel1&&ee<ot.edgeLabel||Qt===ot.nodeLabel1&&ee===ot.edgeLabel&&De<ot.nodeLabel2)&&(ot={nodeLabel1:Qt,edgeLabel:ee,nodeLabel2:De})}),ot},At.prototype.isMin=function(){var X=this,ot=this.dfsCode;if(this.verbose&&console.log("isMin checking",ot),ot.dfsEdgeList.length===1)return!0;var xt=this.directed,zt=ot.toGraph(Cs,xt),Qt=zt.nodeMap,ee=new ii,De={};zt.nodes.forEach(function(en){var Sn=X.findForwardRootEdges(zt,en);Sn.forEach(function(bn){var Pn=Qt[bn.to],In="".concat(en.label,"-").concat(bn.label,"-").concat(Pn.label);De[In]||(De[In]={projected:[],nodeLabel1:en.label,edgeLabel:bn.label,nodeLabel2:Pn.label});var kn={graphId:zt.id,edge:bn,preNode:null};De[In].projected.push(kn)})});var _e=this.findMinLabel(De);if(_e){ee.dfsEdgeList.push(new ns(0,1,_e.nodeLabel1,_e.edgeLabel,_e.nodeLabel2));var qe=function en(Sn){for(var bn=ee.buildRmpath(),Pn=ee.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,In=ee.dfsEdgeList[bn[0]].toNode,kn={},Wn=!1,Jn=0,$n=xt?-1:0,cr=function(at){if(Wn)return"break";Sn.forEach(function(ut){var ct=new da(ut),pt=X.findBackwardEdge(zt,ct.edges[bn[at]],ct.edges[bn[0]],ct);pt&&(kn[pt.label]||(kn[pt.label]={projected:[],edgeLabel:pt.label}),kn[pt.label].projected.push({graphId:zt.id,edge:kn,preNode:ut}),Jn=ee.dfsEdgeList[bn[at]].fromNode,Wn=!0)})},vr=bn.length-1;vr>$n;vr--){var hr=cr(vr);if(hr==="break")break}if(Wn){var Lr=X.findMinLabel(kn);ee.dfsEdgeList.push(new ns(In,Jn,ta,Lr.edgeLabel,ta));var Tr=ee.dfsEdgeList.length-1;return X.dfsCode.dfsEdgeList[Tr]!==ee.dfsEdgeList[Tr]?!1:en(kn[Lr.edgeLabel].projected)}var Nr={};Wn=!1;var zr=0;Sn.forEach(function(U){var at=new da(U),ut=X.findForwardPureEdges(zt,at.edges[bn[0]],Pn,at);ut.length>0&&(Wn=!0,zr=In,ut.forEach(function(ct){var pt="".concat(ct.label,"-").concat(Qt[ct.to].label);Nr[pt]||(Nr[pt]={projected:[],edgeLabel:ct.label,nodeLabel2:Qt[ct.to].label}),Nr[pt].projected.push({graphId:zt.id,edge:ct,preNode:U})}))});for(var _r=bn.length,j=function(at){if(Wn)return"break";var ut=bn[at];Sn.forEach(function(ct){var pt=new da(ct),Bt=X.findForwardRmpathEdges(zt,pt.edges[ut],Pn,pt);Bt.length>0&&(Wn=!0,zr=ee.dfsEdgeList[ut].fromNode,Bt.forEach(function(ae){var pe="".concat(ae.label,"-").concat(Qt[ae.to].label);Nr[pe]||(Nr[pe]={projected:[],edgeLabel:ae.label,nodeLabel2:Qt[ae.to].label}),Nr[pe].projected.push({graphId:zt.id,edge:ae,preNode:ct})}))})},vr=0;vr<_r;vr++){var B=j(vr);if(B==="break")break}if(!Wn)return!0;var P=X.findMinLabel(Nr);ee.dfsEdgeList.push(new ns(zr,In+1,ta,P.edgeLabel,P.nodeLabel2));var k=ee.dfsEdgeList.length-1;return ot.dfsEdgeList[k]!==ee.dfsEdgeList[k]?!1:en(Nr["".concat(P.edgeLabel,"-").concat(P.nodeLabel2)].projected)},ln="".concat(_e.nodeLabel1,"-").concat(_e.edgeLabel,"-").concat(_e.nodeLabel2);return qe(De[ln].projected)}},At.prototype.report=function(){if(!(this.dfsCode.getNodeNum()<this.minNodeNum)){this.counter++;var X=this.dfsCode.toGraph(this.counter,this.directed);this.frequentSubgraphs.push(Or(X))}},At.prototype.subGraphMining=function(X){var ot=this,xt=this.getSupport(X);if(!(xt<this.minSupport)&&this.isMin()){this.report();var zt=this.dfsCode.getNodeNum(),Qt=this.dfsCode.buildRmpath(),ee=this.dfsCode.dfsEdgeList[Qt[0]].toNode,De=this.dfsCode.dfsEdgeList[0].nodeEdgeNodeLabel.nodeLabel1,_e={},qe={};X.forEach(function(ln){for(var en=ot.graphs[ln.graphId],Sn=en.nodeMap,bn=new da(ln),Pn=Qt.length-1;Pn>=0;Pn--){var In=ot.findBackwardEdge(en,bn.edges[Qt[Pn]],bn.edges[Qt[0]],bn);if(In){var kn="".concat(ot.dfsCode.dfsEdgeList[Qt[Pn]].fromNode,"-").concat(In.label);qe[kn]||(qe[kn]={projected:[],toNodeId:ot.dfsCode.dfsEdgeList[Qt[Pn]].fromNode,edgeLabel:In.label}),qe[kn].projected.push({graphId:ln.graphId,edge:In,preNode:ln})}}if(!(zt>=ot.maxNodeNum)){var Wn=ot.findForwardPureEdges(en,bn.edges[Qt[0]],De,bn);Wn.forEach(function($n){var cr="".concat(ee,"-").concat($n.label,"-").concat(Sn[$n.to].label);_e[cr]||(_e[cr]={projected:[],fromNodeId:ee,edgeLabel:$n.label,nodeLabel2:Sn[$n.to].label}),_e[cr].projected.push({graphId:ln.graphId,edge:$n,preNode:ln})});for(var Jn=function(cr){var vr=ot.findForwardRmpathEdges(en,bn.edges[Qt[cr]],De,bn);vr.forEach(function(hr){var Lr="".concat(ot.dfsCode.dfsEdgeList[Qt[cr]].fromNode,"-").concat(hr.label,"-").concat(Sn[hr.to].label);_e[Lr]||(_e[Lr]={projected:[],fromNodeId:ot.dfsCode.dfsEdgeList[Qt[cr]].fromNode,edgeLabel:hr.label,nodeLabel2:Sn[hr.to].label}),_e[Lr].projected.push({graphId:ln.graphId,edge:hr,preNode:ln})})},Pn=0;Pn<Qt.length;Pn++)Jn(Pn)}}),Object.keys(qe).forEach(function(ln){var en=qe[ln],Sn=en.toNodeId,bn=en.edgeLabel;ot.dfsCode.dfsEdgeList.push(new ns(ee,Sn,"-1",bn,"-1")),ot.subGraphMining(qe[ln].projected),ot.dfsCode.dfsEdgeList.pop()}),Object.keys(_e).forEach(function(ln){var en=_e[ln],Sn=en.fromNodeId,bn=en.edgeLabel,Pn=en.nodeLabel2;ot.dfsCode.dfsEdgeList.push(new ns(Sn,ee+1,ta,bn,Pn)),ot.subGraphMining(_e[ln].projected),ot.dfsCode.dfsEdgeList.pop()})}},At.prototype.generate1EdgeFrequentSubGraphs=function(){var X=this.graphs,ot=this.directed,xt=this.minSupport,zt=this.frequentSize1Subgraphs,Qt={},ee={},De={},_e={};return Object.keys(X).forEach(function(qe){var ln=X[qe],en=ln.nodeMap;ln.nodes.forEach(function(Sn,bn){var Pn=Sn.label,In="".concat(qe,"-").concat(Pn);if(!De[In]){var kn=Qt[Pn]||0;kn++,Qt[Pn]=kn}De[In]={graphKey:qe,label:Pn},Sn.edges.forEach(function(Wn){var Jn=Pn,$n=en[Wn.to].label;if(!ot&&Jn>$n){var cr=$n;$n=Jn,Jn=cr}var vr=Wn.label,hr="".concat(qe,"-").concat(Jn,"-").concat(vr,"-").concat($n),Lr="".concat(Jn,"-").concat(vr,"-").concat($n);if(!ee[Lr]){var Tr=ee[Lr]||0;Tr++,ee[Lr]=Tr}_e[hr]={graphId:qe,nodeLabel1:Jn,edgeLabel:vr,nodeLabel2:$n}})})}),Object.keys(Qt).forEach(function(qe){var ln=Qt[qe];if(!(ln<xt)){var en={nodes:[],edges:[]};en.nodes.push({id:"0",label:qe}),zt.push(en)}}),zt},At.prototype.run=function(){var X=this;if(this.frequentSize1Subgraphs=this.generate1EdgeFrequentSubGraphs(),!(this.maxNodeNum<2)){var ot=this.graphs,xt=this.directed,zt={};Object.keys(ot).forEach(function(Qt){var ee=ot[Qt],De=ee.nodeMap;ee.nodes.forEach(function(_e){var qe=X.findForwardRootEdges(ee,_e);qe.forEach(function(ln){var en=De[ln.to],Sn="".concat(_e.label,"-").concat(ln.label,"-").concat(en.label);zt[Sn]||(zt[Sn]={projected:[],nodeLabel1:_e.label,edgeLabel:ln.label,nodeLabel2:en.label});var bn={graphId:Qt,edge:ln,preNode:null};zt[Sn].projected.push(bn)})})}),Object.keys(zt).forEach(function(Qt){var ee=zt[Qt],De=ee.projected,_e=ee.nodeLabel1,qe=ee.edgeLabel,ln=ee.nodeLabel2;X.dfsCode.dfsEdgeList.push(new ns(0,1,_e,qe,ln)),X.subGraphMining(De),X.dfsCode.dfsEdgeList.pop()})}},At}(),Zo=function(X,ot,xt,zt){var Qt={};return Object.keys(X).forEach(function(ee,De){var _e=X[ee],qe=new ds(De,!0,ot),ln={};_e.nodes.forEach(function(en,Sn){qe.addNode(Sn,en[xt]),ln[en.id]=Sn}),_e.edges.forEach(function(en,Sn){var bn=ln[en.source],Pn=ln[en.target];qe.addEdge(-1,bn,Pn,en[zt])}),qe&&qe.getNodeNum()&&(Qt[qe.id]=qe)}),Qt},zs=function(X,ot,xt){var zt=[];return X.forEach(function(Qt){var ee={nodes:[],edges:[]};Qt.nodes.forEach(function(De){var _e;ee.nodes.push((_e={id:"".concat(De.id)},_e[ot]=De.label,_e))}),Qt.edges.forEach(function(De){var _e;ee.edges.push((_e={source:"".concat(De.from),target:"".concat(De.to)},_e[xt]=De.label,_e))}),zt.push(ee)}),zt},to="cluster",Ns=function(X){var ot=X.graphs,xt=X.directed,zt=xt===void 0?!1:xt,Qt=X.nodeLabelProp,ee=Qt===void 0?to:Qt,De=X.edgeLabelProp,_e=De===void 0?to:De,qe=Zo(ot,zt,ee,_e),ln=X.minSupport,en=X.maxNodeNum,Sn=X.minNodeNum,bn=X.verbose,Pn=X.top,In={graphs:qe,minSupport:ln,maxNodeNum:en,minNodeNum:Sn,top:Pn,verbose:bn,directed:zt},kn=new Mi(In);kn.run();var Wn=zs(kn.frequentSubgraphs,ee,_e);return Wn},zo=Ns,js=function(X,ot,xt,zt){xt===void 0&&(xt="cluster"),zt===void 0&&(zt=2);var Qt=[],ee=X.nodes;return ot.forEach(function(De,_e){Qt.push(Ps(ee,De,_e,xt,zt))}),Qt},Ps=function(X,ot,xt,zt,Qt){var ee=[xt],De=[],_e={};return ot.forEach(function(qe,ln){if(qe<=Qt&&xt!==ln){ee.push(ln),De.push(X[ln]);var en=X[ln][zt];_e[en]?(_e[en].count++,_e[en].dists.push(qe)):_e[en]={count:1,dists:[qe]}}}),Object.keys(_e).forEach(function(qe){_e[qe].dists=_e[qe].dists.sort(function(ln,en){return ln-en})}),{nodeIdx:xt,nodeId:X[xt].id,nodeIdxs:ee,neighbors:De,neighborNum:ee.length-1,nodeLabelCountMap:_e}},eo=function(X,ot,xt,zt,Qt){var ee=Math.ceil(xt/ot),De={},_e=0;return zt.forEach(function(qe,ln){for(var en=0,Sn=0,bn=qe.nodeIdxs,Pn=qe.neighborNum-1;en<ee;){for(var In=bn[1+Math.floor(Math.random()*Pn)],kn=0;(De["".concat(ln,"-").concat(In)]||De["".concat(In,"-").concat(ln)])&&(In=Math.floor(Math.random()*ot),kn++,!(kn>2*ot)););if(kn<2*ot&&(De["".concat(ln,"-").concat(In)]={start:ln,end:In,distance:Qt[ln][In]},en++,_e++,_e>=xt))return De;if(Sn++,Sn>2*ot)break}if(en<ee){var Wn=ee-en;ee=(ee+Wn)/(ot-ln-1)}}),De},Ba=function(X,ot,xt,zt){var Qt=xt.nodes;return zt||(zt={}),Object.keys(X).forEach(function(ee){var De,_e;if(!(zt&&zt[ee])){zt[ee]={nodes:[],edges:[]};var qe=X[ee],ln=(De=ot[qe.start])===null||De===void 0?void 0:De.nodeIdxs,en=(_e=ot[qe.end])===null||_e===void 0?void 0:_e.nodeIdxs;if(!(!ln||!en)){var Sn=new Set(en),bn=ln.filter(function(Jn){return Sn.has(Jn)});if(!(!bn||!bn.length)){for(var Pn={},In=bn.length,kn=0;kn<In;kn++){var Wn=Qt[bn[kn]];zt[ee].nodes.push(Wn),Pn[Wn.id]=!0}xt.edges.forEach(function(Jn){Pn[Jn.source]&&Pn[Jn.target]&&zt[ee].edges.push(Jn)})}}}}),zt},Ws=function(X,ot,xt,zt){var Qt,ee,De={};X.nodes.forEach(function(qe){De[qe.id]=qe});var _e=0;return!(!((Qt=ot==null?void 0:ot.edges)===null||Qt===void 0)&&Qt.length)||((ee=ot==null?void 0:ot.nodes)===null||ee===void 0?void 0:ee.length)<2?0:(X.edges.forEach(function(qe){var ln=De[qe.source][xt],en=De[qe.target][xt],Sn=ot==null?void 0:ot.nodes[0][xt],bn=ot==null?void 0:ot.nodes[1][xt],Pn=ot==null?void 0:ot.edges[0][zt];qe[zt]===Pn&&(ln===Sn&&en===bn||ln===bn&&en===Sn)&&_e++}),_e)},Mo=function(X,ot,xt){for(var zt=1/0,Qt=0,ee=function(qe){var ln=X[qe],en=Object.keys(ln).sort(function(Jn,$n){return ln[Jn]-ln[$n]}),Sn=10,bn=[];en.forEach(function(Jn,$n){bn[$n%Sn]||(bn[$n%Sn]={graphs:[],totalCount:0,aveCount:0}),bn[$n%Sn].graphs.push(Jn),bn[$n%Sn].totalCount+=ln[Jn]});var Pn=0,In=[];bn.forEach(function(Jn){var $n=Jn.totalCount/Jn.graphs.length;Jn.aveCount=$n,In.push($n);var cr=0,vr=Jn.length;Jn.graphs.forEach(function(hr,Lr){var Tr=ln[hr];Jn.graphs.forEach(function(Nr,zr){Lr!==zr&&(cr+=Math.abs(Tr-ln[Nr]))})}),cr/=vr*(vr-1)/2,Pn+=cr}),Pn/=bn.length;var kn=0;In.forEach(function(Jn,$n){In.forEach(function(cr,vr){$n!==vr&&(kn+=Math.abs(Jn-cr))}),kn/=In.length*(In.length-1)/2});var Wn=kn-Pn;zt<Wn&&(zt=Wn,Qt=qe)},De=0;De<ot;De++)ee(De);return{structure:xt[Qt],structureCountMap:X[Qt]}},no=function(X,ot){var xt={},zt={};return X.forEach(function(Qt,ee){xt[Qt.id]={idx:ee,node:Qt,degree:0,inDegree:0,outDegree:0};var De=Qt[ot];zt[De]||(zt[De]=[]),zt[De].push(Qt)}),{nodeMap:xt,nodeLabelMap:zt}},ro=function(X,ot,xt){var zt={},Qt={};return X.forEach(function(ee,De){zt["".concat(F)]={idx:De,edge:ee};var _e=ee[ot];Qt[_e]||(Qt[_e]=[]),Qt[_e].push(ee);var qe=xt[ee.source];qe&&(qe.degree++,qe.outDegree++);var ln=xt[ee.target];ln&&(ln.degree++,ln.inDegree++)}),{edgeMap:zt,edgeLabelMap:Qt}},Pa=function(X,ot,xt){var zt=ot.length,Qt={};return ot.forEach(function(ee,De){for(var _e=xt?0:De+1,qe=X[De].id,ln=_e;ln<zt;ln++)if(De!==ln){var en=X[ln].id,Sn=ee[ln];Qt["".concat(qe,"-").concat(en)]=Sn,xt||(Qt["".concat(en,"-").concat(qe)]=Sn)}}),Qt},fa=function(X,ot,xt,zt,Qt,ee,De,_e,qe,ln,en){var Sn,bn="".concat(ot.id,"-").concat(xt.id);if(ln&&ln[bn])return ln[bn];var Pn=en?en[bn]:void 0;if(!Pn){var In=(Sn={},Sn[bn]={start:zt[ot.id].idx,end:zt[xt.id].idx,distance:Qt},Sn);en=Ba(In,ee,X,en),Pn=en[bn]}return Ws(Pn,De,_e,qe)},ks=function(X,ot,xt,zt){var Qt,ee,De,_e=(Qt=X[ot])===null||Qt===void 0?void 0:Qt.degree,qe=(ee=X[ot])===null||ee===void 0?void 0:ee.inDegree,ln=(De=X[ot])===null||De===void 0?void 0:De.outDegree;return X[ot]===void 0&&(_e=1/0,qe=1/0,ln=1/0,zt[ot].forEach(function(en){var Sn=xt[en.id].degree;_e>Sn&&(_e=Sn);var bn=xt[en.id].inDegree;qe>bn&&(qe=bn);var Pn=xt[en.id].outDegree;ln>Pn&&(ln=Pn)}),X[ot]={degree:_e,inDegree:qe,outDegree:ln}),{minPatternNodeLabelDegree:_e,minPatternNodeLabelInDegree:qe,minPatternNodeLabelOutDegree:ln}},Fi=function(X,ot,xt,zt,Qt,ee,De){var _e;if(xt===void 0&&(xt=!1),ee===void 0&&(ee="cluster"),De===void 0&&(De="cluster"),!(!X||!X.nodes)){var qe=X.nodes.length;if(qe){var ln=qa(X,xt),en=qa(ot,xt),Sn=Pa(X.nodes,ln,xt),bn=Pa(ot.nodes,en,xt),Pn=no(X.nodes,ee),In=Pn.nodeMap,kn=Pn.nodeLabelMap,Wn=no(ot.nodes,ee),Jn=Wn.nodeMap,$n=Wn.nodeLabelMap;ro(X.edges,De,In);var cr=ro(ot.edges,De,Jn).edgeLabelMap,vr=[];en==null||en.forEach(function(Er){vr=vr.concat(Er)}),Qt||(Qt=Math.max.apply(Math,(0,Tn.ev)((0,Tn.ev)([],vr,!1),[2],!1))),zt||(zt=Qt);var hr=js(X,ln,ee,zt),Lr=js(ot,en,ee,zt),Tr=Math.min(100,qe*(qe-1)/2),Nr=eo(zt,qe,Tr,hr,ln),zr=Ba(Nr,hr,X),_r=10,j=1,B=1,P=4,k={graphs:zr,nodeLabelProp:ee,edgeLabelProp:De,minSupport:j,minNodeNum:B,maxNodeNum:P,directed:xt},U=zo(k).slice(0,_r),at=U.length,ut=[];U.forEach(function(Er,Br){ut[Br]={},Object.keys(zr).forEach(function(Cr){var Hr=zr[Cr],mi=Ws(Hr,Er,ee,De);ut[Br][Cr]=mi})});var ct=Mo(ut,at,U),pt=ct.structure,Bt=ct.structureCountMap,ae=ot.nodes[0],pe=[],Te=(_e=ot.nodes[0])===null||_e===void 0?void 0:_e[ee],Fe=-1/0;ot.nodes.forEach(function(Er){var Br=Er[ee],Cr=kn[Br];(Cr==null?void 0:Cr.length)>Fe&&(Fe=Cr.length,pe=Cr,Te=Br,ae=Er)});var Ue={},fn={},gn={},On={},Rn={},wn={};Object.keys($n).forEach(function(Er,Br){Rn[Er]=[],xt&&(wn[Er]=[]);var Cr=-1/0,Hr=$n[Er],mi={};Hr.forEach(function(ni){var ri=bn["".concat(ae.id,"-").concat(ni.id)];if(ri&&Rn[Er].push(ri),Cr<ri&&(Cr=ri),mi["".concat(ae.id,"-").concat(ni.id)]={start:0,end:Jn[ni.id].idx,distance:ri},xt){var Si=bn["".concat(ni.id,"-").concat(ae.id)];Si&&wn[Er].push(Si)}}),Rn[Er]=Rn[Er].sort(function(ni,ri){return ni-ri}),xt&&(wn[Er]=wn[Er].sort(function(ni,ri){return ni-ri})),fn=Ba(mi,Lr,ot,fn);var wr=[];if(Object.keys(mi).forEach(function(ni){if(gn[ni]){wr.push(gn[ni]);return}var ri=fn[ni];gn[ni]=Ws(ri,pt,ee,De),wr.push(gn[ni])}),wr=wr.sort(function(ni,ri){return ri-ni}),On["".concat(ae.id,"-").concat(Er)]=wr,Er!==Te)for(var si=(pe==null?void 0:pe.length)||0,Jr=function(ri){var Si=pe[ri],Sa=hr[In[Si.id].idx],Li=Sa.nodeLabelCountMap[Er],Ls=$n[Er].length;if(!Li||Li.count<Ls)return pe.splice(ri,1),"continue";for(var Us=!1,va=0;va<Ls;va++)if(Li.dists[va]>Rn[Er][va]){Us=!0;break}if(Us)return pe.splice(ri,1),"continue";var ka={};Sa.neighbors.forEach(function(ga){var Ga=Sn["".concat(Si.id,"-").concat(ga.id)];ka["".concat(Si.id,"-").concat(ga.id)]={start:In[Si.id].idx,end:In[ga.id].idx,distance:Ga}}),zr=Ba(ka,hr,X,zr);var Wa=[];Object.keys(ka).forEach(function(ga){if(Bt[ga]){Wa.push(Bt[ga]);return}var Ga=zr[ga];Bt[ga]=Ws(Ga,pt,ee,De),Wa.push(Bt[ga])}),Wa=Wa.sort(function(ga,Ga){return Ga-ga});for(var Xa=!1,va=0;va<Ls;va++)if(Wa[va]<wr[va]){Xa=!0;break}if(Xa)return pe.splice(ri,1),"continue"},fi=si-1;fi>=0;fi--)Jr(fi)});var Fn=[];pe==null||pe.forEach(function(Er){for(var Br=In[Er.id].idx,Cr=Ps(X.nodes,ln[Br],Br,ee,Qt),Hr=Cr.neighbors,mi=Hr.length,wr=!1,si=mi-1;si>=0;si--){if(Hr.length+1<ot.nodes.length){wr=!0;return}var Jr=Hr[si],fi=Jr[ee];if(!$n[fi]||!$n[fi].length){Hr.splice(si,1);continue}if(!Rn[fi]||!Rn[fi].length){Hr.splice(si,1);continue}var ni="".concat(Er.id,"-").concat(Jr.id),ri=Sn[ni],Si=Rn[fi].length-1,Sa=Rn[fi][Si];if(ri>Sa){Hr.splice(si,1);continue}if(xt){var Li="".concat(Jr.id,"-").concat(Er.id),Ls=Sn[Li];Si=wn[fi].length-1;var Us=wn[fi][Si];if(Ls>Us){Hr.splice(si,1);continue}}var va=Bt[ni]?Bt[ni]:fa(X,Er,Jr,In,ri,hr,pt,ee,De,Bt,zr),ka="".concat(ae.id,"-").concat(fi),Wa=On[ka][On[ka].length-1];if(va<Wa){Hr.splice(si,1);continue}var Xa=ks(Ue,fi,Jn,$n),ga=Xa.minPatternNodeLabelDegree,Ga=Xa.minPatternNodeLabelInDegree,Ra=Xa.minPatternNodeLabelOutDegree;if(In[Jr.id].degree<ga){Hr.splice(si,1);continue}}wr||Fn.push({nodes:[Er].concat(Hr)})});var Gn=Ks(ot,ae.id,!1).length,Xn={};xt?(Object.keys(Gn).forEach(function(Er){var Br=Jn[Er].node[ee];Xn[Br]?Xn[Br].push(Gn[Er]):Xn[Br]=[Gn[Er]]}),Object.keys(Xn).forEach(function(Er){Xn[Er].sort(function(Br,Cr){return Br-Cr})})):Xn=Rn;for(var rr=Fn.length,mr=function(Br){var Cr=Fn[Br],Hr=Cr.nodes[0],mi={},wr={};Cr.nodes.forEach(function(Qr,pa){wr[Qr.id]={idx:pa,node:Qr,degree:0,inDegree:0,outDegree:0};var _i=Qr[ee];mi[_i]?mi[_i]++:mi[_i]=1});var si=[],Jr={};X.edges.forEach(function(Qr){wr[Qr.source]&&wr[Qr.target]&&(si.push(Qr),Jr[Qr[De]]?Jr[Qr[De]]++:Jr[Qr[De]]=1,wr[Qr.source].degree++,wr[Qr.target].degree++,wr[Qr.source].outDegree++,wr[Qr.target].inDegree++)});for(var fi=Object.keys(cr).length,ni=!1,ri=0;ri<fi;ri++){var Si=Object.keys(cr)[ri];if(!Jr[Si]||Jr[Si]<cr[Si].length){ni=!0;break}}if(ni)return Fn.splice(Br,1),"continue";var Sa=si.length;if(Sa<ot.edges.length)return Fn.splice(Br,1),"break";for(var Li=!1,Ls=function(pa){var _i=si[pa],Qa=_i[De],gs=cr[Qa];if(!gs||!gs.length)return Jr[Qa]--,gs&&Jr[Qa]<gs.length?(Li=!0,"break"):(si.splice(pa,1),wr[_i.source].degree--,wr[_i.target].degree--,wr[_i.source].outDegree--,wr[_i.target].inDegree--,"continue");var rl=wr[_i.source].node[ee],zl=wr[_i.target].node[ee],To=!1;if(gs.forEach(function(Ys){var Go=Jn[Ys.source].node,Co=Jn[Ys.target].node;Go[ee]===rl&&Co[ee]===zl&&(To=!0),!xt&&Go[ee]===zl&&Co[ee]===rl&&(To=!0)}),!To)return Jr[Qa]--,gs&&Jr[Qa]<gs.length?(Li=!0,"break"):(si.splice(pa,1),wr[_i.source].degree--,wr[_i.target].degree--,wr[_i.source].outDegree--,wr[_i.target].inDegree--,"continue")},ri=Sa-1;ri>=0;ri--){var Us=Ls(ri);if(Us==="break")break}if(Li)return Fn.splice(Br,1),"continue";Cr.edges=si;var va=Ks(Cr,Cr.nodes[0].id,!1).length;if(Object.keys(va).reverse().forEach(function(Qr){if(!(Qr===Cr.nodes[0].id||Li)){if(va[Qr]===1/0){var pa=wr[Qr].node[ee];if(mi[pa]--,mi[pa]<$n[pa].length){Li=!0;return}var _i=Cr.nodes.indexOf(wr[Qr].node);Cr.nodes.splice(_i,1),wr[Qr]=void 0;return}var Qa=In[Qr].node[ee];if(!Xn[Qa]||!Xn[Qa].length||va[Qr]>Xn[Qa][Xn[Qa].length-1]){var pa=wr[Qr].node[ee];if(mi[pa]--,mi[pa]<$n[pa].length){Li=!0;return}var _i=Cr.nodes.indexOf(wr[Qr].node);Cr.nodes.splice(_i,1),wr[Qr]=void 0}}}),Li)return Fn.splice(Br,1),"continue";for(var ka=!0,Wa=0;ka&&!Li;){ka=!1;var Xa=xt?wr[Hr.id].degree<Jn[ae.id].degree||wr[Hr.id].inDegree<Jn[ae.id].inDegree||wr[Hr.id].outDegree<Jn[ae.id].outDegree:wr[Hr.id].degree<Jn[ae.id].degree;if(Xa){Li=!0;break}if(mi[Hr[ee]]<$n[Hr[ee]].length){Li=!0;break}for(var ga=Cr.nodes.length,Ga=ga-1;Ga>=0;Ga--){var Ra=Cr.nodes[Ga],jo=wr[Ra.id].degree,Vs=wr[Ra.id].inDegree,Zl=wr[Ra.id].outDegree,So=Ra[ee],Wo=ks(Ue,So,Jn,$n),ao=Wo.minPatternNodeLabelDegree,Ao=Wo.minPatternNodeLabelInDegree,Oo=Wo.minPatternNodeLabelOutDegree,nl=xt?jo<ao||Vs<Ao||Zl<Oo:jo<ao;if(nl){if(mi[Ra[ee]]--,mi[Ra[ee]]<$n[Ra[ee]].length){Li=!0;break}Cr.nodes.splice(Ga,1),wr[Ra.id]=void 0,ka=!0}}if(Li||!ka&&Wa!==0)break;Sa=si.length;for(var Ds=Sa-1;Ds>=0;Ds--){var Ka=si[Ds];if(!wr[Ka.source]||!wr[Ka.target]){si.splice(Ds,1);var vs=Ka[De];if(Jr[vs]--,wr[Ka.source]&&(wr[Ka.source].degree--,wr[Ka.source].outDegree--),wr[Ka.target]&&(wr[Ka.target].degree--,wr[Ka.target].inDegree--),cr[vs]&&Jr[vs]<cr[vs].length){Li=!0;break}ka=!0}}Wa++}if(Li||Li||Cr.nodes.length<ot.nodes.length||si.length<ot.edges.length)return Fn.splice(Br,1),"continue"},Dr=rr-1;Dr>=0;Dr--){var ai=mr(Dr);if(ai==="break")break}for(var ci=Fn.length,Vr=function(Br){var Cr=Fn[Br],Hr={};Cr.edges.forEach(function(si){var Jr="".concat(si.source,"-").concat(si.target,"-").concat(si.label);Hr[Jr]?Hr[Jr]++:Hr[Jr]=1});for(var mi=function(Jr){var fi=Fn[Jr],ni={};fi.edges.forEach(function(Si){var Sa="".concat(Si.source,"-").concat(Si.target,"-").concat(Si.label);ni[Sa]?ni[Sa]++:ni[Sa]=1});var ri=!0;Object.keys(ni).length!==Object.keys(Hr).length?ri=!1:Object.keys(Hr).forEach(function(Si){ni[Si]!==Hr[Si]&&(ri=!1)}),ri&&Fn.splice(Jr,1)},wr=ci-1;wr>Br;wr--)mi(wr);ci=Fn.length},Dr=0;Dr<=ci-1;Dr++)Vr(Dr);return Fn}}},io=Fi,fs=function(){function At(X){X===void 0&&(X=10),this.linkedList=new R,this.maxStep=X}return Object.defineProperty(At.prototype,"length",{get:function(){return this.linkedList.toArray().length},enumerable:!1,configurable:!0}),At.prototype.isEmpty=function(){return!this.linkedList.head},At.prototype.isMaxStack=function(){return this.toArray().length>=this.maxStep},At.prototype.peek=function(){return this.isEmpty()?null:this.linkedList.head.value},At.prototype.push=function(X){this.linkedList.prepend(X),this.length>this.maxStep&&this.linkedList.deleteTail()},At.prototype.pop=function(){var X=this.linkedList.deleteHead();return X?X.value:null},At.prototype.toArray=function(){return this.linkedList.toArray().map(function(X){return X.value})},At.prototype.clear=function(){for(;!this.isEmpty();)this.pop()},At}(),Rs=fs,Gs=pn,el={getAdjMatrix:_,breadthFirstSearch:kt,connectedComponent:Rt,getDegree:Vt,getInDegree:fe,getOutDegree:ue,detectCycle:pn,detectDirectedCycle:Gs,detectAllCycles:Xe,detectAllDirectedCycle:rn,detectAllUndirectedCycle:We,depthFirstSearch:we,dijkstra:Ks,findAllPath:Ss,findShortestPath:Qs,floydWarshall:qa,labelPropagation:Js,louvain:ua,iLouvain:Kn,kCore:po,kMeans:Da,cosineSimilarity:hs,nodesCosineSimilarity:_o,minimumSpanningTree:ha,pageRank:Wi,getNeighbors:D,Stack:Rs,GADDI:io}},86314:function(bt,Et,y){"use strict";y.d(Et,{MG:function(){return S},V7:function(){return M},Yq:function(){return R},eR:function(){return F},jt:function(){return D},tT:function(){return L}});var c=y(80813),_=y(76075),I=y(69014);function z(rt){return typeof rt=="boolean"?!1:"enter"in rt&&"update"in rt&&"exit"in rt}function S(rt){if(!rt)return{enter:!1,update:!1,exit:!1};var G=["enter","update","exit"],kt=Object.fromEntries(Object.entries(rt).filter(function(ft){var J=(0,c.CR)(ft,1),Rt=J[0];return!G.includes(Rt)}));return Object.fromEntries(G.map(function(ft){return z(rt)?rt[ft]===!1?[ft,!1]:[ft,(0,c.pi)((0,c.pi)({},rt[ft]),kt)]:[ft,kt]}))}function R(rt,G){rt?rt.finished.then(G):G()}function M(rt,G){rt.length===0?G():Promise.all(rt.map(function(kt){return kt==null?void 0:kt.finished})).then(G)}function N(rt,G){"update"in rt?rt.update(G):rt.attr(G)}function D(rt,G,kt){if(G.length===0)return null;if(!kt){var ft=G.slice(-1)[0];return N(rt,{style:ft}),null}return rt.animate(G,kt)}function A(rt,G){return!(rt.nodeName!=="text"||G.nodeName!=="text"||rt.attributes.text!==G.attributes.text)}function L(rt,G,kt,ft){if(ft===void 0&&(ft="destroy"),A(rt,G))return rt.remove(),[null];var J=function(){ft==="destroy"?rt.destroy():ft==="hide"&&(0,I.Cp)(rt),G.isVisible()&&(0,I.$Z)(G)};if(!kt)return J(),[null];var Rt=kt.duration,Tt=Rt===void 0?0:Rt,Vt=kt.delay,fe=Vt===void 0?0:Vt,ue=Math.ceil(+Tt/2),Ce=+Tt/4,be=(0,c.CR)(rt.getGeometryBounds().center,2),we=be[0],ne=be[1],We=(0,c.CR)(G.getGeometryBounds().center,2),rn=We[0],Xe=We[1],pn=(0,c.CR)([(we+rn)/2-we,(ne+Xe)/2-ne],2),Tn=pn[0],$e=pn[1],mn=rt.style.opacity,It=mn===void 0?1:mn,Ee=G.style.opacity,cn=Ee===void 0?1:Ee,sn=rt.style.transform||"",Pe=G.style.transform||"",ze=rt.animate([{opacity:It,transform:"translate(0, 0) ".concat(sn)},{opacity:0,transform:"translate(".concat(Tn,", ").concat($e,") ").concat(sn)}],(0,c.pi)((0,c.pi)({fill:"both"},kt),{duration:fe+ue+Ce})),Ke=G.animate([{opacity:0,transform:"translate(".concat(-Tn,", ").concat(-$e,") ").concat(Pe),offset:.01},{opacity:cn,transform:"translate(0, 0) ".concat(Pe)}],(0,c.pi)((0,c.pi)({fill:"both"},kt),{duration:ue+Ce,delay:fe+ue-Ce}));return R(Ke,J),[ze,Ke]}function F(rt,G,kt){var ft={},J={};return Object.entries(G).forEach(function(Rt){var Tt=(0,c.CR)(Rt,2),Vt=Tt[0],fe=Tt[1];if(!(0,_.Z)(fe)){var ue=rt.style[Vt]||rt.parsedStyle[Vt]||0;ue!==fe&&(ft[Vt]=ue,J[Vt]=fe)}}),kt?D(rt,[ft,J],(0,c.pi)({fill:"both"},kt)):(N(rt,J),null)}},97304:function(bt,Et,y){"use strict";y.d(Et,{w:function(){return M}});var c=y(80813),_=y(14675),I=y(69014),z=y(99247),S=y(16915);function R(){(0,I.WD)(this,this.attributes.visibility!=="hidden")}var M=function(N){(0,c.ZT)(D,N);function D(A,L){L===void 0&&(L={});var F=N.call(this,(0,z.n)({},{style:L},A))||this;return F.initialized=!1,F._defaultOptions=L,F}return Object.defineProperty(D.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=(0,S.g)(this)),this._offscreen},enumerable:!1,configurable:!0}),Object.defineProperty(D.prototype,"defaultOptions",{get:function(){return this._defaultOptions},enumerable:!1,configurable:!0}),D.prototype.connectedCallback=function(){this.render(this.attributes,this),this.bindEvents(this.attributes,this),this.initialized=!0},D.prototype.disconnectedCallback=function(){var A;(A=this._offscreen)===null||A===void 0||A.destroy()},D.prototype.attributeChangedCallback=function(A){A==="visibility"&&R.call(this)},D.prototype.update=function(A,L){var F;return this.attr((0,z.n)({},this.attributes,A||{})),(F=this.render)===null||F===void 0?void 0:F.call(this,this.attributes,this,L)},D.prototype.clear=function(){this.removeChildren()},D.prototype.bindEvents=function(A,L){},D.prototype.getSubShapeStyle=function(A){var L=A.x,F=A.y,rt=A.transform,G=A.transformOrigin,kt=A.class,ft=A.className,J=A.zIndex,Rt=(0,c._T)(A,["x","y","transform","transformOrigin","class","className","zIndex"]);return Rt},D}(_.b_)},42777:function(bt,Et,y){"use strict";y.d(Et,{x:function(){return z}});var c=y(80813),_=y(14675),I=y(16915),z=function(S){(0,c.ZT)(R,S);function R(M){M===void 0&&(M={});var N=M.style,D=(0,c._T)(M,["style"]);return S.call(this,(0,c.pi)({style:(0,c.pi)({text:"",fill:"black",fontFamily:"sans-serif",fontSize:16,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",lineWidth:1,textAlign:"start",textBaseline:"middle"},N)},D))||this}return Object.defineProperty(R.prototype,"offscreenGroup",{get:function(){return this._offscreen||(this._offscreen=(0,I.g)(this)),this._offscreen},enumerable:!1,configurable:!0}),R.prototype.disconnectedCallback=function(){var M;(M=this._offscreen)===null||M===void 0||M.destroy()},R}(_.xv)},65244:function(bt,Et,y){"use strict";y.d(Et,{W:function(){return Zt}});var c=y(80813),_=y(97304),I=y(14675),z=y(88839),S=y(38974),R=y(17911),M=y(58688),N=y(33253),D=y(98294),A=y(67756);function L($,Q,H){return H?"".concat($," ").concat(H,"legend-").concat(Q):$}function F($,Q,H){var et=$.classNamePrefix,yt=et===void 0?"":et;return L(Q.name,H,yt)}var rt={title:"title",item:"item",marker:"marker",label:"label",value:"value",focusIcon:"focus-icon",background:"background",ribbon:"ribbon",track:"track",selection:"selection",handle:"handle",handleMarker:"handle-marker",handleLabel:"handle-label",indicator:"indicator",prevBtn:"prev-btn",nextBtn:"next-btn",pageInfo:"page-info"},G=(0,M.A)({text:"text"},"title");function kt($,Q){var H=$.attributes,et=H.position,yt=H.spacing,Xt=H.inset,Ot=H.text,Kt=$.getBBox(),gt=Q.getBBox(),vt=(0,N.l)(et),lt=(0,c.CR)((0,D.j)(Ot?yt:0),4),jt=lt[0],Yt=lt[1],he=lt[2],ye=lt[3],Wt=(0,c.CR)((0,D.j)(Xt),4),Oe=Wt[0],He=Wt[1],Qe=Wt[2],An=Wt[3],Nn=(0,c.CR)([ye+Yt,jt+he],2),Cn=Nn[0],Bn=Nn[1],jn=(0,c.CR)([An+He,Oe+Qe],2),or=jn[0],ir=jn[1];if(vt[0]==="l")return new R.b(Kt.x,Kt.y,gt.width+Kt.width+Cn+or,Math.max(gt.height+ir,Kt.height));if(vt[0]==="t")return new R.b(Kt.x,Kt.y,Math.max(gt.width+or,Kt.width),gt.height+Kt.height+Bn+ir);var lr=(0,c.CR)([Q.attributes.width||gt.width,Q.attributes.height||gt.height],2),Vn=lr[0],nr=lr[1];return new R.b(gt.x,gt.y,Vn+Kt.width+Cn+or,nr+Kt.height+Bn+ir)}function ft($,Q){var H=Object.entries(Q).reduce(function(et,yt){var Xt=(0,c.CR)(yt,2),Ot=Xt[0],Kt=Xt[1],gt=$.node().attr(Ot);return gt||(et[Ot]=Kt),et},{});$.styles(H)}function J($){var Q,H,et,yt,Xt=$,Ot=Xt.width,Kt=Xt.height,gt=Xt.position,vt=(0,c.CR)([+Ot/2,+Kt/2],2),lt=vt[0],jt=vt[1],Yt=(0,c.CR)([+lt,+jt,"center","middle"],4),he=Yt[0],ye=Yt[1],Wt=Yt[2],Oe=Yt[3],He=(0,N.l)(gt);return He.includes("l")&&(Q=(0,c.CR)([0,"start"],2),he=Q[0],Wt=Q[1]),He.includes("r")&&(H=(0,c.CR)([+Ot,"end"],2),he=H[0],Wt=H[1]),He.includes("t")&&(et=(0,c.CR)([0,"top"],2),ye=et[0],Oe=et[1]),He.includes("b")&&(yt=(0,c.CR)([+Kt,"bottom"],2),ye=yt[0],Oe=yt[1]),{x:he,y:ye,textAlign:Wt,textBaseline:Oe}}var Rt=function($){(0,c.ZT)(Q,$);function Q(H){return $.call(this,H,{text:"",width:0,height:0,fill:"#4a505a",fontWeight:"bold",fontSize:12,fontFamily:"sans-serif",inset:0,spacing:0,position:"top-left"})||this}return Q.prototype.getAvailableSpace=function(){var H=this,et=this.attributes,yt=et.width,Xt=et.height,Ot=et.position,Kt=et.spacing,gt=et.inset,vt=H.querySelector(G.text.class);if(!vt)return new R.b(0,0,+yt,+Xt);var lt=vt.getBBox(),jt=lt.width,Yt=lt.height,he=(0,c.CR)((0,D.j)(Kt),4),ye=he[0],Wt=he[1],Oe=he[2],He=he[3],Qe=(0,c.CR)([0,0,+yt,+Xt],4),An=Qe[0],Nn=Qe[1],Cn=Qe[2],Bn=Qe[3],jn=(0,N.l)(Ot);if(jn.includes("i"))return new R.b(An,Nn,Cn,Bn);jn.forEach(function(dr,Fr){var xi,$r,pi,Ri;dr==="t"&&(xi=(0,c.CR)(Fr===0?[Yt+Oe,+Xt-Yt-Oe]:[0,+Xt],2),Nn=xi[0],Bn=xi[1]),dr==="r"&&($r=(0,c.CR)([+yt-jt-He],1),Cn=$r[0]),dr==="b"&&(pi=(0,c.CR)([+Xt-Yt-ye],1),Bn=pi[0]),dr==="l"&&(Ri=(0,c.CR)(Fr===0?[jt+Wt,+yt-jt-Wt]:[0,+yt],2),An=Ri[0],Cn=Ri[1])});var or=(0,c.CR)((0,D.j)(gt),4),ir=or[0],lr=or[1],Vn=or[2],nr=or[3],Or=(0,c.CR)([nr+lr,ir+Vn],2),Kr=Or[0],Wr=Or[1];return new R.b(An+nr,Nn+ir,Cn-Kr,Bn-Wr)},Q.prototype.getBBox=function(){return this.title?this.title.getBBox():new R.b(0,0,0,0)},Q.prototype.render=function(H,et){var yt=this,Xt=H.width,Ot=H.height,Kt=H.position,gt=H.spacing,vt=H.classNamePrefix,lt=(0,c._T)(H,["width","height","position","spacing","classNamePrefix"]),jt=(0,c.CR)((0,z.Hm)(lt),1),Yt=jt[0],he=J(H),ye=he.x,Wt=he.y,Oe=he.textAlign,He=he.textBaseline;(0,A.z)(!!lt.text,(0,S.Ys)(et),function(Qe){var An=L(G.text.name,rt.title,vt);yt.title=Qe.maybeAppendByClassName(G.text,"text").attr("className",An).styles(Yt).call(ft,{x:ye,y:Wt,textAlign:Oe,textBaseline:He}).node()})},Q}(_.w),Tt=function(){},Vt=y(37004),fe=y(38242);function ue($,Q){return $.reduce(function(H,et){return(H[et[Q]]=H[et[Q]]||[]).push(et),H},{})}var Ce=y(99247),be=y(70208),we=y(78431),ne=y(86314);function We($){var Q;return((Q=$[0])===null||Q===void 0?void 0:Q.map(function(H,et){return $.map(function(yt){return yt[et]})}))||[]}var rn=y(69014),Xe=y(99769),pn=function($,Q,H){return[["M",$-H,Q],["A",H,H,0,1,0,$+H,Q],["A",H,H,0,1,0,$-H,Q],["Z"]]},Tn=pn,$e=function($,Q,H){return[["M",$-H,Q-H],["L",$+H,Q-H],["L",$+H,Q+H],["L",$-H,Q+H],["Z"]]},mn=function($,Q,H){return[["M",$-H,Q],["L",$,Q-H],["L",$+H,Q],["L",$,Q+H],["Z"]]},It=function($,Q,H){var et=H*Math.sin(.3333333333333333*Math.PI);return[["M",$-H,Q+et],["L",$,Q-et],["L",$+H,Q+et],["Z"]]},Ee=function($,Q,H){var et=H*Math.sin(.3333333333333333*Math.PI);return[["M",$-H,Q-et],["L",$+H,Q-et],["L",$,Q+et],["Z"]]},cn=function($,Q,H){var et=H/2*Math.sqrt(3);return[["M",$,Q-H],["L",$+et,Q-H/2],["L",$+et,Q+H/2],["L",$,Q+H],["L",$-et,Q+H/2],["L",$-et,Q-H/2],["Z"]]},sn=function($,Q,H){var et=H-1.5;return[["M",$-H,Q-et],["L",$+H,Q+et],["L",$+H,Q-et],["L",$-H,Q+et],["Z"]]},Pe=function($,Q,H){return[["M",$,Q+H],["L",$,Q-H]]},ze=function($,Q,H){return[["M",$-H,Q-H],["L",$+H,Q+H],["M",$+H,Q-H],["L",$-H,Q+H]]},Ke=function($,Q,H){return[["M",$-H/2,Q-H],["L",$+H/2,Q-H],["M",$,Q-H],["L",$,Q+H],["M",$-H/2,Q+H],["L",$+H/2,Q+H]]},le=function($,Q,H){return[["M",$-H,Q],["L",$+H,Q],["M",$,Q-H],["L",$,Q+H]]},Ae=function($,Q,H){return[["M",$-H,Q],["L",$+H,Q]]},Pt=function($,Q,H){return[["M",$-H,Q],["L",$+H,Q]]},wt=Pt,de=function($,Q,H){return[["M",$-H,Q],["A",H/2,H/2,0,1,1,$,Q],["A",H/2,H/2,0,1,0,$+H,Q]]},je=function($,Q,H){return[["M",$-H-1,Q-2.5],["L",$,Q-2.5],["L",$,Q+2.5],["L",$+H+1,Q+2.5]]},Re=function($,Q,H){return[["M",$-H-1,Q+2.5],["L",$,Q+2.5],["L",$,Q-2.5],["L",$+H+1,Q-2.5]]},ce=function($,Q,H){return[["M",$-(H+1),Q+2.5],["L",$-H/2,Q+2.5],["L",$-H/2,Q-2.5],["L",$+H/2,Q-2.5],["L",$+H/2,Q+2.5],["L",$+H+1,Q+2.5]]};function Le($,Q){return[["M",$-5,Q+2.5],["L",$-5,Q],["L",$,Q],["L",$,Q-3],["L",$,Q+3],["L",$+6.5,Q+3]]}var xe=function($,Q,H){return[["M",$-H,Q-H],["L",$+H,Q],["L",$-H,Q+H],["Z"]]},Ft=function($,Q,H){var et=H,yt=H*.2,Xt=H*.7;return[["M",$-et,Q],["A",et,et,0,1,0,$+et,Q],["A",et,et,0,1,0,$-et,Q],["Z"],["M",$-Xt,Q],["L",$-yt,Q],["M",$+yt,Q],["L",$+Xt,Q],["M",$,Q-Xt],["L",$,Q-yt],["M",$,Q+yt],["L",$,Q+Xt]]},re=(0,M.A)({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"),Me=function($){(0,c.ZT)(Q,$);function Q(H){var et=$.call(this,H,{x:0,y:0,animate:{easing:"linear",duration:200,fill:"both"},buttonCursor:"pointer",buttonFill:"black",buttonD:xe(0,0,6),buttonSize:12,controllerPadding:5,controllerSpacing:5,formatter:function(yt,Xt){return"".concat(yt,"/").concat(Xt)},defaultPage:0,loop:!1,orientation:"horizontal",pageNumFill:"black",pageNumFontSize:12,pageNumTextAlign:"start",pageNumTextBaseline:"middle"})||this;return et.playState="idle",et.contentGroup=et.appendChild(new I.ZA({class:re.contentGroup.name})),et.playWindow=et.contentGroup.appendChild(new I.ZA({class:re.playWindow.name})),et.innerCurrPage=et.defaultPage,et}return Object.defineProperty(Q.prototype,"defaultPage",{get:function(){var H=this.attributes.defaultPage;return(0,be.Z)(H,0,Math.max(this.pageViews.length-1,0))},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"pageViews",{get:function(){return this.playWindow.children},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"controllerShape",{get:function(){return this.totalPages>1?{width:55,height:0}:{width:0,height:0}},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"pageShape",{get:function(){var H=this.pageViews,et=(0,c.CR)(We(H.map(function(jt){var Yt=jt.getBBox(),he=Yt.width,ye=Yt.height;return[he,ye]})).map(function(jt){return Math.max.apply(Math,(0,c.ev)([],(0,c.CR)(jt),!1))}),2),yt=et[0],Xt=et[1],Ot=this.attributes,Kt=Ot.pageWidth,gt=Kt===void 0?yt:Kt,vt=Ot.pageHeight,lt=vt===void 0?Xt:vt;return{pageWidth:gt,pageHeight:lt}},enumerable:!1,configurable:!0}),Q.prototype.getContainer=function(){return this.playWindow},Object.defineProperty(Q.prototype,"totalPages",{get:function(){return this.pageViews.length},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"currPage",{get:function(){return this.innerCurrPage},enumerable:!1,configurable:!0}),Q.prototype.getBBox=function(){var H=$.prototype.getBBox.call(this),et=H.x,yt=H.y,Xt=this.controllerShape,Ot=this.pageShape,Kt=Ot.pageWidth,gt=Ot.pageHeight;return new R.b(et,yt,Kt+Xt.width,gt)},Q.prototype.goTo=function(H){var et=this,yt=this.attributes.animate,Xt=this,Ot=Xt.currPage,Kt=Xt.playState,gt=Xt.playWindow,vt=Xt.pageViews;if(Kt!=="idle"||H<0||vt.length<=0||H>=vt.length)return null;vt[Ot].setLocalPosition(0,0),this.prepareFollowingPage(H);var lt=(0,c.CR)(this.getFollowingPageDiff(H),2),jt=lt[0],Yt=lt[1];this.playState="running";var he=(0,ne.jt)(gt,[{transform:"translate(0, 0)"},{transform:"translate(".concat(-jt,", ").concat(-Yt,")")}],yt);return(0,ne.Yq)(he,function(){et.innerCurrPage=H,et.playState="idle",et.setVisiblePages([H]),et.updatePageInfo()}),he},Q.prototype.prev=function(){var H=this.attributes.loop,et=this.pageViews.length,yt=this.currPage;if(!H&&yt<=0)return null;var Xt=H?(yt-1+et)%et:(0,be.Z)(yt-1,0,et);return this.goTo(Xt)},Q.prototype.next=function(){var H=this.attributes.loop,et=this.pageViews.length,yt=this.currPage;if(!H&&yt>=et-1)return null;var Xt=H?(yt+1)%et:(0,be.Z)(yt+1,0,et);return this.goTo(Xt)},Q.prototype.renderClipPath=function(H){var et=this.pageShape,yt=et.pageWidth,Xt=et.pageHeight;if(!yt||!Xt){this.contentGroup.style.clipPath=void 0;return}this.clipPath=H.maybeAppendByClassName(re.clipPath,"rect").styles({width:yt,height:Xt}),this.contentGroup.attr("clipPath",this.clipPath.node())},Q.prototype.setVisiblePages=function(H){this.playWindow.children.forEach(function(et,yt){H.includes(yt)?(0,rn.$Z)(et):(0,rn.Cp)(et)})},Q.prototype.adjustControllerLayout=function(){var H=this,et=H.prevBtnGroup,yt=H.nextBtnGroup,Xt=H.pageInfoGroup,Ot=this.attributes,Kt=Ot.orientation,gt=Ot.controllerPadding,vt=Xt.getBBox(),lt=vt.width,jt=vt.height,Yt=(0,c.CR)(Kt==="horizontal"?[-180,0]:[-90,90],2),he=Yt[0],ye=Yt[1];et.setLocalEulerAngles(he),yt.setLocalEulerAngles(ye);var Wt=et.getBBox(),Oe=Wt.width,He=Wt.height,Qe=yt.getBBox(),An=Qe.width,Nn=Qe.height,Cn=Math.max(Oe,lt,An),Bn=Kt==="horizontal"?{offset:[[0,0],[Oe/2+gt,0],[Oe+lt+gt*2,0]],textAlign:"start"}:{offset:[[Cn/2,-He-gt],[Cn/2,0],[Cn/2,Nn+gt]],textAlign:"center"},jn=(0,c.CR)(Bn.offset,3),or=(0,c.CR)(jn[0],2),ir=or[0],lr=or[1],Vn=(0,c.CR)(jn[1],2),nr=Vn[0],Or=Vn[1],Kr=(0,c.CR)(jn[2],2),Wr=Kr[0],dr=Kr[1],Fr=Bn.textAlign,xi=Xt.querySelector("text");xi&&(xi.style.textAlign=Fr),et.setLocalPosition(ir,lr),Xt.setLocalPosition(nr,Or),yt.setLocalPosition(Wr,dr)},Q.prototype.updatePageInfo=function(){var H,et=this,yt=et.currPage,Xt=et.pageViews,Ot=et.attributes.formatter;Xt.length<2||((H=this.pageInfoGroup.querySelector(re.pageInfo.class))===null||H===void 0||H.attr("text",Ot(yt+1,Xt.length)),this.adjustControllerLayout())},Q.prototype.getFollowingPageDiff=function(H){var et=this.currPage;if(et===H)return[0,0];var yt=this.attributes.orientation,Xt=this.pageShape,Ot=Xt.pageWidth,Kt=Xt.pageHeight,gt=H<et?-1:1;return yt==="horizontal"?[gt*Ot,0]:[0,gt*Kt]},Q.prototype.prepareFollowingPage=function(H){var et=this,yt=et.currPage,Xt=et.pageViews;if(this.setVisiblePages([H,yt]),H!==yt){var Ot=(0,c.CR)(this.getFollowingPageDiff(H),2),Kt=Ot[0],gt=Ot[1];Xt[H].setLocalPosition(Kt,gt)}},Q.prototype.renderController=function(H){var et=this,yt=this.attributes,Xt=yt.controllerSpacing,Ot=yt.classNamePrefix,Kt=Ot===void 0?"":Ot,gt=this.pageShape,vt=gt.pageWidth,lt=gt.pageHeight,jt=this.pageViews.length>=2,Yt=H.maybeAppendByClassName(re.controller,"g");if((0,rn.WD)(Yt.node(),jt),!!jt){var he=(0,z.zs)(this.attributes,"button"),ye=(0,z.zs)(this.attributes,"pageNum"),Wt=(0,c.CR)((0,z.Hm)(he),2),Oe=Wt[0],He=Wt[1],Qe=Oe.size,An=(0,c._T)(Oe,["size"]),Nn=!Yt.select(re.prevBtnGroup.class).node(),Cn=Yt.maybeAppendByClassName(re.prevBtnGroup,"g").styles(He);this.prevBtnGroup=Cn.node();var Bn=Cn.maybeAppendByClassName(re.prevBtn,"path");if(Kt){var jn=L(re.prevBtn.name,rt.prevBtn,Kt);Bn.node().setAttribute("class",jn)}var or=Yt.maybeAppendByClassName(re.nextBtnGroup,"g").styles(He);this.nextBtnGroup=or.node();var ir=or.maybeAppendByClassName(re.nextBtn,"path");if(Kt){var lr=L(re.nextBtn.name,rt.nextBtn,Kt);ir.node().setAttribute("class",lr)}[Bn,ir].forEach(function(Kr){Kr.styles((0,c.pi)((0,c.pi)({},An),{transformOrigin:"center"})),(0,Xe.b)(Kr.node(),Qe,!0)});var Vn=Yt.maybeAppendByClassName(re.pageInfoGroup,"g");this.pageInfoGroup=Vn.node();var nr=Vn.maybeAppendByClassName(re.pageInfo,"text");if(nr.styles(ye),Kt){var Or=L(re.pageInfo.name,rt.pageInfo,Kt);nr.node().setAttribute("class",Or)}this.updatePageInfo(),Yt.node().setLocalPosition(vt+Xt,lt/2),Nn&&(this.prevBtnGroup.addEventListener("click",function(){et.prev()}),this.nextBtnGroup.addEventListener("click",function(){et.next()}))}},Q.prototype.render=function(H,et){var yt=H.x,Xt=yt===void 0?0:yt,Ot=H.y,Kt=Ot===void 0?0:Ot;this.attr("transform","translate(".concat(Xt,", ").concat(Kt,")"));var gt=(0,S.Ys)(et);this.renderClipPath(gt),this.renderController(gt),this.setVisiblePages([this.defaultPage]),this.goTo(this.defaultPage)},Q.prototype.bindEvents=function(){var H=this,et=(0,we.Z)(function(){return H.render(H.attributes,H)},50);this.playWindow.addEventListener(I.Dk.INSERTED,et),this.playWindow.addEventListener(I.Dk.REMOVED,et)},Q}(_.w),O=y(71018),st=y(93785),ve=y(71879);function $t($){var Q="default";if((0,st.Z)($)&&$ instanceof Image)Q="image";else if((0,O.Z)($))Q="symbol";else if((0,ve.Z)($)){var H=new RegExp("data:(image|text)");$.match(H)?Q="base64":/^(https?:\/\/(([a-zA-Z0-9]+-?)+[a-zA-Z0-9]+\.)+[a-zA-Z]+)(:\d+)?(\/.*)?(\?.*)?(#.*)?$/.test($)?Q="url":Q="symbol"}return Q}function Ie($){var Q=$t($);return["base64","url","image"].includes(Q)?"image":$&&Q==="symbol"?"path":null}var Ne=function($){(0,c.ZT)(Q,$);function Q(){return $!==null&&$.apply(this,arguments)||this}return Q.prototype.render=function(H,et){var yt=H.x,Xt=yt===void 0?0:yt,Ot=H.y,Kt=Ot===void 0?0:Ot,gt=this.getSubShapeStyle(H),vt=gt.symbol,lt=gt.size,jt=lt===void 0?16:lt,Yt=(0,c._T)(gt,["symbol","size"]),he=Ie(vt);(0,A.z)(!!he,(0,S.Ys)(et),function(ye){ye.maybeAppendByClassName("marker",he).attr("className","marker ".concat(he,"-marker")).call(function(Wt){if(he==="image"){var Oe=jt*2;Wt.styles({img:vt,width:Oe,height:Oe,x:Xt-jt,y:Kt-jt})}else{var Oe=jt/2,He=(0,O.Z)(vt)?vt:Q.getSymbol(vt);Wt.styles((0,c.pi)({d:He==null?void 0:He(Xt,Kt,Oe)},Yt))}})})},Q.MARKER_SYMBOL_MAP=new Map,Q.registerSymbol=function(H,et){Q.MARKER_SYMBOL_MAP.set(H,et)},Q.getSymbol=function(H){return Q.MARKER_SYMBOL_MAP.get(H)},Q.getSymbols=function(){return Array.from(Q.MARKER_SYMBOL_MAP.keys())},Q}(_.w);Ne.registerSymbol("cross",ze),Ne.registerSymbol("hyphen",Ae),Ne.registerSymbol("line",Pe),Ne.registerSymbol("plus",le),Ne.registerSymbol("tick",Ke),Ne.registerSymbol("circle",pn),Ne.registerSymbol("point",Tn),Ne.registerSymbol("bowtie",sn),Ne.registerSymbol("hexagon",cn),Ne.registerSymbol("square",$e),Ne.registerSymbol("diamond",mn),Ne.registerSymbol("triangle",It),Ne.registerSymbol("triangle-down",Ee),Ne.registerSymbol("line",Pe),Ne.registerSymbol("dot",Pt),Ne.registerSymbol("dash",wt),Ne.registerSymbol("smooth",de),Ne.registerSymbol("hv",je),Ne.registerSymbol("vh",Re),Ne.registerSymbol("hvh",ce),Ne.registerSymbol("vhv",Le),Ne.registerSymbol("focus",Ft);function tn($,Q,H){var et=Math.round(($-H)/Q);return H+et*Q}function Mt($,Q,H){var et=1.4,yt=et*H;return[["M",$-H,Q-yt],["L",$+H,Q-yt],["L",$+H,Q+yt],["L",$-H,Q+yt],["Z"]]}var q=1.4,Ct=.4;function Ht($,Q,H){var et=H,yt=et*q,Xt=et/2,Ot=et/6,Kt=$+yt*Ct;return[["M",$,Q],["L",Kt,Q+Xt],["L",$+yt,Q+Xt],["L",$+yt,Q-Xt],["L",Kt,Q-Xt],["Z"],["M",Kt,Q+Ot],["L",$+yt-2,Q+Ot],["M",Kt,Q-Ot],["L",$+yt-2,Q-Ot]]}function Lt($,Q,H){var et=H,yt=et*q,Xt=et/2,Ot=et/6,Kt=Q+yt*Ct;return[["M",$,Q],["L",$-Xt,Kt],["L",$-Xt,Q+yt],["L",$+Xt,Q+yt],["L",$+Xt,Kt],["Z"],["M",$-Ot,Kt],["L",$-Ot,Q+yt-2],["M",$+Ot,Kt],["L",$+Ot,Q+yt-2]]}Ne.registerSymbol("hiddenHandle",Mt),Ne.registerSymbol("verticalHandle",Ht),Ne.registerSymbol("horizontalHandle",Lt);var _t=function($,Q,H){return $===void 0&&($="horizontal"),$==="horizontal"?Q:H};function Ut($,Q,H,et){var yt;et===void 0&&(et=4);var Xt=__read($,2),Ot=Xt[0],Kt=Xt[1],gt=__read(Q,2),vt=gt[0],lt=gt[1],jt=__read(H,2),Yt=jt[0],he=jt[1],ye=__read([vt,lt],2),Wt=ye[0],Oe=ye[1],He=Oe-Wt;return Wt>Oe&&(yt=__read([Oe,Wt],2),Wt=yt[0],Oe=yt[1]),He>Kt-Ot?[Ot,Kt]:Wt<Ot?Yt===Ot&&he===Oe?[Ot,Oe]:[Ot,He+Ot]:Oe>Kt?he===Kt&&Yt===Wt?[Wt,Kt]:[Kt-He,Kt]:[Wt,Oe]}function qt($,Q,H){return $===void 0&&($="horizontal"),$==="horizontal"?Q:H}var se=y(49527),te=y(2080),ke=y(88170),Ye=y(53160),Ve=y(23343);function on($,Q){for(var H in Q)Q.hasOwnProperty(H)&&H!=="constructor"&&Q[H]!==void 0&&($[H]=Q[H])}function xn($,Q,H,et){return Q&&on($,Q),H&&on($,H),et&&on($,et),$}var vn=y(5759);function Qn($){return $ instanceof Element||$ instanceof Document}var Ln,_n="component-poptip",me={CONTAINER:"component-poptip",ARROW:"component-poptip-arrow",TEXT:"component-poptip-text"},pr=(Ln={},Ln[".".concat(me.CONTAINER)]={visibility:"visible",position:"absolute","background-color":"rgba(0, 0, 0)","box-shadow":"0px 0px 10px #aeaeae","border-radius":"3px",color:"#fff",opacity:.8,"font-size":"12px",padding:"4px 6px",display:"flex","justify-content":"center","align-items":"center","z-index":8,transition:"visibility 50ms"},Ln[".".concat(me.TEXT)]={"text-align":"center"},Ln[".".concat(me.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, -100%)"},Ln[".".concat(me.CONTAINER,"[data-position='left']")]={transform:"translate(-100%, -50%)"},Ln[".".concat(me.CONTAINER,"[data-position='right']")]={transform:"translate(0, -50%)"},Ln[".".concat(me.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 0)"},Ln[".".concat(me.CONTAINER,"[data-position='top-left']")]={transform:"translate(0,-100%)"},Ln[".".concat(me.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%,-100%)"},Ln[".".concat(me.CONTAINER,"[data-position='left-top']")]={transform:"translate(-100%, 0)"},Ln[".".concat(me.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(-100%, -100%)"},Ln[".".concat(me.CONTAINER,"[data-position='right-top']")]={transform:"translate(0, 0)"},Ln[".".concat(me.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(0, -100%)"},Ln[".".concat(me.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 0)"},Ln[".".concat(me.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 0)"},Ln[".".concat(me.ARROW)]={width:"4px",height:"4px",transform:"rotate(45deg)","background-color":"rgba(0, 0, 0)",position:"absolute","z-index":-1},Ln[".".concat(me.CONTAINER,"[data-position='top']")]={transform:"translate(-50%, calc(-100% - 5px))"},Ln["[data-position='top'] .".concat(me.ARROW)]={bottom:"-2px"},Ln[".".concat(me.CONTAINER,"[data-position='left']")]={transform:"translate(calc(-100% - 5px), -50%)"},Ln["[data-position='left'] .".concat(me.ARROW)]={right:"-2px"},Ln[".".concat(me.CONTAINER,"[data-position='right']")]={transform:"translate(5px, -50%)"},Ln["[data-position='right'] .".concat(me.ARROW)]={left:"-2px"},Ln[".".concat(me.CONTAINER,"[data-position='bottom']")]={transform:"translate(-50%, 5px)"},Ln["[data-position='bottom'] .".concat(me.ARROW)]={top:"-2px"},Ln[".".concat(me.CONTAINER,"[data-position='top-left']")]={transform:"translate(0, calc(-100% - 5px))"},Ln["[data-position='top-left'] .".concat(me.ARROW)]={left:"10px",bottom:"-2px"},Ln[".".concat(me.CONTAINER,"[data-position='top-right']")]={transform:"translate(-100%, calc(-100% - 5px))"},Ln["[data-position='top-right'] .".concat(me.ARROW)]={right:"10px",bottom:"-2px"},Ln[".".concat(me.CONTAINER,"[data-position='left-top']")]={transform:"translate(calc(-100% - 5px), 0)"},Ln["[data-position='left-top'] .".concat(me.ARROW)]={right:"-2px",top:"8px"},Ln[".".concat(me.CONTAINER,"[data-position='left-bottom']")]={transform:"translate(calc(-100% - 5px), -100%)"},Ln["[data-position='left-bottom'] .".concat(me.ARROW)]={right:"-2px",bottom:"8px"},Ln[".".concat(me.CONTAINER,"[data-position='right-top']")]={transform:"translate(5px, 0)"},Ln["[data-position='right-top'] .".concat(me.ARROW)]={left:"-2px",top:"8px"},Ln[".".concat(me.CONTAINER,"[data-position='right-bottom']")]={transform:"translate(5px, -100%)"},Ln["[data-position='right-bottom'] .".concat(me.ARROW)]={left:"-2px",bottom:"8px"},Ln[".".concat(me.CONTAINER,"[data-position='bottom-left']")]={transform:"translate(0, 5px)"},Ln["[data-position='bottom-left'] .".concat(me.ARROW)]={top:"-2px",left:"8px"},Ln[".".concat(me.CONTAINER,"[data-position='bottom-right']")]={transform:"translate(-100%, 5px)"},Ln["[data-position='bottom-right'] .".concat(me.ARROW)]={top:"-2px",right:"8px"},Ln),Zn=void 0;function kr($,Q,H,et,yt,Xt){if(yt===void 0&&(yt=!1),Xt===void 0&&(Xt=!1),Xt)return[$,Q];var Ot=H.getBoundingClientRect(),Kt=Ot.x,gt=Ot.y,vt=Ot.width,lt=Ot.height;switch(et){case"top":return yt?[Kt+vt/2,gt]:[$,gt];case"left":return yt?[Kt,gt+lt/2]:[Kt,Q];case"bottom":return yt?[Kt+vt/2,gt+lt]:[$,gt+lt];case"right":return yt?[Kt+vt,gt+lt/2]:[Kt+vt,Q];case"top-right":case"right-top":return[Kt+vt,gt];case"left-bottom":case"bottom-left":return[Kt,gt+lt];case"right-bottom":case"bottom-right":return[Kt+vt,gt+lt];case"top-left":case"left-top":default:return[Kt,gt]}}var Ar=function($){var Q;return function(){for(var H=[],et=0;et<arguments.length;et++)H[et]=arguments[et];return Q||(Q=$.apply(Zn,H)),Q}};function ei($){var Q=$&&document.getElementById($);return Q||(Q=document.createElement("div"),Q.setAttribute("id",$),document.body.appendChild(Q)),Q}function yi($){var Q=Ar(ei)($);return Q}var ui=function($){(0,c.ZT)(Q,$);function Q(H){var et=$.call(this,(0,Ve.Z)({style:{id:_n}},Q.defaultOptions,H))||this;return et.visibility="visible",et.map=new Map,et.domStyles="",et.initShape(),et.render(et.attributes,et),et}return Object.defineProperty(Q.prototype,"visible",{get:function(){return this.visibility==="visible"},enumerable:!1,configurable:!0}),Q.prototype.render=function(H,et){this.visibility=this.style.visibility,this.updatePoptipElement()},Q.prototype.update=function(H){this.attr((0,Ve.Z)({},this.style,H)),this.render(this.attributes,this)},Q.prototype.bind=function(H,et){var yt=this;if(H){var Xt=this.style.text,Ot=function(gt){var vt=H,lt=yt.style,jt=Xt;if(et){var Yt=typeof et=="function"?et.call(null,gt):et,he=Yt.html,ye=Yt.target,Wt=(0,c._T)(Yt,["html","target"]);lt=xn({},yt.style,Wt),(ye||ye===!1)&&(vt=ye),typeof he=="string"&&(jt=he)}var Oe=lt.position,He=lt.arrowPointAtCenter,Qe=lt.follow,An=lt.offset;if(vt){var Nn=gt,Cn=Nn.clientX,Bn=Nn.clientY,jn=(0,c.CR)(kr(Cn,Bn,vt,Oe,He,Qe),2),or=jn[0],ir=jn[1];yt.showTip(or,ir,{text:jt,position:Oe,offset:An})}else yt.hideTip()},Kt=function(){yt.hideTip()};H.addEventListener("mousemove",Ot),H.addEventListener("mouseleave",Kt),this.map.set(H,[Ot,Kt])}},Q.prototype.unbind=function(H){if(this.map.has(H)){var et=(0,c.CR)(this.map.get(H)||[],2),yt=et[0],Xt=et[1];yt&&H.removeEventListener("mousemove",yt),Xt&&H.removeEventListener("mouseleave",Xt),this.map.delete(H)}},Q.prototype.clear=function(){this.container.innerHTML=""},Q.prototype.destroy=function(){var H=this,et;(0,c.ev)([],(0,c.CR)(this.map.keys()),!1).forEach(function(yt){return H.unbind(yt)}),(et=this.container)===null||et===void 0||et.remove(),$.prototype.destroy.call(this)},Q.prototype.showTip=function(H,et,yt){var Xt=(0,vn.Z)(yt,"text");if(!(Xt&&typeof Xt!="string")&&(this.applyStyles(),H&&et&&yt)){var Ot=yt.offset,Kt=yt.position;if(Kt&&this.container.setAttribute("data-position",Kt),this.setOffsetPosition(H,et,Ot),typeof Xt=="string"){var gt=this.container.querySelector(".".concat(me.TEXT));gt&&(gt.innerHTML=Xt)}this.visibility="visible",this.container.style.visibility="visible"}},Q.prototype.hideTip=function(){this.visibility="hidden",this.container.style.visibility="hidden"},Q.prototype.getContainer=function(){return this.container},Q.prototype.getClassName=function(){var H=this.style.containerClassName;return"".concat(me.CONTAINER).concat(H?" ".concat(H):"")},Q.prototype.initShape=function(){var H=this,et=this.style.id;this.container=yi(et),this.container.className=this.getClassName(),this.container.addEventListener("mousemove",function(){return H.showTip()}),this.container.addEventListener("mouseleave",function(){return H.hideTip()})},Q.prototype.updatePoptipElement=function(){var H=this.container;this.clear();var et=this.style,yt=et.id,Xt=et.template,Ot=et.text;this.container.setAttribute("id",yt),this.container.className=this.getClassName();var Kt='<span class="'.concat(me.ARROW,'"></span>');H.innerHTML=Kt,(0,ve.Z)(Xt)?H.innerHTML+=Xt:Xt&&Qn(Xt)&&H.appendChild(Xt),Ot&&(H.getElementsByClassName(me.TEXT)[0].textContent=Ot),this.applyStyles(),this.container.style.visibility=this.visibility},Q.prototype.applyStyles=function(){var H=(0,Ce.n)({},pr,this.style.domStyles),et=Object.entries(H).reduce(function(Xt,Ot){var Kt=(0,c.CR)(Ot,2),gt=Kt[0],vt=Kt[1],lt=Object.entries(vt).reduce(function(jt,Yt){var he=(0,c.CR)(Yt,2),ye=he[0],Wt=he[1];return"".concat(jt).concat(ye,": ").concat(Wt,";")},"");return"".concat(Xt).concat(gt,"{").concat(lt,"}")},"");if(this.domStyles!==et){this.domStyles=et;var yt=this.container.querySelector("style");yt&&this.container.removeChild(yt),yt=document.createElement("style"),yt.innerHTML=et,this.container.appendChild(yt)}},Q.prototype.setOffsetPosition=function(H,et,yt){yt===void 0&&(yt=this.style.offset);var Xt=(0,c.CR)(yt,2),Ot=Xt[0],Kt=Ot===void 0?0:Ot,gt=Xt[1],vt=gt===void 0?0:gt;this.container.style.left="".concat(H+Kt,"px"),this.container.style.top="".concat(et+vt,"px")},Q.tag="poptip",Q.defaultOptions={style:{x:0,y:0,width:0,height:0,target:null,visibility:"hidden",text:"",position:"top",follow:!1,offset:[0,0],domStyles:pr,template:'<div class="'.concat(me.TEXT,'"></div>')}},Q}(_.w),Ur=(0,M.A)({layout:"flex",markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label",valueGroup:"value-group",focusGroup:"focus-group",focus:"focus",value:"value",backgroundGroup:"background-group",background:"background"},"legend-category-item"),ki={offset:[0,20],domStyles:{".component-poptip":{opacity:"1",padding:"8px 12px",background:"#fff",boxShadow:"0 2px 8px rgba(0, 0, 0, 0.15)"},".component-poptip-arrow":{display:"none"},".component-poptip-text":{color:"#000",lineHeight:"20px"}}};function la($){var Q=$.querySelector(Ur.marker.class);return Q?Q.style:{}}var Oi=function($){(0,c.ZT)(Q,$);function Q(H,et){var yt=$.call(this,H,{span:[1,1],marker:function(){return new I.Cd({style:{r:6}})},markerSize:10,labelFill:"#646464",valueFill:"#646464",labelFontSize:12,valueFontSize:12,labelTextBaseline:"middle",valueTextBaseline:"middle"})||this;return yt.keyFields={},yt.keyFields=et||{},yt}return Object.defineProperty(Q.prototype,"showValue",{get:function(){var H=this.attributes.valueText;return H?typeof H=="string"||typeof H=="number"?H!=="":typeof H=="function"?!0:H.attr("text")!=="":!1},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"actualSpace",{get:function(){var H=this.labelGroup,et=this.valueGroup,yt=this.attributes,Xt=yt.markerSize,Ot=yt.focus,Kt=yt.focusMarkerSize,gt=H.node().getBBox(),vt=gt.width,lt=gt.height,jt=et.node().getBBox(),Yt=jt.width,he=jt.height,ye=Ot?Kt!=null?Kt:12:0;return{markerWidth:Xt,labelWidth:vt,valueWidth:Yt,focusWidth:ye,height:Math.max(Xt,lt,he)}},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"span",{get:function(){var H=this.attributes.span;if(!H)return[1,1];var et=(0,c.CR)((0,D.j)(H),2),yt=et[0],Xt=et[1],Ot=this.showValue?Xt:0,Kt=yt+Ot;return[yt/Kt,Ot/Kt]},enumerable:!1,configurable:!0}),Q.prototype.setAttribute=function(H,et){$.prototype.setAttribute.call(this,H,et)},Object.defineProperty(Q.prototype,"shape",{get:function(){var H,et=this.attributes,yt=et.markerSize,Xt=et.width,Ot=this.actualSpace,Kt=Ot.markerWidth,gt=Ot.focusWidth,vt=Ot.height,lt=this.actualSpace,jt=lt.labelWidth,Yt=lt.valueWidth,he=(0,c.CR)(this.spacing,3),ye=he[0],Wt=he[1],Oe=he[2];if(Xt){var He=Xt-yt-ye-Wt-gt-Oe,Qe=(0,c.CR)(this.span,2),An=Qe[0],Nn=Qe[1];H=(0,c.CR)([An*He,Nn*He],2),jt=H[0],Yt=H[1]}var Cn=Kt+jt+Yt+ye+Wt+gt+Oe;return{width:Cn,height:vt,markerWidth:Kt,labelWidth:jt,valueWidth:Yt,focusWidth:gt}},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"spacing",{get:function(){var H=this.attributes,et=H.spacing,yt=H.focus;if(!et)return[0,0,0];var Xt=(0,c.CR)((0,D.j)(et),3),Ot=Xt[0],Kt=Xt[1],gt=Xt[2];return[Ot,this.showValue?Kt:0,yt?gt:0]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"layout",{get:function(){var H=this.shape,et=H.markerWidth,yt=H.labelWidth,Xt=H.valueWidth,Ot=H.focusWidth,Kt=H.width,gt=H.height,vt=(0,c.CR)(this.spacing,3),lt=vt[0],jt=vt[1],Yt=vt[2];return{height:gt,width:Kt,markerWidth:et,labelWidth:yt,valueWidth:Xt,focusWidth:Ot,position:[et/2,et+lt,et+yt+lt+jt,et+yt+Xt+lt+jt+Yt+Ot/2]}},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"scaleSize",{get:function(){var H=la(this.markerGroup.node()),et=this.attributes,yt=et.markerSize,Xt=et.markerStrokeWidth,Ot=Xt===void 0?H.strokeWidth:Xt,Kt=et.markerLineWidth,gt=Kt===void 0?H.lineWidth:Kt,vt=et.markerStroke,lt=vt===void 0?H.stroke:vt,jt=+(Ot||gt||(lt?1:0))*Math.sqrt(2),Yt=this.markerGroup.node().getBBox(),he=Yt.width,ye=Yt.height;return(1-jt/Math.max(he,ye))*yt},enumerable:!1,configurable:!0}),Q.prototype.renderMarker=function(H){var et=this,yt=this.attributes,Xt=yt.marker,Ot=yt.classNamePrefix,Kt=(0,z.zs)(this.attributes,"marker");this.markerGroup=H.maybeAppendByClassName(Ur.markerGroup,"g").style("zIndex",0),(0,A.z)(!!Xt,this.markerGroup,function(){var gt,vt=et.markerGroup.node(),lt=(gt=vt.childNodes)===null||gt===void 0?void 0:gt[0],jt=L(Ur.marker.name,rt.marker,Ot),Yt=typeof Xt=="string"?new Ne({style:{symbol:Xt},className:jt}):Xt();if(lt)if(Yt.nodeName===lt.nodeName)lt instanceof Ne?lt.update((0,c.pi)((0,c.pi)({},Kt),{symbol:Xt})):((0,te.DM)(lt,Yt),(0,S.Ys)(lt).styles(Kt));else{if(lt.remove(),!(Yt instanceof Ne)){var ye=L(Ur.marker.name,rt.marker,Ot);Yt.className=ye}(0,S.Ys)(Yt).styles(Kt),vt.appendChild(Yt)}else{if(!(Yt instanceof Ne)){var he=L(Ur.marker.name,rt.marker,Ot);Yt.className=he,(0,S.Ys)(Yt).styles(Kt)}vt.appendChild(Yt)}et.markerGroup.node().scale(1/et.markerGroup.node().getScale()[0]);var Wt=(0,Xe.b)(et.markerGroup.node(),et.scaleSize,!0);et.markerGroup.node().style._transform="scale(".concat(Wt,")")})},Q.prototype.renderLabel=function(H){var et=(0,z.zs)(this.attributes,"label"),yt=et.text,Xt=(0,c._T)(et,["text"]),Ot=this.attributes.classNamePrefix;this.labelGroup=H.maybeAppendByClassName(Ur.labelGroup,"g").style("zIndex",0);var Kt=L(Ur.label.name,rt.label,Ot),gt=this.labelGroup.maybeAppendByClassName(Ur.label,function(){return(0,ke.S)(yt)});gt.node().setAttribute("class",Kt),gt.styles(Xt)},Q.prototype.renderValue=function(H){var et=this,yt=(0,z.zs)(this.attributes,"value"),Xt=yt.text,Ot=(0,c._T)(yt,["text"]),Kt=this.attributes.classNamePrefix;this.valueGroup=H.maybeAppendByClassName(Ur.valueGroup,"g").style("zIndex",0),(0,A.z)(this.showValue,this.valueGroup,function(){var gt=L(Ur.value.name,rt.value,Kt),vt=et.valueGroup.maybeAppendByClassName(Ur.value,function(){return(0,ke.S)(Xt)});vt.node().setAttribute("class",gt),vt.styles(Ot)})},Q.prototype.createPoptip=function(){var H=this.attributes.poptip,et=H||{},yt=et.render,Xt=(0,c._T)(et,["render"]),Ot=new ui({style:(0,Ce.n)(ki,Xt)});return this.poptipGroup=Ot,Ot},Q.prototype.bindPoptip=function(H){var et=this,yt=this.attributes.poptip;if(yt){var Xt=this.poptipGroup||this.createPoptip();Xt.bind(H,function(){var Ot=et.attributes,Kt=Ot.labelText,gt=Ot.valueText,vt=Ot.markerFill,lt=typeof Kt=="string"?Kt:Kt==null?void 0:Kt.attr("text"),jt=typeof gt=="string"?gt:gt==null?void 0:gt.attr("text");if(typeof yt.render=="function")return{html:yt.render((0,c.pi)((0,c.pi)({},et.keyFields),{label:lt,value:jt,color:vt}))};var Yt="";return(typeof lt=="string"||typeof lt=="number")&&(Yt+='<div class="component-poptip-label">'.concat(lt,"</div>")),(typeof jt=="string"||typeof jt=="number")&&(Yt+='<div class="component-poptip-value">'.concat(jt,"</div>")),{html:Yt}})}},Q.prototype.renderFocus=function(H){var et=this,yt=this.attributes,Xt=yt.focus,Ot=yt.focusMarkerSize,Kt=yt.classNamePrefix,gt={x:0,y:0,size:Ot,opacity:.6,symbol:"focus",stroke:"#aaaaaa",lineWidth:1};(0,se.Z)(Xt)||(this.focusGroup=H.maybeAppendByClassName(Ur.focusGroup,"g").style("zIndex",0),(0,A.z)(Xt,this.focusGroup,function(){var vt=L(Ur.focus.name,rt.focusIcon,Kt),lt=new Ne({style:(0,c.pi)((0,c.pi)({},gt),{symbol:"focus"}),className:vt}),jt=new I.Cd({style:{r:gt.size/2,fill:"transparent"}}),Yt=et.focusGroup.node();Yt.appendChild(jt),Yt.appendChild(lt),lt.update({opacity:0}),H.node().addEventListener("pointerenter",function(){lt.update({opacity:1})}),H.node().addEventListener("pointerleave",function(){lt.update({opacity:0})})}))},Q.prototype.renderPoptip=function(H){var et=this,yt=this.attributes.poptip;if(yt){var Xt=H.maybeAppendByClassName(Ur.value,"g").node(),Ot=H.maybeAppendByClassName(Ur.label,"g").node();[Xt,Ot].forEach(function(Kt){Kt&&et.bindPoptip(Kt)})}},Q.prototype.renderBackground=function(H){var et=this.shape,yt=et.width,Xt=et.height,Ot=(0,z.zs)(this.attributes,"background");this.background=H.maybeAppendByClassName(Ur.backgroundGroup,"g").style("zIndex",-1);var Kt=this.background.maybeAppendByClassName(Ur.background,"rect");Kt.styles((0,c.pi)({width:yt,height:Xt},Ot));var gt=this.attributes.classNamePrefix,vt=gt===void 0?"":gt;if(vt){var lt=L(Ur.background.name,rt.background,vt);Kt.node().setAttribute("class",lt)}},Q.prototype.adjustLayout=function(){var H=this.layout,et=H.labelWidth,yt=H.valueWidth,Xt=H.height,Ot=(0,c.CR)(H.position,4),Kt=Ot[0],gt=Ot[1],vt=Ot[2],lt=Ot[3],jt=Xt/2;this.markerGroup.styles({transform:"translate(".concat(Kt,", ").concat(jt,")").concat(this.markerGroup.node().style._transform)}),this.labelGroup.styles({transform:"translate(".concat(gt,", ").concat(jt,")")}),this.focusGroup&&this.focusGroup.styles({transform:"translate(".concat(lt,", ").concat(jt,")")}),(0,Ye.O)(this.labelGroup.select(Ur.label.class).node(),Math.ceil(et)),this.showValue&&(this.valueGroup.styles({transform:"translate(".concat(vt,", ").concat(jt,")")}),(0,Ye.O)(this.valueGroup.select(Ur.value.class).node(),Math.ceil(yt)))},Q.prototype.render=function(H,et){var yt=(0,S.Ys)(et),Xt=H.x,Ot=Xt===void 0?0:Xt,Kt=H.y,gt=Kt===void 0?0:Kt;yt.styles({transform:"translate(".concat(Ot,", ").concat(gt,")")}),this.renderMarker(yt),this.renderLabel(yt),this.renderValue(yt),this.renderBackground(yt),this.renderPoptip(yt),this.renderFocus(yt),this.adjustLayout()},Q}(_.w),Zr=(0,M.A)({page:"item-page",navigator:"navigator",item:"item"},"items"),qn=function($,Q,H){return H===void 0&&(H=!0),$?Q($):H},Ti=function($){(0,c.ZT)(Q,$);function Q(H){var et=$.call(this,H,{data:[],gridRow:1/0,gridCol:void 0,padding:0,width:1e3,height:100,rowPadding:0,colPadding:0,layout:"flex",orientation:"horizontal",click:Tt,mouseenter:Tt,mouseleave:Tt})||this;return et.navigatorShape=[0,0],et}return Object.defineProperty(Q.prototype,"pageViews",{get:function(){return this.navigator.getContainer()},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"grid",{get:function(){var H=this.attributes,et=H.gridRow,yt=H.gridCol,Xt=H.data;if(!et&&!yt)throw new Error("gridRow and gridCol can not be set null at the same time");return et&&yt?[et,yt]:et?[et,Xt.length]:[Xt.length,yt]},enumerable:!1,configurable:!0}),Object.defineProperty(Q.prototype,"renderData",{get:function(){var H=this.attributes,et=H.data,yt=H.layout,Xt=H.poptip,Ot=H.focus,Kt=H.focusMarkerSize,gt=H.classNamePrefix,vt=(0,z.zs)(this.attributes,"item"),lt=et.map(function(jt,Yt){var he=jt.id,ye=he===void 0?Yt:he,Wt=jt.label,Oe=jt.value;return{id:"".concat(ye),index:Yt,style:(0,c.pi)({layout:yt,labelText:Wt,valueText:Oe,poptip:Xt,focus:Ot,focusMarkerSize:Kt,classNamePrefix:gt},Object.fromEntries(Object.entries(vt).map(function(He){var Qe=(0,c.CR)(He,2),An=Qe[0],Nn=Qe[1];return[An,(0,fe.S)(Nn,[jt,Yt,et])]})))}});return lt},enumerable:!1,configurable:!0}),Q.prototype.getGridLayout=function(){var H=this,et=this.attributes,yt=et.orientation,Xt=et.width,Ot=et.rowPadding,Kt=et.colPadding,gt=(0,c.CR)(this.navigatorShape,1),vt=gt[0],lt=(0,c.CR)(this.grid,2),jt=lt[0],Yt=lt[1],he=Yt*jt,ye=0;return this.pageViews.children.map(function(Wt,Oe){var He,Qe,An=Math.floor(Oe/he),Nn=Oe%he,Cn=H.ifHorizontal(Yt,jt),Bn=[Math.floor(Nn/Cn),Nn%Cn];yt==="vertical"&&Bn.reverse();var jn=(0,c.CR)(Bn,2),or=jn[0],ir=jn[1],lr=(Xt-vt-(Yt-1)*Kt)/Yt,Vn=Wt.getBBox().height,nr=(0,c.CR)([0,0],2),Or=nr[0],Kr=nr[1];return yt==="horizontal"?(He=(0,c.CR)([ye,or*(Vn+Ot)],2),Or=He[0],Kr=He[1],ye=ir===Yt-1?0:ye+lr+Kt):(Qe=(0,c.CR)([ir*(lr+Kt),ye],2),Or=Qe[0],Kr=Qe[1],ye=or===jt-1?0:ye+Vn+Ot),{page:An,index:Oe,row:or,col:ir,pageIndex:Nn,width:lr,height:Vn,x:Or,y:Kr}})},Q.prototype.getFlexLayout=function(){var H=this.attributes,et=H.width,yt=H.height,Xt=H.rowPadding,Ot=H.colPadding,Kt=(0,c.CR)(this.navigatorShape,1),gt=Kt[0],vt=(0,c.CR)(this.grid,2),lt=vt[0],jt=vt[1],Yt=(0,c.CR)([et-gt,yt],2),he=Yt[0],ye=Yt[1],Wt=(0,c.CR)([0,0,0,0,0,0,0,0],8),Oe=Wt[0],He=Wt[1],Qe=Wt[2],An=Wt[3],Nn=Wt[4],Cn=Wt[5],Bn=Wt[6],jn=Wt[7];return this.pageViews.children.map(function(or,ir){var lr,Vn,nr,Or,Kr=or.getBBox(),Wr=Kr.width,dr=Kr.height,Fr=Bn===0?0:Ot,xi=Bn+Fr+Wr;if(xi<=he&&qn(Nn,function(pi){return pi<jt}))return lr=(0,c.CR)([Bn+Fr,jn,xi],3),Oe=lr[0],He=lr[1],Bn=lr[2],{width:Wr,height:dr,x:Oe,y:He,page:Qe,index:ir,pageIndex:An++,row:Cn,col:Nn++};Vn=(0,c.CR)([Cn+1,0,0,jn+dr+Xt],4),Cn=Vn[0],Nn=Vn[1],Bn=Vn[2],jn=Vn[3];var $r=jn+dr;return $r<=ye&&qn(Cn,function(pi){return pi<lt})?(nr=(0,c.CR)([Bn,jn,Wr],3),Oe=nr[0],He=nr[1],Bn=nr[2],{width:Wr,height:dr,x:Oe,y:He,page:Qe,index:ir,pageIndex:An++,row:Cn,col:Nn++}):(Or=(0,c.CR)([0,0,Wr,0,Qe+1,0,0,0],8),Oe=Or[0],He=Or[1],Bn=Or[2],jn=Or[3],Qe=Or[4],An=Or[5],Cn=Or[6],Nn=Or[7],{width:Wr,height:dr,x:Oe,y:He,page:Qe,index:ir,pageIndex:An++,row:Cn,col:Nn++})})},Object.defineProperty(Q.prototype,"itemsLayout",{get:function(){this.navigatorShape=[0,0];var H=this.attributes.layout==="grid"?this.getGridLayout:this.getFlexLayout,et=H.call(this);return et.slice(-1)[0].page>0?(this.navigatorShape=[55,0],H.call(this)):et},enumerable:!1,configurable:!0}),Q.prototype.ifHorizontal=function(H,et){var yt=this.attributes.orientation;return qt(yt,H,et)},Q.prototype.flattenPage=function(H){H.querySelectorAll(Zr.item.class).forEach(function(et){H.appendChild(et)}),H.querySelectorAll(Zr.page.class).forEach(function(et){var yt=H.removeChild(et);yt.destroy()})},Q.prototype.renderItems=function(H){var et=this.attributes,yt=et.click,Xt=et.mouseenter,Ot=et.mouseleave,Kt=et.classNamePrefix;this.flattenPage(H);var gt=this.dispatchCustomEvent.bind(this),vt=L(Zr.item.name,rt.item,Kt);(0,S.Ys)(H).selectAll(Zr.item.class).data(this.renderData,function(lt){return lt.id}).join(function(lt){return lt.append(function(jt){var Yt=jt.style,he=(0,c._T)(jt,["style"]);return new Oi({style:Yt},he)}).attr("className",vt).on("click",function(){yt==null||yt(this),gt("itemClick",{item:this})}).on("pointerenter",function(){Xt==null||Xt(this),gt("itemMouseenter",{item:this})}).on("pointerleave",function(){Ot==null||Ot(this),gt("itemMouseleave",{item:this})})},function(lt){return lt.each(function(jt){var Yt=jt.style;this.update(Yt)})},function(lt){return lt.remove()})},Q.prototype.relayoutNavigator=function(){var H,et=this.attributes,yt=et.layout,Xt=et.width,Ot=((H=this.pageViews.children[0])===null||H===void 0?void 0:H.getBBox().height)||0,Kt=(0,c.CR)(this.navigatorShape,2),gt=Kt[0],vt=Kt[1];this.navigator.update(yt==="grid"?{pageWidth:Xt-gt,pageHeight:Ot-vt}:{})},Q.prototype.adjustLayout=function(){var H=this,et=Object.entries(ue(this.itemsLayout,"page")).map(function(Xt){var Ot=(0,c.CR)(Xt,2),Kt=Ot[0],gt=Ot[1];return{page:Kt,layouts:gt}}),yt=(0,c.ev)([],(0,c.CR)(this.navigator.getContainer().children),!1);et.forEach(function(Xt){var Ot=Xt.layouts,Kt=H.pageViews.appendChild(new I.ZA({className:Zr.page.name}));Ot.forEach(function(gt){var vt=gt.x,lt=gt.y,jt=gt.index,Yt=gt.width,he=gt.height,ye=yt[jt];Kt.appendChild(ye),(0,Vt.Z)(ye,"__layout__",gt),ye.update({x:vt,y:lt,width:Yt,height:he})})}),this.relayoutNavigator()},Q.prototype.renderNavigator=function(H){var et=this.attributes,yt=et.orientation,Xt=et.classNamePrefix,Ot=(0,z.zs)(this.attributes,"nav"),Kt=(0,Ce.n)({orientation:yt,classNamePrefix:Xt},Ot),gt=this;return H.selectAll(Zr.navigator.class).data(["nav"]).join(function(vt){return vt.append(function(){return new Me({style:Kt})}).attr("className",Zr.navigator.name).each(function(){gt.navigator=this})},function(vt){return vt.each(function(){this.update(Kt)})},function(vt){return vt.remove()}),this.navigator},Q.prototype.getBBox=function(){return this.navigator.getBBox()},Q.prototype.render=function(H,et){var yt=this.attributes.data;if(!(!yt||yt.length===0)){var Xt=this.renderNavigator((0,S.Ys)(et));this.renderItems(Xt.getContainer()),this.adjustLayout()}},Q.prototype.dispatchCustomEvent=function(H,et){var yt=new I.Aw(H,{detail:et});this.dispatchEvent(yt)},Q}(_.w),Nt=(0,M.A)({markerGroup:"marker-group",marker:"marker",labelGroup:"label-group",label:"label"},"handle"),E={showLabel:!0,formatter:function($){return $.toString()},markerSize:25,markerStroke:"#c5c5c5",markerFill:"#fff",markerLineWidth:1,labelFontSize:12,labelFill:"#c5c5c5",labelText:"",orientation:"vertical",spacing:0},b=function($){(0,c.ZT)(Q,$);function Q(H){return $.call(this,H,E)||this}return Q.prototype.render=function(H,et){var yt=(0,S.Ys)(et).maybeAppendByClassName(Nt.markerGroup,"g");this.renderMarker(yt);var Xt=(0,S.Ys)(et).maybeAppendByClassName(Nt.labelGroup,"g");this.renderLabel(Xt)},Q.prototype.renderMarker=function(H){var et=this,yt=this.attributes,Xt=yt.orientation,Ot=yt.classNamePrefix,Kt=yt.markerSymbol,gt=Kt===void 0?qt(Xt,"horizontalHandle","verticalHandle"):Kt;(0,A.z)(!!gt,H,function(vt){var lt=(0,z.zs)(et.attributes,"marker"),jt=(0,c.pi)({symbol:gt},lt),Yt=L(Nt.marker.name,rt.handleMarker,Ot);if(et.marker=vt.maybeAppendByClassName(Nt.marker,function(){return new Ne({style:jt,className:Yt})}).update(jt),Ot){var he=et.marker.node().querySelector(".marker");if(he){var ye=he.getAttribute("class")||"",Wt=ye.split(" ")[0],Oe=L(Wt,rt.handleMarker,Ot);he.setAttribute("class",Oe)}}})},Q.prototype.renderLabel=function(H){var et=this,yt=this.attributes,Xt=yt.showLabel,Ot=yt.orientation,Kt=yt.spacing,gt=Kt===void 0?0:Kt,vt=yt.formatter,lt=yt.classNamePrefix;(0,A.z)(Xt,H,function(jt){var Yt,he=(0,z.zs)(et.attributes,"label"),ye=he.text,Wt=(0,c._T)(he,["text"]),Oe=((Yt=jt.select(Nt.marker.class))===null||Yt===void 0?void 0:Yt.node().getBBox())||{},He=Oe.width,Qe=He===void 0?0:He,An=Oe.height,Nn=An===void 0?0:An,Cn=(0,c.CR)(qt(Ot,[0,Nn+gt,"center","top"],[Qe+gt,0,"start","middle"]),4),Bn=Cn[0],jn=Cn[1],or=Cn[2],ir=Cn[3],lr=L(Nt.label.name,rt.handleLabel,lt);jt.maybeAppendByClassName(Nt.label,"text").attr("className",lr).styles((0,c.pi)((0,c.pi)({},Wt),{x:Bn,y:jn,text:vt(ye).toString(),textAlign:or,textBaseline:ir}))})},Q}(_.w),h={showTitle:!0,padding:0,orientation:"horizontal",backgroundFill:"transparent",titleText:"",titleSpacing:4,titlePosition:"top-left",titleFill:"#2C3542",titleFontWeight:"bold",titleFontFamily:"sans-serif",titleFontSize:12},v=(0,Ce.n)({},h,{}),w=(0,Ce.n)({},h,(0,z.dq)(E,"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"}),Y=.01,K=.5,it=(0,M.A)({title:"title",html:"html",titleGroup:"title-group",items:"items",itemsGroup:"items-group",contentGroup:"content-group",ribbonGroup:"ribbon-group",ribbon:"ribbon",handlesGroup:"handles-group",handle:"handle",startHandle:"start-handle",endHandle:"end-handle",labelGroup:"label-group",label:"label",indicator:"indicator"},"legend"),ht=function($){(0,c.ZT)(Q,$);function Q(){return $!==null&&$.apply(this,arguments)||this}return Q.prototype.update=function(H){this.attr(H)},Q}(I.k9),Zt=function($){(0,c.ZT)(Q,$);function Q(H){return $.call(this,H,v)||this}return Q.prototype.renderTitle=function(H,et,yt){var Xt=this.attributes,Ot=Xt.showTitle,Kt=Xt.titleText,gt=Xt.classNamePrefix,vt=(0,z.zs)(this.attributes,"title"),lt=(0,c.CR)((0,z.Hm)(vt),2),jt=lt[0],Yt=lt[1];this.titleGroup=H.maybeAppendByClassName(it.titleGroup,"g").styles(Yt);var he=(0,c.pi)((0,c.pi)({width:et,height:yt},jt),{text:Ot?Kt:"",classNamePrefix:gt});this.title=this.titleGroup.maybeAppendByClassName(it.title,function(){return new Rt({style:he})}).update(he)},Q.prototype.renderCustom=function(H){var et=this.attributes.data,yt={innerHTML:this.attributes.render(et),pointerEvents:"auto"};H.maybeAppendByClassName(it.html,function(){return new ht({className:it.html.name,style:yt})}).update(yt)},Q.prototype.renderItems=function(H,et){var yt=et.x,Xt=et.y,Ot=et.width,Kt=et.height,gt=(0,z.zs)(this.attributes,"title",!0),vt=(0,c.CR)((0,z.Hm)(gt),2),lt=vt[0],jt=vt[1],Yt=(0,c.pi)((0,c.pi)({},lt),{width:Ot,height:Kt,x:0,y:0});this.itemsGroup=H.maybeAppendByClassName(it.itemsGroup,"g").styles((0,c.pi)((0,c.pi)({},jt),{transform:"translate(".concat(yt,", ").concat(Xt,")")}));var he=this;this.itemsGroup.selectAll(it.items.class).data(["items"]).join(function(ye){return ye.append(function(){return new Ti({style:Yt})}).attr("className",it.items.name).each(function(){he.items=(0,S.Ys)(this)})},function(ye){return ye.update(Yt)},function(ye){return ye.remove()})},Q.prototype.adjustLayout=function(){var H=this.attributes.showTitle;if(H){var et=this.title.node().getAvailableSpace(),yt=et.x,Xt=et.y;this.itemsGroup.node().style.transform="translate(".concat(yt,", ").concat(Xt,")")}},Object.defineProperty(Q.prototype,"availableSpace",{get:function(){var H=this.attributes,et=H.showTitle,yt=H.width,Xt=H.height;return et?this.title.node().getAvailableSpace():new R.b(0,0,yt,Xt)},enumerable:!1,configurable:!0}),Q.prototype.getBBox=function(){var H,et,yt=(H=this.title)===null||H===void 0?void 0:H.node(),Xt=(et=this.items)===null||et===void 0?void 0:et.node();return!yt||!Xt?$.prototype.getBBox.call(this):kt(yt,Xt)},Q.prototype.render=function(H,et){var yt=this.attributes,Xt=yt.width,Ot=yt.height,Kt=yt.x,gt=Kt===void 0?0:Kt,vt=yt.y,lt=vt===void 0?0:vt,jt=yt.classNamePrefix,Yt=yt.render,he=(0,S.Ys)(et),ye=et.className||"legend-category";jt?et.attr("className","".concat(ye," ").concat(jt,"legend")):et.className||et.attr("className","legend-category"),et.style.transform="translate(".concat(gt,", ").concat(lt,")"),Yt?this.renderCustom(he):(this.renderTitle(he,Xt,Ot),this.renderItems(he,this.availableSpace),this.adjustLayout())},Q}(_.w)},91498:function(bt,Et,y){"use strict";y.d(Et,{s:function(){return _r}});var c=y(80813),_=y(70208),I=y(97304),z=y(14675),S=y(99247),R=y(17911),M=y(88839),N=null,D=null;function A(j){return j instanceof Date?j:new Date(j)}function L(j){for(var B=__read(j,2),P=B[0],k=B[1],U=N.indexOf(P),at=N.indexOf(k),ut="",ct=U;ct<=at;ct+=1)if(ut+=D[ct],ct<at){var pt="-";ct===2?pt=" ":ct>2&&(pt=":"),ut+=pt}return ut}function F(j,B){var P={YYYY:j.getFullYear(),MM:j.getMonth()+1,DD:j.getDate(),HH:j.getHours(),mm:j.getMinutes(),ss:j.getSeconds()},k=B;return Object.keys(P).forEach(function(U){var at=P[U];k=k.replace(U,U==="YYYY"?"".concat(at):"".concat(at).padStart(2,"0"))}),k}function rt(j,B){return A(j).getTime()-A(B).getTime()}function G(j,B){var P=__read([A(j),A(B)],2),k=P[0],U=P[1];return k.getFullYear()!==U.getFullYear()?"year":k.getMonth()!==U.getMonth()?"month":k.getDay()!==U.getDay()?"day":k.getHours()!==U.getHours()?"hour":k.getMinutes()!==U.getMinutes()?"minute":"second"}function kt(j,B){var P=new Date(j),k={year:function(U){U.setMonth(0),U.setHours(0,0,0,0)},month:function(U){U.setDate(1),U.setHours(0,0,0,0)},day:function(U){return U.setHours(0,0,0,0)},hour:function(U){return U.setMinutes(0,0,0)},minute:function(U){return U.setSeconds(0,0)},second:function(U){return U.setMilliseconds(0)}};return k[B](P),F(P,L(["year",B]))}var ft=y(86314),J=y(67756);function Rt(j,B){if(j.length<=B)return j;for(var P=Math.floor(j.length/B),k=[],U=0;U<j.length;U+=P)k.push(j[U]);return k}var Tt=y(38974),Vt=y(23343),fe=y(58688),ue={gridGroup:"grid-group",mainGroup:"main-group",lineGroup:"line-group",tickGroup:"tick-group",labelGroup:"label-group",titleGroup:"title-group",grid:"grid",line:"line",lineFirst:"line-first",lineSecond:"line-second",tick:"tick",tickItem:"tick-item",label:"label",labelItem:"label-item",title:"title"},Ce={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 z.y$({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:[]},be=(0,Vt.Z)({},Ce,{style:{type:"arc"}}),we=(0,Vt.Z)({},Ce,{style:{}}),ne=(0,fe.A)({mainGroup:ue.mainGroup,gridGroup:ue.gridGroup,grid:ue.grid,lineGroup:ue.lineGroup,line:ue.line,tickGroup:ue.tickGroup,tick:ue.tick,tickItem:ue.tickItem,labelGroup:ue.labelGroup,label:ue.label,labelItem:ue.labelItem,titleGroup:ue.titleGroup,title:ue.title,lineFirst:ue.lineFirst,lineSecond:ue.lineSecond},"axis"),We=y(71018);function rn(j,B){return[j[0]*B,j[1]*B]}function Xe(j,B){return[j[0]+B[0],j[1]+B[1]]}function pn(j,B){return[j[0]-B[0],j[1]-B[1]]}function Tn(j,B){return[Math.min(j[0],B[0]),Math.min(j[1],B[1])]}function $e(j,B){return[Math.max(j[0],B[0]),Math.max(j[1],B[1])]}function mn(j,B){return Math.sqrt(Math.pow(j[0]-B[0],2)+Math.pow(j[1]-B[1],2))}function It(j){if(j[0]===0&&j[1]===0)return[0,0];var B=Math.sqrt(Math.pow(j[0],2)+Math.pow(j[1],2));return[j[0]/B,j[1]/B]}function Ee(j,B,P){var k=__read(j,2),U=k[0],at=k[1],ut=__read(B,2),ct=ut[0],pt=ut[1],Bt=U-ct,ae=at-pt,pe=Math.sin(P),Te=Math.cos(P);return[Bt*Te-ae*pe+ct,Bt*pe+ae*Te+pt]}function cn(j,B){return B?[j[1],-j[0]]:[-j[1],j[0]]}function sn(j){return j*Math.PI/180}function Pe(j){return Number((j*180/Math.PI).toPrecision(5))}var ze=y(38242);function Ke(j,B){return j.style.opacity||(j.style.opacity=1),(0,ft.eR)(j,{opacity:0},B)}var le=["$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 Ae(j){return le.includes(j)}function Pt(j){var B={};for(var P in j)Ae(P)&&(B[P]=j[P]);return B}var wt=(0,fe.A)({lineGroup:"line-group",line:"line",regionGroup:"region-group",region:"region"},"grid");function de(j){return j.reduce(function(B,P,k){return B.push((0,c.ev)([k===0?"M":"L"],(0,c.CR)(P),!1)),B},[])}function je(j,B,P){var k=B.connect,U=k===void 0?"line":k,at=B.center;if(U==="line")return de(j);if(!at)return[];var ut=mn(j[0],at),ct=P?0:1;return j.reduce(function(pt,Bt,ae){return ae===0?pt.push((0,c.ev)(["M"],(0,c.CR)(Bt),!1)):pt.push((0,c.ev)(["A",ut,ut,0,0,ct],(0,c.CR)(Bt),!1)),pt},[])}function Re(j,B,P){return B.type==="surround"?je(j,B,P):de(j)}function ce(j,B,P){var k=P.type,U=P.connect,at=P.center,ut=P.closed,ct=ut?[["Z"]]:[],pt=(0,c.CR)([Re(j,P),Re(B.slice().reverse(),P,!0)],2),Bt=pt[0],ae=pt[1],pe=(0,c.CR)([j[0],B.slice(-1)[0]],2),Te=pe[0],Fe=pe[1],Ue=function(Rn,wn){return[Bt,Rn,ae,wn,ct].flat()};if(U==="line"||k==="surround")return Ue([(0,c.ev)(["L"],(0,c.CR)(Fe),!1)],[(0,c.ev)(["L"],(0,c.CR)(Te),!1)]);if(!at)throw new Error("Arc grid need to specified center");var fn=(0,c.CR)([mn(Fe,at),mn(Te,at)],2),gn=fn[0],On=fn[1];return Ue([(0,c.ev)(["A",gn,gn,0,0,1],(0,c.CR)(Fe),!1),(0,c.ev)(["L"],(0,c.CR)(Fe),!1)],[(0,c.ev)(["A",On,On,0,0,0],(0,c.CR)(Te),!1),(0,c.ev)(["L"],(0,c.CR)(Te),!1)])}function Le(j,B,P,k){var U=P.animate,at=P.isBillboard,ut=B.map(function(ct,pt){return{id:ct.id||"grid-line-".concat(pt),d:Re(ct.points,P)}});return j.selectAll(wt.line.class).data(ut,function(ct){return ct.id}).join(function(ct){return ct.append("path").each(function(pt,Bt){var ae=(0,ze.S)(Pt((0,c.pi)({d:pt.d},k)),[pt,Bt,ut]);this.attr((0,c.pi)({class:wt.line.name,stroke:"#D9D9D9",lineWidth:1,lineDash:[4,4],isBillboard:at},ae))})},function(ct){return ct.transition(function(pt,Bt){var ae=(0,ze.S)(Pt((0,c.pi)({d:pt.d},k)),[pt,Bt,ut]);return(0,ft.eR)(this,ae,U.update)})},function(ct){return ct.transition(function(){var pt=this,Bt=Ke(this,U.exit);return(0,ft.Yq)(Bt,function(){return pt.remove()}),Bt})}).transitions()}function xe(j,B,P){var k=P.animate,U=P.connect,at=P.areaFill;if(B.length<2||!at||!U)return[];for(var ut=Array.isArray(at)?at:[at,"transparent"],ct=function(Ue){return ut[Ue%ut.length]},pt=[],Bt=0;Bt<B.length-1;Bt++){var ae=(0,c.CR)([B[Bt].points,B[Bt+1].points],2),pe=ae[0],Te=ae[1],Fe=ce(pe,Te,P);pt.push({d:Fe,fill:ct(Bt)})}return j.selectAll(wt.region.class).data(pt,function(Ue,fn){return fn}).join(function(Ue){return Ue.append("path").each(function(fn,gn){var On=(0,ze.S)(fn,[fn,gn,pt]);this.attr(On)}).attr("className",wt.region.name)},function(Ue){return Ue.transition(function(fn,gn){var On=(0,ze.S)(fn,[fn,gn,pt]);return(0,ft.eR)(this,On,k.update)})},function(Ue){return Ue.transition(function(){var fn=this,gn=Ke(this,k.exit);return(0,ft.Yq)(gn,function(){return fn.remove()}),gn})}).transitions()}function Ft(j){var B=j.data,P=B===void 0?[]:B,k=j.closed;return k?P.map(function(U){var at=U.points,ut=(0,c.CR)(at,1),ct=ut[0];return(0,c.pi)((0,c.pi)({},U),{points:(0,c.ev)((0,c.ev)([],(0,c.CR)(at),!1),[ct],!1)})}):P}var re=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return B.prototype.render=function(P,k){var U=P.type,at=P.center,ut=P.areaFill,ct=P.closed,pt=(0,c._T)(P,["type","center","areaFill","closed"]),Bt=Ft(P),ae=(0,Tt.Ys)(k).maybeAppendByClassName(wt.lineGroup,"g"),pe=(0,Tt.Ys)(k).maybeAppendByClassName(wt.regionGroup,"g"),Te=Le(ae,Bt,P,pt),Fe=xe(pe,Bt,P);return(0,c.ev)((0,c.ev)([],(0,c.CR)(Te),!1),(0,c.CR)(Fe),!1)},B}(I.w),Me=y(5759),O=function(j,B){return function(P){return j*(1-P)+B*P}};function st(j,B){var P=B?B.length:0,k=j?Math.min(P,j.length):0;return function(U){var at=new Array(k),ut=new Array(P),ct=0;for(ct=0;ct<k;++ct)at[ct]=$t(j[ct],B[ct]);for(;ct<P;++ct)ut[ct]=B[ct];for(ct=0;ct<k;++ct)ut[ct]=at[ct](U);return ut}}function ve(j,B){j===void 0&&(j={}),B===void 0&&(B={});var P={},k={};return Object.entries(B).forEach(function(U){var at=(0,c.CR)(U,2),ut=at[0],ct=at[1];ut in j?P[ut]=$t(j[ut],ct):k[ut]=ct}),function(U){return Object.entries(P).forEach(function(at){var ut=(0,c.CR)(at,2),ct=ut[0],pt=ut[1];return k[ct]=pt(U)}),k}}function $t(j,B){return typeof j=="number"&&typeof B=="number"?O(j,B):Array.isArray(j)&&Array.isArray(B)?st(j,B):typeof j=="object"&&typeof B=="object"?ve(j,B):function(P){return j}}function Ie(j,B,P,k){if(!k)return j.attr("__keyframe_data__",P),null;var U=k.duration,at=U===void 0?0:U,ut=$t(B,P),ct=Math.ceil(+at/16),pt=new Array(ct).fill(0).map(function(Bt,ae,pe){return{__keyframe_data__:ut(ae/(pe.length-1))}});return j.animate(pt,(0,c.pi)({fill:"both"},k))}var Ne=y(88170),tn=y(99769);function Mt(j,B){var P={},k=Array.isArray(B)?B:[B];for(var U in j)k.includes(U)||(P[U]=j[U]);return P}function q(j,B){return Object.fromEntries(Object.entries(j).map(function(P){var k=(0,c.CR)(P,2),U=k[0],at=k[1];return[U,(0,ze.S)(at,B)]}))}function Ct(j){if(j.type==="linear"){var B=j.startPos,P=j.endPos;return __spreadArray(__spreadArray([],__read(B),!1),__read(P),!1)}var k=j.startAngle,U=j.endAngle,at=j.center,ut=j.radius;return __spreadArray(__spreadArray([k,U],__read(at),!1),[ut],!1)}function Ht(j,B){return B&&(0,We.Z)(B)?j.filter(B):j}function Lt(j,B){var P=B.startAngle,k=B.endAngle;return(k-P)*j+P}function _t(j,B){if(B.type==="linear"){var P=(0,c.CR)(B.startPos,2),k=P[0],U=P[1],at=(0,c.CR)(B.endPos,2),ut=at[0],ct=at[1],pt=(0,c.CR)([ut-k,ct-U],2),Bt=pt[0],ae=pt[1];return It([Bt,ae])}var pe=sn(Lt(j,B));return[-Math.sin(pe),Math.cos(pe)]}function Ut(j,B,P){var k=_t(j,P);return cn(k,B!=="positive")}function qt(j,B){return Ut(j,B.labelDirection,B)}function se(j,B,P){return P?"".concat(j," ").concat(P,"axis-").concat(B):j}function te(j,B,P){var k=j.classNamePrefix,U=k===void 0?"":k;return se(B.name,P,U)}function ke(j,B,P,k){return k&&j.attr("className",se(B.name,P,k)),j}function Ye(j,B){var P=(0,c.CR)(B.startPos,2),k=P[0],U=P[1],at=(0,c.CR)(B.endPos,2),ut=at[0],ct=at[1],pt=(0,c.CR)([ut-k,ct-U],2),Bt=pt[0],ae=pt[1];return[k+Bt*j,U+ae*j]}function Ve(j,B){var P=B.radius,k=(0,c.CR)(B.center,2),U=k[0],at=k[1],ut=sn(Lt(j,B));return[U+P*Math.cos(ut),at+P*Math.sin(ut)]}function on(j,B){return B.type==="linear"?Ye(j,B):Ve(j,B)}function xn(j){return _t(0,j)[1]===0}function vn(j){return _t(0,j)[0]===0}function Qn(j,B){return B-j===360}function Ln(j,B,P,k,U){var at=B-j,ut=(0,c.CR)([U,U],2),ct=ut[0],pt=ut[1],Bt=(0,c.CR)([sn(j),sn(B)],2),ae=Bt[0],pe=Bt[1],Te=function(ai){return[P+U*Math.cos(ai),k+U*Math.sin(ai)]},Fe=(0,c.CR)(Te(ae),2),Ue=Fe[0],fn=Fe[1],gn=(0,c.CR)(Te(pe),2),On=gn[0],Rn=gn[1];if(Qn(j,B)){var wn=(pe+ae)/2,Fn=(0,c.CR)(Te(wn),2),Gn=Fn[0],Xn=Fn[1];return[["M",Ue,fn],["A",ct,pt,0,1,0,Gn,Xn],["A",ct,pt,0,1,0,On,Rn]]}var rr=at>180?1:0,mr=j>B?0:1,Dr=!1;return Dr?"M".concat(P,",").concat(k,",L").concat(Ue,",").concat(fn,",A").concat(ct,",").concat(pt,",0,").concat(rr,",").concat(mr,",").concat(On,",").concat(Rn,",L").concat(P,",").concat(k):"M".concat(Ue,",").concat(fn,",A").concat(ct,",").concat(pt,",0,").concat(rr,",").concat(mr,",").concat(On,",").concat(Rn)}function _n(j){var B=j.attributes,P=B.startAngle,k=B.endAngle,U=B.center,at=B.radius;return(0,c.ev)((0,c.ev)([P,k],(0,c.CR)(U),!1),[at],!1)}function me(j,B,P,k){var U=B.startAngle,at=B.endAngle,ut=B.center,ct=B.radius,pt=B.classNamePrefix;return j.selectAll(ne.line.class).data([{d:Ln.apply(void 0,(0,c.ev)((0,c.ev)([U,at],(0,c.CR)(ut),!1),[ct],!1))}],function(Bt,ae){return ae}).join(function(Bt){var ae=Bt.append("path").attr("className",ne.line.name).styles(B).styles({d:function(pe){return pe.d}});return ke(ae,ne.line,ue.line,pt),ae},function(Bt){return Bt.transition(function(){var ae=this,pe=Ie(this,_n(this),(0,c.ev)((0,c.ev)([U,at],(0,c.CR)(ut),!1),[ct],!1),k.update);if(pe){var Te=function(){var Fe=(0,Me.Z)(ae.attributes,"__keyframe_data__");ae.style.d=Ln.apply(void 0,(0,c.ev)([],(0,c.CR)(Fe),!1))};pe.onframe=Te,pe.onfinish=Te}return pe}).styles(B)},function(Bt){return Bt.remove()}).styles(P).transitions()}function pr(j,B){var P=B.truncRange,k=B.truncShape,U=B.lineExtension}function Zn(j,B,P){P===void 0&&(P=[0,0]);var k=(0,c.CR)([j,B,P],3),U=(0,c.CR)(k[0],2),at=U[0],ut=U[1],ct=(0,c.CR)(k[1],2),pt=ct[0],Bt=ct[1],ae=(0,c.CR)(k[2],2),pe=ae[0],Te=ae[1],Fe=(0,c.CR)([pt-at,Bt-ut],2),Ue=Fe[0],fn=Fe[1],gn=Math.sqrt(Math.pow(Ue,2)+Math.pow(fn,2)),On=(0,c.CR)([-pe/gn,Te/gn],2),Rn=On[0],wn=On[1];return[Rn*Ue,Rn*fn,wn*Ue,wn*fn]}function kr(j){var B=(0,c.CR)(j,2),P=(0,c.CR)(B[0],2),k=P[0],U=P[1],at=(0,c.CR)(B[1],2),ut=at[0],ct=at[1];return{x1:k,y1:U,x2:ut,y2:ct}}function Ar(j,B,P,k){var U=B.showTrunc,at=B.startPos,ut=B.endPos,ct=B.truncRange,pt=B.lineExtension,Bt=B.classNamePrefix,ae=(0,c.CR)([at,ut],2),pe=(0,c.CR)(ae[0],2),Te=pe[0],Fe=pe[1],Ue=(0,c.CR)(ae[1],2),fn=Ue[0],gn=Ue[1],On=(0,c.CR)(pt?Zn(at,ut,pt):new Array(4).fill(0),4),Rn=On[0],wn=On[1],Fn=On[2],Gn=On[3],Xn=function(si){return j.selectAll(ne.line.class).data(si,function(Jr,fi){return fi}).join(function(Jr){var fi=Jr.append("line").styles(P).transition(function(ni){return(0,ft.eR)(this,kr(ni.line),!1)});return fi.attr("className",function(ni){if(!Bt)return"".concat(ne.line.name," ").concat(ni.className);var ri=se(ne.line.name,ue.line,Bt);if(ni.className===ne.lineFirst.name){var Si=se(ne.lineFirst.name,ue.lineFirst,Bt);return"".concat(ri," ").concat(Si)}if(ni.className===ne.lineSecond.name){var Si=se(ne.lineSecond.name,ue.lineSecond,Bt);return"".concat(ri," ").concat(Si)}return ri}),fi},function(Jr){return Jr.styles(P).transition(function(fi){var ni=fi.line;return(0,ft.eR)(this,kr(ni),k.update)})},function(Jr){return Jr.remove()}).transitions()};if(!U||!ct)return Xn([{line:[[Te+Rn,Fe+wn],[fn+Fn,gn+Gn]],className:ne.line.name}]);var rr=(0,c.CR)(ct,2),mr=rr[0],Dr=rr[1],ai=fn-Te,ci=gn-Fe,Vr=(0,c.CR)([Te+ai*mr,Fe+ci*mr],2),Er=Vr[0],Br=Vr[1],Cr=(0,c.CR)([Te+ai*Dr,Fe+ci*Dr],2),Hr=Cr[0],mi=Cr[1],wr=Xn([{line:[[Te+Rn,Fe+wn],[Er,Br]],className:ne.lineFirst.name},{line:[[Hr,mi],[fn+Fn,gn+Gn]],className:ne.lineSecond.name}]);return pr(j,B),wr}function ei(j,B,P,k){var U=P.showArrow,at=P.showTrunc,ut=P.lineArrow,ct=P.lineArrowOffset,pt=P.lineArrowSize,Bt;if(B==="arc"?Bt=j.select(ne.line.class):at?Bt=j.select(ne.lineSecond.class):Bt=j.select(ne.line.class),!U||!ut||P.type==="arc"&&Qn(P.startAngle,P.endAngle)){var ae=Bt.node();ae&&(ae.style.markerEnd=void 0);return}var pe=(0,Ne.S)(ut);pe.attr(k),(0,tn.b)(pe,pt,!0),Bt.style("markerEnd",pe).style("markerEndOffset",-ct)}function yi(j,B,P){var k=B.type,U,at=(0,M.zs)(B,"line");return k==="linear"?U=Ar(j,B,Mt(at,"arrow"),P):U=me(j,B,Mt(at,"arrow"),P),ei(j,k,B,at),U}function ui(j,B){return Ut(j,B.gridDirection,B)}function Ur(j){var B=j.type,P=j.gridCenter;return B==="linear"?P:P||j.center}function ki(j,B){var P=B.gridLength;return j.map(function(k,U){var at=k.value,ut=(0,c.CR)(on(at,B),2),ct=ut[0],pt=ut[1],Bt=(0,c.CR)(rn(ui(at,B),P),2),ae=Bt[0],pe=Bt[1];return{id:U,points:[[ct,pt],[ct+ae,pt+pe]]}})}function la(j,B){var P=B.gridControlAngles,k=Ur(B);if(!k)throw new Error("grid center is not provide");if(j.length<2)throw new Error("Invalid grid data");if(!P||P.length===0)throw new Error("Invalid gridControlAngles");var U=(0,c.CR)(k,2),at=U[0],ut=U[1];return j.map(function(ct,pt){var Bt=ct.value,ae=(0,c.CR)(on(Bt,B),2),pe=ae[0],Te=ae[1],Fe=(0,c.CR)([pe-at,Te-ut],2),Ue=Fe[0],fn=Fe[1],gn=[];return P.forEach(function(On){var Rn=sn(On),wn=(0,c.CR)([Math.cos(Rn),Math.sin(Rn)],2),Fn=wn[0],Gn=wn[1],Xn=Ue*Fn-fn*Gn+at,rr=Ue*Gn+fn*Fn+ut;gn.push([Xn,rr])}),{points:gn,id:pt}})}function Oi(j,B,P,k){var U=P.classNamePrefix,at=(0,M.zs)(P,"grid"),ut=at.type,ct=at.areaFill,pt=Ur(P),Bt=Ht(B,P.gridFilter),ae=ut==="segment"?ki(Bt,P):la(Bt,P),pe=(0,c.pi)((0,c.pi)({},at),{center:pt,areaFill:(0,We.Z)(ct)?Bt.map(function(Te,Fe){return(0,ze.S)(ct,[Te,Fe,Bt])}):ct,animate:k,data:ae});return j.selectAll(ne.grid.class).data([1]).join(function(Te){var Fe=Te.append(function(){return new re({style:pe})}).attr("className",ne.grid.name);return ke(Fe,ne.grid,ue.grid,U),Fe},function(Te){return Te.transition(function(){return this.update(pe)})},function(Te){return Te.remove()}).transitions()}function Zr(j,B,P,k,U){return k===void 0&&(k=!0),U===void 0&&(U=!1),k&&j===B||U&&j===P?!0:j>B&&j<P}var qn=function(j){var B=new DOMParser,P=B.parseFromString(j,"text/html"),k=P.body.firstElementChild;if(console.log(k==null?void 0:k.getClientRects(),11),!k)return 0;var U=k.getAttribute("style")||"",at=Object.fromEntries(U.split(";").map(function(gn){return gn.trim()}).filter(function(gn){return gn.includes(":")}).map(function(gn){var On=(0,c.CR)(gn.split(":").map(function(Fn){return Fn.trim()}),2),Rn=On[0],wn=On[1];return[Rn.toLowerCase(),wn]})),ut=function(gn){if(!gn)return 0;var On=gn.match(/([\d.]+)px/);return On?parseFloat(On[1]):0};if(at.height)return ut(at.height);var ct=ut(at["font-size"])||16,pt=at["line-height"],Bt;!pt||pt==="normal"?Bt=1.2*ct:pt.endsWith("px")?Bt=ut(pt):/^[\d.]+$/.test(pt)?Bt=parseFloat(pt)*ct:Bt=ct;var ae=ut(at["padding-top"]),pe=ut(at["padding-bottom"]);if(at.padding){var Te=at.padding.split(/\s+/).map(ut);Te.length===1||Te.length===2?(ae=Te[0],pe=Te[0]):(Te.length===3||Te.length===4)&&(ae=Te[0],pe=Te[2])}var Fe=ut(at["border-top-width"]),Ue=ut(at["border-bottom-width"]);if(at.border){var fn=at.border.match(/([\d.]+)px/);fn&&(Fe=parseFloat(fn[1]),Ue=parseFloat(fn[1]))}if(at["border-width"]){var Te=at["border-width"].split(/\s+/).map(ut);Te.length===1||Te.length===2?(Fe=Te[0],Ue=Te[0]):(Te.length===3||Te.length===4)&&(Fe=Te[0],Ue=Te[2])}return Bt+ae+pe+Fe+Ue},Ti=y(69014),Nt=y(53160),E=y(58533);function b(j,B,P,k){P===void 0&&(P=2),k===void 0&&(k="top"),(0,E.Rm)(j,{wordWrap:!0,wordWrapWidth:B,maxLines:P,textBaseline:k})}function h(j,B,P){var k=j.getBBox(),U=k.width,at=k.height,ut=(0,c.CR)([B,P].map(function(Bt,ae){var pe;return Bt.includes("%")?parseFloat(((pe=Bt.match(/[+-]?([0-9]*[.])?[0-9]+/))===null||pe===void 0?void 0:pe[0])||"0")/100*(ae===0?U:at):Bt}),2),ct=ut[0],pt=ut[1];return[ct,pt]}function v(j,B){if(B)try{var P=/translate\(([+-]*[\d]+[%]*),[ ]*([+-]*[\d]+[%]*)\)/g,k=B.replace(P,function(U,at,ut){return"translate(".concat(h(j,at,ut),")")});j.attr("transform",k)}catch(U){}}var w=y(16915),Y=y(76075),K=y(98294),it=function(){function j(B,P,k,U){this.set(B,P,k,U)}return Object.defineProperty(j.prototype,"left",{get:function(){return this.x1},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"top",{get:function(){return this.y1},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"right",{get:function(){return this.x2},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"bottom",{get:function(){return this.y2},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"width",{get:function(){return this.defined("x2")&&this.defined("x1")?this.x2-this.x1:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(j.prototype,"height",{get:function(){return this.defined("y2")&&this.defined("y1")?this.y2-this.y1:void 0},enumerable:!1,configurable:!0}),j.prototype.rotatedPoints=function(B,P,k){var U=this,at=U.x1,ut=U.y1,ct=U.x2,pt=U.y2,Bt=Math.cos(B),ae=Math.sin(B),pe=P-P*Bt+k*ae,Te=k-P*ae-k*Bt,Fe=[[Bt*at-ae*pt+pe,ae*at+Bt*pt+Te],[Bt*ct-ae*pt+pe,ae*ct+Bt*pt+Te],[Bt*at-ae*ut+pe,ae*at+Bt*ut+Te],[Bt*ct-ae*ut+pe,ae*ct+Bt*ut+Te]];return Fe},j.prototype.set=function(B,P,k,U){return k<B?(this.x2=B,this.x1=k):(this.x1=B,this.x2=k),U<P?(this.y2=P,this.y1=U):(this.y1=P,this.y2=U),this},j.prototype.defined=function(B){return this[B]!==Number.MAX_VALUE&&this[B]!==-Number.MAX_VALUE},j}();function ht(j,B){var P=j.getEulerAngles()||0;j.setEulerAngles(0);var k=j.getBounds(),U=(0,c.CR)(k.min,2),at=U[0],ut=U[1],ct=(0,c.CR)(k.max,2),pt=ct[0],Bt=ct[1],ae=j.getBBox(),pe=ae.width,Te=ae.height,Fe=Te,Ue=0,fn=0,gn=at,On=ut,Rn=(0,E.U4)(j);if(Rn){Fe-=1.5;var wn=Rn.style.textAlign,Fn=Rn.style.textBaseline;wn==="center"?gn=(at+pt)/2:(wn==="right"||wn==="end")&&(gn=pt),Fn==="middle"?On=(ut+Bt)/2:Fn==="bottom"&&(On=Bt)}var Gn=(0,c.CR)((0,K.j)(B),4),Xn=Gn[0],rr=Xn===void 0?0:Xn,mr=Gn[1],Dr=mr===void 0?0:mr,ai=Gn[2],ci=ai===void 0?rr:ai,Vr=Gn[3],Er=Vr===void 0?Dr:Vr,Br=new it((Ue+=at)-Er,(fn+=ut)-rr,Ue+pe+Dr,fn+Fe+ci);return j.setEulerAngles(P),Br.rotatedPoints(sn(P),gn,On)}function Zt(j,B){return B[0]<=Math.max(j[0][0],j[1][0])&&B[0]<=Math.min(j[0][0],j[1][0])&&B[1]<=Math.max(j[0][1],j[1][1])&&B[1]<=Math.min(j[0][1],j[1][1])}function $(j,B,P){var k=(B[1]-j[1])*(P[0]-B[0])-(B[0]-j[0])*(P[1]-B[1]);return k===0?0:k<0?2:1}function Q(j,B){var P=$(j[0],j[1],B[0]),k=$(j[0],j[1],B[1]),U=$(B[0],B[1],j[0]),at=$(B[0],B[1],j[1]);return!!(P!==k&&U!==at||P===0&&Zt(j,B[0])||k===0&&Zt(j,B[1])||U===0&&Zt(B,j[0])||at===0&&Zt(B,j[1]))}function H(j,B){var P=j.length;if(P<3)return!1;var k=[B,[9999,B[1]]],U=0,at=0;do{var ut=[j[at],j[(at+1)%P]];if(Q(ut,k)){if($(ut[0],B,ut[1])===0)return Zt(ut,B);U++}at=(at+1)%P}while(at!==0);return!!(U&1)}function et(j,B){return B.every(function(P){return H(j,P)})}function yt(j,B,P){var k=j.x1,U=j.x2,at=j.y1,ut=j.y2,ct=[[k,at],[U,at],[U,ut],[k,ut]],pt=ht(B,P);return et(ct,pt)}function Xt(j,B){var P=(0,c.CR)(j,4),k=P[0],U=P[1],at=P[2],ut=P[3],ct=(0,c.CR)(B,4),pt=ct[0],Bt=ct[1],ae=ct[2],pe=ct[3],Te=at-k,Fe=ut-U,Ue=ae-pt,fn=pe-Bt,gn=Te*fn-Ue*Fe;if(gn===0)return!1;var On=gn>0,Rn=k-pt,wn=U-Bt,Fn=Te*wn-Fe*Rn;if(Fn<0===On)return!1;var Gn=Ue*wn-fn*Rn;return!(Gn<0===On||Fn>gn===On||Gn>gn===On)}function Ot(j,B){var P=[[j[0],j[1],j[2],j[3]],[j[2],j[3],j[4],j[5]],[j[4],j[5],j[6],j[7]],[j[6],j[7],j[0],j[1]]];return P.some(function(k){return Xt(B,k)})}var Kt={lineToLine:Xt,intersectBoxLine:Ot,getBounds:ht};function gt(j,B,P){var k,U,at=ht(j,P).flat(1),ut=ht(B,P).flat(1),ct=[[at[0],at[1],at[2],at[3]],[at[0],at[1],at[4],at[5]],[at[4],at[5],at[6],at[7]],[at[2],at[3],at[6],at[7]]];try{for(var pt=(0,c.XA)(ct),Bt=pt.next();!Bt.done;Bt=pt.next()){var ae=Bt.value;if(Ot(ut,ae))return!0}}catch(pe){k={error:pe}}finally{try{Bt&&!Bt.done&&(U=pt.return)&&U.call(pt)}finally{if(k)throw k.error}}return!1}function vt(j,B){var P=j.type,k=j.labelDirection,U=j.crossSize;if(!U)return!1;if(P==="arc"){var at=j.center,ut=j.radius,ct=(0,c.CR)(at,2),pt=ct[0],Bt=ct[1],ae=k==="negative"?0:U,pe=-ut-ae,Te=ut+ae,Fe=(0,c.CR)((0,K.j)(B),4),Ue=Fe[0],fn=Fe[1],gn=Fe[2],On=Fe[3];return new it(pt+pe-On,Bt+pe-Ue,pt+Te+fn,Bt+Te+gn)}var Rn=(0,c.CR)(j.startPos,2),wn=Rn[0],Fn=Rn[1],Gn=(0,c.CR)(j.endPos,2),Xn=Gn[0],rr=Gn[1],mr=(0,c.CR)(vn(j)?[-B,0,B,0]:[0,B,0,-B],4),Dr=mr[0],ai=mr[1],ci=mr[2],Vr=mr[3],Er=qt(0,j),Br=rn(Er,U),Cr=new it(wn,Fn,Xn,rr);return Cr.x1+=Vr,Cr.y1+=Dr,Cr.x2+=ai+Br[0],Cr.y2+=ci+Br[1],Cr}function lt(j,B,P){var k,U,at=B.crossPadding,ut=new Set,ct=null,pt=vt(B,at),Bt=function(Ue){return pt?yt(pt,Ue):!0},ae=function(Ue,fn){return!Ue||!Ue.firstChild?!0:!gt(Ue.firstChild,fn.firstChild,(0,K.j)(P))};try{for(var pe=(0,c.XA)(j),Te=pe.next();!Te.done;Te=pe.next()){var Fe=Te.value;Bt(Fe)?!ct||ae(ct,Fe)?ct=Fe:(ut.add(ct),ut.add(Fe)):ut.add(Fe)}}catch(Ue){k={error:Ue}}finally{try{Te&&!Te.done&&(U=pe.return)&&U.call(pe)}finally{if(k)throw k.error}}return Array.from(ut)}function jt(j,B){return B===void 0&&(B={}),(0,Y.Z)(j)?0:typeof j=="number"?j:Math.floor((0,E.Ux)(j,B))}function Yt(j,B,P,k){if(!(j.length<=0)){var U=B.suffix,at=U===void 0?"...":U,ut=B.minLength,ct=B.maxLength,pt=ct===void 0?1/0:ct,Bt=B.step,ae=Bt===void 0?" ":Bt,pe=B.margin,Te=pe===void 0?[0,0,0,0]:pe,Fe=(0,E.qT)(k.getTextShape(j[0])),Ue=jt(ae,Fe),fn=ut?jt(ut,Fe):Ue,gn=jt(pt,Fe);((0,Y.Z)(gn)||gn===1/0)&&(gn=Math.max.apply(null,j.map(function(Br){return Br.getBBox().width})));for(var On=j.slice(),Rn=(0,c.CR)(Te,4),wn=Rn[0],Fn=wn===void 0?0:wn,Gn=Rn[1],Xn=Gn===void 0?0:Gn,rr=Rn[2],mr=rr===void 0?Fn:rr,Dr=Rn[3],ai=Dr===void 0?Xn:Dr,ci=function(Br){if(On.forEach(function(Cr){k.ellipsis(k.getTextShape(Cr),Br,at)}),On=lt(j,P,Te),On.length<1)return{value:void 0}},Vr=gn;Vr>fn+Ue;Vr-=Ue){var Er=ci(Vr);if(typeof Er=="object")return Er.value}}}var he=function(j){return j!==void 0&&j!=null&&!Number.isNaN(j)},ye=y(2080),Wt={parity:function(j,B){var P=B.seq,k=P===void 0?2:P;return j.filter(function(U,at){return at%k?((0,Ti.Cp)(U),!1):!0})}},Oe=function(j){return j.filter(he)};function He(j,B,P,k){var U=j.length,at=B.keepHeader,ut=B.keepTail;if(!(U<=1||U===2&&at&&ut)){var ct=Wt.parity,pt=function(wn){return wn.forEach(k.show),wn},Bt=2,ae=j.slice(),pe=j.slice(),Te=Math.min.apply(Math,(0,c.ev)([1],(0,c.CR)(j.map(function(wn){return wn.getBBox().width})),!1));if(P.type==="linear"&&(xn(P)||vn(P))){var Fe=(0,ye._v)(j[0]).left,Ue=(0,ye._v)(j[U-1]).right,fn=Math.abs(Ue-Fe)||1;Bt=Math.max(Math.floor(U*Te/fn),Bt)}var gn,On;for(at&&(gn=ae.splice(0,1)[0]),ut&&(On=ae.splice(-1,1)[0],ae.reverse()),pt(ae);Bt<j.length&<(Oe(On?(0,c.ev)((0,c.ev)([On],(0,c.CR)(pe),!1),[gn],!1):(0,c.ev)([gn],(0,c.CR)(pe),!1)),P,B==null?void 0:B.margin).length;){if(On&&!gn&&Bt%2===0){var Rn=ae.splice(0,1);Rn.forEach(k.hide)}else if(On&&gn){var Rn=ae.splice(0,1);Rn.forEach(k.hide)}pe=ct(pt(ae),{seq:Bt}),Bt++}}}function Qe(j,B,P,k){var U,at,ut=B.optionalAngles,ct=ut===void 0?[0,45,90]:ut,pt=B.margin,Bt=B.recoverWhenFailed,ae=Bt===void 0?!0:Bt,pe=j.map(function(On){return On.getLocalEulerAngles()}),Te=function(){return lt(j,P,pt).length<1},Fe=function(On){return j.forEach(function(Rn,wn){var Fn=Array.isArray(On)?On[wn]:On;k.rotate(Rn,+Fn)})};try{for(var Ue=(0,c.XA)(ct),fn=Ue.next();!fn.done;fn=Ue.next()){var gn=fn.value;if(Fe(gn),Te())return}}catch(On){U={error:On}}finally{try{fn&&!fn.done&&(at=Ue.return)&&at.call(Ue)}finally{if(U)throw U.error}}ae&&Fe(pe)}function An(j){var B=j.type,P=j.labelDirection;return B==="linear"&&xn(j)?P==="negative"?"bottom":"top":"middle"}function Nn(j,B,P,k,U){var at,ut=B.maxLines,ct=ut===void 0?3:ut,pt=B.recoverWhenFailed,Bt=pt===void 0?!0:pt,ae=B.margin,pe=ae===void 0?[0,0,0,0]:ae,Te=(0,ze.S)((at=B.wordWrapWidth)!==null&&at!==void 0?at:50,[U]),Fe=j.map(function(wn){return wn.attr("maxLines")||1}),Ue=Math.min.apply(Math,(0,c.ev)([],(0,c.CR)(Fe),!1)),fn=function(){return lt(j,P,pe).length<1},gn=An(P),On=function(wn){return j.forEach(function(Fn,Gn){var Xn=Array.isArray(wn)?wn[Gn]:wn;k.wrap(Fn,Te,Xn,gn)})};if(!(Ue>ct)){if(P.type==="linear"&&xn(P)){if(On(ct),fn())return}else for(var Rn=Ue;Rn<=ct;Rn++)if(On(Rn),fn())return;Bt&&On(Fe)}}var Cn=new Map([["hide",He],["rotate",Qe],["ellipsis",Yt],["wrap",Nn]]);function Bn(j,B,P){return B.labelOverlap.length<1?!1:P==="hide"?!(0,w.X)(j[0]):P==="rotate"?!j.some(function(k){var U;return!!(!((U=k.attr("transform"))===null||U===void 0)&&U.includes("rotate"))}):P==="ellipsis"||P==="wrap"?j.filter(function(k){return k.querySelector("text")}).length>=1:!0}function jn(j,B,P,k){var U=B.labelOverlap,at=U===void 0?[]:U;at.length&&at.forEach(function(ut){var ct=ut.type,pt=Cn.get(ct);Bn(j,B,ct)&&(pt==null||pt(j,ut,B,k,P))})}function or(){for(var j=[],B=0;B<arguments.length;B++)j[B]=arguments[B];var P=function(k){return k==="positive"?-1:1};return j.reduce(function(k,U){return k*P(U)},1)}function ir(j){for(var B=j;B<0;)B+=360;return Math.round(B%360)}function lr(j,B){var P=(0,c.CR)(j,2),k=P[0],U=P[1],at=(0,c.CR)(B,2),ut=at[0],ct=at[1],pt=(0,c.CR)([k*ut+U*ct,k*ct-U*ut],2),Bt=pt[0],ae=pt[1];return Math.atan2(ae,Bt)}function Vn(j){var B=(j+360)%180;return Zr(B,-90,90)||(B+=180),B}function nr(j,B,P){var k,U=P.labelAlign,at=(k=B.style.transform)===null||k===void 0?void 0:k.includes("rotate");if(at)return B.getLocalEulerAngles();var ut=0,ct=qt(j.value,P),pt=_t(j.value,P);return U==="horizontal"?0:(U==="perpendicular"?ut=lr([1,0],ct):ut=lr([pt[0]<0?-1:1,0],pt),Vn(Pe(ut)))}function Or(j,B,P){var k=P.type,U=P.labelAlign,at=qt(j,P),ut=ir(B),ct=ir(Pe(lr([1,0],at))),pt="center",Bt="middle";return k==="linear"?[90,270].includes(ct)&&ut===0?(pt="center",Bt=at[1]===1?"top":"bottom"):!(ct%180)&&[90,270].includes(ut)?pt="center":ct===0?(Zr(ut,0,90,!1,!0)||Zr(ut,0,90)||Zr(ut,270,360))&&(pt="start"):ct===90?Zr(ut,0,90,!1,!0)?pt="start":(Zr(ut,90,180)||Zr(ut,270,360))&&(pt="end"):ct===270?Zr(ut,0,90,!1,!0)?pt="end":(Zr(ut,90,180)||Zr(ut,270,360))&&(pt="start"):ct===180&&(ut===90?pt="start":(Zr(ut,0,90)||Zr(ut,270,360))&&(pt="end")):U==="parallel"?Zr(ct,0,180,!0)?Bt="top":Bt="bottom":U==="horizontal"?Zr(ct,90,270,!1)?pt="end":(Zr(ct,270,360,!1)||Zr(ct,0,90))&&(pt="start"):U==="perpendicular"&&(Zr(ct,90,270)?pt="end":pt="start"),{textAlign:pt,textBaseline:Bt}}function Kr(j,B,P){B.setLocalEulerAngles(j);var k=B.__data__.value,U=Or(k,j,P),at=B.querySelector(ne.labelItem.class);at&&$r(at,U)}function Wr(j,B,P){var k=P.showTick,U=P.tickLength,at=P.tickDirection,ut=P.labelDirection,ct=P.labelSpacing,pt=B.indexOf(j),Bt=(0,ze.S)(ct,[j,pt,B]),ae=(0,c.CR)([qt(j.value,P),or(ut,at)],2),pe=ae[0],Te=ae[1],Fe=Te===1?(0,ze.S)(k?U:0,[j,pt,B]):0,Ue=(0,c.CR)(Xe(rn(pe,Bt+Fe),on(j.value,P)),2),fn=Ue[0],gn=Ue[1];return{x:fn,y:gn}}function dr(j,B,P,k){var U=k.labelFormatter,at=(0,We.Z)(U)?function(){return(0,Ne.S)((0,ze.S)(U,[j,B,P,qt(j.value,k)]))}:function(){return(0,Ne.S)(j.label||"")};return at}function Fr(j,B,P,k){var U=k.labelRender,at=((0,Me.Z)(k,"endPos.0",400)-(0,Me.Z)(k,"startPos.0",0))/P.length,ut=(0,We.Z)(U)?(0,ze.S)(U,[j,B,P,qt(j.value,k)]):j.label||"",ct=qn(ut)||30;return function(){return(0,Ne.$)(ut,{width:at,height:ct})}}var xi={html:["fill"],text:[]};function $r(j,B){["text","html"].includes(j.nodeName)&&j.attr(Mt(B,xi[j.nodeName]))}function pi(j,B){jn(this.node().childNodes,j,B,{hide:Ti.Cp,show:Ti.$Z,rotate:function(P,k){Kr(+k,P,j)},ellipsis:function(P,k,U){P&&(0,Nt.O)(P,k||1/0,U)},wrap:function(P,k,U){P&&b(P,k,U)},getTextShape:function(P){return P.querySelector(ne.labelItem.class)}})}function Ri(j,B,P,k,U){var at=P.indexOf(B),ut=U.labelRender,ct=U.classNamePrefix,pt=(0,Tt.Ys)(j).append(ut?Fr(B,at,P,U):dr(B,at,P,U)).attr("className",ne.labelItem.name).node();ke((0,Tt.Ys)(pt),ne.labelItem,ue.labelItem,ct);var Bt=(0,c.CR)((0,M.Hm)(q(k,[B,at,P])),2),ae=Bt[0],pe=Bt[1],Te=pe.transform,Fe=(0,c._T)(pe,["transform"]);v(pt,Te);var Ue=nr(B,pt,U);if(pt.getLocalEulerAngles()||pt.setLocalEulerAngles(Ue),$r(pt,(0,c.pi)((0,c.pi)({},Or(B.value,Ue,U)),ae)),pt.nodeName==="html"){var fn=pt.getBBox(),gn=pt.style.x||0;pt.attr("x",gn-fn.width/2)}return j.attr(Fe),pt}function Hi(j,B,P,k,U){var at=P.classNamePrefix,ut=Ht(B,P.labelFilter),ct=(0,M.zs)(P,"label"),pt,Bt=j.selectAll(ne.label.class).data(ut,function(ae,pe){return pe}).join(function(ae){var pe=ae.append("g").attr("className",ne.label.name).transition(function(Te){Ri(this,Te,B,ct,P);var Fe=Wr(Te,B,P),Ue=Fe.x,fn=Fe.y;return this.style.transform="translate(".concat(Ue,", ").concat(fn,")"),null});return ke(pe,ne.label,ue.label,at),pe},function(ae){return ae.transition(function(pe){var Te=this.querySelector(ne.labelItem.class),Fe=Ri(this,pe,B,ct,P),Ue=(0,ft.tT)(Te,Fe,k.update),fn=Wr(pe,B,P),gn=fn.x,On=fn.y,Rn=(0,ft.eR)(this,{transform:"translate(".concat(gn,", ").concat(On,")")},k.update);return(0,c.ev)((0,c.ev)([],(0,c.CR)(Ue),!1),[Rn],!1)})},function(ae){return pt=ae,ae.transition(function(){var pe=this,Te=Ke(this.childNodes[0],k.exit);return(0,ft.Yq)(Te,function(){return(0,Tt.Ys)(pe).remove()}),Te}),pt}).transitions();return(0,ft.V7)(Bt,function(){pi.call(j,P,U)}),Bt}function Zi(j,B){return Ut(j,B.tickDirection,B)}function ca(j,B){var P=(0,c.CR)(j,2),k=P[0],U=P[1];return[[0,0],[k*B,U*B]]}function _a(j,B,P,k,U){var at=U.tickLength,ut=(0,c.CR)(ca(k,(0,ze.S)(at,[j,B,P])),2),ct=(0,c.CR)(ut[0],2),pt=ct[0],Bt=ct[1],ae=(0,c.CR)(ut[1],2),pe=ae[0],Te=ae[1];return{x1:pt,x2:pe,y1:Bt,y2:Te}}function Za(j,B,P,k,U){var at=U.tickFormatter,ut=U.classNamePrefix,ct=Zi(B.value,U),pt="line";(0,We.Z)(at)&&(pt=function(){return(0,ze.S)(at,[B,P,k,ct])});var Bt=j.append(pt).attr("className",ne.tickItem.name);return ke(Bt,ne.tickItem,ue.tickItem,ut),Bt}function na(j,B,P,k,U,at,ut){var ct=Zi(j.value,at),pt=_a(j,B,P,ct,at),Bt=pt.x1,ae=pt.x2,pe=pt.y1,Te=pt.y2,Fe=(0,c.CR)((0,M.Hm)(q(ut,[j,B,P,ct])),2),Ue=Fe[0],fn=Fe[1];k.node().nodeName==="line"&&k.styles((0,c.pi)({x1:Bt,x2:ae,y1:pe,y2:Te},Ue)),U.attr(fn),k.styles(Ue)}function wi(j,B,P,k,U,at){var ut=Za((0,Tt.Ys)(this),j,B,P,k);na(j,B,P,ut,this,k,U);var ct=(0,c.CR)(on(j.value,k),2),pt=ct[0],Bt=ct[1];return(0,ft.eR)(this,{transform:"translate(".concat(pt,", ").concat(Bt,")")},at)}function fo(j,B,P,k){var U=P.classNamePrefix,at=Ht(B,P.tickFilter),ut=(0,M.zs)(P,"tick");return j.selectAll(ne.tick.class).data(at,function(ct){return ct.id||ct.label}).join(function(ct){var pt=ct.append("g").attr("className",ne.tick.name).transition(function(Bt,ae){return wi.call(this,Bt,ae,at,P,ut,!1)});return ke(pt,ne.tick,ue.tick,U),pt},function(ct){return ct.transition(function(pt,Bt){return this.removeChildren(),wi.call(this,pt,Bt,at,P,ut,k.update)})},function(ct){return ct.transition(function(){var pt=this,Bt=Ke(this.childNodes[0],k.exit);return(0,ft.Yq)(Bt,function(){return pt.remove()}),Bt})}).transitions()}var ss=y(33253);function Yn(j,B,P){var k=P.titlePosition,U=k===void 0?"lb":k,at=P.titleSpacing,ut=(0,ss.l)(U),ct=j.node().getLocalBounds(),pt=(0,c.CR)(ct.min,2),Bt=pt[0],ae=pt[1],pe=(0,c.CR)(ct.halfExtents,2),Te=pe[0],Fe=pe[1],Ue=(0,c.CR)(B.node().getLocalBounds().halfExtents,2),fn=Ue[0],gn=Ue[1],On=(0,c.CR)([Bt+Te,ae+Fe],2),Rn=On[0],wn=On[1],Fn=(0,c.CR)((0,K.j)(at),4),Gn=Fn[0],Xn=Fn[1],rr=Fn[2],mr=Fn[3];if(["start","end"].includes(U)&&P.type==="linear"){var Dr=P.startPos,ai=P.endPos,ci=(0,c.CR)(U==="start"?[Dr,ai]:[ai,Dr],2),Vr=ci[0],Er=ci[1],Br=It([-Er[0]+Vr[0],-Er[1]+Vr[1]]),Cr=(0,c.CR)(rn(Br,Gn),2),Hr=Cr[0],mi=Cr[1];return{x:Vr[0]+Hr,y:Vr[1]+mi}}return ut.includes("t")&&(wn-=Fe+gn+Gn),ut.includes("r")&&(Rn+=Te+fn+Xn),ut.includes("l")&&(Rn-=Te+fn+mr),ut.includes("b")&&(wn+=Fe+gn+rr),{x:Rn,y:wn}}function xs(j,B,P){var k=j.getGeometryBounds().halfExtents,U=k[1]*2;if(B==="vertical"){if(P==="left")return"rotate(-90) translate(0, ".concat(U/2,")");if(P==="right")return"rotate(-90) translate(0, -".concat(U/2,")")}return""}function Ca(j,B,P,k,U){var at=(0,M.zs)(k,"title"),ut=(0,c.CR)((0,M.Hm)(at),2),ct=ut[0],pt=ut[1],Bt=pt.transform,ae=pt.transformOrigin,pe=(0,c._T)(pt,["transform","transformOrigin"]);B.styles(pe);var Te=Bt||xs(j.node(),ct.direction,ct.position);j.styles((0,c.pi)((0,c.pi)({},ct),{transformOrigin:ae})),v(j.node(),Te);var Fe=Yn((0,Tt.Ys)(P._offscreen||P.querySelector(ne.mainGroup.class)),B,k),Ue=Fe.x,fn=Fe.y,gn=(0,ft.eR)(B.node(),{transform:"translate(".concat(Ue,", ").concat(fn,")")},U);return gn}function La(j,B,P,k){var U=P.titleText,at=P.classNamePrefix;return j.selectAll(ne.title.class).data([{title:U}].filter(function(ut){return!!ut.title}),function(ut,ct){return ut.title}).join(function(ut){var ct=ut.append(function(){return(0,Ne.S)(U)}).attr("className",ne.title.name).transition(function(){return Ca((0,Tt.Ys)(this),j,B,P,k.enter)});return ke(ct,ne.title,ue.title,at),ct},function(ut){return ut.transition(function(){return Ca((0,Tt.Ys)(this),j,B,P,k.update)})},function(ut){return ut.remove()}).transitions()}function Na(j,B,P,k){var U=j.showLine,at=j.showTick,ut=j.showLabel,ct=j.classNamePrefix,pt=B.maybeAppendByClassName(ne.lineGroup,"g");ke(pt,ne.lineGroup,ue.lineGroup,ct);var Bt=(0,J.z)(U,pt,function(Ue){return yi(Ue,j,k)})||[],ae=B.maybeAppendByClassName(ne.tickGroup,"g");ke(ae,ne.tickGroup,ue.tickGroup,ct);var pe=(0,J.z)(at,ae,function(Ue){return fo(Ue,P,j,k)})||[],Te=B.maybeAppendByClassName(ne.labelGroup,"g");ke(Te,ne.labelGroup,ue.labelGroup,ct);var Fe=(0,J.z)(ut,Te,function(Ue){return Hi(Ue,P,j,k,B.node())})||[];return(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(Bt),!1),(0,c.CR)(pe),!1),(0,c.CR)(Fe),!1).filter(function(Ue){return!!Ue})}var $a=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,P,Ce)||this}return B.prototype.render=function(P,k,U){var at=this,ut=P.titleText,ct=P.data,pt=P.animate,Bt=P.showTitle,ae=P.showGrid,pe=P.dataThreshold,Te=P.truncRange,Fe=P.classNamePrefix,Ue=k.className||"axis";Fe?k.attr("className","".concat(Ue," ").concat(Fe,"axis")):k.className||k.attr("className","axis");var fn=Rt(ct,pe).filter(function(rr){var mr=rr.value;return!(Te&&mr>Te[0]&&mr<Te[1])}),gn=(0,ft.MG)(U===void 0?pt:U),On=(0,Tt.Ys)(k).maybeAppendByClassName(ne.gridGroup,"g");ke(On,ne.gridGroup,ue.gridGroup,Fe);var Rn=(0,J.z)(ae,On,function(rr){return Oi(rr,fn,P,gn)})||[],wn=(0,Tt.Ys)(k).maybeAppendByClassName(ne.mainGroup,"g");ke(wn,ne.mainGroup,ue.mainGroup,Fe),ut&&(!this.initialized&&gn.enter||this.initialized&&gn.update)&&Na(P,(0,Tt.Ys)(this.offscreenGroup),fn,(0,ft.MG)(!1));var Fn=Na(P,(0,Tt.Ys)(wn.node()),fn,gn),Gn=(0,Tt.Ys)(k).maybeAppendByClassName(ne.titleGroup,"g");ke(Gn,ne.titleGroup,ue.titleGroup,Fe);var Xn=(0,J.z)(Bt,Gn,function(rr){return La(rr,at,P,gn)})||[];return(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(Rn),!1),(0,c.CR)(Fn),!1),(0,c.CR)(Xn),!1).flat().filter(function(rr){return!!rr})},B}(I.w),os=y(42777);function za(j){var B=j.canvas,P=j.touches,k=j.offsetX,U=j.offsetY;if(B){var at=B.x,ut=B.y;return[at,ut]}if(P){var ct=P[0],pt=ct.clientX,Bt=ct.clientY;return[pt,Bt]}return k&&U?[k,U]:[0,0]}function ba(j){var B=j.nativeEvent,P=j.touches,k=j.clientX,U=j.clientY;if(B)return[B.clientX,B.clientY];if(P){var at=P[0],ut=at.clientX,ct=at.clientY;return[ut,ct]}return typeof k=="number"&&typeof U=="number"?[k,U]:[0,0]}function ws(j,B){return+j.toPrecision(B)}function vo(j){return j.toLocaleString()}function Ea(j){return j.toExponential()}function xa(j,B){return B===void 0&&(B=0),Math.abs(j)<1e3?String(j):"".concat(ws(j/1e3,B).toLocaleString(),"K")}var Xs=function(j,B,P){return j<0&&Number.isFinite(j)?B:P},Ks=function(j,B,P){return j>0&&Number.isFinite(j)?B:P},Ms=function(j,B){return j*B},Qs=function(j,B){return j/2+(B||0)/2},Ss=function(j){return j};class Ci{constructor(B){this.options=(0,Vt.Z)({},this.getDefaultOptions()),this.update(B)}getOptions(){return this.options}update(B={}){this.options=(0,Vt.Z)({},this.options,B),this.rescale(B)}rescale(B){}}function qa(j,B){return B-j?P=>(P-j)/(B-j):P=>.5}function ls(j,...B){return B.reduce((P,k)=>U=>P(k(U)),j)}function Js(j,B,P,k,U){let at=P||0,ut=k||j.length;const ct=U||(pt=>pt);for(;at<ut;){const pt=Math.floor((at+ut)/2);ct(j[pt])>B?ut=pt:at=pt+1}return at}var ra=y(75196),$i=y.n(ra);function Bs(j,B,P){let k=P;return k<0&&(k+=1),k>1&&(k-=1),k<1/6?j+(B-j)*6*k:k<1/2?B:k<2/3?j+(B-j)*(2/3-k)*6:j}function zi(j){const B=j[0]/360,P=j[1]/100,k=j[2]/100,U=j[3];if(P===0)return[k*255,k*255,k*255,U];const at=k<.5?k*(1+P):k+P-k*P,ut=2*k-at,ct=Bs(ut,at,B+1/3),pt=Bs(ut,at,B),Bt=Bs(ut,at,B-1/3);return[ct*255,pt*255,Bt*255,U]}function Xi(j){const B=$i().get(j);if(!B)return null;const{model:P,value:k}=B;return P==="rgb"?k:P==="hsl"?zi(k):null}const As=(j,B)=>P=>j*(1-P)+B*P,go=(j,B)=>{const P=Xi(j),k=Xi(B);return P===null||k===null?P?()=>j:()=>B:U=>{const at=new Array(4);for(let ae=0;ae<4;ae+=1){const pe=P[ae],Te=k[ae];at[ae]=pe*(1-U)+Te*U}const[ut,ct,pt,Bt]=at;return`rgba(${Math.round(ut)}, ${Math.round(ct)}, ${Math.round(pt)}, ${Bt})`}},Os=(j,B)=>typeof j=="number"&&typeof B=="number"?As(j,B):typeof j=="string"&&typeof B=="string"?go(j,B):()=>j,Fs=(j,B)=>{const P=As(j,B);return k=>Math.round(P(k))};var ji=y(49527);function ja(j){return j===null}function cs(j){return!(0,ji.Z)(j)&&!ja(j)&&!Number.isNaN(j)}const qi=Math.sqrt(50),us=Math.sqrt(10),Ki=Math.sqrt(2);function Va(j,B,P){const k=(B-j)/Math.max(0,P),U=Math.floor(Math.log(k)/Math.LN10),at=k/vc(10,U);return U>=0?(at>=qi?10:at>=us?5:at>=Ki?2:1)*vc(10,U):-vc(10,-U)/(at>=qi?10:at>=us?5:at>=Ki?2:1)}function $s(j,B,P){const k=Math.abs(B-j)/Math.max(0,P);let U=vc(10,Math.floor(Math.log(k)/Math.LN10));const at=k/U;return at>=qi?U*=10:at>=us?U*=5:at>=Ki&&(U*=2),B<j?-U:U}const ua=(j,B,P=5)=>{const k=[j,B];let U=0,at=k.length-1,ut=k[U],ct=k[at],pt;return ct<ut&&([ut,ct]=[ct,ut],[U,at]=[at,U]),pt=Va(ut,ct,P),pt>0?(ut=Math.floor(ut/pt)*pt,ct=Math.ceil(ct/pt)*pt,pt=Va(ut,ct,P)):pt<0&&(ut=Math.ceil(ut*pt)/pt,ct=Math.floor(ct*pt)/pt,pt=Va(ut,ct,P)),pt>0?(k[U]=Math.floor(ut/pt)*pt,k[at]=Math.ceil(ct/pt)*pt):pt<0&&(k[U]=Math.ceil(ut*pt)/pt,k[at]=Math.floor(ct*pt)/pt),k};function bi(j,B){const P=B<j?B:j,k=j>B?j:B;return U=>Math.min(Math.max(P,U),k)}const Kn=(j,B,P)=>{const[k,U]=j,[at,ut]=B;let ct,pt;return k<U?(ct=qa(k,U),pt=P(at,ut)):(ct=qa(U,k),pt=P(ut,at)),ls(pt,ct)},wa=(j,B,P)=>{const k=Math.min(j.length,B.length)-1,U=new Array(k),at=new Array(k),ut=j[0]>j[k],ct=ut?[...j].reverse():j,pt=ut?[...B].reverse():B;for(let Bt=0;Bt<k;Bt+=1)U[Bt]=qa(ct[Bt],ct[Bt+1]),at[Bt]=P(pt[Bt],pt[Bt+1]);return Bt=>{const ae=Js(j,Bt,1,k)-1,pe=U[ae],Te=at[ae];return ls(Te,pe)(Bt)}},po=(j,B,P,k)=>(Math.min(j.length,B.length)>2?wa:Kn)(j,B,k?Fs:P);class mo extends Ci{getDefaultOptions(){return{domain:[0,1],range:[0,1],nice:!1,clamp:!1,round:!1,interpolate:As,tickCount:5}}map(B){return cs(B)?this.output(B):this.options.unknown}invert(B){return cs(B)?this.input(B):this.options.unknown}nice(){if(!this.options.nice)return;const[B,P,k,...U]=this.getTickMethodOptions();this.options.domain=this.chooseNice()(B,P,k,...U)}getTicks(){const{tickMethod:B}=this.options,[P,k,U,...at]=this.getTickMethodOptions();return B(P,k,U,...at)}getTickMethodOptions(){const{domain:B,tickCount:P}=this.options,k=B[0],U=B[B.length-1];return[k,U,P]}chooseNice(){return ua}rescale(){this.nice();const[B,P]=this.chooseTransforms();this.composeOutput(B,this.chooseClamp(B)),this.composeInput(B,P,this.chooseClamp(P))}chooseClamp(B){const{clamp:P,range:k}=this.options,U=this.options.domain.map(B),at=Math.min(U.length,k.length);return P?bi(U[0],U[at-1]):Ss}composeOutput(B,P){const{domain:k,range:U,round:at,interpolate:ut}=this.options,ct=po(k.map(B),U,ut,at);this.output=ls(ct,P,B)}composeInput(B,P,k){const{domain:U,range:at}=this.options,ut=po(at,U.map(B),As);this.input=ls(P,k,ut)}}const yo=(j,B,P)=>{let k,U,at=j,ut=B;if(at===ut&&P>0)return[at];let ct=Va(at,ut,P);if(ct===0||!Number.isFinite(ct))return[];if(ct>0){at=Math.ceil(at/ct),ut=Math.floor(ut/ct),U=new Array(k=Math.ceil(ut-at+1));for(let pt=0;pt<k;pt+=1)U[pt]=(at+pt)*ct}else{ct=-ct,at=Math.ceil(at*ct),ut=Math.floor(ut*ct),U=new Array(k=Math.ceil(ut-at+1));for(let pt=0;pt<k;pt+=1)U[pt]=(at+pt)/ct}return U};class Da extends mo{getDefaultOptions(){return{domain:[0,1],range:[0,1],unknown:void 0,nice:!1,clamp:!1,round:!1,interpolate:Os,tickMethod:yo,tickCount:5}}chooseTransforms(){return[Ss,Ss]}clone(){return new Da(this.options)}}function bo({map:j,initKey:B},P){const k=B(P);return j.has(k)?j.get(k):P}function hs({map:j,initKey:B},P){const k=B(P);return j.has(k)?j.get(k):(j.set(k,P),P)}function Fo({map:j,initKey:B},P){const k=B(P);return j.has(k)&&(P=j.get(k),j.delete(k)),P}function _o(j){return typeof j=="object"?j.valueOf():j}class Ts extends Map{constructor(B){if(super(),this.map=new Map,this.initKey=_o,B!==null)for(const[P,k]of B)this.set(P,k)}get(B){return super.get(bo({map:this.map,initKey:this.initKey},B))}has(B){return super.has(bo({map:this.map,initKey:this.initKey},B))}set(B,P){return super.set(hs({map:this.map,initKey:this.initKey},B),P)}delete(B){return super.delete(Fo({map:this.map,initKey:this.initKey},B))}}const ts=Symbol("defaultUnknown");function Ia(j,B,P){for(let k=0;k<B.length;k+=1)j.has(B[k])||j.set(P(B[k]),k)}function _s(j){const{value:B,from:P,to:k,mapper:U,notFoundReturn:at}=j;let ut=U.get(B);if(ut===void 0){if(at!==ts)return at;ut=P.push(B)-1,U.set(B,ut)}return k[ut%k.length]}function Ya(j){return j instanceof Date?B=>`${B}`:typeof j=="object"?B=>JSON.stringify(B):B=>B}class es extends Ci{getDefaultOptions(){return{domain:[],range:[],unknown:ts}}constructor(B){super(B)}map(B){return this.domainIndexMap.size===0&&Ia(this.domainIndexMap,this.getDomain(),this.domainKey),_s({value:this.domainKey(B),mapper:this.domainIndexMap,from:this.getDomain(),to:this.getRange(),notFoundReturn:this.options.unknown})}invert(B){return this.rangeIndexMap.size===0&&Ia(this.rangeIndexMap,this.getRange(),this.rangeKey),_s({value:this.rangeKey(B),mapper:this.rangeIndexMap,from:this.getRange(),to:this.getDomain(),notFoundReturn:this.options.unknown})}rescale(B){const[P]=this.options.domain,[k]=this.options.range;if(this.domainKey=Ya(P),this.rangeKey=Ya(k),!this.rangeIndexMap){this.rangeIndexMap=new Map,this.domainIndexMap=new Map;return}(!B||B.range)&&this.rangeIndexMap.clear(),(!B||B.domain||B.compare)&&(this.domainIndexMap.clear(),this.sortedDomain=void 0)}clone(){return new es(this.options)}getRange(){return this.options.range}getDomain(){if(this.sortedDomain)return this.sortedDomain;const{domain:B,compare:P}=this.options;return this.sortedDomain=P?[...B].sort(P):B,this.sortedDomain}}function ia(j){const B=Math.min(...j);return j.map(P=>P/B)}function Zs(j,B){const P=j.length,k=B-P;return k>0?[...j,...new Array(k).fill(1)]:k<0?j.slice(0,B):j}function ha(j){return Math.round(j*1e12)/1e12}function di(j){const{domain:B,range:P,paddingOuter:k,paddingInner:U,flex:at,round:ut,align:ct}=j,pt=B.length,Bt=Zs(at,pt),[ae,pe]=P,Te=pe-ae,Fe=2/pt*k+1-1/pt*U,Ue=Te/Fe,fn=Ue*U/pt,gn=Ue-pt*fn,On=ia(Bt),Rn=On.reduce((Vr,Er)=>Vr+Er),wn=gn/Rn,Fn=new Ts(B.map((Vr,Er)=>{const Br=On[Er]*wn;return[Vr,ut?Math.floor(Br):Br]})),Gn=new Ts(B.map((Vr,Er)=>{const Cr=On[Er]*wn+fn;return[Vr,ut?Math.floor(Cr):Cr]})),Xn=Array.from(Gn.values()).reduce((Vr,Er)=>Vr+Er),mr=(Te-(Xn-Xn/pt*U))*ct,Dr=ae+mr;let ai=ut?Math.round(Dr):Dr;const ci=new Array(pt);for(let Vr=0;Vr<pt;Vr+=1){ci[Vr]=ha(ai);const Er=B[Vr];ai+=Gn.get(Er)}return{valueBandWidth:Fn,valueStep:Gn,adjustedRange:ci}}function Wi(j){var B;const{domain:P}=j,k=P.length;if(k===0)return{valueBandWidth:void 0,valueStep:void 0,adjustedRange:[]};if(!!(!((B=j.flex)===null||B===void 0)&&B.length))return di(j);const{range:at,paddingOuter:ut,paddingInner:ct,round:pt,align:Bt}=j;let ae,pe,Te=at[0];const Ue=at[1]-Te,fn=ut*2,gn=k-ct;ae=Ue/Math.max(1,fn+gn),pt&&(ae=Math.floor(ae)),Te+=(Ue-ae*(k-ct))*Bt,pe=ae*(1-ct),pt&&(Te=Math.round(Te),pe=Math.round(pe));const On=new Array(k).fill(0).map((Rn,wn)=>Te+wn*ae);return{valueStep:ae,valueBandWidth:pe,adjustedRange:On}}class Ma extends es{getDefaultOptions(){return{domain:[],range:[0,1],align:.5,round:!1,paddingInner:0,paddingOuter:0,padding:0,unknown:ts,flex:[]}}constructor(B){super(B)}clone(){return new Ma(this.options)}getStep(B){return this.valueStep===void 0?1:typeof this.valueStep=="number"?this.valueStep:B===void 0?Array.from(this.valueStep.values())[0]:this.valueStep.get(B)}getBandWidth(B){return this.valueBandWidth===void 0?1:typeof this.valueBandWidth=="number"?this.valueBandWidth:B===void 0?Array.from(this.valueBandWidth.values())[0]:this.valueBandWidth.get(B)}getRange(){return this.adjustedRange}getPaddingInner(){const{padding:B,paddingInner:P}=this.options;return B>0?B:P}getPaddingOuter(){const{padding:B,paddingOuter:P}=this.options;return B>0?B:P}rescale(){super.rescale();const{align:B,domain:P,range:k,round:U,flex:at}=this.options,{adjustedRange:ut,valueBandWidth:ct,valueStep:pt}=Wi({align:B,range:k,round:U,flex:at,paddingInner:this.getPaddingInner(),paddingOuter:this.getPaddingOuter(),domain:P});this.valueStep=pt,this.valueBandWidth=ct,this.adjustedRange=ut}}var Ha=y(37547),qs=y(1933),ta=y(39934),Cs=function(j){(0,c.ZT)(B,j);function B(P){var k=this,U=P.style,at=(0,c._T)(P,["style"]);return k=j.call(this,(0,Vt.Z)({},{type:"column"},(0,c.pi)({style:U},at)))||this,k.columnsGroup=new z.ZA({name:"columns"}),k.appendChild(k.columnsGroup),k.render(),k}return B.prototype.render=function(){var P=this.attributes,k=P.columns,U=P.x,at=P.y;this.columnsGroup.style.transform="translate(".concat(U,", ").concat(at,")"),(0,Tt.Ys)(this.columnsGroup).selectAll(".column").data(k.flat()).join(function(ut){return ut.append("rect").attr("className","column").each(function(ct){this.attr(ct)})},function(ut){return ut.each(function(ct){this.attr(ct)})},function(ut){return ut.remove()})},B.prototype.update=function(P){this.attr((0,S.n)({},this.attributes,P)),this.render()},B.prototype.clear=function(){this.removeChildren()},B}(z.s$),Eo=function(j){(0,c.ZT)(B,j);function B(P){var k=this,U=P.style,at=(0,c._T)(P,["style"]);return k=j.call(this,(0,Vt.Z)({},{type:"lines"},(0,c.pi)({style:U},at)))||this,k.linesGroup=k.appendChild(new z.ZA),k.areasGroup=k.appendChild(new z.ZA),k.render(),k}return B.prototype.render=function(){var P=this.attributes,k=P.lines,U=P.areas,at=P.x,ut=P.y;this.style.transform="translate(".concat(at,", ").concat(ut,")"),k&&this.renderLines(k),U&&this.renderAreas(U)},B.prototype.clear=function(){this.linesGroup.removeChildren(),this.areasGroup.removeChildren()},B.prototype.update=function(P){this.attr((0,S.n)({},this.attributes,P)),this.render()},B.prototype.renderLines=function(P){(0,Tt.Ys)(this.linesGroup).selectAll(".line").data(P).join(function(k){return k.append("path").attr("className","line").each(function(U){this.attr(U)})},function(k){return k.each(function(U){this.attr(U)})},function(k){return k.remove()})},B.prototype.renderAreas=function(P){(0,Tt.Ys)(this.linesGroup).selectAll(".area").data(P).join(function(k){return k.append("path").attr("className","area").each(function(U){this.attr(U)})},function(k){return k.each(function(U){this.style(U)})},function(k){return k.remove()})},B}(z.s$),xo=y(62099);function wo(j,B,P,k){var U,at=[],ut=!!k,ct,pt,Bt=[1/0,1/0],ae=[-1/0,-1/0],pe,Te,Fe;if(ut){U=(0,c.CR)(k,2),Bt=U[0],ae=U[1];for(var Ue=0,fn=j.length;Ue<fn;Ue+=1){var gn=j[Ue];Bt=Tn(Bt,gn),ae=$e(ae,gn)}}for(var Ue=0,On=j.length;Ue<On;Ue+=1){var gn=j[Ue];if(Ue===0&&!P)Fe=gn;else if(Ue===On-1&&!P)Te=gn,at.push(Fe),at.push(Te);else{var Rn=[Ue?Ue-1:On-1,Ue-1][P?0:1];ct=j[Rn],pt=j[P?(Ue+1)%On:Ue+1];var wn=[0,0];wn=pn(pt,ct),wn=rn(wn,B);var Fn=mn(gn,ct),Gn=mn(gn,pt),Xn=Fn+Gn;Xn!==0&&(Fn/=Xn,Gn/=Xn);var rr=rn(wn,-Fn),mr=rn(wn,Gn);Te=Xe(gn,rr),pe=Xe(gn,mr),pe=Tn(pe,$e(pt,gn)),pe=$e(pe,Tn(pt,gn)),rr=pn(pe,gn),rr=rn(rr,-Fn/Gn),Te=Xe(gn,rr),Te=Tn(Te,$e(ct,gn)),Te=$e(Te,Tn(ct,gn)),mr=pn(gn,Te),mr=rn(mr,Gn/Fn),pe=Xe(gn,mr),ut&&(Te=$e(Te,Bt),Te=Tn(Te,ae),pe=$e(pe,Bt),pe=Tn(pe,ae)),at.push(Fe),at.push(Te),Fe=pe}}return P&&at.push(at.shift()),at}function ds(j,B,P){var k;B===void 0&&(B=!1),P===void 0&&(P=[[0,0],[1,1]]);for(var U=!!B,at=[],ut=0,ct=j.length;ut<ct;ut+=2)at.push([j[ut],j[ut+1]]);for(var pt=wo(at,.4,U,P),Bt=at.length,ae=[],pe,Te,Fe,ut=0;ut<Bt-1;ut+=1)pe=pt[ut*2],Te=pt[ut*2+1],Fe=at[ut+1],ae.push(["C",pe[0],pe[1],Te[0],Te[1],Fe[0],Fe[1]]);return U&&(pe=pt[Bt],Te=pt[Bt+1],k=(0,c.CR)(at,1),Fe=k[0],ae.push(["C",pe[0],pe[1],Te[0],Te[1],Fe[0],Fe[1]])),ae}function ns(j,B){var P,k=B.x,U=B.y,at=(0,c.CR)(U.getOptions().range||[0,0],2),ut=at[0],ct=at[1];return ct>ut&&(P=(0,c.CR)([ut,ct],2),ct=P[0],ut=P[1]),j.map(function(pt){var Bt=pt.map(function(ae,pe){return[k.map(pe),(0,_.Z)(U.map(ae),ct,ut)]});return Bt})}function ii(j,B){B===void 0&&(B=!1);var P=B?j.length-1:0,k=j.map(function(U,at){return(0,c.ev)([at===P?"M":"L"],(0,c.CR)(U),!1)});return B?k.reverse():k}function da(j,B){if(B===void 0&&(B=!1),j.length<=2)return ii(j);for(var P=[],k=j.length,U=0;U<k;U+=1){var at=B?j[k-U-1]:j[U];(0,xo.Z)(at,P.slice(-2))||P.push.apply(P,(0,c.ev)([],(0,c.CR)(at),!1))}var ut=ds(P,!1);return B?ut.unshift((0,c.ev)(["M"],(0,c.CR)(j[k-1]),!1)):ut.unshift((0,c.ev)(["M"],(0,c.CR)(j[0]),!1)),ut}function Mi(j,B,P){var k=(0,Ha.Z)(j);return k.push(["L",B,P],["L",0,P],["Z"]),k}function Zo(j,B,P,k){return j.map(function(U){return Mi(B?da(U):ii(U),P,k)})}function zs(j,B,P){for(var k=[],U=j.length-1;U>=0;U-=1){var at=j[U],ut=ii(at),ct=void 0;if(U===0)ct=Mi(ut,B,P);else{var pt=j[U-1],Bt=ii(pt,!0);Bt[0][0]="L",ct=(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(ut),!1),(0,c.CR)(Bt),!1),[["Z"]],!1)}k.push(ct)}return k}function to(j,B,P){for(var k=[],U=j.length-1;U>=0;U-=1){var at=j[U],ut=da(at),ct=void 0;if(U===0)ct=Mi(ut,B,P);else{var pt=j[U-1],Bt=da(pt,!0),ae=at[0];Bt[0][0]="L",ct=(0,c.ev)((0,c.ev)((0,c.ev)([],(0,c.CR)(ut),!1),(0,c.CR)(Bt),!1),[(0,c.ev)(["M"],(0,c.CR)(ae),!1),["Z"]],!1)}k.push(ct)}return k}var Ns=y(59895),zo=function(j,B){if((0,ta.Z)(j)){for(var P,k=1/0,U=0;U<j.length;U++){var at=j[U],ut=(0,We.Z)(B)?B(at):at[B];ut<k&&(P=at,k=ut)}return P}},js=y(82639),Ps=function(j,B){if((0,ta.Z)(j)){for(var P,k=-1/0,U=0;U<j.length;U++){var at=j[U],ut=(0,We.Z)(B)?B(at):at[B];ut>k&&(P=at,k=ut)}return P}};function eo(j){return j.length===0?[0,0]:[(0,Ns.Z)(zo(j,function(B){return(0,Ns.Z)(B)||0})),(0,js.Z)(Ps(j,function(B){return(0,js.Z)(B)||0}))]}function Ba(j){for(var B=(0,Ha.Z)(j),P=B[0].length,k=(0,c.CR)([Array(P).fill(0),Array(P).fill(0)],2),U=k[0],at=k[1],ut=0;ut<B.length;ut+=1)for(var ct=B[ut],pt=0;pt<P;pt+=1)ct[pt]>=0?(ct[pt]+=U[pt],U[pt]=ct[pt]):(ct[pt]+=at[pt],at[pt]=ct[pt]);return B}var Ws=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,P,{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(B.prototype,"rawData",{get:function(){var P=this.attributes.data;if(!P||(P==null?void 0:P.length)===0)return[[]];var k=(0,Ha.Z)(P);return(0,qs.Z)(k[0])?[k]:k},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"data",{get:function(){return this.attributes.isStack?Ba(this.rawData):this.rawData},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"scales",{get:function(){return this.createScales(this.data)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"baseline",{get:function(){var P=this.scales.y,k=(0,c.CR)(P.getOptions().domain||[0,0],2),U=k[0],at=k[1];return at<0?P.map(at):P.map(U<0?0:U)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"containerShape",{get:function(){var P=this.attributes,k=P.width,U=P.height;return{width:k,height:U}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"linesStyle",{get:function(){var P=this,k=this.attributes,U=k.type,at=k.isStack,ut=k.smooth;if(U!=="line")throw new Error("linesStyle can only be used in line type");var ct=(0,M.zs)(this.attributes,"area"),pt=(0,M.zs)(this.attributes,"line"),Bt=this.containerShape.width,ae=this.data;if(ae[0].length===0)return{lines:[],areas:[]};var pe=this.scales,Te=pe.x,Fe=pe.y,Ue=ns(ae,{type:"line",x:Te,y:Fe}),fn=[];if(ct){var gn=this.baseline;at?fn=ut?to(Ue,Bt,gn):zs(Ue,Bt,gn):fn=Zo(Ue,ut,Bt,gn)}return{lines:Ue.map(function(On,Rn){return(0,c.pi)({stroke:P.getColor(Rn),d:ut?da(On):ii(On)},pt)}),areas:fn.map(function(On,Rn){return(0,c.pi)({d:On,fill:P.getColor(Rn)},ct)})}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"columnsStyle",{get:function(){var P=this,k=(0,M.zs)(this.attributes,"column"),U=this.attributes,at=U.isStack,ut=U.type,ct=U.scale;if(ut!=="column")throw new Error("columnsStyle can only be used in column type");var pt=this.containerShape.height,Bt=this.rawData;if(!Bt)return{columns:[]};at&&(Bt=Ba(Bt));var ae=this.createScales(Bt),pe=ae.x,Te=ae.y,Fe=(0,c.CR)(eo(Bt),2),Ue=Fe[0],fn=Fe[1],gn=new Da({domain:[0,fn-(Ue>0?0:Ue)],range:[0,pt*ct]}),On=pe.getBandWidth(),Rn=this.rawData;return{columns:Bt.map(function(wn,Fn){return wn.map(function(Gn,Xn){var rr=On/Bt.length,mr=function(){return{x:pe.map(Xn)+rr*Fn,y:Gn>=0?Te.map(Gn):Te.map(0),width:rr,height:gn.map(Math.abs(Gn))}},Dr=function(){return{x:pe.map(Xn),y:Te.map(Gn),width:On,height:gn.map(Rn[Fn][Xn])}};return(0,c.pi)((0,c.pi)({fill:P.getColor(Fn)},k),at?Dr():mr())})})}},enumerable:!1,configurable:!0}),B.prototype.render=function(P,k){(0,Tt.OV)(k,".container","rect").attr("className","container").node();var U=P.type,at=P.x,ut=P.y,ct="spark".concat(U),pt=(0,c.pi)({x:at,y:ut},U==="line"?this.linesStyle:this.columnsStyle);(0,Tt.Ys)(k).selectAll(".spark").data([U]).join(function(Bt){return Bt.append(function(ae){return ae==="line"?new Eo({className:ct,style:pt}):new Cs({className:ct,style:pt})}).attr("className","spark ".concat(ct))},function(Bt){return Bt.update(pt)},function(Bt){return Bt.remove()})},B.prototype.getColor=function(P){var k=this.attributes.color;return(0,ta.Z)(k)?k[P%k.length]:(0,We.Z)(k)?k.call(null,P):k},B.prototype.createScales=function(P){var k,U,at=this.attributes,ut=at.type,ct=at.scale,pt=at.range,Bt=pt===void 0?[]:pt,ae=at.spacing,pe=this.containerShape,Te=pe.width,Fe=pe.height,Ue=(0,c.CR)(eo(P),2),fn=Ue[0],gn=Ue[1],On=new Da({domain:[(k=Bt[0])!==null&&k!==void 0?k:fn,(U=Bt[1])!==null&&U!==void 0?U:gn],range:[Fe,Fe*(1-ct)]});return ut==="line"?{type:ut,x:new Da({domain:[0,P[0].length-1],range:[0,Te]}),y:On}:{type:ut,x:new Ma({domain:P[0].map(function(Rn,wn){return wn}),range:[0,Te],paddingInner:ae,paddingOuter:ae/2,align:.5}),y:On}},B.tag="sparkline",B}(I.w),Mo={fill:"#fff",lineWidth:1,radius:2,size:10,stroke:"#bfbfbf",strokeOpacity:1,zIndex:0},no={fill:"#000",fillOpacity:.45,fontSize:12,textAlign:"center",textBaseline:"middle",zIndex:1},ro={x:0,y:0,orientation:"horizontal",showLabel:!0,type:"start"},Pa=(0,fe.A)({foreground:"foreground",handle:"handle",selection:"selection",sparkline:"sparkline",sparklineGroup:"sparkline-group",track:"track",brushArea:"brush-area"},"slider"),fa=(0,fe.A)({labelGroup:"label-group",label:"label",iconGroup:"icon-group",icon:"icon",iconRect:"icon-rect",iconLine:"icon-line"},"handle"),ks=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return B.prototype.render=function(P,k){var U=P.x,at=P.y,ut=P.size,ct=ut===void 0?10:ut,pt=P.radius,Bt=pt===void 0?ct/4:pt,ae=P.orientation,pe=P.classNamePrefix,Te=(0,c._T)(P,["x","y","size","radius","orientation","classNamePrefix"]),Fe=ct,Ue=Fe*2.4,fn=pe?"".concat(fa.iconRect.name," ").concat(pe,"handle-icon-rect"):fa.iconRect.name,gn=function(Xn){return pe?"".concat(fa.iconLine,"-").concat(Xn," ").concat(pe,"handle-icon-line"):"".concat(fa.iconLine,"-").concat(Xn)},On=(0,Tt.Ys)(k).maybeAppendByClassName(fa.iconRect,"rect").attr("className",fn).styles((0,c.pi)((0,c.pi)({},Te),{width:Fe,height:Ue,radius:Bt,x:U-Fe/2,y:at-Ue/2,transformOrigin:"center"})),Rn=U+1/3*Fe-Fe/2,wn=U+2/3*Fe-Fe/2,Fn=at+1/4*Ue-Ue/2,Gn=at+3/4*Ue-Ue/2;On.maybeAppendByClassName("".concat(fa.iconLine,"-1"),"line").attr("className",gn(1)).styles((0,c.pi)({x1:Rn,x2:Rn,y1:Fn,y2:Gn},Te)),On.maybeAppendByClassName("".concat(fa.iconLine,"-2"),"line").attr("className",gn(2)).styles((0,c.pi)({x1:wn,x2:wn,y1:Fn,y2:Gn},Te)),ae==="vertical"&&(On.node().style.transform="rotate(90)")},B}(I.w),Fi=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,P,ro)||this}return B.prototype.renderLabel=function(P){var k=this,U=this.attributes,at=U.x,ut=U.y,ct=U.showLabel,pt=(0,M.zs)(this.attributes,"label"),Bt=pt.x,ae=Bt===void 0?0:Bt,pe=pt.y,Te=pe===void 0?0:pe,Fe=pt.transform,Ue=pt.transformOrigin,fn=(0,c._T)(pt,["x","y","transform","transformOrigin"]),gn=(0,c.CR)((0,M.Hm)(fn,[]),2),On=gn[0],Rn=gn[1],wn=(0,Tt.Ys)(P).maybeAppendByClassName(fa.labelGroup,"g").styles(Rn),Fn=(0,c.pi)((0,c.pi)({},no),On),Gn=Fn.text,Xn=(0,c._T)(Fn,["text"]);(0,J.z)(!!ct,wn,function(rr){k.label=rr.maybeAppendByClassName(fa.label,"text").styles((0,c.pi)((0,c.pi)({},Xn),{x:at+ae,y:ut+Te,transform:Fe,transformOrigin:Ue,text:"".concat(Gn)})),k.label.on("mousedown",function(mr){mr.stopPropagation()}),k.label.on("touchstart",function(mr){mr.stopPropagation()})})},B.prototype.renderIcon=function(P){var k=this.attributes,U=k.x,at=k.y,ut=k.orientation,ct=k.type,pt=k.classNamePrefix,Bt=(0,c.pi)((0,c.pi)({x:U,y:at,orientation:ut,classNamePrefix:pt},Mo),(0,M.zs)(this.attributes,"icon")),ae=this.attributes.iconShape,pe=ae===void 0?function(){return new ks({style:Bt})}:ae,Te=(0,Tt.Ys)(P).maybeAppendByClassName(fa.iconGroup,"g");Te.selectAll(fa.icon.class).data([pe]).join(function(Fe){return Fe.append(typeof pe=="string"?pe:function(){return pe(ct)}).attr("className",fa.icon.name)},function(Fe){return Fe.update(Bt)},function(Fe){return Fe.remove()})},B.prototype.render=function(P,k){this.renderIcon(k),this.renderLabel(k)},B}(I.w),io=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,P,(0,c.pi)((0,c.pi)((0,c.pi)({x:0,y:0,animate:{duration:100,fill:"both"},brushable:!0,formatter:function(U){return U.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},(0,M.dq)(ro,"handle")),(0,M.dq)(Mo,"handleIcon")),(0,M.dq)(no,"handleLabel")))||this;return k.range=[0,1],k.onDragStart=function(U){return function(at){at.stopPropagation(),k.target=U,k.prevPos=k.getOrientVal(ba(at));var ut=k.availableSpace,ct=ut.x,pt=ut.y,Bt=k.getBBox(),ae=Bt.x,pe=Bt.y;k.selectionStartPos=k.getRatio(k.prevPos-k.getOrientVal([ct,pt])-k.getOrientVal([+ae,+pe])),k.selectionWidth=0,document.addEventListener("pointermove",k.onDragging),document.addEventListener("pointerup",k.onDragEnd)}},k.onDragging=function(U){var at=k.attributes,ut=at.slidable,ct=at.brushable,pt=at.type;U.stopPropagation();var Bt=k.getOrientVal(ba(U)),ae=Bt-k.prevPos;if(ae){var pe=k.getRatio(ae);switch(k.target){case"start":ut&&k.setValuesOffset(pe);break;case"end":ut&&k.setValuesOffset(0,pe);break;case"selection":ut&&k.setValuesOffset(pe,pe);break;case"track":if(!ct)return;k.selectionWidth+=pe,pt==="range"?k.innerSetValues([k.selectionStartPos,k.selectionStartPos+k.selectionWidth].sort(),!0):k.innerSetValues([0,k.selectionStartPos+k.selectionWidth],!0);break;default:break}k.prevPos=Bt}},k.onDragEnd=function(){document.removeEventListener("pointermove",k.onDragging),document.removeEventListener("pointermove",k.onDragging),document.removeEventListener("pointerup",k.onDragEnd),k.target="",k.updateHandlesPosition(!1)},k.onValueChange=function(U){var at=k.attributes,ut=at.onChange,ct=at.type,pt=ct==="range"?U:U[1],Bt=ct==="range"?k.getValues():k.getValues()[1],ae=new z.Aw("valuechange",{detail:{oldValue:pt,value:Bt}});k.dispatchEvent(ae),ut==null||ut(Bt)},k.selectionStartPos=0,k.selectionWidth=0,k.prevPos=0,k.target="",k}return Object.defineProperty(B.prototype,"values",{get:function(){return this.attributes.values},set:function(P){this.attributes.values=this.clampValues(P)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"sparklineStyle",{get:function(){var P=this.attributes.orientation;if(P!=="horizontal")return null;var k=(0,M.zs)(this.attributes,"sparkline");return(0,c.pi)((0,c.pi)({zIndex:0},this.availableSpace),k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"shape",{get:function(){var P=this.attributes,k=P.trackLength,U=P.trackSize,at=(0,c.CR)(this.getOrientVal([[k,U],[U,k]]),2),ut=at[0],ct=at[1];return{width:ut,height:ct}},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"availableSpace",{get:function(){var P=this.attributes,k=P.x,U=P.y,at=P.padding,ut=(0,c.CR)((0,K.j)(at),4),ct=ut[0],pt=ut[1],Bt=ut[2],ae=ut[3],pe=this.shape,Te=pe.width,Fe=pe.height;return{x:ae,y:ct,width:Te-(ae+pt),height:Fe-(ct+Bt)}},enumerable:!1,configurable:!0}),B.prototype.getValues=function(){return this.values},B.prototype.setValues=function(P,k){P===void 0&&(P=[0,0]),k===void 0&&(k=!1),this.attributes.values=P;var U=k===!1?!1:this.attributes.animate;this.updateSelectionArea(U),this.updateHandlesPosition(U)},B.prototype.updateSelectionArea=function(P){var k=this.calcSelectionArea();this.foregroundGroup.selectAll(Pa.selection.class).each(function(U,at){(0,ft.eR)(this,k[at],P)})},B.prototype.updateHandlesPosition=function(P){this.attributes.showHandle&&(this.startHandle&&(0,ft.eR)(this.startHandle,this.getHandleStyle("start"),P),this.endHandle&&(0,ft.eR)(this.endHandle,this.getHandleStyle("end"),P))},B.prototype.innerSetValues=function(P,k){P===void 0&&(P=[0,0]),k===void 0&&(k=!1);var U=this.values,at=this.clampValues(P);this.attributes.values=at,this.setValues(at),k&&this.onValueChange(U)},B.prototype.renderTrack=function(P){var k=this.attributes,U=k.x,at=k.y,ut=(0,M.zs)(this.attributes,"track");this.trackShape=(0,Tt.Ys)(P).maybeAppendByClassName(Pa.track,"rect").styles((0,c.pi)((0,c.pi)({x:U,y:at},this.shape),ut))},B.prototype.renderBrushArea=function(P){var k=this.attributes,U=k.x,at=k.y,ut=k.brushable;this.brushArea=(0,Tt.Ys)(P).maybeAppendByClassName(Pa.brushArea,"rect").styles((0,c.pi)({x:U,y:at,fill:"transparent",cursor:ut?"crosshair":"default"},this.shape))},B.prototype.renderSparkline=function(P){var k=this,U=this.attributes,at=U.x,ut=U.y,ct=U.orientation,pt=(0,Tt.Ys)(P).maybeAppendByClassName(Pa.sparklineGroup,"g");(0,J.z)(ct==="horizontal",pt,function(Bt){var ae=(0,c.pi)((0,c.pi)({},k.sparklineStyle),{x:at,y:ut});Bt.maybeAppendByClassName(Pa.sparkline,function(){return new Ws({style:ae})}).update(ae)})},B.prototype.renderHandles=function(){var P=this,k,U=this.attributes,at=U.showHandle,ut=U.type,ct=ut==="range"?["start","end"]:["end"],pt=at?ct:[],Bt=this;(k=this.foregroundGroup)===null||k===void 0||k.selectAll(Pa.handle.class).data(pt.map(function(ae){return{type:ae}}),function(ae){return ae.type}).join(function(ae){return ae.append(function(pe){var Te=pe.type;return new Fi({style:P.getHandleStyle(Te)})}).each(function(pe){var Te=pe.type;this.attr("class","".concat(Pa.handle.name," ").concat(Te,"-handle"));var Fe="".concat(Te,"Handle");Bt[Fe]=this,this.addEventListener("pointerdown",Bt.onDragStart(Te))})},function(ae){return ae.each(function(pe){var Te=pe.type;this.update(Bt.getHandleStyle(Te))})},function(ae){return ae.each(function(pe){var Te=pe.type,Fe="".concat(Te,"Handle");Bt[Fe]=void 0}).remove()})},B.prototype.renderSelection=function(P){var k=this.attributes,U=k.x,at=k.y,ut=k.type,ct=k.selectionType;this.foregroundGroup=(0,Tt.Ys)(P).maybeAppendByClassName(Pa.foreground,"g");var pt=(0,M.zs)(this.attributes,"selection"),Bt=function(pe){return pe.style("visibility",function(Te){return Te.show?"visible":"hidden"}).style("cursor",function(Te){return ct==="select"?"grab":ct==="invert"?"crosshair":"default"}).styles((0,c.pi)((0,c.pi)({},pt),{transform:"translate(".concat(U,", ").concat(at,")")}))},ae=this;this.foregroundGroup.selectAll(Pa.selection.class).data(ut==="value"?[]:this.calcSelectionArea().map(function(pe,Te){return{style:(0,c.pi)({},pe),index:Te,show:ct==="select"?Te===1:Te!==1}}),function(pe){return pe.index}).join(function(pe){return pe.append("rect").attr("className",Pa.selection.name).call(Bt).each(function(Te,Fe){var Ue=this;Fe===1?(ae.selectionShape=(0,Tt.Ys)(this),this.on("pointerdown",function(fn){Ue.attr("cursor","grabbing"),ae.onDragStart("selection")(fn)}),ae.dispatchCustomEvent(this,"pointerenter","selectionMouseenter"),ae.dispatchCustomEvent(this,"pointerleave","selectionMouseleave"),ae.dispatchCustomEvent(this,"click","selectionClick"),this.addEventListener("pointerdown",function(){Ue.attr("cursor","grabbing")}),this.addEventListener("pointerup",function(){Ue.attr("cursor","pointer")}),this.addEventListener("pointerover",function(){Ue.attr("cursor","pointer")})):this.on("pointerdown",ae.onDragStart("track"))})},function(pe){return pe.call(Bt)},function(pe){return pe.remove()}),this.updateSelectionArea(!1),this.renderHandles()},B.prototype.render=function(P,k){this.renderTrack(k),this.renderSparkline(k),this.renderBrushArea(k),this.renderSelection(k)},B.prototype.clampValues=function(P,k){var U;k===void 0&&(k=4);var at=(0,c.CR)(this.range,2),ut=at[0],ct=at[1],pt=(0,c.CR)(this.getValues().map(function(gn){return ws(gn,k)}),2),Bt=pt[0],ae=pt[1],pe=Array.isArray(P)?P:[Bt,P!=null?P:ae],Te=(0,c.CR)((pe||[Bt,ae]).map(function(gn){return ws(gn,k)}),2),Fe=Te[0],Ue=Te[1];if(this.attributes.type==="value")return[0,(0,_.Z)(Ue,ut,ct)];Fe>Ue&&(U=(0,c.CR)([Ue,Fe],2),Fe=U[0],Ue=U[1]);var fn=Ue-Fe;return fn>ct-ut?[ut,ct]:Fe<ut?Bt===ut&&ae===Ue?[ut,Ue]:[ut,fn+ut]:Ue>ct?ae===ct&&Bt===Fe?[Fe,ct]:[ct-fn,ct]:[Fe,Ue]},B.prototype.calcSelectionArea=function(P){var k=(0,c.CR)(this.clampValues(P),2),U=k[0],at=k[1],ut=this.availableSpace,ct=ut.x,pt=ut.y,Bt=ut.width,ae=ut.height;return this.getOrientVal([[{y:pt,height:ae,x:ct,width:U*Bt},{y:pt,height:ae,x:U*Bt+ct,width:(at-U)*Bt},{y:pt,height:ae,x:at*Bt,width:(1-at)*Bt}],[{x:ct,width:Bt,y:pt,height:U*ae},{x:ct,width:Bt,y:U*ae+pt,height:(at-U)*ae},{x:ct,width:Bt,y:at*ae,height:(1-at)*ae}]])},B.prototype.calcHandlePosition=function(P){var k=this.attributes.handleIconOffset,U=this.availableSpace,at=U.x,ut=U.y,ct=U.width,pt=U.height,Bt=(0,c.CR)(this.clampValues(),2),ae=Bt[0],pe=Bt[1],Te=P==="start"?-k:k,Fe=(P==="start"?ae:pe)*this.getOrientVal([ct,pt])+Te;return{x:at+this.getOrientVal([Fe,ct/2]),y:ut+this.getOrientVal([pt/2,Fe])}},B.prototype.inferTextStyle=function(P){var k=this.attributes.orientation;return k==="horizontal"?{}:P==="start"?{transformOrigin:"left center",transform:"rotate(90)",textAlign:"start"}:P==="end"?{transformOrigin:"right center",transform:"rotate(90)",textAlign:"end"}:{}},B.prototype.calcHandleText=function(P){var k,U=this.attributes,at=U.type,ut=U.orientation,ct=U.formatter,pt=U.autoFitLabel,Bt=(0,M.zs)(this.attributes,"handle"),ae=(0,M.zs)(Bt,"label"),pe=Bt.spacing,Te=this.getHandleSize(),Fe=this.clampValues(),Ue=P==="start"?Fe[0]:Fe[1],fn=ct(Ue),gn=new os.x({style:(0,c.pi)((0,c.pi)((0,c.pi)({},ae),this.inferTextStyle(P)),{text:fn})}),On=gn.getBBox(),Rn=On.width,wn=On.height;if(gn.destroy(),!pt){if(at==="value")return{text:fn,x:0,y:-wn-pe};var Fn=pe+Te+(ut==="horizontal"?Rn/2:0);return k={text:fn},k[ut==="horizontal"?"x":"y"]=P==="start"?-Fn:Fn,k}var Gn=0,Xn=0,rr=this.availableSpace,mr=rr.width,Dr=rr.height,ai=this.calcSelectionArea()[1],ci=ai.x,Vr=ai.y,Er=ai.width,Br=ai.height,Cr=pe+Te;if(ut==="horizontal"){var Hr=Cr+Rn/2;if(P==="start"){var mi=ci-Cr-Rn;Gn=mi>0?-Hr:Hr}else{var wr=mr-ci-Er-Cr>Rn;Gn=wr?Hr:-Hr}}else{var si=Cr,Jr=wn+Cr;P==="start"?Xn=Vr-Te>wn?-Jr:si:Xn=Dr-(Vr+Br)-Te>wn?Jr:-si}return{x:Gn,y:Xn,text:fn}},B.prototype.getHandleLabelStyle=function(P){var k=(0,M.zs)(this.attributes,"handleLabel");return(0,c.pi)((0,c.pi)((0,c.pi)({},k),this.calcHandleText(P)),this.inferTextStyle(P))},B.prototype.getHandleIconStyle=function(){var P=this.attributes.handleIconShape,k=(0,M.zs)(this.attributes,"handleIcon"),U=this.getOrientVal(["ew-resize","ns-resize"]),at=this.getHandleSize();return(0,c.pi)({cursor:U,shape:P,size:at},k)},B.prototype.getHandleStyle=function(P){var k=this.attributes,U=k.x,at=k.y,ut=k.showLabel,ct=k.showLabelOnInteraction,pt=k.orientation,Bt=this.calcHandlePosition(P),ae=Bt.x,pe=Bt.y,Te=this.calcHandleText(P),Fe=ut;return!ut&&ct&&(this.target?Fe=!0:Fe=!1),(0,c.pi)((0,c.pi)((0,c.pi)({},(0,M.dq)(this.getHandleIconStyle(),"icon")),(0,M.dq)((0,c.pi)((0,c.pi)({},this.getHandleLabelStyle(P)),Te),"label")),{transform:"translate(".concat(ae+U,", ").concat(pe+at,")"),orientation:pt,showLabel:Fe,type:P,zIndex:3})},B.prototype.getHandleSize=function(){var P=this.attributes,k=P.handleIconSize,U=P.width,at=P.height;return k||Math.floor((this.getOrientVal([+at,+U])+4)/2.4)},B.prototype.getOrientVal=function(P){var k=(0,c.CR)(P,2),U=k[0],at=k[1],ut=this.attributes.orientation;return ut==="horizontal"?U:at},B.prototype.setValuesOffset=function(P,k){k===void 0&&(k=0);var U=this.attributes.type,at=(0,c.CR)(this.getValues(),2),ut=at[0],ct=at[1],pt=U==="range"?P:0,Bt=[ut+pt,ct+k].sort();this.innerSetValues(Bt,!0)},B.prototype.getRatio=function(P){var k=this.availableSpace,U=k.width,at=k.height;return P/this.getOrientVal([U,at])},B.prototype.dispatchCustomEvent=function(P,k,U){var at=this;P.on(k,function(ut){ut.stopPropagation(),at.dispatchEvent(new z.Aw(U,{detail:ut}))})},B.prototype.bindEvents=function(){this.addEventListener("wheel",this.onScroll);var P=this.brushArea;this.dispatchCustomEvent(P,"click","trackClick"),this.dispatchCustomEvent(P,"pointerenter","trackMouseenter"),this.dispatchCustomEvent(P,"pointerleave","trackMouseleave"),P.on("pointerdown",this.onDragStart("track"))},B.prototype.onScroll=function(P){var k=this.attributes.scrollable;if(k){var U=P.deltaX,at=P.deltaY,ut=at||U,ct=this.getRatio(ut);this.setValuesOffset(ct,ct)}},B.tag="slider",B}(I.w),fs=y(92387),Rs={backgroundFill:"#262626",backgroundLineCap:"round",backgroundLineWidth:1,backgroundStroke:"#333",backgroundZIndex:-1,formatter:function(j){return j.toString()},labelFill:"#fff",labelFontSize:12,labelTextBaseline:"middle",padding:[2,4],position:"right",radius:0,zIndex:999},Gs=(0,fe.A)({background:"background",labelGroup:"label-group",label:"label"},"indicator"),el=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,P,Rs)||this;return k.point=[0,0],k.group=k.appendChild(new z.ZA({})),k.isMutationObserved=!0,k}return B.prototype.renderBackground=function(){if(this.label){var P=this.attributes,k=P.position,U=P.padding,at=(0,c.CR)((0,K.j)(U),4),ut=at[0],ct=at[1],pt=at[2],Bt=at[3],ae=this.label.node().getLocalBounds(),pe=ae.min,Te=ae.max,Fe=new R.b(pe[0]-Bt,pe[1]-ut,Te[0]+ct-pe[0]+Bt,Te[1]+pt-pe[1]+ut),Ue=this.getPath(k,Fe),fn=(0,M.zs)(this.attributes,"background");this.background=(0,Tt.Ys)(this.group).maybeAppendByClassName(Gs.background,"path").styles((0,c.pi)((0,c.pi)({},fn),{d:Ue})),this.group.appendChild(this.label.node())}},B.prototype.renderLabel=function(){var P=this.attributes,k=P.formatter,U=P.labelText,at=(0,M.zs)(this.attributes,"label"),ut=(0,c.CR)((0,M.Hm)(at),2),ct=ut[0],pt=ut[1],Bt=ct.text,ae=(0,c._T)(ct,["text"]);if(this.label=(0,Tt.Ys)(this.group).maybeAppendByClassName(Gs.labelGroup,"g").styles(pt),!!U){var pe=this.label.maybeAppendByClassName(Gs.label,function(){return(0,Ne.S)(k(U))}).style("text",k(U).toString());pe.selectAll("text").styles(ae)}},B.prototype.adjustLayout=function(){var P=(0,c.CR)(this.point,2),k=P[0],U=P[1],at=this.attributes,ut=at.x,ct=at.y;this.group.attr("transform","translate(".concat(ut-k,", ").concat(ct-U,")"))},B.prototype.getPath=function(P,k){var U=this.attributes.radius,at=k.x,ut=k.y,ct=k.width,pt=k.height,Bt=[["M",at+U,ut],["L",at+ct-U,ut],["A",U,U,0,0,1,at+ct,ut+U],["L",at+ct,ut+pt-U],["A",U,U,0,0,1,at+ct-U,ut+pt],["L",at+U,ut+pt],["A",U,U,0,0,1,at,ut+pt-U],["L",at,ut+U],["A",U,U,0,0,1,at+U,ut],["Z"]],ae={top:4,right:6,bottom:0,left:2},pe=ae[P],Te=this.createCorner([Bt[pe].slice(-2),Bt[pe+1].slice(-2)]);return Bt.splice.apply(Bt,(0,c.ev)([pe+1,1],(0,c.CR)(Te),!1)),Bt[0][0]="M",Bt},B.prototype.createCorner=function(P,k){k===void 0&&(k=10);var U=.8,at=ye.wE.apply(void 0,(0,c.ev)([],(0,c.CR)(P),!1)),ut=(0,c.CR)(P,2),ct=(0,c.CR)(ut[0],2),pt=ct[0],Bt=ct[1],ae=(0,c.CR)(ut[1],2),pe=ae[0],Te=ae[1],Fe=(0,c.CR)(at?[pe-pt,[pt,pe]]:[Te-Bt,[Bt,Te]],2),Ue=Fe[0],fn=(0,c.CR)(Fe[1],2),gn=fn[0],On=fn[1],Rn=Ue/2,wn=Ue/Math.abs(Ue),Fn=k*wn,Gn=Fn/2,Xn=Fn*Math.sqrt(3)/2*U,rr=(0,c.CR)([gn,gn+Rn-Gn,gn+Rn,gn+Rn+Gn,On],5),mr=rr[0],Dr=rr[1],ai=rr[2],ci=rr[3],Vr=rr[4];return at?(this.point=[ai,Bt-Xn],[["L",mr,Bt],["L",Dr,Bt],["L",ai,Bt-Xn],["L",ci,Bt],["L",Vr,Bt]]):(this.point=[pt+Xn,ai],[["L",pt,mr],["L",pt,Dr],["L",pt+Xn,ai],["L",pt,ci],["L",pt,Vr]])},B.prototype.applyVisibility=function(){var P=this.attributes.visibility;P==="hidden"?(0,Ti.Cp)(this):(0,Ti.$Z)(this)},B.prototype.bindEvents=function(){this.label.on(z.Dk.BOUNDS_CHANGED,this.renderBackground)},B.prototype.render=function(){this.renderLabel(),this.renderBackground(),this.adjustLayout(),this.applyVisibility()},B}(I.w),At=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;return k.hoverColor="#f5f5f5",k.selectedColor="#e6f7ff",k.background=k.appendChild(new z.UL({})),k.label=k.background.appendChild(new z.ZA({})),k}return Object.defineProperty(B.prototype,"padding",{get:function(){return(0,K.j)(this.style.padding)},enumerable:!1,configurable:!0}),B.prototype.renderLabel=function(){var P=this.style,k=P.label,U=P.value,at=(0,M.zs)(this.attributes,"label");(0,Tt.Ys)(this.label).maybeAppend(".label",function(){return(0,Ne.S)(k)}).attr("className","label").styles(at),this.label.attr("__data__",U)},B.prototype.renderBackground=function(){var P=this.label.getBBox(),k=(0,c.CR)(this.padding,4),U=k[0],at=k[1],ut=k[2],ct=k[3],pt=P.width,Bt=P.height,ae=pt+ct+at,pe=Bt+U+ut,Te=(0,M.zs)(this.attributes,"background"),Fe=this.style,Ue=Fe.width,fn=Ue===void 0?0:Ue,gn=Fe.height,On=gn===void 0?0:gn,Rn=Fe.selected;this.background.attr((0,c.pi)((0,c.pi)({},Te),{width:Math.max(ae,fn),height:Math.max(pe,On),fill:Rn?this.selectedColor:"#fff"})),this.label.attr({transform:"translate(".concat(ct,", ").concat((pe-Bt)/2,")")})},B.prototype.render=function(){this.renderLabel(),this.renderBackground()},B.prototype.bindEvents=function(){var P=this;this.addEventListener("pointerenter",function(){P.style.selected||P.background.attr("fill",P.hoverColor)}),this.addEventListener("pointerleave",function(){P.style.selected||P.background.attr("fill",P.style.backgroundFill)});var k=this;this.addEventListener("click",function(){var U=P.style,at=U.label,ut=U.value,ct=U.onClick;ct==null||ct(ut,{label:at,value:ut},k)})},B.defaultOptions={style:{value:"",label:"",cursor:"pointer"}},B}(I.w),X=function(j){(0,c.ZT)(B,j);function B(P){var k,U,at=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;at.currentValue=(k=B.defaultOptions.style)===null||k===void 0?void 0:k.defaultValue,at.isPointerInSelect=!1,at.select=at.appendChild(new z.UL({className:"select",style:{cursor:"pointer",width:0,height:0}})),at.dropdown=at.appendChild(new z.UL({className:"dropdown"}));var ut=at.style.defaultValue;return ut&&(!((U=at.style.options)===null||U===void 0)&&U.some(function(ct){return ct.value===ut}))&&(at.currentValue=ut),at}return B.prototype.setValue=function(P){this.currentValue=P,this.render()},B.prototype.getValue=function(){return this.currentValue},Object.defineProperty(B.prototype,"dropdownPadding",{get:function(){return(0,K.j)(this.style.dropdownPadding)},enumerable:!1,configurable:!0}),B.prototype.renderSelect=function(){var P=this,k,U=this.style,at=U.x,ut=U.y,ct=U.width,pt=U.height,Bt=U.bordered,ae=U.showDropdownIcon,pe=(0,M.zs)(this.attributes,"select"),Te=(0,M.zs)(this.attributes,"placeholder");this.select.attr((0,c.pi)((0,c.pi)({x:at,y:ut,width:ct,height:pt},pe),{fill:"#fff",strokeWidth:Bt?1:0}));var Fe=this.dropdownPadding,Ue=10;ae&&(0,Tt.Ys)(this.select).maybeAppend(".dropdown-icon","path").style("d","M-5,-3.5 L0,3.5 L5,-3.5").style("transform","translate(".concat(at+ct-Ue-Fe[1]-Fe[3],", ").concat(ut+pt/2,")")).style("lineWidth",1).style("stroke",this.select.style.stroke);var fn=(k=this.style.options)===null||k===void 0?void 0:k.find(function(wn){return wn.value===P.currentValue}),gn=(0,c.pi)({x:at+Fe[3]},Te);(0,Tt.Ys)(this.select).selectAll(".placeholder").data(fn?[]:[1]).join(function(wn){return wn.append("text").attr("className","placeholder").styles(gn).style("y",function(){var Fn=this.getBBox();return ut+(pt-Fn.height)/2})},function(wn){return wn.styles(gn)},function(wn){return wn.remove()});var On=(0,M.zs)(this.attributes,"optionLabel"),Rn=(0,c.pi)({x:at+Fe[3]},On);(0,Tt.Ys)(this.select).selectAll(".value").data(fn?[fn]:[]).join(function(wn){return wn.append(function(Fn){return(0,Ne.S)(Fn.label)}).attr("className","value").styles(Rn).style("y",function(){var Fn=this.getBBox();return ut+(pt-Fn.height)/2})},function(wn){return wn.styles(Rn)},function(wn){return wn.remove()})},B.prototype.renderDropdown=function(){var P=this,k,U,at=this.style,ut=at.x,ct=at.y,pt=at.width,Bt=at.height,ae=at.options,pe=at.onSelect,Te=at.open,Fe=(0,M.zs)(this.attributes,"dropdown"),Ue=(0,M.zs)(this.attributes,"option"),fn=this.dropdownPadding;(0,Tt.Ys)(this.dropdown).maybeAppend(".dropdown-container","g").attr("className","dropdown-container").selectAll(".dropdown-item").data(ae,function(Rn){return Rn.value}).join(function(Rn){return Rn.append(function(wn){return new At({className:"dropdown-item",style:(0,c.pi)((0,c.pi)((0,c.pi)({},wn),Ue),{width:pt-fn[1]-fn[3],selected:wn.value===P.currentValue,onClick:function(Fn,Gn,Xn){P.setValue(Fn),pe==null||pe(Fn,Gn,Xn),P.dispatchEvent(new z.Aw("change",{detail:{value:Fn,option:Gn,item:Xn}})),(0,Ti.Cp)(P.dropdown)}})})}).each(function(wn,Fn){var Gn,Xn=(Gn=this.parentNode)===null||Gn===void 0?void 0:Gn.children,rr=Xn.reduce(function(mr,Dr,ai){return ai<Fn&&(mr+=Dr.getBBox().height),mr},0);this.attr("transform","translate(".concat(fn[3],", ").concat(fn[0]+rr,")"))})},function(Rn){return Rn.update(function(wn){return{selected:wn.value===P.currentValue}})},function(Rn){return Rn.remove()});var gn=(U=(k=this.dropdown.getElementsByClassName("dropdown-container"))===null||k===void 0?void 0:k[0])===null||U===void 0?void 0:U.getBBox(),On=Fe.spacing;this.dropdown.attr((0,c.pi)({transform:"translate(".concat(ut,", ").concat(ct+Bt+On,")"),width:gn.width+fn[1]+fn[3],height:gn.height+fn[0]+fn[2]},Fe)),!Te&&(0,Ti.Cp)(this.dropdown)},B.prototype.render=function(){this.renderSelect(),this.renderDropdown()},B.prototype.bindEvents=function(){var P=this;this.addEventListener("click",function(k){k.stopPropagation()}),this.select.addEventListener("click",function(){P.dropdown.style.visibility==="visible"?(0,Ti.Cp)(P.dropdown):(0,Ti.$Z)(P.dropdown)}),this.addEventListener("pointerenter",function(){P.isPointerInSelect=!0}),this.addEventListener("pointerleave",function(){P.isPointerInSelect=!1}),document==null||document.addEventListener("click",function(){P.isPointerInSelect||(0,Ti.Cp)(P.dropdown)})},B.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"}},B}(I.w),ot=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{backgroundOpacity:B.backgroundOpacities.default}},B.defaultOptions,P))||this;return k.showBackground=!0,k.background=k.appendChild(new z.UL({})),k.icon=k.appendChild(new z.ZA({})),k}return Object.defineProperty(B.prototype,"label",{get:function(){return"BaseIcon"},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"lineWidth",{get:function(){return Math.log10(this.attributes.size)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"padding",{get:function(){return(0,K.j)(this.attributes.size/5)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"iconSize",{get:function(){var P=this.attributes.size,k=(0,c.CR)(this.padding,4),U=k[0],at=k[1],ut=k[2],ct=k[3];return Math.max(P-Math.max(ct+at,U+ut),this.lineWidth*2+1)},enumerable:!1,configurable:!0}),B.prototype.renderBackground=function(){var P=this.attributes,k=P.x,U=P.y,at=P.size,ut=at/2,ct=(0,M.zs)(this.attributes,"background");this.background.attr((0,c.pi)({x:k-ut,y:U-ut,width:at,height:at},ct))},B.prototype.showIndicator=function(){if(this.label){var P=this.attributes.size,k=this.background.getBBox(),U=k.x,at=k.y;this.indicator.update({x:U+P/2,y:at-5,labelText:this.label,visibility:"visible"})}},B.prototype.hideIndicator=function(){this.indicator.update({visibility:"hidden"})},B.prototype.connectedCallback=function(){var P;j.prototype.connectedCallback.call(this);var k=this.attributes.size,U=this.background.getBBox(),at=U.x,ut=U.y,ct=(P=this.ownerDocument)===null||P===void 0?void 0:P.defaultView;ct&&(this.indicator=ct.appendChild(new el({style:{x:at+k/2,y:ut-k/2,visibility:"hidden",position:"top",radius:3,zIndex:100}})))},B.prototype.disconnectedCallback=function(){this.indicator.destroy()},B.prototype.render=function(){this.renderIcon(),this.showBackground&&this.renderBackground()},B.prototype.bindEvents=function(){var P=this,k=this.attributes.onClick;if(this.addEventListener("click",function(){k==null||k(P)}),this.showBackground){var U=function(){return P.background.attr({opacity:B.backgroundOpacities.default})},at=function(){return P.background.attr({opacity:B.backgroundOpacities.hover})},ut=function(){return P.background.attr({opacity:B.backgroundOpacities.active})};this.addEventListener("pointerenter",function(){at(),P.showIndicator()}),this.addEventListener("pointerleave",function(){U(),P.hideIndicator()}),this.addEventListener("pointerdown",function(){ut()}),this.addEventListener("pointerup",function(){U()})}},B.tag="IconBase",B.defaultOptions={style:{x:0,y:0,size:10,color:"#565758",backgroundRadius:4,backgroundFill:"#e2e2e2"}},B.backgroundOpacities={default:0,hover:.8,active:1},B}(I.w),xt=function(j,B){return B===void 0&&(B="#565758"),new z.y$({style:{fill:B,d:"M ".concat(j,",").concat(j," L -").concat(j,",0 L ").concat(j,",-").concat(j," Z"),transformOrigin:"center"}})},zt=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return B.prototype.arcPath=function(P,k,U){var at=(0,c.CR)([U,U],2),ut=at[0],ct=at[1],pt=function(fn){return[P+U*Math.cos(fn),k+U*Math.sin(fn)]},Bt=(0,c.CR)(pt(-5/4*Math.PI),2),ae=Bt[0],pe=Bt[1],Te=(0,c.CR)(pt(1/4*Math.PI),2),Fe=Te[0],Ue=Te[1];return"M".concat(ae,",").concat(pe,",A").concat(ut,",").concat(ct,",0,1,1,").concat(Fe,",").concat(Ue)},Object.defineProperty(B.prototype,"label",{get:function(){return"\u91CD\u7F6E"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this.iconSize,ct=this.lineWidth,pt=ct+.5;(0,Tt.Ys)(this.icon).maybeAppend(".reset","path").styles({stroke:at,lineWidth:ct,d:this.arcPath(k,U,ut/2-ct),markerStart:xt(pt,at)})},B}(ot),Qt=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u5FEB\u9000"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this.iconSize,ct=ut/2,pt=ut/2/Math.pow(3,.5),Bt=[[k,U],[k,U-pt],[k-ct,U],[k,U+pt],[k,U],[k+ct,U-pt],[k+ct,U+pt],[k,U]];(0,Tt.Ys)(this.icon).maybeAppend(".backward","polygon").styles({points:Bt,fill:at})},B}(ot),ee=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u5FEB\u8FDB"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this.iconSize,ct=ut/2,pt=ut/2/Math.pow(3,.5),Bt=[[k,U],[k,U-pt],[k+ct,U],[k,U+pt],[k,U],[k-ct,U-pt],[k-ct,U+pt],[k,U]];(0,Tt.Ys)(this.icon).maybeAppend(".forward","polygon").styles({points:Bt,fill:at})},B}(ot),De=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u64AD\u653E"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this.iconSize,ct=ut/3*Math.pow(3,.5)*.8,pt=[[k+ct,U],[k-ct/2,U-ut/2*.8],[k-ct/2,U+ut/2*.8],[k+ct,U]];(0,Tt.Ys)(this.icon).maybeAppend(".play","polygon").styles({points:pt,fill:at})},B}(ot),_e=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u6682\u505C"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this.iconSize,ct=ut/3,pt=[[k-ct,U-ut/2],[k-ct,U+ut/2],[k-ct/2,U+ut/2],[k-ct/2,U-ut/2],[k-ct,U-ut/2],[k+ct/2,U-ut/2],[k+ct/2,U+ut/2],[k+ct,U+ut/2],[k+ct,U-ut/2]];(0,Tt.Ys)(this.icon).maybeAppend(".pause","polygon").styles({points:pt,fill:at})},B}(ot),qe=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u8303\u56F4\u65F6\u95F4"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this,ct=ut.iconSize,pt=ut.lineWidth,Bt=pt;(0,Tt.Ys)(this.icon).maybeAppend(".left-line","line").styles({x1:k-ct/2,y1:U-ct/2,x2:k-ct/2,y2:U+ct/2,stroke:at,lineWidth:pt}),(0,Tt.Ys)(this.icon).maybeAppend(".right-line","line").styles({x1:k+ct/2,y1:U-ct/2,x2:k+ct/2,y2:U+ct/2,stroke:at,lineWidth:pt}),(0,Tt.Ys)(this.icon).maybeAppend(".left-arrow","line").styles({x1:k,y1:U,x2:k-ct/2+Bt*2,y2:U,stroke:at,lineWidth:pt,markerEnd:xt(pt*2,at)}),(0,Tt.Ys)(this.icon).maybeAppend(".right-arrow","line").styles({x1:k,y1:U,x2:k+ct/2-Bt*2,y2:U,stroke:at,lineWidth:pt,markerEnd:xt(pt*2,at)})},B}(ot),ln=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u5355\u4E00\u65F6\u95F4"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this,ct=ut.iconSize,pt=ut.lineWidth;(0,Tt.Ys)(this.icon).maybeAppend(".line","line").styles({x1:k,y1:U-ct/2,x2:k,y2:U+ct/2,stroke:at,lineWidth:pt});var Bt=pt;(0,Tt.Ys)(this.icon).maybeAppend(".left-arrow","line").styles({x1:k-ct/2-Bt*2,y1:U,x2:k-Bt*2,y2:U,stroke:at,lineWidth:pt,markerEnd:xt(pt*2,at)}),(0,Tt.Ys)(this.icon).maybeAppend(".right-arrow","line").styles({x1:k+ct/2+Bt*2,y1:U,x2:k+Bt*2,y2:U,stroke:at,lineWidth:pt,markerEnd:xt(pt*2,at)})},B}(ot),en=function(j){return[[-j/2,-j/2],[-j/2,j/2],[j/2,j/2]]},Sn=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u6298\u7EBF\u56FE"},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this,ct=ut.iconSize,pt=ut.lineWidth,Bt=pt,ae=(ct-Bt*2-pt)/4,pe=(ct-Bt*2-pt)/2,Te=(0,c.CR)([k-ct/2+Bt,U+ct/2-Bt*2],2),Fe=Te[0],Ue=Te[1];(0,Tt.Ys)(this.icon).maybeAppend(".coordinate","polyline").styles({points:en(ct).map(function(fn){var gn=(0,c.CR)(fn,2),On=gn[0],Rn=gn[1];return[On+k,Rn+U]}),stroke:at,lineWidth:pt}),(0,Tt.Ys)(this.icon).maybeAppend(".line","polyline").styles({points:[[Fe,Ue],[Fe+ae,Ue-pe],[Fe+ae*2,Ue],[Fe+ae*4,Ue-pe*2]],stroke:at,lineWidth:pt})},B}(ot),bn=function(j){(0,c.ZT)(B,j);function B(){return j!==null&&j.apply(this,arguments)||this}return Object.defineProperty(B.prototype,"label",{get:function(){return"\u6761\u5F62\u56FE"},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"data",{get:function(){return[1,4,2,4,3]},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.data,k=this.attributes,U=k.x,at=k.y,ut=k.color,ct=this,pt=ct.iconSize,Bt=ct.lineWidth,ae=Bt,pe=(pt-ae)/P.length,Te=(pt-ae*2)/4,Fe=(0,c.CR)([U-pt/2+ae*2,at+pt/2-ae],2),Ue=Fe[0],fn=Fe[1];(0,Tt.Ys)(this.icon).maybeAppend(".coordinate","polyline").styles({points:en(pt).map(function(gn){var On=(0,c.CR)(gn,2),Rn=On[0],wn=On[1];return[Rn+U,wn+at]}),stroke:ut,lineWidth:Bt}),(0,Tt.Ys)(this.icon).maybeAppend(".bars","g").selectAll(".column").data(this.data.map(function(gn,On){return{value:gn,index:On}})).join(function(gn){return gn.append("line").attr("className","column").style("x1",function(On){var Rn=On.index;return Ue+pe*Rn}).style("y1",fn).style("x2",function(On){var Rn=On.index;return Ue+pe*Rn}).style("y2",function(On){var Rn=On.value;return fn-Te*Rn}).styles({y1:fn,stroke:ut,lineWidth:Bt})})},B}(ot),Pn=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{color:"#d8d9d9"}},P))||this;return k.showBackground=!1,k}return B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.color,ut=this,ct=ut.iconSize,pt=ut.lineWidth;(0,Tt.Ys)(this.icon).maybeAppend(".split","line").styles({x1:k,y1:U-ct/2,x2:k,y2:U+ct/2,stroke:at,lineWidth:pt})},B}(ot),In=function(j){(0,c.ZT)(B,j);function B(){var P=j.apply(this,(0,c.ev)([],(0,c.CR)(arguments),!1))||this;return P.showBackground=!1,P}return Object.defineProperty(B.prototype,"padding",{get:function(){return(0,K.j)(0)},enumerable:!1,configurable:!0}),B.prototype.renderIcon=function(){var P=this.iconSize,k=this.attributes,U=k.x,at=k.y,ut=k.speed,ct=ut===void 0?1:ut,pt=(0,fs.Z)(this.attributes,["x","y","transform","transformOrigin","width","height","size","color","speed"]),Bt=(0,_.Z)(P,20,1/0),ae=20,pe=(0,c.pi)((0,c.pi)({},pt),{x:U-Bt/2,y:at-ae/2,width:Bt,height:ae,defaultValue:ct,bordered:!1,showDropdownIcon:!1,selectRadius:2,dropdownPadding:this.padding,dropdownRadius:2,dropdownSpacing:P/5,placeholderFontSize:P/2,optionPadding:0,optionLabelFontSize:P/2,optionBackgroundRadius:1,options:[{label:"1x",value:1},{label:"1.5x",value:1.5},{label:"2x",value:2}]});(0,Tt.Ys)(this.icon).maybeAppend(".speed",function(){return new X({style:pe})}).attr("className","speed").each(function(){this.update(pe)})},B.tag="SpeedSelect",B}(ot),kn=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,P)||this;return k.icon=k.appendChild(new z.ZA({})),k.currentType=k.attributes.type,k}return B.prototype.getType=function(){return this.currentType},B.prototype.render=function(){var P=this,k=this.attributes,U=k.onChange,at=(0,c._T)(k,["onChange"]);(0,Tt.Ys)(this.icon).selectAll(".icon").data([this.currentType]).join(function(ut){return ut.append(function(ct){var pt,Bt=(pt=P.toggles.find(function(ae){var pe=(0,c.CR)(ae,1),Te=pe[0];return Te===ct}))===null||pt===void 0?void 0:pt[1];if(!Bt)throw new Error("Invalid type: ".concat(ct));return new Bt({})}).attr("className","icon").styles(at,!1).update({})},function(ut){return ut.styles({restStyles:at}).update({})},function(ut){return ut.remove()})},B.prototype.bindEvents=function(){var P=this,k=this.attributes.onChange;this.addEventListener("click",function(U){U.preventDefault(),U.stopPropagation();var at=(P.toggles.findIndex(function(ct){var pt=(0,c.CR)(ct,1),Bt=pt[0];return Bt===P.currentType})+1)%P.toggles.length,ut=P.toggles[at][0];k==null||k(P.currentType),P.currentType=ut,P.render()})},B.tag="ToggleIcon",B}(I.w),Wn=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{type:"play"}},P))||this;return k.toggles=[["play",De],["pause",_e]],k}return B}(kn),Jn=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{type:"range"}},P))||this;return k.toggles=[["range",qe],["value",ln]],k}return B}(kn),$n=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},{style:{type:"column"}},P))||this;return k.toggles=[["line",Sn],["column",bn]],k}return B}(kn),cr={reset:zt,speed:In,backward:Qt,playPause:Wn,forward:ee,selectionType:Jn,chartType:$n,split:Pn},vr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;return k.background=k.appendChild(new z.UL({})),k.functions=k.appendChild(new z.ZA({})),k}return Object.defineProperty(B.prototype,"padding",{get:function(){return(0,K.j)(this.attributes.padding)},enumerable:!1,configurable:!0}),B.prototype.renderBackground=function(){var P=this.style,k=P.x,U=P.y,at=P.width,ut=P.height,ct=(0,M.zs)(this.attributes,"background");this.background.attr((0,c.pi)({x:k,y:U,width:at,height:ut},ct))},B.prototype.renderFunctions=function(){var P=this,k,U=this.attributes,at=U.functions,ut=U.iconSize,ct=U.iconSpacing,pt=U.x,Bt=U.y,ae=U.width,pe=U.height,Te=U.align,Fe=(0,c.CR)(this.padding,4),Ue=Fe[1],fn=Fe[3],gn=at.reduce(function(wn,Fn){return wn.length&&Fn.length?wn.concat.apply(wn,(0,c.ev)(["split"],(0,c.CR)(Fn),!1)):wn.concat.apply(wn,(0,c.ev)([],(0,c.CR)(Fn),!1))},[]),On=gn.length*(ut+ct)-ct,Rn={left:fn+ut/2,center:(ae-On)/2+ut/2,right:ae-On-fn-Ue+ut/2}[Te]||0;(k=this.speedSelect)===null||k===void 0||k.destroy(),this.functions.removeChildren(),gn.forEach(function(wn,Fn){var Gn,Xn=cr[wn],rr={x:pt+Fn*(ut+ct)+Rn,y:Bt+pe/2,size:ut};if(Xn===In?(rr.speed=P.attributes.speed,rr.onSelect=function(Dr){return P.handleFunctionChange(wn,{value:Dr})}):[Wn,Jn,$n].includes(Xn)?(rr.onChange=function(Dr){return P.handleFunctionChange(wn,{value:Dr})},Xn===Wn&&(rr.type=P.attributes.state==="play"?"pause":"play"),Xn===Jn&&(rr.type=P.attributes.selectionType==="range"?"value":"range"),Xn===$n&&(rr.type=P.attributes.chartType==="line"?"column":"line")):rr.onClick=function(){return P.handleFunctionChange(wn,{value:wn})},Xn===In){var mr=(Gn=P.ownerDocument)===null||Gn===void 0?void 0:Gn.defaultView;mr&&(P.speedSelect=new Xn({style:(0,c.pi)((0,c.pi)({},rr),{zIndex:100})}),mr.appendChild(P.speedSelect))}else P.functions.appendChild(new Xn({style:rr}))})},B.prototype.disconnectedCallback=function(){var P;j.prototype.disconnectedCallback.call(this),(P=this.speedSelect)===null||P===void 0||P.destroy()},B.prototype.render=function(){this.renderBackground(),this.renderFunctions()},B.prototype.handleFunctionChange=function(P,k){var U=this.attributes.onChange;U==null||U(P,k)},B.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"]]}},B}(I.w),hr=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;return k.bindEvents(),k}return B.prototype.bindEvents=function(){var P=this;this.addEventListener("mouseenter",function(){P.attr("lineWidth",Math.ceil(+(P.style.r||0)/2))}),this.addEventListener("mouseleave",function(){P.attr("lineWidth",0)})},B.defaultOptions={style:{r:5,fill:"#3f7cf7",lineWidth:0,stroke:"#3f7cf7",strokeOpacity:.5,cursor:"pointer"}},B}(z.Cd),Lr=function(j){(0,c.ZT)(B,j);function B(P){return j.call(this,(0,S.n)({},B.defaultOptions,P))||this}return B.prototype.renderBackground=function(){var P=this.attributes,k=P.x,U=P.y,at=P.width,ut=P.height,ct=(0,M.zs)(this.attributes,"background");(0,Tt.Ys)(this).maybeAppend("background","rect").attr("className","background").styles((0,c.pi)({x:k-at/2,y:U-ut/2,width:at,height:ut},ct))},B.prototype.renderIcon=function(){var P=this.attributes,k=P.x,U=P.y,at=P.iconSize,ut=(0,M.zs)(this.attributes,"icon"),ct=1,pt=at/2;(0,Tt.Ys)(this).maybeAppend("icon-left-line","line").attr("className","icon-left-line").styles((0,c.pi)({x1:k-ct,y1:U-pt,x2:k-ct,y2:U+pt},ut)),(0,Tt.Ys)(this).maybeAppend("icon-right-line","line").attr("className","icon-right-line").styles((0,c.pi)({x1:k+ct,y1:U-pt,x2:k+ct,y2:U+pt},ut))},B.prototype.renderBorder=function(){var P=this.attributes,k=P.x,U=P.y,at=P.width,ut=P.height,ct=P.type,pt=(0,M.zs)(this.attributes,"border"),Bt=ct==="start"?+at/2:-at/2;(0,Tt.Ys)(this).maybeAppend("border","line").attr("className","border").styles((0,c.pi)({x1:Bt+k,y1:U-ut/2,x2:Bt+k,y2:U+ut/2},pt))},B.prototype.render=function(){this.renderBackground(),this.renderIcon(),this.renderBorder()},B.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}},B}(I.w);function Tr(j,B){return typeof j=="number"?zr(j):Nr(j,B)}function Nr(j,B){var P=new Date(j);switch(B){case"half-hour":case"hour":case"four-hour":return[0,6,12,18].includes(P.getHours())&&P.getMinutes()===0?F(P,`HH:mm
|
|
|
YYYY-MM-DD`):F(P,"HH:mm");case"half-day":return P.getHours()<12?`AM
|
|
|
`.concat(F(P,"YYYY-MM-DD")):"PM";case"day":return[1,10,20].includes(P.getDate())?F(P,`DD
|
|
|
YYYY-MM`):F(P,"DD");case"week":return P.getDate()<=7?F(P,`DD
|
|
|
YYYY-MM`):F(P,"DD");case"month":return[0,6].includes(P.getMonth())?F(P,`MM\u6708
|
|
|
YYYY`):F(P,"MM\u6708");case"season":return[0].includes(P.getMonth())?F(P,`MM\u6708
|
|
|
YYYY`):F(P,"MM\u6708");case"year":return F(P,"YYYY");default:return F(P,"YYYY-MM-DD HH:mm")}}function zr(j){var B=String(Math.floor(j/3600)).padStart(2,"0"),P=String(Math.floor(j%3600/60)).padStart(2,"0"),k=String(Math.floor(j%60)).padStart(2,"0");return j<3600?"".concat(P,":").concat(k):"".concat(B,":").concat(P,":").concat(k)}var _r=function(j){(0,c.ZT)(B,j);function B(P){var k=j.call(this,(0,S.n)({},B.defaultOptions,P))||this;k.axis=k.appendChild(new $a({style:{type:"linear",startPos:[0,0],endPos:[0,0],data:[],showArrow:!1,animate:!1}})),k.timeline=k.appendChild(new io({style:{onChange:function(pe){k.handleSliderChange(pe)}}})),k.controller=k.appendChild(new vr({})),k.states={},k.handleSliderChange=function(pe){var Te=function(){var Fe=k.states.values;return Array.isArray(Fe)?(0,c.ev)([],(0,c.CR)(Fe),!1):Fe}();k.setBySliderValues(pe),k.dispatchOnChange(Te)};var U=k.attributes,at=U.selectionType,ut=U.chartType,ct=U.speed,pt=U.state,Bt=U.playMode,ae=U.values;return k.states={chartType:ut,playMode:Bt,selectionType:at,speed:ct,state:pt},k.setByTimebarValues(ae),k}return Object.defineProperty(B.prototype,"data",{get:function(){var P=this.attributes.data,k=function(U,at){return U.time<at.time?-1:U.time>at.time?1:0};return P.sort(k)},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"space",{get:function(){var P=this.attributes,k=P.x,U=P.y,at=P.width,ut=P.height,ct=P.type,pt=P.controllerHeight,Bt=(0,_.Z)(+ut-pt,0,+ut),ae=new R.b(k,U+ +ut-pt,+at,pt),pe,Te=0;ct==="chart"?(Te=35,pe=new R.b(k,U+Bt-Te,+at,Te)):pe=new R.b;var Fe=ct==="time"?10:Bt,Ue=new R.b(k,U+(ct==="time"?Bt:Bt-Fe),+at,Fe-Te);return{axisBBox:pe,controllerBBox:ae,timelineBBox:Ue}},enumerable:!1,configurable:!0}),B.prototype.setBySliderValues=function(P){var k,U,at=this.data,ut=(0,c.CR)(Array.isArray(P)?P:[0,P],2),ct=ut[0],pt=ut[1],Bt=at.length,ae=at[Math.floor(ct*Bt)],pe=at[Math.ceil(pt*Bt)-(Array.isArray(P)?0:1)];this.states.values=[(k=ae==null?void 0:ae.time)!==null&&k!==void 0?k:at[0].time,(U=pe==null?void 0:pe.time)!==null&&U!==void 0?U:1/0]},B.prototype.setByTimebarValues=function(P){var k,U,at,ut=this.data,ct=(0,c.CR)(Array.isArray(P)?P:[void 0,P],2),pt=ct[0],Bt=ct[1],ae=ut.find(function(Te){var Fe=Te.time;return Fe===pt}),pe=ut.find(function(Te){var Fe=Te.time;return Fe===Bt});this.states.values=[(k=ae==null?void 0:ae.time)!==null&&k!==void 0?k:(U=ut[0])===null||U===void 0?void 0:U.time,(at=pe==null?void 0:pe.time)!==null&&at!==void 0?at:1/0]},B.prototype.setByIndex=function(P){var k,U,at,ut,ct=this.data,pt=(0,c.CR)(P,2),Bt=pt[0],ae=pt[1];this.states.values=[(U=(k=ct[Bt])===null||k===void 0?void 0:k.time)!==null&&U!==void 0?U:ct[0].time,(ut=(at=this.data[ae])===null||at===void 0?void 0:at.time)!==null&&ut!==void 0?ut:1/0]},Object.defineProperty(B.prototype,"sliderValues",{get:function(){var P=this.states,k=P.values,U=P.selectionType,at=(0,c.CR)(Array.isArray(k)?k:[void 0,k],2),ut=at[0],ct=at[1],pt=this.data,Bt=pt.length,ae=U==="value",pe=function(){var Fe=pt.findIndex(function(Ue){var fn=Ue.time;return fn===ut});return ae?0:Fe>-1?Fe/Bt:0},Te=function(){if(ct===1/0)return 1;var Fe=pt.findIndex(function(Ue){var fn=Ue.time;return fn===ct});return Fe>-1?Fe/Bt:ae?.5:1};return[pe(),Te()]},enumerable:!1,configurable:!0}),Object.defineProperty(B.prototype,"values",{get:function(){var P=this.states,k=P.values,U=P.selectionType,at=(0,c.CR)(Array.isArray(k)?k:[this.data[0].time,k],2),ut=at[0],ct=at[1];return U==="value"?ct:[ut,ct]},enumerable:!1,configurable:!0}),B.prototype.getDatumByRatio=function(P){var k=this.data,U=k.length,at=Math.floor(P*(U-1));return k[at]},Object.defineProperty(B.prototype,"chartHandleIconShape",{get:function(){var P=this.states.selectionType,k=this.space.timelineBBox.height;return P==="range"?function(U){return new Lr({style:{type:U,height:k,iconSize:k/6}})}:function(){return new z.x1({style:{x1:0,y1:-k/2,x2:0,y2:k/2,lineWidth:2,stroke:"#c8c8c8"}})}},enumerable:!1,configurable:!0}),B.prototype.getChartStyle=function(P){var k=this,U=P.x,at=P.y,ut=P.width,ct=P.height,pt=this.states,Bt=pt.selectionType,ae=pt.chartType,pe=this.data,Te=this.attributes,Fe=Te.type,Ue=Te.labelFormatter,fn=(0,M.zs)(this.attributes,"chart"),gn=fn.type,On=(0,c._T)(fn,["type"]),Rn=Bt==="range";if(Fe==="time")return(0,c.pi)({handleIconShape:function(){return new hr({})},selectionFill:"#2e7ff8",selectionFillOpacity:1,showLabelOnInteraction:!0,handleLabelDy:Rn?-15:0,autoFitLabel:Rn,handleSpacing:Rn?-15:0,trackFill:"#edeeef",trackLength:ut,trackOpacity:.5,trackRadius:ct/2,trackSize:ct/2,type:Bt,values:this.sliderValues,formatter:function(Gn){if(Ue)return Ue(Gn);var Xn=k.getDatumByRatio(Gn).time;return typeof Xn=="number"?zr(Xn):F(Xn,"YYYY-MM-DD HH:mm:ss")},transform:"translate(".concat(U,", ").concat(at,")"),zIndex:1},On);var wn=Bt==="range"?5:0,Fn=pe.map(function(Gn){var Xn=Gn.value;return Xn});return(0,c.pi)({handleIconOffset:wn,handleIconShape:this.chartHandleIconShape,selectionFill:"#fff",selectionFillOpacity:.5,selectionType:"invert",sparklineSpacing:.1,sparklineColumnLineWidth:0,sparklineColor:"#d4e5fd",sparklineAreaOpacity:1,sparklineAreaLineWidth:0,sparklineData:Fn,sparklineType:ae,sparklineScale:.8,trackLength:ut,trackSize:ct,type:Bt,values:this.sliderValues,transform:"translate(".concat(U,", ").concat(at,")"),zIndex:1},On)},B.prototype.renderChart=function(P){P===void 0&&(P=this.space.timelineBBox),this.timeline.update(this.getChartStyle(P))},B.prototype.updateSelection=function(){this.timeline.setValues(this.sliderValues,!0),this.handleSliderChange(this.sliderValues)},B.prototype.getAxisStyle=function(P){var k=this.data,U=this.attributes,at=U.interval,ut=U.labelFormatter,ct=(0,M.zs)(this.attributes,"axis"),pt=P.x,Bt=P.y,ae=P.width,pe=(0,c.ev)((0,c.ev)([],(0,c.CR)(k),!1),[{time:0}],!1).map(function(Fe,Ue,fn){var gn=Fe.time;return{label:"".concat(gn),value:Ue/(fn.length-1),time:gn}}),Te=(0,c.pi)({startPos:[pt,Bt],endPos:[pt+ae,Bt],data:pe,labelFilter:function(Fe,Ue){return Ue<pe.length-1},labelFormatter:function(Fe){var Ue=Fe.time;return ut?ut(Ue):Tr(Ue,at)}},ct);return Te},B.prototype.renderAxis=function(P){P===void 0&&(P=this.space.axisBBox);var k=this.attributes.type;k==="chart"&&this.axis.update(this.getAxisStyle(P))},B.prototype.renderController=function(P){P===void 0&&(P=this.space.controllerBBox);var k=this.attributes.type,U=this.states,at=U.state,ut=U.speed,ct=U.selectionType,pt=U.chartType,Bt=(0,M.zs)(this.attributes,"controller"),ae=this,pe=(0,c.pi)((0,c.pi)((0,c.pi)({},P),{iconSize:20,speed:ut,state:at,selectionType:ct,chartType:pt,onChange:function(Te,Fe){var Ue=Fe.value;switch(Te){case"reset":ae.internalReset();break;case"speed":ae.handleSpeedChange(Ue);break;case"backward":ae.internalBackward();break;case"playPause":Ue==="play"?ae.internalPlay():ae.internalPause();break;case"forward":ae.internalForward();break;case"selectionType":ae.handleSelectionTypeChange(Ue);break;case"chartType":ae.handleChartTypeChange(Ue);break;default:break}}}),Bt);k==="time"&&(pe.functions=[["reset","speed"],["backward","playPause","forward"],["selectionType"]]),this.controller.update(pe)},B.prototype.dispatchOnChange=function(P){var k=this.data,U=this.attributes.onChange,at=this.states,ut=at.values,ct=at.selectionType,pt=(0,c.CR)(ut,2),Bt=pt[0],ae=pt[1],pe=ae===1/0?k.at(-1).time:ae,Te=ct==="range"?[Bt,pe]:pe,Fe=function(Ue,fn){return Array.isArray(Ue)?Array.isArray(fn)?Ue[0]===fn[0]&&(Ue[1]===fn[1]||Ue[1]===1/0||fn[1]===1/0):!1:Array.isArray(fn)?!1:Ue===fn};(!P||!Fe(P,Te))&&(U==null||U(ct==="range"?[Bt,pe]:pe))},B.prototype.internalReset=function(P){var k,U,at=this.states.selectionType;this.internalPause(),this.setBySliderValues(at==="range"?[0,1]:[0,0]),this.renderController(),this.updateSelection(),P||((U=(k=this.attributes)===null||k===void 0?void 0:k.onReset)===null||U===void 0||U.call(k),this.dispatchOnChange())},B.prototype.reset=function(){this.internalReset()},B.prototype.moveSelection=function(P,k){var U=this.data,at=U.length,ut=this.states,ct=ut.values,pt=ut.selectionType,Bt=ut.playMode,ae=(0,c.CR)(ct,2),pe=ae[0],Te=ae[1],Fe=U.findIndex(function(wn){var Fn=wn.time;return Fn===pe}),Ue=U.findIndex(function(wn){var Fn=wn.time;return Fn===Te});Ue===-1&&(Ue=at);var fn=P==="backward"?-1:1,gn;pt==="range"?Bt==="acc"?(gn=[Fe,Ue+fn],fn===-1&&Fe===Ue&&(gn=[Fe,at])):gn=[Fe+fn,Ue+fn]:gn=[Fe,Ue+fn];var On=function(wn){var Fn=(0,c.CR)(wn.sort(function(mr,Dr){return mr-Dr}),2),Gn=Fn[0],Xn=Fn[1],rr=function(mr){return(0,_.Z)(mr,0,at)};return Xn>at?pt==="value"?[0,0]:Bt==="acc"?[rr(Gn),rr(Gn)]:[0,rr(Xn-Gn)]:Gn<0?Bt==="acc"?[0,rr(Xn)]:[rr(Gn+at-Xn),at]:[rr(Gn),rr(Xn)]},Rn=On(gn);return this.setByIndex(Rn),this.updateSelection(),Rn},B.prototype.internalBackward=function(P){var k,U,at=this.moveSelection("backward",P);return P||((U=(k=this.attributes)===null||k===void 0?void 0:k.onBackward)===null||U===void 0||U.call(k),this.dispatchOnChange()),at},B.prototype.backward=function(){this.internalBackward()},B.prototype.internalPlay=function(P){var k=this,U,at,ut=this.data,ct=this.attributes.loop,pt=this.states.speed,Bt=pt===void 0?1:pt;this.playInterval=window.setInterval(function(){var ae=k.internalForward();ae[1]===ut.length&&!ct&&(k.internalPause(),k.renderController())},1e3/Bt),this.states.state="play",!P&&((at=(U=this.attributes)===null||U===void 0?void 0:U.onPlay)===null||at===void 0||at.call(U))},B.prototype.play=function(){this.internalPlay()},B.prototype.internalPause=function(P){var k,U;clearInterval(this.playInterval),this.states.state="pause",!P&&((U=(k=this.attributes)===null||k===void 0?void 0:k.onPause)===null||U===void 0||U.call(k))},B.prototype.pause=function(){this.internalPause()},B.prototype.internalForward=function(P){var k,U,at=this.moveSelection("forward",P);return P||((U=(k=this.attributes)===null||k===void 0?void 0:k.onForward)===null||U===void 0||U.call(k),this.dispatchOnChange()),at},B.prototype.forward=function(){this.internalForward()},B.prototype.handleSpeedChange=function(P){var k,U;this.states.speed=P;var at=this.states.state;at==="play"&&(this.internalPause(!0),this.internalPlay(!0)),(U=(k=this.attributes)===null||k===void 0?void 0:k.onSpeedChange)===null||U===void 0||U.call(k,P)},B.prototype.handleSelectionTypeChange=function(P){var k,U;this.states.selectionType=P,this.renderChart(),(U=(k=this.attributes)===null||k===void 0?void 0:k.onSelectionTypeChange)===null||U===void 0||U.call(k,P)},B.prototype.handleChartTypeChange=function(P){var k,U;this.states.chartType=P,this.renderChart(),(U=(k=this.attributes)===null||k===void 0?void 0:k.onChartTypeChange)===null||U===void 0||U.call(k,P)},B.prototype.render=function(){var P=this.space,k=P.axisBBox,U=P.controllerBBox,at=P.timelineBBox;this.renderController(U),this.renderAxis(k),this.renderChart(at),this.states.state==="play"&&this.internalPlay()},B.prototype.destroy=function(){j.prototype.destroy.call(this),this.internalPause(!0)},B.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"}},B}(I.w)},75242:function(bt,Et,y){"use strict";y.d(Et,{u:function(){return F}});var c=y(80813),_=y(85580);function I(rt,G){return!rt||!G?rt:rt.replace(/\\?\{([^{}]+)\}/g,function(kt,ft){return kt.charAt(0)==="\\"?kt.slice(1):G[ft]===void 0?"":G[ft]})}var z=I,S=y(97304),R=function(rt,G){if(G==null){rt.innerHTML="";return}rt.replaceChildren?Array.isArray(G)?rt.replaceChildren.apply(rt,(0,c.ev)([],(0,c.CR)(G),!1)):rt.replaceChildren(G):(rt.innerHTML="",Array.isArray(G)?G.forEach(function(kt){return rt.appendChild(kt)}):rt.appendChild(G))},M=y(88839),N=y(17911);function D(rt){return rt===void 0&&(rt=""),{CONTAINER:"".concat(rt,"tooltip"),TITLE:"".concat(rt,"tooltip-title"),LIST:"".concat(rt,"tooltip-list"),LIST_ITEM:"".concat(rt,"tooltip-list-item"),NAME:"".concat(rt,"tooltip-list-item-name"),MARKER:"".concat(rt,"tooltip-list-item-marker"),NAME_LABEL:"".concat(rt,"tooltip-list-item-name-label"),VALUE:"".concat(rt,"tooltip-list-item-value"),CROSSHAIR_X:"".concat(rt,"tooltip-crosshair-x"),CROSSHAIR_Y:"".concat(rt,"tooltip-crosshair-y")}}var A={overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"};function L(rt){var G;rt===void 0&&(rt="");var kt=D(rt);return G={},G[".".concat(kt.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"},G[".".concat(kt.TITLE)]={color:"rgba(0, 0, 0, 0.45)"},G[".".concat(kt.LIST)]={margin:"0px","list-style-type":"none",padding:"0px"},G[".".concat(kt.LIST_ITEM)]={"list-style-type":"none",display:"flex","line-height":"2em","align-items":"center","justify-content":"space-between","white-space":"nowrap"},G[".".concat(kt.MARKER)]={width:"8px",height:"8px","border-radius":"50%",display:"inline-block","margin-right":"4px"},G[".".concat(kt.NAME)]={display:"flex","align-items":"center","max-width":"216px"},G[".".concat(kt.NAME_LABEL)]=(0,c.pi)({flex:1},A),G[".".concat(kt.VALUE)]=(0,c.pi)({display:"inline-block",float:"right",flex:1,"text-align":"right","min-width":"28px","margin-left":"30px",color:"rgba(0, 0, 0, 0.85)"},A),G[".".concat(kt.CROSSHAIR_X)]={position:"absolute",width:"1px","background-color":"rgba(0, 0, 0, 0.25)"},G[".".concat(kt.CROSSHAIR_Y)]={position:"absolute",height:"1px","background-color":"rgba(0, 0, 0, 0.25)"},G}var F=function(rt){(0,c.ZT)(G,rt);function G(kt){var ft=this,J,Rt,Tt=(Rt=(J=kt.style)===null||J===void 0?void 0:J.template)===null||Rt===void 0?void 0:Rt.prefixCls,Vt=D(Tt);return ft=rt.call(this,kt,{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(Vt.CONTAINER,'"></div>'),title:'<div class="'.concat(Vt.TITLE,'"></div>'),item:'<li class="'.concat(Vt.LIST_ITEM,`" data-index={index}>
|
|
|
<span class="`).concat(Vt.NAME,`">
|
|
|
<span class="`).concat(Vt.MARKER,`" style="background:{color}"></span>
|
|
|
<span class="`).concat(Vt.NAME_LABEL,`" title="{name}">{name}</span>
|
|
|
</span>
|
|
|
<span class="`).concat(Vt.VALUE,`" title="{value}">{value}</span>
|
|
|
</li>`)},style:L(Tt)})||this,ft.timestamp=-1,ft.prevCustomContentKey=ft.attributes.contentKey,ft.initShape(),ft.render(ft.attributes,ft),ft}return Object.defineProperty(G.prototype,"HTMLTooltipElement",{get:function(){return this.element},enumerable:!1,configurable:!0}),G.prototype.getContainer=function(){return this.element},Object.defineProperty(G.prototype,"elementSize",{get:function(){var kt=this.element.offsetWidth,ft=this.element.offsetHeight;return{width:kt,height:ft}},enumerable:!1,configurable:!0}),Object.defineProperty(G.prototype,"HTMLTooltipItemsElements",{get:function(){var kt=this.attributes,ft=kt.data,J=kt.template;return ft.map(function(Rt,Tt){var Vt=Rt.name,fe=Vt===void 0?"":Vt,ue=Rt.color,Ce=ue===void 0?"black":ue,be=Rt.index,we=(0,c._T)(Rt,["name","color","index"]),ne=(0,c.pi)({name:fe,color:Ce,index:be!=null?be:Tt},we);return(0,_.L)(z(J.item,ne))})},enumerable:!1,configurable:!0}),G.prototype.render=function(kt,ft){this.renderHTMLTooltipElement(),this.updatePosition()},G.prototype.destroy=function(){var kt;(kt=this.element)===null||kt===void 0||kt.remove(),rt.prototype.destroy.call(this)},G.prototype.show=function(kt,ft){var J=this;if(kt!==void 0&&ft!==void 0){var Rt=this.element.style.visibility==="hidden",Tt=function(){J.attributes.x=kt!=null?kt:J.attributes.x,J.attributes.y=ft!=null?ft:J.attributes.y,J.updatePosition()};Rt?this.closeTransition(Tt):Tt()}this.element.style.visibility="visible"},G.prototype.hide=function(kt,ft){kt===void 0&&(kt=0),ft===void 0&&(ft=0);var J=this.attributes.enterable;J&&this.isCursorEntered(kt,ft)||(this.element.style.visibility="hidden")},G.prototype.initShape=function(){var kt=this.attributes.template;this.element=(0,_.L)(kt.container),this.id&&this.element.setAttribute("id",this.id)},G.prototype.renderCustomContent=function(){if(!(this.prevCustomContentKey!==void 0&&this.prevCustomContentKey===this.attributes.contentKey)){this.prevCustomContentKey=this.attributes.contentKey;var kt=this.attributes.content;kt&&(typeof kt=="string"?this.element.innerHTML=kt:R(this.element,kt))}},G.prototype.renderHTMLTooltipElement=function(){var kt,ft,J=this.attributes,Rt=J.template,Tt=J.title,Vt=J.enterable,fe=J.style,ue=J.content,Ce=D(Rt.prefixCls),be=this.element;if(this.element.style.pointerEvents=Vt?"auto":"none",ue)this.renderCustomContent();else{Tt?(be.innerHTML=Rt.title,be.getElementsByClassName(Ce.TITLE)[0].innerHTML=Tt):(ft=(kt=be.getElementsByClassName(Ce.TITLE))===null||kt===void 0?void 0:kt[0])===null||ft===void 0||ft.remove();var we=this.HTMLTooltipItemsElements,ne=document.createElement("ul");ne.className=Ce.LIST,R(ne,we);var We=this.element.querySelector(".".concat(Ce.LIST));We?We.replaceWith(ne):be.appendChild(ne)}(0,M.MC)(be,fe)},G.prototype.getRelativeOffsetFromCursor=function(kt){var ft=this.attributes,J=ft.position,Rt=ft.offset,Tt=kt||J,Vt=Tt.split("-"),fe={left:[-1,0],right:[1,0],top:[0,-1],bottom:[0,1]},ue=this.elementSize,Ce=ue.width,be=ue.height,we=[-Ce/2,-be/2];return Vt.forEach(function(ne){var We=(0,c.CR)(we,2),rn=We[0],Xe=We[1],pn=(0,c.CR)(fe[ne],2),Tn=pn[0],$e=pn[1];we=[rn+(Ce/2+Rt[0])*Tn,Xe+(be/2+Rt[1])*$e]}),we},G.prototype.setOffsetPosition=function(kt){var ft=(0,c.CR)(kt,2),J=ft[0],Rt=ft[1],Tt=this.attributes,Vt=Tt.x,fe=Vt===void 0?0:Vt,ue=Tt.y,Ce=ue===void 0?0:ue,be=Tt.container,we=be.x,ne=be.y;this.element.style.left="".concat(+fe+we+J,"px"),this.element.style.top="".concat(+Ce+ne+Rt,"px")},G.prototype.updatePosition=function(){var kt=this.attributes.showDelay,ft=kt===void 0?60:kt,J=Date.now();this.timestamp>0&&J-this.timestamp<ft||(this.timestamp=J,this.setOffsetPosition(this.autoPosition(this.getRelativeOffsetFromCursor())))},G.prototype.autoPosition=function(kt){var ft=(0,c.CR)(kt,2),J=ft[0],Rt=ft[1],Tt=this.attributes,Vt=Tt.x,fe=Tt.y,ue=Tt.bounding,Ce=Tt.position;if(!ue)return[J,Rt];var be=this.element,we=be.offsetWidth,ne=be.offsetHeight,We=(0,c.CR)([+Vt+J,+fe+Rt],2),rn=We[0],Xe=We[1],pn={left:"right",right:"left",top:"bottom",bottom:"top"},Tn=ue.x,$e=ue.y,mn=ue.width,It=ue.height,Ee={left:rn<Tn,right:rn+we>Tn+mn,top:Xe<$e,bottom:Xe+ne>$e+It},cn=[];Ce.split("-").forEach(function(Pe){Ee[Pe]?cn.push(pn[Pe]):cn.push(Pe)});var sn=cn.join("-");return this.getRelativeOffsetFromCursor(sn)},G.prototype.isCursorEntered=function(kt,ft){if(this.element){var J=this.element.getBoundingClientRect(),Rt=J.x,Tt=J.y,Vt=J.width,fe=J.height;return new N.b(Rt,Tt,Vt,fe).isPointIn(kt,ft)}return!1},G.prototype.closeTransition=function(kt){var ft=this,J=this.element.style.transition;this.element.style.transition="none",kt(),setTimeout(function(){ft.element.style.transition=J},10)},G.tag="tooltip",G}(S.w)},17911:function(bt,Et,y){"use strict";y.d(Et,{b:function(){return c}});var c=function(){function I(z,S,R,M){z===void 0&&(z=0),S===void 0&&(S=0),R===void 0&&(R=0),M===void 0&&(M=0),this.x=0,this.y=0,this.width=0,this.height=0,this.x=z,this.y=S,this.width=R,this.height=M}return Object.defineProperty(I.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(I.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),I.fromRect=function(z){return new I(z.x,z.y,z.width,z.height)},I.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}},I.prototype.isPointIn=function(z,S){return z>=this.left&&z<=this.right&&S>=this.top&&S<=this.bottom},I}();function _(I){var z=I.getRenderBounds(),S=__read(z.min,2),R=S[0],M=S[1],N=__read(z.max,2),D=N[0],A=N[1],L=D-R,F=A-M;return new c(R,M,L,F)}},38242:function(bt,Et,y){"use strict";y.d(Et,{S:function(){return I}});var c=y(80813),_=y(71018);function I(z,S){return(0,_.Z)(z)?z.apply(void 0,(0,c.ev)([],(0,c.CR)(S),!1)):z}},58688:function(bt,Et,y){"use strict";y.d(Et,{A:function(){return _}});var c=y(80813),_=function(I,z){var S=function(M){return"".concat(z,"-").concat(M)},R=Object.fromEntries(Object.entries(I).map(function(M){var N=(0,c.CR)(M,2),D=N[0],A=N[1],L=S(A);return[D,{name:L,class:".".concat(L),id:"#".concat(L),toString:function(){return L}}]}));return Object.assign(R,{prefix:S}),R}},99247:function(bt,Et,y){"use strict";y.d(Et,{n:function(){return R}});var c=y(80813),_=y(63467),I=y(39934),z=5,S=function(M,N,D,A){D===void 0&&(D=0),A===void 0&&(A=z),Object.entries(N).forEach(function(L){var F=(0,c.CR)(L,2),rt=F[0],G=F[1],kt=M;Object.prototype.hasOwnProperty.call(N,rt)&&(G?(0,_.Z)(G)?((0,_.Z)(M[rt])||(kt[rt]={}),D<A?S(M[rt],G,D+1,A):kt[rt]=N[rt]):(0,I.Z)(G)?(kt[rt]=[],kt[rt]=kt[rt].concat(G)):kt[rt]=G:kt[rt]=G)})},R=function(M){for(var N=[],D=1;D<arguments.length;D++)N[D-1]=arguments[D];for(var A=0;A<N.length;A+=1)S(M,N[A]);return M}},53160:function(bt,Et,y){"use strict";y.d(Et,{O:function(){return _}});var c=y(58533);function _(I,z,S){S===void 0&&(S="..."),(0,c.Rm)(I,{wordWrap:!0,wordWrapWidth:z,maxLines:1,textOverflow:S})}},88170:function(bt,Et,y){"use strict";y.d(Et,{$:function(){return M},S:function(){return R}});var c=y(80813),_=y(71879),I=y(1933),z=y(42777),S=y(14675);function R(N){return typeof N=="function"?N():(0,_.Z)(N)||(0,I.Z)(N)?new z.x({style:{text:String(N)}}):N}function M(N,D){return typeof N=="function"?N():(0,_.Z)(N)||(0,I.Z)(N)?new S.k9({style:(0,c.pi)((0,c.pi)({pointerEvents:"auto"},D),{innerHTML:N})}):N}},67756:function(bt,Et,y){"use strict";y.d(Et,{z:function(){return c}});function c(_,I,z,S,R){return S===void 0&&(S=!0),R===void 0&&(R=function(M){M.node().removeChildren()}),_?z(I):(S&&R(I),null)}},16915:function(bt,Et,y){"use strict";y.d(Et,{X:function(){return R},g:function(){return S}});var c=y(80813),_=y(14675),I=y(69014),z=function(M){(0,c.ZT)(N,M);function N(){for(var D=[],A=0;A<arguments.length;A++)D[A]=arguments[A];var L=M.apply(this,(0,c.ev)([],(0,c.CR)(D),!1))||this;return L.isMutationObserved=!0,L.addEventListener(_.Dk.INSERTED,function(){(0,I.Cp)(L)}),L}return N}(_.ZA);function S(M){var N=M.appendChild(new z({class:"offscreen"}));return(0,I.Cp)(N),N}function R(M){for(var N=M;N;){if(N.className==="offscreen")return!0;N=N.parent}return!1}},33253:function(bt,Et,y){"use strict";y.d(Et,{l:function(){return c}});function c(_){return/\S+-\S+/g.test(_)?_.split("-").map(function(I){return I[0]}):_.length>2?[_[0]]:_.split("")}},99769:function(bt,Et,y){"use strict";y.d(Et,{b:function(){return c}});function c(_,I,z){z===void 0&&(z=!1);var S=_.getBBox(),R=S.width,M=S.height,N=I/Math.max(R,M);return z&&(_.style.transform="scale(".concat(N,")")),N}},38974:function(bt,Et,y){"use strict";y.d(Et,{OV:function(){return L},Ys:function(){return A}});var c=y(80813),_=y(39934),I=function(F){if(!(0,_.Z)(F))return[];for(var rt=[],G=0;G<F.length;G++)rt=rt.concat(F[G]);return rt},z=I,S=y(14675),R=y(42777);function M(F,rt){var G=new Map;return F.forEach(function(kt){var ft=rt(kt);G.has(ft)||G.set(ft,[]),G.get(ft).push(kt)}),G}function N(F){throw new Error(F)}var D=function(){function F(ft,J,Rt,Tt,Vt,fe,ue){ft===void 0&&(ft=null),J===void 0&&(J=null),Rt===void 0&&(Rt=null),Tt===void 0&&(Tt=null),Vt===void 0&&(Vt=[null,null,null,null,null]),fe===void 0&&(fe=[]),ue===void 0&&(ue=[]),rt.add(this),this._elements=Array.from(ft),this._data=J,this._parent=Rt,this._document=Tt,this._enter=Vt[0],this._update=Vt[1],this._exit=Vt[2],this._merge=Vt[3],this._split=Vt[4],this._transitions=fe,this._facetElements=ue}F.prototype.selectAll=function(ft){var J=typeof ft=="string"?this._parent.querySelectorAll(ft):ft;return new G(J,null,this._elements[0],this._document)},F.prototype.selectFacetAll=function(ft){var J=typeof ft=="string"?this._parent.querySelectorAll(ft):ft;return new G(this._elements,null,this._parent,this._document,void 0,void 0,J)},F.prototype.select=function(ft){var J=typeof ft=="string"?this._parent.querySelectorAll(ft)[0]||null:ft;return new G([J],null,J,this._document)},F.prototype.append=function(ft){var J=this,Rt=typeof ft=="function"?ft:function(){return J.createElement(ft)},Tt=[];if(this._data!==null){for(var Vt=0;Vt<this._data.length;Vt++){var fe=this._data[Vt],ue=(0,c.CR)(Array.isArray(fe)?fe:[fe,null],2),Ce=ue[0],be=ue[1],we=Rt(Ce,Vt);we.__data__=Ce,be!==null&&(we.__fromElements__=be),this._parent.appendChild(we),Tt.push(we)}return new G(Tt,null,this._parent,this._document)}for(var Vt=0;Vt<this._elements.length;Vt++){var ne=this._elements[Vt],Ce=ne.__data__,we=Rt(Ce,Vt);ne.appendChild(we),Tt.push(we)}return new G(Tt,null,Tt[0],this._document)},F.prototype.maybeAppend=function(ft,J){var Rt=(0,c.Q_)(this,rt,"m",kt).call(this,ft[0]==="#"?ft:"#".concat(ft),J);return Rt.attr("id",ft),Rt},F.prototype.maybeAppendByClassName=function(ft,J){var Rt=ft.toString(),Tt=(0,c.Q_)(this,rt,"m",kt).call(this,Rt[0]==="."?Rt:".".concat(Rt),J);return Tt.attr("className",Rt),Tt},F.prototype.maybeAppendByName=function(ft,J){var Rt=(0,c.Q_)(this,rt,"m",kt).call(this,'[name="'.concat(ft,'"]'),J);return Rt.attr("name",ft),Rt},F.prototype.data=function(ft,J,Rt){var Tt,Vt;J===void 0&&(J=function(Pe){return Pe}),Rt===void 0&&(Rt=function(){return null});for(var fe=[],ue=[],Ce=new Set(this._elements),be=[],we=new Set,ne=new Map(this._elements.map(function(Pe,ze){return[J(Pe.__data__,ze),Pe]})),We=new Map(this._facetElements.map(function(Pe,ze){return[J(Pe.__data__,ze),Pe]})),rn=M(this._elements,function(Pe){return Rt(Pe.__data__)}),Xe=0;Xe<ft.length;Xe++){var pn=ft[Xe],Tn=J(pn,Xe),$e=Rt(pn,Xe);if(ne.has(Tn)){var mn=ne.get(Tn);mn.__data__=pn,mn.__facet__=!1,ue.push(mn),Ce.delete(mn),ne.delete(Tn)}else if(We.has(Tn)){var mn=We.get(Tn);mn.__data__=pn,mn.__facet__=!0,ue.push(mn),We.delete(Tn)}else if(rn.has(Tn)){var It=rn.get(Tn);be.push([pn,It]);try{for(var Ee=(Tt=void 0,(0,c.XA)(It)),cn=Ee.next();!cn.done;cn=Ee.next()){var mn=cn.value;Ce.delete(mn)}}catch(Pe){Tt={error:Pe}}finally{try{cn&&!cn.done&&(Vt=Ee.return)&&Vt.call(Ee)}finally{if(Tt)throw Tt.error}}rn.delete(Tn)}else if(ne.has($e)){var mn=ne.get($e);mn.__toData__?mn.__toData__.push(pn):mn.__toData__=[pn],we.add(mn),Ce.delete(mn)}else fe.push(pn)}var sn=[new G([],fe,this._parent,this._document),new G(ue,null,this._parent,this._document),new G(Ce,null,this._parent,this._document),new G([],be,this._parent,this._document),new G(we,null,this._parent,this._document)];return new G(this._elements,null,this._parent,this._document,sn)},F.prototype.merge=function(ft){var J=(0,c.ev)((0,c.ev)([],(0,c.CR)(this._elements),!1),(0,c.CR)(ft._elements),!1),Rt=(0,c.ev)((0,c.ev)([],(0,c.CR)(this._transitions),!1),(0,c.CR)(ft._transitions),!1);return new G(J,null,this._parent,this._document,void 0,Rt)},F.prototype.createElement=function(ft){if(this._document)return this._document.createElement(ft,{});var J=G.registry[ft];return J?new J:N("Unknown node type: ".concat(ft))},F.prototype.join=function(ft,J,Rt,Tt,Vt){ft===void 0&&(ft=function(ne){return ne}),J===void 0&&(J=function(ne){return ne}),Rt===void 0&&(Rt=function(ne){return ne.remove()}),Tt===void 0&&(Tt=function(ne){return ne}),Vt===void 0&&(Vt=function(ne){return ne.remove()});var fe=ft(this._enter),ue=J(this._update),Ce=Rt(this._exit),be=Tt(this._merge),we=Vt(this._split);return ue.merge(fe).merge(Ce).merge(be).merge(we)},F.prototype.remove=function(){for(var ft=function(Tt){var Vt=J._elements[Tt],fe=J._transitions[Tt];fe?fe.then(function(){return Vt.remove()}):Vt.remove()},J=this,Rt=0;Rt<this._elements.length;Rt++)ft(Rt);return new G([],null,this._parent,this._document,void 0,this._transitions)},F.prototype.each=function(ft){for(var J=0;J<this._elements.length;J++){var Rt=this._elements[J],Tt=Rt.__data__;ft.call(Rt,Tt,J)}return this},F.prototype.attr=function(ft,J){var Rt=typeof J!="function"?function(){return J}:J;return this.each(function(Tt,Vt){J!==void 0&&(this[ft]=Rt.call(this,Tt,Vt))})},F.prototype.style=function(ft,J,Rt){Rt===void 0&&(Rt=!0);var Tt=typeof J!="function"||!Rt?function(){return J}:J;return this.each(function(Vt,fe){J!==void 0&&(this.style[ft]=Tt.call(this,Vt,fe))})},F.prototype.styles=function(ft,J){return ft===void 0&&(ft={}),J===void 0&&(J=!0),this.each(function(Rt,Tt){var Vt=this;Object.entries(ft).forEach(function(fe){var ue=(0,c.CR)(fe,2),Ce=ue[0],be=ue[1],we=typeof be!="function"||!J?function(){return be}:be;be!==void 0&&Vt.attr(Ce,we.call(Vt,Rt,Tt))})})},F.prototype.update=function(ft,J){J===void 0&&(J=!0);var Rt=typeof ft!="function"||!J?function(){return ft}:ft;return this.each(function(Tt,Vt){ft&&this.update&&this.update(Rt.call(this,Tt,Vt))})},F.prototype.maybeUpdate=function(ft,J){J===void 0&&(J=!0);var Rt=typeof ft!="function"||!J?function(){return ft}:ft;return this.each(function(Tt,Vt){ft&&this.update&&this.update(Rt.call(this,Tt,Vt))})},F.prototype.transition=function(ft){var J=this._transitions,Rt=new Array(this._elements.length);return this.each(function(Tt,Vt){Rt[Vt]=ft.call(this,Tt,Vt)}),this._transitions=z(Rt),this},F.prototype.on=function(ft,J){return this.each(function(){this.addEventListener(ft,J)}),this},F.prototype.call=function(ft){for(var J=[],Rt=1;Rt<arguments.length;Rt++)J[Rt-1]=arguments[Rt];return ft.call.apply(ft,(0,c.ev)([this._parent,this],(0,c.CR)(J),!1)),this},F.prototype.node=function(){return this._elements[0]},F.prototype.nodes=function(){return this._elements},F.prototype.transitions=function(){return this._transitions.filter(function(ft){return!!ft})},F.prototype.parent=function(){return this._parent};var rt,G,kt;return G=F,rt=new WeakSet,kt=function(J,Rt){var Tt=this._elements[0],Vt=Tt.querySelector(J);if(Vt)return new G([Vt],null,this._parent,this._document);var fe=typeof Rt=="string"?this.createElement(Rt):Rt();return Tt.appendChild(fe),new G([fe],null,this._parent,this._document)},F.registry={g:S.ZA,rect:S.UL,circle:S.Cd,path:S.y$,text:R.x,ellipse:S.Pj,image:S.Ee,line:S.x1,polygon:S.mg,polyline:S.aH,html:S.k9},F}();function A(F){return new D([F],null,F,F.ownerDocument)}function L(F,rt,G){return F.querySelector(rt)?A(F).select(rt):A(F).append(G)}},98294:function(bt,Et,y){"use strict";y.d(Et,{j:function(){return I}});var c=y(1933),_=y(39934);function I(z){if((0,c.Z)(z))return[z,z,z,z];if((0,_.Z)(z)){var S=z.length;if(S===1)return[z[0],z[0],z[0],z[0]];if(S===2)return[z[0],z[1],z[0],z[1]];if(S===3)return[z[0],z[1],z[2],z[1]];if(S===4)return z}return[0,0,0,0]}},2080:function(bt,Et,y){"use strict";y.d(Et,{DM:function(){return M},_v:function(){return I},wE:function(){return S}});var c=y(80813);function _(N){var D=N&&N.getRenderBounds();if(!D)return{width:0,height:0};var A=D.getMax(),L=D.getMin();return{width:A[0]-L[0],height:A[1]-L[1]}}function I(N){var D=N.getLocalBounds(),A=D.min,L=D.max,F=(0,c.CR)([A,L],2),rt=(0,c.CR)(F[0],2),G=rt[0],kt=rt[1],ft=(0,c.CR)(F[1],2),J=ft[0],Rt=ft[1];return{x:G,y:kt,width:J-G,height:Rt-kt,left:G,bottom:Rt,top:kt,right:J}}function z(N,D){var A=select(N).append("text").node();return A.attr(__assign(__assign({},D),{visibility:"hidden"})),A}function S(N,D){var A=(0,c.CR)(N,2),L=A[0],F=A[1],rt=(0,c.CR)(D,2),G=rt[0],kt=rt[1];return L!==G&&F===kt}function R(N,D){var A=__read(N,2),L=A[0],F=A[1],rt=__read(D,2),G=rt[0],kt=rt[1];return L===G&&F!==kt}function M(N,D){var A,L,F=D.attributes;try{for(var rt=(0,c.XA)(Object.entries(F)),G=rt.next();!G.done;G=rt.next()){var kt=(0,c.CR)(G.value,2),ft=kt[0],J=kt[1];ft!=="id"&&ft!=="className"&&N.attr(ft,J)}}catch(Rt){A={error:Rt}}finally{try{G&&!G.done&&(L=rt.return)&&L.call(rt)}finally{if(A)throw A.error}}}},88839:function(bt,Et,y){"use strict";y.d(Et,{MC:function(){return R},Hm:function(){return A},zs:function(){return N},dq:function(){return D}});var c=y(80813);function _(L){return L.toString().charAt(0).toUpperCase()+L.toString().slice(1)}function I(L){return L.toString().charAt(0).toLowerCase()+L.toString().slice(1)}function z(L,F){return"".concat(F).concat(_(L))}function S(L,F,rt){var G;rt===void 0&&(rt=!0);var kt=F||((G=L.match(/^([a-z][a-z0-9]+)/))===null||G===void 0?void 0:G[0])||"",ft=L.replace(new RegExp("^(".concat(kt,")")),"");return rt?I(ft):ft}function R(L,F){Object.entries(F).forEach(function(rt){var G=(0,c.CR)(rt,2),kt=G[0],ft=G[1];(0,c.ev)([L],(0,c.CR)(L.querySelectorAll(kt)),!1).filter(function(J){return J.matches(kt)}).forEach(function(J){if(J){var Rt=J;Rt.style.cssText+=Object.entries(ft).reduce(function(Tt,Vt){return"".concat(Tt).concat(Vt.join(":"),";")},"")}})})}var M=function(L,F){if(!(L!=null&&L.startsWith(F)))return!1;var rt=L[F.length];return rt>="A"&&rt<="Z"};function N(L,F,rt){rt===void 0&&(rt=!1);var G={};return Object.entries(L).forEach(function(kt){var ft=(0,c.CR)(kt,2),J=ft[0],Rt=ft[1];if(!(J==="className"||J==="class")){if(M(J,"show")&&M(S(J,"show"),F)!==rt)J===z(F,"show")?G[J]=Rt:G[J.replace(new RegExp(_(F)),"")]=Rt;else if(!M(J,"show")&&M(J,F)!==rt){var Tt=S(J,F);Tt==="filter"&&typeof Rt=="function"||(G[Tt]=Rt)}}}),G}function D(L,F){return Object.entries(L).reduce(function(rt,G){var kt=(0,c.CR)(G,2),ft=kt[0],J=kt[1];return ft.startsWith("show")?rt["show".concat(F).concat(ft.slice(4))]=J:rt["".concat(F).concat(_(ft))]=J,rt},{})}function A(L,F){F===void 0&&(F=["x","y","class","className"]);var rt=["transform","transformOrigin","anchor","visibility","pointerEvents","zIndex","cursor","clipPath","clipPathTargets","offsetPath","offsetPathTargets","offsetDistance","draggable","droppable"],G={},kt={};return Object.entries(L).forEach(function(ft){var J=(0,c.CR)(ft,2),Rt=J[0],Tt=J[1];F.includes(Rt)||(rt.indexOf(Rt)!==-1?kt[Rt]=Tt:G[Rt]=Tt)}),[G,kt]}},58533:function(bt,Et,y){"use strict";y.d(Et,{Rm:function(){return D},U4:function(){return N},Ux:function(){return R},qT:function(){return M}});var c=y(14675),_=y(40455),I,z;function S(A){z=A}var R=(0,_.Z)(function(A,L){var F=L.fontSize,rt=L.fontFamily,G=L.fontWeight,kt=L.fontStyle,ft=L.fontVariant;return z?z(A,F):(I||(I=c.GZ.offscreenCanvasCreator.getOrCreateContext(void 0)),I.font=[kt,ft,G,"".concat(F,"px"),rt].join(" "),I.measureText(A).width)},function(A,L){return[A,Object.values(L||M(A)).join()].join("")},4096),M=function(A){var L=A.style.fontFamily||"sans-serif",F=A.style.fontWeight||"normal",rt=A.style.fontStyle||"normal",G=A.style.fontVariant,kt=A.style.fontSize;return kt=typeof kt=="object"?kt.value:kt,{fontSize:kt,fontFamily:L,fontWeight:F,fontStyle:rt,fontVariant:G}};function N(A){return A.nodeName==="text"?A:A.nodeName==="g"&&A.children.length===1&&A.children[0].nodeName==="text"?A.children[0]:null}function D(A,L){var F=N(A);F&&F.attr(L)}},69014:function(bt,Et,y){"use strict";y.d(Et,{Cp:function(){return I},$Z:function(){return _},WD:function(){return z}});function c(S,R){R(S),S.children&&S.children.forEach(function(M){M&&c(M,R)})}function _(S){z(S,!0)}function I(S){z(S,!1)}function z(S,R){var M=R?"visible":"hidden";c(S,function(N){N.attr("visibility",M)})}},49336:function(bt,Et){"use strict";var y="*",c=function(){function _(){this._events={}}return _.prototype.on=function(I,z,S){return this._events[I]||(this._events[I]=[]),this._events[I].push({callback:z,once:!!S}),this},_.prototype.once=function(I,z){return this.on(I,z,!0)},_.prototype.emit=function(I){for(var z=this,S=[],R=1;R<arguments.length;R++)S[R-1]=arguments[R];var M=this._events[I]||[],N=this._events[y]||[],D=function(A){for(var L=A.length,F=0;F<L;F++)if(A[F]){var rt=A[F],G=rt.callback,kt=rt.once;kt&&(A.splice(F,1),A.length===0&&delete z._events[I],L--,F--),G.apply(z,S)}};D(M),D(N)},_.prototype.off=function(I,z){if(!I)this._events={};else if(!z)delete this._events[I];else{for(var S=this._events[I]||[],R=S.length,M=0;M<R;M++)S[M].callback===z&&(S.splice(M,1),R--,M--);S.length===0&&delete this._events[I]}return this},_.prototype.getEvents=function(){return this._events},_}();Et.Z=c},14634:function(bt,Et,y){"use strict";y.d(Et,{Th:function(){return Nt}});var c=y(83652),_=y(67732),I=y(22214),z=y(42403),S=y(77263),R=y(20068),M=y(42978),N=y(70208);function D(E,b){var h=b.cx,v=h===void 0?0:h,w=b.cy,Y=w===void 0?0:w,K=b.r;E.arc(v,Y,K,0,Math.PI*2,!1)}function A(E,b){var h=b.cx,v=h===void 0?0:h,w=b.cy,Y=w===void 0?0:w,K=b.rx,it=b.ry;if(E.ellipse)E.ellipse(v,Y,K,it,0,0,Math.PI*2,!1);else{var ht=K>it?K:it,Zt=K>it?1:K/it,$=K>it?it/K:1;E.save(),E.scale(Zt,$),E.arc(v,Y,ht,0,Math.PI*2)}}function L(E,b){var h=b.x1,v=b.y1,w=b.x2,Y=b.y2,K=b.markerStart,it=b.markerEnd,ht=b.markerStartOffset,Zt=b.markerEndOffset,$=0,Q=0,H=0,et=0,yt=0,Xt,Ot;K&&(0,S.RV)(K)&&ht&&(Xt=w-h,Ot=Y-v,yt=Math.atan2(Ot,Xt),$=Math.cos(yt)*(ht||0),Q=Math.sin(yt)*(ht||0)),it&&(0,S.RV)(it)&&Zt&&(Xt=h-w,Ot=v-Y,yt=Math.atan2(Ot,Xt),H=Math.cos(yt)*(Zt||0),et=Math.sin(yt)*(Zt||0)),E.moveTo(h+$,v+Q),E.lineTo(w+H,Y+et)}function F(E,b){var h=b.markerStart,v=b.markerEnd,w=b.markerStartOffset,Y=b.markerEndOffset,K=b.d,it=K.absolutePath,ht=K.segments,Zt=0,$=0,Q=0,H=0,et=0,yt,Xt;if(h&&(0,S.RV)(h)&&w){var Ot=h.parentNode.getStartTangent(),Kt=(0,M.Z)(Ot,2),gt=Kt[0],vt=Kt[1];yt=gt[0]-vt[0],Xt=gt[1]-vt[1],et=Math.atan2(Xt,yt),Zt=Math.cos(et)*(w||0),$=Math.sin(et)*(w||0)}if(v&&(0,S.RV)(v)&&Y){var lt=v.parentNode.getEndTangent(),jt=(0,M.Z)(lt,2),Yt=jt[0],he=jt[1];yt=Yt[0]-he[0],Xt=Yt[1]-he[1],et=Math.atan2(Xt,yt),Q=Math.cos(et)*(Y||0),H=Math.sin(et)*(Y||0)}for(var ye=0;ye<it.length;ye++){var Wt=it[ye],Oe=Wt[0],He=it[ye+1],Qe=ye===0&&(Zt!==0||$!==0),An=(ye===it.length-1||He&&(He[0]==="M"||He[0]==="Z"))&&Q!==0&&H!==0,Nn=Qe?[Zt,$]:[0,0],Cn=(0,M.Z)(Nn,2),Bn=Cn[0],jn=Cn[1],or=An?[Q,H]:[0,0],ir=(0,M.Z)(or,2),lr=ir[0],Vn=ir[1];switch(Oe){case"M":E.moveTo(Wt[1]+Bn,Wt[2]+jn);break;case"L":E.lineTo(Wt[1]+lr,Wt[2]+Vn);break;case"Q":E.quadraticCurveTo(Wt[1],Wt[2],Wt[3]+lr,Wt[4]+Vn);break;case"C":E.bezierCurveTo(Wt[1],Wt[2],Wt[3],Wt[4],Wt[5]+lr,Wt[6]+Vn);break;case"A":{var nr=ht[ye].arcParams,Or=nr.cx,Kr=nr.cy,Wr=nr.rx,dr=nr.ry,Fr=nr.startAngle,xi=nr.endAngle,$r=nr.xRotation,pi=nr.sweepFlag;if(E.ellipse)E.ellipse(Or,Kr,Wr,dr,$r,Fr,xi,!!(1-pi));else{var Ri=Wr>dr?Wr:dr,Hi=Wr>dr?1:Wr/dr,Zi=Wr>dr?dr/Wr:1;E.translate(Or,Kr),E.rotate($r),E.scale(Hi,Zi),E.arc(0,0,Ri,Fr,xi,!!(1-pi)),E.scale(1/Hi,1/Zi),E.rotate(-$r),E.translate(-Or,-Kr)}An&&E.lineTo(Wt[6]+Q,Wt[7]+H);break}case"Z":E.closePath();break}}}function rt(E,b){var h=b.markerStart,v=b.markerEnd,w=b.markerStartOffset,Y=b.markerEndOffset,K=b.points.points,it=K.length,ht=K[0][0],Zt=K[0][1],$=K[it-1][0],Q=K[it-1][1],H=0,et=0,yt=0,Xt=0,Ot=0,Kt,gt;h&&(0,S.RV)(h)&&w&&(Kt=K[1][0]-K[0][0],gt=K[1][1]-K[0][1],Ot=Math.atan2(gt,Kt),H=Math.cos(Ot)*(w||0),et=Math.sin(Ot)*(w||0)),v&&(0,S.RV)(v)&&Y&&(Kt=K[it-1][0]-K[0][0],gt=K[it-1][1]-K[0][1],Ot=Math.atan2(gt,Kt),yt=Math.cos(Ot)*(Y||0),Xt=Math.sin(Ot)*(Y||0)),E.moveTo(ht+(H||yt),Zt+(et||Xt));for(var vt=1;vt<it-1;vt++){var lt=K[vt];E.lineTo(lt[0],lt[1])}E.lineTo($,Q)}function G(E,b){var h=b.markerStart,v=b.markerEnd,w=b.markerStartOffset,Y=b.markerEndOffset,K=b.points.points,it=K.length,ht=K[0][0],Zt=K[0][1],$=K[it-1][0],Q=K[it-1][1],H=0,et=0,yt=0,Xt=0,Ot=0,Kt,gt;h&&(0,S.RV)(h)&&w&&(Kt=K[1][0]-K[0][0],gt=K[1][1]-K[0][1],Ot=Math.atan2(gt,Kt),H=Math.cos(Ot)*(w||0),et=Math.sin(Ot)*(w||0)),v&&(0,S.RV)(v)&&Y&&(Kt=K[it-2][0]-K[it-1][0],gt=K[it-2][1]-K[it-1][1],Ot=Math.atan2(gt,Kt),yt=Math.cos(Ot)*(Y||0),Xt=Math.sin(Ot)*(Y||0)),E.moveTo(ht+H,Zt+et);for(var vt=1;vt<it-1;vt++){var lt=K[vt];E.lineTo(lt[0],lt[1])}E.lineTo($+yt,Q+Xt)}function kt(E,b){var h=b.x,v=h===void 0?0:h,w=b.y,Y=w===void 0?0:w,K=b.radius,it=b.width,ht=b.height,Zt=it,$=ht,Q=K&&K.some(function(jt){return jt!==0});if(!Q)E.rect(v,Y,Zt,$);else{var H=it>0?1:-1,et=ht>0?1:-1,yt=H+et===0,Xt=K.map(function(jt){return(0,N.Z)(jt,0,Math.min(Math.abs(Zt)/2,Math.abs($)/2))}),Ot=(0,M.Z)(Xt,4),Kt=Ot[0],gt=Ot[1],vt=Ot[2],lt=Ot[3];E.moveTo(H*Kt+v,Y),E.lineTo(Zt-H*gt+v,Y),gt!==0&&E.arc(Zt-H*gt+v,et*gt+Y,gt,-et*Math.PI/2,H>0?0:Math.PI,yt),E.lineTo(Zt+v,$-et*vt+Y),vt!==0&&E.arc(Zt-H*vt+v,$-et*vt+Y,vt,H>0?0:Math.PI,et>0?Math.PI/2:1.5*Math.PI,yt),E.lineTo(H*lt+v,$+Y),lt!==0&&E.arc(H*lt+v,$-et*lt+Y,lt,et>0?Math.PI/2:-Math.PI/2,H>0?Math.PI:0,yt),E.lineTo(v,et*Kt+Y),Kt!==0&&E.arc(H*Kt+v,et*Kt+Y,Kt,H>0?Math.PI:0,et>0?Math.PI*1.5:Math.PI/2,yt)}}var ft=function(E){function b(){var h;(0,_.Z)(this,b);for(var v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return h=(0,I.Z)(this,b,[].concat(w)),h.name="canvas-path-generator",h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(){var v,w=(v={},(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)(v,S.bn.CIRCLE,D),S.bn.ELLIPSE,A),S.bn.RECT,kt),S.bn.LINE,L),S.bn.POLYLINE,G),S.bn.POLYGON,rt),S.bn.PATH,F),S.bn.TEXT,void 0),S.bn.GROUP,void 0),S.bn.IMAGE,void 0),(0,R.Z)((0,R.Z)((0,R.Z)(v,S.bn.HTML,void 0),S.bn.MESH,void 0),S.bn.FRAGMENT,void 0));this.context.pathGeneratorFactory=w}},{key:"destroy",value:function(){delete this.context.pathGeneratorFactory}}])}(S.F6),J=y(19251),Rt=y(75044),Tt=y(3202),Vt=y(92421),fe=y(60187),ue=y(52402),Ce=y(66045),be=y(33885);var we=Vt.Ue(),ne=Vt.Ue(),We=Vt.Ue(),rn=fe.create(),Xe=function(){function E(){var b=this;(0,_.Z)(this,E),this.isHit=function(h,v,w,Y){var K=b.context.pointInPathPickerFactory[h.nodeName];if(K){var it=fe.invert(rn,w),ht=Vt.fF(ne,Vt.t8(We,v[0],v[1],0),it);if(K(h,new S.E9(ht[0],ht[1]),Y,b.isPointInPath,b.context,b.runtime))return!0}return!1},this.isPointInPath=function(h,v){var w=b.runtime.offscreenCanvasCreator.getOrCreateContext(b.context.config.offscreenCanvas),Y=b.context.pathGeneratorFactory[h.nodeName];return Y&&(w.beginPath(),Y(w,h.parsedStyle),w.closePath()),w.isPointInPath(v.x,v.y)}}return(0,c.Z)(E,[{key:"apply",value:function(h,v){var w,Y=this,K=h.renderingService,it=h.renderingContext;this.context=h,this.runtime=v;var ht=(w=it.root)===null||w===void 0?void 0:w.ownerDocument;K.hooks.pick.tapPromise(E.tag,function(){var Zt=(0,Tt.Z)((0,Rt.Z)().mark(function $(Q){return(0,Rt.Z)().wrap(function(H){for(;;)switch(H.prev=H.next){case 0:return H.abrupt("return",Y.pick(ht,Q));case 1:case"end":return H.stop()}},$)}));return function($){return Zt.apply(this,arguments)}}()),K.hooks.pickSync.tap(E.tag,function(Zt){return Y.pick(ht,Zt)})}},{key:"pick",value:function(h,v){var w=v.topmost,Y=v.position,K=Y.x,it=Y.y,ht=Vt.t8(we,K,it,0),Zt=h.elementsFromBBox(ht[0],ht[1],ht[0],ht[1]),$=[],Q=(0,J.Z)(Zt),H;try{for(Q.s();!(H=Q.n()).done;){var et=H.value,yt=et.getWorldTransform(),Xt=this.isHit(et,ht,yt,!1);if(Xt){var Ot=(0,S.Oi)(et);if(Ot){var Kt=Ot.parsedStyle.clipPath,gt=this.isHit(Kt,ht,Kt.getWorldTransform(),!0);if(gt){if(w)return v.picked=[et],v;$.push(et)}}else{if(w)return v.picked=[et],v;$.push(et)}}}}catch(vt){Q.e(vt)}finally{Q.f()}return v.picked=$,v}}])}();Xe.tag="CanvasPicker";function pn(E,b,h){var v=E.parsedStyle,w=v.cx,Y=w===void 0?0:w,K=v.cy,it=K===void 0?0:K,ht=v.r,Zt=v.fill,$=v.stroke,Q=v.lineWidth,H=Q===void 0?1:Q,et=v.increasedLineWidthForHitTesting,yt=et===void 0?0:et,Xt=v.pointerEvents,Ot=Xt===void 0?"auto":Xt,Kt=(H+yt)/2,gt=(0,ue.TE)(Y,it,b.x,b.y),vt=(0,S.L1)(Ot,Zt,$),lt=(0,M.Z)(vt,2),jt=lt[0],Yt=lt[1];return jt&&Yt||h?gt<=ht+Kt:jt?gt<=ht:Yt?gt>=ht-Kt&><=ht+Kt:!1}function Tn(E,b,h,v){return E/(h*h)+b/(v*v)}function $e(E,b,h){var v=E.parsedStyle,w=v.cx,Y=w===void 0?0:w,K=v.cy,it=K===void 0?0:K,ht=v.rx,Zt=v.ry,$=v.fill,Q=v.stroke,H=v.lineWidth,et=H===void 0?1:H,yt=v.increasedLineWidthForHitTesting,Xt=yt===void 0?0:yt,Ot=v.pointerEvents,Kt=Ot===void 0?"auto":Ot,gt=b.x,vt=b.y,lt=(0,S.L1)(Kt,$,Q),jt=(0,M.Z)(lt,2),Yt=jt[0],he=jt[1],ye=(et+Xt)/2,Wt=(gt-Y)*(gt-Y),Oe=(vt-it)*(vt-it);return Yt&&he||h?Tn(Wt,Oe,ht+ye,Zt+ye)<=1:Yt?Tn(Wt,Oe,ht,Zt)<=1:he?Tn(Wt,Oe,ht-ye,Zt-ye)>=1&&Tn(Wt,Oe,ht+ye,Zt+ye)<=1:!1}function mn(E,b,h,v,w,Y){return w>=E&&w<=E+h&&Y>=b&&Y<=b+v}function It(E,b,h,v,w,Y,K){var it=w/2;return mn(E-it,b-it,h,w,Y,K)||mn(E+h-it,b-it,w,v,Y,K)||mn(E+it,b+v-it,h,w,Y,K)||mn(E-it,b+it,w,v,Y,K)}function Ee(E,b,h,v,w,Y,K,it){var ht=(Math.atan2(it-b,K-E)+Math.PI*2)%(Math.PI*2),Zt={x:E+h*Math.cos(ht),y:b+h*Math.sin(ht)};return(0,ue.TE)(Zt.x,Zt.y,K,it)<=Y/2}function cn(E,b,h,v,w,Y,K){var it=Math.min(E,h),ht=Math.max(E,h),Zt=Math.min(b,v),$=Math.max(b,v),Q=w/2;return Y>=it-Q&&Y<=ht+Q&&K>=Zt-Q&&K<=$+Q?(0,ue._x)(E,b,h,v,Y,K)<=w/2:!1}function sn(E,b,h,v,w){var Y=E.length;if(Y<2)return!1;for(var K=0;K<Y-1;K++){var it=E[K][0],ht=E[K][1],Zt=E[K+1][0],$=E[K+1][1];if(cn(it,ht,Zt,$,b,h,v))return!0}if(w){var Q=E[0],H=E[Y-1];if(cn(Q[0],Q[1],H[0],H[1],b,h,v))return!0}return!1}var Pe=1e-6;function ze(E){return Math.abs(E)<Pe?0:E<0?-1:1}function Ke(E,b,h){return(h[0]-E[0])*(b[1]-E[1])===(b[0]-E[0])*(h[1]-E[1])&&Math.min(E[0],b[0])<=h[0]&&h[0]<=Math.max(E[0],b[0])&&Math.min(E[1],b[1])<=h[1]&&h[1]<=Math.max(E[1],b[1])}function le(E,b,h){var v=!1,w=E.length;if(w<=2)return!1;for(var Y=0;Y<w;Y++){var K=E[Y],it=E[(Y+1)%w];if(Ke(K,it,[b,h]))return!0;ze(K[1]-h)>0!=ze(it[1]-h)>0&&ze(b-(h-K[1])*(K[0]-it[0])/(K[1]-it[1])-K[0])<0&&(v=!v)}return v}function Ae(E,b,h){for(var v=!1,w=0;w<E.length;w++){var Y=E[w];if(v=le(Y,b,h),v)break}return v}function Pt(E,b,h){var v=E.parsedStyle,w=v.x1,Y=v.y1,K=v.x2,it=v.y2,ht=v.lineWidth,Zt=ht===void 0?1:ht,$=v.increasedLineWidthForHitTesting,Q=$===void 0?0:$,H=v.pointerEvents,et=H===void 0?"auto":H,yt=v.fill,Xt=v.stroke,Ot=(0,S.L1)(et,yt,Xt),Kt=(0,M.Z)(Ot,2),gt=Kt[1];return!gt&&!h||!Zt?!1:cn(w,Y,K,it,Zt+Q,b.x,b.y)}function wt(E,b,h,v,w){for(var Y=!1,K=b/2,it=0;it<E.length;it++){var ht=E[it],Zt=ht.currentPoint,$=ht.params,Q=ht.prePoint,H=ht.box;if(!(H&&!mn(H.x-K,H.y-K,H.width+b,H.height+b,h,v)))switch(ht.command){case"L":case"Z":if(Y=cn(Q[0],Q[1],Zt[0],Zt[1],b,h,v),Y)return!0;break;case"Q":var et=(0,ue.Y1)(Q[0],Q[1],$[1],$[2],$[3],$[4],h,v);if(Y=et<=b/2,Y)return!0;break;case"C":var yt=(0,ue.ph)(Q[0],Q[1],$[1],$[2],$[3],$[4],$[5],$[6],h,v,w);if(Y=yt<=b/2,Y)return!0;break;case"A":ht.cubicParams||(ht.cubicParams=(0,Ce.W)(Q[0],Q[1],$[1],$[2],$[3],$[4],$[5],$[6],$[7],void 0));for(var Xt=ht.cubicParams,Ot=Q,Kt=0;Kt<Xt.length;Kt+=6){var gt=(0,ue.ph)(Ot[0],Ot[1],Xt[Kt],Xt[Kt+1],Xt[Kt+2],Xt[Kt+3],Xt[Kt+4],Xt[Kt+5],h,v,w);if(Ot=[Xt[Kt+4],Xt[Kt+5]],Y=gt<=b/2,Y)return!0}break}}return Y}function de(E,b,h,v,w,Y){var K=E.parsedStyle,it=K.lineWidth,ht=it===void 0?1:it,Zt=K.increasedLineWidthForHitTesting,$=Zt===void 0?0:Zt,Q=K.stroke,H=K.fill,et=K.d,yt=K.pointerEvents,Xt=yt===void 0?"auto":yt,Ot=et.segments,Kt=et.hasArc,gt=et.polylines,vt=et.polygons,lt=(0,S.L1)(Xt,(vt==null?void 0:vt.length)&&H,Q),jt=(0,M.Z)(lt,2),Yt=jt[0],he=jt[1],ye=(0,S.gz)(E),Wt=!1;return Yt||h?(Kt?Wt=v(E,b):Wt=Ae(vt,b.x,b.y)||Ae(gt,b.x,b.y),Wt):((he||h)&&(Wt=wt(Ot,ht+$,b.x,b.y,ye)),Wt)}function je(E,b,h){var v=E.parsedStyle,w=v.stroke,Y=v.fill,K=v.lineWidth,it=K===void 0?1:K,ht=v.increasedLineWidthForHitTesting,Zt=ht===void 0?0:ht,$=v.points,Q=v.pointerEvents,H=Q===void 0?"auto":Q,et=(0,S.L1)(H,Y,w),yt=(0,M.Z)(et,2),Xt=yt[0],Ot=yt[1],Kt=!1;return(Ot||h)&&(Kt=sn($.points,it+Zt,b.x,b.y,!0)),!Kt&&(Xt||h)&&(Kt=le($.points,b.x,b.y)),Kt}function Re(E,b,h){var v=E.parsedStyle,w=v.lineWidth,Y=w===void 0?1:w,K=v.increasedLineWidthForHitTesting,it=K===void 0?0:K,ht=v.points,Zt=v.pointerEvents,$=Zt===void 0?"auto":Zt,Q=v.fill,H=v.stroke,et=(0,S.L1)($,Q,H),yt=(0,M.Z)(et,2),Xt=yt[1];return!Xt&&!h||!Y?!1:sn(ht.points,Y+it,b.x,b.y,!1)}function ce(E,b,h,v,w){var Y=E.parsedStyle,K=Y.radius,it=Y.fill,ht=Y.stroke,Zt=Y.lineWidth,$=Zt===void 0?1:Zt,Q=Y.increasedLineWidthForHitTesting,H=Q===void 0?0:Q,et=Y.x,yt=et===void 0?0:et,Xt=Y.y,Ot=Xt===void 0?0:Xt,Kt=Y.width,gt=Y.height,vt=Y.pointerEvents,lt=vt===void 0?"auto":vt,jt=(0,S.L1)(lt,it,ht),Yt=(0,M.Z)(jt,2),he=Yt[0],ye=Yt[1],Wt=K&&K.some(function(An){return An!==0}),Oe=$+H;if(Wt){var Qe=!1;return(ye||h)&&(Qe=Le(yt,Ot,Kt,gt,K.map(function(An){return(0,N.Z)(An,0,Math.min(Math.abs(Kt)/2,Math.abs(gt)/2))}),Oe,b.x,b.y)),!Qe&&(he||h)&&(Qe=v(E,b)),Qe}else{var He=Oe/2;if(he&&ye||h)return mn(yt-He,Ot-He,Kt+He,gt+He,b.x,b.y);if(he)return mn(yt,Ot,Kt,gt,b.x,b.y);if(ye)return It(yt,Ot,Kt,gt,Oe,b.x,b.y)}return!1}function Le(E,b,h,v,w,Y,K,it){var ht=(0,M.Z)(w,4),Zt=ht[0],$=ht[1],Q=ht[2],H=ht[3];return cn(E+Zt,b,E+h-$,b,Y,K,it)||cn(E+h,b+$,E+h,b+v-Q,Y,K,it)||cn(E+h-Q,b+v,E+H,b+v,Y,K,it)||cn(E,b+v-H,E,b+Zt,Y,K,it)||Ee(E+h-$,b+$,$,1.5*Math.PI,2*Math.PI,Y,K,it)||Ee(E+h-Q,b+v-Q,Q,0,.5*Math.PI,Y,K,it)||Ee(E+H,b+v-H,H,.5*Math.PI,Math.PI,Y,K,it)||Ee(E+Zt,b+Zt,Zt,Math.PI,1.5*Math.PI,Y,K,it)}function xe(E,b,h,v,w,Y){var K=E.parsedStyle,it=K.pointerEvents,ht=it===void 0?"auto":it,Zt=K.x,$=Zt===void 0?0:Zt,Q=K.y,H=Q===void 0?0:Q,et=K.width,yt=K.height;if(ht==="non-transparent-pixel"){var Xt=w.config.offscreenCanvas,Ot=Y.offscreenCanvasCreator.getOrCreateCanvas(Xt),Kt=Y.offscreenCanvasCreator.getOrCreateContext(Xt,{willReadFrequently:!0});Ot.width=et,Ot.height=yt,w.defaultStyleRendererFactory[S.bn.IMAGE].render(Kt,(0,be.Z)((0,be.Z)({},E.parsedStyle),{},{x:0,y:0}),E,void 0,void 0,void 0);var gt=Kt.getImageData(b.x-$,b.y-H,1,1).data;return gt.every(function(vt){return vt!==0})}return!0}function Ft(E,b,h,v){var w=E.getGeometryBounds();return b.x>=w.min[0]&&b.y>=w.min[1]&&b.x<=w.max[0]&&b.y<=w.max[1]}var re=function(E){function b(){var h;(0,_.Z)(this,b);for(var v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return h=(0,I.Z)(this,b,[].concat(w)),h.name="canvas-picker",h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(){var v,w=(v={},(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)(v,S.bn.CIRCLE,pn),S.bn.ELLIPSE,$e),S.bn.RECT,ce),S.bn.LINE,Pt),S.bn.POLYLINE,Re),S.bn.POLYGON,je),S.bn.PATH,de),S.bn.TEXT,Ft),S.bn.GROUP,null),S.bn.IMAGE,xe),(0,R.Z)((0,R.Z)(v,S.bn.HTML,null),S.bn.MESH,null));this.context.pointInPathPickerFactory=w,this.addRenderingPlugin(new Xe)}},{key:"destroy",value:function(){delete this.context.pointInPathPickerFactory,this.removeAllRenderingPlugins()}}])}(S.F6),Me=y(94480);function O(E,b){if(!{}.hasOwnProperty.call(E,b))throw new TypeError("attempted to use private field on non-instance");return E}var st=0;function ve(E){return"__private_"+st+++"_"+E}var $t=y(76075),Ie=y(71879);var Ne=function(){function E(){(0,_.Z)(this,E),this.cacheStore=new Map}return(0,c.Z)(E,[{key:"onRefAdded",value:function(h){}},{key:"has",value:function(h){return this.cacheStore.has(h)}},{key:"put",value:function(h,v,w){return this.cacheStore.has(h)?!1:(this.cacheStore.set(h,{value:v,counter:new Set([w.entity])}),this.onRefAdded(w),!0)}},{key:"get",value:function(h,v){var w=this.cacheStore.get(h);return w?(w.counter.has(v.entity)||(w.counter.add(v.entity),this.onRefAdded(v)),w.value):null}},{key:"update",value:function(h,v,w){var Y=this.cacheStore.get(h);return Y?(Y.value=(0,be.Z)((0,be.Z)({},Y.value),v),Y.counter.has(w.entity)||(Y.counter.add(w.entity),this.onRefAdded(w)),!0):!1}},{key:"release",value:function(h,v){var w=this.cacheStore.get(h);return w?(w.counter.delete(v.entity),w.counter.size<=0&&this.cacheStore.delete(h),!0):!1}},{key:"releaseRef",value:function(h){var v=this;Array.from(this.cacheStore.keys()).forEach(function(w){v.release(w,h)})}},{key:"getSize",value:function(){return this.cacheStore.size}},{key:"clear",value:function(){this.cacheStore.clear()}}])}(),tn=[],Mt=[],q=function(){function E(){(0,_.Z)(this,E)}return(0,c.Z)(E,null,[{key:"stop",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E.api;E.rafId&&(h.cancelAnimationFrame(E.rafId),E.rafId=null)}},{key:"executeTask",value:function(){var h=arguments.length>0&&arguments[0]!==void 0?arguments[0]:E.api;tn.length<=0&&Mt.length<=0||(Mt.forEach(function(v){return v()}),Mt=tn.splice(0,E.TASK_NUM_PER_FRAME),E.rafId=h.requestAnimationFrame(function(){E.executeTask(h)}))}},{key:"sliceImage",value:function(h,v,w,Y){for(var K=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,it=arguments.length>5&&arguments[5]!==void 0?arguments[5]:E.api,ht=h.naturalWidth||h.width,Zt=h.naturalHeight||h.height,$=v-K,Q=w-K,H=Math.ceil(ht/$),et=Math.ceil(Zt/Q),yt={tileSize:[v,w],gridSize:[et,H],tiles:Array(et).fill(null).map(function(){return Array(H).fill(null)})},Xt=function(gt){for(var vt=function(Yt){tn.push(function(){var he=Yt*$,ye=gt*Q,Wt=[Math.min(v,ht-he),Math.min(w,Zt-ye)],Oe=Wt[0],He=Wt[1],Qe=it.createCanvas();Qe.width=v,Qe.height=w;var An=Qe.getContext("2d");An.drawImage(h,he,ye,Oe,He,0,0,Oe,He),yt.tiles[gt][Yt]={x:he,y:ye,tileX:Yt,tileY:gt,data:Qe},Y()})},lt=0;lt<H;lt++)vt(lt)},Ot=0;Ot<et;Ot++)Xt(Ot);return E.stop(),E.executeTask(),yt}}])}();q.TASK_NUM_PER_FRAME=10;var Ct=new Ne;Ct.onRefAdded=function(b){var h=this;b.addEventListener(S.Dk.DESTROY,function(){h.releaseRef(b)},{once:!0})};var Ht=function(){function E(b,h){(0,_.Z)(this,E),this.gradientCache={},this.patternCache={},this.context=b,this.runtime=h}return(0,c.Z)(E,[{key:"getImageSync",value:function(h,v,w){var Y=(0,Ie.Z)(h)?h:h.src;if(Ct.has(Y)){var K=Ct.get(Y,v);if(K.img.complete)return w==null||w(K),K}return this.getOrCreateImage(h,v).then(function(it){w==null||w(it)}).catch(function(it){console.error(it)}),null}},{key:"getOrCreateImage",value:function(h,v){var w=this,Y=(0,Ie.Z)(h)?h:h.src;if(!(0,Ie.Z)(h)&&!Ct.has(Y)){var K={img:h,size:[h.naturalWidth||h.width,h.naturalHeight||h.height],tileSize:Lt(h)};Ct.put(Y,K,v)}if(Ct.has(Y)){var it=Ct.get(Y,v);return it.img.complete?Promise.resolve(it):new Promise(function(ht,Zt){it.img.addEventListener("load",function(){it.size=[it.img.naturalWidth||it.img.width,it.img.naturalHeight||it.img.height],it.tileSize=Lt(it.img),ht(it)}),it.img.addEventListener("error",function($){Zt($)})})}return new Promise(function(ht,Zt){var $=w.context.config.createImage();if($){var Q={img:$,size:[0,0],tileSize:Lt($)};Ct.put(Y,Q,v),$.onload=function(){Q.size=[$.naturalWidth||$.width,$.naturalHeight||$.height],Q.tileSize=Lt(Q.img),ht(Q)},$.onerror=function(H){Zt(H)},$.crossOrigin="Anonymous",$.src=Y}})}},{key:"createDownSampledImage",value:function(){var b=(0,Tt.Z)((0,Rt.Z)().mark(function v(w,Y){var K,it,ht,Zt,$,Q,H,et,yt,Xt,Ot,Kt,gt,vt;return(0,Rt.Z)().wrap(function(lt){for(;;)switch(lt.prev=lt.next){case 0:return lt.next=1,this.getOrCreateImage(w,Y);case 1:if(K=lt.sent,typeof K.downSamplingRate=="undefined"){lt.next=2;break}return lt.abrupt("return",K);case 2:if(it=this.context.config.enableLargeImageOptimization,ht=typeof it=="boolean"?{}:it,Zt=ht.maxDownSampledImageSize,$=Zt===void 0?2048:Zt,Q=ht.downSamplingRateThreshold,H=Q===void 0?.5:Q,et=this.runtime.globalThis.createImageBitmap,yt=(0,M.Z)(K.size,2),Xt=yt[0],Ot=yt[1],Kt=K.img,gt=Math.min(($+$)/(Xt+Ot),Math.max(.01,Math.min(H,.5))),vt=(0,be.Z)((0,be.Z)({},K),{},{downSamplingRate:gt}),Ct.update(K.img.src,vt,Y),!et){lt.next=7;break}return lt.prev=3,lt.next=4,et(K.img,{resizeWidth:Xt*gt,resizeHeight:Ot*gt});case 4:Kt=lt.sent,lt.next=6;break;case 5:lt.prev=5,lt.catch(3),gt=1;case 6:lt.next=8;break;case 7:gt=1;case 8:return vt=(0,be.Z)((0,be.Z)({},this.getImageSync(w,Y)),{},{downSampled:Kt,downSamplingRate:gt}),Ct.update(K.img.src,vt,Y),lt.abrupt("return",vt);case 9:case"end":return lt.stop()}},v,this,[[3,5]])}));function h(v,w){return b.apply(this,arguments)}return h}()},{key:"createImageTiles",value:function(){var b=(0,Tt.Z)((0,Rt.Z)().mark(function v(w,Y,K,it){var ht,Zt,$,Q,H;return(0,Rt.Z)().wrap(function(et){for(;;)switch(et.prev=et.next){case 0:return et.next=1,this.getOrCreateImage(w,it);case 1:return ht=et.sent,Zt=it.ownerDocument.defaultView,$=Zt.requestAnimationFrame,Q=Zt.cancelAnimationFrame,q.api={requestAnimationFrame:$,cancelAnimationFrame:Q,createCanvas:function(){return S.jB.createCanvas()}},H=(0,be.Z)((0,be.Z)({},ht),q.sliceImage(ht.img,ht.tileSize[0],ht.tileSize[0],K)),Ct.update(ht.img.src,H,it),et.abrupt("return",H);case 2:case"end":return et.stop()}},v,this)}));function h(v,w,Y,K){return b.apply(this,arguments)}return h}()},{key:"releaseImage",value:function(h,v){Ct.release((0,Ie.Z)(h)?h:h.src,v)}},{key:"releaseImageRef",value:function(h){Ct.releaseRef(h)}},{key:"getOrCreatePatternSync",value:function(h,v,w,Y,K,it,ht){var Zt=this.generatePatternKey(v);if(Zt&&this.patternCache[Zt])return this.patternCache[Zt];var $=v.image,Q=v.repetition,H=v.transform,et,yt=!1;if((0,Ie.Z)($)){var Xt=this.getImageSync($,h,ht);et=Xt==null?void 0:Xt.img}else Y?(et=Y,yt=!0):et=$;var Ot=et&&w.createPattern(et,Q);if(Ot){var Kt;H?Kt=(0,S.G0)((0,S.G$)(H),new S.s$({})):Kt=fe.identity(fe.create()),yt&&fe.scale(Kt,Kt,[1/K,1/K,1]),Ot.setTransform({a:Kt[0],b:Kt[1],c:Kt[4],d:Kt[5],e:Kt[12]+it[0],f:Kt[13]+it[1]})}return Zt&&Ot&&(this.patternCache[Zt]=Ot),Ot}},{key:"getOrCreateGradient",value:function(h,v){var w=this.generateGradientKey(h),Y=h.type,K=h.steps,it=h.min,ht=h.width,Zt=h.height,$=h.angle,Q=h.cx,H=h.cy,et=h.size;if(this.gradientCache[w])return this.gradientCache[w];var yt=null;if(Y===S.GL.LinearGradient){var Xt=(0,S.Rx)(it,ht,Zt,$),Ot=Xt.x1,Kt=Xt.y1,gt=Xt.x2,vt=Xt.y2;yt=v.createLinearGradient(Ot,Kt,gt,vt)}else if(Y===S.GL.RadialGradient){var lt=(0,S.o6)(it,ht,Zt,Q,H,et),jt=lt.x,Yt=lt.y,he=lt.r;yt=v.createRadialGradient(jt,Yt,0,jt,Yt,he)}return yt&&(K.forEach(function(ye){var Wt=ye.offset,Oe=ye.color;if(Wt.unit===S.Cm.kPercentage){var He;(He=yt)===null||He===void 0||He.addColorStop(Wt.value/100,Oe.toString())}}),this.gradientCache[w]=yt),this.gradientCache[w]}},{key:"generateGradientKey",value:function(h){var v=h.type,w=h.min,Y=h.width,K=h.height,it=h.steps,ht=h.angle,Zt=h.cx,$=h.cy,Q=h.size;return"gradient-".concat(v,"-").concat((ht==null?void 0:ht.toString())||0,"-").concat((Zt==null?void 0:Zt.toString())||0,"-").concat(($==null?void 0:$.toString())||0,"-").concat((Q==null?void 0:Q.toString())||0,"-").concat(w[0],"-").concat(w[1],"-").concat(Y,"-").concat(K,"-").concat(it.map(function(H){var et=H.offset,yt=H.color;return"".concat(et).concat(yt)}).join("-"))}},{key:"generatePatternKey",value:function(h){var v=h.image,w=h.repetition;if((0,Ie.Z)(v))return"pattern-".concat(v,"-").concat(w);if(v.nodeName==="rect")return"pattern-".concat(v.entity,"-").concat(w)}}])}();Ht.isSupportTile=!!S.jB.createCanvas();function Lt(E){if(!E.complete)return[0,0];var b=E.naturalWidth||E.width,h=E.naturalHeight||E.height,v=256;return[256,512].forEach(function(w){var Y=Math.ceil(h/w),K=Math.ceil(b/w);Y*K<1e3&&(v=w)}),[v,v]}var _t=function(){function E(){(0,_.Z)(this,E)}return(0,c.Z)(E,[{key:"apply",value:function(h){var v=h.renderingService,w=h.renderingContext,Y=h.imagePool,K=w.root.ownerDocument.defaultView,it=function(Q,H,et){var yt=Q.parsedStyle,Xt=yt.width,Ot=yt.height;Xt&&!Ot?Q.setAttribute("height",et/H*Xt):!Xt&&Ot&&Q.setAttribute("width",H/et*Ot)},ht=function(Q){var H=Q.target,et=H.nodeName,yt=H.attributes;if(et===S.bn.IMAGE){var Xt=yt.src,Ot=yt.keepAspectRatio;Y.getImageSync(Xt,H,function(Kt){var gt=Kt.img,vt=gt.width,lt=gt.height;Ot&&it(H,vt,lt),H.dirty(),v.dirty()})}},Zt=function(Q){var H=Q.target,et=Q.attrName,yt=Q.prevValue,Xt=Q.newValue;H.nodeName!==S.bn.IMAGE||et!=="src"||(yt!==Xt&&Y.releaseImage(yt,H),(0,Ie.Z)(Xt)&&Y.getOrCreateImage(Xt,H).then(function(Ot){var Kt=Ot.img,gt=Kt.width,vt=Kt.height;H.attributes.keepAspectRatio&&it(H,gt,vt),H.dirty(),v.dirty()}).catch(function(){}))};v.hooks.init.tap(E.tag,function(){K.addEventListener(S.Dk.MOUNTED,ht),K.addEventListener(S.Dk.ATTR_MODIFIED,Zt)}),v.hooks.destroy.tap(E.tag,function(){K.removeEventListener(S.Dk.MOUNTED,ht),K.removeEventListener(S.Dk.ATTR_MODIFIED,Zt)})}}])}();_t.tag="LoadImage";var Ut=function(E){function b(){var h;(0,_.Z)(this,b);for(var v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return h=(0,I.Z)(this,b,[].concat(w)),h.name="image-loader",h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(v){this.context.imagePool=new Ht(this.context,v),this.addRenderingPlugin(new _t)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(S.F6);var qt=ve("renderState"),se=function(){function E(b){(0,_.Z)(this,E),this.removedRBushNodeAABBs=[],this.renderQueue=[],Object.defineProperty(this,qt,{writable:!0,value:{restoreStack:[],prevObject:null,currentContext:new Map}}),this.clearFullScreenLastFrame=!1,this.clearFullScreen=!1,this.vpMatrix=fe.create(),this.dprMatrix=fe.create(),this.tmpMat4=fe.create(),this.vec3a=Vt.Ue(),this.vec3b=Vt.Ue(),this.vec3c=Vt.Ue(),this.vec3d=Vt.Ue(),this.canvasRendererPluginOptions=b}return(0,c.Z)(E,[{key:"apply",value:function(h,v){var w=this;this.context=h;var Y=this.context,K=Y.config,it=Y.camera,ht=Y.renderingService,Zt=Y.renderingContext,$=Y.rBushRoot,Q=Y.pathGeneratorFactory,H=K.renderer.getConfig().enableRenderingOptimization;K.renderer.getConfig().enableDirtyCheck=!1,K.renderer.getConfig().enableDirtyRectangleRendering=!1,this.rBush=$,this.pathGeneratorFactory=Q;var et=h.contextService,yt=Zt.root.ownerDocument.defaultView,Xt=function(lt){var jt=lt.target,Yt=jt.rBushNode;Yt!=null&&Yt.aabb&&w.removedRBushNodeAABBs.push(Yt.aabb)},Ot=function(lt){var jt=lt.target,Yt=jt.rBushNode;Yt.aabb&&w.removedRBushNodeAABBs.push(Yt.aabb)};ht.hooks.init.tap(E.tag,function(){yt.addEventListener(S.Dk.UNMOUNTED,Xt),yt.addEventListener(S.Dk.CULLED,Ot);var vt=et.getDPR(),lt=K.width,jt=K.height,Yt=et.getContext();w.clearRect(Yt,0,0,lt*vt,jt*vt,K.background)}),ht.hooks.destroy.tap(E.tag,function(){yt.removeEventListener(S.Dk.UNMOUNTED,Xt),yt.removeEventListener(S.Dk.CULLED,Ot),w.renderQueue=[],w.removedRBushNodeAABBs=[],O(w,qt)[qt]={restoreStack:[],prevObject:null,currentContext:null}});var Kt=function(){var lt,jt=et.getContext(),Yt=et.getDPR(),he=K.width,ye=K.height,Wt=w.canvasRendererPluginOptions,Oe=Wt.dirtyObjectNumThreshold,He=Wt.dirtyObjectRatioThreshold,Qe=ht.getStats(),An=Qe.total,Nn=Qe.rendered,Cn=Nn/An;w.clearFullScreen=w.clearFullScreenLastFrame||!((lt=yt.context.renderingPlugins[1])!==null&<!==void 0&<.isFirstTimeRenderingFinished)||ht.disableDirtyRectangleRendering()||Nn>Oe&&Cn>He,jt&&(typeof jt.resetTransform=="function"?jt.resetTransform():jt.setTransform(1,0,0,1,0,0),w.clearFullScreen&&w.clearRect(jt,0,0,he*Yt,ye*Yt,K.background))},gt=function(lt,jt){for(var Yt=[lt];Yt.length>0;){var he,ye=Yt.pop();ye.isVisible()&&!ye.isCulled()&&(H?w.renderDisplayObjectOptimized(ye,jt,w.context,O(w,qt)[qt],v):w.renderDisplayObject(ye,jt,w.context,O(w,qt)[qt],v));for(var Wt=((he=ye.sortable)===null||he===void 0||(he=he.sorted)===null||he===void 0?void 0:he.length)>0?ye.sortable.sorted:ye.childNodes,Oe=Wt.length-1;Oe>=0;Oe--)Yt.push(Wt[Oe])}};ht.hooks.endFrame.tap(E.tag,function(){if(Kt(),Zt.root.childNodes.length===0){w.clearFullScreenLastFrame=!0;return}H=K.renderer.getConfig().enableRenderingOptimization,O(w,qt)[qt]={restoreStack:[],prevObject:null,currentContext:O(w,qt)[qt].currentContext},O(w,qt)[qt].currentContext.clear(),w.clearFullScreenLastFrame=!1;var vt=et.getContext(),lt=et.getDPR();if(fe.fromScaling(w.dprMatrix,[lt,lt,1]),fe.multiply(w.vpMatrix,w.dprMatrix,it.getOrthoMatrix()),w.clearFullScreen)H?(vt.save(),gt(Zt.root,vt),vt.restore()):gt(Zt.root,vt),w.removedRBushNodeAABBs=[];else{var jt=w.safeMergeAABB.apply(w,[w.mergeDirtyAABBs(w.renderQueue)].concat((0,Me.Z)(w.removedRBushNodeAABBs.map(function(dr){var Fr=dr.minX,xi=dr.minY,$r=dr.maxX,pi=dr.maxY,Ri=new S.mN;return Ri.setMinMax([Fr,xi,0],[$r,pi,0]),Ri}))));if(w.removedRBushNodeAABBs=[],S.mN.isEmpty(jt)){w.renderQueue=[];return}var Yt=w.convertAABB2Rect(jt),he=Yt.x,ye=Yt.y,Wt=Yt.width,Oe=Yt.height,He=Vt.fF(w.vec3a,[he,ye,0],w.vpMatrix),Qe=Vt.fF(w.vec3b,[he+Wt,ye,0],w.vpMatrix),An=Vt.fF(w.vec3c,[he,ye+Oe,0],w.vpMatrix),Nn=Vt.fF(w.vec3d,[he+Wt,ye+Oe,0],w.vpMatrix),Cn=Math.min(He[0],Qe[0],Nn[0],An[0]),Bn=Math.min(He[1],Qe[1],Nn[1],An[1]),jn=Math.max(He[0],Qe[0],Nn[0],An[0]),or=Math.max(He[1],Qe[1],Nn[1],An[1]),ir=Math.floor(Cn),lr=Math.floor(Bn),Vn=Math.ceil(jn-Cn),nr=Math.ceil(or-Bn);vt.save(),w.clearRect(vt,ir,lr,Vn,nr,K.background),vt.beginPath(),vt.rect(ir,lr,Vn,nr),vt.clip(),vt.setTransform(w.vpMatrix[0],w.vpMatrix[1],w.vpMatrix[4],w.vpMatrix[5],w.vpMatrix[12],w.vpMatrix[13]);var Or=K.renderer.getConfig(),Kr=Or.enableDirtyRectangleRenderingDebug;Kr&&yt.dispatchEvent(new S.Aw(S.$6.DIRTY_RECTANGLE,{dirtyRect:{x:ir,y:lr,width:Vn,height:nr}}));var Wr=w.searchDirtyObjects(jt);Wr.sort(function(dr,Fr){return dr.sortable.renderOrder-Fr.sortable.renderOrder}).forEach(function(dr){dr&&dr.isVisible()&&!dr.isCulled()&&w.renderDisplayObject(dr,vt,w.context,O(w,qt)[qt],v)}),vt.restore(),w.renderQueue.forEach(function(dr){w.saveDirtyAABB(dr)}),w.renderQueue=[]}O(w,qt)[qt].restoreStack.forEach(function(){vt.restore()}),O(w,qt)[qt].restoreStack=[]}),ht.hooks.render.tap(E.tag,function(vt){w.clearFullScreen||w.renderQueue.push(vt)})}},{key:"clearRect",value:function(h,v,w,Y,K,it){h.clearRect(v,w,Y,K),it&&(h.fillStyle=it,h.fillRect(v,w,Y,K))}},{key:"renderDisplayObjectOptimized",value:function(h,v,w,Y,K){var it=h.nodeName,ht=!1,Zt=!1,$=this.context.styleRendererFactory[it],Q=this.pathGeneratorFactory[it],H=h.parsedStyle.clipPath;if(H){ht=!Y.prevObject||!fe.exactEquals(H.getWorldTransform(),Y.prevObject.getWorldTransform()),ht&&(this.applyWorldTransform(v,H),Y.prevObject=null);var et=this.pathGeneratorFactory[H.nodeName];et&&(v.save(),Zt=!0,v.beginPath(),et(v,H.parsedStyle),v.closePath(),v.clip())}if($){ht=!Y.prevObject||!fe.exactEquals(h.getWorldTransform(),Y.prevObject.getWorldTransform()),ht&&this.applyWorldTransform(v,h);var yt=!Y.prevObject;if(!yt){var Xt=Y.prevObject.nodeName;it===S.bn.TEXT?yt=Xt!==S.bn.TEXT:it===S.bn.IMAGE?yt=Xt!==S.bn.IMAGE:yt=Xt===S.bn.TEXT||Xt===S.bn.IMAGE}$.applyStyleToContext(v,h,yt,Y),Y.prevObject=h}Q&&(v.beginPath(),Q(v,h.parsedStyle),it!==S.bn.LINE&&it!==S.bn.PATH&&it!==S.bn.POLYLINE&&v.closePath()),$&&$.drawToContext(v,h,O(this,qt)[qt],this,K),Zt&&v.restore(),h.dirty(!1)}},{key:"renderDisplayObject",value:function(h,v,w,Y,K){var it=h.nodeName,ht=Y.restoreStack[Y.restoreStack.length-1];ht&&!(h.compareDocumentPosition(ht)&S.NB.DOCUMENT_POSITION_CONTAINS)&&(v.restore(),Y.restoreStack.pop());var Zt=this.context.styleRendererFactory[it],$=this.pathGeneratorFactory[it],Q=h.parsedStyle.clipPath;if(Q){this.applyWorldTransform(v,Q);var H=this.pathGeneratorFactory[Q.nodeName];H&&(v.save(),Y.restoreStack.push(h),v.beginPath(),H(v,Q.parsedStyle),v.closePath(),v.clip())}Zt&&(this.applyWorldTransform(v,h),v.save(),this.applyAttributesToContext(v,h)),$&&(v.beginPath(),$(v,h.parsedStyle),it!==S.bn.LINE&&it!==S.bn.PATH&&it!==S.bn.POLYLINE&&v.closePath()),Zt&&(Zt.render(v,h.parsedStyle,h,w,this,K),v.restore()),h.dirty(!1)}},{key:"applyAttributesToContext",value:function(h,v){var w=v.parsedStyle,Y=w.stroke,K=w.fill,it=w.opacity,ht=w.lineDash,Zt=w.lineDashOffset;ht&&h.setLineDash(ht),(0,$t.Z)(Zt)||(h.lineDashOffset=Zt),(0,$t.Z)(it)||(h.globalAlpha*=it),!(0,$t.Z)(Y)&&!Array.isArray(Y)&&!Y.isNone&&(h.strokeStyle=v.attributes.stroke),!(0,$t.Z)(K)&&!Array.isArray(K)&&!K.isNone&&(h.fillStyle=v.attributes.fill)}},{key:"convertAABB2Rect",value:function(h){var v=h.getMin(),w=h.getMax(),Y=Math.floor(v[0]),K=Math.floor(v[1]),it=Math.ceil(w[0]),ht=Math.ceil(w[1]),Zt=it-Y,$=ht-K;return{x:Y,y:K,width:Zt,height:$}}},{key:"mergeDirtyAABBs",value:function(h){var v=new S.mN;return h.forEach(function(w){var Y=w.getRenderBounds();v.add(Y);var K=w.renderable.dirtyRenderBounds;K&&v.add(K)}),v}},{key:"searchDirtyObjects",value:function(h){var v=h.getMin(),w=(0,M.Z)(v,2),Y=w[0],K=w[1],it=h.getMax(),ht=(0,M.Z)(it,2),Zt=ht[0],$=ht[1],Q=this.rBush.search({minX:Y,minY:K,maxX:Zt,maxY:$});return Q.map(function(H){var et=H.displayObject;return et})}},{key:"saveDirtyAABB",value:function(h){var v=h.renderable;v.dirtyRenderBounds||(v.dirtyRenderBounds=new S.mN);var w=h.getRenderBounds();w&&v.dirtyRenderBounds.update(w.center,w.halfExtents)}},{key:"applyWorldTransform",value:function(h,v,w){w?(fe.copy(this.tmpMat4,v.getLocalTransform()),fe.multiply(this.tmpMat4,w,this.tmpMat4),fe.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)):(fe.copy(this.tmpMat4,v.getWorldTransform()),fe.multiply(this.tmpMat4,this.vpMatrix,this.tmpMat4)),h.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 h=new S.mN,v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return w.forEach(function(K){h.add(K)}),h}}])}();se.tag="CanvasRenderer";function te(E,b,h,v,w,Y,K){var it,ht;if(E.image.nodeName==="rect"){var Zt=E.image.parsedStyle,$=Zt.width,Q=Zt.height;ht=v.contextService.getDPR();var H=v.config.offscreenCanvas;it=Y.offscreenCanvasCreator.getOrCreateCanvas(H),it.width=$*ht,it.height=Q*ht;var et=Y.offscreenCanvasCreator.getOrCreateContext(H),yt={restoreStack:[],prevObject:null,currentContext:new Map};E.image.forEach(function(Ot){w.renderDisplayObject(Ot,et,v,yt,Y)}),yt.restoreStack.forEach(function(){et.restore()})}var Xt=K.getOrCreatePatternSync(b,E,h,it,ht,b.getGeometryBounds().min,function(){b.dirty(),v.renderingService.dirty()});return Xt}function ke(E,b,h,v){var w;if(E.type===S.GL.LinearGradient||E.type===S.GL.RadialGradient){var Y=b.getGeometryBounds(),K=Y&&Y.halfExtents[0]*2||1,it=Y&&Y.halfExtents[1]*2||1,ht=Y&&Y.min||[0,0];w=v.getOrCreateGradient((0,be.Z)((0,be.Z)({type:E.type},E.value),{},{min:ht,width:K,height:it}),h)}return w}var Ye=["shadowBlur","shadowOffsetX","shadowOffsetY"],Ve=["lineCap","lineJoin","miterLimit"],on={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},xn={};function vn(E,b,h,v){var w=v.has(b)?v.get(b):on[b];return w!==h&&(b==="lineDash"?E.setLineDash(h):E[b]=h,v.set(b,h)),w}var Qn=function(){function E(b){(0,_.Z)(this,E),this.imagePool=b}return(0,c.Z)(E,[{key:"applyAttributesToContext",value:function(h,v){}},{key:"render",value:function(h,v,w,Y,K,it){}},{key:"applyCommonStyleToContext",value:function(h,v,w,Y){var K=w?xn:Y.prevObject.parsedStyle,it=v.parsedStyle;(w||it.opacity!==K.opacity)&&vn(h,"globalAlpha",(0,$t.Z)(it.opacity)?on.globalAlpha:it.opacity,Y.currentContext),(w||it.blend!==K.blend)&&vn(h,"globalCompositeOperation",(0,$t.Z)(it.blend)?on.globalCompositeOperation:it.blend,Y.currentContext)}},{key:"applyStrokeFillStyleToContext",value:function(h,v,w,Y){var K=w?xn:Y.prevObject.parsedStyle,it=v.parsedStyle,ht=it.lineWidth,Zt=ht===void 0?on.lineWidth:ht,$=it.fill&&!it.fill.isNone,Q=it.stroke&&!it.stroke.isNone&&Zt>0;if(Q){if(w||v.attributes.stroke!==Y.prevObject.attributes.stroke){var H=!(0,$t.Z)(it.stroke)&&!Array.isArray(it.stroke)&&!it.stroke.isNone?v.attributes.stroke:on.strokeStyle;vn(h,"strokeStyle",H,Y.currentContext)}(w||it.lineWidth!==K.lineWidth)&&vn(h,"lineWidth",(0,$t.Z)(it.lineWidth)?on.lineWidth:it.lineWidth,Y.currentContext),(w||it.lineDash!==K.lineDash)&&vn(h,"lineDash",it.lineDash||on.lineDash,Y.currentContext),(w||it.lineDashOffset!==K.lineDashOffset)&&vn(h,"lineDashOffset",(0,$t.Z)(it.lineDashOffset)?on.lineDashOffset:it.lineDashOffset,Y.currentContext);for(var et=0;et<Ve.length;et++){var yt=Ve[et];(w||it[yt]!==K[yt])&&vn(h,yt,(0,$t.Z)(it[yt])?on[yt]:it[yt],Y.currentContext)}}if($&&(w||v.attributes.fill!==Y.prevObject.attributes.fill)){var Xt=!(0,$t.Z)(it.fill)&&!Array.isArray(it.fill)&&!it.fill.isNone?v.attributes.fill:on.fillStyle;vn(h,"fillStyle",Xt,Y.currentContext)}}},{key:"applyStyleToContext",value:function(h,v,w,Y){var K=v.nodeName;this.applyCommonStyleToContext(h,v,w,Y),K===S.bn.IMAGE||this.applyStrokeFillStyleToContext(h,v,w,Y)}},{key:"applyShadowAndFilterStyleToContext",value:function(h,v,w,Y){var K=v.parsedStyle;if(w){vn(h,"shadowColor",K.shadowColor.toString(),Y.currentContext);for(var it=0;it<Ye.length;it++){var ht=Ye[it];vn(h,ht,K[ht]||on[ht],Y.currentContext)}}K.filter&&K.filter.length&&vn(h,"filter",v.attributes.filter,Y.currentContext)}},{key:"clearShadowAndFilterStyleForContext",value:function(h,v,w,Y){var K=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(v){vn(h,"shadowColor",on.shadowColor,Y.currentContext);for(var it=0;it<Ye.length;it++){var ht=Ye[it];vn(h,ht,on[ht],Y.currentContext)}}if(w)if(v&&K){var Zt=h.filter;!(0,$t.Z)(Zt)&&Zt.indexOf("drop-shadow")>-1&&vn(h,"filter",Zt.replace(/drop-shadow\([^)]*\)/,"").trim()||on.filter,Y.currentContext)}else vn(h,"filter",on.filter,Y.currentContext)}},{key:"fillToContext",value:function(h,v,w,Y,K){var it=this,ht=v.parsedStyle,Zt=ht.fill,$=ht.fillRule,Q=null;if(Array.isArray(Zt)&&Zt.length>0)Zt.forEach(function(et){var yt=vn(h,"fillStyle",ke(et,v,h,it.imagePool),w.currentContext);Q=Q!=null?Q:yt,$?h.fill($):h.fill()});else{if((0,S.R)(Zt)){var H=te(Zt,v,h,v.ownerDocument.defaultView.context,Y,K,this.imagePool);H&&(h.fillStyle=H,Q=!0)}$?h.fill($):h.fill()}Q!==null&&vn(h,"fillStyle",Q,w.currentContext)}},{key:"strokeToContext",value:function(h,v,w,Y,K){var it=this,ht=v.parsedStyle.stroke,Zt=null;if(Array.isArray(ht)&&ht.length>0)ht.forEach(function(H){var et=vn(h,"strokeStyle",ke(H,v,h,it.imagePool),w.currentContext);Zt=Zt!=null?Zt:et,h.stroke()});else{if((0,S.R)(ht)){var $=te(ht,v,h,v.ownerDocument.defaultView.context,Y,K,this.imagePool);if($){var Q=vn(h,"strokeStyle",$,w.currentContext);Zt=Zt!=null?Zt:Q}}h.stroke()}Zt!==null&&vn(h,"strokeStyle",Zt,w.currentContext)}},{key:"drawToContext",value:function(h,v,w,Y,K){var it,ht=v.nodeName,Zt=v.parsedStyle,$=Zt.opacity,Q=$===void 0?on.globalAlpha:$,H=Zt.fillOpacity,et=H===void 0?on.fillOpacity:H,yt=Zt.strokeOpacity,Xt=yt===void 0?on.strokeOpacity:yt,Ot=Zt.lineWidth,Kt=Ot===void 0?on.lineWidth:Ot,gt=Zt.fill&&!Zt.fill.isNone,vt=Zt.stroke&&!Zt.stroke.isNone&&Kt>0;if(!(!gt&&!vt)){var lt=!(0,$t.Z)(Zt.shadowColor)&&Zt.shadowBlur>0,jt=Zt.shadowType==="inner",Yt=((it=Zt.fill)===null||it===void 0?void 0:it.alpha)===0,he=!!(Zt.filter&&Zt.filter.length),ye=lt&&vt&&(ht===S.bn.PATH||ht===S.bn.LINE||ht===S.bn.POLYLINE||Yt||jt),Wt=null;if(gt){ye||this.applyShadowAndFilterStyleToContext(h,v,lt,w);var Oe=Q*et;Wt=vn(h,"globalAlpha",Oe,w.currentContext),this.fillToContext(h,v,w,Y,K),ye||this.clearShadowAndFilterStyleForContext(h,lt,he,w)}if(vt){var He=!1,Qe=Q*Xt,An=vn(h,"globalAlpha",Qe,w.currentContext);if(Wt=gt?Wt:An,ye&&(this.applyShadowAndFilterStyleToContext(h,v,lt,w),He=!0,jt)){var Nn=h.globalCompositeOperation;h.globalCompositeOperation="source-atop",this.strokeToContext(h,v,w,Y,K),h.globalCompositeOperation=Nn,this.clearShadowAndFilterStyleForContext(h,lt,he,w,!0)}this.strokeToContext(h,v,w,Y,K),He&&this.clearShadowAndFilterStyleForContext(h,lt,he,w)}Wt!==null&&vn(h,"globalAlpha",Wt,w.currentContext)}}}])}(),Ln=function(E){function b(){return(0,_.Z)(this,b),(0,I.Z)(this,b,arguments)}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"render",value:function(v,w,Y,K,it,ht){var Zt=w.fill,$=w.fillRule,Q=w.opacity,H=Q===void 0?1:Q,et=w.fillOpacity,yt=et===void 0?1:et,Xt=w.stroke,Ot=w.strokeOpacity,Kt=Ot===void 0?1:Ot,gt=w.lineWidth,vt=gt===void 0?1:gt,lt=w.lineCap,jt=w.lineJoin,Yt=w.shadowType,he=w.shadowColor,ye=w.shadowBlur,Wt=w.filter,Oe=w.miterLimit,He=Zt&&!Zt.isNone,Qe=Xt&&!Xt.isNone&&vt>0,An=(Zt==null?void 0:Zt.alpha)===0,Nn=!!(Wt&&Wt.length),Cn=!(0,$t.Z)(he)&&ye>0,Bn=Y.nodeName,jn=Yt==="inner",or=Qe&&Cn&&(Bn===S.bn.PATH||Bn===S.bn.LINE||Bn===S.bn.POLYLINE||An||jn);He&&(v.globalAlpha=H*yt,or||_n(Y,v,Cn),me(v,Y,Zt,$,K,it,ht,this.imagePool),or||this.clearShadowAndFilter(v,Nn,Cn)),Qe&&(v.globalAlpha=H*Kt,v.lineWidth=vt,(0,$t.Z)(Oe)||(v.miterLimit=Oe),(0,$t.Z)(lt)||(v.lineCap=lt),(0,$t.Z)(jt)||(v.lineJoin=jt),or&&(jn&&(v.globalCompositeOperation="source-atop"),_n(Y,v,!0),jn&&(pr(v,Y,Xt,K,it,ht,this.imagePool),v.globalCompositeOperation=on.globalCompositeOperation,this.clearShadowAndFilter(v,Nn,!0))),pr(v,Y,Xt,K,it,ht,this.imagePool))}},{key:"clearShadowAndFilter",value:function(v,w,Y){if(Y&&(v.shadowColor="transparent",v.shadowBlur=0),w){var K=v.filter;!(0,$t.Z)(K)&&K.indexOf("drop-shadow")>-1&&(v.filter=K.replace(/drop-shadow\([^)]*\)/,"").trim()||"none")}}}])}(Qn);function _n(E,b,h){var v=E.parsedStyle,w=v.filter,Y=v.shadowColor,K=v.shadowBlur,it=v.shadowOffsetX,ht=v.shadowOffsetY;w&&w.length&&(b.filter=E.style.filter),h&&(b.shadowColor=Y.toString(),b.shadowBlur=K||0,b.shadowOffsetX=it||0,b.shadowOffsetY=ht||0)}function me(E,b,h,v,w,Y,K,it){var ht=arguments.length>8&&arguments[8]!==void 0?arguments[8]:!1;Array.isArray(h)?h.forEach(function(Zt){E.fillStyle=ke(Zt,b,E,it),ht||(v?E.fill(v):E.fill())}):((0,S.R)(h)&&(E.fillStyle=te(h,b,E,w,Y,K,it)),ht||(v?E.fill(v):E.fill()))}function pr(E,b,h,v,w,Y,K){var it=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1;Array.isArray(h)?h.forEach(function(ht){E.strokeStyle=ke(ht,b,E,K),it||E.stroke()}):((0,S.R)(h)&&(E.strokeStyle=te(h,b,E,v,w,Y,K)),it||E.stroke())}function Zn(E,b){var h=(0,M.Z)(E,4),v=h[0],w=h[1],Y=h[2],K=h[3],it=(0,M.Z)(b,4),ht=it[0],Zt=it[1],$=it[2],Q=it[3],H=Math.max(v,ht),et=Math.max(w,Zt),yt=Math.min(v+Y,ht+$),Xt=Math.min(w+K,Zt+Q);return yt<=H||Xt<=et?null:[H,et,yt-H,Xt-et]}function kr(E,b){var h=Vt.fF(Vt.Ue(),[E[0],E[1],0],b),v=Vt.fF(Vt.Ue(),[E[0]+E[2],E[1],0],b),w=Vt.fF(Vt.Ue(),[E[0],E[1]+E[3],0],b),Y=Vt.fF(Vt.Ue(),[E[0]+E[2],E[1]+E[3],0],b);return[Math.min(h[0],v[0],w[0],Y[0]),Math.min(h[1],v[1],w[1],Y[1]),Math.max(h[0],v[0],w[0],Y[0])-Math.min(h[0],v[0],w[0],Y[0]),Math.max(h[1],v[1],w[1],Y[1])-Math.min(h[1],v[1],w[1],Y[1])]}var Ar=function(E){function b(){return(0,_.Z)(this,b),(0,I.Z)(this,b,arguments)}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"renderDownSampled",value:function(v,w,Y,K){var it=K.src,ht=K.imageCache;if(!ht.downSampled){this.imagePool.createDownSampledImage(it,Y).then(function(){Y.ownerDocument&&(Y.dirty(),Y.ownerDocument.defaultView.context.renderingService.dirty())}).catch(function(Zt){console.error(Zt)});return}v.drawImage(ht.downSampled,Math.floor(K.drawRect[0]),Math.floor(K.drawRect[1]),Math.ceil(K.drawRect[2]),Math.ceil(K.drawRect[3]))}},{key:"renderTile",value:function(v,w,Y,K){var it=K.src,ht=K.imageCache,Zt=K.imageRect,$=K.drawRect,Q=ht.size,H=v.getTransform(),et=H.a,yt=H.b,Xt=H.c,Ot=H.d,Kt=H.e,gt=H.f;if(v.resetTransform(),!(ht!=null&&ht.gridSize)){this.imagePool.createImageTiles(it,[],function(){Y.ownerDocument&&(Y.dirty(),Y.ownerDocument.defaultView.context.renderingService.dirty())},Y).catch(function(Cn){console.error(Cn)});return}for(var vt=[Q[0]/Zt[2],Q[1]/Zt[3]],lt=[ht.tileSize[0]/vt[0],ht.tileSize[1]/vt[1]],jt=[Math.floor(($[0]-Zt[0])/lt[0]),Math.ceil(($[0]+$[2]-Zt[0])/lt[0])],Yt=jt[0],he=jt[1],ye=[Math.floor(($[1]-Zt[1])/lt[1]),Math.ceil(($[1]+$[3]-Zt[1])/lt[1])],Wt=ye[0],Oe=ye[1],He=Wt;He<=Oe;He++)for(var Qe=Yt;Qe<=he;Qe++){var An=ht.tiles[He][Qe];if(An){var Nn=[Math.floor(Zt[0]+An.tileX*lt[0]),Math.floor(Zt[1]+An.tileY*lt[1]),Math.ceil(lt[0]),Math.ceil(lt[1])];v.drawImage(An.data,Nn[0],Nn[1],Nn[2],Nn[3])}}v.setTransform(et,yt,Xt,Ot,Kt,gt)}},{key:"render",value:function(v,w,Y){var K=w.x,it=K===void 0?0:K,ht=w.y,Zt=ht===void 0?0:ht,$=w.width,Q=w.height,H=w.src,et=w.shadowColor,yt=w.shadowBlur,Xt=this.imagePool.getImageSync(H,Y),Ot=Xt==null?void 0:Xt.img,Kt=$,gt=Q;if(Ot){Kt||(Kt=Ot.width),gt||(gt=Ot.height);var vt=!(0,$t.Z)(et)&&yt>0;_n(Y,v,vt);try{var lt=Y.ownerDocument.defaultView.getContextService().getDomElement(),jt=lt.width,Yt=lt.height,he=v.getTransform(),ye=he.a,Wt=he.b,Oe=he.c,He=he.d,Qe=he.e,An=he.f,Nn=fe.fromValues(ye,Oe,0,0,Wt,He,0,0,0,0,1,0,Qe,An,0,1),Cn=kr([it,Zt,Kt,gt],Nn),Bn=Zn([0,0,jt,Yt],Cn);if(!Bn)return;if(!Y.ownerDocument.defaultView.getConfig().enableLargeImageOptimization){b.renderFull(v,w,Y,{image:Ot,drawRect:[it,Zt,Kt,gt]});return}var jn=Cn[2]/Xt.size[0];if(jn<(Xt.downSamplingRate||.5)){this.renderDownSampled(v,w,Y,{src:H,imageCache:Xt,drawRect:[it,Zt,Kt,gt]});return}if(!Ht.isSupportTile){b.renderFull(v,w,Y,{image:Ot,drawRect:[it,Zt,Kt,gt]});return}this.renderTile(v,w,Y,{src:H,imageCache:Xt,imageRect:Cn,drawRect:Bn})}catch(or){}}}},{key:"drawToContext",value:function(v,w,Y,K,it){this.render(v,w.parsedStyle,w)}}],[{key:"renderFull",value:function(v,w,Y,K){v.drawImage(K.image,Math.floor(K.drawRect[0]),Math.floor(K.drawRect[1]),Math.ceil(K.drawRect[2]),Math.ceil(K.drawRect[3]))}}])}(Ln),ei=function(E){function b(){return(0,_.Z)(this,b),(0,I.Z)(this,b,arguments)}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"render",value:function(v,w,Y,K,it,ht){Y.getBounds();var Zt=w.lineWidth,$=Zt===void 0?1:Zt,Q=w.textAlign,H=Q===void 0?"start":Q,et=w.textBaseline,yt=et===void 0?"alphabetic":et,Xt=w.lineJoin,Ot=Xt===void 0?"miter":Xt,Kt=w.miterLimit,gt=Kt===void 0?10:Kt,vt=w.letterSpacing,lt=vt===void 0?0:vt,jt=w.stroke,Yt=w.fill,he=w.fillRule,ye=w.fillOpacity,Wt=ye===void 0?1:ye,Oe=w.strokeOpacity,He=Oe===void 0?1:Oe,Qe=w.opacity,An=Qe===void 0?1:Qe,Nn=w.metrics,Cn=w.x,Bn=Cn===void 0?0:Cn,jn=w.y,or=jn===void 0?0:jn,ir=w.dx,lr=w.dy,Vn=w.shadowColor,nr=w.shadowBlur,Or=w.textDecorationLine,Kr=Nn.font,Wr=Nn.lines,dr=Nn.height,Fr=Nn.lineHeight,xi=Nn.lineMetrics;v.font=Kr,v.lineWidth=$,v.textAlign=H==="middle"?"center":H;var $r=yt;$r==="alphabetic"&&($r="bottom"),v.lineJoin=Ot,(0,$t.Z)(gt)||(v.miterLimit=gt);var pi=or;yt==="middle"?pi+=-dr/2-Fr/2:yt==="bottom"||yt==="alphabetic"||yt==="ideographic"?pi+=-dr:(yt==="top"||yt==="hanging")&&(pi+=-Fr);var Ri=Bn+(ir||0);pi+=lr||0,Wr.length===1&&($r==="bottom"?($r="middle",pi-=.5*dr):$r==="top"&&($r="middle",pi+=.5*dr)),v.textBaseline=$r;var Hi=!(0,$t.Z)(Vn)&&nr>0;_n(Y,v,Hi);for(var Zi=0;Zi<Wr.length;Zi++){var ca=$/2+Ri;pi+=Fr,!(0,$t.Z)(jt)&&!jt.isNone&&$&&this.drawLetterSpacing(v,Y,Wr[Zi],xi[Zi],H,ca,pi,lt,Yt,he,Wt,jt,He,An,!0,K,it,ht),(0,$t.Z)(Yt)||this.drawLetterSpacing(v,Y,Wr[Zi],xi[Zi],H,ca,pi,lt,Yt,he,Wt,jt,He,An,!1,K,it,ht)}Or&&Or!=="none"&&this.drawTextDecorations(v,w,Y,Wr,Fr,Ri,or+(lr||0),K,it,ht)}},{key:"drawLetterSpacing",value:function(v,w,Y,K,it,ht,Zt,$,Q,H,et,yt,Xt,Ot,Kt,gt,vt,lt){if($===0){Kt?this.strokeText(v,w,Y,ht,Zt,yt,Xt,gt,vt,lt):this.fillText(v,w,Y,ht,Zt,Q,H,et,Ot,gt,vt,lt);return}var jt=v.textAlign;v.textAlign="left";var Yt=ht;it==="center"||it==="middle"?Yt=ht-K.width/2:(it==="right"||it==="end")&&(Yt=ht-K.width);for(var he=Array.from(Y),ye=v.measureText(Y).width,Wt=0,Oe=0;Oe<he.length;++Oe){var He=he[Oe];Kt?this.strokeText(v,w,He,Yt,Zt,yt,Xt,gt,vt,lt):this.fillText(v,w,He,Yt,Zt,Q,H,et,Ot,gt,vt,lt),Wt=v.measureText(Y.substring(Oe+1)).width,Yt+=ye-Wt+$,ye=Wt}v.textAlign=jt}},{key:"fillText",value:function(v,w,Y,K,it,ht,Zt,$,Q,H,et,yt){me(v,w,ht,Zt,H,et,yt,this.imagePool,!0);var Xt,Ot=!(0,$t.Z)($)&&$!==1;Ot&&(Xt=v.globalAlpha,v.globalAlpha=$*Q),v.fillText(Y,K,it),Ot&&(v.globalAlpha=Xt)}},{key:"strokeText",value:function(v,w,Y,K,it,ht,Zt,$,Q,H){pr(v,w,ht,$,Q,H,this.imagePool,!0);var et,yt=!(0,$t.Z)(Zt)&&Zt!==1;yt&&(et=v.globalAlpha,v.globalAlpha=Zt),v.strokeText(Y,K,it),yt&&(v.globalAlpha=et)}},{key:"drawTextDecorations",value:function(v,w,Y,K,it,ht,Zt,$,Q,H){var et=w.textDecorationLine,yt=w.textDecorationColor,Xt=w.textDecorationStyle,Ot=w.textDecorationThickness,Kt=Ot===void 0?1:Ot,gt=w.textAlign,vt=gt===void 0?"start":gt,lt=w.lineWidth,jt=lt===void 0?1:lt,Yt=w.metrics;if(!(!et||et==="none")){var he=Yt.lineMetrics,ye=et.split(" ");switch(v.lineWidth=Kt,yt&&(v.strokeStyle="rgba(".concat(yt.r,", ").concat(yt.g,", ").concat(yt.b,", ").concat(yt.alpha,")")),Xt){case"dashed":v.setLineDash([5,5]);break;case"dotted":v.setLineDash([2,2]);break;case"wavy":v.setLineDash([]);break;default:v.setLineDash([]);break}var Wt=Zt,Oe=w.textBaseline,He=Oe===void 0?"alphabetic":Oe;He==="middle"?Wt+=-Yt.height/2-it/2:He==="bottom"||He==="alphabetic"||He==="ideographic"?Wt+=-Yt.height:(He==="top"||He==="hanging")&&(Wt+=-it);for(var Qe=0;Qe<K.length;Qe++){Wt+=it;var An=he[Qe];if(An){var Nn=jt/2,Cn=ht,Bn=ht+An.width;vt==="center"||vt==="middle"?(Cn=ht-An.width/2,Bn=ht+An.width/2):(vt==="right"||vt==="end")&&(Cn=ht-An.width,Bn=ht),Cn+=Nn,Bn+=Nn;var jn=(0,J.Z)(ye),or;try{for(jn.s();!(or=jn.n()).done;){var ir=or.value,lr=Wt;switch(ir){case"underline":lr+=2;break;case"overline":lr-=it-2;break;case"line-through":lr-=it/2;break;default:continue}Xt==="wavy"?this.drawWavyLine(v,Cn,Bn,lr):(v.beginPath(),v.moveTo(Cn,lr),v.lineTo(Bn,lr),v.stroke())}}catch(Vn){jn.e(Vn)}finally{jn.f()}}}v.setLineDash([])}}},{key:"drawWavyLine",value:function(v,w,Y,K){var it=2,ht=10,Zt=Math.floor((Y-w)/ht);v.beginPath(),v.moveTo(w,K);for(var $=0;$<Zt;$++){var Q=w+$*ht+ht/4,H=K+it,et=w+$*ht+ht/2,yt=K;v.quadraticCurveTo(Q,H,et,yt);var Xt=w+$*ht+ht*3/4,Ot=K-it,Kt=w+($+1)*ht,gt=K;v.quadraticCurveTo(Xt,Ot,Kt,gt)}v.stroke()}},{key:"drawToContext",value:function(v,w,Y,K,it){this.render(v,w.parsedStyle,w,w.ownerDocument.defaultView.context,K,it)}}])}(Ln),yi=function(E){function b(){var h,v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,b),h=(0,I.Z)(this,b),h.name="canvas-renderer",h.options=v,h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(){var v,w=(0,be.Z)({dirtyObjectNumThreshold:500,dirtyObjectRatioThreshold:.8},this.options),Y=this.context.imagePool,K=new Ln(Y),it=(v={},(0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)((0,R.Z)(v,S.bn.CIRCLE,K),S.bn.ELLIPSE,K),S.bn.RECT,K),S.bn.IMAGE,new Ar(Y)),S.bn.TEXT,new ei(Y)),S.bn.LINE,K),S.bn.POLYLINE,K),S.bn.POLYGON,K),S.bn.PATH,K),S.bn.GROUP,void 0),(0,R.Z)((0,R.Z)((0,R.Z)(v,S.bn.HTML,void 0),S.bn.MESH,void 0),S.bn.FRAGMENT,void 0));this.context.defaultStyleRendererFactory=it,this.context.styleRendererFactory=it,this.addRenderingPlugin(new se(w))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins(),delete this.context.defaultStyleRendererFactory,delete this.context.styleRendererFactory}}])}(S.F6);var ui=function(){function E(){(0,_.Z)(this,E)}return(0,c.Z)(E,[{key:"apply",value:function(h,v){var w=this,Y=h.renderingService,K=h.renderingContext,it=h.config;this.context=h;var ht=K.root.ownerDocument.defaultView,Zt=function(ye){Y.hooks.pointerMove.call(ye)},$=function(ye){Y.hooks.pointerUp.call(ye)},Q=function(ye){Y.hooks.pointerDown.call(ye)},H=function(ye){Y.hooks.pointerOver.call(ye)},et=function(ye){Y.hooks.pointerOut.call(ye)},yt=function(ye){Y.hooks.pointerCancel.call(ye)},Xt=function(ye){Y.hooks.pointerWheel.call(ye)},Ot=function(ye){Y.hooks.click.call(ye)},Kt=function(ye){v.globalThis.document.addEventListener("pointermove",Zt,!0),ye.addEventListener("pointerdown",Q,!0),ye.addEventListener("pointerleave",et,!0),ye.addEventListener("pointerover",H,!0),v.globalThis.addEventListener("pointerup",$,!0),v.globalThis.addEventListener("pointercancel",yt,!0)},gt=function(ye){ye.addEventListener("touchstart",Q,!0),ye.addEventListener("touchend",$,!0),ye.addEventListener("touchmove",Zt,!0),ye.addEventListener("touchcancel",yt,!0)},vt=function(ye){v.globalThis.document.addEventListener("mousemove",Zt,!0),ye.addEventListener("mousedown",Q,!0),ye.addEventListener("mouseout",et,!0),ye.addEventListener("mouseover",H,!0),v.globalThis.addEventListener("mouseup",$,!0)},lt=function(ye){v.globalThis.document.removeEventListener("pointermove",Zt,!0),ye.removeEventListener("pointerdown",Q,!0),ye.removeEventListener("pointerleave",et,!0),ye.removeEventListener("pointerover",H,!0),v.globalThis.removeEventListener("pointerup",$,!0),v.globalThis.removeEventListener("pointercancel",yt,!0)},jt=function(ye){ye.removeEventListener("touchstart",Q,!0),ye.removeEventListener("touchend",$,!0),ye.removeEventListener("touchmove",Zt,!0),ye.removeEventListener("touchcancel",yt,!0)},Yt=function(ye){v.globalThis.document.removeEventListener("mousemove",Zt,!0),ye.removeEventListener("mousedown",Q,!0),ye.removeEventListener("mouseout",et,!0),ye.removeEventListener("mouseover",H,!0),v.globalThis.removeEventListener("mouseup",$,!0)};Y.hooks.init.tap(E.tag,function(){var he=w.context.contextService.getDomElement();v.globalThis.navigator.msPointerEnabled?(he.style.msContentZooming="none",he.style.msTouchAction="none"):ht.supportsPointerEvents&&(he.style.touchAction="none"),ht.supportsPointerEvents?Kt(he):vt(he),ht.supportsTouchEvents&>(he),it.useNativeClickEvent&&he.addEventListener("click",Ot,!0),he.addEventListener("wheel",Xt,{passive:!0,capture:!0})}),Y.hooks.destroy.tap(E.tag,function(){var he=w.context.contextService.getDomElement();v.globalThis.navigator.msPointerEnabled?(he.style.msContentZooming="",he.style.msTouchAction=""):ht.supportsPointerEvents&&(he.style.touchAction=""),ht.supportsPointerEvents?lt(he):Yt(he),ht.supportsTouchEvents&&jt(he),it.useNativeClickEvent&&he.removeEventListener("click",Ot,!0),he.removeEventListener("wheel",Xt,!0)})}}])}();ui.tag="DOMInteraction";var Ur=function(E){function b(){var h;(0,_.Z)(this,b);for(var v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return h=(0,I.Z)(this,b,[].concat(w)),h.name="dom-interaction",h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(){this.addRenderingPlugin(new ui)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(S.F6),ki=y(1933);var la="g-canvas-camera",Oi=function(){function E(){(0,_.Z)(this,E),this.displayObjectHTMLElementMap=new WeakMap}return(0,c.Z)(E,[{key:"joinTransformMatrix",value:function(h){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[0,0,0];return"matrix(".concat([h[0],h[1],h[4],h[5],h[12]+v[0],h[13]+v[1]].join(","),")")}},{key:"apply",value:function(h,v){var w=this,Y=h.camera,K=h.renderingContext,it=h.renderingService;this.context=h;var ht=K.root.ownerDocument.defaultView,Zt=ht.context.eventService.nativeHTMLMap,$=function(Kt,gt){gt.style.transform=w.joinTransformMatrix(Kt.getWorldTransform(),Kt.getOrigin())},Q=function(Kt){var gt=Kt.target;if(gt.nodeName===S.bn.HTML){w.$camera||(w.$camera=w.createCamera(Y));var vt=w.getOrCreateEl(gt);w.$camera.appendChild(vt),Object.keys(gt.attributes).forEach(function(lt){w.updateAttribute(lt,gt)}),$(gt,vt),Zt.set(vt,gt)}},H=function(Kt){var gt=Kt.target;if(gt.nodeName===S.bn.HTML&&w.$camera){var vt=w.getOrCreateEl(gt);vt&&(vt.remove(),Zt.delete(vt))}},et=function(Kt){var gt=Kt.target;if(gt.nodeName===S.bn.HTML){var vt=Kt.attrName;w.updateAttribute(vt,gt)}},yt=function(Kt){for(var gt=Kt.detail,vt=0;vt<gt.length;vt++){var lt=gt[vt],jt=lt.target,Yt=jt.nodeName===S.bn.FRAGMENT?jt.childNodes:[jt];Yt.forEach(function(he){if(he.nodeName===S.bn.HTML){var ye=w.getOrCreateEl(he);$(he,ye)}})}},Xt=function(){if(w.$camera){var Kt=w.context.config,gt=Kt.width,vt=Kt.height;w.$camera.parentElement.style.width="".concat(gt||0,"px"),w.$camera.parentElement.style.height="".concat(vt||0,"px")}};it.hooks.init.tap(E.tag,function(){ht.addEventListener(S.$6.RESIZE,Xt),ht.addEventListener(S.Dk.MOUNTED,Q),ht.addEventListener(S.Dk.UNMOUNTED,H),ht.addEventListener(S.Dk.ATTR_MODIFIED,et),ht.addEventListener(S.Dk.BOUNDS_CHANGED,yt)}),it.hooks.endFrame.tap(E.tag,function(){w.$camera&&K.renderReasons.has(S.Rr.CAMERA_CHANGED)&&(w.$camera.style.transform=w.joinTransformMatrix(Y.getOrthoMatrix()))}),it.hooks.destroy.tap(E.tag,function(){w.$camera&&w.$camera.remove(),ht.removeEventListener(S.$6.RESIZE,Xt),ht.removeEventListener(S.Dk.MOUNTED,Q),ht.removeEventListener(S.Dk.UNMOUNTED,H),ht.removeEventListener(S.Dk.ATTR_MODIFIED,et),ht.removeEventListener(S.Dk.BOUNDS_CHANGED,yt)})}},{key:"createCamera",value:function(h){var v=this.context.config,w=v.document,Y=v.width,K=v.height,it=this.context.contextService.getDomElement(),ht=it.parentNode;if(ht){var Zt=la,$=ht.querySelector("#".concat(Zt));if(!$){var Q=(w||document).createElement("div");Q.style.overflow="hidden",Q.style.pointerEvents="none",Q.style.position="absolute",Q.style.left="0px",Q.style.top="0px",Q.style.width="".concat(Y||0,"px"),Q.style.height="".concat(K||0,"px");var H=(w||document).createElement("div");$=H,H.id=Zt,H.style.position="absolute",H.style.left="".concat(it.offsetLeft||0,"px"),H.style.top="".concat(it.offsetTop||0,"px"),H.style.transformOrigin="left top",H.style.transform=this.joinTransformMatrix(h.getOrthoMatrix()),H.style.pointerEvents="none",H.style.width="100%",H.style.height="100%",Q.appendChild(H),ht.appendChild(Q)}return $}return null}},{key:"getOrCreateEl",value:function(h){var v=this.context.config.document,w=this.displayObjectHTMLElementMap.get(h);return w||(w=(v||document).createElement("div"),h.parsedStyle.$el=w,this.displayObjectHTMLElementMap.set(h,w),h.id&&(w.id=h.id),h.name&&w.setAttribute("name",h.name),h.className&&(w.className=h.className),w.style.position="absolute",w.style["will-change"]="transform",w.style.transform=this.joinTransformMatrix(h.getWorldTransform(),h.getOrigin())),w}},{key:"updateAttribute",value:function(h,v){var w=this.getOrCreateEl(v);switch(h){case"innerHTML":var Y=v.parsedStyle.innerHTML;(0,Ie.Z)(Y)?w.innerHTML=Y:(w.innerHTML="",w.appendChild(Y));break;case"x":w.style.left="".concat(v.parsedStyle.x,"px");break;case"y":w.style.top="".concat(v.parsedStyle.y,"px");break;case"transformOrigin":var K=v.parsedStyle.transformOrigin;w.style["transform-origin"]="".concat(K[0].buildCSSText(null,null,"")," ").concat(K[1].buildCSSText(null,null,""));break;case"width":var it=v.parsedStyle.width;w.style.width=(0,ki.Z)(it)?"".concat(it,"px"):it.toString();break;case"height":var ht=v.parsedStyle.height;w.style.height=(0,ki.Z)(ht)?"".concat(ht,"px"):ht.toString();break;case"zIndex":var Zt=v.parsedStyle.zIndex;w.style["z-index"]="".concat(Zt);break;case"visibility":var $=v.parsedStyle.visibility;w.style.visibility=$;break;case"pointerEvents":var Q=v.parsedStyle.pointerEvents,H=Q===void 0?"auto":Q;w.style.pointerEvents=H;break;case"opacity":var et=v.parsedStyle.opacity;w.style.opacity="".concat(et);break;case"fill":var yt=v.parsedStyle.fill,Xt="";(0,S.qA)(yt)?yt.isNone?Xt="transparent":Xt=v.getAttribute("fill"):Array.isArray(yt)?Xt=v.getAttribute("fill"):(0,S.R)(yt),w.style.background=Xt;break;case"stroke":var Ot=v.parsedStyle.stroke,Kt="";(0,S.qA)(Ot)?Ot.isNone?Kt="transparent":Kt=v.getAttribute("stroke"):Array.isArray(Ot)?Kt=v.getAttribute("stroke"):(0,S.R)(Ot),w.style["border-color"]=Kt,w.style["border-style"]="solid";break;case"lineWidth":var gt=v.parsedStyle.lineWidth;w.style["border-width"]="".concat(gt||0,"px");break;case"lineDash":w.style["border-style"]="dashed";break;case"filter":var vt=v.style.filter;w.style.filter=vt;break;default:!(0,$t.Z)(v.style[h])&&v.style[h]!==""&&(w.style[h]=v.style[h])}}}])}();Oi.tag="HTMLRendering";var Zr=function(E){function b(){var h;(0,_.Z)(this,b);for(var v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return h=(0,I.Z)(this,b,[].concat(w)),h.name="html-renderer",h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(){this.addRenderingPlugin(new Oi)}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}}])}(S.F6);var qn=function(){function E(b){(0,_.Z)(this,E),this.renderingContext=b.renderingContext,this.canvasConfig=b.config}return(0,c.Z)(E,[{key:"init",value:function(){var h=this.canvasConfig,v=h.container,w=h.canvas;if(w)this.$canvas=w,v&&w.parentElement!==v&&v.appendChild(w),this.$container=w.parentElement,this.canvasConfig.container=this.$container;else if(v&&(this.$container=(0,Ie.Z)(v)?document.getElementById(v):v,this.$container)){var Y=document.createElement("canvas");this.$container.appendChild(Y),this.$container.style.position||(this.$container.style.position="relative"),this.$canvas=Y}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(h,v){var w=this.canvasConfig.devicePixelRatio;this.dpr=w,this.$canvas&&(this.$canvas.width=this.dpr*h,this.$canvas.height=this.dpr*v,(0,S.$p)(this.$canvas,h,v)),this.renderingContext.renderReasons.add(S.Rr.CAMERA_CHANGED)}},{key:"applyCursorStyle",value:function(h){this.$container&&this.$container.style&&(this.$container.style.cursor=h)}},{key:"toDataURL",value:function(){var b=(0,Tt.Z)((0,Rt.Z)().mark(function v(){var w,Y,K,it=arguments;return(0,Rt.Z)().wrap(function(ht){for(;;)switch(ht.prev=ht.next){case 0:return w=it.length>0&&it[0]!==void 0?it[0]:{},Y=w.type,K=w.encoderOptions,ht.abrupt("return",this.context.canvas.toDataURL(Y,K));case 1:case"end":return ht.stop()}},v,this)}));function h(){return b.apply(this,arguments)}return h}()}])}(),Ti=function(E){function b(){var h;(0,_.Z)(this,b);for(var v=arguments.length,w=new Array(v),Y=0;Y<v;Y++)w[Y]=arguments[Y];return h=(0,I.Z)(this,b,[].concat(w)),h.name="canvas-context-register",h}return(0,z.Z)(b,E),(0,c.Z)(b,[{key:"init",value:function(){this.context.ContextService=qn}},{key:"destroy",value:function(){delete this.context.ContextService}}])}(S.F6),Nt=function(E){function b(h){var v;return(0,_.Z)(this,b),v=(0,I.Z)(this,b,[h]),v.registerPlugin(new Ti),v.registerPlugin(new Ut),v.registerPlugin(new ft),v.registerPlugin(new yi),v.registerPlugin(new Ur),v.registerPlugin(new re),v.registerPlugin(new Zr),v}return(0,z.Z)(b,E),(0,c.Z)(b)}(S.I8)},77263:function(bt,Et,y){"use strict";y.d(Et,{mN:function(){return it},I8:function(){return E},F6:function(){return Nt},V1:function(){return Hi},iM:function(){return Fr},Xz:function(){return Jo},$6:function(){return ys},Cd:function(){return $l},b_:function(){return ql},Aw:function(){return Aa},s$:function(){return Pi},BB:function(){return El},jf:function(){return et},Dk:function(){return ea},Pj:function(){return ml},xA:function(){return ul},nR:function(){return dl},GL:function(){return Ya},ZA:function(){return Ko},k9:function(){return tc},Ee:function(){return ec},x1:function(){return nc},NB:function(){return Ii},jB:function(){return kc},y$:function(){return yl},E9:function(){return Q},mg:function(){return Qo},aH:function(){return rc},UL:function(){return ic},Rr:function(){return Yo},bn:function(){return qn},xv:function(){return bl},Cm:function(){return Kn},Rx:function(){return Zo},o6:function(){return zs},O4:function(){return gt},Vl:function(){return lt},Oi:function(){return Ys},_O:function(){return Ot},gz:function(){return Wn},qA:function(){return ks},RV:function(){return Ni},L1:function(){return al},R:function(){return fa},G$:function(){return Dr},G0:function(){return Hl},N1:function(){return Us},BV:function(){return Yt},GZ:function(){return Un},$p:function(){return Co}});var c=y(33885),_=y(67732),I=y(83652),z=y(94480),S=y(22214),R=y(42403),M=y(42978),N=y(37271),D=N,A=y(92421),L=y(97082),F=y(60187),rt=y(79111),G=y(94569),kt=y(45545),ft=y(1933),J=y(68901),Rt=y(76075),Tt=y(71879),Vt=y(70208),fe=y(80813),ue={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0};function Ce(d){return Array.isArray(d)&&d.every(function(g){var s=g[0].toLowerCase();return ue[s]===g.length-1&&"achlmqstvz".includes(s)})}function be(d){return Ce(d)&&d.every(function(g){var s=g[0];return s===s.toUpperCase()})}function we(d){return be(d)&&d.every(function(g){var s=g[0];return"ACLMQZ".includes(s)})}var ne={x1:0,y1:0,x2:0,y2:0,x:0,y:0,qx:null,qy:null};function We(d){for(var g=d.pathValue[d.segmentStart],s=g.toLowerCase(),o=d.data;o.length>=ue[s]&&(s==="m"&&o.length>2?(d.segments.push([g].concat(o.splice(0,2))),s="l",g=g==="m"?"l":"L"):d.segments.push([g].concat(o.splice(0,ue[s]))),!!ue[s]););}function rn(d){var g=d.index,s=d.pathValue,o=s.charCodeAt(g);if(o===48){d.param=0,d.index+=1;return}if(o===49){d.param=1,d.index+=1;return}d.err='[path-util]: invalid Arc flag "'.concat(s[g],'", expecting 0 or 1 at index ').concat(g)}function Xe(d){return d>=48&&d<=57||d===43||d===45||d===46}function pn(d){return d>=48&&d<=57}function Tn(d){var g=d.max,s=d.pathValue,o=d.index,p=o,T=!1,C=!1,W=!1,tt=!1,mt;if(p>=g){d.err="[path-util]: Invalid path value at index ".concat(p,', "pathValue" is missing param');return}if(mt=s.charCodeAt(p),(mt===43||mt===45)&&(p+=1,mt=s.charCodeAt(p)),!pn(mt)&&mt!==46){d.err="[path-util]: Invalid path value at index ".concat(p,', "').concat(s[p],'" is not a number');return}if(mt!==46){if(T=mt===48,p+=1,mt=s.charCodeAt(p),T&&p<g&&mt&&pn(mt)){d.err="[path-util]: Invalid path value at index ".concat(o,', "').concat(s[o],'" illegal number');return}for(;p<g&&pn(s.charCodeAt(p));)p+=1,C=!0;mt=s.charCodeAt(p)}if(mt===46){for(tt=!0,p+=1;pn(s.charCodeAt(p));)p+=1,W=!0;mt=s.charCodeAt(p)}if(mt===101||mt===69){if(tt&&!C&&!W){d.err="[path-util]: Invalid path value at index ".concat(p,', "').concat(s[p],'" invalid float exponent');return}if(p+=1,mt=s.charCodeAt(p),(mt===43||mt===45)&&(p+=1),p<g&&pn(s.charCodeAt(p)))for(;p<g&&pn(s.charCodeAt(p));)p+=1;else{d.err="[path-util]: Invalid path value at index ".concat(p,', "').concat(s[p],'" invalid integer exponent');return}}d.index=p,d.param=+d.pathValue.slice(o,p)}function $e(d){var g=[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279];return d===10||d===13||d===8232||d===8233||d===32||d===9||d===11||d===12||d===160||d>=5760&&g.includes(d)}function mn(d){for(var g=d.pathValue,s=d.max;d.index<s&&$e(g.charCodeAt(d.index));)d.index+=1}function It(d){switch(d|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 Ee(d){return(d|32)===97}function cn(d){var g=d.max,s=d.pathValue,o=d.index,p=s.charCodeAt(o),T=ue[s[o].toLowerCase()];if(d.segmentStart=o,!It(p)){d.err='[path-util]: Invalid path value "'.concat(s[o],'" is not a path command');return}if(d.index+=1,mn(d),d.data=[],!T){We(d);return}for(;;){for(var C=T;C>0;C-=1){if(Ee(p)&&(C===3||C===4)?rn(d):Tn(d),d.err.length)return;d.data.push(d.param),mn(d),d.index<g&&s.charCodeAt(d.index)===44&&(d.index+=1,mn(d))}if(d.index>=d.max||!Xe(s.charCodeAt(d.index)))break}We(d)}var sn=function(){function d(g){this.pathValue=g,this.segments=[],this.max=g.length,this.index=0,this.param=0,this.segmentStart=0,this.data=[],this.err=""}return d}();function Pe(d){if(Ce(d))return[].concat(d);var g=new sn(d);for(mn(g);g.index<g.max&&!g.err.length;)cn(g);return g.err?g.err:g.segments}function ze(d){if(be(d))return[].concat(d);var g=Pe(d),s=0,o=0,p=0,T=0;return g.map(function(C){var W=C.slice(1).map(Number),tt=C[0],mt=tt.toUpperCase();if(tt==="M")return s=W[0],o=W[1],p=s,T=o,["M",s,o];var Gt;if(tt!==mt)switch(mt){case"A":Gt=[mt,W[0],W[1],W[2],W[3],W[4],W[5]+s,W[6]+o];break;case"V":Gt=[mt,W[0]+o];break;case"H":Gt=[mt,W[0]+s];break;default:{var ie=W.map(function(Ge,Ze){return Ge+(Ze%2?o:s)});Gt=[mt].concat(ie)}}else Gt=[mt].concat(W);var Se=Gt.length;switch(mt){case"Z":s=p,o=T;break;case"H":s=Gt[1];break;case"V":o=Gt[1];break;default:s=Gt[Se-2],o=Gt[Se-1],mt==="M"&&(p=s,T=o)}return Gt})}function Ke(d,g){var s=d[0],o=g.x1,p=g.y1,T=g.x2,C=g.y2,W=d.slice(1).map(Number),tt=d;if("TQ".includes(s)||(g.qx=null,g.qy=null),s==="H")tt=["L",d[1],p];else if(s==="V")tt=["L",o,d[1]];else if(s==="S"){var mt=o*2-T,Gt=p*2-C;g.x1=mt,g.y1=Gt,tt=["C",mt,Gt].concat(W)}else if(s==="T"){var ie=o*2-g.qx,Se=p*2-g.qy;g.qx=ie,g.qy=Se,tt=["Q",ie,Se].concat(W)}else if(s==="Q"){var Ge=W[0],Ze=W[1];g.qx=Ge,g.qy=Ze}return tt}function le(d){if(we(d))return[].concat(d);for(var g=ze(d),s=(0,fe.pi)({},ne),o=0;o<g.length;o+=1){g[o]=Ke(g[o],s);var p=g[o],T=p.length;s.x1=+p[T-2],s.y1=+p[T-1],s.x2=+p[T-4]||s.x1,s.y2=+p[T-3]||s.y1}return g}function Ae(d,g,s){var o=d[0],p=d[1],T=g[0],C=g[1];return[o+(T-o)*s,p+(C-p)*s]}function Pt(d,g,s,o,p){var T=(0,J.y)([d,g],[s,o]),C={x:0,y:0};if(typeof p=="number")if(p<=0)C={x:d,y:g};else if(p>=T)C={x:s,y:o};else{var W=Ae([d,g],[s,o],p/T),tt=W[0],mt=W[1];C={x:tt,y:mt}}return{length:T,point:C,min:{x:Math.min(d,s),y:Math.min(g,o)},max:{x:Math.max(d,s),y:Math.max(g,o)}}}function wt(d,g){var s=d.x,o=d.y,p=g.x,T=g.y,C=s*p+o*T,W=Math.sqrt((Math.pow(s,2)+Math.pow(o,2))*(Math.pow(p,2)+Math.pow(T,2))),tt=s*T-o*p<0?-1:1,mt=tt*Math.acos(C/W);return mt}function de(d,g,s,o,p,T,C,W,tt,mt){var Gt=Math.abs,ie=Math.sin,Se=Math.cos,Ge=Math.sqrt,Ze=Math.PI,an=Gt(s),hn=Gt(o),yn=(p%360+360)%360,dn=yn*(Ze/180);if(d===W&&g===tt)return{x:d,y:g};if(an===0||hn===0)return Pt(d,g,W,tt,mt).point;var Mn=(d-W)/2,zn=(g-tt)/2,er={x:Se(dn)*Mn+ie(dn)*zn,y:-ie(dn)*Mn+Se(dn)*zn},ar=Math.pow(er.x,2)/Math.pow(an,2)+Math.pow(er.y,2)/Math.pow(hn,2);ar>1&&(an*=Ge(ar),hn*=Ge(ar));var sr=Math.pow(an,2)*Math.pow(hn,2)-Math.pow(an,2)*Math.pow(er.y,2)-Math.pow(hn,2)*Math.pow(er.x,2),Mr=Math.pow(an,2)*Math.pow(er.y,2)+Math.pow(hn,2)*Math.pow(er.x,2),xr=sr/Mr;xr=xr<0?0:xr;var fr=(T!==C?1:-1)*Ge(xr),Sr={x:fr*(an*er.y/hn),y:fr*(-(hn*er.x)/an)},yr={x:Se(dn)*Sr.x-ie(dn)*Sr.y+(d+W)/2,y:ie(dn)*Sr.x+Se(dn)*Sr.y+(g+tt)/2},Ir={x:(er.x-Sr.x)/an,y:(er.y-Sr.y)/hn},hi=wt({x:1,y:0},Ir),Ei={x:(-er.x-Sr.x)/an,y:(-er.y-Sr.y)/hn},oi=wt(Ir,Ei);!C&&oi>0?oi-=2*Ze:C&&oi<0&&(oi+=2*Ze),oi%=2*Ze;var br=hi+oi*mt,Gr=an*Se(br),ti=hn*ie(br),Gi={x:Se(dn)*Gr-ie(dn)*ti+yr.x,y:ie(dn)*Gr+Se(dn)*ti+yr.y};return Gi}function je(d,g,s,o,p,T,C,W,tt,mt,Gt){var ie,Se=Gt.bbox,Ge=Se===void 0?!0:Se,Ze=Gt.length,an=Ze===void 0?!0:Ze,hn=Gt.sampleSize,yn=hn===void 0?30:hn,dn=typeof mt=="number",Mn=d,zn=g,er=0,ar=[Mn,zn,er],sr=[Mn,zn],Mr=0,xr={x:0,y:0},fr=[{x:Mn,y:zn}];dn&&mt<=0&&(xr={x:Mn,y:zn});for(var Sr=0;Sr<=yn;Sr+=1){if(Mr=Sr/yn,ie=de(d,g,s,o,p,T,C,W,tt,Mr),Mn=ie.x,zn=ie.y,Ge&&fr.push({x:Mn,y:zn}),an&&(er+=(0,J.y)(sr,[Mn,zn])),sr=[Mn,zn],dn&&er>=mt&&mt>ar[2]){var yr=(er-mt)/(er-ar[2]);xr={x:sr[0]*(1-yr)+ar[0]*yr,y:sr[1]*(1-yr)+ar[1]*yr}}ar=[Mn,zn,er]}return dn&&mt>=er&&(xr={x:W,y:tt}),{length:er,point:xr,min:{x:Math.min.apply(null,fr.map(function(Ir){return Ir.x})),y:Math.min.apply(null,fr.map(function(Ir){return Ir.y}))},max:{x:Math.max.apply(null,fr.map(function(Ir){return Ir.x})),y:Math.max.apply(null,fr.map(function(Ir){return Ir.y}))}}}function Re(d,g,s,o,p,T,C,W,tt){var mt=1-tt;return{x:Math.pow(mt,3)*d+3*Math.pow(mt,2)*tt*s+3*mt*Math.pow(tt,2)*p+Math.pow(tt,3)*C,y:Math.pow(mt,3)*g+3*Math.pow(mt,2)*tt*o+3*mt*Math.pow(tt,2)*T+Math.pow(tt,3)*W}}function ce(d,g,s,o,p,T,C,W,tt,mt){var Gt,ie=mt.bbox,Se=ie===void 0?!0:ie,Ge=mt.length,Ze=Ge===void 0?!0:Ge,an=mt.sampleSize,hn=an===void 0?10:an,yn=typeof tt=="number",dn=d,Mn=g,zn=0,er=[dn,Mn,zn],ar=[dn,Mn],sr=0,Mr={x:0,y:0},xr=[{x:dn,y:Mn}];yn&&tt<=0&&(Mr={x:dn,y:Mn});for(var fr=0;fr<=hn;fr+=1){if(sr=fr/hn,Gt=Re(d,g,s,o,p,T,C,W,sr),dn=Gt.x,Mn=Gt.y,Se&&xr.push({x:dn,y:Mn}),Ze&&(zn+=(0,J.y)(ar,[dn,Mn])),ar=[dn,Mn],yn&&zn>=tt&&tt>er[2]){var Sr=(zn-tt)/(zn-er[2]);Mr={x:ar[0]*(1-Sr)+er[0]*Sr,y:ar[1]*(1-Sr)+er[1]*Sr}}er=[dn,Mn,zn]}return yn&&tt>=zn&&(Mr={x:C,y:W}),{length:zn,point:Mr,min:{x:Math.min.apply(null,xr.map(function(yr){return yr.x})),y:Math.min.apply(null,xr.map(function(yr){return yr.y}))},max:{x:Math.max.apply(null,xr.map(function(yr){return yr.x})),y:Math.max.apply(null,xr.map(function(yr){return yr.y}))}}}function Le(d,g,s,o,p,T,C){var W=1-C;return{x:Math.pow(W,2)*d+2*W*C*s+Math.pow(C,2)*p,y:Math.pow(W,2)*g+2*W*C*o+Math.pow(C,2)*T}}function xe(d,g,s,o,p,T,C,W){var tt,mt=W.bbox,Gt=mt===void 0?!0:mt,ie=W.length,Se=ie===void 0?!0:ie,Ge=W.sampleSize,Ze=Ge===void 0?10:Ge,an=typeof C=="number",hn=d,yn=g,dn=0,Mn=[hn,yn,dn],zn=[hn,yn],er=0,ar={x:0,y:0},sr=[{x:hn,y:yn}];an&&C<=0&&(ar={x:hn,y:yn});for(var Mr=0;Mr<=Ze;Mr+=1){if(er=Mr/Ze,tt=Le(d,g,s,o,p,T,er),hn=tt.x,yn=tt.y,Gt&&sr.push({x:hn,y:yn}),Se&&(dn+=(0,J.y)(zn,[hn,yn])),zn=[hn,yn],an&&dn>=C&&C>Mn[2]){var xr=(dn-C)/(dn-Mn[2]);ar={x:zn[0]*(1-xr)+Mn[0]*xr,y:zn[1]*(1-xr)+Mn[1]*xr}}Mn=[hn,yn,dn]}return an&&C>=dn&&(ar={x:p,y:T}),{length:dn,point:ar,min:{x:Math.min.apply(null,sr.map(function(fr){return fr.x})),y:Math.min.apply(null,sr.map(function(fr){return fr.y}))},max:{x:Math.max.apply(null,sr.map(function(fr){return fr.x})),y:Math.max.apply(null,sr.map(function(fr){return fr.y}))}}}function Ft(d,g,s){for(var o,p,T,C,W,tt,mt=le(d),Gt=typeof g=="number",ie,Se=[],Ge,Ze=0,an=0,hn=0,yn=0,dn,Mn=[],zn=[],er=0,ar={x:0,y:0},sr=ar,Mr=ar,xr=ar,fr=0,Sr=0,yr=mt.length;Sr<yr;Sr+=1)dn=mt[Sr],Ge=dn[0],ie=Ge==="M",Se=ie?Se:[Ze,an].concat(dn.slice(1)),ie?(hn=dn[1],yn=dn[2],ar={x:hn,y:yn},sr=ar,er=0,Gt&&g<.001&&(xr=ar)):Ge==="L"?(o=Pt(Se[0],Se[1],Se[2],Se[3],(g||0)-fr),er=o.length,ar=o.min,sr=o.max,Mr=o.point):Ge==="A"?(p=je(Se[0],Se[1],Se[2],Se[3],Se[4],Se[5],Se[6],Se[7],Se[8],(g||0)-fr,s||{}),er=p.length,ar=p.min,sr=p.max,Mr=p.point):Ge==="C"?(T=ce(Se[0],Se[1],Se[2],Se[3],Se[4],Se[5],Se[6],Se[7],(g||0)-fr,s||{}),er=T.length,ar=T.min,sr=T.max,Mr=T.point):Ge==="Q"?(C=xe(Se[0],Se[1],Se[2],Se[3],Se[4],Se[5],(g||0)-fr,s||{}),er=C.length,ar=C.min,sr=C.max,Mr=C.point):Ge==="Z"&&(Se=[Ze,an,hn,yn],W=Pt(Se[0],Se[1],Se[2],Se[3],(g||0)-fr),er=W.length,ar=W.min,sr=W.max,Mr=W.point),Gt&&fr<g&&fr+er>=g&&(xr=Mr),zn.push(sr),Mn.push(ar),fr+=er,tt=Ge!=="Z"?dn.slice(-2):[hn,yn],Ze=tt[0],an=tt[1];return Gt&&g>=fr&&(xr={x:Ze,y:an}),{length:fr,point:xr,min:{x:Math.min.apply(null,Mn.map(function(Ir){return Ir.x})),y:Math.min.apply(null,Mn.map(function(Ir){return Ir.y}))},max:{x:Math.max.apply(null,zn.map(function(Ir){return Ir.x})),y:Math.max.apply(null,zn.map(function(Ir){return Ir.y}))}}}function re(d,g){return Ft(d,void 0,(0,fe.pi)((0,fe.pi)({},g),{bbox:!1,length:!0})).length}var Me=y(59895),O=y(82639),st=y(5131),ve=function(d,g){return(d%g+g)%g},$t=ve;function Ie(d,g,s){if(d[s].length>7){d[s].shift();for(var o=d[s],p=s;o.length;)g[s]="A",d.splice(p+=1,0,["C"].concat(o.splice(0,6)));d.splice(s,1)}}function Ne(d){return we(d)&&d.every(function(g){var s=g[0];return"MC".includes(s)})}var tn=y(66045);function Mt(d,g,s,o,p,T){var C=.3333333333333333,W=2/3;return[C*d+W*s,C*g+W*o,C*p+W*s,C*T+W*o,p,T]}var q=function(d,g,s,o){var p=.5,T=Ae([d,g],[s,o],p);return(0,fe.ev)((0,fe.ev)([],T,!0),[s,o,s,o],!1)};function Ct(d,g){var s=d[0],o=d.slice(1).map(Number),p=o[0],T=o[1],C,W=g.x1,tt=g.y1,mt=g.x,Gt=g.y;switch("TQ".includes(s)||(g.qx=null,g.qy=null),s){case"M":return g.x=p,g.y=T,d;case"A":return C=[W,tt].concat(o),["C"].concat((0,tn.W)(C[0],C[1],C[2],C[3],C[4],C[5],C[6],C[7],C[8],C[9]));case"Q":return g.qx=p,g.qy=T,C=[W,tt].concat(o),["C"].concat(Mt(C[0],C[1],C[2],C[3],C[4],C[5]));case"L":return["C"].concat(q(W,tt,p,T));case"Z":return W===mt&&tt===Gt?["C",W,tt,mt,Gt,mt,Gt]:["C"].concat(q(W,tt,mt,Gt));default:}return d}function Ht(d,g){if(g===void 0&&(g=!1),Ne(d)){var s=[].concat(d);return g?[s,[]]:s}for(var o=le(d),p=(0,fe.pi)({},ne),T=[],C="",W=o.length,tt,mt,Gt=[],ie=0;ie<W;ie+=1){o[ie]&&(C=o[ie][0]),T[ie]=C;var Se=Ct(o[ie],p);o[ie]=Se,Ie(o,T,ie),W=o.length,C==="Z"&&Gt.push(ie),tt=o[ie],mt=tt.length,p.x1=+tt[mt-2],p.y1=+tt[mt-1],p.x2=+tt[mt-4]||p.x1,p.y2=+tt[mt-3]||p.y1}return g?[o,Gt]:o}var Lt=50;function _t(d,g){g===void 0&&(g=.5);var s=d.slice(0,2),o=d.slice(2,4),p=d.slice(4,6),T=d.slice(6,8),C=Ae(s,o,g),W=Ae(o,p,g),tt=Ae(p,T,g),mt=Ae(C,W,g),Gt=Ae(W,tt,g),ie=Ae(mt,Gt,g);return[["C"].concat(C,mt,ie),["C"].concat(Gt,tt,T)]}function Ut(d){return d.map(function(g,s,o){var p=s&&o[s-1].slice(-2).concat(g.slice(1)),T=s?ce(p[0],p[1],p[2],p[3],p[4],p[5],p[6],p[7],p[8],{bbox:!1}).length:0,C;return s?C=T?_t(p):[g,g]:C=[g],{s:g,ss:C,l:T}})}function qt(d,g,s,o){if(o===void 0&&(o=0),o>Lt)return console.warn("Maximum recursion depth reached in equalizeSegments"),[d,g];var p=Ut(d),T=Ut(g),C=p.length,W=T.length,tt=p.filter(function(yn){return yn.l}).length,mt=T.filter(function(yn){return yn.l}).length,Gt=p.filter(function(yn){return yn.l}).reduce(function(yn,dn){var Mn=dn.l;return yn+Mn},0)/tt||0,ie=T.filter(function(yn){return yn.l}).reduce(function(yn,dn){var Mn=dn.l;return yn+Mn},0)/mt||0,Se=s||Math.max(C,W),Ge=[Gt,ie],Ze=[Se-C,Se-W],an=0,hn=[p,T].map(function(yn,dn){return yn.l===Se?yn.map(function(Mn){return Mn.s}):yn.map(function(Mn,zn){return an=zn&&Ze[dn]&&Mn.l>=Ge[dn],Ze[dn]-=an?1:0,an?Mn.ss:[Mn.s]}).flat()});return hn[0].length===hn[1].length?hn:qt(hn[0],hn[1],Se,o+1)}function se(d,g,s,o,p,T,C,W){return 3*((W-g)*(s+p)-(C-d)*(o+T)+o*(d-p)-s*(g-T)+W*(p+d/3)-C*(T+g/3))/20}function te(d){var g=0,s=0,o=0;return Ht(d).map(function(p){var T;switch(p[0]){case"M":return g=p[1],s=p[2],0;default:var C=p.slice(1),W=C[0],tt=C[1],mt=C[2],Gt=C[3],ie=C[4],Se=C[5];return o=se(g,s,W,tt,mt,Gt,ie,Se),T=p.slice(-2),g=T[0],s=T[1],o}}).reduce(function(p,T){return p+T},0)}function ke(d){return te(d)>=0}function Ye(d){var g=d.slice(1).map(function(s,o,p){return o?p[o-1].slice(-2).concat(s.slice(1)):d[0].slice(1).concat(s.slice(1))}).map(function(s){return s.map(function(o,p){return s[s.length-p-2*(1-p%2)]})}).reverse();return[["M"].concat(g[0].slice(0,2))].concat(g.map(function(s){return["C"].concat(s.slice(2))}))}function Ve(d){return d.map(function(g){return Array.isArray(g)?[].concat(g):g})}function on(d){var g=d.length,s=g-1;return d.map(function(o,p){return d.map(function(T,C){var W=p+C,tt;return C===0||d[W]&&d[W][0]==="M"?(tt=d[W],["M"].concat(tt.slice(-2))):(W>=g&&(W-=s),d[W])})})}function xn(d,g){var s=d.length-1,o=[],p=0,T=0,C=on(d);return C.forEach(function(W,tt){d.slice(1).forEach(function(mt,Gt){T+=(0,J.y)(d[(tt+Gt)%s].slice(-2),g[Gt%s].slice(-2))}),o[tt]=T,T=0}),p=o.indexOf(Math.min.apply(null,o)),C[p]}var vn=y(49527),Qn=y(39934),Ln=y(50264),_n=y(71018),me=y(93785);function pr(d,g,s){return Ft(d,g,(0,fe.pi)((0,fe.pi)({},s),{bbox:!1,length:!0})).point}var Zn=y(20068),kr=y(58289);function Ar(d,g){for(;!{}.hasOwnProperty.call(d,g)&&(d=(0,kr.Z)(d))!==null;);return d}function ei(){return ei=typeof Reflect!="undefined"&&Reflect.get?Reflect.get.bind():function(d,g,s){var o=Ar(d,g);if(o){var p=Object.getOwnPropertyDescriptor(o,g);return p.get?p.get.call(arguments.length<3?d:s):p.value}},ei.apply(null,arguments)}function yi(d,g,s,o){var p=ei((0,kr.Z)(1&o?d.prototype:d),g,s);return 2&o&&typeof p=="function"?function(T){return p.apply(s,T)}:p}var ui=y(97047),Ur=y(52402),ki=y(75044),la=y(3202),Oi=y(19251),Zr=y(75931);var qn=function(d){return d.GROUP="g",d.FRAGMENT="fragment",d.CIRCLE="circle",d.ELLIPSE="ellipse",d.IMAGE="image",d.RECT="rect",d.LINE="line",d.POLYLINE="polyline",d.POLYGON="polygon",d.TEXT="text",d.PATH="path",d.HTML="html",d.MESH="mesh",d}({}),Ti=function(d){return d[d.ZERO=0]="ZERO",d[d.NEGATIVE_ONE=1]="NEGATIVE_ONE",d}({}),Nt=function(){function d(){(0,_.Z)(this,d),this.plugins=[]}return(0,I.Z)(d,[{key:"addRenderingPlugin",value:function(s){this.plugins.push(s),this.context.renderingPlugins.push(s)}},{key:"removeAllRenderingPlugins",value:function(){var s=this;this.plugins.forEach(function(o){var p=s.context.renderingPlugins.indexOf(o);p>=0&&s.context.renderingPlugins.splice(p,1)})}}])}(),E=function(){function d(g){(0,_.Z)(this,d),this.clipSpaceNearZ=Ti.NEGATIVE_ONE,this.plugins=[],this.config=(0,c.Z)({enableDirtyCheck:!0,enableCulling:!1,enableAutoRendering:!0,enableDirtyRectangleRendering:!0,enableDirtyRectangleRenderingDebug:!1,enableSizeAttenuation:!0,enableRenderingOptimization:!1},g)}return(0,I.Z)(d,[{key:"registerPlugin",value:function(s){var o=this.plugins.findIndex(function(p){return p===s});o===-1&&this.plugins.push(s)}},{key:"unregisterPlugin",value:function(s){var o=this.plugins.findIndex(function(p){return p===s});o>-1&&this.plugins.splice(o,1)}},{key:"getPlugins",value:function(){return this.plugins}},{key:"getPlugin",value:function(s){return this.plugins.find(function(o){return o.name===s})}},{key:"getConfig",value:function(){return this.config}},{key:"setConfig",value:function(s){Object.assign(this.config,s)}}])}(),b=A.IH,h=A.JG,v=A.Fp,w=A.VV,Y=A.bA,K=A.lu,it=function(){function d(){(0,_.Z)(this,d),this.center=[0,0,0],this.halfExtents=[0,0,0],this.min=[0,0,0],this.max=[0,0,0]}return(0,I.Z)(d,[{key:"update",value:function(s,o){h(this.center,s),h(this.halfExtents,o),K(this.min,this.center,this.halfExtents),b(this.max,this.center,this.halfExtents)}},{key:"setMinMax",value:function(s,o){b(this.center,o,s),Y(this.center,this.center,.5),K(this.halfExtents,o,s),Y(this.halfExtents,this.halfExtents,.5),h(this.min,s),h(this.max,o)}},{key:"getMin",value:function(){return this.min}},{key:"getMax",value:function(){return this.max}},{key:"add",value:function(s){if(!d.isEmpty(s)){if(d.isEmpty(this)){this.setMinMax(s.getMin(),s.getMax());return}var o=this.center,p=o[0],T=o[1],C=o[2],W=this.halfExtents,tt=W[0],mt=W[1],Gt=W[2],ie=p-tt,Se=p+tt,Ge=T-mt,Ze=T+mt,an=C-Gt,hn=C+Gt,yn=s.center,dn=yn[0],Mn=yn[1],zn=yn[2],er=s.halfExtents,ar=er[0],sr=er[1],Mr=er[2],xr=dn-ar,fr=dn+ar,Sr=Mn-sr,yr=Mn+sr,Ir=zn-Mr,hi=zn+Mr;xr<ie&&(ie=xr),fr>Se&&(Se=fr),Sr<Ge&&(Ge=Sr),yr>Ze&&(Ze=yr),Ir<an&&(an=Ir),hi>hn&&(hn=hi),o[0]=(ie+Se)*.5,o[1]=(Ge+Ze)*.5,o[2]=(an+hn)*.5,W[0]=(Se-ie)*.5,W[1]=(Ze-Ge)*.5,W[2]=(hn-an)*.5,this.min[0]=ie,this.min[1]=Ge,this.min[2]=an,this.max[0]=Se,this.max[1]=Ze,this.max[2]=hn}}},{key:"setFromTransformedAABB",value:function(s,o){var p=this.center,T=this.halfExtents,C=s.center,W=s.halfExtents,tt=o[0],mt=o[4],Gt=o[8],ie=o[1],Se=o[5],Ge=o[9],Ze=o[2],an=o[6],hn=o[10],yn=Math.abs(tt),dn=Math.abs(mt),Mn=Math.abs(Gt),zn=Math.abs(ie),er=Math.abs(Se),ar=Math.abs(Ge),sr=Math.abs(Ze),Mr=Math.abs(an),xr=Math.abs(hn);p[0]=o[12]+tt*C[0]+mt*C[1]+Gt*C[2],p[1]=o[13]+ie*C[0]+Se*C[1]+Ge*C[2],p[2]=o[14]+Ze*C[0]+an*C[1]+hn*C[2],T[0]=yn*W[0]+dn*W[1]+Mn*W[2],T[1]=zn*W[0]+er*W[1]+ar*W[2],T[2]=sr*W[0]+Mr*W[1]+xr*W[2],K(this.min,p,T),b(this.max,p,T)}},{key:"intersects",value:function(s){var o=this.getMax(),p=this.getMin(),T=s.getMax(),C=s.getMin();return p[0]<=T[0]&&o[0]>=C[0]&&p[1]<=T[1]&&o[1]>=C[1]&&p[2]<=T[2]&&o[2]>=C[2]}},{key:"intersection",value:function(s){if(!this.intersects(s))return null;var o=new d,p=v([0,0,0],this.getMin(),s.getMin()),T=w([0,0,0],this.getMax(),s.getMax());return o.setMinMax(p,T),o}},{key:"getNegativeFarPoint",value:function(s){return s.pnVertexFlag===273?h([0,0,0],this.min):s.pnVertexFlag===272?[this.min[0],this.min[1],this.max[2]]:s.pnVertexFlag===257?[this.min[0],this.max[1],this.min[2]]:s.pnVertexFlag===256?[this.min[0],this.max[1],this.max[2]]:s.pnVertexFlag===17?[this.max[0],this.min[1],this.min[2]]:s.pnVertexFlag===16?[this.max[0],this.min[1],this.max[2]]:s.pnVertexFlag===1?[this.max[0],this.max[1],this.min[2]]:[this.max[0],this.max[1],this.max[2]]}},{key:"getPositiveFarPoint",value:function(s){return s.pnVertexFlag===273?h([0,0,0],this.max):s.pnVertexFlag===272?[this.max[0],this.max[1],this.min[2]]:s.pnVertexFlag===257?[this.max[0],this.min[1],this.max[2]]:s.pnVertexFlag===256?[this.max[0],this.min[1],this.min[2]]:s.pnVertexFlag===17?[this.min[0],this.max[1],this.max[2]]:s.pnVertexFlag===16?[this.min[0],this.max[1],this.min[2]]:s.pnVertexFlag===1?[this.min[0],this.min[1],this.max[2]]:[this.min[0],this.min[1],this.min[2]]}}],[{key:"isEmpty",value:function(s){return!s||s.halfExtents[0]===0&&s.halfExtents[1]===0&&s.halfExtents[2]===0}}])}(),ht=function(){function d(g,s){(0,_.Z)(this,d),this.distance=g||0,this.normal=s||A.al(0,1,0),this.updatePNVertexFlag()}return(0,I.Z)(d,[{key:"updatePNVertexFlag",value:function(){this.pnVertexFlag=(+(this.normal[0]>=0)<<8)+(+(this.normal[1]>=0)<<4)+ +(this.normal[2]>=0)}},{key:"distanceToPoint",value:function(s){return A.AK(s,this.normal)-this.distance}},{key:"normalize",value:function(){var s=1/A.Zh(this.normal);A.bA(this.normal,this.normal,s),this.distance*=s}},{key:"intersectsLine",value:function(s,o,p){var T=this.distanceToPoint(s),C=this.distanceToPoint(o),W=T/(T-C),tt=W>=0&&W<=1;return tt&&p&&A.t7(p,s,o,W),tt}}])}(),Zt=function(d){return d[d.OUTSIDE=4294967295]="OUTSIDE",d[d.INSIDE=0]="INSIDE",d[d.INDETERMINATE=2147483647]="INDETERMINATE",d}({}),$=function(){function d(g){if((0,_.Z)(this,d),this.planes=[],g)this.planes=g;else for(var s=0;s<6;s++)this.planes.push(new ht)}return(0,I.Z)(d,[{key:"extractFromVPMatrix",value:function(s){var o=(0,M.Z)(s,16),p=o[0],T=o[1],C=o[2],W=o[3],tt=o[4],mt=o[5],Gt=o[6],ie=o[7],Se=o[8],Ge=o[9],Ze=o[10],an=o[11],hn=o[12],yn=o[13],dn=o[14],Mn=o[15];A.t8(this.planes[0].normal,W-p,ie-tt,an-Se),this.planes[0].distance=Mn-hn,A.t8(this.planes[1].normal,W+p,ie+tt,an+Se),this.planes[1].distance=Mn+hn,A.t8(this.planes[2].normal,W+T,ie+mt,an+Ge),this.planes[2].distance=Mn+yn,A.t8(this.planes[3].normal,W-T,ie-mt,an-Ge),this.planes[3].distance=Mn-yn,A.t8(this.planes[4].normal,W-C,ie-Gt,an-Ze),this.planes[4].distance=Mn-dn,A.t8(this.planes[5].normal,W+C,ie+Gt,an+Ze),this.planes[5].distance=Mn+dn,this.planes.forEach(function(zn){zn.normalize(),zn.updatePNVertexFlag()})}}])}(),Q=function(){function d(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;(0,_.Z)(this,d),this.x=0,this.y=0,this.x=g,this.y=s}return(0,I.Z)(d,[{key:"clone",value:function(){return new d(this.x,this.y)}},{key:"copyFrom",value:function(s){this.x=s.x,this.y=s.y}}])}(),H=function(){function d(g,s,o,p){(0,_.Z)(this,d),this.x=g,this.y=s,this.width=o,this.height=p,this.left=g,this.right=g+o,this.top=s,this.bottom=s+p}return(0,I.Z)(d,[{key:"toJSON",value:function(){}}],[{key:"fromRect",value:function(s){return new d(s.x,s.y,s.width,s.height)}},{key:"applyTransform",value:function(s,o){var p=L.al(s.x,s.y,0,1),T=L.al(s.x+s.width,s.y,0,1),C=L.al(s.x,s.y+s.height,0,1),W=L.al(s.x+s.width,s.y+s.height,0,1),tt=L.Ue(),mt=L.Ue(),Gt=L.Ue(),ie=L.Ue();L.fF(tt,p,o),L.fF(mt,T,o),L.fF(Gt,C,o),L.fF(ie,W,o);var Se=Math.min(tt[0],mt[0],Gt[0],ie[0]),Ge=Math.min(tt[1],mt[1],Gt[1],ie[1]),Ze=Math.max(tt[0],mt[0],Gt[0],ie[0]),an=Math.max(tt[1],mt[1],Gt[1],ie[1]);return d.fromRect({x:Se,y:Ge,width:Ze-Se,height:an-Ge})}}])}(),et="Method not implemented.",yt="Use document.documentElement instead.",Xt="Cannot append a destroyed element.";function Ot(d){return d===void 0?0:d>360||d<-360?d%360:d}var Kt=A.Ue();function gt(d){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;return Array.isArray(d)&&d.length===3?o?A.d9(d):A.JG(Kt,d):(0,ft.Z)(d)?o?A.al(d,g,s):A.t8(Kt,d,g,s):o?A.al(d[0],d[1]||g,d[2]||s):A.t8(Kt,d[0],d[1]||g,d[2]||s)}var vt=Math.PI/180;function lt(d){return d*vt}var jt=180/Math.PI;function Yt(d){return d*jt}var he=.9;function ye(d){return d%=400,d<0&&(d+=400),d*he}function Wt(d){return d/360}function Oe(d){return 360*d}var He=Math.PI/2;function Qe(d,g){var s=g[0],o=g[1],p=g[2],T=g[3],C=s*s,W=o*o,tt=p*p,mt=T*T,Gt=C+W+tt+mt,ie=s*T-o*p;return ie>.499995*Gt?(d[0]=He,d[1]=2*Math.atan2(o,s),d[2]=0):ie<-.499995*Gt?(d[0]=-He,d[1]=2*Math.atan2(o,s),d[2]=0):(d[0]=Math.asin(2*(s*p-T*o)),d[1]=Math.atan2(2*(s*T+o*p),1-2*(tt+mt)),d[2]=Math.atan2(2*(s*o+p*T),1-2*(W+tt))),d}function An(d,g){var s,o,p=F.getScaling(A.Ue(),g),T=(0,M.Z)(p,3),C=T[0],W=T[1],tt=T[2],mt=Math.asin(-g[2]/C);return mt<He?mt>-He?(s=Math.atan2(g[6]/W,g[10]/tt),o=Math.atan2(g[1]/C,g[0]/C)):(o=0,s=-Math.atan2(g[4]/W,g[5]/W)):(o=0,s=Math.atan2(g[4]/W,g[5]/W)),d[0]=s,d[1]=mt,d[2]=o,d}function Nn(d,g){return g.length===16?An(d,g):Qe(d,g)}function Cn(d,g,s,o,p){var T=Math.cos(d),C=Math.sin(d);return rt.al(o*T,p*C,0,-o*C,p*T,0,g,s,1)}function Bn(d,g,s,o,p,T,C){var W=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,tt=2*T,mt=s-g,Gt=o-p,ie=tt/mt,Se=tt/Gt,Ge=(s+g)/mt,Ze=(o+p)/Gt,an,hn,yn=C-T,dn=C*T;return W?(an=-C/yn,hn=-dn/yn):(an=-(C+T)/yn,hn=-2*dn/yn),d[0]=ie,d[1]=0,d[2]=0,d[3]=0,d[4]=0,d[5]=Se,d[6]=0,d[7]=0,d[8]=Ge,d[9]=Ze,d[10]=an,d[11]=-1,d[12]=0,d[13]=0,d[14]=hn,d[15]=0,d}function jn(d){var g=d[0],s=d[1],o=d[3],p=d[4],T=Math.sqrt(g*g+s*s),C=Math.sqrt(o*o+p*p),W=g*p-s*o;if(W<0&&(g<p?T=-T:C=-C),T){var tt=1/T;g*=tt,s*=tt}if(C){var mt=1/C;o*=mt,p*=mt}var Gt=Math.atan2(s,g),ie=Yt(Gt);return[d[6],d[7],T,C,ie]}var or=F.create(),ir=F.create(),lr=L.Ue(),Vn=[A.Ue(),A.Ue(),A.Ue()],nr=A.Ue();function Or(d,g,s,o,p,T){if(!Kr(or,d)||(F.copy(ir,or),ir[3]=0,ir[7]=0,ir[11]=0,ir[15]=1,Math.abs(F.determinant(ir))<1e-8))return!1;var C=or[3],W=or[7],tt=or[11],mt=or[12],Gt=or[13],ie=or[14],Se=or[15];if(C!==0||W!==0||tt!==0){lr[0]=C,lr[1]=W,lr[2]=tt,lr[3]=Se;var Ge=F.invert(ir,ir);if(!Ge)return!1;F.transpose(ir,ir),L.fF(p,lr,ir)}else p[0]=p[1]=p[2]=0,p[3]=1;if(g[0]=mt,g[1]=Gt,g[2]=ie,Wr(Vn,or),s[0]=A.kE(Vn[0]),A.Fv(Vn[0],Vn[0]),o[0]=A.AK(Vn[0],Vn[1]),dr(Vn[1],Vn[1],Vn[0],1,-o[0]),s[1]=A.kE(Vn[1]),A.Fv(Vn[1],Vn[1]),o[0]/=s[1],o[1]=A.AK(Vn[0],Vn[2]),dr(Vn[2],Vn[2],Vn[0],1,-o[1]),o[2]=A.AK(Vn[1],Vn[2]),dr(Vn[2],Vn[2],Vn[1],1,-o[2]),s[2]=A.kE(Vn[2]),A.Fv(Vn[2],Vn[2]),o[1]/=s[2],o[2]/=s[2],A.kC(nr,Vn[1],Vn[2]),A.AK(Vn[0],nr)<0)for(var Ze=0;Ze<3;Ze++)s[Ze]*=-1,Vn[Ze][0]*=-1,Vn[Ze][1]*=-1,Vn[Ze][2]*=-1;return T[0]=.5*Math.sqrt(Math.max(1+Vn[0][0]-Vn[1][1]-Vn[2][2],0)),T[1]=.5*Math.sqrt(Math.max(1-Vn[0][0]+Vn[1][1]-Vn[2][2],0)),T[2]=.5*Math.sqrt(Math.max(1-Vn[0][0]-Vn[1][1]+Vn[2][2],0)),T[3]=.5*Math.sqrt(Math.max(1+Vn[0][0]+Vn[1][1]+Vn[2][2],0)),Vn[2][1]>Vn[1][2]&&(T[0]=-T[0]),Vn[0][2]>Vn[2][0]&&(T[1]=-T[1]),Vn[1][0]>Vn[0][1]&&(T[2]=-T[2]),!0}function Kr(d,g){var s=g[15];if(s===0)return!1;for(var o=1/s,p=0;p<16;p++)d[p]=g[p]*o;return!0}function Wr(d,g){d[0][0]=g[0],d[0][1]=g[1],d[0][2]=g[2],d[1][0]=g[4],d[1][1]=g[5],d[1][2]=g[6],d[2][0]=g[8],d[2][1]=g[9],d[2][2]=g[10]}function dr(d,g,s,o,p){d[0]=g[0]*o+s[0]*p,d[1]=g[1]*o+s[1]*p,d[2]=g[2]*o+s[2]*p}var Fr=function(d){return d[d.ORBITING=0]="ORBITING",d[d.EXPLORING=1]="EXPLORING",d[d.TRACKING=2]="TRACKING",d}({}),xi=function(d){return d[d.DEFAULT=0]="DEFAULT",d[d.ROTATIONAL=1]="ROTATIONAL",d[d.TRANSLATIONAL=2]="TRANSLATIONAL",d[d.CINEMATIC=3]="CINEMATIC",d}({}),$r=function(d){return d[d.ORTHOGRAPHIC=0]="ORTHOGRAPHIC",d[d.PERSPECTIVE=1]="PERSPECTIVE",d}({}),pi={UPDATED:"updated"},Ri=2e-4,Hi=function(){function d(){(0,_.Z)(this,d),this.clipSpaceNearZ=Ti.NEGATIVE_ONE,this.eventEmitter=new D,this.matrix=F.create(),this.right=A.al(1,0,0),this.up=A.al(0,1,0),this.forward=A.al(0,0,1),this.position=A.al(0,0,1),this.focalPoint=A.al(0,0,0),this.distanceVector=A.al(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=F.create(),this.projectionMatrixInverse=F.create(),this.jitteredProjectionMatrix=void 0,this.enableUpdate=!0,this.type=Fr.EXPLORING,this.trackingMode=xi.DEFAULT,this.projectionMode=$r.PERSPECTIVE,this.frustum=new $,this.orthoMatrix=F.create()}return(0,I.Z)(d,[{key:"isOrtho",value:function(){return this.projectionMode===$r.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(s){this.enableUpdate=s}},{key:"setType",value:function(s,o){return this.type=s,this.type===Fr.EXPLORING?this.setWorldRotation(!0):this.setWorldRotation(!1),this._getAngles(),this.type===Fr.TRACKING&&o!==void 0&&this.setTrackingMode(o),this}},{key:"setProjectionMode",value:function(s){return this.projectionMode=s,this}},{key:"setTrackingMode",value:function(s){if(this.type!==Fr.TRACKING)throw new Error("Impossible to set a tracking mode if the camera is not of tracking type");return this.trackingMode=s,this}},{key:"setWorldRotation",value:function(s){return this.rotateWorld=s,this._getAngles(),this}},{key:"getViewTransform",value:function(){return F.invert(F.create(),this.matrix)}},{key:"getWorldTransform",value:function(){return this.matrix}},{key:"jitterProjectionMatrix",value:function(s,o){var p=F.fromTranslation(F.create(),[s,o,0]);this.jitteredProjectionMatrix=F.multiply(F.create(),p,this.projectionMatrix)}},{key:"clearJitterProjectionMatrix",value:function(){this.jitteredProjectionMatrix=void 0}},{key:"setMatrix",value:function(s){return this.matrix=s,this._update(),this}},{key:"setProjectionMatrix",value:function(s){this.projectionMatrix=s}},{key:"setFov",value:function(s){return this.setPerspective(this.near,this.far,s,this.aspect),this}},{key:"setAspect",value:function(s){return this.setPerspective(this.near,this.far,this.fov,s),this}},{key:"setNear",value:function(s){return this.projectionMode===$r.PERSPECTIVE?this.setPerspective(s,this.far,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,s,this.far),this}},{key:"setFar",value:function(s){return this.projectionMode===$r.PERSPECTIVE?this.setPerspective(this.near,s,this.fov,this.aspect):this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,s),this}},{key:"setViewOffset",value:function(s,o,p,T,C,W){return this.aspect=s/o,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=s,this.view.fullHeight=o,this.view.offsetX=p,this.view.offsetY=T,this.view.width=C,this.view.height=W,this.projectionMode===$r.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===$r.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(s){return this.zoom=s,this.projectionMode===$r.ORTHOGRAPHIC?this.setOrthographic(this.left,this.rright,this.top,this.bottom,this.near,this.far):this.projectionMode===$r.PERSPECTIVE&&this.setPerspective(this.near,this.far,this.fov,this.aspect),this}},{key:"setZoomByViewportPoint",value:function(s,o){var p=this.canvas.viewport2Canvas({x:o[0],y:o[1]}),T=p.x,C=p.y,W=this.roll;this.rotate(0,0,-W),this.setPosition(T,C),this.setFocalPoint(T,C),this.setZoom(s),this.rotate(0,0,W);var tt=this.canvas.viewport2Canvas({x:o[0],y:o[1]}),mt=tt.x,Gt=tt.y,ie=A.al(mt-T,Gt-C,0),Se=A.AK(ie,this.right)/A.kE(this.right),Ge=A.AK(ie,this.up)/A.kE(this.up),Ze=this.getPosition(),an=(0,M.Z)(Ze,2),hn=an[0],yn=an[1],dn=this.getFocalPoint(),Mn=(0,M.Z)(dn,2),zn=Mn[0],er=Mn[1];return this.setPosition(hn-Se,yn-Ge),this.setFocalPoint(zn-Se,er-Ge),this}},{key:"setPerspective",value:function(s,o,p,T){var C;this.projectionMode=$r.PERSPECTIVE,this.fov=p,this.near=s,this.far=o,this.aspect=T;var W=this.near*Math.tan(lt(.5*this.fov))/this.zoom,tt=2*W,mt=this.aspect*tt,Gt=-.5*mt;if((C=this.view)!==null&&C!==void 0&&C.enabled){var ie=this.view.fullWidth,Se=this.view.fullHeight;Gt+=this.view.offsetX*mt/ie,W-=this.view.offsetY*tt/Se,mt*=this.view.width/ie,tt*=this.view.height/Se}return Bn(this.projectionMatrix,Gt,Gt+mt,W-tt,W,s,this.far,this.clipSpaceNearZ===Ti.ZERO),F.invert(this.projectionMatrixInverse,this.projectionMatrix),this.triggerUpdate(),this}},{key:"setOrthographic",value:function(s,o,p,T,C,W){var tt;this.projectionMode=$r.ORTHOGRAPHIC,this.rright=o,this.left=s,this.top=p,this.bottom=T,this.near=C,this.far=W;var mt=(this.rright-this.left)/(2*this.zoom),Gt=(this.top-this.bottom)/(2*this.zoom),ie=(this.rright+this.left)/2,Se=(this.top+this.bottom)/2,Ge=ie-mt,Ze=ie+mt,an=Se+Gt,hn=Se-Gt;if((tt=this.view)!==null&&tt!==void 0&&tt.enabled){var yn=(this.rright-this.left)/this.view.fullWidth/this.zoom,dn=(this.top-this.bottom)/this.view.fullHeight/this.zoom;Ge+=yn*this.view.offsetX,Ze=Ge+yn*this.view.width,an-=dn*this.view.offsetY,hn=an-dn*this.view.height}return this.clipSpaceNearZ===Ti.NEGATIVE_ONE?F.ortho(this.projectionMatrix,Ge,Ze,an,hn,C,W):F.orthoZO(this.projectionMatrix,Ge,Ze,an,hn,C,W),F.invert(this.projectionMatrixInverse,this.projectionMatrix),this._getOrthoMatrix(),this.triggerUpdate(),this}},{key:"setPosition",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.position[1],p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.position[2],T=gt(s,o,p);return this._setPosition(T),this.setFocalPoint(this.focalPoint),this.triggerUpdate(),this}},{key:"setFocalPoint",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.focalPoint[1],p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.focalPoint[2],T=A.al(0,1,0);if(this.focalPoint=gt(s,o,p),this.trackingMode===xi.CINEMATIC){var C=A.$X(A.Ue(),this.focalPoint,this.position);s=C[0],o=C[1],p=C[2];var W=A.kE(C),tt=Yt(Math.asin(o/W)),mt=90+Yt(Math.atan2(p,s)),Gt=F.create();F.rotateY(Gt,Gt,lt(mt)),F.rotateX(Gt,Gt,lt(tt)),T=A.fF(A.Ue(),[0,1,0],Gt)}return F.invert(this.matrix,F.lookAt(F.create(),this.position,this.focalPoint,T)),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(s){if(this.distance===s||s<0)return this;this.distance=s,this.distance<Ri&&(this.distance=Ri),this.dollyingStep=this.distance/100;var o=A.Ue();s=this.distance;var p=this.forward,T=this.focalPoint;return o[0]=s*p[0]+T[0],o[1]=s*p[1]+T[1],o[2]=s*p[2]+T[2],this._setPosition(o),this.triggerUpdate(),this}},{key:"setMaxDistance",value:function(s){return this.maxDistance=s,this}},{key:"setMinDistance",value:function(s){return this.minDistance=s,this}},{key:"setAzimuth",value:function(s){return this.azimuth=Ot(s),this.computeMatrix(),this._getAxes(),this.type===Fr.ORBITING||this.type===Fr.EXPLORING?this._getPosition():this.type===Fr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getAzimuth",value:function(){return this.azimuth}},{key:"setElevation",value:function(s){return this.elevation=Ot(s),this.computeMatrix(),this._getAxes(),this.type===Fr.ORBITING||this.type===Fr.EXPLORING?this._getPosition():this.type===Fr.TRACKING&&this._getFocalPoint(),this.triggerUpdate(),this}},{key:"getElevation",value:function(){return this.elevation}},{key:"setRoll",value:function(s){return this.roll=Ot(s),this.computeMatrix(),this._getAxes(),this.type===Fr.ORBITING||this.type===Fr.EXPLORING?this._getPosition():this.type===Fr.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 s=G.yY(G.Ue(),[0,0,1],lt(this.roll));F.identity(this.matrix);var o=G.yY(G.Ue(),[1,0,0],lt((this.rotateWorld&&this.type!==Fr.TRACKING||this.type===Fr.TRACKING?1:-1)*this.elevation)),p=G.yY(G.Ue(),[0,1,0],lt((this.rotateWorld&&this.type!==Fr.TRACKING||this.type===Fr.TRACKING?1:-1)*this.azimuth)),T=G.Jp(G.Ue(),p,o);T=G.Jp(G.Ue(),T,s);var C=F.fromQuat(F.create(),T);this.type===Fr.ORBITING||this.type===Fr.EXPLORING?(F.translate(this.matrix,this.matrix,this.focalPoint),F.multiply(this.matrix,this.matrix,C),F.translate(this.matrix,this.matrix,[0,0,this.distance])):this.type===Fr.TRACKING&&(F.translate(this.matrix,this.matrix,this.position),F.multiply(this.matrix,this.matrix,C))}},{key:"_setPosition",value:function(s,o,p){this.position=gt(s,o,p);var T=this.matrix;T[12]=this.position[0],T[13]=this.position[1],T[14]=this.position[2],T[15]=1,this._getOrthoMatrix()}},{key:"_getAxes",value:function(){A.JG(this.right,gt(L.fF(L.Ue(),[1,0,0,0],this.matrix))),A.JG(this.up,gt(L.fF(L.Ue(),[0,1,0,0],this.matrix))),A.JG(this.forward,gt(L.fF(L.Ue(),[0,0,1,0],this.matrix))),A.Fv(this.right,this.right),A.Fv(this.up,this.up),A.Fv(this.forward,this.forward)}},{key:"_getAngles",value:function(){var s=this.distanceVector[0],o=this.distanceVector[1],p=this.distanceVector[2],T=A.kE(this.distanceVector);if(T===0){this.elevation=0,this.azimuth=0;return}this.type===Fr.TRACKING?(this.elevation=Yt(Math.asin(o/T)),this.azimuth=Yt(Math.atan2(-s,-p))):this.rotateWorld?(this.elevation=Yt(Math.asin(o/T)),this.azimuth=Yt(Math.atan2(-s,-p))):(this.elevation=-Yt(Math.asin(o/T)),this.azimuth=-Yt(Math.atan2(-s,-p)))}},{key:"_getPosition",value:function(){A.JG(this.position,gt(L.fF(L.Ue(),[0,0,0,1],this.matrix))),this._getDistance()}},{key:"_getFocalPoint",value:function(){A.kK(this.distanceVector,[0,0,-this.distance],rt.xO(rt.Ue(),this.matrix)),A.IH(this.focalPoint,this.position,this.distanceVector),this._getDistance()}},{key:"_getDistance",value:function(){this.distanceVector=A.$X(A.Ue(),this.focalPoint,this.position),this.distance=A.kE(this.distanceVector),this.dollyingStep=this.distance/100}},{key:"_getOrthoMatrix",value:function(){if(this.projectionMode===$r.ORTHOGRAPHIC){var s=this.position,o=G.yY(G.Ue(),[0,0,1],-this.roll*Math.PI/180);F.fromRotationTranslationScaleOrigin(this.orthoMatrix,o,A.al((this.rright-this.left)/2-s[0],(this.top-this.bottom)/2-s[1],0),A.al(this.zoom,this.zoom,1),s)}}},{key:"triggerUpdate",value:function(){if(this.enableUpdate){var s=this.getViewTransform(),o=F.multiply(F.create(),this.getPerspective(),s);this.getFrustum().extractFromVPMatrix(o),this.eventEmitter.emit(pi.UPDATED)}}},{key:"rotate",value:function(s,o,p){throw new Error(et)}},{key:"pan",value:function(s,o){throw new Error(et)}},{key:"dolly",value:function(s){throw new Error(et)}},{key:"createLandmark",value:function(s,o){throw new Error(et)}},{key:"gotoLandmark",value:function(s,o){throw new Error(et)}},{key:"cancelLandmarkAnimation",value:function(){throw new Error(et)}}])}(),Zi=function(d){return d[d.Standard=0]="Standard",d}({}),ca=function(d){return d[d.ADDED=0]="ADDED",d[d.REMOVED=1]="REMOVED",d[d.Z_INDEX_CHANGED=2]="Z_INDEX_CHANGED",d}({}),_a=A.Ue(),Za=F.create(),na=G.Ue();function wi(d){if(d.localDirtyFlag){var g=d.localSkew[0]!==0||d.localSkew[1]!==0;if(g){F.fromRotationTranslationScaleOrigin(d.localTransform,d.localRotation,d.localPosition,A.al(1,1,1),d.origin),(d.localSkew[0]!==0||d.localSkew[1]!==0)&&(F.identity(Za),Za[4]=Math.tan(d.localSkew[0]),Za[1]=Math.tan(d.localSkew[1]),F.multiply(d.localTransform,d.localTransform,Za));var s=F.fromRotationTranslationScaleOrigin(Za,G.t8(na,0,0,0,1),A.t8(_a,1,1,1),d.localScale,d.origin);F.multiply(d.localTransform,d.localTransform,s)}else{var o=d.localTransform,p=d.localPosition,T=d.localRotation,C=d.localScale,W=d.origin,tt=p[0]!==0||p[1]!==0||p[2]!==0,mt=T[3]!==1||T[0]!==0||T[1]!==0||T[2]!==0,Gt=C[0]!==1||C[1]!==1||C[2]!==1,ie=W[0]!==0||W[1]!==0||W[2]!==0;!mt&&!Gt&&!ie?tt?F.fromTranslation(o,p):F.identity(o):F.fromRotationTranslationScaleOrigin(o,T,p,C,W)}d.localDirtyFlag=!1}}function fo(d,g){d.dirtyFlag&&(g?F.multiply(d.worldTransform,g.worldTransform,d.localTransform):F.copy(d.worldTransform,d.localTransform),d.dirtyFlag=!1)}var ss={absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new H(0,0,0,0)},Yn=function(d){return d.COORDINATE="<coordinate>",d.COLOR="<color>",d.PAINT="<paint>",d.NUMBER="<number>",d.ANGLE="<angle>",d.OPACITY_VALUE="<opacity-value>",d.SHADOW_BLUR="<shadow-blur>",d.LENGTH="<length>",d.PERCENTAGE="<percentage>",d.LENGTH_PERCENTAGE="<length> | <percentage>",d.LENGTH_PERCENTAGE_12="[<length> | <percentage>]{1,2}",d.LENGTH_PERCENTAGE_14="[<length> | <percentage>]{1,4}",d.LIST_OF_POINTS="<list-of-points>",d.PATH="<path>",d.FILTER="<filter>",d.Z_INDEX="<z-index>",d.OFFSET_DISTANCE="<offset-distance>",d.DEFINED_PATH="<defined-path>",d.MARKER="<marker>",d.TRANSFORM="<transform>",d.TRANSFORM_ORIGIN="<transform-origin>",d.TEXT="<text>",d.TEXT_TRANSFORM="<text-transform>",d}({});function xs(d,g,s){d.prototype=g.prototype=s,s.constructor=d}function Ca(d,g){var s=Object.create(d.prototype);for(var o in g)s[o]=g[o];return s}function La(){}var Na=.7,$a=1/Na,os="\\s*([+-]?\\d+)\\s*",za="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ba="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ws=/^#([0-9a-f]{3,8})$/,vo=new RegExp(`^rgb\\(${os},${os},${os}\\)$`),Ea=new RegExp(`^rgb\\(${ba},${ba},${ba}\\)$`),xa=new RegExp(`^rgba\\(${os},${os},${os},${za}\\)$`),Xs=new RegExp(`^rgba\\(${ba},${ba},${ba},${za}\\)$`),Ks=new RegExp(`^hsl\\(${za},${ba},${ba}\\)$`),Ms=new RegExp(`^hsla\\(${za},${ba},${ba},${za}\\)$`),Qs={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};xs(La,Js,{copy(d){return Object.assign(new this.constructor,this,d)},displayable(){return this.rgb().displayable()},hex:Ss,formatHex:Ss,formatHex8:Ci,formatHsl:qa,formatRgb:ls,toString:ls});function Ss(){return this.rgb().formatHex()}function Ci(){return this.rgb().formatHex8()}function qa(){return qi(this).formatHsl()}function ls(){return this.rgb().formatRgb()}function Js(d){var g,s;return d=(d+"").trim().toLowerCase(),(g=ws.exec(d))?(s=g[1].length,g=parseInt(g[1],16),s===6?ra(g):s===3?new Xi(g>>8&15|g>>4&240,g>>4&15|g&240,(g&15)<<4|g&15,1):s===8?$i(g>>24&255,g>>16&255,g>>8&255,(g&255)/255):s===4?$i(g>>12&15|g>>8&240,g>>8&15|g>>4&240,g>>4&15|g&240,((g&15)<<4|g&15)/255):null):(g=vo.exec(d))?new Xi(g[1],g[2],g[3],1):(g=Ea.exec(d))?new Xi(g[1]*255/100,g[2]*255/100,g[3]*255/100,1):(g=xa.exec(d))?$i(g[1],g[2],g[3],g[4]):(g=Xs.exec(d))?$i(g[1]*255/100,g[2]*255/100,g[3]*255/100,g[4]):(g=Ks.exec(d))?cs(g[1],g[2]/100,g[3]/100,1):(g=Ms.exec(d))?cs(g[1],g[2]/100,g[3]/100,g[4]):Qs.hasOwnProperty(d)?ra(Qs[d]):d==="transparent"?new Xi(NaN,NaN,NaN,0):null}function ra(d){return new Xi(d>>16&255,d>>8&255,d&255,1)}function $i(d,g,s,o){return o<=0&&(d=g=s=NaN),new Xi(d,g,s,o)}function Bs(d){return d instanceof La||(d=Js(d)),d?(d=d.rgb(),new Xi(d.r,d.g,d.b,d.opacity)):new Xi}function zi(d,g,s,o){return arguments.length===1?Bs(d):new Xi(d,g,s,o==null?1:o)}function Xi(d,g,s,o){this.r=+d,this.g=+g,this.b=+s,this.opacity=+o}xs(Xi,zi,Ca(La,{brighter(d){return d=d==null?$a:Math.pow($a,d),new Xi(this.r*d,this.g*d,this.b*d,this.opacity)},darker(d){return d=d==null?Na:Math.pow(Na,d),new Xi(this.r*d,this.g*d,this.b*d,this.opacity)},rgb(){return this},clamp(){return new Xi(ji(this.r),ji(this.g),ji(this.b),Fs(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:As,formatHex:As,formatHex8:go,formatRgb:Os,toString:Os}));function As(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}`}function go(){return`#${ja(this.r)}${ja(this.g)}${ja(this.b)}${ja((isNaN(this.opacity)?1:this.opacity)*255)}`}function Os(){const d=Fs(this.opacity);return`${d===1?"rgb(":"rgba("}${ji(this.r)}, ${ji(this.g)}, ${ji(this.b)}${d===1?")":`, ${d})`}`}function Fs(d){return isNaN(d)?1:Math.max(0,Math.min(1,d))}function ji(d){return Math.max(0,Math.min(255,Math.round(d)||0))}function ja(d){return d=ji(d),(d<16?"0":"")+d.toString(16)}function cs(d,g,s,o){return o<=0?d=g=s=NaN:s<=0||s>=1?d=g=NaN:g<=0&&(d=NaN),new Ki(d,g,s,o)}function qi(d){if(d instanceof Ki)return new Ki(d.h,d.s,d.l,d.opacity);if(d instanceof La||(d=Js(d)),!d)return new Ki;if(d instanceof Ki)return d;d=d.rgb();var g=d.r/255,s=d.g/255,o=d.b/255,p=Math.min(g,s,o),T=Math.max(g,s,o),C=NaN,W=T-p,tt=(T+p)/2;return W?(g===T?C=(s-o)/W+(s<o)*6:s===T?C=(o-g)/W+2:C=(g-s)/W+4,W/=tt<.5?T+p:2-T-p,C*=60):W=tt>0&&tt<1?0:C,new Ki(C,W,tt,d.opacity)}function us(d,g,s,o){return arguments.length===1?qi(d):new Ki(d,g,s,o==null?1:o)}function Ki(d,g,s,o){this.h=+d,this.s=+g,this.l=+s,this.opacity=+o}xs(Ki,us,Ca(La,{brighter(d){return d=d==null?$a:Math.pow($a,d),new Ki(this.h,this.s,this.l*d,this.opacity)},darker(d){return d=d==null?Na:Math.pow(Na,d),new Ki(this.h,this.s,this.l*d,this.opacity)},rgb(){var d=this.h%360+(this.h<0)*360,g=isNaN(d)||isNaN(this.s)?0:this.s,s=this.l,o=s+(s<.5?s:1-s)*g,p=2*s-o;return new Xi(ua(d>=240?d-240:d+120,p,o),ua(d,p,o),ua(d<120?d+240:d-120,p,o),this.opacity)},clamp(){return new Ki(Va(this.h),$s(this.s),$s(this.l),Fs(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 d=Fs(this.opacity);return`${d===1?"hsl(":"hsla("}${Va(this.h)}, ${$s(this.s)*100}%, ${$s(this.l)*100}%${d===1?")":`, ${d})`}`}}));function Va(d){return d=(d||0)%360,d<0?d+360:d}function $s(d){return Math.max(0,Math.min(1,d||0))}function ua(d,g,s){return(d<60?g+(s-g)*d/60:d<180?s:d<240?g+(s-g)*(240-d)/60:g)*255}function bi(d,g){if(typeof d!="function"||g!=null&&typeof g!="function")throw new TypeError("Expected a function");var s=function(){for(var p=arguments.length,T=new Array(p),C=0;C<p;C++)T[C]=arguments[C];var W=g?g.apply(this,T):T[0],tt=s.cache;if(tt.has(W))return tt.get(W);var mt=d.apply(this,T);return s.cache=tt.set(W,mt)||tt,mt};return s.cache=new(bi.Cache||Map),bi.cacheList.push(s.cache),s}bi.Cache=Map,bi.cacheList=[],bi.clearCache=function(){bi.cacheList.forEach(function(d){return d.clear()})};var Kn=function(d){return d[d.kUnknown=0]="kUnknown",d[d.kNumber=1]="kNumber",d[d.kPercentage=2]="kPercentage",d[d.kEms=3]="kEms",d[d.kPixels=4]="kPixels",d[d.kRems=5]="kRems",d[d.kDegrees=6]="kDegrees",d[d.kRadians=7]="kRadians",d[d.kGradians=8]="kGradians",d[d.kTurns=9]="kTurns",d[d.kMilliseconds=10]="kMilliseconds",d[d.kSeconds=11]="kSeconds",d[d.kInteger=12]="kInteger",d}({}),wa=function(d){return d[d.kUNumber=0]="kUNumber",d[d.kUPercent=1]="kUPercent",d[d.kULength=2]="kULength",d[d.kUAngle=3]="kUAngle",d[d.kUTime=4]="kUTime",d[d.kUOther=5]="kUOther",d}({}),po=function(d){return d[d.kYes=0]="kYes",d[d.kNo=1]="kNo",d}({}),mo=function(d){return d[d.kYes=0]="kYes",d[d.kNo=1]="kNo",d}({}),yo=[{name:"em",unit_type:Kn.kEms},{name:"px",unit_type:Kn.kPixels},{name:"deg",unit_type:Kn.kDegrees},{name:"rad",unit_type:Kn.kRadians},{name:"grad",unit_type:Kn.kGradians},{name:"ms",unit_type:Kn.kMilliseconds},{name:"s",unit_type:Kn.kSeconds},{name:"rem",unit_type:Kn.kRems},{name:"turn",unit_type:Kn.kTurns}],Da=function(d){return d[d.kUnknownType=0]="kUnknownType",d[d.kUnparsedType=1]="kUnparsedType",d[d.kKeywordType=2]="kKeywordType",d[d.kUnitType=3]="kUnitType",d[d.kSumType=4]="kSumType",d[d.kProductType=5]="kProductType",d[d.kNegateType=6]="kNegateType",d[d.kInvertType=7]="kInvertType",d[d.kMinType=8]="kMinType",d[d.kMaxType=9]="kMaxType",d[d.kClampType=10]="kClampType",d[d.kTransformType=11]="kTransformType",d[d.kPositionType=12]="kPositionType",d[d.kURLImageType=13]="kURLImageType",d[d.kColorType=14]="kColorType",d[d.kUnsupportedColorType=15]="kUnsupportedColorType",d}({}),bo=function(g){return yo.find(function(s){return s.name===g}).unit_type},hs=function(g){return g?g==="number"?Kn.kNumber:g==="percent"||g==="%"?Kn.kPercentage:bo(g):Kn.kUnknown},Fo=function(g){switch(g){case Kn.kNumber:case Kn.kInteger:return wa.kUNumber;case Kn.kPercentage:return wa.kUPercent;case Kn.kPixels:return wa.kULength;case Kn.kMilliseconds:case Kn.kSeconds:return wa.kUTime;case Kn.kDegrees:case Kn.kRadians:case Kn.kGradians:case Kn.kTurns:return wa.kUAngle;default:return wa.kUOther}},_o=function(g){switch(g){case wa.kUNumber:return Kn.kNumber;case wa.kULength:return Kn.kPixels;case wa.kUPercent:return Kn.kPercentage;case wa.kUTime:return Kn.kSeconds;case wa.kUAngle:return Kn.kDegrees;default:return Kn.kUnknown}},Ts=function(g){var s=1;switch(g){case Kn.kPixels:case Kn.kDegrees:case Kn.kSeconds:break;case Kn.kMilliseconds:s=.001;break;case Kn.kRadians:s=180/Math.PI;break;case Kn.kGradians:s=.9;break;case Kn.kTurns:s=360;break}return s},ts=function(g){switch(g){case Kn.kNumber:case Kn.kInteger:return"";case Kn.kPercentage:return"%";case Kn.kEms:return"em";case Kn.kRems:return"rem";case Kn.kPixels:return"px";case Kn.kDegrees:return"deg";case Kn.kRadians:return"rad";case Kn.kGradians:return"grad";case Kn.kMilliseconds:return"ms";case Kn.kSeconds:return"s";case Kn.kTurns:return"turn"}return""},Ia=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"toString",value:function(){return this.buildCSSText(po.kNo,mo.kNo,"")}},{key:"isNumericValue",value:function(){return this.getType()>=Da.kUnitType&&this.getType()<=Da.kClampType}}],[{key:"isAngle",value:function(s){return s===Kn.kDegrees||s===Kn.kRadians||s===Kn.kGradians||s===Kn.kTurns}},{key:"isLength",value:function(s){return s>=Kn.kEms&&s<Kn.kDegrees}},{key:"isRelativeUnit",value:function(s){return s===Kn.kPercentage||s===Kn.kEms||s===Kn.kRems}},{key:"isTime",value:function(s){return s===Kn.kSeconds||s===Kn.kMilliseconds}}])}(),_s=function(d){function g(s){var o;return(0,_.Z)(this,g),o=(0,S.Z)(this,g),o.colorSpace=s,o}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"getType",value:function(){return Da.kColorType}},{key:"to",value:function(o){return this}}])}(Ia),Ya=function(d){return d[d.Constant=0]="Constant",d[d.LinearGradient=1]="LinearGradient",d[d.RadialGradient=2]="RadialGradient",d}({}),es=function(d){function g(s,o){var p;return(0,_.Z)(this,g),p=(0,S.Z)(this,g),p.type=s,p.value=o,p}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"clone",value:function(){return new g(this.type,this.value)}},{key:"buildCSSText",value:function(o,p,T){return T}},{key:"getType",value:function(){return Da.kColorType}}])}(Ia),ia=function(d){function g(s){var o;return(0,_.Z)(this,g),o=(0,S.Z)(this,g),o.value=s,o}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"clone",value:function(){return new g(this.value)}},{key:"getType",value:function(){return Da.kKeywordType}},{key:"buildCSSText",value:function(o,p,T){return T+this.value}}])}(Ia),Zs=function(g){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o="";return Number.isFinite(g)?o="NaN":g>0?o="infinity":o="-infinity",o+=s},ha=function(g){return _o(Fo(g))},di=function(d){function g(s){var o,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kn.kNumber;(0,_.Z)(this,g),o=(0,S.Z)(this,g);var T;return typeof p=="string"?T=hs(p):T=p,o.unit=T,o.value=s,o}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"clone",value:function(){return new g(this.value,this.unit)}},{key:"equals",value:function(o){var p=o;return this.value===p.value&&this.unit===p.unit}},{key:"getType",value:function(){return Da.kUnitType}},{key:"convertTo",value:function(o){if(this.unit===o)return new g(this.value,this.unit);var p=ha(this.unit);if(p!==ha(o)||p===Kn.kUnknown)return null;var T=Ts(this.unit)/Ts(o);return new g(this.value*T,o)}},{key:"buildCSSText",value:function(o,p,T){var C;switch(this.unit){case Kn.kUnknown:break;case Kn.kInteger:C=Number(this.value).toFixed(0);break;case Kn.kNumber:case Kn.kPercentage:case Kn.kEms:case Kn.kRems:case Kn.kPixels:case Kn.kDegrees:case Kn.kRadians:case Kn.kGradians:case Kn.kMilliseconds:case Kn.kSeconds:case Kn.kTurns:{var W=-999999,tt=999999,mt=this.value,Gt=ts(this.unit);if(mt<W||mt>tt){var ie=ts(this.unit);!Number.isFinite(mt)||Number.isNaN(mt)?C=Zs(mt,ie):C=mt+(ie||"")}else C="".concat(mt).concat(Gt)}}return T+=C,T}}])}(Ia),Wi=new di(0,"px");new di(1,"px");var Ma=new di(0,"deg"),Ha=function(d){function g(s,o,p){var T,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,W=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;return(0,_.Z)(this,g),T=(0,S.Z)(this,g,["rgb"]),T.r=s,T.g=o,T.b=p,T.alpha=C,T.isNone=W,T}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"clone",value:function(){return new g(this.r,this.g,this.b,this.alpha)}},{key:"buildCSSText",value:function(o,p,T){return"".concat(T,"rgba(").concat(this.r,",").concat(this.g,",").concat(this.b,",").concat(this.alpha,")")}}])}(_s),qs=new ia("unset"),ta=new ia("initial"),Cs=new ia("inherit"),Eo={"":qs,unset:qs,initial:ta,inherit:Cs},xo=function(g){return Eo[g]||(Eo[g]=new ia(g)),Eo[g]},wo=new Ha(0,0,0,0,!0),ds=new Ha(0,0,0,0),ns=bi(function(d,g,s,o){return new Ha(d,g,s,o)},function(d,g,s,o){return"rgba(".concat(d,",").concat(g,",").concat(s,",").concat(o,")")}),ii=function(g){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Kn.kNumber;return new di(g,s)};new di(50,"%");function da(d){var g=d.type,s=d.value;return g==="hex"?"#".concat(s):g==="literal"?s:g==="rgb"?"rgb(".concat(s.join(","),")"):"rgba(".concat(s.join(","),")")}var Mi=function(){var d={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]+\.?))/},g="";function s(br){throw new Error("".concat(g,": ").concat(br))}function o(){var br=p();return g.length>0&&s("Invalid input not EOF"),br}function p(){return Mn(T)}function T(){return C("linear-gradient",d.linearGradient,tt)||C("repeating-linear-gradient",d.repeatingLinearGradient,tt)||C("radial-gradient",d.radialGradient,ie)||C("repeating-radial-gradient",d.repeatingRadialGradient,ie)||C("conic-gradient",d.conicGradient,ie)}function C(br,Gr,ti){return W(Gr,function(Gi){var Ji=ti();return Ji&&(Ei(d.comma)||s("Missing comma before color stops")),{type:br,orientation:Ji,colorStops:Mn(zn)}})}function W(br,Gr){var ti=Ei(br);if(ti){Ei(d.startCall)||s("Missing (");var Gi=Gr(ti);return Ei(d.endCall)||s("Missing )"),Gi}}function tt(){return mt()||Gt()}function mt(){return hi("directional",d.sideOrCorner,1)}function Gt(){return hi("angular",d.angleValue,1)}function ie(){var br,Gr=Se(),ti;return Gr&&(br=[],br.push(Gr),ti=g,Ei(d.comma)&&(Gr=Se(),Gr?br.push(Gr):g=ti)),br}function Se(){var br=Ge()||Ze();if(br)br.at=hn();else{var Gr=an();if(Gr){br=Gr;var ti=hn();ti&&(br.at=ti)}else{var Gi=yn();Gi&&(br={type:"default-radial",at:Gi})}}return br}function Ge(){var br=hi("shape",/^(circle)/i,0);return br&&(br.style=Ir()||an()),br}function Ze(){var br=hi("shape",/^(ellipse)/i,0);return br&&(br.style=Sr()||an()),br}function an(){return hi("extent-keyword",d.extentKeywords,1)}function hn(){if(hi("position",/^at/,0)){var br=yn();return br||s("Missing positioning value"),br}}function yn(){var br=dn();if(br.x||br.y)return{type:"position",value:br}}function dn(){return{x:Sr(),y:Sr()}}function Mn(br){var Gr=br(),ti=[];if(Gr)for(ti.push(Gr);Ei(d.comma);)Gr=br(),Gr?ti.push(Gr):s("One extra comma");return ti}function zn(){var br=er();return br||s("Expected color definition"),br.length=Sr(),br}function er(){return sr()||xr()||Mr()||ar()}function ar(){return hi("literal",d.literalColor,0)}function sr(){return hi("hex",d.hexColor,1)}function Mr(){return W(d.rgbColor,function(){return{type:"rgb",value:Mn(fr)}})}function xr(){return W(d.rgbaColor,function(){return{type:"rgba",value:Mn(fr)}})}function fr(){return Ei(d.number)[1]}function Sr(){return hi("%",d.percentageValue,1)||yr()||Ir()}function yr(){return hi("position-keyword",d.positionKeywords,1)}function Ir(){return hi("px",d.pixelValue,1)||hi("em",d.emValue,1)}function hi(br,Gr,ti){var Gi=Ei(Gr);if(Gi)return{type:br,value:Gi[ti]}}function Ei(br){var Gr=/^[\n\r\t\s]+/.exec(g);Gr&&oi(Gr[0].length);var ti=br.exec(g);return ti&&oi(ti[0].length),ti}function oi(br){g=g.substring(br)}return function(br){return g=br,o()}}();function Zo(d,g,s,o){var p=lt(o.value),T=0,C=0,W=T+g/2,tt=C+s/2,mt=Math.abs(g*Math.cos(p))+Math.abs(s*Math.sin(p)),Gt=d[0]+W-Math.cos(p)*mt/2,ie=d[1]+tt-Math.sin(p)*mt/2,Se=d[0]+W+Math.cos(p)*mt/2,Ge=d[1]+tt+Math.sin(p)*mt/2;return{x1:Gt,y1:ie,x2:Se,y2:Ge}}function zs(d,g,s,o,p,T){var C=o.value,W=p.value;o.unit===Kn.kPercentage&&(C=o.value/100*g),p.unit===Kn.kPercentage&&(W=p.value/100*s);var tt=Math.max((0,J.y)([0,0],[C,W]),(0,J.y)([0,s],[C,W]),(0,J.y)([g,s],[C,W]),(0,J.y)([g,0],[C,W]));return T&&(T instanceof di?tt=T.value:T instanceof ia&&(T.value==="closest-side"?tt=Math.min(C,g-C,W,s-W):T.value==="farthest-side"?tt=Math.max(C,g-C,W,s-W):T.value==="closest-corner"&&(tt=Math.min((0,J.y)([0,0],[C,W]),(0,J.y)([0,s],[C,W]),(0,J.y)([g,s],[C,W]),(0,J.y)([g,0],[C,W]))))),{x:C+d[0],y:W+d[1],r:tt}}var to=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,Ns=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,zo=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,js=/[\d.]+:(#[^\s]+|[^\)]+\))/gi;function Ps(d){var g,s=d.length;if(d[s-1].length=(g=d[s-1].length)!==null&&g!==void 0?g:{type:"%",value:"100"},s>1){var o;d[0].length=(o=d[0].length)!==null&&o!==void 0?o:{type:"%",value:"0"}}for(var p=0,T=Number(d[0].length.value),C=1;C<s;C++){var W,tt=(W=d[C].length)===null||W===void 0?void 0:W.value;if(!(0,Rt.Z)(tt)&&!(0,Rt.Z)(T)){for(var mt=1;mt<C-p;mt++)d[p+mt].length={type:"%",value:"".concat(T+(Number(tt)-T)*mt/(C-p))};p=C,T=Number(tt)}}}var eo={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},Ba=bi(function(d){var g;return d.type==="angular"?g=Number(d.value):g=eo[d.value]||0,ii(g,"deg")}),Ws=bi(function(d){var g=50,s=50,o="%",p="%";if((d==null?void 0:d.type)==="position"){var T=d.value,C=T.x,W=T.y;(C==null?void 0:C.type)==="position-keyword"&&(C.value==="left"?g=0:C.value==="center"?g=50:C.value==="right"?g=100:C.value==="top"?s=0:C.value==="bottom"&&(s=100)),(W==null?void 0:W.type)==="position-keyword"&&(W.value==="left"?g=0:W.value==="center"?s=50:W.value==="right"?g=100:W.value==="top"?s=0:W.value==="bottom"&&(s=100)),((C==null?void 0:C.type)==="px"||(C==null?void 0:C.type)==="%"||(C==null?void 0:C.type)==="em")&&(o=C==null?void 0:C.type,g=Number(C.value)),((W==null?void 0:W.type)==="px"||(W==null?void 0:W.type)==="%"||(W==null?void 0:W.type)==="em")&&(p=W==null?void 0:W.type,s=Number(W.value))}return{cx:ii(g,o),cy:ii(s,p)}}),Mo=bi(function(d){if(d.indexOf("linear")>-1||d.indexOf("radial")>-1){var g=Mi(d);return g.map(function(W){var tt=W.type,mt=W.orientation,Gt=W.colorStops;Ps(Gt);var ie=Gt.map(function(Mn){return{offset:ii(Number(Mn.length.value),"%"),color:da(Mn)}});if(tt==="linear-gradient")return new es(Ya.LinearGradient,{angle:mt?Ba(mt):Ma,steps:ie});if(tt==="radial-gradient"&&(mt||(mt=[{type:"shape",value:"circle"}]),mt[0].type==="shape"&&mt[0].value==="circle")){var Se=Ws(mt[0].at),Ge=Se.cx,Ze=Se.cy,an;if(mt[0].style){var hn=mt[0].style,yn=hn.type,dn=hn.value;yn==="extent-keyword"?an=xo(dn):an=ii(dn,yn)}return new es(Ya.RadialGradient,{cx:Ge,cy:Ze,size:an,steps:ie})}})}var s=d[0];if(d[1]==="("||d[2]==="("){if(s==="l"){var o=to.exec(d);if(o){var p,T=((p=o[2].match(js))===null||p===void 0?void 0:p.map(function(W){return W.split(":")}))||[];return[new es(Ya.LinearGradient,{angle:ii(parseFloat(o[1]),"deg"),steps:T.map(function(W){var tt=(0,M.Z)(W,2),mt=tt[0],Gt=tt[1];return{offset:ii(Number(mt)*100,"%"),color:Gt}})})]}}else if(s==="r"){var C=no(d);if(C)if((0,Tt.Z)(C))d=C;else return[new es(Ya.RadialGradient,C)]}else if(s==="p")return ro(d)}});function no(d){var g=Ns.exec(d);if(g){var s,o=((s=g[4].match(js))===null||s===void 0?void 0:s.map(function(p){return p.split(":")}))||[];return{cx:ii(50,"%"),cy:ii(50,"%"),steps:o.map(function(p){var T=(0,M.Z)(p,2),C=T[0],W=T[1];return{offset:ii(Number(C)*100,"%"),color:W}})}}return null}function ro(d){var g=zo.exec(d);if(g){var s=g[1],o=g[2];switch(s){case"a":s="repeat";break;case"x":s="repeat-x";break;case"y":s="repeat-y";break;case"n":s="no-repeat";break;default:s="no-repeat"}return{image:o,repetition:s}}return null}function Pa(d){return!!d.type&&!!d.value}function fa(d){return d&&!!d.image}function ks(d){return d&&!(0,Rt.Z)(d.r)&&!(0,Rt.Z)(d.g)&&!(0,Rt.Z)(d.b)}var Fi=bi(function(d){if(fa(d))return(0,c.Z)({repetition:"repeat"},d);if((0,Rt.Z)(d)&&(d=""),d==="transparent")return ds;if(d==="currentColor")d="black";else if(d==="none")return wo;var g=Mo(d);if(g)return g;var s=Js(d),o=[0,0,0,0];return s!==null&&(o[0]=s.r||0,o[1]=s.g||0,o[2]=s.b||0,o[3]=s.opacity),ns.apply(void 0,o)});function io(d,g){if(!(!ks(d)||!ks(g)))return[[Number(d.r),Number(d.g),Number(d.b),Number(d.alpha)],[Number(g.r),Number(g.g),Number(g.b),Number(g.alpha)],function(s){var o=s.slice();if(o[3])for(var p=0;p<3;p++)o[p]=Math.round((0,Vt.Z)(o[p],0,255));return o[3]=(0,Vt.Z)(o[3],0,1),"rgba(".concat(o.join(","),")")}]}function fs(d,g){if((0,Rt.Z)(g))return ii(0,"px");if(g="".concat(g).trim().toLowerCase(),isFinite(Number(g))){if("px".search(d)>=0)return ii(Number(g),"px");if("deg".search(d)>=0)return ii(Number(g),"deg")}var s=[];g=g.replace(d,function(p){return s.push(p),"U".concat(p)});var o="U(".concat(d.source,")");return s.map(function(p){return ii(Number(g.replace(new RegExp("U".concat(p),"g"),"").replace(new RegExp(o,"g"),"*0")),p)})[0]}var Rs=function(g){return fs(new RegExp("px","g"),g)},Gs=bi(Rs),el=function(g){return fs(new RegExp("%","g"),g)};bi(el);var At=function(g){return(0,ft.Z)(g)||isFinite(Number(g))?ii(Number(g)||0,"px"):fs(new RegExp("px|%|em|rem","g"),g)},X=bi(At),ot=function(g){return fs(new RegExp("deg|rad|grad|turn","g"),g)},xt=bi(ot);function zt(d,g,s,o){var p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,T="",C=d.value||0,W=g.value||0,tt=ha(d.unit),mt=d.convertTo(tt),Gt=g.convertTo(tt);return mt&&Gt?(C=mt.value,W=Gt.value,T=ts(d.unit)):(di.isLength(d.unit)||di.isLength(g.unit))&&(C=De(d,p,s),W=De(g,p,s),T="px"),[C,W,function(ie){return o&&(ie=Math.max(ie,0)),ie+T}]}function Qt(d){var g=0;return d.unit===Kn.kDegrees?g=d.value:d.unit===Kn.kRadians?g=Yt(Number(d.value)):d.unit===Kn.kTurns?g=Oe(Number(d.value)):d.value&&(g=d.value),g}function ee(d,g){var s;return Array.isArray(d)?s=d.map(function(o){return Number(o)}):(0,Tt.Z)(d)?s=d.split(" ").map(function(o){return Number(o)}):(0,ft.Z)(d)&&(s=[d]),g===2?s.length===1?[s[0],s[0]]:[s[0],s[1]]:g===4?s.length===1?[s[0],s[0],s[0],s[0]]:s.length===2?[s[0],s[1],s[0],s[1]]:s.length===3?[s[0],s[1],s[2],s[1]]:[s[0],s[1],s[2],s[3]]:g==="even"&&s.length%2===1?[].concat((0,z.Z)(s),(0,z.Z)(s)):s}function De(d,g,s){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(d.unit===Kn.kPixels)return Number(d.value);if(d.unit===Kn.kPercentage&&s){var p=s.nodeName===qn.GROUP?s.getLocalBounds():s.getGeometryBounds();return(o?p.min[g]:0)+d.value/100*p.halfExtents[g]*2}return 0}var _e=function(g){return fs(/deg|rad|grad|turn|px|%/g,g)},qe=["blur","brightness","drop-shadow","contrast","grayscale","sepia","saturate","hue-rotate","invert"];function ln(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(d=d.toLowerCase().trim(),d==="none")return[];for(var g=/\s*([\w-]+)\(([^)]*)\)/g,s=[],o,p=0;o=g.exec(d);){if(o.index!==p)return[];if(p=o.index+o[0].length,qe.indexOf(o[1])>-1&&s.push({name:o[1],params:o[2].split(" ").map(function(T){return _e(T)||Fi(T)})}),g.lastIndex===d.length)return s}return[]}function en(d){return d.toString()}var Sn=function(g){return typeof g=="number"?ii(g):/^\s*[-+]?(\d*\.)?\d+\s*$/.test(g)?ii(Number(g)):ii(0)},bn=bi(Sn);bi(function(d){return(0,Tt.Z)(d)?d.split(" ").map(bn):d.map(bn)});function Pn(d,g){return[d,g,en]}function In(d,g){return function(s,o){return[s,o,function(p){return en((0,Vt.Z)(p,d,g))}]}}function kn(d,g){if(d.length===g.length)return[d,g,function(s){return s}]}function Wn(d){return d.parsedStyle.d.totalLength===0&&(d.parsedStyle.d.totalLength=re(d.parsedStyle.d.absolutePath)),d.parsedStyle.d.totalLength}function Jn(d){return d.parsedStyle.points.totalLength===0&&(d.parsedStyle.points.totalLength=(0,Ur.hE)(d.parsedStyle.points.points)),d.parsedStyle.points.totalLength}function $n(d){for(var g=0;g<d.length;g++){var s=d[g-1],o=d[g],p=o[0];if(p==="M"&&s){var T=s[0],C=[o[1],o[2]],W=void 0;T==="L"||T==="M"?W=[s[1],s[2]]:(T==="C"||T==="A"||T==="Q")&&(W=[s[s.length-2],s[s.length-1]]),W&&hr(C,W)&&(d.splice(g,1),g--)}}}function cr(d){for(var g=!1,s=d.length,o=0;o<s;o++){var p=d[o],T=p[0];if(T==="C"||T==="A"||T==="Q"){g=!0;break}}return g}function vr(d){for(var g=[],s=[],o=[],p=0;p<d.length;p++){var T=d[p],C=T[0];C==="M"?(o.length&&(s.push(o),o=[]),o.push([T[1],T[2]])):C==="Z"?o.length&&(g.push(o),o=[]):o.push([T[1],T[2]])}return o.length>0&&s.push(o),{polygons:g,polylines:s}}function hr(d,g){return d[0]===g[0]&&d[1]===g[1]}function Lr(d,g){for(var s=[],o=[],p=[],T=0;T<d.length;T++){var C=d[T],W=C.currentPoint,tt=C.params,mt=C.prePoint,Gt=void 0;switch(C.command){case"Q":Gt=(0,Ur.x4)(mt[0],mt[1],tt[1],tt[2],tt[3],tt[4]);break;case"C":Gt=(0,Ur.l5)(mt[0],mt[1],tt[1],tt[2],tt[3],tt[4],tt[5],tt[6]);break;case"A":var ie=C.arcParams;Gt=(0,Ur.vp)(ie.cx,ie.cy,ie.rx,ie.ry,ie.xRotation,ie.startAngle,ie.endAngle);break;default:s.push(W[0]),o.push(W[1]);break}Gt&&(C.box=Gt,s.push(Gt.x,Gt.x+Gt.width),o.push(Gt.y,Gt.y+Gt.height)),g&&(C.command==="L"||C.command==="M")&&C.prePoint&&C.nextPoint&&p.push(C)}s=s.filter(function(zn){return!Number.isNaN(zn)&&zn!==1/0&&zn!==-1/0}),o=o.filter(function(zn){return!Number.isNaN(zn)&&zn!==1/0&&zn!==-1/0});var Se=(0,Me.Z)(s),Ge=(0,Me.Z)(o),Ze=(0,O.Z)(s),an=(0,O.Z)(o);if(p.length===0)return{x:Se,y:Ge,width:Ze-Se,height:an-Ge};for(var hn=0;hn<p.length;hn++){var yn=p[hn],dn=yn.currentPoint,Mn=void 0;dn[0]===Se?(Mn=Tr(yn,g),Se-=Mn.xExtra):dn[0]===Ze&&(Mn=Tr(yn,g),Ze+=Mn.xExtra),dn[1]===Ge?(Mn=Tr(yn,g),Ge-=Mn.yExtra):dn[1]===an&&(Mn=Tr(yn,g),an+=Mn.yExtra)}return{x:Se,y:Ge,width:Ze-Se,height:an-Ge}}function Tr(d,g){var s=d.prePoint,o=d.currentPoint,p=d.nextPoint,T=Math.pow(o[0]-s[0],2)+Math.pow(o[1]-s[1],2),C=Math.pow(o[0]-p[0],2)+Math.pow(o[1]-p[1],2),W=Math.pow(s[0]-p[0],2)+Math.pow(s[1]-p[1],2),tt=Math.acos((T+C-W)/(2*Math.sqrt(T)*Math.sqrt(C)));if(!tt||Math.sin(tt)===0||(0,st.Z)(tt,0))return{xExtra:0,yExtra:0};var mt=Math.abs(Math.atan2(p[1]-o[1],p[0]-o[0])),Gt=Math.abs(Math.atan2(p[0]-o[0],p[1]-o[1]));mt=mt>Math.PI/2?Math.PI-mt:mt,Gt=Gt>Math.PI/2?Math.PI-Gt:Gt;var ie={xExtra:Math.cos(tt/2-mt)*(g/2*(1/Math.sin(tt/2)))-g/2||0,yExtra:Math.cos(Gt-tt/2)*(g/2*(1/Math.sin(tt/2)))-g/2||0};return ie}function Nr(d,g){return[g[0]+(g[0]-d[0]),g[1]+(g[1]-d[1])]}var zr=function(g,s){var o=g.x*s.x+g.y*s.y,p=Math.sqrt((Math.pow(g.x,2)+Math.pow(g.y,2))*(Math.pow(s.x,2)+Math.pow(s.y,2))),T=g.x*s.y-g.y*s.x<0?-1:1,C=T*Math.acos(o/p);return C},_r=function(g,s,o,p,T,C,W,tt){s=Math.abs(s),o=Math.abs(o),p=$t(p,360);var mt=lt(p);if(g.x===W.x&&g.y===W.y)return{x:g.x,y:g.y,ellipticalArcAngle:0};if(s===0||o===0)return{x:0,y:0,ellipticalArcAngle:0};var Gt=(g.x-W.x)/2,ie=(g.y-W.y)/2,Se={x:Math.cos(mt)*Gt+Math.sin(mt)*ie,y:-Math.sin(mt)*Gt+Math.cos(mt)*ie},Ge=Math.pow(Se.x,2)/Math.pow(s,2)+Math.pow(Se.y,2)/Math.pow(o,2);Ge>1&&(s*=Math.sqrt(Ge),o*=Math.sqrt(Ge));var Ze=Math.pow(s,2)*Math.pow(o,2)-Math.pow(s,2)*Math.pow(Se.y,2)-Math.pow(o,2)*Math.pow(Se.x,2),an=Math.pow(s,2)*Math.pow(Se.y,2)+Math.pow(o,2)*Math.pow(Se.x,2),hn=Ze/an;hn=hn<0?0:hn;var yn=(T!==C?1:-1)*Math.sqrt(hn),dn={x:yn*(s*Se.y/o),y:yn*(-(o*Se.x)/s)},Mn={x:Math.cos(mt)*dn.x-Math.sin(mt)*dn.y+(g.x+W.x)/2,y:Math.sin(mt)*dn.x+Math.cos(mt)*dn.y+(g.y+W.y)/2},zn={x:(Se.x-dn.x)/s,y:(Se.y-dn.y)/o},er=zr({x:1,y:0},zn),ar={x:(-Se.x-dn.x)/s,y:(-Se.y-dn.y)/o},sr=zr(zn,ar);!C&&sr>0?sr-=2*Math.PI:C&&sr<0&&(sr+=2*Math.PI),sr%=2*Math.PI;var Mr=er+sr*tt,xr=s*Math.cos(Mr),fr=o*Math.sin(Mr),Sr={x:Math.cos(mt)*xr-Math.sin(mt)*fr+Mn.x,y:Math.sin(mt)*xr+Math.cos(mt)*fr+Mn.y,ellipticalArcStartAngle:er,ellipticalArcEndAngle:er+sr,ellipticalArcAngle:Mr,ellipticalArcCenter:Mn,resultantRx:s,resultantRy:o};return Sr};function j(d){for(var g=[],s=null,o=null,p=null,T=0,C=d.length,W=0;W<C;W++){var tt=d[W];o=d[W+1];var mt=tt[0],Gt={command:mt,prePoint:s,params:tt,startTangent:null,endTangent:null,currentPoint:null,nextPoint:null,arcParams:null,box:null,cubicParams:null};switch(mt){case"M":p=[tt[1],tt[2]],T=W;break;case"A":var ie=at(s,tt);Gt.arcParams=ie;break}if(mt==="Z")s=p,o=d[T+1];else{var Se=tt.length;s=[tt[Se-2],tt[Se-1]]}o&&o[0]==="Z"&&(o=d[T],g[T]&&(g[T].prePoint=s)),Gt.currentPoint=s,g[T]&&hr(s,g[T].currentPoint)&&(g[T].prePoint=Gt.prePoint);var Ge=o?[o[o.length-2],o[o.length-1]]:null;Gt.nextPoint=Ge;var Ze=Gt.prePoint;if(["L","H","V"].includes(mt))Gt.startTangent=[Ze[0]-s[0],Ze[1]-s[1]],Gt.endTangent=[s[0]-Ze[0],s[1]-Ze[1]];else if(mt==="Q"){var an=[tt[1],tt[2]];Gt.startTangent=[Ze[0]-an[0],Ze[1]-an[1]],Gt.endTangent=[s[0]-an[0],s[1]-an[1]]}else if(mt==="T"){var hn=g[W-1],yn=Nr(hn.currentPoint,Ze);hn.command==="Q"?(Gt.command="Q",Gt.startTangent=[Ze[0]-yn[0],Ze[1]-yn[1]],Gt.endTangent=[s[0]-yn[0],s[1]-yn[1]]):(Gt.command="TL",Gt.startTangent=[Ze[0]-s[0],Ze[1]-s[1]],Gt.endTangent=[s[0]-Ze[0],s[1]-Ze[1]])}else if(mt==="C"){var dn=[tt[1],tt[2]],Mn=[tt[3],tt[4]];Gt.startTangent=[Ze[0]-dn[0],Ze[1]-dn[1]],Gt.endTangent=[s[0]-Mn[0],s[1]-Mn[1]],Gt.startTangent[0]===0&&Gt.startTangent[1]===0&&(Gt.startTangent=[dn[0]-Mn[0],dn[1]-Mn[1]]),Gt.endTangent[0]===0&&Gt.endTangent[1]===0&&(Gt.endTangent=[Mn[0]-dn[0],Mn[1]-dn[1]])}else if(mt==="S"){var zn=g[W-1],er=Nr(zn.currentPoint,Ze),ar=[tt[1],tt[2]];zn.command==="C"?(Gt.command="C",Gt.startTangent=[Ze[0]-er[0],Ze[1]-er[1]],Gt.endTangent=[s[0]-ar[0],s[1]-ar[1]]):(Gt.command="SQ",Gt.startTangent=[Ze[0]-ar[0],Ze[1]-ar[1]],Gt.endTangent=[s[0]-ar[0],s[1]-ar[1]])}else if(mt==="A"){var sr=B(Gt,0),Mr=sr.x,xr=sr.y,fr=B(Gt,1,!1),Sr=fr.x,yr=fr.y;Gt.startTangent=[Mr,xr],Gt.endTangent=[Sr,yr]}g.push(Gt)}return g}function B(d,g){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=d.arcParams,p=o.rx,T=p===void 0?0:p,C=o.ry,W=C===void 0?0:C,tt=o.xRotation,mt=o.arcFlag,Gt=o.sweepFlag,ie=_r({x:d.prePoint[0],y:d.prePoint[1]},T,W,tt,!!mt,!!Gt,{x:d.currentPoint[0],y:d.currentPoint[1]},g),Se=_r({x:d.prePoint[0],y:d.prePoint[1]},T,W,tt,!!mt,!!Gt,{x:d.currentPoint[0],y:d.currentPoint[1]},s?g+.005:g-.005),Ge=Se.x-ie.x,Ze=Se.y-ie.y,an=Math.sqrt(Ge*Ge+Ze*Ze);return{x:-Ge/an,y:-Ze/an}}function P(d){return Math.sqrt(d[0]*d[0]+d[1]*d[1])}function k(d,g){return P(d)*P(g)?(d[0]*g[0]+d[1]*g[1])/(P(d)*P(g)):1}function U(d,g){return(d[0]*g[1]<d[1]*g[0]?-1:1)*Math.acos(k(d,g))}function at(d,g){var s=g[1],o=g[2],p=$t(lt(g[3]),Math.PI*2),T=g[4],C=g[5],W=d[0],tt=d[1],mt=g[6],Gt=g[7],ie=Math.cos(p)*(W-mt)/2+Math.sin(p)*(tt-Gt)/2,Se=-1*Math.sin(p)*(W-mt)/2+Math.cos(p)*(tt-Gt)/2,Ge=ie*ie/(s*s)+Se*Se/(o*o);Ge>1&&(s*=Math.sqrt(Ge),o*=Math.sqrt(Ge));var Ze=s*s*(Se*Se)+o*o*(ie*ie),an=Ze?Math.sqrt((s*s*(o*o)-Ze)/Ze):1;T===C&&(an*=-1),isNaN(an)&&(an=0);var hn=o?an*s*Se/o:0,yn=s?an*-o*ie/s:0,dn=(W+mt)/2+Math.cos(p)*hn-Math.sin(p)*yn,Mn=(tt+Gt)/2+Math.sin(p)*hn+Math.cos(p)*yn,zn=[(ie-hn)/s,(Se-yn)/o],er=[(-1*ie-hn)/s,(-1*Se-yn)/o],ar=U([1,0],zn),sr=U(zn,er);return k(zn,er)<=-1&&(sr=Math.PI),k(zn,er)>=1&&(sr=0),C===0&&sr>0&&(sr-=2*Math.PI),C===1&&sr<0&&(sr+=2*Math.PI),{cx:dn,cy:Mn,rx:hr(d,[mt,Gt])?0:s,ry:hr(d,[mt,Gt])?0:o,startAngle:ar,endAngle:ar+sr,xRotation:p,arcFlag:T,sweepFlag:C}}function ut(d,g,s){return d.reduce(function(o,p){var T="";if(p[0]==="M"||p[0]==="L"){var C=vec3.fromValues(p[1],p[2],0);s&&vec3.transformMat4(C,C,s),T="".concat(p[0]).concat(C[0],",").concat(C[1])}else if(p[0]==="Z")T=p[0];else if(p[0]==="C"){var W=vec3.fromValues(p[1],p[2],0),tt=vec3.fromValues(p[3],p[4],0),mt=vec3.fromValues(p[5],p[6],0);s&&(vec3.transformMat4(W,W,s),vec3.transformMat4(tt,tt,s),vec3.transformMat4(mt,mt,s)),T="".concat(p[0]).concat(W[0],",").concat(W[1],",").concat(tt[0],",").concat(tt[1],",").concat(mt[0],",").concat(mt[1])}else if(p[0]==="A"){var Gt=vec3.fromValues(p[6],p[7],0);s&&vec3.transformMat4(Gt,Gt,s),T="".concat(p[0]).concat(p[1],",").concat(p[2],",").concat(p[3],",").concat(p[4],",").concat(p[5],",").concat(Gt[0],",").concat(Gt[1])}else if(p[0]==="Q"){var ie=vec3.fromValues(p[1],p[2],0),Se=vec3.fromValues(p[3],p[4],0);s&&(vec3.transformMat4(ie,ie,s),vec3.transformMat4(Se,Se,s)),T="".concat(p[0]).concat(p[1],",").concat(p[2],",").concat(p[3],",").concat(p[4],"}")}return o+=T},"")}function ct(d,g,s,o){return[["M",d,g],["L",s,o]]}function pt(d,g,s,o){var p=(-1+Math.sqrt(2))/3*4,T=d*p,C=g*p,W=s-d,tt=s+d,mt=o-g,Gt=o+g;return[["M",W,o],["C",W,o-C,s-T,mt,s,mt],["C",s+T,mt,tt,o-C,tt,o],["C",tt,o+C,s+T,Gt,s,Gt],["C",s-T,Gt,W,o+C,W,o],["Z"]]}function Bt(d,g){var s=d.map(function(o,p){return[p===0?"M":"L",o[0],o[1]]});return g&&s.push(["Z"]),s}function ae(d,g,s,o,p){if(p){var T=_slicedToArray(p,4),C=T[0],W=T[1],tt=T[2],mt=T[3],Gt=d>0?1:-1,ie=g>0?1:-1,Se=Gt+ie!==0?1:0;return[["M",Gt*C+s,o],["L",d-Gt*W+s,o],W?["A",W,W,0,0,Se,d+s,ie*W+o]:null,["L",d+s,g-ie*tt+o],tt?["A",tt,tt,0,0,Se,d+s-Gt*tt,g+o]:null,["L",s+Gt*mt,g+o],mt?["A",mt,mt,0,0,Se,s,g+o-ie*mt]:null,["L",s,ie*C+o],C?["A",C,C,0,0,Se,Gt*C+s,o]:null,["Z"]].filter(function(Ge){return Ge})}return[["M",s,o],["L",s+d,o],["L",s+d,o+g],["L",s,o+g],["Z"]]}function pe(d){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:d.getLocalTransform(),s=[];switch(d.nodeName){case qn.LINE:var o=d.parsedStyle,p=o.x1,T=p===void 0?0:p,C=o.y1,W=C===void 0?0:C,tt=o.x2,mt=tt===void 0?0:tt,Gt=o.y2,ie=Gt===void 0?0:Gt;s=ct(T,W,mt,ie);break;case qn.CIRCLE:{var Se=d.parsedStyle,Ge=Se.r,Ze=Ge===void 0?0:Ge,an=Se.cx,hn=an===void 0?0:an,yn=Se.cy,dn=yn===void 0?0:yn;s=pt(Ze,Ze,hn,dn);break}case qn.ELLIPSE:{var Mn=d.parsedStyle,zn=Mn.rx,er=zn===void 0?0:zn,ar=Mn.ry,sr=ar===void 0?0:ar,Mr=Mn.cx,xr=Mr===void 0?0:Mr,fr=Mn.cy,Sr=fr===void 0?0:fr;s=pt(er,sr,xr,Sr);break}case qn.POLYLINE:case qn.POLYGON:var yr=d.parsedStyle.points;s=Bt(yr.points,d.nodeName===qn.POLYGON);break;case qn.RECT:var Ir=d.parsedStyle,hi=Ir.width,Ei=hi===void 0?0:hi,oi=Ir.height,br=oi===void 0?0:oi,Gr=Ir.x,ti=Gr===void 0?0:Gr,Gi=Ir.y,Ji=Gi===void 0?0:Gi,Ua=Ir.radius,oc=Ua&&Ua.some(function($o){return $o!==0});s=ae(Ei,br,ti,Ji,oc&&Ua.map(function($o){return clamp($o,0,Math.min(Math.abs(Ei)/2,Math.abs(br)/2))}));break;case qn.PATH:var Sl=d.parsedStyle.d.absolutePath;s=_toConsumableArray(Sl);break}if(s.length)return ut(s,d,g)}function Te(d){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,p=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,T=d.map(function(C,W){var tt=C[0],mt=d[W+1],Gt=W===0&&(g!==0||s!==0),ie=(W===d.length-1||mt&&(mt[0]==="M"||mt[0]==="Z"))&&o!==0&&p!==0,Se=Gt?[g,s]:[0,0],Ge=_slicedToArray(Se,2),Ze=Ge[0],an=Ge[1],hn=ie?[o,p]:[0,0],yn=_slicedToArray(hn,2),dn=yn[0],Mn=yn[1];switch(tt){case"M":return"M ".concat(C[1]+Ze,",").concat(C[2]+an);case"L":return"L ".concat(C[1]+dn,",").concat(C[2]+Mn);case"Q":return"Q ".concat(C[1]," ").concat(C[2],",").concat(C[3]+dn," ").concat(C[4]+Mn);case"C":return"C ".concat(C[1]," ").concat(C[2],",").concat(C[3]," ").concat(C[4],",").concat(C[5]+dn," ").concat(C[6]+Mn);case"A":return"A ".concat(C[1]," ").concat(C[2]," ").concat(C[3]," ").concat(C[4]," ").concat(C[5]," ").concat(C[6]," ").concat(C[7]).concat(ie?" L ".concat(C[6]+o,",").concat(C[7]+p):"");case"Z":return"Z";default:return null}}).filter(function(C){return C!==null}).join(" ");return~T.indexOf("NaN")?"":T}var Fe=function(g){if(g===""||Array.isArray(g)&&g.length===0)return{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:{x:0,y:0,width:0,height:0}};var s;try{s=le(g)}catch(Ge){s=le(""),console.error("[g]: Invalid SVG Path definition: ".concat(g))}$n(s);var o=cr(s),p=vr(s),T=p.polygons,C=p.polylines,W=j(s),tt=Lr(W,0),mt=tt.x,Gt=tt.y,ie=tt.width,Se=tt.height;return{absolutePath:s,hasArc:o,segments:W,polygons:T,polylines:C,totalLength:0,rect:{x:Number.isFinite(mt)?mt:0,y:Number.isFinite(Gt)?Gt:0,width:Number.isFinite(ie)?ie:0,height:Number.isFinite(Se)?Se:0}}},Ue=bi(Fe);function fn(d){return(0,Tt.Z)(d)?Ue(d):Fe(d)}function gn(d,g,s){var o=d.curve,p=g.curve;(!o||o.length===0)&&(o=Ht(d.absolutePath,!1),d.curve=o),(!p||p.length===0)&&(p=Ht(g.absolutePath,!1),g.curve=p);var T=[o,p];o.length!==p.length&&(T=qt(o,p));var C=ke(T[0])!==ke(T[1])?Ye(T[0]):Ve(T[0]);return[C,xn(T[1],C),function(W){return W}]}function On(d,g){var s;return(0,Tt.Z)(d)?s=d.split(" ").map(function(o){var p=o.split(","),T=(0,M.Z)(p,2),C=T[0],W=T[1];return[Number(C),Number(W)]}):s=d,{points:s,totalLength:0,segments:[]}}function Rn(d,g){return[d.points,g.points,function(s){return s}]}var wn=null,Fn=/\s*(\w+)\(([^)]*)\)/g;function Gn(d){return function(g){var s=0;return d.map(function(o){return o===wn?g[s++]:o})}}function Xn(d){return d}var rr={matrix:["NNNNNN",[wn,wn,0,0,wn,wn,0,0,0,0,1,0,wn,wn,0,1],Xn],matrix3d:["NNNNNNNNNNNNNNNN",Xn],rotate:["A"],rotateX:["A"],rotateY:["A"],rotateZ:["A"],rotate3d:["NNNA"],perspective:["L"],scale:["Nn",Gn([wn,wn,new di(1)]),Xn],scaleX:["N",Gn([wn,new di(1),new di(1)]),Gn([wn,new di(1)])],scaleY:["N",Gn([new di(1),wn,new di(1)]),Gn([new di(1),wn])],scaleZ:["N",Gn([new di(1),new di(1),wn])],scale3d:["NNN",Xn],skew:["Aa",null,Xn],skewX:["A",null,Gn([wn,Ma])],skewY:["A",null,Gn([Ma,wn])],translate:["Tt",Gn([wn,wn,Wi]),Xn],translateX:["T",Gn([wn,Wi,Wi]),Gn([wn,Wi])],translateY:["T",Gn([Wi,wn,Wi]),Gn([Wi,wn])],translateZ:["L",Gn([Wi,Wi,wn])],translate3d:["TTL",Xn]};function mr(d){for(var g=[],s=d.length,o=0;o<s;o++){var p=d[o],T=p[0],C=p.slice(1);T==="translate"||T==="skew"?C.length===1&&C.push(0):T==="scale"&&C.length===1&&C.push(C[0]);var W=rr[T];if(!W)return[];var tt=C.map(function(mt){return ii(mt)});g.push({t:T,d:tt})}return g}function Dr(d){if(Array.isArray(d))return mr(d);if(d=(d||"none").trim(),d==="none")return[];var g=[],s,o=0;for(Fn.lastIndex=0;s=Fn.exec(d);){if(s.index!==o)return[];o=s.index+s[0].length;var p=s[1],T=rr[p];if(!T)return[];var C=s[2].split(","),W=T[0];if(W.length<C.length)return[];for(var tt=[],mt=0;mt<W.length;mt++){var Gt=C[mt],ie=W[mt],Se=void 0;if(Gt?Se={A:function(Ze){return Ze.trim()==="0"?Ma:xt(Ze)},N:bn,T:X,L:Gs}[ie.toUpperCase()](Gt):Se={a:Ma,n:tt[0],t:Wi}[ie],Se===void 0)return[];tt.push(Se)}if(g.push({t:p,d:tt}),Fn.lastIndex===d.length)return g}return[]}function ai(d){if(Array.isArray(d))return mr(d);if(d=(d||"none").trim(),d==="none")return[];var g=[],s,o=0;for(Fn.lastIndex=0;s=Fn.exec(d);){if(s.index!==o)return[];o=s.index+s[0].length;var p=s[1],T=rr[p];if(!T)return[];var C=s[2].split(","),W=T[0];if(W.length<C.length)return[];for(var tt=[],mt=0;mt<W.length;mt++){var Gt=C[mt],ie=W[mt],Se=void 0;if(Gt?Se={A:function(Ze){return Ze.trim()==="0"?Ma:ot(Ze)},N:Sn,T:At,L:Rs}[ie.toUpperCase()](Gt):Se={a:Ma,n:tt[0],t:Wi}[ie],Se===void 0)return[];tt.push(Se)}if(g.push({t:p,d:tt}),Fn.lastIndex===d.length)return g}return[]}function ci(d){var g,s,o,p;switch(d.t){case"rotateX":return p=lt(Qt(d.d[0])),[1,0,0,0,0,Math.cos(p),Math.sin(p),0,0,-Math.sin(p),Math.cos(p),0,0,0,0,1];case"rotateY":return p=lt(Qt(d.d[0])),[Math.cos(p),0,-Math.sin(p),0,0,1,0,0,Math.sin(p),0,Math.cos(p),0,0,0,0,1];case"rotate":case"rotateZ":return p=lt(Qt(d.d[0])),[Math.cos(p),Math.sin(p),0,0,-Math.sin(p),Math.cos(p),0,0,0,0,1,0,0,0,0,1];case"rotate3d":g=d.d[0].value,s=d.d[1].value,o=d.d[2].value,p=lt(Qt(d.d[3]));var T=g*g+s*s+o*o;if(T===0)g=1,s=0,o=0;else if(T!==1){var C=Math.sqrt(T);g/=C,s/=C,o/=C}var W=Math.sin(p/2),tt=W*Math.cos(p/2),mt=W*W;return[1-2*(s*s+o*o)*mt,2*(g*s*mt+o*tt),2*(g*o*mt-s*tt),0,2*(g*s*mt-o*tt),1-2*(g*g+o*o)*mt,2*(s*o*mt+g*tt),0,2*(g*o*mt+s*tt),2*(s*o*mt-g*tt),1-2*(g*g+s*s)*mt,0,0,0,0,1];case"scale":return[d.d[0].value,0,0,0,0,d.d[1].value,0,0,0,0,1,0,0,0,0,1];case"scaleX":return[d.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,d.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,d.d[0].value,0,0,0,0,1];case"scale3d":return[d.d[0].value,0,0,0,0,d.d[1].value,0,0,0,0,d.d[2].value,0,0,0,0,1];case"skew":var Gt=lt(Qt(d.d[0])),ie=lt(Qt(d.d[1]));return[1,Math.tan(ie),0,0,Math.tan(Gt),1,0,0,0,0,1,0,0,0,0,1];case"skewX":return p=lt(Qt(d.d[0])),[1,0,0,0,Math.tan(p),1,0,0,0,0,1,0,0,0,0,1];case"skewY":return p=lt(Qt(d.d[0])),[1,Math.tan(p),0,0,0,1,0,0,0,0,1,0,0,0,0,1];case"translate":return g=De(d.d[0],0,null)||0,s=De(d.d[1],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,g,s,0,1];case"translateX":return g=De(d.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,g,0,0,1];case"translateY":return s=De(d.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,s,0,1];case"translateZ":return o=De(d.d[0],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,0,0,o,1];case"translate3d":return g=De(d.d[0],0,null)||0,s=De(d.d[1],0,null)||0,o=De(d.d[2],0,null)||0,[1,0,0,0,0,1,0,0,0,0,1,0,g,s,o,1];case"perspective":var Se=De(d.d[0],0,null)||0,Ge=Se?-1/Se:0;return[1,0,0,0,0,1,0,0,0,0,1,Ge,0,0,0,1];case"matrix":return[d.d[0].value,d.d[1].value,0,0,d.d[2].value,d.d[3].value,0,0,0,0,1,0,d.d[4].value,d.d[5].value,0,1];case"matrix3d":return d.d.map(function(Ze){return Ze.value})}}function Vr(d,g){return[d[0]*g[0]+d[4]*g[1]+d[8]*g[2]+d[12]*g[3],d[1]*g[0]+d[5]*g[1]+d[9]*g[2]+d[13]*g[3],d[2]*g[0]+d[6]*g[1]+d[10]*g[2]+d[14]*g[3],d[3]*g[0]+d[7]*g[1]+d[11]*g[2]+d[15]*g[3],d[0]*g[4]+d[4]*g[5]+d[8]*g[6]+d[12]*g[7],d[1]*g[4]+d[5]*g[5]+d[9]*g[6]+d[13]*g[7],d[2]*g[4]+d[6]*g[5]+d[10]*g[6]+d[14]*g[7],d[3]*g[4]+d[7]*g[5]+d[11]*g[6]+d[15]*g[7],d[0]*g[8]+d[4]*g[9]+d[8]*g[10]+d[12]*g[11],d[1]*g[8]+d[5]*g[9]+d[9]*g[10]+d[13]*g[11],d[2]*g[8]+d[6]*g[9]+d[10]*g[10]+d[14]*g[11],d[3]*g[8]+d[7]*g[9]+d[11]*g[10]+d[15]*g[11],d[0]*g[12]+d[4]*g[13]+d[8]*g[14]+d[12]*g[15],d[1]*g[12]+d[5]*g[13]+d[9]*g[14]+d[13]*g[15],d[2]*g[12]+d[6]*g[13]+d[10]*g[14]+d[14]*g[15],d[3]*g[12]+d[7]*g[13]+d[11]*g[14]+d[15]*g[15]]}function Er(d){return d.length===0?[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]:d.map(ci).reduce(Vr)}function Br(d){var g=[0,0,0],s=[1,1,1],o=[0,0,0],p=[0,0,0,1],T=[0,0,0,1];return Or(Er(d),g,s,o,p,T),[[g,s,o,T,p]]}var Cr=function(){function d(o,p){for(var T=[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0]],C=0;C<4;C++)for(var W=0;W<4;W++)for(var tt=0;tt<4;tt++)T[C][W]+=p[C][tt]*o[tt][W];return T}function g(o){return o[0][2]===0&&o[0][3]===0&&o[1][2]===0&&o[1][3]===0&&o[2][0]===0&&o[2][1]===0&&o[2][2]===1&&o[2][3]===0&&o[3][2]===0&&o[3][3]===1}function s(o,p,T,C,W){for(var tt=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]],mt=0;mt<4;mt++)tt[mt][3]=W[mt];for(var Gt=0;Gt<3;Gt++)for(var ie=0;ie<3;ie++)tt[3][Gt]+=o[ie]*tt[ie][Gt];var Se=C[0],Ge=C[1],Ze=C[2],an=C[3],hn=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];hn[0][0]=1-2*(Ge*Ge+Ze*Ze),hn[0][1]=2*(Se*Ge-Ze*an),hn[0][2]=2*(Se*Ze+Ge*an),hn[1][0]=2*(Se*Ge+Ze*an),hn[1][1]=1-2*(Se*Se+Ze*Ze),hn[1][2]=2*(Ge*Ze-Se*an),hn[2][0]=2*(Se*Ze-Ge*an),hn[2][1]=2*(Ge*Ze+Se*an),hn[2][2]=1-2*(Se*Se+Ge*Ge),tt=d(tt,hn);var yn=[[1,0,0,0],[0,1,0,0],[0,0,1,0],[0,0,0,1]];T[2]&&(yn[2][1]=T[2],tt=d(tt,yn)),T[1]&&(yn[2][1]=0,yn[2][0]=T[0],tt=d(tt,yn)),T[0]&&(yn[2][0]=0,yn[1][0]=T[0],tt=d(tt,yn));for(var dn=0;dn<3;dn++)for(var Mn=0;Mn<3;Mn++)tt[dn][Mn]*=p[dn];return g(tt)?[tt[0][0],tt[0][1],tt[1][0],tt[1][1],tt[3][0],tt[3][1]]:tt[0].concat(tt[1],tt[2],tt[3])}return s}();function Hr(d){return d.toFixed(6).replace(".000000","")}function mi(d,g){var s,o;return d.decompositionPair!==g&&(d.decompositionPair=g,s=Br(d)),g.decompositionPair!==d&&(g.decompositionPair=d,o=Br(g)),s[0]===null||o[0]===null?[[!1],[!0],function(p){return p?g[0].d:d[0].d}]:(s[0].push(0),o[0].push(1),[s,o,function(p){var T=si(s[0][3],o[0][3],p[5]),C=Cr(p[0],p[1],p[2],T,p[4]),W=C.map(Hr).join(",");return W}])}function wr(d,g){for(var s=0,o=0;o<d.length;o++)s+=d[o]*g[o];return s}function si(d,g,s){var o=wr(d,g);o=(0,Vt.Z)(o,-1,1);var p=[];if(o===1)p=d;else for(var T=Math.acos(o),C=Math.sin(s*T)*1/Math.sqrt(1-o*o),W=0;W<4;W++)p.push(d[W]*(Math.cos(s*T)-o*C)+g[W]*C);return p}function Jr(d){return d.replace(/[XY]/,"")}function fi(d){return d.replace(/(X|Y|Z|3d)?$/,"3d")}var ni=function(g,s){return g==="perspective"&&s==="perspective"||(g==="matrix"||g==="matrix3d")&&(s==="matrix"||s==="matrix3d")};function ri(d,g,s){var o=!1;if(!d.length||!g.length){d.length||(o=!0,d=g,g=[]);for(var p=function(){var Sr=d[T],yr=Sr.t,Ir=Sr.d,hi=yr.substring(0,5)==="scale"?1:0;g.push({t:yr,d:Ir.map(function(Ei){return typeof Ei=="number"?ii(hi):ii(hi,Ei.unit)})})},T=0;T<d.length;T++)p()}var C=[],W=[],tt=[];if(d.length!==g.length){var mt=mi(d,g);C=[mt[0]],W=[mt[1]],tt=[["matrix",[mt[2]]]]}else for(var Gt=0;Gt<d.length;Gt++){var ie=d[Gt].t,Se=g[Gt].t,Ge=d[Gt].d,Ze=g[Gt].d,an=rr[ie],hn=rr[Se],yn=void 0;if(ni(ie,Se)){var dn=mi([d[Gt]],[g[Gt]]);C.push(dn[0]),W.push(dn[1]),tt.push(["matrix",[dn[2]]]);continue}else if(ie===Se)yn=ie;else if(an[2]&&hn[2]&&Jr(ie)===Jr(Se))yn=Jr(ie),Ge=an[2](Ge),Ze=hn[2](Ze);else if(an[1]&&hn[1]&&fi(ie)===fi(Se))yn=fi(ie),Ge=an[1](Ge),Ze=hn[1](Ze);else{var Mn=mi(d,g);C=[Mn[0]],W=[Mn[1]],tt=[["matrix",[Mn[2]]]];break}for(var zn=[],er=[],ar=[],sr=0;sr<Ge.length;sr++){var Mr=zt(Ge[sr],Ze[sr],s,!1,sr);zn[sr]=Mr[0],er[sr]=Mr[1],ar.push(Mr[2])}C.push(zn),W.push(er),tt.push([yn,ar])}if(o){var xr=C;C=W,W=xr}return[C,W,function(fr){return fr.map(function(Sr,yr){var Ir=Sr.map(function(hi,Ei){return tt[yr][1][Ei](hi)}).join(",");return tt[yr][0]==="matrix"&&Ir.split(",").length===16&&(tt[yr][0]="matrix3d"),tt[yr][0]==="matrix3d"&&Ir.split(",").length===6&&(tt[yr][0]="matrix"),"".concat(tt[yr][0],"(").concat(Ir,")")}).join(" ")}]}var Si=bi(function(d){if((0,Tt.Z)(d)){if(d==="text-anchor")return[ii(0,"px"),ii(0,"px")];var g=d.split(" ");return g.length===1&&(g[0]==="top"||g[0]==="bottom"?(g[1]=g[0],g[0]="center"):g[1]="center"),g.length!==2?null:[X(Sa(g[0])),X(Sa(g[1]))]}return[ii(d[0]||0,"px"),ii(d[1]||0,"px")]});function Sa(d){return d==="center"?"50%":d==="left"||d==="top"?"0%":d==="right"||d==="bottom"?"100%":d}var Li=[{n:"display",k:["none"]},{n:"opacity",int:!0,inh:!0,d:"1",syntax:Yn.OPACITY_VALUE},{n:"fillOpacity",int:!0,inh:!0,d:"1",syntax:Yn.OPACITY_VALUE},{n:"strokeOpacity",int:!0,inh:!0,d:"1",syntax:Yn.OPACITY_VALUE},{n:"fill",int:!0,k:["none"],d:"none",syntax:Yn.PAINT},{n:"fillRule",k:["nonzero","evenodd"],d:"nonzero"},{n:"stroke",int:!0,k:["none"],d:"none",syntax:Yn.PAINT,l:!0},{n:"shadowType",k:["inner","outer","both"],d:"outer",l:!0},{n:"shadowColor",int:!0,syntax:Yn.COLOR},{n:"shadowOffsetX",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"shadowOffsetY",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"shadowBlur",int:!0,l:!0,d:"0",syntax:Yn.SHADOW_BLUR},{n:"lineWidth",int:!0,inh:!0,d:"1",l:!0,a:["strokeWidth"],syntax:Yn.LENGTH_PERCENTAGE},{n:"increasedLineWidthForHitTesting",inh:!0,d:"0",l:!0,syntax:Yn.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:Yn.LENGTH_PERCENTAGE_12},{n:"lineDashOffset",int:!0,inh:!0,d:"0",a:["strokeDashoffset"],syntax:Yn.LENGTH_PERCENTAGE},{n:"offsetPath",syntax:Yn.DEFINED_PATH},{n:"offsetDistance",int:!0,syntax:Yn.OFFSET_DISTANCE},{n:"dx",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"dy",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"zIndex",ind:!0,int:!0,d:"0",k:["auto"],syntax:Yn.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:Yn.FILTER},{n:"clipPath",syntax:Yn.DEFINED_PATH},{n:"textPath",syntax:Yn.DEFINED_PATH},{n:"textPathSide",k:["left","right"],d:"left"},{n:"textPathStartOffset",l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"transform",p:100,int:!0,k:["none"],d:"none",syntax:Yn.TRANSFORM},{n:"transformOrigin",p:100,d:"0 0",l:!0,syntax:Yn.TRANSFORM_ORIGIN},{n:"cx",int:!0,l:!0,d:"0",syntax:Yn.COORDINATE},{n:"cy",int:!0,l:!0,d:"0",syntax:Yn.COORDINATE},{n:"cz",int:!0,l:!0,d:"0",syntax:Yn.COORDINATE},{n:"r",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"rx",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"ry",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"x",int:!0,l:!0,d:"0",syntax:Yn.COORDINATE},{n:"y",int:!0,l:!0,d:"0",syntax:Yn.COORDINATE},{n:"z",int:!0,l:!0,d:"0",syntax:Yn.COORDINATE},{n:"width",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"height",int:!0,l:!0,k:["auto","fit-content","min-content","max-content"],d:"0",syntax:Yn.LENGTH_PERCENTAGE},{n:"radius",int:!0,l:!0,d:"0",syntax:Yn.LENGTH_PERCENTAGE_14},{n:"x1",int:!0,l:!0,syntax:Yn.COORDINATE},{n:"y1",int:!0,l:!0,syntax:Yn.COORDINATE},{n:"z1",int:!0,l:!0,syntax:Yn.COORDINATE},{n:"x2",int:!0,l:!0,syntax:Yn.COORDINATE},{n:"y2",int:!0,l:!0,syntax:Yn.COORDINATE},{n:"z2",int:!0,l:!0,syntax:Yn.COORDINATE},{n:"d",int:!0,l:!0,d:"",syntax:Yn.PATH,p:50},{n:"points",int:!0,l:!0,syntax:Yn.LIST_OF_POINTS,p:50},{n:"text",l:!0,d:"",syntax:Yn.TEXT,p:50},{n:"textTransform",l:!0,inh:!0,k:["capitalize","uppercase","lowercase","none"],d:"none",syntax:Yn.TEXT_TRANSFORM,p:51},{n:"font",l:!0},{n:"fontSize",int:!0,inh:!0,d:"16px",l:!0,syntax:Yn.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:Yn.LENGTH,int:!0,d:"0"},{n:"letterSpacing",l:!0,syntax:Yn.LENGTH,int:!0,d:"0"},{n:"miterLimit",l:!0,syntax:Yn.NUMBER,d:function(g){return g===qn.PATH||g===qn.POLYGON||g===qn.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:Yn.MARKER},{n:"markerEnd",syntax:Yn.MARKER},{n:"markerMid",syntax:Yn.MARKER},{n:"markerStartOffset",syntax:Yn.LENGTH,l:!0,int:!0,d:"0"},{n:"markerEndOffset",syntax:Yn.LENGTH,l:!0,int:!0,d:"0"}],Ls=new Set(Li.filter(function(d){return!!d.l}).map(function(d){return d.n})),Us={},va=function(){function d(g){var s=this;(0,_.Z)(this,d),this.runtime=g,Li.forEach(function(o){s.registerMetadata(o)})}return(0,I.Z)(d,[{key:"registerMetadata",value:function(s){[s.n].concat((0,z.Z)(s.a||[])).forEach(function(o){Us[o]=s})}},{key:"getPropertySyntax",value:function(s){return this.runtime.CSSPropertySyntaxFactory[s]}},{key:"processProperties",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{skipUpdateAttribute:!1,skipParse:!1,forceUpdateGeometry:!1,usedAttributes:[],memoize:!0};Object.assign(s.attributes,o);var T=s.parsedStyle.clipPath,C=s.parsedStyle.offsetPath;ka(s,o);var W=!!p.forceUpdateGeometry;if(!W){for(var tt in o)if(Ls.has(tt)){W=!0;break}}var mt=Wa(s);mt.has("fill")&&o.fill&&(s.parsedStyle.fill=Fi(o.fill)),mt.has("stroke")&&o.stroke&&(s.parsedStyle.stroke=Fi(o.stroke)),mt.has("shadowColor")&&o.shadowColor&&(s.parsedStyle.shadowColor=Fi(o.shadowColor)),mt.has("filter")&&o.filter&&(s.parsedStyle.filter=ln(o.filter)),mt.has("radius")&&!(0,Rt.Z)(o.radius)&&(s.parsedStyle.radius=ee(o.radius,4)),mt.has("lineDash")&&!(0,Rt.Z)(o.lineDash)&&(s.parsedStyle.lineDash=ee(o.lineDash,"even")),mt.has("points")&&o.points&&(s.parsedStyle.points=On(o.points)),mt.has("d")&&o.d===""&&(s.parsedStyle.d=(0,c.Z)({},ss)),mt.has("d")&&o.d&&(s.parsedStyle.d=fn(o.d)),mt.has("textTransform")&&o.textTransform&&this.runtime.CSSPropertySyntaxFactory[Yn.TEXT_TRANSFORM].calculator(null,null,{value:o.textTransform},s,null),mt.has("clipPath")&&!(0,vn.Z)(o.clipPath)&&this.runtime.CSSPropertySyntaxFactory[Yn.DEFINED_PATH].calculator("clipPath",T,o.clipPath,s,this.runtime),mt.has("offsetPath")&&o.offsetPath&&this.runtime.CSSPropertySyntaxFactory[Yn.DEFINED_PATH].calculator("offsetPath",C,o.offsetPath,s,this.runtime),mt.has("transform")&&o.transform&&(s.parsedStyle.transform=Dr(o.transform)),mt.has("transformOrigin")&&o.transformOrigin&&(s.parsedStyle.transformOrigin=Si(o.transformOrigin)),mt.has("markerStart")&&o.markerStart&&(s.parsedStyle.markerStart=this.runtime.CSSPropertySyntaxFactory[Yn.MARKER].calculator(null,o.markerStart,o.markerStart,null,null)),mt.has("markerEnd")&&o.markerEnd&&(s.parsedStyle.markerEnd=this.runtime.CSSPropertySyntaxFactory[Yn.MARKER].calculator(null,o.markerEnd,o.markerEnd,null,null)),mt.has("markerMid")&&o.markerMid&&(s.parsedStyle.markerMid=this.runtime.CSSPropertySyntaxFactory[Yn.MARKER].calculator("",o.markerMid,o.markerMid,null,null)),mt.has("zIndex")&&!(0,Rt.Z)(o.zIndex)&&this.runtime.CSSPropertySyntaxFactory[Yn.Z_INDEX].postProcessor(s),mt.has("offsetDistance")&&!(0,Rt.Z)(o.offsetDistance)&&this.runtime.CSSPropertySyntaxFactory[Yn.OFFSET_DISTANCE].postProcessor(s),mt.has("transform")&&o.transform&&this.runtime.CSSPropertySyntaxFactory[Yn.TRANSFORM].postProcessor(s),mt.has("transformOrigin")&&o.transformOrigin&&this.runtime.CSSPropertySyntaxFactory[Yn.TRANSFORM_ORIGIN].postProcessor(s),W&&(s.dirty(!0,!0),p.forceUpdateGeometry||this.runtime.sceneGraphService.dirtyToRoot(s))}},{key:"updateGeometry",value:function(s){var o=s.nodeName,p=this.runtime.geometryUpdaterFactory[o];if(p){var T=s.geometry;T.contentBounds||(T.contentBounds=new it),T.renderBounds||(T.renderBounds=new it);var C=s.parsedStyle,W=p.update(C,s),tt=W.cx,mt=tt===void 0?0:tt,Gt=W.cy,ie=Gt===void 0?0:Gt,Se=W.cz,Ge=Se===void 0?0:Se,Ze=W.hwidth,an=Ze===void 0?0:Ze,hn=W.hheight,yn=hn===void 0?0:hn,dn=W.hdepth,Mn=dn===void 0?0:dn,zn=[Math.abs(an),Math.abs(yn),Mn],er=C.stroke,ar=C.lineWidth,sr=ar===void 0?1:ar,Mr=C.increasedLineWidthForHitTesting,xr=Mr===void 0?0:Mr,fr=C.shadowType,Sr=fr===void 0?"outer":fr,yr=C.shadowColor,Ir=C.filter,hi=Ir===void 0?[]:Ir,Ei=C.transformOrigin,oi=[mt,ie,Ge];T.contentBounds.update(oi,zn);var br=o===qn.POLYLINE||o===qn.POLYGON||o===qn.PATH?Math.SQRT2:.5,Gr=er&&!er.isNone;if(Gr){var ti=((sr||0)+(xr||0))*br;zn[0]+=ti,zn[1]+=ti}if(T.renderBounds.update(oi,zn),yr&&Sr&&Sr!=="inner"){var Gi=T.renderBounds,Ji=Gi.min,Ua=Gi.max,oc=C.shadowBlur,Sl=C.shadowOffsetX,$o=C.shadowOffsetY,Al=oc||0,Ol=Sl||0,Qc=$o||0,Rh=Ji[0]-Al+Ol,Lh=Ua[0]+Al+Ol,Jc=Ji[1]-Al+Qc,Dh=Ua[1]+Al+Qc;Ji[0]=Math.min(Ji[0],Rh),Ua[0]=Math.max(Ua[0],Lh),Ji[1]=Math.min(Ji[1],Jc),Ua[1]=Math.max(Ua[1],Dh),T.renderBounds.setMinMax(Ji,Ua)}hi.forEach(function(tu){var eu=tu.name,Tl=tu.params;if(eu==="blur"){var nu=Tl[0].value;T.renderBounds.update(T.renderBounds.center,A.IH(T.renderBounds.halfExtents,T.renderBounds.halfExtents,[nu,nu,0]))}else if(eu==="drop-shadow"){var lc=Tl[0].value,cc=Tl[1].value,Cl=Tl[2].value,qo=T.renderBounds,Is=qo.min,Ja=qo.max,Ro=Is[0]-Cl+lc,Fh=Ja[0]+Cl+lc,_h=Is[1]-Cl+cc,Zh=Ja[1]+Cl+cc;Is[0]=Math.min(Is[0],Ro),Ja[0]=Math.max(Ja[0],Fh),Is[1]=Math.min(Is[1],_h),Ja[1]=Math.max(Ja[1],Zh),T.renderBounds.setMinMax(Is,Ja)}}),s.geometry.dirty=!1;var Ih=an<0,Bh=yn<0,$c=(Ih?-1:1)*(Ei?De(Ei[0],0,s,!0):0),qc=(Bh?-1:1)*(Ei?De(Ei[1],1,s,!0):0);($c||qc)&&s.setOrigin($c,qc)}}},{key:"updateSizeAttenuation",value:function(s,o){s.style.isSizeAttenuation?(s.style.rawLineWidth||(s.style.rawLineWidth=s.style.lineWidth),s.style.lineWidth=(s.style.rawLineWidth||1)/o,s.nodeName===qn.CIRCLE&&(s.style.rawR||(s.style.rawR=s.style.r),s.style.r=(s.style.rawR||1)/o)):(s.style.rawLineWidth&&(s.style.lineWidth=s.style.rawLineWidth,delete s.style.rawLineWidth),s.nodeName===qn.CIRCLE&&s.style.rawR&&(s.style.r=s.style.rawR,delete s.style.rawR))}}])}();function ka(d,g){var s=Wa(d);for(var o in g)s.has(o)&&(d.parsedStyle[o]=g[o])}function Wa(d){return d.constructor.PARSED_STYLE_LIST}var Xa=function(){function d(){(0,_.Z)(this,d),this.mixer=Pn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){return Qt(p)}}])}(),ga=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T,C){return p instanceof ia&&(p=null),C.sceneGraphService.updateDisplayObjectDependency(s,o,p,T),s==="clipPath"&&T.forEach(function(W){W.childNodes.length===0&&C.sceneGraphService.dirtyToRoot(W)}),p}}])}(),Ga=function(){function d(){(0,_.Z)(this,d),this.parser=Fi,this.mixer=io}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){return p instanceof ia?p.value==="none"?wo:ds:p}}])}(),Ra=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p instanceof ia?[]:p}}])}();function jo(d){var g=d.parsedStyle,s=g.fontSize;return(0,Rt.Z)(s)?null:s}var Vs=function(){function d(){(0,_.Z)(this,d),this.mixer=Pn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T,C){if((0,ft.Z)(p))return p;if(di.isRelativeUnit(p.unit)){if(p.unit===Kn.kPercentage)return 0;if(p.unit===Kn.kEms){if(T.parentNode){var W=jo(T.parentNode);if(W)return W*=p.value,W}return 0}if(p.unit===Kn.kRems){var tt;if(T!=null&&(tt=T.ownerDocument)!==null&&tt!==void 0&&tt.documentElement){var mt=jo(T.ownerDocument.documentElement);if(mt)return mt*=p.value,mt}return 0}}else return p.value}}])}(),Zl=function(){function d(){(0,_.Z)(this,d),this.mixer=kn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.map(function(T){return T.value})}}])}(),So=function(){function d(){(0,_.Z)(this,d),this.mixer=kn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.map(function(T){return T.value})}}])}(),Wo=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){var C;p instanceof ia&&(p=null);var W=(C=p)===null||C===void 0?void 0:C.cloneNode(!0);return W&&(W.style.isMarker=!0),W}}])}(),ao=function(){function d(){(0,_.Z)(this,d),this.mixer=Pn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.value}}])}(),Ao=function(){function d(){(0,_.Z)(this,d),this.mixer=In(0,1)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.value}},{key:"postProcessor",value:function(s){var o=s.parsedStyle,p=o.offsetPath,T=o.offsetDistance;if(p){var C=p.nodeName;if(C===qn.LINE||C===qn.PATH||C===qn.POLYLINE){var W=p.getPoint(T);W&&s.setLocalPosition(W.x,W.y)}}}}])}(),Oo=function(){function d(){(0,_.Z)(this,d),this.mixer=In(0,1)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p.value}}])}(),nl=function(){function d(){(0,_.Z)(this,d),this.parser=fn,this.mixer=gn}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p){return p instanceof ia&&p.value==="unset"?{absolutePath:[],hasArc:!1,segments:[],polygons:[],polylines:[],curve:null,totalLength:0,rect:new H(0,0,0,0)}:p}}])}(),Ds=(0,I.Z)(function d(){(0,_.Z)(this,d),this.mixer=Rn}),Ka=function(d){function g(){var s;(0,_.Z)(this,g);for(var o=arguments.length,p=new Array(o),T=0;T<o;T++)p[T]=arguments[T];return s=(0,S.Z)(this,g,[].concat(p)),s.mixer=In(0,1/0),s}return(0,R.Z)(g,d),(0,I.Z)(g)}(Vs),vs=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){return p instanceof ia?p.value==="unset"?"":p.value:"".concat(p)}},{key:"postProcessor",value:function(s){s.nodeValue="".concat(s.parsedStyle.text)||""}}])}(),Qr=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){var C=T.getAttribute("text");if(C){var W=C;p.value==="capitalize"?W=C.charAt(0).toUpperCase()+C.slice(1):p.value==="lowercase"?W=C.toLowerCase():p.value==="uppercase"&&(W=C.toUpperCase()),T.parsedStyle.text=W}return p.value}}])}(),pa=function(g){return Object.fromEntries(Object.entries(g).filter(function(s){var o=_slicedToArray(s,2),p=o[1];return p!==void 0}))},_i=new WeakMap;function Qa(d,g,s){if(d){var o=typeof d=="string"?document.getElementById(d):d;_i.has(o)&&_i.get(o).destroy(s),_i.set(o,g)}}var gs=typeof window!="undefined"&&typeof window.document!="undefined";function rl(d){return!!d.getAttribute}function zl(d,g){for(var s=0,o=d.length;s<o;){var p=s+o>>>1;To(d[p],g)<0?s=p+1:o=p}return s}function To(d,g){var s=Number(d.parsedStyle.zIndex||0),o=Number(g.parsedStyle.zIndex||0);if(s===o){var p=d.parentNode;if(p){var T=p.childNodes||[];return T.indexOf(d)-T.indexOf(g)}}return s-o}function Ys(d){var g=d;do{var s,o=(s=g.parsedStyle)===null||s===void 0?void 0:s.clipPath;if(o)return g;g=g.parentElement}while(g!==null);return null}var Go="px";function Co(d,g,s){gs&&d.style&&(d.style.width=g+Go,d.style.height=s+Go)}function jl(d,g){if(gs)return document.defaultView.getComputedStyle(d,null).getPropertyValue(g)}function Fu(d){var g=jl(d,"width");return g==="auto"?d.offsetWidth:parseFloat(g)}function _u(d){var g=jl(d,"height");return g==="auto"?d.offsetHeight:parseFloat(g)}var gc=1,il={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},Wl=typeof performance=="object"&&performance.now?performance:Date;function so(d){return d.nodeName===qn.FRAGMENT?!0:d.getRootNode().nodeName===qn.FRAGMENT}function al(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"auto",g=arguments.length>1?arguments[1]:void 0,s=arguments.length>2?arguments[2]:void 0,o=!1,p=!1,T=!!g&&!g.isNone,C=!!s&&!s.isNone;return d==="visiblepainted"||d==="painted"||d==="auto"?(o=T,p=C):d==="visiblefill"||d==="fill"?o=!0:d==="visiblestroke"||d==="stroke"?p=!0:(d==="visible"||d==="all")&&(o=!0,p=!0),[o,p]}var Zu=1,sl=function(){return Zu++},rs=typeof self=="object"&&self.self===self?self:typeof y.g=="object"&&y.g.global===y.g?y.g:{},ol=Date.now(),pc=function(){return rs.performance&&typeof rs.performance.now=="function"?rs.performance.now():Date.now()-ol},No={},Uo=Date.now(),ll=function(g){if(typeof g!="function")throw new TypeError("".concat(g," is not a function"));var s=Date.now(),o=s-Uo,p=o>16?0:16-o,T=sl();return No[T]=g,Object.keys(No).length>1||setTimeout(function(){Uo=s;var C=No;No={},Object.keys(C).forEach(function(W){return C[W](pc())})},p),T},qr=function(g){delete No[g]},zu=["","webkit","moz","ms","o"],Gl=function(g){return typeof g!="string"?ll:g===""?rs.requestAnimationFrame:rs["".concat(g,"RequestAnimationFrame")]},ju=function(g){return typeof g!="string"?qr:g===""?rs.cancelAnimationFrame:rs["".concat(g,"CancelAnimationFrame")]||rs["".concat(g,"CancelRequestAnimationFrame")]},Wu=function(g,s){for(var o=0;g[o]!==void 0;){if(s(g[o]))return g[o];o+=1}},mc=Wu(zu,function(d){return!!Gl(d)}),Ul=Gl(mc),yc=ju(mc);rs.requestAnimationFrame=Ul,rs.cancelAnimationFrame=yc;var Vl=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"getCallbacksNum",value:function(){return this.callbacks.length}},{key:"tapPromise",value:function(s,o){this.callbacks.push(o)}},{key:"promise",value:function(){for(var s=arguments.length,o=new Array(s),p=0;p<s;p++)o[p]=arguments[p];return Promise.all(this.callbacks.map(function(T){return T.apply(void 0,o)}))}}])}(),Gu=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"tapPromise",value:function(s,o){this.callbacks.push(o)}},{key:"promise",value:function(){var g=(0,la.Z)((0,ki.Z)().mark(function o(){var p,T,C,W,tt=arguments;return(0,ki.Z)().wrap(function(mt){for(;;)switch(mt.prev=mt.next){case 0:if(!this.callbacks.length){mt.next=6;break}return mt.next=1,(p=this.callbacks)[0].apply(p,tt);case 1:T=mt.sent,C=1;case 2:if(!(C<this.callbacks.length)){mt.next=5;break}return W=this.callbacks[C],mt.next=3,W(T);case 3:T=mt.sent;case 4:C++,mt.next=2;break;case 5:return mt.abrupt("return",T);case 6:return mt.abrupt("return",null);case 7:case"end":return mt.stop()}},o,this)}));function s(){return g.apply(this,arguments)}return s}()}])}(),ma=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"tap",value:function(s,o){this.callbacks.push(o)}},{key:"call",value:function(){for(var s=arguments.length,o=new Array(s),p=0;p<s;p++)o[p]=arguments[p];var T=arguments;this.callbacks.forEach(function(C){C.apply(void 0,T)})}}])}(),Yl=function(){function d(){(0,_.Z)(this,d),this.callbacks=[]}return(0,I.Z)(d,[{key:"tap",value:function(s,o){this.callbacks.push(o)}},{key:"call",value:function(){for(var s=arguments.length,o=new Array(s),p=0;p<s;p++)o[p]=arguments[p];if(this.callbacks.length){for(var T=arguments,C=this.callbacks[0].apply(void 0,T),W=1;W<this.callbacks.length;W++){var tt=this.callbacks[W];C=tt(C)}return C}return null}}])}(),Uu=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],Vu=/([\"\'])[^\'\"]+\1/;function bc(d){var g=d.fontSize,s=g===void 0?16:g,o=d.fontFamily,p=o===void 0?"sans-serif":o,T=d.fontStyle,C=T===void 0?"normal":T,W=d.fontVariant,tt=W===void 0?"normal":W,mt=d.fontWeight,Gt=mt===void 0?"normal":mt;return{fontSize:s,fontFamily:p,fontStyle:C,fontVariant:tt,fontWeight:Gt}}var oo=bi(function(g){for(var s=bc(g),o=s.fontSize,p=s.fontFamily,T=s.fontStyle,C=s.fontVariant,W=s.fontWeight,tt=(0,ft.Z)(o)&&"".concat(o,"px")||"16px",mt=p.split(","),Gt=mt.length-1;Gt>=0;Gt--){var ie=mt[Gt].trim();!Vu.test(ie)&&Uu.indexOf(ie)<0&&(ie='"'.concat(ie,'"')),mt[Gt]=ie}return"".concat(T," ").concat(C," ").concat(W," ").concat(tt," ").concat(mt.join(","))},function(d){var g=bc(d),s=g.fontSize,o=g.fontFamily,p=g.fontStyle,T=g.fontVariant,C=g.fontWeight;return"".concat(p,"_").concat(T,"_").concat(C,"_").concat(s,"_").concat(o)}),Yu=1e-6,Po=function(g){return Math.max(g,Yu)};function cl(d,g,s){return F.identity(d),d[4]=Math.tan(g),d[1]=Math.tan(s),d}var Qi=F.create(),ad=F.create(),Ec={scale:function(g){F.fromScaling(Qi,[g[0].value,g[1].value,1].map(function(s){return Po(s)}))},scaleX:function(g){F.fromScaling(Qi,[g[0].value,1,1].map(function(s){return Po(s)}))},scaleY:function(g){F.fromScaling(Qi,[1,g[0].value,1].map(function(s){return Po(s)}))},scaleZ:function(g){F.fromScaling(Qi,[1,1,g[0].value].map(function(s){return Po(s)}))},scale3d:function(g){F.fromScaling(Qi,[g[0].value,g[1].value,g[2].value].map(function(s){return Po(s)}))},translate:function(g){F.fromTranslation(Qi,[g[0].value,g[1].value,0])},translateX:function(g){F.fromTranslation(Qi,[g[0].value,0,0])},translateY:function(g){F.fromTranslation(Qi,[0,g[0].value,0])},translateZ:function(g){F.fromTranslation(Qi,[0,0,g[0].value])},translate3d:function(g){F.fromTranslation(Qi,[g[0].value,g[1].value,g[2].value])},rotate:function(g){F.fromZRotation(Qi,lt(Qt(g[0])))},rotateX:function(g){F.fromXRotation(Qi,lt(Qt(g[0])))},rotateY:function(g){F.fromYRotation(Qi,lt(Qt(g[0])))},rotateZ:function(g){F.fromZRotation(Qi,lt(Qt(g[0])))},rotate3d:function(g){F.fromRotation(Qi,lt(Qt(g[3])),[g[0].value,g[1].value,g[2].value])},skew:function(g){cl(Qi,lt(g[0].value),lt(g[1].value))},skewX:function(g){cl(Qi,lt(g[0].value),0)},skewY:function(g){cl(Qi,0,lt(g[0].value))},matrix:function(g){F.set(Qi,g[0].value,g[1].value,0,0,g[2].value,g[3].value,0,0,0,0,1,0,g[4].value,g[5].value,0,1)},matrix3d:function(g){F.set.apply(F,[Qi].concat((0,z.Z)(g.map(function(s){return s.value}))))}},Vo=A.al(1,1,1),Hu=A.Ue(),xc={translate:function(g,s){Un.sceneGraphService.setLocalScale(g,Vo,!1),Un.sceneGraphService.setLocalEulerAngles(g,Hu,void 0,void 0,!1),Un.sceneGraphService.setLocalPosition(g,[s[0].value,s[1].value,0],!1),Un.sceneGraphService.dirtyLocalTransform(g,g.transformable)}};function Hl(d,g){if(d.length){if(d.length===1&&xc[d[0].t]){xc[d[0].t](g,d[0].d);return}for(var s=F.identity(ad),o=0;o<d.length;o++){var p=d[o],T=p.t,C=p.d,W=Ec[T];W&&(W(C),F.mul(s,s,Qi))}g.setLocalTransform(s)}else g.resetLocalTransform();return g.getLocalTransform()}var wc=function(){function d(){(0,_.Z)(this,d),this.parser=ai,this.mixer=ri}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){return p instanceof ia?[]:p}},{key:"postProcessor",value:function(s){Hl(s.parsedStyle.transform,s)}}])}(),Xu=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"postProcessor",value:function(s){var o=s.parsedStyle.transformOrigin;o[0].unit===Kn.kPixels&&o[1].unit===Kn.kPixels?s.setOrigin(o[0].value,o[1].value):s.getGeometryBounds()}}])}(),Xl=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"calculator",value:function(s,o,p,T){return p.value}},{key:"postProcessor",value:function(s){if(s.parentNode){var o=s.parentNode,p=o.renderable,T=o.sortable;p&&o.dirty(),T&&(T.dirty=!0,T.dirtyReason=ca.Z_INDEX_CHANGED)}}}])}(),Mc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.cx,T=p===void 0?0:p,C=s.cy,W=C===void 0?0:C,tt=s.r,mt=tt===void 0?0:tt;return{cx:T,cy:W,hwidth:mt,hheight:mt}}}])}(),Sc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.cx,T=p===void 0?0:p,C=s.cy,W=C===void 0?0:C,tt=s.rx,mt=tt===void 0?0:tt,Gt=s.ry,ie=Gt===void 0?0:Gt;return{cx:T,cy:W,hwidth:mt,hheight:ie}}}])}(),Ku=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s){var o=s.x1,p=s.y1,T=s.x2,C=s.y2,W=Math.min(o,T),tt=Math.max(o,T),mt=Math.min(p,C),Gt=Math.max(p,C),ie=tt-W,Se=Gt-mt,Ge=ie/2,Ze=Se/2;return{cx:W+Ge,cy:mt+Ze,hwidth:Ge,hheight:Ze}}}])}(),Ac=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s){var o=s.d,p=o.rect,T=p.x,C=p.y,W=p.width,tt=p.height,mt=W/2,Gt=tt/2;return{cx:T+mt,cy:C+Gt,hwidth:mt,hheight:Gt}}}])}(),Qu=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s){if(s.points&&(0,Qn.Z)(s.points.points)){var o=s.points.points,p=Math.min.apply(Math,(0,z.Z)(o.map(function(Se){return Se[0]}))),T=Math.max.apply(Math,(0,z.Z)(o.map(function(Se){return Se[0]}))),C=Math.min.apply(Math,(0,z.Z)(o.map(function(Se){return Se[1]}))),W=Math.max.apply(Math,(0,z.Z)(o.map(function(Se){return Se[1]}))),tt=T-p,mt=W-C,Gt=tt/2,ie=mt/2;return{cx:p+Gt,cy:C+ie,hwidth:Gt,hheight:ie}}return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),Ju=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.x,T=p===void 0?0:p,C=s.y,W=C===void 0?0:C,tt=s.src,mt=s.width,Gt=mt===void 0?0:mt,ie=s.height,Se=ie===void 0?0:ie,Ge=Gt,Ze=Se;return tt&&!(0,Tt.Z)(tt)&&(Ge||(Ge=tt.width,s.width=Ge),Ze||(Ze=tt.height,s.height=Ze)),{cx:T+Ge/2,cy:W+Ze/2,hwidth:Ge/2,hheight:Ze/2}}}])}(),Oc=function(){function d(g){(0,_.Z)(this,d),this.globalRuntime=g}return(0,I.Z)(d,[{key:"isReadyToMeasure",value:function(s,o){var p=s.text;return p}},{key:"update",value:function(s,o){var p,T=s.text,C=s.textAlign,W=C===void 0?"start":C,tt=s.lineWidth,mt=tt===void 0?1:tt,Gt=s.textBaseline,ie=Gt===void 0?"alphabetic":Gt,Se=s.dx,Ge=Se===void 0?0:Se,Ze=s.dy,an=Ze===void 0?0:Ze,hn=s.x,yn=hn===void 0?0:hn,dn=s.y,Mn=dn===void 0?0:dn;if(!this.isReadyToMeasure(s,o))return s.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 zn=(o==null||(p=o.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0?void 0:p.getConfig())||{},er=zn.offscreenCanvas,ar=this.globalRuntime.textService.measureText(T,s,er);s.metrics=ar;var sr=ar.width,Mr=ar.height,xr=sr/2,fr=Mr/2,Sr=yn+xr;W==="center"||W==="middle"?Sr+=mt/2-xr:(W==="right"||W==="end")&&(Sr+=mt-xr*2);var yr=Mn-fr;return ie==="middle"?yr+=fr:ie==="top"||ie==="hanging"?yr+=fr*2:ie==="alphabetic"||(ie==="bottom"||ie==="ideographic")&&(yr+=0),Ge&&(Sr+=Ge),an&&(yr+=an),{cx:Sr,cy:yr,hwidth:xr,hheight:fr}}}])}(),Tc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){return{cx:0,cy:0,hwidth:0,hheight:0}}}])}(),$u=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"update",value:function(s,o){var p=s.x,T=p===void 0?0:p,C=s.y,W=C===void 0?0:C,tt=s.width,mt=tt===void 0?0:tt,Gt=s.height,ie=Gt===void 0?0:Gt;return{cx:T+mt/2,cy:W+ie/2,hwidth:mt/2,hheight:ie/2}}}])}();function Cc(d){return!!d.type}var ul=function(){function d(g){(0,_.Z)(this,d),this.eventPhase=d.prototype.NONE,this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.defaultPrevented=!1,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Q,this.page=new Q,this.canvas=new Q,this.viewport=new Q,this.composed=!1,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=g}return(0,I.Z)(d,[{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(et)}}])}(),hl=function(d){function g(){var s;(0,_.Z)(this,g);for(var o=arguments.length,p=new Array(o),T=0;T<o;T++)p[T]=arguments[T];return s=(0,S.Z)(this,g,[].concat(p)),s.client=new Q,s.movement=new Q,s.offset=new Q,s.global=new Q,s.screen=new Q,s}return(0,R.Z)(g,d),(0,I.Z)(g,[{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(o){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(o)}},{key:"initMouseEvent",value:function(){throw new Error(et)}}])}(ul),dl=function(d){function g(){var s;(0,_.Z)(this,g);for(var o=arguments.length,p=new Array(o),T=0;T<o;T++)p[T]=arguments[T];return s=(0,S.Z)(this,g,[].concat(p)),s.width=0,s.height=0,s.isPrimary=!1,s}return(0,R.Z)(g,d),(0,I.Z)(g,[{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)}}])}(hl),fl=function(d){function g(){return(0,_.Z)(this,g),(0,S.Z)(this,g,arguments)}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"clone",value:function(){return this.manager.cloneWheelEvent(this)}}])}(hl),Aa=function(d){function g(s,o){var p;return(0,_.Z)(this,g),p=(0,S.Z)(this,g,[null]),p.type=s,p.detail=o==null?void 0:o.detail,o&&!("detail"in o)&&(p.detail=o),Object.assign(p,o),p}return(0,R.Z)(g,d),(0,I.Z)(g)}(ul),Nc=function(){function d(){(0,_.Z)(this,d),this.emitter=new D}return(0,I.Z)(d,[{key:"on",value:function(s,o,p){return this.addEventListener(s,o,p),this}},{key:"addEventListener",value:function(s,o,p){var T=!1,C=!1;if((0,Ln.Z)(p))T=p;else if(p){var W=p.capture;T=W===void 0?!1:W;var tt=p.once;C=tt===void 0?!1:tt}T&&(s+="capture"),o=(0,_n.Z)(o)?o:o.handleEvent;var mt=(0,_n.Z)(o)?void 0:o;return C?this.emitter.once(s,o,mt):this.emitter.on(s,o,mt),this}},{key:"off",value:function(s,o,p){return s?this.removeEventListener(s,o,p):this.removeAllEventListeners(),this}},{key:"removeAllEventListeners",value:function(){var s;(s=this.emitter)===null||s===void 0||s.removeAllListeners()}},{key:"removeEventListener",value:function(s,o,p){var T;if(!this.emitter)return this;var C=(0,Ln.Z)(p)?p:p==null?void 0:p.capture;C&&(s+="capture"),o=(0,_n.Z)(o)?o:(T=o)===null||T===void 0?void 0:T.handleEvent;var W=(0,_n.Z)(o)?void 0:o;return this.emitter.off(s,o,W),this}},{key:"emit",value:function(s,o){this.dispatchEvent(new Aa(s,o))}},{key:"dispatchEventToSelf",value:function(s){s.target||(s.target=this),s.currentTarget=this,this.emitter.emit(s.type,s)}},{key:"dispatchEvent",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2?arguments[2]:void 0;if(p)return this.dispatchEventToSelf(s),!0;var T;if(this.document)T=this;else if(this.defaultView)T=this.defaultView;else{var C;T=(C=this.ownerDocument)===null||C===void 0?void 0:C.defaultView}if(T){if(s.manager=T.getEventService(),!s.manager)return!1;s.defaultPrevented=!1,s.path?s.path.length=0:s.page=[],o||(s.target=this),s.manager.dispatchEvent(s,s.type,o)}else this.dispatchEventToSelf(s);return!s.defaultPrevented}}])}(),Ii=function(d){function g(){var s;(0,_.Z)(this,g);for(var o=arguments.length,p=new Array(o),T=0;T<o;T++)p[T]=arguments[T];return s=(0,S.Z)(this,g,[].concat(p)),s.shadow=!1,s.ownerDocument=null,s.isConnected=!1,s.baseURI="",s.childNodes=[],s.nodeType=0,s.nodeName="",s.nodeValue=null,s.mutations=void 0,s.parentNode=null,s.destroyed=!1,s}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"textContent",get:function(){var o="";this.nodeName===qn.TEXT&&(o+=this.style.text);var p=(0,Oi.Z)(this.childNodes),T;try{for(p.s();!(T=p.n()).done;){var C=T.value;C.nodeName===qn.TEXT?o+=C.nodeValue:o+=C.textContent}}catch(W){p.e(W)}finally{p.f()}return o},set:function(o){var p=this;this.childNodes.slice().forEach(function(T){p.removeChild(T)}),this.nodeName===qn.TEXT&&(this.style.text="".concat(o))}},{key:"getRootNode",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.parentNode?this.parentNode.getRootNode(o):o.composed&&this.host?this.host.getRootNode(o):this}},{key:"hasChildNodes",value:function(){return this.childNodes.length>0}},{key:"isDefaultNamespace",value:function(o){throw new Error(et)}},{key:"lookupNamespaceURI",value:function(o){throw new Error(et)}},{key:"lookupPrefix",value:function(o){throw new Error(et)}},{key:"normalize",value:function(){throw new Error(et)}},{key:"isEqualNode",value:function(o){return this===o}},{key:"isSameNode",value:function(o){return this.isEqualNode(o)}},{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(o){if(o===this)return 0;for(var p=o,T=this,C=[p],W=[T];(tt=p.parentNode)!==null&&tt!==void 0?tt:T.parentNode;){var tt;p=p.parentNode?(C.push(p.parentNode),p.parentNode):p,T=T.parentNode?(W.push(T.parentNode),T.parentNode):T}if(p!==T)return g.DOCUMENT_POSITION_DISCONNECTED|g.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC|g.DOCUMENT_POSITION_PRECEDING;var mt=C.length>W.length?C:W,Gt=mt===C?W:C;if(mt[mt.length-Gt.length]===Gt[0])return mt===C?g.DOCUMENT_POSITION_CONTAINED_BY|g.DOCUMENT_POSITION_FOLLOWING:g.DOCUMENT_POSITION_CONTAINS|g.DOCUMENT_POSITION_PRECEDING;for(var ie=mt.length-Gt.length,Se=Gt.length-1;Se>=0;Se--){var Ge=Gt[Se],Ze=mt[ie+Se];if(Ze!==Ge){var an=Ge.parentNode.childNodes;return an.indexOf(Ge)<an.indexOf(Ze)?Gt===C?g.DOCUMENT_POSITION_PRECEDING:g.DOCUMENT_POSITION_FOLLOWING:mt===C?g.DOCUMENT_POSITION_PRECEDING:g.DOCUMENT_POSITION_FOLLOWING}}return g.DOCUMENT_POSITION_FOLLOWING}},{key:"contain",value:function(o){return this.contains(o)}},{key:"contains",value:function(o){for(var p=o;p&&this!==p;)p=p.parentNode;return!!p}},{key:"getAncestor",value:function(o){for(var p=this;o>0&&p;)p=p.parentNode,o--;return p}},{key:"forEach",value:function(o){for(var p=[this];p.length>0;){var T=p.pop(),C=o(T);if(C===!1)break;for(var W=T.childNodes.length-1;W>=0;W--)p.push(T.childNodes[W])}}}],[{key:"isNode",value:function(o){return!!o.childNodes}}])}(Nc);Ii.DOCUMENT_POSITION_DISCONNECTED=1,Ii.DOCUMENT_POSITION_PRECEDING=2,Ii.DOCUMENT_POSITION_FOLLOWING=4,Ii.DOCUMENT_POSITION_CONTAINS=8,Ii.DOCUMENT_POSITION_CONTAINED_BY=16,Ii.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC=32;var qu=2048,Pc=function(){function d(g,s){var o=this;(0,_.Z)(this,d),this.nativeHTMLMap=new WeakMap,this.cursor="default",this.mappingTable={},this.mappingState={trackingData:{}},this.eventPool=new Map,this.tmpMatrix=F.create(),this.tmpVec3=A.Ue(),this.onPointerDown=function(p){var T=o.createPointerEvent(p);if(o.dispatchEvent(T,"pointerdown"),T.pointerType==="touch")o.dispatchEvent(T,"touchstart");else if(T.pointerType==="mouse"||T.pointerType==="pen"){var C=T.button===2;o.dispatchEvent(T,C?"rightdown":"mousedown")}var W=o.trackingData(p.pointerId);W.pressTargetsByButton[p.button]=T.composedPath(),o.freeEvent(T)},this.onPointerUp=function(p){var T=Wl.now(),C=o.createPointerEvent(p,void 0,void 0,o.context.config.alwaysTriggerPointerEventOnCanvas?o.rootTarget:void 0);if(o.dispatchEvent(C,"pointerup"),C.pointerType==="touch")o.dispatchEvent(C,"touchend");else if(C.pointerType==="mouse"||C.pointerType==="pen"){var W=C.button===2;o.dispatchEvent(C,W?"rightup":"mouseup")}var tt=o.trackingData(p.pointerId),mt=o.findMountedTarget(tt.pressTargetsByButton[p.button]),Gt=mt;if(mt&&!C.composedPath().includes(mt)){for(var ie=mt;ie&&!C.composedPath().includes(ie);){if(C.currentTarget=ie,o.notifyTarget(C,"pointerupoutside"),C.pointerType==="touch")o.notifyTarget(C,"touchendoutside");else if(C.pointerType==="mouse"||C.pointerType==="pen"){var Se=C.button===2;o.notifyTarget(C,Se?"rightupoutside":"mouseupoutside")}Ii.isNode(ie)&&(ie=ie.parentNode)}delete tt.pressTargetsByButton[p.button],Gt=ie}if(Gt){var Ge,Ze=o.clonePointerEvent(C,"click");Ze.target=Gt,Ze.path=[],tt.clicksByButton[p.button]||(tt.clicksByButton[p.button]={clickCount:0,target:Ze.target,timeStamp:T});var an=o.context.renderingContext.root.ownerDocument.defaultView,hn=tt.clicksByButton[p.button];hn.target===Ze.target&&T-hn.timeStamp<an.getConfig().dblClickSpeed?++hn.clickCount:hn.clickCount=1,hn.target=Ze.target,hn.timeStamp=T,Ze.detail=hn.clickCount,(Ge=C.detail)!==null&&Ge!==void 0&&Ge.preventClick||(!o.context.config.useNativeClickEvent&&(Ze.pointerType==="mouse"||Ze.pointerType==="touch")&&o.dispatchEvent(Ze,"click"),o.dispatchEvent(Ze,"pointertap")),o.freeEvent(Ze)}o.freeEvent(C)},this.onPointerMove=function(p){var T=o.createPointerEvent(p,void 0,void 0,o.context.config.alwaysTriggerPointerEventOnCanvas?o.rootTarget:void 0),C=T.pointerType==="mouse"||T.pointerType==="pen",W=o.trackingData(p.pointerId),tt=o.findMountedTarget(W.overTargets);if(W.overTargets&&tt!==T.target){var mt=p.type==="mousemove"?"mouseout":"pointerout",Gt=o.createPointerEvent(p,mt,tt||void 0);if(o.dispatchEvent(Gt,"pointerout"),C&&o.dispatchEvent(Gt,"mouseout"),!T.composedPath().includes(tt)){var ie=o.createPointerEvent(p,"pointerleave",tt||void 0);for(ie.eventPhase=ie.AT_TARGET;ie.target&&!T.composedPath().includes(ie.target);)ie.currentTarget=ie.target,o.notifyTarget(ie),C&&o.notifyTarget(ie,"mouseleave"),Ii.isNode(ie.target)&&(ie.target=ie.target.parentNode);o.freeEvent(ie)}o.freeEvent(Gt)}if(tt!==T.target){var Se=p.type==="mousemove"?"mouseover":"pointerover",Ge=o.clonePointerEvent(T,Se);o.dispatchEvent(Ge,"pointerover"),C&&o.dispatchEvent(Ge,"mouseover");for(var Ze=tt&&Ii.isNode(tt)&&tt.parentNode;Ze&&Ze!==(Ii.isNode(o.rootTarget)&&o.rootTarget.parentNode)&&Ze!==T.target;)Ze=Ze.parentNode;var an=!Ze||Ze===(Ii.isNode(o.rootTarget)&&o.rootTarget.parentNode);if(an){var hn=o.clonePointerEvent(T,"pointerenter");for(hn.eventPhase=hn.AT_TARGET;hn.target&&hn.target!==tt&&hn.target!==(Ii.isNode(o.rootTarget)&&o.rootTarget.parentNode);)hn.currentTarget=hn.target,o.notifyTarget(hn),C&&o.notifyTarget(hn,"mouseenter"),Ii.isNode(hn.target)&&(hn.target=hn.target.parentNode);o.freeEvent(hn)}o.freeEvent(Ge)}o.dispatchEvent(T,"pointermove"),T.pointerType==="touch"&&o.dispatchEvent(T,"touchmove"),C&&(o.dispatchEvent(T,"mousemove"),o.cursor=o.getCursor(T.target)),W.overTargets=T.composedPath(),o.freeEvent(T)},this.onPointerOut=function(p){var T=o.trackingData(p.pointerId);if(T.overTargets){var C=p.pointerType==="mouse"||p.pointerType==="pen",W=o.findMountedTarget(T.overTargets),tt=o.createPointerEvent(p,"pointerout",W||void 0);o.dispatchEvent(tt),C&&o.dispatchEvent(tt,"mouseout");var mt=o.createPointerEvent(p,"pointerleave",W||void 0);for(mt.eventPhase=mt.AT_TARGET;mt.target&&mt.target!==(Ii.isNode(o.rootTarget)&&o.rootTarget.parentNode);)mt.currentTarget=mt.target,o.notifyTarget(mt),C&&o.notifyTarget(mt,"mouseleave"),Ii.isNode(mt.target)&&(mt.target=mt.target.parentNode);T.overTargets=null,o.freeEvent(tt),o.freeEvent(mt)}o.cursor=null},this.onPointerOver=function(p){var T=o.trackingData(p.pointerId),C=o.createPointerEvent(p),W=C.pointerType==="mouse"||C.pointerType==="pen";o.dispatchEvent(C,"pointerover"),W&&o.dispatchEvent(C,"mouseover"),C.pointerType==="mouse"&&(o.cursor=o.getCursor(C.target));var tt=o.clonePointerEvent(C,"pointerenter");for(tt.eventPhase=tt.AT_TARGET;tt.target&&tt.target!==(Ii.isNode(o.rootTarget)&&o.rootTarget.parentNode);)tt.currentTarget=tt.target,o.notifyTarget(tt),W&&o.notifyTarget(tt,"mouseenter"),Ii.isNode(tt.target)&&(tt.target=tt.target.parentNode);T.overTargets=C.composedPath(),o.freeEvent(C),o.freeEvent(tt)},this.onPointerUpOutside=function(p){var T=o.trackingData(p.pointerId),C=o.findMountedTarget(T.pressTargetsByButton[p.button]),W=o.createPointerEvent(p);if(C){for(var tt=C;tt;)W.currentTarget=tt,o.notifyTarget(W,"pointerupoutside"),W.pointerType==="touch"||(W.pointerType==="mouse"||W.pointerType==="pen")&&o.notifyTarget(W,W.button===2?"rightupoutside":"mouseupoutside"),Ii.isNode(tt)&&(tt=tt.parentNode);delete T.pressTargetsByButton[p.button]}o.freeEvent(W)},this.onWheel=function(p){var T=o.createWheelEvent(p);o.dispatchEvent(T),o.freeEvent(T)},this.onClick=function(p){if(o.context.config.useNativeClickEvent){var T=o.createPointerEvent(p);o.dispatchEvent(T),o.freeEvent(T)}},this.onPointerCancel=function(p){var T=o.createPointerEvent(p,void 0,void 0,o.context.config.alwaysTriggerPointerEventOnCanvas?o.rootTarget:void 0);o.dispatchEvent(T),o.freeEvent(T)},this.globalRuntime=g,this.context=s}return(0,I.Z)(d,[{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 s=this.context.contextService.getBoundingClientRect(),o=1,p=1,T=this.context.contextService.getDomElement();if(T&&s){var C=T.offsetWidth,W=T.offsetHeight;C&&W&&(o=s.width/C,p=s.height/W)}return{scaleX:o,scaleY:p,bbox:s}}},{key:"client2Viewport",value:function(s){var o=this.getScale(),p=o.scaleX,T=o.scaleY,C=o.bbox;return new Q((s.x-((C==null?void 0:C.left)||0))/p,(s.y-((C==null?void 0:C.top)||0))/T)}},{key:"viewport2Client",value:function(s){var o=this.getScale(),p=o.scaleX,T=o.scaleY,C=o.bbox;return new Q((s.x+((C==null?void 0:C.left)||0))*p,(s.y+((C==null?void 0:C.top)||0))*T)}},{key:"viewport2Canvas",value:function(s){var o=s.x,p=s.y,T=this.rootTarget.defaultView,C=T.getCamera(),W=this.context.config,tt=W.width,mt=W.height,Gt=C.getPerspectiveInverse(),ie=C.getWorldTransform(),Se=F.multiply(this.tmpMatrix,ie,Gt),Ge=A.t8(this.tmpVec3,o/tt*2-1,(1-p/mt)*2-1,0);return A.fF(Ge,Ge,Se),new Q(Ge[0],Ge[1])}},{key:"canvas2Viewport",value:function(s){var o=this.rootTarget.defaultView,p=o.getCamera(),T=p.getPerspective(),C=p.getViewTransform(),W=F.multiply(this.tmpMatrix,T,C),tt=A.t8(this.tmpVec3,s.x,s.y,0);A.fF(this.tmpVec3,this.tmpVec3,W);var mt=this.context.config,Gt=mt.width,ie=mt.height;return new Q((tt[0]+1)/2*Gt,(1-(tt[1]+1)/2)*ie)}},{key:"setPickHandler",value:function(s){this.pickHandler=s}},{key:"addEventMapping",value:function(s,o){this.mappingTable[s]||(this.mappingTable[s]=[]),this.mappingTable[s].push({fn:o,priority:0}),this.mappingTable[s].sort(function(p,T){return p.priority-T.priority})}},{key:"mapEvent",value:function(s){if(this.rootTarget){var o=this.mappingTable[s.type];if(o)for(var p=0,T=o.length;p<T;p++)o[p].fn(s);else console.warn("[EventService]: Event mapping not defined for ".concat(s.type))}}},{key:"dispatchEvent",value:function(s,o,p){if(!p)s.propagationStopped=!1,s.propagationImmediatelyStopped=!1,this.propagate(s,o);else{s.eventPhase=s.AT_TARGET;var T=this.rootTarget.defaultView||null;s.currentTarget=T,this.notifyListeners(s,o)}}},{key:"propagate",value:function(s,o){if(s.target){var p=s.composedPath();s.eventPhase=s.CAPTURING_PHASE;for(var T=p.length-1;T>=1;T--)if(s.currentTarget=p[T],this.notifyTarget(s,o),s.propagationStopped||s.propagationImmediatelyStopped)return;if(s.eventPhase=s.AT_TARGET,s.currentTarget=s.target,this.notifyTarget(s,o),!(s.propagationStopped||s.propagationImmediatelyStopped)){var C=p.indexOf(s.currentTarget);s.eventPhase=s.BUBBLING_PHASE;for(var W=C+1;W<p.length;W++)if(s.currentTarget=p[W],this.notifyTarget(s,o),s.propagationStopped||s.propagationImmediatelyStopped)return}}}},{key:"propagationPath",value:function(s){var o=[s],p=this.rootTarget.defaultView||null;if(p&&p===s)return o.unshift(p.document),o;for(var T=0;T<qu&&s!==this.rootTarget;T++)Ii.isNode(s)&&s.parentNode&&(o.push(s.parentNode),s=s.parentNode);return p&&o.push(p),o}},{key:"hitTest",value:function(s){var o=s.viewportX,p=s.viewportY,T=this.context.config,C=T.width,W=T.height,tt=T.disableHitTesting;return o<0||p<0||o>C||p>W?null:!tt&&this.pickHandler(s)||this.rootTarget||null}},{key:"isNativeEventFromCanvas",value:function(s,o){var p,T=o==null?void 0:o.target;if((p=T)!==null&&p!==void 0&&p.shadowRoot&&(T=o.composedPath()[0]),T){if(T===s)return!0;if(s&&s.contains)return s.contains(T)}return o!=null&&o.composedPath?o.composedPath().indexOf(s)>-1:!1}},{key:"getExistedHTML",value:function(s){if(s.nativeEvent.composedPath)for(var o=0,p=s.nativeEvent.composedPath();o<p.length;o++){var T=p[o],C=this.nativeHTMLMap.get(T);if(C)return C}return null}},{key:"pickTarget",value:function(s){return this.hitTest({clientX:s.clientX,clientY:s.clientY,viewportX:s.viewportX,viewportY:s.viewportY,x:s.canvasX,y:s.canvasY})}},{key:"createPointerEvent",value:function(s,o,p,T){var C=this.allocateEvent(dl);this.copyPointerData(s,C),this.copyMouseData(s,C),this.copyData(s,C),C.nativeEvent=s.nativeEvent,C.originalEvent=s;var W=this.getExistedHTML(C),tt=this.context.contextService.getDomElement();return C.target=p!=null?p:W||this.isNativeEventFromCanvas(tt,C.nativeEvent)&&this.pickTarget(C)||T,typeof o=="string"&&(C.type=o),C}},{key:"createWheelEvent",value:function(s){var o=this.allocateEvent(fl);this.copyWheelData(s,o),this.copyMouseData(s,o),this.copyData(s,o),o.nativeEvent=s.nativeEvent,o.originalEvent=s;var p=this.getExistedHTML(o),T=this.context.contextService.getDomElement();return o.target=p||this.isNativeEventFromCanvas(T,o.nativeEvent)&&this.pickTarget(o),o}},{key:"trackingData",value:function(s){return this.mappingState.trackingData[s]||(this.mappingState.trackingData[s]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[s]}},{key:"cloneWheelEvent",value:function(s){var o=this.allocateEvent(fl);return o.nativeEvent=s.nativeEvent,o.originalEvent=s.originalEvent,this.copyWheelData(s,o),this.copyMouseData(s,o),this.copyData(s,o),o.target=s.target,o.path=s.composedPath().slice(),o.type=s.type,o}},{key:"clonePointerEvent",value:function(s,o){var p=this.allocateEvent(dl);return p.nativeEvent=s.nativeEvent,p.originalEvent=s.originalEvent,this.copyPointerData(s,p),this.copyMouseData(s,p),this.copyData(s,p),p.target=s.target,p.path=s.composedPath().slice(),p.type=o!=null?o:p.type,p}},{key:"copyPointerData",value:function(s,o){o.pointerId=s.pointerId,o.width=s.width,o.height=s.height,o.isPrimary=s.isPrimary,o.pointerType=s.pointerType,o.pressure=s.pressure,o.tangentialPressure=s.tangentialPressure,o.tiltX=s.tiltX,o.tiltY=s.tiltY,o.twist=s.twist}},{key:"copyMouseData",value:function(s,o){o.altKey=s.altKey,o.button=s.button,o.buttons=s.buttons,o.ctrlKey=s.ctrlKey,o.metaKey=s.metaKey,o.shiftKey=s.shiftKey,o.client.copyFrom(s.client),o.movement.copyFrom(s.movement),o.canvas.copyFrom(s.canvas),o.screen.copyFrom(s.screen),o.global.copyFrom(s.global),o.offset.copyFrom(s.offset)}},{key:"copyWheelData",value:function(s,o){o.deltaMode=s.deltaMode,o.deltaX=s.deltaX,o.deltaY=s.deltaY,o.deltaZ=s.deltaZ}},{key:"copyData",value:function(s,o){o.isTrusted=s.isTrusted,o.timeStamp=Wl.now(),o.type=s.type,o.detail=s.detail,o.view=s.view,o.page.copyFrom(s.page),o.viewport.copyFrom(s.viewport)}},{key:"allocateEvent",value:function(s){this.eventPool.has(s)||this.eventPool.set(s,[]);var o=this.eventPool.get(s).pop()||new s(this);return o.eventPhase=o.NONE,o.currentTarget=null,o.path=[],o.target=null,o}},{key:"freeEvent",value:function(s){if(s.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");var o=s.constructor;this.eventPool.has(o)||this.eventPool.set(o,[]),this.eventPool.get(o).push(s)}},{key:"notifyTarget",value:function(s,o){o=o!=null?o:s.type;var p=s.eventPhase===s.CAPTURING_PHASE||s.eventPhase===s.AT_TARGET?"".concat(o,"capture"):o;this.notifyListeners(s,p),s.eventPhase===s.AT_TARGET&&this.notifyListeners(s,o)}},{key:"notifyListeners",value:function(s,o){var p=s.currentTarget.emitter,T=p._events[o];if(T)if("fn"in T)T.once&&p.removeListener(o,T.fn,void 0,!0),T.fn.call(s.currentTarget||T.context,s);else for(var C=0;C<T.length&&!s.propagationImmediatelyStopped;C++)T[C].once&&p.removeListener(o,T[C].fn,void 0,!0),T[C].fn.call(s.currentTarget||T[C].context,s)}},{key:"findMountedTarget",value:function(s){if(!s)return null;for(var o=s[s.length-1],p=s.length-2;p>=0;p--){var T=s[p];if(T===this.rootTarget||Ii.isNode(T)&&T.parentNode===o)o=s[p];else break}return o}},{key:"getCursor",value:function(s){for(var o=s;o;){var p=rl(o)&&o.getAttribute("cursor");if(p)return p;o=Ii.isNode(o)&&o.parentNode}}}])}(),kc=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"getOrCreateCanvas",value:function(s,o){if(this.canvas)return this.canvas;if(s||Un.offscreenCanvas)this.canvas=s||Un.offscreenCanvas,this.context=this.canvas.getContext("2d",(0,c.Z)({willReadFrequently:!0},o));else try{this.canvas=new window.OffscreenCanvas(0,0),this.context=this.canvas.getContext("2d",(0,c.Z)({willReadFrequently:!0},o)),(!this.context||!this.context.measureText)&&(this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"))}catch(p){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d",(0,c.Z)({willReadFrequently:!0},o))}return this.canvas.width=10,this.canvas.height=10,this.canvas}},{key:"getOrCreateContext",value:function(s,o){return this.context?this.context:(this.getOrCreateCanvas(s,o),this.context)}}],[{key:"createCanvas",value:function(){try{return new window.OffscreenCanvas(0,0)}catch(s){}try{return document.createElement("canvas")}catch(s){}return null}}])}(),Yo=function(d){return d[d.CAMERA_CHANGED=0]="CAMERA_CHANGED",d[d.DISPLAY_OBJECT_CHANGED=1]="DISPLAY_OBJECT_CHANGED",d[d.NONE=2]="NONE",d}({}),th=function(){function d(g,s){(0,_.Z)(this,d),this.inited=!1,this.stats={total:0,rendered:0},this.zIndexCounter=0,this.hooks={init:new ma,initAsync:new Vl,dirtycheck:new Yl,cull:new Yl,beginFrame:new ma,beforeRender:new ma,render:new ma,afterRender:new ma,endFrame:new ma,destroy:new ma,pick:new Gu,pickSync:new Yl,pointerDown:new ma,pointerUp:new ma,pointerMove:new ma,pointerOut:new ma,pointerOver:new ma,pointerWheel:new ma,pointerCancel:new ma,click:new ma},this.globalRuntime=g,this.context=s}return(0,I.Z)(d,[{key:"init",value:function(s){var o=this,p=(0,c.Z)((0,c.Z)({},this.globalRuntime),this.context);this.context.renderingPlugins.forEach(function(T){T.apply(p,o.globalRuntime)}),this.hooks.init.call(),this.hooks.initAsync.getCallbacksNum()===0?(this.inited=!0,s()):this.hooks.initAsync.promise().then(function(){o.inited=!0,s()}).catch(function(T){})}},{key:"getStats",value:function(){return this.stats}},{key:"disableDirtyRectangleRendering",value:function(){var s=this.context.config.renderer,o=s.getConfig(),p=o.enableDirtyRectangleRendering;return!p||this.context.renderingContext.renderReasons.has(Yo.CAMERA_CHANGED)}},{key:"render",value:function(s,o,p){var T=this,C=s.getConfig(),W=this.context.renderingContext;if(this.stats.total=0,this.stats.rendered=0,this.zIndexCounter=0,this.globalRuntime.sceneGraphService.syncHierarchy(W.root),this.globalRuntime.sceneGraphService.notifyMutationObservers(s),W.renderReasons.size&&this.inited){W.dirtyRectangleRenderingDisabled=this.disableDirtyRectangleRendering();var tt=W.renderReasons.size===1&&W.renderReasons.has(Yo.CAMERA_CHANGED),mt=!C.disableRenderHooks||!tt;mt&&this.renderDisplayObject(W.root,C,W),this.hooks.beginFrame.call(o),mt&&W.renderListCurrentFrame.forEach(function(Gt){T.hooks.beforeRender.call(Gt),T.hooks.render.call(Gt),T.hooks.afterRender.call(Gt)}),this.hooks.endFrame.call(o),W.renderListCurrentFrame=[],W.renderReasons.clear(),p()}}},{key:"renderDisplayObject",value:function(s,o,p){var T=this,C=o.renderer.getConfig(),W=C.enableDirtyCheck,tt=C.enableCulling;function mt(an){var hn=an.renderable,yn=an.sortable,dn=W?hn.dirty||p.dirtyRectangleRenderingDisabled?an:null:an,Mn=null;dn&&(Mn=tt?T.hooks.cull.call(dn,T.context.camera):dn,Mn&&(T.stats.rendered+=1,p.renderListCurrentFrame.push(Mn))),an.dirty(!1),yn.renderOrder=T.zIndexCounter,T.zIndexCounter+=1,T.stats.total+=1,yn.dirty&&(T.sort(an,yn),yn.dirty=!1,yn.dirtyChildren=[],yn.dirtyReason=void 0)}for(var Gt=[s];Gt.length>0;){var ie,Se=Gt.pop();mt(Se);for(var Ge=((ie=Se.sortable)===null||ie===void 0||(ie=ie.sorted)===null||ie===void 0?void 0:ie.length)>0?Se.sortable.sorted:Se.childNodes,Ze=Ge.length-1;Ze>=0;Ze--)Gt.push(Ge[Ze])}}},{key:"sort",value:function(s,o){var p,T;(o==null||(p=o.sorted)===null||p===void 0?void 0:p.length)>0&&o.dirtyReason!==ca.Z_INDEX_CHANGED?o.dirtyChildren.forEach(function(C){var W=o.sorted.indexOf(C);W>-1&&o.sorted.splice(W,1);var tt=s.childNodes.indexOf(C);if(tt>-1)if(o.sorted.length===0)o.sorted.push(C);else{var mt=zl(o.sorted,C);o.sorted.splice(mt,0,C)}}):o.sorted=s.childNodes.slice().sort(To),((T=o.sorted)===null||T===void 0?void 0:T.length)>0&&s.childNodes.filter(function(C){return C.parsedStyle.zIndex}).length===0&&(o.sorted=[])}},{key:"destroy",value:function(){this.inited=!1,this.hooks.destroy.call()}},{key:"dirty",value:function(){this.context.renderingContext.renderReasons.add(Yo.DISPLAY_OBJECT_CHANGED)}}])}(),eh=/\[\s*(.*)=(.*)\s*\]/,nh=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"selectOne",value:function(s,o){var p=this;if(s.startsWith("."))return o.find(function(tt){return((tt==null?void 0:tt.classList)||[]).indexOf(p.getIdOrClassname(s))>-1});if(s.startsWith("#"))return o.find(function(tt){return tt.id===p.getIdOrClassname(s)});if(s.startsWith("[")){var T=this.getAttribute(s),C=T.name,W=T.value;return C?o.find(function(tt){return o!==tt&&(C==="name"?tt.name===W:p.attributeToString(tt,C)===W)}):null}return o.find(function(tt){return o!==tt&&tt.nodeName===s})}},{key:"selectAll",value:function(s,o){var p=this;if(s.startsWith("."))return o.findAll(function(tt){return o!==tt&&((tt==null?void 0:tt.classList)||[]).indexOf(p.getIdOrClassname(s))>-1});if(s.startsWith("#"))return o.findAll(function(tt){return o!==tt&&tt.id===p.getIdOrClassname(s)});if(s.startsWith("[")){var T=this.getAttribute(s),C=T.name,W=T.value;return C?o.findAll(function(tt){return o!==tt&&(C==="name"?tt.name===W:p.attributeToString(tt,C)===W)}):[]}return o.findAll(function(tt){return o!==tt&&tt.nodeName===s})}},{key:"is",value:function(s,o){if(s.startsWith("."))return o.className===this.getIdOrClassname(s);if(s.startsWith("#"))return o.id===this.getIdOrClassname(s);if(s.startsWith("[")){var p=this.getAttribute(s),T=p.name,C=p.value;return T==="name"?o.name===C:this.attributeToString(o,T)===C}return o.nodeName===s}},{key:"getIdOrClassname",value:function(s){return s.substring(1)}},{key:"getAttribute",value:function(s){var o=s.match(eh),p="",T="";return o&&o.length>2&&(p=o[1].replace(/"/g,""),T=o[2].replace(/"/g,"")),{name:p,value:T}}},{key:"attributeToString",value:function(s,o){if(!s.getAttribute)return"";var p=s.getAttribute(o);return(0,Rt.Z)(p)?"":p.toString?p.toString():""}}])}(),ea=function(d){return d.ATTR_MODIFIED="DOMAttrModified",d.INSERTED="DOMNodeInserted",d.MOUNTED="DOMNodeInsertedIntoDocument",d.REMOVED="removed",d.UNMOUNTED="DOMNodeRemovedFromDocument",d.REPARENT="reparent",d.DESTROY="destroy",d.BOUNDS_CHANGED="bounds-changed",d.CULLED="culled",d}({}),ps=function(d){function g(s,o,p,T,C,W,tt,mt){var Gt;return(0,_.Z)(this,g),Gt=(0,S.Z)(this,g,[null]),Gt.relatedNode=o,Gt.prevValue=p,Gt.newValue=T,Gt.attrName=C,Gt.attrChange=W,Gt.prevParsedValue=tt,Gt.newParsedValue=mt,Gt.type=s,Gt}return(0,R.Z)(g,d),(0,I.Z)(g)}(ul);ps.ADDITION=2,ps.MODIFICATION=1,ps.REMOVAL=3;var Rc=new ps(ea.REPARENT,null,"","","",0,"",""),Lc=kt.Ue(),vl=A.Ue(),rh=A.al(1,1,1),ih=F.create(),ah=kt.Ue(),lo=A.Ue(),sh=F.create(),Hs=G.Ue(),oh=A.Ue(),Dc=G.Ue(),lh=A.Ue(),Ho=A.Ue(),co=A.Ue(),Xo=F.create(),Kl=G.Ue(),gl=G.Ue(),pl=G.Ue(),ch=function(){function d(g){(0,_.Z)(this,d),this.displayObjectDependencyMap=new WeakMap,this.runtime=g}return(0,I.Z)(d,[{key:"matches",value:function(s,o){return this.runtime.sceneGraphSelector.is(s,o)}},{key:"querySelector",value:function(s,o){return this.runtime.sceneGraphSelector.selectOne(s,o)}},{key:"querySelectorAll",value:function(s,o){return this.runtime.sceneGraphSelector.selectAll(s,o)}},{key:"attach",value:function(s,o,p){var T,C=!1;s.parentNode&&(C=s.parentNode!==o,this.detach(s));var W=s.nodeName===qn.FRAGMENT,tt=so(o);s.parentNode=o;var mt=W?s.childNodes:[s];(0,ft.Z)(p)?mt.forEach(function(an){o.childNodes.splice(p,0,an),an.parentNode=o}):mt.forEach(function(an){o.childNodes.push(an),an.parentNode=o});var Gt=o,ie=Gt.sortable;if((ie!=null&&(T=ie.sorted)!==null&&T!==void 0&&T.length||ie.dirty||s.parsedStyle.zIndex)&&(ie.dirtyChildren.indexOf(s)===-1&&ie.dirtyChildren.push(s),ie.dirty=!0,ie.dirtyReason=ca.ADDED),!tt){if(W)this.dirtyFragment(s);else{var Se=s.transformable;Se&&this.dirtyWorldTransform(s,Se)}if(C){var Ge,Ze=((Ge=o.ownerDocument)===null||Ge===void 0||(Ge=Ge.defaultView)===null||Ge===void 0||(Ge=Ge.getConfig())===null||Ge===void 0||(Ge=Ge.future)===null||Ge===void 0?void 0:Ge.experimentalCancelEventPropagation)===!0;s.dispatchEvent(Rc,Ze,Ze)}}}},{key:"detach",value:function(s){var o,p;if(s.parentNode){var T=s.transformable,C=s.parentNode,W=C.sortable;(W!=null&&(o=W.sorted)!==null&&o!==void 0&&o.length||(p=s.style)!==null&&p!==void 0&&p.zIndex)&&(W.dirtyChildren.indexOf(s)===-1&&W.dirtyChildren.push(s),W.dirty=!0,W.dirtyReason=ca.REMOVED);var tt=s.parentNode.childNodes.indexOf(s);tt>-1&&s.parentNode.childNodes.splice(tt,1),T&&this.dirtyWorldTransform(s,T),s.parentNode=null}}},{key:"getLocalPosition",value:function(s){return s.transformable.localPosition}},{key:"getLocalRotation",value:function(s){return s.transformable.localRotation}},{key:"getLocalScale",value:function(s){return s.transformable.localScale}},{key:"getLocalSkew",value:function(s){return s.transformable.localSkew}},{key:"getLocalTransform",value:function(s){var o=s.transformable;return wi(o),o.localTransform}},{key:"setLocalPosition",value:function(s,o){var p,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,C=s.transformable;Ho[0]=o[0],Ho[1]=o[1],Ho[2]=(p=o[2])!==null&&p!==void 0?p:0,!A.fS(C.localPosition,Ho)&&(A.JG(C.localPosition,Ho),T&&this.dirtyLocalTransform(s,C))}},{key:"translateLocal",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,T));var C=s.transformable;A.fS(o,vl)||(A.VC(o,o,C.localRotation),A.IH(C.localPosition,C.localPosition,o),this.dirtyLocalTransform(s,C))}},{key:"setLocalRotation",value:function(s,o,p,T,C){var W=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!0;typeof o=="number"&&(o=G.t8(Hs,o,p,T,C));var tt=s.transformable;G.JG(tt.localRotation,o),W&&this.dirtyLocalTransform(s,tt)}},{key:"rotateLocal",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,T));var C=s.transformable;G.Su(gl,o[0],o[1],o[2]),G.dC(C.localRotation,C.localRotation,gl),this.dirtyLocalTransform(s,C)}},{key:"setLocalScale",value:function(s,o){var p,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,C=s.transformable;A.t8(lo,o[0],o[1],(p=o[2])!==null&&p!==void 0?p:C.localScale[2]),!A.fS(lo,C.localScale)&&(A.JG(C.localScale,lo),T&&this.dirtyLocalTransform(s,C))}},{key:"scaleLocal",value:function(s,o){var p,T=s.transformable;A.Jp(T.localScale,T.localScale,A.t8(lo,o[0],o[1],(p=o[2])!==null&&p!==void 0?p:1)),this.dirtyLocalTransform(s,T)}},{key:"setLocalSkew",value:function(s,o,p){var T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;typeof o=="number"&&(o=kt.t8(ah,o,p));var C=s.transformable;kt.JG(C.localSkew,o),T&&this.dirtyLocalTransform(s,C)}},{key:"setLocalEulerAngles",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,C=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0;typeof o=="number"&&(o=A.al(o,p,T));var W=s.transformable;G.Su(W.localRotation,o[0],o[1],o[2]),C&&this.dirtyLocalTransform(s,W)}},{key:"setLocalTransform",value:function(s,o){var p=F.getTranslation(oh,o),T=F.getRotation(Dc,o),C=F.getScaling(lh,o);this.setLocalScale(s,C,!1),this.setLocalPosition(s,p,!1),this.setLocalRotation(s,T,void 0,void 0,void 0,!1),this.dirtyLocalTransform(s,s.transformable)}},{key:"resetLocalTransform",value:function(s){this.setLocalScale(s,rh,!1),this.setLocalPosition(s,vl,!1),this.setLocalEulerAngles(s,vl,void 0,void 0,!1),this.setLocalSkew(s,Lc,void 0,!1),this.dirtyLocalTransform(s,s.transformable)}},{key:"getPosition",value:function(s){var o=s.transformable;return F.getTranslation(o.position,this.getWorldTransform(s,o))}},{key:"getRotation",value:function(s){var o=s.transformable;return F.getRotation(o.rotation,this.getWorldTransform(s,o))}},{key:"getScale",value:function(s){var o=s.transformable;return F.getScaling(o.scaling,this.getWorldTransform(s,o))}},{key:"getOrigin",value:function(s){return s.getGeometryBounds(),s.transformable.origin}},{key:"getWorldTransform",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:s.transformable;return!o.localDirtyFlag&&!o.dirtyFlag||(s.parentNode&&s.parentNode.transformable&&this.getWorldTransform(s.parentNode),this.internalUpdateTransform(s)),o.worldTransform}},{key:"setPosition",value:function(s,o){var p,T=s.transformable;if(co[0]=o[0],co[1]=o[1],co[2]=(p=o[2])!==null&&p!==void 0?p:0,!A.fS(this.getPosition(s),co)){if(A.JG(T.position,co),s.parentNode===null||!s.parentNode.transformable)A.JG(T.localPosition,co);else{var C=s.parentNode.transformable;F.copy(Xo,C.worldTransform),F.invert(Xo,Xo),A.fF(T.localPosition,co,Xo)}this.dirtyLocalTransform(s,T)}}},{key:"translate",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.t8(lo,o,p,T)),!A.fS(o,vl)&&(A.IH(lo,this.getPosition(s),o),this.setPosition(s,lo))}},{key:"setRotation",value:function(s,o,p,T,C){var W=s.transformable;if(typeof o=="number"&&(o=G.al(o,p,T,C)),s.parentNode===null||!s.parentNode.transformable)this.setLocalRotation(s,o);else{var tt=this.getRotation(s.parentNode);G.JG(Hs,tt),G.U_(Hs,Hs),G.Jp(W.localRotation,Hs,o),G.Fv(W.localRotation,W.localRotation),this.dirtyLocalTransform(s,W)}}},{key:"rotate",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,T));var C=s.transformable;if(s.parentNode===null||!s.parentNode.transformable)this.rotateLocal(s,o);else{var W=Hs;G.Su(W,o[0],o[1],o[2]);var tt=this.getRotation(s),mt=this.getRotation(s.parentNode);G.JG(pl,mt),G.U_(pl,pl),G.Jp(W,pl,W),G.Jp(C.localRotation,W,tt),G.Fv(C.localRotation,C.localRotation),this.dirtyLocalTransform(s,C)}}},{key:"setOrigin",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=[o,p,T]);var C=s.transformable;if(!(o[0]===C.origin[0]&&o[1]===C.origin[1]&&o[2]===C.origin[2])){var W=C.origin;W[0]=o[0],W[1]=o[1],W[2]=o[2]||0,this.dirtyLocalTransform(s,C)}}},{key:"setEulerAngles",value:function(s,o){var p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,T=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;typeof o=="number"&&(o=A.al(o,p,T));var C=s.transformable;if(s.parentNode===null||!s.parentNode.transformable)this.setLocalEulerAngles(s,o);else{G.Su(C.localRotation,o[0],o[1],o[2]);var W=this.getRotation(s.parentNode);G.JG(Kl,G.U_(Hs,W)),G.dC(C.localRotation,C.localRotation,Kl),this.dirtyLocalTransform(s,C)}}},{key:"getGeometryBounds",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=s,T=p.geometry;T.dirty&&Un.styleValueRegistry.updateGeometry(s);var C=o?T.renderBounds:T.contentBounds||null;return C||new it}},{key:"getTransformedGeometryBounds",value:function(s){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,p=arguments.length>2?arguments[2]:void 0,T=this.getGeometryBounds(s,o);if(!it.isEmpty(T)){var C=p||new it;return C.setFromTransformedAABB(T,this.getWorldTransform(s)),C}return null}},{key:"getBounds",value:function(s){var o=this,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=s,C=T.renderable;if(!C.boundsDirty&&!p&&C.bounds)return C.bounds;if(!C.renderBoundsDirty&&p&&C.renderBounds)return C.renderBounds;var W=p?C.renderBounds:C.bounds,tt=this.getTransformedGeometryBounds(s,p,W),mt=s.childNodes;if(mt.forEach(function(Se){var Ge=o.getBounds(Se,p);Ge&&(tt?tt.add(Ge):(tt=W||new it,tt.update(Ge.center,Ge.halfExtents)))}),tt||(tt=new it),p){var Gt=Ys(s);if(Gt){var ie=Gt.parsedStyle.clipPath.getBounds(p);tt?ie&&(tt=ie.intersection(tt)):tt.update(ie.center,ie.halfExtents)}}return p?(C.renderBounds=tt,C.renderBoundsDirty=!1):(C.bounds=tt,C.boundsDirty=!1),tt}},{key:"getLocalBounds",value:function(s){if(s.parentNode){var o=ih;s.parentNode.transformable&&(o=F.invert(sh,this.getWorldTransform(s.parentNode)));var p=this.getBounds(s);if(!it.isEmpty(p)){var T=new it;return T.setFromTransformedAABB(p,o),T}}return this.getBounds(s)}},{key:"getBoundingClientRect",value:function(s){var o,p,T=this.getGeometryBounds(s);it.isEmpty(T)||(p=new it,p.setFromTransformedAABB(T,this.getWorldTransform(s)));var C=(o=s.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0?void 0:o.getContextService().getBoundingClientRect();if(p){var W=p.getMin(),tt=(0,M.Z)(W,2),mt=tt[0],Gt=tt[1],ie=p.getMax(),Se=(0,M.Z)(ie,2),Ge=Se[0],Ze=Se[1];return new H(mt+((C==null?void 0:C.left)||0),Gt+((C==null?void 0:C.top)||0),Ge-mt,Ze-Gt)}return new H((C==null?void 0:C.left)||0,(C==null?void 0:C.top)||0,0,0)}},{key:"internalUpdateTransform",value:function(s){var o,p=(o=s.parentNode)===null||o===void 0?void 0:o.transformable;wi(s.transformable),fo(s.transformable,p)}},{key:"internalUpdateElement",value:function(s,o){var p,T,C,W,tt=((p=s.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0||(p=p.getConfig())===null||p===void 0||(p=p.future)===null||p===void 0?void 0:p.experimentalAttributeUpdateOptimization)===!0,mt=o[o.length-1],Gt=(mt==null?void 0:mt.transformDirty)||((T=s.transformable)===null||T===void 0?void 0:T.localDirtyFlag);if(s.transformable){var ie;(ie=s.transformable).dirtyFlag||(ie.dirtyFlag=Gt)}if(this.internalUpdateTransform(s),Gt){var Se;(Se=s.dirty)===null||Se===void 0||Se.call(s,!0,!0)}var Ge=((C=s.renderable)===null||C===void 0?void 0:C.boundsDirty)||((W=s.renderable)===null||W===void 0?void 0:W.renderBoundsDirty);if((Gt||Ge)&&(mt==null?void 0:mt.shapeUpdated)===!1&&tt)for(var Ze=o.length-1;Ze>=0;){var an,hn,yn=o[Ze];if(yn.shapeUpdated)break;(an=(hn=yn.node).dirty)===null||an===void 0||an.call(hn,!0,!0),yn.shapeUpdated=!0,Ze-=1}return Gt}},{key:"syncHierarchy",value:function(s){for(var o,p,T=[s],C=s.parentNode?[{node:s.parentNode,transformDirty:((o=s.parentNode.transformable)===null||o===void 0?void 0:o.localDirtyFlag)||((p=s.parentNode.transformable)===null||p===void 0?void 0:p.dirtyFlag),shapeUpdated:!1}]:[];T.length>0;){for(var W=T.pop(),tt=C[C.length-1];C.length>0&&W.parentNode!==tt.node;)tt=C.pop();var mt=this.internalUpdateElement(W,C);if(W.childNodes.length>0){for(var Gt=W.childNodes.length-1;Gt>=0;Gt--)T.push(W.childNodes[Gt]);C.push({node:W,transformDirty:mt,shapeUpdated:!1})}}}},{key:"dirtyLocalTransform",value:function(s,o){so(s)||o.localDirtyFlag||(o.localDirtyFlag=!0,o.dirtyFlag||this.dirtyWorldTransform(s,o))}},{key:"dirtyWorldTransform",value:function(s,o){this.dirtyWorldInternal(s,o),this.dirtyToRoot(s,!0)}},{key:"dirtyWorldInternal",value:function(s,o){var p,T=this,C=((p=s.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0||(p=p.getConfig())===null||p===void 0||(p=p.future)===null||p===void 0?void 0:p.experimentalAttributeUpdateOptimization)===!0;o.dirtyFlag||(o.dirtyFlag=!0,s.dirty(!0,!0),C||s.childNodes.forEach(function(W){var tt=W.transformable;T.dirtyWorldInternal(W,tt)}))}},{key:"dirtyToRoot",value:function(s){for(var o,p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=s,C=((o=s.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0||(o=o.getConfig())===null||o===void 0||(o=o.future)===null||o===void 0?void 0:o.experimentalAttributeUpdateOptimization)===!0;T;){var W,tt;if((W=(tt=T).dirty)===null||W===void 0||W.call(tt,!0,!0),C)break;T=T.parentNode}p&&s.forEach(function(ie){var Se;(Se=ie.dirty)===null||Se===void 0||Se.call(ie,!0,!0)}),this.informDependentDisplayObjects(s);var mt=s.mutations||[],Gt=mt.find(function(ie){return ie.type==="attributes"&&ie._boundsChangeData});Gt?Gt._boundsChangeData={affectChildren:Gt._boundsChangeData.affectChildren||p}:(Gt={type:"attributes",target:s,_boundsChangeData:{affectChildren:p}},mt.push(Gt)),s.mutations=mt}},{key:"dirtyFragment",value:function(s){var o,p,T=s.transformable;T&&(T.dirtyFlag=!0,T.localDirtyFlag=!0),(o=(p=s).dirty)===null||o===void 0||o.call(p,!0,!0);for(var C=s.childNodes.length,W=0;W<C;W++)this.dirtyFragment(s.childNodes[W])}},{key:"notifyMutationObservers",value:function(s){var o=new Set;if(s.getRoot().forEach(function(T){(T.mutations||[]).forEach(function(C){C.type==="attributes"&&C._boundsChangeData&&(C._boundsChangeData.affectChildren?T.forEach(function(W){var tt=(0,c.Z)({},C);tt.target=W,o.add(tt)}):o.add(C))}),T.mutations=void 0}),o.size>0){var p=new Aa(ea.BOUNDS_CHANGED,{detail:Array.from(o)});s.dispatchEvent(p,!0,!0)}}},{key:"updateDisplayObjectDependency",value:function(s,o,p,T){if(o&&o!==p){var C=this.displayObjectDependencyMap.get(o);if(C&&C[s]){var W=C[s].indexOf(T);C[s].splice(W,1)}}if(p){var tt=this.displayObjectDependencyMap.get(p);tt||(this.displayObjectDependencyMap.set(p,{}),tt=this.displayObjectDependencyMap.get(p)),tt[s]||(tt[s]=[]),tt[s].push(T)}}},{key:"informDependentDisplayObjects",value:function(s){var o,p=this,T=this.displayObjectDependencyMap.get(s);if(T){var C=(o=s.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0||(o=o.getConfig())===null||o===void 0||(o=o.future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation;Object.keys(T).forEach(function(W){T[W].forEach(function(tt){p.dirtyToRoot(tt,!0),tt.dispatchEvent(new ps(ea.ATTR_MODIFIED,tt,p,p,W,ps.MODIFICATION,p,p),C,C),tt.isCustomElement&&tt.isConnected&&tt.attributeChangedCallback&&tt.attributeChangedCallback(W,p,p)})})}}}])}(),Ic=function(){function d(g){if((0,_.Z)(this,d),g<=0)throw new Error("LRU capacity must be a positive number.");this.capacity=g,this.cache=new Map}return(0,I.Z)(d,[{key:"get",value:function(s){if(this.cache.has(s)){var o=this.cache.get(s);return this.cache.delete(s),this.cache.set(s,o),o}}},{key:"put",value:function(s,o){if(this.cache.has(s)&&this.cache.delete(s),this.cache.set(s,o),this.cache.size>this.capacity){var p=this.cache.keys().next().value;this.cache.delete(p)}}},{key:"len",value:function(){return this.cache.size}},{key:"clear",value:function(){this.cache.clear()}}])}(),uo={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]},Ql=/[a-zA-Z0-9\u00C0-\u00D6\u00D8-\u00f6\u00f8-\u00ff!"#$%&'()*+,-./:;]/,Bc=/[!%),.:;?\]}¢°·'""†‡›℃∶、。〃〆〕〗〞﹚﹜!"%'),.:;?!]}~]/,uh=/[$(£¥·'"〈《「『【〔〖〝﹙﹛$(.[{£¥]/,Fc=/[!),.:;?\]}¢·–—'"•"、。〆〞〕〉》」︰︱︲︳﹐﹑﹒﹔﹕﹖﹘﹚﹜!),.:;?︶︸︺︼︾﹀﹂﹗]|}、]/,hh=/[([{£¥'"‵〈《「『〔〝︴﹙﹛({︵︷︹︻︽︿﹁﹃﹏]/,_c=/[)\]}〕〉》」』】〙〗〟'"⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、:;,。.]/,Zc=/[([{〔〈《「『【〘〖〝'"⦅«—...‥〳〴〵]/,dh=/[!%),.:;?\]}¢°'"†‡℃〆〈《「『〕!%),.:;?]}]/,zc=/[$([{£¥'"々〇〉》」〔$([{⦆¥₩#]/,jc=new RegExp("".concat(Bc.source,"|").concat(Fc.source,"|").concat(_c.source,"|").concat(dh.source)),Wc=new RegExp("".concat(uh.source,"|").concat(hh.source,"|").concat(Zc.source,"|").concat(zc.source)),sd=function(){function d(g){var s=this;(0,_.Z)(this,d),this.fontMetricsCache={},this.shouldBreakByKinsokuShorui=function(o,p){return s.isBreakingSpace(p)?!1:!!(o&&(Wc.exec(p)||jc.exec(o)))},this.trimByKinsokuShorui=function(o){var p=(0,z.Z)(o),T=p[p.length-2];if(!T)return o;var C=T[T.length-1];return p[p.length-2]=T.slice(0,-1),p[p.length-1]=C+p[p.length-1],p},this.runtime=g,this.charWidthCache=new Ic(100)}return(0,I.Z)(d,[{key:"measureFont",value:function(s,o){if(this.fontMetricsCache[s])return this.fontMetricsCache[s];var p={ascent:0,descent:0,fontSize:0},T=this.runtime.offscreenCanvasCreator.getOrCreateCanvas(o),C=this.runtime.offscreenCanvasCreator.getOrCreateContext(o,{willReadFrequently:!0});C.font=s;var W=uo.MetricsString+uo.BaselineSymbol,tt=Math.ceil(C.measureText(W).width),mt=Math.ceil(C.measureText(uo.BaselineSymbol).width),Gt=uo.HeightMultiplier*mt;mt=mt*uo.BaselineMultiplier|0,T.width=tt,T.height=Gt,C.fillStyle="#f00",C.fillRect(0,0,tt,Gt),C.font=s,C.textBaseline="alphabetic",C.fillStyle="#000",C.fillText(W,0,mt);var ie=C.getImageData(0,0,tt||1,Gt||1).data,Se=ie.length,Ge=tt*4,Ze=0,an=0,hn=!1;for(Ze=0;Ze<mt;++Ze){for(var yn=0;yn<Ge;yn+=4)if(ie[an+yn]!==255){hn=!0;break}if(!hn)an+=Ge;else break}for(p.ascent=mt-Ze,an=Se-Ge,hn=!1,Ze=Gt;Ze>mt;--Ze){for(var dn=0;dn<Ge;dn+=4)if(ie[an+dn]!==255){hn=!0;break}if(!hn)an-=Ge;else break}return p.descent=Ze-mt,p.fontSize=p.ascent+p.descent,this.fontMetricsCache[s]=p,p}},{key:"measureText",value:function(s,o,p){var T=o.fontSize,C=T===void 0?16:T,W=o.wordWrap,tt=W===void 0?!1:W,mt=o.lineHeight,Gt=o.lineWidth,ie=Gt===void 0?1:Gt,Se=o.textBaseline,Ge=Se===void 0?"alphabetic":Se,Ze=o.textAlign,an=Ze===void 0?"start":Ze,hn=o.letterSpacing,yn=hn===void 0?0:hn,dn=o.textPath;o.textPathSide,o.textPathStartOffset;var Mn=o.leading,zn=Mn===void 0?0:Mn,er=oo(o),ar=this.measureFont(er,p);ar.fontSize===0&&(ar.fontSize=C,ar.ascent=C);var sr=this.runtime.offscreenCanvasCreator.getOrCreateContext(p);sr.font=er,o.isOverflowing=!1;var Mr=tt?this.wordWrap(s,o,p):s,xr=Mr.split(/(?:\r\n|\r|\n)/),fr=new Array(xr.length),Sr=0;if(dn){dn.getTotalLength();for(var yr=0;yr<xr.length;yr++)sr.measureText(xr[yr]).width+(xr[yr].length-1)*yn}else{for(var Ir=0;Ir<xr.length;Ir++){var hi=sr.measureText(xr[Ir]).width+(xr[Ir].length-1)*yn;fr[Ir]=hi,Sr=Math.max(Sr,hi)}var Ei=Sr+ie,oi=mt||ar.fontSize+ie,br=Math.max(oi,ar.fontSize+ie)+(xr.length-1)*(oi+zn);oi+=zn;var Gr=0;return Ge==="middle"?Gr=-br/2:Ge==="bottom"||Ge==="alphabetic"||Ge==="ideographic"?Gr=-br:(Ge==="top"||Ge==="hanging")&&(Gr=0),{font:er,width:Ei,height:br,lines:xr,lineWidths:fr,lineHeight:oi,maxLineWidth:Sr,fontProperties:ar,lineMetrics:fr.map(function(ti,Gi){var Ji=0;return an==="center"||an==="middle"?Ji-=ti/2:(an==="right"||an==="end")&&(Ji-=ti),new H(Ji-ie/2,Gr+Gi*oi,ti+ie,oi)})}}}},{key:"wordWrap",value:function(s,o,p){var T=this,C=Array.from(s);if(C.length===0)return"";var W=this,tt=o.wordWrapWidth,mt=tt===void 0?0:tt,Gt=o.letterSpacing,ie=Gt===void 0?0:Gt,Se=o.maxLines,Ge=Se===void 0?1/0:Se,Ze=o.textOverflow,an=this.runtime.offscreenCanvasCreator.getOrCreateContext(p),hn=mt+ie,yn="";Ze==="ellipsis"?yn="...":Ze&&Ze!=="clip"&&(yn=Ze);var dn=[""],Mn=0,zn=0,er=-1,ar=oo(o),sr=this.charWidthCache.get(ar);sr||(sr=new Ic(500),this.charWidthCache.put(ar,sr));var Mr=function(ti){return T.getFromCache(ti,ie,sr,an)},xr=Mr(yn);function fr(Gr,ti,Gi,Ji){for(;Mr(Gr)<Ji&&ti<C.length-1&&!W.isNewline(C[ti+1]);)ti+=1,Gr+=C[ti];for(;Mr(Gr)>Ji&&ti>=Gi;)ti-=1,Gr=Gr.slice(0,-1);return{lineTxt:Gr,txtLastCharIndex:ti}}function Sr(Gr,ti){if(!(xr<=0||xr>hn)){if(!dn[Gr]){dn[Gr]=yn;return}var Gi=fr(dn[Gr],ti,er+1,hn-xr);dn[Gr]=Gi.lineTxt+yn}}for(var yr=0;yr<C.length;yr++){var Ir=C[yr],hi=C[yr-1],Ei=C[yr+1],oi=Mr(Ir);if(this.isNewline(Ir)){if(Mn+1>=Ge){yr<C.length-1&&Sr(Mn,yr-1),o.isOverflowing=!0;break}er=yr-1,Mn+=1,zn=0,dn[Mn]="";continue}if(oi>hn){Sr(Mn,yr-1),o.isOverflowing=!0;break}if(zn>0&&zn+oi>hn){var br=fr(dn[Mn],yr-1,er+1,hn);if(br.txtLastCharIndex!==yr-1){if(dn[Mn]=br.lineTxt,br.txtLastCharIndex===C.length-1)break;yr=br.txtLastCharIndex+1,Ir=C[yr],hi=C[yr-1],Ei=C[yr+1],oi=Mr(Ir)}if(Mn+1>=Ge){Sr(Mn,yr-1),o.isOverflowing=!0;break}if(er=yr-1,Mn+=1,zn=0,dn[Mn]="",this.isBreakingSpace(Ir))continue;this.canBreakInLastChar(Ir)||(dn=this.trimToBreakable(dn),zn=this.sumTextWidthByCache(dn[Mn]||"",Mr)),this.shouldBreakByKinsokuShorui(Ir,Ei)&&(dn=this.trimByKinsokuShorui(dn),zn+=Mr(hi||""))}zn+=oi,dn[Mn]+=Ir}return dn.join(`
|
|
|
`)}},{key:"isBreakingSpace",value:function(s){return typeof s!="string"?!1:uo.BreakingSpaces.indexOf(s.charCodeAt(0))>=0}},{key:"isNewline",value:function(s){return typeof s!="string"?!1:uo.Newlines.indexOf(s.charCodeAt(0))>=0}},{key:"trimToBreakable",value:function(s){var o=(0,z.Z)(s),p=o[o.length-2],T=this.findBreakableIndex(p);if(T===-1||!p)return o;var C=p.slice(T,T+1),W=this.isBreakingSpace(C),tt=T+1,mt=T+(W?0:1);return o[o.length-1]+=p.slice(tt,p.length),o[o.length-2]=p.slice(0,mt),o}},{key:"canBreakInLastChar",value:function(s){return!(s&&Ql.test(s))}},{key:"sumTextWidthByCache",value:function(s,o){return s.split("").reduce(function(p,T){return p+o(T)},0)}},{key:"findBreakableIndex",value:function(s){for(var o=s.length-1;o>=0;o--)if(!Ql.test(s[o]))return o;return-1}},{key:"getFromCache",value:function(s,o,p,T){var C=p.get(s);if(typeof C!="number"){var W=s.length*o,tt=T.measureText(s);C=tt.width+W,p.put(s,C)}return C}},{key:"clearCache",value:function(){this.fontMetricsCache={},this.charWidthCache.clear()}}])}(),Un={},fh=function(d){var g=new Ju,s=new Qu;return d={},(0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)(d,qn.FRAGMENT,null),qn.CIRCLE,new Mc),qn.ELLIPSE,new Sc),qn.RECT,g),qn.IMAGE,g),qn.GROUP,new Tc),qn.LINE,new Ku),qn.TEXT,new Oc(Un)),qn.POLYLINE,s),qn.POLYGON,s),(0,Zn.Z)((0,Zn.Z)((0,Zn.Z)(d,qn.PATH,new Ac),qn.HTML,new $u),qn.MESH,null)}(),vh=function(d){var g=new Ga,s=new Vs;return d={},(0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)(d,Yn.PERCENTAGE,null),Yn.NUMBER,new ao),Yn.ANGLE,new Xa),Yn.DEFINED_PATH,new ga),Yn.PAINT,g),Yn.COLOR,g),Yn.FILTER,new Ra),Yn.LENGTH,s),Yn.LENGTH_PERCENTAGE,s),Yn.LENGTH_PERCENTAGE_12,new Zl),(0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)((0,Zn.Z)(d,Yn.LENGTH_PERCENTAGE_14,new So),Yn.COORDINATE,new Vs),Yn.OFFSET_DISTANCE,new Ao),Yn.OPACITY_VALUE,new Oo),Yn.PATH,new nl),Yn.LIST_OF_POINTS,new Ds),Yn.SHADOW_BLUR,new Ka),Yn.TEXT,new vs),Yn.TEXT_TRANSFORM,new Qr),Yn.TRANSFORM,new wc),(0,Zn.Z)((0,Zn.Z)((0,Zn.Z)(d,Yn.TRANSFORM_ORIGIN,new Xu),Yn.Z_INDEX,new Xl),Yn.MARKER,new Wo)}(),gh=function(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof y.g!="undefined"?y.g:{}};Un.CameraContribution=Hi,Un.AnimationTimeline=null,Un.EasingFunction=null,Un.offscreenCanvasCreator=new kc,Un.sceneGraphSelector=new nh,Un.sceneGraphService=new ch(Un),Un.textService=new sd(Un),Un.geometryUpdaterFactory=fh,Un.CSSPropertySyntaxFactory=vh,Un.styleValueRegistry=new va(Un),Un.layoutRegistry=null,Un.globalThis=gh(),Un.enableStyleSyntax=!0,Un.enableSizeAttenuation=!1;var Gc=0;function ph(){Gc=0}var Jl=new ps(ea.INSERTED,null,"","","",0,"",""),ms=new ps(ea.REMOVED,null,"","","",0,"",""),Uc=new Aa(ea.DESTROY),mh=function(d){function g(){var s;(0,_.Z)(this,g);for(var o=arguments.length,p=new Array(o),T=0;T<o;T++)p[T]=arguments[T];return s=(0,S.Z)(this,g,[].concat(p)),s.entity=Gc++,s.transformable={dirtyFlag:!1,localDirtyFlag:!1,localPosition:[0,0,0],localRotation:[0,0,0,1],localScale:[1,1,1],localTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],localSkew:[0,0],position:[0,0,0],rotation:[0,0,0,1],scaling:[1,1,1],worldTransform:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],origin:[0,0,0]},s.renderable={bounds:void 0,boundsDirty:!0,renderBounds:void 0,renderBoundsDirty:!0,dirtyRenderBounds:void 0,dirty:!1},s.geometry={contentBounds:void 0,renderBounds:void 0,dirty:!0},s.cullable={strategy:Zi.Standard,visibilityPlaneMask:-1,visible:!0,enable:!0},s.sortable={dirty:!1,sorted:void 0,renderOrder:0,dirtyChildren:[],dirtyReason:void 0},s.rBushNode={aabb:void 0},s.namespaceURI="g",s.scrollLeft=0,s.scrollTop=0,s.clientTop=0,s.clientLeft=0,s.style={},s.computedStyle={},s.parsedStyle={},s.attributes={},s}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"dirty",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,p=arguments.length>1?arguments[1]:void 0;this.renderable.dirty=o,p!==void 0&&(this.renderable.boundsDirty=p,this.renderable.renderBoundsDirty=p,this.geometry.dirty=p)}},{key:"className",get:function(){return this.getAttribute("class")||""},set:function(o){this.setAttribute("class",o)}},{key:"classList",get:function(){return this.className.split(" ").filter(function(o){return o!==""})}},{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 o=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[o+1]||null}return null}},{key:"previousSibling",get:function(){if(this.parentNode){var o=this.parentNode.childNodes.indexOf(this);return this.parentNode.childNodes[o-1]||null}return null}},{key:"cloneNode",value:function(o){throw new Error(et)}},{key:"appendChild",value:function(o,p){var T;if(o.destroyed)throw new Error(Xt);return Un.sceneGraphService.attach(o,this,p),(T=this.ownerDocument)!==null&&T!==void 0&&T.defaultView&&(!so(this)&&o.nodeName===qn.FRAGMENT?this.ownerDocument.defaultView.mountFragment(o):this.ownerDocument.defaultView.mountChildren(o)),this.isMutationObserved&&(Jl.relatedNode=this,o.dispatchEvent(Jl)),o}},{key:"insertBefore",value:function(o,p){if(!p)this.appendChild(o);else{o.parentElement&&o.parentElement.removeChild(o);var T=this.childNodes.indexOf(p);T===-1?this.appendChild(o):this.appendChild(o,T)}return o}},{key:"replaceChild",value:function(o,p){var T=this.childNodes.indexOf(p);return this.removeChild(p),this.appendChild(o,T),p}},{key:"removeChild",value:function(o){var p,T,C=((p=this.ownerDocument)===null||p===void 0||(p=p.defaultView)===null||p===void 0||(p=p.getConfig().future)===null||p===void 0?void 0:p.experimentalCancelEventPropagation)===!0;return ms.relatedNode=this,o.dispatchEvent(ms,C,C),(T=o.ownerDocument)!==null&&T!==void 0&&T.defaultView&&o.ownerDocument.defaultView.unmountChildren(o),Un.sceneGraphService.detach(o),o}},{key:"removeChildren",value:function(){for(var o=this.childNodes.length-1;o>=0;o--){var p=this.childNodes[o];this.removeChild(p)}}},{key:"destroyChildren",value:function(){for(var o=this.childNodes.length-1;o>=0;o--){var p=this.childNodes[o];p.childNodes.length>0&&p.destroyChildren(),p.destroy()}}},{key:"matches",value:function(o){return Un.sceneGraphService.matches(o,this)}},{key:"getElementById",value:function(o){return Un.sceneGraphService.querySelector("#".concat(o),this)}},{key:"getElementsByName",value:function(o){return Un.sceneGraphService.querySelectorAll('[name="'.concat(o,'"]'),this)}},{key:"getElementsByClassName",value:function(o){return Un.sceneGraphService.querySelectorAll(".".concat(o),this)}},{key:"getElementsByTagName",value:function(o){return Un.sceneGraphService.querySelectorAll(o,this)}},{key:"querySelector",value:function(o){return Un.sceneGraphService.querySelector(o,this)}},{key:"querySelectorAll",value:function(o){return Un.sceneGraphService.querySelectorAll(o,this)}},{key:"closest",value:function(o){var p=this;do{if(Un.sceneGraphService.matches(o,p))return p;p=p.parentElement}while(p!==null);return null}},{key:"find",value:function(o){var p=this,T=null;return this.forEach(function(C){return C!==p&&o(C)?(T=C,!1):!0}),T}},{key:"findAll",value:function(o){var p=this,T=[];return this.forEach(function(C){C!==p&&o(C)&&T.push(C)}),T}},{key:"after",value:function(){var o=this;if(this.parentNode){for(var p=this.parentNode.childNodes.indexOf(this),T=arguments.length,C=new Array(T),W=0;W<T;W++)C[W]=arguments[W];C.forEach(function(tt,mt){var Gt;return(Gt=o.parentNode)===null||Gt===void 0?void 0:Gt.appendChild(tt,p+mt+1)})}}},{key:"before",value:function(){if(this.parentNode){for(var o,p=this.parentNode.childNodes.indexOf(this),T=arguments.length,C=new Array(T),W=0;W<T;W++)C[W]=arguments[W];var tt=C[0],mt=(0,ui.Z)(C).slice(1);this.parentNode.appendChild(tt,p),(o=tt).after.apply(o,(0,z.Z)(mt))}}},{key:"replaceWith",value:function(){this.after.apply(this,arguments),this.remove()}},{key:"append",value:function(){for(var o=this,p=arguments.length,T=new Array(p),C=0;C<p;C++)T[C]=arguments[C];T.forEach(function(W){return o.appendChild(W)})}},{key:"prepend",value:function(){for(var o=this,p=arguments.length,T=new Array(p),C=0;C<p;C++)T[C]=arguments[C];T.forEach(function(W,tt){return o.appendChild(W,tt)})}},{key:"replaceChildren",value:function(){for(;this.childNodes.length&&this.firstChild;)this.removeChild(this.firstChild);this.append.apply(this,arguments)}},{key:"remove",value:function(){return this.parentNode?this.parentNode.removeChild(this):this}},{key:"destroy",value:function(){var o,p=((o=this.ownerDocument)===null||o===void 0||(o=o.defaultView)===null||o===void 0||(o=o.getConfig().future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation)===!0;this.destroyChildren(),this.dispatchEvent(Uc,p,p),this.remove(),this.emitter.removeAllListeners(),this.destroyed=!0}},{key:"getGeometryBounds",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Un.sceneGraphService.getGeometryBounds(this,o)}},{key:"getTransformedGeometryBounds",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return Un.sceneGraphService.getTransformedGeometryBounds(this,o)}},{key:"getBounds",value:function(){return Un.sceneGraphService.getBounds(this)}},{key:"getRenderBounds",value:function(){return Un.sceneGraphService.getBounds(this,!0)}},{key:"getLocalBounds",value:function(){return Un.sceneGraphService.getLocalBounds(this)}},{key:"getBoundingClientRect",value:function(){return Un.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(o){if(typeof o!="symbol"){var p=this.attributes[o];return p}}},{key:"hasAttribute",value:function(o){return this.getAttributeNames().includes(o)}},{key:"hasAttributes",value:function(){return!!this.getAttributeNames().length}},{key:"removeAttribute",value:function(o){this.setAttribute(o,null),delete this.attributes[o]}},{key:"setAttribute",value:function(o,p){this.attributes[o]=p}},{key:"getAttributeNS",value:function(o,p){throw new Error(et)}},{key:"getAttributeNode",value:function(o){throw new Error(et)}},{key:"getAttributeNodeNS",value:function(o,p){throw new Error(et)}},{key:"hasAttributeNS",value:function(o,p){throw new Error(et)}},{key:"removeAttributeNS",value:function(o,p){throw new Error(et)}},{key:"removeAttributeNode",value:function(o){throw new Error(et)}},{key:"setAttributeNS",value:function(o,p,T){throw new Error(et)}},{key:"setAttributeNode",value:function(o){throw new Error(et)}},{key:"setAttributeNodeNS",value:function(o){throw new Error(et)}},{key:"toggleAttribute",value:function(o,p){throw new Error(et)}}])}(Ii);function Ni(d){return!!(d!=null&&d.nodeName)}var yh=Un.globalThis.Proxy?Un.globalThis.Proxy:function(){},is=new ps(ea.ATTR_MODIFIED,null,null,null,null,ps.MODIFICATION,null,null),ko=A.Ue(),bh=G.Ue(),Pi=function(d){function g(s){var o;return(0,_.Z)(this,g),o=(0,S.Z)(this,g),o.isCustomElement=!1,o.isMutationObserved=!1,o.activeAnimations=[],o.config=s,o.id=s.id||"",o.name=s.name||"",(s.className||s.class)&&(o.className=s.className||s.class),o.nodeName=s.type||qn.GROUP,s.initialParsedStyle&&Object.assign(o.parsedStyle,s.initialParsedStyle),o.initAttributes(s.style),Un.enableStyleSyntax&&(o.style=new yh({setProperty:function(T,C){o.setAttribute(T,C)},getPropertyValue:function(T){return o.getAttribute(T)},removeProperty:function(T){o.removeAttribute(T)},item:function(){return""}},{get:function(T,C){return T[C]!==void 0?T[C]:o.getAttribute(C)},set:function(T,C,W){return o.setAttribute(C,W),!0}})),o}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"destroy",value:function(){yi(g,"destroy",this,3)([]),this.getAnimations().forEach(function(o){o.cancel()})}},{key:"cloneNode",value:function(o,p){var T=(0,c.Z)({},this.attributes);for(var C in T){var W=T[C];Ni(W)&&C!=="clipPath"&&C!=="offsetPath"&&C!=="textPath"&&(T[C]=W.cloneNode(o)),p&&(T[C]=p(C,W))}var tt=new this.constructor((0,c.Z)((0,c.Z)({},this.config),{},{style:T}));return tt.setLocalTransform(this.getLocalTransform()),o&&this.children.forEach(function(mt){if(!mt.style.isMarker){var Gt=mt.cloneNode(o);tt.appendChild(Gt)}}),tt}},{key:"initAttributes",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p={forceUpdateGeometry:!0};Un.styleValueRegistry.processProperties(this,o,p),this.dirty()}},{key:"setAttribute",value:function(o,p){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,C=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;(0,vn.Z)(p)||(T||p!==this.attributes[o])&&(this.internalSetAttribute(o,p,{memoize:C}),yi(g,"setAttribute",this,3)([o,p]))}},{key:"internalSetAttribute",value:function(o,p){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},C=this.attributes[o],W=this.parsedStyle[o];Un.styleValueRegistry.processProperties(this,(0,Zn.Z)({},o,p),T),this.dirty();var tt=this.parsedStyle[o];if(this.isConnected)if(is.relatedNode=this,is.prevValue=C,is.newValue=p,is.attrName=o,is.prevParsedValue=W,is.newParsedValue=tt,this.isMutationObserved)this.dispatchEvent(is);else{var mt,Gt=((mt=this.ownerDocument.defaultView.getConfig().future)===null||mt===void 0?void 0:mt.experimentalCancelEventPropagation)===!0;is.target=this,this.ownerDocument.defaultView.dispatchEvent(is,!0,Gt)}if(this.isCustomElement&&this.isConnected||!this.isCustomElement){var ie,Se;(ie=(Se=this).attributeChangedCallback)===null||ie===void 0||ie.call(Se,o,C,p,W,tt)}}},{key:"getBBox",value:function(){var o=this.getBounds(),p=o.getMin(),T=(0,M.Z)(p,2),C=T[0],W=T[1],tt=o.getMax(),mt=(0,M.Z)(tt,2),Gt=mt[0],ie=mt[1];return new H(C,W,Gt-C,ie-W)}},{key:"setOrigin",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Un.sceneGraphService.setOrigin(this,gt(o,p,T,!1)),this}},{key:"getOrigin",value:function(){return Un.sceneGraphService.getOrigin(this)}},{key:"setPosition",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Un.sceneGraphService.setPosition(this,gt(o,p,T,!1)),this}},{key:"setLocalPosition",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Un.sceneGraphService.setLocalPosition(this,gt(o,p,T,!1)),this}},{key:"translate",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Un.sceneGraphService.translate(this,gt(o,p,T,!1)),this}},{key:"translateLocal",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return Un.sceneGraphService.translateLocal(this,gt(o,p,T,!1)),this}},{key:"getPosition",value:function(){return Un.sceneGraphService.getPosition(this)}},{key:"getLocalPosition",value:function(){return Un.sceneGraphService.getLocalPosition(this)}},{key:"scale",value:function(o,p,T){return this.scaleLocal(o,p,T)}},{key:"scaleLocal",value:function(o,p,T){return typeof o=="number"&&(p=p||o,T=T||o,o=gt(o,p,T,!1)),Un.sceneGraphService.scaleLocal(this,o),this}},{key:"setLocalScale",value:function(o,p,T){return typeof o=="number"&&(p=p||o,T=T||o,o=gt(o,p,T,!1)),Un.sceneGraphService.setLocalScale(this,o),this}},{key:"getLocalScale",value:function(){return Un.sceneGraphService.getLocalScale(this)}},{key:"getScale",value:function(){return Un.sceneGraphService.getScale(this)}},{key:"getEulerAngles",value:function(){var o=Nn(ko,Un.sceneGraphService.getWorldTransform(this)),p=(0,M.Z)(o,3),T=p[2];return Yt(T)}},{key:"getLocalEulerAngles",value:function(){var o=Nn(ko,Un.sceneGraphService.getLocalRotation(this)),p=(0,M.Z)(o,3),T=p[2];return Yt(T)}},{key:"setEulerAngles",value:function(o){return Un.sceneGraphService.setEulerAngles(this,0,0,o),this}},{key:"setLocalEulerAngles",value:function(o){return Un.sceneGraphService.setLocalEulerAngles(this,0,0,o),this}},{key:"rotateLocal",value:function(o,p,T){return(0,Rt.Z)(p)&&(0,Rt.Z)(T)?Un.sceneGraphService.rotateLocal(this,0,0,o):Un.sceneGraphService.rotateLocal(this,o,p,T),this}},{key:"rotate",value:function(o,p,T){return(0,Rt.Z)(p)&&(0,Rt.Z)(T)?Un.sceneGraphService.rotate(this,0,0,o):Un.sceneGraphService.rotate(this,o,p,T),this}},{key:"setRotation",value:function(o,p,T,C){return Un.sceneGraphService.setRotation(this,o,p,T,C),this}},{key:"setLocalRotation",value:function(o,p,T,C){return Un.sceneGraphService.setLocalRotation(this,o,p,T,C),this}},{key:"setLocalSkew",value:function(o,p){return Un.sceneGraphService.setLocalSkew(this,o,p),this}},{key:"getRotation",value:function(){return Un.sceneGraphService.getRotation(this)}},{key:"getLocalRotation",value:function(){return Un.sceneGraphService.getLocalRotation(this)}},{key:"getLocalSkew",value:function(){return Un.sceneGraphService.getLocalSkew(this)}},{key:"getLocalTransform",value:function(){return Un.sceneGraphService.getLocalTransform(this)}},{key:"getWorldTransform",value:function(){return Un.sceneGraphService.getWorldTransform(this)}},{key:"setLocalTransform",value:function(o){return Un.sceneGraphService.setLocalTransform(this,o),this}},{key:"resetLocalTransform",value:function(){Un.sceneGraphService.resetLocalTransform(this)}},{key:"getAnimations",value:function(){return this.activeAnimations}},{key:"animate",value:function(o,p){var T,C=(T=this.ownerDocument)===null||T===void 0?void 0:T.timeline;return C?C.play(this,o,p):null}},{key:"isVisible",value:function(){var o;return((o=this.parsedStyle)===null||o===void 0?void 0:o.visibility)!=="hidden"}},{key:"interactive",get:function(){return this.isInteractive()},set:function(o){this.style.pointerEvents=o?"auto":"none"}},{key:"isInteractive",value:function(){var o;return((o=this.parsedStyle)===null||o===void 0?void 0:o.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,z.Z)(this.parentNode.children.map(function(o){return Number(o.style.zIndex)})))+1),this}},{key:"toBack",value:function(){return this.parentNode&&(this.style.zIndex=Math.min.apply(Math,(0,z.Z)(this.parentNode.children.map(function(o){return Number(o.style.zIndex)})))-1),this}},{key:"getConfig",value:function(){return this.config}},{key:"attr",value:function(){for(var o=this,p=arguments.length,T=new Array(p),C=0;C<p;C++)T[C]=arguments[C];var W=T[0],tt=T[1];return W?(0,me.Z)(W)?(Object.keys(W).forEach(function(mt){o.setAttribute(mt,W[mt])}),this):T.length===2?(this.setAttribute(W,tt),this):this.attributes[W]:this.attributes}},{key:"getMatrix",value:function(o){var p=o||this.getWorldTransform(),T=F.getTranslation(ko,p),C=(0,M.Z)(T,2),W=C[0],tt=C[1],mt=F.getScaling(ko,p),Gt=(0,M.Z)(mt,2),ie=Gt[0],Se=Gt[1],Ge=F.getRotation(bh,p),Ze=Nn(ko,Ge),an=(0,M.Z)(Ze,3),hn=an[0],yn=an[2];return Cn(hn||yn,W,tt,ie,Se)}},{key:"getLocalMatrix",value:function(){return this.getMatrix(this.getLocalTransform())}},{key:"setMatrix",value:function(o){var p=jn(o),T=(0,M.Z)(p,5),C=T[0],W=T[1],tt=T[2],mt=T[3],Gt=T[4];this.setEulerAngles(Gt).setPosition(C,W).setLocalScale(tt,mt)}},{key:"setLocalMatrix",value:function(o){var p=jn(o),T=(0,M.Z)(p,5),C=T[0],W=T[1],tt=T[2],mt=T[3],Gt=T[4];this.setLocalEulerAngles(Gt).setLocalPosition(C,W).setLocalScale(tt,mt)}},{key:"show",value:function(){this.forEach(function(o){o.style.visibility="visible"})}},{key:"hide",value:function(){this.forEach(function(o){o.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(o){return this.children[o]||null}},{key:"add",value:function(o,p){return this.appendChild(o,p)}},{key:"set",value:function(o,p){this.config[o]=p}},{key:"get",value:function(o){return this.config[o]}},{key:"moveTo",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(o,p,T),this}},{key:"move",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return this.setPosition(o,p,T),this}},{key:"setZIndex",value:function(o){return this.style.zIndex=o,this}}])}(mh);Pi.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 $l=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.CIRCLE},s)])}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);$l.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["cx","cy","cz","r","isBillboard","isSizeAttenuation"]));var Eh=["style"],ql=function(d){function g(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,T=(0,Zr.Z)(o,Eh);return(0,_.Z)(this,g),s=(0,S.Z)(this,g,[(0,c.Z)({style:p},T)]),s.isCustomElement=!0,s}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);ql.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var ml=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.ELLIPSE},s)])}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);ml.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["cx","cy","cz","rx","ry","isBillboard","isSizeAttenuation"]));var xh=function(d){function g(){return(0,_.Z)(this,g),(0,S.Z)(this,g,[{type:qn.FRAGMENT}])}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);xh.PARSED_STYLE_LIST=new Set(["class","className"]);var Ko=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.GROUP},s)])}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);Ko.PARSED_STYLE_LIST=new Set(["class","className","clipPath","cursor","draggable","droppable","opacity","pointerEvents","transform","transformOrigin","zIndex","visibility"]);var wh=["style"],tc=function(d){function g(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,T=(0,Zr.Z)(o,wh);return(0,_.Z)(this,g),s=(0,S.Z)(this,g,[(0,c.Z)({type:qn.HTML,style:p},T)]),s.cullable.enable=!1,s}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"getDomElement",value:function(){return this.parsedStyle.$el}},{key:"getClientRects",value:function(){return[this.getBoundingClientRect()]}},{key:"getLocalBounds",value:function(){if(this.parentNode){var o=F.invert(F.create(),this.parentNode.getWorldTransform()),p=this.getBounds();if(!it.isEmpty(p)){var T=new it;return T.setFromTransformedAABB(p,o),T}}return this.getBounds()}}])}(Pi);tc.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["x","y","$el","innerHTML","width","height"]));var ec=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.IMAGE},s)])}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);ec.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["x","y","z","src","width","height","isBillboard","billboardRotation","isSizeAttenuation","keepAspectRatio"]));var Vc=["style"],nc=function(d){function g(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,T=(0,Zr.Z)(o,Vc);(0,_.Z)(this,g),s=(0,S.Z)(this,g,[(0,c.Z)({type:qn.LINE,style:(0,c.Z)({x1:0,y1:0,x2:0,y2:0,z1:0,z2:0},p)},T)]),s.markerStartAngle=0,s.markerEndAngle=0;var C=s.parsedStyle,W=C.markerStart,tt=C.markerEnd;return W&&Ni(W)&&(s.markerStartAngle=W.getLocalEulerAngles(),s.appendChild(W)),tt&&Ni(tt)&&(s.markerEndAngle=tt.getLocalEulerAngles(),s.appendChild(tt)),s.transformMarker(!0),s.transformMarker(!1),s}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"attributeChangedCallback",value:function(o,p,T,C,W){o==="x1"||o==="y1"||o==="x2"||o==="y2"||o==="markerStartOffset"||o==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):o==="markerStart"?(C&&Ni(C)&&(this.markerStartAngle=0,C.remove()),W&&Ni(W)&&(this.markerStartAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!0))):o==="markerEnd"&&(C&&Ni(C)&&(this.markerEndAngle=0,C.remove()),W&&Ni(W)&&(this.markerEndAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!1)))}},{key:"transformMarker",value:function(o){var p=this.parsedStyle,T=p.markerStart,C=p.markerEnd,W=p.markerStartOffset,tt=p.markerEndOffset,mt=p.x1,Gt=p.x2,ie=p.y1,Se=p.y2,Ge=o?T:C;if(!(!Ge||!Ni(Ge))){var Ze=0,an,hn,yn,dn,Mn,zn;o?(yn=mt,dn=ie,an=Gt-mt,hn=Se-ie,Mn=W||0,zn=this.markerStartAngle):(yn=Gt,dn=Se,an=mt-Gt,hn=ie-Se,Mn=tt||0,zn=this.markerEndAngle),Ze=Math.atan2(hn,an),Ge.setLocalEulerAngles(Ze*180/Math.PI+zn),Ge.setLocalPosition(yn+Math.cos(Ze)*Mn,dn+Math.sin(Ze)*Mn)}}},{key:"getPoint",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=this.parsedStyle,C=T.x1,W=T.y1,tt=T.x2,mt=T.y2,Gt=(0,Ur.U4)(C,W,tt,mt,o),ie=Gt.x,Se=Gt.y,Ge=A.fF(A.Ue(),A.al(ie,Se,0),p?this.getWorldTransform():this.getLocalTransform());return new Q(Ge[0],Ge[1])}},{key:"getPointAtLength",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(o/this.getTotalLength(),p)}},{key:"getTotalLength",value:function(){var o=this.parsedStyle,p=o.x1,T=o.y1,C=o.x2,W=o.y2;return(0,Ur.Xk)(p,T,C,W)}}])}(Pi);nc.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["x1","y1","x2","y2","z1","z2","isBillboard","isSizeAttenuation","markerStart","markerEnd","markerStartOffset","markerEndOffset"]));var Mh=["style"],yl=function(d){function g(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,T=(0,Zr.Z)(o,Mh);(0,_.Z)(this,g),s=(0,S.Z)(this,g,[(0,c.Z)({type:qn.PATH,style:p,initialParsedStyle:{miterLimit:4,d:(0,c.Z)({},ss)}},T)]),s.markerStartAngle=0,s.markerEndAngle=0,s.markerMidList=[];var C=s.parsedStyle,W=C.markerStart,tt=C.markerEnd,mt=C.markerMid;return W&&Ni(W)&&(s.markerStartAngle=W.getLocalEulerAngles(),s.appendChild(W)),mt&&Ni(mt)&&s.placeMarkerMid(mt),tt&&Ni(tt)&&(s.markerEndAngle=tt.getLocalEulerAngles(),s.appendChild(tt)),s.transformMarker(!0),s.transformMarker(!1),s}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"attributeChangedCallback",value:function(o,p,T,C,W){o==="d"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):o==="markerStartOffset"||o==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):o==="markerStart"?(C&&Ni(C)&&(this.markerStartAngle=0,C.remove()),W&&Ni(W)&&(this.markerStartAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!0))):o==="markerEnd"?(C&&Ni(C)&&(this.markerEndAngle=0,C.remove()),W&&Ni(W)&&(this.markerEndAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!1))):o==="markerMid"&&this.placeMarkerMid(W)}},{key:"transformMarker",value:function(o){var p=this.parsedStyle,T=p.markerStart,C=p.markerEnd,W=p.markerStartOffset,tt=p.markerEndOffset,mt=o?T:C;if(!(!mt||!Ni(mt))){var Gt=0,ie,Se,Ge,Ze,an,hn;if(o){var yn=this.getStartTangent(),dn=(0,M.Z)(yn,2),Mn=dn[0],zn=dn[1];Ge=zn[0],Ze=zn[1],ie=Mn[0]-zn[0],Se=Mn[1]-zn[1],an=W||0,hn=this.markerStartAngle}else{var er=this.getEndTangent(),ar=(0,M.Z)(er,2),sr=ar[0],Mr=ar[1];Ge=Mr[0],Ze=Mr[1],ie=sr[0]-Mr[0],Se=sr[1]-Mr[1],an=tt||0,hn=this.markerEndAngle}Gt=Math.atan2(Se,ie),mt.setLocalEulerAngles(Gt*180/Math.PI+hn),mt.setLocalPosition(Ge+Math.cos(Gt)*an,Ze+Math.sin(Gt)*an)}}},{key:"placeMarkerMid",value:function(o){var p=this.parsedStyle.d.segments;if(this.markerMidList.forEach(function(Gt){Gt.remove()}),o&&Ni(o))for(var T=1;T<p.length-1;T++){var C=(0,M.Z)(p[T].currentPoint,2),W=C[0],tt=C[1],mt=T===1?o:o.cloneNode(!0);this.markerMidList.push(mt),this.appendChild(mt),mt.setLocalPosition(W,tt)}}},{key:"getTotalLength",value:function(){return Wn(this)}},{key:"getPointAtLength",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=this.parsedStyle.d.absolutePath,C=pr(T,o),W=C.x,tt=C.y,mt=A.fF(A.Ue(),A.al(W,tt,0),p?this.getWorldTransform():this.getLocalTransform());return new Q(mt[0],mt[1])}},{key:"getPoint",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPointAtLength(o*Wn(this),p)}},{key:"getStartTangent",value:function(){var o=this.parsedStyle.d.segments,p=[];if(o.length>1){var T=o[0].currentPoint,C=o[1].currentPoint,W=o[1].startTangent;p=[],W?(p.push([T[0]-W[0],T[1]-W[1]]),p.push([T[0],T[1]])):(p.push([C[0],C[1]]),p.push([T[0],T[1]]))}return p}},{key:"getEndTangent",value:function(){var o=this.parsedStyle.d.segments,p=o.length,T=[];if(p>1){var C=o[p-2].currentPoint,W=o[p-1].currentPoint,tt=o[p-1].endTangent;T=[],tt?(T.push([W[0]-tt[0],W[1]-tt[1]]),T.push([W[0],W[1]])):(T.push([C[0],C[1]]),T.push([W[0],W[1]]))}return T}}])}(Pi);yl.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["d","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard","isSizeAttenuation"]));var Sh=["style"],Qo=function(d){function g(){var s,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},p=o.style,T=(0,Zr.Z)(o,Sh);(0,_.Z)(this,g),s=(0,S.Z)(this,g,[(0,c.Z)({type:qn.POLYGON,style:p,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!0}},T)]),s.markerStartAngle=0,s.markerEndAngle=0,s.markerMidList=[];var C=s.parsedStyle,W=C.markerStart,tt=C.markerEnd,mt=C.markerMid;return W&&Ni(W)&&(s.markerStartAngle=W.getLocalEulerAngles(),s.appendChild(W)),mt&&Ni(mt)&&s.placeMarkerMid(mt),tt&&Ni(tt)&&(s.markerEndAngle=tt.getLocalEulerAngles(),s.appendChild(tt)),s.transformMarker(!0),s.transformMarker(!1),s}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"attributeChangedCallback",value:function(o,p,T,C,W){o==="points"?(this.transformMarker(!0),this.transformMarker(!1),this.placeMarkerMid(this.parsedStyle.markerMid)):o==="markerStartOffset"||o==="markerEndOffset"?(this.transformMarker(!0),this.transformMarker(!1)):o==="markerStart"?(C&&Ni(C)&&(this.markerStartAngle=0,C.remove()),W&&Ni(W)&&(this.markerStartAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!0))):o==="markerEnd"?(C&&Ni(C)&&(this.markerEndAngle=0,C.remove()),W&&Ni(W)&&(this.markerEndAngle=W.getLocalEulerAngles(),this.appendChild(W),this.transformMarker(!1))):o==="markerMid"&&this.placeMarkerMid(W)}},{key:"transformMarker",value:function(o){var p=this.parsedStyle,T=p.markerStart,C=p.markerEnd,W=p.markerStartOffset,tt=p.markerEndOffset,mt=p.points,Gt=mt||{},ie=Gt.points,Se=o?T:C;if(!(!Se||!Ni(Se)||!ie)){var Ge=0,Ze,an,hn,yn,dn,Mn;if(hn=ie[0][0],yn=ie[0][1],o)Ze=ie[1][0]-ie[0][0],an=ie[1][1]-ie[0][1],dn=W||0,Mn=this.markerStartAngle;else{var zn=ie.length;this.parsedStyle.isClosed?(Ze=ie[zn-1][0]-ie[0][0],an=ie[zn-1][1]-ie[0][1]):(hn=ie[zn-1][0],yn=ie[zn-1][1],Ze=ie[zn-2][0]-ie[zn-1][0],an=ie[zn-2][1]-ie[zn-1][1]),dn=tt||0,Mn=this.markerEndAngle}Ge=Math.atan2(an,Ze),Se.setLocalEulerAngles(Ge*180/Math.PI+Mn),Se.setLocalPosition(hn+Math.cos(Ge)*dn,yn+Math.sin(Ge)*dn)}}},{key:"placeMarkerMid",value:function(o){var p=this.parsedStyle.points,T=p||{},C=T.points;if(this.markerMidList.forEach(function(ie){ie.remove()}),this.markerMidList=[],o&&Ni(o)&&C)for(var W=1;W<(this.parsedStyle.isClosed?C.length:C.length-1);W++){var tt=C[W][0],mt=C[W][1],Gt=W===1?o:o.cloneNode(!0);this.markerMidList.push(Gt),this.appendChild(Gt),Gt.setLocalPosition(tt,mt)}}}])}(Pi);Qo.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isClosed","isBillboard","isSizeAttenuation"]));var Ah=["style"],rc=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=s.style,p=(0,Zr.Z)(s,Ah);return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.POLYLINE,style:o,initialParsedStyle:{points:{points:[],totalLength:0,segments:[]},miterLimit:4,isClosed:!1}},p)])}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"getTotalLength",value:function(){return Jn(this)}},{key:"getPointAtLength",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return this.getPoint(o/this.getTotalLength(),p)}},{key:"getPoint",value:function(o){var p=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=this.parsedStyle.points.points;if(this.parsedStyle.points.segments.length===0){var C=[],W=0,tt,mt,Gt=this.getTotalLength();T.forEach(function(yn,dn){T[dn+1]&&(tt=[0,0],tt[0]=W/Gt,mt=(0,Ur.Xk)(yn[0],yn[1],T[dn+1][0],T[dn+1][1]),W+=mt,tt[1]=W/Gt,C.push(tt))}),this.parsedStyle.points.segments=C}var ie=0,Se=0;this.parsedStyle.points.segments.forEach(function(yn,dn){o>=yn[0]&&o<=yn[1]&&(ie=(o-yn[0])/(yn[1]-yn[0]),Se=dn)});var Ge=(0,Ur.U4)(T[Se][0],T[Se][1],T[Se+1][0],T[Se+1][1],ie),Ze=Ge.x,an=Ge.y,hn=A.fF(A.Ue(),A.al(Ze,an,0),p?this.getWorldTransform():this.getLocalTransform());return new Q(hn[0],hn[1])}},{key:"getStartTangent",value:function(){var o=this.parsedStyle.points.points,p=[];return p.push([o[1][0],o[1][1]]),p.push([o[0][0],o[0][1]]),p}},{key:"getEndTangent",value:function(){var o=this.parsedStyle.points.points,p=o.length-1,T=[];return T.push([o[p-1][0],o[p-1][1]]),T.push([o[p][0],o[p][1]]),T}}])}(Qo);rc.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Qo.PARSED_STYLE_LIST),["points","markerStart","markerMid","markerEnd","markerStartOffset","markerEndOffset","isBillboard"]));var ic=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.RECT},s)])}return(0,R.Z)(g,d),(0,I.Z)(g)}(Pi);ic.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["x","y","z","width","height","isBillboard","isSizeAttenuation","radius"]));var Oh=["style"],bl=function(d){function g(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=s.style,p=(0,Zr.Z)(s,Oh);return(0,_.Z)(this,g),(0,S.Z)(this,g,[(0,c.Z)({type:qn.TEXT,style:(0,c.Z)({fill:"black"},o)},p)])}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"getComputedTextLength",value:function(){var o;return this.getGeometryBounds(),((o=this.parsedStyle.metrics)===null||o===void 0?void 0:o.maxLineWidth)||0}},{key:"getLineBoundingRects",value:function(){var o;return this.getGeometryBounds(),((o=this.parsedStyle.metrics)===null||o===void 0?void 0:o.lineMetrics)||[]}},{key:"isOverflowing",value:function(){return this.getGeometryBounds(),!!this.parsedStyle.isOverflowing}}])}(Pi);bl.PARSED_STYLE_LIST=new Set([].concat((0,z.Z)(Pi.PARSED_STYLE_LIST),["x","y","z","isBillboard","billboardRotation","isSizeAttenuation","text","textAlign","textBaseline","fontStyle","fontSize","fontFamily","fontWeight","fontVariant","lineHeight","letterSpacing","leading","wordWrap","wordWrapWidth","maxLines","textOverflow","isOverflowing","textPath","textDecorationLine","textDecorationColor","textDecorationStyle","textDecorationThickness","textPathSide","textPathStartOffset","metrics","dx","dy"]));var Th=function(){function d(){(0,_.Z)(this,d),this.registry={},this.define(qn.CIRCLE,$l),this.define(qn.ELLIPSE,ml),this.define(qn.RECT,ic),this.define(qn.IMAGE,ec),this.define(qn.LINE,nc),this.define(qn.GROUP,Ko),this.define(qn.PATH,yl),this.define(qn.POLYGON,Qo),this.define(qn.POLYLINE,rc),this.define(qn.TEXT,bl),this.define(qn.HTML,tc)}return(0,I.Z)(d,[{key:"define",value:function(s,o){this.registry[s]=o}},{key:"get",value:function(s){return this.registry[s]}}])}(),od={number:function(g){return new di(g)},percent:function(g){return new di(g,"%")},px:function(g){return new di(g,"px")},em:function(g){return new di(g,"em")},rem:function(g){return new di(g,"rem")},deg:function(g){return new di(g,"deg")},grad:function(g){return new di(g,"grad")},rad:function(g){return new di(g,"rad")},turn:function(g){return new di(g,"turn")},s:function(g){return new di(g,"s")},ms:function(g){return new di(g,"ms")},registerProperty:function(g){var s=g.name,o=g.inherits,p=g.interpolable,T=g.initialValue,C=g.syntax;Un.styleValueRegistry.registerMetadata({n:s,inh:o,int:p,d:T,syntax:C})},registerLayout:function(g,s){Un.layoutRegistry.registerLayout(g,s)}},El=function(d){function g(){var s;(0,_.Z)(this,g),s=(0,S.Z)(this,g),s.defaultView=null,s.ownerDocument=null,s.nodeName="document";try{s.timeline=new Un.AnimationTimeline(s)}catch(p){}var o={};return Li.forEach(function(p){var T=p.n,C=p.inh,W=p.d;C&&W&&(o[T]=(0,_n.Z)(W)?W(qn.GROUP):W)}),s.documentElement=new Ko({id:"g-root",style:o}),s.documentElement.ownerDocument=s,s.documentElement.parentNode=s,s.childNodes=[s.documentElement],s}return(0,R.Z)(g,d),(0,I.Z)(g,[{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(o,p){if(o==="svg")return this.documentElement;var T=this.defaultView.customElements.get(o);T||(console.warn("Unsupported tagName: ",o),T=o==="tspan"?bl:Ko);var C=new T(p);return C.ownerDocument=this,C}},{key:"createElementNS",value:function(o,p,T){return this.createElement(p,T)}},{key:"cloneNode",value:function(o){throw new Error(et)}},{key:"destroy",value:function(){try{this.documentElement.destroyChildren(),this.timeline.destroy()}catch(o){}}},{key:"elementsFromBBox",value:function(o,p,T,C){var W=[],tt=function(Gt){if(!(!Gt.isInteractive()||Gt.isCulled())){var ie=Gt.parsedStyle.pointerEvents,Se=ie===void 0?"auto":ie,Ge=["auto","visiblepainted","visiblefill","visiblestroke","visible"].includes(Se);if(!Ge||Gt.isVisible()){var Ze=Gt.getTransformedGeometryBounds(!0);Ze&&!it.isEmpty(Ze)&&Ze.max[0]>=o&&Ze.min[0]<=T&&Ze.max[1]>=p&&Ze.min[1]<=C&&W.push(Gt)}Gt.childNodes&&Gt.childNodes.forEach(function(an){an instanceof Pi&&tt(an)})}};return tt(this.documentElement),W.sort(function(mt,Gt){return Gt.sortable.renderOrder-mt.sortable.renderOrder}),W}},{key:"elementFromPointSync",value:function(o,p){var T=this.defaultView.canvas2Viewport({x:o,y:p}),C=T.x,W=T.y,tt=this.defaultView.getConfig(),mt=tt.width,Gt=tt.height;if(C<0||W<0||C>mt||W>Gt)return null;var ie=this.defaultView.viewport2Client({x:C,y:W}),Se=ie.x,Ge=ie.y,Ze=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!0,position:{x:o,y:p,viewportX:C,viewportY:W,clientX:Se,clientY:Ge},picked:[]}),an=Ze.picked;return an&&an[0]||this.documentElement}},{key:"elementFromPoint",value:function(){var s=(0,la.Z)((0,ki.Z)().mark(function p(T,C){var W,tt,mt,Gt,ie,Se,Ge,Ze,an,hn,yn;return(0,ki.Z)().wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(W=this.defaultView.canvas2Viewport({x:T,y:C}),tt=W.x,mt=W.y,Gt=this.defaultView.getConfig(),ie=Gt.width,Se=Gt.height,!(tt<0||mt<0||tt>ie||mt>Se)){dn.next=1;break}return dn.abrupt("return",null);case 1:return Ge=this.defaultView.viewport2Client({x:tt,y:mt}),Ze=Ge.x,an=Ge.y,dn.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!0,position:{x:T,y:C,viewportX:tt,viewportY:mt,clientX:Ze,clientY:an},picked:[]});case 2:return hn=dn.sent,yn=hn.picked,dn.abrupt("return",yn&&yn[0]||this.documentElement);case 3:case"end":return dn.stop()}},p,this)}));function o(p,T){return s.apply(this,arguments)}return o}()},{key:"elementsFromPointSync",value:function(o,p){var T=this.defaultView.canvas2Viewport({x:o,y:p}),C=T.x,W=T.y,tt=this.defaultView.getConfig(),mt=tt.width,Gt=tt.height;if(C<0||W<0||C>mt||W>Gt)return[];var ie=this.defaultView.viewport2Client({x:C,y:W}),Se=ie.x,Ge=ie.y,Ze=this.defaultView.getRenderingService().hooks.pickSync.call({topmost:!1,position:{x:o,y:p,viewportX:C,viewportY:W,clientX:Se,clientY:Ge},picked:[]}),an=Ze.picked;return an[an.length-1]!==this.documentElement&&an.push(this.documentElement),an}},{key:"elementsFromPoint",value:function(){var s=(0,la.Z)((0,ki.Z)().mark(function p(T,C){var W,tt,mt,Gt,ie,Se,Ge,Ze,an,hn,yn;return(0,ki.Z)().wrap(function(dn){for(;;)switch(dn.prev=dn.next){case 0:if(W=this.defaultView.canvas2Viewport({x:T,y:C}),tt=W.x,mt=W.y,Gt=this.defaultView.getConfig(),ie=Gt.width,Se=Gt.height,!(tt<0||mt<0||tt>ie||mt>Se)){dn.next=1;break}return dn.abrupt("return",[]);case 1:return Ge=this.defaultView.viewport2Client({x:tt,y:mt}),Ze=Ge.x,an=Ge.y,dn.next=2,this.defaultView.getRenderingService().hooks.pick.promise({topmost:!1,position:{x:T,y:C,viewportX:tt,viewportY:mt,clientX:Ze,clientY:an},picked:[]});case 2:return hn=dn.sent,yn=hn.picked,yn[yn.length-1]!==this.documentElement&&yn.push(this.documentElement),dn.abrupt("return",yn);case 3:case"end":return dn.stop()}},p,this)}));function o(p,T){return s.apply(this,arguments)}return o}()},{key:"appendChild",value:function(o,p){throw new Error(yt)}},{key:"insertBefore",value:function(o,p){throw new Error(yt)}},{key:"removeChild",value:function(o,p){throw new Error(yt)}},{key:"replaceChild",value:function(o,p,T){throw new Error(yt)}},{key:"append",value:function(){throw new Error(yt)}},{key:"prepend",value:function(){throw new Error(yt)}},{key:"getElementById",value:function(o){return this.documentElement.getElementById(o)}},{key:"getElementsByName",value:function(o){return this.documentElement.getElementsByName(o)}},{key:"getElementsByTagName",value:function(o){return this.documentElement.getElementsByTagName(o)}},{key:"getElementsByClassName",value:function(o){return this.documentElement.getElementsByClassName(o)}},{key:"querySelector",value:function(o){return this.documentElement.querySelector(o)}},{key:"querySelectorAll",value:function(o){return this.documentElement.querySelectorAll(o)}},{key:"find",value:function(o){return this.documentElement.find(o)}},{key:"findAll",value:function(o){return this.documentElement.findAll(o)}}])}(Ii),Yc=function(){function d(g){(0,_.Z)(this,d),this.strategies=g}return(0,I.Z)(d,[{key:"apply",value:function(s){var o=s.config,p=s.camera,T=s.renderingService,C=s.renderingContext,W=this.strategies;T.hooks.cull.tap(d.tag,function(tt){if(tt){var mt,Gt=tt.cullable;if(W.length===0?Gt.visible=C.unculledEntities.indexOf(tt.entity)>-1:Gt.visible=W.every(function(Se){return Se.isVisible(p,tt)}),!tt.isCulled()&&tt.isVisible())return tt;var ie=((mt=o.future)===null||mt===void 0?void 0:mt.experimentalCancelEventPropagation)===!0;return tt.dispatchEvent(new Aa(ea.CULLED),ie,ie),null}return tt}),T.hooks.afterRender.tap(d.tag,function(tt){tt.cullable.visibilityPlaneMask=-1})}}])}();Yc.tag="Culling";var Hc=function(){function d(){var g=this;(0,_.Z)(this,d),this.autoPreventDefault=!1,this.rootPointerEvent=new dl(null),this.rootWheelEvent=new fl(null),this.onPointerMove=function(s){var o,p=(o=g.context.renderingContext.root)===null||o===void 0||(o=o.ownerDocument)===null||o===void 0?void 0:o.defaultView;if(!(p.supportsTouchEvents&&s.pointerType==="touch")){var T=g.normalizeToPointerEvent(s,p),C=(0,Oi.Z)(T),W;try{for(C.s();!(W=C.n()).done;){var tt=W.value,mt=g.bootstrapEvent(g.rootPointerEvent,tt,p,s);g.context.eventService.mapEvent(mt)}}catch(Gt){C.e(Gt)}finally{C.f()}g.setCursor(g.context.eventService.cursor)}},this.onClick=function(s){var o,p=(o=g.context.renderingContext.root)===null||o===void 0||(o=o.ownerDocument)===null||o===void 0?void 0:o.defaultView,T=g.normalizeToPointerEvent(s,p),C=(0,Oi.Z)(T),W;try{for(C.s();!(W=C.n()).done;){var tt=W.value,mt=g.bootstrapEvent(g.rootPointerEvent,tt,p,s);g.context.eventService.mapEvent(mt)}}catch(Gt){C.e(Gt)}finally{C.f()}g.setCursor(g.context.eventService.cursor)}}return(0,I.Z)(d,[{key:"apply",value:function(s){var o=this;this.context=s;var p=s.renderingService,T=this.context.renderingContext.root.ownerDocument.defaultView;this.context.eventService.setPickHandler(function(C){var W=o.context.renderingService.hooks.pickSync.call({position:C,picked:[],topmost:!0}),tt=W.picked;return tt[0]||null}),p.hooks.pointerWheel.tap(d.tag,function(C){var W=o.normalizeWheelEvent(C);o.context.eventService.mapEvent(W)}),p.hooks.pointerDown.tap(d.tag,function(C){if(!(T.supportsTouchEvents&&C.pointerType==="touch")){var W=o.normalizeToPointerEvent(C,T);if(o.autoPreventDefault&&W[0].isNormalized){var tt=C.cancelable||!("cancelable"in C);tt&&C.preventDefault()}var mt=(0,Oi.Z)(W),Gt;try{for(mt.s();!(Gt=mt.n()).done;){var ie=Gt.value,Se=o.bootstrapEvent(o.rootPointerEvent,ie,T,C);o.context.eventService.mapEvent(Se)}}catch(Ge){mt.e(Ge)}finally{mt.f()}o.setCursor(o.context.eventService.cursor)}}),p.hooks.pointerUp.tap(d.tag,function(C){if(!(T.supportsTouchEvents&&C.pointerType==="touch")){var W=o.context.contextService.getDomElement(),tt=o.context.eventService.isNativeEventFromCanvas(W,C),mt=tt?"":"outside",Gt=o.normalizeToPointerEvent(C,T),ie=(0,Oi.Z)(Gt),Se;try{for(ie.s();!(Se=ie.n()).done;){var Ge=Se.value,Ze=o.bootstrapEvent(o.rootPointerEvent,Ge,T,C);Ze.type+=mt,o.context.eventService.mapEvent(Ze)}}catch(an){ie.e(an)}finally{ie.f()}o.setCursor(o.context.eventService.cursor)}}),p.hooks.pointerMove.tap(d.tag,this.onPointerMove),p.hooks.pointerOver.tap(d.tag,this.onPointerMove),p.hooks.pointerOut.tap(d.tag,this.onPointerMove),p.hooks.click.tap(d.tag,this.onClick),p.hooks.pointerCancel.tap(d.tag,function(C){var W=o.normalizeToPointerEvent(C,T),tt=(0,Oi.Z)(W),mt;try{for(tt.s();!(mt=tt.n()).done;){var Gt=mt.value,ie=o.bootstrapEvent(o.rootPointerEvent,Gt,T,C);o.context.eventService.mapEvent(ie)}}catch(Se){tt.e(Se)}finally{tt.f()}o.setCursor(o.context.eventService.cursor)})}},{key:"bootstrapEvent",value:function(s,o,p,T){s.view=p,s.originalEvent=null,s.nativeEvent=T,s.pointerId=o.pointerId,s.width=o.width,s.height=o.height,s.isPrimary=o.isPrimary,s.pointerType=o.pointerType,s.pressure=o.pressure,s.tangentialPressure=o.tangentialPressure,s.tiltX=o.tiltX,s.tiltY=o.tiltY,s.twist=o.twist,this.transferMouseData(s,o);var C=this.context.eventService.client2Viewport({x:o.clientX,y:o.clientY}),W=C.x,tt=C.y;s.viewport.x=W,s.viewport.y=tt;var mt=this.context.eventService.viewport2Canvas(s.viewport),Gt=mt.x,ie=mt.y;return s.canvas.x=Gt,s.canvas.y=ie,s.global.copyFrom(s.canvas),s.offset.copyFrom(s.canvas),s.isTrusted=T.isTrusted,s.type==="pointerleave"&&(s.type="pointerout"),s.type.startsWith("mouse")&&(s.type=s.type.replace("mouse","pointer")),s.type.startsWith("touch")&&(s.type=il[s.type]||s.type),s}},{key:"normalizeWheelEvent",value:function(s){var o=this.rootWheelEvent;this.transferMouseData(o,s),o.deltaMode=s.deltaMode,o.deltaX=s.deltaX,o.deltaY=s.deltaY,o.deltaZ=s.deltaZ;var p=this.context.eventService.client2Viewport({x:s.clientX,y:s.clientY}),T=p.x,C=p.y;o.viewport.x=T,o.viewport.y=C;var W=this.context.eventService.viewport2Canvas(o.viewport),tt=W.x,mt=W.y;return o.canvas.x=tt,o.canvas.y=mt,o.global.copyFrom(o.canvas),o.offset.copyFrom(o.canvas),o.nativeEvent=s,o.type=s.type,o}},{key:"transferMouseData",value:function(s,o){s.isTrusted=o.isTrusted,s.srcElement=o.srcElement,s.timeStamp=Wl.now(),s.type=o.type,s.altKey=o.altKey,s.metaKey=o.metaKey,s.shiftKey=o.shiftKey,s.ctrlKey=o.ctrlKey,s.button=o.button,s.buttons=o.buttons,s.client.x=o.clientX,s.client.y=o.clientY,s.movement.x=o.movementX,s.movement.y=o.movementY,s.page.x=o.pageX,s.page.y=o.pageY,s.screen.x=o.screenX,s.screen.y=o.screenY,s.relatedTarget=null}},{key:"setCursor",value:function(s){this.context.contextService.applyCursorStyle(s||this.context.config.cursor||"default")}},{key:"normalizeToPointerEvent",value:function(s,o){var p=[];if(o.isTouchEvent(s))for(var T=0;T<s.changedTouches.length;T++){var C=s.changedTouches[T];(0,vn.Z)(C.button)&&(C.button=0),(0,vn.Z)(C.buttons)&&(C.buttons=1),(0,vn.Z)(C.isPrimary)&&(C.isPrimary=s.touches.length===1&&s.type==="touchstart"),(0,vn.Z)(C.width)&&(C.width=C.radiusX||1),(0,vn.Z)(C.height)&&(C.height=C.radiusY||1),(0,vn.Z)(C.tiltX)&&(C.tiltX=0),(0,vn.Z)(C.tiltY)&&(C.tiltY=0),(0,vn.Z)(C.pointerType)&&(C.pointerType="touch"),(0,vn.Z)(C.pointerId)&&(C.pointerId=C.identifier||0),(0,vn.Z)(C.pressure)&&(C.pressure=C.force||.5),(0,vn.Z)(C.twist)&&(C.twist=0),(0,vn.Z)(C.tangentialPressure)&&(C.tangentialPressure=0),C.isNormalized=!0,C.type=s.type,p.push(C)}else if(o.isMouseEvent(s)){var W=s;(0,vn.Z)(W.isPrimary)&&(W.isPrimary=!0),(0,vn.Z)(W.width)&&(W.width=1),(0,vn.Z)(W.height)&&(W.height=1),(0,vn.Z)(W.tiltX)&&(W.tiltX=0),(0,vn.Z)(W.tiltY)&&(W.tiltY=0),(0,vn.Z)(W.pointerType)&&(W.pointerType="mouse"),(0,vn.Z)(W.pointerId)&&(W.pointerId=gc),(0,vn.Z)(W.pressure)&&(W.pressure=.5),(0,vn.Z)(W.twist)&&(W.twist=0),(0,vn.Z)(W.tangentialPressure)&&(W.tangentialPressure=0),W.isNormalized=!0,p.push(W)}else p.push(s);return p}}])}();Hc.tag="Event";var Ch=[qn.CIRCLE,qn.ELLIPSE,qn.IMAGE,qn.RECT,qn.LINE,qn.POLYLINE,qn.POLYGON,qn.TEXT,qn.PATH,qn.HTML],Nh=function(){function d(){(0,_.Z)(this,d)}return(0,I.Z)(d,[{key:"isVisible",value:function(s,o){var p,T=o.cullable;if(!T.enable)return!0;var C=o.getRenderBounds();if(it.isEmpty(C))return!1;var W=s.getFrustum(),tt=(p=o.parentNode)===null||p===void 0||(p=p.cullable)===null||p===void 0?void 0:p.visibilityPlaneMask;return T.visibilityPlaneMask=this.computeVisibilityWithPlaneMask(o,C,tt||Zt.INDETERMINATE,W.planes),T.visible=T.visibilityPlaneMask!==Zt.OUTSIDE,T.visible}},{key:"computeVisibilityWithPlaneMask",value:function(s,o,p,T){if(p===Zt.OUTSIDE||p===Zt.INSIDE)return p;for(var C=Zt.INSIDE,W=Ch.indexOf(s.nodeName)>-1,tt=0,mt=T.length;tt<mt;++tt){var Gt=1<<tt;if(p&Gt&&!(W&&(tt===4||tt===5))){var ie=T[tt],Se=ie.normal,Ge=ie.distance;if(A.AK(Se,o.getPositiveFarPoint(T[tt]))+Ge<0)return Zt.OUTSIDE;A.AK(Se,o.getNegativeFarPoint(T[tt]))+Ge<0&&(C|=Gt)}}return C}}])}(),Xc=function(){function d(){(0,_.Z)(this,d),this.mutationRecords=[],this.isFirstTimeRendering=!0,this.isFirstTimeRenderingFinished=!1}return(0,I.Z)(d,[{key:"apply",value:function(s){var o=this,p,T=s.renderingService,C=s.renderingContext,W=C.root.ownerDocument.defaultView,tt=function(Ze){T.dirty()},mt=function(Ze){var an,hn=Ze.detail;(an=o.mutationRecords).push.apply(an,(0,z.Z)(hn)),T.dirty()},Gt=function(Ze){var an=Ze.target;Un.enableSizeAttenuation&&Un.styleValueRegistry.updateSizeAttenuation(an,W.getCamera().getZoom())},ie=function(Ze){var an=Ze.target;Un.sceneGraphService.dirtyToRoot(an),T.dirty()};T.hooks.init.tap(d.tag,function(){W.addEventListener(ea.MOUNTED,Gt),W.addEventListener(ea.UNMOUNTED,ie),W.addEventListener(ea.ATTR_MODIFIED,tt),W.addEventListener(ea.BOUNDS_CHANGED,mt)}),T.hooks.destroy.tap(d.tag,function(){W.removeEventListener(ea.MOUNTED,Gt),W.removeEventListener(ea.UNMOUNTED,ie),W.removeEventListener(ea.ATTR_MODIFIED,tt),W.removeEventListener(ea.BOUNDS_CHANGED,mt),o.mutationRecords=[]});var Se=(p=Un.globalThis.requestIdleCallback)!==null&&p!==void 0?p:Ul.bind(Un.globalThis);T.hooks.endFrame.tap(d.tag,function(){o.isFirstTimeRendering&&(o.isFirstTimeRendering=!1,Se(function(){o.isFirstTimeRenderingFinished=!0})),o.mutationRecords=[]})}}])}();Xc.tag="Prepare";function ld(d){return!!d.document}var ys=function(d){return d.READY="ready",d.BEFORE_RENDER="beforerender",d.RERENDER="rerender",d.AFTER_RENDER="afterrender",d.BEFORE_DESTROY="beforedestroy",d.AFTER_DESTROY="afterdestroy",d.RESIZE="resize",d.DIRTY_RECTANGLE="dirtyrectangle",d.RENDERER_CHANGED="rendererchanged",d}({}),Kc=500,Ph=.1,kh=1e3,xl=new Aa(ea.MOUNTED),wl=new Aa(ea.UNMOUNTED),ac=new Aa(ys.BEFORE_RENDER),sc=new Aa(ys.RERENDER),Ml=new Aa(ys.AFTER_RENDER),Jo=function(d){function g(s){var o;(0,_.Z)(this,g),o=(0,S.Z)(this,g),o.Element=Pi,o.inited=!1,o.context={};var p=s.container,T=s.canvas,C=s.renderer,W=s.width,tt=s.height,mt=s.background,Gt=s.cursor,ie=s.supportsMutipleCanvasesInOneContainer,Se=s.cleanUpOnDestroy,Ge=Se===void 0?!0:Se,Ze=s.offscreenCanvas,an=s.devicePixelRatio,hn=s.requestAnimationFrame,yn=s.cancelAnimationFrame,dn=s.createImage,Mn=s.supportsTouchEvents,zn=s.supportsPointerEvents,er=s.isTouchEvent,ar=s.isMouseEvent,sr=s.dblClickSpeed,Mr=W,xr=tt,fr=an||gs&&window.devicePixelRatio||1;return fr=fr>=1?Math.ceil(fr):1,T&&(Mr=W||Fu(T)||T.width/fr,xr=tt||_u(T)||T.height/fr),o.customElements=new Th,o.devicePixelRatio=fr,o.requestAnimationFrame=hn!=null?hn:Ul.bind(Un.globalThis),o.cancelAnimationFrame=yn!=null?yn:yc.bind(Un.globalThis),o.createImage=dn!=null?dn:function(){return new window.Image},o.supportsTouchEvents=Mn!=null?Mn:"ontouchstart"in Un.globalThis,o.supportsPointerEvents=zn!=null?zn:!!Un.globalThis.PointerEvent,o.isTouchEvent=er!=null?er:function(Sr){return o.supportsTouchEvents&&Sr instanceof Un.globalThis.TouchEvent},o.isMouseEvent=ar!=null?ar:function(Sr){return!Un.globalThis.MouseEvent||Sr instanceof Un.globalThis.MouseEvent&&(!o.supportsPointerEvents||!(Sr instanceof Un.globalThis.PointerEvent))},Ze&&(Un.offscreenCanvas=Ze),o.document=new El,o.document.defaultView=o,ie||Qa(p,o,Ge),o.initRenderingContext((0,c.Z)((0,c.Z)({},s),{},{width:Mr,height:xr,background:mt!=null?mt:"transparent",cursor:Gt!=null?Gt:"default",cleanUpOnDestroy:Ge,devicePixelRatio:fr,requestAnimationFrame:o.requestAnimationFrame,cancelAnimationFrame:o.cancelAnimationFrame,createImage:o.createImage,supportsTouchEvents:o.supportsTouchEvents,supportsPointerEvents:o.supportsPointerEvents,isTouchEvent:o.isTouchEvent,isMouseEvent:o.isMouseEvent,dblClickSpeed:sr!=null?sr:200})),o.initDefaultCamera(Mr,xr,C.clipSpaceNearZ),o.initRenderer(C,!0),o}return(0,R.Z)(g,d),(0,I.Z)(g,[{key:"initRenderingContext",value:function(o){this.context.config=o,this.context.renderingContext={root:this.document.documentElement,unculledEntities:[],renderListCurrentFrame:[],renderReasons:new Set,force:!1,dirty:!1}}},{key:"initDefaultCamera",value:function(o,p,T){var C=this,W=new Un.CameraContribution;W.clipSpaceNearZ=T,W.setType(Fr.EXPLORING,xi.DEFAULT).setPosition(o/2,p/2,Kc).setFocalPoint(o/2,p/2,0).setOrthographic(o/-2,o/2,p/2,p/-2,Ph,kh),W.canvas=this,W.eventEmitter.on(pi.UPDATED,function(){C.context.renderingContext.renderReasons.add(Yo.CAMERA_CHANGED),Un.enableSizeAttenuation&&C.getConfig().renderer.getConfig().enableSizeAttenuation&&C.updateSizeAttenuation()}),this.context.camera=W}},{key:"updateSizeAttenuation",value:function(){var o=this.getCamera().getZoom();this.document.documentElement.forEach(function(p){Un.styleValueRegistry.updateSizeAttenuation(p,o)})}},{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 o=this;return this.readyPromise||(this.readyPromise=new Promise(function(p){o.resolveReadyPromise=function(){p(o)}}),this.inited&&this.resolveReadyPromise()),this.readyPromise}},{key:"destroy",value:function(){var o,p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0,T=arguments.length>1?arguments[1]:void 0;bi.clearCache();var C=((o=this.getConfig().future)===null||o===void 0?void 0:o.experimentalCancelEventPropagation)===!0;T||this.dispatchEvent(new Aa(ys.BEFORE_DESTROY),C,C),this.frameId&&this.cancelAnimationFrame(this.frameId);var W=this.getRoot();p&&(this.unmountChildren(W),this.document.destroy(),this.getEventService().destroy()),this.getRenderingService().destroy(),this.getContextService().destroy(),T||this.dispatchEvent(new Aa(ys.AFTER_DESTROY),C,C);var tt=function(Gt){Gt.currentTarget=null,Gt.manager=null,Gt.target=null,Gt.relatedNode=null};tt(xl),tt(wl),tt(ac),tt(sc),tt(Ml),tt(is),tt(Jl),tt(ms),tt(Uc),Un.textService.clearCache()}},{key:"changeSize",value:function(o,p){this.resize(o,p)}},{key:"resize",value:function(o,p){var T,C=this.context.config;C.width=o,C.height=p,this.getContextService().resize(o,p);var W=this.context.camera,tt=W.getProjectionMode();W.setPosition(o/2,p/2,Kc).setFocalPoint(o/2,p/2,0),tt===$r.ORTHOGRAPHIC?W.setOrthographic(o/-2,o/2,p/2,p/-2,W.getNear(),W.getFar()):W.setAspect(o/p);var mt=((T=C.future)===null||T===void 0?void 0:T.experimentalCancelEventPropagation)===!0;this.dispatchEvent(new Aa(ys.RESIZE,{width:o,height:p}),mt,mt)}},{key:"appendChild",value:function(o,p){return this.document.documentElement.appendChild(o,p)}},{key:"insertBefore",value:function(o,p){return this.document.documentElement.insertBefore(o,p)}},{key:"removeChild",value:function(o){return this.document.documentElement.removeChild(o)}},{key:"removeChildren",value:function(){this.document.documentElement.removeChildren()}},{key:"destroyChildren",value:function(){this.document.documentElement.destroyChildren()}},{key:"render",value:function(o){var p,T=this;o&&(ac.detail=o,Ml.detail=o);var C=((p=this.getConfig().future)===null||p===void 0?void 0:p.experimentalCancelEventPropagation)===!0;this.dispatchEvent(ac,C,C);var W=this.getRenderingService();W.render(this,o,function(){T.dispatchEvent(sc,C,C)}),this.dispatchEvent(Ml,C,C)}},{key:"run",value:function(){var o=this,p=function(C,W){o.render(W),o.frameId=o.requestAnimationFrame(p)};p()}},{key:"initRenderer",value:function(o){var p=this,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(!o)throw new Error("Renderer is required.");this.inited=!1,this.readyPromise=void 0,this.context.renderingPlugins=[],this.context.renderingPlugins.push(new Hc,new Xc,new Yc([new Nh])),this.loadRendererContainerModule(o),this.context.contextService=new this.context.ContextService((0,c.Z)((0,c.Z)({},Un),this.context)),this.context.renderingService=new th(Un,this.context),this.context.eventService=new Pc(Un,this.context),this.context.eventService.init(),this.context.contextService.init?(this.context.contextService.init(),this.initRenderingService(o,T,!0)):this.context.contextService.initAsync().then(function(){p.initRenderingService(o,T)}).catch(function(C){console.error(C)})}},{key:"initRenderingService",value:function(o){var p=this,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,C=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.context.renderingService.init(function(){var W;p.inited=!0;var tt=((W=p.getConfig().future)===null||W===void 0?void 0:W.experimentalCancelEventPropagation)===!0;T?C?p.requestAnimationFrame(function(){p.dispatchEvent(new Aa(ys.READY),tt,tt)}):p.dispatchEvent(new Aa(ys.READY),tt,tt):p.dispatchEvent(new Aa(ys.RENDERER_CHANGED),tt,tt),p.readyPromise&&p.resolveReadyPromise(),T||p.getRoot().forEach(function(mt){var Gt,ie;(Gt=(ie=mt).dirty)===null||Gt===void 0||Gt.call(ie,!0,!0)}),p.mountChildren(p.getRoot()),o.getConfig().enableAutoRendering&&p.run()})}},{key:"loadRendererContainerModule",value:function(o){var p=this,T=o.getPlugins();T.forEach(function(C){C.context=p.context,C.init(Un)})}},{key:"setRenderer",value:function(o){var p=this.getConfig();if(p.renderer!==o){var T=p.renderer;p.renderer=o,this.destroy(!1,!0),(0,z.Z)((T==null?void 0:T.getPlugins())||[]).reverse().forEach(function(C){C.destroy(Un)}),this.initRenderer(o)}}},{key:"setCursor",value:function(o){var p=this.getConfig();p.cursor=o,this.getContextService().applyCursorStyle(o)}},{key:"unmountChildren",value:function(o){var p=this;if(o.childNodes.forEach(function(W){p.unmountChildren(W)}),this.inited){if(o.isMutationObserved)o.dispatchEvent(wl);else{var T,C=((T=this.getConfig().future)===null||T===void 0?void 0:T.experimentalCancelEventPropagation)===!0;wl.target=o,this.dispatchEvent(wl,!0,C)}o!==this.document.documentElement&&(o.ownerDocument=null),o.isConnected=!1}o.isCustomElement&&o.disconnectedCallback&&o.disconnectedCallback()}},{key:"mountChildren",value:function(o){var p=this,T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:so(o);if(this.inited){if(!o.isConnected&&(o.ownerDocument=this.document,o.isConnected=!0,!T))if(o.isMutationObserved)o.dispatchEvent(xl);else{var C,W=((C=this.getConfig().future)===null||C===void 0?void 0:C.experimentalCancelEventPropagation)===!0;xl.target=o,this.dispatchEvent(xl,!0,W)}}else console.warn("[g]: You are trying to call `canvas.appendChild` before canvas' initialization finished. You can either await `canvas.ready` or listen to `CanvasEvent.READY` manually.","appended child: ",o.nodeName);o.childNodes.forEach(function(tt){p.mountChildren(tt,T)}),o.isCustomElement&&o.connectedCallback&&o.connectedCallback()}},{key:"mountFragment",value:function(o){this.mountChildren(o,!1)}},{key:"client2Viewport",value:function(o){return this.getEventService().client2Viewport(o)}},{key:"viewport2Client",value:function(o){return this.getEventService().viewport2Client(o)}},{key:"viewport2Canvas",value:function(o){return this.getEventService().viewport2Canvas(o)}},{key:"canvas2Viewport",value:function(o){return this.getEventService().canvas2Viewport(o)}},{key:"getPointByClient",value:function(o,p){return this.client2Viewport({x:o,y:p})}},{key:"getClientByPoint",value:function(o,p){return this.viewport2Client({x:o,y:p})}}])}(Nc)},52402:function(bt,Et,y){"use strict";y.d(Et,{TE:function(){return z},U4:function(){return ne},Xk:function(){return we},Y1:function(){return Ht},_x:function(){return rn},hE:function(){return Re},l5:function(){return Ee},ph:function(){return Pe},vp:function(){return Rt},x4:function(){return Mt}});var c=y(94480),_=y(5131),I=y(45545);function z(Lt,_t,Ut,qt){var se=Lt-Ut,te=_t-qt;return Math.sqrt(se*se+te*te)}function S(Lt,_t){var Ut=Math.min.apply(Math,(0,c.Z)(Lt)),qt=Math.min.apply(Math,(0,c.Z)(_t)),se=Math.max.apply(Math,(0,c.Z)(Lt)),te=Math.max.apply(Math,(0,c.Z)(_t));return{x:Ut,y:qt,width:se-Ut,height:te-qt}}function R(Lt){return(Lt+Math.PI*2)%(Math.PI*2)}function M(Lt,_t){var Ut=Math.abs(Lt);return _t>0?Ut:Ut*-1}function N(Lt,_t,Ut,qt,se,te){var ke=Ut,Ye=qt;if(ke===0||Ye===0)return{x:Lt,y:_t};for(var Ve=se-Lt,on=te-_t,xn=Math.abs(Ve),vn=Math.abs(on),Qn=ke*ke,Ln=Ye*Ye,_n=Math.PI/4,me=0,pr=0,Zn=0;Zn<4;Zn++){me=ke*Math.cos(_n),pr=Ye*Math.sin(_n);var kr=(Qn-Ln)*Math.pow(Math.cos(_n),3)/ke,Ar=(Ln-Qn)*Math.pow(Math.sin(_n),3)/Ye,ei=me-kr,yi=pr-Ar,ui=xn-kr,Ur=vn-Ar,ki=Math.hypot(yi,ei),la=Math.hypot(Ur,ui),Oi=ki*Math.asin((ei*Ur-yi*ui)/(ki*la)),Zr=Oi/Math.sqrt(Qn+Ln-me*me-pr*pr);_n+=Zr,_n=Math.min(Math.PI/2,Math.max(0,_n))}return{x:Lt+M(me,Ve),y:_t+M(pr,on)}}function D(Lt,_t,Ut,qt,se,te,ke,Ye){return-1*Ut*Math.cos(se)*Math.sin(Ye)-qt*Math.sin(se)*Math.cos(Ye)}function A(Lt,_t,Ut,qt,se,te,ke,Ye){return-1*Ut*Math.sin(se)*Math.sin(Ye)+qt*Math.cos(se)*Math.cos(Ye)}function L(Lt,_t,Ut){return Math.atan(-_t/Lt*Math.tan(Ut))}function F(Lt,_t,Ut){return Math.atan(_t/(Lt*Math.tan(Ut)))}function rt(Lt,_t,Ut,qt,se,te){return Ut*Math.cos(se)*Math.cos(te)-qt*Math.sin(se)*Math.sin(te)+Lt}function G(Lt,_t,Ut,qt,se,te){return Ut*Math.sin(se)*Math.cos(te)+qt*Math.cos(se)*Math.sin(te)+_t}function kt(Lt,_t,Ut,qt){var se=Math.atan2(qt*Lt,Ut*_t);return(se+Math.PI*2)%(Math.PI*2)}function ft(Lt,_t,Ut){return{x:Lt*Math.cos(Ut),y:_t*Math.sin(Ut)}}function J(Lt,_t,Ut){var qt=Math.cos(Ut),se=Math.sin(Ut);return[Lt*qt-_t*se,Lt*se+_t*qt]}function Rt(Lt,_t,Ut,qt,se,te,ke){for(var Ye=L(Ut,qt,se),Ve=1/0,on=-1/0,xn=[te,ke],vn=-Math.PI*2;vn<=Math.PI*2;vn+=Math.PI){var Qn=Ye+vn;te<ke?te<Qn&&Qn<ke&&xn.push(Qn):ke<Qn&&Qn<te&&xn.push(Qn)}for(var Ln=0;Ln<xn.length;Ln++){var _n=rt(Lt,_t,Ut,qt,se,xn[Ln]);_n<Ve&&(Ve=_n),_n>on&&(on=_n)}for(var me=F(Ut,qt,se),pr=1/0,Zn=-1/0,kr=[te,ke],Ar=-Math.PI*2;Ar<=Math.PI*2;Ar+=Math.PI){var ei=me+Ar;te<ke?te<ei&&ei<ke&&kr.push(ei):ke<ei&&ei<te&&kr.push(ei)}for(var yi=0;yi<kr.length;yi++){var ui=G(Lt,_t,Ut,qt,se,kr[yi]);ui<pr&&(pr=ui),ui>Zn&&(Zn=ui)}return{x:Ve,y:pr,width:on-Ve,height:Zn-pr}}function Tt(Lt,_t,Ut,qt,se,te,ke,Ye,Ve){var on=J(Ye-Lt,Ve-_t,-se),xn=_slicedToArray(on,2),vn=xn[0],Qn=xn[1],Ln=N(0,0,Ut,qt,vn,Qn),_n=kt(Ut,qt,Ln.x,Ln.y);_n<te?Ln=ft(Ut,qt,te):_n>ke&&(Ln=ft(Ut,qt,ke));var me=J(Ln.x,Ln.y,se);return{x:me[0]+Lt,y:me[1]+_t}}function Vt(Lt,_t,Ut,qt,se,te,ke,Ye){var Ve=(ke-te)*Ye+te,on=D(Lt,_t,Ut,qt,se,te,ke,Ve),xn=A(Lt,_t,Ut,qt,se,te,ke,Ve);return R(Math.atan2(xn,on))}var fe=1e-4;function ue(Lt,_t,Ut,qt,se,te){var ke=-1,Ye=1/0,Ve=[Ut,qt],on=20;te&&te>200&&(on=te/10);for(var xn=1/on,vn=xn/10,Qn=0;Qn<=on;Qn++){var Ln=Qn*xn,_n=[se.apply(void 0,(0,c.Z)(Lt.concat([Ln]))),se.apply(void 0,(0,c.Z)(_t.concat([Ln])))],me=z(Ve[0],Ve[1],_n[0],_n[1]);me<Ye&&(ke=Ln,Ye=me)}if(ke===0)return{x:Lt[0],y:_t[0]};if(ke===1){var pr=Lt.length;return{x:Lt[pr-1],y:_t[pr-1]}}Ye=1/0;for(var Zn=0;Zn<32&&!(vn<fe);Zn++){var kr=ke-vn,Ar=ke+vn,ei=[se.apply(void 0,(0,c.Z)(Lt.concat([kr]))),se.apply(void 0,(0,c.Z)(_t.concat([kr])))],yi=z(Ve[0],Ve[1],ei[0],ei[1]);if(kr>=0&&yi<Ye)ke=kr,Ye=yi;else{var ui=[se.apply(void 0,(0,c.Z)(Lt.concat([Ar]))),se.apply(void 0,(0,c.Z)(_t.concat([Ar])))],Ur=z(Ve[0],Ve[1],ui[0],ui[1]);Ar<=1&&Ur<Ye?(ke=Ar,Ye=Ur):vn*=.5}}return{x:se.apply(void 0,(0,c.Z)(Lt.concat([ke]))),y:se.apply(void 0,(0,c.Z)(_t.concat([ke])))}}function Ce(Lt,_t){for(var Ut=0,qt=Lt.length,se=0;se<qt;se++){var te=Lt[se],ke=_t[se],Ye=Lt[(se+1)%qt],Ve=_t[(se+1)%qt];Ut+=z(te,ke,Ye,Ve)}return Ut/2}function be(Lt,_t,Ut,qt){return S([Lt,Ut],[_t,qt])}function we(Lt,_t,Ut,qt){return z(Lt,_t,Ut,qt)}function ne(Lt,_t,Ut,qt,se){return{x:(1-se)*Lt+se*Ut,y:(1-se)*_t+se*qt}}function We(Lt,_t,Ut,qt,se,te){var ke=(Ut-Lt)*(se-Lt)+(qt-_t)*(te-_t);if(ke<0)return z(Lt,_t,se,te);var Ye=(Ut-Lt)*(Ut-Lt)+(qt-_t)*(qt-_t);return ke>Ye?z(Ut,qt,se,te):rn(Lt,_t,Ut,qt,se,te)}function rn(Lt,_t,Ut,qt,se,te){var ke=[Ut-Lt,qt-_t];if(I.I6(ke,[0,0]))return Math.sqrt((se-Lt)*(se-Lt)+(te-_t)*(te-_t));var Ye=[-ke[1],ke[0]];I.Fv(Ye,Ye);var Ve=[se-Lt,te-_t];return Math.abs(I.AK(Ve,Ye))}function Xe(Lt,_t,Ut,qt){return Math.atan2(qt-_t,Ut-Lt)}function pn(Lt,_t,Ut,qt,se){var te=1-se;return te*te*te*Lt+3*_t*se*te*te+3*Ut*se*se*te+qt*se*se*se}function Tn(Lt,_t,Ut,qt,se){var te=1-se;return 3*(te*te*(_t-Lt)+2*te*se*(Ut-_t)+se*se*(qt-Ut))}function $e(Lt,_t,Ut,qt){var se=-3*Lt+9*_t-9*Ut+3*qt,te=6*Lt-12*_t+6*Ut,ke=3*_t-3*Lt,Ye=[],Ve,on,xn;if((0,_.Z)(se,0))(0,_.Z)(te,0)||(Ve=-ke/te,Ve>=0&&Ve<=1&&Ye.push(Ve));else{var vn=te*te-4*se*ke;(0,_.Z)(vn,0)?Ye.push(-te/(2*se)):vn>0&&(xn=Math.sqrt(vn),Ve=(-te+xn)/(2*se),on=(-te-xn)/(2*se),Ve>=0&&Ve<=1&&Ye.push(Ve),on>=0&&on<=1&&Ye.push(on))}return Ye}function mn(Lt,_t,Ut,qt,se,te,ke,Ye,Ve){var on=pn(Lt,Ut,se,ke,Ve),xn=pn(_t,qt,te,Ye,Ve),vn=ne(Lt,_t,Ut,qt,Ve),Qn=ne(Ut,qt,se,te,Ve),Ln=ne(se,te,ke,Ye,Ve),_n=ne(vn.x,vn.y,Qn.x,Qn.y,Ve),me=ne(Qn.x,Qn.y,Ln.x,Ln.y,Ve);return[[Lt,_t,vn.x,vn.y,_n.x,_n.y,on,xn],[on,xn,me.x,me.y,Ln.x,Ln.y,ke,Ye]]}function It(Lt,_t,Ut,qt,se,te,ke,Ye,Ve){if(Ve===0)return Ce([Lt,Ut,se,ke],[_t,qt,te,Ye]);var on=mn(Lt,_t,Ut,qt,se,te,ke,Ye,.5),xn=[].concat(_toConsumableArray(on[0]),[Ve-1]),vn=[].concat(_toConsumableArray(on[1]),[Ve-1]);return It.apply(void 0,_toConsumableArray(xn))+It.apply(void 0,_toConsumableArray(vn))}function Ee(Lt,_t,Ut,qt,se,te,ke,Ye){for(var Ve=[Lt,ke],on=[_t,Ye],xn=$e(Lt,Ut,se,ke),vn=$e(_t,qt,te,Ye),Qn=0;Qn<xn.length;Qn++)Ve.push(pn(Lt,Ut,se,ke,xn[Qn]));for(var Ln=0;Ln<vn.length;Ln++)on.push(pn(_t,qt,te,Ye,vn[Ln]));return S(Ve,on)}function cn(Lt,_t,Ut,qt,se,te,ke,Ye){return It(Lt,_t,Ut,qt,se,te,ke,Ye,3)}function sn(Lt,_t,Ut,qt,se,te,ke,Ye,Ve,on,xn){return ue([Lt,Ut,se,ke],[_t,qt,te,Ye],Ve,on,pn,xn)}function Pe(Lt,_t,Ut,qt,se,te,ke,Ye,Ve,on,xn){var vn=sn(Lt,_t,Ut,qt,se,te,ke,Ye,Ve,on,xn);return z(vn.x,vn.y,Ve,on)}function ze(Lt,_t,Ut,qt,se,te,ke,Ye,Ve){return{x:pn(Lt,Ut,se,ke,Ve),y:pn(_t,qt,te,Ye,Ve)}}function Ke(Lt,_t,Ut,qt,se,te,ke,Ye,Ve){var on=Tn(Lt,Ut,se,ke,Ve),xn=Tn(_t,qt,te,Ye,Ve);return R(Math.atan2(xn,on))}function le(Lt){for(var _t=0,Ut=[],qt=0;qt<Lt.length-1;qt++){var se=Lt[qt],te=Lt[qt+1],ke=z(se[0],se[1],te[0],te[1]),Ye={from:se,to:te,length:ke};Ut.push(Ye),_t+=ke}return{segments:Ut,totalLength:_t}}function Ae(Lt){if(Lt.length<2)return 0;for(var _t=0,Ut=0;Ut<Lt.length-1;Ut++){var qt=Lt[Ut],se=Lt[Ut+1];_t+=z(qt[0],qt[1],se[0],se[1])}return _t}function Pt(Lt,_t){if(_t>1||_t<0||Lt.length<2)return null;var Ut=le(Lt),qt=Ut.segments,se=Ut.totalLength;if(se===0)return{x:Lt[0][0],y:Lt[0][1]};for(var te=0,ke=null,Ye=0;Ye<qt.length;Ye++){var Ve=qt[Ye],on=Ve.from,xn=Ve.to,vn=Ve.length/se;if(_t>=te&&_t<=te+vn){var Qn=(_t-te)/vn;ke=ne(on[0],on[1],xn[0],xn[1],Qn);break}te+=vn}return ke}function wt(Lt,_t){if(_t>1||_t<0||Lt.length<2)return 0;for(var Ut=le(Lt),qt=Ut.segments,se=Ut.totalLength,te=0,ke=0,Ye=0;Ye<qt.length;Ye++){var Ve=qt[Ye],on=Ve.from,xn=Ve.to,vn=Ve.length/se;if(_t>=te&&_t<=te+vn){ke=Math.atan2(xn[1]-on[1],xn[0]-on[0]);break}te+=vn}return ke}function de(Lt,_t,Ut){for(var qt=1/0,se=0;se<Lt.length-1;se++){var te=Lt[se],ke=Lt[se+1],Ye=We(te[0],te[1],ke[0],ke[1],_t,Ut);Ye<qt&&(qt=Ye)}return qt}function je(Lt){for(var _t=[],Ut=[],qt=0;qt<Lt.length;qt++){var se=Lt[qt];_t.push(se[0]),Ut.push(se[1])}return S(_t,Ut)}function Re(Lt){return Ae(Lt)}function ce(Lt,_t){return Pt(Lt,_t)}function Le(Lt,_t,Ut){return de(Lt,_t,Ut)}function xe(Lt,_t){return wt(Lt,_t)}function Ft(Lt){var _t=Lt.slice(0);return Lt.length&&_t.push(Lt[0]),_t}function re(Lt){return je(Lt)}function Me(Lt){return Ae(Ft(Lt))}function O(Lt,_t){return Pt(Ft(Lt),_t)}function st(Lt,_t,Ut){return de(Ft(Lt),_t,Ut)}function ve(Lt,_t){return wt(Ft(Lt),_t)}function $t(Lt,_t,Ut,qt){var se=1-qt;return se*se*Lt+2*qt*se*_t+qt*qt*Ut}function Ie(Lt,_t,Ut){var qt=Lt+Ut-2*_t;if((0,_.Z)(qt,0))return[.5];var se=(Lt-_t)/qt;return se<=1&&se>=0?[se]:[]}function Ne(Lt,_t,Ut,qt,se,te,ke){var Ye=$t(Lt,Ut,se,ke),Ve=$t(_t,qt,te,ke),on=ne(Lt,_t,Ut,qt,ke),xn=ne(Ut,qt,se,te,ke);return[[Lt,_t,on.x,on.y,Ye,Ve],[Ye,Ve,xn.x,xn.y,se,te]]}function tn(Lt,_t,Ut,qt,se,te,ke){if(ke===0)return(z(Lt,_t,Ut,qt)+z(Ut,qt,se,te)+z(Lt,_t,se,te))/2;var Ye=Ne(Lt,_t,Ut,qt,se,te,.5),Ve=Ye[0],on=Ye[1];return Ve.push(ke-1),on.push(ke-1),tn.apply(void 0,_toConsumableArray(Ve))+tn.apply(void 0,_toConsumableArray(on))}function Mt(Lt,_t,Ut,qt,se,te){var ke=Ie(Lt,Ut,se)[0],Ye=Ie(_t,qt,te)[0],Ve=[Lt,se],on=[_t,te];return ke!==void 0&&Ve.push($t(Lt,Ut,se,ke)),Ye!==void 0&&on.push($t(_t,qt,te,Ye)),S(Ve,on)}function q(Lt,_t,Ut,qt,se,te){return tn(Lt,_t,Ut,qt,se,te,3)}function Ct(Lt,_t,Ut,qt,se,te,ke,Ye){return ue([Lt,Ut,se],[_t,qt,te],ke,Ye,$t)}function Ht(Lt,_t,Ut,qt,se,te,ke,Ye){var Ve=Ct(Lt,_t,Ut,qt,se,te,ke,Ye);return z(Ve.x,Ve.y,ke,Ye)}},19584:function(bt,Et,y){"use strict";y.d(Et,{S:function(){return L}});var c=y(33885),_=y(67732),I=y(83652),z=y(22214),S=y(42403),R=y(77263),M=y(75044),N=y(3202),D=y(68901);var A=function(){function F(rt){(0,_.Z)(this,F),this.dragndropPluginOptions=rt}return(0,I.Z)(F,[{key:"apply",value:function(G){var kt=this,ft=G.renderingService,J=G.renderingContext,Rt=J.root.ownerDocument,Tt=Rt.defaultView,Vt=function(ue){var Ce=ue.target,be=Ce===Rt,we=be&&kt.dragndropPluginOptions.isDocumentDraggable?Rt:Ce.closest&&Ce.closest("[draggable=true]");if(we){var ne=!1,We=ue.timeStamp,rn=[ue.clientX,ue.clientY],Xe=null,pn=[ue.clientX,ue.clientY],Tn=function(){var mn=(0,N.Z)((0,M.Z)().mark(function It(Ee){var cn,sn,Pe,ze,Ke,le;return(0,M.Z)().wrap(function(Ae){for(;;)switch(Ae.prev=Ae.next){case 0:if(ne){Ae.next=2;break}if(cn=Ee.timeStamp-We,sn=(0,D.y)([Ee.clientX,Ee.clientY],rn),!(cn<=kt.dragndropPluginOptions.dragstartTimeThreshold||sn<=kt.dragndropPluginOptions.dragstartDistanceThreshold)){Ae.next=1;break}return Ae.abrupt("return");case 1:Ee.type="dragstart",we.dispatchEvent(Ee),ne=!0;case 2:if(Ee.type="drag",Ee.dx=Ee.clientX-pn[0],Ee.dy=Ee.clientY-pn[1],we.dispatchEvent(Ee),pn=[Ee.clientX,Ee.clientY],be){Ae.next=4;break}return Pe=kt.dragndropPluginOptions.overlap==="pointer"?[Ee.canvasX,Ee.canvasY]:Ce.getBounds().center,Ae.next=3,Rt.elementsFromPoint(Pe[0],Pe[1]);case 3:ze=Ae.sent,Ke=ze[ze.indexOf(Ce)+1],le=(Ke==null?void 0:Ke.closest("[droppable=true]"))||(kt.dragndropPluginOptions.isDocumentDroppable?Rt:null),Xe!==le&&(Xe&&(Ee.type="dragleave",Ee.target=Xe,Xe.dispatchEvent(Ee)),le&&(Ee.type="dragenter",Ee.target=le,le.dispatchEvent(Ee)),Xe=le,Xe&&(Ee.type="dragover",Ee.target=Xe,Xe.dispatchEvent(Ee)));case 4:case"end":return Ae.stop()}},It)}));return function(Ee){return mn.apply(this,arguments)}}();Tt.addEventListener("pointermove",Tn);var $e=function(It){if(ne){It.detail={preventClick:!0};var Ee=It.clone();Xe&&(Ee.type="drop",Ee.target=Xe,Xe.dispatchEvent(Ee)),Ee.type="dragend",we.dispatchEvent(Ee),ne=!1}Tt.removeEventListener("pointermove",Tn)};Ce.addEventListener("pointerup",$e,{once:!0}),Ce.addEventListener("pointerupoutside",$e,{once:!0})}};ft.hooks.init.tap(F.tag,function(){Tt.addEventListener("pointerdown",Vt)}),ft.hooks.destroy.tap(F.tag,function(){Tt.removeEventListener("pointerdown",Vt)})}}])}();A.tag="Dragndrop";var L=function(F){function rt(){var G,kt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return(0,_.Z)(this,rt),G=(0,z.Z)(this,rt),G.name="dragndrop",G.options=kt,G}return(0,S.Z)(rt,F),(0,I.Z)(rt,[{key:"init",value:function(){this.addRenderingPlugin(new A((0,c.Z)({overlap:"pointer",isDocumentDraggable:!1,isDocumentDroppable:!1,dragstartDistanceThreshold:0,dragstartTimeThreshold:0},this.options)))}},{key:"destroy",value:function(){this.removeAllRenderingPlugins()}},{key:"setOptions",value:function(kt){Object.assign(this.plugins[0].dragndropPluginOptions,kt)}}])}(R.F6)},84245:function(bt,Et,y){"use strict";y.d(Et,{kJ:function(){return Lu},RN:function(){return Rv}});var c={};y.r(c),y.d(c,{circle:function(){return vr},diamond:function(){return Lr},rect:function(){return Nr},simple:function(){return _r},triangle:function(){return hr},triangleRect:function(){return zr},vee:function(){return Tr}});var _=y(14675),I=y(18178),z=y(76075),S=y(62099),R=y(93785);const M={duration:500},N={duration:1e3,easing:"cubic-bezier(0.250, 0.460, 0.450, 0.940)",iterations:1,fill:"both"},D={CHANGE:"change"};var A;(function(r){r.NodeAdded="NodeAdded",r.NodeUpdated="NodeUpdated",r.NodeRemoved="NodeRemoved",r.EdgeAdded="EdgeAdded",r.EdgeUpdated="EdgeUpdated",r.EdgeRemoved="EdgeRemoved",r.ComboAdded="ComboAdded",r.ComboUpdated="ComboUpdated",r.ComboRemoved="ComboRemoved"})(A||(A={}));var L;(function(r){r.DRAW="draw",r.COLLAPSE="collapse",r.EXPAND="expand",r.TRANSFORM="transform"})(L||(L={}));var F;(function(r){r.CLICK="canvas:click",r.DBLCLICK="canvas:dblclick",r.POINTER_OVER="canvas:pointerover",r.POINTER_LEAVE="canvas:pointerleave",r.POINTER_ENTER="canvas:pointerenter",r.POINTER_MOVE="canvas:pointermove",r.POINTER_OUT="canvas:pointerout",r.POINTER_DOWN="canvas:pointerdown",r.POINTER_UP="canvas:pointerup",r.CONTEXT_MENU="canvas:contextmenu",r.DRAG_START="canvas:dragstart",r.DRAG="canvas:drag",r.DRAG_END="canvas:dragend",r.DRAG_ENTER="canvas:dragenter",r.DRAG_OVER="canvas:dragover",r.DRAG_LEAVE="canvas:dragleave",r.DROP="canvas:drop",r.WHEEL="canvas:wheel"})(F||(F={}));var rt;(function(r){r.CLICK="combo:click",r.DBLCLICK="combo:dblclick",r.POINTER_OVER="combo:pointerover",r.POINTER_LEAVE="combo:pointerleave",r.POINTER_ENTER="combo:pointerenter",r.POINTER_MOVE="combo:pointermove",r.POINTER_OUT="combo:pointerout",r.POINTER_DOWN="combo:pointerdown",r.POINTER_UP="combo:pointerup",r.CONTEXT_MENU="combo:contextmenu",r.DRAG_START="combo:dragstart",r.DRAG="combo:drag",r.DRAG_END="combo:dragend",r.DRAG_ENTER="combo:dragenter",r.DRAG_OVER="combo:dragover",r.DRAG_LEAVE="combo:dragleave",r.DROP="combo:drop"})(rt||(rt={}));var G;(function(r){r.CLICK="click",r.DBLCLICK="dblclick",r.POINTER_OVER="pointerover",r.POINTER_LEAVE="pointerleave",r.POINTER_ENTER="pointerenter",r.POINTER_MOVE="pointermove",r.POINTER_OUT="pointerout",r.POINTER_DOWN="pointerdown",r.POINTER_UP="pointerup",r.CONTEXT_MENU="contextmenu",r.DRAG_START="dragstart",r.DRAG="drag",r.DRAG_END="dragend",r.DRAG_ENTER="dragenter",r.DRAG_OVER="dragover",r.DRAG_LEAVE="dragleave",r.DROP="drop",r.KEY_DOWN="keydown",r.KEY_UP="keyup",r.WHEEL="wheel",r.PINCH="pinch"})(G||(G={}));var kt;(function(r){r.KEY_DOWN="keydown",r.KEY_UP="keyup"})(kt||(kt={}));var ft;(function(r){r.CLICK="edge:click",r.DBLCLICK="edge:dblclick",r.POINTER_OVER="edge:pointerover",r.POINTER_LEAVE="edge:pointerleave",r.POINTER_ENTER="edge:pointerenter",r.POINTER_MOVE="edge:pointermove",r.POINTER_OUT="edge:pointerout",r.POINTER_DOWN="edge:pointerdown",r.POINTER_UP="edge:pointerup",r.CONTEXT_MENU="edge:contextmenu",r.DRAG_ENTER="edge:dragenter",r.DRAG_OVER="edge:dragover",r.DRAG_LEAVE="edge:dragleave",r.DROP="edge:drop"})(ft||(ft={}));var J;(function(r){r.BEFORE_CANVAS_INIT="beforecanvasinit",r.AFTER_CANVAS_INIT="aftercanvasinit",r.BEFORE_SIZE_CHANGE="beforesizechange",r.AFTER_SIZE_CHANGE="aftersizechange",r.BEFORE_ELEMENT_CREATE="beforeelementcreate",r.AFTER_ELEMENT_CREATE="afterelementcreate",r.BEFORE_ELEMENT_UPDATE="beforeelementupdate",r.AFTER_ELEMENT_UPDATE="afterelementupdate",r.BEFORE_ELEMENT_DESTROY="beforeelementdestroy",r.AFTER_ELEMENT_DESTROY="afterelementdestroy",r.BEFORE_ELEMENT_TRANSLATE="beforeelementtranslate",r.AFTER_ELEMENT_TRANSLATE="afterelementtranslate",r.BEFORE_DRAW="beforedraw",r.AFTER_DRAW="afterdraw",r.BEFORE_RENDER="beforerender",r.AFTER_RENDER="afterrender",r.BEFORE_ANIMATE="beforeanimate",r.AFTER_ANIMATE="afteranimate",r.BEFORE_LAYOUT="beforelayout",r.AFTER_LAYOUT="afterlayout",r.BEFORE_STAGE_LAYOUT="beforestagelayout",r.AFTER_STAGE_LAYOUT="afterstagelayout",r.BEFORE_TRANSFORM="beforetransform",r.AFTER_TRANSFORM="aftertransform",r.BATCH_START="batchstart",r.BATCH_END="batchend",r.BEFORE_DESTROY="beforedestroy",r.AFTER_DESTROY="afterdestroy",r.BEFORE_RENDERER_CHANGE="beforerendererchange",r.AFTER_RENDERER_CHANGE="afterrendererchange"})(J||(J={}));var Rt;(function(r){r.UNDO="undo",r.REDO="redo",r.CANCEL="cancel",r.ADD="add",r.CLEAR="clear",r.CHANGE="change"})(Rt||(Rt={}));var Tt;(function(r){r.CLICK="node:click",r.DBLCLICK="node:dblclick",r.POINTER_OVER="node:pointerover",r.POINTER_LEAVE="node:pointerleave",r.POINTER_ENTER="node:pointerenter",r.POINTER_MOVE="node:pointermove",r.POINTER_OUT="node:pointerout",r.POINTER_DOWN="node:pointerdown",r.POINTER_UP="node:pointerup",r.CONTEXT_MENU="node:contextmenu",r.DRAG_START="node:dragstart",r.DRAG="node:drag",r.DRAG_END="node:dragend",r.DRAG_ENTER="node:dragenter",r.DRAG_OVER="node:dragover",r.DRAG_LEAVE="node:dragleave",r.DROP="node:drop"})(Tt||(Tt={}));const Vt="combo",fe="tree";var ue;(function(r){r.NODE="node",r.EDGE="edge",r.COMBO="combo",r.THEME="theme",r.PALETTE="palette",r.LAYOUT="layout",r.BEHAVIOR="behavior",r.PLUGIN="plugin",r.ANIMATION="animation",r.TRANSFORM="transform",r.SHAPE="shape"})(ue||(ue={}));const Ce={animation:{},behavior:{},combo:{},edge:{},layout:{},node:{},palette:{},theme:{},plugin:{},transform:{},shape:{}};function be(r,t){var e;const n=(e=Ce[r])===null||e===void 0?void 0:e[t];if(n)return n}function we(r){return EXTENSION_REGISTRY[r]}const ne="5.0.50",We="G6";function rn(r){return`[${We} v${ne}] ${r}`}const Xe={mute:!1,debug:r=>{!Xe.mute&&console.debug(rn(r))},info:r=>{!Xe.mute&&console.info(rn(r))},warn:r=>{!Xe.mute&&console.warn(rn(r))},error:r=>{!Xe.mute&&console.error(rn(r))}};function pn(r){const{theme:t}=r;if(!t)return{};const e=be(ue.THEME,t);return e||(Xe.warn(`The theme of ${t} is not registered.`),{})}function Tn(r,t){if(Array.isArray(r)&&r.length===0)return null;const e=Array.isArray(r)?r[0]:r,n=Array.isArray(r)?r.slice(1):t||[];return new Proxy(e,{get(i,a){return typeof i[a]=="function"&&!["onframe","onfinish"].includes(a)?(...l)=>{i[a](...l),n.forEach(u=>{var f;return(f=u[a])===null||f===void 0?void 0:f.call(u,...l)})}:a==="finished"?Promise.all([e.finished,...n.map(l=>l.finished)]):Reflect.get(i,a)},set(i,a,l){return["onframe","onfinish"].includes(a)||n.forEach(u=>{u[a]=l}),Reflect.set(i,a,l)}})}function $e(r){const t=r.reduce((n,i)=>(Object.entries(i).forEach(([a,l])=>{n[a]===void 0?n[a]=[l]:n[a].push(l)}),n),{});Object.entries(t).forEach(([n,i])=>{(i.length!==r.length||i.some(a=>(0,z.Z)(a))||i.every(a=>!["sourceNode","targetNode","childrenNode"].includes(n)&&(0,S.Z)(a,i[0])))&&delete t[n]});const e=Object.entries(t).reduce((n,[i,a])=>(a.forEach((l,u)=>{n[u]?n[u][i]=l:n[u]={[i]:l}}),n),[]);return r.length!==0&&e.length===0&&e.push({_:0},{_:0}),e}function mn(r){switch(r){case"opacity":return 1;case"x":case"y":case"z":case"zIndex":return 0;case"visibility":return"visible";case"collapsed":return!1;case"states":return[];default:return}}function It(r,t){const{animation:e}=r;if(e===!1||t===!1)return!1;const n=Object.assign({},M);return(0,R.Z)(e)&&Object.assign(n,e),(0,R.Z)(t)&&Object.assign(n,t),n}function Ee(r){if(typeof r=="string"){const t=be(ue.ANIMATION,r);return t||(Xe.warn(`The animation of ${r} is not registered.`),[])}return r}function cn(r,t,e,n){var i,a;const{animation:l}=r;if(l===!1||n===!1)return[];const u=(i=r==null?void 0:r[t])===null||i===void 0?void 0:i.animation;if(u===!1)return[];const f=u==null?void 0:u[e];if(f===!1)return[];const m=(a=pn(r)[t])===null||a===void 0?void 0:a.animation,x=(V=[])=>Ee(V).map(nt=>Object.assign(Object.assign(Object.assign(Object.assign({},N),(0,R.Z)(l)&&l),nt),(0,R.Z)(n)&&n));if(f)return x(f);if(!m)return[];const Z=m[e];return Z===!1?[]:x(Z)}var sn=y(1933);function Pe(r,t,e,n=[]){if(!n&&r===0&&t===0&&e===0)return null;if(Array.isArray(n)){let a=-1;const l=[];for(let u=0;u<n.length;u++){const f=n[u];if(f[0]==="translate"){if(f[1]===r&&f[2]===t)return null;a=u,l.push(["translate",r,t])}else if(f[0]==="translate3d"){if(f[1]===r&&f[2]===t&&f[3]===e)return null;a=u,l.push(["translate3d",r,t,e!=null?e:0])}else l.push(f)}return a===-1&&l.splice(0,0,(0,sn.Z)(e)?["translate3d",r,t,e!=null?e:0]:["translate",r,t]),l.length===0?null:l}const i=n?n.replace(/translate(3d)?\([^)]*\)/g,""):"";return e===0?`translate(${r}, ${t})${i}`:`translate3d(${r}, ${t}, ${e})${i}`}var ze=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const Ke=(r,t,e)=>{if(!e.length)return null;const[n,i]=t,a=m=>{var x;if(m){const Z=r.getShape(m);if(!Z)return null;const V=`get${(0,I.Z)(m)}Style`,nt=((x=r==null?void 0:r[V])===null||x===void 0?void 0:x.bind(r))||(Dt=>Dt),dt=(nt==null?void 0:nt(n))||{},St=(nt==null?void 0:nt(i))||{};return{shape:Z,fromStyle:dt,toStyle:St}}else return{shape:r,fromStyle:n,toStyle:i}};let l;const u=e.map(m=>{var{fields:x,shape:Z,states:V}=m,nt=ze(m,["fields","shape","states"]);const dt=a(Z);if(!dt)return null;const{shape:St,fromStyle:Dt,toStyle:Jt}=dt,oe=[{},{}];if(x.forEach(Be=>{var un,nn;Object.assign(oe[0],{[Be]:(un=Dt[Be])!==null&&un!==void 0?un:mn(Be)}),Object.assign(oe[1],{[Be]:(nn=Jt[Be])!==null&&nn!==void 0?nn:mn(Be)})}),oe.some(Be=>Object.keys(Be).some(un=>["x","y","z"].includes(un)))){const{x:Be=0,y:un=0,z:nn,transform:En=""}=St.attributes||{};oe.forEach(Je=>{var Dn,tr,ur;Je.transform=Pe((Dn=Je.x)!==null&&Dn!==void 0?Dn:Be,(tr=Je.y)!==null&&tr!==void 0?tr:un,(ur=Je.z)!==null&&ur!==void 0?ur:nn,En)})}const ge=St.animate($e(oe),nt);return Z===void 0&&(l=ge),ge}).filter(Boolean),f=l||(u==null?void 0:u[0]);return f?Tn(f,u.filter(m=>m!==m)):null},le=[{fields:["opacity"]}],Ae=[{fields:["x","y"]}],Pt=[{fields:["x","y"]}],wt=Pt,de=[{fields:["sourceNode","targetNode"]}],je=de,Re=[{fields:["childrenNode","x","y"]}],ce=Re,Le=[{fields:["childrenNode","x","y"]}];var xe=y(71018),Ft=y(15610),re=y(62199),Me=y(37547);function O(r){return"source"in r&&"target"in r}function st(r){return r.length===2}function ve(r){return r.length===3}function $t(r){return r instanceof Float32Array?!0:Array.isArray(r)&&(r.length===2||r.length===3)?r.every(t=>typeof t=="number"):!1}function Ie(r,t,e){return r>=t&&r<=e}function Ne(r=0){if(Array.isArray(r)){const[t=0,e=t,n=t,i=e]=r;return[t,e,n,i]}return[r,r,r,r]}function tn(r=0){const t=Ne(r);return t[0]+t[2]}function Mt(r=0){const t=Ne(r);return t[1]+t[3]}function q(r){return r.max[0]-r.min[0]}function Ct(r){return r.max[1]-r.min[1]}function Ht(r){return[q(r),Ct(r)]}function Lt(r,t){const e=$t(r)?_t(r):r.getShape("key").getBounds();return t?Ut(e,t):e}function _t(r){const[t,e,n=0]=r,i=new _.mN;return i.setMinMax([t,e,n],[t,e,n]),i}function Ut(r,t){const[e,n,i,a]=Ne(t),[l,u,f]=r.min,[m,x,Z]=r.max,V=new _.mN;return V.setMinMax([l-a,u-e,f],[m+n,x+i,Z]),V}function qt(r){if(r.length===0)return new _.mN;if(r.length===1)return r[0];const t=new _.mN;t.setMinMax(r[0].min,r[0].max);for(let e=1;e<r.length;e++){const n=r[e];t.setMinMax([Math.min(t.min[0],n.min[0]),Math.min(t.min[1],n.min[1]),Math.min(t.min[2],n.min[2])],[Math.max(t.max[0],n.max[0]),Math.max(t.max[1],n.max[1]),Math.max(t.max[2],n.max[2])])}return t}function se(r,t){const[e,n]=r.min,[i,a]=r.max,[l,u]=t.min,[f,m]=t.max;return e>=l&&i<=f&&n>=u&&a<=m}function te(r,t){return Ie(r[0],t.min[0],t.max[0])&&Ie(r[1],t.min[1],t.max[1])}function ke(r,t,e=!1){const{min:[n,i],max:[a,l]}=t,u=(r[1]===i||r[1]===l)&&(e||Ie(r[0],n,a)),f=(r[0]===n||r[0]===a)&&(e||Ie(r[1],i,l));return u||f}function Ye(r,t){return!te(r,t)}function Ve(r,t){const{center:e}=t;return r[0]===e[0]&&r[1]===e[1]}function on(r,t){const[e,n]=r,[i,a]=t.min,[l,u]=t.max,f=e-i,m=l-e,x=n-a,Z=u-n,V=Math.min(f,m,x,Z);return V===f?"left":V===m?"right":V===x?"top":V===Z?"bottom":"left"}function xn(r,t){const e=(0,Me.Z)(r);if(te(r,t))switch(on(r,t)){case"left":e[0]=t.min[0];break;case"right":e[0]=t.max[0];break;case"top":e[1]=t.min[1];break;case"bottom":e[1]=t.max[1];break}else{const[n,i]=r,[a,l]=t.min,[u,f]=t.max;e[0]=Ie(n,a,u)?n:n<a?a:u,e[1]=Ie(i,l,f)?i:i<l?l:f}return e}function vn(r,t){const{center:e}=r,[n,i]=Ht(r),a=t==="up"||t==="down"?e[0]:t==="right"?e[0]-n/6:e[0]+n/6,l=t==="left"||t==="right"?e[1]:t==="down"?e[1]-i/6:e[1]+i/6;return[a,l]}function Qn(r,t){let[e,n]=Ht(r);return[e,n]=t==="up"||t==="down"?[e,n]:[n,e],(Math.pow(n,2)-Math.pow(Math.sqrt(Math.pow(e/2,2)+Math.pow(n,2))-e/2,2))/(2*n)}function Ln(r){const{min:[t,e],max:[n,i]}=r,a=[t,i],l=[n,i],u=[n,e],f=[t,e];return[[a,l],[l,u],[u,f],[f,a]]}var _n=y(55532);function me(r){if(r.id!==void 0)return r.id;if(r.source!==void 0&&r.target!==void 0)return`${r.source}-${r.target}`;throw new Error(rn("The datum does not have available id."))}function pr(r){return r.combo}function Zn(r,t){const e={nodes:(r.nodes||[]).map(me),edges:(r.edges||[]).map(me),combos:(r.combos||[]).map(me)};return t?Object.values(e).flat():e}const kr=(r,t,e)=>{var n;switch(e.type){case"degree":{const i=new Map;return(n=r.nodes)===null||n===void 0||n.forEach(a=>{const l=t(me(a),e.direction).length;i.set(me(a),l)}),i}case"betweenness":return ei(r,e.directed,e.weightPropertyName);case"closeness":return yi(r,e.directed,e.weightPropertyName);case"eigenvector":return Ur(r,e.directed);case"pagerank":return ui(r,e.epsilon,e.linkProb);default:return Ar(r)}},Ar=r=>{var t;const e=new Map;return(t=r.nodes)===null||t===void 0||t.forEach(n=>{e.set(me(n),0)}),e},ei=(r,t,e)=>{const n=Ar(r),{nodes:i=[]}=r;return i.forEach(a=>{i.forEach(l=>{if(a!==l){const{allPath:u}=(0,_n.ni)(r,me(a),me(l),t,e),f=u.length;u.flat().forEach(m=>{m!==me(a)&&m!==me(l)&&n.set(m,n.get(m)+1/f)})}})}),n},yi=(r,t,e)=>{const n=new Map,{nodes:i=[]}=r;return i.forEach(a=>{const l=i.reduce((u,f)=>{if(a!==f){const{length:m}=(0,_n.ni)(r,me(a),me(f),t,e);u+=m}return u},0);n.set(me(a),1/l)}),n},ui=(r,t,e)=>{var n;const i=new Map,a=(0,_n.EF)(r,t,e);return(n=r.nodes)===null||n===void 0||n.forEach(l=>{i.set(me(l),a[me(l)])}),i},Ur=(r,t)=>{const{nodes:e=[]}=r,n=ki(r,t),i=la(n,e.length),a=new Map;return e.forEach((l,u)=>{a.set(me(l),i[u])}),a},ki=(r,t)=>{const{nodes:e=[],edges:n=[]}=r,i=Array(e.length).fill(null).map(()=>Array(e.length).fill(0));return n.forEach(({source:a,target:l})=>{const u=e.findIndex(m=>me(m)===a),f=e.findIndex(m=>me(m)===l);t?i[u][f]=1:(i[u][f]=1,i[f][u]=1)}),i},la=(r,t,e=100,n=1e-6)=>{let i=Array(t).fill(1),a=1/0;for(let l=0;l<e&&a>n;l++){const u=Array(t).fill(0);for(let m=0;m<t;m++)for(let x=0;x<t;x++)u[m]+=r[m][x]*i[x];const f=Math.sqrt(u.reduce((m,x)=>m+x*x,0));for(let m=0;m<t;m++)u[m]/=f;a=Math.sqrt(u.reduce((m,x,Z)=>m+(x-i[Z])*x,0)),i=u}return i};function Oi(r,t,e,n=S.Z){const i=new Map(r.map(V=>[e(V),V])),a=new Map(t.map(V=>[e(V),V])),l=new Set(i.keys()),u=new Set(a.keys()),f=[],m=[],x=[],Z=[];return u.forEach(V=>{l.has(V)?n(i.get(V),a.get(V))?Z.push(a.get(V)):m.push(a.get(V)):f.push(a.get(V))}),l.forEach(V=>{u.has(V)||x.push(i.get(V))}),{enter:f,exit:x,keep:Z,update:m}}function Zr(r,t,e){const n=i=>{e&&!e(i)||(i.style.visibility=t)};r.forEach(i=>{n(i)})}function qn(r,t,e){const n={},i=a=>(a in n||(n[a]=0),`${t}-${a}-${n[a]++}`);return e.map(a=>typeof a=="string"?{type:a,key:i(a)}:typeof a=="function"?a.call(r):a.key?a:Object.assign(Object.assign({},a),{key:i(a.type)}))}class Ti{constructor(t){this.extensions=[],this.extensionMap={},this.context=t}setExtensions(t){const e=qn(this.context.graph,this.category,t),{enter:n,update:i,exit:a,keep:l}=Oi(this.extensions,e,u=>u.key);this.createExtensions(n),this.updateExtensions([...i,...l]),this.destroyExtensions(a),this.extensions=e}createExtension(t){const{category:e}=this,{key:n,type:i}=t,a=be(e,i);if(!a)return Xe.warn(`The extension ${i} of ${e} is not registered.`);const l=new a(this.context,t);l.initialized=!0,this.extensionMap[n]=l}createExtensions(t){t.forEach(e=>this.createExtension(e))}updateExtension(t){const{key:e}=t,n=this.extensionMap[e];n&&n.update(t)}updateExtensions(t){t.forEach(e=>this.updateExtension(e))}destroyExtension(t){const e=this.extensionMap[t];e&&(e.initialized&&!e.destroyed&&e.destroy(),delete this.extensionMap[t])}destroyExtensions(t){t.forEach(({key:e})=>this.destroyExtension(e))}destroy(){this.destroyExtensions(this.extensions),this.context={},this.extensions=[],this.extensionMap={}}}class Nt{constructor(t,e){this.events=[],this.initialized=!1,this.destroyed=!1,this.context=t,this.options=e}update(t){this.options=Object.assign(this.options,t)}destroy(){this.context={},this.options={},this.destroyed=!0}}class E extends Nt{}class b extends E{constructor(t,e){super(t,Object.assign({},b.defaultOptions,e)),this.isOverlapping=(n,i)=>i.some(a=>n.intersects(a)),this.occupiedBounds=[],this.detectLabelCollision=n=>{const i=this.context.viewport,a={show:[],hide:[]};return this.occupiedBounds=[],n.forEach(l=>{const u=l.getShape("label").getRenderBounds();i.isInViewport(u,!0)&&!this.isOverlapping(u,this.occupiedBounds)?(a.show.push(l),this.occupiedBounds.push(Ut(u,this.options.padding))):a.hide.push(l)}),a},this.hideLabelIfExceedViewport=(n,i)=>{const{exit:a}=Oi(n,i,l=>l.id);a==null||a.forEach(this.hideLabel)},this.nodeCentralities=new Map,this.sortNodesByCentrality=(n,i)=>{const{model:a}=this.context,l=a.getData(),u=a.getRelatedEdgesData.bind(a);return n.map(m=>(this.nodeCentralities.has(m.id)||(this.nodeCentralities=kr(l,u,i)),{node:m,centrality:this.nodeCentralities.get(m.id)})).sort((m,x)=>x.centrality-m.centrality).map(m=>m.node)},this.sortLabelElementsInView=n=>{const{sort:i,sortNode:a,sortCombo:l,sortEdge:u}=this.options,{model:f}=this.context;if((0,xe.Z)(i))return n.sort((St,Dt)=>i(f.getElementDataById(St.id),f.getElementDataById(Dt.id)));const{node:m=[],edge:x=[],combo:Z=[]}=(0,Ft.Z)(n,St=>St.type),V=(0,xe.Z)(l)?Z.sort((St,Dt)=>l(...f.getComboData([St.id,Dt.id]))):Z,nt=(0,xe.Z)(a)?m.sort((St,Dt)=>a(...f.getNodeData([St.id,Dt.id]))):this.sortNodesByCentrality(m,a),dt=(0,xe.Z)(u)?x.sort((St,Dt)=>u(...f.getEdgeData([St.id,Dt.id]))):x;return[...V,...nt,...dt]},this.labelElementsInView=[],this.isFirstRender=!0,this.onToggleVisibility=n=>{var i;if(((i=n.data)===null||i===void 0?void 0:i.stage)==="zIndex")return;if(!this.validate(n)){this.hiddenElements.size>0&&(this.hiddenElements.forEach(this.showLabel),this.hiddenElements.clear());return}const a=this.isFirstRender?this.getLabelElements():this.getLabelElementsInView();this.hideLabelIfExceedViewport(this.labelElementsInView,a),this.labelElementsInView=a;const l=this.sortLabelElementsInView(this.labelElementsInView),{show:u,hide:f}=this.detectLabelCollision(l);for(let m=u.length-1;m>=0;m--)this.showLabel(u[m]);f.forEach(this.hideLabel)},this.hiddenElements=new Map,this.hideLabel=n=>{const i=n.getShape("label");i&&Zr(i,"hidden"),this.hiddenElements.set(n.id,n)},this.showLabel=n=>{const i=n.getShape("label");i&&Zr(i,"visible"),n.toFront(),this.hiddenElements.delete(n.id)},this.onTransform=(0,re.Z)(this.onToggleVisibility,this.options.throttle,{leading:!0}),this.enableToggle=!0,this.toggle=n=>{this.enableToggle&&this.onToggleVisibility(n)},this.onBeforeRender=()=>{this.enableToggle=!1},this.onAfterRender=n=>{this.onToggleVisibility(n),this.enableToggle=!0},this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents(),this.onToggleVisibility({})}getLabelElements(){const{elementMap:t}=this.context.element,e=[];for(const n in t){const i=t[n];i.isVisible()&&i.getShape("label")&&e.push(i)}return e}getLabelElementsInView(){const t=this.context.viewport;return this.getLabelElements().filter(e=>t.isInViewport(e.getShape("key").getRenderBounds()))}bindEvents(){const{graph:t}=this.context;t.on(J.BEFORE_RENDER,this.onBeforeRender),t.on(J.AFTER_RENDER,this.onAfterRender),t.on(J.AFTER_DRAW,this.toggle),t.on(J.AFTER_LAYOUT,this.toggle),t.on(J.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(J.BEFORE_RENDER,this.onBeforeRender),t.off(J.AFTER_RENDER,this.onAfterRender),t.off(J.AFTER_DRAW,this.toggle),t.off(J.AFTER_LAYOUT,this.toggle),t.off(J.AFTER_TRANSFORM,this.onTransform)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}b.defaultOptions={enable:!0,throttle:100,padding:0,sortNode:{type:"degree"}};var h=y(23343);const v=[0,0,0];function w(r,t){return r.map((e,n)=>e+t[n])}function Y(r,t){return r.map((e,n)=>e-t[n])}function K(r,t){return typeof t=="number"?r.map(e=>e*t):r.map((e,n)=>e*t[n])}function it(r,t){return typeof t=="number"?r.map(e=>e/t):r.map((e,n)=>e/t[n])}function ht(r,t){return r.reduce((e,n,i)=>e+n*t[i],0)}function Zt(r,t){const e=vt(r),n=vt(t);return[e[1]*n[2]-e[2]*n[1],e[2]*n[0]-e[0]*n[2],e[0]*n[1]-e[1]*n[0]]}function $(r,t){return r.map(e=>e*t)}function Q(r,t){return Math.sqrt(r.reduce((e,n,i)=>e+Math.pow(n-t[i]||0,2),0))}function H(r,t){return r.reduce((e,n,i)=>e+Math.abs(n-t[i]),0)}function et(r){const t=r.reduce((e,n)=>e+Math.pow(n,2),0);return r.map(e=>e/Math.sqrt(t))}function yt(r,t,e=!1){const n=r[0]*t[1]-r[1]*t[0];let i=Math.acos(K(r,t).reduce((a,l)=>a+l,0)/(Q(r,v)*Q(t,v)));return e&&n<0&&(i=2*Math.PI-i),i}function Xt(r,t){return r.every((e,n)=>e===t[n])}function Ot(r,t=!0){return t?[-r[1],r[0]]:[r[1],-r[0]]}function Kt(r,t){return r.map(e=>e%t)}function gt(r){return[r[0],r[1]]}function vt(r){return st(r)?[r[0],r[1],0]:r}function lt(r){const[t,e]=r;return!t&&!e?0:Math.atan2(e,t)}function jt(r,t){const[e,n]=r;if(t%360===0)return[e,n];const i=t*Math.PI/180,a=Math.cos(i),l=Math.sin(i);return[e*a-n*l,e*l+n*a]}function Yt(r,t){const[e,n]=r,[i,a]=t,l=Y(e,n),u=Y(i,a);return Zt(l,u).every(f=>f===0)}function he(r,t,e=!1){if(Yt(r,t))return;const[n,i]=r,[a,l]=t,u=((n[0]-a[0])*(a[1]-l[1])-(n[1]-a[1])*(a[0]-l[0]))/((n[0]-i[0])*(a[1]-l[1])-(n[1]-i[1])*(a[0]-l[0])),f=l[0]-a[0]?(n[0]-a[0]+u*(i[0]-n[0]))/(l[0]-a[0]):(n[1]-a[1]+u*(i[1]-n[1]))/(l[1]-a[1]);if(!(!e&&(!Ie(u,0,1)||!Ie(f,0,1))))return[n[0]+u*(i[0]-n[0]),n[1]+u*(i[1]-n[1])]}function ye(r){if(Array.isArray(r))return Ie(r[0],0,1)&&Ie(r[1],0,1)?r:[.5,.5];const t=r.split("-"),e=t.includes("left")?0:t.includes("right")?1:.5,n=t.includes("top")?0:t.includes("bottom")?1:.5;return[e,n]}function Wt(r){const{x:t=0,y:e=0,z:n=0}=r.style||{};return[+t,+e,+n]}function Oe(r){const{x:t,y:e,z:n}=r.style||{};return t!==void 0||e!==void 0||n!==void 0}function He(r,t){const[e,n]=t,{min:i,max:a}=r;return[i[0]+e*(a[0]-i[0]),i[1]+n*(a[1]-i[1])]}function Qe(r,t="center"){const e=ye(t);return He(r,e)}function An(r,t){const e=parseAnchor(t);return He(r,e)}const Nn=r=>{const[t,e]=r;return{left:Math.min(t[0],e[0]),right:Math.max(t[0],e[0]),top:Math.min(t[1],e[1]),bottom:Math.max(t[1],e[1])}};function Cn(r){var t;return[r.x,r.y,(t=r.z)!==null&&t!==void 0?t:0]}function Bn(r){var t;return{x:r[0],y:r[1],z:(t=r[2])!==null&&t!==void 0?t:0}}function jn(r){return r.sort((t,e)=>t[0]-e[0]||t[1]-e[1])}function or(r){const t=new Set;return r.filter(e=>{const n=e.join(",");return t.has(n)?!1:(t.add(n),!0)})}function ir(r,t=0){return r.map(e=>parseFloat(e.toFixed(t)))}function lr(r,t,e,n=!1){if((0,S.Z)(r,t))return r;const i=n?Y(r,t):Y(t,r),a=et(i),l=[a[0]*e,a[1]*e];return w(gt(r),l)}function Vn(r,t){return r[1]===t[1]}function nr(r,t){return r[0]===t[0]}function Or(r,t){return Vn(r,t)||nr(r,t)}function Kr(r,t,e){return Yt([r,t],[t,e])}function Wr(r,t){return[2*t[0]-r[0],2*t[1]-r[1]]}function dr(r,t,e,n=!0,i=!1){for(let a=0;a<e.length;a++){let l=e[a],u=e[(a+1)%e.length];n&&(l=w(t,l),u=w(t,u));const f=i?Wr(r,t):r,m=he([t,f],[l,u]);if(m)return{point:m,line:[l,u]}}return{point:t,line:void 0}}function Fr(r,t,e,n){const i=r[0],a=r[1];let l=!1;e===void 0&&(e=0),n===void 0&&(n=t.length);const u=n-e;for(let f=0,m=u-1;f<u;m=f++){const x=t[f+e][0],Z=t[f+e][1],V=t[m+e][0],nt=t[m+e][1];Z>a!=nt>a&&i<(V-x)*(a-Z)/(nt-Z)+x&&(l=!l)}return l}function xi(r,t,e=!1){const n=Qe(t,"center"),i=[Qe(t,"left-top"),Qe(t,"right-top"),Qe(t,"right-bottom"),Qe(t,"left-bottom")];return dr(r,n,i,!1,e).point}function $r(r,t,e=!1){const n=t.center,i=e?Wr(r,n):r,a=Y(i,t.center),l=Math.atan2(a[1],a[0]);if(isNaN(l))return n;const u=q(t)/2,f=Ct(t)/2,m=n[0]+u*Math.cos(l),x=n[1]+f*Math.sin(l);return[m,x]}function pi(r,t){let e=1/0,n=[r[0],t[0]];return r.forEach(i=>{t.forEach(a=>{const l=Q(i,a);l<e&&(e=l,n=[i,a])})}),n}function Ri(r,t){let e=1/0,n=[[0,0],[0,0]];return t.forEach(i=>{const a=Hi(r,i);a<e&&(e=a,n=i)}),n}function Hi(r,t){const e=Zi(r,t);return Q(r,e)}function Zi(r,t){const[e,n]=t[0],[i,a]=t[1],[l,u]=r,f=i-e,m=a-n;if(f===0&&m===0)return[e,n];let x=((l-e)*f+(u-n)*m)/(f*f+m*m);x>1?x=1:x<0&&(x=0);const Z=e+x*f,V=n+x*m;return[Z,V]}function ca(r){const t=r.reduce((e,n)=>w(e,n),[0,0]);return it(t,r.length)}function _a(r,t=!0){const e=ca(r);return r.sort(([n,i],[a,l])=>{const u=Math.atan2(i-e[1],n-e[0]),f=Math.atan2(l-e[1],a-e[0]);return t?f-u:u-f})}function Za(r,t){return[r,[r[0],t[1]],t,[t[0],r[1]]]}var na=y(71879);class wi{constructor(t,e,n){if(this.phase=e,this.pointerByTouch=[],this.initialDistance=null,this.emitter=t,wi.instance)return wi.callbacks[this.phase].push(n),wi.instance;this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.bindEvents(),wi.instance=this,wi.callbacks[this.phase].push(n)}bindEvents(){const{emitter:t}=this;t.on(G.POINTER_DOWN,this.onPointerDown),t.on(G.POINTER_MOVE,this.onPointerMove),t.on(G.POINTER_UP,this.onPointerUp)}updatePointerPosition(t,e,n){const i=this.pointerByTouch.findIndex(a=>a.pointerId===t);i>=0&&(this.pointerByTouch[i]={x:e,y:n,pointerId:t})}onPointerDown(t){const{x:e,y:n}=t.client||{};if(!(e===void 0||n===void 0)&&(this.pointerByTouch.push({x:e,y:n,pointerId:t.pointerId}),t.pointerType==="touch"&&this.pointerByTouch.length===2)){wi.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),wi.callbacks.pinchstart.forEach(l=>l(t,{scale:0}))}}onPointerMove(t){if(this.pointerByTouch.length!==2||this.initialDistance===null)return;const{x:e,y:n}=t.client||{};if(e===void 0||n===void 0)return;this.updatePointerPosition(t.pointerId,e,n);const i=this.pointerByTouch[0].x-this.pointerByTouch[1].x,a=this.pointerByTouch[0].y-this.pointerByTouch[1].y,u=Math.sqrt(i*i+a*a)/this.initialDistance;wi.callbacks.pinchmove.forEach(f=>f(t,{scale:(u-1)*5}))}onPointerUp(t){var e;wi.callbacks.pinchend.forEach(n=>n(t,{scale:0})),wi.isPinching=!1,this.initialDistance=null,this.pointerByTouch=[],(e=wi.instance)===null||e===void 0||e.tryDestroy()}destroy(){this.emitter.off(G.POINTER_DOWN,this.onPointerDown),this.emitter.off(G.POINTER_MOVE,this.onPointerMove),this.emitter.off(G.POINTER_UP,this.onPointerUp),wi.instance=null}off(t,e){const n=wi.callbacks[t].indexOf(e);n>-1&&wi.callbacks[t].splice(n,1),this.tryDestroy()}tryDestroy(){Object.values(wi.callbacks).every(t=>t.length===0)&&this.destroy()}}wi.isPinching=!1,wi.instance=null,wi.callbacks={pinchstart:[],pinchmove:[],pinchend:[]};const fo=r=>r.map(t=>(0,na.Z)(t)?t.toLocaleLowerCase():t);class ss{constructor(t){this.map=new Map,this.boundHandlePinch=()=>{},this.recordKey=new Set,this.onKeyDown=e=>{e!=null&&e.key&&(this.recordKey.add(e.key),this.trigger(e))},this.onKeyUp=e=>{e!=null&&e.key&&this.recordKey.delete(e.key)},this.onWheel=e=>{this.triggerExtendKey(G.WHEEL,e)},this.onDrag=e=>{this.triggerExtendKey(G.DRAG,e)},this.handlePinch=(e,n)=>{this.triggerExtendKey(G.PINCH,Object.assign(Object.assign({},e),n))},this.onFocus=()=>{this.recordKey.clear()},this.emitter=t,this.bindEvents()}bind(t,e){t.length!==0&&(t.includes(G.PINCH)&&!this.pinchHandler&&(this.boundHandlePinch=this.handlePinch.bind(this),this.pinchHandler=new wi(this.emitter,"pinchmove",this.boundHandlePinch)),this.map.set(t,e))}unbind(t,e){this.map.forEach((n,i)=>{(0,S.Z)(i,t)&&(!e||e===n)&&this.map.delete(i)})}unbindAll(){this.map.clear()}match(t){const e=fo(Array.from(this.recordKey)).sort(),n=fo(t).sort();return(0,S.Z)(e,n)}bindEvents(){var t;const{emitter:e}=this;e.on(G.KEY_DOWN,this.onKeyDown),e.on(G.KEY_UP,this.onKeyUp),e.on(G.WHEEL,this.onWheel),e.on(G.DRAG,this.onDrag),(t=globalThis.addEventListener)===null||t===void 0||t.call(globalThis,"focus",this.onFocus)}trigger(t){this.map.forEach((e,n)=>{this.match(n)&&e(t)})}triggerExtendKey(t,e){this.map.forEach((n,i)=>{i.includes(t)&&(0,S.Z)(Array.from(this.recordKey),i.filter(a=>a!==t))&&n(e)})}destroy(){var t,e;this.unbindAll(),this.emitter.off(G.KEY_DOWN,this.onKeyDown),this.emitter.off(G.KEY_UP,this.onKeyUp),this.emitter.off(G.WHEEL,this.onWheel),this.emitter.off(G.DRAG,this.onDrag),(t=this.pinchHandler)===null||t===void 0||t.off("pinchmove",this.boundHandlePinch),(e=globalThis.removeEventListener)===null||e===void 0||e.call(globalThis,"blur",this.onFocus)}}class Yn extends E{constructor(t,e){super(t,(0,h.Z)({},Yn.defaultOptions,e)),this.shortcut=new ss(t.graph),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.clearStates=this.clearStates.bind(this),this.bindEvents()}onPointerDown(t){if(!this.validate(t)||!this.isKeydown()||this.startPoint)return;const{canvas:e,graph:n}=this.context,i=Object.assign({},this.options.style);this.options.style.lineWidth&&(i.lineWidth=+this.options.style.lineWidth/n.getZoom()),this.rectShape=new _.UL({id:"g6-brush-select",style:i}),e.appendChild(this.rectShape),this.startPoint=[t.canvas.x,t.canvas.y]}onPointerMove(t){var e;if(!this.startPoint)return;const{immediately:n,mode:i}=this.options;this.endPoint=xs(t,this.context.graph),(e=this.rectShape)===null||e===void 0||e.attr({x:Math.min(this.endPoint[0],this.startPoint[0]),y:Math.min(this.endPoint[1],this.startPoint[1]),width:Math.abs(this.endPoint[0]-this.startPoint[0]),height:Math.abs(this.endPoint[1]-this.startPoint[1])}),n&&i==="default"&&this.updateElementsStates(Za(this.startPoint,this.endPoint))}onPointerUp(t){if(this.startPoint){if(!this.endPoint){this.clearBrush();return}this.endPoint=xs(t,this.context.graph),this.updateElementsStates(Za(this.startPoint,this.endPoint)),this.clearBrush()}}clearStates(){this.endPoint||this.clearElementsStates()}clearElementsStates(){const{graph:t}=this.context,e=Object.values(t.getData()).reduce((n,i)=>Object.assign({},n,i.reduce((a,l)=>{var u;const f=(u=l.states||[])===null||u===void 0?void 0:u.filter(m=>m!==this.options.state);return a[me(l)]=f,a},{})),{});t.setElementState(e,this.options.animation)}updateElementsStates(t){const{graph:e}=this.context,{enableElements:n,state:i,mode:a,onSelect:l}=this.options,u=this.selector(e,t,n);let f={};switch(a){case"union":u.forEach(m=>{f[m]=[...e.getElementState(m),i]});break;case"diff":u.forEach(m=>{const x=e.getElementState(m);f[m]=x.includes(i)?x.filter(Z=>Z!==i):[...x,i]});break;case"intersect":u.forEach(m=>{const x=e.getElementState(m);f[m]=x.includes(i)?[i]:[]});break;case"default":default:u.forEach(m=>{f[m]=[i]});break}(0,xe.Z)(l)&&(f=l(f)),e.setElementState(f,this.options.animation)}selector(t,e,n){if(!n||n.length===0)return[];const i=[],a=t.getData();if(n.forEach(l=>{a[`${l}s`].forEach(u=>{const f=me(u);t.getElementVisibility(f)!=="hidden"&&Fr(t.getElementPosition(f),e)&&i.push(f)})}),n.includes("edge")){const l=a.edges;l==null||l.forEach(u=>{const{source:f,target:m}=u;i.includes(f)&&i.includes(m)&&i.push(me(u))})}return i}clearBrush(){var t;(t=this.rectShape)===null||t===void 0||t.remove(),this.rectShape=void 0,this.startPoint=void 0,this.endPoint=void 0}isKeydown(){const{trigger:t}=this.options,e=Array.isArray(t)?t:[t];return this.shortcut.match(e.filter(n=>n!=="drag"))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}bindEvents(){const{graph:t}=this.context;t.on(G.POINTER_DOWN,this.onPointerDown),t.on(G.POINTER_MOVE,this.onPointerMove),t.on(G.POINTER_UP,this.onPointerUp),t.on(F.CLICK,this.clearStates)}unbindEvents(){const{graph:t}=this.context;t.off(G.POINTER_DOWN,this.onPointerDown),t.off(G.POINTER_MOVE,this.onPointerMove),t.off(G.POINTER_UP,this.onPointerUp),t.off(F.CLICK,this.clearStates)}update(t){this.unbindEvents(),this.options=(0,h.Z)(this.options,t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}Yn.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 xs=(r,t)=>{if((r.targetType==="node"||r.targetType==="combo")&&!(r.nativeEvent.target instanceof HTMLCanvasElement)){const[e,n]=t.getCanvasByClient([r.client.x,r.client.y]);return[e,n]}return[r.canvas.x,r.canvas.y]},Ca=.8,La=["node","edge","combo"];function Na(r,t,e,n,i=0){n==="TB"&&t(r,i);const a=e(r);if(a)for(const l of a)Na(l,t,e,n,i+1);n==="BT"&&t(r,i)}function $a(r,t,e){const n=[[r,0]];for(;n.length;){const[i,a]=n.shift();t(i,a);const l=e(i);if(l)for(const u of l)n.push([u,a+1])}}function os(r,t,e,n,i="both"){if(t==="combo"||t==="node")return za(r,e,n,i);const a=r.getEdgeData(e);if(!a)return[];const l=za(r,a.source,n-1,i),u=za(r,a.target,n-1,i);return Array.from(new Set([...l,...u,e]))}function za(r,t,e,n="both"){const i=new Set,a=new Set,l=new Set;return $a(t,(u,f)=>{f>e||(l.add(u),r.getRelatedEdgesData(u,n).forEach(m=>{const x=me(m);!a.has(x)&&f<e&&(l.add(x),a.add(x))}))},u=>r.getRelatedEdgesData(u,n).map(f=>f.source===u?f.target:f.source).filter(f=>i.has(f)?!1:(i.add(f),!0))),Array.from(l)}function ba(r){return r.states||[]}var ws=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class vo extends E{constructor(t,e){super(t,Object.assign({},vo.defaultOptions,e)),this.onClickSelect=n=>ws(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.updateState(n),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.onClickCanvas=n=>ws(this,void 0,void 0,function*(){var i,a;this.validate(n)&&(yield this.clearState(),(a=(i=this.options).onClick)===null||a===void 0||a.call(i,n))}),this.shortcut=new ss(t.graph),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),La.forEach(e=>{t.on(`${e}:${G.CLICK}`,this.onClickSelect)}),t.on(F.CLICK,this.onClickCanvas)}get isMultipleSelect(){const{multiple:t,trigger:e}=this.options;return t&&this.shortcut.match(e)}getNeighborIds(t){const{target:e,targetType:n}=t,{graph:i}=this.context,{degree:a}=this.options;return os(i,n,e.id,typeof a=="function"?a(t):a).filter(l=>l!==e.id)}updateState(t){return ws(this,void 0,void 0,function*(){const{state:e,unselectedState:n,neighborState:i,animation:a}=this.options;if(!e&&!i&&!n)return;const{target:l}=t,{graph:u}=this.context,f=u.getElementData(l.id),m=ba(f).includes(e)?"unselect":"select",x={},Z=this.isMultipleSelect,V=[l.id],nt=this.getNeighborIds(t);if(Z)if(Object.assign(x,this.getDataStates()),m==="select"){const dt=(St,Dt)=>{St.forEach(Jt=>{const oe=new Set(u.getElementState(Jt));oe.add(Dt),oe.delete(n),x[Jt]=Array.from(oe)})};dt(V,e),dt(nt,i),n&&Object.keys(x).forEach(St=>{const Dt=x[St];!Dt.includes(e)&&!Dt.includes(i)&&!Dt.includes(n)&&x[St].push(n)})}else{const dt=x[l.id];x[l.id]=dt.filter(St=>St!==e&&St!==i),dt.includes(n)||x[l.id].push(n),nt.forEach(St=>{x[St]=x[St].filter(Dt=>Dt!==i),x[St].includes(e)||x[St].push(n)})}else if(m==="select"){Object.assign(x,this.getClearStates(!!n));const dt=(St,Dt)=>{St.forEach(Jt=>{x[Jt]||(x[Jt]=u.getElementState(Jt)),x[Jt].push(Dt)})};dt(V,e),dt(nt,i),n&&Object.keys(x).forEach(St=>{!V.includes(St)&&!nt.includes(St)&&x[St].push(n)})}else Object.assign(x,this.getClearStates());yield u.setElementState(x,a)})}getDataStates(){const{graph:t}=this.context,{nodes:e,edges:n,combos:i}=t.getData(),a={};return[...e,...n,...i].forEach(l=>{a[me(l)]=ba(l)}),a}getClearStates(t=!1){const{graph:e}=this.context,{state:n,unselectedState:i,neighborState:a}=this.options,l=new Set([n,i,a]),{nodes:u,edges:f,combos:m}=e.getData(),x={};return[...u,...f,...m].forEach(Z=>{const V=ba(Z),nt=V.filter(dt=>!l.has(dt));(t||nt.length!==V.length)&&(x[me(Z)]=nt)}),x}clearState(){return ws(this,void 0,void 0,function*(){const{graph:t}=this.context;yield t.setElementState(this.getClearStates(),this.options.animation)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;La.forEach(e=>{t.off(`${e}:${G.CLICK}`,this.onClickSelect)}),t.off(F.CLICK,this.onClickCanvas)}destroy(){this.unbindEvents(),super.destroy()}}vo.defaultOptions={animation:!0,enable:!0,multiple:!1,trigger:["shift"],state:"selected",neighborState:"selected",unselectedState:void 0,degree:0};function Ea(r){var t;return!!(!((t=r.style)===null||t===void 0)&&t.collapsed)}var xa=y(5759),Xs=y(37004),Ks=y(45642);function Ms(r,t){if(!r.startsWith(t))return!1;const e=r[t.length];return e>="A"&&e<="Z"}function Qs(r,t){return`${t}${(0,I.Z)(r)}`}function Ss(r,t,e=!0){if(!t||!Ms(r,t))return r;const n=r.slice(t.length);return e?(0,Ks.Z)(n):n}function Ci(r,t){const e=Object.entries(r).reduce((n,[i,a])=>(i==="className"||i==="class"||Ms(i,t)&&Object.assign(n,{[Ss(i,t)]:a}),n),{});if("opacity"in r){const n=Qs("opacity",t),i=r.opacity;if(n in r){const a=r[n];Object.assign(e,{opacity:i*a})}else Object.assign(e,{opacity:i})}return e}function qa(r,t){const e=t.length;return Object.keys(r).reduce((n,i)=>{if(i.startsWith(t)){const a=i.slice(e);n[a]=r[i]}return n},{})}function ls(r,t){const e=typeof t=="string"?[t]:t,n={};return Object.keys(r).forEach(i=>{e.find(a=>i.startsWith(a))||(n[i]=r[i])}),n}function Js(r,t,e){return Object.entries(r).reduce((n,[i,a])=>(Ms(i,t)?n[Qs(Ss(i,t,!1),e)]=a:n[i]=a,n),{})}function ra(r=0){if(typeof r=="number")return[r,r,r];const[t,e=t,n=t]=r;return[t,e,n]}var $i=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Bs(r,t){const{datum:e,graph:n}=t;return typeof r=="function"?r.call(n,e):Object.fromEntries(Object.entries(r).map(([i,a])=>typeof a=="function"?[i,a.call(n,e)]:[i,a]))}function zi(r,t){const e=(r==null?void 0:r.style)||{},n=(t==null?void 0:t.style)||{};for(const i in e)i in n||(n[i]=e[i]);return Object.assign({},r,t,{style:n})}function Xi(r){const{x:t,y:e,z:n,class:i,className:a,transform:l,transformOrigin:u,zIndex:f,visibility:m}=r;return $i(r,["x","y","z","class","className","transform","transformOrigin","zIndex","visibility"])}function As(r,t){const e=ra(r);let n={};return t.text&&!t.fontSize&&(n={fontSize:Math.min(...e)*.5}),t.src&&(!t.width||!t.height)&&(n={width:e[0]*.5,height:e[1]*.5}),n}function go(r){if(r)return typeof r=="string"||typeof r=="function"||Array.isArray(r)?{type:"group",field:t=>t.id,color:r,invert:!1}:r}function Os(r,t){if(!t)return{};const{type:e,color:n,field:i,invert:a}=t,l=f=>{const m=typeof n=="string"?be("palette",n):n;if(typeof m=="function"){const x={};return f.forEach(([Z,V])=>{x[Z]=m(a?1-V:V)}),x}else if(Array.isArray(m)){const x=a?[...m].reverse():m,Z={};return f.forEach(([V,nt])=>{Z[V]=x[nt%m.length]}),Z}return{}},u=(f,m)=>{var x;return typeof f=="string"?(x=m.data)===null||x===void 0?void 0:x[f]:f==null?void 0:f(m)};if(e==="group"){const f=(0,Ft.Z)(r,V=>{if(!i)return"default";const nt=u(i,V);return nt?String(nt):"default"}),m=Object.keys(f),x=l(m.map((V,nt)=>[V,nt])),Z={};return Object.entries(f).forEach(([V,nt])=>{nt.forEach(dt=>{Z[me(dt)]=x[V]})}),Z}else if(e==="value"){const[f,m]=r.reduce(([Z,V],nt)=>{const dt=u(i,nt);if(typeof dt!="number")throw new Error(rn(`Palette field ${i} is not a number`));return[Math.min(Z,dt),Math.max(V,dt)]},[1/0,-1/0]),x=m-f;return l(r.map(Z=>[Z.id,(u(i,Z)-f)/x]))}}function Fs(r){const t=typeof r=="string"?be("palette",r):r;if(typeof t!="function")return t}function ji(r,t){let e=2*r;return typeof t=="string"?e=r*Number(t.replace("%",""))/100:typeof t=="number"&&(e=t),isNaN(e)&&(e=2*r),e}function ja(r,t,e=1,n=!1){const i=n?e:1,a=(r.max[0]-r.min[0])*i;return ji(a,t)}function cs(r,t,e=1){const n=Q(r[0],r[1])*e;return ji(n,t)}var qi=y(42791);class us extends _.b_{constructor(t){Va(t.style),super(t),this.shapeMap={},this.animateMap={},this.render(this.attributes,this),this.setVisibility(),this.bindEvents()}get parsedAttributes(){return this.attributes}upsert(t,e,n,i,a){var l,u,f,m,x,Z,V,nt;const dt=this.shapeMap[t];if(n===!1){dt&&((l=a==null?void 0:a.beforeDestroy)===null||l===void 0||l.call(a,dt),i.removeChild(dt),delete this.shapeMap[t],(u=a==null?void 0:a.afterDestroy)===null||u===void 0||u.call(a,dt));return}const St=typeof e=="string"?be(ue.SHAPE,e):e;if(!St)throw new Error(rn(`Shape ${e} not found`));if(!dt||dt.destroyed||!(dt instanceof St)){dt&&((f=a==null?void 0:a.beforeDestroy)===null||f===void 0||f.call(a,dt),dt==null||dt.destroy(),(m=a==null?void 0:a.afterDestroy)===null||m===void 0||m.call(a,dt)),(x=a==null?void 0:a.beforeCreate)===null||x===void 0||x.call(a);const Dt=new St({className:t,style:n});return i.appendChild(Dt),this.shapeMap[t]=Dt,(Z=a==null?void 0:a.afterCreate)===null||Z===void 0||Z.call(a,Dt),Dt}return(V=a==null?void 0:a.beforeUpdate)===null||V===void 0||V.call(a,dt),Xa(dt,n),(nt=a==null?void 0:a.afterUpdate)===null||nt===void 0||nt.call(a,dt),dt}update(t={}){const e=Object.assign({},this.attributes,t);Va(e),Wa(this,e),this.render(e,this),this.setVisibility()}bindEvents(){}getGraphicStyle(t){return Xi(t)}get compositeShapes(){return[["badges","badge-"],["ports","port-"]]}animate(t,e){if(t.length===0)return null;const n=[];if(t[0].x!==void 0||t[0].y!==void 0||t[0].z!==void 0){const{x:a=0,y:l=0,z:u=0}=this.attributes;t.forEach(f=>{const{x:m=a,y:x=l,z:Z=u}=f;Object.assign(f,{transform:Z?[["translate3d",m,x,Z]]:[["translate",m,x]]})})}const i=super.animate(t,e);if(i&&(Ki(this,i),n.push(i)),Array.isArray(t)&&t.length>0){const a=["transform","transformOrigin","x","y","z","zIndex"];if(Object.keys(t[0]).some(l=>!a.includes(l))){Object.entries(this.shapeMap).forEach(([u,f])=>{const m=`get${(0,I.Z)(u)}Style`,x=this[m];if((0,xe.Z)(x)){const Z=t.map(nt=>x.call(this,Object.assign(Object.assign({},this.attributes),nt))),V=f.animate($e(Z),e);V&&(Ki(f,V),n.push(V))}});const l=(u,f)=>{if(!(0,qi.Z)(u)){const m=`get${(0,I.Z)(f)}Style`,x=this[m];if((0,xe.Z)(x)){const Z=t.map(V=>x.call(this,Object.assign(Object.assign({},this.attributes),V)));Object.entries(Z[0]).map(([V])=>{const nt=Z.map(St=>St[V]),dt=u[V];if(dt){const St=dt.animate($e(nt),e);St&&(Ki(dt,St),n.push(St))}})}}};this.compositeShapes.forEach(([u,f])=>{const m=qa(this.shapeMap,f);l(m,u)})}}return Tn(n)}getShape(t){return this.shapeMap[t]}setVisibility(){const{visibility:t}=this.attributes;Zr(this,t)}destroy(){this.shapeMap={},this.animateMap={},super.destroy()}}function Ki(r,t){t==null||t.finished.then(()=>{const e=r.activeAnimations.findIndex(n=>n===t);e>-1&&r.activeAnimations.splice(e,1)})}function Va(r){if(!r)return{};if("x"in r||"y"in r||"z"in r){const{x:t=0,y:e=0,z:n,transform:i}=r,a=Pe(t,e,n,i);a&&(r.transform=a)}return r}var $s=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class ua extends us{constructor(t){super(zi({style:ua.defaultStyleProps},t))}isTextStyle(t){return Ms(t,"label")}isBackgroundStyle(t){return Ms(t,"background")}getTextStyle(t){const e=this.getGraphicStyle(t),{padding:n}=e,i=$s(e,["padding"]);return ls(i,"background")}getBackgroundStyle(t){if(t.background===!1)return!1;const e=this.getGraphicStyle(t),{wordWrap:n,wordWrapWidth:i,padding:a}=e,l=Ci(e,"background"),{min:[u,f],center:[m,x],halfExtents:[Z,V]}=this.shapeMap.text.getGeometryBounds(),[nt,dt,St,Dt]=Ne(a),Jt=Z*2+Dt+dt,{width:oe,height:ge}=l;oe&&ge?Object.assign(l,{x:m-Number(oe)/2,y:x-Number(ge)/2}):Object.assign(l,{x:u-Dt,y:f-nt,width:n?Math.min(Jt,i+Dt+dt):Jt,height:V*2+nt+St});const{radius:Be}=l;if(typeof Be=="string"&&Be.endsWith("%")){const un=Number(Be.replace("%",""))/100;l.radius=Math.min(+l.width,+l.height)*un}return l}render(t=this.parsedAttributes,e=this){this.upsert("text",_.xv,this.getTextStyle(t),e),this.upsert("background",_.UL,this.getBackgroundStyle(t),e)}getGeometryBounds(){return(this.getShape("background")||this.getShape("text")).getGeometryBounds()}}ua.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 bi extends us{constructor(t){super(zi({style:bi.defaultStyleProps},t))}getBadgeStyle(t){return this.getGraphicStyle(t)}render(t=this.parsedAttributes,e=this){this.upsert("label",ua,this.getBadgeStyle(t),e)}getGeometryBounds(){const t=this.getShape("label");return(t.getShape("background")||t.getShape("text")).getGeometryBounds()}}bi.defaultStyleProps={padding:[2,4,2,4],fontSize:10,wordWrap:!1,backgroundRadius:"50%",backgroundOpacity:1};function Kn(r,t=!0){const e=[];return r.forEach((n,i)=>{e.push([i===0?"M":"L",...n])}),t&&e.push(["Z"]),e}const wa={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 po(r){const t=r.replace(/[\n\r]/g,"").replace(/-/g," -").replace(/(\d*\.)(\d+)(?=\.)/g,"$1$2 ").trim().split(/\s*,|\s+/),e=[];let n="",i={};for(;t.length>0;){let a=t.shift();a in wa?n=a:t.unshift(a),i={type:n},wa[n].forEach(f=>{a=t.shift(),i[f]=a}),n==="M"?n="L":n==="m"&&(n="l");const[l,...u]=Object.values(i);e.push([l,...u.map(Number)])}return e}function mo(r){const t=[];return(typeof r=="string"?po(r):r).forEach(n=>{const i=n[0];if(i==="Z"){t.push(t[0]);return}if(i!=="A")for(let a=1;a<n.length;a=a+2)t.push([n[a],n[a+1],0]);else{const a=n.length;t.push([n[a-2],n[a-1],0])}}),t}const yo=r=>{if(r.length<2)return[["M",0,0],["L",0,0]];const t=r[0],e=r[1],n=r[r.length-1],i=r[r.length-2];r.unshift(i,n),r.push(t,e);const a=[["M",n[0],n[1]]];for(let l=1;l<r.length-2;l+=1){const[u,f]=r[l-1],[m,x]=r[l],[Z,V]=r[l+1],[nt,dt]=l!==r.length-2?r[l+2]:[Z,V],St=m+(Z-u)/6,Dt=x+(V-f)/6,Jt=Z-(nt-m)/6,oe=V-(dt-x)/6;a.push(["C",St,Dt,Jt,oe,Z,V])}return a};function Da(r,t,e,n,i,a,l){const[u,f]=Qe(r,t),m={textAlign:t==="left"?"right":t==="right"?"left":"center",textBaseline:t==="top"?"bottom":t==="bottom"?"top":"middle",transform:[["translate",u+e,f+n]]};if(t==="center"||!i)return m;const x=mo(a);if(!x||x.length<=3)return m;const Z=x.map((dt,St)=>{const Dt=dt,Jt=x[(St+1)%x.length];return(0,S.Z)(Dt,Jt)?null:[Dt,Jt]}).filter(Boolean),V=Ri([u,f],Z),nt=Zi([u,f],V);if(nt&&V&&(m.transform=[["translate",nt[0]+e,nt[1]+n]],l)){const dt=Math.atan((V[0][1]-V[1][1])/(V[0][0]-V[1][0]));m.transform.push(["rotate",dt/Math.PI*180]),m.textAlign="center",(t==="right"||t==="left")&&(dt>0?m.textBaseline=t==="right"?"bottom":"top":m.textBaseline=t==="right"?"top":"bottom")}return m}var bo=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class hs extends us{constructor(t){super(zi({style:hs.defaultStyleProps},t))}getLabelStyle(t){if(!t.label||!t.d||t.d.length===0)return!1;const e=Ci(this.getGraphicStyle(t),"label"),{maxWidth:n,offsetX:i,offsetY:a,autoRotate:l,placement:u,closeToPath:f}=e,m=bo(e,["maxWidth","offsetX","offsetY","autoRotate","placement","closeToPath"]),x=this.shapeMap.key,Z=x==null?void 0:x.getRenderBounds();return Object.assign(Da(Z,u,i,a,f,t.d,l),{wordWrapWidth:ja(Z,n)},m)}getKeyStyle(t){return this.getGraphicStyle(t)}render(t,e){this.upsert("key",_.y$,this.getKeyStyle(t),e),this.upsert("label",ua,this.getLabelStyle(t),e)}}hs.defaultStyleProps={label:!0,labelPlacement:"bottom",labelCloseToPath:!0,labelAutoRotate:!0,labelOffsetX:0,labelOffsetY:0};function Fo(r){const t=[],e=n=>{n!=null&&n.children.length&&n.children.forEach(i=>{t.push(i),e(i)})};return e(r),t}function _o(r){const t=[];let e=r.parentNode;for(;e;)t.push(e),e=e.parentNode;return t}class Ts extends _.Ee{constructor(t){super(t),this.onMounted=()=>{this.handleRadius()},this.onAttrModified=()=>{this.handleRadius()},Ia=this,this.isMutationObserved=!0,this.addEventListener(_.Dk.MOUNTED,this.onMounted),this.addEventListener(_.Dk.ATTR_MODIFIED,this.onAttrModified)}handleRadius(){const{radius:t,clipPath:e,width:n=0,height:i=0}=this.attributes;if(t&&n&&i){const[a,l]=this.getBounds().min,u={x:a,y:l,radius:t,width:n,height:i};if(e)Object.assign(this.parsedStyle.clipPath.style,u);else{const f=new _.UL({style:u});this.style.clipPath=f}}else e&&(this.style.clipPath=null)}}const ts=new WeakMap;let Ia=null;const _s=r=>{if(Ia&&_o(Ia).includes(r)){const t=ts.get(r);t?t.includes(Ia)||t.push(Ia):ts.set(r,[Ia])}},Ya=r=>{const t=ts.get(r);t&&t.forEach(e=>e.handleRadius())};class es extends us{constructor(t){super(t)}isImage(){const{src:t}=this.attributes;return!!t}getIconStyle(t=this.attributes){const{width:e=0,height:n=0}=t,i=this.getGraphicStyle(t);return this.isImage()?Object.assign({x:-e/2,y:-n/2},i):Object.assign({textBaseline:"middle",textAlign:"center"},i)}render(t=this.attributes,e=this){this.upsert("icon",this.isImage()?Ts:_.xv,this.getIconStyle(t),e)}}class ia extends us{get context(){return this.config.context}get parsedAttributes(){return this.attributes}onframe(){}animate(t,e){const n=super.animate(t,e);return n&&(n.onframe=()=>this.onframe(),n.finished.then(()=>this.onframe())),n}}var Zs=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class ha extends ia{constructor(t){super(zi({style:ha.defaultStyleProps},t)),this.type="node"}getSize(t=this.attributes){const{size:e}=t;return ra(e)}getKeyStyle(t){const e=this.getGraphicStyle(t);return Object.assign(ls(e,["label","halo","icon","badge","port"]))}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=Ci(this.getGraphicStyle(t),"label"),{placement:n,maxWidth:i,offsetX:a,offsetY:l}=e,u=Zs(e,["placement","maxWidth","offsetX","offsetY"]),f=this.getShape("key").getLocalBounds();return Object.assign(ri(f,n,a,l),{wordWrapWidth:ja(f,i)},u)}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),{fill:n}=e,i=Zs(e,["fill"]),a=Ci(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign(Object.assign({},i),{stroke:n}),a)}getIconStyle(t){if(t.icon===!1||!t.iconText&&!t.iconSrc)return!1;const e=Ci(this.getGraphicStyle(t),"icon");return Object.assign(As(t.size,e),e)}getBadgesStyle(t){var e;const n=qa(this.shapeMap,"badge-"),i={};if(Object.keys(n).forEach(Z=>{i[Z]=!1}),t.badge===!1||!(!((e=t.badges)===null||e===void 0)&&e.length))return i;const{badges:a=[],badgePalette:l,opacity:u=1}=t,f=Zs(t,["badges","badgePalette","opacity"]),m=Fs(l),x=Ci(this.getGraphicStyle(f),"badge");return a.forEach((Z,V)=>{i[V]=Object.assign(Object.assign({backgroundFill:m?m[V%(m==null?void 0:m.length)]:void 0,opacity:u},x),this.getBadgeStyle(Z))}),i}getBadgeStyle(t){const e=this.getShape("key"),{placement:n="top",offsetX:i,offsetY:a}=t,l=Zs(t,["placement","offsetX","offsetY"]),u=ri(e.getLocalBounds(),n,i,a,!0);return Object.assign(Object.assign({},u),l)}getPortsStyle(t){var e;const n=this.getPorts(),i={};if(Object.keys(n).forEach(u=>{i[u]=!1}),t.port===!1||!(!((e=t.ports)===null||e===void 0)&&e.length))return i;const a=Ci(this.getGraphicStyle(t),"port"),{ports:l=[]}=t;return l.forEach((u,f)=>{const m=u.key||f,x=Object.assign(Object.assign({},a),u);if(Cr(x))i[m]=!1;else{const[Z,V]=this.getPortXY(t,u);i[m]=Object.assign({transform:[["translate",Z,V]]},x)}}),i}getPortXY(t,e){const{placement:n="left"}=e,i=this.getShape("key");return Er(di(this.context,i),n)}getPorts(){return qa(this.shapeMap,"port-")}getCenter(){return this.getShape("key").getBounds().center}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return xi(t,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t),i=this.getShape("key");this.upsert("halo",i.constructor,n,e)}drawIconShape(t,e){const n=this.getIconStyle(t);this.upsert("icon",es,n,e),_s(this)}drawBadgeShapes(t,e){const n=this.getBadgesStyle(t);Object.keys(n).forEach(i=>{const a=n[i];this.upsert(`badge-${i}`,bi,a,e)})}drawPortShapes(t,e){const n=this.getPortsStyle(t);Object.keys(n).forEach(i=>{const a=n[i],l=`port-${i}`;this.upsert(l,_.Cd,a,e)})}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",ua,n,e)}_drawKeyShape(t,e){return this.drawKeyShape(t,e)}render(t=this.parsedAttributes,e=this){this._drawKeyShape(t,e),this.getShape("key")&&(this.drawHaloShape(t,e),this.drawIconShape(t,e),this.drawBadgeShapes(t,e),this.drawLabelShape(t,e),this.drawPortShapes(t,e))}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&Ya(this)}onframe(){this.drawBadgeShapes(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this)}}ha.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 di(r,t){if(!r)return t.getLocalBounds();const e=r.canvas.getLayer(),n=t.cloneNode();Zr(n,"hidden"),e.appendChild(n);const i=n.getLocalBounds();return n.destroy(),i}class Wi extends ha{constructor(t){super(zi({style:Wi.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",_.Cd,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{r:Math.min(...this.getSize(t))/2})}getIconStyle(t){const e=super.getIconStyle(t),{r:n}=this.getShape("key").attributes,i=n*2*Ca;return e?Object.assign({width:i,height:i},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return $r(t,n,e)}}Wi.defaultStyleProps={size:32};class Ma extends ha{constructor(t){super(t)}get parsedAttributes(){return this.attributes}drawKeyShape(t,e){return this.upsert("key",_.mg,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t);return Object.assign(Object.assign({},e),{points:this.getPoints(t)})}getIntersectPoint(t,e=!1){var n,i;const{points:a}=this.getShape("key").attributes,l=[+(((n=this.attributes)===null||n===void 0?void 0:n.x)||0),+(((i=this.attributes)===null||i===void 0?void 0:i.y)||0)];return dr(t,l,a,!0,e).point}}class Ha extends Ma{constructor(t){super(t)}getPoints(t){const[e,n]=this.getSize(t);return va(e,n)}}var qs=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class ta extends Wi{constructor(t){super(zi({style:ta.defaultStyleProps},t))}parseOuterR(){const{size:t}=this.parsedAttributes;return Math.min(...ra(t))/2}parseInnerR(){const{innerR:t}=this.parsedAttributes;return(0,na.Z)(t)?parseInt(t)/100*this.parseOuterR():t}drawDonutShape(t,e){const{donuts:n}=t;if(!(n!=null&&n.length))return;const i=n.map(Z=>(0,sn.Z)(Z)?{value:Z}:Z),a=Ci(this.getGraphicStyle(t),"donut"),l=Fs(t.donutPalette);if(!l)return;const u=i.reduce((Z,V)=>{var nt;return Z+((nt=V.value)!==null&&nt!==void 0?nt:0)},0),f=this.parseOuterR(),m=this.parseInnerR();let x=0;i.forEach((Z,V)=>{const{value:nt=0,color:dt=l[V%l.length]}=Z,St=qs(Z,["value","color"]),Dt=(u===0?1/i.length:nt/u)*360;this.upsert(`round${V}`,_.y$,Object.assign(Object.assign(Object.assign({},a),{d:wo(f,m,x,x+Dt),fill:dt}),St),e),x+=Dt})}render(t,e=this){super.render(t,e),this.drawDonutShape(t,e)}}ta.defaultStyleProps={innerR:"50%",donuts:[],donutPalette:"tableau"};const Cs=(r,t,e,n)=>[r+Math.sin(n)*e,t-Math.cos(n)*e],Eo=(r,t,e,n)=>n<=0||e<=n?[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"]]:[["M",r-e,t],["A",e,e,0,1,1,r+e,t],["A",e,e,0,1,1,r-e,t],["Z"],["M",r+n,t],["A",n,n,0,1,0,r-n,t],["A",n,n,0,1,0,r+n,t],["Z"]],xo=(r,t,e,n,i,a)=>{const[l,u]=[i/360*2*Math.PI,a/360*2*Math.PI],f=[Cs(r,t,n,l),Cs(r,t,e,l),Cs(r,t,e,u),Cs(r,t,n,u)],m=u-l>Math.PI?1:0;return[["M",f[0][0],f[0][1]],["L",f[1][0],f[1][1]],["A",e,e,0,m,1,f[2][0],f[2][1]],["L",f[3][0],f[3][1]],["A",n,n,0,m,0,f[0][0],f[0][1]],["Z"]]},wo=(r=0,t=0,e,n)=>{const[i,a]=[0,0];return Math.abs(e-n)%360<1e-6?Eo(i,a,r,t):xo(i,a,r,t,e,n)};class ds extends ha{constructor(t){super(zi({style:ds.defaultStyleProps},t))}drawKeyShape(t,e){return this.upsert("key",_.Pj,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getSize(t);return Object.assign(Object.assign({},e),{rx:n/2,ry:i/2})}getIconStyle(t){const e=super.getIconStyle(t),{rx:n,ry:i}=this.getShape("key").attributes,a=Math.min(+n,+i)*2*Ca;return e?Object.assign({width:a,height:a},e):!1}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return $r(t,n,e)}}ds.defaultStyleProps={size:[45,35]};class ns extends Ma{constructor(t){super(t)}getOuterR(t){return t.outerR||Math.min(...this.getSize(t))/2}getPoints(t){return ga(this.getOuterR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getOuterR(t)*Ca;return e?Object.assign({width:n,height:n},e):!1}}var ii=y(14634),da=y(84502),Mi=y(49527),Zo=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class zs extends ha{constructor(t){super(Object.assign(Object.assign({},t),{style:Object.assign({},zs.defaultStyleProps,t.style)})),this.rootPointerEvent=new _.nR(null),this.forwardEvents=e=>{const n=this.context.canvas,i=n.context.renderingContext.root.ownerDocument.defaultView;this.normalizeToPointerEvent(e,i).forEach(l=>{const u=this.bootstrapEvent(this.rootPointerEvent,l,i,e);(0,Xs.Z)(n.context.eventService,"mappingTable.pointerupoutside",[]),n.context.eventService.mapEvent(u)})}}get eventService(){return this.context.canvas.context.eventService}get events(){return[G.CLICK,G.POINTER_DOWN,G.POINTER_MOVE,G.POINTER_UP,G.POINTER_OVER,G.POINTER_LEAVE]}getDomElement(){return this.getShape("key").getDomElement()}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.drawPortShapes(t,e)}getKeyStyle(t){const e=(0,da.Z)(t,["dx","dy","innerHTML","pointerEvents","cursor"]),{dx:n=0,dy:i=0}=e,a=Zo(e,["dx","dy"]),[l,u]=this.getSize(t);return Object.assign(Object.assign({x:n,y:i},a),{width:l,height:u})}drawKeyShape(t,e){const n=this.getKeyStyle(t),{x:i,y:a,width:l=0,height:u=0}=n,f=this.upsert("key-container",_.UL,{x:i,y:a,width:l,height:u,opacity:0},e);return this.upsert("key",_.k9,n,f)}connectedCallback(){if(!(this.context.canvas.getRenderer("main")instanceof ii.Th))return;const n=this.getDomElement();this.events.forEach(i=>{n.addEventListener(i,this.forwardEvents)})}attributeChangedCallback(t,e,n){t==="zIndex"&&e!==n&&(this.getDomElement().style.zIndex=n)}destroy(){const t=this.getDomElement();this.events.forEach(e=>{t.removeEventListener(e,this.forwardEvents)}),super.destroy()}normalizeToPointerEvent(t,e){const n=[];if(e.isTouchEvent(t))for(let i=0;i<t.changedTouches.length;i++){const a=t.changedTouches[i];(0,Mi.Z)(a.button)&&(a.button=0),(0,Mi.Z)(a.buttons)&&(a.buttons=1),(0,Mi.Z)(a.isPrimary)&&(a.isPrimary=t.touches.length===1&&t.type==="touchstart"),(0,Mi.Z)(a.width)&&(a.width=a.radiusX||1),(0,Mi.Z)(a.height)&&(a.height=a.radiusY||1),(0,Mi.Z)(a.tiltX)&&(a.tiltX=0),(0,Mi.Z)(a.tiltY)&&(a.tiltY=0),(0,Mi.Z)(a.pointerType)&&(a.pointerType="touch"),(0,Mi.Z)(a.pointerId)&&(a.pointerId=a.identifier||0),(0,Mi.Z)(a.pressure)&&(a.pressure=a.force||.5),(0,Mi.Z)(a.twist)&&(a.twist=0),(0,Mi.Z)(a.tangentialPressure)&&(a.tangentialPressure=0),a.isNormalized=!0,a.type=t.type,n.push(a)}else if(e.isMouseEvent(t)){const i=t;(0,Mi.Z)(i.isPrimary)&&(i.isPrimary=!0),(0,Mi.Z)(i.width)&&(i.width=1),(0,Mi.Z)(i.height)&&(i.height=1),(0,Mi.Z)(i.tiltX)&&(i.tiltX=0),(0,Mi.Z)(i.tiltY)&&(i.tiltY=0),(0,Mi.Z)(i.pointerType)&&(i.pointerType="mouse"),(0,Mi.Z)(i.pointerId)&&(i.pointerId=1),(0,Mi.Z)(i.pressure)&&(i.pressure=.5),(0,Mi.Z)(i.twist)&&(i.twist=0),(0,Mi.Z)(i.tangentialPressure)&&(i.tangentialPressure=0),i.isNormalized=!0,n.push(i)}else n.push(t);return n}transferMouseData(t,e){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.altKey=e.altKey,t.metaKey=e.metaKey,t.shiftKey=e.shiftKey,t.ctrlKey=e.ctrlKey,t.button=e.button,t.buttons=e.buttons,t.client.x=e.clientX,t.client.y=e.clientY,t.movement.x=e.movementX,t.movement.y=e.movementY,t.page.x=e.pageX,t.page.y=e.pageY,t.screen.x=e.screenX,t.screen.y=e.screenY,t.relatedTarget=null}bootstrapEvent(t,e,n,i){t.view=n,t.originalEvent=null,t.nativeEvent=i,t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist,this.transferMouseData(t,e);const{x:a,y:l}=this.getViewportXY(e);t.viewport.x=a,t.viewport.y=l;const[u,f]=this.context.canvas.getCanvasByViewport([a,l]);return t.canvas.x=u,t.canvas.y=f,t.global.copyFrom(t.canvas),t.offset.copyFrom(t.canvas),t.isTrusted=i.isTrusted,t.type==="pointerleave"&&(t.type="pointerout"),t}getViewportXY(t){let e,n;const{offsetX:i,offsetY:a,clientX:l,clientY:u}=t;if(!(0,z.Z)(i)&&!(0,z.Z)(a))e=i,n=a;else{const f=this.eventService.client2Viewport({x:l,y:u});e=f.x,n=f.y}return{x:e,y:n}}onframe(){super.onframe();const{opacity:t}=this.attributes;this.getDomElement().style.opacity=`${t}`}}zs.defaultStyleProps={size:[160,80],halo:!1,icon:!1,label:!1,pointerEvents:"auto"};var to=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Ns extends ha{constructor(t){super(zi({style:Ns.defaultStyleProps},t))}getKeyStyle(t){const[e,n]=this.getSize(t),i=super.getKeyStyle(t),{fillOpacity:a,opacity:l=a}=i,u=to(i,["fillOpacity","opacity"]);return Object.assign(Object.assign({opacity:l},u),{width:e,height:n,x:-e/2,y:-n/2})}getBounds(){return this.getShape("key").getBounds()}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getShape("key").attributes,{fill:n,stroke:i}=e,a=to(e,["fill","stroke"]),l=Ci(this.getGraphicStyle(t),"halo"),u=Number(l.lineWidth),[f,m]=w(this.getSize(t),[u,u]),{lineWidth:x}=l,Z={fill:"transparent",lineWidth:x/2,width:f-x/2,height:m-x/2,x:-(f-x/2)/2,y:-(m-x/2)/2};return Object.assign(Object.assign({},l),Z)}getIconStyle(t){const e=super.getIconStyle(t),[n,i]=this.getSize(t);return e?Object.assign({width:n*Ca,height:i*Ca},e):!1}drawKeyShape(t,e){const n=this.upsert("key",Ts,this.getKeyStyle(t),e);return _s(this),n}drawHaloShape(t,e){this.upsert("halo",_.UL,this.getHaloStyle(t),e)}update(t){super.update(t),t&&("x"in t||"y"in t||"z"in t)&&Ya(this)}}Ns.defaultStyleProps={size:32};class zo extends ha{constructor(t){super(t)}getKeyStyle(t){const[e,n]=this.getSize(t);return Object.assign(Object.assign({},super.getKeyStyle(t)),{width:e,height:n,x:-e/2,y:-n/2})}getIconStyle(t){const e=super.getIconStyle(t),{width:n,height:i}=this.getShape("key").attributes;return e?Object.assign({width:n*Ca,height:i*Ca},e):!1}drawKeyShape(t,e){return this.upsert("key",_.UL,this.getKeyStyle(t),e)}}class js extends Ma{constructor(t){super(t)}getInnerR(t){return t.innerR||this.getOuterR(t)*3/8}getOuterR(t){return Math.min(...this.getSize(t))/2}getPoints(t){return Si(this.getOuterR(t),this.getInnerR(t))}getIconStyle(t){const e=super.getIconStyle(t),n=this.getInnerR(t)*2*Ca;return e?Object.assign({width:n,height:n},e):!1}getPortXY(t,e){const{placement:n="top"}=e,i=this.getShape("key").getLocalBounds(),a=Sa(this.getOuterR(t),this.getInnerR(t));return Er(i,n,a,!1)}}class Ps extends Ma{constructor(t){super(zi({style:Ps.defaultStyleProps},t))}getPoints(t){const{direction:e}=t,[n,i]=this.getSize(t);return Li(n,i,e)}getPortXY(t,e){const{direction:n}=t,{placement:i="top"}=e,a=this.getShape("key").getLocalBounds(),[l,u]=this.getSize(t),f=Ls(l,u,n);return Er(a,i,f,!1)}getIconStyle(t){const{icon:e,iconText:n,iconSrc:i,direction:a}=t;if(e===!1||(0,qi.Z)(n||i))return!1;const l=Ci(this.getGraphicStyle(t),"icon"),u=this.getShape("key").getLocalBounds(),[f,m]=vn(u,a),x=Qn(u,a)*2*Ca;return Object.assign({x:f,y:m,width:x,height:x},l)}}Ps.defaultStyleProps={size:40,direction:"up"};var eo=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Ba extends ha{constructor(t){super(zi({style:Ba.defaultStyleProps},t)),this.type="combo",this.updateComboPosition(this.parsedAttributes)}getKeySize(t){const{collapsed:e,childrenNode:n=[]}=t;return n.length===0?this.getEmptyKeySize(t):e?this.getCollapsedKeySize(t):this.getExpandedKeySize(t)}getEmptyKeySize(t){const{padding:e,collapsedSize:n}=t,[i,a,l,u]=Ne(e);return w(ra(n),[u+a,i+l,0])}getCollapsedKeySize(t){return ra(t.collapsedSize)}getExpandedKeySize(t){const e=this.getContentBBox(t);return[q(e),Ct(e),0]}getContentBBox(t){const{childrenNode:e=[],padding:n}=t,i=e.map(l=>this.context.element.getElement(l)).filter(Boolean);if(i.length===0){const l=new _.mN,{x:u=0,y:f=0,size:m}=t,[x,Z]=ra(m);return l.setMinMax([u-x/2,f-Z/2,0],[u+x/2,f+Z/2,0]),l}const a=qt(i.map(l=>l.getBounds()));return n?Ut(a,n):a}drawCollapsedMarkerShape(t,e){const n=this.getCollapsedMarkerStyle(t);this.upsert("collapsed-marker",es,n,e),_s(this)}getCollapsedMarkerStyle(t){if(!t.collapsed||!t.collapsedMarker)return!1;const e=Ci(this.getGraphicStyle(t),"collapsedMarker"),{type:n}=e,i=eo(e,["type"]),a=this.getShape("key"),[l,u]=Qe(a.getLocalBounds(),"center"),f=Object.assign(Object.assign({},i),{x:l,y:u});if(n){const m=this.getCollapsedMarkerText(n,t);Object.assign(f,{text:m})}return f}getCollapsedMarkerText(t,e){const{childrenData:n=[]}=e,{model:i}=this.context;return t==="descendant-count"?i.getDescendantsData(this.id).length.toString():t==="child-count"?n.length.toString():t==="node-count"?i.getDescendantsData(this.id).filter(a=>i.getElementType(me(a))==="node").length.toString():(0,xe.Z)(t)?t(n):""}getComboPosition(t){const{x:e=0,y:n=0,collapsed:i,childrenData:a=[]}=t;if(a.length===0)return[+e,+n,0];if(i){const{model:l}=this.context,u=l.getDescendantsData(this.id).filter(f=>!l.isCombo(me(f)));if(u.length>0&&u.some(Oe)){const f=u.reduce((m,x)=>w(m,Wt(x)),[0,0,0]);return it(f,u.length)}return[+e,+n,0]}return this.getContentBBox(t).center}getComboStyle(t){const[e,n]=this.getComboPosition(t);return{x:e,y:n,transform:[["translate",e,n]]}}updateComboPosition(t){const e=this.getComboStyle(t);Object.assign(this.style,e);const{x:n,y:i}=e;this.context.model.syncNodeLikeDatum({id:this.id,style:{x:n,y:i}}),Ya(this)}render(t,e=this){super.render(t,e),this.drawCollapsedMarkerShape(t,e)}update(t={}){super.update(t),this.updateComboPosition(this.parsedAttributes)}onframe(){super.onframe(),this.attributes.collapsed||this.updateComboPosition(this.parsedAttributes),this.drawKeyShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(this.attributes.collapsed?t:t.map(i=>{var{x:a,y:l,z:u,transform:f}=i,m=eo(i,["x","y","z","transform"]);return m}),e);return n&&new Proxy(n,{set:(i,a,l)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,l))})}}Ba.defaultStyleProps={childrenNode:[],droppable:!0,draggable:!0,collapsed:!1,collapsedSize:32,collapsedMarker:!0,collapsedMarkerZIndex:1,collapsedMarkerFontSize:12,collapsedMarkerTextAlign:"center",collapsedMarkerTextBaseline:"middle",collapsedMarkerType:"child-count"};class Ws extends Ba{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",_.Cd,this.getKeyStyle(t),e)}getKeyStyle(t){const{collapsed:e}=t,n=super.getKeyStyle(t),[i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},n),e&&Ci(n,"collapsed")),{r:i/2})}getCollapsedKeySize(t){const[e,n]=ra(t.collapsedSize),i=Math.max(e,n)/2;return[i*2,i*2,0]}getExpandedKeySize(t){const e=this.getContentBBox(t),[n,i]=Ht(e),a=Math.sqrt(Math.pow(n,2)+Math.pow(i,2))/2;return[a*2,a*2,0]}getIntersectPoint(t,e=!1){const n=this.getShape("key").getBounds();return $r(t,n,e)}}class Mo extends Ba{constructor(t){super(t)}drawKeyShape(t,e){return this.upsert("key",_.UL,this.getKeyStyle(t),e)}getKeyStyle(t){const e=super.getKeyStyle(t),[n,i]=this.getKeySize(t);return Object.assign(Object.assign(Object.assign({},e),t.collapsed&&Ci(e,"collapsed")),{width:n,height:i,x:-n/2,y:-i/2})}}var no=y(47182);const ro={padding:10};function Pa(r,t,e,n,i,a){const{padding:l}=Object.assign(ro,a),u=Lt(e,l),f=Lt(n,l),m=[r,...i,t];let x=null;const Z=[];for(let V=0,nt=m.length;V<nt-1;V++){const dt=V+1,St=m[V],Dt=m[dt],Jt=Or(St,Dt);let oe=null;if(V===0)if(dt===nt-1)if(u.intersects(f))oe=At(St,Dt,u,f);else if(!Ve(St,u)&&!Ve(Dt,f)){const ge=xn(St,u),Be=xn(Dt,f);oe=fs(ge,Be,Fi(ge,Be)),oe.points.unshift(ge),oe.points.push(Be)}else Jt||(oe=el(St,Dt,u,f));else te(Dt,u)?oe=At(St,Dt,u,Lt(Dt,l),x):Jt||(oe=Rs(St,Dt,u));else dt===nt-1?te(St,f)?oe=At(St,Dt,Lt(St,l),f,x):Jt||(oe=Gs(St,Dt,f,x)):Jt||(oe=fs(St,Dt,x));oe?(Z.push(...oe.points),x=oe.direction):x=Fi(St,Dt),dt<nt-1&&Z.push(Dt)}return Z.map(gt)}const fa={N:"S",S:"N",W:"E",E:"W"},ks={N:-Math.PI/2,S:Math.PI/2,E:0,W:Math.PI};function Fi(r,t){const[e,n]=r,[i,a]=t;return e===i?n>a?"N":"S":n===a?e>i?"W":"E":null}function io(r,t){return t==="N"||t==="S"?Ct(r):q(r)}function fs(r,t,e){const n=[r[0],t[1]],i=[t[0],r[1]],a=Fi(r,n),l=Fi(r,i),u=e?fa[e]:null,f=a===e||a!==u&&l!==e?n:i;return{points:[f],direction:Fi(f,t)}}function Rs(r,t,e){if(Ve(r,e)){const n=X(r,t,e);return{points:[n],direction:Fi(n,t)}}else{const n=xn(r,e),a=["left","right"].includes(on(r,e))?[t[0],n[1]]:[n[0],t[1]];return{points:[a],direction:Fi(a,t)}}}function Gs(r,t,e,n){const i=Ve(t,e)?t:xn(t,e),a=[[i[0],r[1]],[r[0],i[1]]],l=a.filter(f=>Ye(f,e)&&!ke(f,e,!0)),u=l.filter(f=>Fi(f,r)!==n);if(u.length>0){const f=u.find(m=>Fi(r,m)===n)||u[0];return{points:[f],direction:Fi(f,t)}}else{const f=(0,no.Z)(a,l)[0],m=lr(t,f,io(e,n)/2);return{points:[X(m,r,e),m],direction:Fi(m,t)}}}function el(r,t,e,n){let i=Rs(r,t,e);const a=vt(i.points[0]);if(te(a,n)){i=Rs(t,r,n);const l=vt(i.points[0]);if(te(l,e)){const u=lr(r,a,io(e,Fi(r,a))/2),f=lr(t,l,io(n,Fi(t,l))/2),m=[(u[0]+f[0])/2,(u[1]+f[1])/2],x=Rs(r,m,e),Z=Gs(m,t,n,x.direction);i.points=[x.points[0],Z.points[0]],i.direction=Z.direction}}return i}function At(r,t,e,n,i){const l=qt([e,n]),u=Q(t,l.center)>Q(r,l.center),[f,m]=u?[t,r]:[r,t],x=Ct(l)+q(l);let Z;if(i){const dt=[f[0]+x*Math.cos(ks[i]),f[1]+x*Math.sin(ks[i])];Z=lr(xn(dt,l),dt,.01)}else Z=lr(xn(f,l),f,-.01);let V=X(Z,m,l),nt=[ir(Z,2),ir(V,2)];if((0,S.Z)(ir(Z),ir(V))){const dt=yt(Y(Z,f),[1,0,0])+Math.PI/2;V=[m[0]+x*Math.cos(dt),m[1]+x*Math.sin(dt),0],V=ir(lr(xn(V,l),m,-.01),2);const St=X(Z,V,l);nt=[Z,St,V]}return{points:u?nt.reverse():nt,direction:Fi(u?Z:V,t)}}function X(r,t,e){let n=[r[0],t[1]];return te(n,e)&&(n=[t[0],r[1]]),n}function ot(r,t,e,n,i){let f=typeof t=="number"?t:.5;t==="start"&&(f=0),t==="end"&&(f=.99);const m=Cn(r.getPoint(f)),x=Cn(r.getPoint(f+.01));let Z=t==="start"?"left":t==="end"?"right":"center";if(Vn(m,x)||!e){const[Jt,oe]=zt(r,f,n,i);return{transform:[["translate",Jt,oe]],textAlign:Z}}let V=Math.atan2(x[1]-m[1],x[0]-m[0]);x[0]<m[0]&&(Z=Z==="center"?Z:Z==="left"?"right":"left",n*=-1,V+=Math.PI);const[dt,St]=zt(r,f,n,i,V),Dt=[["translate",dt,St],["rotate",V/Math.PI*180]];return{textAlign:Z,transform:Dt}}function xt(r,t,e,n,i){var a,l;const u=((a=r.badge)===null||a===void 0?void 0:a.getGeometryBounds().halfExtents[0])*2||0,f=((l=r.label)===null||l===void 0?void 0:l.getGeometryBounds().halfExtents[0])*2||0;return ot(r.key,e,!0,(f?(f/2+u/2)*(t==="suffix"?1:-1):0)+n,i)}function zt(r,t,e,n,i){const[a,l]=Cn(r.getPoint(t));let u=e,f=n;return i&&(u=e*Math.cos(i)-n*Math.sin(i),f=e*Math.sin(i)+n*Math.cos(i)),[a+u,l+f]}function Qt(r,t,e,n){if((0,S.Z)(r,t))return r;const i=Y(t,r),a=[r[0]+e*i[0],r[1]+e*i[1]],l=et(Ot(i,!1));return a[0]+=n*l[0],a[1]+=n*l[1],a}function ee(r){return(0,sn.Z)(r)?[r,-r]:r}function De(r){return(0,sn.Z)(r)?[r,1-r]:r}function _e(r,t,e){return[["M",r[0],r[1]],["Q",e[0],e[1],t[0],t[1]]]}function qe(r,t,e){return[["M",r[0],r[1]],["C",e[0][0],e[0][1],e[1][0],e[1][1],t[0],t[1]]]}function ln(r,t=0,e=!1){const n=r.length-1,i=r[0],a=r[n],l=r.slice(1,n),u=[["M",i[0],i[1]]];return l.forEach((f,m)=>{const x=l[m-1]||i,Z=l[m+1]||a;if(!Kr(x,f,Z)&&t){const[V,nt]=en(x,f,Z,t);u.push(["L",V[0],V[1]],["Q",f[0],f[1],nt[0],nt[1]],["L",nt[0],nt[1]])}else u.push(["L",f[0],f[1]])}),u.push(["L",a[0],a[1]]),e&&u.push(["Z"]),u}function en(r,t,e,n){const i=H(r,t),a=H(e,t),l=Math.min(n,Math.min(i,a)/2),u=[t[0]-l/i*(t[0]-r[0]),t[1]-l/i*(t[1]-r[1])],f=[t[0]-l/a*(t[0]-e[0]),t[1]-l/a*(t[1]-e[1])];return[u,f]}const Sn=r=>{const t=Math.PI/2,e=Ct(r)/2,n=q(r)/2,i=Math.atan2(e,n)/2,a=Math.atan2(n,e)/2;return{top:[-t-a,-t+a],"top-right":[-t+a,-i],"right-top":[-t+a,-i],right:[-i,i],"bottom-right":[i,t-a],"right-bottom":[i,t-a],bottom:[t-a,t+a],"bottom-left":[t+a,Math.PI-i],"left-bottom":[t+a,Math.PI-i],left:[Math.PI-i,Math.PI+i],"top-left":[Math.PI+i,-t-a],"left-top":[Math.PI+i,-t-a]}};function bn(r,t,e,n,i){const a=Lt(r),l=r.getCenter();let u=n&&Hr(n),f=i&&Hr(i);if(!u||!f){const m=Sn(a),x=m[t][0],Z=m[t][1],[V,nt]=Ht(a),dt=Math.max(V,nt),St=w(l,[dt*Math.cos(x),dt*Math.sin(x),0]),Dt=w(l,[dt*Math.cos(Z),dt*Math.sin(Z),0]);u=ni(r,St),f=ni(r,Dt),e||([u,f]=[f,u])}return[u,f]}function Pn(r,t,e,n,i,a){const l=r.getPorts()[i||a],u=r.getPorts()[a||i];let[f,m]=bn(r,t,e,l,u);const x=In(r,f,m,n);return l&&(f=fi(l,x[0])),u&&(m=fi(u,x.at(-1))),qe(f,m,x)}function In(r,t,e,n){const i=r.getCenter();if((0,S.Z)(t,e)){const a=Y(t,i),l=[n*Math.sign(a[0])||n/2,n*Math.sign(a[1])||-n/2,0];return[w(t,l),w(e,K(l,[1,-1,1]))]}return[lr(i,t,Q(i,t)+n),lr(i,e,Q(i,e)+n)]}function kn(r,t,e,n,i,a,l){const u=Br(r),f=u[a||l],m=u[l||a];let[x,Z]=bn(r,e,n,f,m);const V=Wn(r,x,Z,i);return f&&(x=fi(f,V[0])),m&&(Z=fi(m,V.at(-1))),ln([x,...V,Z],t)}function Wn(r,t,e,n){const i=[],a=Lt(r);if((0,S.Z)(t,e))switch(on(t,a)){case"left":i.push([t[0]-n,t[1]]),i.push([t[0]-n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"right":i.push([t[0]+n,t[1]]),i.push([t[0]+n,t[1]+n]),i.push([t[0],t[1]+n]);break;case"top":i.push([t[0],t[1]-n]),i.push([t[0]+n,t[1]-n]),i.push([t[0]+n,t[1]]);break;case"bottom":i.push([t[0],t[1]+n]),i.push([t[0]+n,t[1]+n]),i.push([t[0]+n,t[1]]);break}else{const l=on(t,a),u=on(e,a);if(l===u){const f=l;let m,x;switch(f){case"left":m=Math.min(t[0],e[0])-n,i.push([m,t[1]]),i.push([m,e[1]]);break;case"right":m=Math.max(t[0],e[0])+n,i.push([m,t[1]]),i.push([m,e[1]]);break;case"top":x=Math.min(t[1],e[1])-n,i.push([t[0],x]),i.push([e[0],x]);break;case"bottom":x=Math.max(t[1],e[1])+n,i.push([t[0],x]),i.push([e[0],x]);break}}else{const f=(V,nt)=>({left:[nt[0]-n,nt[1]],right:[nt[0]+n,nt[1]],top:[nt[0],nt[1]-n],bottom:[nt[0],nt[1]+n]})[V],m=f(l,t),x=f(u,e),Z=X(m,x,a);i.push(m,Z,x)}}return i}function Jn(r,t){const e=new Set,n=new Set,i=new Set;return r.forEach(a=>{t(a).forEach(u=>{e.add(u),r.includes(u.source)&&r.includes(u.target)?n.add(u):i.add(u)})}),{edges:Array.from(e),internal:Array.from(n),external:Array.from(i)}}function $n(r,t){const e=[];let n=r;for(;n;){e.push(n);const i=t(me(n));if(i)n=i;else break}if(e.some(i=>{var a;return(a=i.style)===null||a===void 0?void 0:a.collapsed})){const i=e.reverse().findIndex(Ea);return e[i]||e.at(-1)}return r}function cr(r,t){return t||(r<4?10:r===4?12:r*2.5)}const vr=(r,t)=>{const e=Math.max(r,t)/2;return[["M",-r/2,0],["A",e,e,0,1,0,2*e-r/2,0],["A",e,e,0,1,0,-r/2,0],["Z"]]},hr=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",r/2,t/2],["Z"]],Lr=(r,t)=>[["M",-r/2,0],["L",0,-t/2],["L",r/2,0],["L",0,t/2],["Z"]],Tr=(r,t)=>[["M",-r/2,0],["L",r/2,-t/2],["L",4*r/5-r/2,0],["L",r/2,t/2],["Z"]],Nr=(r,t)=>[["M",-r/2,-t/2],["L",r/2,-t/2],["L",r/2,t/2],["L",-r/2,t/2],["Z"]],zr=(r,t)=>{const e=r/2,n=r/7,i=r-n;return[["M",-e,0],["L",0,-t/2],["L",0,t/2],["Z"],["M",i-e,-t/2],["L",i+n-e,-t/2],["L",i+n-e,t/2],["L",i-e,t/2],["Z"]]},_r=(r,t)=>[["M",r/2,-t/2],["L",-r/2,0],["L",r/2,0],["L",-r/2,0],["L",r/2,t/2]];var j=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class B extends ia{constructor(t){super(zi({style:B.defaultStyleProps},t)),this.type="edge"}get sourceNode(){const{sourceNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}get targetNode(){const{targetNode:t}=this.parsedAttributes;return this.context.element.getElement(t)}getKeyStyle(t){const e=this.getGraphicStyle(t),{loop:n}=e,i=j(e,["loop"]),{sourceNode:a,targetNode:l}=this,f={d:n&&ci(a,l)?this.getLoopPath(t):this.getKeyPath(t)};return _.y$.PARSED_STYLE_LIST.forEach(m=>{m in i&&(f[m]=i[m])}),f}getLoopPath(t){const{sourcePort:e,targetPort:n}=t,i=this.sourceNode,a=Lt(i),l=Math.max(q(a),Ct(a)),{placement:u,clockwise:f,dist:m=l}=Ci(this.getGraphicStyle(t),"loop");return Pn(i,u,f,m,e,n)}getEndpoints(t,e=!0,n=[]){const{sourcePort:i,targetPort:a}=t,{sourceNode:l,targetNode:u}=this,[f,m]=mi(l,u,i,a);if(!e){const nt=f?Hr(f):l.getCenter(),dt=m?Hr(m):u.getCenter();return[nt,dt]}const x=typeof n=="function"?n():n,Z=Jr(f||l,x[0]||m||u),V=Jr(m||u,x[x.length-1]||f||l);return[Z,V]}getHaloStyle(t){if(t.halo===!1)return!1;const e=this.getKeyStyle(t),n=Ci(this.getGraphicStyle(t),"halo");return Object.assign(Object.assign({},e),n)}getLabelStyle(t){if(t.label===!1||!t.labelText)return!1;const e=Ci(this.getGraphicStyle(t),"label"),{placement:n,offsetX:i,offsetY:a,autoRotate:l,maxWidth:u}=e,f=j(e,["placement","offsetX","offsetY","autoRotate","maxWidth"]),m=ot(this.shapeMap.key,n,l,i,a),x=this.shapeMap.key.getLocalBounds(),Z=cs([x.min,x.max],u);return Object.assign({wordWrapWidth:Z},m,f)}getBadgeStyle(t){if(t.badge===!1||!t.badgeText)return!1;const e=Ci(t,"badge"),{offsetX:n,offsetY:i,placement:a}=e,l=j(e,["offsetX","offsetY","placement"]);return Object.assign(l,xt(this.shapeMap,a,t.labelPlacement,n,i))}drawArrow(t,e){var n;const i=e==="start",l=t[e==="start"?"startArrow":"endArrow"],u=this.shapeMap.key;if(l){const f=this.getArrowStyle(t,i),[m,x,Z]=i?["markerStart","markerStartOffset","startArrowOffset"]:["markerEnd","markerEndOffset","endArrowOffset"],V=u.parsedStyle[m];if(V)V.attr(f);else{const nt=f.src?_.Ee:_.y$,dt=new nt({style:f});u.style[m]=dt}u.style[x]=t[Z]||f.width/2+ +f.lineWidth}else{const f=i?"markerStart":"markerEnd";(n=u.style[f])===null||n===void 0||n.destroy(),u.style[f]=null}}getArrowStyle(t,e){const n=this.getShape("key").attributes,i=e?"startArrow":"endArrow",a=Ci(this.getGraphicStyle(t),i),{size:l,type:u}=a,f=j(a,["size","type"]),[m,x]=ra(cr(n.lineWidth,l)),V=((0,xe.Z)(u)?u:c[u]||hr)(m,x);return Object.assign((0,da.Z)(n,["stroke","strokeOpacity","fillOpacity"]),{width:m,height:x},Object.assign({},V&&{d:V,fill:u==="simple"?"":n.stroke}),f)}drawLabelShape(t,e){const n=this.getLabelStyle(t);this.upsert("label",ua,n,e)}drawHaloShape(t,e){const n=this.getHaloStyle(t);this.upsert("halo",_.y$,n,e)}drawBadgeShape(t,e){const n=this.getBadgeStyle(t);this.upsert("badge",bi,n,e)}drawSourceArrow(t){this.drawArrow(t,"start")}drawTargetArrow(t){this.drawArrow(t,"end")}drawKeyShape(t,e){const n=this.getKeyStyle(t);return this.upsert("key",_.y$,n,e)}render(t=this.parsedAttributes,e=this){this.drawKeyShape(t,e),this.getShape("key")&&(this.drawSourceArrow(t),this.drawTargetArrow(t),this.drawLabelShape(t,e),this.drawHaloShape(t,e),this.drawBadgeShape(t,e))}onframe(){this.drawKeyShape(this.parsedAttributes,this),this.drawSourceArrow(this.parsedAttributes),this.drawTargetArrow(this.parsedAttributes),this.drawHaloShape(this.parsedAttributes,this),this.drawLabelShape(this.parsedAttributes,this),this.drawBadgeShape(this.parsedAttributes,this)}animate(t,e){const n=super.animate(t,e);return n&&new Proxy(n,{set:(i,a,l)=>(a==="currentTime"&&Promise.resolve().then(()=>this.onframe()),Reflect.set(i,a,l))})}}B.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 P extends B{constructor(t){super(zi({style:P.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t),{controlPoints:i,curvePosition:a,curveOffset:l}=t,u=this.getControlPoints(e,n,De(a),ee(l),i);return qe(e,n,u)}getControlPoints(t,e,n,i,a){return(a==null?void 0:a.length)===2?a:[Qt(t,e,n[0],i[0]),Qt(t,e,n[1],i[1])]}}P.defaultStyleProps={curvePosition:.5,curveOffset:20};class k extends P{constructor(t){super(zi({style:k.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[0]-t[0];return[[t[0]+a*n[0]+i[0],t[1]],[e[0]-a*n[1]+i[1],e[1]]]}}k.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class U extends P{constructor(t){super(zi({style:U.defaultStyleProps},t))}get ref(){return this.context.model.getRootsData()[0]}getEndpoints(t){if(this.sourceNode.id===this.ref.id)return super.getEndpoints(t);const e=Wt(this.ref),n=this.sourceNode.getIntersectPoint(e,!0),i=this.targetNode.getIntersectPoint(e);return[n,i]}toRadialCoordinate(t){const e=Wt(this.ref),n=Q(t,e),i=lt(Y(t,e));return[n,i]}getControlPoints(t,e,n,i){const[a,l]=this.toRadialCoordinate(t),[u]=this.toRadialCoordinate(e),f=u-a;return[[t[0]+(f*n[0]+i[0])*Math.cos(l),t[1]+(f*n[0]+i[0])*Math.sin(l)],[e[0]-(f*n[1]-i[0])*Math.cos(l),e[1]-(f*n[1]-i[0])*Math.sin(l)]]}}U.defaultStyleProps={curvePosition:.5,curveOffset:20};class at extends P{constructor(t){super(zi({style:at.defaultStyleProps},t))}getControlPoints(t,e,n,i){const a=e[1]-t[1];return[[t[0],t[1]+a*n[0]+i[0]],[e[0],e[1]-a*n[1]+i[1]]]}}at.defaultStyleProps={curvePosition:[.5,.5],curveOffset:[0,0]};class ut extends B{constructor(t){super(zi({style:ut.defaultStyleProps},t))}getKeyPath(t){const[e,n]=this.getEndpoints(t);return[["M",e[0],e[1]],["L",n[0],n[1]]]}}ut.defaultStyleProps={};const ct={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:H},pt=r=>`${Math.round(r[0])}|||${Math.round(r[1])}`;function Bt(r,t){const e=n=>Math.round(n/t);return(0,sn.Z)(r)?e(r):r.map(e)}function ae(r,t){const e=Math.abs(r-t);return e>Math.PI?2*Math.PI-e:e}function pe(r,t){const e=t[0]-r[0],n=t[1]-r[1];return!e&&!n?0:Math.atan2(n,e)}function Te(r,t,e,n){const i=pe(r,t),a=e[pt(r)],u=pe(a||n,r);return ae(u,i)}const Fe=(r,t)=>{const{offset:e,gridSize:n}=t,i={};return r.forEach(a=>{if(!a||a.destroyed||!a.isVisible())return;const l=Ut(a.getRenderBounds(),e);for(let u=Bt(l.min[0],n);u<=Bt(l.max[0],n);u+=1)for(let f=Bt(l.min[1],n);f<=Bt(l.max[1],n);f+=1)i[`${u}|||${f}`]=!0}),i};function Ue(r,t,e){return Math.min(...t.map(n=>e(r,n)))}function fn(r,t,e){let n=r[0],i=e(r[0],t);for(let a=0;a<r.length;a++){const l=r[a],u=e(l,t);u<i&&(n=l,i=u)}return n}const gn=(r,t,e,n)=>{if(!t)return[r];const{directionMap:i,offset:a}=n,l=Ut(t.getRenderBounds(),a),u=Object.keys(i).reduce((f,m)=>{if(e.includes(m)){const x=i[m],[Z,V]=Ht(l),nt=[r[0]+x.stepX*Z,r[1]+x.stepY*V],dt=Ln(l);for(let St=0;St<dt.length;St++){const Dt=he([r,nt],dt[St]);Dt&&ke(Dt,l)&&f.push(Dt)}}return f},[]);return te(r,l)||u.push(r),u.map(f=>Bt(f,n.gridSize))},On=(r,t,e,n,i,a,l)=>{const u=[];let f=[a[0]===n[0]?n[0]:r[0]*l,a[1]===n[1]?n[1]:r[1]*l];u.unshift(f);let m=r,x=t[pt(m)];for(;x;){const nt=x,dt=m;Te(nt,dt,t,e)&&(f=[nt[0]===dt[0]?f[0]:nt[0]*l,nt[1]===dt[1]?f[1]:nt[1]*l],u.unshift(f)),x=t[pt(nt)],m=nt}const Z=i.map(nt=>[nt[0]*l,nt[1]*l]),V=fn(Z,f,H);return u.unshift(V),u};function Rn(r,t,e,n){const i=gt(r.getCenter()),a=gt(t.getCenter()),l=Object.assign(ct,n),{gridSize:u}=l,f=l.enableObstacleAvoidance?e:[r,t],m=Fe(f,l),x=Bt(i,u),Z=Bt(a,u),V=gn(i,r,l.startDirections,l),nt=gn(a,t,l.endDirections,l);V.forEach(Je=>delete m[pt(Je)]),nt.forEach(Je=>delete m[pt(Je)]);const dt={},St={},Dt={},Jt={},oe={},ge=new wn;for(let Je=0;Je<V.length;Je++){const Dn=V[Je],tr=pt(Dn);dt[tr]=Dn,Jt[tr]=0,oe[tr]=Ue(Dn,nt,l.distFunc),ge.add({id:tr,value:oe[tr]})}const Be=nt.map(Je=>pt(Je));let un=l.maximumLoops,nn,En=1/0;for(const[Je,Dn]of Object.entries(dt))oe[Je]<=En&&(En=oe[Je],nn=Dn);for(;Object.keys(dt).length>0&&un>0;){const Je=ge.minId(!1);if(Je)nn=dt[Je];else break;const Dn=pt(nn);if(Be.includes(Dn))return On(nn,Dt,x,a,V,Z,u);delete dt[Dn],ge.remove(Dn),St[Dn]=!0;for(const tr of Object.values(l.directionMap)){const ur=w(nn,[tr.stepX,tr.stepY]),jr=pt(ur);if(St[jr])continue;const Pr=Te(nn,ur,Dt,x);if(Pr>l.maxAllowedDirectionChange||m[jr])continue;dt[jr]||(dt[jr]=ur);const Rr=l.penalties[Pr],gr=l.distFunc(nn,ur)+(isNaN(Rr)?u:Rr),Xr=Jt[Dn]+gr,Ai=Jt[jr];Ai&&Xr>=Ai||(Dt[jr]=nn,Jt[jr]=Xr,oe[jr]=Xr+Ue(ur,nt,l.distFunc),ge.add({id:jr,value:oe[jr]}))}un-=1}return[]}class wn{constructor(){this.arr=[],this.map={},this.arr=[],this.map={}}_innerAdd(t,e){let n=0,i=e-1;for(;i-n>1;){const a=Math.floor((n+i)/2);if(this.arr[a].value>t.value)i=a;else if(this.arr[a].value<t.value)n=a;else{this.arr.splice(a,0,t),this.map[t.id]=!0;return}}this.arr.splice(i,0,t),this.map[t.id]=!0}add(t){delete this.map[t.id];const e=this.arr.length;if(!e||this.arr[e-1].value<t.value){this.arr.push(t),this.map[t.id]=!0;return}this._innerAdd(t,e)}remove(t){this.map[t]&&delete this.map[t]}_clearAndGetMinId(){let t;for(let e=this.arr.length-1;e>=0;e--)this.map[this.arr[e].id]?t=this.arr[e].id:this.arr.splice(e,1);return t}_findFirstId(){for(;this.arr.length;){const t=this.arr.shift();if(this.map[t.id])return t.id}}minId(t){return t?this._clearAndGetMinId():this._findFirstId()}}class Fn extends B{constructor(t){super(zi({style:Fn.defaultStyleProps},t))}getControlPoints(t){const{router:e}=t,{sourceNode:n,targetNode:i}=this,[a,l]=this.getEndpoints(t,!1);let u=[];if(!e)u=t.controlPoints;else if(e.type==="shortest-path"){const f=this.context.element.getNodes();u=Rn(n,i,f,e),u.length||(u=Pa(a,l,n,i,t.controlPoints,{padding:e.offset}))}else e.type==="orth"&&(u=Pa(a,l,n,i,t.controlPoints,e));return u}getPoints(t){const e=this.getControlPoints(t),[n,i]=this.getEndpoints(t,!0,e);return[n,...e,i]}getKeyPath(t){const e=this.getPoints(t);return ln(e,t.radius)}getLoopPath(t){const{sourcePort:e,targetPort:n,radius:i}=t,a=this.sourceNode,l=Lt(a),u=Math.max(q(l),Ct(l))/4,{placement:f,clockwise:m,dist:x=u}=Ci(this.getGraphicStyle(t),"loop");return kn(a,i,f,m,x,e,n)}}Fn.defaultStyleProps={radius:0,controlPoints:[],router:!1};class Gn extends B{constructor(t){super(zi({style:Gn.defaultStyleProps},t))}getKeyPath(t){const{curvePosition:e,curveOffset:n}=t,[i,a]=this.getEndpoints(t),l=t.controlPoint||Qt(i,a,e,n);return _e(i,a,l)}}Gn.defaultStyleProps={curvePosition:.5,curveOffset:30};var Xn=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function rr(r){return r instanceof ha&&r.type==="node"}function mr(r){return r instanceof B}function Dr(r){return r instanceof Ba}function ai(r){return rr(r)||mr(r)||Dr(r)}function ci(r,t){return!r||!t?!1:r===t}const Vr={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 Er(r,t,e=Vr,n=!0){const i=[.5,.5],a=(0,na.Z)(t)?(0,xa.Z)(e,t.toLocaleLowerCase(),i):t;if(!n&&(0,na.Z)(t))return a;const[l,u]=a||i;return[r.min[0]+q(r)*l,r.min[1]+Ct(r)*u]}function Br(r){if(!r)return{};const t=r.getPorts();return(r.attributes.ports||[]).forEach((n,i)=>{var a;const{key:l,placement:u}=n;Cr(n)&&(t[a=l||i]||(t[a]=Qe(r.getShape("key").getBounds(),u)))}),t}function Cr(r){const{r:t}=r;return!t||Number(t)===0}function Hr(r){return $t(r)?r:r.getPosition()}function mi(r,t,e,n){const i=wr(r,t,e,n),a=wr(t,r,n,e);return[i,a]}function wr(r,t,e,n){const i=Br(r);if(e)return i[e];const a=Object.values(i);if(a.length===0)return;const l=a.map(m=>Hr(m)),u=si(t,n),[f]=pi(l,u);return a.find(m=>Hr(m)===f)}function si(r,t){const e=Br(r);if(t)return[Hr(e[t])];const n=Object.values(e);return n.length>0?n.map(i=>Hr(i)):[r.getCenter()]}function Jr(r,t){return Dr(r)||rr(r)?ni(r,t):fi(r,t)}function fi(r,t){if(!r||!t)return[0,0,0];if($t(r))return r;if(r.attributes.linkToCenter)return r.getPosition();const e=$t(t)?t:rr(t)?t.getCenter():t.getPosition();return $r(e,r.getBounds())}function ni(r,t){if(!r||!t)return[0,0,0];const e=$t(t)?t:rr(t)?t.getCenter():t.getPosition();return r.getIntersectPoint(e)||r.getCenter()}function ri(r,t="bottom",e=0,n=0,i=!1){const a=t.split("-"),[l,u]=Qe(r,t),[f,m]=i?["bottom","top"]:["top","bottom"],x=a.includes("top")?m:a.includes("bottom")?f:"middle",Z=a.includes("left")?"right":a.includes("right")?"left":"center";return{transform:[["translate",l+e,u+n]],textBaseline:x,textAlign:Z}}function Si(r,t){return[[0,-r],[t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)],[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[0,t],[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],[-t*Math.cos(Math.PI/10),t*Math.sin(Math.PI/10)],[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],[-t*Math.cos(3*Math.PI/10),-t*Math.sin(3*Math.PI/10)]]}function Sa(r,t){const e={};return e.top=[0,-r],e.left=[-r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e["left-bottom"]=[-r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.bottom=[0,t],e["right-bottom"]=[r*Math.cos(3*Math.PI/10),r*Math.sin(3*Math.PI/10)],e.right=e.default=[r*Math.cos(Math.PI/10),-r*Math.sin(Math.PI/10)],e}function Li(r,t,e){const n=t/2,i=r/2,a={up:[[-i,n],[i,n],[0,-n]],left:[[-i,0],[i,n],[i,-n]],right:[[-i,n],[-i,-n],[i,0]],down:[[-i,-n],[i,-n],[0,n]]};return a[e]||a.up}function Ls(r,t,e){const n=t/2,i=r/2,a={};return e==="down"?(a.bottom=a.default=[0,n],a.right=[i,-n],a.left=[-i,-n]):e==="left"?(a.top=[i,-n],a.bottom=[i,n],a.left=a.default=[-i,0]):e==="right"?(a.top=[-i,-n],a.bottom=[-i,n],a.right=a.default=[i,0]):(a.left=[-i,n],a.top=a.default=[0,-n],a.right=[i,n]),a}function Us(r,t){return[[r/2,-t/2],[r/2,t/2],[-r/2,t/2],[-r/2,-t/2]]}function va(r,t){return[[0,-t/2],[r/2,0],[0,t/2],[-r/2,0]]}function ka(r){return(0,xa.Z)(r,["style","visibility"])!=="hidden"}function Wa(r,t){const{zIndex:e,transform:n,transformOrigin:i,visibility:a,cursor:l,clipPath:u,component:f}=t,m=Xn(t,["zIndex","transform","transformOrigin","visibility","cursor","clipPath","component"]);Object.assign(r.attributes,m),n&&r.setAttribute("transform",n),(0,sn.Z)(e)&&r.setAttribute("zIndex",e),i&&r.setAttribute("transformOrigin",i),a&&r.setAttribute("visibility",a),l&&r.setAttribute("cursor",l),u&&r.setAttribute("clipPath",u),f&&r.setAttribute("component",f)}function Xa(r,t){"update"in r?r.update(t):r.attr(t)}function ga(r){return[[0,r],[r*Math.sqrt(3)/2,r/2],[r*Math.sqrt(3)/2,-r/2],[0,-r],[-r*Math.sqrt(3)/2,-r/2],[-r*Math.sqrt(3)/2,r/2]]}function Ga(r){(0,Xs.Z)(r,"__to_be_destroyed__",!0)}function Ra(r){return(0,xa.Z)(r,"__to_be_destroyed__",!1)}var jo=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Vs extends E{constructor(t,e){super(t,Object.assign({},Vs.defaultOptions,e)),this.onCollapseExpand=n=>jo(this,void 0,void 0,function*(){if(!this.validate(n))return;const{target:i}=n;if(!ai(i))return;const a=i.id,{model:l,graph:u}=this.context,f=l.getElementDataById(a);if(!f)return!1;const{onCollapse:m,onExpand:x,animation:Z,align:V}=this.options;Ea(f)?(yield u.expandElement(a,{animation:Z,align:V}),x==null||x(a)):(yield u.collapseElement(a,{animation:Z,align:V}),m==null||m(a))}),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`node:${e}`,this.onCollapseExpand),t.on(`combo:${e}`,this.onCollapseExpand)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`node:${e}`,this.onCollapseExpand),t.off(`combo:${e}`,this.onCollapseExpand)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}Vs.defaultOptions={enable:!0,animation:!0,trigger:G.DBLCLICK,align:!0};var Zl=y(63178),So=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};const Wo="g6-create-edge-assist-edge-id",ao="g6-create-edge-assist-node-id";class Ao extends E{constructor(t,e){super(t,Object.assign({},Ao.defaultOptions,e)),this.drop=n=>So(this,void 0,void 0,function*(){const{targetType:i}=n;["combo","node"].includes(i)&&this.source?yield this.handleCreateEdge(n):yield this.cancelEdge()}),this.handleCreateEdge=n=>So(this,void 0,void 0,function*(){var i,a,l;if(!this.validate(n))return;const{graph:u,canvas:f,batch:m,element:x}=this.context,{style:Z}=this.options;if(this.source){this.createEdge(n),yield this.cancelEdge();return}m.startBatch(),f.setCursor("crosshair"),this.source=this.getSelectedNodeIDs([n.target.id])[0];const V=u.getElementData(this.source);u.addNodeData([{id:ao,style:{visibility:"hidden",ports:[{key:"port-1",placement:[.5,.5]}],x:(i=V.style)===null||i===void 0?void 0:i.x,y:(a=V.style)===null||a===void 0?void 0:a.y}}]),u.addEdgeData([{id:Wo,source:this.source,target:ao,style:Object.assign({pointerEvents:"none"},Z)}]),yield(l=x.draw({animation:!1}))===null||l===void 0?void 0:l.finished}),this.updateAssistEdge=n=>So(this,void 0,void 0,function*(){var i;if(!this.source)return;const{model:a,element:l}=this.context;a.translateNodeTo(ao,[n.canvas.x,n.canvas.y]),yield(i=l.draw({animation:!1,silence:!0}))===null||i===void 0?void 0:i.finished}),this.createEdge=n=>{var i,a;const{graph:l}=this.context,{style:u,onFinish:f,onCreate:m}=this.options;if(((i=n.target)===null||i===void 0?void 0:i.id)===void 0||this.source===void 0)return;const Z=(a=this.getSelectedNodeIDs([n.target.id]))===null||a===void 0?void 0:a[0],V=`${this.source}-${Z}-${(0,Zl.Z)()}`,nt=m({id:V,source:this.source,target:Z,style:u});nt&&(l.addEdgeData([nt]),f(nt))},this.cancelEdge=()=>So(this,void 0,void 0,function*(){var n;if(!this.source)return;const{graph:i,element:a,batch:l}=this.context;i.removeNodeData([ao]),this.source=void 0,yield(n=a.draw({animation:!1}))===null||n===void 0?void 0:n.finished,l.endBatch()}),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;this.unbindEvents(),e==="click"?(t.on(Tt.CLICK,this.handleCreateEdge),t.on(rt.CLICK,this.handleCreateEdge),t.on(F.CLICK,this.cancelEdge),t.on(ft.CLICK,this.cancelEdge)):(t.on(Tt.DRAG_START,this.handleCreateEdge),t.on(rt.DRAG_START,this.handleCreateEdge),t.on(G.POINTER_UP,this.drop)),t.on(G.POINTER_MOVE,this.updateAssistEdge)}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;t.off(Tt.CLICK,this.handleCreateEdge),t.off(rt.CLICK,this.handleCreateEdge),t.off(F.CLICK,this.cancelEdge),t.off(ft.CLICK,this.cancelEdge),t.off(Tt.DRAG_START,this.handleCreateEdge),t.off(rt.DRAG_START,this.handleCreateEdge),t.off(G.POINTER_UP,this.drop),t.off(G.POINTER_MOVE,this.updateAssistEdge)}destroy(){this.unbindEvents(),super.destroy()}}Ao.defaultOptions={animation:!0,enable:!0,style:{},trigger:"drag",onCreate:r=>r,onFinish:()=>{}};var Oo=y(78431),nl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Ds extends E{constructor(t,e){super(t,Object.assign({},Ds.defaultOptions,e)),this.isDragging=!1,this.onDragStart=n=>{this.validate(n)&&(this.isDragging=!0,this.context.canvas.setCursor("grabbing"))},this.onDrag=n=>{var i,a,l,u;if(!this.isDragging||wi.isPinching)return;const f=(a=(i=n.movement)===null||i===void 0?void 0:i.x)!==null&&a!==void 0?a:n.dx,m=(u=(l=n.movement)===null||l===void 0?void 0:l.y)!==null&&u!==void 0?u:n.dy;f|m&&this.translate([f,m],!1)},this.onDragEnd=()=>{var n,i;this.isDragging=!1,this.context.canvas.setCursor(this.defaultCursor),(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},this.invokeOnFinish=(0,Oo.Z)(()=>{var n,i;(i=(n=this.options).onFinish)===null||i===void 0||i.call(n)},300),this.shortcut=new ss(t.graph),this.bindEvents(),this.defaultCursor=this.context.canvas.getConfig().cursor||"default"}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if((0,R.Z)(t)){const{up:e=[],down:n=[],left:i=[],right:a=[]}=t;this.shortcut.bind(e,l=>this.onTranslate([0,1],l)),this.shortcut.bind(n,l=>this.onTranslate([0,-1],l)),this.shortcut.bind(i,l=>this.onTranslate([1,0],l)),this.shortcut.bind(a,l=>this.onTranslate([-1,0],l))}else{const{graph:e}=this.context;e.on(G.DRAG_START,this.onDragStart),e.on(G.DRAG,this.onDrag),e.on(G.DRAG_END,this.onDragEnd)}}onTranslate(t,e){return nl(this,void 0,void 0,function*(){if(!this.validate(e))return;const{sensitivity:n}=this.options,i=n*-1;yield this.translate(K(t,i),this.options.animation),this.invokeOnFinish()})}translate(t,e){return nl(this,void 0,void 0,function*(){t=this.clampByDirection(t),t=this.clampByRange(t),t=this.clampByRotation(t),yield this.context.graph.translateBy(t,e)})}clampByRotation([t,e]){const n=this.context.graph.getRotation();return jt([t,e],n)}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,l]=i.getSize(),[u,f,m,x]=Ne(this.options.range),Z=[l*u,a*f,l*m,a*x],V=Ut(_t(n.getCanvasCenter()),Z),nt=Y(n.getViewportCenter(),[t,e,0]);if(!te(nt,V)){const{min:[dt,St],max:[Dt,Jt]}=V;(nt[0]<dt&&t>0||nt[0]>Dt&&t<0)&&(t=0),(nt[1]<St&&e>0||nt[1]>Jt&&e<0)&&(e=0)}return[t,e]}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return typeof e=="function"?e(t):!!e}unbindEvents(){this.shortcut.unbindAll();const{graph:t}=this.context;t.off(G.DRAG_START,this.onDragStart),t.off(G.DRAG,this.onDrag),t.off(G.DRAG_END,this.onDragEnd)}destroy(){this.shortcut.destroy(),this.unbindEvents(),this.context.canvas.setCursor(this.defaultCursor),super.destroy()}}Ds.defaultOptions={enable:r=>"targetType"in r?r.targetType==="canvas":!0,sensitivity:10,direction:"both",range:1/0};var Ka=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class vs extends E{constructor(t,e){super(t,Object.assign({},vs.defaultOptions,e)),this.enable=!1,this.enableElements=["node","combo"],this.target=[],this.shadowOrigin=[0,0],this.hiddenEdges=[],this.isDragging=!1,this.onDrop=n=>Ka(this,void 0,void 0,function*(){var i;if(this.options.dropEffect!=="link")return;const{model:a,element:l}=this.context,u=n.target.id;this.target.forEach(f=>{const m=a.getParentData(f,Vt);m&&me(m)===u&&a.refreshComboData(u),a.setParent(f,u,Vt)}),yield(i=l==null?void 0:l.draw({animation:!0}))===null||i===void 0?void 0:i.finished}),this.setCursor=n=>{if(this.isDragging)return;const{type:i}=n,{canvas:a}=this.context,{cursor:l}=this.options;i===G.POINTER_ENTER?a.setCursor((l==null?void 0:l.grab)||"grab"):a.setCursor((l==null?void 0:l.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(t){this.unbindEvents(),super.update(t),this.bindEvents()}bindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.addEventListener("blur",this.onDragEnd),n.addEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.on(`${i}:${G.DRAG_START}`,this.onDragStart),t.on(`${i}:${G.DRAG}`,this.onDrag),t.on(`${i}:${G.DRAG_END}`,this.onDragEnd),t.on(`${i}:${G.POINTER_ENTER}`,this.setCursor),t.on(`${i}:${G.POINTER_LEAVE}`,this.setCursor)}),["link"].includes(this.options.dropEffect)&&(t.on(rt.DROP,this.onDrop),t.on(F.DROP,this.onDrop))}getSelectedNodeIDs(t){return Array.from(new Set(this.context.graph.getElementDataByState("node",this.options.state).map(e=>e.id).concat(t)))}getDelta(t){const e=this.context.graph.getZoom();return it([t.dx,t.dy],e)}onDragStart(t){var e;if(this.enable=this.validate(t),!this.enable)return;const{batch:n,canvas:i,graph:a}=this.context;i.setCursor(((e=this.options.cursor)===null||e===void 0?void 0:e.grabbing)||"grabbing"),this.isDragging=!0,n.startBatch();const l=t.target.id;a.getElementState(l).includes(this.options.state)?this.target=this.getSelectedNodeIDs([l]):this.target=[l],this.hideEdge(),this.context.graph.frontElement(this.target),this.options.shadow&&this.createShadow(this.target)}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.options.shadow?this.moveShadow(e):this.moveElement(this.target,e)}onDragEnd(){var t,e,n;if(!this.enable)return;if(this.enable=!1,this.options.shadow){if(!this.shadow)return;this.shadow.style.visibility="hidden";const{x:l=0,y:u=0}=this.shadow.attributes,[f,m]=Y([+l,+u],this.shadowOrigin);this.moveElement(this.target,[f,m])}this.showEdges(),(e=(t=this.options).onFinish)===null||e===void 0||e.call(t,this.target);const{batch:i,canvas:a}=this.context;i.endBatch(),a.setCursor(((n=this.options.cursor)===null||n===void 0?void 0:n.grab)||"grab"),this.isDragging=!1,this.target=[]}validate(t){if(this.destroyed||Ra(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}clampByRotation([t,e]){const n=this.context.graph.getRotation();return jt([t,e],n)}moveElement(t,e){return Ka(this,void 0,void 0,function*(){const{graph:n,model:i}=this.context,{dropEffect:a}=this.options;a==="move"&&t.forEach(l=>i.refreshComboData(l)),n.translateElementBy(Object.fromEntries(t.map(l=>[l,this.clampByRotation(e)])),!1)})}moveShadow(t){if(!this.shadow)return;const{x:e=0,y:n=0}=this.shadow.attributes,[i,a]=t;this.shadow.attr({x:+e+i,y:+n+a})}createShadow(t){const e=Ci(this.options,"shadow"),n=qt(t.map(m=>this.context.element.getElement(m).getBounds())),[i,a]=n.min;this.shadowOrigin=[i,a];const[l,u]=Ht(n),f={width:l,height:u,x:i,y:a};this.shadow?this.shadow.attr(Object.assign(Object.assign(Object.assign({},e),f),{visibility:"visible"})):(this.shadow=new _.UL({style:Object.assign(Object.assign(Object.assign({$layer:"transient"},e),f),{pointerEvents:"none"})}),this.context.canvas.appendChild(this.shadow))}showEdges(){this.options.shadow||this.hiddenEdges.length===0||(this.context.graph.showElement(this.hiddenEdges),this.hiddenEdges=[])}hideEdge(){const{hideEdge:t,shadow:e}=this.options;if(t==="none"||e)return;const{graph:n}=this.context;t==="all"?this.hiddenEdges=n.getEdgeData().map(me):this.hiddenEdges=Array.from(new Set(this.target.map(i=>n.getRelatedEdgesData(i,t).map(me)).flat())),n.hideElement(this.hiddenEdges)}unbindEvents(){const{graph:t,canvas:e}=this.context,n=e.getLayer().getContextService().$canvas;n&&(n.removeEventListener("blur",this.onDragEnd),n.removeEventListener("contextmenu",this.onDragEnd)),this.enableElements.forEach(i=>{t.off(`${i}:${G.DRAG_START}`,this.onDragStart),t.off(`${i}:${G.DRAG}`,this.onDrag),t.off(`${i}:${G.DRAG_END}`,this.onDragEnd),t.off(`${i}:${G.POINTER_ENTER}`,this.setCursor),t.off(`${i}:${G.POINTER_LEAVE}`,this.setCursor)}),t.off(`combo:${G.DROP}`,this.onDrop),t.off(`canvas:${G.DROP}`,this.onDrop)}destroy(){var t;this.unbindEvents(),(t=this.shadow)===null||t===void 0||t.destroy(),super.destroy()}}vs.defaultOptions={animation:!0,enable:r=>["node","combo"].includes(r.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 Qr=y(67469);class pa{constructor(t,e){this.context=t,this.options=e||{}}}var _i=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},Qa=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function gs(r){const{type:t}=r;return!!(["comboCombined","comboForce"].includes(t)||t==="antv-dagre"&&r.sortByCombo)}function rl(r){const{type:t}=r;return["compact-box","mindmap","dendrogram","indented"].includes(t)}function zl(r){return isNumber(r.x)&&isNumber(r.y)}function To(r){return!Array.isArray(r)&&(r==null?void 0:r.preLayout)}function Ys(r){const{nodes:t,edges:e}=r,n={nodes:[],edges:[],combos:[]};return t.forEach(i=>{const a=i.data._isCombo?n.combos:n.nodes,{x:l,y:u,z:f=0}=i.data;a==null||a.push({id:i.id,style:{x:l,y:u,z:f}})}),e.forEach(i=>{const{id:a,source:l,target:u,data:{points:f=[],controlPoints:m=f.slice(1,f.length-1)}}=i;n.edges.push({id:a,source:l,target:u,style:Object.assign({},m!=null&&m.length?{controlPoints:m.map(Cn)}:{})})}),n}function Go(r,t){class e extends pa{constructor(i,a){if(super(i,a),this.instance=new r({}),this.id=this.instance.id,"stop"in this.instance&&"tick"in this.instance){const l=this.instance;this.stop=l.stop.bind(l),this.tick=u=>{const f=l.tick(u);return Ys(f)}}}execute(i,a){return _i(this,void 0,void 0,function*(){return Ys(yield this.instance.execute(this.graphData2LayoutModel(i),this.transformOptions((0,h.Z)({},this.options,a))))})}transformOptions(i){if(!("onTick"in i))return i;const a=i.onTick;return i.onTick=l=>a(Ys(l)),i}graphData2LayoutModel(i){const{nodes:a=[],edges:l=[],combos:u=[]}=i,f=a.map(nt=>{const dt=me(nt),{data:St,style:Dt,combo:Jt}=nt,oe=Qa(nt,["data","style","combo"]),ge={id:dt,data:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},St),{data:St}),Jt?{parentId:Jt}:{}),{style:Dt}),oe)};return Dt!=null&&Dt.x&&Object.assign(ge.data,{x:Dt.x}),Dt!=null&&Dt.y&&Object.assign(ge.data,{y:Dt.y}),Dt!=null&&Dt.z&&Object.assign(ge.data,{z:Dt.z}),ge}),m=new Map(f.map(nt=>[nt.id,nt])),x=l.filter(nt=>{const{source:dt,target:St}=nt;return m.has(dt)&&m.has(St)}).map(nt=>{const{source:dt,target:St,data:Dt,style:Jt}=nt;return{id:me(nt),source:dt,target:St,data:Object.assign({},Dt),style:Object.assign({},Jt)}}),Z=u.map(nt=>({id:me(nt),data:Object.assign({_isCombo:!0},nt.data),style:Object.assign({},nt.style)})),V=new Qr.k({nodes:[...f,...Z],edges:x});return t.model.model.hasTreeStructure(Vt)&&(V.attachTreeStructure(Vt),f.forEach(nt=>{const dt=t.model.model.getParent(nt.id,Vt);dt&&V.hasNode(dt.id)&&V.setParent(nt.id,dt.id,Vt)})),V}}return e}function Co(r,t,...e){if(t in r)return r[t](...e);if("instance"in r){const n=r.instance;if(t in n)return n[t](...e)}return null}function jl(r,t){if(t in r)return r[t];if("instance"in r){const e=r.instance;if(t in e)return e[t]}return null}var Fu=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class _u extends vs{get forceLayoutInstance(){return this.context.layout.getLayoutInstance().find(t=>["d3-force","d3-force-3d"].includes(t==null?void 0:t.id))}validate(t){return this.context.layout?this.forceLayoutInstance?super.validate(t):(Xe.warn("DragElementForce only works with d3-force or d3-force-3d layout"),!1):!1}moveElement(t,e){return Fu(this,void 0,void 0,function*(){const n=this.forceLayoutInstance;this.context.graph.getNodeData(t).forEach((i,a)=>{const{x:l=0,y:u=0}=i.style||{};n&&Co(n,"setFixedPosition",t[a],[...w([+l,+u],this.clampByRotation(e))])})})}onDragStart(t){if(this.enable=this.validate(t),!this.enable)return;this.target=this.getSelectedNodeIDs([t.target.id]),this.hideEdge(),this.context.graph.frontElement(this.target);const e=this.forceLayoutInstance;e&&jl(e,"simulation").alphaTarget(.3).restart(),this.context.graph.getNodeData(this.target).forEach(n=>{const{x:i=0,y:a=0}=n.style||{};e&&Co(e,"setFixedPosition",me(n),[+i,+a])})}onDrag(t){if(!this.enable)return;const e=this.getDelta(t);this.moveElement(this.target,e)}onDragEnd(){const t=this.forceLayoutInstance;t&&jl(t,"simulation").alphaTarget(0),!this.options.fixed&&this.context.graph.getNodeData(this.target).forEach(e=>{t&&Co(t,"setFixedPosition",me(e),[null,null,null])})}}var gc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class il extends E{constructor(t,e){super(t,Object.assign({},il.defaultOptions,e)),this.isZoomEvent=n=>!!(n.data&&"scale"in n.data),this.relatedEdgeToUpdate=new Set,this.zoom=this.context.graph.getZoom(),this.fixElementSize=n=>gc(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context,{state:a,nodeFilter:l,edgeFilter:u,comboFilter:f}=this.options,m=(a?i.getElementDataByState("node",a):i.getNodeData()).filter(l),x=(a?i.getElementDataByState("edge",a):i.getEdgeData()).filter(u),Z=(a?i.getElementDataByState("combo",a):i.getComboData()).filter(f),V=this.isZoomEvent(n)?this.zoom=Math.max(.01,Math.min(n.data.scale,10)):this.zoom,nt=[...m,...Z];nt.length>0&&nt.forEach(dt=>this.fixNodeLike(dt,V)),this.updateRelatedEdges(),x.length>0&&x.forEach(dt=>this.fixEdge(dt,V))}),this.cachedStyles=new Map,this.getOriginalFieldValue=(n,i,a)=>{var l;const u=this.cachedStyles.get(n)||[],f=((l=u.find(m=>m.shape===i))===null||l===void 0?void 0:l.style)||{};return a in f||(f[a]=i.attributes[a],this.cachedStyles.set(n,[...u.filter(m=>m.shape!==i),{shape:i,style:f}])),f[a]},this.scaleEntireElement=(n,i,a)=>{i.setLocalScale(1/a);const l=this.cachedStyles.get(n)||[];l.push({shape:i}),this.cachedStyles.set(n,l)},this.scaleSpecificShapes=(n,i,a)=>{const l=Fo(n);(Array.isArray(a)?a:[a]).forEach(f=>{const{shape:m,fields:x}=f,Z=typeof m=="function"?m(l):n.getShape(m);if(Z){if(!x){this.scaleEntireElement(n.id,Z,i);return}x.forEach(V=>{const nt=this.getOriginalFieldValue(n.id,Z,V);(0,sn.Z)(nt)&&(Z.style[V]=nt/i)})}})},this.skipIfExceedViewport=n=>{const{viewport:i}=this.context;return!(i!=null&&i.isInViewport(n.getRenderBounds(),!1,30))},this.fixNodeLike=(n,i)=>{const a=me(n),{element:l,model:u}=this.context,f=l.getElement(a);if(!f||this.skipIfExceedViewport(f))return;u.getRelatedEdgesData(a).forEach(Z=>this.relatedEdgeToUpdate.add(me(Z)));const x=this.options[f.type];if(!x){this.scaleEntireElement(a,f,i);return}this.scaleSpecificShapes(f,i,x)},this.fixEdge=(n,i)=>{const a=me(n),l=this.context.element.getElement(a);if(!l||this.skipIfExceedViewport(l))return;const u=this.options.edge;if(!u){l.style.transformOrigin="center",this.scaleEntireElement(a,l,i);return}this.scaleSpecificShapes(l,i,u)},this.updateRelatedEdges=()=>{const{element:n}=this.context;this.relatedEdgeToUpdate.size>0&&this.relatedEdgeToUpdate.forEach(i=>{const a=n.getElement(i);a==null||a.update({})}),this.relatedEdgeToUpdate.clear()},this.resetTransform=n=>gc(this,void 0,void 0,function*(){var i;!((i=n.data)===null||i===void 0)&&i.firstRender||(this.options.reset?this.restoreCachedStyles():this.fixElementSize({data:{scale:this.zoom}}))}),this.bindEvents()}restoreCachedStyles(){if(this.cachedStyles.size>0){this.cachedStyles.forEach(i=>{i.forEach(({shape:a,style:l})=>{if((0,qi.Z)(l))a.setLocalScale(1);else{if(this.options.state)return;Object.entries(l).forEach(([u,f])=>a.style[u]=f)}})});const{graph:t,element:e}=this.context,n=Object.keys(Object.fromEntries(this.cachedStyles)).filter(i=>i&&t.getElementType(i)==="node");if(n.length>0){const i=new Set;n.forEach(a=>{t.getRelatedEdgesData(a).forEach(l=>i.add(me(l)))}),i.forEach(a=>{const l=e==null?void 0:e.getElement(a);l==null||l.update({})})}}}bindEvents(){const{graph:t}=this.context;t.on(J.AFTER_DRAW,this.resetTransform),t.on(J.AFTER_TRANSFORM,this.fixElementSize)}unbindEvents(){const{graph:t}=this.context;t.off(J.AFTER_DRAW,this.resetTransform),t.off(J.AFTER_TRANSFORM,this.fixElementSize)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){this.unbindEvents(),super.destroy()}}il.defaultOptions={enable:r=>r.data.scale<1,nodeFilter:()=>!0,edgeFilter:()=>!0,comboFilter:()=>!0,edge:[{shape:"key",fields:["lineWidth"]},{shape:"halo",fields:["lineWidth"]},{shape:"label"}],reset:!1};var Wl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class so extends E{constructor(t,e){super(t,Object.assign({},so.defaultOptions,e)),this.focus=n=>Wl(this,void 0,void 0,function*(){if(!this.validate(n))return;const{graph:i}=this.context;yield i.focusElement(n.target.id,this.options.animation)}),this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),La.forEach(e=>{t.on(`${e}:${G.CLICK}`,this.focus)})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;La.forEach(e=>{t.off(`${e}:${G.CLICK}`,this.focus)})}destroy(){this.unbindEvents(),super.destroy()}}so.defaultOptions={animation:{easing:"ease-in",duration:500},enable:!0};class al extends E{constructor(t,e){super(t,Object.assign({},al.defaultOptions,e)),this.isFrozen=!1,this.toggleFrozen=n=>{this.isFrozen=n.type==="dragstart"},this.hoverElement=n=>{if(!this.validate(n))return;const i=n.type===G.POINTER_ENTER;this.updateElementsState(n,i);const{onHover:a,onHoverEnd:l}=this.options;i?a==null||a(n):l==null||l(n)},this.updateElementsState=(n,i)=>{if(!this.options.state&&!this.options.inactiveState)return;const{graph:a}=this.context,{state:l,animation:u,inactiveState:f}=this.options,m=this.getActiveIds(n),x={};if(l&&Object.assign(x,this.getElementsState(m,l,i)),f){const Z=Zn(a.getData(),!0).filter(V=>!m.includes(V));Object.assign(x,this.getElementsState(Z,f,i))}a.setElementState(x,u)},this.getElementsState=(n,i,a)=>{const{graph:l}=this.context,u={};return n.forEach(f=>{const m=l.getElementState(f);a?u[f]=m.includes(i)?m:[...m,i]:u[f]=m.filter(x=>x!==i)}),u},this.bindEvents()}bindEvents(){const{graph:t}=this.context;this.unbindEvents(),La.forEach(n=>{t.on(`${n}:${G.POINTER_ENTER}`,this.hoverElement),t.on(`${n}:${G.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.addEventListener(`${G.DRAG_START}`,this.toggleFrozen),e.addEventListener(`${G.DRAG_END}`,this.toggleFrozen)}getActiveIds(t){const{graph:e}=this.context,{degree:n,direction:i}=this.options,a=t.target.id;return n?os(e,t.targetType,a,typeof n=="function"?n(t):n,i):[a]}validate(t){if(this.destroyed||this.isFrozen||Ra(t.target)||this.context.graph.isCollapsingExpanding)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}unbindEvents(){const{graph:t}=this.context;La.forEach(n=>{t.off(`${n}:${G.POINTER_ENTER}`,this.hoverElement),t.off(`${n}:${G.POINTER_LEAVE}`,this.hoverElement)});const e=this.context.canvas.document;e.removeEventListener(`${G.DRAG_START}`,this.toggleFrozen),e.removeEventListener(`${G.DRAG_END}`,this.toggleFrozen)}destroy(){this.unbindEvents(),super.destroy()}}al.defaultOptions={animation:!1,enable:!0,degree:0,direction:"both",state:"active",inactiveState:void 0};class Zu extends Yn{onPointerDown(t){if(!super.validate(t)||!super.isKeydown()||this.points)return;const{canvas:e,graph:n}=this.context;this.pathShape=new _.y$({id:"g6-lasso-select",style:this.options.style}),e.appendChild(this.pathShape),this.points=[xs(t,n)]}onPointerMove(t){var e;if(!this.points)return;const{immediately:n,mode:i}=this.options;this.points.push(xs(t,this.context.graph)),(e=this.pathShape)===null||e===void 0||e.setAttribute("d",Kn(this.points)),n&&i==="default"&&this.points.length>2&&super.updateElementsStates(this.points)}onPointerUp(){if(this.points){if(this.points.length<2){this.clearLasso();return}super.updateElementsStates(this.points),this.clearLasso()}}clearLasso(){var t;(t=this.pathShape)===null||t===void 0||t.remove(),this.pathShape=void 0,this.points=void 0}}class sl extends E{constructor(t,e){super(t,Object.assign({},sl.defaultOptions,e)),this.hiddenShapes=[],this.isVisible=!0,this.setElementsVisibility=(n,i,a)=>{n.filter(Boolean).forEach(l=>{i==="hidden"&&!l.isVisible()?this.hiddenShapes.push(l):i==="visible"&&this.hiddenShapes.includes(l)?this.hiddenShapes.splice(this.hiddenShapes.indexOf(l),1):Zr(l,i,a)})},this.filterShapes=(n,i)=>{if((0,xe.Z)(i))return l=>!i(n,l);const a=i==null?void 0:i[n];return l=>l.className?!(a!=null&&a.includes(l.className)):!0},this.hideShapes=n=>{if(!this.validate(n)||!this.isVisible)return;const{element:i}=this.context,{shapes:a={}}=this.options;this.setElementsVisibility(i.getNodes(),"hidden",this.filterShapes("node",a)),this.setElementsVisibility(i.getEdges(),"hidden",this.filterShapes("edge",a)),this.setElementsVisibility(i.getCombos(),"hidden",this.filterShapes("combo",a)),this.isVisible=!1},this.showShapes=(0,Oo.Z)(n=>{if(!this.validate(n)||this.isVisible)return;const{element:i}=this.context;this.setElementsVisibility(i.getNodes(),"visible"),this.setElementsVisibility(i.getEdges(),"visible"),this.setElementsVisibility(i.getCombos(),"visible"),this.isVisible=!0},this.options.debounce),this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(J.BEFORE_TRANSFORM,this.hideShapes),t.on(J.AFTER_TRANSFORM,this.showShapes)}unbindEvents(){const{graph:t}=this.context;t.off(J.BEFORE_TRANSFORM,this.hideShapes),t.off(J.AFTER_TRANSFORM,this.showShapes)}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy()}}sl.defaultOptions={enable:!0,debounce:200,shapes:r=>r==="node"};var rs=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class ol extends E{constructor(t,e){super(t,Object.assign({},ol.defaultOptions,e)),this.onWheel=n=>rs(this,void 0,void 0,function*(){this.options.preventDefault&&n.preventDefault();const i=n.deltaX,a=n.deltaY;yield this.scroll([-i,-a],n)}),this.shortcut=new ss(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){var t,e;const{trigger:n}=this.options;if(this.shortcut.unbindAll(),(0,R.Z)(n)){(t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,this.onWheel);const{up:i=[],down:a=[],left:l=[],right:u=[]}=n;this.shortcut.bind(i,f=>this.scroll([0,-10],f)),this.shortcut.bind(a,f=>this.scroll([0,10],f)),this.shortcut.bind(l,f=>this.scroll([-10,0],f)),this.shortcut.bind(u,f=>this.scroll([10,0],f))}else(e=this.graphDom)===null||e===void 0||e.addEventListener(G.WHEEL,this.onWheel,{passive:!1})}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}formatDisplacement(t){const{sensitivity:e}=this.options;return t=K(t,e),t=this.clampByDirection(t),t=this.clampByRange(t),t}clampByDirection([t,e]){const{direction:n}=this.options;return n==="x"?e=0:n==="y"&&(t=0),[t,e]}clampByRange([t,e]){const{viewport:n,canvas:i}=this.context,[a,l]=i.getSize(),[u,f,m,x]=Ne(this.options.range),Z=[l*u,a*f,l*m,a*x],V=Ut(_t(n.getCanvasCenter()),Z),nt=Y(n.getViewportCenter(),[t,e,0]);if(!te(nt,V)){const{min:[dt,St],max:[Dt,Jt]}=V;(nt[0]<dt&&t>0||nt[0]>Dt&&t<0)&&(t=0),(nt[1]<St&&e>0||nt[1]>Jt&&e<0)&&(e=0)}return[t,e]}scroll(t,e){return rs(this,void 0,void 0,function*(){if(!this.validate(e))return;const{onFinish:n}=this.options,i=this.context.graph,a=this.formatDisplacement(t);yield i.translateBy(a,!1),n==null||n()})}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,this.onWheel),super.destroy()}}ol.defaultOptions={enable:!0,sensitivity:1,preventDefault:!0,range:1/0};var pc=y(70208),No=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Uo extends E{constructor(t,e){super(t,Object.assign({},Uo.defaultOptions,e)),this.zoom=(n,i,a)=>No(this,void 0,void 0,function*(){if(!this.validate(i))return;const{graph:l}=this.context;let u=this.options.origin;!u&&"viewport"in i&&(u=Cn(i.viewport));const{sensitivity:f,onFinish:m}=this.options,x=1+(0,pc.Z)(n,-50,50)*f/100,Z=l.getZoom();yield l.zoomTo(Z*x,a,u),m==null||m()}),this.onReset=()=>No(this,void 0,void 0,function*(){yield this.context.graph.zoomTo(1,this.options.animation)}),this.preventDefault=n=>{this.options.preventDefault&&n.preventDefault()},this.shortcut=new ss(t.graph),this.bindEvents()}update(t){super.update(t),this.bindEvents()}bindEvents(){const{trigger:t}=this.options;if(this.shortcut.unbindAll(),Array.isArray(t))if(t.includes(G.PINCH))this.shortcut.bind([G.PINCH],e=>{this.zoom(e.scale,e,!1)});else{const e=this.context.canvas.getContainer();e==null||e.addEventListener(G.WHEEL,this.preventDefault),this.shortcut.bind([...t,G.WHEEL],n=>{const{deltaX:i,deltaY:a}=n;this.zoom(-(a!=null?a:i),n,!1)})}if(typeof t=="object"){const{zoomIn:e=[],zoomOut:n=[],reset:i=[]}=t;this.shortcut.bind(e,a=>this.zoom(10,a,this.options.animation)),this.shortcut.bind(n,a=>this.zoom(-10,a,this.options.animation)),this.shortcut.bind(i,this.onReset)}}validate(t){if(this.destroyed)return!1;const{enable:e}=this.options;return(0,xe.Z)(e)?e(t):!!e}destroy(){var t;this.shortcut.destroy(),(t=this.context.canvas.getContainer())===null||t===void 0||t.removeEventListener(G.WHEEL,this.preventDefault),super.destroy()}}Uo.defaultOptions={animation:{duration:200},enable:!0,sensitivity:1,trigger:[],preventDefault:!0};var ll=y(13722),qr=y(80813);const zu=(r,t)=>{if(r!=="next"&&r!=="prev")return t},Gl=r=>{r.prev.next=r.next,r.next.prev=r.prev,delete r.next,delete r.prev};class ju{constructor(){const t={};t.prev=t,t.next=t.prev,this.shortcut=t}dequeue(){const t=this.shortcut,e=t.prev;if(e&&e!==t)return Gl(e),e}enqueue(t){const e=this.shortcut;t.prev&&t.next&&Gl(t),t.next=e.next,e.next.prev=t,e.next=t,t.prev=e}toString(){const t=[],e=this.shortcut;let n=e.prev;for(;n!==e;)t.push(JSON.stringify(n,zu)),n=n==null?void 0:n.prev;return`[${t.join(", ")}]`}}class Wu extends ju{}const mc=()=>1,Ul=(r,t)=>{var e;if(r.getAllNodes().length<=1)return[];const n=Gu(r,t||mc);return(e=yc(n.graph,n.buckets,n.zeroIdx).map(a=>r.getRelatedEdges(a.v,"out").filter(({target:l})=>l===a.w)))===null||e===void 0?void 0:e.flat()},yc=(r,t,e)=>{let n=[];const i=t[t.length-1],a=t[0];let l;for(;r.getAllNodes().length;){for(;l=a.dequeue();)Vl(r,t,e,l);for(;l=i.dequeue();)Vl(r,t,e,l);if(r.getAllNodes().length){for(let u=t.length-2;u>0;--u)if(l=t[u].dequeue(),l){n=n.concat(Vl(r,t,e,l,!0));break}}}return n},Vl=(r,t,e,n,i)=>{var a,l;const u=[];return r.hasNode(n.v)&&((a=r.getRelatedEdges(n.v,"in"))===null||a===void 0||a.forEach(f=>{const m=f.data.weight,x=r.getNode(f.source);i&&u.push({v:f.source,w:f.target,in:0,out:0}),x.data.out===void 0&&(x.data.out=0),x.data.out-=m,ma(t,e,Object.assign({v:x.id},x.data))}),(l=r.getRelatedEdges(n.v,"out"))===null||l===void 0||l.forEach(f=>{const m=f.data.weight,x=f.target,Z=r.getNode(x);Z.data.in===void 0&&(Z.data.in=0),Z.data.in-=m,ma(t,e,Object.assign({v:Z.id},Z.data))}),r.removeNode(n.v)),i?u:void 0},Gu=(r,t)=>{const e=new Qr.k;let n=0,i=0;r.getAllNodes().forEach(f=>{e.addNode({id:f.id,data:{v:f.id,in:0,out:0}})}),r.getAllEdges().forEach(f=>{const m=e.getRelatedEdges(f.source,"out").find(Z=>Z.target===f.target),x=(t==null?void 0:t(f))||1;m?e.updateEdgeData(m==null?void 0:m.id,Object.assign(Object.assign({},m.data),{weight:m.data.weight+x})):e.addEdge({id:f.id,source:f.source,target:f.target,data:{weight:x}}),i=Math.max(i,e.getNode(f.source).data.out+=x),n=Math.max(n,e.getNode(f.target).data.in+=x)});const a=[],l=i+n+3;for(let f=0;f<l;f++)a.push(new Wu);const u=n+1;return e.getAllNodes().forEach(f=>{ma(a,u,Object.assign({v:f.id},e.getNode(f.id).data))}),{buckets:a,zeroIdx:u,graph:e}},ma=(r,t,e)=>{e.out?e.in?r[e.out-e.in+t].enqueue(e):r[r.length-1].enqueue(e):r[0].enqueue(e)},Yl=(r,t)=>{const n=t==="greedy"?Ul(r,(i=>a=>a.data.weight||1)(r)):Uu(r);n==null||n.forEach(i=>{const a=i.data;r.removeEdge(i.id),a.forwardName=i.data.name,a.reversed=!0,r.addEdge({id:i.id,source:i.target,target:i.source,data:Object.assign({},a)})})},Uu=r=>{const t=[],e={},n={},i=a=>{n[a]||(n[a]=!0,e[a]=!0,r.getRelatedEdges(a,"out").forEach(l=>{e[l.target]?t.push(l):i(l.target)}),delete e[a])};return r.getAllNodes().forEach(a=>i(a.id)),t},Vu=r=>{r.getAllEdges().forEach(t=>{const e=t.data;if(e.reversed){r.removeEdge(t.id);const n=e.forwardName;delete e.reversed,delete e.forwardName,r.addEdge({id:t.id,source:t.target,target:t.source,data:Object.assign(Object.assign({},e),{forwardName:n})})}})},bc=(r,t)=>Number(r)-Number(t),oo=(r,t,e,n)=>{let i;do i=`${n}${Math.random()}`;while(r.hasNode(i));return e.dummy=t,r.addNode({id:i,data:e}),i},Yu=r=>{const t=new Qr.k;return r.getAllNodes().forEach(e=>{t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{const n=t.getRelatedEdges(e.source,"out").find(i=>i.target===e.target);n?t.updateEdgeData(n==null?void 0:n.id,Object.assign(Object.assign({},n.data),{weight:n.data.weight+e.data.weight||0,minlen:Math.max(n.data.minlen,e.data.minlen||1)})):t.addEdge({id:e.id,source:e.source,target:e.target,data:{weight:e.data.weight||0,minlen:e.data.minlen||1}})}),t},Po=r=>{const t=new Qr.k;return r.getAllNodes().forEach(e=>{r.getChildren(e.id).length||t.addNode(Object.assign({},e))}),r.getAllEdges().forEach(e=>{t.addEdge(e)}),t},cl=(r,t)=>r==null?void 0:r.reduce((e,n,i)=>(e[n]=t[i],e),{}),Qi=r=>{const t={};return r.getAllNodes().forEach(e=>{const n={};r.getRelatedEdges(e.id,"out").forEach(i=>{n[i.target]=(n[i.target]||0)+(i.data.weight||0)}),t[e.id]=n}),t},ad=r=>{const t=r.getAllNodes(),e=t.map(n=>{const i={};return r.getRelatedEdges(n.id,"in").forEach(a=>{i[a.source]=(i[a.source]||0)+a.data.weight}),i});return cl(t.map(n=>n.id),e)},Ec=(r,t)=>{const e=Number(r.x),n=Number(r.y),i=Number(t.x)-e,a=Number(t.y)-n;let l=Number(r.width)/2,u=Number(r.height)/2;if(!i&&!a)return{x:0,y:0};let f,m;return Math.abs(a)*l>Math.abs(i)*u?(a<0&&(u=-u),f=u*i/a,m=u):(i<0&&(l=-l),f=l,m=l*a/i),{x:e+f,y:n+m}},Vo=r=>{const t=[],e=wc(r)+1;for(let n=0;n<e;n++)t.push([]);r.getAllNodes().forEach(n=>{const i=n.data.rank;i!==void 0&&t[i]&&t[i].push(n.id)});for(let n=0;n<e;n++)t[n]=t[n].sort((i,a)=>bc(r.getNode(i).data.order,r.getNode(a).data.order));return t},Hu=r=>{const t=r.getAllNodes().filter(n=>n.data.rank!==void 0).map(n=>n.data.rank),e=Math.min(...t);r.getAllNodes().forEach(n=>{n.data.hasOwnProperty("rank")&&e!==1/0&&(n.data.rank-=e)})},xc=(r,t=0)=>{const e=r.getAllNodes(),n=e.filter(u=>u.data.rank!==void 0).map(u=>u.data.rank),i=Math.min(...n),a=[];e.forEach(u=>{const f=(u.data.rank||0)-i;a[f]||(a[f]=[]),a[f].push(u.id)});let l=0;for(let u=0;u<a.length;u++){const f=a[u];f===void 0?u%t!==0&&(l-=1):l&&(f==null||f.forEach(m=>{const x=r.getNode(m);x&&(x.data.rank=x.data.rank||0,x.data.rank+=l)}))}},Hl=(r,t,e,n)=>{const i={width:0,height:0};return(0,sn.Z)(e)&&(0,sn.Z)(n)&&(i.rank=e,i.order=n),oo(r,"border",i,t)},wc=r=>{let t;return r.getAllNodes().forEach(e=>{const n=e.data.rank;n!==void 0&&(t===void 0||n>t)&&(t=n)}),t||(t=0),t},Xu=(r,t)=>{const e={lhs:[],rhs:[]};return r==null||r.forEach(n=>{t(n)?e.lhs.push(n):e.rhs.push(n)}),e},Xl=(r,t)=>r.reduce((e,n)=>{const i=t(e),a=t(n);return i>a?n:e}),Mc=(r,t,e,n,i,a)=>{n.includes(t.id)||(n.push(t.id),e||a.push(t.id),i(t.id).forEach(l=>Mc(r,l,e,n,i,a)),e&&a.push(t.id))},Sc=(r,t,e,n)=>{const i=Array.isArray(t)?t:[t],a=f=>n?r.getSuccessors(f):r.getNeighbors(f),l=[],u=[];return i.forEach(f=>{if(r.hasNode(f.id))Mc(r,f,e==="post",u,a,l);else throw new Error(`Graph does not have node: ${f}`)}),l},Ku=r=>{const t=e=>{const n=r.getChildren(e),i=r.getNode(e);if(n!=null&&n.length&&n.forEach(a=>t(a.id)),i.data.hasOwnProperty("minRank")){i.data.borderLeft=[],i.data.borderRight=[];for(let a=i.data.minRank,l=i.data.maxRank+1;a<l;a+=1)Ac(r,"borderLeft","_bl",e,i,a),Ac(r,"borderRight","_br",e,i,a)}};r.getRoots().forEach(e=>t(e.id))},Ac=(r,t,e,n,i,a)=>{const l={rank:a,borderType:t,width:0,height:0},u=i.data[t][a-1],f=oo(r,"border",l,e);i.data[t][a]=f,r.setParent(f,n),u&&r.addEdge({id:`e${Math.random()}`,source:u,target:f,data:{weight:1}})},Qu=(r,t)=>{const e=t.toLowerCase();(e==="lr"||e==="rl")&&Oc(r)},Ju=(r,t)=>{const e=t.toLowerCase();(e==="bt"||e==="rl")&&$u(r),(e==="lr"||e==="rl")&&(ul(r),Oc(r))},Oc=r=>{r.getAllNodes().forEach(t=>{Tc(t)}),r.getAllEdges().forEach(t=>{Tc(t)})},Tc=r=>{const t=r.data.width;r.data.width=r.data.height,r.data.height=t},$u=r=>{r.getAllNodes().forEach(t=>{Cc(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>Cc(n)),t.data.hasOwnProperty("y")&&Cc(t.data)})},Cc=r=>{r!=null&&r.y&&(r.y=-r.y)},ul=r=>{r.getAllNodes().forEach(t=>{hl(t.data)}),r.getAllEdges().forEach(t=>{var e;(e=t.data.points)===null||e===void 0||e.forEach(n=>hl(n)),t.data.hasOwnProperty("x")&&hl(t.data)})},hl=r=>{const t=r.x;r.x=r.y,r.y=t},dl=r=>{const t=oo(r,"root",{},"_root"),e=Aa(r);let n=Math.max(...Object.values(e));Math.abs(n)===1/0&&(n=1);const i=n-1,a=2*i+1;r.getAllEdges().forEach(u=>{u.data.minlen*=a});const l=Nc(r)+1;return r.getRoots().forEach(u=>{fl(r,t,a,l,i,e,u.id)}),{nestingRoot:t,nodeRankFactor:a}},fl=(r,t,e,n,i,a,l)=>{const u=r.getChildren(l);if(!(u!=null&&u.length)){l!==t&&r.addEdge({id:`e${Math.random()}`,source:t,target:l,data:{weight:0,minlen:e}});return}const f=Hl(r,"_bt"),m=Hl(r,"_bb"),x=r.getNode(l);r.setParent(f,l),x.data.borderTop=f,r.setParent(m,l),x.data.borderBottom=m,u==null||u.forEach(Z=>{fl(r,t,e,n,i,a,Z.id);const V=Z.data.borderTop?Z.data.borderTop:Z.id,nt=Z.data.borderBottom?Z.data.borderBottom:Z.id,dt=Z.data.borderTop?n:2*n,St=V!==nt?1:i-a[l]+1;r.addEdge({id:`e${Math.random()}`,source:f,target:V,data:{minlen:St,weight:dt,nestingEdge:!0}}),r.addEdge({id:`e${Math.random()}`,source:nt,target:m,data:{minlen:St,weight:dt,nestingEdge:!0}})}),r.getParent(l)||r.addEdge({id:`e${Math.random()}`,source:t,target:f,data:{weight:0,minlen:i+a[l]}})},Aa=r=>{const t={},e=(n,i)=>{const a=r.getChildren(n);a==null||a.forEach(l=>e(l.id,i+1)),t[n]=i};return r.getRoots().forEach(n=>e(n.id,1)),t},Nc=r=>{let t=0;return r.getAllEdges().forEach(e=>{t+=e.data.weight}),t},Ii=(r,t)=>{t&&r.removeNode(t),r.getAllEdges().forEach(e=>{e.data.nestingEdge&&r.removeEdge(e.id)})},qu="edge",Pc="edge-label",kc=(r,t)=>{r.getAllEdges().forEach(e=>Yo(r,e,t))},Yo=(r,t,e)=>{let n=t.source,i=r.getNode(n).data.rank;const a=t.target,l=r.getNode(a).data.rank,u=t.data.labelRank;if(l===i+1)return;r.removeEdge(t.id);let f,m,x;for(x=0,++i;i<l;++x,++i)t.data.points=[],m={originalEdge:t,width:0,height:0,rank:i},f=oo(r,qu,m,"_d"),i===u&&(m.width=t.data.width,m.height=t.data.height,m.dummy=Pc,m.labelpos=t.data.labelpos),r.addEdge({id:`e${Math.random()}`,source:n,target:f,data:{weight:t.data.weight}}),x===0&&e.push(f),n=f;r.addEdge({id:`e${Math.random()}`,source:n,target:a,data:{weight:t.data.weight}})},th=(r,t)=>{t.forEach(e=>{let n=r.getNode(e);const{data:i}=n,a=i.originalEdge;let l;a&&r.addEdge(a);let u=e;for(;n.data.dummy;)l=r.getSuccessors(u)[0],r.removeNode(u),a.data.points.push({x:n.data.x,y:n.data.y}),n.data.dummy===Pc&&(a.data.x=n.data.x,a.data.y=n.data.y,a.data.width=n.data.width,a.data.height=n.data.height),u=l.id,n=r.getNode(u)})},eh=(r,t,e)=>{const n={};let i;e==null||e.forEach(a=>{let l=r.getParent(a),u,f;for(;l;){if(u=r.getParent(l.id),u?(f=n[u.id],n[u.id]=l.id):(f=i,i=l.id),f&&f!==l.id){t.hasNode(f)||t.addNode({id:f,data:{}}),t.hasNode(l.id)||t.addNode({id:l.id,data:{}}),t.hasEdge(`e${f}-${l.id}`)||t.addEdge({id:`e${f}-${l.id}`,source:f,target:l.id,data:{}});return}l=u}})},nh=(r,t,e)=>{const n=ea(r),i=new Qr.k({tree:[{id:n,children:[],data:{}}]});return r.getAllNodes().forEach(a=>{const l=r.getParent(a.id);(a.data.rank===t||a.data.minRank<=t&&t<=a.data.maxRank)&&(i.hasNode(a.id)||i.addNode(Object.assign({},a)),l!=null&&l.id&&!i.hasNode(l==null?void 0:l.id)&&i.addNode(Object.assign({},l)),i.setParent(a.id,(l==null?void 0:l.id)||n),r.getRelatedEdges(a.id,e).forEach(u=>{const f=u.source===a.id?u.target:u.source;i.hasNode(f)||i.addNode(Object.assign({},r.getNode(f)));const m=i.getRelatedEdges(f,"out").find(({target:Z})=>Z===a.id),x=m!==void 0?m.data.weight:0;m?i.updateEdgeData(m.id,Object.assign(Object.assign({},m.data),{weight:u.data.weight+x})):i.addEdge({id:u.id,source:f,target:a.id,data:{weight:u.data.weight+x}})}),a.data.hasOwnProperty("minRank")&&i.updateNodeData(a.id,Object.assign(Object.assign({},a.data),{borderLeft:a.data.borderLeft[t],borderRight:a.data.borderRight[t]})))}),i},ea=r=>{let t;for(;r.hasNode(t=`_root${Math.random()}`););return t},ps=(r,t,e)=>{const n=cl(e,e.map((x,Z)=>Z)),a=t.map(x=>{const Z=r.getRelatedEdges(x,"out").map(V=>({pos:n[V.target]||0,weight:V.data.weight}));return Z==null?void 0:Z.sort((V,nt)=>V.pos-nt.pos)}).flat().filter(x=>x!==void 0);let l=1;for(;l<e.length;)l<<=1;const u=2*l-1;l-=1;const f=Array(u).fill(0,0,u);let m=0;return a==null||a.forEach(x=>{if(x){let Z=x.pos+l;f[Z]+=x.weight;let V=0;for(;Z>0;)Z%2&&(V+=f[Z+1]),Z=Z-1>>1,f[Z]+=x.weight;m+=x.weight*V}}),m},Rc=(r,t)=>{let e=0;for(let n=1;n<(t==null?void 0:t.length);n+=1)e+=ps(r,t[n-1],t[n]);return e},Lc=r=>{const t={},e=r.getAllNodes(),n=e.map(m=>{var x;return(x=m.data.rank)!==null&&x!==void 0?x:-1/0}),i=Math.max(...n),a=[];for(let m=0;m<i+1;m++)a.push([]);const l=e.sort((m,x)=>r.getNode(m.id).data.rank-r.getNode(x.id).data.rank),f=l.filter(m=>r.getNode(m.id).data.fixorder!==void 0).sort((m,x)=>r.getNode(m.id).data.fixorder-r.getNode(x.id).data.fixorder);return f==null||f.forEach(m=>{isNaN(r.getNode(m.id).data.rank)||a[r.getNode(m.id).data.rank].push(m.id),t[m.id]=!0}),l==null||l.forEach(m=>r.dfsTree(m.id,x=>{if(t.hasOwnProperty(x.id))return!0;t[x.id]=!0,isNaN(x.data.rank)||a[x.data.rank].push(x.id)})),a},vl=(r,t)=>t.map(e=>{const n=r.getRelatedEdges(e,"in");if(!(n!=null&&n.length))return{v:e};const i={sum:0,weight:0};return n==null||n.forEach(a=>{const l=r.getNode(a.source);i.sum+=a.data.weight*l.data.order,i.weight+=a.data.weight}),{v:e,barycenter:i.sum/i.weight,weight:i.weight}}),rh=(r,t)=>{var e,n,i;const a={};r==null||r.forEach((u,f)=>{a[u.v]={i:f,indegree:0,in:[],out:[],vs:[u.v]};const m=a[u.v];u.barycenter!==void 0&&(m.barycenter=u.barycenter,m.weight=u.weight)}),(e=t.getAllEdges())===null||e===void 0||e.forEach(u=>{const f=a[u.source],m=a[u.target];f!==void 0&&m!==void 0&&(m.indegree++,f.out.push(a[u.target]))});const l=(i=(n=Object.values(a)).filter)===null||i===void 0?void 0:i.call(n,u=>!u.indegree);return ih(l)},ih=r=>{var t,e;const n=[],i=f=>m=>{m.merged||(m.barycenter===void 0||f.barycenter===void 0||m.barycenter>=f.barycenter)&&ah(f,m)},a=f=>m=>{m.in.push(f),--m.indegree===0&&r.push(m)};for(;r!=null&&r.length;){const f=r.pop();n.push(f),(t=f.in.reverse())===null||t===void 0||t.forEach(m=>i(f)(m)),(e=f.out)===null||e===void 0||e.forEach(m=>a(f)(m))}const l=n.filter(f=>!f.merged),u=["vs","i","barycenter","weight"];return l.map(f=>{const m={};return u==null||u.forEach(x=>{f[x]!==void 0&&(m[x]=f[x])}),m})},ah=(r,t)=>{var e;let n=0,i=0;r.weight&&(n+=r.barycenter*r.weight,i+=r.weight),t.weight&&(n+=t.barycenter*t.weight,i+=t.weight),r.vs=(e=t.vs)===null||e===void 0?void 0:e.concat(r.vs),r.barycenter=n/i,r.weight=i,r.i=Math.min(t.i,r.i),t.merged=!0};var lo=rh;const sh=(r,t,e,n)=>{const i=Xu(r,V=>{const nt=V.hasOwnProperty("fixorder")&&!isNaN(V.fixorder);return n?!nt&&V.hasOwnProperty("barycenter"):nt||V.hasOwnProperty("barycenter")}),a=i.lhs,l=i.rhs.sort((V,nt)=>-V.i- -nt.i),u=[];let f=0,m=0,x=0;a==null||a.sort(oh(!!t,!!e)),x=Hs(u,l,x),a==null||a.forEach(V=>{var nt;x+=(nt=V.vs)===null||nt===void 0?void 0:nt.length,u.push(V.vs),f+=V.barycenter*V.weight,m+=V.weight,x=Hs(u,l,x)});const Z={vs:u.flat()};return m&&(Z.barycenter=f/m,Z.weight=m),Z},Hs=(r,t,e)=>{let n=e,i;for(;t.length&&(i=t[t.length-1]).i<=n;)t.pop(),r==null||r.push(i.vs),n++;return n},oh=(r,t)=>(e,n)=>{if(e.fixorder!==void 0&&n.fixorder!==void 0)return e.fixorder-n.fixorder;if(e.barycenter<n.barycenter)return-1;if(e.barycenter>n.barycenter)return 1;if(t&&e.order!==void 0&&n.order!==void 0){if(e.order<n.order)return-1;if(e.order>n.order)return 1}return r?n.i-e.i:e.i-n.i},Dc=(r,t,e,n,i,a)=>{var l,u,f,m;let x=r.getChildren(t).map(oe=>oe.id);const Z=r.getNode(t),V=Z?Z.data.borderLeft:void 0,nt=Z?Z.data.borderRight:void 0,dt={};V&&(x=x==null?void 0:x.filter(oe=>oe!==V&&oe!==nt));const St=vl(r,x||[]);St==null||St.forEach(oe=>{var ge;if(!((ge=r.getChildren(oe.v))===null||ge===void 0)&&ge.length){const Be=Dc(r,oe.v,e,n,a);dt[oe.v]=Be,Be.hasOwnProperty("barycenter")&&Ho(oe,Be)}});const Dt=lo(St,e);lh(Dt,dt),(l=Dt.filter(oe=>oe.vs.length>0))===null||l===void 0||l.forEach(oe=>{const ge=r.getNode(oe.vs[0]);ge&&(oe.fixorder=ge.data.fixorder,oe.order=ge.data.order)});const Jt=sh(Dt,n,i,a);if(V&&(Jt.vs=[V,Jt.vs,nt].flat(),!((u=r.getPredecessors(V))===null||u===void 0)&&u.length)){const oe=r.getNode(((f=r.getPredecessors(V))===null||f===void 0?void 0:f[0].id)||""),ge=r.getNode(((m=r.getPredecessors(nt))===null||m===void 0?void 0:m[0].id)||"");Jt.hasOwnProperty("barycenter")||(Jt.barycenter=0,Jt.weight=0),Jt.barycenter=(Jt.barycenter*Jt.weight+oe.data.order+ge.data.order)/(Jt.weight+2),Jt.weight+=2}return Jt},lh=(r,t)=>{r==null||r.forEach(e=>{var n;const i=(n=e.vs)===null||n===void 0?void 0:n.map(a=>t[a]?t[a].vs:a);e.vs=i.flat()})},Ho=(r,t)=>{r.barycenter!==void 0?(r.barycenter=(r.barycenter*r.weight+t.barycenter*t.weight)/(r.weight+t.weight),r.weight+=t.weight):(r.barycenter=t.barycenter,r.weight=t.weight)},co=(r,t)=>{const e=wc(r),n=[],i=[];for(let x=1;x<e+1;x++)n.push(x);for(let x=e-1;x>-1;x--)i.push(x);const a=Xo(r,n,"in"),l=Xo(r,i,"out");let u=Lc(r);gl(r,u);let f=Number.POSITIVE_INFINITY,m;for(let x=0,Z=0;Z<4;++x,++Z){Kl(x%2?a:l,x%4>=2,!1,t),u=Vo(r);const V=Rc(r,u);V<f&&(Z=0,m=(0,Me.Z)(u),f=V)}u=Lc(r),gl(r,u);for(let x=0,Z=0;Z<4;++x,++Z){Kl(x%2?a:l,x%4>=2,!0,t),u=Vo(r);const V=Rc(r,u);V<f&&(Z=0,m=(0,Me.Z)(u),f=V)}gl(r,m)},Xo=(r,t,e)=>t.map(n=>nh(r,n,e)),Kl=(r,t,e,n)=>{const i=new Qr.k;r==null||r.forEach(a=>{var l;const u=a.getRoots()[0].id,f=Dc(a,u,i,t,e,n);for(let m=0;m<((l=f.vs)===null||l===void 0?void 0:l.length);m++){const x=a.getNode(f.vs[m]);x&&(x.data.order=m)}eh(a,i,f.vs)})},gl=(r,t)=>{t==null||t.forEach(e=>{e==null||e.forEach((n,i)=>{r.getNode(n).data.order=i})})},pl=(r,t)=>{const n=r.getAllNodes().filter(l=>{var u;return!(!((u=r.getChildren(l.id))===null||u===void 0)&&u.length)}).map(l=>l.data.rank),i=Math.max(...n),a=[];for(let l=0;l<i+1;l++)a[l]=[];t==null||t.forEach(l=>{const u=r.getNode(l);!u||u.data.dummy||isNaN(u.data.rank)||(u.data.fixorder=a[u.data.rank].length,a[u.data.rank].push(l))})},ch=r=>{const t={};let e=0;const n=i=>{const a=e;r.getChildren(i).forEach(l=>n(l.id)),t[i]={low:a,lim:e++}};return r.getRoots().forEach(i=>n(i.id)),t},Ic=(r,t,e,n)=>{var i,a;const l=[],u=[],f=Math.min(t[e].low,t[n].low),m=Math.max(t[e].lim,t[n].lim);let x,Z;x=e;do x=(i=r.getParent(x))===null||i===void 0?void 0:i.id,l.push(x);while(x&&(t[x].low>f||m>t[x].lim));for(Z=x,x=n;x&&x!==Z;)u.push(x),x=(a=r.getParent(x))===null||a===void 0?void 0:a.id;return{lca:Z,path:l.concat(u.reverse())}},uo=(r,t)=>{const e=ch(r);t.forEach(n=>{var i,a;let l=n,u=r.getNode(l);const f=u.data.originalEdge;if(!f)return;const m=Ic(r,e,f.source,f.target),x=m.path,Z=m.lca;let V=0,nt=x[V],dt=!0;for(;l!==f.target;){if(u=r.getNode(l),dt){for(;nt!==Z&&((i=r.getNode(nt))===null||i===void 0?void 0:i.data.maxRank)<u.data.rank;)V++,nt=x[V];nt===Z&&(dt=!1)}if(!dt){for(;V<x.length-1&&((a=r.getNode(x[V+1]))===null||a===void 0?void 0:a.data.minRank)<=u.data.rank;)V++;nt=x[V]}r.hasNode(nt)&&r.setParent(l,nt),l=r.getSuccessors(l)[0].id}})},Ql=(r,t)=>{const e={},n=(i,a)=>{let l=0,u=0;const f=i.length,m=a==null?void 0:a[(a==null?void 0:a.length)-1];return a==null||a.forEach((x,Z)=>{var V;const nt=uh(r,x),dt=nt?r.getNode(nt.id).data.order:f;(nt||x===m)&&((V=a.slice(u,Z+1))===null||V===void 0||V.forEach(St=>{var Dt;(Dt=r.getPredecessors(St))===null||Dt===void 0||Dt.forEach(Jt=>{var oe;const ge=r.getNode(Jt.id),Be=ge.data.order;(Be<l||dt<Be)&&!(ge.data.dummy&&(!((oe=r.getNode(St))===null||oe===void 0)&&oe.data.dummy))&&Fc(e,Jt.id,St)})}),u=Z+1,l=dt)}),a};return t!=null&&t.length&&t.reduce(n),e},Bc=(r,t)=>{const e={};function n(u,f,m,x,Z){var V,nt;let dt;for(let St=f;St<m;St++)dt=u[St],!((V=r.getNode(dt))===null||V===void 0)&&V.data.dummy&&((nt=r.getPredecessors(dt))===null||nt===void 0||nt.forEach(Dt=>{const Jt=r.getNode(Dt.id);Jt.data.dummy&&(Jt.data.order<x||Jt.data.order>Z)&&Fc(e,Dt.id,dt)}))}function i(u){return JSON.stringify(u.slice(1))}function a(u,f){const m=i(u);f.get(m)||(n(...u),f.set(m,!0))}const l=(u,f)=>{let m=-1,x,Z=0;const V=new Map;return f==null||f.forEach((nt,dt)=>{var St;if(((St=r.getNode(nt))===null||St===void 0?void 0:St.data.dummy)==="border"){const Dt=r.getPredecessors(nt)||[];Dt.length&&(x=r.getNode(Dt[0].id).data.order,a([f,Z,dt,m,x],V),Z=dt,m=x)}a([f,Z,f.length,x,u.length],V)}),f};return t!=null&&t.length&&t.reduce(l),e},uh=(r,t)=>{var e,n;if(!((e=r.getNode(t))===null||e===void 0)&&e.data.dummy)return(n=r.getPredecessors(t))===null||n===void 0?void 0:n.find(i=>r.getNode(i.id).data.dummy)},Fc=(r,t,e)=>{let n=t,i=e;if(n>i){const l=n;n=i,i=l}let a=r[n];a||(r[n]=a={}),a[i]=!0},hh=(r,t,e)=>{let n=t,i=e;if(n>i){const a=t;n=i,i=a}return!!r[n]},_c=(r,t,e,n)=>{const i={},a={},l={};return t==null||t.forEach(u=>{u==null||u.forEach((f,m)=>{i[f]=f,a[f]=f,l[f]=m})}),t==null||t.forEach(u=>{let f=-1;u==null||u.forEach(m=>{let x=n(m).map(Z=>Z.id);if(x.length){x=x.sort((V,nt)=>l[V]-l[nt]);const Z=(x.length-1)/2;for(let V=Math.floor(Z),nt=Math.ceil(Z);V<=nt;++V){const dt=x[V];a[m]===m&&f<l[dt]&&!hh(e,m,dt)&&(a[dt]=m,a[m]=i[m]=i[dt],f=l[dt])}}})}),{root:i,align:a}},Zc=(r,t,e,n,i,a,l)=>{var u;const f={},m=dh(r,t,e,i,a,l),x=l?"borderLeft":"borderRight",Z=(dt,St)=>{let Dt=m.getAllNodes(),Jt=Dt.pop();const oe={};for(;Jt;)oe[Jt.id]?dt(Jt.id):(oe[Jt.id]=!0,Dt.push(Jt),Dt=Dt.concat(St(Jt.id))),Jt=Dt.pop()},V=dt=>{f[dt]=(m.getRelatedEdges(dt,"in")||[]).reduce((St,Dt)=>Math.max(St,(f[Dt.source]||0)+Dt.data.weight),0)},nt=dt=>{const St=(m.getRelatedEdges(dt,"out")||[]).reduce((Jt,oe)=>Math.min(Jt,(f[oe.target]||0)-oe.data.weight),Number.POSITIVE_INFINITY),Dt=r.getNode(dt);St!==Number.POSITIVE_INFINITY&&Dt.data.borderType!==x&&(f[dt]=Math.max(f[dt],St))};return Z(V,m.getPredecessors.bind(m)),Z(nt,m.getSuccessors.bind(m)),(u=Object.values(n))===null||u===void 0||u.forEach(dt=>{f[dt]=f[e[dt]]}),f},dh=(r,t,e,n,i,a)=>{const l=new Qr.k,u=Un(n,i,a);return t==null||t.forEach(f=>{let m;f==null||f.forEach(x=>{const Z=e[x];if(l.hasNode(Z)||l.addNode({id:Z,data:{}}),m){const V=e[m],nt=l.getRelatedEdges(V,"out").find(dt=>dt.target===Z);nt?l.updateEdgeData(nt.id,Object.assign(Object.assign({},nt.data),{weight:Math.max(u(r,x,m),nt.data.weight||0)})):l.addEdge({id:`e${Math.random()}`,source:V,target:Z,data:{weight:Math.max(u(r,x,m),0)}})}m=x})}),l},zc=(r,t)=>Xl(Object.values(t),e=>{var n;let i=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;return(n=Object.keys(e))===null||n===void 0||n.forEach(l=>{const u=e[l],f=fh(r,l)/2;i=Math.max(u+f,i),a=Math.min(u-f,a)}),i-a});function jc(r,t){const e=Object.values(t),n=Math.min(...e),i=Math.max(...e);["u","d"].forEach(a=>{["l","r"].forEach(l=>{const u=a+l,f=r[u];let m;if(f===t)return;const x=Object.values(f);m=l==="l"?n-Math.min(...x):i-Math.max(...x),m&&(r[u]={},Object.keys(f).forEach(Z=>{r[u][Z]=f[Z]+m}))})})}const Wc=(r,t)=>{const e={};return Object.keys(r.ul).forEach(n=>{if(t)e[n]=r[t.toLowerCase()][n];else{const i=Object.values(r).map(a=>a[n]);e[n]=(i[0]+i[1])/2}}),e},sd=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=buildLayerMatrix(r),l=Object.assign(Ql(r,a),Bc(r,a)),u={};let f;["u","d"].forEach(x=>{f=x==="u"?a:Object.values(a).reverse(),["l","r"].forEach(Z=>{Z==="r"&&(f=f.map(St=>Object.values(St).reverse()));const V=(x==="u"?r.getPredecessors:r.getSuccessors).bind(r),nt=_c(r,f,l,V),dt=Zc(r,f,nt.root,nt.align,n,i,Z==="r");Z==="r"&&Object.keys(dt).forEach(St=>{dt[St]=-dt[St]}),u[x+Z]=dt})});const m=zc(r,u);return jc(u,m),Wc(u,e)},Un=(r,t,e)=>(n,i,a)=>{const l=n.getNode(i),u=n.getNode(a);let f=0,m=0;if(f+=l.data.width/2,l.data.hasOwnProperty("labelpos"))switch((l.data.labelpos||"").toLowerCase()){case"l":m=-l.data.width/2;break;case"r":m=l.data.width/2;break}if(m&&(f+=e?m:-m),m=0,f+=(l.data.dummy?t:r)/2,f+=(u.data.dummy?t:r)/2,f+=u.data.width/2,u.data.labelpos)switch((u.data.labelpos||"").toLowerCase()){case"l":m=u.data.width/2;break;case"r":m=-u.data.width/2;break}return m&&(f+=e?m:-m),m=0,f},fh=(r,t)=>r.getNode(t).data.width||0,vh=(r,t)=>{const{ranksep:e=0}=t||{},n=Vo(r);let i=0;n==null||n.forEach(a=>{const l=a.map(f=>r.getNode(f).data.height),u=Math.max(...l,0);a==null||a.forEach(f=>{r.getNode(f).data.y=i+u/2}),i+=u+e})},gh=(r,t)=>{const{align:e,nodesep:n=0,edgesep:i=0}=t||{},a=Vo(r),l=Object.assign(Ql(r,a),Bc(r,a)),u={};let f=[];["u","d"].forEach(x=>{f=x==="u"?a:Object.values(a).reverse(),["l","r"].forEach(Z=>{Z==="r"&&(f=f.map(St=>Object.values(St).reverse()));const V=(x==="u"?r.getPredecessors:r.getSuccessors).bind(r),nt=_c(r,f,l,V),dt=Zc(r,f,nt.root,nt.align,n,i,Z==="r");Z==="r"&&Object.keys(dt).forEach(St=>dt[St]=-dt[St]),u[x+Z]=dt})});const m=zc(r,u);return m&&jc(u,m),Wc(u,e)},Gc=(r,t)=>{var e;const n=Po(r);vh(n,t);const i=gh(n,t);(e=Object.keys(i))===null||e===void 0||e.forEach(a=>{n.getNode(a).data.x=i[a]})},ph=r=>{const t={},e=n=>{var i;const a=r.getNode(n);if(!a)return 0;if(t[n])return a.data.rank;t[n]=!0;let l;return(i=r.getRelatedEdges(n,"out"))===null||i===void 0||i.forEach(u=>{const f=e(u.target),m=u.data.minlen,x=f-m;x&&(l===void 0||x<l)&&(l=x)}),l||(l=0),a.data.rank=l,l};r.getAllNodes().filter(n=>r.getRelatedEdges(n.id,"in").length===0).forEach(n=>e(n.id))},Jl=r=>{const t={};let e;const n=l=>{var u;const f=r.getNode(l);if(!f)return 0;if(t[l])return f.data.rank;t[l]=!0;let m;return(u=r.getRelatedEdges(l,"out"))===null||u===void 0||u.forEach(x=>{const Z=n(x.target),V=x.data.minlen,nt=Z-V;nt&&(m===void 0||nt<m)&&(m=nt)}),m||(m=0),(e===void 0||m<e)&&(e=m),f.data.rank=m,m};r.getAllNodes().filter(l=>r.getRelatedEdges(l.id,"in").length===0).forEach(l=>{l&&n(l.id)}),e===void 0&&(e=0);const i={},a=(l,u)=>{var f;const m=r.getNode(l),x=isNaN(m.data.layer)?u:m.data.layer;(m.data.rank===void 0||m.data.rank<x)&&(m.data.rank=x),!i[l]&&(i[l]=!0,(f=r.getRelatedEdges(l,"out"))===null||f===void 0||f.forEach(Z=>{a(Z.target,x+Z.data.minlen)}))};r.getAllNodes().forEach(l=>{const u=l.data;u&&(isNaN(u.layer)?u.rank-=e:a(l.id,u.layer))})},ms=(r,t)=>r.getNode(t.target).data.rank-r.getNode(t.source).data.rank-t.data.minlen,Uc=r=>{const t=new Qr.k({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;mh(t,r)<n;)i=is(t,r),a=t.hasNode(i.source)?ms(r,i):-ms(r,i),ko(t,r,a);return t},mh=(r,t)=>{const e=n=>{t.getRelatedEdges(n,"both").forEach(i=>{const a=i.source,l=n===a?i.target:a;!r.hasNode(l)&&!ms(t,i)&&(r.addNode({id:l,data:{}}),r.addEdge({id:i.id,source:n,target:l,data:{}}),e(l))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},Ni=r=>{const t=new Qr.k({tree:[]}),e=r.getAllNodes()[0],n=r.getAllNodes().length;t.addNode(e);let i,a;for(;yh(t,r)<n;)i=is(t,r),a=t.hasNode(i.source)?ms(r,i):-ms(r,i),ko(t,r,a);return t},yh=(r,t)=>{const e=n=>{var i;(i=t.getRelatedEdges(n,"both"))===null||i===void 0||i.forEach(a=>{const l=a.source,u=n===l?a.target:l;!r.hasNode(u)&&(t.getNode(u).data.layer!==void 0||!ms(t,a))&&(r.addNode({id:u,data:{}}),r.addEdge({id:a.id,source:n,target:u,data:{}}),e(u))})};return r.getAllNodes().forEach(n=>e(n.id)),r.getAllNodes().length},is=(r,t)=>Xl(t.getAllEdges(),e=>r.hasNode(e.source)!==r.hasNode(e.target)?ms(t,e):1/0),ko=(r,t,e)=>{r.getAllNodes().forEach(n=>{const i=t.getNode(n.id);i.data.rank||(i.data.rank=0),i.data.rank+=e})},bh=r=>{const t=Yu(r);ph(t);const e=Uc(t);ql(e),Pi(e,t);let n,i;for(;n=xh(e);)i=Ko(e,t,n),wh(e,t,n,i)},Pi=(r,t)=>{let e=Sc(r,r.getAllNodes(),"post",!1);e=e.slice(0,(e==null?void 0:e.length)-1),e.forEach(n=>{$l(r,t,n)})},$l=(r,t,e)=>{const i=r.getNode(e).data.parent,a=r.getRelatedEdges(e,"both").find(l=>l.target===i||l.source===i);a.data.cutvalue=Eh(r,t,e)},Eh=(r,t,e)=>{const i=r.getNode(e).data.parent;let a=!0,l=t.getRelatedEdges(e,"out").find(f=>f.target===i),u=0;return l||(a=!1,l=t.getRelatedEdges(i,"out").find(f=>f.target===e)),u=l.data.weight,t.getRelatedEdges(e,"both").forEach(f=>{const m=f.source===e,x=m?f.target:f.source;if(x!==i){const Z=m===a,V=f.data.weight;if(u+=Z?V:-V,ec(r,e,x)){const nt=r.getRelatedEdges(e,"both").find(dt=>dt.source===x||dt.target===x).data.cutvalue;u+=Z?-nt:nt}}}),u},ql=(r,t=r.getAllNodes()[0].id)=>{ml(r,{},1,t)},ml=(r,t,e,n,i)=>{var a;const l=e;let u=e;const f=r.getNode(n);return t[n]=!0,(a=r.getNeighbors(n))===null||a===void 0||a.forEach(m=>{t[m.id]||(u=ml(r,t,u,m.id,n))}),f.data.low=l,f.data.lim=u++,i?f.data.parent=i:delete f.data.parent,u},xh=r=>r.getAllEdges().find(t=>t.data.cutvalue<0),Ko=(r,t,e)=>{let n=e.source,i=e.target;t.getRelatedEdges(n,"out").find(x=>x.target===i)||(n=e.target,i=e.source);const a=r.getNode(n),l=r.getNode(i);let u=a,f=!1;a.data.lim>l.data.lim&&(u=l,f=!0);const m=t.getAllEdges().filter(x=>f===Vc(r.getNode(x.source),u)&&f!==Vc(r.getNode(x.target),u));return Xl(m,x=>ms(t,x))},wh=(r,t,e,n)=>{const i=r.getRelatedEdges(e.source,"both").find(a=>a.source===e.target||a.target===e.target);i&&r.removeEdge(i.id),r.addEdge({id:`e${Math.random()}`,source:n.source,target:n.target,data:{}}),ql(r),Pi(r,t),tc(r,t)},tc=(r,t)=>{const e=r.getAllNodes().find(i=>!i.data.parent);let n=Sc(r,e,"pre",!1);n=n.slice(1),n.forEach(i=>{const a=r.getNode(i).data.parent;let l=t.getRelatedEdges(i,"out").find(f=>f.target===a),u=!1;!l&&t.hasNode(a)&&(l=t.getRelatedEdges(a,"out").find(f=>f.target===i),u=!0),t.getNode(i).data.rank=(t.hasNode(a)&&t.getNode(a).data.rank||0)+(u?l==null?void 0:l.data.minlen:-(l==null?void 0:l.data.minlen))})},ec=(r,t,e)=>r.getRelatedEdges(t,"both").find(n=>n.source===e||n.target===e),Vc=(r,t)=>t.data.low<=r.data.lim&&r.data.lim<=t.data.lim,nc=(r,t)=>{switch(t){case"network-simplex":Sh(r);break;case"tight-tree":yl(r);break;case"longest-path":Mh(r);break;default:yl(r)}},Mh=ph,yl=r=>{Jl(r),Ni(r)},Sh=r=>{bh(r)},Qo=(r,t)=>{const{edgeLabelSpace:e,keepNodeOrder:n,prevGraph:i,rankdir:a,ranksep:l}=t;!n&&i&&rc(r,i);const u=Yc(r);e&&(t.ranksep=Hc(u,{rankdir:a,ranksep:l}));let f;try{f=Ah(u,t)}catch(m){if(m.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:
|
|
|
`,m);return}throw m}return ic(r,u),f},Ah=(r,t)=>{const{acyclicer:e,ranker:n,rankdir:i="tb",nodeOrder:a,keepNodeOrder:l,align:u,nodesep:f=50,edgesep:m=20,ranksep:x=50}=t;xl(r),Yl(r,e);const{nestingRoot:Z,nodeRankFactor:V}=dl(r);nc(Po(r),n),Ch(r),xc(r,V),Ii(r,Z),Hu(r),Nh(r),Xc(r);const nt=[];kc(r,nt),uo(r,nt),Ku(r),l&&pl(r,a),co(r,l),wl(r),Qu(r,i),Gc(r,{align:u,nodesep:f,edgesep:m,ranksep:x}),ac(r),kh(r),th(r,nt),Kc(r),Ju(r,i);const{width:dt,height:St}=ld(r);return ys(r),Ph(r),Vu(r),{width:dt,height:St}},rc=(r,t)=>{r.getAllNodes().forEach(e=>{const n=r.getNode(e.id);if(t.hasNode(e.id)){const i=t.getNode(e.id);n.data.fixorder=i.data._order,delete i.data._order}else delete n.data.fixorder})},ic=(r,t)=>{r.getAllNodes().forEach(e=>{var n;const i=r.getNode(e.id);if(i){const a=t.getNode(e.id);i.data.x=a.data.x,i.data.y=a.data.y,i.data._order=a.data.order,i.data._rank=a.data.rank,!((n=t.getChildren(e.id))===null||n===void 0)&&n.length&&(i.data.width=a.data.width,i.data.height=a.data.height)}}),r.getAllEdges().forEach(e=>{const n=r.getEdge(e.id),i=t.getEdge(e.id);n.data.points=i?i.data.points:[],i&&i.data.hasOwnProperty("x")&&(n.data.x=i.data.x,n.data.y=i.data.y)})},Oh=["width","height","layer","fixorder"],bl={width:0,height:0},Th=["minlen","weight","width","height","labeloffset"],od={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},El=["labelpos"],Yc=r=>{const t=new Qr.k({tree:[]});return r.getAllNodes().forEach(e=>{const n=Ml(r.getNode(e.id).data),i=Object.assign(Object.assign({},bl),n),a=sc(i,Oh);t.hasNode(e.id)||t.addNode({id:e.id,data:Object.assign({},a)});const l=r.hasTreeStructure("combo")?r.getParent(e.id,"combo"):r.getParent(e.id);(0,z.Z)(l)||(t.hasNode(l.id)||t.addNode(Object.assign({},l)),t.setParent(e.id,l.id))}),r.getAllEdges().forEach(e=>{const n=Ml(r.getEdge(e.id).data),i={};El==null||El.forEach(a=>{n[a]!==void 0&&(i[a]=n[a])}),t.addEdge({id:e.id,source:e.source,target:e.target,data:Object.assign({},od,sc(n,Th),i)})}),t},Hc=(r,t)=>{const{ranksep:e=0,rankdir:n}=t;return r.getAllNodes().forEach(i=>{isNaN(i.data.layer)||i.data.layer||(i.data.layer=0)}),r.getAllEdges().forEach(i=>{var a;i.data.minlen*=2,((a=i.data.labelpos)===null||a===void 0?void 0:a.toLowerCase())!=="c"&&(n==="TB"||n==="BT"?i.data.width+=i.data.labeloffset:i.data.height+=i.data.labeloffset)}),e/2},Ch=r=>{r.getAllEdges().forEach(t=>{if(t.data.width&&t.data.height){const e=r.getNode(t.source),n=r.getNode(t.target),i={e:t,rank:(n.data.rank-e.data.rank)/2+e.data.rank};oo(r,"edge-proxy",i,"_ep")}})},Nh=r=>{let t=0;return r.getAllNodes().forEach(e=>{var n,i;e.data.borderTop&&(e.data.minRank=(n=r.getNode(e.data.borderTop))===null||n===void 0?void 0:n.data.rank,e.data.maxRank=(i=r.getNode(e.data.borderBottom))===null||i===void 0?void 0:i.data.rank,t=Math.max(t,e.data.maxRank||-1/0))}),t},Xc=r=>{r.getAllNodes().forEach(t=>{t.data.dummy==="edge-proxy"&&(r.getEdge(t.data.e.id).data.labelRank=t.data.rank,r.removeNode(t.id))})},ld=(r,t)=>{let e,n=0,i,a=0;const{marginx:l=0,marginy:u=0}=t||{},f=m=>{if(!m.data)return;const x=m.data.x,Z=m.data.y,V=m.data.width,nt=m.data.height;!isNaN(x)&&!isNaN(V)&&(e===void 0&&(e=x-V/2),e=Math.min(e,x-V/2),n=Math.max(n,x+V/2)),!isNaN(Z)&&!isNaN(nt)&&(i===void 0&&(i=Z-nt/2),i=Math.min(i,Z-nt/2),a=Math.max(a,Z+nt/2))};return r.getAllNodes().forEach(m=>{f(m)}),r.getAllEdges().forEach(m=>{m!=null&&m.data.hasOwnProperty("x")&&f(m)}),e-=l,i-=u,r.getAllNodes().forEach(m=>{m.data.x-=e,m.data.y-=i}),r.getAllEdges().forEach(m=>{var x;(x=m.data.points)===null||x===void 0||x.forEach(Z=>{Z.x-=e,Z.y-=i}),m.data.hasOwnProperty("x")&&(m.data.x-=e),m.data.hasOwnProperty("y")&&(m.data.y-=i)}),{width:n-e+l,height:a-i+u}},ys=r=>{r.getAllEdges().forEach(t=>{const e=r.getNode(t.source),n=r.getNode(t.target);let i,a;t.data.points?(i=t.data.points[0],a=t.data.points[t.data.points.length-1]):(t.data.points=[],i={x:n.data.x,y:n.data.y},a={x:e.data.x,y:e.data.y}),t.data.points.unshift(Ec(e.data,i)),t.data.points.push(Ec(n.data,a))})},Kc=r=>{r.getAllEdges().forEach(t=>{if(t.data.hasOwnProperty("x"))switch((t.data.labelpos==="l"||t.data.labelpos==="r")&&(t.data.width-=t.data.labeloffset),t.data.labelpos){case"l":t.data.x-=t.data.width/2+t.data.labeloffset;break;case"r":t.data.x+=t.data.width/2+t.data.labeloffset;break}})},Ph=r=>{r.getAllEdges().forEach(t=>{var e;t.data.reversed&&((e=t.data.points)===null||e===void 0||e.reverse())})},kh=r=>{r.getAllNodes().forEach(t=>{var e,n,i;if(!((e=r.getChildren(t.id))===null||e===void 0)&&e.length){const a=r.getNode(t.id),l=r.getNode(a.data.borderTop),u=r.getNode(a.data.borderBottom),f=r.getNode(a.data.borderLeft[((n=a.data.borderLeft)===null||n===void 0?void 0:n.length)-1]),m=r.getNode(a.data.borderRight[((i=a.data.borderRight)===null||i===void 0?void 0:i.length)-1]);a.data.width=Math.abs((m==null?void 0:m.data.x)-(f==null?void 0:f.data.x))||10,a.data.height=Math.abs((u==null?void 0:u.data.y)-(l==null?void 0:l.data.y))||10,a.data.x=((f==null?void 0:f.data.x)||0)+a.data.width/2,a.data.y=((l==null?void 0:l.data.y)||0)+a.data.height/2}}),r.getAllNodes().forEach(t=>{t.data.dummy==="border"&&r.removeNode(t.id)})},xl=r=>{r.getAllEdges().forEach(t=>{if(t.source===t.target){const e=r.getNode(t.source);e.data.selfEdges||(e.data.selfEdges=[]),e.data.selfEdges.push(t),r.removeEdge(t.id)}})},wl=r=>{const t=Vo(r);t==null||t.forEach(e=>{let n=0;e==null||e.forEach((i,a)=>{var l;const u=r.getNode(i);u.data.order=a+n,(l=u.data.selfEdges)===null||l===void 0||l.forEach(f=>{oo(r,"selfedge",{width:f.data.width,height:f.data.height,rank:u.data.rank,order:a+ ++n,e:f},"_se")}),delete u.data.selfEdges})})},ac=r=>{r.getAllNodes().forEach(t=>{const e=r.getNode(t.id);if(e.data.dummy==="selfedge"){const n=r.getNode(e.data.e.source),i=n.data.x+n.data.width/2,a=n.data.y,l=e.data.x-i,u=n.data.height/2;r.hasEdge(e.data.e.id)?r.updateEdgeData(e.data.e.id,e.data.e.data):r.addEdge({id:e.data.e.id,source:e.data.e.source,target:e.data.e.target,data:e.data.e.data}),r.removeNode(t.id),e.data.e.data.points=[{x:i+2*l/3,y:a-u},{x:i+5*l/6,y:a-u},{y:a,x:i+l},{x:i+5*l/6,y:a+u},{x:i+2*l/3,y:a+u}],e.data.e.data.x=e.data.x,e.data.e.data.y=e.data.y}})},sc=(r,t)=>{const e={};return t==null||t.forEach(n=>{r[n]!==void 0&&(e[n]=+r[n])}),e},Ml=(r={})=>{const t={};return Object.keys(r).forEach(e=>{t[e.toLowerCase()]=r[e]}),t};function Jo(r){if(!r)return[0,0,0];if((0,sn.Z)(r))return[r,r,r];if(r.length===0)return[0,0,0];const[t,e=t,n=t]=r;return[t,e,n]}function d(r,t){let e;return(0,xe.Z)(t)?e=t:(0,sn.Z)(t)?e=()=>t:e=()=>r,e}function g(r,t,e=!0){return!t&&t!==0?n=>{const{size:i}=n.data||{};return i?Array.isArray(i)?e?Math.max(...i)||r:i:(0,R.Z)(i)&&i.width&&i.height?e?Math.max(i.width,i.height)||r:[i.width,i.height]:i:r}:(0,xe.Z)(t)?t:(0,sn.Z)(t)?()=>t:Array.isArray(t)?()=>e?Math.max(...t)||r:t:(0,R.Z)(t)&&t.width&&t.height?()=>e?Math.max(t.width,t.height)||r:[t.width,t.height]:()=>r}const s=(r,t,e=10)=>{let n;const i=typeof t=="function"?t:()=>t||0;return r?Array.isArray(r)?n=l=>r:(0,xe.Z)(r)?n=r:n=l=>r:n=l=>{var u,f,m;if(!((u=l.data)===null||u===void 0)&&u.bboxSize)return(f=l.data)===null||f===void 0?void 0:f.bboxSize;if(!((m=l.data)===null||m===void 0)&&m.size){const x=l.data.size;return Array.isArray(x)?x:(0,R.Z)(x)?[x.width,x.height]:x}return e},l=>{const u=n(l),f=i(l);return Math.max(...Jo(u))+f}},o=r=>{if(r===null)return r;if(r instanceof Date)return new Date(r.getTime());if(r instanceof Array){const t=[];return r.forEach(e=>{t.push(e)}),t.map(e=>o(e))}if(typeof r=="object"){const t={};return Object.keys(r).forEach(e=>{t[e]=o(r[e])}),t}return r},p=(r,t)=>{const e=o(r);return e.data=e.data||{},t&&((0,sn.Z)(e.data.x)||(e.data.x=Math.random()*t[0]),(0,sn.Z)(e.data.y)||(e.data.y=Math.random()*t[1])),e},T={rankdir:"TB",nodesep:50,ranksep:50,edgeLabelSpace:!0,ranker:"tight-tree",controlPoints:!1,radial:!1,focusNode:null};class C{constructor(t={}){this.options=t,this.id="antv-dagre",this.options=Object.assign(Object.assign({},T),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,e)})}genericDagreLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{nodeSize:a,align:l,rankdir:u="TB",ranksep:f,nodesep:m,ranksepFunc:x,nodesepFunc:Z,edgeLabelSpace:V,ranker:nt,nodeOrder:dt,begin:St,controlPoints:Dt,radial:Jt,sortByCombo:oe,preset:ge}=i,Be=new Qr.k({tree:[]}),un=d(f||50,x),nn=d(m||50,Z);let En=nn,Je=un;(u==="LR"||u==="RL")&&(En=un,Je=nn);const Dn=g(10,a,!1),tr=e.getAllNodes(),ur=e.getAllEdges();tr.forEach(Hn=>{const Yr=Jo(Dn(Hn)),li=Je(Hn),vi=En(Hn),Bi=Yr[0]+2*vi,sa=Yr[1]+2*li,gi=Hn.data.layer;(0,sn.Z)(gi)?Be.addNode({id:Hn.id,data:{width:Bi,height:sa,layer:gi}}):Be.addNode({id:Hn.id,data:{width:Bi,height:sa}})}),oe&&(Be.attachTreeStructure("combo"),tr.forEach(Hn=>{const{parentId:Yr}=Hn.data;Yr!==void 0&&Be.hasNode(Yr)&&Be.setParent(Hn.id,Yr,"combo")})),ur.forEach(Hn=>{Be.addEdge({id:Hn.id,source:Hn.source,target:Hn.target,data:{weight:Hn.data.weight||1}})});let jr;ge!=null&&ge.length&&(jr=new Qr.k({nodes:ge})),Qo(Be,{prevGraph:jr,edgeLabelSpace:V,keepNodeOrder:!!dt,nodeOrder:dt||[],acyclicer:"greedy",ranker:nt,rankdir:u,nodesep:m,align:l});const Pr=[0,0];if(St){let Hn=1/0,Yr=1/0;Be.getAllNodes().forEach(li=>{Hn>li.data.x&&(Hn=li.data.x),Yr>li.data.y&&(Yr=li.data.y)}),Be.getAllEdges().forEach(li=>{var vi;(vi=li.data.points)===null||vi===void 0||vi.forEach(Bi=>{Hn>Bi.x&&(Hn=Bi.x),Yr>Bi.y&&(Yr=Bi.y)})}),Pr[0]=St[0]-Hn,Pr[1]=St[1]-Yr}const Rr=u==="LR"||u==="RL";if(!Jt){const Hn=new Set,li=u==="BT"||u==="RL"?(gi,Yi)=>Yi-gi:(gi,Yi)=>gi-Yi;Be.getAllNodes().forEach(gi=>{gi.data.x=gi.data.x+Pr[0],gi.data.y=gi.data.y+Pr[1],Hn.add(Rr?gi.data.x:gi.data.y)});const vi=Array.from(Hn).sort(li),Bi=Rr?(gi,Yi)=>gi.x!==Yi.x:(gi,Yi)=>gi.y!==Yi.y,sa=Rr?(gi,Yi,oa)=>{const Ui=Math.max(Yi.y,oa.y),Es=Math.min(Yi.y,oa.y);return gi.filter(ho=>ho.y<=Ui&&ho.y>=Es)}:(gi,Yi,oa)=>{const Ui=Math.max(Yi.x,oa.x),Es=Math.min(Yi.x,oa.x);return gi.filter(ho=>ho.x<=Ui&&ho.x>=Es)};Be.getAllEdges().forEach((gi,Yi)=>{var oa;V&&Dt&&gi.data.type!=="loop"&&(gi.data.controlPoints=W((oa=gi.data.points)===null||oa===void 0?void 0:oa.map(({x:Ui,y:Es})=>({x:Ui+Pr[0],y:Es+Pr[1]})),Be.getNode(gi.source),Be.getNode(gi.target),vi,Rr,Bi,sa))})}let gr=[];gr=Be.getAllNodes().map(Hn=>p(Hn));const Xr=Be.getAllEdges();return t&&(gr.forEach(Hn=>{e.mergeNodeData(Hn.id,{x:Hn.data.x,y:Hn.data.y})}),Xr.forEach(Hn=>{e.mergeEdgeData(Hn.id,{controlPoints:Hn.data.controlPoints})})),{nodes:gr,edges:Xr}})}}const W=(r,t,e,n,i,a,l)=>{let u=(r==null?void 0:r.slice(1,r.length-1))||[];if(t&&e){let{x:f,y:m}=t.data,{x,y:Z}=e.data;if(i&&(f=t.data.y,m=t.data.x,x=e.data.y,Z=e.data.x),Z!==m&&f!==x){const V=n.indexOf(m),nt=n[V+1];if(nt){const Dt=u[0],Jt=i?{x:(m+nt)/2,y:(Dt==null?void 0:Dt.y)||x}:{x:(Dt==null?void 0:Dt.x)||x,y:(m+nt)/2};(!Dt||a(Dt,Jt))&&u.unshift(Jt)}const dt=n.indexOf(Z),St=Math.abs(dt-V);if(St===1)u=l(u,t.data,e.data),u.length||u.push(i?{x:(m+Z)/2,y:f}:{x:f,y:(m+Z)/2});else if(St>1){const Dt=n[dt-1];if(Dt){const Jt=u[u.length-1],oe=i?{x:(Z+Dt)/2,y:(Jt==null?void 0:Jt.y)||x}:{x:(Jt==null?void 0:Jt.x)||f,y:(Z+Dt)/2};(!Jt||a(Jt,oe))&&u.push(oe)}}}}return u},tt=(r,t,e)=>{const n=r.getAllNodes(),i=r.getAllEdges();if(!(n!=null&&n.length))return{nodes:[],edges:i};if(n.length===1)return t&&r.mergeNodeData(n[0].id,{x:e[0],y:e[1]}),{nodes:[Object.assign(Object.assign({},n[0]),{data:Object.assign(Object.assign({},n[0].data),{x:e[0],y:e[1]})})],edges:i}},mt={radius:null,startRadius:null,endRadius:null,startAngle:0,endAngle:2*Math.PI,clockwise:!0,divisions:1,ordering:null,angleRatio:1};class Gt{constructor(t={}){this.options=t,this.id="circular",this.options=Object.assign(Object.assign({},mt),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericCircularLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericCircularLayout(!0,t,e)})}genericCircularLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:l,center:u,divisions:f,startAngle:m=0,endAngle:x=2*Math.PI,angleRatio:Z,ordering:V,clockwise:nt,nodeSpacing:dt,nodeSize:St}=i,Dt=e.getAllNodes(),Jt=e.getAllEdges(),[oe,ge,Be]=Ge(a,l,u),un=Dt==null?void 0:Dt.length;if(!un||un===1)return tt(e,t,Be);const nn=(x-m)/un;let{radius:En,startRadius:Je,endRadius:Dn}=i;if(dt){const Rr=d(10,dt),gr=g(10,St);let Xr=-1/0;Dt.forEach(Hn=>{const Yr=gr(Hn);Xr<Yr&&(Xr=Yr)});let Ai=0;Dt.forEach((Hn,Yr)=>{Yr===0?Ai+=Xr||10:Ai+=(Rr(Hn)||0)+(Xr||10)}),En=Ai/(2*Math.PI)}else!En&&!Je&&!Dn?En=Math.min(ge,oe)/2:!Je&&Dn?Je=Dn:Je&&!Dn&&(Dn=Je);const tr=nn*Z;let ur=[];V==="topology"?ur=ie(e,Dt):V==="topology-directed"?ur=ie(e,Dt,!0):V==="degree"?ur=Se(e,Dt):ur=Dt.map(Rr=>p(Rr));const jr=Math.ceil(un/f);for(let Rr=0;Rr<un;++Rr){let gr=En;!gr&&Je!==null&&Dn!==null&&(gr=Je+Rr*(Dn-Je)/(un-1)),gr||(gr=10+Rr*100/(un-1));let Xr=m+Rr%jr*tr+2*Math.PI/f*Math.floor(Rr/jr);nt||(Xr=x-Rr%jr*tr-2*Math.PI/f*Math.floor(Rr/jr)),ur[Rr].data.x=Be[0]+Math.cos(Xr)*gr,ur[Rr].data.y=Be[1]+Math.sin(Xr)*gr}return t&&ur.forEach(Rr=>{e.mergeNodeData(Rr.id,{x:Rr.data.x,y:Rr.data.y})}),{nodes:ur,edges:Jt}})}}const ie=(r,t,e=!1)=>{const n=[p(t[0])],i={},a=t.length;i[t[0].id]=!0;let l=0;return t.forEach((u,f)=>{if(f!==0)if((f===a-1||r.getDegree(u.id,"both")!==r.getDegree(t[f+1].id,"both")||r.areNeighbors(n[l].id,u.id))&&!i[u.id])n.push(p(u)),i[u.id]=!0,l++;else{const m=e?r.getSuccessors(n[l].id):r.getNeighbors(n[l].id);let x=!1;for(let V=0;V<m.length;V++){const nt=m[V];if(r.getDegree(nt.id)===r.getDegree(u.id)&&!i[nt.id]){n.push(p(nt)),i[nt.id]=!0,x=!0;break}}let Z=0;for(;!x&&(i[t[Z].id]||(n.push(p(t[Z])),i[t[Z].id]=!0,x=!0),Z++,Z!==a););}}),n};function Se(r,t){const e=[];return t.forEach((n,i)=>{e.push(p(n))}),e.sort((n,i)=>r.getDegree(n.id,"both")-r.getDegree(i.id,"both")),e}const Ge=(r,t,e)=>{let n=r,i=t,a=e;return!n&&typeof window!="undefined"&&(n=window.innerWidth),!i&&typeof window!="undefined"&&(i=window.innerHeight),a||(a=[n/2,i/2]),[n,i,a]},Ze=Array.isArray,an={nodeSize:30,nodeSpacing:10,preventOverlap:!1,sweep:void 0,equidistant:!1,startAngle:3/2*Math.PI,clockwise:!0,maxLevelDiff:void 0,sortBy:"degree"};class hn{constructor(t={}){this.options=t,this.id="concentric",this.options=Object.assign(Object.assign({},an),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericConcentricLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericConcentricLayout(!0,t,e)})}genericConcentricLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:l,height:u,sortBy:f,maxLevelDiff:m,sweep:x,clockwise:Z,equidistant:V,preventOverlap:nt,startAngle:dt=3/2*Math.PI,nodeSize:St,nodeSpacing:Dt}=i,Jt=e.getAllNodes(),oe=e.getAllEdges(),ge=!l&&typeof window!="undefined"?window.innerWidth:l,Be=!u&&typeof window!="undefined"?window.innerHeight:u,un=a||[ge/2,Be/2];if(!(Jt!=null&&Jt.length)||Jt.length===1)return tt(e,t,un);const nn=[];let En,Je=0;Ze(St)?En=Math.max(St[0],St[1]):(0,xe.Z)(St)?(En=-1/0,Jt.forEach(Hn=>{const Yr=Math.max(...Jo(St(Hn)));Yr>En&&(En=Yr)})):En=St,Ze(Dt)?Je=Math.max(Dt[0],Dt[1]):(0,sn.Z)(Dt)&&(Je=Dt),Jt.forEach(Hn=>{const Yr=p(Hn);nn.push(Yr);let li=En;const{data:vi}=Yr;Ze(vi.size)?li=Math.max(vi.size[0],vi.size[1]):(0,sn.Z)(vi.size)?li=vi.size:(0,R.Z)(vi.size)&&(li=Math.max(vi.size.width,vi.size.height)),En=Math.max(En,li),(0,xe.Z)(Dt)&&(Je=Math.max(Dt(Hn),Je))});const Dn={};nn.forEach((Hn,Yr)=>{Dn[Hn.id]=Yr});let tr=f;(!(0,na.Z)(tr)||nn[0].data[tr]===void 0)&&(tr="degree"),tr==="degree"?nn.sort((Hn,Yr)=>e.getDegree(Yr.id,"both")-e.getDegree(Hn.id,"both")):nn.sort((Hn,Yr)=>Yr.data[tr]-Hn.data[tr]);const ur=nn[0],jr=(m||(tr==="degree"?e.getDegree(ur.id,"both"):ur.data[tr]))/4,Pr=[{nodes:[]}];let Rr=Pr[0];nn.forEach(Hn=>{if(Rr.nodes.length>0){const Yr=Math.abs(tr==="degree"?e.getDegree(Rr.nodes[0].id,"both")-e.getDegree(Hn.id,"both"):Rr.nodes[0].data[tr]-Hn.data[tr]);jr&&Yr>=jr&&(Rr={nodes:[]},Pr.push(Rr))}Rr.nodes.push(Hn)});let gr=En+Je;if(!nt){const Hn=Pr.length>0&&Pr[0].nodes.length>1,li=(Math.min(ge,Be)/2-gr)/(Pr.length+(Hn?1:0));gr=Math.min(gr,li)}let Xr=0;if(Pr.forEach(Hn=>{const Yr=x===void 0?2*Math.PI-2*Math.PI/Hn.nodes.length:x;if(Hn.dTheta=Yr/Math.max(1,Hn.nodes.length-1),Hn.nodes.length>1&&nt){const li=Math.cos(Hn.dTheta)-Math.cos(0),vi=Math.sin(Hn.dTheta)-Math.sin(0),Bi=Math.sqrt(gr*gr/(li*li+vi*vi));Xr=Math.max(Bi,Xr)}Hn.r=Xr,Xr+=gr}),V){let Hn=0,Yr=0;for(let li=0;li<Pr.length;li++){const Bi=(Pr[li].r||0)-Yr;Hn=Math.max(Hn,Bi)}Yr=0,Pr.forEach((li,vi)=>{vi===0&&(Yr=li.r||0),li.r=Yr,Yr+=Hn})}return Pr.forEach(Hn=>{const Yr=Hn.dTheta||0,li=Hn.r||0;Hn.nodes.forEach((vi,Bi)=>{const sa=dt+(Z?1:-1)*Yr*Bi;vi.data.x=un[0]+li*Math.cos(sa),vi.data.y=un[1]+li*Math.sin(sa)})}),t&&nn.forEach(Hn=>e.mergeNodeData(Hn.id,{x:Hn.data.x,y:Hn.data.y})),{nodes:nn,edges:oe}})}}var yn=y(14301),dn=y(7695);const Mn=.81,zn=.1;function er(r,t,e,n,i=2){const a=t/e,l=r.getAllNodes(),u=l.map((x,Z)=>{const{nodeStrength:V,x:nt,y:dt,z:St,size:Dt}=x.data;return{x:nt,y:dt,z:St,size:Dt,index:Z,id:x.id,vx:0,vy:0,vz:0,weight:a*V}}),f=(i===2?(0,yn.Z)(u,x=>x.x,x=>x.y):(0,dn.Z)(u,x=>x.x,x=>x.y,x=>x.z)).visitAfter(ar),m=new Map;return u.forEach(x=>{m.set(x.id,x),Mr(x,f,i)}),u.map((x,Z)=>{const{id:V,data:nt}=l[Z],{mass:dt=1}=nt;n[V]={x:x.vx/dt,y:x.vy/dt,z:x.vz/dt}}),n}function ar(r){let t=0,e=0,n=0,i=0,a=0;const l=r.length;if(l){for(let u=0;u<l;u++){const f=r[u];f&&f.weight&&(t+=f.weight,e+=f.x*f.weight,n+=f.y*f.weight,i+=f.z*f.weight,a+=f.size*f.weight)}r.x=e/t,r.y=n/t,r.z=i/t,r.size=a/t,r.weight=t}else{const u=r;r.x=u.data.x,r.y=u.data.y,r.z=u.data.z,r.size=u.data.size,r.weight=u.data.weight}}const sr=(r,t,e,n,i,a,l)=>{var u;if(((u=r.data)===null||u===void 0?void 0:u.id)===a.id)return;const f=[e,n,i][l-1],m=a.x-r.x||zn,x=a.y-r.y||zn,Z=a.z-r.z||zn,V=[m,x,Z],nt=f-t;let dt=0;for(let Jt=0;Jt<l;Jt++)dt+=V[Jt]*V[Jt];const Dt=Math.sqrt(dt)*dt;if(nt*nt*Mn<dt){const Jt=r.weight/Dt;return a.vx+=m*Jt,a.vy+=x*Jt,a.vz+=Z*Jt,!0}if(r.length)return!1;if(r.data!==a){const Jt=r.data.weight/Dt;a.vx+=m*Jt,a.vy+=x*Jt,a.vz+=Z*Jt}};function Mr(r,t,e){t.visit((n,i,a,l,u)=>sr(n,i,a,l,u,r,e))}const xr={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 fr{constructor(t={}){this.options=t,this.id="force",this.timeInterval=0,this.judgingDistance=0,this.running=!1,this.options=Object.assign(Object.assign({},xr),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericForceLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericForceLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;(this.judgingDistance>this.lastOptions.minMovement||n<1)&&n<t;n++)this.runOneStep(this.lastCalcGraph,this.lastGraph,n,this.lastVelMap,this.lastOptions),this.updatePosition(this.lastGraph,this.lastCalcGraph,this.lastVelMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericForceLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),a=e.getAllNodes(),l=e.getAllEdges(),u=this.formatOptions(i,e),{dimensions:f,width:m,height:x,nodeSize:Z,getMass:V,nodeStrength:nt,edgeStrength:dt,linkDistance:St}=u,Dt=a.map((Je,Dn)=>Object.assign(Object.assign({},Je),{data:Object.assign(Object.assign({},Je.data),{x:(0,sn.Z)(Je.data.x)?Je.data.x:Math.random()*m,y:(0,sn.Z)(Je.data.y)?Je.data.y:Math.random()*x,z:(0,sn.Z)(Je.data.z)?Je.data.z:Math.random()*Math.sqrt(m*x),size:Z(Je)||30,mass:V(Je),nodeStrength:nt(Je)})})),Jt=l.map(Je=>Object.assign(Object.assign({},Je),{data:Object.assign(Object.assign({},Je.data),{edgeStrength:dt(Je),linkDistance:St(Je,e.getNode(Je.source),e.getNode(Je.target))})}));if(!(a!=null&&a.length))return this.lastResult={nodes:[],edges:l},{nodes:[],edges:l};const oe={};a.forEach((Je,Dn)=>{oe[Je.id]={x:0,y:0,z:0}});const ge=new Qr.k({nodes:Dt,edges:Jt});this.formatCentripetal(u,ge);const{maxIteration:Be,minMovement:un,onTick:nn}=u;if(this.lastLayoutNodes=Dt,this.lastLayoutEdges=Jt,this.lastAssign=t,this.lastGraph=e,this.lastCalcGraph=ge,this.lastOptions=u,this.lastVelMap=oe,typeof window=="undefined")return;let En=0;return new Promise(Je=>{this.timeInterval=window.setInterval(()=>{(!a||!this.running)&&Je({nodes:Ei(e,Dt),edges:l}),this.runOneStep(ge,e,En,oe,u),this.updatePosition(e,ge,oe,u),t&&Dt.forEach(Dn=>e.mergeNodeData(Dn.id,{x:Dn.data.x,y:Dn.data.y,z:f===3?Dn.data.z:void 0})),nn==null||nn({nodes:Ei(e,Dt),edges:l}),En++,(En>=Be||this.judgingDistance<un)&&(window.clearInterval(this.timeInterval),Je({nodes:Ei(e,Dt),edges:l}))},0),this.running=!0})})}formatOptions(t,e){const n=Object.assign({},t),{width:i,height:a,getMass:l}=t;n.width=!i&&typeof window!="undefined"?window.innerWidth:i,n.height=!a&&typeof window!="undefined"?window.innerHeight:a,t.center||(n.center=[n.width/2,n.height/2]),l||(n.getMass=f=>{let m=1;(0,sn.Z)(f==null?void 0:f.data.mass)&&(m=f==null?void 0:f.data.mass);const x=e.getDegree(f.id,"both");return!x||x<5?m:x*5*m}),n.nodeSize=s(t.nodeSize,t.nodeSpacing);const u=t.linkDistance?d(1,t.linkDistance):f=>1+n.nodeSize(e.getNode(f.source))+n.nodeSize(e.getNode(f.target));return n.linkDistance=u,n.nodeStrength=d(1,t.nodeStrength),n.edgeStrength=d(1,t.edgeStrength),n}formatCentripetal(t,e){const{dimensions:n,centripetalOptions:i,center:a,clusterNodeStrength:l,leafCluster:u,clustering:f,nodeClusterBy:m}=t,x=e.getAllNodes(),Z=i||{leaf:2,single:2,others:1,center:Jt=>({x:a[0],y:a[1],z:n===3?a[2]:void 0})};typeof l!="function"&&(t.clusterNodeStrength=Jt=>l);let V,nt;if(u&&m&&(V=Sr(e,m),nt=Array.from(new Set(x==null?void 0:x.map(Jt=>Jt.data[m])))||[],t.centripetalOptions=Object.assign(Z,{single:100,leaf:Jt=>{const{siblingLeaves:oe,sameTypeLeaves:ge}=V[Jt.id]||{};return(ge==null?void 0:ge.length)===(oe==null?void 0:oe.length)||(nt==null?void 0:nt.length)===1?1:t.clusterNodeStrength(Jt)},others:1,center:Jt=>{const oe=e.getDegree(Jt.id,"both");if(!oe)return{x:100,y:100,z:0};let ge;if(oe===1){const{sameTypeLeaves:Be=[]}=V[Jt.id]||{};Be.length===1?ge=void 0:Be.length>1&&(ge=hi(Be))}else ge=void 0;return{x:ge==null?void 0:ge.x,y:ge==null?void 0:ge.y,z:ge==null?void 0:ge.z}}})),f&&m){V||(V=Sr(e,m)),nt||(nt=Array.from(new Set(x.map(oe=>oe.data[m])))),nt=nt.filter(oe=>oe!==void 0);const Jt={};nt.forEach(oe=>{const ge=x.filter(Be=>Be.data[m]===oe).map(Be=>e.getNode(Be.id));Jt[oe]=hi(ge)}),t.centripetalOptions=Object.assign(Z,{single:oe=>t.clusterNodeStrength(oe),leaf:oe=>t.clusterNodeStrength(oe),others:oe=>t.clusterNodeStrength(oe),center:oe=>{const ge=Jt[oe.data[m]];return{x:ge==null?void 0:ge.x,y:ge==null?void 0:ge.y,z:ge==null?void 0:ge.z}}})}const{leaf:dt,single:St,others:Dt}=t.centripetalOptions||{};dt&&typeof dt!="function"&&(t.centripetalOptions.leaf=()=>dt),St&&typeof St!="function"&&(t.centripetalOptions.single=()=>St),Dt&&typeof Dt!="function"&&(t.centripetalOptions.others=()=>Dt)}runOneStep(t,e,n,i,a){const l={},u=t.getAllNodes(),f=t.getAllEdges();if(!(u!=null&&u.length))return;const{monitor:m}=a;if(this.calRepulsive(t,l,a),f&&this.calAttractive(t,l,a),this.calGravity(t,e,l,a),this.updateVelocity(t,l,i,a),m){const x=this.calTotalEnergy(l,u);m({energy:x,nodes:e.getAllNodes(),edges:e.getAllEdges(),iterations:n})}}calTotalEnergy(t,e){if(!(e!=null&&e.length))return 0;let n=0;return e.forEach((i,a)=>{const l=t[i.id].x,u=t[i.id].y,f=this.options.dimensions===3?t[i.id].z:0,m=l*l+u*u+f*f,{mass:x=1}=i.data;n+=x*m*.5}),n}calRepulsive(t,e,n){const{dimensions:i,factor:a,coulombDisScale:l}=n;er(t,a,l*l,e,i)}calAttractive(t,e,n){const{dimensions:i,nodeSize:a}=n;t.getAllEdges().forEach((l,u)=>{const{source:f,target:m}=l,x=t.getNode(f),Z=t.getNode(m);if(!x||!Z)return;let V=Z.data.x-x.data.x,nt=Z.data.y-x.data.y,dt=i===3?Z.data.z-x.data.z:0;!V&&!nt&&(V=Math.random()*.01,nt=Math.random()*.01,i===3&&!dt&&(dt=Math.random()*.01));const St=Math.sqrt(V*V+nt*nt+dt*dt);if(St<a(x)+a(Z))return;const Dt=V/St,Jt=nt/St,oe=dt/St,{linkDistance:ge=200,edgeStrength:Be=200}=l.data||{},nn=(ge-St)*Be,En=x.data.mass||1,Je=Z.data.mass||1,Dn=1/En,tr=1/Je,ur=Dt*nn,jr=Jt*nn,Pr=oe*nn;e[f].x-=ur*Dn,e[f].y-=jr*Dn,e[f].z-=Pr*Dn,e[m].x+=ur*tr,e[m].y+=jr*tr,e[m].z+=Pr*tr})}calGravity(t,e,n,i){const{getCenter:a}=i,l=t.getAllNodes(),u=e.getAllNodes(),f=e.getAllEdges(),{width:m,height:x,center:Z,gravity:V,centripetalOptions:nt}=i;l&&l.forEach(dt=>{const{id:St,data:Dt}=dt,{mass:Jt,x:oe,y:ge,z:Be}=Dt,un=e.getNode(St);let nn=0,En=0,Je=0,Dn=V;const tr=t.getDegree(St,"in"),ur=t.getDegree(St,"out"),jr=t.getDegree(St,"both"),Pr=a==null?void 0:a(un,jr);if(Pr){const[Rr,gr,Xr]=Pr;nn=oe-Rr,En=ge-gr,Dn=Xr}else nn=oe-Z[0],En=ge-Z[1],Je=Be-Z[2];if(Dn&&(n[St].x-=Dn*nn/Jt,n[St].y-=Dn*En/Jt,n[St].z-=Dn*Je/Jt),nt){const{leaf:Rr,single:gr,others:Xr,center:Ai}=nt,{x:Hn,y:Yr,z:li,centerStrength:vi}=(Ai==null?void 0:Ai(un,u,f,m,x))||{x:0,y:0,z:0,centerStrength:0};if(!(0,sn.Z)(Hn)||!(0,sn.Z)(Yr))return;const Bi=(oe-Hn)/Jt,sa=(ge-Yr)/Jt,gi=(Be-li)/Jt;if(vi&&(n[St].x-=vi*Bi,n[St].y-=vi*sa,n[St].z-=vi*gi),jr===0){const oa=gr(un);if(!oa)return;n[St].x-=oa*Bi,n[St].y-=oa*sa,n[St].z-=oa*gi;return}if(tr===0||ur===0){const oa=Rr(un,u,f);if(!oa)return;n[St].x-=oa*Bi,n[St].y-=oa*sa,n[St].z-=oa*gi;return}const Yi=Xr(un);if(!Yi)return;n[St].x-=Yi*Bi,n[St].y-=Yi*sa,n[St].z-=Yi*gi}})}updateVelocity(t,e,n,i){const{damping:a,maxSpeed:l,interval:u,dimensions:f}=i,m=t.getAllNodes();m!=null&&m.length&&m.forEach(x=>{const{id:Z}=x;let V=(n[Z].x+e[Z].x*u)*a||.01,nt=(n[Z].y+e[Z].y*u)*a||.01,dt=f===3?(n[Z].z+e[Z].z*u)*a||.01:0;const St=Math.sqrt(V*V+nt*nt+dt*dt);if(St>l){const Dt=l/St;V=Dt*V,nt=Dt*nt,dt=Dt*dt}n[Z]={x:V,y:nt,z:dt}})}updatePosition(t,e,n,i){const{distanceThresholdMode:a,interval:l,dimensions:u}=i,f=e.getAllNodes();if(!(f!=null&&f.length)){this.judgingDistance=0;return}let m=0;a==="max"?this.judgingDistance=-1/0:a==="min"&&(this.judgingDistance=1/0),f.forEach(x=>{const{id:Z}=x,V=t.getNode(Z);if((0,sn.Z)(V.data.fx)&&(0,sn.Z)(V.data.fy)){e.mergeNodeData(Z,{x:V.data.fx,y:V.data.fy,z:u===3?V.data.fz:void 0});return}const nt=n[Z].x*l,dt=n[Z].y*l,St=u===3?n[Z].z*l:0;e.mergeNodeData(Z,{x:x.data.x+nt,y:x.data.y+dt,z:x.data.z+St});const Dt=Math.sqrt(nt*nt+dt*dt+St*St);switch(a){case"max":this.judgingDistance<Dt&&(this.judgingDistance=Dt);break;case"min":this.judgingDistance>Dt&&(this.judgingDistance=Dt);break;default:m=m+Dt;break}}),(!a||a==="mean")&&(this.judgingDistance=m/f.length)}}const Sr=(r,t)=>{const e=r.getAllNodes();if(!(e!=null&&e.length))return{};const n={};return e.forEach((i,a)=>{r.getDegree(i.id,"both")===1&&(n[i.id]=yr(r,"leaf",i,t))}),n},yr=(r,t,e,n)=>{const i=r.getDegree(e.id,"in"),a=r.getDegree(e.id,"out");let l=e,u=[];i===0?(l=r.getSuccessors(e.id)[0],u=r.getNeighbors(l.id)):a===0&&(l=r.getPredecessors(e.id)[0],u=r.getNeighbors(l.id)),u=u.filter(m=>r.getDegree(m.id,"in")===0||r.getDegree(m.id,"out")===0);const f=Ir(r,t,n,e,u);return{coreNode:l,siblingLeaves:u,sameTypeLeaves:f}},Ir=(r,t,e,n,i)=>{const a=n.data[e]||"";let l=(i==null?void 0:i.filter(u=>u.data[e]===a))||[];return t==="leaf"&&(l=l.filter(u=>r.getDegree(u.id,"in")===0||r.getDegree(u.id,"out")===0)),l},hi=r=>{const t={x:0,y:0};r.forEach(n=>{const{x:i,y:a}=n.data;t.x+=i||0,t.y+=a||0});const e=r.length||1;return{x:t.x/e,y:t.y/e}},Ei=(r,t)=>t.map(e=>{const{id:n,data:i}=e,a=r.getNode(n);return Object.assign(Object.assign({},a),{data:Object.assign(Object.assign({},a.data),{x:i.x,y:i.y,z:i.z})})});var oi=y(53754);const br=r=>{const t=[],e=r.length;for(let n=0;n<e;n+=1){t[n]=[];for(let i=0;i<e;i+=1)n===i?t[n][i]=0:r[n][i]===0||!r[n][i]?t[n][i]=1/0:t[n][i]=r[n][i]}for(let n=0;n<e;n+=1)for(let i=0;i<e;i+=1)for(let a=0;a<e;a+=1)t[i][a]>t[i][n]+t[n][a]&&(t[i][a]=t[i][n]+t[n][a]);return t},Gr=(r,t)=>{const{nodes:e,edges:n}=r,i=[],a={};if(!e)throw new Error("invalid nodes data!");return e&&e.forEach((l,u)=>{a[l.id]=u;const f=[];i.push(f)}),n==null||n.forEach(l=>{const{source:u,target:f}=l,m=a[u],x=a[f];m===void 0||x===void 0||(i[m][x]=1,t||(i[x][m]=1))}),i},ti=(r,t)=>{const e=[];return r.forEach(n=>{const i=[];n.forEach(a=>{i.push(a*t)}),e.push(i)}),e},Gi=r=>{let t=1/0,e=1/0,n=-1/0,i=-1/0;return r.forEach(a=>{let l=a.data.size;Ze(l)?l.length===1&&(l=[l[0],l[0]]):(0,sn.Z)(l)?l=[l,l]:(l===void 0||isNaN(l))&&(l=[30,30]);const u=[l[0]/2,l[1]/2],f=a.data.x-u[0],m=a.data.x+u[0],x=a.data.y-u[1],Z=a.data.y+u[1];t>f&&(t=f),e>x&&(e=x),n<m&&(n=m),i<Z&&(i=Z)}),{minX:t,minY:e,maxX:n,maxY:i}},Ji=(r,t)=>Math.sqrt((r.x-t.x)*(r.x-t.x)+(r.y-t.y)*(r.y-t.y)),Ua=(r,t,e,n="TB",i,a={})=>{if(!(t!=null&&t.length))return;const{stopBranchFn:l,stopAllFn:u}=a;for(let f=0;f<t.length;f++){const m=t[f];if(r.hasNode(m.id)&&!(l!=null&&l(m))){if(u!=null&&u(m))return;n==="TB"&&e(m),Ua(r,r.getChildren(m.id,i),e,n,i,a),n!=="TB"&&e(m)}}},oc={center:[0,0],linkDistance:50};class Sl{constructor(t={}){this.options=t,this.id="mds",this.options=Object.assign(Object.assign({},oc),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericMDSLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericMDSLayout(!0,t,e)})}genericMDSLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a=[0,0],linkDistance:l=50}=i,u=e.getAllNodes(),f=e.getAllEdges();if(!(u!=null&&u.length)||u.length===1)return tt(e,t,a);const m=Gr({nodes:u,edges:f},!1),x=br(m);$o(x);const Z=ti(x,l),V=Al(Z),nt=[];return V.forEach((St,Dt)=>{const Jt=p(u[Dt]);Jt.data.x=St[0]+a[0],Jt.data.y=St[1]+a[1],nt.push(Jt)}),t&&nt.forEach(St=>e.mergeNodeData(St.id,{x:St.data.x,y:St.data.y})),{nodes:nt,edges:f}})}}const $o=r=>{let t=-999999;r.forEach(e=>{e.forEach(n=>{n!==1/0&&t<n&&(t=n)})}),r.forEach((e,n)=>{e.forEach((i,a)=>{i===1/0&&(r[n][a]=t)})})},Al=r=>{const e=oi.y3.mul(oi.y3.pow(r,2),-.5),n=e.mean("row"),i=e.mean("column"),a=e.mean();e.add(a).subRowVector(n).subColumnVector(i);const l=new oi.Sc(e),u=oi.y3.sqrt(l.diagonalMatrix).diagonal();return l.leftSingularVectors.toJSON().map(f=>oi.y3.mul([f],[u]).toJSON()[0].splice(0,2))};function Ol(r){return!!r.tick&&!!r.stop}const Qc={gForce:!0,force2:!0,d3force:!0,fruchterman:!0,forceAtlas2:!0,force:!0,"graphin-force":!0},Rh={center:[0,0],comboPadding:10,treeKey:"combo"};class Lh{constructor(t={}){this.options=t,this.id="comboCombined",this.options=Object.assign(Object.assign({},Rh),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericComboCombinedLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericComboCombinedLayout(!0,t,e)})}genericComboCombinedLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=this.initVals(Object.assign(Object.assign({},this.options),n)),{center:a,treeKey:l,outerLayout:u}=i,f=e.getAllNodes().filter(Je=>!Je.data._isCombo),m=e.getAllNodes().filter(Je=>Je.data._isCombo),x=e.getAllEdges(),Z=f==null?void 0:f.length;if(!Z||Z===1)return tt(e,t,a);const V=[],nt=new Map;f.forEach(Je=>{nt.set(Je.id,Je)});const dt=new Map;m.forEach(Je=>{dt.set(Je.id,Je)});const St=new Map,Dt=this.getInnerGraphs(e,l,nt,dt,x,i,St);yield Promise.all(Dt);const Jt=new Map,oe=[],ge=new Map;let Be=!0;e.getRoots(l).forEach(Je=>{const Dn=St.get(Je.id),tr=dt.get(Je.id)||nt.get(Je.id),ur={id:Je.id,data:Object.assign(Object.assign({},Je.data),{x:Dn.data.x||tr.data.x,y:Dn.data.y||tr.data.y,fx:Dn.data.fx||tr.data.fx,fy:Dn.data.fy||tr.data.fy,mass:Dn.data.mass||tr.data.mass,size:Dn.data.size})};oe.push(ur),Jt.set(Je.id,!0),!isNaN(ur.data.x)&&ur.data.x!==0&&!isNaN(ur.data.y)&&ur.data.y!==0?Be=!1:(ur.data.x=Math.random()*100,ur.data.y=Math.random()*100),Ua(e,[Je],jr=>{jr.id!==Je.id&&ge.set(jr.id,Je.id)},"TB",l)});const un=[];x.forEach(Je=>{const Dn=ge.get(Je.source)||Je.source,tr=ge.get(Je.target)||Je.target;Dn!==tr&&Jt.has(Dn)&&Jt.has(tr)&&un.push({id:Je.id,source:Dn,target:tr,data:{}})});let nn;if(oe!=null&&oe.length){if(oe.length===1)oe[0].data.x=a[0],oe[0].data.y=a[1];else{const Je=new Qr.k({nodes:oe,edges:un}),Dn=u||new fr;Be&&Qc[Dn.id]&&(yield(oe.length<100?new Sl:new hn).assign(Je));const tr=Object.assign({center:a,kg:5,preventOverlap:!0,animate:!1},Dn.id==="force"?{gravity:1,factor:4,linkDistance:(ur,jr,Pr)=>{const Rr=Math.max(...jr.data.size)||32,gr=Math.max(...Pr.data.size)||32;return Rr/2+gr/2+200}}:{});nn=yield Jc(Dn,Je,tr)}St.forEach(Je=>{var Dn;const tr=nn.nodes.find(Pr=>Pr.id===Je.id);if(tr){const{x:Pr,y:Rr}=tr.data;Je.data.visited=!0,Je.data.x=Pr,Je.data.y=Rr,V.push({id:Je.id,data:{x:Pr,y:Rr}})}const{x:ur,y:jr}=Je.data;(Dn=Je.data.nodes)===null||Dn===void 0||Dn.forEach(Pr=>{V.push({id:Pr.id,data:{x:Pr.data.x+ur,y:Pr.data.y+jr}})})}),St.forEach(({data:Je})=>{const{x:Dn,y:tr,visited:ur,nodes:jr}=Je;jr==null||jr.forEach(Pr=>{if(!ur){const Rr=V.find(gr=>gr.id===Pr.id);Rr.data.x+=Dn||0,Rr.data.y+=tr||0}})})}return t&&V.forEach(Je=>{e.mergeNodeData(Je.id,{x:Je.data.x,y:Je.data.y})}),{nodes:V,edges:x}})}initVals(t){const e=Object.assign({},t),{nodeSize:n,spacing:i,comboPadding:a}=t;let l,u;if((0,sn.Z)(i)?u=()=>i:(0,xe.Z)(i)?u=i:u=()=>0,e.spacing=u,!n)l=m=>{const x=u(m);return m.size?Ze(m.size)?((m.size[0]>m.size[1]?m.size[0]:m.size[1])+x)/2:(0,R.Z)(m.size)?((m.size.width>m.size.height?m.size.width:m.size.height)+x)/2:(m.size+x)/2:32+x/2};else if((0,xe.Z)(n))l=m=>{const x=n(m),Z=u(m);return Ze(m.size)?((m.size[0]>m.size[1]?m.size[0]:m.size[1])+Z)/2:((x||32)+Z)/2};else if(Ze(n)){const x=(n[0]>n[1]?n[0]:n[1])/2;l=Z=>x+u(Z)/2}else{const m=n/2;l=x=>m+u(x)/2}e.nodeSize=l;let f;return(0,sn.Z)(a)?f=()=>a:Ze(a)?f=()=>Math.max.apply(null,a):(0,xe.Z)(a)?f=a:f=()=>0,e.comboPadding=f,e}getInnerGraphs(t,e,n,i,a,l,u){const{nodeSize:f,comboPadding:m,spacing:x,innerLayout:Z}=l,V=Z||new hn({}),nt={center:[0,0],preventOverlap:!0,nodeSpacing:x},dt=[],St=Dt=>{let Jt=(m==null?void 0:m(Dt))||10;return Ze(Jt)&&(Jt=Math.max(...Jt)),{size:Jt?[Jt*2,Jt*2]:[30,30],padding:Jt}};return t.getRoots(e).forEach(Dt=>{u.set(Dt.id,{id:Dt.id,data:{nodes:[],size:St(Dt).size}});let Jt=Promise.resolve();Ua(t,[Dt],oe=>{var ge;if(!oe.data._isCombo)return;const{size:Be,padding:un}=St(oe);if(!(!((ge=t.getChildren(oe.id,e))===null||ge===void 0)&&ge.length))u.set(oe.id,{id:oe.id,data:Object.assign(Object.assign({},oe.data),{size:Be})});else{const nn=u.get(oe.id);u.set(oe.id,{id:oe.id,data:Object.assign({nodes:[]},nn==null?void 0:nn.data)});const En=new Map,Je=t.getChildren(oe.id,e).map(ur=>{if(ur.data._isCombo)return u.has(ur.id)||u.set(ur.id,{id:ur.id,data:Object.assign({},ur.data)}),En.set(ur.id,!0),u.get(ur.id);const jr=n.get(ur.id)||i.get(ur.id);return En.set(ur.id,!0),{id:ur.id,data:Object.assign(Object.assign({},jr.data),ur.data)}}),Dn={nodes:Je,edges:a.filter(ur=>En.has(ur.source)&&En.has(ur.target))};let tr=1/0;Je.forEach(ur=>{var jr;let{size:Pr}=ur.data;Pr||(Pr=((jr=u.get(ur.id))===null||jr===void 0?void 0:jr.data.size)||(f==null?void 0:f(ur))||[30,30]),(0,sn.Z)(Pr)&&(Pr=[Pr,Pr]);const[Rr,gr]=Pr;tr>Rr&&(tr=Rr),tr>gr&&(tr=gr),ur.data.size=Pr}),Jt=Jt.then(()=>(0,qr.mG)(this,void 0,void 0,function*(){const ur=new Qr.k(Dn);yield Jc(V,ur,nt,!0);const{minX:jr,minY:Pr,maxX:Rr,maxY:gr}=Gi(Je),Xr={x:(Rr+jr)/2,y:(gr+Pr)/2};Dn.nodes.forEach(Hn=>{Hn.data.x-=Xr.x,Hn.data.y-=Xr.y});const Ai=[Math.max(Rr-jr,tr)+un*2,Math.max(gr-Pr,tr)+un*2];u.get(oe.id).data.size=Ai,u.get(oe.id).data.nodes=Je}))}return!0},"BT",e),dt.push(Jt)}),dt}}function Jc(r,t,e,n){var i;return(0,qr.mG)(this,void 0,void 0,function*(){return Ol(r)?(r.execute(t,e),r.stop(),r.tick((i=e.iterations)!==null&&i!==void 0?i:300)):n?yield r.assign(t,e):yield r.execute(t,e)})}var Dh=y(31136),Ih=y(84365),Bh=y(32575),$c=y(33039),qc=y(54774),tu=y(34123),eu=y(97468),Tl=y(74515);class nu{constructor(t){this.id="d3-force",this.config={inputNodeAttrs:["x","y","vx","vy","fx","fy"],outputNodeAttrs:["x","y","vx","vy"],simulationAttrs:["alpha","alphaMin","alphaDecay","alphaTarget","velocityDecay","randomSource"]},this.forceMap={link:Dh.Z,manyBody:Ih.Z,center:Bh.Z,collide:$c.Z,radial:qc.Z,x:tu.Z,y:eu.Z},this.options={link:{id:e=>e.id},manyBody:{},center:{x:0,y:0}},this.context={options:{},assign:!1,nodes:[],edges:[]},(0,h.Z)(this.options,t),this.options.forceSimulation&&(this.simulation=this.options.forceSimulation)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericLayout(!0,t,e)})}stop(){this.simulation.stop()}tick(t){return this.simulation.tick(t),this.getResult()}restart(){this.simulation.restart()}setFixedPosition(t,e){const n=this.context.nodes.find(i=>i.id===t);n&&e.forEach((i,a)=>{if(typeof i=="number"||i===null){const l=["fx","fy","fz"][a];n[l]=i}})}getOptions(t){var e,n;const i=(0,h.Z)({},this.options,t);return i.collide&&((e=i.collide)===null||e===void 0?void 0:e.radius)===void 0&&(i.collide=i.collide||{},i.collide.radius=(n=i.nodeSize)!==null&&n!==void 0?n:10),i.iterations===void 0&&(i.link&&i.link.iterations===void 0&&(i.iterations=i.link.iterations),i.collide&&i.collide.iterations===void 0&&(i.iterations=i.collide.iterations)),this.context.options=i,i}genericLayout(t,e,n){var i;return(0,qr.mG)(this,void 0,void 0,function*(){const a=this.getOptions(n),l=e.getAllNodes().map(({id:x,data:Z})=>Object.assign(Object.assign({id:x},Z),(0,da.Z)(Z.data,this.config.inputNodeAttrs))),u=e.getAllEdges().map(x=>Object.assign({},x));Object.assign(this.context,{assign:t,nodes:l,edges:u,graph:e});const f=new Promise(x=>{this.resolver=x}),m=this.setSimulation(a);return m.nodes(l),(i=m.force("link"))===null||i===void 0||i.links(u),f})}getResult(){const{assign:t,nodes:e,edges:n,graph:i}=this.context,a=e.map(u=>({id:u.id,data:Object.assign(Object.assign({},u.data),(0,da.Z)(u,this.config.outputNodeAttrs))})),l=n.map(({id:u,source:f,target:m,data:x})=>({id:u,source:typeof f=="object"?f.id:f,target:typeof m=="object"?m.id:m,data:x}));return t&&a.forEach(u=>i.mergeNodeData(u.id,u.data)),{nodes:a,edges:l}}initSimulation(){return(0,Tl.Z)()}setSimulation(t){const e=this.simulation||this.options.forceSimulation||this.initSimulation();return this.simulation||(this.simulation=e.on("tick",()=>{var n;return(n=t.onTick)===null||n===void 0?void 0:n.call(t,this.getResult())}).on("end",()=>{var n;return(n=this.resolver)===null||n===void 0?void 0:n.call(this,this.getResult())})),lc(e,this.config.simulationAttrs.map(n=>[n,t[n]])),Object.entries(this.forceMap).forEach(([n,i])=>{const a=n;if(t[n]){let l=e.force(a);l||(l=i(),e.force(a,l)),lc(l,Object.entries(t[a]))}else e.force(a,null)}),e}}const lc=(r,t)=>t.reduce((e,[n,i])=>!e[n]||i===void 0?e:e[n].call(r,i),r);var cc=y(92546),Cl=y.n(cc);class qo{constructor(t){this.id="dagre",this.options={},Object.assign(this.options,qo.defaultOptions,t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericDagreLayout(!1,t,Object.assign(Object.assign({},this.options),e))})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericDagreLayout(!0,t,Object.assign(Object.assign({},this.options),e))})}genericDagreLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const{nodeSize:i}=n,a=new cc.graphlib.Graph;a.setGraph(n),a.setDefaultEdgeLabel(()=>({}));const l=e.getAllNodes(),u=e.getAllEdges();[...l,...u].some(({id:m})=>(0,sn.Z)(m))&&console.error("Dagre layout only support string id, it will convert number to string."),e.getAllNodes().forEach(m=>{const{id:x}=m,Z=Object.assign({},m.data);if(i!==void 0){const[V,nt]=Jo((0,xe.Z)(i)?i(m):i);Object.assign(Z,{width:V,height:nt})}a.setNode(x.toString(),Z)}),e.getAllEdges().forEach(({id:m,source:x,target:Z})=>{a.setEdge(x.toString(),Z.toString(),{id:m})}),Cl().layout(a);const f={nodes:[],edges:[]};return a.nodes().forEach(m=>{const x=a.node(m);f.nodes.push({id:m,data:x}),t&&e.mergeNodeData(m,x)}),a.edges().forEach(m=>{const x=a.edge(m),{id:Z}=x,V=(0,qr._T)(x,["id"]),{v:nt,w:dt}=m;f.edges.push({id:Z,source:nt,target:dt,data:V}),t&&e.mergeEdgeData(Z,V)}),f})}}qo.defaultOptions={};class Is{constructor(t){this.id=t.id||0,this.rx=t.rx,this.ry=t.ry,this.fx=0,this.fy=0,this.mass=t.mass,this.degree=t.degree,this.g=t.g||0}distanceTo(t){const e=this.rx-t.rx,n=this.ry-t.ry;return Math.hypot(e,n)}setPos(t,e){this.rx=t,this.ry=e}resetForce(){this.fx=0,this.fy=0}addForce(t){const e=t.rx-this.rx,n=t.ry-this.ry;let i=Math.hypot(e,n);i=i<1e-4?1e-4:i;const a=this.g*(this.degree+1)*(t.degree+1)/i;this.fx+=a*e/i,this.fy+=a*n/i}in(t){return t.contains(this.rx,this.ry)}add(t){const e=this.mass+t.mass,n=(this.rx*this.mass+t.rx*t.mass)/e,i=(this.ry*this.mass+t.ry*t.mass)/e,a=this.degree+t.degree,l={rx:n,ry:i,mass:e,degree:a};return new Is(l)}}class Ja{constructor(t){this.xmid=t.xmid,this.ymid=t.ymid,this.length=t.length,this.massCenter=t.massCenter||[0,0],this.mass=t.mass||1}getLength(){return this.length}contains(t,e){const n=this.length/2;return t<=this.xmid+n&&t>=this.xmid-n&&e<=this.ymid+n&&e>=this.ymid-n}NW(){const t=this.xmid-this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Ja(i)}NE(){const t=this.xmid+this.length/4,e=this.ymid+this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Ja(i)}SW(){const t=this.xmid-this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Ja(i)}SE(){const t=this.xmid+this.length/4,e=this.ymid-this.length/4,n=this.length/2,i={xmid:t,ymid:e,length:n};return new Ja(i)}}class Ro{constructor(t){this.body=null,this.quad=null,this.NW=null,this.NE=null,this.SW=null,this.SE=null,this.theta=.5,t!=null&&(this.quad=t)}insert(t){if(this.body==null){this.body=t;return}this._isExternal()?(this.quad&&(this.NW=new Ro(this.quad.NW()),this.NE=new Ro(this.quad.NE()),this.SW=new Ro(this.quad.SW()),this.SE=new Ro(this.quad.SE())),this._putBody(this.body),this._putBody(t),this.body=this.body.add(t)):(this.body=this.body.add(t),this._putBody(t))}_putBody(t){this.quad&&(t.in(this.quad.NW())&&this.NW?this.NW.insert(t):t.in(this.quad.NE())&&this.NE?this.NE.insert(t):t.in(this.quad.SW())&&this.SW?this.SW.insert(t):t.in(this.quad.SE())&&this.SE&&this.SE.insert(t))}_isExternal(){return this.NW==null&&this.NE==null&&this.SW==null&&this.SE==null}updateForce(t){if(!(this.body==null||t===this.body))if(this._isExternal())t.addForce(this.body);else{const e=this.quad?this.quad.getLength():0,n=this.body.distanceTo(t);e/n<this.theta?t.addForce(this.body):(this.NW&&this.NW.updateForce(t),this.NE&&this.NE.updateForce(t),this.SW&&this.SW.updateForce(t),this.SE&&this.SE.updateForce(t))}}}const Fh={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 _h{constructor(t={}){this.options=t,this.id="forceAtlas2",this.options=Object.assign(Object.assign({},Fh),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericForceAtlas2Layout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericForceAtlas2Layout(!0,t,e)})}genericForceAtlas2Layout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=e.getAllEdges(),a=e.getAllNodes(),l=this.formatOptions(n,a.length),{width:u,height:f,prune:m,maxIteration:x,nodeSize:Z,center:V}=l;if(!(a!=null&&a.length)||a.length===1)return tt(e,t,V);const nt=a.map(Jt=>p(Jt,[u,f])),dt=i.filter(Jt=>{const{source:oe,target:ge}=Jt;return oe!==ge}),St=new Qr.k({nodes:nt,edges:dt}),Dt=this.getSizes(St,Z);if(this.run(St,e,x,Dt,t,l),m){for(let oe=0;oe<dt.length;oe+=1){const{source:ge,target:Be}=dt[oe],un=St.getDegree(ge),nn=St.getDegree(ge);if(un<=1){const En=St.getNode(Be);St.mergeNodeData(ge,{x:En.data.x,y:En.data.y})}else if(nn<=1){const En=St.getNode(ge);St.mergeNodeData(Be,{x:En.data.x,y:En.data.y})}}const Jt=Object.assign(Object.assign({},l),{prune:!1,barnesHut:!1});this.run(St,e,100,Dt,t,Jt)}return{nodes:nt,edges:i}})}getSizes(t,e){const n=t.getAllNodes(),i={};for(let a=0;a<n.length;a+=1){const l=n[a];i[l.id]=s(e,void 0)(l)}return i}formatOptions(t={},e){const n=Object.assign(Object.assign({},this.options),t),{center:i,width:a,height:l,barnesHut:u,prune:f,maxIteration:m,kr:x,kg:Z}=n;return n.width=!a&&typeof window!="undefined"?window.innerWidth:a,n.height=!l&&typeof window!="undefined"?window.innerHeight:l,n.center=i||[n.width/2,n.height/2],u===void 0&&e>250&&(n.barnesHut=!0),f===void 0&&e>100&&(n.prune=!0),m===0&&!f?(n.maxIteration=250,e<=200&&e>100?n.maxIteration=1e3:e>200&&(n.maxIteration=1200)):m===0&&f&&(n.maxIteration=100,e<=200&&e>100?n.maxIteration=500:e>200&&(n.maxIteration=950)),x||(n.kr=50,e>100&&e<=500?n.kr=20:e>500&&(n.kr=1)),Z||(n.kg=20,e>100&&e<=500?n.kg=10:e>500&&(n.kg=1)),n}run(t,e,n,i,a,l){const{kr:u,barnesHut:f,onTick:m}=l,x=t.getAllNodes();let Z=0,V=n;const nt={},dt={},St={};for(let Dt=0;Dt<x.length;Dt+=1){const{data:Jt,id:oe}=x[Dt];if(nt[oe]=[0,0],f){const ge={id:Dt,rx:Jt.x,ry:Jt.y,mass:1,g:u,degree:t.getDegree(oe)};St[oe]=new Is(ge)}}for(;V>0;)Z=this.oneStep(t,{iter:V,preventOverlapIters:50,krPrime:100,sg:Z,forces:nt,preForces:dt,bodies:St,sizes:i},l),V--,m==null||m({nodes:x,edges:e.getAllEdges()});return t}oneStep(t,e,n){const{iter:i,preventOverlapIters:a,krPrime:l,sg:u,preForces:f,bodies:m,sizes:x}=e;let{forces:Z}=e;const{preventOverlap:V,barnesHut:nt}=n,dt=t.getAllNodes();for(let St=0;St<dt.length;St+=1){const{id:Dt}=dt[St];f[Dt]=[...Z[Dt]],Z[Dt]=[0,0]}return Z=this.getAttrForces(t,i,a,x,Z,n),nt&&(V&&i>a||!V)?Z=this.getOptRepGraForces(t,Z,m,n):Z=this.getRepGraForces(t,i,a,Z,l,x,n),this.updatePos(t,Z,f,u,n)}getAttrForces(t,e,n,i,a,l){const{preventOverlap:u,dissuadeHubs:f,mode:m,prune:x}=l,Z=t.getAllEdges();for(let V=0;V<Z.length;V+=1){const{source:nt,target:dt}=Z[V],St=t.getNode(nt),Dt=t.getNode(dt),Jt=t.getDegree(nt),oe=t.getDegree(dt);if(x&&(Jt<=1||oe<=1))continue;const ge=[Dt.data.x-St.data.x,Dt.data.y-St.data.y];let Be=Math.hypot(ge[0],ge[1]);Be=Be<1e-4?1e-4:Be,ge[0]=ge[0]/Be,ge[1]=ge[1]/Be,u&&e<n&&(Be=Be-i[nt]-i[dt]);let un=Be,nn=un;m==="linlog"&&(un=Math.log(1+Be),nn=un),f&&(un=Be/Jt,nn=Be/oe),u&&e<n&&Be<=0?(un=0,nn=0):u&&e<n&&Be>0&&(un=Be,nn=Be),a[nt][0]+=un*ge[0],a[dt][0]-=nn*ge[0],a[nt][1]+=un*ge[1],a[dt][1]-=nn*ge[1]}return a}getOptRepGraForces(t,e,n,i){const{kg:a,center:l,prune:u}=i,f=t.getAllNodes(),m=f.length;let x=9e10,Z=-9e10,V=9e10,nt=-9e10;for(let oe=0;oe<m;oe+=1){const{id:ge,data:Be}=f[oe];u&&t.getDegree(ge)<=1||(n[ge].setPos(Be.x,Be.y),Be.x>=Z&&(Z=Be.x),Be.x<=x&&(x=Be.x),Be.y>=nt&&(nt=Be.y),Be.y<=V&&(V=Be.y))}const dt=Math.max(Z-x,nt-V),St={xmid:(Z+x)/2,ymid:(nt+V)/2,length:dt,massCenter:l,mass:m},Dt=new Ja(St),Jt=new Ro(Dt);for(let oe=0;oe<m;oe+=1){const{id:ge}=f[oe];u&&t.getDegree(ge)<=1||n[ge].in(Dt)&&Jt.insert(n[ge])}for(let oe=0;oe<m;oe+=1){const{id:ge,data:Be}=f[oe],un=t.getDegree(ge);if(u&&un<=1)continue;n[ge].resetForce(),Jt.updateForce(n[ge]),e[ge][0]-=n[ge].fx,e[ge][1]-=n[ge].fy;const nn=[Be.x-l[0],Be.y-l[1]];let En=Math.hypot(nn[0],nn[1]);En=En<1e-4?1e-4:En,nn[0]=nn[0]/En,nn[1]=nn[1]/En;const Je=a*(un+1);e[ge][0]-=Je*nn[0],e[ge][1]-=Je*nn[1]}return e}getRepGraForces(t,e,n,i,a,l,u){const{preventOverlap:f,kr:m,kg:x,center:Z,prune:V}=u,nt=t.getAllNodes(),dt=nt.length;for(let St=0;St<dt;St+=1){const Dt=nt[St],Jt=t.getDegree(Dt.id);for(let un=St+1;un<dt;un+=1){const nn=nt[un],En=t.getDegree(nn.id);if(V&&(Jt<=1||En<=1))continue;const Je=[nn.data.x-Dt.data.x,nn.data.y-Dt.data.y];let Dn=Math.hypot(Je[0],Je[1]);Dn=Dn<1e-4?1e-4:Dn,Je[0]=Je[0]/Dn,Je[1]=Je[1]/Dn,f&&e<n&&(Dn=Dn-l[Dt.id]-l[nn.id]);let tr=m*(Jt+1)*(En+1)/Dn;f&&e<n&&Dn<0?tr=a*(Jt+1)*(En+1):f&&e<n&&Dn===0?tr=0:f&&e<n&&Dn>0&&(tr=m*(Jt+1)*(En+1)/Dn),i[Dt.id][0]-=tr*Je[0],i[nn.id][0]+=tr*Je[0],i[Dt.id][1]-=tr*Je[1],i[nn.id][1]+=tr*Je[1]}const oe=[Dt.data.x-Z[0],Dt.data.y-Z[1]],ge=Math.hypot(oe[0],oe[1]);oe[0]=oe[0]/ge,oe[1]=oe[1]/ge;const Be=x*(Jt+1);i[Dt.id][0]-=Be*oe[0],i[Dt.id][1]-=Be*oe[1]}return i}updatePos(t,e,n,i,a){const{ks:l,tao:u,prune:f,ksmax:m}=a,x=t.getAllNodes(),Z=x.length,V=[],nt=[];let dt=0,St=0,Dt=i;for(let oe=0;oe<Z;oe+=1){const{id:ge}=x[oe],Be=t.getDegree(ge);if(f&&Be<=1)continue;const un=[e[ge][0]-n[ge][0],e[ge][1]-n[ge][1]],nn=Math.hypot(un[0],un[1]),En=[e[ge][0]+n[ge][0],e[ge][1]+n[ge][1]],Je=Math.hypot(En[0],En[1]);V[oe]=nn,nt[oe]=Je/2,dt+=(Be+1)*V[oe],St+=(Be+1)*nt[oe]}const Jt=Dt;Dt=u*St/dt,Jt!==0&&(Dt=Dt>1.5*Jt?1.5*Jt:Dt);for(let oe=0;oe<Z;oe+=1){const{id:ge,data:Be}=x[oe],un=t.getDegree(ge);if(f&&un<=1||(0,sn.Z)(Be.fx)&&(0,sn.Z)(Be.fy))continue;let nn=l*Dt/(1+Dt*Math.sqrt(V[oe])),En=Math.hypot(e[ge][0],e[ge][1]);En=En<1e-4?1e-4:En;const Je=m/En;nn=nn>Je?Je:nn;const Dn=nn*e[ge][0],tr=nn*e[ge][1];t.mergeNodeData(ge,{x:Be.x+Dn,y:Be.y+tr})}return Dt}}const Zh={maxIteration:1e3,gravity:10,speed:5,clustering:!1,clusterGravity:10,width:300,height:300,nodeClusterBy:"cluster"},sf=800;class of{constructor(t={}){this.options=t,this.id="fruchterman",this.timeInterval=0,this.running=!1,this.options=Object.assign(Object.assign({},Zh),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericFruchtermanLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericFruchtermanLayout(!0,t,e)})}stop(){this.timeInterval&&typeof window!="undefined"&&window.clearInterval(this.timeInterval),this.running=!1}tick(t=this.options.maxIteration||1){if(this.lastResult)return this.lastResult;for(let n=0;n<t;n++)this.runOneStep(this.lastGraph,this.lastClusterMap,this.lastOptions);const e={nodes:this.lastLayoutNodes,edges:this.lastLayoutEdges};return this.lastAssign&&e.nodes.forEach(n=>this.lastGraph.mergeNodeData(n.id,{x:n.data.x,y:n.data.y,z:this.options.dimensions===3?n.data.z:void 0})),e}genericFruchtermanLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){if(this.running)return;const i=this.formatOptions(n),{dimensions:a,width:l,height:u,center:f,clustering:m,nodeClusterBy:x,maxIteration:Z,onTick:V}=i,nt=e.getAllNodes(),dt=e.getAllEdges();if(!(nt!=null&&nt.length)){const ge={nodes:[],edges:dt};return this.lastResult=ge,ge}if(nt.length===1){t&&e.mergeNodeData(nt[0].id,{x:f[0],y:f[1],z:a===3?f[2]:void 0});const ge={nodes:[Object.assign(Object.assign({},nt[0]),{data:Object.assign(Object.assign({},nt[0].data),{x:f[0],y:f[1],z:a===3?f[2]:void 0})})],edges:dt};return this.lastResult=ge,ge}const St=nt.map(ge=>p(ge,[l,u])),Dt=new Qr.k({nodes:St,edges:dt}),Jt={};if(m&&St.forEach(ge=>{const Be=ge.data[x];Jt[Be]||(Jt[Be]={name:Be,cx:0,cy:0,count:0})}),this.lastLayoutNodes=St,this.lastLayoutEdges=dt,this.lastAssign=t,this.lastGraph=Dt,this.lastOptions=i,this.lastClusterMap=Jt,typeof window=="undefined")return;let oe=0;return new Promise(ge=>{this.timeInterval=window.setInterval(()=>{if(!this.running){ge({nodes:St,edges:dt});return}this.runOneStep(Dt,Jt,i),t&&St.forEach(({id:Be,data:un})=>e.mergeNodeData(Be,{x:un.x,y:un.y,z:a===3?un.z:void 0})),V==null||V({nodes:St,edges:dt}),oe++,oe>=Z&&(window.clearInterval(this.timeInterval),ge({nodes:St,edges:dt}))},0),this.running=!0})})}formatOptions(t={}){const e=Object.assign(Object.assign({},this.options),t),{clustering:n,nodeClusterBy:i}=e,{center:a,width:l,height:u}=e;return e.width=!l&&typeof window!="undefined"?window.innerWidth:l,e.height=!u&&typeof window!="undefined"?window.innerHeight:u,e.center=a||[e.width/2,e.height/2],e.clustering=n&&!!i,e}runOneStep(t,e,n){const{dimensions:i,height:a,width:l,gravity:u,center:f,speed:m,clustering:x,nodeClusterBy:Z,clusterGravity:V}=n,nt=a*l,dt=Math.sqrt(nt)/10,St=t.getAllNodes(),Dt=nt/(St.length+1),Jt=Math.sqrt(Dt),oe={};if(this.applyCalculate(t,oe,Jt,Dt),x){for(const Be in e)e[Be].cx=0,e[Be].cy=0,e[Be].count=0;St.forEach(Be=>{const{data:un}=Be,nn=e[un[Z]];(0,sn.Z)(un.x)&&(nn.cx+=un.x),(0,sn.Z)(un.y)&&(nn.cy+=un.y),nn.count++});for(const Be in e)e[Be].cx/=e[Be].count,e[Be].cy/=e[Be].count;const ge=V||u;St.forEach((Be,un)=>{const{id:nn,data:En}=Be;if(!(0,sn.Z)(En.x)||!(0,sn.Z)(En.y))return;const Je=e[En[Z]],Dn=Math.sqrt((En.x-Je.cx)*(En.x-Je.cx)+(En.y-Je.cy)*(En.y-Je.cy)),tr=Jt*ge;oe[nn].x-=tr*(En.x-Je.cx)/Dn,oe[nn].y-=tr*(En.y-Je.cy)/Dn})}St.forEach((ge,Be)=>{const{id:un,data:nn}=ge;if(!(0,sn.Z)(nn.x)||!(0,sn.Z)(nn.y))return;const En=.01*Jt*u;oe[un].x-=En*(nn.x-f[0]),oe[un].y-=En*(nn.y-f[1]),i===3&&(oe[un].z-=En*(nn.z-f[2]))}),St.forEach((ge,Be)=>{const{id:un,data:nn}=ge;if((0,sn.Z)(nn.fx)&&(0,sn.Z)(nn.fy)){nn.x=nn.fx,nn.y=nn.fy,i===3&&(nn.z=nn.fz);return}if(!(0,sn.Z)(nn.x)||!(0,sn.Z)(nn.y))return;const En=Math.sqrt(oe[un].x*oe[un].x+oe[un].y*oe[un].y+(i===3?oe[un].z*oe[un].z:0));if(En>0){const Je=Math.min(dt*(m/sf),En);t.mergeNodeData(un,{x:nn.x+oe[un].x/En*Je,y:nn.y+oe[un].y/En*Je,z:i===3?nn.z+oe[un].z/En*Je:void 0})}})}applyCalculate(t,e,n,i){this.calRepulsive(t,e,i),this.calAttractive(t,e,n)}calRepulsive(t,e,n){const i=t.getAllNodes();i.forEach(({data:a,id:l},u)=>{e[l]={x:0,y:0,z:0},i.forEach(({data:f,id:m},x)=>{if(u<=x||!(0,sn.Z)(a.x)||!(0,sn.Z)(f.x)||!(0,sn.Z)(a.y)||!(0,sn.Z)(f.y))return;let Z=a.x-f.x,V=a.y-f.y,nt=this.options.dimensions===3?a.z-f.z:0,dt=Z*Z+V*V+nt*nt;dt===0&&(dt=1,Z=.01,V=.01,nt=.01);const St=n/dt,Dt=Z*St,Jt=V*St,oe=nt*St;e[l].x+=Dt,e[l].y+=Jt,e[m].x-=Dt,e[m].y-=Jt,this.options.dimensions===3&&(e[l].z+=oe,e[m].z-=oe)})})}calAttractive(t,e,n){t.getAllEdges().forEach(a=>{const{source:l,target:u}=a;if(!l||!u||l===u)return;const{data:f}=t.getNode(l),{data:m}=t.getNode(u);if(!(0,sn.Z)(m.x)||!(0,sn.Z)(f.x)||!(0,sn.Z)(m.y)||!(0,sn.Z)(f.y))return;const x=m.x-f.x,Z=m.y-f.y,V=this.options.dimensions===3?m.z-f.z:0,nt=Math.sqrt(x*x+Z*Z+V*V)/n,dt=x*nt,St=Z*nt,Dt=V*nt;e[l].x+=dt,e[l].y+=St,e[u].x-=dt,e[u].y-=St,this.options.dimensions===3&&(e[l].z+=Dt,e[u].z-=Dt)})}}const lf={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 cf{constructor(t={}){this.options=t,this.id="grid",this.options=Object.assign(Object.assign({},lf),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericGridLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericGridLayout(!0,t,e)})}genericGridLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{begin:a=[0,0],condense:l,preventOverlapPadding:u,preventOverlap:f,rows:m,cols:x,nodeSpacing:Z,nodeSize:V,width:nt,height:dt,position:St}=i;let{sortBy:Dt}=i;const Jt=e.getAllNodes(),oe=e.getAllEdges(),ge=Jt==null?void 0:Jt.length;if(!ge||ge===1)return tt(e,t,a);const Be=Jt.map(gr=>p(gr));Dt!=="id"&&(!(0,na.Z)(Dt)||Be[0].data[Dt]===void 0)&&(Dt="degree"),Dt==="degree"?Be.sort((gr,Xr)=>e.getDegree(Xr.id,"both")-e.getDegree(gr.id,"both")):Dt==="id"?Be.sort((gr,Xr)=>(0,sn.Z)(Xr.id)&&(0,sn.Z)(gr.id)?Xr.id-gr.id:`${gr.id}`.localeCompare(`${Xr.id}`)):Be.sort((gr,Xr)=>Xr.data[Dt]-gr.data[Dt]);const un=!nt&&typeof window!="undefined"?window.innerWidth:nt,nn=!dt&&typeof window!="undefined"?window.innerHeight:dt,En=ge,Je={rows:m,cols:x};if(m!=null&&x!=null)Je.rows=m,Je.cols=x;else if(m!=null&&x==null)Je.rows=m,Je.cols=Math.ceil(En/Je.rows);else if(m==null&&x!=null)Je.cols=x,Je.rows=Math.ceil(En/Je.cols);else{const gr=Math.sqrt(En*nn/un);Je.rows=Math.round(gr),Je.cols=Math.round(un/nn*gr)}if(Je.rows=Math.max(Je.rows,1),Je.cols=Math.max(Je.cols,1),Je.cols*Je.rows>En){const gr=ru(Je),Xr=iu(Je);(gr-1)*Xr>=En?ru(Je,gr-1):(Xr-1)*gr>=En&&iu(Je,Xr-1)}else for(;Je.cols*Je.rows<En;){const gr=ru(Je),Xr=iu(Je);(Xr+1)*gr>=En?iu(Je,Xr+1):ru(Je,gr+1)}let Dn=l?0:un/Je.cols,tr=l?0:nn/Je.rows;if(f||Z){const gr=d(10,Z),Xr=g(30,V,!1);Be.forEach(Ai=>{(!Ai.data.x||!Ai.data.y)&&(Ai.data.x=0,Ai.data.y=0);const Hn=e.getNode(Ai.id),[Yr,li]=Jo(Xr(Hn)||30),vi=gr!==void 0?gr(Ai):u,Bi=Yr+vi,sa=li+vi;Dn=Math.max(Dn,Bi),tr=Math.max(tr,sa)})}const ur={},jr={row:0,col:0},Pr={};for(let gr=0;gr<Be.length;gr++){const Xr=Be[gr];let Ai;if(St&&(Ai=St(e.getNode(Xr.id))),Ai&&(Ai.row!==void 0||Ai.col!==void 0)){const Hn={row:Ai.row,col:Ai.col};if(Hn.col===void 0)for(Hn.col=0;zh(ur,Hn);)Hn.col++;else if(Hn.row===void 0)for(Hn.row=0;zh(ur,Hn);)Hn.row++;Pr[Xr.id]=Hn,cd(ur,Hn)}uf(Xr,a,Dn,tr,Pr,Je,jr,ur)}const Rr={nodes:Be,edges:oe};return t&&Be.forEach(gr=>{e.mergeNodeData(gr.id,{x:gr.data.x,y:gr.data.y})}),Rr})}}const ru=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.min(n,i):Math.min(n,i)===r.rows?r.rows=t:r.cols=t,e},iu=(r,t)=>{let e;const n=r.rows||5,i=r.cols||5;return t==null?e=Math.max(n,i):Math.max(n,i)===r.rows?r.rows=t:r.cols=t,e},zh=(r,t)=>r[`c-${t.row}-${t.col}`]||!1,cd=(r,t)=>r[`c-${t.row}-${t.col}`]=!0,ud=(r,t)=>{const e=r.cols||5;t.col++,t.col>=e&&(t.col=0,t.row++)},uf=(r,t,e,n,i,a,l,u)=>{let f,m;const x=i[r.id];if(x)f=x.col*e+e/2+t[0],m=x.row*n+n/2+t[1];else{for(;zh(u,l);)ud(a,l);f=l.col*e+e/2+t[0],m=l.row*n+n/2+t[1],cd(u,l),ud(a,l)}r.data.x=f,r.data.y=m},hf=(r,t,e)=>{try{const n=oi.y3.mul(oi.y3.pow(t,2),-.5),i=n.mean("row"),a=n.mean("column"),l=n.mean();n.add(l).subRowVector(i).subColumnVector(a);const u=new oi.Sc(n),f=oi.y3.sqrt(u.diagonalMatrix).diagonal();return u.leftSingularVectors.toJSON().map(m=>oi.y3.mul([m],[f]).toJSON()[0].splice(0,r))}catch(n){const i=[];for(let a=0;a<t.length;a++){const l=Math.random()*e,u=Math.random()*e;i.push([l,u])}return i}},df=800,ff={iterations:10,height:10,width:10,speed:100,gravity:10,k:5},vf=(r,t)=>{const e=Object.assign(Object.assign({},ff),t),{positions:n,iterations:i,width:a,k:l,speed:u=100,strictRadial:f,focusIdx:m,radii:x=[],nodeSizeFunc:Z}=e,V=r.getAllNodes(),nt=[],dt=a/10;for(let St=0;St<i;St++)n.forEach((Dt,Jt)=>{nt[Jt]={x:0,y:0}}),gf(V,n,nt,l,x,Z),pf(n,nt,u,f,m,dt,a,x);return n},gf=(r,t,e,n,i,a)=>{t.forEach((l,u)=>{e[u]={x:0,y:0},t.forEach((f,m)=>{if(u===m||i[u]!==i[m])return;let x=l.x-f.x,Z=l.y-f.y,V=Math.sqrt(x*x+Z*Z);if(V===0){V=1;const nt=u>m?1:-1;x=.01*nt,Z=.01*nt}if(V<a(r[u])/2+a(r[m])/2){const nt=n*n/V;e[u].x+=x/V*nt,e[u].y+=Z/V*nt}})})},pf=(r,t,e,n,i,a,l,u)=>{const f=a||l/10;return n&&t.forEach((m,x)=>{const Z=r[x].x-r[i].x,V=r[x].y-r[i].y,nt=Math.sqrt(Z*Z+V*V);let dt=V/nt,St=-Z/nt;const Dt=Math.sqrt(m.x*m.x+m.y*m.y);let Jt=Math.acos((dt*m.x+St*m.y)/Dt);Jt>Math.PI/2&&(Jt-=Math.PI/2,dt*=-1,St*=-1);const oe=Math.cos(Jt)*Dt;m.x=dt*oe,m.y=St*oe}),r.forEach((m,x)=>{if(x===i)return;const Z=Math.sqrt(t[x].x*t[x].x+t[x].y*t[x].y);if(Z>0&&x!==i){const V=Math.min(f*(e/df),Z);if(m.x+=t[x].x/Z*V,m.y+=t[x].y/Z*V,n){let nt=m.x-r[i].x,dt=m.y-r[i].y;const St=Math.sqrt(nt*nt+dt*dt);nt=nt/St*u[x],dt=dt/St*u[x],m.x=r[i].x+nt,m.y=r[i].y+dt}}}),r},mf={maxIteration:1e3,focusNode:null,unitRadius:null,linkDistance:50,preventOverlap:!1,strictRadial:!0,maxPreventOverlapIteration:200,sortStrength:10};class yf{constructor(t={}){this.options=t,this.id="radial",this.options=Object.assign(Object.assign({},mf),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericRadialLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericRadialLayout(!0,t,e)})}genericRadialLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{width:a,height:l,center:u,focusNode:f,unitRadius:m,nodeSize:x,nodeSpacing:Z,strictRadial:V,preventOverlap:nt,maxPreventOverlapIteration:dt,sortBy:St,linkDistance:Dt=50,sortStrength:Jt=10,maxIteration:oe=1e3}=i,ge=e.getAllNodes(),Be=e.getAllEdges(),un=!a&&typeof window!="undefined"?window.innerWidth:a,nn=!l&&typeof window!="undefined"?window.innerHeight:l,En=u||[un/2,nn/2];if(!(ge!=null&&ge.length)||ge.length===1)return tt(e,t,En);let Je=ge[0];if((0,na.Z)(f)){for(let Ui=0;Ui<ge.length;Ui++)if(ge[Ui].id===f){Je=ge[Ui];break}}else Je=f||ge[0];const Dn=xf(ge,Je.id),tr=Gr({nodes:ge,edges:Be},!1),ur=br(tr),jr=Mf(ur,Dn);wf(ur,Dn,jr+1);const Pr=ur[Dn];let Rr=un-En[0]>En[0]?En[0]:un-En[0],gr=nn-En[1]>En[1]?En[1]:nn-En[1];Rr===0&&(Rr=un/2),gr===0&&(gr=nn/2);const Xr=Math.min(Rr,gr),Ai=Math.max(...Pr),Hn=[],Yr=m||Xr/Ai;Pr.forEach((Ui,Es)=>{Hn[Es]=Ui*Yr});const li=bf(ge,ur,Dt,Hn,Yr,St,Jt),vi=Ef(li),Bi=hf(Dt,li,Dt);let sa=Bi.map(([Ui,Es])=>({x:(isNaN(Ui)?Math.random()*Dt:Ui)-Bi[Dn][0],y:(isNaN(Es)?Math.random()*Dt:Es)-Bi[Dn][1]}));this.run(oe,sa,vi,li,Hn,Dn);let gi;if(nt){gi=s(x,Z);const Ui={nodes:ge,nodeSizeFunc:gi,positions:sa,radii:Hn,height:nn,width:un,strictRadial:!!V,focusIdx:Dn,iterations:dt||200,k:sa.length/4.5};sa=vf(e,Ui)}const Yi=[];return sa.forEach((Ui,Es)=>{const ho=p(ge[Es]);ho.data.x=Ui.x+En[0],ho.data.y=Ui.y+En[1],Yi.push(ho)}),t&&Yi.forEach(Ui=>e.mergeNodeData(Ui.id,{x:Ui.data.x,y:Ui.data.y})),{nodes:Yi,edges:Be}})}run(t,e,n,i,a,l){for(let u=0;u<=t;u++){const f=u/t;this.oneIteration(f,e,a,i,n,l)}}oneIteration(t,e,n,i,a,l){const u=1-t;e.forEach((f,m)=>{const x=Ji(f,{x:0,y:0}),Z=x===0?0:1/x;if(m===l)return;let V=0,nt=0,dt=0;e.forEach((Dt,Jt)=>{if(m===Jt)return;const oe=Ji(f,Dt),ge=oe===0?0:1/oe,Be=i[Jt][m];dt+=a[m][Jt],V+=a[m][Jt]*(Dt.x+Be*(f.x-Dt.x)*ge),nt+=a[m][Jt]*(Dt.y+Be*(f.y-Dt.y)*ge)});const St=n[m]===0?0:1/n[m];dt*=u,dt+=t*St*St,V*=u,V+=t*St*f.x*Z,f.x=V/dt,nt*=u,nt+=t*St*f.y*Z,f.y=nt/dt})}}const bf=(r,t,e,n,i,a,l)=>{if(!r)return[];const u=[];if(t){const f={};t.forEach((m,x)=>{const Z=[];m.forEach((V,nt)=>{var dt,St;if(x===nt)Z.push(0);else if(n[x]===n[nt])if(a==="data")Z.push(V*(Math.abs(x-nt)*l)/(n[x]/i));else if(a){let Dt,Jt;if(f[r[x].id])Dt=f[r[x].id];else{const oe=(a==="id"?r[x].id:(dt=r[x].data)===null||dt===void 0?void 0:dt[a])||0;(0,na.Z)(oe)?Dt=oe.charCodeAt(0):Dt=oe,f[r[x].id]=Dt}if(f[r[nt].id])Jt=f[r[nt].id];else{const oe=(a==="id"?r[nt].id:(St=r[nt].data)===null||St===void 0?void 0:St[a])||0;(0,na.Z)(oe)?Jt=oe.charCodeAt(0):Jt=oe,f[r[nt].id]=Jt}Z.push(V*(Math.abs(Dt-Jt)*l)/(n[x]/i))}else Z.push(V*e/(n[x]/i));else{const Dt=(e+i)/2;Z.push(V*Dt)}}),u.push(Z)})}return u},Ef=r=>{const t=r.length,e=r[0].length,n=[];for(let i=0;i<t;i++){const a=[];for(let l=0;l<e;l++)r[i][l]!==0?a.push(1/(r[i][l]*r[i][l])):a.push(0);n.push(a)}return n},xf=(r,t)=>{let e=-1;return r.forEach((n,i)=>{n.id===t&&(e=i)}),Math.max(e,0)},wf=(r,t,e)=>{const n=r.length;for(let i=0;i<n;i++)if(r[t][i]===1/0){r[t][i]=e,r[i][t]=e;for(let a=0;a<n;a++)r[i][a]!==1/0&&r[t][a]===1/0&&(r[t][a]=e+r[i][a],r[a][t]=e+r[i][a])}for(let i=0;i<n;i++)if(i!==t){for(let a=0;a<n;a++)if(r[i][a]===1/0){let l=Math.abs(r[t][i]-r[t][a]);l=l===0?1:l,r[i][a]=l}}},Mf=(r,t)=>{let e=0;for(let n=0;n<r[t].length;n++)r[t][n]!==1/0&&(e=r[t][n]>e?r[t][n]:e);return e},Sf={center:[0,0],width:300,height:300};class Af{constructor(t={}){this.options=t,this.id="random",this.options=Object.assign(Object.assign({},Sf),t)}execute(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){return this.genericRandomLayout(!1,t,e)})}assign(t,e){return(0,qr.mG)(this,void 0,void 0,function*(){yield this.genericRandomLayout(!0,t,e)})}genericRandomLayout(t,e,n){return(0,qr.mG)(this,void 0,void 0,function*(){const i=Object.assign(Object.assign({},this.options),n),{center:a,width:l,height:u}=i,f=e.getAllNodes(),m=.9,x=!l&&typeof window!="undefined"?window.innerWidth:l,Z=!u&&typeof window!="undefined"?window.innerHeight:u,V=a||[x/2,Z/2],nt=[];return f&&f.forEach(St=>{nt.push({id:St.id,data:{x:(Math.random()-.5)*m*x+V[0],y:(Math.random()-.5)*m*Z+V[1]}})}),t&&nt.forEach(St=>e.mergeNodeData(St.id,{x:St.data.x,y:St.data.y})),{nodes:nt,edges:e.getAllEdges()}})}}var hd=y(40455),Of=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class au extends pa{constructor(){super(...arguments),this.id="fishbone"}getRoot(){const t=this.context.model.getRootsData();if(!((0,qi.Z)(t)||t.length>2))return t[0]}formatSize(t){const e=typeof t=="function"?t:()=>t;return n=>ra(e(n))}doLayout(t,e){const{hGap:n,getRibSep:i,vGap:a,nodeSize:l,height:u}=e,{model:f}=this.context,m=this.formatSize(l);let x=m(t)[0]+i(t);const Z=(ge,Be=0)=>{var un;return Be+=n*((ge.children||[]).length+1),(un=ge.children)===null||un===void 0||un.forEach(nn=>{var En;(En=f.getNodeLikeDatum(nn).children)===null||En===void 0||En.forEach(Dn=>{const tr=f.getNodeLikeDatum(Dn);Be=Z(tr,Be)})}),Be},V=ge=>{if(ge.depth===1)return x;const Be=f.getParentData(ge.id,"tree");if(Nl(ge)){const un=f.getParentData(Be.id,"tree"),nn=St(ge)-St(un);return V(Be)+nn*n/a}else{const un=(Be.children||[]).indexOf(ge.id),nn=f.getNodeData((Be.children||[]).slice(un));return nt(Be)-nn.reduce((En,Je)=>En+Z(Je),0)-m(Be)[0]/2}},nt=(0,hd.Z)(ge=>{if(jh(ge))return m(ge)[0]/2;const Be=f.getParentData(ge.id,"tree");if(Nl(ge))return V(ge)+Z(ge)+m(ge)[0]/2;{const un=St(ge)-St(Be),nn=n/a;return V(ge)+un*nn}},ge=>ge.id),dt=ge=>St(f.getParentData(ge,"tree")),St=(0,hd.Z)(ge=>{if(jh(ge))return u/2;if(Nl(ge)){const Be=f.getParentData(ge.id,"tree"),un=Be.children.indexOf(ge.id);if(un===0)return dt(Be.id)+a;const nn=f.getNodeLikeDatum(Be.children[un-1]);if((0,qi.Z)(nn.children))return St(nn)+a;const En=f.getDescendantsData(nn.id);return Math.max(...En.map(Je=>Nl(Je)?dt(Je.id):St(Je)))+a}else{if((0,qi.Z)(ge.children))return dt(ge.id)+a;const Be=f.getNodeLikeDatum(ge.children.slice(-1)[0]);if((0,qi.Z)(Be.children))return St(Be)+a;const un=f.getDescendantsData(ge.id).slice(-1)[0];return(Nl(un)?dt(un.id):St(un))+a}},ge=>ge.id);let Dt=0;const Jt={nodes:[],edges:[]},oe=ge=>{var Be;(Be=ge.children)===null||Be===void 0||Be.forEach(Dn=>oe(f.getNodeLikeDatum(Dn)));const un=St(ge),nn=nt(ge);if(Jt.nodes.push({id:ge.id,x:nn,y:un}),jh(ge))return;const En=f.getRelatedEdgesData(ge.id,"in")[0],Je=[V(ge),Nl(ge)?un:dt(ge.id)];Jt.edges.push({id:me(En),controlPoints:[Je],relatedNodeId:ge.id}),Dt=Math.max(Dt,nn+i(ge)),ge.depth===1&&(x=Dt)};return oe(t),Jt}placeAlterative(t,e){const n=(e.children||[]).filter((u,f)=>f%2!==0);if(n.length===0)return t;const{model:i}=this.context,a=t.nodes.find(u=>u.id===e.id).y,l=u=>{const f=i.getAncestorsData(u,"tree");if((0,qi.Z)(f))return!1;const m=f.length===1?u:f[f.length-2].id;return n.includes(m)};t.nodes.forEach(u=>{l(u.id)&&(u.y=2*a-u.y)}),t.edges.forEach(u=>{l(u.relatedNodeId)&&(u.controlPoints=u.controlPoints.map(f=>[f[0],2*a-f[1]]))})}rightToLeft(t,e){return t.nodes.forEach(n=>n.x=e.width-n.x),t.edges.forEach(n=>{n.controlPoints=n.controlPoints.map(i=>[e.width-i[0],i[1]])}),t}execute(t,e){return Of(this,void 0,void 0,function*(){const n=Object.assign(Object.assign(Object.assign({},au.defaultOptions),this.options),e),{direction:i,nodeSize:a}=n,l=this.getRoot();if(!l)return t;const u=this.formatSize(a);n.vGap||(n.vGap=Math.max(...(t.nodes||[]).map(V=>u(V)[1]))),n.hGap||(n.hGap=Math.max(...(t.nodes||[]).map(V=>u(V)[0])));let f=this.doLayout(l,n);this.placeAlterative(f,l),i==="RL"&&(f=this.rightToLeft(f,n));const{model:m}=this.context,x=[],Z=[];return f.nodes.forEach(V=>{const{id:nt,x:dt,y:St}=V,Dt=m.getNodeLikeDatum(nt);x.push(dd(Dt,{x:dt,y:St}))}),f.edges.forEach(V=>{const{id:nt,controlPoints:dt}=V,St=m.getEdgeDatum(nt);Z.push(dd(St,{controlPoints:dt}))}),{nodes:x,edges:Z}})}}au.defaultOptions={direction:"RL",getRibSep:()=>60};const dd=(r,t)=>Object.assign(Object.assign({},r),{style:Object.assign(Object.assign({},r.style||{}),t)}),jh=r=>r.depth===0,Nl=r=>(r.depth||(r.depth=0))%2===0;var Tf=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class su extends pa{constructor(){super(...arguments),this.id="snake"}formatSize(t,e){const n=typeof e=="function"?e:()=>e;return t.reduce((i,a)=>{const[l,u]=ra(n(a))||[0,0];return[Math.max(i[0],l),Math.max(i[1],u)]},[0,0])}validate(t){const{nodes:e=[],edges:n=[]}=t,i={},a={},l={};e.forEach(V=>{i[V.id]=0,a[V.id]=0,l[V.id]=[]}),n.forEach(V=>{i[V.target]++,a[V.source]++,l[V.source].push(V.target)});const u=new Set,f=V=>{u.has(V)||(u.add(V),l[V].forEach(f))};if(f(e[0].id),u.size!==e.length)return!1;const m=e.filter(V=>i[V.id]===0),x=e.filter(V=>a[V.id]===0);return!(m.length!==1||x.length!==1||e.filter(V=>i[V.id]===1&&a[V.id]===1).length!==e.length-2)}execute(t,e){return Tf(this,void 0,void 0,function*(){var n;if(!this.validate(t))return t;const{nodeSize:i,padding:a,sortBy:l,cols:u,colGap:f,rowGap:m,clockwise:x,width:Z,height:V}=Object.assign({},su.defaultOptions,this.options,e),[nt,dt,St,Dt]=Ne(a),Jt=this.formatSize(t.nodes||[],i),oe=Math.ceil((t.nodes||[]).length/u);let ge=f||(Z-Dt-dt-u*Jt[0])/(u-1),Be=m||(V-nt-St-oe*Jt[1])/(oe-1);return(Be===1/0||Be<0)&&(Be=0),(ge===1/0||ge<0)&&(ge=0),{nodes:((l?(n=t.nodes)===null||n===void 0?void 0:n.sort(l):Cf(t))||[]).map((En,Je)=>{const Dn=Math.floor(Je/u),tr=Je%u,ur=x?Dn%2===0?tr:u-1-tr:Dn%2===0?u-1-tr:tr,jr=Dt+ur*(Jt[0]+ge)+Jt[0]/2,Pr=nt+Dn*(Jt[1]+Be)+Jt[1]/2;return{id:En.id,style:{x:jr,y:Pr}}})}})}}su.defaultOptions={padding:0,cols:5,clockwise:!0};function Cf(r){const{nodes:t=[],edges:e=[]}=r,n={},i={};t.forEach(u=>{n[u.id]=0,i[u.id]=[]}),e.forEach(u=>{n[u.target]++,i[u.source].push(u.target)});const a=[],l=[];for(t.forEach(u=>{n[u.id]===0&&a.push(u.id)});a.length>0;){const u=a.shift(),f=t.find(m=>m.id===u);l.push(f),i[u].forEach(m=>{n[m]--,n[m]===0&&a.push(m)})}return l}const Nf=["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)"],Pf=["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)"],kf=["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)"],Rf=["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)"],Lf=["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 fd=y(92387);class Oa extends Nt{}function Pl(r,t=!0,e){const n=document.createElement("div");return n.setAttribute("class",`g6-${r}`),Object.assign(n.style,{position:"absolute",display:"block"}),t&&Object.assign(n.style,{position:"unset",gridArea:"1 / 1 / 2 / 2",inset:"0px",height:"100%",width:"100%",overflow:"hidden",pointerEvents:"none"}),e&&Object.assign(n.style,e),n}function Wh(r,t="div",e={},n="",i=document.body){const a=document.getElementById(r);a&&a.remove();const l=document.createElement(t);return l.innerHTML=n,l.id=r,Object.assign(l.style,e),i.appendChild(l),l}var Df=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class ou extends Oa{constructor(t,e){super(t,Object.assign({},ou.defaultOptions,e)),this.$element=Pl("background"),this.context.canvas.getContainer().prepend(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return Df(this,void 0,void 0,function*(){e.update.call(this,t),Object.assign(this.$element.style,(0,fd.Z)(this.options,["key","type"]))})}destroy(){super.destroy(),this.$element.remove()}}ou.defaultOptions={transition:"background 0.5s",backgroundSize:"cover",zIndex:"-1"};var kl=y(80574),If=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class lu extends Oa{constructor(t,e){super(t,(0,h.Z)({},lu.defaultOptions,e)),this.members=new Map,this.avoidMembers=new Map,this.bubbleSetOptions={},this.drawBubbleSets=()=>{const{style:n,bubbleSetOptions:i}=this.parseOptions();(0,S.Z)(this.bubbleSetOptions,i)||this.init(),this.bubbleSetOptions=Object.assign({},i);const a=Object.assign(Object.assign({},n),{d:this.getPath()});this.shape?this.shape.update(a):(this.shape=new hs({style:a}),this.context.canvas.appendChild(this.shape))},this.updateBubbleSetsPath=n=>{if(!this.shape)return;const i=me(n.data);[...this.options.members,...this.options.avoidMembers].includes(i)&&this.shape.update(Object.assign(Object.assign({},this.parseOptions().style),{d:this.getPath(i)}))},this.getPath=n=>{const{graph:i}=this.context,a=this.options.members,l=[...this.members.keys()],u=this.options.avoidMembers,f=[...this.avoidMembers.keys()];if(!n&&(0,S.Z)(a,l)&&(0,S.Z)(u,f))return this.path;const{enter:m=[],exit:x=[]}=Oi(l,a,Dt=>Dt),{enter:Z=[],exit:V=[]}=Oi(f,u,Dt=>Dt);n&&(x.push(n),m.push(n));const nt=(Dt,Jt,oe)=>{Dt.forEach(ge=>{const Be=oe?this.members:this.avoidMembers,un=oe?"pushMember":"pushNonMember",nn=oe?"removeMember":"removeNonMember";if(Jt){let En;i.getElementType(ge)==="edge"?([En]=Ff(i,ge),this.bubbleSets.pushEdge(En)):([En]=Bf(i,ge),this.bubbleSets[un](En)),Be.set(ge,En)}else{const En=Be.get(ge);En&&(i.getElementType(ge)==="edge"?this.bubbleSets.removeEdge(En):this.bubbleSets[nn](En),Be.delete(ge))}})};nt(x,!1,!0),nt(m,!0,!0),nt(V,!1,!1),nt(Z,!0,!1);const St=this.bubbleSets.compute().sample(8).simplify(0).bSplines().simplify(0);return this.path=yo(St.points.map(Cn)),this.path},this.bindEvents(),this.bubbleSets=new kl.CF(this.options)}bindEvents(){this.context.graph.on(J.AFTER_RENDER,this.drawBubbleSets),this.context.graph.on(J.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath)}init(){this.bubbleSets=new kl.CF(this.options),this.members=new Map,this.avoidMembers=new Map}parseOptions(){const t=this.options,{type:e,key:n,members:i,avoidMembers:a}=t,l=If(t,["type","key","members","avoidMembers"]),u=Object.keys(l).reduce((f,m)=>(m in kl.vC?f.bubbleSetOptions[m]=l[m]:f.style[m]=l[m],f),{style:{},bubbleSetOptions:{}});return Object.assign({type:e,key:n,members:i,avoidMembers:a},u)}addMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.avoidMembers.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n))),this.options.members=[...new Set([...this.options.members,...e])],this.drawBubbleSets()}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),this.drawBubbleSets()}updateMember(t){this.options.members=(0,xe.Z)(t)?t(this.options.members):t,this.drawBubbleSets()}getMember(){return this.options.members}addAvoidMember(t){const e=Array.isArray(t)?t:[t];e.some(n=>this.options.members.includes(n))&&(this.options.members=this.options.members.filter(n=>!e.includes(n))),this.options.avoidMembers=[...new Set([...this.options.avoidMembers,...e])],this.drawBubbleSets()}removeAvoidMember(t){const e=Array.isArray(t)?t:[t];this.options.avoidMembers.some(n=>e.includes(n))&&(this.options.avoidMembers=this.options.avoidMembers.filter(n=>!e.includes(n)),this.drawBubbleSets())}updateAvoidMember(t){this.options.avoidMembers=Array.isArray(t)?t:[t],this.drawBubbleSets()}getAvoidMember(){return this.options.avoidMembers}destroy(){this.context.graph.off(J.AFTER_RENDER,this.drawBubbleSets),this.context.graph.off(J.AFTER_ELEMENT_UPDATE,this.updateBubbleSetsPath),this.shape.destroy(),super.destroy()}}lu.defaultOptions=Object.assign({members:[],avoidMembers:[],fill:"lightblue",fillOpacity:.2,stroke:"blue",strokeOpacity:.2},kl.vC);const Bf=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getElementRenderBounds(n);return new kl.Ae(i.min[0],i.min[1],q(i),Ct(i))}),Ff=(r,t)=>(Array.isArray(t)?t:[t]).map(n=>{const i=r.getEdgeData(n),a=r.getElementPosition(i.source),l=r.getElementPosition(i.target);return kl.x1.from({x1:a[0],y1:a[1],x2:l[0],y2:l[1]})});class Xv extends null{constructor(t,e){super(t,e),this.setOptions=n=>{const i={cameraType:"setType",near:"setNear",far:"setFar",fov:"setFov",aspect:"setAspect",projectionMode:"setProjectionMode",distance:"setDistance",minDistance:"setMinDistance",maxDistance:"setMaxDistance",roll:"setRoll",elevation:"setElevation",azimuth:"setAzimuth"},a=(l,u)=>{switch(l){case"projectionMode":return u==="perspective"?1:0;case"cameraType":return{orbiting:0,exploring:1,tracking:2}[u];case"aspect":return typeof u=="number"?u:this.getCanvasAspect();default:return u}};Object.entries(i).forEach(([l,u])=>{const f=n[l];if(f!==void 0){const m=a(l,f);this.context.canvas.getCamera()[u](m)}})},this.bindEvents()}update(t){this.setOptions(t),super.update(t)}bindEvents(){this.context.graph.once(GraphEvent.BEFORE_DRAW,()=>this.setOptions(this.options))}getCanvasAspect(){const[t,e]=this.context.viewport.getCanvasSize();return t/e}}function _f(r){return`
|
|
|
<ul class="g6-contextmenu-ul">
|
|
|
${r.map(t=>`<li class="g6-contextmenu-li" value="${t.value}">${t.name}</li>`).join("")}
|
|
|
</ul>
|
|
|
`}const Zf=`
|
|
|
.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 vd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class cu extends Oa{constructor(t,e){super(t,Object.assign({},cu.defaultOptions,e)),this.targetElement=null,this.onTriggerEvent=n=>{var i;(i=n.preventDefault)===null||i===void 0||i.call(n),this.show(n)},this.onMenuItemClick=n=>{const{onClick:i,trigger:a}=this.options;if(n.target instanceof HTMLElement&&n.target.className.includes("g6-contextmenu-li")){const l=n.target.getAttribute("value");i==null||i(l,n.target,this.targetElement),this.hide()}a!=="click"&&this.hide()},this.initElement(),this.update(e)}initElement(){this.$element=Pl("contextmenu",!1,{zIndex:"99"});const{className:t}=this.options;t&&this.$element.classList.add(t),this.context.canvas.getContainer().appendChild(this.$element),Wh("g6-contextmenu-css","style",{},Zf,document.head)}show(t){return vd(this,void 0,void 0,function*(){const{enable:e,offset:n}=this.options;if(typeof e=="function"&&!e(t)||!e){this.hide();return}const i=yield this.getDOMContent(t);i instanceof HTMLElement?(this.$element.innerHTML="",this.$element.appendChild(i)):this.$element.innerHTML=i;const a=this.context.graph.getCanvas().getContainer().getBoundingClientRect();this.$element.style.left=`${t.client.x-a.left+n[0]}px`,this.$element.style.top=`${t.client.y-a.top+n[1]}px`,this.$element.style.display="block",this.targetElement=t.target})}hide(){this.$element.style.display="none",this.targetElement=null}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.unbindEvents(),super.destroy(),this.$element.remove()}getDOMContent(t){return vd(this,void 0,void 0,function*(){const{getContent:e,getItems:n}=this.options;return n?_f(yield n(t)):yield e(t)})}bindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.on(`canvas:${e}`,this.onTriggerEvent),t.on(`node:${e}`,this.onTriggerEvent),t.on(`edge:${e}`,this.onTriggerEvent),t.on(`combo:${e}`,this.onTriggerEvent),document.addEventListener("click",this.onMenuItemClick)}unbindEvents(){const{graph:t}=this.context,{trigger:e}=this.options;t.off(`canvas:${e}`,this.onTriggerEvent),t.off(`node:${e}`,this.onTriggerEvent),t.off(`edge:${e}`,this.onTriggerEvent),t.off(`combo:${e}`,this.onTriggerEvent),document.removeEventListener("click",this.onMenuItemClick)}}cu.defaultOptions={trigger:"contextmenu",offset:[4,4],loadingContent:'<div class="g6-contextmenu-loading">Loading...</div>',getContent:()=>"It is a empty context menu.",enable:()=>!0};class uu extends Oa{constructor(t,e){super(t,Object.assign({},uu.defaultOptions,e)),this.edgeBundles={},this.edgePoints={},this.onBundle=()=>{const{model:n,element:i}=this.context,a=n.getEdgeData();this.divideEdges(this.options.divisions);const{cycles:l,iterRate:u,divRate:f}=this.options;let{lambda:m,divisions:x,iterations:Z}=this.options;for(let V=0;V<l;V++){for(let nt=0;nt<Z;nt++){const dt={};a.forEach(St=>{var Dt;if(St.source===St.target)return;const Jt=me(St);dt[Jt]=this.getEdgeForces(St,x,m);for(let oe=0;oe<x+1;oe++)(Dt=this.edgePoints)[Jt]||(Dt[Jt]=[]),this.edgePoints[Jt][oe]=w(this.edgePoints[Jt][oe],dt[Jt][oe])})}m/=2,x*=f,Z*=u,this.divideEdges(x)}a.forEach(V=>{const nt=me(V),dt=i.getElement(nt);dt==null||dt.update({d:ln(this.edgePoints[nt])})})},this.bindEvents()}get nodeMap(){const t=this.context.model.getNodeData();return Object.fromEntries(t.map(e=>[me(e),gt(Wt(e))]))}divideEdges(t){this.context.model.getEdgeData().forEach(n=>{var i;const a=me(n);(i=this.edgePoints)[a]||(i[a]=[]);const l=this.nodeMap[n.source],u=this.nodeMap[n.target];if(t===1)this.edgePoints[a].push(l),this.edgePoints[a].push(it(w(l,u),2)),this.edgePoints[a].push(u);else{const m=(this.edgePoints[a].length===0?Q(l,u):Uf(this.edgePoints[a]))/(t+1);let x=m;const Z=[l];for(let V=1;V<this.edgePoints[a].length;V++){const nt=this.edgePoints[a][V-1],dt=this.edgePoints[a][V];let St=Q(dt,nt);for(;St>x;){const Dt=x/St,Jt=w(nt,K(Y(dt,nt),Dt));Z.push(Jt),St-=x,x=m}x-=St}Z.push(u),this.edgePoints[a]=Z}})}getVectorPosition(t){const e=this.nodeMap[t.source],n=this.nodeMap[t.target],[i,a]=Y(n,e),l=Q(e,n);return{source:e,target:n,vx:i,vy:a,length:l}}measureEdgeCompatibility(t,e){const n=this.getVectorPosition(t),i=this.getVectorPosition(e),a=zf(n,i),l=jf(n,i),u=Wf(n,i),f=Gf(n,i);return a*l*u*f}getEdgeBundles(){const t={},e=this.options.bundleThreshold,n=this.context.model.getEdgeData();return n.forEach((i,a)=>{n.forEach((l,u)=>{var f,m;if(u<=a)return;this.measureEdgeCompatibility(i,l)>=e&&(t[f=me(i)]||(t[f]=[]),t[me(i)].push(l),t[m=me(l)]||(t[m]=[]),t[me(l)].push(i))})}),t}getSpringForce(t,e){const{pre:n,cur:i,next:a}=t;return K(Y(w(n,a),K(i,2)),e)}getElectrostaticForce(t,e){(0,qi.Z)(this.edgeBundles)&&(this.edgeBundles=this.getEdgeBundles());const n=this.edgeBundles[me(e)];let i=[0,0];return n==null||n.forEach(a=>{const l=this.edgePoints[me(a)][t],u=this.edgePoints[me(e)][t],f=Y(l,u),m=Q(l,u);i=w(i,K(f,1/m))}),i}getEdgeForces(t,e,n){const i=this.nodeMap[t.source],a=this.nodeMap[t.target],l=this.options.K/(Q(i,a)*(e+1)),u=[[0,0]],f=me(t);for(let m=1;m<e;m++){const x=this.getSpringForce({pre:this.edgePoints[f][m-1],cur:this.edgePoints[f][m],next:this.edgePoints[f][m+1]||[0,0]},l),Z=this.getElectrostaticForce(m,t);u.push(K(w(x,Z),n))}return u.push([0,0]),u}bindEvents(){const{graph:t}=this.context;t.on(J.AFTER_RENDER,this.onBundle)}unbindEvents(){const{graph:t}=this.context;t.off(J.AFTER_RENDER,this.onBundle)}destroy(){this.unbindEvents(),super.destroy()}}uu.defaultOptions={K:.1,lambda:.1,divisions:1,divRate:2,cycles:6,iterations:90,iterRate:2/3,bundleThreshold:.6};const zf=(r,t)=>Math.abs(ht([r.vx,r.vy],[t.vx,t.vy])/(r.length*t.length)),jf=(r,t)=>{const e=(r.length+t.length)/2;return 2/(e/Math.min(r.length,t.length)+Math.max(r.length,t.length)/e)},Wf=(r,t)=>{const e=(r.length+t.length)/2,n=it(w(r.source,r.target),2),i=it(w(t.source,t.target),2);return e/(e+Q(n,i))},gd=(r,t)=>{if(t.source[0]===t.target[0])return[t.source[0],r[1]];if(t.source[1]===t.target[1])return[r[0],t.source[1]];const e=(t.source[1]-t.target[1])/(t.source[0]-t.target[0]),n=(e*e*t.source[0]+e*(r[1]-t.source[1])+r[0])/(e*e+1),i=e*(n-t.source[0])+t.source[1];return[n,i]},pd=(r,t)=>{const e=gd(t.source,r),n=gd(t.target,r),i=it(w(e,n),2),a=it(w(r.source,r.target),2);return Q(e,n)===0?0:Math.max(0,1-2*Q(a,i)/Q(e,n))},Gf=(r,t)=>Math.min(pd(r,t),pd(t,r)),Uf=r=>{let t=0;for(let e=1;e<r.length;e++)t+=Q(r[e],r[e-1]);return t},Vf={fill:"#fff",fillOpacity:1,lineWidth:1,stroke:"#000",strokeOpacity:.8,zIndex:-1/0},md=.05;class hu extends Oa{constructor(t,e){super(t,Object.assign({},hu.defaultOptions,e)),this.shapes=new Map,this.r=this.options.r,this.onEdgeFilter=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Cn(n.canvas);this.renderLens(i),this.renderFocusElements()},this.renderLens=n=>{const i=Object.assign({},Vf,this.options.style);this.isLensOn||(this.lens=new Wi({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Bn(n),{size:this.r*2}),this.lens.update(i)},this.getFilterData=()=>{const{filter:n}=this.options,{model:i}=this.context,a=i.getData();if(!n)return a;const{nodes:l,edges:u,combos:f}=a;return{nodes:l.filter(m=>n(me(m),"node")),edges:u.filter(m=>n(me(m),"edge")),combos:f.filter(m=>n(me(m),"combo"))}},this.getFocusElements=n=>{const{nodes:i,edges:a}=this.getFilterData(),l=i.filter(m=>Q(Wt(m),n)<this.r),u=l.map(m=>me(m)),f=a.filter(m=>{const{source:x,target:Z}=m,V=u.includes(x),nt=u.includes(Z);switch(this.options.nodeType){case"both":return V&&nt;case"either":return V!==nt;case"source":return V&&!nt;case"target":return!V&&nt;default:return!1}});return{nodes:l,edges:f}},this.renderFocusElements=()=>{const{element:n,graph:i}=this.context;if(!this.isLensOn)return;const a=this.lens.getCenter(),{nodes:l,edges:u}=this.getFocusElements(a),f=new Set,m=x=>{const Z=me(x);f.add(Z);const V=n.getElement(Z);if(!V)return;const nt=this.shapes.get(Z)||V.cloneNode();nt.setPosition(V.getPosition()),nt.id=V.id,this.shapes.has(Z)?Object.entries(V.attributes).forEach(([Dt,Jt])=>{nt.style[Dt]!==Jt&&(nt.style[Dt]=Jt)}):(this.canvas.appendChild(nt),this.shapes.set(Z,nt));const dt=i.getElementType(Z),St=this.getElementStyle(dt,x);nt.update(St)};l.forEach(m),u.forEach(m),this.shapes.forEach((x,Z)=>{f.has(Z)||(x.destroy(),this.shapes.delete(Z))})},this.scaleRByWheel=n=>{var i;this.options.preventDefault&&n.preventDefault();const{clientX:a,clientY:l,deltaX:u,deltaY:f}=n,{graph:m,canvas:x}=this.context,Z=m.getCanvasByClient([a,l]),V=(i=this.lens)===null||i===void 0?void 0:i.getCenter();if(!this.isLensOn||Q(Z,V)>this.r)return;const{maxR:nt,minR:dt}=this.options,St=u+f>0?1/(1-md):1-md,Dt=Math.min(...x.getSize())/2;this.r=Math.max(dt||0,Math.min(nt||Dt,this.r*St)),this.renderLens(V),this.renderFocusElements()},this.isLensDragging=!1,this.onDragStart=n=>{var i;const a=Cn(n.canvas),l=(i=this.lens)===null||i===void 0?void 0:i.getCenter();!this.isLensOn||Q(a,l)>this.r||(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Cn(n.canvas);this.renderLens(i),this.renderFocusElements()},this.onDragEnd=()=>{this.isLensDragging=!1},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}getElementStyle(t,e){const n=t==="node"?this.options.nodeStyle:this.options.edgeStyle;return typeof n=="function"?n(e):n}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.addEventListener(G.CLICK,this.onEdgeFilter),n==="pointermove"?a.addEventListener(G.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.addEventListener(G.DRAG_START,this.onDragStart),a.addEventListener(G.DRAG,this.onDrag),a.addEventListener(G.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.addEventListener(G.WHEEL,this.scaleRByWheel,{passive:!1}))}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i}=this.options,a=e.getCanvas().getLayer();["click","drag"].includes(n)&&a.removeEventListener(G.CLICK,this.onEdgeFilter),n==="pointermove"?a.removeEventListener(G.POINTER_MOVE,this.onEdgeFilter):n==="drag"&&(a.removeEventListener(G.DRAG_START,this.onDragStart),a.removeEventListener(G.DRAG,this.onDrag),a.removeEventListener(G.DRAG_END,this.onDragEnd)),i==="wheel"&&((t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,this.scaleRByWheel))}update(t){var e;this.unbindEvents(),super.update(t),this.r=(e=t.r)!==null&&e!==void 0?e:this.r,this.bindEvents()}destroy(){this.unbindEvents(),this.isLensOn&&this.lens.destroy(),this.shapes.forEach((t,e)=>{t.destroy(),this.shapes.delete(e)}),super.destroy()}}hu.defaultOptions={trigger:"pointermove",r:60,nodeType:"both",filter:()=>!0,style:{lineWidth:2},nodeStyle:{label:!1},edgeStyle:{label:!0},scaleRBy:"wheel",preventDefault:!0};const Yf={fill:"#ccc",fillOpacity:.1,lineWidth:2,stroke:"#000",strokeOpacity:.8,labelFontSize:12},yd=.05,bd=.1;class du extends Oa{constructor(t,e){super(t,Object.assign({},du.defaultOptions,e)),this.r=this.options.r,this.d=this.options.d,this.onCreateFisheye=n=>{if(this.options.trigger==="drag"&&this.isLensOn)return;const i=Cn(n.canvas);this.onMagnify(i)},this.onMagnify=n=>{n.some(isNaN)||(this.renderLens(n),this.renderFocusElements())},this.renderLens=n=>{const i=Object.assign({},Yf,this.options.style);this.isLensOn||(this.lens=new Wi({style:i}),this.canvas.appendChild(this.lens)),Object.assign(i,Bn(n),{size:this.r*2,label:this.options.showDPercent,labelText:this.getDPercent()}),this.lens.update(i)},this.getDPercent=()=>{const{minD:n,maxD:i}=this.options;return`${Math.round((this.d-n)/(i-n)*100)}%`},this.prevMagnifiedStyleMap=new Map,this.prevOriginStyleMap=new Map,this.renderFocusElements=()=>{if(!this.isLensOn)return;const{graph:n}=this.context,i=this.lens.getCenter(),a=(this.d+1)*this.r,l=new Map,u=new Map;n.getNodeData().forEach(m=>{const x=Wt(m),Z=Q(x,i);if(Z>this.r)return;const V=a*Z/(this.d*Z+this.r),[nt,dt]=x,[St,Dt]=i,Jt=(nt-St)/Z,oe=(dt-Dt)/Z,ge=[St+V*Jt,Dt+V*oe],Be=me(m),un=this.getNodeStyle(m),nn=(0,da.Z)(n.getElementRenderStyle(Be),Object.keys(un));l.set(Be,Object.assign(Object.assign({},Bn(ge)),un)),u.set(Be,Object.assign(Object.assign({},Bn(x)),nn))}),this.updateStyle(l,u)},this.getNodeStyle=n=>{const{nodeStyle:i}=this.options;return typeof i=="function"?i(n):i},this.updateStyle=(n,i)=>{const{graph:a,element:l}=this.context,{enter:u,exit:f,keep:m}=Oi(Array.from(this.prevMagnifiedStyleMap.keys()),Array.from(n.keys()),V=>V),x=new Set,Z=(V,nt)=>{const dt=l.getElement(V);dt==null||dt.update(nt),a.getRelatedEdgesData(V).forEach(St=>{x.add(me(St))})};[...u,...m].forEach(V=>{Z(V,n.get(V))}),f.forEach(V=>{Z(V,this.prevOriginStyleMap.get(V)),this.prevOriginStyleMap.delete(V)}),x.forEach(V=>{const nt=l.getElement(V);nt==null||nt.update({})}),this.prevMagnifiedStyleMap=n,i.forEach((V,nt)=>{this.prevOriginStyleMap.has(nt)||this.prevOriginStyleMap.set(nt,V)})},this.isWheelValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const{clientX:i,clientY:a}=n,l=this.context.graph.getCanvasByClient([i,a]),u=this.lens.getCenter();return!(Q(l,u)>this.r)},this.scaleR=n=>{const{maxR:i,minR:a}=this.options,l=n?1/(1-yd):1-yd,u=Math.min(...this.context.canvas.getSize())/2;this.r=Math.max(a||0,Math.min(i||u,this.r*l))},this.scaleD=n=>{const{maxD:i,minD:a}=this.options,l=n?this.d+bd:this.d-bd;this.d=Math.max(a,Math.min(i,l))},this.scaleRByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleR(i+a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.scaleDByWheel=n=>{if(!this.isWheelValid(n))return;const{deltaX:i,deltaY:a}=n;this.scaleD(i+a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.isDragValid=n=>{if(this.options.preventDefault&&n.preventDefault(),!this.isLensOn)return!1;const i=Cn(n.canvas),a=this.lens.getCenter();return!(Q(i,a)>this.r)},this.isLensDragging=!1,this.onDragStart=n=>{this.isDragValid(n)&&(this.isLensDragging=!0)},this.onDrag=n=>{if(!this.isLensDragging)return;const i=Cn(n.canvas);this.onMagnify(i)},this.onDragEnd=()=>{this.isLensDragging=!1},this.scaleRByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleR(i-a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.scaleDByDrag=n=>{if(!this.isLensDragging)return;const{dx:i,dy:a}=n;this.scaleD(i-a>0);const l=this.lens.getCenter();this.onMagnify(l)},this.bindEvents()}get canvas(){return this.context.canvas.getLayer("transient")}get isLensOn(){return this.lens&&!this.lens.destroyed}get graphDom(){return this.context.graph.getCanvas().getContextService().getDomElement()}bindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,l=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&l.addEventListener(G.CLICK,this.onCreateFisheye),n==="pointermove"&&l.addEventListener(G.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){l.addEventListener(G.DRAG_START,this.onDragStart),l.addEventListener(G.DRAG_END,this.onDragEnd);const u=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;l.addEventListener(G.DRAG,u)}if(i==="wheel"||a==="wheel"){const u=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.addEventListener(G.WHEEL,u,{passive:!1})}}unbindEvents(){var t;const{graph:e}=this.context,{trigger:n,scaleRBy:i,scaleDBy:a}=this.options,l=e.getCanvas().getLayer();if(["click","drag"].includes(n)&&l.removeEventListener(G.CLICK,this.onCreateFisheye),n==="pointermove"&&l.removeEventListener(G.POINTER_MOVE,this.onCreateFisheye),n==="drag"||i==="drag"||a==="drag"){l.removeEventListener(G.DRAG_START,this.onDragStart),l.removeEventListener(G.DRAG_END,this.onDragEnd);const u=n==="drag"?this.onDrag:i==="drag"?this.scaleRByDrag:this.scaleDByDrag;l.removeEventListener(G.DRAG,u)}if(i==="wheel"||a==="wheel"){const u=i==="wheel"?this.scaleRByWheel:this.scaleDByWheel;(t=this.graphDom)===null||t===void 0||t.removeEventListener(G.WHEEL,u)}}update(t){var e,n;this.unbindEvents(),super.update(t),this.r=(e=t.r)!==null&&e!==void 0?e:this.r,this.d=(n=t.d)!==null&&n!==void 0?n:this.d,this.bindEvents()}destroy(){var t;this.unbindEvents(),this.isLensOn&&((t=this.lens)===null||t===void 0||t.destroy()),this.prevMagnifiedStyleMap.clear(),this.prevOriginStyleMap.clear(),super.destroy()}}du.defaultOptions={trigger:"pointermove",r:120,d:1.5,maxD:5,minD:0,showDPercent:!0,style:{},nodeStyle:{label:!0},preventDefault:!0};class fu extends Oa{constructor(t,e){super(t,Object.assign({},fu.defaultOptions,e)),this.$el=this.context.canvas.getContainer(),this.graphSize=[0,0],this.onFullscreenChange=()=>{var n,i,a,l;const u=!!document.fullscreenElement;this.options.autoFit&&this.setGraphSize(u),u?(i=(n=this.options).onEnter)===null||i===void 0||i.call(n):(l=(a=this.options).onExit)===null||l===void 0||l.call(a)},this.shortcut=new ss(t.graph),this.bindEvents(),this.style=document.createElement("style"),document.head.appendChild(this.style),this.style.innerHTML=`
|
|
|
:not(:root):fullscreen::backdrop {
|
|
|
background: transparent;
|
|
|
}
|
|
|
`}bindEvents(){this.unbindEvents(),this.shortcut.unbindAll();const{request:t=[],exit:e=[]}=this.options.trigger;this.shortcut.bind(t,this.request),this.shortcut.bind(e,this.exit),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(i=>{document.addEventListener(i,this.onFullscreenChange,!1)})}unbindEvents(){this.shortcut.unbindAll(),["webkitfullscreenchange","mozfullscreenchange","fullscreenchange","MSFullscreenChange"].forEach(e=>{document.removeEventListener(e,this.onFullscreenChange,!1)})}setGraphSize(t=!0){var e,n;let i,a;t?(i=((e=globalThis.screen)===null||e===void 0?void 0:e.width)||0,a=((n=globalThis.screen)===null||n===void 0?void 0:n.height)||0,this.graphSize=this.context.graph.getSize()):[i,a]=this.graphSize,this.context.graph.setSize(i,a),this.context.graph.render()}request(){document.fullscreenElement||!Hf()||this.$el.requestFullscreen().catch(t=>{Xe.warn(`Error attempting to enable full-screen: ${t.message} (${t.name})`)})}exit(){document.fullscreenElement&&document.exitFullscreen()}update(t){this.unbindEvents(),super.update(t),this.bindEvents()}destroy(){this.exit(),this.style.remove(),super.destroy()}}fu.defaultOptions={trigger:{},autoFit:!0};function Hf(){return document.fullscreenEnabled||Reflect.get(document,"webkitFullscreenEnabled")||Reflect.get(document,"mozFullscreenEnabled")||Reflect.get(document,"msFullscreenEnabled")}var Gh=y(50264);class vu extends Oa{constructor(t,e){super(t,Object.assign({},vu.defaultOptions,e)),this.$element=Pl("grid-line",!0),this.offset=[0,0],this.currentScale=1,this.followZoom=i=>{const{data:{scale:a,origin:l}}=i;if(!a||l===void 0&&this.context.viewport===void 0)return;const u=this.currentScale;this.currentScale=a;const f=a/u,m=K(l||this.context.graph.getCanvasCenter(),1-f),x=this.baseSize*a,Z=K(this.offset,f),V=Kt(Z,x),nt=w(V,m);this.$element.style.backgroundSize=`${x}px ${x}px`,this.$element.style.backgroundPosition=`${nt[0]}px ${nt[1]}px`,this.offset=Kt(nt,x)},this.followTranslate=i=>{if(!this.options.follow)return;const{data:{translate:a}}=i;a&&this.updateOffset(a)},this.onTransform=i=>{const a=this.parseFollow(this.options.follow);a.zoom&&this.followZoom(i),a.translate&&this.followTranslate(i)},this.context.canvas.getContainer().prepend(this.$element),this.baseSize=this.options.size,this.updateStyle(),this.bindEvents()}update(t){super.update(t),t.size!==void 0&&(this.baseSize=t.size),this.updateStyle()}bindEvents(){const{graph:t}=this.context;t.on(J.AFTER_TRANSFORM,this.onTransform)}updateStyle(){const{stroke:t,lineWidth:e,border:n,borderLineWidth:i,borderStroke:a,borderStyle:l}=this.options,u=this.baseSize*this.currentScale;Object.assign(this.$element.style,{border:n?`${i}px ${l} ${a}`:"none",backgroundImage:`linear-gradient(${t} ${e}px, transparent ${e}px), linear-gradient(90deg, ${t} ${e}px, transparent ${e}px)`,backgroundSize:`${u}px ${u}px`,backgroundRepeat:"repeat"})}updateOffset(t){const e=this.baseSize*this.currentScale;this.offset=Kt(w(this.offset,t),e),this.$element.style.backgroundPosition=`${this.offset[0]}px ${this.offset[1]}px`}parseFollow(t){var e,n;return(0,Gh.Z)(t)?{translate:t,zoom:t}:{translate:(e=t==null?void 0:t.translate)!==null&&e!==void 0?e:!1,zoom:(n=t==null?void 0:t.zoom)!==null&&n!==void 0?n:!1}}destroy(){this.context.graph.off(J.AFTER_TRANSFORM,this.onTransform),this.$element.remove(),super.destroy()}}vu.defaultOptions={border:!0,borderLineWidth:1,borderStroke:"#eee",borderStyle:"solid",lineWidth:1,size:20,stroke:"#eee"};var Uh=y(49336);function Vh(r){const t={Added:new Map,Updated:new Map,Removed:new Map};return r.forEach(e=>{const{type:n,value:i}=e,a=me(i);if(n==="NodeAdded"||n==="EdgeAdded"||n==="ComboAdded")t.Added.set(a,e);else if(n==="NodeUpdated"||n==="EdgeUpdated"||n==="ComboUpdated")if(t.Added.has(a))t.Added.set(a,{type:n.replace("Updated","Added"),value:i});else if(t.Updated.has(a)){const{original:l}=t.Updated.get(a);t.Updated.set(a,{type:n,value:i,original:l})}else t.Removed.has(a)||t.Updated.set(a,e);else(n==="NodeRemoved"||n==="EdgeRemoved"||n==="ComboRemoved")&&(t.Added.has(a)?t.Added.delete(a):(t.Updated.has(a)&&t.Updated.delete(a),t.Removed.set(a,e)))}),[...Array.from(t.Added.values()),...Array.from(t.Updated.values()),...Array.from(t.Removed.values())]}function Ed(r){const{NodeAdded:t=[],NodeUpdated:e=[],NodeRemoved:n=[],EdgeAdded:i=[],EdgeUpdated:a=[],EdgeRemoved:l=[],ComboAdded:u=[],ComboUpdated:f=[],ComboRemoved:m=[]}=(0,Ft.Z)(r,x=>x.type);return{add:{nodes:t,edges:i,combos:u},update:{nodes:e,edges:a,combos:f},remove:{nodes:n,edges:l,combos:m}}}function xd(r,t){for(const e in r)(0,R.Z)(r[e])&&!Array.isArray(r[e])&&r[e]!==null?(t[e]||(t[e]={}),xd(r[e],t[e])):t[e]===void 0&&(t[e]=mn(e))}function Xf(r,t=!1,e){const n={animation:t,current:{add:{},update:{},remove:{}},original:{add:{},update:{},remove:{}}},{add:i,update:a,remove:l}=Ed(Vh(r));return["nodes","edges","combos"].forEach(u=>{a[u]&&a[u].forEach(f=>{var m,x;const Z=Object.assign({},f.value);let V=Object.assign({},f.original);if(e){const nt=e.graph.getElementType(me(f.original)),dt=nt==="edge"?"stroke":"fill",St=e.element.getElementComputedStyle(nt,f.original);V=Object.assign(Object.assign({},f.original),{style:Object.assign({[dt]:St[dt]},f.original.style)})}xd(Z,V),(m=n.current.update)[u]||(m[u]=[]),n.current.update[u].push(Z),(x=n.original.update)[u]||(x[u]=[]),n.original.update[u].push(V)}),i[u]&&i[u].forEach(f=>{var m,x;const Z=Object.assign({},f.value);(m=n.current.add)[u]||(m[u]=[]),n.current.add[u].push(Z),(x=n.original.remove)[u]||(x[u]=[]),n.original.remove[u].push(Z)}),l[u]&&l[u].forEach(f=>{var m,x;const Z=Object.assign({},f.value);(m=n.current.remove)[u]||(m[u]=[]),n.current.remove[u].push(Z),(x=n.original.add)[u]||(x[u]=[]),n.original.add[u].push(Z)})}),n}class gu extends Oa{constructor(t,e){super(t,Object.assign({},gu.defaultOptions,e)),this.batchChanges=null,this.batchAnimation=!1,this.undoStack=[],this.redoStack=[],this.freezed=!1,this.executeCommand=(i,a=!0)=>{var l,u,f;this.freezed=!0,(u=(l=this.options).executeCommand)===null||u===void 0||u.call(l,i);const m=a?i.original:i.current;this.context.graph.addData(m.add),this.context.graph.updateData(m.update),this.context.graph.removeData(Zn(m.remove,!1)),(f=this.context.element)===null||f===void 0||f.draw({silence:!0,animation:i.animation}),this.freezed=!1},this.addCommand=i=>{var a;if(!this.freezed){if(i.type===J.AFTER_DRAW){const{dataChanges:l=[],animation:u=!0}=i.data;if(!((a=this.context.batch)===null||a===void 0)&&a.isBatching){if(!this.batchChanges)return;this.batchChanges.push(l),this.batchAnimation&&(this.batchAnimation=u);return}this.batchChanges=[l],this.batchAnimation=u}this.undoStackPush(Xf(this.batchChanges.flat(),this.batchAnimation,this.context)),this.notify(Rt.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 Uh.Z;const{graph:n}=this.context;n.on(J.AFTER_DRAW,this.addCommand),n.on(J.BATCH_START,this.initBatchCommand),n.on(J.BATCH_END,this.addCommand)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(){var t,e,n,i;const a=this.undoStack.pop();if(a){if(this.executeCommand(a),((e=(t=this.options).beforeAddCommand)===null||e===void 0?void 0:e.call(t,a,!1))===!1)return;this.redoStack.push(a),(i=(n=this.options).afterAddCommand)===null||i===void 0||i.call(n,a,!1),this.notify(Rt.UNDO,a)}return this}redo(){const t=this.redoStack.pop();return t&&(this.executeCommand(t,!1),this.undoStackPush(t),this.notify(Rt.REDO,t)),this}undoAndCancel(){const t=this.undoStack.pop();return t&&(this.executeCommand(t,!1),this.redoStack=[],this.notify(Rt.CANCEL,t)),this}undoStackPush(t){var e,n,i,a;const{stackSize:l}=this.options;l!==0&&this.undoStack.length>=l&&this.undoStack.shift(),((n=(e=this.options).beforeAddCommand)===null||n===void 0?void 0:n.call(e,t,!0))!==!1&&(this.undoStack.push(t),(a=(i=this.options).afterAddCommand)===null||a===void 0||a.call(i,t,!0))}clear(){this.undoStack=[],this.redoStack=[],this.batchChanges=null,this.batchAnimation=!1,this.notify(Rt.CLEAR,null)}notify(t,e){this.emitter.emit(t,{cmd:e}),this.emitter.emit(Rt.CHANGE,{cmd:e})}on(t,e){this.emitter.on(t,e)}destroy(){const{graph:t}=this.context;t.off(J.AFTER_DRAW,this.addCommand),t.off(J.BATCH_START,this.initBatchCommand),t.off(J.BATCH_END,this.addCommand),this.emitter.off(),super.destroy(),this.undoStack=[],this.redoStack=[]}}gu.defaultOptions={stackSize:0};const Yh={toXy(r,t){if(!t)return[...r];const e=t[0].slice(1),n=t[1].slice(1);return r.map(i=>[i[e],i[n]])},fromXy(r,t){if(!t)return[...r];const e=t[0].slice(1),n=t[1].slice(1);return r.map(([i,a])=>({[e]:i,[n]:a}))}};class Kf{constructor(t,e){this._cells=[],this._cellSize=e,this._reverseCellSize=1/e;for(const n of t){const i=this.coordToCellNum(n[0]),a=this.coordToCellNum(n[1]);this._cells[i]||(this._cells[i]=[]),this._cells[i][a]||(this._cells[i][a]=[]),this._cells[i][a].push(n)}}cellPoints(t,e){var n;return((n=this._cells[t])===null||n===void 0?void 0:n[e])||[]}rangePoints(t){const e=this.coordToCellNum(t[0]),n=this.coordToCellNum(t[1]),i=this.coordToCellNum(t[2]),a=this.coordToCellNum(t[3]),l=[];for(let u=e;u<=i;u++)for(let f=n;f<=a;f++){const m=this.cellPoints(u,f);for(const x of m)l.push(x)}return l}removePoint(t){const e=this.coordToCellNum(t[0]),n=this.coordToCellNum(t[1]),i=this._cells[e][n],a=i.findIndex(([l,u])=>l===t[0]&&u===t[1]);return a>-1&&i.splice(a,1),i}trunc(t){return Math.trunc(t)}coordToCellNum(t){return this.trunc(t*this._reverseCellSize)}extendBbox(t,e){return[t[0]-e*this._cellSize,t[1]-e*this._cellSize,t[2]+e*this._cellSize,t[3]+e*this._cellSize]}}function Qf(r,t){return new Kf(r,t)}const wd=+(Math.pow(2,27)+1);function pu(r,t,e){const n=r*t,i=wd*r,a=i-r,l=i-a,u=r-l,f=wd*t,m=f-t,x=f-m,Z=t-x,dt=n-l*x-u*x-l*Z,St=u*Z-dt;return e?(e[0]=St,e[1]=n,e):[St,n]}function Jf(r,t,e){const n=r+t,i=n-r,a=n-i,l=t-i,u=r-a;return e?(e[0]=u+l,e[1]=n,e):[u+l,n]}function $f(r,t){const e=r.length;if(e===1){const u=pu(r[0],t);return u[0]?u:[u[1]]}const n=new Array(2*e),i=[.1,.1],a=[.1,.1];let l=0;pu(r[0],t,i),i[0]&&(n[l++]=i[0]);for(let u=1;u<e;++u){pu(r[u],t,a);const f=i[1];Jf(f,a[0],i),i[0]&&(n[l++]=i[0]);const m=a[1],x=i[1],Z=m+x,V=Z-m,nt=x-V;i[1]=Z,nt&&(n[l++]=nt)}return i[1]&&(n[l++]=i[1]),l===0&&(n[l++]=0),n.length=l,n}function qf(r,t){const e=r+t,n=e-r,i=e-n,a=t-n,u=r-i+a;return u?[u,e]:[e]}function t0(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return qf(r[0],-t[0]);const i=e+n,a=new Array(i);let l=0,u=0,f=0;const m=Math.abs;let x=r[u],Z=m(x),V=-t[f],nt=m(V),dt,St;Z<nt?(St=x,u+=1,u<e&&(x=r[u],Z=m(x))):(St=V,f+=1,f<n&&(V=-t[f],nt=m(V))),u<e&&Z<nt||f>=n?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=-t[f],nt=m(V)));let Dt=dt+St,Jt=Dt-dt,oe=St-Jt,ge=oe,Be=Dt,un,nn,En,Je,Dn;for(;u<e&&f<n;)Z<nt?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=-t[f],nt=m(V))),St=ge,Dt=dt+St,Jt=Dt-dt,oe=St-Jt,oe&&(a[l++]=oe),un=Be+Dt,nn=un-Be,En=un-nn,Je=Dt-nn,Dn=Be-En,ge=Dn+Je,Be=un;for(;u<e;)dt=x,St=ge,Dt=dt+St,Jt=Dt-dt,oe=St-Jt,oe&&(a[l++]=oe),un=Be+Dt,nn=un-Be,En=un-nn,Je=Dt-nn,Dn=Be-En,ge=Dn+Je,Be=un,u+=1,u<e&&(x=r[u]);for(;f<n;)dt=V,St=ge,Dt=dt+St,Jt=Dt-dt,oe=St-Jt,oe&&(a[l++]=oe),un=Be+Dt,nn=un-Be,En=un-nn,Je=Dt-nn,Dn=Be-En,ge=Dn+Je,Be=un,f+=1,f<n&&(V=-t[f]);return ge&&(a[l++]=ge),Be&&(a[l++]=Be),l||(a[l++]=0),a.length=l,a}function e0(r,t){const e=r+t,n=e-r,i=e-n,a=t-n,u=r-i+a;return u?[u,e]:[e]}function n0(r,t){const e=r.length|0,n=t.length|0;if(e===1&&n===1)return e0(r[0],t[0]);const i=e+n,a=new Array(i);let l=0,u=0,f=0;const m=Math.abs;let x=r[u],Z=m(x),V=t[f],nt=m(V),dt,St;Z<nt?(St=x,u+=1,u<e&&(x=r[u],Z=m(x))):(St=V,f+=1,f<n&&(V=t[f],nt=m(V))),u<e&&Z<nt||f>=n?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=t[f],nt=m(V)));let Dt=dt+St,Jt=Dt-dt,oe=St-Jt,ge=oe,Be=Dt,un,nn,En,Je,Dn;for(;u<e&&f<n;)Z<nt?(dt=x,u+=1,u<e&&(x=r[u],Z=m(x))):(dt=V,f+=1,f<n&&(V=t[f],nt=m(V))),St=ge,Dt=dt+St,Jt=Dt-dt,oe=St-Jt,oe&&(a[l++]=oe),un=Be+Dt,nn=un-Be,En=un-nn,Je=Dt-nn,Dn=Be-En,ge=Dn+Je,Be=un;for(;u<e;)dt=x,St=ge,Dt=dt+St,Jt=Dt-dt,oe=St-Jt,oe&&(a[l++]=oe),un=Be+Dt,nn=un-Be,En=un-nn,Je=Dt-nn,Dn=Be-En,ge=Dn+Je,Be=un,u+=1,u<e&&(x=r[u]);for(;f<n;)dt=V,St=ge,Dt=dt+St,Jt=Dt-dt,oe=St-Jt,oe&&(a[l++]=oe),un=Be+Dt,nn=un-Be,En=un-nn,Je=Dt-nn,Dn=Be-En,ge=Dn+Je,Be=un,f+=1,f<n&&(V=t[f]);return ge&&(a[l++]=ge),Be&&(a[l++]=Be),l||(a[l++]=0),a.length=l,a}const Md=5,mu=11102230246251565e-32,r0=(3+16*mu)*mu,i0=(7+56*mu)*mu;function a0(r,t,e,n){return function(a,l,u){const f=r(r(t(l[1],u[0]),t(-u[1],l[0])),r(t(a[1],l[0]),t(-l[1],a[0]))),m=r(t(a[1],u[0]),t(-u[1],a[0])),x=n(f,m);return x[x.length-1]}}function s0(r,t,e,n){return function(a,l,u,f){const m=r(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),l[2]),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),f[2]))),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),f[2])))),x=r(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),f[2]))),r(e(r(t(l[1],u[0]),t(-u[1],l[0])),a[2]),r(e(r(t(a[1],u[0]),t(-u[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),u[2])))),Z=n(m,x);return Z[Z.length-1]}}function o0(r,t,e,n){return function(a,l,u,f,m){const x=r(r(r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),u[2]),r(e(r(t(u[1],m[0]),t(-m[1],u[0])),-f[2]),e(r(t(u[1],f[0]),t(-f[1],u[0])),m[2]))),l[3]),r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-f[2]),e(r(t(l[1],f[0]),t(-f[1],l[0])),m[2]))),-u[3]),e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),m[2]))),f[3]))),r(e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),l[2]),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),f[2]))),-m[3]),r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-f[2]),e(r(t(l[1],f[0]),t(-f[1],l[0])),m[2]))),a[3]),e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-f[2]),e(r(t(a[1],f[0]),t(-f[1],a[0])),m[2]))),-l[3])))),r(r(e(r(e(r(t(l[1],m[0]),t(-m[1],l[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),m[2]))),f[3]),r(e(r(e(r(t(l[1],f[0]),t(-f[1],l[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),f[2]))),-m[3]),e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),l[2]),r(e(r(t(l[1],f[0]),t(-f[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),f[2]))),a[3]))),r(e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),f[2]))),-l[3]),r(e(r(e(r(t(l[1],f[0]),t(-f[1],l[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),f[2]))),u[3]),e(r(e(r(t(l[1],u[0]),t(-u[1],l[0])),a[2]),r(e(r(t(a[1],u[0]),t(-u[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),u[2]))),-f[3]))))),Z=r(r(r(e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),u[2]),r(e(r(t(u[1],m[0]),t(-m[1],u[0])),-f[2]),e(r(t(u[1],f[0]),t(-f[1],u[0])),m[2]))),a[3]),e(r(e(r(t(f[1],m[0]),t(-m[1],f[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-f[2]),e(r(t(a[1],f[0]),t(-f[1],a[0])),m[2]))),-u[3])),r(e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),m[2]))),f[3]),e(r(e(r(t(u[1],f[0]),t(-f[1],u[0])),a[2]),r(e(r(t(a[1],f[0]),t(-f[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),f[2]))),-m[3]))),r(r(e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),l[2]),r(e(r(t(l[1],m[0]),t(-m[1],l[0])),-u[2]),e(r(t(l[1],u[0]),t(-u[1],l[0])),m[2]))),a[3]),e(r(e(r(t(u[1],m[0]),t(-m[1],u[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-u[2]),e(r(t(a[1],u[0]),t(-u[1],a[0])),m[2]))),-l[3])),r(e(r(e(r(t(l[1],m[0]),t(-m[1],l[0])),a[2]),r(e(r(t(a[1],m[0]),t(-m[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),m[2]))),u[3]),e(r(e(r(t(l[1],u[0]),t(-u[1],l[0])),a[2]),r(e(r(t(a[1],u[0]),t(-u[1],a[0])),-l[2]),e(r(t(a[1],l[0]),t(-l[1],a[0])),u[2]))),-m[3])))),V=n(x,Z);return V[V.length-1]}}function yu(r){return(r===3?a0:r===4?s0:o0)(n0,pu,$f,t0)}const l0=yu(3),c0=yu(4),tl=[function(){return 0},function(){return 0},function(t,e){return e[0]-t[0]},function(t,e,n){const i=(t[1]-n[1])*(e[0]-n[0]),a=(t[0]-n[0])*(e[1]-n[1]),l=i-a;let u;if(i>0){if(a<=0)return l;u=i+a}else if(i<0){if(a>=0)return l;u=-(i+a)}else return l;const f=r0*u;return l>=f||l<=-f?l:l0(t,e,n)},function(t,e,n,i){const a=t[0]-i[0],l=e[0]-i[0],u=n[0]-i[0],f=t[1]-i[1],m=e[1]-i[1],x=n[1]-i[1],Z=t[2]-i[2],V=e[2]-i[2],nt=n[2]-i[2],dt=l*x,St=u*m,Dt=u*f,Jt=a*x,oe=a*m,ge=l*f,Be=Z*(dt-St)+V*(Dt-Jt)+nt*(oe-ge),un=(Math.abs(dt)+Math.abs(St))*Math.abs(Z)+(Math.abs(Dt)+Math.abs(Jt))*Math.abs(V)+(Math.abs(oe)+Math.abs(ge))*Math.abs(nt),nn=i0*un;return Be>nn||-Be>nn?Be:c0(t,e,n,i)}];function u0(r){let t=tl[r.length];return t||(t=tl[r.length]=yu(r.length)),t.apply(void 0,...r)}function h0(r,t,e,n,i,a,l){return function(...f){switch(f.length){case 0:case 1:return 0;case 2:return n(f[0],f[1]);case 3:return i(f[0],f[1],f[2]);case 4:return a(f[0],f[1],f[2],f[3]);case 5:return l(f[0],f[1],f[2],f[3],f[4])}return r(f)}}function d0(){for(;tl.length<=Md;)tl.push(yu(tl.length));const r=h0(void 0,u0,...tl);for(let t=0;t<=Md;++t)r[t]=tl[t];return r}var uc=d0();const Sd=uc[3];function f0(r){const t=r.length;if(t<3){const u=new Array(t);for(let f=0;f<t;++f)u[f]=f;return t===2&&r[0][0]===r[1][0]&&r[0][1]===r[1][1]?[0]:u}const e=new Array(t);for(let u=0;u<t;++u)e[u]=u;e.sort((u,f)=>{const m=r[u][0]-r[f][0];return m||r[u][1]-r[f][1]});const n=[e[0],e[1]],i=[e[0],e[1]];for(let u=2;u<t;++u){const f=e[u],m=r[f];let x=n.length;for(;x>1&&Sd(r[n[x-2]],r[n[x-1]],m)<=0;)x-=1,n.pop();for(n.push(f),x=i.length;x>1&&Sd(r[i[x-2]],r[i[x-1]],m)>=0;)x-=1,i.pop();i.push(f)}const a=new Array(i.length+n.length-2);let l=0;for(let u=0,f=n.length;u<f;++u)a[l++]=n[u];for(let u=i.length-2;u>0;--u)a[l++]=i[u];return a}function v0(r,t,e,n){for(let i=0;i<2;++i){const a=r[i],l=t[i],[u,f]=[Math.min(a,l),Math.max(a,l)],m=e[i],x=n[i],[Z,V]=[Math.min(m,x),Math.max(m,x)];if(V<u||f<Z)return!1}return!0}function g0(r,t,e,n){const i=uc(r,e,n),a=uc(t,e,n);if(i>0&&a>0||i<0&&a<0)return!1;const l=uc(e,r,t),u=uc(n,r,t);return l>0&&u>0||l<0&&u<0?!1:i===0&&a===0&&l===0&&u===0?v0(r,t,e,n):!0}function p0(r){const t=[r[0]];let e=r[0];for(let n=1;n<r.length;n++){const i=r[n];(e[0]!==i[0]||e[1]!==i[1])&&t.push(i),e=i}return t}function m0(r){return r.sort(function(t,e){return t[0]-e[0]||t[1]-e[1]})}function Hh(r,t){return Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2)}function Ad(r,t,e){const n=[t[0]-r[0],t[1]-r[1]],i=[e[0]-r[0],e[1]-r[1]],a=Hh(r,t),l=Hh(r,e);return(n[0]*i[0]+n[1]*i[1])/Math.sqrt(a*l)}function Od(r,t){for(let e=0;e<t.length-1;e++){const n=[t[e],t[e+1]];if(!(r[0][0]===n[0][0]&&r[0][1]===n[0][1]||r[0][0]===n[1][0]&&r[0][1]===n[1][1])&&g0(r[0],r[1],n[0],n[1]))return!0}return!1}function y0(r){let t=1/0,e=1/0,n=-1/0,i=-1/0;for(let a=r.length-1;a>=0;a--)r[a][0]<t&&(t=r[a][0]),r[a][1]<e&&(e=r[a][1]),r[a][0]>n&&(n=r[a][0]),r[a][1]>i&&(i=r[a][1]);return[n-t,i-e]}function b0(r){return[Math.min(r[0][0],r[1][0]),Math.min(r[0][1],r[1][1]),Math.max(r[0][0],r[1][0]),Math.max(r[0][1],r[1][1])]}function E0(r,t,e){let n=null,i=Cd,a=Cd,l,u;for(let f=0;f<t.length;f++)l=Ad(r[0],r[1],t[f]),u=Ad(r[1],r[0],t[f]),l>i&&u>a&&!Od([r[0],t[f]],e)&&!Od([r[1],t[f]],e)&&(i=l,a=u,n=t[f]);return n}function Td(r,t,e,n,i){let a=!1;for(let l=0;l<r.length-1;l++){const u=[r[l],r[l+1]],f=u[0][0]+","+u[0][1]+","+u[1][0]+","+u[1][1];if(Hh(u[0],u[1])<t||i.has(f))continue;let m=0,x=b0(u),Z,V,nt;do x=n.extendBbox(x,m),Z=x[2]-x[0],V=x[3]-x[1],nt=E0(u,n.rangePoints(x),r),m++;while(nt===null&&(e[0]>Z||e[1]>V));Z>=e[0]&&V>=e[1]&&i.add(f),nt!==null&&(r.splice(l+1,0,nt),n.removePoint(nt),a=!0)}return a?Td(r,t,e,n,i):r}function x0(r,t,e){const n=t||20,i=p0(m0(Yh.toXy(r,e)));if(i.length<4){const Z=i.concat([i[0]]);return e?Yh.fromXy(Z,e):Z}const a=y0(i),l=[a[0]*Nd,a[1]*Nd],u=f0(i).reverse().map(Z=>i[Z]);u.push(u[0]);const f=i.filter(function(Z){return u.indexOf(Z)<0}),m=Math.ceil(1/(i.length/(a[0]*a[1]))),x=Td(u,Math.pow(n,2),l,Qf(f,m),new Set);return e?Yh.fromXy(x,e):x}const Cd=Math.cos(90/(180/Math.PI)),Nd=.6;function w0(r,t,e){if(r.length===1)return M0(r[0],t,e);if(r.length===2)return Pd(r,t,e);if(r.length===3){const[n,i,a]=_a(r);if(Kr(n,i,a))return Pd([n,a],t,e)}switch(e){case"smooth":return A0(r,t);case"sharp":return O0(r,t);case"rounded":default:return S0(r,t)}}const M0=(r,t,e)=>{if(e==="sharp")return[["M",r[0]-t,r[1]-t],["L",r[0]+t,r[1]-t],["L",r[0]+t,r[1]+t],["L",r[0]-t,r[1]+t],["Z"]];const n=[t,t,0,0,0];return[["M",r[0],r[1]-t],["A",...n,r[0],r[1]+t],["A",...n,r[0],r[1]-t]]},Pd=(r,t,e)=>{const n=[t,t,0,0,0],i=e==="sharp"?w(r[0],$(et(Y(r[0],r[1])),t)):r[0],a=e==="sharp"?w(r[1],$(et(Y(r[1],r[0])),t)):r[1],l=$(et(Ot(Y(i,a),!1)),t),u=$(l,-1),f=w(i,l),m=w(a,l),x=w(a,u),Z=w(i,u);return e==="sharp"?[["M",f[0],f[1]],["L",m[0],m[1]],["L",x[0],x[1]],["L",Z[0],Z[1]],["Z"]]:[["M",f[0],f[1]],["L",m[0],m[1]],["A",...n,x[0],x[1]],["L",Z[0],Z[1]],["A",...n,f[0],f[1]]]},S0=(r,t)=>{const e=_a(r).map((u,f)=>{const m=(f-2+r.length)%r.length,x=(f-1+r.length)%r.length,Z=(f+1)%r.length,V=r[m],nt=r[x],dt=r[Z],St=Y(V,nt),Dt=Y(nt,u),Jt=Y(u,dt),oe=(En,Je)=>yt(En,Je,!0)<Math.PI,ge=oe(St,Dt),Be=oe(Dt,Jt),un=En=>$(et(Ot(En,!1)),t),nn=un(Dt);return[{p:gt(ge?w(nt,un(St)):w(nt,nn)),concave:ge&&nt},{p:gt(Be?w(u,un(Jt)):w(u,nn)),concave:Be&&u}]}),n=[t,t,0,0,0],i=e.findIndex((u,f)=>!e[(f-1+e.length)%e.length][0].concave&&!e[(f-1+e.length)%e.length][1].concave&&!u[0].concave&&!u[0].concave&&!u[1].concave),a=e.slice(i).concat(e.slice(0,i));let l=[];return a.flatMap((u,f)=>{const m=[],x=a[e.length-1];return f===0&&m.push(["M",...x[1].p]),u[0].concave?l.push(u[0].p,u[1].p):m.push(["A",...n,...u[0].p]),u[1].concave?l.unshift(u[1].p):m.push(["L",...u[1].p]),l.length===3&&(m.pop(),m.push(["C",...l.flat()]),l=[]),m})},A0=(r,t)=>{const e=_a(r).map((n,i)=>{const a=r[(i+1)%r.length];return{p:n,v:et(Y(a,n))}});return e.forEach((n,i)=>{const a=i>0?i-1:r.length-1,l=e[a].v,u=et(w(l,$(n.v,yt(l,n.v,!0)<Math.PI?1:-1)));n.p=w(n.p,$(u,t))}),yo(e.map(n=>n.p))},O0=(r,t)=>{const n=r.map((a,l)=>{const u=r[l===0?r.length-1:l-1],f=vt($(et(Ot(Y(u,a),!1)),t));return[w(u,f),w(a,f)]}).flat();return n.map((a,l)=>{if(l%2===0)return null;const u=[n[(l-1)%n.length],n[l%n.length]],f=[n[(l+1)%n.length],n[(l+2)%n.length]];return he(u,f,!0)}).filter(Boolean).map((a,l)=>[l===0?"M":"L",a[0],a[1]]).concat([["Z"]])};var T0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class bu extends Oa{constructor(t,e){super(t,Object.assign({},bu.defaultOptions,e)),this.hullMemberIds=[],this.drawHull=()=>{if(!this.shape)this.shape=new hs({style:this.getHullStyle()}),this.context.canvas.appendChild(this.shape);else{const n=!(0,S.Z)(this.optionsCache,this.options);this.shape.update(this.getHullStyle(n))}this.optionsCache=Object.assign({},this.options)},this.updateHullPath=n=>{this.shape&&this.options.members.includes(me(n.data))&&this.shape.update({d:this.getHullPath(!0)})},this.getHullPath=(n=!1)=>{const{graph:i}=this.context,a=this.getMember();if(a.length===0)return"";const l=a.map(m=>i.getNodeData(m)),u=x0(l.map(Wt),this.options.concavity).slice(1).reverse(),f=u.flatMap(m=>l.filter(x=>(0,S.Z)(Wt(x),m)).map(me));return(0,S.Z)(f,this.hullMemberIds)&&!n?this.path:(this.hullMemberIds=f,this.path=w0(u,this.getPadding(),this.options.corner),this.path)},this.bindEvents()}bindEvents(){this.context.graph.on(J.AFTER_RENDER,this.drawHull),this.context.graph.on(J.AFTER_ELEMENT_UPDATE,this.updateHullPath)}unbindEvents(){this.context.graph.off(J.AFTER_RENDER,this.drawHull),this.context.graph.off(J.AFTER_ELEMENT_UPDATE,this.updateHullPath)}getHullStyle(t){const e=this.options,{members:n,padding:i,corner:a}=e,l=T0(e,["members","padding","corner"]);return Object.assign(Object.assign({},l),{d:this.getHullPath(t)})}getPadding(){const{graph:t}=this.context;return this.hullMemberIds.reduce((n,i)=>{const{halfExtents:a}=t.getElementRenderBounds(i),l=Math.max(a[0],a[1]);return Math.max(n,l)},0)+this.options.padding}addMember(t){const e=Array.isArray(t)?t:[t];this.options.members=[...new Set([...this.options.members,...e])],this.shape.update({d:this.getHullPath()})}removeMember(t){const e=Array.isArray(t)?t:[t];this.options.members=this.options.members.filter(n=>!e.includes(n)),e.some(n=>this.hullMemberIds.includes(n))&&this.shape.update({d:this.getHullPath()})}updateMember(t){this.options.members=(0,xe.Z)(t)?t(this.options.members):t,this.shape.update(this.getHullStyle(!0))}getMember(){return this.options.members}destroy(){this.unbindEvents(),this.shape.destroy(),this.hullMemberIds=[],super.destroy()}}bu.defaultOptions={members:[],padding:10,corner:"rounded",concavity:1/0,fill:"lightblue",fillOpacity:.2,labelOpacity:1,stroke:"blue",strokeOpacity:.2};var C0=y(65244);function Eu(r){const{width:t,height:e,renderer:n}=r,i=N0(r),a=new _.Xz({width:t,height:e,container:i,renderer:n||new ii.Th});return[i,a]}function N0(r){var t;const{container:e,className:n,graphCanvas:i}=r;if(e)return typeof e=="string"?document.getElementById(e):e;const a=Pl(n,!1),{width:l,height:u,containerStyle:f}=r,[m,x]=P0(r);return Object.assign(a.style,Object.assign({position:"absolute",left:m+"px",top:x+"px",width:l+"px",height:u+"px"},f)),(t=i.getContainer())===null||t===void 0||t.appendChild(a),a}function P0(r){const{width:t,height:e,placement:n,graphCanvas:i}=r,[a,l]=i.getSize(),[u,f]=ye(n);return[u*(a-t),f*(l-e)]}var k0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class xu extends Oa{constructor(t,e){super(t,Object.assign({},xu.defaultOptions,e)),this.typePrefix="__data__",this.draw=!1,this.fieldMap={node:new Map,edge:new Map,combo:new Map},this.selectedItems=[],this.bindEvents=()=>{const{graph:n}=this.context;n.on(J.AFTER_DRAW,this.createElement)},this.changeState=(n,i)=>{const{graph:a}=this.context,{typePrefix:l}=this,u=(0,xa.Z)(n,[l,"id"]),f=(0,xa.Z)(n,[l,"style","labelText"]),[m]=u.split("__"),x=this.fieldMap[m].get(f)||[];a.setElementState(Object.fromEntries(x==null?void 0:x.map(Z=>[Z,i])))},this.click=n=>{if(this.options.trigger==="hover")return;const i=(0,xa.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?(this.selectedItems=this.selectedItems.filter(a=>a!==i),this.changeState(n,[])):(this.selectedItems.push(i),this.changeState(n,"selected"))},this.mouseleave=n=>{this.options.trigger!=="click"&&(this.selectedItems=[],this.changeState(n,[]))},this.mouseenter=n=>{if(this.options.trigger==="click")return;const i=(0,xa.Z)(n,[this.typePrefix,"id"]);this.selectedItems.includes(i)?this.selectedItems=this.selectedItems.filter(a=>a!==i):(this.selectedItems.push(i),this.changeState(n,"active"))},this.setFieldMap=(n,i,a)=>{if(!n)return;const l=this.fieldMap[a];if(l)if(!l.has(n))l.set(n,[i]);else{const u=l.get(n);u&&(u.push(i),l.set(n,u))}},this.getEvents=()=>({mouseenter:this.mouseenter,mouseleave:this.mouseleave,click:this.click}),this.getMarkerData=(n,i)=>{if(!n)return[];const{model:a,element:l}=this.context,{nodes:u,edges:f,combos:m}=a.getData(),x={},Z=Dt=>(0,xe.Z)(n)?n(Dt):n,V={node:"circle",edge:"line",combo:"rect"},nt={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"},dt=(Dt,Jt)=>l==null?void 0:l.getElementComputedStyle(Dt,Jt),St=(Dt,Jt)=>{Dt.forEach(oe=>{const{id:ge}=oe,Be=(0,xa.Z)(oe,["data",Z(oe)]),un=(l==null?void 0:l.getElementType(Jt,oe))||"circle",nn=dt(Jt,oe),En=(Jt==="edge"?nn==null?void 0:nn.stroke:nn==null?void 0:nn.fill)||"#1783ff";ge&&Be&&Be.replace(/\s+/g,"")&&(this.setFieldMap(Be,ge,Jt),x[Be]||(x[Be]={id:`${Jt}__${ge}`,label:Be,marker:nt[un]||V[Jt],elementType:Jt,lineWidth:1,stroke:En,fill:En}))})};switch(i){case"node":St(u,"node");break;case"edge":St(f,"edge");break;case"combo":St(m,"combo");break;default:return[]}return Object.values(x)},this.createElement=()=>{if(this.draw){this.updateElement();return}const n=this.options,{width:i,height:a,nodeField:l,edgeField:u,comboField:f,trigger:m,position:x,container:Z,containerStyle:V,className:nt}=n,dt=k0(n,["width","height","nodeField","edgeField","comboField","trigger","position","container","containerStyle","className"]),St=this.getMarkerData(l,"node"),Dt=this.getMarkerData(u,"edge"),Jt=this.getMarkerData(f,"combo"),oe=[...St,...Jt,...Dt],ge=Object.assign({width:i,height:a,data:oe,itemMarkerLineWidth:({lineWidth:nn})=>nn,itemMarker:({marker:nn})=>nn,itemMarkerStroke:({stroke:nn})=>nn,itemMarkerFill:({fill:nn})=>nn,gridCol:St.length},dt,this.getEvents()),Be=new C0.W({className:"legend",style:ge});this.category=Be,this.upsertCanvas().appendChild(Be),this.draw=!0},this.bindEvents()}update(t){super.update(t),this.clear(),this.createElement()}clear(){var t,e;(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),this.canvas=void 0,this.container=void 0,this.draw=!1}updateElement(){this.category&&this.category.update({itemMarkerOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5,itemLabelOpacity:({id:t})=>!this.selectedItems.length||this.selectedItems.includes(t)?1:.5})}upsertCanvas(){if(this.canvas)return this.canvas;const t=this.context.canvas,[e,n]=t.getSize(),{width:i=e,height:a=n,position:l,container:u,containerStyle:f,className:m}=this.options,[x,Z]=Eu({width:i,height:a,graphCanvas:t,container:u,containerStyle:f,placement:l,className:"legend"});return this.container=x,m&&x.classList.add(m),this.canvas=Z,this.canvas}destroy(){this.clear(),this.context.graph.off(J.AFTER_DRAW,this.createElement),super.destroy()}}xu.defaultOptions={position:"bottom",trigger:"hover",orientation:"horizontal",layout:"flex",itemSpacing:4,rowPadding:10,colPadding:10,itemMarkerSize:16,itemLabelFontSize:16,width:240,height:160};class wu extends Oa{constructor(t,e){super(t,Object.assign({},wu.defaultOptions,e)),this.onDraw=n=>{var i;!((i=n==null?void 0:n.data)===null||i===void 0)&&i.render||this.onRender()},this.landmarkMap=new Map,this.mask=null,this.isMaskDragging=!1,this.onMaskDragStart=n=>{this.mask&&(this.isMaskDragging=!0,this.mask.setPointerCapture(n.pointerId),this.mask.addEventListener("pointermove",this.onMaskDrag),this.mask.addEventListener("pointerup",this.onMaskDragEnd),this.mask.addEventListener("pointercancel",this.onMaskDragEnd))},this.onMaskDrag=n=>{if(!this.mask||!this.isMaskDragging)return;const{size:[i,a]}=this.options,{movementX:l,movementY:u}=n,{left:f,top:m,width:x,height:Z}=this.mask.style,[,,V,nt]=this.maskBBox;let dt=parseInt(f)+l,St=parseInt(m)+u,Dt=parseInt(x),Jt=parseInt(Z);dt<0&&(dt=0),St<0&&(St=0),dt+Dt>i&&(dt=Do(i-Dt,0)),St+Jt>a&&(St=Do(a-Jt,0)),Dt<V&&(l>0?(dt=Do(dt-l,0),Dt=Lo(Dt+l,i)):l<0&&(Dt=Lo(Dt-l,i))),Jt<nt&&(u>0?(St=Do(St-u,0),Jt=Lo(Jt+u,a)):u<0&&(Jt=Lo(Jt-u,a))),Object.assign(this.mask.style,{left:dt+"px",top:St+"px",width:Dt+"px",height:Jt+"px"});const oe=parseInt(f)-dt,ge=parseInt(m)-St;if(oe===0&&ge===0)return;const Be=this.context.canvas.getCamera().getZoom(),un=this.canvas.getCamera().getZoom(),nn=Be/un;this.context.graph.translateBy([oe*nn,ge*nn],!1)},this.onMaskDragEnd=n=>{this.mask&&(this.isMaskDragging=!1,this.mask.releasePointerCapture(n.pointerId),this.mask.removeEventListener("pointermove",this.onMaskDrag),this.mask.removeEventListener("pointerup",this.onMaskDragEnd),this.mask.removeEventListener("pointercancel",this.onMaskDragEnd))},this.onTransform=(0,re.Z)(()=>{this.isMaskDragging||(this.updateMask(),this.setCamera())},32,{leading:!0}),this.setOnRender(),this.bindEvents()}update(t){this.unbindEvents(),super.update(t),"delay"in t&&this.setOnRender(),this.bindEvents()}setOnRender(){this.onRender=(0,Oo.Z)(()=>{this.renderMinimap(),this.renderMask()},this.options.delay)}bindEvents(){const{graph:t}=this.context;t.on(J.AFTER_DRAW,this.onDraw),t.on(J.AFTER_RENDER,this.onRender),t.on(J.AFTER_ANIMATE,this.onRender),t.on(J.AFTER_TRANSFORM,this.onTransform)}unbindEvents(){const{graph:t}=this.context;t.off(J.AFTER_DRAW,this.onDraw),t.off(J.AFTER_RENDER,this.onRender),t.off(J.AFTER_ANIMATE,this.onRender),t.off(J.AFTER_TRANSFORM,this.onTransform)}renderMinimap(){const t=this.getElements(),e=this.initCanvas();this.setShapes(e,t)}getElements(){const{filter:t}=this.options,{model:e,element:n}=this.context,i=e.getData(),a={nodes:i.nodes.filter(m=>n==null?void 0:n.getElement(me(m))),edges:i.edges.filter(m=>{const x=n==null?void 0:n.getElement(me(m));return x&&ka(x)}),combos:i.combos.filter(m=>n==null?void 0:n.getElement(me(m)))};if(!t)return a;const{nodes:l,edges:u,combos:f}=a;return{nodes:l.filter(m=>t(me(m),"node")),edges:u.filter(m=>t(me(m),"edge")),combos:f.filter(m=>t(me(m),"combo"))}}setShapes(t,e){const{nodes:n,edges:i,combos:a}=e,{shape:l}=this.options,{element:u}=this.context,f=(m,x)=>{const Z=me(m),V=u==null?void 0:u.getElement(Z);if(!V)return;const nt=V.getShape("key");let dt;if(typeof l=="string"){const St=l;dt=V.getShape(St).cloneNode()}else{const St=l(Z,x,V);St===V?dt=St.cloneNode(!0):dt=St}dt.setPosition(nt.getPosition()),V.style.zIndex&&(dt.style.zIndex=V.style.zIndex),dt.id=V.id,t.appendChild(dt)};t.removeChildren(),i.forEach(m=>f(m,"edge")),a.forEach(m=>f(m,"combo")),n.forEach(m=>f(m,"node"))}initCanvas(){const{renderer:t,size:[e,n]}=this.options;if(this.canvas){const{width:i,height:a}=this.canvas.getConfig();(e!==i||n!==a)&&this.canvas.resize(e,n),t&&this.canvas.setRenderer(t)}else{const{className:i,position:a,container:l,containerStyle:u}=this.options,[f,m]=Eu({renderer:t,width:e,height:n,placement:a,className:"minimap",container:l,containerStyle:u,graphCanvas:this.context.canvas});i&&f.classList.add(i),this.container=f,this.canvas=m}return this.setCamera(),this.canvas}createLandmark(t,e,n){const i=`${t.join(",")}-${e.join(",")}-${n}`;if(this.landmarkMap.has(i))return this.landmarkMap.get(i);const l=this.canvas.getCamera().createLandmark(i,{position:t,focalPoint:e,zoom:n});return this.landmarkMap.set(i,l),l}setCamera(){var t;const{canvas:e}=this.context,n=(t=this.canvas)===null||t===void 0?void 0:t.getCamera();if(!n)return;const{size:[i,a],padding:l}=this.options,[u,f,m,x]=Ne(l),{min:Z,max:V,center:nt}=e.getBounds("elements"),dt=V[0]-Z[0],St=V[1]-Z[1],Dt=i-x-f,Jt=a-u-m,oe=Dt/dt,ge=Jt/St,Be=Math.min(oe,ge),un=this.createLandmark(nt,nt,Be);n.gotoLandmark(un,0)}get maskBBox(){const{canvas:t}=this.context,e=t.getSize(),n=t.getCanvasByViewport([0,0]),i=t.getCanvasByViewport(e),a=this.canvas.canvas2Viewport(Bn(n)),l=this.canvas.canvas2Viewport(Bn(i)),u=l.x-a.x,f=l.y-a.y;return[a.x,a.y,u,f]}calculateMaskBBox(){const{size:[t,e]}=this.options;let[n,i,a,l]=this.maskBBox;return n<0&&(a=Lo(a+n,t),n=0),i<0&&(l=Lo(l+i,e),i=0),n+a>t&&(a=Do(t-n,0)),i+l>e&&(l=Do(e-i,0)),[Lo(n,t),Lo(i,e),Do(a,0),Do(l,0)]}renderMask(){const{maskStyle:t}=this.options;this.mask||(this.mask=document.createElement("div"),this.mask.addEventListener("pointerdown",this.onMaskDragStart),this.mask.draggable=!0,this.mask.addEventListener("dragstart",e=>e.preventDefault&&e.preventDefault())),this.container.appendChild(this.mask),Object.assign(this.mask.style,Object.assign(Object.assign({},t),{cursor:"move",position:"absolute",pointerEvents:"auto"})),this.updateMask()}updateMask(){if(!this.mask)return;const[t,e,n,i]=this.calculateMaskBBox();Object.assign(this.mask.style,{top:e+"px",left:t+"px",width:n+"px",height:i+"px"})}destroy(){var t,e,n;this.unbindEvents(),(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.mask)===null||e===void 0||e.remove(),(n=this.container)===null||n===void 0||n.remove(),super.destroy()}}wu.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 Lo=(r,t)=>Math.min(r,t),Do=(r,t)=>Math.max(r,t);var Xh=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};const Kh={x1:0,y1:0,x2:0,y2:0,visibility:"hidden"};class Mu extends Oa{constructor(t,e){super(t,Object.assign({},Mu.defaultOptions,e)),this.initSnapline=()=>{const n=this.context.canvas.getLayer("transient");this.horizontalLine||(this.horizontalLine=n.appendChild(new _.x1({style:Object.assign(Object.assign({},Kh),this.options.horizontalLineStyle)}))),this.verticalLine||(this.verticalLine=n.appendChild(new _.x1({style:Object.assign(Object.assign({},Kh),this.options.verticalLineStyle)})))},this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!0,this.autoSnapToLine=(n,i,a)=>Xh(this,void 0,void 0,function*(){const{verticalX:l,horizontalY:u}=a,{tolerance:f}=this.options,{min:[m,x],max:[Z,V],center:[nt,dt]}=i;let St=0,Dt=0;l!==null&&(Fa(Z,l)<f&&(St=l-Z),Fa(m,l)<f&&(St=l-m),Fa(nt,l)<f&&(St=l-nt),St!==0&&(this.isVerticalSticking=!0)),u!==null&&(Fa(V,u)<f&&(Dt=u-V),Fa(x,u)<f&&(Dt=u-x),Fa(dt,u)<f&&(Dt=u-dt),Dt!==0&&(this.isHorizontalSticking=!0)),(St!==0||Dt!==0)&&(yield this.context.graph.translateElementBy({[n]:[St,Dt]},!1))}),this.enableSnap=n=>{const{target:i}=n,a=.5;if(this.isHorizontalSticking||this.isVerticalSticking){const[l,u]=this.getDelta(n);if(this.isHorizontalSticking&&this.isVerticalSticking&&Math.abs(l)<=a&&Math.abs(u)<=a)return this.context.graph.translateElementBy({[i.id]:[-l,-u]},!1),!1;if(this.isHorizontalSticking&&Math.abs(u)<=a)return this.context.graph.translateElementBy({[i.id]:[0,-u]},!1),!1;if(this.isVerticalSticking&&Math.abs(l)<=a)return this.context.graph.translateElementBy({[i.id]:[-l,0]},!1),!1;this.isHorizontalSticking=!1,this.isVerticalSticking=!1,this.enableStick=!1,setTimeout(()=>{this.enableStick=!0},200)}return this.enableStick},this.calcSnaplineMetadata=(n,i)=>{const{tolerance:a,shape:l}=this.options,{min:[u,f],max:[m,x],center:[Z,V]}=i;let nt=null,dt=null,St=null,Dt=null,Jt=null,oe=null;return this.getNodes().some(ge=>{if((0,S.Z)(n.id,ge.id))return!1;const Be=kd(ge,l).getRenderBounds(),{min:[un,nn],max:[En,Je],center:[Dn,tr]}=Be;return nt===null&&(Fa(Dn,Z)<a?nt=Dn:Fa(un,u)<a||Fa(un,m)<a?nt=un:(Fa(En,m)<a||Fa(En,u)<a)&&(nt=En),nt!==null&&(dt=Math.min(nn,f),St=Math.max(Je,x))),Dt===null&&(Fa(tr,V)<a?Dt=tr:Fa(nn,f)<a||Fa(nn,x)<a?Dt=nn:(Fa(Je,x)<a||Fa(Je,f)<a)&&(Dt=Je),Dt!==null&&(Jt=Math.min(un,u),oe=Math.max(En,m))),nt!==null&&Dt!==null}),{verticalX:nt,verticalMinY:dt,verticalMaxY:St,horizontalY:Dt,horizontalMinX:Jt,horizontalMaxX:oe}},this.onDragStart=()=>{this.initSnapline()},this.onDrag=n=>Xh(this,void 0,void 0,function*(){const{target:i}=n;if(this.options.autoSnap&&!this.enableSnap(n))return;const a=kd(i,this.options.shape).getRenderBounds(),l=this.calcSnaplineMetadata(i,a);this.hideSnapline(),(l.verticalX!==null||l.horizontalY!==null)&&this.updateSnapline(l),this.options.autoSnap&&(yield this.autoSnapToLine(i.id,a,l))}),this.onDragEnd=()=>{this.hideSnapline()},this.bindEvents()}getNodes(){var t;const{filter:e}=this.options,i=(((t=this.context.element)===null||t===void 0?void 0:t.getNodes())||[]).filter(a=>{var l;return ka(a)&&((l=this.context.viewport)===null||l===void 0?void 0:l.isInViewport(a.getRenderBounds()))});return e?i.filter(a=>e(a)):i}hideSnapline(){this.horizontalLine.style.visibility="hidden",this.verticalLine.style.visibility="hidden"}getLineWidth(t){const{lineWidth:e}=this.options[`${t}LineStyle`];return+(e||Kh.lineWidth||1)/this.context.graph.getZoom()}updateSnapline(t){const{verticalX:e,verticalMinY:n,verticalMaxY:i,horizontalY:a,horizontalMinX:l,horizontalMaxX:u}=t,[f,m]=this.context.canvas.getSize(),{offset:x}=this.options;a!==null?Object.assign(this.horizontalLine.style,{x1:x===1/0?0:l-x,y1:a,x2:x===1/0?f:u+x,y2:a,visibility:"visible",lineWidth:this.getLineWidth("horizontal")}):this.horizontalLine.style.visibility="hidden",e!==null?Object.assign(this.verticalLine.style,{x1:e,y1:x===1/0?0:n-x,x2:e,y2:x===1/0?m:i+x,visibility:"visible",lineWidth:this.getLineWidth("vertical")}):this.verticalLine.style.visibility="hidden"}getDelta(t){const e=this.context.graph.getZoom();return it([t.dx,t.dy],e)}bindEvents(){return Xh(this,void 0,void 0,function*(){const{graph:t}=this.context;t.on(Tt.DRAG_START,this.onDragStart),t.on(Tt.DRAG,this.onDrag),t.on(Tt.DRAG_END,this.onDragEnd)})}unbindEvents(){const{graph:t}=this.context;t.off(Tt.DRAG_START,this.onDragStart),t.off(Tt.DRAG,this.onDrag),t.off(Tt.DRAG_END,this.onDragEnd)}destroyElements(){var t,e;(t=this.horizontalLine)===null||t===void 0||t.destroy(),(e=this.verticalLine)===null||e===void 0||e.destroy()}destroy(){this.destroyElements(),this.unbindEvents(),super.destroy()}}Mu.defaultOptions={tolerance:5,offset:20,autoSnap:!0,shape:"key",verticalLineStyle:{stroke:"#1783FF"},horizontalLineStyle:{stroke:"#1783FF"},filter:()=>!0};const Fa=(r,t)=>Math.abs(r-t),kd=(r,t)=>typeof t=="function"?t(r):r.getShape(t);var R0=y(91498),L0=y(39934),D0=y(21790),I0=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},B0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const F0=["timestamp","time","date","datetime"];class Su extends Oa{get padding(){return Ne(this.options.padding)}constructor(t,e){super(t,Object.assign({},Su.defaultOptions,e)),this.backup(),this.upsertTimebar()}play(){var t;(t=this.timebar)===null||t===void 0||t.play()}pause(){var t;(t=this.timebar)===null||t===void 0||t.pause()}forward(){var t;(t=this.timebar)===null||t===void 0||t.forward()}backward(){var t;(t=this.timebar)===null||t===void 0||t.backward()}reset(){var t;(t=this.timebar)===null||t===void 0||t.reset()}update(t){super.update(t),this.backup(),this.upsertTimebar()}backup(){this.originalData=Rd(this.context.graph.getData())}upsertTimebar(){const{canvas:t}=this.context,e=this.options,{onChange:n,timebarType:i,data:a,x:l,y:u,width:f,height:m,mode:x}=e,Z=B0(e,["onChange","timebarType","data","x","y","width","height","mode"]),V=t.getSize(),[nt]=this.padding;this.upsertCanvas().ready.then(()=>{var dt;const St=Object.assign(Object.assign({x:V[0]/2-f/2,y:nt,onChange:Dt=>{const Jt=((0,L0.Z)(Dt)?Dt:[Dt,Dt]).map(oe=>(0,D0.Z)(oe)?oe.getTime():oe);this.options.mode==="modify"?this.filterElements(Jt):this.hiddenElements(Jt),n==null||n(Jt)}},Z),{data:a.map(Dt=>(0,sn.Z)(Dt)?{time:Dt,value:0}:Dt),width:f,height:m,type:i});this.timebar?this.timebar.update(St):(this.timebar=new R0.s({style:St}),(dt=this.canvas)===null||dt===void 0||dt.appendChild(this.timebar))})}upsertCanvas(){if(this.canvas)return this.canvas;const{className:t,height:e,position:n}=this.options,i=this.context.canvas,[a]=i.getSize(),[l,,u]=this.padding,[f,m]=Eu({width:a,height:e+l+u,graphCanvas:i,className:"timebar",placement:n});return this.container=f,t&&f.classList.add(t),this.canvas=m,this.canvas}filterElements(t){return I0(this,void 0,void 0,function*(){var e;if(!this.originalData)return;const{elementTypes:n,getTime:i}=this.options,{graph:a,element:l}=this.context,u=Rd(this.originalData);n.forEach(m=>{const x=`${m}s`;u[x]=(this.originalData[x]||[]).filter(Z=>{const V=i(Z);return!!Ld(V,t)})});const f=[...u.nodes,...u.combos].map(m=>me(m));u.edges=u.edges.filter(m=>{const x=m.source,Z=m.target;return f.includes(x)&&f.includes(Z)}),a.setData(u),yield(e=l.draw({animation:!1,silence:!0}))===null||e===void 0?void 0:e.finished})}hiddenElements(t){const{graph:e}=this.context,{elementTypes:n,getTime:i}=this.options,a=[],l=[];n.forEach(u=>{var f;const m=`${u}s`;(((f=this.originalData)===null||f===void 0?void 0:f[m])||[]).forEach(Z=>{const V=me(Z),nt=i(Z);Ld(nt,t)?l.push(V):a.push(V)})}),e.hideElement(a,!1),e.showElement(l,!1)}destroy(){var t,e,n;const{graph:i}=this.context;this.originalData&&i.setData(Object.assign({},this.originalData)),(t=this.timebar)===null||t===void 0||t.destroy(),(e=this.canvas)===null||e===void 0||e.destroy(),(n=this.container)===null||n===void 0||n.remove(),this.originalData=void 0,this.container=void 0,this.timebar=void 0,this.canvas=void 0,super.destroy()}}Su.defaultOptions={position:"bottom",enable:!0,timebarType:"time",className:"g6-timebar",width:450,height:60,zIndex:3,elementTypes:["node"],padding:10,mode:"modify",getTime:r=>_0(r,F0,void 0),loop:!1};const Rd=r=>{const{nodes:t=[],edges:e=[],combos:n=[]}=r;return{nodes:[...t],edges:[...e],combos:[...n]}},Ld=(r,t)=>{if((0,sn.Z)(t))return r===t;const[e,n]=t;return r>=e&&r<=n},_0=(r,t,e)=>{var n;for(let i=0;i<t.length;i++){const a=t[i],l=(n=r.data)===null||n===void 0?void 0:n[a];if(l)return l}return e};var Z0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const Dd={fill:"#1D2129",wordWrap:!0,maxLines:1,textOverflow:"ellipsis",textBaseline:"top",textAlign:"start",x:0},z0=Object.assign(Object.assign({},Dd),{fillOpacity:.9,fontSize:16,fontWeight:"bold"}),j0=Object.assign(Object.assign({},Dd),{fillOpacity:.65,fontSize:12,fontWeight:"normal"}),W0={align:"left",spacing:8,size:44,padding:[16,24,0,24]},Qh="title",Id="subtitle";class G0 extends Oa{get padding(){return Ne(this.options.padding)}constructor(t,e){const n=Object.assign({},W0,e);super(t,n),this.onRender=()=>{const i=this.updateCanvas();this.renderTitle(i)},this.bindEvents()}bindEvents(){const{graph:t}=this.context;t.on(J.AFTER_RENDER,this.onRender),t.on(J.AFTER_ANIMATE,this.onRender)}unbindEvents(){const{graph:t}=this.context;t.off(J.AFTER_RENDER,this.onRender),t.off(J.AFTER_ANIMATE,this.onRender)}destroy(){var t,e;this.unbindEvents(),(t=this.canvas)===null||t===void 0||t.destroy(),(e=this.container)===null||e===void 0||e.remove(),super.destroy()}updateCanvas(){const{size:t,className:e,align:n}=this.options,[i]=this.context.canvas.getSize(),[a=0,,l=0]=this.padding,u=t+a+l;if(this.canvas){const{width:f,height:m}=this.canvas.getConfig();(i!==f||u!==m)&&this.canvas.resize(i,u)}else{const f={left:"left-top",center:"top",right:"right-top"},[m,x]=Eu({width:i,height:u,placement:f[n]||f.left,className:"title-canvas",graphCanvas:this.context.canvas});e&&m.classList.add(e),this.container=m,this.canvas=x}return this.canvas}renderTitle(t){const e=new U0({options:this.options,ctx:this.context});t.removeChildren(),e.getTitle().forEach(n=>{n&&t.appendChild(n)})}}class U0{get padding(){return Ne(this.options.padding)}constructor(t){const{options:e,ctx:n}=t;this.options=e,this.context=n}getTitle(){const t=this.options,e=Qh,n=t[e],i=Id,a=t[i],{spacing:l=44,padding:u,align:f}=t,m=Z0(t,[typeof e=="symbol"?e:e+"",typeof i=="symbol"?i:i+"","spacing","padding","align"]),x=n,Z=a,V=Ci(m,Qh),nt=Ci(m,Id),[dt]=this.context.graph.getSize(),[St=0,Dt=0,,Jt=0]=this.padding,oe=dt,ge=oe-Jt-Dt;let Be=null,un=Jt,nn="left";switch(f){case"left":un=Jt,nn="left";break;case"center":un=oe/2,nn="center";break;case"right":un=oe-Dt,nn="right";break;default:un=Jt,nn="left"}const En=new ua({className:Qh,style:Object.assign(Object.assign(Object.assign(Object.assign({},z0),{wordWrapWidth:ge-5,x:un,y:St,textAlign:nn}),V),{text:x})}),Je=En.getBBox();return Z&&(Be=new ua({className:"subTitle",style:Object.assign(Object.assign(Object.assign(Object.assign({},j0),{wordWrapWidth:ge-5,x:un,y:Je.height+l+St,textAlign:nn}),nt),{text:Z})})),[En,Be]}}function V0(r){const t={top:"unset",right:"unset",bottom:"unset",left:"unset"};return r.split("-").forEach(n=>{t[n]="8px"}),t.flexDirection=r.startsWith("top")||r.startsWith("bottom")?"row":"column",t}const Y0=`
|
|
|
.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;
|
|
|
}
|
|
|
`,H0=`
|
|
|
<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 Bd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Au extends Oa{constructor(t,e){super(t,Object.assign({},Au.defaultOptions,e)),this.$element=Pl("toolbar",!1),this.onToolbarItemClick=i=>{const{onClick:a}=this.options;if(i.target instanceof Element&&i.target.className.includes("g6-toolbar-item")){const l=i.target.getAttribute("value");a==null||a(l,i.target)}};const n=this.context.canvas.getContainer();this.$element.style.display="flex",n.appendChild(this.$element),Wh("g6-toolbar-css","style",{},Y0,document.head),Wh("g6-toolbar-svgicon","div",{display:"none"},H0),this.$element.addEventListener("click",this.onToolbarItemClick),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return Bd(this,void 0,void 0,function*(){e.update.call(this,t);const{className:n,position:i,style:a}=this.options;this.$element.className=`g6-toolbar ${n||""}`,Object.assign(this.$element.style,a,V0(i)),this.$element.innerHTML=yield this.getDOMContent()})}destroy(){this.$element.removeEventListener("click",this.onToolbarItemClick),this.$element.remove(),super.destroy()}getDOMContent(){return Bd(this,void 0,void 0,function*(){return(yield this.options.getItems()).map(e=>{var n;return`
|
|
|
<div class="g6-toolbar-item" value="${e.value}" title="${(n=e.title)!==null&&n!==void 0?n:""}">
|
|
|
<svg aria-hidden="true" focusable="false">
|
|
|
<use xlink:href="#${e.id}"></use>
|
|
|
</svg>
|
|
|
</div>`}).join("")})}}Au.defaultOptions={position:"top-left"};var X0=y(75242),Fd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Ou extends Oa{constructor(t,e){super(t,Object.assign({},Ou.defaultOptions,e)),this.currentTarget=null,this.tooltipElement=null,this.container=null,this.isEnable=(n,i)=>{const{enable:a}=this.options;return typeof a=="function"?a(n,i):a},this.onClick=n=>{const{target:{id:i}}=n;this.currentTarget===i?this.hide(n):this.show(n)},this.onPointerMove=n=>{const{target:i}=n;!this.currentTarget||i.id===this.currentTarget||this.show(n)},this.onPointerLeave=n=>{this.hide(n)},this.onCanvasMove=n=>{this.hide(n)},this.onPointerOver=n=>{this.show(n)},this.showById=n=>Fd(this,void 0,void 0,function*(){const i={target:{id:n}};yield this.show(i)}),this.getElementData=(n,i)=>{const{model:a}=this.context;switch(i){case"node":return a.getNodeData([n]);case"edge":return a.getEdgeData([n]);case"combo":return a.getComboData([n]);default:return[]}},this.show=n=>Fd(this,void 0,void 0,function*(){var i,a;const{client:l,target:{id:u}}=n;if(Ra(n.target))return;const f=this.context.graph.getElementType(u),{getContent:m,title:x}=this.options,Z=this.getElementData(u,f);if(!this.tooltipElement||!this.isEnable(n,Z))return;let V={};if(m){if(V.content=yield m(n,Z),!V.content)return}else{const St=this.context.graph.getElementRenderStyle(u),Dt=f==="node"?St.fill:St.stroke;V={title:x||f,data:Z.map(Jt=>({name:"ID",value:Jt.id||`${Jt.source} -> ${Jt.target}`,color:Dt}))}}this.currentTarget=u;let nt,dt;if(l)nt=l.x,dt=l.y;else{const St=(0,xa.Z)(Z,"0.style",{x:0,y:0});nt=St.x,dt=St.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:nt,y:dt,style:{".tooltip":{visibility:"visible"}}}),V))}),this.hide=n=>{var i,a,l,u,f;if(!n){(a=(i=this.options).onOpenChange)===null||a===void 0||a.call(i,!1),(l=this.tooltipElement)===null||l===void 0||l.hide(),this.currentTarget=null;return}if(!this.tooltipElement||!this.currentTarget)return;const{client:{x:m,y:x}}=n;(f=(u=this.options).onOpenChange)===null||f===void 0||f.call(u,!1),this.tooltipElement.hide(m,x),this.currentTarget=null},this.initTooltip=()=>{var n;const i=new X0.u({className:"tooltip",style:this.tooltipStyleProps});return(n=this.container)===null||n===void 0||n.appendChild(i.HTMLTooltipElement),i},this.render(),this.bindEvents()}getEvents(){return this.options.trigger==="click"?{"node:click":this.onClick,"edge:click":this.onClick,"combo:click":this.onClick,"canvas:click":this.onPointerLeave,contextmenu:this.onPointerLeave,drag:this.onPointerLeave}:{"node:pointerover":this.onPointerOver,"node:pointermove":this.onPointerMove,"canvas:pointermove":this.onCanvasMove,"edge:pointerover":this.onPointerOver,"edge:pointermove":this.onPointerMove,"combo:pointerover":this.onPointerOver,"combo:pointermove":this.onPointerMove,contextmenu:this.onPointerLeave,"node:drag":this.onPointerLeave}}update(t){var e;this.unbindEvents(),super.update(t),this.tooltipElement&&((e=this.container)===null||e===void 0||e.removeChild(this.tooltipElement.HTMLTooltipElement)),this.tooltipElement=this.initTooltip(),this.bindEvents()}render(){const{canvas:t}=this.context,e=t.getContainer();e&&(this.container=e,this.tooltipElement=this.initTooltip())}unbindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.off(n,e[n])})}bindEvents(){const{graph:t}=this.context,e=this.getEvents();Object.keys(e).forEach(n=>{t.on(n,e[n])})}get tooltipStyleProps(){const{canvas:t}=this.context,{center:e}=t.getBounds(),n=t.getContainer(),{top:i,left:a}=n.getBoundingClientRect(),{style:l,position:u,enterable:f,container:m={x:-a,y:-i},title:x,offset:Z}=this.options,[V,nt]=e,[dt,St]=t.getSize();return{x:V,y:nt,container:m,title:x,bounding:{x:0,y:0,width:dt,height:St},position:u,enterable:f,offset:Z,style:l}}destroy(){var t;this.unbindEvents(),this.tooltipElement&&((t=this.container)===null||t===void 0||t.removeChild(this.tooltipElement.HTMLTooltipElement)),super.destroy()}}Ou.defaultOptions={trigger:"hover",position:"top-right",enterable:!1,enable:!0,offset:[10,10],style:{".tooltip":{visibility:"hidden"}}};var _d=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};let Rl;function Zd(r,t){return Rl||(Rl=document.createElement("canvas")),Rl.width=r,Rl.height=t,Rl.getContext("2d").clearRect(0,0,r,t),Rl}function K0(r,t,e,n){return _d(this,void 0,void 0,function*(){const i=Zd(r,t),a=i.getContext("2d"),{rotate:l,opacity:u,textFill:f,textFontSize:m,textFontFamily:x,textFontVariant:Z,textFontWeight:V,textAlign:nt,textBaseline:dt}=n;return a.textAlign=nt,a.textBaseline=dt,a.translate(r/2,t/2),a.font=`${m}px ${x} ${Z} ${V}`,l&&a.rotate(l),u&&(a.globalAlpha=u),f&&(a.fillStyle=f,a.fillText(`${e}`,0,0)),i.toDataURL()})}function Q0(r,t,e,n){return _d(this,void 0,void 0,function*(){const i=Zd(r,t),a=i.getContext("2d"),{rotate:l,opacity:u}=n;l&&a.rotate(l),u&&(a.globalAlpha=u);const f=new Image;return f.crossOrigin="anonymous",f.src=e,new Promise(m=>{f.onload=function(){const x=r>f.width?(r-f.width)/2:0,Z=t>f.height?(t-f.height)/2:0;a.drawImage(f,0,0,f.width,f.height,x,Z,r-x*2,t-Z*2),m(i.toDataURL())}})})}var J0=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},$0=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Tu extends Oa{constructor(t,e){super(t,Object.assign({},Tu.defaultOptions,e)),this.$element=Pl("watermark"),this.context.canvas.getContainer().appendChild(this.$element),this.update(e)}update(t){const e=Object.create(null,{update:{get:()=>super.update}});return J0(this,void 0,void 0,function*(){e.update.call(this,t);const n=this.options,{width:i,height:a,text:l,imageURL:u}=n,f=$0(n,["width","height","text","imageURL"]);Object.keys(f).forEach(x=>{x.startsWith("background")&&(this.$element.style[x]=t[x])});const m=u?yield Q0(i,a,u,f):yield K0(i,a,l,f);this.$element.style.backgroundImage=`url(${m})`})}destroy(){super.destroy(),this.$element.remove()}}Tu.defaultOptions={width:200,height:100,opacity:.2,rotate:Math.PI/12,text:"",textFill:"#000",textFontSize:16,textAlign:"center",textBaseline:"middle",backgroundRepeat:"repeat"};const q0=["#7E92B5","#F4664A","#FFBE3A"],tv={type:"group",color:["#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]},ev={type:"group",color:["#99ADD1","#1783FF","#00C9C9","#F08F56","#D580FF","#7863FF","#DB9D0D","#60C42D","#FF80CA","#2491B3","#17C76F"]};function zd(r){const{bgColor:t,textColor:e,nodeColor:n,nodeColorDisabled:i,nodeStroke:a,nodeHaloStrokeOpacityActive:l=.15,nodeHaloStrokeOpacitySelected:u=.25,nodeOpacityDisabled:f=.06,nodeIconOpacityInactive:m=.85,nodeOpacityInactive:x=.25,nodeBadgePalette:Z=q0,nodePaletteOptions:V=tv,edgeColor:nt,edgeColorDisabled:dt,edgePaletteOptions:St=ev,comboColor:Dt,comboColorDisabled:Jt,comboStroke:oe,comboStrokeDisabled:ge,edgeColorInactive:Be}=r;return{background:t,node:{palette:V,style:{donutOpacity:1,badgeBackgroundOpacity:1,badgeFill:"#fff",badgeFontSize:8,badgePadding:[0,4],badgePalette:Z,fill:n,fillOpacity:1,halo:!1,iconFill:"#fff",iconOpacity:1,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelFill:e,labelFillOpacity:.85,labelLineHeight:16,labelPadding:[0,2],labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelOffsetY:2,lineWidth:0,portFill:n,portLineWidth:1,portStroke:a,portStrokeOpacity:.65,size:32,stroke:a,strokeOpacity:1,zIndex:2},state:{selected:{halo:!0,haloLineWidth:24,haloStrokeOpacity:u,labelFontSize:12,labelFontWeight:"bold",lineWidth:4,stroke:a},active:{halo:!0,haloLineWidth:12,haloStrokeOpacity:l},highlight:{labelFontWeight:"bold",lineWidth:4,stroke:a,strokeOpacity:.85},inactive:{badgeBackgroundOpacity:x,donutOpacity:x,fillOpacity:x,iconOpacity:m,labelFill:e,labelFillOpacity:x,strokeOpacity:x},disabled:{badgeBackgroundOpacity:.25,donutOpacity:f,fill:i,fillOpacity:f,iconFill:i,iconOpacity:.25,labelFill:e,labelFillOpacity:.25,strokeOpacity:f}},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:St,style:{badgeBackgroundFill:nt,badgeFill:"#fff",badgeFontSize:8,badgeOffsetX:10,badgeBackgroundOpacity:1,fillOpacity:1,halo:!1,haloLineWidth:12,haloStrokeOpacity:1,increasedLineWidthForHitTesting:2,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[4,4,4,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,labelPlacement:"center",labelTextBaseline:"middle",lineWidth:1,stroke:nt,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:Be,fillOpacity:.08,labelOpacity:.25,strokeOpacity:.08,badgeBackgroundOpacity:.25},disabled:{stroke:dt,fillOpacity:.45,strokeOpacity:.45,labelOpacity:.25,badgeBackgroundOpacity:.45}},animation:{enter:"fade",exit:"fade",expand:"path-in",collapse:"path-out",show:"fade",hide:"fade",update:[{fields:["sourceNode","targetNode"]},{fields:["stroke"],shape:"key"}],translate:[{fields:["sourceNode","targetNode"]}]}},combo:{style:{collapsedMarkerFill:t,collapsedMarkerFontSize:12,collapsedMarkerFillOpacity:1,collapsedSize:32,collapsedFillOpacity:1,fill:Dt,halo:!1,haloLineWidth:12,haloStroke:oe,haloStrokeOpacity:.25,labelBackground:!1,labelBackgroundFill:t,labelBackgroundLineWidth:0,labelBackgroundOpacity:.75,labelBackgroundPadding:[2,4,2,4],labelFill:e,labelFontSize:12,labelFontWeight:400,labelOpacity:1,lineDash:0,lineWidth:1,fillOpacity:.04,strokeOpacity:1,padding:10,stroke:oe},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:Jt,fillOpacity:.25,labelOpacity:.25,stroke:ge,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 nv=zd({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"}),rv=zd({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 Io extends Nt{beforeDraw(t,e){return t}afterLayout(t,e){}}class iv extends Io{beforeDraw(t){const{model:e}=this.context,n=t.add.combos,i=a=>{const l=[];return a.forEach((u,f)=>{const x=e.getAncestorsData(f,"combo").map(Z=>me(Z)).reverse();l.push([f,u,x.length])}),new Map(l.sort(([,,u],[,,f])=>f-u).map(([u,f])=>[u,f]))};return t.add.combos=i(n),t.update.combos=i(t.update.combos),t}}function as(r,t,e,n,i){const a=me(n),l=`${e}s`,u=i?n:r.add[l].get(a)||r.update[l].get(a)||r.remove[l].get(a)||n;Object.entries(r).forEach(([f,m])=>{t===f?m[l].set(a,u):m[l].delete(a)})}function Cu(r,t){return Object.keys(r).every(e=>r[e]===t[e])}class av extends Io{beforeDraw(t,e){if(e.stage==="visibility"||!this.context.model.model.hasTreeStructure(Vt))return t;const{model:n}=this.context,{add:i,update:a}=t,l=[...t.update.combos.entries(),...t.add.combos.entries()];for(;l.length;){const[u,f]=l.pop();if(Ea(f)){const m=n.getDescendantsData(u),x=m.map(me),{internal:Z,external:V}=Jn(x,nt=>n.getRelatedEdgesData(nt));m.forEach(nt=>{const dt=me(nt),St=l.findIndex(([Jt])=>Jt===dt);St!==-1&&l.splice(St,1);const Dt=n.getElementType(dt);as(t,"remove",Dt,nt)}),Z.forEach(nt=>as(t,"remove","edge",nt)),V.forEach(nt=>{var dt;const St=me(nt);((dt=this.context.element)===null||dt===void 0?void 0:dt.getElement(St))?a.edges.set(St,nt):i.edges.set(St,nt)})}else{const m=n.getChildrenData(u),x=m.map(me),{edges:Z}=Jn(x,V=>n.getRelatedEdgesData(V));[...m,...Z].forEach(V=>{var nt;const dt=me(V),St=n.getElementType(dt);((nt=this.context.element)===null||nt===void 0?void 0:nt.getElement(dt))?as(t,"update",St,V):as(t,"add",St,V),St==="combo"&&l.push([dt,V])})}}return t}}const jd=(r,t,e,n)=>{const i=`${e}s`,a=me(n);!r.add[i].has(a)&&!r.update[i].has(a)&&r[t][i].set(me(n),n)};class sv extends Io{getElement(t){return this.context.element.getElement(t)}handleExpand(t,e){if(jd(e,"add","node",t),Ea(t))return;const n=me(t);jd(e,"add","node",t),this.context.model.getRelatedEdgesData(n).forEach(l=>{as(e,"add","edge",l)}),this.context.model.getChildrenData(n).forEach(l=>{this.handleExpand(l,e)})}beforeDraw(t){const{graph:e,model:n}=this.context;if(!n.model.hasTreeStructure(fe))return t;const{add:{nodes:i,edges:a},update:{nodes:l}}=t,u=new Map,f=new Map;i.forEach((x,Z)=>{Ea(x)&&u.set(Z,x)}),a.forEach(x=>{if(e.getElementType(x.source)!=="node")return;const Z=e.getNodeData(x.source);Ea(Z)&&u.set(x.source,Z)}),l.forEach((x,Z)=>{const V=this.getElement(Z);if(!V)return;const nt=V.attributes.collapsed;Ea(x)?nt||u.set(Z,x):nt&&f.set(Z,x)});const m=new Set;return u.forEach((x,Z)=>{n.getDescendantsData(Z).forEach(nt=>{const dt=me(nt);if(m.has(dt))return;as(t,"remove","node",nt),n.getRelatedEdgesData(dt).forEach(Dt=>{as(t,"remove","edge",Dt)}),m.add(dt)})}),f.forEach((x,Z)=>{if(n.getAncestorsData(Z,fe).some(Ea)){as(t,"remove","node",x);return}this.handleExpand(x,t)}),t}}const Jh=new WeakMap;function $v(r,t,e){Jh.has(r)||Jh.set(r,{});const n=Jh.get(r);if(!n[t])return n[t]=e,!0;const i=n[t];return Wd(i,e)?!1:(n[t]=e,!0)}const Wd=(r,t,e=2)=>{if(typeof r!="object"||typeof t!="object")return r===t;const n=Object.keys(r),i=Object.keys(t);if(n.length!==i.length)return!1;for(const a of n){const l=r[a],u=t[a];if(e>1&&typeof l=="object"&&typeof u=="object"){if(!Wd(l,u,e-1))return!1}else if(l!==u)return!1}return!0};function ov(r,t,e){Ce[r][t]&&Xe.warn(`The extension ${t} of ${r} has been registered before, and will be overridden.`),Object.assign(Ce[r],{[t]:e})}var lv=y(19584),cv=y(85580),Gd=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},Ud=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};const Vd=["main"],Yd=["background","main","label","transient"];function uv(r){return r.main}class Hd{getConfig(){return this.config}getLayer(t="main"){return this.extends.layers[t]||uv(this.getLayers())}getLayers(){return this.extends.layers}getRenderer(t){return this.extends.renderers[t]}getCamera(t="main"){return this.getLayer(t).getCamera()}getRoot(t="main"){return this.getLayer(t).getRoot()}getContextService(t="main"){return this.getLayer(t).getContextService()}setCursor(t){this.config.cursor=t,this.getLayer().setCursor(t)}get document(){return this.getLayer().document}get context(){return this.getLayer().context}constructor(t){this.config={enableMultiLayer:!0},Object.assign(this.config,t);const e=this.config,{renderer:n,background:i,cursor:a,enableMultiLayer:l}=e,u=Ud(e,["renderer","background","cursor","enableMultiLayer"]),f=l?Yd:Vd,m=Xd(n,f),x=Object.fromEntries(f.map(Z=>{const V=new _.Xz(Object.assign(Object.assign({},u),{supportsMutipleCanvasesInOneContainer:l,renderer:m[Z],background:l?Z==="background"?i:void 0:i}));return[Z,V]}));Kd(x),this.extends={config:this.config,renderer:n,renderers:m,layers:x}}get ready(){return Promise.all(Object.entries(this.getLayers()).map(([,t])=>t.ready))}resize(t,e){Object.assign(this.extends.config,{width:t,height:e}),Object.values(this.getLayers()).forEach(n=>{const i=n.getCamera(),a=i.getPosition(),l=i.getFocalPoint();n.resize(t,e),i.setPosition(a),i.setFocalPoint(l)})}getBounds(t){return qt(Object.values(this.getLayers()).map(e=>t?e.getRoot().childNodes.find(i=>i.classList.includes(t)):e.getRoot()).filter(e=>(e==null?void 0:e.childNodes.length)>0).map(e=>e.getBounds()))}getContainer(){const t=this.extends.config.container;return typeof t=="string"?document.getElementById(t):t}getSize(){return[this.extends.config.width||0,this.extends.config.height||0]}appendChild(t,e){var n;const i=((n=t.style)===null||n===void 0?void 0:n.$layer)||"main";return this.getLayer(i).appendChild(t,e)}setRenderer(t){if(t===this.extends.renderer)return;const e=Xd(t,this.config.enableMultiLayer?Yd:Vd);this.extends.renderers=e,Object.entries(e).forEach(([n,i])=>this.getLayer(n).setRenderer(i)),Kd(this.getLayers())}getCanvasByViewport(t){return Cn(this.getLayer().viewport2Canvas(Bn(t)))}getViewportByCanvas(t){return Cn(this.getLayer().canvas2Viewport(Bn(t)))}getViewportByClient(t){return Cn(this.getLayer().client2Viewport(Bn(t)))}getClientByViewport(t){return Cn(this.getLayer().viewport2Client(Bn(t)))}getClientByCanvas(t){return this.getClientByViewport(this.getViewportByCanvas(t))}getCanvasByClient(t){const e=this.getLayer(),n=e.client2Viewport(Bn(t));return Cn(e.viewport2Canvas(n))}toDataURL(){return Gd(this,arguments,void 0,function*(t={}){const e=globalThis.devicePixelRatio||1,{mode:n="viewport"}=t,i=Ud(t,["mode"]);let[a,l,u,f]=[0,0,0,0];if(n==="viewport")[u,f]=this.getSize();else if(n==="overall"){const Jt=this.getBounds(),oe=Ht(Jt);[a,l]=Jt.min,[u,f]=oe}const m=(0,cv.L)('<div id="virtual-image"></div>'),x=new _.Xz({width:u,height:f,renderer:new ii.Th,devicePixelRatio:e,container:m,background:this.extends.config.background});yield x.ready,x.appendChild(this.getLayer("background").getRoot().cloneNode(!0)),x.appendChild(this.getRoot().cloneNode(!0));const Z=this.getLayer("label").getRoot().cloneNode(!0),V=x.viewport2Canvas({x:0,y:0}),nt=this.getCanvasByViewport([0,0]);Z.translate([nt[0]-V.x,nt[1]-V.y]),Z.scale(1/this.getCamera().getZoom()),x.appendChild(Z),x.appendChild(this.getLayer("transient").getRoot().cloneNode(!0));const dt=this.getCamera(),St=x.getCamera();if(n==="viewport")St.setZoom(dt.getZoom()),St.setPosition(dt.getPosition()),St.setFocalPoint(dt.getFocalPoint());else if(n==="overall"){const[Jt,oe,ge]=St.getPosition(),[Be,un,nn]=St.getFocalPoint();St.setPosition([Jt+a,oe+l,ge]),St.setFocalPoint([Be+a,un+l,nn])}const Dt=x.getContextService();return new Promise(Jt=>{x.addEventListener(_.$6.RERENDER,()=>Gd(this,void 0,void 0,function*(){yield new Promise(ge=>setTimeout(ge,300));const oe=yield Dt.toDataURL(i);Jt(oe)}))})})}destroy(){Object.values(this.getLayers()).forEach(t=>{t.getCamera().cancelLandmarkAnimation(),t.destroy()})}}function Xd(r,t){return Object.fromEntries(t.map(e=>{const n=(r==null?void 0:r(e))||new ii.Th;return n instanceof ii.Th&&n.setConfig({enableDirtyRectangleRendering:!1}),e==="main"?n.registerPlugin(new lv.S({isDocumentDraggable:!0,isDocumentDroppable:!0,dragstartDistanceThreshold:10,dragstartTimeThreshold:100})):n.unregisterPlugin(n.getPlugin("dom-interaction")),[e,n]}))}function Kd(r){Object.entries(r).forEach(([t,e])=>{const n=e.getContextService().getDomElement();n!=null&&n.style&&(n.style.gridArea="1 / 1 / 2 / 2",n.style.outline="none",n.tabIndex=1,t!=="main"&&(n.style.pointerEvents="none")),n!=null&&n.parentElement&&(n.parentElement.style.display="grid",n.parentElement.style.isolation="isolate")})}const Ll=r=>r?parseInt(r):0;function hv(r){const t=getComputedStyle(r),e=r.clientWidth||Ll(t.width),n=r.clientHeight||Ll(t.height),i=Ll(t.paddingLeft)+Ll(t.paddingRight),a=Ll(t.paddingTop)+Ll(t.paddingBottom);return[e-i,n-a]}function Qd(r){if(!r)return[0,0];let t=640,e=480;const[n,i]=hv(r);t=n||t,e=i||e;const a=1,l=1;return[Math.max((0,sn.Z)(t)?t:a,a),Math.max((0,sn.Z)(e)?e:l,l)]}class Nu{constructor(t){this.type=t}}class aa extends Nu{constructor(t,e){super(t),this.data=e}}class bs extends Nu{constructor(t,e,n,i){super(t),this.animationType=e,this.animation=n,this.data=i}}class Dl extends Nu{constructor(t,e,n){super(t),this.elementType=e,this.data=n}}class Pu extends Nu{constructor(t,e){super(t),this.data=e}}function ya(r,t){r.emit(t.type,t)}function dv(r){if(!r)return null;if(r instanceof _.BB)return{type:"canvas",element:r};let t=r;for(;t;){if(rr(t))return{type:"node",element:t};if(mr(t))return{type:"edge",element:t};if(Dr(t))return{type:"combo",element:t};t=t.parentElement}return null}function Jd(r){var t;return((t=r==null?void 0:r.style)===null||t===void 0?void 0:t.zIndex)||0}const Il="cachedStyle",ku=r=>`__${r}__`;function fv(r,t){const e=Array.isArray(t)?t:[t];(0,xa.Z)(r,Il)||(0,Xs.Z)(r,Il,{}),e.forEach(n=>{(0,Xs.Z)((0,xa.Z)(r,Il),ku(n),r.attributes[n])})}function $d(r,t){return(0,xa.Z)(r,[Il,ku(t)])}function vv(r,t){return ku(t)in((0,xa.Z)(r,Il)||{})}function qv(r,t,e){set(r,[Il,ku(t)],e)}class gv{constructor(t){this.tasks=[],this.animations=new Set,this.context=t}getTasks(){const t=[...this.tasks];return this.tasks=[],t}add(t,e){this.tasks.push([t,e])}animate(t,e,n){var i,a,l;(i=e==null?void 0:e.before)===null||i===void 0||i.call(e);const u=this.getTasks().map(([m,x])=>{var Z,V,nt;const{element:dt,elementType:St,stage:Dt}=m,Jt=cn(this.context.options,St,Dt,t);(Z=x==null?void 0:x.before)===null||Z===void 0||Z.call(x);const oe=Jt.length?Ke(dt,this.inferStyle(m,n),Jt):null;return oe?((V=x==null?void 0:x.beforeAnimate)===null||V===void 0||V.call(x,oe),oe.finished.then(()=>{var ge,Be;(ge=x==null?void 0:x.afterAnimate)===null||ge===void 0||ge.call(x,oe),(Be=x==null?void 0:x.after)===null||Be===void 0||Be.call(x),this.animations.delete(oe)})):(nt=x==null?void 0:x.after)===null||nt===void 0||nt.call(x),oe}).filter(Boolean);u.forEach(m=>this.animations.add(m));const f=Tn(u);return f?((a=e==null?void 0:e.beforeAnimate)===null||a===void 0||a.call(e,f),f.finished.then(()=>{var m,x;(m=e==null?void 0:e.afterAnimate)===null||m===void 0||m.call(e,f),(x=e==null?void 0:e.after)===null||x===void 0||x.call(e),this.release()})):(l=e==null?void 0:e.after)===null||l===void 0||l.call(e),f}inferStyle(t,e){var n,i;const{element:a,elementType:l,stage:u,originalStyle:f,updatedStyle:m={}}=t;t.modifiedStyle||(t.modifiedStyle=Object.assign(Object.assign({},f),m));const{modifiedStyle:x}=t,Z={},V={};if(u==="enter")Object.assign(Z,{opacity:0});else if(u==="exit")Object.assign(V,{opacity:0});else if(u==="show")Object.assign(Z,{opacity:0}),Object.assign(V,{opacity:(n=$d(a,"opacity"))!==null&&n!==void 0?n:mn("opacity")});else if(u==="hide")Object.assign(Z,{opacity:(i=$d(a,"opacity"))!==null&&i!==void 0?i:mn("opacity")}),Object.assign(V,{opacity:0});else if(u==="collapse"){const{collapse:nt}=e||{},{target:dt,descendants:St,position:Dt}=nt;if(l==="node"){if(St.includes(a.id)){const[Jt,oe,ge]=Dt;Object.assign(V,{x:Jt,y:oe,z:ge})}}else if(l==="combo"){if(a.id===dt||St.includes(a.id)){const[Jt,oe]=Dt;Object.assign(V,{x:Jt,y:oe,childrenNode:f.childrenNode})}}else l==="edge"&&Object.assign(V,{sourceNode:x.sourceNode,targetNode:x.targetNode})}else if(u==="expand"){const{expand:nt}=e||{},{target:dt,descendants:St,position:Dt}=nt;if(l==="node"){if(a.id===dt||St.includes(a.id)){const[Jt,oe,ge]=Dt;Object.assign(Z,{x:Jt,y:oe,z:ge})}}else if(l==="combo"){if(a.id===dt||St.includes(a.id)){const[Jt,oe,ge]=Dt;Object.assign(Z,{x:Jt,y:oe,z:ge,childrenNode:x.childrenNode})}}else l==="edge"&&Object.assign(Z,{sourceNode:x.sourceNode,targetNode:x.targetNode})}return[Object.keys(Z).length>0?Object.assign({},f,Z):f,Object.keys(V).length>0?Object.assign({},x,V):x]}stop(){this.animations.forEach(t=>t.cancel())}clear(){this.tasks=[]}release(){var t,e;const{canvas:n}=this.context,i=(e=(t=n.document)===null||t===void 0?void 0:t.timeline)===null||e===void 0?void 0:e.animationsWithPromises;i&&(n.document.timeline.animationsWithPromises=i.filter(a=>a.playState!=="finished"))}destroy(){this.stop(),this.animations.clear(),this.tasks=[]}}class pv{constructor(t){this.batchCount=0,this.context=t}emit(t){const{graph:e}=this.context;e.emit(t.type,t)}startBatch(t=!0){this.batchCount++,this.batchCount===1&&this.emit(new aa(J.BATCH_START,{initiate:t}))}endBatch(){this.batchCount--,this.batchCount===0&&this.emit(new aa(J.BATCH_END))}get isBatching(){return this.batchCount>0}destroy(){this.context=null}}class mv extends Ti{constructor(t){super(t),this.currentTarget=null,this.currentTargetType=null,this.category="behavior",this.forwardCanvasEvents=e=>{const{target:n}=e,i=dv(n);if(!i)return;const{graph:a,canvas:l}=this.context,{type:u,element:f}=i;if("destroyed"in f&&(Ra(f)||f.destroyed))return;const{type:m,detail:x,button:Z}=e,V=Object.assign(Object.assign({},e),{target:f,targetType:u,originalTarget:n});m===G.POINTER_MOVE&&(this.currentTarget!==f&&(this.currentTarget&&a.emit(`${this.currentTargetType}:${G.POINTER_LEAVE}`,Object.assign(Object.assign({},V),{type:G.POINTER_LEAVE,target:this.currentTarget,targetType:this.currentTargetType})),f&&(Object.assign(V,{type:G.POINTER_ENTER}),a.emit(`${u}:${G.POINTER_ENTER}`,V))),this.currentTarget=f,this.currentTargetType=u),m===G.CLICK&&Z===2||(a.emit(`${u}:${m}`,V),a.emit(m,V)),m===G.CLICK&&x===2&&(Object.assign(V,{type:G.DBLCLICK}),a.emit(`${u}:${G.DBLCLICK}`,V),a.emit(G.DBLCLICK,V)),m===G.POINTER_DOWN&&Z===2&&(Object.assign(V,{type:G.CONTEXT_MENU,preventDefault:()=>{var nt;(nt=l.getContainer())===null||nt===void 0||nt.addEventListener(G.CONTEXT_MENU,dt=>dt.preventDefault(),{once:!0})}}),a.emit(`${u}:${G.CONTEXT_MENU}`,V),a.emit(G.CONTEXT_MENU,V))},this.forwardContainerEvents=e=>{this.context.graph.emit(e.type,e)},this.forwardEvents(),this.setBehaviors(this.context.options.behaviors||[])}setBehaviors(t){this.setExtensions(t)}forwardEvents(){const t=this.context.canvas.getContainer();t&&[kt.KEY_DOWN,kt.KEY_UP].forEach(n=>{t.addEventListener(n,this.forwardContainerEvents)});const e=this.context.canvas.document;e&&[G.CLICK,G.DBLCLICK,G.POINTER_OVER,G.POINTER_LEAVE,G.POINTER_ENTER,G.POINTER_MOVE,G.POINTER_OUT,G.POINTER_DOWN,G.POINTER_UP,G.CONTEXT_MENU,G.DRAG_START,G.DRAG,G.DRAG_END,G.DRAG_ENTER,G.DRAG_OVER,G.DRAG_LEAVE,G.DROP,G.WHEEL].forEach(n=>{e.addEventListener(n,this.forwardCanvasEvents)})}destroy(){const t=this.context.canvas.getContainer();t&&[kt.KEY_DOWN,kt.KEY_UP].forEach(e=>{t.removeEventListener(e,this.forwardContainerEvents)}),this.context.canvas.document.removeAllEventListeners(),super.destroy()}}var yv=y(35300),hc=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Bo(r,t){const{data:e,style:n}=r,i=hc(r,["data","style"]),{data:a,style:l}=t,u=hc(t,["data","style"]),f=Object.assign(Object.assign({},i),u);return(e||a)&&Object.assign(f,{data:Object.assign(Object.assign({},e),a)}),(n||l)&&Object.assign(f,{style:Object.assign(Object.assign({},n),l)}),f}function $h(r){const{data:t,style:e}=r,i=hc(r,["data","style"]);return t&&(i.data=Object.assign({},t)),e&&(i.style=Object.assign({},e)),i}function tg(r){return!get(r,["nodes","length"])&&!get(r,["edges","length"])&&!get(r,["combos","length"])}function Bl(r={},t={}){const{states:e=[],data:n={},style:i={},children:a=[]}=r,l=hc(r,["states","data","style","children"]),{states:u=[],data:f={},style:m={},children:x=[]}=t,Z=hc(t,["states","data","style","children"]),V=(dt,St)=>dt.length!==St.length?!1:dt.every((Dt,Jt)=>Dt===St[Jt]),nt=(dt,St)=>{const Dt=Object.keys(dt),Jt=Object.keys(St);return Dt.length!==Jt.length?!1:Dt.every(oe=>dt[oe]===St[oe])};return!(!nt(l,Z)||!V(a,x)||!V(e,u)||!nt(n,f)||!nt(i,m))}var bv=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function qh(r){const{id:t=me(r),style:e,data:n}=r,i=bv(r,["id","style","data"]),a=Object.assign(Object.assign({},r),{style:Object.assign({},e),data:Object.assign({},n)});return O(r)?Object.assign({id:t,data:a},i):{id:t,data:a}}function Ta(r){return r.data}function Ev(r){if(r.hasTreeStructure(fe))return;r.attachTreeStructure(fe);const t=r.getAllEdges();for(const e of t){const{source:n,target:i}=e;r.setParent(i,n,fe)}}class xv{constructor(){this.latestRemovedComboIds=new Set,this.comboIds=new Set,this.changes=[],this.batchCount=0,this.isTraceless=!1,this.enableUpdateNodeLikeHierarchy=!0,this.model=new Qr.k}pushChange(t){if(this.isTraceless)return;const{type:e}=t;if(e===A.NodeUpdated||e===A.EdgeUpdated||e===A.ComboUpdated){const{value:n,original:i}=t;this.changes.push({value:$h(n),original:$h(i),type:e})}else this.changes.push({value:$h(t.value),type:e})}getChanges(){return this.changes}clearChanges(){this.changes=[]}batch(t){this.batchCount++,this.model.batch(t),this.batchCount--}isBatching(){return this.batchCount>0}silence(t){this.isTraceless=!0,t(),this.isTraceless=!1}isCombo(t){return this.comboIds.has(t)||this.latestRemovedComboIds.has(t)}getData(){return{nodes:this.getNodeData(),edges:this.getEdgeData(),combos:this.getComboData()}}getNodeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ta(n);return this.isCombo(me(i))||(t===void 0||t.includes(me(i)))&&e.push(i),e},[])}getEdgeDatum(t){return Ta(this.model.getEdge(t))}getEdgeData(t){return this.model.getAllEdges().reduce((e,n)=>{const i=Ta(n);return(t===void 0||t.includes(me(i)))&&e.push(i),e},[])}getComboData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ta(n);return this.isCombo(me(i))&&(t===void 0||t.includes(me(i)))&&e.push(i),e},[])}getRootsData(t=fe){return this.model.getRoots(t).map(Ta)}getAncestorsData(t,e){const{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getAncestors(t,e).map(Ta)}getDescendantsData(t){const e=this.getElementDataById(t),n=[];return Na(e,i=>{i!==e&&n.push(i)},i=>this.getChildrenData(me(i)),"TB"),n}getParentData(t,e){const{model:n}=this;if(!e){Xe.warn("The hierarchy structure key is not specified");return}if(!n.hasNode(t)||!n.hasTreeStructure(e))return;const i=n.getParent(t,e);return i?Ta(i):void 0}getChildrenData(t){const e=this.getElementType(t)==="node"?fe:Vt,{model:n}=this;return!n.hasNode(t)||!n.hasTreeStructure(e)?[]:n.getChildren(t,e).map(Ta)}getElementsDataByType(t){return t==="node"?this.getNodeData():t==="edge"?this.getEdgeData():t==="combo"?this.getComboData():[]}getElementDataById(t){return this.getElementType(t)==="edge"?this.getEdgeDatum(t):this.getNodeLikeDatum(t)}getNodeLikeDatum(t){const e=this.model.getNode(t);return Ta(e)}getNodeLikeData(t){return this.model.getAllNodes().reduce((e,n)=>{const i=Ta(n);return t?t.includes(me(i))&&e.push(i):e.push(i),e},[])}getElementDataByState(t,e){return this.getElementsDataByType(t).filter(i=>{var a;return(a=i.states)===null||a===void 0?void 0:a.includes(e)})}getElementState(t){var e;return((e=this.getElementDataById(t))===null||e===void 0?void 0:e.states)||[]}hasNode(t){return this.model.hasNode(t)&&!this.isCombo(t)}hasEdge(t){return this.model.hasEdge(t)}hasCombo(t){return this.model.hasNode(t)&&this.isCombo(t)}getRelatedEdgesData(t,e="both"){return this.model.getRelatedEdges(t,e).map(Ta)}getNeighborNodesData(t){return this.model.getNeighbors(t).map(Ta)}setData(t){const{nodes:e=[],edges:n=[],combos:i=[]}=t,{nodes:a,edges:l,combos:u}=this.getData(),f=Oi(a,e,Z=>me(Z),Bl),m=Oi(l,n,Z=>me(Z),Bl),x=Oi(u,i,Z=>me(Z),Bl);this.batch(()=>{const Z={nodes:f.enter,edges:m.enter,combos:x.enter};this.addData(Z),this.computeZIndex(Z,"add",!0);const V={nodes:f.update,edges:m.update,combos:x.update};this.updateData(V),this.computeZIndex(V,"update",!0);const nt={nodes:f.exit.map(me),edges:m.exit.map(me),combos:x.exit.map(me)};this.removeData(nt)})}addData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.addComboData(i),this.addNodeData(e),this.addEdgeData(n)}),this.computeZIndex(t,"add")}addNodeData(t=[]){t.length&&(this.model.addNodes(t.map(e=>(this.pushChange({value:e,type:A.NodeAdded}),qh(e)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({nodes:t},"add"))}addEdgeData(t=[]){t.length&&(this.model.addEdges(t.map(e=>(this.pushChange({value:e,type:A.EdgeAdded}),qh(e)))),this.computeZIndex({edges:t},"add"))}addComboData(t=[]){if(!t.length)return;const{model:e}=this;e.hasTreeStructure(Vt)||e.attachTreeStructure(Vt),e.addNodes(t.map(n=>(this.comboIds.add(me(n)),this.pushChange({value:n,type:A.ComboAdded}),qh(n)))),this.updateNodeLikeHierarchy(t),this.computeZIndex({combos:t},"add")}addChildrenData(t,e){const n=this.getNodeLikeDatum(t),i=e.map(me);this.addNodeData(e),this.updateNodeData([{id:t,children:[...n.children||[],...i]}]),this.addEdgeData(i.map(a=>({source:t,target:a})))}computeZIndex(t,e,n=!1){!n&&this.isBatching()||this.batch(()=>{const{nodes:i=[],edges:a=[],combos:l=[]}=t;l.forEach(u=>{var f,m,x;const Z=me(u);if(e==="add"&&(0,sn.Z)((f=u.style)===null||f===void 0?void 0:f.zIndex)||e==="update"&&!("combo"in u))return;const V=this.getParentData(Z,Vt),nt=V?((x=(m=V.style)===null||m===void 0?void 0:m.zIndex)!==null&&x!==void 0?x:0)+1:0;this.preventUpdateNodeLikeHierarchy(()=>{this.updateComboData([{id:Z,style:{zIndex:nt}}])})}),i.forEach(u=>{var f,m,x;const Z=me(u);if(e==="add"&&(0,sn.Z)((f=u.style)===null||f===void 0?void 0:f.zIndex)||e==="update"&&!("combo"in u)&&!("children"in u))return;let V=0;const nt=this.getParentData(Z,Vt);if(nt)V=(((m=nt.style)===null||m===void 0?void 0:m.zIndex)||0)+1;else{const dt=this.getParentData(Z,fe);dt&&(V=((x=dt==null?void 0:dt.style)===null||x===void 0?void 0:x.zIndex)||0)}this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:Z,style:{zIndex:V}}])})}),a.forEach(u=>{var f,m,x,Z,V;if((0,sn.Z)((f=u.style)===null||f===void 0?void 0:f.zIndex))return;let{id:nt,source:dt,target:St}=u;if(!nt)nt=me(u);else{const oe=this.getEdgeDatum(nt);dt=oe.source,St=oe.target}if(!dt||!St)return;const Dt=((x=(m=this.getNodeLikeDatum(dt))===null||m===void 0?void 0:m.style)===null||x===void 0?void 0:x.zIndex)||0,Jt=((V=(Z=this.getNodeLikeDatum(St))===null||Z===void 0?void 0:Z.style)===null||V===void 0?void 0:V.zIndex)||0;this.updateEdgeData([{id:me(u),style:{zIndex:Math.max(Dt,Jt)-1}}])})})}getFrontZIndex(t){var e;const n=this.getElementType(t),i=this.getElementDataById(t),a=this.getData();if(Object.assign(a,{[`${n}s`]:a[`${n}s`].filter(l=>me(l)!==t)}),n==="combo"&&!Ea(i)){const l=new Set(this.getAncestorsData(t,Vt).map(me));a.nodes=a.nodes.filter(u=>!l.has(me(u))),a.combos=a.combos.filter(u=>!l.has(me(u))),a.edges=a.edges.filter(({source:u,target:f})=>!l.has(u)&&!l.has(f))}return Math.max(((e=i.style)===null||e===void 0?void 0:e.zIndex)||0,0,...Object.values(a).flat().map(l=>{var u;return(((u=l==null?void 0:l.style)===null||u===void 0?void 0:u.zIndex)||0)+1}))}updateNodeLikeHierarchy(t){if(!this.enableUpdateNodeLikeHierarchy)return;const{model:e}=this;t.forEach(n=>{const i=me(n),a=pr(n);a!==void 0&&(e.hasTreeStructure(Vt)||e.attachTreeStructure(Vt),a===null&&this.refreshComboData(i),this.setParent(i,pr(n),Vt));const l=n.children||[];if(l.length){e.hasTreeStructure(fe)||e.attachTreeStructure(fe);const u=l.filter(f=>e.hasNode(f));u.forEach(f=>this.setParent(f,i,fe)),u.length!==l.length&&this.updateNodeData([{id:i,children:u}])}})}preventUpdateNodeLikeHierarchy(t){this.enableUpdateNodeLikeHierarchy=!1,t(),this.enableUpdateNodeLikeHierarchy=!0}updateData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.updateNodeData(e),this.updateComboData(i),this.updateEdgeData(n)}),this.computeZIndex(t,"update")}updateNodeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{const n=[];t.forEach(i=>{const a=me(i),l=Ta(e.getNode(a));if(Bl(l,i))return;const u=Bo(l,i);this.pushChange({value:u,original:l,type:A.NodeUpdated}),e.mergeNodeData(a,u),n.push(u)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({nodes:t},"update")}refreshData(){const{nodes:t,edges:e,combos:n}=this.getData();t.forEach(i=>{this.pushChange({value:i,original:i,type:A.NodeUpdated})}),e.forEach(i=>{this.pushChange({value:i,original:i,type:A.EdgeUpdated})}),n.forEach(i=>{this.pushChange({value:i,original:i,type:A.ComboUpdated})})}syncNodeLikeDatum(t){const{model:e}=this,n=me(t);if(!e.hasNode(n))return;const i=Ta(e.getNode(n)),a=Bo(i,t);e.mergeNodeData(n,a)}syncEdgeDatum(t){const{model:e}=this,n=me(t);if(!e.hasEdge(n))return;const i=Ta(e.getEdge(n)),a=Bo(i,t);e.mergeEdgeData(n,a)}updateEdgeData(t=[]){if(!t.length)return;const{model:e}=this;this.batch(()=>{t.forEach(n=>{const i=me(n),a=Ta(e.getEdge(i));if(Bl(a,n))return;n.source&&a.source!==n.source&&e.updateEdgeSource(i,n.source),n.target&&a.target!==n.target&&e.updateEdgeTarget(i,n.target);const l=Bo(a,n);this.pushChange({value:l,original:a,type:A.EdgeUpdated}),e.mergeEdgeData(i,l)})}),this.computeZIndex({edges:t},"update")}updateComboData(t=[]){if(!t.length)return;const{model:e}=this;e.batch(()=>{const n=[];t.forEach(i=>{const a=me(i),l=Ta(e.getNode(a));if(Bl(l,i))return;const u=Bo(l,i);this.pushChange({value:u,original:l,type:A.ComboUpdated}),e.mergeNodeData(a,u),n.push(u)}),this.updateNodeLikeHierarchy(n)}),this.computeZIndex({combos:t},"update")}setParent(t,e,n,i=!0){if(t===e)return;const a=this.getNodeLikeDatum(t),l=pr(a);if(l!==e&&n===Vt){const u={id:t,combo:e};this.isCombo(t)?this.syncNodeLikeDatum(u):this.syncNodeLikeDatum(u)}this.model.setParent(t,e,n),i&&n===Vt&&(0,yv.Z)([l,e]).forEach(u=>{u!==void 0&&this.refreshComboData(u)})}refreshComboData(t){const e=this.getComboData([t])[0],n=this.getAncestorsData(t,Vt);e&&this.pushChange({value:e,original:e,type:A.ComboUpdated}),n.forEach(i=>{this.pushChange({value:i,original:i,type:A.ComboUpdated})})}getElementPosition(t){const e=this.getElementDataById(t);return Wt(e)}translateNodeLikeBy(t,e){this.isCombo(t)?this.translateComboBy(t,e):this.translateNodeBy(t,e)}translateNodeLikeTo(t,e){this.isCombo(t)?this.translateComboTo(t,e):this.translateNodeTo(t,e)}translateNodeBy(t,e){const n=this.getElementPosition(t),i=w(n,[...e,0].slice(0,3));this.translateNodeTo(t,i)}translateNodeTo(t,e){const[n=0,i=0,a=0]=e;this.preventUpdateNodeLikeHierarchy(()=>{this.updateNodeData([{id:t,style:{x:n,y:i,z:a}}])})}translateComboBy(t,e){const[n=0,i=0,a=0]=e;if([n,i,a].some(isNaN)||[n,i,a].every(f=>f===0))return;const l=this.getComboData([t])[0];if(!l)return;const u=new Set;Na(l,f=>{const m=me(f);if(u.has(m))return;u.add(m);const[x,Z,V]=Wt(f),nt=Bo(f,{style:{x:x+n,y:Z+i,z:V+a}});this.pushChange({value:nt,original:f,type:this.isCombo(m)?A.ComboUpdated:A.NodeUpdated}),this.model.mergeNodeData(m,nt)},f=>this.getChildrenData(me(f)),"BT")}translateComboTo(t,e){var n;if(e.some(isNaN))return;const[i=0,a=0,l=0]=e,u=(n=this.getComboData([t]))===null||n===void 0?void 0:n[0];if(!u)return;const[f,m,x]=Wt(u),Z=i-f,V=a-m,nt=l-x;Na(u,dt=>{const St=me(dt),[Dt,Jt,oe]=Wt(dt),ge=Bo(dt,{style:{x:Dt+Z,y:Jt+V,z:oe+nt}});this.pushChange({value:ge,original:dt,type:this.isCombo(St)?A.ComboUpdated:A.NodeUpdated}),this.model.mergeNodeData(St,ge)},dt=>this.getChildrenData(me(dt)),"BT")}removeData(t){const{nodes:e,edges:n,combos:i}=t;this.batch(()=>{this.removeEdgeData(n),this.removeNodeData(e),this.removeComboData(i),this.latestRemovedComboIds=new Set(i)})}removeNodeData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.removeEdgeData(this.getRelatedEdgesData(e).map(me)),this.pushChange({value:this.getNodeData([e])[0],type:A.NodeRemoved}),this.removeNodeLikeHierarchy(e)}),this.model.removeNodes(t)})}removeEdgeData(t=[]){t.length&&(t.forEach(e=>this.pushChange({value:this.getEdgeData([e])[0],type:A.EdgeRemoved})),this.model.removeEdges(t))}removeComboData(t=[]){t.length&&this.batch(()=>{t.forEach(e=>{this.pushChange({value:this.getComboData([e])[0],type:A.ComboRemoved}),this.removeNodeLikeHierarchy(e),this.comboIds.delete(e)}),this.model.removeNodes(t)})}removeNodeLikeHierarchy(t){if(this.model.hasTreeStructure(Vt)){const e=pr(this.getNodeLikeDatum(t));this.setParent(t,void 0,Vt,!1),this.model.getChildren(t,Vt).forEach(n=>{const i=Ta(n),a=me(i);this.setParent(me(i),e,Vt,!1);const l=Bo(i,{id:me(i),combo:e});this.pushChange({value:l,original:i,type:this.isCombo(a)?A.ComboUpdated:A.NodeUpdated}),this.model.mergeNodeData(me(i),l)}),(0,z.Z)(e)||this.refreshComboData(e)}}getElementType(t){if(this.model.hasNode(t))return this.isCombo(t)?"combo":"node";if(this.model.hasEdge(t))return"edge";throw new Error(rn(`Unknown element type of id: ${t}`))}destroy(){const{model:t}=this,e=t.getAllNodes(),n=t.getAllEdges();t.removeEdges(n.map(i=>i.id)),t.removeNodes(e.map(i=>i.id)),this.context={}}}var dc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class wv{constructor(t){this.elementMap={},this.shapeTypeMap={},this.paletteStyle={},this.defaultStyle={},this.stateStyle={},this.visibilityCache=new WeakMap,this.context=t}init(){this.initContainer()}initContainer(){if(!this.container||this.container.destroyed){const{canvas:t}=this.context;this.container=t.appendChild(new _.ZA({className:"elements"}))}}emit(t,e){e.silence||ya(this.context.graph,t)}forEachElementData(t){La.forEach(e=>{const n=this.context.model.getElementsDataByType(e);t(e,n)})}getElementType(t,e){var n;const{options:i,graph:a}=this.context,l=((n=i[t])===null||n===void 0?void 0:n.type)||e.type;return l?typeof l=="string"?l:l.call(a,e):t==="edge"?"line":"circle"}getTheme(t){return pn(this.context.options)[t]||{}}getThemeStyle(t){return this.getTheme(t).style||{}}getThemeStateStyle(t,e){const{state:n={}}=this.getTheme(t);return Object.assign({},...e.map(i=>n[i]||{}))}computePaletteStyle(){const{options:t}=this.context;this.paletteStyle={},this.forEachElementData((e,n)=>{var i,a;const l=Object.assign({},go((i=this.getTheme(e))===null||i===void 0?void 0:i.palette),go((a=t[e])===null||a===void 0?void 0:a.palette));l!=null&&l.field&&Object.assign(this.paletteStyle,Os(n,l))})}getPaletteStyle(t,e){const n=this.paletteStyle[e];return n?t==="edge"?{stroke:n}:{fill:n}:{}}computeElementDefaultStyle(t,e){var n;const{options:i}=this.context,a=((n=i[t])===null||n===void 0?void 0:n.style)||{};"transform"in a&&Array.isArray(a.transform)&&(a.transform=[...a.transform]),this.defaultStyle[me(e.datum)]=Bs(a,e)}computeElementsDefaultStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let l=0;l<a;l++){const u=i[l];(t===void 0||t.includes(me(u)))&&this.computeElementDefaultStyle(n,{datum:u,graph:e})}})}getDefaultStyle(t){return this.defaultStyle[t]||{}}getElementState(t){try{const{model:e}=this.context;return e.getElementState(t)}catch(e){return[]}}getElementStateStyle(t,e,n){var i,a;const{options:l}=this.context,u=((a=(i=l[t])===null||i===void 0?void 0:i.state)===null||a===void 0?void 0:a[e])||{};return Bs(u,n)}computeElementStatesStyle(t,e,n){this.stateStyle[me(n.datum)]=Object.assign({},...e.map(i=>this.getElementStateStyle(t,i,n)))}computeElementsStatesStyle(t){const{graph:e}=this.context;this.forEachElementData((n,i)=>{const a=i.length;for(let l=0;l<a;l++){const u=i[l];if(t===void 0||t.includes(me(u))){const f=this.getElementState(me(u));this.computeElementStatesStyle(n,f,{datum:u,graph:e})}}})}getStateStyle(t){return this.stateStyle[t]||{}}computeStyle(t,e){t&&["translate","zIndex"].includes(t)||(this.computePaletteStyle(),this.computeElementsDefaultStyle(e),this.computeElementsStatesStyle(e))}getElement(t){return this.elementMap[t]}getNodes(){return this.context.model.getNodeData().map(({id:t})=>this.elementMap[t])}getEdges(){return this.context.model.getEdgeData().map(t=>this.elementMap[me(t)])}getCombos(){return this.context.model.getComboData().map(({id:t})=>this.elementMap[t])}getElementComputedStyle(t,e){const n=me(e),i=this.getThemeStyle(t),a=this.getPaletteStyle(t,n),l=e.style||{},u=this.getDefaultStyle(n),f=this.getThemeStateStyle(t,this.getElementState(n)),m=this.getStateStyle(n),x=Object.assign({},i,a,l,u,f,m);if(t==="combo"){const Z=this.context.model.getChildrenData(n),nt=!!x.collapsed?[]:Z.map(me).filter(dt=>this.getElement(dt));Object.assign(x,{childrenNode:nt,childrenData:Z})}return x}getDrawData(t){this.init();const e=this.computeChangesAndDrawData(t);if(!e)return null;const{type:n="draw",stage:i=n}=t;return this.markDestroyElement(e.drawData),this.computeStyle(i),{type:n,stage:i,data:e}}draw(t={animation:!0}){const e=this.getDrawData(t);if(!e)return;const{data:{drawData:{add:n,update:i,remove:a}}}=e;return this.destroyElements(a,t),this.createElements(n,t),this.updateElements(i,t),this.setAnimationTask(t,e)}preLayoutDraw(){return dc(this,arguments,void 0,function*(t={animation:!0}){var e,n;const i=this.getDrawData(t);if(!i)return;const{data:{drawData:a}}=i;yield(n=(e=this.context.layout)===null||e===void 0?void 0:e.preLayout)===null||n===void 0?void 0:n.call(e,a);const{add:l,update:u,remove:f}=a;return this.destroyElements(f,t),this.createElements(l,t),this.updateElements(u,t),this.setAnimationTask(t,i)})}setAnimationTask(t,e){const{animation:n,silence:i}=t,{data:{dataChanges:a,drawData:l},stage:u,type:f}=e;return this.context.animation.animate(n,i?{}:{before:()=>this.emit(new aa(J.BEFORE_DRAW,{dataChanges:a,animation:n,stage:u,render:f==="render"}),t),beforeAnimate:m=>this.emit(new bs(J.BEFORE_ANIMATE,L.DRAW,m,l),t),afterAnimate:m=>this.emit(new bs(J.AFTER_ANIMATE,L.DRAW,m,l),t),after:()=>this.emit(new aa(J.AFTER_DRAW,{dataChanges:a,animation:n,stage:u,render:f==="render",firstRender:this.context.graph.rendered===!1}),t)})}computeChangesAndDrawData(t){const{model:e}=this.context,n=e.getChanges(),i=Vh(n);if(i.length===0)return null;const{NodeAdded:a=[],NodeUpdated:l=[],NodeRemoved:u=[],EdgeAdded:f=[],EdgeUpdated:m=[],EdgeRemoved:x=[],ComboAdded:Z=[],ComboUpdated:V=[],ComboRemoved:nt=[]}=(0,Ft.Z)(i,Jt=>Jt.type),dt=Jt=>new Map(Jt.map(oe=>{const ge=oe.value;return[me(ge),ge]})),St={add:{nodes:dt(a),edges:dt(f),combos:dt(Z)},update:{nodes:dt(l),edges:dt(m),combos:dt(V)},remove:{nodes:dt(u),edges:dt(x),combos:dt(nt)}},Dt=this.transformData(St,t);return e.clearChanges(),{dataChanges:n,drawData:Dt}}transformData(t,e){const n=this.context.transform.getTransformInstance();return Object.values(n).reduce((i,a)=>a.beforeDraw(i,e),t)}createElement(t,e,n){var i;const a=me(e);if(this.getElement(a))return;const u=this.getElementType(t,e),f=this.getElementComputedStyle(t,e),m=be(t,u);if(!m)return Xe.warn(`The element ${u} of ${t} is not registered.`);this.emit(new Dl(J.BEFORE_ELEMENT_CREATE,t,e),n);const x=this.container.appendChild(new m({id:a,context:this.context,style:f}));this.shapeTypeMap[a]=u,this.elementMap[a]=x;const{stage:Z="enter"}=n;(i=this.context.animation)===null||i===void 0||i.add({element:x,elementType:t,stage:Z,originalStyle:Object.assign({},x.attributes),updatedStyle:f},{after:()=>{var V;this.emit(new Dl(J.AFTER_ELEMENT_CREATE,t,e),n),(V=x.onCreate)===null||V===void 0||V.call(x)}})}createElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([u,f])=>{f.forEach(m=>this.createElement(u,m,e))})}getUpdateStageStyle(t,e,n){const{stage:i="update"}=n;if(i==="translate")if(t==="node"||t==="combo"){const{style:{x:a=0,y:l=0,z:u=0}={}}=e;return{x:a,y:l,z:u}}else return{};return this.getElementComputedStyle(t,e)}updateElement(t,e,n){var i;const a=me(e),{stage:l="update"}=n,u=this.getElement(a);if(!u)return()=>null;this.emit(new Dl(J.BEFORE_ELEMENT_UPDATE,t,e),n);const f=this.getElementType(t,e),m=this.getUpdateStageStyle(t,e,n);this.shapeTypeMap[a]!==f&&(u.destroy(),delete this.shapeTypeMap[a],delete this.elementMap[a],this.createElement(t,e,{animation:!1,silence:!0}));const x=l!=="visibility"?l:m.visibility==="hidden"?"hide":"show";x==="hide"&&delete m.visibility,(i=this.context.animation)===null||i===void 0||i.add({element:u,elementType:t,stage:x,originalStyle:Object.assign({},u.attributes),updatedStyle:m},{before:()=>{const Z=this.elementMap[a];l!=="collapse"&&Xa(Z,m),l==="visibility"&&(vv(Z,"opacity")||fv(Z,"opacity"),this.visibilityCache.set(Z,x==="show"?"visible":"hidden"),x==="show"&&Zr(Z,"visible"))},after:()=>{var Z;const V=this.elementMap[a];l==="collapse"&&Xa(V,m),x==="hide"&&Zr(V,this.visibilityCache.get(V)),this.emit(new Dl(J.AFTER_ELEMENT_UPDATE,t,e),n),(Z=V.onUpdate)===null||Z===void 0||Z.call(V)}})}updateElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["node",n],["combo",a],["edge",i]].forEach(([u,f])=>{f.forEach(m=>this.updateElement(u,m,e))})}markDestroyElement(t){Object.values(t.remove).forEach(e=>{e.forEach(n=>{const i=me(n),a=this.getElement(i);a&&Ga(a)})})}destroyElement(t,e,n){var i;const{stage:a="exit"}=n,l=me(e),u=this.elementMap[l];if(!u)return()=>null;this.emit(new Dl(J.BEFORE_ELEMENT_DESTROY,t,e),n),(i=this.context.animation)===null||i===void 0||i.add({element:u,elementType:t,stage:a,originalStyle:Object.assign({},u.attributes),updatedStyle:{}},{after:()=>{var f;this.clearElement(l),u.destroy(),(f=u.onDestroy)===null||f===void 0||f.call(u),this.emit(new Dl(J.AFTER_ELEMENT_DESTROY,t,e),n)}})}destroyElements(t,e){const{nodes:n,edges:i,combos:a}=t;[["combo",a],["edge",i],["node",n]].forEach(([u,f])=>{f.forEach(m=>this.destroyElement(u,m,e))})}clearElement(t){delete this.paletteStyle[t],delete this.defaultStyle[t],delete this.stateStyle[t],delete this.elementMap[t],delete this.shapeTypeMap[t]}alignLayoutResultToElement(t,e){var n,i;const a=(n=t.nodes)===null||n===void 0?void 0:n.find(l=>me(l)===e);if(a){const l=Wt(this.context.model.getNodeLikeDatum(e)),u=Wt(a),f=Y(l,u);(i=t.nodes)===null||i===void 0||i.forEach(m=>{var x,Z,V;!((x=m.style)===null||x===void 0)&&x.x&&(m.style.x+=f[0]),!((Z=m.style)===null||Z===void 0)&&Z.y&&(m.style.y+=f[1]),!((V=m.style)===null||V===void 0)&&V.z&&(m.style.z+=f[2]||0)})}}collapseNode(t,e){return dc(this,void 0,void 0,function*(){var n;const{animation:i}=e,{model:a}=this.context,l=this.computeChangesAndDrawData({stage:"collapse",animation:i});if(!l)return;const{drawData:u}=l,{add:f,remove:m,update:x}=u;this.markDestroyElement(u);const Z={animation:i,stage:"collapse",data:u};this.destroyElements(m,Z),this.createElements(f,Z),this.updateElements(x,Z),yield(n=this.context.animation.animate(i,{beforeAnimate:V=>this.emit(new bs(J.BEFORE_ANIMATE,L.COLLAPSE,V,u),Z),afterAnimate:V=>this.emit(new bs(J.AFTER_ANIMATE,L.COLLAPSE,V,u),Z)},{collapse:{target:t,descendants:Array.from(m.nodes).map(([,V])=>me(V)),position:Wt(x.nodes.get(t))}}))===null||n===void 0?void 0:n.finished})}expandNode(t,e){return dc(this,void 0,void 0,function*(){var n;const{model:i,layout:a}=this.context,{animation:l,align:u}=e,f=Wt(i.getNodeData([t])[0]),m=this.computeChangesAndDrawData({stage:"expand",animation:l});if(this.createElements(m.drawData.add,{animation:!1,stage:"expand",target:t}),this.context.animation.clear(),this.computeStyle("expand"),!m)return;const{drawData:x}=m,{update:Z,add:V}=x,nt={animation:l,stage:"expand",data:x};V.edges.forEach(dt=>Z.edges.set(me(dt),dt)),V.nodes.forEach(dt=>Z.nodes.set(me(dt),dt)),this.updateElements(Z,nt),yield(n=this.context.animation.animate(l,{beforeAnimate:dt=>this.emit(new bs(J.BEFORE_ANIMATE,L.EXPAND,dt,x),nt),afterAnimate:dt=>this.emit(new bs(J.AFTER_ANIMATE,L.EXPAND,dt,x),nt)},{expand:{target:t,descendants:Array.from(V.nodes).map(([,dt])=>me(dt)),position:f}}))===null||n===void 0?void 0:n.finished})}collapseCombo(t,e){return dc(this,void 0,void 0,function*(){var n;const{model:i,element:a}=this.context;if(i.getAncestorsData(t,Vt).some(St=>Ea(St)))return;const l=a.getElement(t),u=l.getComboPosition(Object.assign(Object.assign({},l.attributes),{collapsed:!0})),f=this.computeChangesAndDrawData({stage:"collapse",animation:e});if(!f)return;const{dataChanges:m,drawData:x}=f;this.markDestroyElement(x);const{update:Z,remove:V}=x,nt={animation:e,stage:"collapse",data:x};this.destroyElements(V,nt),this.updateElements(Z,nt);const dt=St=>Array.from(St).map(([,Dt])=>me(Dt));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new aa(J.BEFORE_DRAW,{dataChanges:m,animation:e}),nt),beforeAnimate:St=>this.emit(new bs(J.BEFORE_ANIMATE,L.COLLAPSE,St,x),nt),afterAnimate:St=>this.emit(new bs(J.AFTER_ANIMATE,L.COLLAPSE,St,x),nt),after:()=>this.emit(new aa(J.AFTER_DRAW,{dataChanges:m,animation:e}),nt)},{collapse:{target:t,descendants:[...dt(V.nodes),...dt(V.combos)],position:u}}))===null||n===void 0?void 0:n.finished})}expandCombo(t,e){return dc(this,void 0,void 0,function*(){var n;const{model:i}=this.context,a=Wt(i.getComboData([t])[0]);this.computeStyle("expand");const l=this.computeChangesAndDrawData({stage:"expand",animation:e});if(!l)return;const{dataChanges:u,drawData:f}=l,{add:m,update:x}=f,Z={animation:e,stage:"expand",data:f,target:t};this.createElements(m,Z),this.updateElements(x,Z);const V=nt=>Array.from(nt).map(([,dt])=>me(dt));yield(n=this.context.animation.animate(e,{before:()=>this.emit(new aa(J.BEFORE_DRAW,{dataChanges:u,animation:e}),Z),beforeAnimate:nt=>this.emit(new bs(J.BEFORE_ANIMATE,L.EXPAND,nt,f),Z),afterAnimate:nt=>this.emit(new bs(J.AFTER_ANIMATE,L.EXPAND,nt,f),Z),after:()=>this.emit(new aa(J.AFTER_DRAW,{dataChanges:u,animation:e}),Z)},{expand:{target:t,descendants:[...V(m.nodes),...V(m.combos)],position:a}}))===null||n===void 0?void 0:n.finished})}clear(){this.container.destroy(),this.initContainer(),this.elementMap={},this.shapeTypeMap={},this.defaultStyle={},this.stateStyle={},this.paletteStyle={}}destroy(){this.clear(),this.container.destroy(),this.context={}}}var qd=y(96262);class Mv extends Uh.Z{constructor(t,e,n){super(),this.graph=t,this.layout=e,this.options=n,this.spawnWorker()}spawnWorker(){this.proxy=qd.Ud(new Worker(new URL(y.p+y.u(8954),y.b),{type:void 0})),this.running&&(this.running=!1,this.execute())}execute(){var t;return(0,qr.mG)(this,void 0,void 0,function*(){if(this.running)return this;this.running=!0;const e=this.layout.options,{onTick:n}=e,i=(0,qr._T)(e,["onTick"]),a={};Object.keys(i).forEach(m=>{(0,xe.Z)(i[m])||(a[m]=i[m])});const l={layout:{id:this.layout.id,options:a,iterations:(t=this.options)===null||t===void 0?void 0:t.iterations},nodes:this.graph.getAllNodes(),edges:this.graph.getAllEdges()},u=new Float32Array([0]),[f]=yield this.proxy.calculateLayout(l,[u]);return f})}stop(){return this.running=!1,this.proxy.stopLayout(),this}kill(){this.proxy[qd.Yy]()}isRunning(){return this.running}}var Fl=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})},Sv=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};class Av{get presetOptions(){return{animation:!!It(this.context.options,!0)}}get options(){const{options:t}=this.context;return t.layout}constructor(t){this.instances=[],this.context=t}getLayoutInstance(){return this.instances}preLayout(t){return Fl(this,void 0,void 0,function*(){var e,n,i,a;const{graph:l,model:u}=this.context,{add:f}=t;ya(l,new aa(J.BEFORE_LAYOUT,{type:"pre"}));const m=yield(e=this.context.layout)===null||e===void 0?void 0:e.simulate();(n=m==null?void 0:m.nodes)===null||n===void 0||n.forEach(x=>{const Z=me(x),V=f.nodes.get(Z);u.syncNodeLikeDatum(x),V&&Object.assign(V.style,x.style)}),(i=m==null?void 0:m.edges)===null||i===void 0||i.forEach(x=>{const Z=me(x),V=f.edges.get(Z);u.syncEdgeDatum(x),V&&Object.assign(V.style,x.style)}),(a=m==null?void 0:m.combos)===null||a===void 0||a.forEach(x=>{const Z=me(x),V=f.combos.get(Z);u.syncNodeLikeDatum(x),V&&Object.assign(V.style,x.style)}),ya(l,new aa(J.AFTER_LAYOUT,{type:"pre"})),this.transformDataAfterLayout("pre",t)})}postLayout(){return Fl(this,arguments,void 0,function*(t=this.options){if(!t)return;const e=Array.isArray(t)?t:[t],{graph:n}=this.context;ya(n,new aa(J.BEFORE_LAYOUT,{type:"post"}));for(let i=0;i<e.length;i++){const a=e[i],l=this.getLayoutData(a),u=Object.assign(Object.assign({},this.presetOptions),a);ya(n,new aa(J.BEFORE_STAGE_LAYOUT,{options:u,index:i}));const f=yield this.stepLayout(l,u,i);ya(n,new aa(J.AFTER_STAGE_LAYOUT,{options:u,index:i})),a.animation||this.updateElementPosition(f,!1)}ya(n,new aa(J.AFTER_LAYOUT,{type:"post"})),this.transformDataAfterLayout("post")})}transformDataAfterLayout(t,e){const n=this.context.transform.getTransformInstance();Object.values(n).forEach(i=>i.afterLayout(t,e))}simulate(){return Fl(this,void 0,void 0,function*(){if(!this.options)return{};const t=Array.isArray(this.options)?this.options:[this.options];let e={};for(let n=0;n<t.length;n++){const i=t[n],a=this.getLayoutData(i);e=yield this.stepLayout(a,Object.assign(Object.assign(Object.assign({},this.presetOptions),i),{animation:!1}),n)}return e})}stepLayout(t,e,n){return Fl(this,void 0,void 0,function*(){return rl(e)?yield this.treeLayout(t,e,n):yield this.graphLayout(t,e,n)})}graphLayout(t,e,n){return Fl(this,void 0,void 0,function*(){const{animation:i,enableWorker:a,iterations:l=300}=e,u=this.initGraphLayout(e);if(!u)return{};if(this.instances[n]=u,this.instance=u,a){const m=u;return this.supervisor=new Mv(m.graphData2LayoutModel(t),m.instance,{iterations:l}),Ys(yield this.supervisor.execute())}if(Ol(u))return i?yield u.execute(t,{onTick:m=>{this.updateElementPosition(m,!1)}}):(u.execute(t),u.stop(),u.tick(l));const f=yield u.execute(t);if(i){const m=this.updateElementPosition(f,i);yield m==null?void 0:m.finished}return f})}treeLayout(t,e,n){return Fl(this,void 0,void 0,function*(){const{type:i,animation:a}=e,l=be("layout",i);if(!l)return{};const{nodes:u=[],edges:f=[]}=t,m=new Qr.k({nodes:u.map(dt=>({id:me(dt),data:dt.data||{}})),edges:f.map(dt=>({id:me(dt),source:dt.source,target:dt.target,data:dt.data||{}}))});Ev(m);const x={nodes:[],edges:[]},Z={nodes:[],edges:[]};m.getRoots(fe).forEach(dt=>{Na(dt,ge=>{ge.children=m.getSuccessors(ge.id)},ge=>m.getSuccessors(ge.id),"TB");const St=l(dt,e),{x:Dt,y:Jt,z:oe=0}=St;Na(St,ge=>{const{id:Be,x:un,y:nn,z:En=0}=ge;x.nodes.push({id:Be,style:{x:Dt,y:Jt,z:oe}}),Z.nodes.push({id:Be,style:{x:un,y:nn,z:En}})},ge=>ge.children,"TB")});const nt=this.inferTreeLayoutOffset(Z);if(tf(Z,nt),a){tf(x,nt),this.updateElementPosition(x,!1);const dt=this.updateElementPosition(Z,a);yield dt==null?void 0:dt.finished}return Z})}inferTreeLayoutOffset(t){var e;let[n,i]=[1/0,-1/0],[a,l]=[1/0,-1/0];(e=t.nodes)===null||e===void 0||e.forEach(St=>{const{x:Dt=0,y:Jt=0}=St.style||{};n=Math.min(n,Dt),i=Math.max(i,Dt),a=Math.min(a,Jt),l=Math.max(l,Jt)});const{canvas:u}=this.context,f=u.getSize(),[m,x]=u.getCanvasByViewport([0,0]),[Z,V]=u.getCanvasByViewport(f);if(n>=m&&i<=Z&&a>=x&&l<=V)return[0,0];const nt=(m+Z)/2,dt=(x+V)/2;return[nt-(n+i)/2,dt-(a+l)/2]}stopLayout(){this.instance&&Ol(this.instance)&&(this.instance.stop(),this.instance=void 0),this.supervisor&&(this.supervisor.stop(),this.supervisor=void 0),this.animationResult&&(this.animationResult.finish(),this.animationResult=void 0)}getLayoutData(t){const{nodeFilter:e=()=>!0,comboFilter:n=()=>!0,preLayout:i=!1,isLayoutInvisibleNodes:a=!1}=t,{nodes:l,edges:u,combos:f}=this.context.model.getData(),{element:m,model:x}=this.context,Z=Jt=>m.getElement(Jt),V=i?Jt=>{var oe;return!a&&(((oe=Jt.style)===null||oe===void 0?void 0:oe.visibility)==="hidden"||x.getAncestorsData(Jt.id,fe).some(Ea)||x.getAncestorsData(Jt.id,Vt).some(Ea))?!1:e(Jt)}:Jt=>{const oe=me(Jt),ge=Z(oe);return!ge||Ra(ge)?!1:e(Jt)},nt=l.filter(V),dt=f.filter(n),St=new Map(nt.map(Jt=>[me(Jt),Jt]));dt.forEach(Jt=>St.set(me(Jt),Jt));const Dt=u.filter(({source:Jt,target:oe})=>St.has(Jt)&&St.has(oe));return{nodes:nt,edges:Dt,combos:dt}}initGraphLayout(t){var e;const{element:n,viewport:i}=this.context,{type:a,enableWorker:l,animation:u,iterations:f}=t,m=Sv(t,["type","enableWorker","animation","iterations"]),[x,Z]=i.getCanvasSize(),V=[x/2,Z/2],nt=(e=t==null?void 0:t.nodeSize)!==null&&e!==void 0?e:oe=>{const ge=n==null?void 0:n.getElement(oe.id);return ge?ge.attributes.size:n==null?void 0:n.getElementComputedStyle("node",oe).size},dt=be("layout",a);if(!dt)return Xe.warn(`The layout of ${a} is not registered.`);const St=Object.getPrototypeOf(dt.prototype)===pa.prototype?dt:Go(dt,this.context),Dt=new St(this.context),Jt={nodeSize:nt,width:x,height:Z,center:V};switch(Dt.id){case"d3-force":case"d3-force-3d":Object.assign(Jt,{center:{x:x/2,y:Z/2,z:0}});break;default:break}return(0,h.Z)(Dt.options,Jt,m),Dt}updateElementPosition(t,e){const{model:n,element:i}=this.context;return i?(n.updateData(t),i.draw({animation:e,silence:!0})):null}destroy(){var t;this.stopLayout(),this.context={},(t=this.supervisor)===null||t===void 0||t.kill(),this.supervisor=void 0,this.instance=void 0,this.instances=[],this.animationResult=void 0}}const tf=(r,t)=>{var e;const[n,i]=t;(e=r.nodes)===null||e===void 0||e.forEach(a=>{if(a.style){const{x:l=0,y:u=0}=a.style;a.style.x=l+n,a.style.y=u+i}else a.style={x:n,y:i}})};function Ov(r){return[Tv].reduce((e,n)=>n(e),r)}function Tv(r){return!r.layout||Array.isArray(r.layout)||"preLayout"in r.layout||["antv-dagre","combo-combined","compact-box","circular","concentric","dagre","fishbone","grid","indented","mds","radial","random","snake","dendrogram","mindmap"].includes(r.layout.type)&&(r.layout.preLayout=!0),r}class Cv extends Ti{constructor(t){super(t),this.category="plugin",this.setPlugins(this.context.options.plugins||[])}setPlugins(t){this.setExtensions(t)}getPluginInstance(t){const e=this.extensionMap[t];if(e)return e;Xe.warn(`Cannot find the plugin ${t}, will try to find it by type.`);const n=this.extensions.find(i=>i.type===t);if(n)return this.extensionMap[n.key]}}const Ru=["update-related-edges","collapse-expand-node","collapse-expand-combo","get-edge-actual-ends","arrange-draw-order"];class Nv extends Ti{constructor(t){super(t),this.category="transform",this.setTransforms(this.context.options.transforms||[])}getTransforms(){}setTransforms(t){this.setExtensions([...Ru.slice(0,Ru.length-1),...t,Ru[Ru.length-1]])}getTransformInstance(t){return t?this.extensionMap[t]:this.extensionMap}}var fc=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Pv{get padding(){return Ne(this.context.options.padding)}get paddingOffset(){const[t,e,n,i]=this.padding,[a,l,u]=[(i-e)/2,(t-n)/2,0];return[a,l,u]}constructor(t){this.landmarkCounter=0,this.context=t;const[e,n]=this.paddingOffset,{zoom:i,rotation:a,x:l=e,y:u=n}=t.options;this.transform({mode:"absolute",scale:i,translate:[l,u],rotate:a},!1)}get camera(){const{canvas:t}=this.context;return new Proxy(t.getCamera(),{get:(e,n)=>{const a=Object.entries(t.getLayers()).filter(([u])=>!["main"].includes(u)).map(([,u])=>u.getCamera()),l=e[n];if(typeof l=="function")return(...u)=>{const f=l.apply(e,u);return a.forEach(m=>{m[n].apply(m,u)}),f}}})}createLandmark(t){return this.camera.createLandmark(`landmark-${this.landmarkCounter++}`,t)}getAnimation(t){const e=It(this.context.options,t);return e?(0,da.Z)(Object.assign({},e),["easing","duration"]):!1}getCanvasSize(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e,n]}getCanvasCenter(){const{canvas:t}=this.context,{width:e=0,height:n=0}=t.getConfig();return[e/2,n/2,0]}getViewportCenter(){const[t,e]=this.camera.getPosition();return[t,e,0]}getGraphCenter(){return this.context.graph.getViewportByCanvas(this.getCanvasCenter())}getZoom(){return this.camera.getZoom()}getRotation(){return this.camera.getRoll()}getTranslateOptions(t){const{camera:e}=this,{mode:n,translate:i=[]}=t,a=this.getZoom(),l=e.getPosition(),u=e.getFocalPoint(),[f,m]=this.getCanvasCenter(),[x=0,Z=0,V=0]=i,nt=it([-x,-Z,-V],a);return n==="relative"?{position:w(l,nt),focalPoint:w(u,nt)}:{position:w([f,m,l[2]],nt),focalPoint:w([f,m,u[2]],nt)}}getRotateOptions(t){const{mode:e,rotate:n=0}=t;return{roll:e==="relative"?this.camera.getRoll()+n:n}}getZoomOptions(t){const{zoomRange:e}=this.context.options,n=this.camera.getZoom(),{mode:i,scale:a=1}=t;return(0,pc.Z)(i==="relative"?n*a:a,...e)}transform(t,e){return fc(this,void 0,void 0,function*(){const{graph:n}=this.context,{translate:i,rotate:a,scale:l,origin:u}=t;this.cancelAnimation();const f=this.getAnimation(e);if(ya(n,new Pu(J.BEFORE_TRANSFORM,t)),!a&&l&&!i&&u&&!f){this.camera.setZoomByViewportPoint(this.getZoomOptions(t),u),ya(n,new Pu(J.AFTER_TRANSFORM,t));return}const m={};if(i&&Object.assign(m,this.getTranslateOptions(t)),(0,sn.Z)(a)&&Object.assign(m,this.getRotateOptions(t)),(0,sn.Z)(l)&&Object.assign(m,{zoom:this.getZoomOptions(t)}),f)return ya(n,new bs(J.BEFORE_ANIMATE,L.TRANSFORM,null,t)),new Promise(x=>{this.transformResolver=x,this.camera.gotoLandmark(this.createLandmark(m),Object.assign(Object.assign({},f),{onfinish:()=>{ya(n,new bs(J.AFTER_ANIMATE,L.TRANSFORM,null,t)),ya(n,new Pu(J.AFTER_TRANSFORM,t)),this.transformResolver=void 0,x()}}))});this.camera.gotoLandmark(this.createLandmark(m),{duration:0}),ya(n,new Pu(J.AFTER_TRANSFORM,t))})}fitView(t,e){return fc(this,void 0,void 0,function*(){const[n,i,a,l]=this.padding,{when:u="always",direction:f="both"}=t||{},[m,x]=this.context.canvas.getSize(),Z=m-l-i,V=x-n-a,nt=this.context.canvas.getBounds(),dt=this.getBBoxInViewport(nt),[St,Dt]=Ht(dt),Jt=f==="x"&&St>=Z||f==="y"&&Dt>=V||f==="both"&&St>=Z&&Dt>=V;if(u==="overflow"&&!Jt)return yield this.fitCenter({animation:e});const oe=Z/St,ge=V/Dt,Be=f==="x"?oe:f==="y"?ge:Math.min(oe,ge),un=this.getAnimation(e);Number.isFinite(Be)&&(yield this.transform({mode:"relative",scale:Be,translate:w(Y(this.getCanvasCenter(),this.getBBoxInViewport(nt).center),it(this.paddingOffset,Be))},un))})}fitCenter(t){return fc(this,void 0,void 0,function*(){const e=this.context.canvas.getBounds();yield this.focus(e,t)})}focusElements(t){return fc(this,arguments,void 0,function*(e,n={}){const{element:i}=this.context;if(!i)return;const a=u=>n.shapes?u.getShape(n.shapes).getRenderBounds():u.getRenderBounds(),l=qt(e.map(u=>a(i.getElement(u))));yield this.focus(l,n)})}focus(t,e){return fc(this,void 0,void 0,function*(){const n=this.context.graph.getViewportByCanvas(t.center),i=e.position||this.getCanvasCenter(),a=Y(i,n);yield this.transform({mode:"relative",translate:w(a,this.paddingOffset)},e.animation)})}getBBoxInViewport(t){const{min:e,max:n}=t,{graph:i}=this.context,[a,l]=i.getViewportByCanvas(e),[u,f]=i.getViewportByCanvas(n),m=new _.mN;return m.setMinMax([a,l,0],[u,f,0]),m}isInViewport(t,e=!1,n=0){const{graph:i}=this.context,a=this.getCanvasSize(),[l,u]=i.getCanvasByViewport([0,0]),[f,m]=i.getCanvasByViewport(a);let x=new _.mN;return x.setMinMax([l,u,0],[f,m,0]),n&&(x=Ut(x,n)),$t(t)?te(t,x):e?se(t,x):x.intersects(t)}cancelAnimation(){var t,e;!((t=this.camera.landmarks)===null||t===void 0)&&t.length&&this.camera.cancelLandmarkAnimation(),(e=this.transformResolver)===null||e===void 0||e.call(this)}}var Di=function(r,t,e,n){function i(a){return a instanceof e?a:new e(function(l){l(a)})}return new(e||(e=Promise))(function(a,l){function u(x){try{m(n.next(x))}catch(Z){l(Z)}}function f(x){try{m(n.throw(x))}catch(Z){l(Z)}}function m(x){x.done?a(x.value):i(x.value).then(u,f)}m((n=n.apply(r,t||[])).next())})};class Lu extends Uh.Z{constructor(t){var e;super(),this.options={},this.rendered=!1,this.destroyed=!1,this.context={model:new xv},this.isCollapsingExpanding=!1,this.onResize=(0,Oo.Z)(()=>{this.resize()},300),this._setOptions(Object.assign({},Lu.defaultOptions,t),!0),this.context.graph=this,this.options.autoResize&&((e=globalThis.addEventListener)===null||e===void 0||e.call(globalThis,"resize",this.onResize))}getOptions(){return this.options}setOptions(t){this._setOptions(t,!1)}_setOptions(t,e){if(this.updateCanvas(t),Object.assign(this.options,Ov(t)),e){const{data:V}=t;V&&this.addData(V);return}const{behaviors:n,combo:i,data:a,edge:l,layout:u,node:f,plugins:m,theme:x,transforms:Z}=t;n&&this.setBehaviors(n),a&&this.setData(a),f&&this.setNode(f),l&&this.setEdge(l),i&&this.setCombo(i),u&&this.setLayout(u),x&&this.setTheme(x),m&&this.setPlugins(m),Z&&this.setTransforms(Z)}getSize(){return this.context.canvas?this.context.canvas.getSize():[this.options.width||0,this.options.height||0]}setSize(t,e){t&&(this.options.width=t),e&&(this.options.height=e),this.resize(t,e)}setZoomRange(t){this.options.zoomRange=t}getZoomRange(){return this.options.zoomRange}setNode(t){this.options.node=t,this.context.model.refreshData()}setEdge(t){this.options.edge=t,this.context.model.refreshData()}setCombo(t){this.options.combo=t,this.context.model.refreshData()}getTheme(){return this.options.theme}setTheme(t){this.options.theme=(0,xe.Z)(t)?t(this.getTheme()):t}setLayout(t){this.options.layout=(0,xe.Z)(t)?t(this.getLayout()):t}getLayout(){return this.options.layout}setBehaviors(t){var e;this.options.behaviors=(0,xe.Z)(t)?t(this.getBehaviors()):t,(e=this.context.behavior)===null||e===void 0||e.setBehaviors(this.options.behaviors)}updateBehavior(t){this.setBehaviors(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getBehaviors(){return this.options.behaviors||[]}setPlugins(t){var e;this.options.plugins=(0,xe.Z)(t)?t(this.getPlugins()):t,(e=this.context.plugin)===null||e===void 0||e.setPlugins(this.options.plugins)}updatePlugin(t){this.setPlugins(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n))}getPlugins(){return this.options.plugins||[]}getPluginInstance(t){return this.context.plugin.getPluginInstance(t)}setTransforms(t){var e;this.options.transforms=(0,xe.Z)(t)?t(this.getTransforms()):t,(e=this.context.transform)===null||e===void 0||e.setTransforms(this.options.transforms)}updateTransform(t){this.setTransforms(e=>e.map(n=>typeof n=="object"&&n.key===t.key?Object.assign(Object.assign({},n),t):n)),this.context.model.refreshData()}getTransforms(){return this.options.transforms||[]}getData(){return this.context.model.getData()}hasNode(t){return this.context.model.hasNode(t)}hasEdge(t){return this.context.model.hasEdge(t)}hasCombo(t){return this.context.model.hasCombo(t)}getElementData(t){return Array.isArray(t)?t.map(e=>this.context.model.getElementDataById(e)):this.context.model.getElementDataById(t)}getNodeData(t){return t===void 0?this.context.model.getNodeData():Array.isArray(t)?this.context.model.getNodeData(t):this.context.model.getNodeLikeDatum(t)}getEdgeData(t){return t===void 0?this.context.model.getEdgeData():Array.isArray(t)?this.context.model.getEdgeData(t):this.context.model.getEdgeDatum(t)}getComboData(t){return t===void 0?this.context.model.getComboData():Array.isArray(t)?this.context.model.getComboData(t):this.context.model.getNodeLikeDatum(t)}setData(t){this.context.model.setData((0,xe.Z)(t)?t(this.getData()):t)}addData(t){this.context.model.addData((0,xe.Z)(t)?t(this.getData()):t)}addNodeData(t){this.context.model.addNodeData((0,xe.Z)(t)?t(this.getNodeData()):t)}addEdgeData(t){this.context.model.addEdgeData((0,xe.Z)(t)?t(this.getEdgeData()):t)}addComboData(t){this.context.model.addComboData((0,xe.Z)(t)?t(this.getComboData()):t)}addChildrenData(t,e){this.context.model.addChildrenData(t,e)}updateData(t){this.context.model.updateData((0,xe.Z)(t)?t(this.getData()):t)}updateNodeData(t){this.context.model.updateNodeData((0,xe.Z)(t)?t(this.getNodeData()):t)}updateEdgeData(t){this.context.model.updateEdgeData((0,xe.Z)(t)?t(this.getEdgeData()):t)}updateComboData(t){this.context.model.updateComboData((0,xe.Z)(t)?t(this.getComboData()):t)}removeData(t){this.context.model.removeData((0,xe.Z)(t)?t(this.getData()):t)}removeNodeData(t){this.context.model.removeNodeData((0,xe.Z)(t)?t(this.getNodeData()):t)}removeEdgeData(t){this.context.model.removeEdgeData((0,xe.Z)(t)?t(this.getEdgeData()):t)}removeComboData(t){this.context.model.removeComboData((0,xe.Z)(t)?t(this.getComboData()):t)}getElementType(t){return this.context.model.getElementType(t)}getRelatedEdgesData(t,e="both"){return this.context.model.getRelatedEdgesData(t,e)}getNeighborNodesData(t){return this.context.model.getNeighborNodesData(t)}getAncestorsData(t,e){return this.context.model.getAncestorsData(t,e)}getParentData(t,e){return this.context.model.getParentData(t,e)}getChildrenData(t){return this.context.model.getChildrenData(t)}getDescendantsData(t){return this.context.model.getDescendantsData(t)}getElementDataByState(t,e){return this.context.model.getElementDataByState(t,e)}initCanvas(){return Di(this,void 0,void 0,function*(){var t;if(this.context.canvas)return yield this.context.canvas.ready;const{container:e="container",width:n,height:i,renderer:a,cursor:l,background:u,canvas:f,devicePixelRatio:m=(t=globalThis.devicePixelRatio)!==null&&t!==void 0?t:1}=this.options;if(e instanceof Hd)this.context.canvas=e,l&&e.setCursor(l),a&&e.setRenderer(a),yield e.ready;else{const x=(0,na.Z)(e)?document.getElementById(e):e,Z=Qd(x);this.emit(J.BEFORE_CANVAS_INIT,{container:x,width:n,height:i});const V=Object.assign(Object.assign({},f),{container:x,width:n||Z[0],height:i||Z[1],background:u,renderer:a,cursor:l,devicePixelRatio:m}),nt=new Hd(V);this.context.canvas=nt,yield nt.ready,this.emit(J.AFTER_CANVAS_INIT,{canvas:nt})}})}updateCanvas(t){var e,n;const{renderer:i,cursor:a,height:l,width:u}=t,f=this.context.canvas;f&&(i&&(this.emit(J.BEFORE_RENDERER_CHANGE,{renderer:this.options.renderer}),f.setRenderer(i),this.emit(J.AFTER_RENDERER_CHANGE,{renderer:i})),a&&f.setCursor(a),((0,sn.Z)(u)||(0,sn.Z)(l))&&this.setSize((e=u!=null?u:this.options.width)!==null&&e!==void 0?e:0,(n=l!=null?l:this.options.height)!==null&&n!==void 0?n:0))}initRuntime(){this.context.options=this.options,this.context.batch||(this.context.batch=new pv(this.context)),this.context.plugin||(this.context.plugin=new Cv(this.context)),this.context.viewport||(this.context.viewport=new Pv(this.context)),this.context.transform||(this.context.transform=new Nv(this.context)),this.context.element||(this.context.element=new wv(this.context)),this.context.animation||(this.context.animation=new gv(this.context)),this.context.layout||(this.context.layout=new Av(this.context)),this.context.behavior||(this.context.behavior=new mv(this.context))}prepare(){return Di(this,void 0,void 0,function*(){if(yield Promise.resolve(),this.destroyed){console.error(rn("The graph instance has been destroyed"));return}yield this.initCanvas(),this.initRuntime()})}render(){return Di(this,void 0,void 0,function*(){if(yield this.prepare(),ya(this,new aa(J.BEFORE_RENDER)),this.options.layout)if(!this.rendered&&To(this.options.layout)){const t=yield this.context.element.preLayoutDraw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.autoFit()])}else{const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.context.layout.postLayout()]),yield this.autoFit()}else{const t=this.context.element.draw({type:"render"});yield Promise.all([t==null?void 0:t.finished,this.autoFit()])}this.rendered=!0,ya(this,new aa(J.AFTER_RENDER))})}draw(){return Di(this,void 0,void 0,function*(){var t;yield this.prepare(),yield(t=this.context.element.draw())===null||t===void 0?void 0:t.finished})}layout(t){return Di(this,void 0,void 0,function*(){yield this.context.layout.postLayout(t)})}stopLayout(){this.context.layout.stopLayout()}clear(){return Di(this,void 0,void 0,function*(){const{model:t,element:e}=this.context;t.setData({}),t.clearChanges(),e==null||e.clear()})}destroy(){var t;ya(this,new aa(J.BEFORE_DESTROY));const{layout:e,animation:n,element:i,model:a,canvas:l,behavior:u,plugin:f}=this.context;f==null||f.destroy(),u==null||u.destroy(),e==null||e.destroy(),n==null||n.destroy(),i==null||i.destroy(),a.destroy(),l==null||l.destroy(),this.options={},this.context={},this.off(),(t=globalThis.removeEventListener)===null||t===void 0||t.call(globalThis,"resize",this.onResize),this.destroyed=!0,ya(this,new aa(J.AFTER_DESTROY))}getCanvas(){return this.context.canvas}resize(t,e){var n;const i=Qd((n=this.context.canvas)===null||n===void 0?void 0:n.getContainer()),a=[t||i[0],e||i[1]];if(!this.context.canvas)return;const l=this.context.canvas.getSize();(0,S.Z)(a,l)||(ya(this,new aa(J.BEFORE_SIZE_CHANGE,{size:a})),this.context.canvas.resize(...a),ya(this,new aa(J.AFTER_SIZE_CHANGE,{size:a})))}fitView(t,e){return Di(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.fitView(t,e)})}fitCenter(t){return Di(this,void 0,void 0,function*(){var e;yield(e=this.context.viewport)===null||e===void 0?void 0:e.fitCenter({animation:t})})}autoFit(){return Di(this,void 0,void 0,function*(){const{autoFit:t}=this.context.options;if(t)if((0,na.Z)(t))t==="view"?yield this.fitView():t==="center"&&(yield this.fitCenter());else{const{type:e,animation:n}=t;e==="view"?yield this.fitView(t.options,n):e==="center"&&(yield this.fitCenter(n))}})}focusElement(t,e){return Di(this,void 0,void 0,function*(){var n;yield(n=this.context.viewport)===null||n===void 0?void 0:n.focusElements(Array.isArray(t)?t:[t],{animation:e})})}zoomBy(t,e,n){return Di(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",scale:t,origin:n},e)})}zoomTo(t,e,n){return Di(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",scale:t,origin:n},e)})}getZoom(){return this.context.viewport.getZoom()}rotateBy(t,e,n){return Di(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",rotate:t,origin:n},e)})}rotateTo(t,e,n){return Di(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",rotate:t,origin:n},e)})}getRotation(){return this.context.viewport.getRotation()}translateBy(t,e){return Di(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"relative",translate:t},e)})}translateTo(t,e){return Di(this,void 0,void 0,function*(){yield this.context.viewport.transform({mode:"absolute",translate:t},e)})}getPosition(){return Y([0,0],this.getCanvasByViewport([0,0]))}translateElementBy(t,e){return Di(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a];Object.entries(f).forEach(([x,Z])=>this.context.model.translateNodeLikeBy(x,Z)),yield(u=this.context.element.draw({animation:m,stage:"translate"}))===null||u===void 0?void 0:u.finished})}translateElementTo(t,e){return Di(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a];Object.entries(f).forEach(([x,Z])=>this.context.model.translateNodeLikeTo(x,Z)),yield(u=this.context.element.draw({animation:m,stage:"translate"}))===null||u===void 0?void 0:u.finished})}getElementPosition(t){return this.context.model.getElementPosition(t)}getElementRenderStyle(t){return(0,fd.Z)(this.context.element.getElement(t).attributes,["context"])}setElementVisibility(t,e){return Di(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a],x={nodes:[],edges:[],combos:[]};Object.entries(f).forEach(([nt,dt])=>{const St=this.getElementType(nt);x[`${St}s`].push({id:nt,style:{visibility:dt}})});const{model:Z,element:V}=this.context;Z.preventUpdateNodeLikeHierarchy(()=>{Z.updateData(x)}),yield(u=V.draw({animation:m,stage:"visibility"}))===null||u===void 0?void 0:u.finished})}showElement(t,e){return Di(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"visible"])),e)})}hideElement(t,e){return Di(this,void 0,void 0,function*(){const n=Array.isArray(t)?t:[t];yield this.setElementVisibility(Object.fromEntries(n.map(i=>[i,"hidden"])),e)})}getElementVisibility(t){var e,n;const i=this.context.element.getElement(t);return(n=(e=i==null?void 0:i.style)===null||e===void 0?void 0:e.visibility)!==null&&n!==void 0?n:"visible"}setElementZIndex(t,e){return Di(this,void 0,void 0,function*(){var n;const i={nodes:[],edges:[],combos:[]},a=(0,R.Z)(t)?t:{[t]:e};Object.entries(a).forEach(([f,m])=>{const x=this.getElementType(f);i[`${x}s`].push({id:f,style:{zIndex:m}})});const{model:l,element:u}=this.context;l.preventUpdateNodeLikeHierarchy(()=>l.updateData(i)),yield(n=u.draw({animation:!1,stage:"zIndex"}))===null||n===void 0?void 0:n.finished})}frontElement(t){return Di(this,void 0,void 0,function*(){const e=Array.isArray(t)?t:[t],{model:n}=this.context,i={};e.map(a=>{const l=n.getFrontZIndex(a);if(n.getElementType(a)==="combo"){const f=n.getAncestorsData(a,Vt).at(-1)||this.getComboData(a),m=[f,...n.getDescendantsData(me(f))],x=l-Jd(f);m.forEach(V=>{i[me(V)]=this.getElementZIndex(me(V))+x});const{internal:Z}=Jn(m.map(me),V=>n.getRelatedEdgesData(V));Z.forEach(V=>{const nt=me(V);i[nt]=this.getElementZIndex(nt)+x})}else i[a]=l}),yield this.setElementZIndex(i)})}getElementZIndex(t){return Jd(this.context.model.getElementDataById(t))}setElementState(t,e){return Di(this,arguments,void 0,function*(n,i,a=!0){var l,u;const[f,m]=(0,R.Z)(n)?[n,(l=i)!==null&&l!==void 0?l:!0]:[{[n]:i},a],x=V=>V?Array.isArray(V)?V:[V]:[],Z={nodes:[],edges:[],combos:[]};Object.entries(f).forEach(([V,nt])=>{const dt=this.getElementType(V);Z[`${dt}s`].push({id:V,states:x(nt)})}),this.updateData(Z),yield(u=this.context.element.draw({animation:m,stage:"state"}))===null||u===void 0?void 0:u.finished})}getElementState(t){return this.context.model.getElementState(t)}getElementRenderBounds(t){return this.context.element.getElement(t).getRenderBounds()}collapseElement(t){return Di(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(Ea(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!0});const l=i.getElementType(e);yield this.frontElement(e),this.isCollapsingExpanding=!0,i.updateData(l==="node"?{nodes:[{id:e,style:{collapsed:!0}}]}:{combos:[{id:e,style:{collapsed:!0}}]}),l==="node"?yield a.collapseNode(e,n):l==="combo"&&(yield a.collapseCombo(e,!!n.animation)),this.isCollapsingExpanding=!1})}expandElement(t){return Di(this,arguments,void 0,function*(e,n=!0){const{model:i,element:a}=this.context;if(!Ea(i.getNodeLikeData([e])[0])||this.isCollapsingExpanding)return;typeof n=="boolean"&&(n={animation:n,align:!0});const l=i.getElementType(e);this.isCollapsingExpanding=!0,i.updateData(l==="node"?{nodes:[{id:e,style:{collapsed:!1}}]}:{combos:[{id:e,style:{collapsed:!1}}]}),l==="node"?yield a.expandNode(e,n):l==="combo"&&(yield a.expandCombo(e,!!n.animation)),this.isCollapsingExpanding=!1})}setElementCollapsibility(t,e){const n=this.getElementType(t);n==="node"?this.updateNodeData([{id:t,style:{collapsed:e}}]):n==="combo"&&this.updateComboData([{id:t,style:{collapsed:e}}])}toDataURL(){return Di(this,arguments,void 0,function*(t={}){return this.context.canvas.toDataURL(t)})}getCanvasByViewport(t){return this.context.canvas.getCanvasByViewport(t)}getViewportByCanvas(t){return this.context.canvas.getViewportByCanvas(t)}getClientByCanvas(t){return this.context.canvas.getClientByCanvas(t)}getCanvasByClient(t){return this.context.canvas.getCanvasByClient(t)}getViewportCenter(){return this.context.viewport.getViewportCenter()}getCanvasCenter(){return this.context.viewport.getCanvasCenter()}on(t,e,n){return super.on(t,e,n)}once(t,e){return super.once(t,e)}off(t,e){return super.off(t,e)}}Lu.defaultOptions={autoResize:!1,theme:"light",rotation:0,zoom:1,zoomRange:[.01,10]};var kv=function(r,t){var e={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&t.indexOf(n)<0&&(e[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,n=Object.getOwnPropertySymbols(r);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(r,n[i])&&(e[n[i]]=r[n[i]]);return e};function Rv(r,t){const{getNodeData:e=(u,f)=>{if(u.depth=f,!u.children)return u;const{children:m}=u,x=kv(u,["children"]);return Object.assign(Object.assign({},x),{children:m.map(Z=>Z.id)})},getEdgeData:n=(u,f)=>({source:u.id,target:f.id}),getChildren:i=u=>u.children||[]}=t||{},a=[],l=[];return Na(r,(u,f)=>{a.push(e(u,f));const m=i(u);for(const x of m)l.push(n(u,x))},u=>i(u),"TB"),{nodes:a,edges:l}}class Lv extends Io{beforeDraw(t){const{add:e,update:n}=t,{model:i}=this.context;return[...e.edges.entries(),...n.edges.entries()].forEach(([,a])=>{ef(i,a)}),t}}const ef=(r,t)=>{const{source:e,target:n}=t,i=r.getElementDataById(e),a=r.getElementDataById(n),l=$n(i,Z=>r.getParentData(Z,Vt)),u=$n(a,Z=>r.getParentData(Z,Vt)),f=me(l),m=me(u),x={sourceNode:f,targetNode:m};return t.style?Object.assign(t.style,x):t.style=x,t},Dv=(r,t,e)=>{const[n,i]=t,[a,l]=e;if(i===n)return a;const u=(r-n)/(i-n);return a+u*(l-a)},Iv=(r,t,e)=>{const[n,i]=t,[a,l]=e,u=Math.log(r-n+1)/Math.log(i-n+1);return a+u*(l-a)},Bv=(r,t,e,n=2)=>{const[i,a]=t,[l,u]=e,f=Math.pow((r-i)/(a-i),n);return l+f*(u-l)},Fv=(r,t,e)=>{const[n,i]=t,[a,l]=e,u=Math.sqrt((r-n)/(i-n));return a+u*(l-a)};class Du extends Io{constructor(t,e){super(t,(0,h.Z)({},Du.defaultOptions,e)),this.assignSizeByCentrality=(n,i,a,l,u,f)=>{const m=[i,a],x=[l[0],u[0]],Z=[l[1],u[1]],V=[l[2],u[2]],nt=(dt,St)=>{if(typeof f=="function")return f(dt,m,St);switch(f){case"linear":return Dv(dt,m,St);case"log":return Iv(dt,m,St);case"pow":return Bv(dt,m,St,2);case"sqrt":return Fv(dt,m,St);default:return St[0]}};return[nt(n,x),nt(n,Z),nt(n,V)]}}beforeDraw(t){const{model:e}=this.context,n=e.getNodeData(),i=ra(this.options.maxSize),a=ra(this.options.minSize),l=this.getCentralities(this.options.centrality),u=l.size>0?Math.max(...l.values()):0,f=l.size>0?Math.min(...l.values()):0;return n.forEach(m=>{var x;const Z=this.assignSizeByCentrality(l.get(me(m))||0,f,u,a,i,this.options.scale),V=(x=this.context.element)===null||x===void 0?void 0:x.getElement(me(m)),nt={size:Z};this.assignLabelStyle(nt,Z,m,V),(!V||!Cu(nt,V.attributes))&&as(t,V?"update":"add","node",(0,h.Z)(m,{style:nt}),!0)}),t}assignLabelStyle(t,e,n,i){var a;const l=i?i.config.style:(a=this.context.element)===null||a===void 0?void 0:a.getElementComputedStyle("node",n);if(Object.assign(t,(0,da.Z)(l,["labelFontSize","labelLineHeight"])),this.options.mapLabelSize){const u=this.getLabelSizeByNodeSize(e,1/0,Number(t.labelFontSize));Object.assign(t,{labelFontSize:u,labelLineHeight:u+tn(t.labelPadding)})}return t}getLabelSizeByNodeSize(t,e,n){const i=Math.min(...t)/2,[a,l]=Array.isArray(this.options.mapLabelSize)?this.options.mapLabelSize:[n,e];return Math.min(l,Math.max(i,a))}getCentralities(t){const{model:e}=this.context,n=e.getData();if(typeof t=="function")return t(n);const i=e.getRelatedEdgesData.bind(e);return kr(n,i,t)}}Du.defaultOptions={centrality:{type:"degree"},maxSize:80,minSize:20,scale:"linear",mapLabelSize:!1};class Iu extends Io{constructor(t,e){super(t,Object.assign({},Iu.defaultOptions,e))}get ref(){return this.context.model.getRootsData()[0]}afterLayout(){var t;const e=Wt(this.ref),{graph:n,model:i}=this.context;(t=i.getData().nodes)===null||t===void 0||t.forEach(l=>{var u;if(me(l)===me(this.ref))return;const f=lt(Y(Wt(l),e)),m=Math.abs(f)>Math.PI/2,x=!l.children||l.children.length===0,Z=me(l),V=(u=this.context.element)===null||u===void 0?void 0:u.getElement(Z);if(!V||!V.isVisible())return;const nt=ra(n.getElementRenderStyle(Z).size)[0]/2,dt=(x?1:-1)*(nt+this.options.offset),St=[["translate",dt*Math.cos(f),dt*Math.sin(f)],["rotate",m?(0,_.BV)(f)+180:(0,_.BV)(f)]];i.updateNodeData([{id:me(l),style:{labelTextAlign:m===x?"right":"left",labelTextBaseline:"middle",labelTransform:St}}])}),n.draw()}}Iu.defaultOptions={offset:5};const _v="quadratic",nf=["top","top-right","right","right-bottom","bottom","bottom-left","left","left-top"];class Bu extends Io{constructor(t,e){super(t,Object.assign({},Bu.defaultOptions,e)),this.cacheMergeStyle=new Map,this.getAffectedParallelEdges=n=>{const{add:{edges:i},update:{nodes:a,edges:l,combos:u},remove:{edges:f}}=n,{model:m}=this.context,x=new Map,Z=(dt,St)=>{m.getRelatedEdgesData(St).forEach(Jt=>!x.has(me(Jt))&&x.set(me(Jt),Jt))};a.forEach(Z),u.forEach(Z);const V=dt=>{const St=new Set(n.remove.edges.keys()),Dt=m.getEdgeData().filter(Jt=>!St.has(me(Jt))).map(Jt=>ef(m,Jt));Zv(dt,Dt,!0).forEach(Jt=>{const oe=me(Jt);x.has(oe)||x.set(oe,Jt)})};if(f.size&&f.forEach(V),i.size&&i.forEach(V),l.size){const dt=Ed(Vh(m.getChanges())).update.edges;l.forEach(St=>{var Dt;V(St);const Jt=(Dt=dt.find(oe=>me(oe.value)===me(St)))===null||Dt===void 0?void 0:Dt.original;Jt&&!td(St,Jt)&&V(Jt)})}(0,qi.Z)(this.options.edges)||x.forEach((dt,St)=>!this.options.edges.includes(St)&&x.delete(St));const nt=m.getEdgeData().map(me);return new Map([...x].sort((dt,St)=>nt.indexOf(dt[0])-nt.indexOf(St[0])))},this.applyBundlingStyle=(n,i,a)=>{const{edgeMap:l,reverses:u}=rf(i);l.forEach(f=>{f.forEach((m,x,Z)=>{var V;const nt=Z.length,dt=m.style||{};if(m.source===m.target){const Jt=nf.length;dt.loopPlacement=nf[x%Jt],dt.loopDist=Math.floor(x/Jt)*a+50}else if(nt===1)dt.curveOffset=0;else{const Jt=(x%2===0?1:-1)*(u[`${m.source}|${m.target}|${x}`]?-1:1);dt.curveOffset=nt%2===1?Jt*Math.ceil(x/2)*a*2:Jt*(Math.floor(x/2)*a*2+a)}const St=Object.assign(m,{type:_v,style:dt}),Dt=(V=this.context.element)===null||V===void 0?void 0:V.getElement(me(m));(!Dt||!Cu(St.style,Dt.attributes))&&as(n,Dt?"update":"add","edge",St,!0)})})},this.resetEdgeStyle=n=>{const i=n.style||{},a=this.cacheMergeStyle.get(me(n))||{};return Object.keys(a).forEach(l=>{(0,S.Z)(i[l],a[l])&&(n[l]?i[l]=n[l]:delete i[l])}),Object.assign(n,{style:i})},this.applyMergingStyle=(n,i)=>{const{edgeMap:a,reverses:l}=rf(i);a.forEach(u=>{var f;if(u.length===1){const x=u[0],Z=(f=this.context.element)===null||f===void 0?void 0:f.getElement(me(x)),V=this.resetEdgeStyle(x);(!Z||!Cu(V,Z.attributes))&&as(n,Z?"update":"add","edge",V);return}const m=u.map(({source:x,target:Z,style:V={}},nt)=>{const{startArrow:dt,endArrow:St}=V,Dt={},[Jt,oe]=l[`${x}|${Z}|${nt}`]?["endArrow","startArrow"]:["startArrow","endArrow"];return(0,Gh.Z)(dt)&&(Dt[Jt]=dt),(0,Gh.Z)(St)&&(Dt[oe]=St),Dt}).reduce((x,Z)=>Object.assign(Object.assign({},x),Z),{});u.forEach((x,Z,V)=>{var nt;if(Z!==0){as(n,"remove","edge",x);return}const dt=Object.assign({},(0,xe.Z)(this.options.style)?this.options.style(V):this.options.style,{childrenData:V});this.cacheMergeStyle.set(me(x),dt);const St=Object.assign(Object.assign({},x),{type:"line",style:Object.assign(Object.assign(Object.assign({},x.style),m),dt)}),Dt=(nt=this.context.element)===null||nt===void 0?void 0:nt.getElement(me(x));(!Dt||!Cu(St.style,Dt.attributes))&&as(n,Dt?"update":"add","edge",St,!0)})})}}beforeDraw(t){const e=this.getAffectedParallelEdges(t);return e.size===0||(this.options.mode==="bundle"?this.applyBundlingStyle(t,e,this.options.distance):this.applyMergingStyle(t,e)),t}}Bu.defaultOptions={mode:"bundle",distance:15};const rf=r=>{const t=new Map,e=new Set,n={},i=new Map;for(const[a,l]of r){if(e.has(a))continue;const{source:u,target:f}=l,m=`${u}-${f}`;t.has(m)||(t.set(m,[]),i.set(m,new Set));const x=t.get(m),Z=i.get(m);x&&Z&&!Z.has(a)&&(x.push(l),Z.add(a),e.add(a));for(const[V,nt]of r)if(!(e.has(V)||V===a)&&td(l,nt)){const dt=t.get(m),St=i.get(m);dt&&St&&!St.has(V)&&(dt.push(nt),St.add(V),u===nt.target&&f===nt.source&&(n[`${nt.source}|${nt.target}|${dt.length-1}`]=!0),e.add(V))}}return{edgeMap:t,reverses:n}},Zv=(r,t,e)=>t.filter(n=>(e||me(n)!==me(r))&&td(n,r)),td=(r,t)=>{const{sourceNode:e,targetNode:n}=r.style||{},{sourceNode:i,targetNode:a}=t.style||{};return e===i&&n===a||e===a&&n===i};class zv extends Io{beforeDraw(t,e){const{stage:n}=e;if(n==="visibility")return t;const{model:i}=this.context,{update:{nodes:a,edges:l,combos:u}}=t,f=(m,x)=>{i.getRelatedEdgesData(x).forEach(V=>!l.has(me(V))&&l.set(me(V),V))};return a.forEach(f),u.forEach(f),t}}const jv={animation:{"combo-collapse":Re,"combo-expand":ce,"node-collapse":Pt,"node-expand":wt,"path-in":de,"path-out":je,fade:le,translate:Ae},behavior:{"brush-select":Yn,"click-select":vo,"collapse-expand":Vs,"create-edge":Ao,"drag-canvas":Ds,"drag-element-force":_u,"drag-element":vs,"fix-element-size":il,"focus-element":so,"hover-activate":al,"lasso-select":Zu,"auto-adapt-label":b,"optimize-viewport-transform":sl,"scroll-canvas":ol,"zoom-canvas":Uo},combo:{circle:Ws,rect:Mo},edge:{cubic:P,line:ut,polyline:Fn,quadratic:Gn,"cubic-horizontal":k,"cubic-radial":U,"cubic-vertical":at},layout:{"antv-dagre":C,"combo-combined":Lh,"compact-box":ll.compactBox,"d3-force":nu,"force-atlas2":_h,circular:Gt,concentric:hn,dagre:qo,dendrogram:ll.dendrogram,fishbone:au,force:fr,fruchterman:of,grid:cf,indented:ll.indented,mds:Sl,mindmap:ll.mindmap,radial:yf,random:Af,snake:su},node:{circle:Wi,diamond:Ha,ellipse:ds,hexagon:ns,html:zs,image:Ns,rect:zo,star:js,donut:ta,triangle:Ps},palette:{spectral:Nf,tableau:Pf,oranges:kf,greens:Rf,blues:Lf},theme:{dark:nv,light:rv},plugin:{"bubble-sets":lu,"edge-bundling":uu,"edge-filter-lens":hu,"grid-line":vu,background:ou,contextmenu:cu,fisheye:du,fullscreen:fu,history:gu,hull:bu,legend:xu,minimap:wu,snapline:Mu,timebar:Su,title:G0,toolbar:Au,tooltip:Ou,watermark:Tu},transform:{"arrange-draw-order":iv,"collapse-expand-combo":av,"collapse-expand-node":sv,"get-edge-actual-ends":Lv,"map-node-size":Du,"place-radial-labels":Iu,"process-parallel-edges":Bu,"update-related-edges":zv},shape:{circle:_.Cd,ellipse:_.Pj,group:_.ZA,html:_.k9,image:Ts,line:_.x1,path:_.y$,polygon:_.mg,polyline:_.aH,rect:_.UL,text:_.xv,label:ua,badge:bi}};function Wv(){Object.entries(jv).forEach(([r,t])=>{Object.entries(t).forEach(([e,n])=>{ov(r,e,n)})})}Wv();const eg={css:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.css",js:"//at.alicdn.com/t/a/font_470089_8hnbbf8n4u8.js"}},14675:function(bt,Et,y){"use strict";y.d(Et,{mN:function(){return c.mN},Xz:function(){return c.Xz},$6:function(){return c.$6},Cd:function(){return c.Cd},b_:function(){return c.b_},Aw:function(){return c.Aw},s$:function(){return c.s$},BB:function(){return c.BB},Dk:function(){return c.Dk},Pj:function(){return c.Pj},nR:function(){return c.nR},ZA:function(){return c.ZA},k9:function(){return c.k9},Ee:function(){return c.Ee},x1:function(){return c.x1},y$:function(){return c.y$},mg:function(){return c.mg},aH:function(){return c.aH},UL:function(){return c.UL},xv:function(){return c.xv},BV:function(){return c.BV},GZ:function(){return c.GZ}});var c=y(77263),_=y(67732),I=y(83652),z=y(22214),S=y(42403),R=y(71879),M=y(1933),N=y(94569),D=y(60187),A=y(92421);var L=function(gt){function vt(){var lt;(0,_.Z)(this,vt);for(var jt=arguments.length,Yt=new Array(jt),he=0;he<jt;he++)Yt[he]=arguments[he];return lt=(0,z.Z)(this,vt,[].concat(Yt)),lt.landmarks=[],lt}return(0,S.Z)(vt,gt),(0,I.Z)(vt,[{key:"rotate",value:function(jt,Yt,he){if(this.relElevation=(0,c._O)(Yt),this.relAzimuth=(0,c._O)(jt),this.relRoll=(0,c._O)(he),this.elevation+=this.relElevation,this.azimuth+=this.relAzimuth,this.roll+=this.relRoll,this.type===c.iM.EXPLORING){var ye=N.yY(N.Ue(),[1,0,0],(0,c.Vl)((this.rotateWorld?1:-1)*this.relElevation)),Wt=N.yY(N.Ue(),[0,1,0],(0,c.Vl)((this.rotateWorld?1:-1)*this.relAzimuth)),Oe=N.yY(N.Ue(),[0,0,1],(0,c.Vl)(this.relRoll)),He=N.Jp(N.Ue(),Wt,ye);He=N.Jp(N.Ue(),He,Oe);var Qe=D.fromQuat(D.create(),He);D.translate(this.matrix,this.matrix,[0,0,-this.distance]),D.multiply(this.matrix,this.matrix,Qe),D.translate(this.matrix,this.matrix,[0,0,this.distance])}else{if(Math.abs(this.elevation)>90)return this;this.computeMatrix()}return this._getAxes(),this.type===c.iM.ORBITING||this.type===c.iM.EXPLORING?this._getPosition():this.type===c.iM.TRACKING&&this._getFocalPoint(),this._update(),this}},{key:"pan",value:function(jt,Yt){var he=(0,c.O4)(jt,Yt,0),ye=A.d9(this.position);return A.IH(ye,ye,A.bA(A.Ue(),this.right,he[0])),A.IH(ye,ye,A.bA(A.Ue(),this.up,he[1])),this._setPosition(ye),this.triggerUpdate(),this}},{key:"dolly",value:function(jt){var Yt=this.forward,he=A.d9(this.position),ye=jt*this.dollyingStep,Wt=this.distance+jt*this.dollyingStep;return ye=Math.max(Math.min(Wt,this.maxDistance),this.minDistance)-this.distance,he[0]+=ye*Yt[0],he[1]+=ye*Yt[1],he[2]+=ye*Yt[2],this._setPosition(he),this.type===c.iM.ORBITING||this.type===c.iM.EXPLORING?this._getDistance():this.type===c.iM.TRACKING&&A.IH(this.focalPoint,he,this.distanceVector),this.triggerUpdate(),this}},{key:"cancelLandmarkAnimation",value:function(){this.landmarkAnimationID!==void 0&&this.canvas.cancelAnimationFrame(this.landmarkAnimationID)}},{key:"createLandmark",value:function(jt){var Yt,he,ye,Wt,Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},He=Oe.position,Qe=He===void 0?this.position:He,An=Oe.focalPoint,Nn=An===void 0?this.focalPoint:An,Cn=Oe.roll,Bn=Oe.zoom,jn=new c.GZ.CameraContribution;jn.setType(this.type,void 0),jn.setPosition(Qe[0],(Yt=Qe[1])!==null&&Yt!==void 0?Yt:this.position[1],(he=Qe[2])!==null&&he!==void 0?he:this.position[2]),jn.setFocalPoint(Nn[0],(ye=Nn[1])!==null&&ye!==void 0?ye:this.focalPoint[1],(Wt=Nn[2])!==null&&Wt!==void 0?Wt:this.focalPoint[2]),jn.setRoll(Cn!=null?Cn:this.roll),jn.setZoom(Bn!=null?Bn:this.zoom);var or={name:jt,matrix:D.clone(jn.getWorldTransform()),right:A.d9(jn.right),up:A.d9(jn.up),forward:A.d9(jn.forward),position:A.d9(jn.getPosition()),focalPoint:A.d9(jn.getFocalPoint()),distanceVector:A.d9(jn.getDistanceVector()),distance:jn.getDistance(),dollyingStep:jn.getDollyingStep(),azimuth:jn.getAzimuth(),elevation:jn.getElevation(),roll:jn.getRoll(),relAzimuth:jn.relAzimuth,relElevation:jn.relElevation,relRoll:jn.relRoll,zoom:jn.getZoom()};return this.landmarks.push(or),or}},{key:"gotoLandmark",value:function(jt){var Yt=this,he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},ye=(0,R.Z)(jt)?this.landmarks.find(function($r){return $r.name===jt}):jt;if(ye){var Wt=(0,M.Z)(he)?{duration:he}:he,Oe=Wt.easing,He=Oe===void 0?"linear":Oe,Qe=Wt.duration,An=Qe===void 0?100:Qe,Nn=Wt.easingFunction,Cn=Nn===void 0?void 0:Nn,Bn=Wt.onfinish,jn=Bn===void 0?void 0:Bn,or=Wt.onframe,ir=or===void 0?void 0:or,lr=.01;this.cancelLandmarkAnimation();var Vn=ye.position,nr=ye.focalPoint,Or=ye.zoom,Kr=ye.roll,Wr=Cn||c.GZ.EasingFunction(He),dr,Fr=function(){Yt.setFocalPoint(nr),Yt.setPosition(Vn),Yt.setRoll(Kr),Yt.setZoom(Or),Yt.computeMatrix(),Yt.triggerUpdate(),jn==null||jn()};if(An===0)return Fr();var xi=function(pi){dr===void 0&&(dr=pi);var Ri=pi-dr;if(Ri>=An){Fr();return}var Hi=Wr(Ri/An),Zi=A.Ue(),ca=A.Ue(),_a=1,Za=0;A.t7(Zi,Yt.focalPoint,nr,Hi),A.t7(ca,Yt.position,Vn,Hi),Za=Yt.roll*(1-Hi)+Kr*Hi,_a=Yt.zoom*(1-Hi)+Or*Hi,Yt.setFocalPoint(Zi),Yt.setPosition(ca),Yt.setRoll(Za),Yt.setZoom(_a);var na=A.TK(Zi,nr)+A.TK(ca,Vn);if(na<=lr&&Or===void 0&&Kr===void 0)return Fr();Yt.computeMatrix(),Yt.triggerUpdate(),Ri<An&&(ir==null||ir(Hi),Yt.landmarkAnimationID=Yt.canvas.requestAnimationFrame(xi))};this.canvas.requestAnimationFrame(xi)}}}])}(c.V1);c.GZ.CameraContribution=L;var F=null,rt=0,G=new WeakMap,kt=null,ft=null,J,Rt;function Tt(gt,vt){return J=new F(gt,vt)}function Vt(gt){return Rt||(Rt=F.copy(J),Rt.oldValue=gt,Rt)}function fe(){J=Rt=void 0}function ue(gt){return gt===Rt||gt===J}function Ce(gt,vt){return gt===vt?gt:Rt&&ue(gt)?Rt:null}function be(gt){gt.nodes.forEach(function(vt){var lt=G.get(vt);lt&<.forEach(function(jt){jt.observer===gt&&jt.removeTransientObservers()})})}function we(gt,vt){for(var lt=gt;lt;lt=lt.parentNode){var jt=G.get(lt);if(jt)for(var Yt=0;Yt<jt.length;Yt++){var he=jt[Yt],ye=he.options;if(!(lt!==gt&&!ye.subtree)){var Wt=vt(ye);Wt&&he.enqueue(Wt)}}}}var ne=!1,We=null;function rn(gt){We.push(gt),ne||(ne=!0,typeof runtime.globalThis!="undefined"?runtime.globalThis.setTimeout(Xe):Xe())}function Xe(){ne=!1;var gt=We;We=[],gt.sort(function(lt,jt){return lt.uid-jt.uid});var vt=!1;gt.forEach(function(lt){var jt=lt.takeRecords();be(lt),jt.length&&(lt.callback(jt,lt),vt=!0)}),vt&&Xe()}var pn=y(94480),Tn=y(42978),$e=y(70208),mn=y(76075);var It=function(gt){function vt(lt,jt,Yt,he){var ye;return(0,_.Z)(this,vt),ye=(0,z.Z)(this,vt,[lt]),ye.currentTime=Yt,ye.timelineTime=he,ye.target=jt,ye.type="finish",ye.bubbles=!1,ye.currentTarget=jt,ye.defaultPrevented=!1,ye.eventPhase=ye.AT_TARGET,ye.timeStamp=Date.now(),ye.currentTime=Yt,ye.timelineTime=he,ye}return(0,S.Z)(vt,gt),(0,I.Z)(vt)}(c.xA),Ee=0,cn=function(){function gt(vt,lt){var jt;(0,_.Z)(this,gt),this.currentTimePending=!1,this._idle=!0,this._paused=!1,this._finishedFlag=!0,this._currentTime=0,this._playbackRate=1,this._inTimeline=!0,this.effect=vt,vt.animation=this,this.timeline=lt,this.id="".concat(Ee++),this._inEffect=!!this.effect.update(0),this._totalDuration=Number((jt=this.effect)===null||jt===void 0?void 0:jt.getComputedTiming().endTime),this._holdTime=0,this._paused=!1,this.oldPlayState="idle",this.updatePromises()}return(0,I.Z)(gt,[{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 lt=this;return this.readyPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.readyPromise=new Promise(function(jt,Yt){lt.resolveReadyPromise=function(){jt(lt)},lt.rejectReadyPromise=function(){Yt(new Error)}}),this.pending||this.resolveReadyPromise()),this.readyPromise}},{key:"finished",get:function(){var lt=this;return this.finishedPromise||(this.timeline.animationsWithPromises.indexOf(this)===-1&&this.timeline.animationsWithPromises.push(this),this.finishedPromise=new Promise(function(jt,Yt){lt.resolveFinishedPromise=function(){jt(lt)},lt.rejectFinishedPromise=function(){Yt(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(lt){if(lt=Number(lt),!isNaN(lt)){if(this.timeline.restart(),!this._paused&&this._startTime!==null){var jt;this._startTime=Number((jt=this.timeline)===null||jt===void 0?void 0:jt.currentTime)-lt/this.playbackRate}this.currentTimePending=!1,this._currentTime!==lt&&(this._idle&&(this._idle=!1,this._paused=!0),this.tickCurrentTime(lt,!0),this.timeline.applyDirtiedAnimation(this))}}},{key:"startTime",get:function(){return this._startTime},set:function(lt){if(lt!==null){if(this.updatePromises(),lt=Number(lt),isNaN(lt)||this._paused||this._idle)return;this._startTime=lt,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(lt){if(lt!==this._playbackRate){this.updatePromises();var jt=this.currentTime;this._playbackRate=lt,this.startTime=null,this.playState!=="paused"&&this.playState!=="idle"&&(this._finishedFlag=!1,this._idle=!1,this.ensureAlive(),this.timeline.applyDirtiedAnimation(this)),jt!==null&&(this.currentTime=jt),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 lt;if((lt=this.effect.target)!==null&<!==void 0&<.destroyed)return this.readyPromise=void 0,this.finishedPromise=void 0,!1;var jt=this.oldPlayState,Yt=this.pending?"pending":this.playState;return this.readyPromise&&Yt!==jt&&(Yt==="idle"?(this.rejectReadyPromise(),this.readyPromise=void 0):jt==="pending"?this.resolveReadyPromise():Yt==="pending"&&(this.readyPromise=void 0)),this.finishedPromise&&Yt!==jt&&(Yt==="idle"?(this.rejectFinishedPromise(),this.finishedPromise=void 0):Yt==="finished"?this.resolveFinishedPromise():jt==="finished"&&(this.finishedPromise=void 0)),this.oldPlayState=Yt,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 lt=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 jt=new It(null,this,this.currentTime,null);setTimeout(function(){lt.oncancel(jt)})}}},{key:"reverse",value:function(){this.updatePromises();var lt=this.currentTime;this.playbackRate*=-1,this.play(),lt!==null&&(this.currentTime=lt),this.updatePromises()}},{key:"updatePlaybackRate",value:function(lt){this.playbackRate=lt}},{key:"targetAnimations",value:function(){var lt,jt=(lt=this.effect)===null||lt===void 0?void 0:lt.target;return jt.getAnimations()}},{key:"markTarget",value:function(){var lt=this.targetAnimations();lt.indexOf(this)===-1&<.push(this)}},{key:"unmarkTarget",value:function(){var lt=this.targetAnimations(),jt=lt.indexOf(this);jt!==-1&<.splice(jt,1)}},{key:"tick",value:function(lt,jt){!this._idle&&!this._paused&&(this._startTime===null?jt&&(this.startTime=lt-this._currentTime/this.playbackRate):this._isFinished||this.tickCurrentTime((lt-this._startTime)*this.playbackRate)),jt&&(this.currentTimePending=!1,this.fireEvents(lt))}},{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(c.jf)}},{key:"addEventListener",value:function(lt,jt,Yt){throw new Error(c.jf)}},{key:"removeEventListener",value:function(lt,jt,Yt){throw new Error(c.jf)}},{key:"dispatchEvent",value:function(lt){throw new Error(c.jf)}},{key:"commitStyles",value:function(){throw new Error(c.jf)}},{key:"ensureAlive",value:function(){if(this.playbackRate<0&&this.currentTime===0){var lt;this._inEffect=!!((lt=this.effect)!==null&<!==void 0&<.update(-1))}else{var jt;this._inEffect=!!((jt=this.effect)!==null&&jt!==void 0&&jt.update(this.currentTime))}!this._inTimeline&&(this._inEffect||!this._finishedFlag)&&(this._inTimeline=!0,this.timeline.animations.push(this))}},{key:"tickCurrentTime",value:function(lt,jt){lt!==this._currentTime&&(this._currentTime=lt,this._isFinished&&!jt&&(this._currentTime=this._playbackRate>0?this._totalDuration:0),this.ensureAlive())}},{key:"fireEvents",value:function(lt){var jt=this;if(this._isFinished){if(!this._finishedFlag){if(this.onfinish){var Yt=new It(null,this,this.currentTime,lt);setTimeout(function(){jt.onfinish&&jt.onfinish(Yt)})}this._finishedFlag=!0}}else{if(this.onframe&&this.playState==="running"){var he=new It(null,this,this.currentTime,lt);this.onframe(he)}this._finishedFlag=!1}}}])}(),sn=4,Pe=.001,ze=1e-7,Ke=10,le=11,Ae=1/(le-1),Pt=typeof Float32Array=="function",wt=function(vt,lt){return 1-3*lt+3*vt},de=function(vt,lt){return 3*lt-6*vt},je=function(vt){return 3*vt},Re=function(vt,lt,jt){return((wt(lt,jt)*vt+de(lt,jt))*vt+je(lt))*vt},ce=function(vt,lt,jt){return 3*wt(lt,jt)*vt*vt+2*de(lt,jt)*vt+je(lt)},Le=function(vt,lt,jt,Yt,he){var ye,Wt,Oe=0;do Wt=lt+(jt-lt)/2,ye=Re(Wt,Yt,he)-vt,ye>0?jt=Wt:lt=Wt;while(Math.abs(ye)>ze&&++Oe<Ke);return Wt},xe=function(vt,lt,jt,Yt){for(var he=0;he<sn;++he){var ye=ce(lt,jt,Yt);if(ye===0)return lt;var Wt=Re(lt,jt,Yt)-vt;lt-=Wt/ye}return lt},Ft=function(vt,lt,jt,Yt){if(!(vt>=0&&vt<=1&&jt>=0&&jt<=1))throw new Error("bezier x values must be in [0, 1] range");if(vt===lt&&jt===Yt)return function(Oe){return Oe};for(var he=Pt?new Float32Array(le):new Array(le),ye=0;ye<le;++ye)he[ye]=Re(ye*Ae,vt,jt);var Wt=function(He){for(var Qe=0,An=1,Nn=le-1;An!==Nn&&he[An]<=He;++An)Qe+=Ae;--An;var Cn=(He-he[An])/(he[An+1]-he[An]),Bn=Qe+Cn*Ae,jn=ce(Bn,vt,jt);return jn>=Pe?xe(He,Bn,vt,jt):jn===0?Bn:Le(He,Qe,Qe+Ae,vt,jt)};return function(Oe){return Oe===0||Oe===1?Oe:Re(Wt(Oe),lt,Yt)}},re=function(vt){return vt=vt.replace(/([A-Z])/g,function(lt){return"-".concat(lt.toLowerCase())}),vt.charAt(0)==="-"?vt.substring(1):vt},Me=function(vt){return Math.pow(vt,2)},O=function(vt){return Math.pow(vt,3)},st=function(vt){return Math.pow(vt,4)},ve=function(vt){return Math.pow(vt,5)},$t=function(vt){return Math.pow(vt,6)},Ie=function(vt){return 1-Math.cos(vt*Math.PI/2)},Ne=function(vt){return 1-Math.sqrt(1-vt*vt)},tn=function(vt){return vt*vt*(3*vt-2)},Mt=function(vt){for(var lt,jt=4;vt<((lt=Math.pow(2,--jt))-1)/11;);return 1/Math.pow(4,3-jt)-7.5625*Math.pow((lt*3-2)/22-vt,2)},q=function(vt){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],jt=(0,Tn.Z)(lt,2),Yt=jt[0],he=Yt===void 0?1:Yt,ye=jt[1],Wt=ye===void 0?.5:ye,Oe=(0,$e.Z)(Number(he),1,10),He=(0,$e.Z)(Number(Wt),.1,2);return vt===0||vt===1?vt:-Oe*Math.pow(2,10*(vt-1))*Math.sin((vt-1-He/(Math.PI*2)*Math.asin(1/Oe))*(Math.PI*2)/He)},Ct=function(vt){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],jt=arguments.length>2?arguments[2]:void 0,Yt=(0,Tn.Z)(lt,4),he=Yt[0],ye=he===void 0?1:he,Wt=Yt[1],Oe=Wt===void 0?100:Wt,He=Yt[2],Qe=He===void 0?10:He,An=Yt[3],Nn=An===void 0?0:An;ye=(0,$e.Z)(ye,.1,1e3),Oe=(0,$e.Z)(Oe,.1,1e3),Qe=(0,$e.Z)(Qe,.1,1e3),Nn=(0,$e.Z)(Nn,.1,1e3);var Cn=Math.sqrt(Oe/ye),Bn=Qe/(2*Math.sqrt(Oe*ye)),jn=Bn<1?Cn*Math.sqrt(1-Bn*Bn):0,or=1,ir=Bn<1?(Bn*Cn+-Nn)/jn:-Nn+Cn,lr=jt?jt*vt/1e3:vt;return Bn<1?lr=Math.exp(-lr*Bn*Cn)*(or*Math.cos(jn*lr)+ir*Math.sin(jn*lr)):lr=(or+ir*lr)*Math.exp(-lr*Cn),vt===0||vt===1?vt:1-lr},Ht=function(vt){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],jt=lt,Yt=(0,Tn.Z)(jt,2),he=Yt[0],ye=he===void 0?10:he,Wt=Yt[1],Oe=Wt==="start"?Math.ceil:Math.floor;return Oe((0,$e.Z)(vt,0,1)*ye)/ye},Lt=function(vt){var lt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],jt=(0,Tn.Z)(lt,4),Yt=jt[0],he=jt[1],ye=jt[2],Wt=jt[3];return Ft(Yt,he,ye,Wt)(vt)},_t=Ft(.42,0,1,1),Ut=function(vt){return function(lt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Yt=arguments.length>2?arguments[2]:void 0;return 1-vt(1-lt,jt,Yt)}},qt=function(vt){return function(lt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Yt=arguments.length>2?arguments[2]:void 0;return lt<.5?vt(lt*2,jt,Yt)/2:1-vt(lt*-2+2,jt,Yt)/2}},se=function(vt){return function(lt){var jt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Yt=arguments.length>2?arguments[2]:void 0;return lt<.5?(1-vt(1-lt*2,jt,Yt))/2:(vt(lt*2-1,jt,Yt)+1)/2}},te={steps:Ht,"step-start":function(vt){return Ht(vt,[1,"start"])},"step-end":function(vt){return Ht(vt,[1,"end"])},linear:function(vt){return vt},"cubic-bezier":Lt,ease:function(vt){return Lt(vt,[.25,.1,.25,1])},in:_t,out:Ut(_t),"in-out":qt(_t),"out-in":se(_t),"in-quad":Me,"out-quad":Ut(Me),"in-out-quad":qt(Me),"out-in-quad":se(Me),"in-cubic":O,"out-cubic":Ut(O),"in-out-cubic":qt(O),"out-in-cubic":se(O),"in-quart":st,"out-quart":Ut(st),"in-out-quart":qt(st),"out-in-quart":se(st),"in-quint":ve,"out-quint":Ut(ve),"in-out-quint":qt(ve),"out-in-quint":se(ve),"in-expo":$t,"out-expo":Ut($t),"in-out-expo":qt($t),"out-in-expo":se($t),"in-sine":Ie,"out-sine":Ut(Ie),"in-out-sine":qt(Ie),"out-in-sine":se(Ie),"in-circ":Ne,"out-circ":Ut(Ne),"in-out-circ":qt(Ne),"out-in-circ":se(Ne),"in-back":tn,"out-back":Ut(tn),"in-out-back":qt(tn),"out-in-back":se(tn),"in-bounce":Mt,"out-bounce":Ut(Mt),"in-out-bounce":qt(Mt),"out-in-bounce":se(Mt),"in-elastic":q,"out-elastic":Ut(q),"in-out-elastic":qt(q),"out-in-elastic":se(q),spring:Ct,"spring-in":Ct,"spring-out":Ut(Ct),"spring-in-out":qt(Ct),"spring-out-in":se(Ct)},ke=function(vt){return re(vt).replace(/^ease-/,"").replace(/(\(|\s).+/,"").toLowerCase().trim()},Ye=function(vt){return te[ke(vt)]||te.linear},Ve=function(vt){return vt},on=1,xn=.5,vn=0;function Qn(gt,vt){return function(lt){if(lt>=1)return 1;var jt=1/gt;return lt+=vt*jt,lt-lt%jt}}var Ln="\\s*(-?\\d+\\.?\\d*|-?\\.\\d+)\\s*",_n=new RegExp("cubic-bezier\\(".concat(Ln,",").concat(Ln,",").concat(Ln,",").concat(Ln,"\\)")),me=/steps\(\s*(\d+)\s*\)/,pr=/steps\(\s*(\d+)\s*,\s*(start|middle|end)\s*\)/;function Zn(gt){var vt=_n.exec(gt);if(vt)return Ft.apply(void 0,(0,pn.Z)(vt.slice(1).map(Number)));var lt=me.exec(gt);if(lt)return Qn(Number(lt[1]),vn);var jt=pr.exec(gt);return jt?Qn(Number(jt[1]),{start:on,middle:xn,end:vn}[jt[2]]):Ye(gt)}function kr(gt){return Math.abs(Ar(gt)/(gt.playbackRate||1))}function Ar(gt){var vt;return gt.duration===0||gt.iterations===0?0:(gt.duration==="auto"?0:Number(gt.duration))*((vt=gt.iterations)!==null&&vt!==void 0?vt:1)}var ei=0,yi=1,ui=2,Ur=3;function ki(gt,vt,lt){if(vt===null)return ei;var jt=lt.endTime;return vt<Math.min(lt.delay,jt)?yi:vt>=Math.min(lt.delay+gt+lt.endDelay,jt)?ui:Ur}function la(gt,vt,lt,jt,Yt){switch(jt){case yi:return vt==="backwards"||vt==="both"?0:null;case Ur:return lt-Yt;case ui:return vt==="forwards"||vt==="both"?gt:null;case ei:return null}}function Oi(gt,vt,lt,jt,Yt){var he=Yt;return gt===0?vt!==yi&&(he+=lt):he+=jt/gt,he}function Zr(gt,vt,lt,jt,Yt,he){var ye=gt===1/0?vt%1:gt%1;return ye===0&<===ui&&jt!==0&&(Yt!==0||he===0)&&(ye=1),ye}function qn(gt,vt,lt,jt){return gt===ui&&vt===1/0?1/0:lt===1?Math.floor(jt)-1:Math.floor(jt)}function Ti(gt,vt,lt){var jt=gt;if(gt!=="normal"&>!=="reverse"){var Yt=vt;gt==="alternate-reverse"&&(Yt+=1),jt="normal",Yt!==1/0&&Yt%2!==0&&(jt="reverse")}return jt==="normal"?lt:1-lt}function Nt(gt,vt,lt){var jt=ki(gt,vt,lt),Yt=la(gt,lt.fill,vt,jt,lt.delay);if(Yt===null)return null;var he=lt.duration==="auto"?0:lt.duration,ye=Oi(he,jt,lt.iterations,Yt,lt.iterationStart),Wt=Zr(ye,lt.iterationStart,jt,lt.iterations,Yt,he),Oe=qn(jt,lt.iterations,Wt,ye),He=Ti(lt.direction,Oe,Wt);return lt.currentIteration=Oe,lt.progress=He,lt.easingFunction(He)}function E(gt,vt,lt){var jt=h(gt,vt),Yt=v(jt,lt);return function(he,ye){if(ye!==null)Yt.filter(function(Oe){return ye>=Oe.applyFrom&&ye<Oe.applyTo}).forEach(function(Oe){var He=ye-Oe.startOffset,Qe=Oe.endOffset-Oe.startOffset,An=Qe===0?0:He/Qe;he.setAttribute(Oe.property,Oe.interpolation(An),!1,!1)});else for(var Wt in jt)b(Wt)&&he.setAttribute(Wt,null)}}function b(gt){return gt!=="offset"&>!=="easing"&>!=="composite"&>!=="computedOffset"}function h(gt,vt){for(var lt={},jt=0;jt<gt.length;jt++)for(var Yt in gt[jt])if(b(Yt)){var he={offset:gt[jt].offset,computedOffset:gt[jt].computedOffset,easing:gt[jt].easing,easingFunction:Zn(gt[jt].easing)||vt.easingFunction,value:gt[jt][Yt]};lt[Yt]=lt[Yt]||[],lt[Yt].push(he)}return lt}function v(gt,vt){var lt=[];for(var jt in gt)for(var Yt=gt[jt],he=0;he<Yt.length-1;he++){var ye=he,Wt=he+1,Oe=Yt[ye].computedOffset,He=Yt[Wt].computedOffset,Qe=Oe,An=He;he===0&&(Qe=-1/0,He===0&&(Wt=ye)),he===Yt.length-2&&(An=1/0,Oe===1&&(ye=Wt)),lt.push({applyFrom:Qe,applyTo:An,startOffset:Yt[ye].computedOffset,endOffset:Yt[Wt].computedOffset,easingFunction:Yt[ye].easingFunction,property:jt,interpolation:Y(jt,Yt[ye].value,Yt[Wt].value,vt)})}return lt.sort(function(Nn,Cn){return Nn.startOffset-Cn.startOffset}),lt}var w=function(vt,lt,jt){return function(Yt){var he=K(vt,lt,Yt);return(0,M.Z)(he)?he:jt(he)}};function Y(gt,vt,lt,jt){var Yt=c.N1[gt];if(Yt&&Yt.syntax&&Yt.int){var he=c.GZ.styleValueRegistry.getPropertySyntax(Yt.syntax);if(he){var ye=he.parser,Wt=ye?ye(vt,jt):vt,Oe=ye?ye(lt,jt):lt,He=he.mixer(Wt,Oe,jt);if(He){var Qe=w.apply(void 0,(0,pn.Z)(He));return function(An){return An===0?vt:An===1?lt:Qe(An)}}}}return w(!1,!0,function(An){return An?lt:vt})}function K(gt,vt,lt){if(typeof gt=="number"&&typeof vt=="number")return gt*(1-lt)+vt*lt;if(typeof gt=="boolean"&&typeof vt=="boolean"||typeof gt=="string"&&typeof vt=="string")return lt<.5?gt:vt;if(Array.isArray(gt)&&Array.isArray(vt)){for(var jt=gt.length,Yt=vt.length,he=Math.max(jt,Yt),ye=[],Wt=0;Wt<he;Wt++)ye.push(K(gt[Wt<jt?Wt:jt-1],vt[Wt<Yt?Wt:Yt-1],lt));return ye}throw new Error("Mismatched interpolation arguments ".concat(gt,":").concat(vt))}var it=function(){function gt(){(0,_.Z)(this,gt),this.delay=0,this.direction="normal",this.duration="auto",this._easing="linear",this.easingFunction=Ve,this.endDelay=0,this.fill="auto",this.iterationStart=0,this.iterations=1,this.currentIteration=null,this.progress=null}return(0,I.Z)(gt,[{key:"easing",get:function(){return this._easing},set:function(lt){this.easingFunction=Zn(lt),this._easing=lt}}])}();function ht(gt){var vt=[];for(var lt in gt)if(!(lt in["easing","offset","composite"])){var jt=gt[lt];Array.isArray(jt)||(jt=[jt]);for(var Yt=jt.length,he=0;he<Yt;he++){if(!vt[he]){var ye={};"offset"in gt&&(ye.offset=Number(gt.offset)),"easing"in gt&&(ye.easing=gt.easing),"composite"in gt&&(ye.composite=gt.composite),vt[he]=ye}jt[he]!==void 0&&jt[he]!==null&&(vt[he][lt]=jt[he])}}return vt.sort(function(Wt,Oe){return(Wt.computedOffset||0)-(Oe.computedOffset||0)}),vt}function Zt(gt,vt){if(gt===null)return[];Array.isArray(gt)||(gt=ht(gt));for(var lt=gt.map(function(Oe){var He={};vt!=null&&vt.composite&&(He.composite="auto");for(var Qe in Oe){var An=Oe[Qe];if(Qe==="offset"){if(An!==null){if(An=Number(An),!isFinite(An))throw new Error("Keyframe offsets must be numbers.");if(An<0||An>1)throw new Error("Keyframe offsets must be between 0 and 1.");He.computedOffset=An}}else if(Qe==="composite"&&["replace","add","accumulate","auto"].indexOf(An)===-1)throw new Error("".concat(An," compositing is not supported"));He[Qe]=An}return He.offset===void 0&&(He.offset=null),He.easing===void 0&&(He.easing=(vt==null?void 0:vt.easing)||"linear"),He.composite===void 0&&(He.composite="auto"),He}),jt=!0,Yt=-1/0,he=0;he<lt.length;he++){var ye=lt[he].offset;if((0,mn.Z)(ye))jt=!1;else{if(ye<Yt)throw new TypeError("Keyframes are not loosely sorted by offset. Sort or specify offsets.");Yt=ye}}lt=lt.filter(function(Oe){return Number(Oe.offset)>=0&&Number(Oe.offset)<=1});function Wt(){var Oe,He=lt,Qe=He.length;if(lt[Qe-1].computedOffset=Number((Oe=lt[Qe-1].offset)!==null&&Oe!==void 0?Oe:1),Qe>1){var An;lt[0].computedOffset=Number((An=lt[0].offset)!==null&&An!==void 0?An:0)}for(var Nn=0,Cn=Number(lt[0].computedOffset),Bn=1;Bn<Qe;Bn++){var jn=lt[Bn].computedOffset;if(!(0,mn.Z)(jn)&&!(0,mn.Z)(Cn)){for(var or=1;or<Bn-Nn;or++)lt[Nn+or].computedOffset=Cn+(Number(jn)-Cn)*or/(Bn-Nn);Nn=Bn,Cn=Number(jn)}}}return jt||Wt(),lt}var $="backwards|forwards|both|none".split("|"),Q="reverse|alternate|alternate-reverse".split("|");function H(gt,vt){var lt=new it;return vt&&(lt.fill="both",lt.duration="auto"),typeof gt=="number"&&!isNaN(gt)?lt.duration=gt:gt!==void 0&&Object.keys(gt).forEach(function(jt){if(gt[jt]!==void 0&>[jt]!==null&>[jt]!=="auto"){if((typeof lt[jt]=="number"||jt==="duration")&&(typeof gt[jt]!="number"||isNaN(gt[jt]))||jt==="fill"&&$.indexOf(gt[jt])===-1||jt==="direction"&&Q.indexOf(gt[jt])===-1)return;lt[jt]=gt[jt]}}),lt}function et(gt,vt){return gt=yt(gt!=null?gt:{duration:"auto"}),H(gt,vt)}function yt(gt){return typeof gt=="number"&&(isNaN(gt)?gt={duration:"auto"}:gt={duration:gt}),gt}var Xt=function(){function gt(vt,lt,jt){var Yt=this;(0,_.Z)(this,gt),this.composite="replace",this.iterationComposite="replace",this.target=vt,this.timing=et(jt,!1),this.timing.effect=this,this.timing.activeDuration=kr(this.timing),this.timing.endTime=Math.max(0,this.timing.delay+this.timing.activeDuration+this.timing.endDelay),this.normalizedKeyframes=Zt(lt,this.timing),this.interpolations=E(this.normalizedKeyframes,this.timing,this.target);var he=c.GZ.globalThis.Proxy;this.computedTiming=he?new he(this.timing,{get:function(Wt,Oe){return Oe==="duration"?Wt.duration==="auto"?0:Wt.duration:Oe==="fill"?Wt.fill==="auto"?"none":Wt.fill:Oe==="localTime"?Yt.animation&&Yt.animation.currentTime||null:Oe==="currentIteration"?!Yt.animation||Yt.animation.playState!=="running"?null:Wt.currentIteration||0:Oe==="progress"?!Yt.animation||Yt.animation.playState!=="running"?null:Wt.progress||0:Wt[Oe]},set:function(){return!0}}):this.timing}return(0,I.Z)(gt,[{key:"applyInterpolations",value:function(){this.interpolations(this.target,Number(this.timeFraction))}},{key:"update",value:function(lt){return lt===null?!1:(this.timeFraction=Nt(this.timing.activeDuration,lt,this.timing),this.timeFraction!==null)}},{key:"getKeyframes",value:function(){return this.normalizedKeyframes}},{key:"setKeyframes",value:function(lt){this.normalizedKeyframes=Zt(lt)}},{key:"getComputedTiming",value:function(){return this.computedTiming}},{key:"getTiming",value:function(){return this.timing}},{key:"updateTiming",value:function(lt){var jt=this;Object.keys(lt||{}).forEach(function(Yt){jt.timing[Yt]=lt[Yt]})}}])}();function Ot(gt,vt){return Number(gt.id)-Number(vt.id)}var Kt=function(){function gt(vt){var lt=this;(0,_.Z)(this,gt),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(jt){lt.currentTime=jt,lt.discardAnimations(),lt.animations.length===0?lt.timelineTicking=!1:lt.requestAnimationFrame(lt.webAnimationsNextTick)},this.processRafCallbacks=function(jt){var Yt=lt.rafCallbacks;lt.rafCallbacks=[],jt<Number(lt.currentTime)&&(jt=Number(lt.currentTime)),lt.animations.sort(Ot),lt.animations=lt.tick(jt,!0,lt.animations)[0],Yt.forEach(function(he){he[1](jt)}),lt.applyPendingEffects()},this.document=vt}return(0,I.Z)(gt,[{key:"getAnimations",value:function(){return this.discardAnimations(),this.animations.slice()}},{key:"isTicking",value:function(){return this.inTick}},{key:"play",value:function(lt,jt,Yt){var he=new Xt(lt,jt,Yt),ye=new cn(he,this);return this.animations.push(ye),this.restartWebAnimationsNextTick(),ye.updatePromises(),ye.play(),ye.updatePromises(),ye}},{key:"applyDirtiedAnimation",value:function(lt){var jt=this;if(!this.inTick){lt.markTarget();var Yt=lt.targetAnimations();Yt.sort(Ot);var he=this.tick(Number(this.currentTime),!1,Yt.slice())[1];he.forEach(function(ye){var Wt=jt.animations.indexOf(ye);Wt!==-1&&jt.animations.splice(Wt,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(lt){lt==null||lt.applyInterpolations()}),this.pendingEffects=[]}},{key:"updateAnimationsPromises",value:function(){this.animationsWithPromises=this.animationsWithPromises.filter(function(lt){return lt.updatePromises()})}},{key:"discardAnimations",value:function(){this.updateAnimationsPromises(),this.animations=this.animations.filter(function(lt){return lt.playState!=="finished"&<.playState!=="idle"})}},{key:"restartWebAnimationsNextTick",value:function(){this.timelineTicking||(this.timelineTicking=!0,this.requestAnimationFrame(this.webAnimationsNextTick))}},{key:"rAF",value:function(lt){var jt=this.rafId++;return this.rafCallbacks.length===0&&(this.frameId=this.document.defaultView.requestAnimationFrame(this.processRafCallbacks)),this.rafCallbacks.push([jt,lt]),jt}},{key:"requestAnimationFrame",value:function(lt){var jt=this;return this.rAF(function(Yt){jt.updateAnimationsPromises(),lt(Yt),jt.updateAnimationsPromises()})}},{key:"tick",value:function(lt,jt,Yt){var he=this,ye,Wt;this.inTick=!0,this.hasRestartedThisFrame=!1,this.currentTime=lt,this.ticking=!1;var Oe=[],He=[],Qe=[],An=[];return Yt.forEach(function(Nn){Nn.tick(lt,jt),Nn._inEffect?(He.push(Nn.effect),Nn.markTarget()):(Oe.push(Nn.effect),Nn.unmarkTarget()),Nn._needsTick&&(he.ticking=!0);var Cn=Nn._inEffect||Nn._needsTick;Nn._inTimeline=Cn,Cn?Qe.push(Nn):An.push(Nn)}),(ye=this.pendingEffects).push.apply(ye,Oe),(Wt=this.pendingEffects).push.apply(Wt,He),this.ticking&&this.requestAnimationFrame(function(){}),this.inTick=!1,[Qe,An]}}])}();c.GZ.EasingFunction=Zn,c.GZ.AnimationTimeline=Kt;},67469:function(bt,Et,y){"use strict";y.d(Et,{k:function(){return z}});var c=y(49336),_=y(54648),I=y(7663);class z extends c.Z{constructor(M){super();Vi(this,"nodeMap",new Map);Vi(this,"edgeMap",new Map);Vi(this,"inEdgesMap",new Map);Vi(this,"outEdgesMap",new Map);Vi(this,"bothEdgesMap",new Map);Vi(this,"treeIndices",new Map);Vi(this,"changes",[]);Vi(this,"batchCount",0);Vi(this,"onChanged",()=>{});Vi(this,"batch",M=>{this.batchCount+=1,M(),this.batchCount-=1,this.batchCount||this.commit()});M&&(M.nodes&&this.addNodes(M.nodes),M.edges&&this.addEdges(M.edges),M.tree&&this.addTree(M.tree),M.onChanged&&(this.onChanged=M.onChanged))}commit(){const M=this.changes;this.changes=[];const N={graph:this,changes:M};this.emit("changed",N),this.onChanged(N)}reduceChanges(M){let N=[];return M.forEach(D=>{switch(D.type){case"NodeRemoved":{let A=!1;N=N.filter(L=>{if(L.type==="NodeAdded"){const F=L.value.id===D.value.id;return F&&(A=!0),!F}else{if(L.type==="NodeDataUpdated")return L.id!==D.value.id;if(L.type==="TreeStructureChanged")return L.nodeId!==D.value.id}return!0}),A||N.push(D);break}case"EdgeRemoved":{let A=!1;N=N.filter(L=>{if(L.type==="EdgeAdded"){const F=L.value.id===D.value.id;return F&&(A=!0),!F}else if(L.type==="EdgeDataUpdated"||L.type==="EdgeUpdated")return L.id!==D.value.id;return!0}),A||N.push(D);break}case"NodeDataUpdated":case"EdgeDataUpdated":case"EdgeUpdated":{const A=N.findIndex(F=>F.type===D.type&&F.id===D.id&&(D.propertyName===void 0||F.propertyName===D.propertyName)),L=N[A];L?D.propertyName!==void 0?L.newValue=D.newValue:(N.splice(A,1),N.push(D)):N.push(D);break}case"TreeStructureDetached":{N=N.filter(A=>A.type==="TreeStructureAttached"||A.type==="TreeStructureChanged"?A.treeKey!==D.treeKey:!0),N.push(D);break}case"TreeStructureChanged":{const A=N.find(L=>L.type==="TreeStructureChanged"&&L.treeKey===D.treeKey&&L.nodeId===D.nodeId);A?A.newParentId=D.newParentId:N.push(D);break}default:N.push(D);break}}),N}checkNodeExistence(M){this.getNode(M)}hasNode(M){return this.nodeMap.has(M)}areNeighbors(M,N){return this.getNeighbors(N).some(D=>D.id===M)}getNode(M){const N=this.nodeMap.get(M);if(!N)throw new Error("Node not found for id: "+M);return N}getRelatedEdges(M,N){if(this.checkNodeExistence(M),N==="in"){const D=this.inEdgesMap.get(M);return Array.from(D)}else if(N==="out"){const D=this.outEdgesMap.get(M);return Array.from(D)}else{const D=this.bothEdgesMap.get(M);return Array.from(D)}}getDegree(M,N){return this.getRelatedEdges(M,N).length}getSuccessors(M){const D=this.getRelatedEdges(M,"out").map(A=>this.getNode(A.target));return Array.from(new Set(D))}getPredecessors(M){const D=this.getRelatedEdges(M,"in").map(A=>this.getNode(A.source));return Array.from(new Set(D))}getNeighbors(M){const N=this.getPredecessors(M),D=this.getSuccessors(M);return Array.from(new Set([...N,...D]))}doAddNode(M){if(this.hasNode(M.id))throw new Error("Node already exists: "+M.id);this.nodeMap.set(M.id,M),this.inEdgesMap.set(M.id,new Set),this.outEdgesMap.set(M.id,new Set),this.bothEdgesMap.set(M.id,new Set),this.treeIndices.forEach(N=>{N.childrenMap.set(M.id,new Set)}),this.changes.push({type:"NodeAdded",value:M})}addNodes(M){this.batch(()=>{for(const N of M)this.doAddNode(N)})}addNode(M){this.addNodes([M])}doRemoveNode(M){const N=this.getNode(M),D=this.bothEdgesMap.get(M);D==null||D.forEach(A=>this.doRemoveEdge(A.id)),this.nodeMap.delete(M),this.treeIndices.forEach(A=>{var F,rt;(F=A.childrenMap.get(M))==null||F.forEach(G=>{A.parentMap.delete(G.id)});const L=A.parentMap.get(M);L&&((rt=A.childrenMap.get(L.id))==null||rt.delete(N)),A.parentMap.delete(M),A.childrenMap.delete(M)}),this.bothEdgesMap.delete(M),this.inEdgesMap.delete(M),this.outEdgesMap.delete(M),this.changes.push({type:"NodeRemoved",value:N})}removeNodes(M){this.batch(()=>{M.forEach(N=>this.doRemoveNode(N))})}removeNode(M){this.removeNodes([M])}updateNodeDataProperty(M,N,D){const A=this.getNode(M);this.batch(()=>{const L=A.data[N],F=D;A.data[N]=F,this.changes.push({type:"NodeDataUpdated",id:M,propertyName:N,oldValue:L,newValue:F})})}mergeNodeData(M,N){this.batch(()=>{Object.entries(N).forEach(([D,A])=>{this.updateNodeDataProperty(M,D,A)})})}updateNodeData(...M){const N=M[0],D=this.getNode(N);if(typeof M[1]=="string"){this.updateNodeDataProperty(N,M[1],M[2]);return}let A;if(typeof M[1]=="function"){const L=M[1];A=L(D.data)}else typeof M[1]=="object"&&(A=M[1]);this.batch(()=>{const L=D.data,F=A;D.data=A,this.changes.push({type:"NodeDataUpdated",id:N,oldValue:L,newValue:F})})}checkEdgeExistence(M){if(!this.hasEdge(M))throw new Error("Edge not found for id: "+M)}hasEdge(M){return this.edgeMap.has(M)}getEdge(M){return this.checkEdgeExistence(M),this.edgeMap.get(M)}getEdgeDetail(M){const N=this.getEdge(M);return{edge:N,source:this.getNode(N.source),target:this.getNode(N.target)}}doAddEdge(M){if(this.hasEdge(M.id))throw new Error("Edge already exists: "+M.id);this.checkNodeExistence(M.source),this.checkNodeExistence(M.target),this.edgeMap.set(M.id,M);const N=this.inEdgesMap.get(M.target),D=this.outEdgesMap.get(M.source),A=this.bothEdgesMap.get(M.source),L=this.bothEdgesMap.get(M.target);N.add(M),D.add(M),A.add(M),L.add(M),this.changes.push({type:"EdgeAdded",value:M})}addEdges(M){this.batch(()=>{for(const N of M)this.doAddEdge(N)})}addEdge(M){this.addEdges([M])}doRemoveEdge(M){const N=this.getEdge(M),D=this.outEdgesMap.get(N.source),A=this.inEdgesMap.get(N.target),L=this.bothEdgesMap.get(N.source),F=this.bothEdgesMap.get(N.target);D.delete(N),A.delete(N),L.delete(N),F.delete(N),this.edgeMap.delete(M),this.changes.push({type:"EdgeRemoved",value:N})}removeEdges(M){this.batch(()=>{M.forEach(N=>this.doRemoveEdge(N))})}removeEdge(M){this.removeEdges([M])}updateEdgeSource(M,N){const D=this.getEdge(M);this.checkNodeExistence(N);const A=D.source,L=N;this.outEdgesMap.get(A).delete(D),this.bothEdgesMap.get(A).delete(D),this.outEdgesMap.get(L).add(D),this.bothEdgesMap.get(L).add(D),D.source=N,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:M,propertyName:"source",oldValue:A,newValue:L})})}updateEdgeTarget(M,N){const D=this.getEdge(M);this.checkNodeExistence(N);const A=D.target,L=N;this.inEdgesMap.get(A).delete(D),this.bothEdgesMap.get(A).delete(D),this.inEdgesMap.get(L).add(D),this.bothEdgesMap.get(L).add(D),D.target=N,this.batch(()=>{this.changes.push({type:"EdgeUpdated",id:M,propertyName:"target",oldValue:A,newValue:L})})}updateEdgeDataProperty(M,N,D){const A=this.getEdge(M);this.batch(()=>{const L=A.data[N],F=D;A.data[N]=F,this.changes.push({type:"EdgeDataUpdated",id:M,propertyName:N,oldValue:L,newValue:F})})}updateEdgeData(...M){const N=M[0],D=this.getEdge(N);if(typeof M[1]=="string"){this.updateEdgeDataProperty(N,M[1],M[2]);return}let A;if(typeof M[1]=="function"){const L=M[1];A=L(D.data)}else typeof M[1]=="object"&&(A=M[1]);this.batch(()=>{const L=D.data,F=A;D.data=A,this.changes.push({type:"EdgeDataUpdated",id:N,oldValue:L,newValue:F})})}mergeEdgeData(M,N){this.batch(()=>{Object.entries(N).forEach(([D,A])=>{this.updateEdgeDataProperty(M,D,A)})})}checkTreeExistence(M){if(!this.hasTreeStructure(M))throw new Error("Tree structure not found for treeKey: "+M)}hasTreeStructure(M){return this.treeIndices.has(M)}attachTreeStructure(M){this.treeIndices.has(M)||(this.treeIndices.set(M,{parentMap:new Map,childrenMap:new Map}),this.batch(()=>{this.changes.push({type:"TreeStructureAttached",treeKey:M})}))}detachTreeStructure(M){this.checkTreeExistence(M),this.treeIndices.delete(M),this.batch(()=>{this.changes.push({type:"TreeStructureDetached",treeKey:M})})}addTree(M,N){this.batch(()=>{this.attachTreeStructure(N);const D=[],A=Array.isArray(M)?M:[M];for(;A.length;){const L=A.shift();D.push(L),L.children&&A.push(...L.children)}this.addNodes(D),D.forEach(L=>{var F;(F=L.children)==null||F.forEach(rt=>{this.setParent(rt.id,L.id,N)})})})}getRoots(M){return this.checkTreeExistence(M),this.getAllNodes().filter(N=>!this.getParent(N.id,M))}getChildren(M,N){this.checkNodeExistence(M),this.checkTreeExistence(N);const A=this.treeIndices.get(N).childrenMap.get(M);return Array.from(A||[])}getParent(M,N){return this.checkNodeExistence(M),this.checkTreeExistence(N),this.treeIndices.get(N).parentMap.get(M)||null}getAncestors(M,N){const D=[];let A=this.getNode(M),L;for(;L=this.getParent(A.id,N);)D.push(L),A=L;return D}setParent(M,N,D){var kt,ft;this.checkTreeExistence(D);const A=this.treeIndices.get(D);if(!A)return;const L=this.getNode(M),F=A.parentMap.get(M);if((F==null?void 0:F.id)===N)return;if(N==null){F&&((kt=A.childrenMap.get(F.id))==null||kt.delete(L)),A.parentMap.delete(M);return}const rt=this.getNode(N);A.parentMap.set(M,rt),F&&((ft=A.childrenMap.get(F.id))==null||ft.delete(L));let G=A.childrenMap.get(rt.id);G||(G=new Set,A.childrenMap.set(rt.id,G)),G.add(L),this.batch(()=>{this.changes.push({type:"TreeStructureChanged",treeKey:D,nodeId:M,oldParentId:F==null?void 0:F.id,newParentId:rt.id})})}dfsTree(M,N,D){const A=L=>this.getChildren(L,D);return(0,I.I)(this.getNode(M),new Set,N,A)}bfsTree(M,N,D){const A=L=>this.getChildren(L,D);return(0,I.O)([this.getNode(M)],new Set,N,A)}getAllNodes(){return Array.from(this.nodeMap.values())}getAllEdges(){return Array.from(this.edgeMap.values())}bfs(M,N,D="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[D];return(0,I.O)([this.getNode(M)],new Set,N,A)}dfs(M,N,D="out"){const A={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[D];return(0,I.I)(this.getNode(M),new Set,N,A)}clone(){const M=this.getAllNodes().map(A=>nd(_l({},A),{data:_l({},A.data)})),N=this.getAllEdges().map(A=>nd(_l({},A),{data:_l({},A.data)})),D=new z({nodes:M,edges:N});return this.treeIndices.forEach(({parentMap:A,childrenMap:L},F)=>{const rt=new Map;A.forEach((kt,ft)=>{rt.set(ft,D.getNode(kt.id))});const G=new Map;L.forEach((kt,ft)=>{G.set(ft,new Set(Array.from(kt).map(J=>D.getNode(J.id))))}),D.treeIndices.set(F,{parentMap:rt,childrenMap:G})}),D}toJSON(){return JSON.stringify({nodes:this.getAllNodes(),edges:this.getAllEdges()})}createView(M){return new _.t(_l({graph:this},M))}}},54648:function(bt,Et,y){"use strict";y.d(Et,{t:function(){return I}});var c=y(7663);const _=()=>!0;class I{constructor(S){Vi(this,"graph");Vi(this,"nodeFilter");Vi(this,"edgeFilter");Vi(this,"cacheEnabled");Vi(this,"inEdgesMap",new Map);Vi(this,"outEdgesMap",new Map);Vi(this,"bothEdgesMap",new Map);Vi(this,"allNodesMap",new Map);Vi(this,"allEdgesMap",new Map);Vi(this,"clearCache",()=>{this.inEdgesMap.clear(),this.outEdgesMap.clear(),this.bothEdgesMap.clear(),this.allNodesMap.clear(),this.allEdgesMap.clear()});Vi(this,"refreshCache",()=>{this.clearCache(),this.updateCache(this.graph.getAllNodes().map(S=>S.id))});Vi(this,"updateCache",S=>{const R=new Set;S.forEach(M=>{const N=this.bothEdgesMap.get(M);if(N&&N.forEach(D=>R.add(D.id)),!this.hasNode(M))this.inEdgesMap.delete(M),this.outEdgesMap.delete(M),this.bothEdgesMap.delete(M),this.allNodesMap.delete(M);else{const D=this.graph.getRelatedEdges(M,"in").filter(this.edgeFilter),A=this.graph.getRelatedEdges(M,"out").filter(this.edgeFilter),L=Array.from(new Set([...D,...A]));L.forEach(F=>R.add(F.id)),this.inEdgesMap.set(M,D),this.outEdgesMap.set(M,A),this.bothEdgesMap.set(M,L),this.allNodesMap.set(M,this.graph.getNode(M))}}),R.forEach(M=>{this.hasEdge(M)?this.allEdgesMap.set(M,this.graph.getEdge(M)):this.allEdgesMap.delete(M)})});Vi(this,"handleGraphChanged",S=>{const R=new Set;S.changes.forEach(M=>{switch(M.type){case"NodeAdded":R.add(M.value.id);break;case"NodeDataUpdated":R.add(M.id);break;case"EdgeAdded":R.add(M.value.source),R.add(M.value.target);break;case"EdgeUpdated":(M.propertyName==="source"||M.propertyName==="target")&&(R.add(M.oldValue),R.add(M.newValue));break;case"EdgeDataUpdated":if(S.graph.hasEdge(M.id)){const N=S.graph.getEdge(M.id);R.add(N.source),R.add(N.target)}break;case"EdgeRemoved":R.add(M.value.source),R.add(M.value.target);break;case"NodeRemoved":R.add(M.value.id);break;default:break}}),this.updateCache(R)});this.graph=S.graph;const R=S.nodeFilter||_,M=S.edgeFilter||_;this.nodeFilter=R,this.edgeFilter=N=>{const{source:D,target:A}=this.graph.getEdgeDetail(N.id);return!R(D)||!R(A)?!1:M(N,D,A)},S.cache==="auto"?(this.cacheEnabled=!0,this.startAutoCache()):S.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(S){this.getNode(S)}hasNode(S){if(!this.graph.hasNode(S))return!1;const R=this.graph.getNode(S);return this.nodeFilter(R)}areNeighbors(S,R){return this.checkNodeExistence(S),this.getNeighbors(R).some(M=>M.id===S)}getNode(S){const R=this.graph.getNode(S);if(!this.nodeFilter(R))throw new Error("Node not found for id: "+S);return R}getRelatedEdges(S,R){return this.checkNodeExistence(S),this.cacheEnabled?R==="in"?this.inEdgesMap.get(S):R==="out"?this.outEdgesMap.get(S):this.bothEdgesMap.get(S):this.graph.getRelatedEdges(S,R).filter(this.edgeFilter)}getDegree(S,R){return this.getRelatedEdges(S,R).length}getSuccessors(S){const M=this.getRelatedEdges(S,"out").map(N=>this.getNode(N.target));return Array.from(new Set(M))}getPredecessors(S){const M=this.getRelatedEdges(S,"in").map(N=>this.getNode(N.source));return Array.from(new Set(M))}getNeighbors(S){const R=this.getPredecessors(S),M=this.getSuccessors(S);return Array.from(new Set([...R,...M]))}hasEdge(S){if(!this.graph.hasEdge(S))return!1;const R=this.graph.getEdge(S);return this.edgeFilter(R)}getEdge(S){const R=this.graph.getEdge(S);if(!this.edgeFilter(R))throw new Error("Edge not found for id: "+S);return R}getEdgeDetail(S){const R=this.getEdge(S);return{edge:R,source:this.getNode(R.source),target:this.getNode(R.target)}}hasTreeStructure(S){return this.graph.hasTreeStructure(S)}getRoots(S){return this.graph.getRoots(S).filter(this.nodeFilter)}getChildren(S,R){return this.checkNodeExistence(S),this.graph.getChildren(S,R).filter(this.nodeFilter)}getParent(S,R){this.checkNodeExistence(S);const M=this.graph.getParent(S,R);return!M||!this.nodeFilter(M)?null:M}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(S,R,M="out"){const N={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[M];(0,c.O)([this.getNode(S)],new Set,R,N)}dfs(S,R,M="out"){const N={in:this.getPredecessors.bind(this),out:this.getSuccessors.bind(this),both:this.getNeighbors.bind(this)}[M];(0,c.I)(this.getNode(S),new Set,R,N)}}},7663:function(bt,Et,y){"use strict";y.d(Et,{I:function(){return _},O:function(){return c}});function c(I,z,S,R){for(;I.length;){const M=I.shift();if(S(M))return!0;z.add(M.id),R(M.id).forEach(D=>{z.has(D.id)||(z.add(D.id),I.push(D))})}return!1}function _(I,z,S,R){if(S(I))return!0;z.add(I.id);for(const N of R(I.id))if(!z.has(N.id)&&_(N,z,S,R))return!0;return!1}},13722:function(bt){(function(y,c){bt.exports=c()})(typeof self!="undefined"?self:this,function(){return function(Et){var y={};function c(_){if(y[_])return y[_].exports;var I=y[_]={i:_,l:!1,exports:{}};return Et[_].call(I.exports,I,I.exports,c),I.l=!0,I.exports}return c.m=Et,c.c=y,c.d=function(_,I,z){c.o(_,I)||Object.defineProperty(_,I,{configurable:!1,enumerable:!0,get:z})},c.n=function(_){var I=_&&_.__esModule?function(){return _.default}:function(){return _};return c.d(I,"a",I),I},c.o=function(_,I){return Object.prototype.hasOwnProperty.call(_,I)},c.p="",c(c.s=5)}([function(Et,y){function c(_,I,z,S){return S===void 0&&(S="height"),z==="center"?(_[S]+I[S])/2:_.height}Et.exports={assign:Object.assign,getHeight:c}},function(Et,y,c){var _=c(3),I=function(){function z(R,M){M===void 0&&(M={});var N=this;N.options=M,N.rootNode=_(R,M)}var S=z.prototype;return S.execute=function(){throw new Error("please override this method")},z}();Et.exports=I},function(Et,y,c){var _=c(4),I=["LR","RL","TB","BT","H","V"],z=["LR","RL","H"],S=function(D){return z.indexOf(D)>-1},R=I[0];Et.exports=function(N,D,A){var L=D.direction||R;if(D.isHorizontal=S(L),L&&I.indexOf(L)===-1)throw new TypeError("Invalid direction: "+L);if(L===I[0])A(N,D);else if(L===I[1])A(N,D),N.right2left();else if(L===I[2])A(N,D);else if(L===I[3])A(N,D),N.bottom2top();else if(L===I[4]||L===I[5]){var F=_(N,D),rt=F.left,G=F.right;A(rt,D),A(G,D),D.isHorizontal?rt.right2left():rt.bottom2top(),G.translate(rt.x-G.x,rt.y-G.y),N.x=rt.x,N.y=G.y;var kt=N.getBoundingBox();D.isHorizontal?kt.top<0&&N.translate(0,-kt.top):kt.left<0&&N.translate(-kt.left,0)}var ft=D.fixedRoot;return ft===void 0&&(ft=!0),ft&&N.translate(-(N.x+N.width/2+N.hgap),-(N.y+N.height/2+N.vgap)),M(N,D),N};function M(N,D){if(D.radial){var A=D.isHorizontal?["x","y"]:["y","x"],L=A[0],F=A[1],rt={x:1/0,y:1/0},G={x:-1/0,y:-1/0},kt=0;N.DFTraverse(function(Rt){kt++;var Tt=Rt.x,Vt=Rt.y;rt.x=Math.min(rt.x,Tt),rt.y=Math.min(rt.y,Vt),G.x=Math.max(G.x,Tt),G.y=Math.max(G.y,Vt)});var ft=G[F]-rt[F];if(ft===0)return;var J=Math.PI*2/kt;N.DFTraverse(function(Rt){var Tt=(Rt[F]-rt[F])/ft*(Math.PI*2-J)+J,Vt=Rt[L]-N[L];Rt.x=Math.cos(Tt)*Vt,Rt.y=Math.sin(Tt)*Vt})}}},function(Et,y,c){var _=c(0),I=18,z=I*2,S=I,R={getId:function(A){return A.id||A.name},getPreH:function(A){return A.preH||0},getPreV:function(A){return A.preV||0},getHGap:function(A){return A.hgap||S},getVGap:function(A){return A.vgap||S},getChildren:function(A){return A.children},getHeight:function(A){return A.height||z},getWidth:function(A){var L=A.label||" ";return A.width||L.split("").length*I}};function M(D,A){var L=this;if(L.vgap=L.hgap=0,D instanceof M)return D;L.data=D;var F=A.getHGap(D),rt=A.getVGap(D);return L.preH=A.getPreH(D),L.preV=A.getPreV(D),L.width=A.getWidth(D),L.height=A.getHeight(D),L.width+=L.preH,L.height+=L.preV,L.id=A.getId(D),L.x=L.y=0,L.depth=0,L.children||(L.children=[]),L.addGap(F,rt),L}_.assign(M.prototype,{isRoot:function(){return this.depth===0},isLeaf:function(){return this.children.length===0},addGap:function(A,L){var F=this;F.hgap+=A,F.vgap+=L,F.width+=2*A,F.height+=2*L},eachNode:function(A){for(var L=this,F=[L],rt;rt=F.shift();)A(rt),F=rt.children.concat(F)},DFTraverse:function(A){this.eachNode(A)},BFTraverse:function(A){for(var L=this,F=[L],rt;rt=F.shift();)A(rt),F=F.concat(rt.children)},getBoundingBox:function(){var A={left:Number.MAX_VALUE,top:Number.MAX_VALUE,width:0,height:0};return this.eachNode(function(L){A.left=Math.min(A.left,L.x),A.top=Math.min(A.top,L.y),A.width=Math.max(A.width,L.x+L.width),A.height=Math.max(A.height,L.y+L.height)}),A},translate:function(A,L){A===void 0&&(A=0),L===void 0&&(L=0),this.eachNode(function(F){F.x+=A,F.y+=L,F.x+=F.preH,F.y+=F.preV})},right2left:function(){var A=this,L=A.getBoundingBox();A.eachNode(function(F){F.x=F.x-(F.x-L.left)*2-F.width}),A.translate(L.width,0)},bottom2top:function(){var A=this,L=A.getBoundingBox();A.eachNode(function(F){F.y=F.y-(F.y-L.top)*2-F.height}),A.translate(0,L.height)}});function N(D,A,L){A===void 0&&(A={}),A=_.assign({},R,A);var F=new M(D,A),rt=[F],G;if(!L&&!D.collapsed){for(;G=rt.shift();)if(!G.data.collapsed){var kt=A.getChildren(G.data),ft=kt?kt.length:0;if(G.children=new Array(ft),kt&&ft)for(var J=0;J<ft;J++){var Rt=new M(kt[J],A);G.children[J]=Rt,rt.push(Rt),Rt.parent=G,Rt.depth=G.depth+1}}}return F}Et.exports=N},function(Et,y,c){var _=c(3);Et.exports=function(I,z){for(var S=_(I.data,z,!0),R=_(I.data,z,!0),M=I.children.length,N=Math.round(M/2),D=z.getSide||function(rt,G){return G<N?"right":"left"},A=0;A<M;A++){var L=I.children[A],F=D(L,A);F==="right"?R.children.push(L):S.children.push(L)}return S.eachNode(function(rt){rt.isRoot()||(rt.side="left")}),R.eachNode(function(rt){rt.isRoot()||(rt.side="right")}),{left:S,right:R}}},function(Et,y,c){var _={compactBox:c(6),dendrogram:c(8),indented:c(10),mindmap:c(12)};Et.exports=_},function(Et,y,c){function _(L,F){L.prototype=Object.create(F.prototype),L.prototype.constructor=L,I(L,F)}function I(L,F){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,G){return rt.__proto__=G,rt},I(L,F)}var z=c(1),S=c(7),R=c(2),M=c(0),N=function(L){function F(){return L.apply(this,arguments)||this}_(F,L);var rt=F.prototype;return rt.execute=function(){var kt=this;return R(kt.rootNode,kt.options,S)},F}(z),D={};function A(L,F){return F=M.assign({},D,F),new N(L,F).execute()}Et.exports=A},function(Et,y){function c(M,N,D,A){A===void 0&&(A=[]);var L=this;L.w=M||0,L.h=N||0,L.y=D||0,L.x=0,L.c=A||[],L.cs=A.length,L.prelim=0,L.mod=0,L.shift=0,L.change=0,L.tl=null,L.tr=null,L.el=null,L.er=null,L.msel=0,L.mser=0}c.fromNode=function(M,N){if(!M)return null;var D=[];return M.children.forEach(function(A){D.push(c.fromNode(A,N))}),N?new c(M.height,M.width,M.x,D):new c(M.width,M.height,M.y,D)};function _(M,N,D){D?M.y+=N:M.x+=N,M.children.forEach(function(A){_(A,N,D)})}function I(M,N){var D=N?M.y:M.x;return M.children.forEach(function(A){D=Math.min(I(A,N),D)}),D}function z(M,N){var D=I(M,N);_(M,-D,N)}function S(M,N,D){D?N.y=M.x:N.x=M.x,M.c.forEach(function(A,L){S(A,N.children[L],D)})}function R(M,N,D){D===void 0&&(D=0),N?(M.x=D,D+=M.width):(M.y=D,D+=M.height),M.children.forEach(function(A){R(A,N,D)})}Et.exports=function(M,N){N===void 0&&(N={});var D=N.isHorizontal;function A(we){if(we.cs===0){L(we);return}A(we.c[0]);for(var ne=Ce(ft(we.c[0].el),0,null),We=1;We<we.cs;++We){A(we.c[We]);var rn=ft(we.c[We].er);F(we,We,ne),ne=Ce(rn,We,ne)}Tt(we),L(we)}function L(we){we.cs===0?(we.el=we,we.er=we,we.msel=we.mser=0):(we.el=we.c[0].el,we.msel=we.c[0].msel,we.er=we.c[we.cs-1].er,we.mser=we.c[we.cs-1].mser)}function F(we,ne,We){for(var rn=we.c[ne-1],Xe=rn.mod,pn=we.c[ne],Tn=pn.mod;rn!==null&&pn!==null;){ft(rn)>We.low&&(We=We.nxt);var $e=Xe+rn.prelim+rn.w-(Tn+pn.prelim);$e>0&&(Tn+=$e,rt(we,ne,We.index,$e));var mn=ft(rn),It=ft(pn);mn<=It&&(rn=kt(rn),rn!==null&&(Xe+=rn.mod)),mn>=It&&(pn=G(pn),pn!==null&&(Tn+=pn.mod))}!rn&&pn?J(we,ne,pn,Tn):rn&&!pn&&Rt(we,ne,rn,Xe)}function rt(we,ne,We,rn){we.c[ne].mod+=rn,we.c[ne].msel+=rn,we.c[ne].mser+=rn,fe(we,ne,We,rn)}function G(we){return we.cs===0?we.tl:we.c[0]}function kt(we){return we.cs===0?we.tr:we.c[we.cs-1]}function ft(we){return we.y+we.h}function J(we,ne,We,rn){var Xe=we.c[0].el;Xe.tl=We;var pn=rn-We.mod-we.c[0].msel;Xe.mod+=pn,Xe.prelim-=pn,we.c[0].el=we.c[ne].el,we.c[0].msel=we.c[ne].msel}function Rt(we,ne,We,rn){var Xe=we.c[ne].er;Xe.tr=We;var pn=rn-We.mod-we.c[ne].mser;Xe.mod+=pn,Xe.prelim-=pn,we.c[ne].er=we.c[ne-1].er,we.c[ne].mser=we.c[ne-1].mser}function Tt(we){we.prelim=(we.c[0].prelim+we.c[0].mod+we.c[we.cs-1].mod+we.c[we.cs-1].prelim+we.c[we.cs-1].w)/2-we.w/2}function Vt(we,ne){ne+=we.mod,we.x=we.prelim+ne,ue(we);for(var We=0;We<we.cs;We++)Vt(we.c[We],ne)}function fe(we,ne,We,rn){if(We!==ne-1){var Xe=ne-We;we.c[We+1].shift+=rn/Xe,we.c[ne].shift-=rn/Xe,we.c[ne].change-=rn-rn/Xe}}function ue(we){for(var ne=0,We=0,rn=0;rn<we.cs;rn++)ne+=we.c[rn].shift,We+=ne+we.c[rn].change,we.c[rn].mod+=We}function Ce(we,ne,We){for(;We!==null&&we>=We.low;)We=We.nxt;return{low:we,index:ne,nxt:We}}R(M,D);var be=c.fromNode(M,D);return A(be),Vt(be,0),S(be,M,D),z(M,D),M}},function(Et,y,c){function _(L,F){L.prototype=Object.create(F.prototype),L.prototype.constructor=L,I(L,F)}function I(L,F){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,G){return rt.__proto__=G,rt},I(L,F)}var z=c(1),S=c(9),R=c(2),M=c(0),N=function(L){function F(){return L.apply(this,arguments)||this}_(F,L);var rt=F.prototype;return rt.execute=function(){var kt=this;return kt.rootNode.width=0,R(kt.rootNode,kt.options,S)},F}(z),D={};function A(L,F){return F=M.assign({},D,F),new N(L,F).execute()}Et.exports=A},function(Et,y,c){var _=c(0);function I(R,M){R===void 0&&(R=0),M===void 0&&(M=[]);var N=this;N.x=N.y=0,N.leftChild=N.rightChild=null,N.height=0,N.children=M}var z={isHorizontal:!0,nodeSep:20,nodeSize:20,rankSep:200,subTreeSep:10};function S(R,M,N){N?(M.x=R.x,M.y=R.y):(M.x=R.y,M.y=R.x),R.children.forEach(function(D,A){S(D,M.children[A],N)})}Et.exports=function(R,M){M===void 0&&(M={}),M=_.assign({},z,M);var N=0;function D(G){if(!G)return null;G.width=0,G.depth&&G.depth>N&&(N=G.depth);var kt=G.children,ft=kt.length,J=new I(G.height,[]);return kt.forEach(function(Rt,Tt){var Vt=D(Rt);J.children.push(Vt),Tt===0&&(J.leftChild=Vt),Tt===ft-1&&(J.rightChild=Vt)}),J.originNode=G,J.isLeaf=G.isLeaf(),J}function A(G){if(G.isLeaf||G.children.length===0)G.drawingDepth=N;else{var kt=G.children.map(function(J){return A(J)}),ft=Math.min.apply(null,kt);G.drawingDepth=ft-1}return G.drawingDepth}var L;function F(G){G.x=G.drawingDepth*M.rankSep,G.isLeaf?(G.y=0,L&&(G.y=L.y+L.height+M.nodeSep,G.originNode.parent!==L.originNode.parent&&(G.y+=M.subTreeSep)),L=G):(G.children.forEach(function(kt){F(kt)}),G.y=(G.leftChild.y+G.rightChild.y)/2)}var rt=D(R);return A(rt),F(rt),S(rt,R,M.isHorizontal),R}},function(Et,y,c){function _(rt,G){rt.prototype=Object.create(G.prototype),rt.prototype.constructor=rt,I(rt,G)}function I(rt,G){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(kt,ft){return kt.__proto__=ft,kt},I(rt,G)}var z=c(1),S=c(11),R=c(4),M=c(0),N=["LR","RL","H"],D=N[0],A=function(rt){function G(){return rt.apply(this,arguments)||this}_(G,rt);var kt=G.prototype;return kt.execute=function(){var J=this,Rt=J.options,Tt=J.rootNode;Rt.isHorizontal=!0;var Vt=Rt.indent,fe=Vt===void 0?20:Vt,ue=Rt.dropCap,Ce=ue===void 0?!0:ue,be=Rt.direction,we=be===void 0?D:be,ne=Rt.align;if(we&&N.indexOf(we)===-1)throw new TypeError("Invalid direction: "+we);if(we===N[0])S(Tt,fe,Ce,ne);else if(we===N[1])S(Tt,fe,Ce,ne),Tt.right2left();else if(we===N[2]){var We=R(Tt,Rt),rn=We.left,Xe=We.right;S(rn,fe,Ce,ne),rn.right2left(),S(Xe,fe,Ce,ne);var pn=rn.getBoundingBox();Xe.translate(pn.width,0),Tt.x=Xe.x-Tt.width/2}return Tt},G}(z),L={};function F(rt,G){return G=M.assign({},L,G),new A(rt,G).execute()}Et.exports=F},function(Et,y,c){var _=c(0);function I(z,S,R,M,N){var D=(typeof R=="function"?R(z):R)*z.depth;if(!M)try{if(z.id===z.parent.children[0].id){z.x+=D,z.y=S?S.y:0;return}}catch(F){}if(z.x+=D,S){if(z.y=S.y+_.getHeight(S,z,N),S.parent&&z.parent.id!==S.parent.id){var A=S.parent,L=A.y+_.getHeight(A,z,N);z.y=L>z.y?L:z.y}}else z.y=0}Et.exports=function(z,S,R,M){var N=null;z.eachNode(function(D){I(D,N,S,R,M),N=D})}},function(Et,y,c){function _(L,F){L.prototype=Object.create(F.prototype),L.prototype.constructor=L,I(L,F)}function I(L,F){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(rt,G){return rt.__proto__=G,rt},I(L,F)}var z=c(1),S=c(13),R=c(2),M=c(0),N=function(L){function F(){return L.apply(this,arguments)||this}_(F,L);var rt=F.prototype;return rt.execute=function(){var kt=this;return R(kt.rootNode,kt.options,S)},F}(z),D={};function A(L,F){return F=M.assign({},D,F),new N(L,F).execute()}Et.exports=A},function(Et,y,c){var _=c(0);function I(R,M){var N=0;return R.children.length?R.children.forEach(function(D){N+=I(D,M)}):N=R.height,R._subTreeSep=M.getSubTreeSep(R.data),R.totalHeight=Math.max(R.height,N)+2*R._subTreeSep,R.totalHeight}function z(R){var M=R.children,N=M.length;if(N){M.forEach(function(G){z(G)});var D=M[0],A=M[N-1],L=A.y-D.y+A.height,F=0;if(M.forEach(function(G){F+=G.totalHeight}),L>R.height)R.y=D.y+L/2-R.height/2;else if(M.length!==1||R.height>F){var rt=R.y+(R.height-L)/2-D.y;M.forEach(function(G){G.translate(0,rt)})}else R.y=(D.y+D.height/2+A.y+A.height/2)/2-R.height/2}}var S={getSubTreeSep:function(){return 0}};Et.exports=function(R,M){M===void 0&&(M={}),M=_.assign({},S,M),R.parent={x:0,width:0,height:0,y:0},R.BFTraverse(function(N){N.x=N.parent.x+N.parent.width}),R.parent=null,I(R,M),R.startY=0,R.y=R.totalHeight/2-R.height/2,R.eachNode(function(N){var D=N.children,A=D.length;if(A){var L=D[0];if(L.startY=N.startY+N._subTreeSep,A===1)L.y=N.y+N.height/2-L.height/2;else{L.y=L.startY+L.totalHeight/2-L.height/2;for(var F=1;F<A;F++){var rt=D[F];rt.startY=D[F-1].startY+D[F-1].totalHeight,rt.y=rt.startY+rt.totalHeight/2-rt.height/2}}}}),z(R)}}])})},85580:function(bt,Et,y){"use strict";y.d(Et,{L:function(){return c}});function c(_){var I=document.createElement("div");I.innerHTML=_;var z=I.childNodes[0];return z&&I.contains(z)&&I.removeChild(z),z}},70208:function(bt,Et){"use strict";var y=function(c,_,I){return c<_?_:c>I?I:c};Et.Z=y},37547:function(bt,Et,y){"use strict";var c=y(39934),_=function(I){if(typeof I!="object"||I===null)return I;var z;if((0,c.Z)(I)){z=[];for(var S=0,R=I.length;S<R;S++)typeof I[S]=="object"&&I[S]!=null?z[S]=_(I[S]):z[S]=I[S]}else{z={};for(var M in I)typeof I[M]=="object"&&I[M]!=null?z[M]=_(I[M]):z[M]=I[M]}return z};Et.Z=_},78431:function(bt,Et){"use strict";function y(c,_,I){var z;return function(){var S=this,R=arguments,M=function(){z=null,I||c.apply(S,R)},N=I&&!z;clearTimeout(z),z=setTimeout(M,_),N&&c.apply(S,R)}}Et.Z=y},23343:function(bt,Et,y){"use strict";var c=y(39934),_=y(63467),I=5;function z(M,N){if(Object.hasOwn)return Object.hasOwn(M,N);if(M==null)throw new TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(M),N)}function S(M,N,D,A){D=D||0,A=A||I;for(var L in N)if(z(N,L)){var F=N[L];F!==null&&(0,_.Z)(F)?((0,_.Z)(M[L])||(M[L]={}),D<A?S(M[L],F,D+1,A):M[L]=N[L]):(0,c.Z)(F)?(M[L]=[],M[L]=M[L].concat(F)):F!==void 0&&(M[L]=F)}}var R=function(M){for(var N=[],D=1;D<arguments.length;D++)N[D-1]=arguments[D];for(var A=0;A<N.length;A+=1)S(M,N[A]);return M};Et.Z=R},47182:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return M}});var c=y(68599),_=function(N,D){if(!(0,c.Z)(N))return N;for(var A=[],L=0;L<N.length;L++){var F=N[L];D(F,L)&&A.push(F)}return A},I=_,z=function(N,D){return(0,c.Z)(N)?N.indexOf(D)>-1:!1},S=z,R=function(N,D){return D===void 0&&(D=[]),I(N,function(A){return!S(D,A)})},M=R},56039:function(bt,Et,y){"use strict";var c=y(39934),_=y(93785);function I(z,S){if(z){var R;if((0,c.Z)(z))for(var M=0,N=z.length;M<N&&(R=S(z[M],M),R!==!1);M++);else if((0,_.Z)(z)){for(var D in z)if(z.hasOwnProperty(D)&&(R=S(z[D],D),R===!1))break}}}Et.Z=I},5759:function(bt,Et,y){"use strict";var c=y(71879);Et.Z=function(_,I,z){for(var S=0,R=(0,c.Z)(I)?I.split("."):I;_&&S<R.length;)_=_[R[S++]];return _===void 0||S<R.length?z:_}},15610:function(bt,Et,y){"use strict";var c=y(39934),_=y(71018),I=Object.prototype.hasOwnProperty;function z(S,R){if(!R||!(0,c.Z)(S))return{};for(var M={},N=(0,_.Z)(R)?R:function(F){return F[R]},D,A=0;A<S.length;A++){var L=S[A];D=N(L),I.call(M,D)?M[D].push(L):M[D]=[L]}return M}Et.Z=z},68599:function(bt,Et){"use strict";var y=function(c){return c!==null&&typeof c!="function"&&isFinite(c.length)};Et.Z=y},39934:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return Array.isArray(_)}},50264:function(bt,Et,y){"use strict";var c=y(97868),_=function(I){return(0,c.Z)(I,"Boolean")};Et.Z=_},21790:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return _ instanceof Date}},42791:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return L}});var c=y(76075),_=y(68599),I={}.toString,z=function(F){return I.call(F).replace(/^\[object /,"").replace(/]$/,"")},S=z,R=Object.prototype,M=function(F){var rt=F&&F.constructor,G=typeof rt=="function"&&rt.prototype||R;return F===G},N=M,D=Object.prototype.hasOwnProperty;function A(F){if((0,c.Z)(F))return!0;if((0,_.Z)(F))return!F.length;var rt=S(F);if(rt==="Map"||rt==="Set")return!F.size;if(N(F))return!Object.keys(F).length;for(var G in F)if(D.call(F,G))return!1;return!0}var L=A},62099:function(bt,Et,y){"use strict";var c=y(60574),_=y(68599),I=y(71879),z=function(S,R){if(S===R)return!0;if(!S||!R||(0,I.Z)(S)||(0,I.Z)(R))return!1;if((0,_.Z)(S)||(0,_.Z)(R)){if(S.length!==R.length)return!1;for(var M=!0,N=0;N<S.length&&(M=z(S[N],R[N]),!!M);N++);return M}if((0,c.Z)(S)||(0,c.Z)(R)){var D=Object.keys(S),A=Object.keys(R);if(D.length!==A.length)return!1;for(var M=!0,N=0;N<D.length&&(M=z(S[D[N]],R[D[N]]),!!M);N++);return M}return!1};Et.Z=z},71018:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return typeof _=="function"}},76075:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return _==null}},5131:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=1e-5;function _(I,z,S){return S===void 0&&(S=c),I===z||Math.abs(I-z)<S}},1933:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return typeof _=="number"}},60574:function(bt,Et){"use strict";var y=function(c){return typeof c=="object"&&c!==null};Et.Z=y},93785:function(bt,Et){"use strict";Et.Z=function(y){var c=typeof y;return y!==null&&c==="object"||c==="function"}},63467:function(bt,Et,y){"use strict";var c=y(60574),_=y(97868),I=function(z){if(!(0,c.Z)(z)||!(0,_.Z)(z,"Object"))return!1;if(Object.getPrototypeOf(z)===null)return!0;for(var S=z;Object.getPrototypeOf(S)!==null;)S=Object.getPrototypeOf(S);return Object.getPrototypeOf(z)===S};Et.Z=I},71879:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return typeof _=="string"}},97868:function(bt,Et){"use strict";var y={}.toString,c=function(_,I){return y.call(_)==="[object "+I+"]"};Et.Z=c},49527:function(bt,Et){"use strict";var y=function(c){return c===void 0};Et.Z=y},45642:function(bt,Et,y){"use strict";var c=y(96862),_=function(I){var z=(0,c.Z)(I);return z.charAt(0).toLowerCase()+z.substring(1)};Et.Z=_},82639:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){if(!Array.isArray(_))return-1/0;var I=_.length;if(!I)return-1/0;for(var z=_[0],S=1;S<I;S++)z=Math.max(z,_[S]);return z}},40455:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return I}});function c(z){var S,R,M,N=z||1;function D(L,F){++S>N&&(M=R,A(1),++S),R[L]=F}function A(L){S=0,R=Object.create(null),L||(M=Object.create(null))}return A(),{clear:A,has:function(L){return R[L]!==void 0||M[L]!==void 0},get:function(L){var F=R[L];if(F!==void 0)return F;if((F=M[L])!==void 0)return D(L,F),F},set:function(L,F){R[L]!==void 0?R[L]=F:D(L,F)}}}var _=new Map;function I(z,S,R){R===void 0&&(R=128);var M=function(){for(var N=[],D=0;D<arguments.length;D++)N[D]=arguments[D];var A=S?S.apply(this,N):N[0];_.has(z)||_.set(z,c(R));var L=_.get(z);if(L.has(A))return L.get(A);var F=z.apply(this,N);return L.set(A,F),F};return M}},59895:function(bt,Et,y){"use strict";var c=y(39934);Et.Z=function(_){if((0,c.Z)(_))return _.reduce(function(I,z){return Math.min(I,z)},_[0])}},92387:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return R}});var c=y(56039),_=y(39934),I=y(63467),z=function(M,N,D){if(!(0,_.Z)(M)&&!(0,I.Z)(M))return M;var A=D;return(0,c.Z)(M,function(L,F){A=N(A,L,F)}),A},S=z,R=function(M,N){return S(M,function(D,A,L){return N.includes(L)||(D[L]=A),D},{})}},84502:function(bt,Et,y){"use strict";var c=y(56039),_=y(63467),I=Object.prototype.hasOwnProperty;Et.Z=function(z,S){if(z===null||!(0,_.Z)(z))return{};var R={};return(0,c.Z)(S,function(M){I.call(z,M)&&(R[M]=z[M])}),R}},37004:function(bt,Et,y){"use strict";var c=y(93785),_=y(71879),I=y(1933);Et.Z=function(z,S,R){var M=z,N=(0,_.Z)(S)?S.split("."):S;return N.forEach(function(D,A){A<N.length-1?((0,c.Z)(M[D])||(M[D]=(0,I.Z)(N[A+1])?[]:{}),M=M[D]):M[D]=R}),z}},62199:function(bt,Et){"use strict";Et.Z=function(y,c,_){var I,z,S,R,M=0;_||(_={});var N=function(){M=_.leading===!1?0:Date.now(),I=null,R=y.apply(z,S),I||(z=S=null)},D=function(){var A=Date.now();!M&&_.leading===!1&&(M=A);var L=c-(A-M);return z=this,S=arguments,L<=0||L>c?(I&&(clearTimeout(I),I=null),M=A,R=y.apply(z,S),I||(z=S=null)):!I&&_.trailing!==!1&&(I=setTimeout(N,L)),R};return D.cancel=function(){clearTimeout(I),M=0,I=z=S=null},D}},96862:function(bt,Et,y){"use strict";var c=y(76075);Et.Z=function(_){return(0,c.Z)(_)?"":_.toString()}},35300:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_,I){I===void 0&&(I=new Map);var z=[];if(Array.isArray(_))for(var S=0,R=_.length;S<R;S++){var M=_[S];I.has(M)||(z.push(M),I.set(M,!0))}return z}},63178:function(bt,Et){"use strict";var y={};Et.Z=function(c){return c=c||"g",y[c]?y[c]+=1:y[c]=1,c+y[c]}},18178:function(bt,Et,y){"use strict";var c=y(96862),_=function(I){var z=(0,c.Z)(I);return z.charAt(0).toUpperCase()+z.substring(1)};Et.Z=_},66045:function(bt,Et,y){"use strict";y.d(Et,{W:function(){return _}});function c(I,z,S){var R=I*Math.cos(S)-z*Math.sin(S),M=I*Math.sin(S)+z*Math.cos(S);return{x:R,y:M}}function _(I,z,S,R,M,N,D,A,L,F){var rt=I,G=z,kt=S,ft=R,J=A,Rt=L,Tt=Math.PI*120/180,Vt=Math.PI/180*(+M||0),fe=[],ue,Ce,be,we,ne;if(F)Ce=F[0],be=F[1],we=F[2],ne=F[3];else{ue=c(rt,G,-Vt),rt=ue.x,G=ue.y,ue=c(J,Rt,-Vt),J=ue.x,Rt=ue.y;var We=(rt-J)/2,rn=(G-Rt)/2,Xe=We*We/(kt*kt)+rn*rn/(ft*ft);Xe>1&&(Xe=Math.sqrt(Xe),kt*=Xe,ft*=Xe);var pn=kt*kt,Tn=ft*ft,$e=(N===D?-1:1)*Math.sqrt(Math.abs((pn*Tn-pn*rn*rn-Tn*We*We)/(pn*rn*rn+Tn*We*We)));we=$e*kt*rn/ft+(rt+J)/2,ne=$e*-ft*We/kt+(G+Rt)/2,Ce=Math.asin(((G-ne)/ft*Math.pow(10,9)>>0)/Math.pow(10,9)),be=Math.asin(((Rt-ne)/ft*Math.pow(10,9)>>0)/Math.pow(10,9)),Ce=rt<we?Math.PI-Ce:Ce,be=J<we?Math.PI-be:be,Ce<0&&(Ce=Math.PI*2+Ce),be<0&&(be=Math.PI*2+be),D&&Ce>be&&(Ce-=Math.PI*2),!D&&be>Ce&&(be-=Math.PI*2)}var mn=be-Ce;if(Math.abs(mn)>Tt){var It=be,Ee=J,cn=Rt;be=Ce+Tt*(D&&be>Ce?1:-1),J=we+kt*Math.cos(be),Rt=ne+ft*Math.sin(be),fe=_(J,Rt,kt,ft,M,0,D,Ee,cn,[be,It,we,ne])}mn=be-Ce;var sn=Math.cos(Ce),Pe=Math.sin(Ce),ze=Math.cos(be),Ke=Math.sin(be),le=Math.tan(mn/4),Ae=4/3*kt*le,Pt=4/3*ft*le,wt=[rt,G],de=[rt+Ae*Pe,G-Pt*sn],je=[J+Ae*Ke,Rt-Pt*ze],Re=[J,Rt];if(de[0]=2*wt[0]-de[0],de[1]=2*wt[1]-de[1],F)return de.concat(je,Re,fe);fe=de.concat(je,Re,fe);for(var ce=[],Le=0,xe=fe.length;Le<xe;Le+=1)ce[Le]=Le%2?c(fe[Le-1],fe[Le],Vt).y:c(fe[Le],fe[Le+1],Vt).x;return ce}},68901:function(bt,Et,y){"use strict";y.d(Et,{y:function(){return c}});function c(_,I){return Math.sqrt((_[0]-I[0])*(_[0]-I[0])+(_[1]-I[1])*(_[1]-I[1]))}},54496:function(bt,Et,y){"use strict";var c=y(59301),_=y(42441),I=y(48961),z=y.n(I),S=Object.defineProperty,R=Object.defineProperties,M=Object.getOwnPropertyDescriptors,N=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,L=(J,Rt,Tt)=>Rt in J?S(J,Rt,{enumerable:!0,configurable:!0,writable:!0,value:Tt}):J[Rt]=Tt,F=(J,Rt)=>{for(var Tt in Rt||(Rt={}))D.call(Rt,Tt)&&L(J,Tt,Rt[Tt]);if(N)for(var Tt of N(Rt))A.call(Rt,Tt)&&L(J,Tt,Rt[Tt]);return J},rt=(J,Rt)=>R(J,M(Rt));function G(J,Rt,Tt=1/3,Vt){let fe=J*Math.PI*2,ue=Rt*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(Ce,be){return Ce<fe?Math.cos(fe)*(1+Math.cos(be)*Tt):Ce>ue?Math.cos(ue)*(1+Math.cos(be)*Tt):Math.cos(Ce)*(1+Math.cos(be)*Tt)},y:function(Ce,be){return Ce<fe?Math.sin(fe)*(1+Math.cos(be)*Tt):Ce>ue?Math.sin(ue)*(1+Math.cos(be)*Tt):Math.sin(Ce)*(1+Math.cos(be)*Tt)},z:function(Ce,be){return Ce<-Math.PI*.5?Math.sin(Ce):Ce>Math.PI*2.5?Math.sin(Ce)*Vt*.1:Math.sin(be)>0?1*Vt*.1:-1}}}function kt({pieData:J=[],internalDiameterRatio:Rt=1/3}){var Tt,Vt,fe,ue;const Ce=[],be=J==null?void 0:J.reduce((Xe,pn)=>(Xe||0)+((pn==null?void 0:pn.value)||0),0);let we=0,ne=0;const We=[];for(let Xe=0;Xe<(J==null?void 0:J.length);Xe++){ne=we+(be==0?1:((Tt=J==null?void 0:J[Xe])==null?void 0:Tt.value)||0);const pn={itemStyle:((Vt=J==null?void 0:J[Xe])==null?void 0:Vt.itemStyle)||{},name:((fe=J==null?void 0:J[Xe])==null?void 0:fe.name)||`name${Xe}`,type:"surface",parametric:!0,parametricEquation:G(we/(be||(J==null?void 0:J.length)),ne/(be||(J==null?void 0:J.length)),Rt,((ue=J==null?void 0:J[Xe])==null?void 0:ue.value)||(be==0?25:0)),wireframe:{show:!1},pieData:J==null?void 0:J[Xe]};We.push(pn.name),Ce.push(pn),we=ne}return Ce.push({name:"pie2d",type:"pie",showEmptyCircle:!0,label:{show:!0,formatter:Xe=>`${Xe.value}
|
|
|
|
|
|
${Xe.name}`},startAngle:-35,radius:["49%","50%"],center:["50%","40%"],data:[...J||[]].reverse(),itemStyle:{opacity:0}}),{legend:{left:"50%",top:"center",textStyle:{fontSize:12},data:We},xAxis3D:{},yAxis3D:{},zAxis3D:{},grid3D:{viewControl:{alpha:45,rotateSensitivity:0,zoomSensitivity:0,panSensitivity:0,autoRotate:!1},left:"center",top:"-10%",show:!1,boxHeight:25},series:Ce}}const ft=({dataSource:J=[{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:Rt="",style:Tt={},legend:Vt={},internalDiameterRatio:fe=1/3})=>{const[ue,Ce]=(0,c.useState)([]),be=(0,c.useCallback)(We=>{const rn=We.selected||{},Xe=J.map(pn=>pn.name).filter(pn=>rn[pn]===!1);Ce(Xe)},[J]),we=(0,c.useMemo)(()=>J.filter(We=>!ue.includes(We.name)),[J,ue]),ne=(0,c.useMemo)(()=>{const We=kt({pieData:we,internalDiameterRatio:fe}),rn=J.map(pn=>pn.name),Xe=J.reduce((pn,Tn)=>(pn[Tn.name]=!ue.includes(Tn.name),pn),{});return We.legend=rt(F(F({},We.legend),Vt),{data:rn,selected:Xe}),We},[we,Vt,fe,J,ue]);return c.createElement(_.Z,{onEvents:{legendselectchanged:be},className:`w-full h-full ${Rt}`,option:ne,style:F({height:"100%"},Tt)})};Et.Z=ft},49529:function(bt,Et,y){"use strict";var c,_=Object.defineProperty,I=Nt=>{throw TypeError(Nt)},z=Math.pow,S=(Nt,E,b)=>E in Nt?_(Nt,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):Nt[E]=b,R=(Nt,E,b)=>S(Nt,typeof E!="symbol"?E+"":E,b),M=(Nt,E,b)=>E.has(Nt)||I("Cannot "+b),N=(Nt,E,b)=>(M(Nt,E,"read from private field"),b?b.call(Nt):E.get(Nt)),D=(Nt,E,b)=>E.has(Nt)?I("Cannot add the same private member more than once"):E instanceof WeakSet?E.add(Nt):E.set(Nt,b),A=(Nt,E,b,h)=>(M(Nt,E,"write to private field"),h?h.call(Nt,b):E.set(Nt,b),b),L=(Nt,E,b)=>(M(Nt,E,"access private method"),b),F,rt,G;c={value:!0};var kt=y(34634),ft=y(34402);const J=" ".repeat(2),Rt=" ".repeat(4);function Tt(){return Vt(this)}function Vt(Nt,E={}){const{maxRows:b=15,maxColumns:h=10,maxNumSize:v=8,padMinus:w="auto"}=E;return`${Nt.constructor.name} {
|
|
|
${J}[
|
|
|
${Rt}${fe(Nt,b,h,v,w)}
|
|
|
${J}]
|
|
|
${J}rows: ${Nt.rows}
|
|
|
${J}columns: ${Nt.columns}
|
|
|
}`}function fe(Nt,E,b,h,v){const{rows:w,columns:Y}=Nt,K=Math.min(w,E),it=Math.min(Y,b),ht=[];if(v==="auto"){v=!1;t:for(let Zt=0;Zt<K;Zt++)for(let $=0;$<it;$++)if(Nt.get(Zt,$)<0){v=!0;break t}}for(let Zt=0;Zt<K;Zt++){let $=[];for(let Q=0;Q<it;Q++)$.push(ue(Nt.get(Zt,Q),h,v));ht.push(`${$.join(" ")}`)}return it!==Y&&(ht[ht.length-1]+=` ... ${Y-b} more columns`),K!==w&&ht.push(`... ${w-E} more rows`),ht.join(`
|
|
|
${Rt}`)}function ue(Nt,E,b){return(Nt>=0&&b?` ${Ce(Nt,E-1)}`:Ce(Nt,E)).padEnd(E)}function Ce(Nt,E){let b=Nt.toString();if(b.length<=E)return b;let h=Nt.toFixed(E);if(h.length>E&&(h=Nt.toFixed(Math.max(0,E-(h.length-E)))),h.length<=E&&!h.startsWith("0.000")&&!h.startsWith("-0.000"))return h;let v=Nt.toExponential(E);return v.length>E&&(v=Nt.toExponential(Math.max(0,E-(v.length-E)))),v.slice(0)}function be(Nt,E){Nt.prototype.add=function(h){return typeof h=="number"?this.addS(h):this.addM(h)},Nt.prototype.addS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)+h);return this},Nt.prototype.addM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)+h.get(v,w));return this},Nt.add=function(h,v){return new E(h).add(v)},Nt.prototype.sub=function(h){return typeof h=="number"?this.subS(h):this.subM(h)},Nt.prototype.subS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)-h);return this},Nt.prototype.subM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)-h.get(v,w));return this},Nt.sub=function(h,v){return new E(h).sub(v)},Nt.prototype.subtract=Nt.prototype.sub,Nt.prototype.subtractS=Nt.prototype.subS,Nt.prototype.subtractM=Nt.prototype.subM,Nt.subtract=Nt.sub,Nt.prototype.mul=function(h){return typeof h=="number"?this.mulS(h):this.mulM(h)},Nt.prototype.mulS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)*h);return this},Nt.prototype.mulM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)*h.get(v,w));return this},Nt.mul=function(h,v){return new E(h).mul(v)},Nt.prototype.multiply=Nt.prototype.mul,Nt.prototype.multiplyS=Nt.prototype.mulS,Nt.prototype.multiplyM=Nt.prototype.mulM,Nt.multiply=Nt.mul,Nt.prototype.div=function(h){return typeof h=="number"?this.divS(h):this.divM(h)},Nt.prototype.divS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)/h);return this},Nt.prototype.divM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)/h.get(v,w));return this},Nt.div=function(h,v){return new E(h).div(v)},Nt.prototype.divide=Nt.prototype.div,Nt.prototype.divideS=Nt.prototype.divS,Nt.prototype.divideM=Nt.prototype.divM,Nt.divide=Nt.div,Nt.prototype.mod=function(h){return typeof h=="number"?this.modS(h):this.modM(h)},Nt.prototype.modS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)%h);return this},Nt.prototype.modM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)%h.get(v,w));return this},Nt.mod=function(h,v){return new E(h).mod(v)},Nt.prototype.modulus=Nt.prototype.mod,Nt.prototype.modulusS=Nt.prototype.modS,Nt.prototype.modulusM=Nt.prototype.modM,Nt.modulus=Nt.mod,Nt.prototype.and=function(h){return typeof h=="number"?this.andS(h):this.andM(h)},Nt.prototype.andS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)&h);return this},Nt.prototype.andM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)&h.get(v,w));return this},Nt.and=function(h,v){return new E(h).and(v)},Nt.prototype.or=function(h){return typeof h=="number"?this.orS(h):this.orM(h)},Nt.prototype.orS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)|h);return this},Nt.prototype.orM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)|h.get(v,w));return this},Nt.or=function(h,v){return new E(h).or(v)},Nt.prototype.xor=function(h){return typeof h=="number"?this.xorS(h):this.xorM(h)},Nt.prototype.xorS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)^h);return this},Nt.prototype.xorM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)^h.get(v,w));return this},Nt.xor=function(h,v){return new E(h).xor(v)},Nt.prototype.leftShift=function(h){return typeof h=="number"?this.leftShiftS(h):this.leftShiftM(h)},Nt.prototype.leftShiftS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)<<h);return this},Nt.prototype.leftShiftM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)<<h.get(v,w));return this},Nt.leftShift=function(h,v){return new E(h).leftShift(v)},Nt.prototype.signPropagatingRightShift=function(h){return typeof h=="number"?this.signPropagatingRightShiftS(h):this.signPropagatingRightShiftM(h)},Nt.prototype.signPropagatingRightShiftS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)>>h);return this},Nt.prototype.signPropagatingRightShiftM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)>>h.get(v,w));return this},Nt.signPropagatingRightShift=function(h,v){return new E(h).signPropagatingRightShift(v)},Nt.prototype.rightShift=function(h){return typeof h=="number"?this.rightShiftS(h):this.rightShiftM(h)},Nt.prototype.rightShiftS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)>>>h);return this},Nt.prototype.rightShiftM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,this.get(v,w)>>>h.get(v,w));return this},Nt.rightShift=function(h,v){return new E(h).rightShift(v)},Nt.prototype.zeroFillRightShift=Nt.prototype.rightShift,Nt.prototype.zeroFillRightShiftS=Nt.prototype.rightShiftS,Nt.prototype.zeroFillRightShiftM=Nt.prototype.rightShiftM,Nt.zeroFillRightShift=Nt.rightShift,Nt.prototype.not=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,~this.get(h,v));return this},Nt.not=function(h){return new E(h).not()},Nt.prototype.abs=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.abs(this.get(h,v)));return this},Nt.abs=function(h){return new E(h).abs()},Nt.prototype.acos=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.acos(this.get(h,v)));return this},Nt.acos=function(h){return new E(h).acos()},Nt.prototype.acosh=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.acosh(this.get(h,v)));return this},Nt.acosh=function(h){return new E(h).acosh()},Nt.prototype.asin=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.asin(this.get(h,v)));return this},Nt.asin=function(h){return new E(h).asin()},Nt.prototype.asinh=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.asinh(this.get(h,v)));return this},Nt.asinh=function(h){return new E(h).asinh()},Nt.prototype.atan=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.atan(this.get(h,v)));return this},Nt.atan=function(h){return new E(h).atan()},Nt.prototype.atanh=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.atanh(this.get(h,v)));return this},Nt.atanh=function(h){return new E(h).atanh()},Nt.prototype.cbrt=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.cbrt(this.get(h,v)));return this},Nt.cbrt=function(h){return new E(h).cbrt()},Nt.prototype.ceil=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.ceil(this.get(h,v)));return this},Nt.ceil=function(h){return new E(h).ceil()},Nt.prototype.clz32=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.clz32(this.get(h,v)));return this},Nt.clz32=function(h){return new E(h).clz32()},Nt.prototype.cos=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.cos(this.get(h,v)));return this},Nt.cos=function(h){return new E(h).cos()},Nt.prototype.cosh=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.cosh(this.get(h,v)));return this},Nt.cosh=function(h){return new E(h).cosh()},Nt.prototype.exp=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.exp(this.get(h,v)));return this},Nt.exp=function(h){return new E(h).exp()},Nt.prototype.expm1=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.expm1(this.get(h,v)));return this},Nt.expm1=function(h){return new E(h).expm1()},Nt.prototype.floor=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.floor(this.get(h,v)));return this},Nt.floor=function(h){return new E(h).floor()},Nt.prototype.fround=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.fround(this.get(h,v)));return this},Nt.fround=function(h){return new E(h).fround()},Nt.prototype.log=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.log(this.get(h,v)));return this},Nt.log=function(h){return new E(h).log()},Nt.prototype.log1p=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.log1p(this.get(h,v)));return this},Nt.log1p=function(h){return new E(h).log1p()},Nt.prototype.log10=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.log10(this.get(h,v)));return this},Nt.log10=function(h){return new E(h).log10()},Nt.prototype.log2=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.log2(this.get(h,v)));return this},Nt.log2=function(h){return new E(h).log2()},Nt.prototype.round=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.round(this.get(h,v)));return this},Nt.round=function(h){return new E(h).round()},Nt.prototype.sign=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.sign(this.get(h,v)));return this},Nt.sign=function(h){return new E(h).sign()},Nt.prototype.sin=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.sin(this.get(h,v)));return this},Nt.sin=function(h){return new E(h).sin()},Nt.prototype.sinh=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.sinh(this.get(h,v)));return this},Nt.sinh=function(h){return new E(h).sinh()},Nt.prototype.sqrt=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.sqrt(this.get(h,v)));return this},Nt.sqrt=function(h){return new E(h).sqrt()},Nt.prototype.tan=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.tan(this.get(h,v)));return this},Nt.tan=function(h){return new E(h).tan()},Nt.prototype.tanh=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.tanh(this.get(h,v)));return this},Nt.tanh=function(h){return new E(h).tanh()},Nt.prototype.trunc=function(){for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.set(h,v,Math.trunc(this.get(h,v)));return this},Nt.trunc=function(h){return new E(h).trunc()},Nt.pow=function(h,v){return new E(h).pow(v)},Nt.prototype.pow=function(h){return typeof h=="number"?this.powS(h):this.powM(h)},Nt.prototype.powS=function(h){for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,z(this.get(v,w),h));return this},Nt.prototype.powM=function(h){if(h=E.checkMatrix(h),this.rows!==h.rows||this.columns!==h.columns)throw new RangeError("Matrices dimensions must be equal");for(let v=0;v<this.rows;v++)for(let w=0;w<this.columns;w++)this.set(v,w,z(this.get(v,w),h.get(v,w)));return this}}function we(Nt,E,b){let h=b?Nt.rows:Nt.rows-1;if(E<0||E>h)throw new RangeError("Row index out of range")}function ne(Nt,E,b){let h=b?Nt.columns:Nt.columns-1;if(E<0||E>h)throw new RangeError("Column index out of range")}function We(Nt,E){if(E.to1DArray&&(E=E.to1DArray()),E.length!==Nt.columns)throw new RangeError("vector size must be the same as the number of columns");return E}function rn(Nt,E){if(E.to1DArray&&(E=E.to1DArray()),E.length!==Nt.rows)throw new RangeError("vector size must be the same as the number of rows");return E}function Xe(Nt,E){if(!kt.isAnyArray(E))throw new TypeError("row indices must be an array");for(let b=0;b<E.length;b++)if(E[b]<0||E[b]>=Nt.rows)throw new RangeError("row indices are out of range")}function pn(Nt,E){if(!kt.isAnyArray(E))throw new TypeError("column indices must be an array");for(let b=0;b<E.length;b++)if(E[b]<0||E[b]>=Nt.columns)throw new RangeError("column indices are out of range")}function Tn(Nt,E,b,h,v){if(arguments.length!==5)throw new RangeError("expected 4 arguments");if(mn("startRow",E),mn("endRow",b),mn("startColumn",h),mn("endColumn",v),E>b||h>v||E<0||E>=Nt.rows||b<0||b>=Nt.rows||h<0||h>=Nt.columns||v<0||v>=Nt.columns)throw new RangeError("Submatrix indices are out of range")}function $e(Nt,E=0){let b=[];for(let h=0;h<Nt;h++)b.push(E);return b}function mn(Nt,E){if(typeof E!="number")throw new TypeError(`${Nt} must be a number`)}function It(Nt){if(Nt.isEmpty())throw new Error("Empty matrix has no elements to index")}function Ee(Nt){let E=$e(Nt.rows);for(let b=0;b<Nt.rows;++b)for(let h=0;h<Nt.columns;++h)E[b]+=Nt.get(b,h);return E}function cn(Nt){let E=$e(Nt.columns);for(let b=0;b<Nt.rows;++b)for(let h=0;h<Nt.columns;++h)E[h]+=Nt.get(b,h);return E}function sn(Nt){let E=0;for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)E+=Nt.get(b,h);return E}function Pe(Nt){let E=$e(Nt.rows,1);for(let b=0;b<Nt.rows;++b)for(let h=0;h<Nt.columns;++h)E[b]*=Nt.get(b,h);return E}function ze(Nt){let E=$e(Nt.columns,1);for(let b=0;b<Nt.rows;++b)for(let h=0;h<Nt.columns;++h)E[h]*=Nt.get(b,h);return E}function Ke(Nt){let E=1;for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)E*=Nt.get(b,h);return E}function le(Nt,E,b){const h=Nt.rows,v=Nt.columns,w=[];for(let Y=0;Y<h;Y++){let K=0,it=0,ht=0;for(let Zt=0;Zt<v;Zt++)ht=Nt.get(Y,Zt)-b[Y],K+=ht,it+=ht*ht;E?w.push((it-K*K/v)/(v-1)):w.push((it-K*K/v)/v)}return w}function Ae(Nt,E,b){const h=Nt.rows,v=Nt.columns,w=[];for(let Y=0;Y<v;Y++){let K=0,it=0,ht=0;for(let Zt=0;Zt<h;Zt++)ht=Nt.get(Zt,Y)-b[Y],K+=ht,it+=ht*ht;E?w.push((it-K*K/h)/(h-1)):w.push((it-K*K/h)/h)}return w}function Pt(Nt,E,b){const h=Nt.rows,v=Nt.columns,w=h*v;let Y=0,K=0,it=0;for(let ht=0;ht<h;ht++)for(let Zt=0;Zt<v;Zt++)it=Nt.get(ht,Zt)-b,Y+=it,K+=it*it;return E?(K-Y*Y/w)/(w-1):(K-Y*Y/w)/w}function wt(Nt,E){for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)Nt.set(b,h,Nt.get(b,h)-E[b])}function de(Nt,E){for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)Nt.set(b,h,Nt.get(b,h)-E[h])}function je(Nt,E){for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)Nt.set(b,h,Nt.get(b,h)-E)}function Re(Nt){const E=[];for(let b=0;b<Nt.rows;b++){let h=0;for(let v=0;v<Nt.columns;v++)h+=z(Nt.get(b,v),2)/(Nt.columns-1);E.push(Math.sqrt(h))}return E}function ce(Nt,E){for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)Nt.set(b,h,Nt.get(b,h)/E[b])}function Le(Nt){const E=[];for(let b=0;b<Nt.columns;b++){let h=0;for(let v=0;v<Nt.rows;v++)h+=z(Nt.get(v,b),2)/(Nt.rows-1);E.push(Math.sqrt(h))}return E}function xe(Nt,E){for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)Nt.set(b,h,Nt.get(b,h)/E[h])}function Ft(Nt){const E=Nt.size-1;let b=0;for(let h=0;h<Nt.columns;h++)for(let v=0;v<Nt.rows;v++)b+=z(Nt.get(v,h),2)/E;return Math.sqrt(b)}function re(Nt,E){for(let b=0;b<Nt.rows;b++)for(let h=0;h<Nt.columns;h++)Nt.set(b,h,Nt.get(b,h)/E)}class Me{static from1DArray(E,b,h){if(E*b!==h.length)throw new RangeError("data length does not match given dimensions");let w=new $t(E,b);for(let Y=0;Y<E;Y++)for(let K=0;K<b;K++)w.set(Y,K,h[Y*b+K]);return w}static rowVector(E){let b=new $t(1,E.length);for(let h=0;h<E.length;h++)b.set(0,h,E[h]);return b}static columnVector(E){let b=new $t(E.length,1);for(let h=0;h<E.length;h++)b.set(h,0,E[h]);return b}static zeros(E,b){return new $t(E,b)}static ones(E,b){return new $t(E,b).fill(1)}static rand(E,b,h={}){if(typeof h!="object")throw new TypeError("options must be an object");const{random:v=Math.random}=h;let w=new $t(E,b);for(let Y=0;Y<E;Y++)for(let K=0;K<b;K++)w.set(Y,K,v());return w}static randInt(E,b,h={}){if(typeof h!="object")throw new TypeError("options must be an object");const{min:v=0,max:w=1e3,random:Y=Math.random}=h;if(!Number.isInteger(v))throw new TypeError("min must be an integer");if(!Number.isInteger(w))throw new TypeError("max must be an integer");if(v>=w)throw new RangeError("min must be smaller than max");let K=w-v,it=new $t(E,b);for(let ht=0;ht<E;ht++)for(let Zt=0;Zt<b;Zt++){let $=v+Math.round(Y()*K);it.set(ht,Zt,$)}return it}static eye(E,b,h){b===void 0&&(b=E),h===void 0&&(h=1);let v=Math.min(E,b),w=this.zeros(E,b);for(let Y=0;Y<v;Y++)w.set(Y,Y,h);return w}static diag(E,b,h){let v=E.length;b===void 0&&(b=v),h===void 0&&(h=b);let w=Math.min(v,b,h),Y=this.zeros(b,h);for(let K=0;K<w;K++)Y.set(K,K,E[K]);return Y}static min(E,b){E=this.checkMatrix(E),b=this.checkMatrix(b);let h=E.rows,v=E.columns,w=new $t(h,v);for(let Y=0;Y<h;Y++)for(let K=0;K<v;K++)w.set(Y,K,Math.min(E.get(Y,K),b.get(Y,K)));return w}static max(E,b){E=this.checkMatrix(E),b=this.checkMatrix(b);let h=E.rows,v=E.columns,w=new this(h,v);for(let Y=0;Y<h;Y++)for(let K=0;K<v;K++)w.set(Y,K,Math.max(E.get(Y,K),b.get(Y,K)));return w}static checkMatrix(E){return Me.isMatrix(E)?E:new $t(E)}static isMatrix(E){return E!=null&&E.klass==="Matrix"}get size(){return this.rows*this.columns}apply(E){if(typeof E!="function")throw new TypeError("callback must be a function");for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)E.call(this,b,h);return this}to1DArray(){let E=[];for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)E.push(this.get(b,h));return E}to2DArray(){let E=[];for(let b=0;b<this.rows;b++){E.push([]);for(let h=0;h<this.columns;h++)E[b].push(this.get(b,h))}return E}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 E=0;E<this.rows;E++)for(let b=0;b<=E;b++)if(this.get(E,b)!==this.get(b,E))return!1;return!0}return!1}isDistance(){if(!this.isSymmetric())return!1;for(let E=0;E<this.rows;E++)if(this.get(E,E)!==0)return!1;return!0}isEchelonForm(){let E=0,b=0,h=-1,v=!0,w=!1;for(;E<this.rows&&v;){for(b=0,w=!1;b<this.columns&&w===!1;)this.get(E,b)===0?b++:this.get(E,b)===1&&b>h?(w=!0,h=b):(v=!1,w=!0);E++}return v}isReducedEchelonForm(){let E=0,b=0,h=-1,v=!0,w=!1;for(;E<this.rows&&v;){for(b=0,w=!1;b<this.columns&&w===!1;)this.get(E,b)===0?b++:this.get(E,b)===1&&b>h?(w=!0,h=b):(v=!1,w=!0);for(let Y=b+1;Y<this.rows;Y++)this.get(E,Y)!==0&&(v=!1);E++}return v}echelonForm(){let E=this.clone(),b=0,h=0;for(;b<E.rows&&h<E.columns;){let v=b;for(let w=b;w<E.rows;w++)E.get(w,h)>E.get(v,h)&&(v=w);if(E.get(v,h)===0)h++;else{E.swapRows(b,v);let w=E.get(b,h);for(let Y=h;Y<E.columns;Y++)E.set(b,Y,E.get(b,Y)/w);for(let Y=b+1;Y<E.rows;Y++){let K=E.get(Y,h)/E.get(b,h);E.set(Y,h,0);for(let it=h+1;it<E.columns;it++)E.set(Y,it,E.get(Y,it)-E.get(b,it)*K)}b++,h++}}return E}reducedEchelonForm(){let E=this.echelonForm(),b=E.columns,h=E.rows,v=h-1;for(;v>=0;)if(E.maxRow(v)===0)v--;else{let w=0,Y=!1;for(;w<h&&Y===!1;)E.get(v,w)===1?Y=!0:w++;for(let K=0;K<v;K++){let it=E.get(K,w);for(let ht=w;ht<b;ht++){let Zt=E.get(K,ht)-it*E.get(v,ht);E.set(K,ht,Zt)}}v--}return E}set(){throw new Error("set method is unimplemented")}get(){throw new Error("get method is unimplemented")}repeat(E={}){if(typeof E!="object")throw new TypeError("options must be an object");const{rows:b=1,columns:h=1}=E;if(!Number.isInteger(b)||b<=0)throw new TypeError("rows must be a positive integer");if(!Number.isInteger(h)||h<=0)throw new TypeError("columns must be a positive integer");let v=new $t(this.rows*b,this.columns*h);for(let w=0;w<b;w++)for(let Y=0;Y<h;Y++)v.setSubMatrix(this,this.rows*w,this.columns*Y);return v}fill(E){for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,E);return this}neg(){return this.mulS(-1)}getRow(E){we(this,E);let b=[];for(let h=0;h<this.columns;h++)b.push(this.get(E,h));return b}getRowVector(E){return $t.rowVector(this.getRow(E))}setRow(E,b){we(this,E),b=We(this,b);for(let h=0;h<this.columns;h++)this.set(E,h,b[h]);return this}swapRows(E,b){we(this,E),we(this,b);for(let h=0;h<this.columns;h++){let v=this.get(E,h);this.set(E,h,this.get(b,h)),this.set(b,h,v)}return this}getColumn(E){ne(this,E);let b=[];for(let h=0;h<this.rows;h++)b.push(this.get(h,E));return b}getColumnVector(E){return $t.columnVector(this.getColumn(E))}setColumn(E,b){ne(this,E),b=rn(this,b);for(let h=0;h<this.rows;h++)this.set(h,E,b[h]);return this}swapColumns(E,b){ne(this,E),ne(this,b);for(let h=0;h<this.rows;h++){let v=this.get(h,E);this.set(h,E,this.get(h,b)),this.set(h,b,v)}return this}addRowVector(E){E=We(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)+E[h]);return this}subRowVector(E){E=We(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)-E[h]);return this}mulRowVector(E){E=We(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)*E[h]);return this}divRowVector(E){E=We(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)/E[h]);return this}addColumnVector(E){E=rn(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)+E[b]);return this}subColumnVector(E){E=rn(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)-E[b]);return this}mulColumnVector(E){E=rn(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)*E[b]);return this}divColumnVector(E){E=rn(this,E);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)this.set(b,h,this.get(b,h)/E[b]);return this}mulRow(E,b){we(this,E);for(let h=0;h<this.columns;h++)this.set(E,h,this.get(E,h)*b);return this}mulColumn(E,b){ne(this,E);for(let h=0;h<this.rows;h++)this.set(h,E,this.get(h,E)*b);return this}max(E){if(this.isEmpty())return NaN;switch(E){case"row":{const b=new Array(this.rows).fill(Number.NEGATIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)>b[h]&&(b[h]=this.get(h,v));return b}case"column":{const b=new Array(this.columns).fill(Number.NEGATIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)>b[v]&&(b[v]=this.get(h,v));return b}case void 0:{let b=this.get(0,0);for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)>b&&(b=this.get(h,v));return b}default:throw new Error(`invalid option: ${E}`)}}maxIndex(){It(this);let E=this.get(0,0),b=[0,0];for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)>E&&(E=this.get(h,v),b[0]=h,b[1]=v);return b}min(E){if(this.isEmpty())return NaN;switch(E){case"row":{const b=new Array(this.rows).fill(Number.POSITIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)<b[h]&&(b[h]=this.get(h,v));return b}case"column":{const b=new Array(this.columns).fill(Number.POSITIVE_INFINITY);for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)<b[v]&&(b[v]=this.get(h,v));return b}case void 0:{let b=this.get(0,0);for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)<b&&(b=this.get(h,v));return b}default:throw new Error(`invalid option: ${E}`)}}minIndex(){It(this);let E=this.get(0,0),b=[0,0];for(let h=0;h<this.rows;h++)for(let v=0;v<this.columns;v++)this.get(h,v)<E&&(E=this.get(h,v),b[0]=h,b[1]=v);return b}maxRow(E){if(we(this,E),this.isEmpty())return NaN;let b=this.get(E,0);for(let h=1;h<this.columns;h++)this.get(E,h)>b&&(b=this.get(E,h));return b}maxRowIndex(E){we(this,E),It(this);let b=this.get(E,0),h=[E,0];for(let v=1;v<this.columns;v++)this.get(E,v)>b&&(b=this.get(E,v),h[1]=v);return h}minRow(E){if(we(this,E),this.isEmpty())return NaN;let b=this.get(E,0);for(let h=1;h<this.columns;h++)this.get(E,h)<b&&(b=this.get(E,h));return b}minRowIndex(E){we(this,E),It(this);let b=this.get(E,0),h=[E,0];for(let v=1;v<this.columns;v++)this.get(E,v)<b&&(b=this.get(E,v),h[1]=v);return h}maxColumn(E){if(ne(this,E),this.isEmpty())return NaN;let b=this.get(0,E);for(let h=1;h<this.rows;h++)this.get(h,E)>b&&(b=this.get(h,E));return b}maxColumnIndex(E){ne(this,E),It(this);let b=this.get(0,E),h=[0,E];for(let v=1;v<this.rows;v++)this.get(v,E)>b&&(b=this.get(v,E),h[0]=v);return h}minColumn(E){if(ne(this,E),this.isEmpty())return NaN;let b=this.get(0,E);for(let h=1;h<this.rows;h++)this.get(h,E)<b&&(b=this.get(h,E));return b}minColumnIndex(E){ne(this,E),It(this);let b=this.get(0,E),h=[0,E];for(let v=1;v<this.rows;v++)this.get(v,E)<b&&(b=this.get(v,E),h[0]=v);return h}diag(){let E=Math.min(this.rows,this.columns),b=[];for(let h=0;h<E;h++)b.push(this.get(h,h));return b}norm(E="frobenius"){switch(E){case"max":return this.max();case"frobenius":return Math.sqrt(this.dot(this));default:throw new RangeError(`unknown norm type: ${E}`)}}cumulativeSum(){let E=0;for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)E+=this.get(b,h),this.set(b,h,E);return this}dot(E){Me.isMatrix(E)&&(E=E.to1DArray());let b=this.to1DArray();if(b.length!==E.length)throw new RangeError("vectors do not have the same size");let h=0;for(let v=0;v<b.length;v++)h+=b[v]*E[v];return h}mmul(E){E=$t.checkMatrix(E);let b=this.rows,h=this.columns,v=E.columns,w=new $t(b,v),Y=new Float64Array(h);for(let K=0;K<v;K++){for(let it=0;it<h;it++)Y[it]=E.get(it,K);for(let it=0;it<b;it++){let ht=0;for(let Zt=0;Zt<h;Zt++)ht+=this.get(it,Zt)*Y[Zt];w.set(it,K,ht)}}return w}mpow(E){if(!this.isSquare())throw new RangeError("Matrix must be square");if(!Number.isInteger(E)||E<0)throw new RangeError("Exponent must be a non-negative integer");let b=$t.eye(this.rows),h=this;for(let v=E;v>=1;v/=2)v&1&&(b=b.mmul(h)),h=h.mmul(h);return b}strassen2x2(E){E=$t.checkMatrix(E);let b=new $t(2,2);const h=this.get(0,0),v=E.get(0,0),w=this.get(0,1),Y=E.get(0,1),K=this.get(1,0),it=E.get(1,0),ht=this.get(1,1),Zt=E.get(1,1),$=(h+ht)*(v+Zt),Q=(K+ht)*v,H=h*(Y-Zt),et=ht*(it-v),yt=(h+w)*Zt,Xt=(K-h)*(v+Y),Ot=(w-ht)*(it+Zt),Kt=$+et-yt+Ot,gt=H+yt,vt=Q+et,lt=$-Q+H+Xt;return b.set(0,0,Kt),b.set(0,1,gt),b.set(1,0,vt),b.set(1,1,lt),b}strassen3x3(E){E=$t.checkMatrix(E);let b=new $t(3,3);const h=this.get(0,0),v=this.get(0,1),w=this.get(0,2),Y=this.get(1,0),K=this.get(1,1),it=this.get(1,2),ht=this.get(2,0),Zt=this.get(2,1),$=this.get(2,2),Q=E.get(0,0),H=E.get(0,1),et=E.get(0,2),yt=E.get(1,0),Xt=E.get(1,1),Ot=E.get(1,2),Kt=E.get(2,0),gt=E.get(2,1),vt=E.get(2,2),lt=(h+v+w-Y-K-Zt-$)*Xt,jt=(h-Y)*(-H+Xt),Yt=K*(-Q+H+yt-Xt-Ot-Kt+vt),he=(-h+Y+K)*(Q-H+Xt),ye=(Y+K)*(-Q+H),Wt=h*Q,Oe=(-h+ht+Zt)*(Q-et+Ot),He=(-h+ht)*(et-Ot),Qe=(ht+Zt)*(-Q+et),An=(h+v+w-K-it-ht-Zt)*Ot,Nn=Zt*(-Q+et+yt-Xt-Ot-Kt+gt),Cn=(-w+Zt+$)*(Xt+Kt-gt),Bn=(w-$)*(Xt-gt),jn=w*Kt,or=(Zt+$)*(-Kt+gt),ir=(-w+K+it)*(Ot+Kt-vt),lr=(w-it)*(Ot-vt),Vn=(K+it)*(-Kt+vt),nr=v*yt,Or=it*gt,Kr=Y*et,Wr=ht*H,dr=$*vt,Fr=Wt+jn+nr,xi=lt+he+ye+Wt+Cn+jn+or,$r=Wt+Oe+Qe+An+jn+ir+Vn,pi=jt+Yt+he+Wt+jn+ir+lr,Ri=jt+he+ye+Wt+Or,Hi=jn+ir+lr+Vn+Kr,Zi=Wt+Oe+He+Nn+Cn+Bn+jn,ca=Cn+Bn+jn+or+Wr,_a=Wt+Oe+He+Qe+dr;return b.set(0,0,Fr),b.set(0,1,xi),b.set(0,2,$r),b.set(1,0,pi),b.set(1,1,Ri),b.set(1,2,Hi),b.set(2,0,Zi),b.set(2,1,ca),b.set(2,2,_a),b}mmulStrassen(E){E=$t.checkMatrix(E);let b=this.clone(),h=b.rows,v=b.columns,w=E.rows,Y=E.columns;v!==w&&console.warn(`Multiplying ${h} x ${v} and ${w} x ${Y} matrix: dimensions do not match.`);function K($,Q,H){let et=$.rows,yt=$.columns;if(et===Q&&yt===H)return $;{let Xt=Me.zeros(Q,H);return Xt=Xt.setSubMatrix($,0,0),Xt}}let it=Math.max(h,w),ht=Math.max(v,Y);b=K(b,it,ht),E=K(E,it,ht);function Zt($,Q,H,et){if(H<=512||et<=512)return $.mmul(Q);H%2===1&&et%2===1?($=K($,H+1,et+1),Q=K(Q,H+1,et+1)):H%2===1?($=K($,H+1,et),Q=K(Q,H+1,et)):et%2===1&&($=K($,H,et+1),Q=K(Q,H,et+1));let yt=parseInt($.rows/2,10),Xt=parseInt($.columns/2,10),Ot=$.subMatrix(0,yt-1,0,Xt-1),Kt=Q.subMatrix(0,yt-1,0,Xt-1),gt=$.subMatrix(0,yt-1,Xt,$.columns-1),vt=Q.subMatrix(0,yt-1,Xt,Q.columns-1),lt=$.subMatrix(yt,$.rows-1,0,Xt-1),jt=Q.subMatrix(yt,Q.rows-1,0,Xt-1),Yt=$.subMatrix(yt,$.rows-1,Xt,$.columns-1),he=Q.subMatrix(yt,Q.rows-1,Xt,Q.columns-1),ye=Zt(Me.add(Ot,Yt),Me.add(Kt,he),yt,Xt),Wt=Zt(Me.add(lt,Yt),Kt,yt,Xt),Oe=Zt(Ot,Me.sub(vt,he),yt,Xt),He=Zt(Yt,Me.sub(jt,Kt),yt,Xt),Qe=Zt(Me.add(Ot,gt),he,yt,Xt),An=Zt(Me.sub(lt,Ot),Me.add(Kt,vt),yt,Xt),Nn=Zt(Me.sub(gt,Yt),Me.add(jt,he),yt,Xt),Cn=Me.add(ye,He);Cn.sub(Qe),Cn.add(Nn);let Bn=Me.add(Oe,Qe),jn=Me.add(Wt,He),or=Me.sub(ye,Wt);or.add(Oe),or.add(An);let ir=Me.zeros(2*Cn.rows,2*Cn.columns);return ir=ir.setSubMatrix(Cn,0,0),ir=ir.setSubMatrix(Bn,Cn.rows,0),ir=ir.setSubMatrix(jn,0,Cn.columns),ir=ir.setSubMatrix(or,Cn.rows,Cn.columns),ir.subMatrix(0,H-1,0,et-1)}return Zt(b,E,it,ht)}scaleRows(E={}){if(typeof E!="object")throw new TypeError("options must be an object");const{min:b=0,max:h=1}=E;if(!Number.isFinite(b))throw new TypeError("min must be a number");if(!Number.isFinite(h))throw new TypeError("max must be a number");if(b>=h)throw new RangeError("min must be smaller than max");let v=new $t(this.rows,this.columns);for(let w=0;w<this.rows;w++){const Y=this.getRow(w);Y.length>0&&ft(Y,{min:b,max:h,output:Y}),v.setRow(w,Y)}return v}scaleColumns(E={}){if(typeof E!="object")throw new TypeError("options must be an object");const{min:b=0,max:h=1}=E;if(!Number.isFinite(b))throw new TypeError("min must be a number");if(!Number.isFinite(h))throw new TypeError("max must be a number");if(b>=h)throw new RangeError("min must be smaller than max");let v=new $t(this.rows,this.columns);for(let w=0;w<this.columns;w++){const Y=this.getColumn(w);Y.length&&ft(Y,{min:b,max:h,output:Y}),v.setColumn(w,Y)}return v}flipRows(){const E=Math.ceil(this.columns/2);for(let b=0;b<this.rows;b++)for(let h=0;h<E;h++){let v=this.get(b,h),w=this.get(b,this.columns-1-h);this.set(b,h,w),this.set(b,this.columns-1-h,v)}return this}flipColumns(){const E=Math.ceil(this.rows/2);for(let b=0;b<this.columns;b++)for(let h=0;h<E;h++){let v=this.get(h,b),w=this.get(this.rows-1-h,b);this.set(h,b,w),this.set(this.rows-1-h,b,v)}return this}kroneckerProduct(E){E=$t.checkMatrix(E);let b=this.rows,h=this.columns,v=E.rows,w=E.columns,Y=new $t(b*v,h*w);for(let K=0;K<b;K++)for(let it=0;it<h;it++)for(let ht=0;ht<v;ht++)for(let Zt=0;Zt<w;Zt++)Y.set(v*K+ht,w*it+Zt,this.get(K,it)*E.get(ht,Zt));return Y}kroneckerSum(E){if(E=$t.checkMatrix(E),!this.isSquare()||!E.isSquare())throw new Error("Kronecker Sum needs two Square Matrices");let b=this.rows,h=E.rows,v=this.kroneckerProduct($t.eye(h,h)),w=$t.eye(b,b).kroneckerProduct(E);return v.add(w)}transpose(){let E=new $t(this.columns,this.rows);for(let b=0;b<this.rows;b++)for(let h=0;h<this.columns;h++)E.set(h,b,this.get(b,h));return E}sortRows(E=O){for(let b=0;b<this.rows;b++)this.setRow(b,this.getRow(b).sort(E));return this}sortColumns(E=O){for(let b=0;b<this.columns;b++)this.setColumn(b,this.getColumn(b).sort(E));return this}subMatrix(E,b,h,v){Tn(this,E,b,h,v);let w=new $t(b-E+1,v-h+1);for(let Y=E;Y<=b;Y++)for(let K=h;K<=v;K++)w.set(Y-E,K-h,this.get(Y,K));return w}subMatrixRow(E,b,h){if(b===void 0&&(b=0),h===void 0&&(h=this.columns-1),b>h||b<0||b>=this.columns||h<0||h>=this.columns)throw new RangeError("Argument out of range");let v=new $t(E.length,h-b+1);for(let w=0;w<E.length;w++)for(let Y=b;Y<=h;Y++){if(E[w]<0||E[w]>=this.rows)throw new RangeError(`Row index out of range: ${E[w]}`);v.set(w,Y-b,this.get(E[w],Y))}return v}subMatrixColumn(E,b,h){if(b===void 0&&(b=0),h===void 0&&(h=this.rows-1),b>h||b<0||b>=this.rows||h<0||h>=this.rows)throw new RangeError("Argument out of range");let v=new $t(h-b+1,E.length);for(let w=0;w<E.length;w++)for(let Y=b;Y<=h;Y++){if(E[w]<0||E[w]>=this.columns)throw new RangeError(`Column index out of range: ${E[w]}`);v.set(Y-b,w,this.get(Y,E[w]))}return v}setSubMatrix(E,b,h){if(E=$t.checkMatrix(E),E.isEmpty())return this;let v=b+E.rows-1,w=h+E.columns-1;Tn(this,b,v,h,w);for(let Y=0;Y<E.rows;Y++)for(let K=0;K<E.columns;K++)this.set(b+Y,h+K,E.get(Y,K));return this}selection(E,b){Xe(this,E),pn(this,b);let h=new $t(E.length,b.length);for(let v=0;v<E.length;v++){let w=E[v];for(let Y=0;Y<b.length;Y++){let K=b[Y];h.set(v,Y,this.get(w,K))}}return h}trace(){let E=Math.min(this.rows,this.columns),b=0;for(let h=0;h<E;h++)b+=this.get(h,h);return b}clone(){return this.constructor.copy(this,new $t(this.rows,this.columns))}static copy(E,b){for(const[h,v,w]of E.entries())b.set(h,v,w);return b}sum(E){switch(E){case"row":return Ee(this);case"column":return cn(this);case void 0:return sn(this);default:throw new Error(`invalid option: ${E}`)}}product(E){switch(E){case"row":return Pe(this);case"column":return ze(this);case void 0:return Ke(this);default:throw new Error(`invalid option: ${E}`)}}mean(E){const b=this.sum(E);switch(E){case"row":{for(let h=0;h<this.rows;h++)b[h]/=this.columns;return b}case"column":{for(let h=0;h<this.columns;h++)b[h]/=this.rows;return b}case void 0:return b/this.size;default:throw new Error(`invalid option: ${E}`)}}variance(E,b={}){if(typeof E=="object"&&(b=E,E=void 0),typeof b!="object")throw new TypeError("options must be an object");const{unbiased:h=!0,mean:v=this.mean(E)}=b;if(typeof h!="boolean")throw new TypeError("unbiased must be a boolean");switch(E){case"row":{if(!kt.isAnyArray(v))throw new TypeError("mean must be an array");return le(this,h,v)}case"column":{if(!kt.isAnyArray(v))throw new TypeError("mean must be an array");return Ae(this,h,v)}case void 0:{if(typeof v!="number")throw new TypeError("mean must be a number");return Pt(this,h,v)}default:throw new Error(`invalid option: ${E}`)}}standardDeviation(E,b){typeof E=="object"&&(b=E,E=void 0);const h=this.variance(E,b);if(E===void 0)return Math.sqrt(h);for(let v=0;v<h.length;v++)h[v]=Math.sqrt(h[v]);return h}center(E,b={}){if(typeof E=="object"&&(b=E,E=void 0),typeof b!="object")throw new TypeError("options must be an object");const{center:h=this.mean(E)}=b;switch(E){case"row":{if(!kt.isAnyArray(h))throw new TypeError("center must be an array");return wt(this,h),this}case"column":{if(!kt.isAnyArray(h))throw new TypeError("center must be an array");return de(this,h),this}case void 0:{if(typeof h!="number")throw new TypeError("center must be a number");return je(this,h),this}default:throw new Error(`invalid option: ${E}`)}}scale(E,b={}){if(typeof E=="object"&&(b=E,E=void 0),typeof b!="object")throw new TypeError("options must be an object");let h=b.scale;switch(E){case"row":{if(h===void 0)h=Re(this);else if(!kt.isAnyArray(h))throw new TypeError("scale must be an array");return ce(this,h),this}case"column":{if(h===void 0)h=Le(this);else if(!kt.isAnyArray(h))throw new TypeError("scale must be an array");return xe(this,h),this}case void 0:{if(h===void 0)h=Ft(this);else if(typeof h!="number")throw new TypeError("scale must be a number");return re(this,h),this}default:throw new Error(`invalid option: ${E}`)}}toString(E){return Vt(this,E)}[Symbol.iterator](){return this.entries()}*entries(){for(let E=0;E<this.rows;E++)for(let b=0;b<this.columns;b++)yield[E,b,this.get(E,b)]}*values(){for(let E=0;E<this.rows;E++)for(let b=0;b<this.columns;b++)yield this.get(E,b)}}Me.prototype.klass="Matrix",typeof Symbol!="undefined"&&(Me.prototype[Symbol.for("nodejs.util.inspect.custom")]=Tt);function O(Nt,E){return Nt-E}function st(Nt){return Nt.every(E=>typeof E=="number")}Me.random=Me.rand,Me.randomInt=Me.randInt,Me.diagonal=Me.diag,Me.prototype.diagonal=Me.prototype.diag,Me.identity=Me.eye,Me.prototype.negate=Me.prototype.neg,Me.prototype.tensorProduct=Me.prototype.kroneckerProduct;const ve=class rd extends Me{constructor(E,b){if(super(),D(this,F),R(this,"data"),rd.isMatrix(E))L(this,F,rt).call(this,E.rows,E.columns),rd.copy(E,this);else if(Number.isInteger(E)&&E>=0)L(this,F,rt).call(this,E,b);else if(kt.isAnyArray(E)){const h=E;if(E=h.length,b=E?h[0].length:0,typeof b!="number")throw new TypeError("Data must be a 2D array with at least one element");this.data=[];for(let v=0;v<E;v++){if(h[v].length!==b)throw new RangeError("Inconsistent array dimensions");if(!st(h[v]))throw new TypeError("Input data contains non-numeric values");this.data.push(Float64Array.from(h[v]))}this.rows=E,this.columns=b}else throw new TypeError("First argument must be a positive number or an array")}set(E,b,h){return this.data[E][b]=h,this}get(E,b){return this.data[E][b]}removeRow(E){return we(this,E),this.data.splice(E,1),this.rows-=1,this}addRow(E,b){return b===void 0&&(b=E,E=this.rows),we(this,E,!0),b=Float64Array.from(We(this,b)),this.data.splice(E,0,b),this.rows+=1,this}removeColumn(E){ne(this,E);for(let b=0;b<this.rows;b++){const h=new Float64Array(this.columns-1);for(let v=0;v<E;v++)h[v]=this.data[b][v];for(let v=E+1;v<this.columns;v++)h[v-1]=this.data[b][v];this.data[b]=h}return this.columns-=1,this}addColumn(E,b){typeof b=="undefined"&&(b=E,E=this.columns),ne(this,E,!0),b=rn(this,b);for(let h=0;h<this.rows;h++){const v=new Float64Array(this.columns+1);let w=0;for(;w<E;w++)v[w]=this.data[h][w];for(v[w++]=b[h];w<this.columns+1;w++)v[w]=this.data[h][w-1];this.data[h]=v}return this.columns+=1,this}};F=new WeakSet,rt=function(Nt,E){if(this.data=[],Number.isInteger(E)&&E>=0)for(let b=0;b<Nt;b++)this.data.push(new Float64Array(E));else throw new TypeError("nColumns must be a positive integer");this.rows=Nt,this.columns=E};let $t=ve;be(Me,$t);const Ie=class id extends Me{constructor(E){if(super(),D(this,G),$t.isMatrix(E)){if(!E.isSymmetric())throw new TypeError("not symmetric data");A(this,G,$t.copy(E,new $t(E.rows,E.rows)))}else if(Number.isInteger(E)&&E>=0)A(this,G,new $t(E,E));else if(A(this,G,new $t(E)),!this.isSymmetric())throw new TypeError("not symmetric data")}get size(){return N(this,G).size}get rows(){return N(this,G).rows}get columns(){return N(this,G).columns}get diagonalSize(){return this.rows}static isSymmetricMatrix(E){return $t.isMatrix(E)&&E.klassType==="SymmetricMatrix"}static zeros(E){return new this(E)}static ones(E){return new this(E).fill(1)}clone(){const E=new id(this.diagonalSize);for(const[b,h,v]of this.upperRightEntries())E.set(b,h,v);return E}toMatrix(){return new $t(this)}get(E,b){return N(this,G).get(E,b)}set(E,b,h){return N(this,G).set(E,b,h),N(this,G).set(b,E,h),this}removeCross(E){return N(this,G).removeRow(E),N(this,G).removeColumn(E),this}addCross(E,b){b===void 0&&(b=E,E=this.diagonalSize);const h=b.slice();return h.splice(E,1),N(this,G).addRow(E,h),N(this,G).addColumn(E,b),this}applyMask(E){if(E.length!==this.diagonalSize)throw new RangeError("Mask size do not match with matrix size");const b=[];for(const[h,v]of E.entries())v||b.push(h);b.reverse();for(const h of b)this.removeCross(h);return this}toCompact(){const{diagonalSize:E}=this,b=new Array(E*(E+1)/2);for(let h=0,v=0,w=0;w<b.length;w++)b[w]=this.get(v,h),++h>=E&&(h=++v);return b}static fromCompact(E){const b=E.length,h=(Math.sqrt(8*b+1)-1)/2;if(!Number.isInteger(h))throw new TypeError(`This array is not a compact representation of a Symmetric Matrix, ${JSON.stringify(E)}`);const v=new id(h);for(let w=0,Y=0,K=0;K<b;K++)v.set(w,Y,E[K]),++w>=h&&(w=++Y);return v}*upperRightEntries(){for(let E=0,b=0;E<this.diagonalSize;void 0){const h=this.get(E,b);yield[E,b,h],++b>=this.diagonalSize&&(b=++E)}}*upperRightValues(){for(let E=0,b=0;E<this.diagonalSize;void 0)yield this.get(E,b),++b>=this.diagonalSize&&(b=++E)}};G=new WeakMap;let Ne=Ie;Ne.prototype.klassType="SymmetricMatrix";class tn extends Ne{static isDistanceMatrix(E){return Ne.isSymmetricMatrix(E)&&E.klassSubType==="DistanceMatrix"}constructor(E){if(super(E),!this.isDistance())throw new TypeError("Provided arguments do no produce a distance matrix")}set(E,b,h){return E===b&&(h=0),super.set(E,b,h)}addCross(E,b){return b===void 0&&(b=E,E=this.diagonalSize),b=b.slice(),b[E]=0,super.addCross(E,b)}toSymmetricMatrix(){return new Ne(this)}clone(){const E=new tn(this.diagonalSize);for(const[b,h,v]of this.upperRightEntries())b!==h&&E.set(b,h,v);return E}toCompact(){const{diagonalSize:E}=this,b=(E-1)*E/2,h=new Array(b);for(let v=1,w=0,Y=0;Y<h.length;Y++)h[Y]=this.get(w,v),++v>=E&&(v=++w+1);return h}static fromCompact(E){const b=E.length;if(b===0)return new this(0);const h=(Math.sqrt(8*b+1)+1)/2;if(!Number.isInteger(h))throw new TypeError(`This array is not a compact representation of a DistanceMatrix, ${JSON.stringify(E)}`);const v=new this(h);for(let w=1,Y=0,K=0;K<b;K++)v.set(w,Y,E[K]),++w>=h&&(w=++Y+1);return v}}tn.prototype.klassSubType="DistanceMatrix";class Mt extends Me{constructor(E,b,h){super(),this.matrix=E,this.rows=b,this.columns=h}}class q extends Mt{constructor(E,b){ne(E,b),super(E,E.rows,1),this.column=b}set(E,b,h){return this.matrix.set(E,this.column,h),this}get(E){return this.matrix.get(E,this.column)}}class Ct extends Mt{constructor(E,b){pn(E,b),super(E,E.rows,b.length),this.columnIndices=b}set(E,b,h){return this.matrix.set(E,this.columnIndices[b],h),this}get(E,b){return this.matrix.get(E,this.columnIndices[b])}}class Ht extends Mt{constructor(E){super(E,E.rows,E.columns)}set(E,b,h){return this.matrix.set(E,this.columns-b-1,h),this}get(E,b){return this.matrix.get(E,this.columns-b-1)}}class Lt extends Mt{constructor(E){super(E,E.rows,E.columns)}set(E,b,h){return this.matrix.set(this.rows-E-1,b,h),this}get(E,b){return this.matrix.get(this.rows-E-1,b)}}class _t extends Mt{constructor(E,b){we(E,b),super(E,1,E.columns),this.row=b}set(E,b,h){return this.matrix.set(this.row,b,h),this}get(E,b){return this.matrix.get(this.row,b)}}class Ut extends Mt{constructor(E,b){Xe(E,b),super(E,b.length,E.columns),this.rowIndices=b}set(E,b,h){return this.matrix.set(this.rowIndices[E],b,h),this}get(E,b){return this.matrix.get(this.rowIndices[E],b)}}class qt extends Mt{constructor(E,b,h){Xe(E,b),pn(E,h),super(E,b.length,h.length),this.rowIndices=b,this.columnIndices=h}set(E,b,h){return this.matrix.set(this.rowIndices[E],this.columnIndices[b],h),this}get(E,b){return this.matrix.get(this.rowIndices[E],this.columnIndices[b])}}class se extends Mt{constructor(E,b,h,v,w){Tn(E,b,h,v,w),super(E,h-b+1,w-v+1),this.startRow=b,this.startColumn=v}set(E,b,h){return this.matrix.set(this.startRow+E,this.startColumn+b,h),this}get(E,b){return this.matrix.get(this.startRow+E,this.startColumn+b)}}class te extends Mt{constructor(E){super(E,E.columns,E.rows)}set(E,b,h){return this.matrix.set(b,E,h),this}get(E,b){return this.matrix.get(b,E)}}class ke extends Me{constructor(E,b={}){const{rows:h=1}=b;if(E.length%h!==0)throw new Error("the data length is not divisible by the number of rows");super(),this.rows=h,this.columns=E.length/h,this.data=E}set(E,b,h){let v=this._calculateIndex(E,b);return this.data[v]=h,this}get(E,b){let h=this._calculateIndex(E,b);return this.data[h]}_calculateIndex(E,b){return E*this.columns+b}}class Ye extends Me{constructor(E){super(),this.data=E,this.rows=E.length,this.columns=E[0].length}set(E,b,h){return this.data[E][b]=h,this}get(E,b){return this.data[E][b]}}function Ve(Nt,E){if(kt.isAnyArray(Nt))return Nt[0]&&kt.isAnyArray(Nt[0])?new Ye(Nt):new ke(Nt,E);throw new Error("the argument is not an array")}class on{constructor(E){E=Ye.checkMatrix(E);let b=E.clone(),h=b.rows,v=b.columns,w=new Float64Array(h),Y=1,K,it,ht,Zt,$,Q,H,et,yt;for(K=0;K<h;K++)w[K]=K;for(et=new Float64Array(h),it=0;it<v;it++){for(K=0;K<h;K++)et[K]=b.get(K,it);for(K=0;K<h;K++){for(yt=Math.min(K,it),$=0,ht=0;ht<yt;ht++)$+=b.get(K,ht)*et[ht];et[K]-=$,b.set(K,it,et[K])}for(Zt=it,K=it+1;K<h;K++)Math.abs(et[K])>Math.abs(et[Zt])&&(Zt=K);if(Zt!==it){for(ht=0;ht<v;ht++)Q=b.get(Zt,ht),b.set(Zt,ht,b.get(it,ht)),b.set(it,ht,Q);H=w[Zt],w[Zt]=w[it],w[it]=H,Y=-Y}if(it<h&&b.get(it,it)!==0)for(K=it+1;K<h;K++)b.set(K,it,b.get(K,it)/b.get(it,it))}this.LU=b,this.pivotVector=w,this.pivotSign=Y}isSingular(){let E=this.LU,b=E.columns;for(let h=0;h<b;h++)if(E.get(h,h)===0)return!0;return!1}solve(E){E=$t.checkMatrix(E);let b=this.LU;if(b.rows!==E.rows)throw new Error("Invalid matrix dimensions");if(this.isSingular())throw new Error("LU matrix is singular");let v=E.columns,w=E.subMatrixRow(this.pivotVector,0,v-1),Y=b.columns,K,it,ht;for(ht=0;ht<Y;ht++)for(K=ht+1;K<Y;K++)for(it=0;it<v;it++)w.set(K,it,w.get(K,it)-w.get(ht,it)*b.get(K,ht));for(ht=Y-1;ht>=0;ht--){for(it=0;it<v;it++)w.set(ht,it,w.get(ht,it)/b.get(ht,ht));for(K=0;K<ht;K++)for(it=0;it<v;it++)w.set(K,it,w.get(K,it)-w.get(ht,it)*b.get(K,ht))}return w}get determinant(){let E=this.LU;if(!E.isSquare())throw new Error("Matrix must be square");let b=this.pivotSign,h=E.columns;for(let v=0;v<h;v++)b*=E.get(v,v);return b}get lowerTriangularMatrix(){let E=this.LU,b=E.rows,h=E.columns,v=new $t(b,h);for(let w=0;w<b;w++)for(let Y=0;Y<h;Y++)w>Y?v.set(w,Y,E.get(w,Y)):w===Y?v.set(w,Y,1):v.set(w,Y,0);return v}get upperTriangularMatrix(){let E=this.LU,b=E.rows,h=E.columns,v=new $t(b,h);for(let w=0;w<b;w++)for(let Y=0;Y<h;Y++)w<=Y?v.set(w,Y,E.get(w,Y)):v.set(w,Y,0);return v}get pivotPermutationVector(){return Array.from(this.pivotVector)}}function xn(Nt,E){let b=0;return Math.abs(Nt)>Math.abs(E)?(b=E/Nt,Math.abs(Nt)*Math.sqrt(1+b*b)):E!==0?(b=Nt/E,Math.abs(E)*Math.sqrt(1+b*b)):0}class vn{constructor(E){E=Ye.checkMatrix(E);let b=E.clone(),h=E.rows,v=E.columns,w=new Float64Array(v),Y,K,it,ht;for(it=0;it<v;it++){let Zt=0;for(Y=it;Y<h;Y++)Zt=xn(Zt,b.get(Y,it));if(Zt!==0){for(b.get(it,it)<0&&(Zt=-Zt),Y=it;Y<h;Y++)b.set(Y,it,b.get(Y,it)/Zt);for(b.set(it,it,b.get(it,it)+1),K=it+1;K<v;K++){for(ht=0,Y=it;Y<h;Y++)ht+=b.get(Y,it)*b.get(Y,K);for(ht=-ht/b.get(it,it),Y=it;Y<h;Y++)b.set(Y,K,b.get(Y,K)+ht*b.get(Y,it))}}w[it]=-Zt}this.QR=b,this.Rdiag=w}solve(E){E=$t.checkMatrix(E);let b=this.QR,h=b.rows;if(E.rows!==h)throw new Error("Matrix row dimensions must agree");if(!this.isFullRank())throw new Error("Matrix is rank deficient");let v=E.columns,w=E.clone(),Y=b.columns,K,it,ht,Zt;for(ht=0;ht<Y;ht++)for(it=0;it<v;it++){for(Zt=0,K=ht;K<h;K++)Zt+=b.get(K,ht)*w.get(K,it);for(Zt=-Zt/b.get(ht,ht),K=ht;K<h;K++)w.set(K,it,w.get(K,it)+Zt*b.get(K,ht))}for(ht=Y-1;ht>=0;ht--){for(it=0;it<v;it++)w.set(ht,it,w.get(ht,it)/this.Rdiag[ht]);for(K=0;K<ht;K++)for(it=0;it<v;it++)w.set(K,it,w.get(K,it)-w.get(ht,it)*b.get(K,ht))}return w.subMatrix(0,Y-1,0,v-1)}isFullRank(){let E=this.QR.columns;for(let b=0;b<E;b++)if(this.Rdiag[b]===0)return!1;return!0}get upperTriangularMatrix(){let E=this.QR,b=E.columns,h=new $t(b,b),v,w;for(v=0;v<b;v++)for(w=0;w<b;w++)v<w?h.set(v,w,E.get(v,w)):v===w?h.set(v,w,this.Rdiag[v]):h.set(v,w,0);return h}get orthogonalMatrix(){let E=this.QR,b=E.rows,h=E.columns,v=new $t(b,h),w,Y,K,it;for(K=h-1;K>=0;K--){for(w=0;w<b;w++)v.set(w,K,0);for(v.set(K,K,1),Y=K;Y<h;Y++)if(E.get(K,K)!==0){for(it=0,w=K;w<b;w++)it+=E.get(w,K)*v.get(w,Y);for(it=-it/E.get(K,K),w=K;w<b;w++)v.set(w,Y,v.get(w,Y)+it*E.get(w,K))}}return v}}class Qn{constructor(E,b={}){if(E=Ye.checkMatrix(E),E.isEmpty())throw new Error("Matrix must be non-empty");let h=E.rows,v=E.columns;const{computeLeftSingularVectors:w=!0,computeRightSingularVectors:Y=!0,autoTranspose:K=!1}=b;let it=!!w,ht=!!Y,Zt=!1,$;if(h<v)if(!K)$=E.clone(),console.warn("Computing SVD on a matrix with more columns than rows. Consider enabling autoTranspose");else{$=E.transpose(),h=$.rows,v=$.columns,Zt=!0;let Wt=it;it=ht,ht=Wt}else $=E.clone();let Q=Math.min(h,v),H=Math.min(h+1,v),et=new Float64Array(H),yt=new $t(h,Q),Xt=new $t(v,v),Ot=new Float64Array(v),Kt=new Float64Array(h),gt=new Float64Array(H);for(let Wt=0;Wt<H;Wt++)gt[Wt]=Wt;let vt=Math.min(h-1,v),lt=Math.max(0,Math.min(v-2,h)),jt=Math.max(vt,lt);for(let Wt=0;Wt<jt;Wt++){if(Wt<vt){et[Wt]=0;for(let Oe=Wt;Oe<h;Oe++)et[Wt]=xn(et[Wt],$.get(Oe,Wt));if(et[Wt]!==0){$.get(Wt,Wt)<0&&(et[Wt]=-et[Wt]);for(let Oe=Wt;Oe<h;Oe++)$.set(Oe,Wt,$.get(Oe,Wt)/et[Wt]);$.set(Wt,Wt,$.get(Wt,Wt)+1)}et[Wt]=-et[Wt]}for(let Oe=Wt+1;Oe<v;Oe++){if(Wt<vt&&et[Wt]!==0){let He=0;for(let Qe=Wt;Qe<h;Qe++)He+=$.get(Qe,Wt)*$.get(Qe,Oe);He=-He/$.get(Wt,Wt);for(let Qe=Wt;Qe<h;Qe++)$.set(Qe,Oe,$.get(Qe,Oe)+He*$.get(Qe,Wt))}Ot[Oe]=$.get(Wt,Oe)}if(it&&Wt<vt)for(let Oe=Wt;Oe<h;Oe++)yt.set(Oe,Wt,$.get(Oe,Wt));if(Wt<lt){Ot[Wt]=0;for(let Oe=Wt+1;Oe<v;Oe++)Ot[Wt]=xn(Ot[Wt],Ot[Oe]);if(Ot[Wt]!==0){Ot[Wt+1]<0&&(Ot[Wt]=0-Ot[Wt]);for(let Oe=Wt+1;Oe<v;Oe++)Ot[Oe]/=Ot[Wt];Ot[Wt+1]+=1}if(Ot[Wt]=-Ot[Wt],Wt+1<h&&Ot[Wt]!==0){for(let Oe=Wt+1;Oe<h;Oe++)Kt[Oe]=0;for(let Oe=Wt+1;Oe<h;Oe++)for(let He=Wt+1;He<v;He++)Kt[Oe]+=Ot[He]*$.get(Oe,He);for(let Oe=Wt+1;Oe<v;Oe++){let He=-Ot[Oe]/Ot[Wt+1];for(let Qe=Wt+1;Qe<h;Qe++)$.set(Qe,Oe,$.get(Qe,Oe)+He*Kt[Qe])}}if(ht)for(let Oe=Wt+1;Oe<v;Oe++)Xt.set(Oe,Wt,Ot[Oe])}}let Yt=Math.min(v,h+1);if(vt<v&&(et[vt]=$.get(vt,vt)),h<Yt&&(et[Yt-1]=0),lt+1<Yt&&(Ot[lt]=$.get(lt,Yt-1)),Ot[Yt-1]=0,it){for(let Wt=vt;Wt<Q;Wt++){for(let Oe=0;Oe<h;Oe++)yt.set(Oe,Wt,0);yt.set(Wt,Wt,1)}for(let Wt=vt-1;Wt>=0;Wt--)if(et[Wt]!==0){for(let Oe=Wt+1;Oe<Q;Oe++){let He=0;for(let Qe=Wt;Qe<h;Qe++)He+=yt.get(Qe,Wt)*yt.get(Qe,Oe);He=-He/yt.get(Wt,Wt);for(let Qe=Wt;Qe<h;Qe++)yt.set(Qe,Oe,yt.get(Qe,Oe)+He*yt.get(Qe,Wt))}for(let Oe=Wt;Oe<h;Oe++)yt.set(Oe,Wt,-yt.get(Oe,Wt));yt.set(Wt,Wt,1+yt.get(Wt,Wt));for(let Oe=0;Oe<Wt-1;Oe++)yt.set(Oe,Wt,0)}else{for(let Oe=0;Oe<h;Oe++)yt.set(Oe,Wt,0);yt.set(Wt,Wt,1)}}if(ht)for(let Wt=v-1;Wt>=0;Wt--){if(Wt<lt&&Ot[Wt]!==0)for(let Oe=Wt+1;Oe<v;Oe++){let He=0;for(let Qe=Wt+1;Qe<v;Qe++)He+=Xt.get(Qe,Wt)*Xt.get(Qe,Oe);He=-He/Xt.get(Wt+1,Wt);for(let Qe=Wt+1;Qe<v;Qe++)Xt.set(Qe,Oe,Xt.get(Qe,Oe)+He*Xt.get(Qe,Wt))}for(let Oe=0;Oe<v;Oe++)Xt.set(Oe,Wt,0);Xt.set(Wt,Wt,1)}let he=Yt-1,ye=Number.EPSILON;for(;Yt>0;){let Wt,Oe;for(Wt=Yt-2;Wt>=-1&&Wt!==-1;Wt--){const He=Number.MIN_VALUE+ye*Math.abs(et[Wt]+Math.abs(et[Wt+1]));if(Math.abs(Ot[Wt])<=He||Number.isNaN(Ot[Wt])){Ot[Wt]=0;break}}if(Wt===Yt-2)Oe=4;else{let He;for(He=Yt-1;He>=Wt&&He!==Wt;He--){let Qe=(He!==Yt?Math.abs(Ot[He]):0)+(He!==Wt+1?Math.abs(Ot[He-1]):0);if(Math.abs(et[He])<=ye*Qe){et[He]=0;break}}He===Wt?Oe=3:He===Yt-1?Oe=1:(Oe=2,Wt=He)}switch(Wt++,Oe){case 1:{let He=Ot[Yt-2];Ot[Yt-2]=0;for(let Qe=Yt-2;Qe>=Wt;Qe--){let An=xn(et[Qe],He),Nn=et[Qe]/An,Cn=He/An;if(et[Qe]=An,Qe!==Wt&&(He=-Cn*Ot[Qe-1],Ot[Qe-1]=Nn*Ot[Qe-1]),ht)for(let Bn=0;Bn<v;Bn++)An=Nn*Xt.get(Bn,Qe)+Cn*Xt.get(Bn,Yt-1),Xt.set(Bn,Yt-1,-Cn*Xt.get(Bn,Qe)+Nn*Xt.get(Bn,Yt-1)),Xt.set(Bn,Qe,An)}break}case 2:{let He=Ot[Wt-1];Ot[Wt-1]=0;for(let Qe=Wt;Qe<Yt;Qe++){let An=xn(et[Qe],He),Nn=et[Qe]/An,Cn=He/An;if(et[Qe]=An,He=-Cn*Ot[Qe],Ot[Qe]=Nn*Ot[Qe],it)for(let Bn=0;Bn<h;Bn++)An=Nn*yt.get(Bn,Qe)+Cn*yt.get(Bn,Wt-1),yt.set(Bn,Wt-1,-Cn*yt.get(Bn,Qe)+Nn*yt.get(Bn,Wt-1)),yt.set(Bn,Qe,An)}break}case 3:{const He=Math.max(Math.abs(et[Yt-1]),Math.abs(et[Yt-2]),Math.abs(Ot[Yt-2]),Math.abs(et[Wt]),Math.abs(Ot[Wt])),Qe=et[Yt-1]/He,An=et[Yt-2]/He,Nn=Ot[Yt-2]/He,Cn=et[Wt]/He,Bn=Ot[Wt]/He,jn=((An+Qe)*(An-Qe)+Nn*Nn)/2,or=Qe*Nn*(Qe*Nn);let ir=0;(jn!==0||or!==0)&&(jn<0?ir=0-Math.sqrt(jn*jn+or):ir=Math.sqrt(jn*jn+or),ir=or/(jn+ir));let lr=(Cn+Qe)*(Cn-Qe)+ir,Vn=Cn*Bn;for(let nr=Wt;nr<Yt-1;nr++){let Or=xn(lr,Vn);Or===0&&(Or=Number.MIN_VALUE);let Kr=lr/Or,Wr=Vn/Or;if(nr!==Wt&&(Ot[nr-1]=Or),lr=Kr*et[nr]+Wr*Ot[nr],Ot[nr]=Kr*Ot[nr]-Wr*et[nr],Vn=Wr*et[nr+1],et[nr+1]=Kr*et[nr+1],ht)for(let dr=0;dr<v;dr++)Or=Kr*Xt.get(dr,nr)+Wr*Xt.get(dr,nr+1),Xt.set(dr,nr+1,-Wr*Xt.get(dr,nr)+Kr*Xt.get(dr,nr+1)),Xt.set(dr,nr,Or);if(Or=xn(lr,Vn),Or===0&&(Or=Number.MIN_VALUE),Kr=lr/Or,Wr=Vn/Or,et[nr]=Or,lr=Kr*Ot[nr]+Wr*et[nr+1],et[nr+1]=-Wr*Ot[nr]+Kr*et[nr+1],Vn=Wr*Ot[nr+1],Ot[nr+1]=Kr*Ot[nr+1],it&&nr<h-1)for(let dr=0;dr<h;dr++)Or=Kr*yt.get(dr,nr)+Wr*yt.get(dr,nr+1),yt.set(dr,nr+1,-Wr*yt.get(dr,nr)+Kr*yt.get(dr,nr+1)),yt.set(dr,nr,Or)}Ot[Yt-2]=lr;break}case 4:{if(et[Wt]<=0&&(et[Wt]=et[Wt]<0?-et[Wt]:0,ht))for(let He=0;He<=he;He++)Xt.set(He,Wt,-Xt.get(He,Wt));for(;Wt<he&&!(et[Wt]>=et[Wt+1]);){let He=et[Wt];if(et[Wt]=et[Wt+1],et[Wt+1]=He,ht&&Wt<v-1)for(let Qe=0;Qe<v;Qe++)He=Xt.get(Qe,Wt+1),Xt.set(Qe,Wt+1,Xt.get(Qe,Wt)),Xt.set(Qe,Wt,He);if(it&&Wt<h-1)for(let Qe=0;Qe<h;Qe++)He=yt.get(Qe,Wt+1),yt.set(Qe,Wt+1,yt.get(Qe,Wt)),yt.set(Qe,Wt,He);Wt++}Yt--;break}}}if(Zt){let Wt=Xt;Xt=yt,yt=Wt}this.m=h,this.n=v,this.s=et,this.U=yt,this.V=Xt}solve(E){let b=E,h=this.threshold,v=this.s.length,w=$t.zeros(v,v);for(let Q=0;Q<v;Q++)Math.abs(this.s[Q])<=h?w.set(Q,Q,0):w.set(Q,Q,1/this.s[Q]);let Y=this.U,K=this.rightSingularVectors,it=K.mmul(w),ht=K.rows,Zt=Y.rows,$=$t.zeros(ht,Zt);for(let Q=0;Q<ht;Q++)for(let H=0;H<Zt;H++){let et=0;for(let yt=0;yt<v;yt++)et+=it.get(Q,yt)*Y.get(H,yt);$.set(Q,H,et)}return $.mmul(b)}solveForDiagonal(E){return this.solve($t.diag(E))}inverse(){let E=this.V,b=this.threshold,h=E.rows,v=E.columns,w=new $t(h,this.s.length);for(let Zt=0;Zt<h;Zt++)for(let $=0;$<v;$++)Math.abs(this.s[$])>b&&w.set(Zt,$,E.get(Zt,$)/this.s[$]);let Y=this.U,K=Y.rows,it=Y.columns,ht=new $t(h,K);for(let Zt=0;Zt<h;Zt++)for(let $=0;$<K;$++){let Q=0;for(let H=0;H<it;H++)Q+=w.get(Zt,H)*Y.get($,H);ht.set(Zt,$,Q)}return ht}get condition(){return this.s[0]/this.s[Math.min(this.m,this.n)-1]}get norm2(){return this.s[0]}get rank(){let E=Math.max(this.m,this.n)*this.s[0]*Number.EPSILON,b=0,h=this.s;for(let v=0,w=h.length;v<w;v++)h[v]>E&&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 $t.diag(this.s)}}function Ln(Nt,E=!1){return Nt=Ye.checkMatrix(Nt),E?new Qn(Nt).inverse():_n(Nt,$t.eye(Nt.rows))}function _n(Nt,E,b=!1){return Nt=Ye.checkMatrix(Nt),E=Ye.checkMatrix(E),b?new Qn(Nt).solve(E):Nt.isSquare()?new on(Nt).solve(E):new vn(Nt).solve(E)}function me(Nt){if(Nt=$t.checkMatrix(Nt),Nt.isSquare()){if(Nt.columns===0)return 1;let E,b,h,v;if(Nt.columns===2)return E=Nt.get(0,0),b=Nt.get(0,1),h=Nt.get(1,0),v=Nt.get(1,1),E*v-b*h;if(Nt.columns===3){let w,Y,K;return w=new qt(Nt,[1,2],[1,2]),Y=new qt(Nt,[1,2],[0,2]),K=new qt(Nt,[1,2],[0,1]),E=Nt.get(0,0),b=Nt.get(0,1),h=Nt.get(0,2),E*me(w)-b*me(Y)+h*me(K)}else return new on(Nt).determinant}else throw Error("determinant can only be calculated for a square matrix")}function pr(Nt,E){let b=[];for(let h=0;h<Nt;h++)h!==E&&b.push(h);return b}function Zn(Nt,E,b,h=1e-9,v=1e-9){if(Nt>v)return new Array(E.rows+1).fill(0);{let w=E.addRow(b,[0]);for(let Y=0;Y<w.rows;Y++)Math.abs(w.get(Y,0))<h&&w.set(Y,0,0);return w.to1DArray()}}function kr(Nt,E={}){const{thresholdValue:b=1e-9,thresholdError:h=1e-9}=E;Nt=$t.checkMatrix(Nt);let v=Nt.rows,w=new $t(v,v);for(let Y=0;Y<v;Y++){let K=$t.columnVector(Nt.getRow(Y)),it=Nt.subMatrixRow(pr(v,Y)).transpose(),Zt=new Qn(it).solve(K),$=$t.sub(K,it.mmul(Zt)).abs().max();w.setRow(Y,Zn($,Zt,Y,b,h))}return w}function Ar(Nt,E=Number.EPSILON){if(Nt=$t.checkMatrix(Nt),Nt.isEmpty())return Nt.transpose();let b=new Qn(Nt,{autoTranspose:!0}),h=b.leftSingularVectors,v=b.rightSingularVectors,w=b.diagonal;for(let Y=0;Y<w.length;Y++)Math.abs(w[Y])>E?w[Y]=1/w[Y]:w[Y]=0;return v.mmul($t.diag(w).mmul(h.transpose()))}function ei(Nt,E=Nt,b={}){Nt=new $t(Nt);let h=!1;if(typeof E=="object"&&!$t.isMatrix(E)&&!kt.isAnyArray(E)?(b=E,E=Nt,h=!0):E=new $t(E),Nt.rows!==E.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:v=!0}=b;v&&(Nt=Nt.center("column"),h||(E=E.center("column")));const w=Nt.transpose().mmul(E);for(let Y=0;Y<w.rows;Y++)for(let K=0;K<w.columns;K++)w.set(Y,K,w.get(Y,K)*(1/(Nt.rows-1)));return w}function yi(Nt,E=Nt,b={}){Nt=new $t(Nt);let h=!1;if(typeof E=="object"&&!$t.isMatrix(E)&&!kt.isAnyArray(E)?(b=E,E=Nt,h=!0):E=new $t(E),Nt.rows!==E.rows)throw new TypeError("Both matrices must have the same number of rows");const{center:v=!0,scale:w=!0}=b;v&&(Nt.center("column"),h||E.center("column")),w&&(Nt.scale("column"),h||E.scale("column"));const Y=Nt.standardDeviation("column",{unbiased:!0}),K=h?Y:E.standardDeviation("column",{unbiased:!0}),it=Nt.transpose().mmul(E);for(let ht=0;ht<it.rows;ht++)for(let Zt=0;Zt<it.columns;Zt++)it.set(ht,Zt,it.get(ht,Zt)*(1/(Y[ht]*K[Zt]))*(1/(Nt.rows-1)));return it}class ui{constructor(E,b={}){const{assumeSymmetric:h=!1}=b;if(E=Ye.checkMatrix(E),!E.isSquare())throw new Error("Matrix is not a square matrix");if(E.isEmpty())throw new Error("Matrix must be non-empty");let v=E.columns,w=new $t(v,v),Y=new Float64Array(v),K=new Float64Array(v),it=E,ht,Zt,$=!1;if(h?$=!0:$=E.isSymmetric(),$){for(ht=0;ht<v;ht++)for(Zt=0;Zt<v;Zt++)w.set(ht,Zt,it.get(ht,Zt));Ur(v,K,Y,w),ki(v,K,Y,w)}else{let Q=new $t(v,v),H=new Float64Array(v);for(Zt=0;Zt<v;Zt++)for(ht=0;ht<v;ht++)Q.set(ht,Zt,it.get(ht,Zt));la(v,Q,H,w),Oi(v,K,Y,w,Q)}this.n=v,this.e=K,this.d=Y,this.V=w}get realEigenvalues(){return Array.from(this.d)}get imaginaryEigenvalues(){return Array.from(this.e)}get eigenvectorMatrix(){return this.V}get diagonalMatrix(){let E=this.n,b=this.e,h=this.d,v=new $t(E,E),w,Y;for(w=0;w<E;w++){for(Y=0;Y<E;Y++)v.set(w,Y,0);v.set(w,w,h[w]),b[w]>0?v.set(w,w+1,b[w]):b[w]<0&&v.set(w,w-1,b[w])}return v}}function Ur(Nt,E,b,h){let v,w,Y,K,it,ht,Zt,$;for(it=0;it<Nt;it++)b[it]=h.get(Nt-1,it);for(K=Nt-1;K>0;K--){for($=0,Y=0,ht=0;ht<K;ht++)$=$+Math.abs(b[ht]);if($===0)for(E[K]=b[K-1],it=0;it<K;it++)b[it]=h.get(K-1,it),h.set(K,it,0),h.set(it,K,0);else{for(ht=0;ht<K;ht++)b[ht]/=$,Y+=b[ht]*b[ht];for(v=b[K-1],w=Math.sqrt(Y),v>0&&(w=-w),E[K]=$*w,Y=Y-v*w,b[K-1]=v-w,it=0;it<K;it++)E[it]=0;for(it=0;it<K;it++){for(v=b[it],h.set(it,K,v),w=E[it]+h.get(it,it)*v,ht=it+1;ht<=K-1;ht++)w+=h.get(ht,it)*b[ht],E[ht]+=h.get(ht,it)*v;E[it]=w}for(v=0,it=0;it<K;it++)E[it]/=Y,v+=E[it]*b[it];for(Zt=v/(Y+Y),it=0;it<K;it++)E[it]-=Zt*b[it];for(it=0;it<K;it++){for(v=b[it],w=E[it],ht=it;ht<=K-1;ht++)h.set(ht,it,h.get(ht,it)-(v*E[ht]+w*b[ht]));b[it]=h.get(K-1,it),h.set(K,it,0)}}b[K]=Y}for(K=0;K<Nt-1;K++){if(h.set(Nt-1,K,h.get(K,K)),h.set(K,K,1),Y=b[K+1],Y!==0){for(ht=0;ht<=K;ht++)b[ht]=h.get(ht,K+1)/Y;for(it=0;it<=K;it++){for(w=0,ht=0;ht<=K;ht++)w+=h.get(ht,K+1)*h.get(ht,it);for(ht=0;ht<=K;ht++)h.set(ht,it,h.get(ht,it)-w*b[ht])}}for(ht=0;ht<=K;ht++)h.set(ht,K+1,0)}for(it=0;it<Nt;it++)b[it]=h.get(Nt-1,it),h.set(Nt-1,it,0);h.set(Nt-1,Nt-1,1),E[0]=0}function ki(Nt,E,b,h){let v,w,Y,K,it,ht,Zt,$,Q,H,et,yt,Xt,Ot,Kt,gt;for(Y=1;Y<Nt;Y++)E[Y-1]=E[Y];E[Nt-1]=0;let vt=0,lt=0,jt=Number.EPSILON;for(ht=0;ht<Nt;ht++){for(lt=Math.max(lt,Math.abs(b[ht])+Math.abs(E[ht])),Zt=ht;Zt<Nt&&!(Math.abs(E[Zt])<=jt*lt);)Zt++;if(Zt>ht)do{for(v=b[ht],$=(b[ht+1]-v)/(2*E[ht]),Q=xn($,1),$<0&&(Q=-Q),b[ht]=E[ht]/($+Q),b[ht+1]=E[ht]*($+Q),H=b[ht+1],w=v-b[ht],Y=ht+2;Y<Nt;Y++)b[Y]-=w;for(vt=vt+w,$=b[Zt],et=1,yt=et,Xt=et,Ot=E[ht+1],Kt=0,gt=0,Y=Zt-1;Y>=ht;Y--)for(Xt=yt,yt=et,gt=Kt,v=et*E[Y],w=et*$,Q=xn($,E[Y]),E[Y+1]=Kt*Q,Kt=E[Y]/Q,et=$/Q,$=et*b[Y]-Kt*v,b[Y+1]=w+Kt*(et*v+Kt*b[Y]),it=0;it<Nt;it++)w=h.get(it,Y+1),h.set(it,Y+1,Kt*h.get(it,Y)+et*w),h.set(it,Y,et*h.get(it,Y)-Kt*w);$=-Kt*gt*Xt*Ot*E[ht]/H,E[ht]=Kt*$,b[ht]=et*$}while(Math.abs(E[ht])>jt*lt);b[ht]=b[ht]+vt,E[ht]=0}for(Y=0;Y<Nt-1;Y++){for(it=Y,$=b[Y],K=Y+1;K<Nt;K++)b[K]<$&&(it=K,$=b[K]);if(it!==Y)for(b[it]=b[Y],b[Y]=$,K=0;K<Nt;K++)$=h.get(K,Y),h.set(K,Y,h.get(K,it)),h.set(K,it,$)}}function la(Nt,E,b,h){let v=0,w=Nt-1,Y,K,it,ht,Zt,$,Q;for($=v+1;$<=w-1;$++){for(Q=0,ht=$;ht<=w;ht++)Q=Q+Math.abs(E.get(ht,$-1));if(Q!==0){for(it=0,ht=w;ht>=$;ht--)b[ht]=E.get(ht,$-1)/Q,it+=b[ht]*b[ht];for(K=Math.sqrt(it),b[$]>0&&(K=-K),it=it-b[$]*K,b[$]=b[$]-K,Zt=$;Zt<Nt;Zt++){for(Y=0,ht=w;ht>=$;ht--)Y+=b[ht]*E.get(ht,Zt);for(Y=Y/it,ht=$;ht<=w;ht++)E.set(ht,Zt,E.get(ht,Zt)-Y*b[ht])}for(ht=0;ht<=w;ht++){for(Y=0,Zt=w;Zt>=$;Zt--)Y+=b[Zt]*E.get(ht,Zt);for(Y=Y/it,Zt=$;Zt<=w;Zt++)E.set(ht,Zt,E.get(ht,Zt)-Y*b[Zt])}b[$]=Q*b[$],E.set($,$-1,Q*K)}}for(ht=0;ht<Nt;ht++)for(Zt=0;Zt<Nt;Zt++)h.set(ht,Zt,ht===Zt?1:0);for($=w-1;$>=v+1;$--)if(E.get($,$-1)!==0){for(ht=$+1;ht<=w;ht++)b[ht]=E.get(ht,$-1);for(Zt=$;Zt<=w;Zt++){for(K=0,ht=$;ht<=w;ht++)K+=b[ht]*h.get(ht,Zt);for(K=K/b[$]/E.get($,$-1),ht=$;ht<=w;ht++)h.set(ht,Zt,h.get(ht,Zt)+K*b[ht])}}}function Oi(Nt,E,b,h,v){let w=Nt-1,Y=0,K=Nt-1,it=Number.EPSILON,ht=0,Zt=0,$=0,Q=0,H=0,et=0,yt=0,Xt=0,Ot,Kt,gt,vt,lt,jt,Yt,he,ye,Wt,Oe,He,Qe,An,Nn;for(Ot=0;Ot<Nt;Ot++)for((Ot<Y||Ot>K)&&(b[Ot]=v.get(Ot,Ot),E[Ot]=0),Kt=Math.max(Ot-1,0);Kt<Nt;Kt++)Zt=Zt+Math.abs(v.get(Ot,Kt));for(;w>=Y;){for(vt=w;vt>Y&&(et=Math.abs(v.get(vt-1,vt-1))+Math.abs(v.get(vt,vt)),et===0&&(et=Zt),!(Math.abs(v.get(vt,vt-1))<it*et));)vt--;if(vt===w)v.set(w,w,v.get(w,w)+ht),b[w]=v.get(w,w),E[w]=0,w--,Xt=0;else if(vt===w-1){if(Yt=v.get(w,w-1)*v.get(w-1,w),$=(v.get(w-1,w-1)-v.get(w,w))/2,Q=$*$+Yt,yt=Math.sqrt(Math.abs(Q)),v.set(w,w,v.get(w,w)+ht),v.set(w-1,w-1,v.get(w-1,w-1)+ht),he=v.get(w,w),Q>=0){for(yt=$>=0?$+yt:$-yt,b[w-1]=he+yt,b[w]=b[w-1],yt!==0&&(b[w]=he-Yt/yt),E[w-1]=0,E[w]=0,he=v.get(w,w-1),et=Math.abs(he)+Math.abs(yt),$=he/et,Q=yt/et,H=Math.sqrt($*$+Q*Q),$=$/H,Q=Q/H,Kt=w-1;Kt<Nt;Kt++)yt=v.get(w-1,Kt),v.set(w-1,Kt,Q*yt+$*v.get(w,Kt)),v.set(w,Kt,Q*v.get(w,Kt)-$*yt);for(Ot=0;Ot<=w;Ot++)yt=v.get(Ot,w-1),v.set(Ot,w-1,Q*yt+$*v.get(Ot,w)),v.set(Ot,w,Q*v.get(Ot,w)-$*yt);for(Ot=Y;Ot<=K;Ot++)yt=h.get(Ot,w-1),h.set(Ot,w-1,Q*yt+$*h.get(Ot,w)),h.set(Ot,w,Q*h.get(Ot,w)-$*yt)}else b[w-1]=he+$,b[w]=he+$,E[w-1]=yt,E[w]=-yt;w=w-2,Xt=0}else{if(he=v.get(w,w),ye=0,Yt=0,vt<w&&(ye=v.get(w-1,w-1),Yt=v.get(w,w-1)*v.get(w-1,w)),Xt===10){for(ht+=he,Ot=Y;Ot<=w;Ot++)v.set(Ot,Ot,v.get(Ot,Ot)-he);et=Math.abs(v.get(w,w-1))+Math.abs(v.get(w-1,w-2)),he=ye=.75*et,Yt=-.4375*et*et}if(Xt===30&&(et=(ye-he)/2,et=et*et+Yt,et>0)){for(et=Math.sqrt(et),ye<he&&(et=-et),et=he-Yt/((ye-he)/2+et),Ot=Y;Ot<=w;Ot++)v.set(Ot,Ot,v.get(Ot,Ot)-et);ht+=et,he=ye=Yt=.964}for(Xt=Xt+1,lt=w-2;lt>=vt&&(yt=v.get(lt,lt),H=he-yt,et=ye-yt,$=(H*et-Yt)/v.get(lt+1,lt)+v.get(lt,lt+1),Q=v.get(lt+1,lt+1)-yt-H-et,H=v.get(lt+2,lt+1),et=Math.abs($)+Math.abs(Q)+Math.abs(H),$=$/et,Q=Q/et,H=H/et,!(lt===vt||Math.abs(v.get(lt,lt-1))*(Math.abs(Q)+Math.abs(H))<it*(Math.abs($)*(Math.abs(v.get(lt-1,lt-1))+Math.abs(yt)+Math.abs(v.get(lt+1,lt+1))))));)lt--;for(Ot=lt+2;Ot<=w;Ot++)v.set(Ot,Ot-2,0),Ot>lt+2&&v.set(Ot,Ot-3,0);for(gt=lt;gt<=w-1&&(An=gt!==w-1,gt!==lt&&($=v.get(gt,gt-1),Q=v.get(gt+1,gt-1),H=An?v.get(gt+2,gt-1):0,he=Math.abs($)+Math.abs(Q)+Math.abs(H),he!==0&&($=$/he,Q=Q/he,H=H/he)),he!==0);gt++)if(et=Math.sqrt($*$+Q*Q+H*H),$<0&&(et=-et),et!==0){for(gt!==lt?v.set(gt,gt-1,-et*he):vt!==lt&&v.set(gt,gt-1,-v.get(gt,gt-1)),$=$+et,he=$/et,ye=Q/et,yt=H/et,Q=Q/$,H=H/$,Kt=gt;Kt<Nt;Kt++)$=v.get(gt,Kt)+Q*v.get(gt+1,Kt),An&&($=$+H*v.get(gt+2,Kt),v.set(gt+2,Kt,v.get(gt+2,Kt)-$*yt)),v.set(gt,Kt,v.get(gt,Kt)-$*he),v.set(gt+1,Kt,v.get(gt+1,Kt)-$*ye);for(Ot=0;Ot<=Math.min(w,gt+3);Ot++)$=he*v.get(Ot,gt)+ye*v.get(Ot,gt+1),An&&($=$+yt*v.get(Ot,gt+2),v.set(Ot,gt+2,v.get(Ot,gt+2)-$*H)),v.set(Ot,gt,v.get(Ot,gt)-$),v.set(Ot,gt+1,v.get(Ot,gt+1)-$*Q);for(Ot=Y;Ot<=K;Ot++)$=he*h.get(Ot,gt)+ye*h.get(Ot,gt+1),An&&($=$+yt*h.get(Ot,gt+2),h.set(Ot,gt+2,h.get(Ot,gt+2)-$*H)),h.set(Ot,gt,h.get(Ot,gt)-$),h.set(Ot,gt+1,h.get(Ot,gt+1)-$*Q)}}}if(Zt!==0){for(w=Nt-1;w>=0;w--)if($=b[w],Q=E[w],Q===0)for(vt=w,v.set(w,w,1),Ot=w-1;Ot>=0;Ot--){for(Yt=v.get(Ot,Ot)-$,H=0,Kt=vt;Kt<=w;Kt++)H=H+v.get(Ot,Kt)*v.get(Kt,w);if(E[Ot]<0)yt=Yt,et=H;else if(vt=Ot,E[Ot]===0?v.set(Ot,w,Yt!==0?-H/Yt:-H/(it*Zt)):(he=v.get(Ot,Ot+1),ye=v.get(Ot+1,Ot),Q=(b[Ot]-$)*(b[Ot]-$)+E[Ot]*E[Ot],jt=(he*et-yt*H)/Q,v.set(Ot,w,jt),v.set(Ot+1,w,Math.abs(he)>Math.abs(yt)?(-H-Yt*jt)/he:(-et-ye*jt)/yt)),jt=Math.abs(v.get(Ot,w)),it*jt*jt>1)for(Kt=Ot;Kt<=w;Kt++)v.set(Kt,w,v.get(Kt,w)/jt)}else if(Q<0)for(vt=w-1,Math.abs(v.get(w,w-1))>Math.abs(v.get(w-1,w))?(v.set(w-1,w-1,Q/v.get(w,w-1)),v.set(w-1,w,-(v.get(w,w)-$)/v.get(w,w-1))):(Nn=Zr(0,-v.get(w-1,w),v.get(w-1,w-1)-$,Q),v.set(w-1,w-1,Nn[0]),v.set(w-1,w,Nn[1])),v.set(w,w-1,0),v.set(w,w,1),Ot=w-2;Ot>=0;Ot--){for(Wt=0,Oe=0,Kt=vt;Kt<=w;Kt++)Wt=Wt+v.get(Ot,Kt)*v.get(Kt,w-1),Oe=Oe+v.get(Ot,Kt)*v.get(Kt,w);if(Yt=v.get(Ot,Ot)-$,E[Ot]<0)yt=Yt,H=Wt,et=Oe;else if(vt=Ot,E[Ot]===0?(Nn=Zr(-Wt,-Oe,Yt,Q),v.set(Ot,w-1,Nn[0]),v.set(Ot,w,Nn[1])):(he=v.get(Ot,Ot+1),ye=v.get(Ot+1,Ot),He=(b[Ot]-$)*(b[Ot]-$)+E[Ot]*E[Ot]-Q*Q,Qe=(b[Ot]-$)*2*Q,He===0&&Qe===0&&(He=it*Zt*(Math.abs(Yt)+Math.abs(Q)+Math.abs(he)+Math.abs(ye)+Math.abs(yt))),Nn=Zr(he*H-yt*Wt+Q*Oe,he*et-yt*Oe-Q*Wt,He,Qe),v.set(Ot,w-1,Nn[0]),v.set(Ot,w,Nn[1]),Math.abs(he)>Math.abs(yt)+Math.abs(Q)?(v.set(Ot+1,w-1,(-Wt-Yt*v.get(Ot,w-1)+Q*v.get(Ot,w))/he),v.set(Ot+1,w,(-Oe-Yt*v.get(Ot,w)-Q*v.get(Ot,w-1))/he)):(Nn=Zr(-H-ye*v.get(Ot,w-1),-et-ye*v.get(Ot,w),yt,Q),v.set(Ot+1,w-1,Nn[0]),v.set(Ot+1,w,Nn[1]))),jt=Math.max(Math.abs(v.get(Ot,w-1)),Math.abs(v.get(Ot,w))),it*jt*jt>1)for(Kt=Ot;Kt<=w;Kt++)v.set(Kt,w-1,v.get(Kt,w-1)/jt),v.set(Kt,w,v.get(Kt,w)/jt)}for(Ot=0;Ot<Nt;Ot++)if(Ot<Y||Ot>K)for(Kt=Ot;Kt<Nt;Kt++)h.set(Ot,Kt,v.get(Ot,Kt));for(Kt=Nt-1;Kt>=Y;Kt--)for(Ot=Y;Ot<=K;Ot++){for(yt=0,gt=Y;gt<=Math.min(Kt,K);gt++)yt=yt+h.get(Ot,gt)*v.get(gt,Kt);h.set(Ot,Kt,yt)}}}function Zr(Nt,E,b,h){let v,w;return Math.abs(b)>Math.abs(h)?(v=h/b,w=b+v*h,[(Nt+v*E)/w,(E-v*Nt)/w]):(v=b/h,w=h+v*b,[(v*Nt+E)/w,(v*E-Nt)/w])}class qn{constructor(E){if(E=Ye.checkMatrix(E),!E.isSymmetric())throw new Error("Matrix is not symmetric");let b=E,h=b.rows,v=new $t(h,h),w=!0,Y,K,it;for(K=0;K<h;K++){let ht=0;for(it=0;it<K;it++){let Zt=0;for(Y=0;Y<it;Y++)Zt+=v.get(it,Y)*v.get(K,Y);Zt=(b.get(K,it)-Zt)/v.get(it,it),v.set(K,it,Zt),ht=ht+Zt*Zt}for(ht=b.get(K,K)-ht,w&&(w=ht>0),v.set(K,K,Math.sqrt(Math.max(ht,0))),it=K+1;it<h;it++)v.set(K,it,0)}this.L=v,this.positiveDefinite=w}isPositiveDefinite(){return this.positiveDefinite}solve(E){E=Ye.checkMatrix(E);let b=this.L,h=b.rows;if(E.rows!==h)throw new Error("Matrix dimensions do not match");if(this.isPositiveDefinite()===!1)throw new Error("Matrix is not positive definite");let v=E.columns,w=E.clone(),Y,K,it;for(it=0;it<h;it++)for(K=0;K<v;K++){for(Y=0;Y<it;Y++)w.set(it,K,w.get(it,K)-w.get(Y,K)*b.get(it,Y));w.set(it,K,w.get(it,K)/b.get(it,it))}for(it=h-1;it>=0;it--)for(K=0;K<v;K++){for(Y=it+1;Y<h;Y++)w.set(it,K,w.get(it,K)-w.get(Y,K)*b.get(Y,it));w.set(it,K,w.get(it,K)/b.get(it,it))}return w}get lowerTriangularMatrix(){return this.L}}class Ti{constructor(E,b={}){E=Ye.checkMatrix(E);let{Y:h}=b;const{scaleScores:v=!1,maxIterations:w=1e3,terminationCriteria:Y=1e-10}=b;let K;if(h){if(kt.isAnyArray(h)&&typeof h[0]=="number"?h=$t.columnVector(h):h=Ye.checkMatrix(h),h.rows!==E.rows)throw new Error("Y should have the same number of rows as X");K=h.getColumnVector(0)}else K=E.getColumnVector(0);let it=1,ht,Zt,$,Q;for(let H=0;H<w&&it>Y;H++)$=E.transpose().mmul(K).div(K.transpose().mmul(K).get(0,0)),$=$.div($.norm()),ht=E.mmul($).div($.transpose().mmul($).get(0,0)),H>0&&(it=ht.clone().sub(Q).pow(2).sum()),Q=ht.clone(),h?(Zt=h.transpose().mmul(ht).div(ht.transpose().mmul(ht).get(0,0)),Zt=Zt.div(Zt.norm()),K=h.mmul(Zt).div(Zt.transpose().mmul(Zt).get(0,0))):K=ht;if(h){let H=E.transpose().mmul(ht).div(ht.transpose().mmul(ht).get(0,0));H=H.div(H.norm());let et=E.clone().sub(ht.clone().mmul(H.transpose())),yt=K.transpose().mmul(ht).div(ht.transpose().mmul(ht).get(0,0)),Xt=h.clone().sub(ht.clone().mulS(yt.get(0,0)).mmul(Zt.transpose()));this.t=ht,this.p=H.transpose(),this.w=$.transpose(),this.q=Zt,this.u=K,this.s=ht.transpose().mmul(ht),this.xResidual=et,this.yResidual=Xt,this.betas=yt}else this.w=$.transpose(),this.s=ht.transpose().mmul(ht).sqrt(),v?this.t=ht.clone().div(this.s.get(0,0)):this.t=ht,this.xResidual=E.sub(ht.mmul($.transpose()))}}Et.XA=Me,Et.a_=qn,Et.yQ=qn,Et.Hs=tn,Et.Ec=ui,Et.dx=ui,Et.LU=on,Et.Rm=on,Et.y3=$t,Et.qK=Ct,Et.pb=q,Et.j=Ht,Et.sO=Lt,Et.BZ=Ut,Et.EK=_t,Et.Db=qt,Et.Fx=se,Et.tU=te,Et.Ym=Ti,Et.rs=Ti,Et.QR=vn,Et.TB=vn,Et.oH=Qn,Et.Sc=Qn,Et.BN=Ne,Et.it=ke,Et.$r=Ye,Et.QM=yi,Et.AV=ei,c=$t,Et.GH=me,Et.SO=Ln,Et.uZ=kr,Et.yU=Ar,Et.F1=_n,Et.re=Ve},80574:function(bt,Et,y){"use strict";y.d(Et,{Ae:function(){return J},CF:function(){return $t},vC:function(){return Me},x1:function(){return R}});function c(Mt,q,Ct,Ht,Lt,_t){const Ut=Mt,qt=q,se=Ct-Ut,te=Ht-qt;let ke=Lt-Ut,Ye=_t-qt,Ve=ke*se+Ye*te,on=0;Ve<=0?on=0:(ke=se-ke,Ye=te-Ye,Ve=ke*se+Ye*te,Ve<=0?on=0:on=Ve*Ve/(se*se+te*te));const xn=ke*ke+Ye*Ye-on;return xn<0?0:xn}function _(Mt,q,Ct,Ht){return(Mt-Ct)*(Mt-Ct)+(q-Ht)*(q-Ht)}function I(Mt,q,Ct,Ht,Lt){return _(Mt,q,Ct,Ht)<Lt*Lt}function z(Mt){if(!Number.isFinite(Mt))return Ct=>Ct;if(Mt===0)return Math.round;const q=Math.pow(10,Mt);return Ct=>Math.round(Ct*q)/q}function S(Mt){const q=Math.min(Mt.x1,Mt.x2),Ct=Math.max(Mt.x1,Mt.x2),Ht=Math.min(Mt.y1,Mt.y2),Lt=Math.max(Mt.y1,Mt.y2);return{x:q,y:Ht,x2:Ct,y2:Lt,width:Ct-q,height:Lt-Ht}}class R{constructor(q,Ct,Ht,Lt){this.x1=q,this.y1=Ct,this.x2=Ht,this.y2=Lt}equals(q){return this.x1===q.x1&&this.y1===q.y1&&this.x2===q.x2&&this.y2===q.y2}draw(q){q.moveTo(this.x1,this.y1),q.lineTo(this.x2,this.y2)}toString(){return`Line(from=(${this.x1},${this.y1}),to=(${this.x2},${this.y2}))`}static from(q){return new R(q.x1,q.y1,q.x2,q.y2)}cuts(q,Ct){if(this.y1===this.y2||Ct<this.y1&&Ct<=this.y2||Ct>this.y1&&Ct>=this.y2||q>this.x1&&q>=this.x2)return!1;if(q<this.x1&&q<=this.x2)return!0;const Ht=this.x1+(Ct-this.y1)*(this.x2-this.x1)/(this.y2-this.y1);return q<=Ht}distSquare(q,Ct){return c(this.x1,this.y1,this.x2,this.y2,q,Ct)}ptClose(q,Ct,Ht){if(this.x1<this.x2){if(q<this.x1-Ht||q>this.x2+Ht)return!1}else if(q<this.x2-Ht||q>this.x1+Ht)return!1;if(this.y1<this.y2){if(Ct<this.y1-Ht||Ct>this.y2+Ht)return!1}else if(Ct<this.y2-Ht||Ct>this.y1+Ht)return!1;return!0}}var M;(function(Mt){Mt[Mt.POINT=1]="POINT",Mt[Mt.PARALLEL=2]="PARALLEL",Mt[Mt.COINCIDENT=3]="COINCIDENT",Mt[Mt.NONE=4]="NONE"})(M||(M={}));class N{constructor(q,Ct=0,Ht=0){this.state=q,this.x=Ct,this.y=Ht}}function D(Mt,q){const Ct=(q.x2-q.x1)*(Mt.y1-q.y1)-(q.y2-q.y1)*(Mt.x1-q.x1),Ht=(Mt.x2-Mt.x1)*(Mt.y1-q.y1)-(Mt.y2-Mt.y1)*(Mt.x1-q.x1),Lt=(q.y2-q.y1)*(Mt.x2-Mt.x1)-(q.x2-q.x1)*(Mt.y2-Mt.y1);if(Lt){const _t=Ct/Lt,Ut=Ht/Lt;return 0<=_t&&_t<=1&&0<=Ut&&Ut<=1?new N(M.POINT,Mt.x1+_t*(Mt.x2-Mt.x1),Mt.y1+_t*(Mt.y2-Mt.y1)):new N(M.NONE)}return new N(Ct===0||Ht===0?M.COINCIDENT:M.PARALLEL)}function A(Mt,q){const Ct=(q.x2-q.x1)*(Mt.y1-q.y1)-(q.y2-q.y1)*(Mt.x1-q.x1),Ht=(Mt.x2-Mt.x1)*(Mt.y1-q.y1)-(Mt.y2-Mt.y1)*(Mt.x1-q.x1),Lt=(q.y2-q.y1)*(Mt.x2-Mt.x1)-(q.x2-q.x1)*(Mt.y2-Mt.y1);if(Lt){const _t=Ct/Lt,Ut=Ht/Lt;if(0<=_t&&_t<=1&&0<=Ut&&Ut<=1)return _t}return Number.POSITIVE_INFINITY}function L(Mt,q){function Ct(Lt,_t,Ut,qt){let se=A(q,new R(Lt,_t,Ut,qt));return se=Math.abs(se-.5),se>=0&&se<=1?1:0}let Ht=Ct(Mt.x,Mt.y,Mt.x2,Mt.y);return Ht+=Ct(Mt.x,Mt.y,Mt.x,Mt.y2),Ht>1||(Ht+=Ct(Mt.x,Mt.y2,Mt.x2,Mt.y2),Ht>1)?!0:(Ht+=Ct(Mt.x2,Mt.y,Mt.x2,Mt.y2),Ht>0)}var F;(function(Mt){Mt[Mt.LEFT=0]="LEFT",Mt[Mt.TOP=1]="TOP",Mt[Mt.RIGHT=2]="RIGHT",Mt[Mt.BOTTOM=3]="BOTTOM"})(F||(F={}));function rt(Mt,q,Ct){const Ht=new Set;return Mt.width<=0?(Ht.add(F.LEFT),Ht.add(F.RIGHT)):q<Mt.x?Ht.add(F.LEFT):q>Mt.x+Mt.width&&Ht.add(F.RIGHT),Mt.height<=0?(Ht.add(F.TOP),Ht.add(F.BOTTOM)):Ct<Mt.y?Ht.add(F.TOP):Ct>Mt.y+Mt.height&&Ht.add(F.BOTTOM),Ht}function G(Mt,q){let Ct=q.x1,Ht=q.y1;const Lt=q.x2,_t=q.y2,Ut=Array.from(rt(Mt,Lt,_t));if(Ut.length===0)return!0;let qt=rt(Mt,Ct,Ht);for(;qt.size!==0;){for(const se of Ut)if(qt.has(se))return!1;if(qt.has(F.RIGHT)||qt.has(F.LEFT)){let se=Mt.x;qt.has(F.RIGHT)&&(se+=Mt.width),Ht=Ht+(se-Ct)*(_t-Ht)/(Lt-Ct),Ct=se}else{let se=Mt.y;qt.has(F.BOTTOM)&&(se+=Mt.height),Ct=Ct+(se-Ht)*(Lt-Ct)/(_t-Ht),Ht=se}qt=rt(Mt,Ct,Ht)}return!0}function kt(Mt,q){let Ct=Number.POSITIVE_INFINITY,Ht=0;function Lt(_t,Ut,qt,se){let te=A(q,new R(_t,Ut,qt,se));te=Math.abs(te-.5),te>=0&&te<=1&&(Ht++,te<Ct&&(Ct=te))}return Lt(Mt.x,Mt.y,Mt.x2,Mt.y),Lt(Mt.x,Mt.y,Mt.x,Mt.y2),Ht>1||(Lt(Mt.x,Mt.y2,Mt.x2,Mt.y2),Ht>1)?Ct:(Lt(Mt.x2,Mt.y,Mt.x2,Mt.y2),Ht===0?-1:Ct)}function ft(Mt,q){let Ct=0;const Ht=D(Mt,new R(q.x,q.y,q.x2,q.y));Ct+=Ht.state===M.POINT?1:0;const Lt=D(Mt,new R(q.x,q.y,q.x,q.y2));Ct+=Lt.state===M.POINT?1:0;const _t=D(Mt,new R(q.x,q.y2,q.x2,q.y2));Ct+=_t.state===M.POINT?1:0;const Ut=D(Mt,new R(q.x2,q.y,q.x2,q.y2));return Ct+=Ut.state===M.POINT?1:0,{top:Ht,left:Lt,bottom:_t,right:Ut,count:Ct}}class J{constructor(q,Ct,Ht,Lt){this.x=q,this.y=Ct,this.width=Ht,this.height=Lt}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(q){return new J(q.x,q.y,q.width,q.height)}equals(q){return this.x===q.x&&this.y===q.y&&this.width===q.width&&this.height===q.height}clone(){return new J(this.x,this.y,this.width,this.height)}add(q){const Ct=Math.min(this.x,q.x),Ht=Math.min(this.y,q.y),Lt=Math.max(this.x2,q.x+q.width),_t=Math.max(this.y2,q.y+q.height);this.x=Ct,this.y=Ht,this.width=Lt-Ct,this.height=_t-Ht}addPoint(q){const Ct=Math.min(this.x,q.x),Ht=Math.min(this.y,q.y),Lt=Math.max(this.x2,q.x),_t=Math.max(this.y2,q.y);this.x=Ct,this.y=Ht,this.width=Lt-Ct,this.height=_t-Ht}toString(){return`Rectangle[x=${this.x}, y=${this.y}, w=${this.width}, h=${this.height}]`}draw(q){q.rect(this.x,this.y,this.width,this.height)}containsPt(q,Ct){return q>=this.x&&q<=this.x2&&Ct>=this.y&&Ct<=this.y2}get area(){return this.width*this.height}intersects(q){return this.area<=0||q.width<=0||q.height<=0?!1:q.x+q.width>this.x&&q.y+q.height>this.y&&q.x<this.x2&&q.y<this.y2}distSquare(q,Ct){if(this.containsPt(q,Ct))return 0;const Ht=rt(this,q,Ct);return Ht.has(F.TOP)?Ht.has(F.LEFT)?_(q,Ct,this.x,this.y):Ht.has(F.RIGHT)?_(q,Ct,this.x2,this.y):(this.y-Ct)*(this.y-Ct):Ht.has(F.BOTTOM)?Ht.has(F.LEFT)?_(q,Ct,this.x,this.y2):Ht.has(F.RIGHT)?_(q,Ct,this.x2,this.y2):(Ct-this.y2)*(Ct-this.y2):Ht.has(F.LEFT)?(this.x-q)*(this.x-q):Ht.has(F.RIGHT)?(q-this.x2)*(q-this.x2):0}}function Rt(Mt){if(Mt.length===0)return null;const q=Mt[0],Ct=new J(q.x,q.y,0,0);for(const Ht of Mt)Ct.addPoint(Ht);return Ct}class Tt{constructor(q,Ct,Ht){this.cx=q,this.cy=Ct,this.radius=Ht}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(q){return new Tt(q.cx,q.cy,q.radius)}containsPt(q,Ct){return _(this.cx,this.cy,q,Ct)<this.radius*this.radius}distSquare(q,Ct){const Ht=_(this.cx,this.cy,q,Ct);if(Ht<this.radius*this.radius)return 0;const Lt=Math.sqrt(Ht)-this.radius;return Lt*Lt}draw(q){q.ellipse(this.cx,this.cy,this.radius,this.radius,0,0,Math.PI*2)}}class Vt{constructor(q,Ct=0,Ht=0,Lt=0,_t=0,Ut=10,qt=10,se=new Float32Array(Math.max(0,Ut*qt)).fill(0)){this.pixelGroup=q,this.i=Ct,this.j=Ht,this.pixelX=Lt,this.pixelY=_t,this.width=Ut,this.height=qt,this.area=se}createSub(q,Ct){return new Vt(this.pixelGroup,q.x,q.y,Ct.x,Ct.y,q.width,q.height)}static fromPixelRegion(q,Ct){return new Vt(Ct,0,0,q.x,q.y,Math.ceil(q.width/Ct),Math.ceil(q.height/Ct))}copy(q,Ct){return new Vt(this.pixelGroup,this.scaleX(Ct.x),this.scaleY(Ct.y),Ct.x,Ct.y,q.width,q.height,q.area)}boundX(q){return q<this.i?this.i:q>=this.width?this.width-1:q}boundY(q){return q<this.j?this.j:q>=this.height?this.height-1:q}scaleX(q){return this.boundX(Math.floor((q-this.pixelX)/this.pixelGroup))}scaleY(q){return this.boundY(Math.floor((q-this.pixelY)/this.pixelGroup))}scale(q){const Ct=this.scaleX(q.x),Ht=this.scaleY(q.y),Lt=this.boundX(Math.ceil((q.x+q.width-this.pixelX)/this.pixelGroup)),_t=this.boundY(Math.ceil((q.y+q.height-this.pixelY)/this.pixelGroup)),Ut=Lt-Ct,qt=_t-Ht;return new J(Ct,Ht,Ut,qt)}invertScaleX(q){return Math.round(q*this.pixelGroup+this.pixelX)}invertScaleY(q){return Math.round(q*this.pixelGroup+this.pixelY)}addPadding(q,Ct){const Ht=Math.ceil(Ct/this.pixelGroup),Lt=this.boundX(q.x-Ht),_t=this.boundY(q.y-Ht),Ut=this.boundX(q.x2+Ht),qt=this.boundY(q.y2+Ht),se=Ut-Lt,te=qt-_t;return new J(Lt,_t,se,te)}get(q,Ct){return q<0||Ct<0||q>=this.width||Ct>=this.height?Number.NaN:this.area[q+Ct*this.width]}inc(q,Ct,Ht){q<0||Ct<0||q>=this.width||Ct>=this.height||(this.area[q+Ct*this.width]+=Ht)}set(q,Ct,Ht){q<0||Ct<0||q>=this.width||Ct>=this.height||(this.area[q+Ct*this.width]=Ht)}incArea(q,Ct){if(q.width<=0||q.height<=0||Ct===0)return;const Ht=this.width,Lt=q.width,_t=Math.max(0,q.i),Ut=Math.max(0,q.j),qt=Math.min(q.i+q.width,Ht),se=Math.min(q.j+q.height,this.height);if(!(se<=0||qt<=0||_t>=Ht||se>=this.height))for(let te=Ut;te<se;te++){const ke=(te-q.j)*Lt,Ye=te*Ht;for(let Ve=_t;Ve<qt;Ve++){const on=q.area[Ve-q.i+ke];on!==0&&(this.area[Ve+Ye]+=Ct*on)}}}fill(q){this.area.fill(q)}fillArea(q,Ct){const Ht=q.x+q.y*this.width;for(let Lt=0;Lt<q.height;Lt++){const _t=Ht+Lt*this.width;this.area.fill(Ct,_t,_t+q.width)}}fillHorizontalLine(q,Ct,Ht,Lt){const _t=q+Ct*this.width;this.area.fill(Lt,_t,_t+Ht)}fillVerticalLine(q,Ct,Ht,Lt){const _t=q+Ct*this.width;for(let Ut=0;Ut<Ht;Ut++)this.area[_t+Ut*this.width]=Lt}clear(){this.area.fill(0)}toString(){let q="";for(let Ct=0;Ct<this.height;Ct++){const Ht=Ct*this.width;for(let Lt=0;Lt<this.width;Lt++){const _t=this.area[Ht+Lt];q+=_t.toFixed(1).padStart(6),q+=" "}q+=`
|
|
|
`}return q}draw(q,Ct=!0){if(this.width<=0||this.height<=0)return;q.save(),Ct&&q.translate(this.pixelX,this.pixelY);const Ht=this.area.reduce((Ut,qt)=>Math.min(Ut,qt),Number.POSITIVE_INFINITY),Lt=this.area.reduce((Ut,qt)=>Math.max(Ut,qt),Number.NEGATIVE_INFINITY),_t=Ut=>(Ut-Ht)/(Lt-Ht);q.scale(this.pixelGroup,this.pixelGroup);for(let Ut=0;Ut<this.width;Ut++)for(let qt=0;qt<this.height;qt++){const se=this.area[Ut+qt*this.width];q.fillStyle=`rgba(0, 0, 0, ${_t(se)})`,q.fillRect(Ut,qt,1,1)}q.restore()}drawThreshold(q,Ct,Ht=!0){if(!(this.width<=0||this.height<=0)){q.save(),Ht&&q.translate(this.pixelX,this.pixelY),q.scale(this.pixelGroup,this.pixelGroup);for(let Lt=0;Lt<this.width;Lt++)for(let _t=0;_t<this.height;_t++){const Ut=this.area[Lt+_t*this.width];q.fillStyle=Ut>Ct?"black":"white",q.fillRect(Lt,_t,1,1)}q.restore()}}}function fe(Mt,q){const Ct=Ht=>({x:Ht.x-q,y:Ht.y-q,width:Ht.width+2*q,height:Ht.height+2*q});return Array.isArray(Mt)?Mt.map(Ct):Ct(Mt)}function ue(Mt,q,Ct){return Ce(Object.assign(S(Mt),{distSquare:(Ht,Lt)=>c(Mt.x1,Mt.y1,Mt.x2,Mt.y2,Ht,Lt)}),q,Ct)}function Ce(Mt,q,Ct){const Ht=fe(Mt,Ct),Lt=q.scale(Ht),_t=q.createSub(Lt,Ht);return be(_t,q,Ct,(Ut,qt)=>Mt.distSquare(Ut,qt)),_t}function be(Mt,q,Ct,Ht){const Lt=Ct*Ct;for(let _t=0;_t<Mt.height;_t++)for(let Ut=0;Ut<Mt.width;Ut++){const qt=q.invertScaleX(Mt.i+Ut),se=q.invertScaleY(Mt.j+_t),te=Ht(qt,se);if(te===0){Mt.set(Ut,_t,Lt);continue}if(te<Lt){const ke=Ct-Math.sqrt(te);Mt.set(Ut,_t,ke*ke)}}return Mt}function we(Mt,q,Ct){const Ht=q.scale(Mt),Lt=q.addPadding(Ht,Ct),_t=q.createSub(Lt,{x:Mt.x-Ct,y:Mt.y-Ct}),Ut=Ht.x-Lt.x,qt=Ht.y-Lt.y,se=Lt.x2-Ht.x2,te=Lt.y2-Ht.y2,ke=Lt.width-Ut-se,Ye=Lt.height-qt-te,Ve=Ct*Ct;_t.fillArea({x:Ut,y:qt,width:ke+1,height:Ye+1},Ve);const on=[0],xn=Math.max(qt,Ut,se,te);{const _n=q.invertScaleX(Ht.x+Ht.width/2);for(let me=1;me<xn;me++){const pr=q.invertScaleY(Ht.y-me),Zn=Mt.distSquare(_n,pr);if(Zn<Ve){const kr=Ct-Math.sqrt(Zn);on.push(kr*kr)}else break}}const vn=[],Qn=Math.max(Ut,se),Ln=Math.max(qt,se);for(let _n=1;_n<Qn;_n++){const me=q.invertScaleX(Ht.x-_n),pr=[];for(let Zn=1;Zn<Ln;Zn++){const kr=q.invertScaleY(Ht.y-Zn),Ar=Mt.distSquare(me,kr);if(Ar<Ve){const ei=Ct-Math.sqrt(Ar);pr.push(ei*ei)}else pr.push(0)}vn.push(pr)}for(let _n=1;_n<Math.min(qt,on.length);_n++){const me=on[_n];_t.fillHorizontalLine(Ut,qt-_n,ke+1,me)}for(let _n=1;_n<Math.min(te,on.length);_n++){const me=on[_n];_t.fillHorizontalLine(Ut,qt+Ye+_n,ke+1,me)}for(let _n=1;_n<Math.min(Ut,on.length);_n++){const me=on[_n];_t.fillVerticalLine(Ut-_n,qt,Ye+1,me)}for(let _n=1;_n<Math.min(te,on.length);_n++){const me=on[_n];_t.fillVerticalLine(Ut+ke+_n,qt,Ye+1,me)}for(let _n=1;_n<Ut;_n++){const me=vn[_n-1],pr=Ut-_n;for(let Zn=1;Zn<qt;Zn++)_t.set(pr,qt-Zn,me[Zn-1]);for(let Zn=1;Zn<te;Zn++)_t.set(pr,qt+Ye+Zn,me[Zn-1])}for(let _n=1;_n<se;_n++){const me=vn[_n-1],pr=Ut+ke+_n;for(let Zn=1;Zn<qt;Zn++)_t.set(pr,qt-Zn,me[Zn-1]);for(let Zn=1;Zn<te;Zn++)_t.set(pr,qt+Ye+Zn,me[Zn-1])}return _t}function ne(Mt,q,Ct,Ht){return{x:Mt,y:q,width:Ct,height:Ht}}function We(Mt,q,Ct){return{cx:Mt,cy:q,radius:Ct}}function rn(Mt,q,Ct,Ht){return{x1:Mt,y1:q,x2:Ct,y2:Ht}}function Xe(Mt,q){return{x:Mt,y:q}}function pn(Mt,q,Ct,Ht){if(Mt.length===0)return[];const Lt=Ee(Mt);return Lt.map((_t,Ut)=>{const qt=Lt.slice(0,Ut);return Tn(q,_t,qt,Ct,Ht)}).flat()}function Tn(Mt,q,Ct,Ht,Lt){const _t=Xe(q.cx,q.cy),Ut=It(_t,Ct,Mt);if(Ut==null)return[];const qt=new R(_t.x,_t.y,Ut.cx,Ut.cy),se=$e(qt,Mt,Ht,Lt);return mn(se,Mt)}function $e(Mt,q,Ct,Ht){const Lt=[],_t=[];_t.push(Mt);let Ut=!0;for(let qt=0;qt<Ct&&Ut;qt++)for(Ut=!1;!Ut&&_t.length>0;){const se=_t.pop(),te=Pe(q,se),ke=te?ft(se,te):null;if(!te||!ke||ke.count!==2){Ut||Lt.push(se);continue}let Ye=Ht,Ve=Ke(te,Ye,ke,!0),on=sn(Ve,_t)||sn(Ve,Lt),xn=cn(Ve,q);for(;!on&&xn&&Ye>=1;)Ye/=1.5,Ve=Ke(te,Ye,ke,!0),on=sn(Ve,_t)||sn(Ve,Lt),xn=cn(Ve,q);if(Ve&&!on&&!xn&&(_t.push(new R(se.x1,se.y1,Ve.x,Ve.y)),_t.push(new R(Ve.x,Ve.y,se.x2,se.y2)),Ut=!0),Ut)continue;Ye=Ht,Ve=Ke(te,Ye,ke,!1);let vn=sn(Ve,_t)||sn(Ve,Lt);for(xn=cn(Ve,q);!vn&&xn&&Ye>=1;)Ye/=1.5,Ve=Ke(te,Ye,ke,!1),vn=sn(Ve,_t)||sn(Ve,Lt),xn=cn(Ve,q);Ve&&!vn&&(_t.push(new R(se.x1,se.y1,Ve.x,Ve.y)),_t.push(new R(Ve.x,Ve.y,se.x2,se.y2)),Ut=!0),Ut||Lt.push(se)}for(;_t.length>0;)Lt.push(_t.pop());return Lt}function mn(Mt,q){const Ct=[];for(;Mt.length>0;){const Ht=Mt.pop();if(Mt.length===0){Ct.push(Ht);break}const Lt=Mt.pop(),_t=new R(Ht.x1,Ht.y1,Lt.x2,Lt.y2);Pe(q,_t)?(Ct.push(Ht),Mt.push(Lt)):Mt.push(_t)}return Ct}function It(Mt,q,Ct){let Ht=Number.POSITIVE_INFINITY;return q.reduce((Lt,_t)=>{const Ut=_(Mt.x,Mt.y,_t.cx,_t.cy);if(Ut>Ht)return Lt;const qt=new R(Mt.x,Mt.y,_t.cx,_t.cy),se=ze(Ct,qt);return Ut*(se+1)*(se+1)<Ht&&(Lt=_t,Ht=Ut*(se+1)*(se+1)),Lt},null)}function Ee(Mt){if(Mt.length<2)return Mt;let q=0,Ct=0;return Mt.forEach(Ht=>{q+=Ht.cx,Ct+=Ht.cy}),q/=Mt.length,Ct/=Mt.length,Mt.map(Ht=>{const Lt=q-Ht.cx,_t=Ct-Ht.cy,Ut=Lt*Lt+_t*_t;return[Ht,Ut]}).sort((Ht,Lt)=>Ht[1]-Lt[1]).map(Ht=>Ht[0])}function cn(Mt,q){return q.some(Ct=>Ct.containsPt(Mt.x,Mt.y))}function sn(Mt,q){return q.some(Ct=>!!(I(Ct.x1,Ct.y1,Mt.x,Mt.y,.001)||I(Ct.x2,Ct.y2,Mt.x,Mt.y,.001)))}function Pe(Mt,q){let Ct=Number.POSITIVE_INFINITY,Ht=null;for(const Lt of Mt){if(!G(Lt,q))continue;const _t=kt(Lt,q);_t>=0&&_t<Ct&&(Ht=Lt,Ct=_t)}return Ht}function ze(Mt,q){return Mt.reduce((Ct,Ht)=>G(Ht,q)&&L(Ht,q)?Ct+1:Ct,0)}function Ke(Mt,q,Ct,Ht){const Lt=Ct.top,_t=Ct.left,Ut=Ct.bottom,qt=Ct.right;if(Ht){if(_t.state===M.POINT){if(Lt.state===M.POINT)return Xe(Mt.x-q,Mt.y-q);if(Ut.state===M.POINT)return Xe(Mt.x-q,Mt.y2+q);const Ve=Mt.width*Mt.height;return Mt.width*((_t.y-Mt.y+(qt.y-Mt.y))*.5)<Ve*.5?_t.y>qt.y?Xe(Mt.x-q,Mt.y-q):Xe(Mt.x2+q,Mt.y-q):_t.y<qt.y?Xe(Mt.x-q,Mt.y2+q):Xe(Mt.x2+q,Mt.y2+q)}if(qt.state===M.POINT){if(Lt.state===M.POINT)return Xe(Mt.x2+q,Mt.y-q);if(Ut.state===M.POINT)return Xe(Mt.x2+q,Mt.y2+q)}const ke=Mt.height*Mt.width;return Mt.height*((Lt.x-Mt.x+(qt.x-Mt.x))*.5)<ke*.5?Lt.x>Ut.x?Xe(Mt.x-q,Mt.y-q):Xe(Mt.x-q,Mt.y2+q):Lt.x<Ut.x?Xe(Mt.x2+q,Mt.y-q):Xe(Mt.x2+q,Mt.y2+q)}if(_t.state===M.POINT){if(Lt.state===M.POINT)return Xe(Mt.x2+q,Mt.y2+q);if(Ut.state===M.POINT)return Xe(Mt.x2+q,Mt.y-q);const ke=Mt.height*Mt.width;return Mt.width*((_t.y-Mt.y+(qt.y-Mt.y))*.5)<ke*.5?_t.y>qt.y?Xe(Mt.x2+q,Mt.y2+q):Xe(Mt.x-q,Mt.y2+q):_t.y<qt.y?Xe(Mt.x2+q,Mt.y-q):Xe(Mt.x-q,Mt.y-q)}if(qt.state===M.POINT){if(Lt.state===M.POINT)return Xe(Mt.x-q,Mt.y2+q);if(Ut.state===M.POINT)return Xe(Mt.x-q,Mt.y-q)}const se=Mt.height*Mt.width;return Mt.height*((Lt.x-Mt.x+(qt.x-Mt.x))*.5)<se*.5?Lt.x>Ut.x?Xe(Mt.x2+q,Mt.y2+q):Xe(Mt.x2+q,Mt.y-q):Lt.x<Ut.x?Xe(Mt.x-q,Mt.y2+q):Xe(Mt.x-q,Mt.y-q)}function le(Mt,q,Ct,Ht){if(!(Mt.closed?Ct<Mt.length:Ct<Mt.length-1))return!1;const _t=Mt.get(q),Ut=Mt.get(Ct+1);for(let qt=q+1;qt<=Ct;qt++){const se=Mt.get(qt);if(c(_t.x,_t.y,Ut.x,Ut.y,se.x,se.y)>Ht)return!1}return!0}function Ae(Mt=0){return q=>{if(Mt<0||q.length<3)return q;const Ct=[];let Ht=0;const Lt=Mt*Mt;for(;Ht<q.length;){let _t=Ht+1;for(;le(q,Ht,_t,Lt);)_t++;Ct.push(q.get(Ht)),Ht=_t}return new je(Ct)}}function Pt(Mt,q){switch(Mt){case-2:return(((-q+3)*q-3)*q+1)/6;case-1:return((3*q-6)*q*q+4)/6;case 0:return(((-3*q+3)*q+3)*q+1)/6;case 1:return q*q*q/6;default:throw new Error("unknown error")}}function wt(Mt=6){function _t(Ut,qt,se){let te=0,ke=0;for(let Ye=-2;Ye<=1;Ye++){const Ve=Ut.get(qt+Ye),on=Pt(Ye,se);te+=on*Ve.x,ke+=on*Ve.y}return{x:te,y:ke}}return Ut=>{if(Ut.length<3)return Ut;const qt=[],se=Ut.closed,te=Ut.length+3-1+(se?0:2);qt.push(_t(Ut,2-(se?0:2),0));for(let ke=2-(se?0:2);ke<te;ke++)for(let Ye=1;Ye<=Mt;Ye++)qt.push(_t(Ut,ke,Ye/Mt));return new je(qt)}}function de(Mt=8){return q=>{let Ct=Mt,Ht=q.length;if(Ct>1)for(Ht=Math.floor(q.length/Ct);Ht<3&&Ct>1;)Ct-=1,Ht=Math.floor(q.length/Ct);const Lt=[];for(let _t=0,Ut=0;Ut<Ht;Ut++,_t+=Ct)Lt.push(q.get(_t));return new je(Lt)}}class je{constructor(q=[],Ct=!0){this.points=q,this.closed=Ct}get(q){const Ct=q,Ht=this.points.length;return q<0?this.closed?this.get(q+Ht):this.points[0]:q>=Ht?this.closed?this.get(q-Ht):this.points[Ht-1]:this.points[Ct]}get length(){return this.points.length}toString(q=1/0){const Ct=this.points;if(Ct.length===0)return"";const Ht=typeof q=="function"?q:z(q);let Lt="M";for(const _t of Ct)Lt+=`${Ht(_t.x)},${Ht(_t.y)} L`;return Lt=Lt.slice(0,-1),this.closed&&(Lt+=" Z"),Lt}draw(q){const Ct=this.points;if(Ct.length!==0){q.beginPath(),q.moveTo(Ct[0].x,Ct[0].y);for(const Ht of Ct)q.lineTo(Ht.x,Ht.y);this.closed&&q.closePath()}}sample(q){return de(q)(this)}simplify(q){return Ae(q)(this)}bSplines(q){return wt(q)(this)}apply(q){return q(this)}containsElements(q){const Ct=Rt(this.points);return Ct?q.every(Ht=>Ct.containsPt(Ht.cx,Ht.cy)&&this.withinArea(Ht.cx,Ht.cy)):!1}withinArea(q,Ct){if(this.length===0)return!1;let Ht=0;const Lt=this.points[0],_t=new R(Lt.x,Lt.y,Lt.x,Lt.y);for(let Ut=1;Ut<this.points.length;Ut++){const qt=this.points[Ut];_t.x1=_t.x2,_t.y1=_t.y2,_t.x2=qt.x,_t.y2=qt.y,_t.cuts(q,Ct)&&Ht++}return _t.x1=_t.x2,_t.y1=_t.y2,_t.x2=Lt.x,_t.y2=Lt.y,_t.cuts(q,Ct)&&Ht++,Ht%2===1}}class Re{constructor(q=0){this.count=0,this.arr=[],this.set=new Set,this.arr.length=q}add(q){this.set.add(`${q.x}x${q.y}`),this.arr[this.count++]=q}contains(q){return this.set.has(`${q.x}x${q.y}`)}isFirst(q){if(this.count===0)return!1;const Ct=this.arr[0];return Ct!=null&&Ct.x===q.x&&Ct.y===q.y}path(){return new je(this.arr.slice(0,this.count))}clear(){this.set.clear(),this.count=0}get(q){return this.arr[q]}get length(){return this.count}}const ce=0,Le=1,xe=2,Ft=3;function re(Mt,q){const Ct=(Math.floor(Mt.width)+Math.floor(Mt.height))*2,Ht=new Re(Ct);function Lt(se,te,ke,Ye){const Ve=Mt.get(se,te);return Number.isNaN(Ve)?Number.NaN:Ve>q?ke+Ye:ke}function _t(se,te){let ke=ce;return ke=Lt(se,te,ke,1),ke=Lt(se+1,te,ke,2),ke=Lt(se,te+1,ke,4),ke=Lt(se+1,te+1,ke,8),Number.isNaN(ke)?-1:ke}let Ut=Le;function qt(se,te){let ke=se,Ye=te,Ve=Mt.invertScaleX(ke),on=Mt.invertScaleY(Ye);for(let xn=0;xn<Mt.width*Mt.height;xn++){const vn={x:Ve,y:on};if(Ht.contains(vn)){if(Ht.isFirst(vn))return!0}else Ht.add(vn);const Qn=_t(ke,Ye);switch(Qn){case-1:return!0;case 0:case 3:case 2:case 7:Ut=xe;break;case 12:case 14:case 4:Ut=Ft;break;case 6:Ut=Ut===ce?Ft:xe;break;case 1:case 13:case 5:Ut=ce;break;case 9:Ut=Ut===xe?ce:Le;break;case 10:case 8:case 11:Ut=Le;break;default:return console.warn("Marching squares invalid state: "+Qn),!0}switch(Ut){case ce:Ye--,on-=Mt.pixelGroup;break;case Le:Ye++,on+=Mt.pixelGroup;break;case Ft:ke--,Ve-=Mt.pixelGroup;break;case xe:ke++,Ve+=Mt.pixelGroup;break;default:return console.warn("Marching squares invalid state: "+Qn),!0}}return!0}for(let se=0;se<Mt.width;se++)for(let te=0;te<Mt.height;te++){if(Mt.get(se,te)<=q)continue;const ke=_t(se,te);if(!(ke<0||ke===15)&&qt(se,te))return Ht.path()}return null}const Me={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 O(Mt){return Mt!=null&&typeof Mt.radius=="number"}function st(Mt,q){if(O(Mt)!==O(q))return!1;if(O(Mt)){const Ht=q;return Mt.cx===Ht.cx&&Mt.cy===Ht.cy&&Mt.radius===Ht.radius}const Ct=q;return Mt.x===Ct.x&&Mt.y===Ct.y&&Mt.width===Ct.width&&Mt.height===Ct.height}var ve;(function(Mt){Mt[Mt.MEMBERS=0]="MEMBERS",Mt[Mt.NON_MEMBERS=1]="NON_MEMBERS",Mt[Mt.EDGES=2]="EDGES"})(ve||(ve={}));class $t{constructor(q={}){this.dirty=new Set,this.members=[],this.nonMembers=[],this.virtualEdges=[],this.edges=[],this.activeRegion=new J(0,0,0,0),this.potentialArea=new Vt(1,0,0,0,0,0,0),this.o=Object.assign({},Me,q)}pushMember(...q){if(q.length!==0){this.dirty.add(ve.MEMBERS);for(const Ct of q)this.members.push({raw:Ct,obj:O(Ct)?Tt.from(Ct):J.from(Ct),area:null})}}removeMember(q){const Ct=this.members.findIndex(Ht=>st(Ht.raw,q));return Ct<0?!1:(this.members.splice(Ct,1),this.dirty.add(ve.MEMBERS),!0)}removeNonMember(q){const Ct=this.nonMembers.findIndex(Ht=>st(Ht.raw,q));return Ct<0?!1:(this.nonMembers.splice(Ct,1),this.dirty.add(ve.NON_MEMBERS),!0)}removeEdge(q){const Ct=this.edges.findIndex(Ht=>Ht.obj.equals(q));return Ct<0?!1:(this.edges.splice(Ct,1),this.dirty.add(ve.NON_MEMBERS),!0)}pushNonMember(...q){if(q.length!==0){this.dirty.add(ve.NON_MEMBERS);for(const Ct of q)this.nonMembers.push({raw:Ct,obj:O(Ct)?Tt.from(Ct):J.from(Ct),area:null})}}pushEdge(...q){if(q.length!==0){this.dirty.add(ve.EDGES);for(const Ct of q)this.edges.push({raw:Ct,obj:R.from(Ct),area:null})}}update(){const q=this.dirty.has(ve.MEMBERS),Ct=this.dirty.has(ve.NON_MEMBERS);let Ht=this.dirty.has(ve.EDGES);this.dirty.clear();const Lt=this.members.map(te=>te.obj);if(this.o.virtualEdges&&(q||Ct)){const te=this.nonMembers.map(Ve=>Ve.obj),ke=pn(Lt,te,this.o.maxRoutingIterations,this.o.morphBuffer),Ye=new Map(this.virtualEdges.map(Ve=>[Ve.obj.toString(),Ve.area]));this.virtualEdges=ke.map(Ve=>{var on;return{raw:Ve,obj:Ve,area:(on=Ye.get(Ve.toString()))!==null&&on!==void 0?on:null}}),Ht=!0}let _t=!1;if(q||Ht){const te=this.virtualEdges.concat(this.edges).map(on=>on.obj),ke=Ne(Lt,te),Ye=Math.max(this.o.edgeR1,this.o.nodeR1)+this.o.morphBuffer,Ve=J.from(fe(ke,Ye));Ve.equals(this.activeRegion)||(_t=!0,this.activeRegion=Ve)}if(_t){const te=Math.ceil(this.activeRegion.width/this.o.pixelGroup),ke=Math.ceil(this.activeRegion.height/this.o.pixelGroup);this.activeRegion.x!==this.potentialArea.pixelX||this.activeRegion.y!==this.potentialArea.pixelY?(this.potentialArea=Vt.fromPixelRegion(this.activeRegion,this.o.pixelGroup),this.members.forEach(Ye=>Ye.area=null),this.nonMembers.forEach(Ye=>Ye.area=null),this.edges.forEach(Ye=>Ye.area=null),this.virtualEdges.forEach(Ye=>Ye.area=null)):(te!==this.potentialArea.width||ke!==this.potentialArea.height)&&(this.potentialArea=Vt.fromPixelRegion(this.activeRegion,this.o.pixelGroup))}const Ut=new Map,qt=te=>{if(te.area){const ke=`${te.obj.width}x${te.obj.height}x${te.obj instanceof J?"R":"C"}`;Ut.set(ke,te.area)}},se=te=>{if(te.area)return;const ke=`${te.obj.width}x${te.obj.height}x${te.obj instanceof J?"R":"C"}`;if(Ut.has(ke)){const Ve=Ut.get(ke);te.area=this.potentialArea.copy(Ve,{x:te.obj.x-this.o.nodeR1,y:te.obj.y-this.o.nodeR1});return}const Ye=te.obj instanceof J?we(te.obj,this.potentialArea,this.o.nodeR1):Ce(te.obj,this.potentialArea,this.o.nodeR1);te.area=Ye,Ut.set(ke,Ye)};this.members.forEach(qt),this.nonMembers.forEach(qt),this.members.forEach(se),this.nonMembers.forEach(te=>{this.activeRegion.intersects(te.obj)?se(te):te.area=null}),this.edges.forEach(te=>{te.area||(te.area=ue(te.obj,this.potentialArea,this.o.edgeR1))}),this.virtualEdges.forEach(te=>{te.area||(te.area=ue(te.obj,this.potentialArea,this.o.edgeR1))})}drawMembers(q){for(const Ct of this.members)Ct.obj.draw(q)}drawNonMembers(q){for(const Ct of this.nonMembers)Ct.obj.draw(q)}drawEdges(q){for(const Ct of this.edges)Ct.obj.draw(q)}drawPotentialArea(q,Ct=!0){this.potentialArea.draw(q,Ct)}compute(){if(this.members.length===0)return new je([]);this.dirty.size>0&&this.update();const{o:q,potentialArea:Ct}=this,Ht=this.members.map(qt=>qt.area),Lt=this.virtualEdges.concat(this.edges).map(qt=>qt.area),_t=this.nonMembers.filter(qt=>qt.area!=null).map(qt=>qt.area),Ut=this.members.map(qt=>qt.obj);return Ie(Ct,Ht,Lt,_t,qt=>qt.containsElements(Ut),q)}}function Ie(Mt,q,Ct,Ht,Lt,_t={}){const Ut=Object.assign({},Me,_t);let qt=Ut.threshold,se=Ut.memberInfluenceFactor,te=Ut.edgeInfluenceFactor,ke=Ut.nonMemberInfluenceFactor;const Ye=(Ut.nodeR0-Ut.nodeR1)*(Ut.nodeR0-Ut.nodeR1),Ve=(Ut.edgeR0-Ut.edgeR1)*(Ut.edgeR0-Ut.edgeR1);for(let on=0;on<Ut.maxMarchingIterations;on++){if(Mt.clear(),se!==0){const vn=se/Ye;for(const Qn of q)Mt.incArea(Qn,vn)}if(te!==0){const vn=te/Ve;for(const Qn of Ct)Mt.incArea(Qn,vn)}if(ke!==0){const vn=ke/Ye;for(const Qn of Ht)Mt.incArea(Qn,vn)}const xn=re(Mt,qt);if(xn&&Lt(xn))return xn;if(qt*=.95,on<=Ut.maxMarchingIterations*.5)se*=1.2,te*=1.2;else if(ke!==0&&Ht.length>0)ke*=.8;else break}return new je([])}function Ne(Mt,q){if(Mt.length===0)return new J(0,0,0,0);const Ct=J.from(Mt[0]);for(const Ht of Mt)Ct.add(Ht);for(const Ht of q)Ct.add(S(Ht));return Ct}function tn(Mt,q=[],Ct=[],Ht={}){if(Mt.length===0)return new je([]);const Lt=new $t(Ht);return Lt.pushMember(...Mt),Lt.pushNonMember(...q),Lt.pushEdge(...Ct),Lt.compute()}},45411:function(bt){"use strict";bt.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(bt,Et,y){var c=y(45411),_=y(81683),I=Object.hasOwnProperty,z=Object.create(null);for(var S in c)I.call(c,S)&&(z[c[S]]=S);var R=bt.exports={to:{},get:{}};R.get=function(D){var A=D.substring(0,3).toLowerCase(),L,F;switch(A){case"hsl":L=R.get.hsl(D),F="hsl";break;case"hwb":L=R.get.hwb(D),F="hwb";break;default:L=R.get.rgb(D),F="rgb";break}return L?{model:F,value:L}:null},R.get.rgb=function(D){if(!D)return null;var A=/^#([a-f0-9]{3,4})$/i,L=/^#([a-f0-9]{6})([a-f0-9]{2})?$/i,F=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,rt=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,G=/^(\w+)$/,kt=[0,0,0,1],ft,J,Rt;if(ft=D.match(L)){for(Rt=ft[2],ft=ft[1],J=0;J<3;J++){var Tt=J*2;kt[J]=parseInt(ft.slice(Tt,Tt+2),16)}Rt&&(kt[3]=parseInt(Rt,16)/255)}else if(ft=D.match(A)){for(ft=ft[1],Rt=ft[3],J=0;J<3;J++)kt[J]=parseInt(ft[J]+ft[J],16);Rt&&(kt[3]=parseInt(Rt+Rt,16)/255)}else if(ft=D.match(F)){for(J=0;J<3;J++)kt[J]=parseInt(ft[J+1],0);ft[4]&&(ft[5]?kt[3]=parseFloat(ft[4])*.01:kt[3]=parseFloat(ft[4]))}else if(ft=D.match(rt)){for(J=0;J<3;J++)kt[J]=Math.round(parseFloat(ft[J+1])*2.55);ft[4]&&(ft[5]?kt[3]=parseFloat(ft[4])*.01:kt[3]=parseFloat(ft[4]))}else return(ft=D.match(G))?ft[1]==="transparent"?[0,0,0,0]:I.call(c,ft[1])?(kt=c[ft[1]],kt[3]=1,kt):null:null;for(J=0;J<3;J++)kt[J]=M(kt[J],0,255);return kt[3]=M(kt[3],0,1),kt},R.get.hsl=function(D){if(!D)return null;var A=/^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*)?\)$/,L=D.match(A);if(L){var F=parseFloat(L[4]),rt=(parseFloat(L[1])%360+360)%360,G=M(parseFloat(L[2]),0,100),kt=M(parseFloat(L[3]),0,100),ft=M(isNaN(F)?1:F,0,1);return[rt,G,kt,ft]}return null},R.get.hwb=function(D){if(!D)return null;var A=/^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*)?\)$/,L=D.match(A);if(L){var F=parseFloat(L[4]),rt=(parseFloat(L[1])%360+360)%360,G=M(parseFloat(L[2]),0,100),kt=M(parseFloat(L[3]),0,100),ft=M(isNaN(F)?1:F,0,1);return[rt,G,kt,ft]}return null},R.to.hex=function(){var D=_(arguments);return"#"+N(D[0])+N(D[1])+N(D[2])+(D[3]<1?N(Math.round(D[3]*255)):"")},R.to.rgb=function(){var D=_(arguments);return D.length<4||D[3]===1?"rgb("+Math.round(D[0])+", "+Math.round(D[1])+", "+Math.round(D[2])+")":"rgba("+Math.round(D[0])+", "+Math.round(D[1])+", "+Math.round(D[2])+", "+D[3]+")"},R.to.rgb.percent=function(){var D=_(arguments),A=Math.round(D[0]/255*100),L=Math.round(D[1]/255*100),F=Math.round(D[2]/255*100);return D.length<4||D[3]===1?"rgb("+A+"%, "+L+"%, "+F+"%)":"rgba("+A+"%, "+L+"%, "+F+"%, "+D[3]+")"},R.to.hsl=function(){var D=_(arguments);return D.length<4||D[3]===1?"hsl("+D[0]+", "+D[1]+"%, "+D[2]+"%)":"hsla("+D[0]+", "+D[1]+"%, "+D[2]+"%, "+D[3]+")"},R.to.hwb=function(){var D=_(arguments),A="";return D.length>=4&&D[3]!==1&&(A=", "+D[3]),"hwb("+D[0]+", "+D[1]+"%, "+D[2]+"%"+A+")"},R.to.keyword=function(D){return z[D.slice(0,3)]};function M(D,A,L){return Math.min(Math.max(A,D),L)}function N(D){var A=Math.round(D).toString(16).toUpperCase();return A.length<2?"0"+A:A}},92546:function(bt,Et,y){bt.exports={graphlib:y(76626),layout:y(47194),debug:y(11303),util:{time:y(53063).time,notime:y(53063).notime},version:y(11897)}},91626:function(bt,Et,y){"use strict";var c=y(72361),_=y(39240);bt.exports={run:I,undo:S};function I(R){var M=R.graph().acyclicer==="greedy"?_(R,N(R)):z(R);c.forEach(M,function(D){var A=R.edge(D);R.removeEdge(D),A.forwardName=D.name,A.reversed=!0,R.setEdge(D.w,D.v,A,c.uniqueId("rev"))});function N(D){return function(A){return D.edge(A).weight}}}function z(R){var M=[],N={},D={};function A(L){c.has(D,L)||(D[L]=!0,N[L]=!0,c.forEach(R.outEdges(L),function(F){c.has(N,F.w)?M.push(F):A(F.w)}),delete N[L])}return c.forEach(R.nodes(),A),M}function S(R){c.forEach(R.edges(),function(M){var N=R.edge(M);if(N.reversed){R.removeEdge(M);var D=N.forwardName;delete N.reversed,delete N.forwardName,R.setEdge(M.w,M.v,N,D)}})}},60765:function(bt,Et,y){var c=y(72361),_=y(53063);bt.exports=I;function I(S){function R(M){var N=S.children(M),D=S.node(M);if(N.length&&c.forEach(N,R),c.has(D,"minRank")){D.borderLeft=[],D.borderRight=[];for(var A=D.minRank,L=D.maxRank+1;A<L;++A)z(S,"borderLeft","_bl",M,D,A),z(S,"borderRight","_br",M,D,A)}}c.forEach(S.children(),R)}function z(S,R,M,N,D,A){var L={width:0,height:0,rank:A,borderType:R},F=D[R][A-1],rt=_.addDummyNode(S,"border",L,M);D[R][A]=rt,S.setParent(rt,N),F&&S.setEdge(F,rt,{weight:1})}},13257:function(bt,Et,y){"use strict";var c=y(72361);bt.exports={adjust:_,undo:I};function _(A){var L=A.graph().rankdir.toLowerCase();(L==="lr"||L==="rl")&&z(A)}function I(A){var L=A.graph().rankdir.toLowerCase();(L==="bt"||L==="rl")&&R(A),(L==="lr"||L==="rl")&&(N(A),z(A))}function z(A){c.forEach(A.nodes(),function(L){S(A.node(L))}),c.forEach(A.edges(),function(L){S(A.edge(L))})}function S(A){var L=A.width;A.width=A.height,A.height=L}function R(A){c.forEach(A.nodes(),function(L){M(A.node(L))}),c.forEach(A.edges(),function(L){var F=A.edge(L);c.forEach(F.points,M),c.has(F,"y")&&M(F)})}function M(A){A.y=-A.y}function N(A){c.forEach(A.nodes(),function(L){D(A.node(L))}),c.forEach(A.edges(),function(L){var F=A.edge(L);c.forEach(F.points,D),c.has(F,"x")&&D(F)})}function D(A){var L=A.x;A.x=A.y,A.y=L}},21135:function(bt){bt.exports=Et;function Et(){var _={};_._next=_._prev=_,this._sentinel=_}Et.prototype.dequeue=function(){var _=this._sentinel,I=_._prev;if(I!==_)return y(I),I},Et.prototype.enqueue=function(_){var I=this._sentinel;_._prev&&_._next&&y(_),_._next=I._next,I._next._prev=_,I._next=_,_._prev=I},Et.prototype.toString=function(){for(var _=[],I=this._sentinel,z=I._prev;z!==I;)_.push(JSON.stringify(z,c)),z=z._prev;return"["+_.join(", ")+"]"};function y(_){_._prev._next=_._next,_._next._prev=_._prev,delete _._next,delete _._prev}function c(_,I){if(_!=="_next"&&_!=="_prev")return I}},11303:function(bt,Et,y){var c=y(72361),_=y(53063),I=y(76626).Graph;bt.exports={debugOrdering:z};function z(S){var R=_.buildLayerMatrix(S),M=new I({compound:!0,multigraph:!0}).setGraph({});return c.forEach(S.nodes(),function(N){M.setNode(N,{label:N}),M.setParent(N,"layer"+S.node(N).rank)}),c.forEach(S.edges(),function(N){M.setEdge(N.v,N.w,{},N.name)}),c.forEach(R,function(N,D){var A="layer"+D;M.setNode(A,{rank:"same"}),c.reduce(N,function(L,F){return M.setEdge(L,F,{style:"invis"}),F})}),M}},76626:function(bt,Et,y){var c;try{c=y(75172)}catch(_){}c||(c=window.graphlib),bt.exports=c},39240:function(bt,Et,y){var c=y(72361),_=y(76626).Graph,I=y(21135);bt.exports=S;var z=c.constant(1);function S(A,L){if(A.nodeCount()<=1)return[];var F=N(A,L||z),rt=R(F.graph,F.buckets,F.zeroIdx);return c.flatten(c.map(rt,function(G){return A.outEdges(G.v,G.w)}),!0)}function R(A,L,F){for(var rt=[],G=L[L.length-1],kt=L[0],ft;A.nodeCount();){for(;ft=kt.dequeue();)M(A,L,F,ft);for(;ft=G.dequeue();)M(A,L,F,ft);if(A.nodeCount()){for(var J=L.length-2;J>0;--J)if(ft=L[J].dequeue(),ft){rt=rt.concat(M(A,L,F,ft,!0));break}}}return rt}function M(A,L,F,rt,G){var kt=G?[]:void 0;return c.forEach(A.inEdges(rt.v),function(ft){var J=A.edge(ft),Rt=A.node(ft.v);G&&kt.push({v:ft.v,w:ft.w}),Rt.out-=J,D(L,F,Rt)}),c.forEach(A.outEdges(rt.v),function(ft){var J=A.edge(ft),Rt=ft.w,Tt=A.node(Rt);Tt.in-=J,D(L,F,Tt)}),A.removeNode(rt.v),kt}function N(A,L){var F=new _,rt=0,G=0;c.forEach(A.nodes(),function(J){F.setNode(J,{v:J,in:0,out:0})}),c.forEach(A.edges(),function(J){var Rt=F.edge(J.v,J.w)||0,Tt=L(J),Vt=Rt+Tt;F.setEdge(J.v,J.w,Vt),G=Math.max(G,F.node(J.v).out+=Tt),rt=Math.max(rt,F.node(J.w).in+=Tt)});var kt=c.range(G+rt+3).map(function(){return new I}),ft=rt+1;return c.forEach(F.nodes(),function(J){D(kt,ft,F.node(J))}),{graph:F,buckets:kt,zeroIdx:ft}}function D(A,L,F){F.out?F.in?A[F.out-F.in+L].enqueue(F):A[A.length-1].enqueue(F):A[0].enqueue(F)}},47194:function(bt,Et,y){"use strict";var c=y(72361),_=y(91626),I=y(27163),z=y(64505),S=y(53063).normalizeRanks,R=y(71970),M=y(53063).removeEmptyRanks,N=y(31733),D=y(60765),A=y(13257),L=y(62852),F=y(93021),rt=y(53063),G=y(76626).Graph;bt.exports=kt;function kt(le,Ae){var Pt=Ae&&Ae.debugTiming?rt.time:rt.notime;Pt("layout",function(){var wt=Pt(" buildLayoutGraph",function(){return ne(le)});Pt(" runLayout",function(){ft(wt,Pt)}),Pt(" updateInputGraph",function(){J(le,wt)})})}function ft(le,Ae){Ae(" makeSpaceForEdgeLabels",function(){We(le)}),Ae(" removeSelfEdges",function(){cn(le)}),Ae(" acyclic",function(){_.run(le)}),Ae(" nestingGraph.run",function(){N.run(le)}),Ae(" rank",function(){z(rt.asNonCompoundGraph(le))}),Ae(" injectEdgeLabelProxies",function(){rn(le)}),Ae(" removeEmptyRanks",function(){M(le)}),Ae(" nestingGraph.cleanup",function(){N.cleanup(le)}),Ae(" normalizeRanks",function(){S(le)}),Ae(" assignRankMinMax",function(){Xe(le)}),Ae(" removeEdgeLabelProxies",function(){pn(le)}),Ae(" normalize.run",function(){I.run(le)}),Ae(" parentDummyChains",function(){R(le)}),Ae(" addBorderSegments",function(){D(le)}),Ae(" order",function(){L(le)}),Ae(" insertSelfEdges",function(){sn(le)}),Ae(" adjustCoordinateSystem",function(){A.adjust(le)}),Ae(" position",function(){F(le)}),Ae(" positionSelfEdges",function(){Pe(le)}),Ae(" removeBorderNodes",function(){Ee(le)}),Ae(" normalize.undo",function(){I.undo(le)}),Ae(" fixupEdgeLabelCoords",function(){mn(le)}),Ae(" undoCoordinateSystem",function(){A.undo(le)}),Ae(" translateGraph",function(){Tn(le)}),Ae(" assignNodeIntersects",function(){$e(le)}),Ae(" reversePoints",function(){It(le)}),Ae(" acyclic.undo",function(){_.undo(le)})}function J(le,Ae){c.forEach(le.nodes(),function(Pt){var wt=le.node(Pt),de=Ae.node(Pt);wt&&(wt.x=de.x,wt.y=de.y,Ae.children(Pt).length&&(wt.width=de.width,wt.height=de.height))}),c.forEach(le.edges(),function(Pt){var wt=le.edge(Pt),de=Ae.edge(Pt);wt.points=de.points,c.has(de,"x")&&(wt.x=de.x,wt.y=de.y)}),le.graph().width=Ae.graph().width,le.graph().height=Ae.graph().height}var Rt=["nodesep","edgesep","ranksep","marginx","marginy"],Tt={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Vt=["acyclicer","ranker","rankdir","align"],fe=["width","height"],ue={width:0,height:0},Ce=["minlen","weight","width","height","labeloffset"],be={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},we=["labelpos"];function ne(le){var Ae=new G({multigraph:!0,compound:!0}),Pt=Ke(le.graph());return Ae.setGraph(c.merge({},Tt,ze(Pt,Rt),c.pick(Pt,Vt))),c.forEach(le.nodes(),function(wt){var de=Ke(le.node(wt));Ae.setNode(wt,c.defaults(ze(de,fe),ue)),Ae.setParent(wt,le.parent(wt))}),c.forEach(le.edges(),function(wt){var de=Ke(le.edge(wt));Ae.setEdge(wt,c.merge({},be,ze(de,Ce),c.pick(de,we)))}),Ae}function We(le){var Ae=le.graph();Ae.ranksep/=2,c.forEach(le.edges(),function(Pt){var wt=le.edge(Pt);wt.minlen*=2,wt.labelpos.toLowerCase()!=="c"&&(Ae.rankdir==="TB"||Ae.rankdir==="BT"?wt.width+=wt.labeloffset:wt.height+=wt.labeloffset)})}function rn(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae);if(Pt.width&&Pt.height){var wt=le.node(Ae.v),de=le.node(Ae.w),je={rank:(de.rank-wt.rank)/2+wt.rank,e:Ae};rt.addDummyNode(le,"edge-proxy",je,"_ep")}})}function Xe(le){var Ae=0;c.forEach(le.nodes(),function(Pt){var wt=le.node(Pt);wt.borderTop&&(wt.minRank=le.node(wt.borderTop).rank,wt.maxRank=le.node(wt.borderBottom).rank,Ae=c.max(Ae,wt.maxRank))}),le.graph().maxRank=Ae}function pn(le){c.forEach(le.nodes(),function(Ae){var Pt=le.node(Ae);Pt.dummy==="edge-proxy"&&(le.edge(Pt.e).labelRank=Pt.rank,le.removeNode(Ae))})}function Tn(le){var Ae=Number.POSITIVE_INFINITY,Pt=0,wt=Number.POSITIVE_INFINITY,de=0,je=le.graph(),Re=je.marginx||0,ce=je.marginy||0;function Le(xe){var Ft=xe.x,re=xe.y,Me=xe.width,O=xe.height;Ae=Math.min(Ae,Ft-Me/2),Pt=Math.max(Pt,Ft+Me/2),wt=Math.min(wt,re-O/2),de=Math.max(de,re+O/2)}c.forEach(le.nodes(),function(xe){Le(le.node(xe))}),c.forEach(le.edges(),function(xe){var Ft=le.edge(xe);c.has(Ft,"x")&&Le(Ft)}),Ae-=Re,wt-=ce,c.forEach(le.nodes(),function(xe){var Ft=le.node(xe);Ft.x-=Ae,Ft.y-=wt}),c.forEach(le.edges(),function(xe){var Ft=le.edge(xe);c.forEach(Ft.points,function(re){re.x-=Ae,re.y-=wt}),c.has(Ft,"x")&&(Ft.x-=Ae),c.has(Ft,"y")&&(Ft.y-=wt)}),je.width=Pt-Ae+Re,je.height=de-wt+ce}function $e(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae),wt=le.node(Ae.v),de=le.node(Ae.w),je,Re;Pt.points?(je=Pt.points[0],Re=Pt.points[Pt.points.length-1]):(Pt.points=[],je=de,Re=wt),Pt.points.unshift(rt.intersectRect(wt,je)),Pt.points.push(rt.intersectRect(de,Re))})}function mn(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae);if(c.has(Pt,"x"))switch((Pt.labelpos==="l"||Pt.labelpos==="r")&&(Pt.width-=Pt.labeloffset),Pt.labelpos){case"l":Pt.x-=Pt.width/2+Pt.labeloffset;break;case"r":Pt.x+=Pt.width/2+Pt.labeloffset;break}})}function It(le){c.forEach(le.edges(),function(Ae){var Pt=le.edge(Ae);Pt.reversed&&Pt.points.reverse()})}function Ee(le){c.forEach(le.nodes(),function(Ae){if(le.children(Ae).length){var Pt=le.node(Ae),wt=le.node(Pt.borderTop),de=le.node(Pt.borderBottom),je=le.node(c.last(Pt.borderLeft)),Re=le.node(c.last(Pt.borderRight));Pt.width=Math.abs(Re.x-je.x),Pt.height=Math.abs(de.y-wt.y),Pt.x=je.x+Pt.width/2,Pt.y=wt.y+Pt.height/2}}),c.forEach(le.nodes(),function(Ae){le.node(Ae).dummy==="border"&&le.removeNode(Ae)})}function cn(le){c.forEach(le.edges(),function(Ae){if(Ae.v===Ae.w){var Pt=le.node(Ae.v);Pt.selfEdges||(Pt.selfEdges=[]),Pt.selfEdges.push({e:Ae,label:le.edge(Ae)}),le.removeEdge(Ae)}})}function sn(le){var Ae=rt.buildLayerMatrix(le);c.forEach(Ae,function(Pt){var wt=0;c.forEach(Pt,function(de,je){var Re=le.node(de);Re.order=je+wt,c.forEach(Re.selfEdges,function(ce){rt.addDummyNode(le,"selfedge",{width:ce.label.width,height:ce.label.height,rank:Re.rank,order:je+ ++wt,e:ce.e,label:ce.label},"_se")}),delete Re.selfEdges})})}function Pe(le){c.forEach(le.nodes(),function(Ae){var Pt=le.node(Ae);if(Pt.dummy==="selfedge"){var wt=le.node(Pt.e.v),de=wt.x+wt.width/2,je=wt.y,Re=Pt.x-de,ce=wt.height/2;le.setEdge(Pt.e,Pt.label),le.removeNode(Ae),Pt.label.points=[{x:de+2*Re/3,y:je-ce},{x:de+5*Re/6,y:je-ce},{x:de+Re,y:je},{x:de+5*Re/6,y:je+ce},{x:de+2*Re/3,y:je+ce}],Pt.label.x=Pt.x,Pt.label.y=Pt.y}})}function ze(le,Ae){return c.mapValues(c.pick(le,Ae),Number)}function Ke(le){var Ae={};return c.forEach(le,function(Pt,wt){Ae[wt.toLowerCase()]=Pt}),Ae}},72361:function(bt,Et,y){var c;try{c={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(92993)}}catch(_){}c||(c=window._),bt.exports=c},31733:function(bt,Et,y){var c=y(72361),_=y(53063);bt.exports={run:I,cleanup:M};function I(N){var D=_.addDummyNode(N,"root",{},"_root"),A=S(N),L=c.max(c.values(A))-1,F=2*L+1;N.graph().nestingRoot=D,c.forEach(N.edges(),function(G){N.edge(G).minlen*=F});var rt=R(N)+1;c.forEach(N.children(),function(G){z(N,D,F,rt,L,A,G)}),N.graph().nodeRankFactor=F}function z(N,D,A,L,F,rt,G){var kt=N.children(G);if(!kt.length){G!==D&&N.setEdge(D,G,{weight:0,minlen:A});return}var ft=_.addBorderNode(N,"_bt"),J=_.addBorderNode(N,"_bb"),Rt=N.node(G);N.setParent(ft,G),Rt.borderTop=ft,N.setParent(J,G),Rt.borderBottom=J,c.forEach(kt,function(Tt){z(N,D,A,L,F,rt,Tt);var Vt=N.node(Tt),fe=Vt.borderTop?Vt.borderTop:Tt,ue=Vt.borderBottom?Vt.borderBottom:Tt,Ce=Vt.borderTop?L:2*L,be=fe!==ue?1:F-rt[G]+1;N.setEdge(ft,fe,{weight:Ce,minlen:be,nestingEdge:!0}),N.setEdge(ue,J,{weight:Ce,minlen:be,nestingEdge:!0})}),N.parent(G)||N.setEdge(D,ft,{weight:0,minlen:F+rt[G]})}function S(N){var D={};function A(L,F){var rt=N.children(L);rt&&rt.length&&c.forEach(rt,function(G){A(G,F+1)}),D[L]=F}return c.forEach(N.children(),function(L){A(L,1)}),D}function R(N){return c.reduce(N.edges(),function(D,A){return D+N.edge(A).weight},0)}function M(N){var D=N.graph();N.removeNode(D.nestingRoot),delete D.nestingRoot,c.forEach(N.edges(),function(A){var L=N.edge(A);L.nestingEdge&&N.removeEdge(A)})}},27163:function(bt,Et,y){"use strict";var c=y(72361),_=y(53063);bt.exports={run:I,undo:S};function I(R){R.graph().dummyChains=[],c.forEach(R.edges(),function(M){z(R,M)})}function z(R,M){var N=M.v,D=R.node(N).rank,A=M.w,L=R.node(A).rank,F=M.name,rt=R.edge(M),G=rt.labelRank;if(L!==D+1){R.removeEdge(M);var kt,ft,J;for(J=0,++D;D<L;++J,++D)rt.points=[],ft={width:0,height:0,edgeLabel:rt,edgeObj:M,rank:D},kt=_.addDummyNode(R,"edge",ft,"_d"),D===G&&(ft.width=rt.width,ft.height=rt.height,ft.dummy="edge-label",ft.labelpos=rt.labelpos),R.setEdge(N,kt,{weight:rt.weight},F),J===0&&R.graph().dummyChains.push(kt),N=kt;R.setEdge(N,A,{weight:rt.weight},F)}}function S(R){c.forEach(R.graph().dummyChains,function(M){var N=R.node(M),D=N.edgeLabel,A;for(R.setEdge(N.edgeObj,D);N.dummy;)A=R.successors(M)[0],R.removeNode(M),D.points.push({x:N.x,y:N.y}),N.dummy==="edge-label"&&(D.x=N.x,D.y=N.y,D.width=N.width,D.height=N.height),M=A,N=R.node(M)})}},52205:function(bt,Et,y){var c=y(72361);bt.exports=_;function _(I,z,S){var R={},M;c.forEach(S,function(N){for(var D=I.parent(N),A,L;D;){if(A=I.parent(D),A?(L=R[A],R[A]=D):(L=M,M=D),L&&L!==D){z.setEdge(L,D);return}D=A}})}},99506:function(bt,Et,y){var c=y(72361);bt.exports=_;function _(I,z){return c.map(z,function(S){var R=I.inEdges(S);if(R.length){var M=c.reduce(R,function(N,D){var A=I.edge(D),L=I.node(D.v);return{sum:N.sum+A.weight*L.order,weight:N.weight+A.weight}},{sum:0,weight:0});return{v:S,barycenter:M.sum/M.weight,weight:M.weight}}else return{v:S}})}},59105:function(bt,Et,y){var c=y(72361),_=y(76626).Graph;bt.exports=I;function I(S,R,M){var N=z(S),D=new _({compound:!0}).setGraph({root:N}).setDefaultNodeLabel(function(A){return S.node(A)});return c.forEach(S.nodes(),function(A){var L=S.node(A),F=S.parent(A);(L.rank===R||L.minRank<=R&&R<=L.maxRank)&&(D.setNode(A),D.setParent(A,F||N),c.forEach(S[M](A),function(rt){var G=rt.v===A?rt.w:rt.v,kt=D.edge(G,A),ft=c.isUndefined(kt)?0:kt.weight;D.setEdge(G,A,{weight:S.edge(rt).weight+ft})}),c.has(L,"minRank")&&D.setNode(A,{borderLeft:L.borderLeft[R],borderRight:L.borderRight[R]}))}),D}function z(S){for(var R;S.hasNode(R=c.uniqueId("_root")););return R}},45456:function(bt,Et,y){"use strict";var c=y(72361);bt.exports=_;function _(z,S){for(var R=0,M=1;M<S.length;++M)R+=I(z,S[M-1],S[M]);return R}function I(z,S,R){for(var M=c.zipObject(R,c.map(R,function(rt,G){return G})),N=c.flatten(c.map(S,function(rt){return c.sortBy(c.map(z.outEdges(rt),function(G){return{pos:M[G.w],weight:z.edge(G).weight}}),"pos")}),!0),D=1;D<R.length;)D<<=1;var A=2*D-1;D-=1;var L=c.map(new Array(A),function(){return 0}),F=0;return c.forEach(N.forEach(function(rt){var G=rt.pos+D;L[G]+=rt.weight;for(var kt=0;G>0;)G%2&&(kt+=L[G+1]),G=G-1>>1,L[G]+=rt.weight;F+=rt.weight*kt})),F}},62852:function(bt,Et,y){"use strict";var c=y(72361),_=y(18043),I=y(45456),z=y(86490),S=y(59105),R=y(52205),M=y(76626).Graph,N=y(53063);bt.exports=D;function D(rt){var G=N.maxRank(rt),kt=A(rt,c.range(1,G+1),"inEdges"),ft=A(rt,c.range(G-1,-1,-1),"outEdges"),J=_(rt);F(rt,J);for(var Rt=Number.POSITIVE_INFINITY,Tt,Vt=0,fe=0;fe<4;++Vt,++fe){L(Vt%2?kt:ft,Vt%4>=2),J=N.buildLayerMatrix(rt);var ue=I(rt,J);ue<Rt&&(fe=0,Tt=c.cloneDeep(J),Rt=ue)}F(rt,Tt)}function A(rt,G,kt){return c.map(G,function(ft){return S(rt,ft,kt)})}function L(rt,G){var kt=new M;c.forEach(rt,function(ft){var J=ft.graph().root,Rt=z(ft,J,kt,G);c.forEach(Rt.vs,function(Tt,Vt){ft.node(Tt).order=Vt}),R(ft,kt,Rt.vs)})}function F(rt,G){c.forEach(G,function(kt){c.forEach(kt,function(ft,J){rt.node(ft).order=J})})}},18043:function(bt,Et,y){"use strict";var c=y(72361);bt.exports=_;function _(I){var z={},S=c.filter(I.nodes(),function(A){return!I.children(A).length}),R=c.max(c.map(S,function(A){return I.node(A).rank})),M=c.map(c.range(R+1),function(){return[]});function N(A){if(!c.has(z,A)){z[A]=!0;var L=I.node(A);M[L.rank].push(A),c.forEach(I.successors(A),N)}}var D=c.sortBy(S,function(A){return I.node(A).rank});return c.forEach(D,N),M}},45926:function(bt,Et,y){"use strict";var c=y(72361);bt.exports=_;function _(S,R){var M={};c.forEach(S,function(D,A){var L=M[D.v]={indegree:0,in:[],out:[],vs:[D.v],i:A};c.isUndefined(D.barycenter)||(L.barycenter=D.barycenter,L.weight=D.weight)}),c.forEach(R.edges(),function(D){var A=M[D.v],L=M[D.w];!c.isUndefined(A)&&!c.isUndefined(L)&&(L.indegree++,A.out.push(M[D.w]))});var N=c.filter(M,function(D){return!D.indegree});return I(N)}function I(S){var R=[];function M(A){return function(L){L.merged||(c.isUndefined(L.barycenter)||c.isUndefined(A.barycenter)||L.barycenter>=A.barycenter)&&z(A,L)}}function N(A){return function(L){L.in.push(A),--L.indegree===0&&S.push(L)}}for(;S.length;){var D=S.pop();R.push(D),c.forEach(D.in.reverse(),M(D)),c.forEach(D.out,N(D))}return c.map(c.filter(R,function(A){return!A.merged}),function(A){return c.pick(A,["vs","i","barycenter","weight"])})}function z(S,R){var M=0,N=0;S.weight&&(M+=S.barycenter*S.weight,N+=S.weight),R.weight&&(M+=R.barycenter*R.weight,N+=R.weight),S.vs=R.vs.concat(S.vs),S.barycenter=M/N,S.weight=N,S.i=Math.min(R.i,S.i),R.merged=!0}},86490:function(bt,Et,y){var c=y(72361),_=y(99506),I=y(45926),z=y(1349);bt.exports=S;function S(N,D,A,L){var F=N.children(D),rt=N.node(D),G=rt?rt.borderLeft:void 0,kt=rt?rt.borderRight:void 0,ft={};G&&(F=c.filter(F,function(ue){return ue!==G&&ue!==kt}));var J=_(N,F);c.forEach(J,function(ue){if(N.children(ue.v).length){var Ce=S(N,ue.v,A,L);ft[ue.v]=Ce,c.has(Ce,"barycenter")&&M(ue,Ce)}});var Rt=I(J,A);R(Rt,ft);var Tt=z(Rt,L);if(G&&(Tt.vs=c.flatten([G,Tt.vs,kt],!0),N.predecessors(G).length)){var Vt=N.node(N.predecessors(G)[0]),fe=N.node(N.predecessors(kt)[0]);c.has(Tt,"barycenter")||(Tt.barycenter=0,Tt.weight=0),Tt.barycenter=(Tt.barycenter*Tt.weight+Vt.order+fe.order)/(Tt.weight+2),Tt.weight+=2}return Tt}function R(N,D){c.forEach(N,function(A){A.vs=c.flatten(A.vs.map(function(L){return D[L]?D[L].vs:L}),!0)})}function M(N,D){c.isUndefined(N.barycenter)?(N.barycenter=D.barycenter,N.weight=D.weight):(N.barycenter=(N.barycenter*N.weight+D.barycenter*D.weight)/(N.weight+D.weight),N.weight+=D.weight)}},1349:function(bt,Et,y){var c=y(72361),_=y(53063);bt.exports=I;function I(R,M){var N=_.partition(R,function(ft){return c.has(ft,"barycenter")}),D=N.lhs,A=c.sortBy(N.rhs,function(ft){return-ft.i}),L=[],F=0,rt=0,G=0;D.sort(S(!!M)),G=z(L,A,G),c.forEach(D,function(ft){G+=ft.vs.length,L.push(ft.vs),F+=ft.barycenter*ft.weight,rt+=ft.weight,G=z(L,A,G)});var kt={vs:c.flatten(L,!0)};return rt&&(kt.barycenter=F/rt,kt.weight=rt),kt}function z(R,M,N){for(var D;M.length&&(D=c.last(M)).i<=N;)M.pop(),R.push(D.vs),N++;return N}function S(R){return function(M,N){return M.barycenter<N.barycenter?-1:M.barycenter>N.barycenter?1:R?N.i-M.i:M.i-N.i}}},71970:function(bt,Et,y){var c=y(72361);bt.exports=_;function _(S){var R=z(S);c.forEach(S.graph().dummyChains,function(M){for(var N=S.node(M),D=N.edgeObj,A=I(S,R,D.v,D.w),L=A.path,F=A.lca,rt=0,G=L[rt],kt=!0;M!==D.w;){if(N=S.node(M),kt){for(;(G=L[rt])!==F&&S.node(G).maxRank<N.rank;)rt++;G===F&&(kt=!1)}if(!kt){for(;rt<L.length-1&&S.node(G=L[rt+1]).minRank<=N.rank;)rt++;G=L[rt]}S.setParent(M,G),M=S.successors(M)[0]}})}function I(S,R,M,N){var D=[],A=[],L=Math.min(R[M].low,R[N].low),F=Math.max(R[M].lim,R[N].lim),rt,G;rt=M;do rt=S.parent(rt),D.push(rt);while(rt&&(R[rt].low>L||F>R[rt].lim));for(G=rt,rt=N;(rt=S.parent(rt))!==G;)A.push(rt);return{path:D.concat(A.reverse()),lca:G}}function z(S){var R={},M=0;function N(D){var A=M;c.forEach(S.children(D),N),R[D]={low:A,lim:M++}}return c.forEach(S.children(),N),R}},92080:function(bt,Et,y){"use strict";var c=y(72361),_=y(76626).Graph,I=y(53063);bt.exports={positionX:kt,findType1Conflicts:z,findType2Conflicts:S,addConflict:M,hasConflict:N,verticalAlignment:D,horizontalCompaction:A,alignCoordinates:rt,findSmallestWidthAlignment:F,balance:G};function z(Rt,Tt){var Vt={};function fe(ue,Ce){var be=0,we=0,ne=ue.length,We=c.last(Ce);return c.forEach(Ce,function(rn,Xe){var pn=R(Rt,rn),Tn=pn?Rt.node(pn).order:ne;(pn||rn===We)&&(c.forEach(Ce.slice(we,Xe+1),function($e){c.forEach(Rt.predecessors($e),function(mn){var It=Rt.node(mn),Ee=It.order;(Ee<be||Tn<Ee)&&!(It.dummy&&Rt.node($e).dummy)&&M(Vt,mn,$e)})}),we=Xe+1,be=Tn)}),Ce}return c.reduce(Tt,fe),Vt}function S(Rt,Tt){var Vt={};function fe(Ce,be,we,ne,We){var rn;c.forEach(c.range(be,we),function(Xe){rn=Ce[Xe],Rt.node(rn).dummy&&c.forEach(Rt.predecessors(rn),function(pn){var Tn=Rt.node(pn);Tn.dummy&&(Tn.order<ne||Tn.order>We)&&M(Vt,pn,rn)})})}function ue(Ce,be){var we=-1,ne,We=0;return c.forEach(be,function(rn,Xe){if(Rt.node(rn).dummy==="border"){var pn=Rt.predecessors(rn);pn.length&&(ne=Rt.node(pn[0]).order,fe(be,We,Xe,we,ne),We=Xe,we=ne)}fe(be,We,be.length,ne,Ce.length)}),be}return c.reduce(Tt,ue),Vt}function R(Rt,Tt){if(Rt.node(Tt).dummy)return c.find(Rt.predecessors(Tt),function(Vt){return Rt.node(Vt).dummy})}function M(Rt,Tt,Vt){if(Tt>Vt){var fe=Tt;Tt=Vt,Vt=fe}var ue=Rt[Tt];ue||(Rt[Tt]=ue={}),ue[Vt]=!0}function N(Rt,Tt,Vt){if(Tt>Vt){var fe=Tt;Tt=Vt,Vt=fe}return c.has(Rt[Tt],Vt)}function D(Rt,Tt,Vt,fe){var ue={},Ce={},be={};return c.forEach(Tt,function(we){c.forEach(we,function(ne,We){ue[ne]=ne,Ce[ne]=ne,be[ne]=We})}),c.forEach(Tt,function(we){var ne=-1;c.forEach(we,function(We){var rn=fe(We);if(rn.length){rn=c.sortBy(rn,function(mn){return be[mn]});for(var Xe=(rn.length-1)/2,pn=Math.floor(Xe),Tn=Math.ceil(Xe);pn<=Tn;++pn){var $e=rn[pn];Ce[We]===We&&ne<be[$e]&&!N(Vt,We,$e)&&(Ce[$e]=We,Ce[We]=ue[We]=ue[$e],ne=be[$e])}}})}),{root:ue,align:Ce}}function A(Rt,Tt,Vt,fe,ue){var Ce={},be=L(Rt,Tt,Vt,ue),we=ue?"borderLeft":"borderRight";function ne(Xe,pn){for(var Tn=be.nodes(),$e=Tn.pop(),mn={};$e;)mn[$e]?Xe($e):(mn[$e]=!0,Tn.push($e),Tn=Tn.concat(pn($e))),$e=Tn.pop()}function We(Xe){Ce[Xe]=be.inEdges(Xe).reduce(function(pn,Tn){return Math.max(pn,Ce[Tn.v]+be.edge(Tn))},0)}function rn(Xe){var pn=be.outEdges(Xe).reduce(function($e,mn){return Math.min($e,Ce[mn.w]-be.edge(mn))},Number.POSITIVE_INFINITY),Tn=Rt.node(Xe);pn!==Number.POSITIVE_INFINITY&&Tn.borderType!==we&&(Ce[Xe]=Math.max(Ce[Xe],pn))}return ne(We,be.predecessors.bind(be)),ne(rn,be.successors.bind(be)),c.forEach(fe,function(Xe){Ce[Xe]=Ce[Vt[Xe]]}),Ce}function L(Rt,Tt,Vt,fe){var ue=new _,Ce=Rt.graph(),be=ft(Ce.nodesep,Ce.edgesep,fe);return c.forEach(Tt,function(we){var ne;c.forEach(we,function(We){var rn=Vt[We];if(ue.setNode(rn),ne){var Xe=Vt[ne],pn=ue.edge(Xe,rn);ue.setEdge(Xe,rn,Math.max(be(Rt,We,ne),pn||0))}ne=We})}),ue}function F(Rt,Tt){return c.minBy(c.values(Tt),function(Vt){var fe=Number.NEGATIVE_INFINITY,ue=Number.POSITIVE_INFINITY;return c.forIn(Vt,function(Ce,be){var we=J(Rt,be)/2;fe=Math.max(Ce+we,fe),ue=Math.min(Ce-we,ue)}),fe-ue})}function rt(Rt,Tt){var Vt=c.values(Tt),fe=c.min(Vt),ue=c.max(Vt);c.forEach(["u","d"],function(Ce){c.forEach(["l","r"],function(be){var we=Ce+be,ne=Rt[we],We;if(ne!==Tt){var rn=c.values(ne);We=be==="l"?fe-c.min(rn):ue-c.max(rn),We&&(Rt[we]=c.mapValues(ne,function(Xe){return Xe+We}))}})})}function G(Rt,Tt){return c.mapValues(Rt.ul,function(Vt,fe){if(Tt)return Rt[Tt.toLowerCase()][fe];var ue=c.sortBy(c.map(Rt,fe));return(ue[1]+ue[2])/2})}function kt(Rt){var Tt=I.buildLayerMatrix(Rt),Vt=c.merge(z(Rt,Tt),S(Rt,Tt)),fe={},ue;c.forEach(["u","d"],function(be){ue=be==="u"?Tt:c.values(Tt).reverse(),c.forEach(["l","r"],function(we){we==="r"&&(ue=c.map(ue,function(Xe){return c.values(Xe).reverse()}));var ne=(be==="u"?Rt.predecessors:Rt.successors).bind(Rt),We=D(Rt,ue,Vt,ne),rn=A(Rt,ue,We.root,We.align,we==="r");we==="r"&&(rn=c.mapValues(rn,function(Xe){return-Xe})),fe[be+we]=rn})});var Ce=F(Rt,fe);return rt(fe,Ce),G(fe,Rt.graph().align)}function ft(Rt,Tt,Vt){return function(fe,ue,Ce){var be=fe.node(ue),we=fe.node(Ce),ne=0,We;if(ne+=be.width/2,c.has(be,"labelpos"))switch(be.labelpos.toLowerCase()){case"l":We=-be.width/2;break;case"r":We=be.width/2;break}if(We&&(ne+=Vt?We:-We),We=0,ne+=(be.dummy?Tt:Rt)/2,ne+=(we.dummy?Tt:Rt)/2,ne+=we.width/2,c.has(we,"labelpos"))switch(we.labelpos.toLowerCase()){case"l":We=we.width/2;break;case"r":We=-we.width/2;break}return We&&(ne+=Vt?We:-We),We=0,ne}}function J(Rt,Tt){return Rt.node(Tt).width}},93021:function(bt,Et,y){"use strict";var c=y(72361),_=y(53063),I=y(92080).positionX;bt.exports=z;function z(R){R=_.asNonCompoundGraph(R),S(R),c.forEach(I(R),function(M,N){R.node(N).x=M})}function S(R){var M=_.buildLayerMatrix(R),N=R.graph().ranksep,D=0;c.forEach(M,function(A){var L=c.max(c.map(A,function(F){return R.node(F).height}));c.forEach(A,function(F){R.node(F).y=D+L/2}),D+=L+N})}},61031:function(bt,Et,y){"use strict";var c=y(72361),_=y(76626).Graph,I=y(2416).slack;bt.exports=z;function z(N){var D=new _({directed:!1}),A=N.nodes()[0],L=N.nodeCount();D.setNode(A,{});for(var F,rt;S(D,N)<L;)F=R(D,N),rt=D.hasNode(F.v)?I(N,F):-I(N,F),M(D,N,rt);return D}function S(N,D){function A(L){c.forEach(D.nodeEdges(L),function(F){var rt=F.v,G=L===rt?F.w:rt;!N.hasNode(G)&&!I(D,F)&&(N.setNode(G,{}),N.setEdge(L,G,{}),A(G))})}return c.forEach(N.nodes(),A),N.nodeCount()}function R(N,D){return c.minBy(D.edges(),function(A){if(N.hasNode(A.v)!==N.hasNode(A.w))return I(D,A)})}function M(N,D,A){c.forEach(N.nodes(),function(L){D.node(L).rank+=A})}},64505:function(bt,Et,y){"use strict";var c=y(2416),_=c.longestPath,I=y(61031),z=y(77076);bt.exports=S;function S(D){switch(D.graph().ranker){case"network-simplex":N(D);break;case"tight-tree":M(D);break;case"longest-path":R(D);break;default:N(D)}}var R=_;function M(D){_(D),I(D)}function N(D){z(D)}},77076:function(bt,Et,y){"use strict";var c=y(72361),_=y(61031),I=y(2416).slack,z=y(2416).longestPath,S=y(76626).alg.preorder,R=y(76626).alg.postorder,M=y(53063).simplify;bt.exports=N,N.initLowLimValues=F,N.initCutValues=D,N.calcCutValue=L,N.leaveEdge=G,N.enterEdge=kt,N.exchangeEdges=ft;function N(Vt){Vt=M(Vt),z(Vt);var fe=_(Vt);F(fe),D(fe,Vt);for(var ue,Ce;ue=G(fe);)Ce=kt(fe,Vt,ue),ft(fe,Vt,ue,Ce)}function D(Vt,fe){var ue=R(Vt,Vt.nodes());ue=ue.slice(0,ue.length-1),c.forEach(ue,function(Ce){A(Vt,fe,Ce)})}function A(Vt,fe,ue){var Ce=Vt.node(ue),be=Ce.parent;Vt.edge(ue,be).cutvalue=L(Vt,fe,ue)}function L(Vt,fe,ue){var Ce=Vt.node(ue),be=Ce.parent,we=!0,ne=fe.edge(ue,be),We=0;return ne||(we=!1,ne=fe.edge(be,ue)),We=ne.weight,c.forEach(fe.nodeEdges(ue),function(rn){var Xe=rn.v===ue,pn=Xe?rn.w:rn.v;if(pn!==be){var Tn=Xe===we,$e=fe.edge(rn).weight;if(We+=Tn?$e:-$e,Rt(Vt,ue,pn)){var mn=Vt.edge(ue,pn).cutvalue;We+=Tn?-mn:mn}}}),We}function F(Vt,fe){arguments.length<2&&(fe=Vt.nodes()[0]),rt(Vt,{},1,fe)}function rt(Vt,fe,ue,Ce,be){var we=ue,ne=Vt.node(Ce);return fe[Ce]=!0,c.forEach(Vt.neighbors(Ce),function(We){c.has(fe,We)||(ue=rt(Vt,fe,ue,We,Ce))}),ne.low=we,ne.lim=ue++,be?ne.parent=be:delete ne.parent,ue}function G(Vt){return c.find(Vt.edges(),function(fe){return Vt.edge(fe).cutvalue<0})}function kt(Vt,fe,ue){var Ce=ue.v,be=ue.w;fe.hasEdge(Ce,be)||(Ce=ue.w,be=ue.v);var we=Vt.node(Ce),ne=Vt.node(be),We=we,rn=!1;we.lim>ne.lim&&(We=ne,rn=!0);var Xe=c.filter(fe.edges(),function(pn){return rn===Tt(Vt,Vt.node(pn.v),We)&&rn!==Tt(Vt,Vt.node(pn.w),We)});return c.minBy(Xe,function(pn){return I(fe,pn)})}function ft(Vt,fe,ue,Ce){var be=ue.v,we=ue.w;Vt.removeEdge(be,we),Vt.setEdge(Ce.v,Ce.w,{}),F(Vt),D(Vt,fe),J(Vt,fe)}function J(Vt,fe){var ue=c.find(Vt.nodes(),function(be){return!fe.node(be).parent}),Ce=S(Vt,ue);Ce=Ce.slice(1),c.forEach(Ce,function(be){var we=Vt.node(be).parent,ne=fe.edge(be,we),We=!1;ne||(ne=fe.edge(we,be),We=!0),fe.node(be).rank=fe.node(we).rank+(We?ne.minlen:-ne.minlen)})}function Rt(Vt,fe,ue){return Vt.hasEdge(fe,ue)}function Tt(Vt,fe,ue){return ue.low<=fe.lim&&fe.lim<=ue.lim}},2416:function(bt,Et,y){"use strict";var c=y(72361);bt.exports={longestPath:_,slack:I};function _(z){var S={};function R(M){var N=z.node(M);if(c.has(S,M))return N.rank;S[M]=!0;var D=c.min(c.map(z.outEdges(M),function(A){return R(A.w)-z.edge(A).minlen}));return(D===Number.POSITIVE_INFINITY||D===void 0||D===null)&&(D=0),N.rank=D}c.forEach(z.sources(),R)}function I(z,S){return z.node(S.w).rank-z.node(S.v).rank-z.edge(S).minlen}},53063:function(bt,Et,y){"use strict";var c=y(72361),_=y(76626).Graph;bt.exports={addDummyNode:I,simplify:z,asNonCompoundGraph:S,successorWeights:R,predecessorWeights:M,intersectRect:N,buildLayerMatrix:D,normalizeRanks:A,removeEmptyRanks:L,addBorderNode:F,maxRank:rt,partition:G,time:kt,notime:ft};function I(J,Rt,Tt,Vt){var fe;do fe=c.uniqueId(Vt);while(J.hasNode(fe));return Tt.dummy=Rt,J.setNode(fe,Tt),fe}function z(J){var Rt=new _().setGraph(J.graph());return c.forEach(J.nodes(),function(Tt){Rt.setNode(Tt,J.node(Tt))}),c.forEach(J.edges(),function(Tt){var Vt=Rt.edge(Tt.v,Tt.w)||{weight:0,minlen:1},fe=J.edge(Tt);Rt.setEdge(Tt.v,Tt.w,{weight:Vt.weight+fe.weight,minlen:Math.max(Vt.minlen,fe.minlen)})}),Rt}function S(J){var Rt=new _({multigraph:J.isMultigraph()}).setGraph(J.graph());return c.forEach(J.nodes(),function(Tt){J.children(Tt).length||Rt.setNode(Tt,J.node(Tt))}),c.forEach(J.edges(),function(Tt){Rt.setEdge(Tt,J.edge(Tt))}),Rt}function R(J){var Rt=c.map(J.nodes(),function(Tt){var Vt={};return c.forEach(J.outEdges(Tt),function(fe){Vt[fe.w]=(Vt[fe.w]||0)+J.edge(fe).weight}),Vt});return c.zipObject(J.nodes(),Rt)}function M(J){var Rt=c.map(J.nodes(),function(Tt){var Vt={};return c.forEach(J.inEdges(Tt),function(fe){Vt[fe.v]=(Vt[fe.v]||0)+J.edge(fe).weight}),Vt});return c.zipObject(J.nodes(),Rt)}function N(J,Rt){var Tt=J.x,Vt=J.y,fe=Rt.x-Tt,ue=Rt.y-Vt,Ce=J.width/2,be=J.height/2;if(!fe&&!ue)throw new Error("Not possible to find intersection inside of the rectangle");var we,ne;return Math.abs(ue)*Ce>Math.abs(fe)*be?(ue<0&&(be=-be),we=be*fe/ue,ne=be):(fe<0&&(Ce=-Ce),we=Ce,ne=Ce*ue/fe),{x:Tt+we,y:Vt+ne}}function D(J){var Rt=c.map(c.range(rt(J)+1),function(){return[]});return c.forEach(J.nodes(),function(Tt){var Vt=J.node(Tt),fe=Vt.rank;c.isUndefined(fe)||(Rt[fe][Vt.order]=Tt)}),Rt}function A(J){var Rt=c.min(c.map(J.nodes(),function(Tt){return J.node(Tt).rank}));c.forEach(J.nodes(),function(Tt){var Vt=J.node(Tt);c.has(Vt,"rank")&&(Vt.rank-=Rt)})}function L(J){var Rt=c.min(c.map(J.nodes(),function(ue){return J.node(ue).rank})),Tt=[];c.forEach(J.nodes(),function(ue){var Ce=J.node(ue).rank-Rt;Tt[Ce]||(Tt[Ce]=[]),Tt[Ce].push(ue)});var Vt=0,fe=J.graph().nodeRankFactor;c.forEach(Tt,function(ue,Ce){c.isUndefined(ue)&&Ce%fe!==0?--Vt:Vt&&c.forEach(ue,function(be){J.node(be).rank+=Vt})})}function F(J,Rt,Tt,Vt){var fe={width:0,height:0};return arguments.length>=4&&(fe.rank=Tt,fe.order=Vt),I(J,"border",fe,Rt)}function rt(J){return c.max(c.map(J.nodes(),function(Rt){var Tt=J.node(Rt).rank;if(!c.isUndefined(Tt))return Tt}))}function G(J,Rt){var Tt={lhs:[],rhs:[]};return c.forEach(J,function(Vt){Rt(Vt)?Tt.lhs.push(Vt):Tt.rhs.push(Vt)}),Tt}function kt(J,Rt){var Tt=c.now();try{return Rt()}finally{console.log(J+" time: "+(c.now()-Tt)+"ms")}}function ft(J,Rt){return Rt()}},11897:function(bt){bt.exports="0.8.5"},37271:function(bt){"use strict";var Et=Object.prototype.hasOwnProperty,y="~";function c(){}Object.create&&(c.prototype=Object.create(null),new c().__proto__||(y=!1));function _(R,M,N){this.fn=R,this.context=M,this.once=N||!1}function I(R,M,N,D,A){if(typeof N!="function")throw new TypeError("The listener must be a function");var L=new _(N,D||R,A),F=y?y+M:M;return R._events[F]?R._events[F].fn?R._events[F]=[R._events[F],L]:R._events[F].push(L):(R._events[F]=L,R._eventsCount++),R}function z(R,M){--R._eventsCount===0?R._events=new c:delete R._events[M]}function S(){this._events=new c,this._eventsCount=0}S.prototype.eventNames=function(){var M=[],N,D;if(this._eventsCount===0)return M;for(D in N=this._events)Et.call(N,D)&&M.push(y?D.slice(1):D);return Object.getOwnPropertySymbols?M.concat(Object.getOwnPropertySymbols(N)):M},S.prototype.listeners=function(M){var N=y?y+M:M,D=this._events[N];if(!D)return[];if(D.fn)return[D.fn];for(var A=0,L=D.length,F=new Array(L);A<L;A++)F[A]=D[A].fn;return F},S.prototype.listenerCount=function(M){var N=y?y+M:M,D=this._events[N];return D?D.fn?1:D.length:0},S.prototype.emit=function(M,N,D,A,L,F){var rt=y?y+M:M;if(!this._events[rt])return!1;var G=this._events[rt],kt=arguments.length,ft,J;if(G.fn){switch(G.once&&this.removeListener(M,G.fn,void 0,!0),kt){case 1:return G.fn.call(G.context),!0;case 2:return G.fn.call(G.context,N),!0;case 3:return G.fn.call(G.context,N,D),!0;case 4:return G.fn.call(G.context,N,D,A),!0;case 5:return G.fn.call(G.context,N,D,A,L),!0;case 6:return G.fn.call(G.context,N,D,A,L,F),!0}for(J=1,ft=new Array(kt-1);J<kt;J++)ft[J-1]=arguments[J];G.fn.apply(G.context,ft)}else{var Rt=G.length,Tt;for(J=0;J<Rt;J++)switch(G[J].once&&this.removeListener(M,G[J].fn,void 0,!0),kt){case 1:G[J].fn.call(G[J].context);break;case 2:G[J].fn.call(G[J].context,N);break;case 3:G[J].fn.call(G[J].context,N,D);break;case 4:G[J].fn.call(G[J].context,N,D,A);break;default:if(!ft)for(Tt=1,ft=new Array(kt-1);Tt<kt;Tt++)ft[Tt-1]=arguments[Tt];G[J].fn.apply(G[J].context,ft)}}return!0},S.prototype.on=function(M,N,D){return I(this,M,N,D,!1)},S.prototype.once=function(M,N,D){return I(this,M,N,D,!0)},S.prototype.removeListener=function(M,N,D,A){var L=y?y+M:M;if(!this._events[L])return this;if(!N)return z(this,L),this;var F=this._events[L];if(F.fn)F.fn===N&&(!A||F.once)&&(!D||F.context===D)&&z(this,L);else{for(var rt=0,G=[],kt=F.length;rt<kt;rt++)(F[rt].fn!==N||A&&!F[rt].once||D&&F[rt].context!==D)&&G.push(F[rt]);G.length?this._events[L]=G.length===1?G[0]:G:z(this,L)}return this},S.prototype.removeAllListeners=function(M){var N;return M?(N=y?y+M:M,this._events[N]&&z(this,N)):(this._events=new c,this._eventsCount=0),this},S.prototype.off=S.prototype.removeListener,S.prototype.addListener=S.prototype.on,S.prefixed=y,S.EventEmitter=S,bt.exports=S},85551:function(bt,Et,y){"use strict";y.d(Et,{Ib:function(){return c},WT:function(){return _},yy:function(){return z}});var c=1e-6,_=typeof Float32Array!="undefined"?Float32Array:Array,I=Math.random,z="zyx";function S(F){return F>=0?Math.round(F):F%.5===0?Math.floor(F):Math.round(F)}function R(F){_=F}var M=Math.PI/180,N=180/Math.PI;function D(F){return F*M}function A(F){return F*N}function L(F,rt){var G=arguments.length>2&&arguments[2]!==void 0?arguments[2]:c;return Math.abs(F-rt)<=G*Math.max(1,Math.abs(F),Math.abs(rt))}},79111:function(bt,Et,y){"use strict";y.d(Et,{Ue:function(){return _},al:function(){return R},xO:function(){return I}});var c=y(85551);function _(){var It=new c.WT(9);return c.WT!=Float32Array&&(It[1]=0,It[2]=0,It[3]=0,It[5]=0,It[6]=0,It[7]=0),It[0]=1,It[4]=1,It[8]=1,It}function I(It,Ee){return It[0]=Ee[0],It[1]=Ee[1],It[2]=Ee[2],It[3]=Ee[4],It[4]=Ee[5],It[5]=Ee[6],It[6]=Ee[8],It[7]=Ee[9],It[8]=Ee[10],It}function z(It){var Ee=new glMatrix.ARRAY_TYPE(9);return Ee[0]=It[0],Ee[1]=It[1],Ee[2]=It[2],Ee[3]=It[3],Ee[4]=It[4],Ee[5]=It[5],Ee[6]=It[6],Ee[7]=It[7],Ee[8]=It[8],Ee}function S(It,Ee){return It[0]=Ee[0],It[1]=Ee[1],It[2]=Ee[2],It[3]=Ee[3],It[4]=Ee[4],It[5]=Ee[5],It[6]=Ee[6],It[7]=Ee[7],It[8]=Ee[8],It}function R(It,Ee,cn,sn,Pe,ze,Ke,le,Ae){var Pt=new c.WT(9);return Pt[0]=It,Pt[1]=Ee,Pt[2]=cn,Pt[3]=sn,Pt[4]=Pe,Pt[5]=ze,Pt[6]=Ke,Pt[7]=le,Pt[8]=Ae,Pt}function M(It,Ee,cn,sn,Pe,ze,Ke,le,Ae,Pt){return It[0]=Ee,It[1]=cn,It[2]=sn,It[3]=Pe,It[4]=ze,It[5]=Ke,It[6]=le,It[7]=Ae,It[8]=Pt,It}function N(It){return It[0]=1,It[1]=0,It[2]=0,It[3]=0,It[4]=1,It[5]=0,It[6]=0,It[7]=0,It[8]=1,It}function D(It,Ee){if(It===Ee){var cn=Ee[1],sn=Ee[2],Pe=Ee[5];It[1]=Ee[3],It[2]=Ee[6],It[3]=cn,It[5]=Ee[7],It[6]=sn,It[7]=Pe}else It[0]=Ee[0],It[1]=Ee[3],It[2]=Ee[6],It[3]=Ee[1],It[4]=Ee[4],It[5]=Ee[7],It[6]=Ee[2],It[7]=Ee[5],It[8]=Ee[8];return It}function A(It,Ee){var cn=Ee[0],sn=Ee[1],Pe=Ee[2],ze=Ee[3],Ke=Ee[4],le=Ee[5],Ae=Ee[6],Pt=Ee[7],wt=Ee[8],de=wt*Ke-le*Pt,je=-wt*ze+le*Ae,Re=Pt*ze-Ke*Ae,ce=cn*de+sn*je+Pe*Re;return ce?(ce=1/ce,It[0]=de*ce,It[1]=(-wt*sn+Pe*Pt)*ce,It[2]=(le*sn-Pe*Ke)*ce,It[3]=je*ce,It[4]=(wt*cn-Pe*Ae)*ce,It[5]=(-le*cn+Pe*ze)*ce,It[6]=Re*ce,It[7]=(-Pt*cn+sn*Ae)*ce,It[8]=(Ke*cn-sn*ze)*ce,It):null}function L(It,Ee){var cn=Ee[0],sn=Ee[1],Pe=Ee[2],ze=Ee[3],Ke=Ee[4],le=Ee[5],Ae=Ee[6],Pt=Ee[7],wt=Ee[8];return It[0]=Ke*wt-le*Pt,It[1]=Pe*Pt-sn*wt,It[2]=sn*le-Pe*Ke,It[3]=le*Ae-ze*wt,It[4]=cn*wt-Pe*Ae,It[5]=Pe*ze-cn*le,It[6]=ze*Pt-Ke*Ae,It[7]=sn*Ae-cn*Pt,It[8]=cn*Ke-sn*ze,It}function F(It){var Ee=It[0],cn=It[1],sn=It[2],Pe=It[3],ze=It[4],Ke=It[5],le=It[6],Ae=It[7],Pt=It[8];return Ee*(Pt*ze-Ke*Ae)+cn*(-Pt*Pe+Ke*le)+sn*(Ae*Pe-ze*le)}function rt(It,Ee,cn){var sn=Ee[0],Pe=Ee[1],ze=Ee[2],Ke=Ee[3],le=Ee[4],Ae=Ee[5],Pt=Ee[6],wt=Ee[7],de=Ee[8],je=cn[0],Re=cn[1],ce=cn[2],Le=cn[3],xe=cn[4],Ft=cn[5],re=cn[6],Me=cn[7],O=cn[8];return It[0]=je*sn+Re*Ke+ce*Pt,It[1]=je*Pe+Re*le+ce*wt,It[2]=je*ze+Re*Ae+ce*de,It[3]=Le*sn+xe*Ke+Ft*Pt,It[4]=Le*Pe+xe*le+Ft*wt,It[5]=Le*ze+xe*Ae+Ft*de,It[6]=re*sn+Me*Ke+O*Pt,It[7]=re*Pe+Me*le+O*wt,It[8]=re*ze+Me*Ae+O*de,It}function G(It,Ee,cn){var sn=Ee[0],Pe=Ee[1],ze=Ee[2],Ke=Ee[3],le=Ee[4],Ae=Ee[5],Pt=Ee[6],wt=Ee[7],de=Ee[8],je=cn[0],Re=cn[1];return It[0]=sn,It[1]=Pe,It[2]=ze,It[3]=Ke,It[4]=le,It[5]=Ae,It[6]=je*sn+Re*Ke+Pt,It[7]=je*Pe+Re*le+wt,It[8]=je*ze+Re*Ae+de,It}function kt(It,Ee,cn){var sn=Ee[0],Pe=Ee[1],ze=Ee[2],Ke=Ee[3],le=Ee[4],Ae=Ee[5],Pt=Ee[6],wt=Ee[7],de=Ee[8],je=Math.sin(cn),Re=Math.cos(cn);return It[0]=Re*sn+je*Ke,It[1]=Re*Pe+je*le,It[2]=Re*ze+je*Ae,It[3]=Re*Ke-je*sn,It[4]=Re*le-je*Pe,It[5]=Re*Ae-je*ze,It[6]=Pt,It[7]=wt,It[8]=de,It}function ft(It,Ee,cn){var sn=cn[0],Pe=cn[1];return It[0]=sn*Ee[0],It[1]=sn*Ee[1],It[2]=sn*Ee[2],It[3]=Pe*Ee[3],It[4]=Pe*Ee[4],It[5]=Pe*Ee[5],It[6]=Ee[6],It[7]=Ee[7],It[8]=Ee[8],It}function J(It,Ee){return It[0]=1,It[1]=0,It[2]=0,It[3]=0,It[4]=1,It[5]=0,It[6]=Ee[0],It[7]=Ee[1],It[8]=1,It}function Rt(It,Ee){var cn=Math.sin(Ee),sn=Math.cos(Ee);return It[0]=sn,It[1]=cn,It[2]=0,It[3]=-cn,It[4]=sn,It[5]=0,It[6]=0,It[7]=0,It[8]=1,It}function Tt(It,Ee){return It[0]=Ee[0],It[1]=0,It[2]=0,It[3]=0,It[4]=Ee[1],It[5]=0,It[6]=0,It[7]=0,It[8]=1,It}function Vt(It,Ee){return It[0]=Ee[0],It[1]=Ee[1],It[2]=0,It[3]=Ee[2],It[4]=Ee[3],It[5]=0,It[6]=Ee[4],It[7]=Ee[5],It[8]=1,It}function fe(It,Ee){var cn=Ee[0],sn=Ee[1],Pe=Ee[2],ze=Ee[3],Ke=cn+cn,le=sn+sn,Ae=Pe+Pe,Pt=cn*Ke,wt=sn*Ke,de=sn*le,je=Pe*Ke,Re=Pe*le,ce=Pe*Ae,Le=ze*Ke,xe=ze*le,Ft=ze*Ae;return It[0]=1-de-ce,It[3]=wt-Ft,It[6]=je+xe,It[1]=wt+Ft,It[4]=1-Pt-ce,It[7]=Re-Le,It[2]=je-xe,It[5]=Re+Le,It[8]=1-Pt-de,It}function ue(It,Ee){var cn=Ee[0],sn=Ee[1],Pe=Ee[2],ze=Ee[3],Ke=Ee[4],le=Ee[5],Ae=Ee[6],Pt=Ee[7],wt=Ee[8],de=Ee[9],je=Ee[10],Re=Ee[11],ce=Ee[12],Le=Ee[13],xe=Ee[14],Ft=Ee[15],re=cn*le-sn*Ke,Me=cn*Ae-Pe*Ke,O=cn*Pt-ze*Ke,st=sn*Ae-Pe*le,ve=sn*Pt-ze*le,$t=Pe*Pt-ze*Ae,Ie=wt*Le-de*ce,Ne=wt*xe-je*ce,tn=wt*Ft-Re*ce,Mt=de*xe-je*Le,q=de*Ft-Re*Le,Ct=je*Ft-Re*xe,Ht=re*Ct-Me*q+O*Mt+st*tn-ve*Ne+$t*Ie;return Ht?(Ht=1/Ht,It[0]=(le*Ct-Ae*q+Pt*Mt)*Ht,It[1]=(Ae*tn-Ke*Ct-Pt*Ne)*Ht,It[2]=(Ke*q-le*tn+Pt*Ie)*Ht,It[3]=(Pe*q-sn*Ct-ze*Mt)*Ht,It[4]=(cn*Ct-Pe*tn+ze*Ne)*Ht,It[5]=(sn*tn-cn*q-ze*Ie)*Ht,It[6]=(Le*$t-xe*ve+Ft*st)*Ht,It[7]=(xe*O-ce*$t-Ft*Me)*Ht,It[8]=(ce*ve-Le*O+Ft*re)*Ht,It):null}function Ce(It,Ee,cn){return It[0]=2/Ee,It[1]=0,It[2]=0,It[3]=0,It[4]=-2/cn,It[5]=0,It[6]=-1,It[7]=1,It[8]=1,It}function be(It){return"mat3("+It[0]+", "+It[1]+", "+It[2]+", "+It[3]+", "+It[4]+", "+It[5]+", "+It[6]+", "+It[7]+", "+It[8]+")"}function we(It){return Math.sqrt(It[0]*It[0]+It[1]*It[1]+It[2]*It[2]+It[3]*It[3]+It[4]*It[4]+It[5]*It[5]+It[6]*It[6]+It[7]*It[7]+It[8]*It[8])}function ne(It,Ee,cn){return It[0]=Ee[0]+cn[0],It[1]=Ee[1]+cn[1],It[2]=Ee[2]+cn[2],It[3]=Ee[3]+cn[3],It[4]=Ee[4]+cn[4],It[5]=Ee[5]+cn[5],It[6]=Ee[6]+cn[6],It[7]=Ee[7]+cn[7],It[8]=Ee[8]+cn[8],It}function We(It,Ee,cn){return It[0]=Ee[0]-cn[0],It[1]=Ee[1]-cn[1],It[2]=Ee[2]-cn[2],It[3]=Ee[3]-cn[3],It[4]=Ee[4]-cn[4],It[5]=Ee[5]-cn[5],It[6]=Ee[6]-cn[6],It[7]=Ee[7]-cn[7],It[8]=Ee[8]-cn[8],It}function rn(It,Ee,cn){return It[0]=Ee[0]*cn,It[1]=Ee[1]*cn,It[2]=Ee[2]*cn,It[3]=Ee[3]*cn,It[4]=Ee[4]*cn,It[5]=Ee[5]*cn,It[6]=Ee[6]*cn,It[7]=Ee[7]*cn,It[8]=Ee[8]*cn,It}function Xe(It,Ee,cn,sn){return It[0]=Ee[0]+cn[0]*sn,It[1]=Ee[1]+cn[1]*sn,It[2]=Ee[2]+cn[2]*sn,It[3]=Ee[3]+cn[3]*sn,It[4]=Ee[4]+cn[4]*sn,It[5]=Ee[5]+cn[5]*sn,It[6]=Ee[6]+cn[6]*sn,It[7]=Ee[7]+cn[7]*sn,It[8]=Ee[8]+cn[8]*sn,It}function pn(It,Ee){return It[0]===Ee[0]&&It[1]===Ee[1]&&It[2]===Ee[2]&&It[3]===Ee[3]&&It[4]===Ee[4]&&It[5]===Ee[5]&&It[6]===Ee[6]&&It[7]===Ee[7]&&It[8]===Ee[8]}function Tn(It,Ee){var cn=It[0],sn=It[1],Pe=It[2],ze=It[3],Ke=It[4],le=It[5],Ae=It[6],Pt=It[7],wt=It[8],de=Ee[0],je=Ee[1],Re=Ee[2],ce=Ee[3],Le=Ee[4],xe=Ee[5],Ft=Ee[6],re=Ee[7],Me=Ee[8];return Math.abs(cn-de)<=glMatrix.EPSILON*Math.max(1,Math.abs(cn),Math.abs(de))&&Math.abs(sn-je)<=glMatrix.EPSILON*Math.max(1,Math.abs(sn),Math.abs(je))&&Math.abs(Pe-Re)<=glMatrix.EPSILON*Math.max(1,Math.abs(Pe),Math.abs(Re))&&Math.abs(ze-ce)<=glMatrix.EPSILON*Math.max(1,Math.abs(ze),Math.abs(ce))&&Math.abs(Ke-Le)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ke),Math.abs(Le))&&Math.abs(le-xe)<=glMatrix.EPSILON*Math.max(1,Math.abs(le),Math.abs(xe))&&Math.abs(Ae-Ft)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ae),Math.abs(Ft))&&Math.abs(Pt-re)<=glMatrix.EPSILON*Math.max(1,Math.abs(Pt),Math.abs(re))&&Math.abs(wt-Me)<=glMatrix.EPSILON*Math.max(1,Math.abs(wt),Math.abs(Me))}var $e=null,mn=null},60187:function(bt,Et,y){"use strict";y.r(Et),y.d(Et,{add:function(){return je},adjoint:function(){return A},clone:function(){return I},copy:function(){return z},create:function(){return _},decompose:function(){return pn},determinant:function(){return L},equals:function(){return Ft},exactEquals:function(){return xe},frob:function(){return de},fromQuat:function(){return mn},fromQuat2:function(){return ne},fromRotation:function(){return fe},fromRotationTranslation:function(){return we},fromRotationTranslationScale:function(){return Tn},fromRotationTranslationScaleOrigin:function(){return $e},fromScaling:function(){return Vt},fromTranslation:function(){return Tt},fromValues:function(){return S},fromXRotation:function(){return ue},fromYRotation:function(){return Ce},fromZRotation:function(){return be},frustum:function(){return It},getRotation:function(){return Xe},getScaling:function(){return rn},getTranslation:function(){return We},identity:function(){return M},invert:function(){return D},lookAt:function(){return Ae},mul:function(){return re},multiply:function(){return F},multiplyScalar:function(){return ce},multiplyScalarAndAdd:function(){return Le},ortho:function(){return Ke},orthoNO:function(){return ze},orthoZO:function(){return le},perspective:function(){return cn},perspectiveFromFieldOfView:function(){return Pe},perspectiveNO:function(){return Ee},perspectiveZO:function(){return sn},rotate:function(){return kt},rotateX:function(){return ft},rotateY:function(){return J},rotateZ:function(){return Rt},scale:function(){return G},set:function(){return R},str:function(){return wt},sub:function(){return Me},subtract:function(){return Re},targetTo:function(){return Pt},translate:function(){return rt},transpose:function(){return N}});var c=y(85551);function _(){var O=new c.WT(16);return c.WT!=Float32Array&&(O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[11]=0,O[12]=0,O[13]=0,O[14]=0),O[0]=1,O[5]=1,O[10]=1,O[15]=1,O}function I(O){var st=new c.WT(16);return st[0]=O[0],st[1]=O[1],st[2]=O[2],st[3]=O[3],st[4]=O[4],st[5]=O[5],st[6]=O[6],st[7]=O[7],st[8]=O[8],st[9]=O[9],st[10]=O[10],st[11]=O[11],st[12]=O[12],st[13]=O[13],st[14]=O[14],st[15]=O[15],st}function z(O,st){return O[0]=st[0],O[1]=st[1],O[2]=st[2],O[3]=st[3],O[4]=st[4],O[5]=st[5],O[6]=st[6],O[7]=st[7],O[8]=st[8],O[9]=st[9],O[10]=st[10],O[11]=st[11],O[12]=st[12],O[13]=st[13],O[14]=st[14],O[15]=st[15],O}function S(O,st,ve,$t,Ie,Ne,tn,Mt,q,Ct,Ht,Lt,_t,Ut,qt,se){var te=new c.WT(16);return te[0]=O,te[1]=st,te[2]=ve,te[3]=$t,te[4]=Ie,te[5]=Ne,te[6]=tn,te[7]=Mt,te[8]=q,te[9]=Ct,te[10]=Ht,te[11]=Lt,te[12]=_t,te[13]=Ut,te[14]=qt,te[15]=se,te}function R(O,st,ve,$t,Ie,Ne,tn,Mt,q,Ct,Ht,Lt,_t,Ut,qt,se,te){return O[0]=st,O[1]=ve,O[2]=$t,O[3]=Ie,O[4]=Ne,O[5]=tn,O[6]=Mt,O[7]=q,O[8]=Ct,O[9]=Ht,O[10]=Lt,O[11]=_t,O[12]=Ut,O[13]=qt,O[14]=se,O[15]=te,O}function M(O){return O[0]=1,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=1,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=1,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function N(O,st){if(O===st){var ve=st[1],$t=st[2],Ie=st[3],Ne=st[6],tn=st[7],Mt=st[11];O[1]=st[4],O[2]=st[8],O[3]=st[12],O[4]=ve,O[6]=st[9],O[7]=st[13],O[8]=$t,O[9]=Ne,O[11]=st[14],O[12]=Ie,O[13]=tn,O[14]=Mt}else O[0]=st[0],O[1]=st[4],O[2]=st[8],O[3]=st[12],O[4]=st[1],O[5]=st[5],O[6]=st[9],O[7]=st[13],O[8]=st[2],O[9]=st[6],O[10]=st[10],O[11]=st[14],O[12]=st[3],O[13]=st[7],O[14]=st[11],O[15]=st[15];return O}function D(O,st){var ve=st[0],$t=st[1],Ie=st[2],Ne=st[3],tn=st[4],Mt=st[5],q=st[6],Ct=st[7],Ht=st[8],Lt=st[9],_t=st[10],Ut=st[11],qt=st[12],se=st[13],te=st[14],ke=st[15],Ye=ve*Mt-$t*tn,Ve=ve*q-Ie*tn,on=ve*Ct-Ne*tn,xn=$t*q-Ie*Mt,vn=$t*Ct-Ne*Mt,Qn=Ie*Ct-Ne*q,Ln=Ht*se-Lt*qt,_n=Ht*te-_t*qt,me=Ht*ke-Ut*qt,pr=Lt*te-_t*se,Zn=Lt*ke-Ut*se,kr=_t*ke-Ut*te,Ar=Ye*kr-Ve*Zn+on*pr+xn*me-vn*_n+Qn*Ln;return Ar?(Ar=1/Ar,O[0]=(Mt*kr-q*Zn+Ct*pr)*Ar,O[1]=(Ie*Zn-$t*kr-Ne*pr)*Ar,O[2]=(se*Qn-te*vn+ke*xn)*Ar,O[3]=(_t*vn-Lt*Qn-Ut*xn)*Ar,O[4]=(q*me-tn*kr-Ct*_n)*Ar,O[5]=(ve*kr-Ie*me+Ne*_n)*Ar,O[6]=(te*on-qt*Qn-ke*Ve)*Ar,O[7]=(Ht*Qn-_t*on+Ut*Ve)*Ar,O[8]=(tn*Zn-Mt*me+Ct*Ln)*Ar,O[9]=($t*me-ve*Zn-Ne*Ln)*Ar,O[10]=(qt*vn-se*on+ke*Ye)*Ar,O[11]=(Lt*on-Ht*vn-Ut*Ye)*Ar,O[12]=(Mt*_n-tn*pr-q*Ln)*Ar,O[13]=(ve*pr-$t*_n+Ie*Ln)*Ar,O[14]=(se*Ve-qt*xn-te*Ye)*Ar,O[15]=(Ht*xn-Lt*Ve+_t*Ye)*Ar,O):null}function A(O,st){var ve=st[0],$t=st[1],Ie=st[2],Ne=st[3],tn=st[4],Mt=st[5],q=st[6],Ct=st[7],Ht=st[8],Lt=st[9],_t=st[10],Ut=st[11],qt=st[12],se=st[13],te=st[14],ke=st[15],Ye=ve*Mt-$t*tn,Ve=ve*q-Ie*tn,on=ve*Ct-Ne*tn,xn=$t*q-Ie*Mt,vn=$t*Ct-Ne*Mt,Qn=Ie*Ct-Ne*q,Ln=Ht*se-Lt*qt,_n=Ht*te-_t*qt,me=Ht*ke-Ut*qt,pr=Lt*te-_t*se,Zn=Lt*ke-Ut*se,kr=_t*ke-Ut*te;return O[0]=Mt*kr-q*Zn+Ct*pr,O[1]=Ie*Zn-$t*kr-Ne*pr,O[2]=se*Qn-te*vn+ke*xn,O[3]=_t*vn-Lt*Qn-Ut*xn,O[4]=q*me-tn*kr-Ct*_n,O[5]=ve*kr-Ie*me+Ne*_n,O[6]=te*on-qt*Qn-ke*Ve,O[7]=Ht*Qn-_t*on+Ut*Ve,O[8]=tn*Zn-Mt*me+Ct*Ln,O[9]=$t*me-ve*Zn-Ne*Ln,O[10]=qt*vn-se*on+ke*Ye,O[11]=Lt*on-Ht*vn-Ut*Ye,O[12]=Mt*_n-tn*pr-q*Ln,O[13]=ve*pr-$t*_n+Ie*Ln,O[14]=se*Ve-qt*xn-te*Ye,O[15]=Ht*xn-Lt*Ve+_t*Ye,O}function L(O){var st=O[0],ve=O[1],$t=O[2],Ie=O[3],Ne=O[4],tn=O[5],Mt=O[6],q=O[7],Ct=O[8],Ht=O[9],Lt=O[10],_t=O[11],Ut=O[12],qt=O[13],se=O[14],te=O[15],ke=st*tn-ve*Ne,Ye=st*Mt-$t*Ne,Ve=ve*Mt-$t*tn,on=Ct*qt-Ht*Ut,xn=Ct*se-Lt*Ut,vn=Ht*se-Lt*qt,Qn=st*vn-ve*xn+$t*on,Ln=Ne*vn-tn*xn+Mt*on,_n=Ct*Ve-Ht*Ye+Lt*ke,me=Ut*Ve-qt*Ye+se*ke;return q*Qn-Ie*Ln+te*_n-_t*me}function F(O,st,ve){var $t=st[0],Ie=st[1],Ne=st[2],tn=st[3],Mt=st[4],q=st[5],Ct=st[6],Ht=st[7],Lt=st[8],_t=st[9],Ut=st[10],qt=st[11],se=st[12],te=st[13],ke=st[14],Ye=st[15],Ve=ve[0],on=ve[1],xn=ve[2],vn=ve[3];return O[0]=Ve*$t+on*Mt+xn*Lt+vn*se,O[1]=Ve*Ie+on*q+xn*_t+vn*te,O[2]=Ve*Ne+on*Ct+xn*Ut+vn*ke,O[3]=Ve*tn+on*Ht+xn*qt+vn*Ye,Ve=ve[4],on=ve[5],xn=ve[6],vn=ve[7],O[4]=Ve*$t+on*Mt+xn*Lt+vn*se,O[5]=Ve*Ie+on*q+xn*_t+vn*te,O[6]=Ve*Ne+on*Ct+xn*Ut+vn*ke,O[7]=Ve*tn+on*Ht+xn*qt+vn*Ye,Ve=ve[8],on=ve[9],xn=ve[10],vn=ve[11],O[8]=Ve*$t+on*Mt+xn*Lt+vn*se,O[9]=Ve*Ie+on*q+xn*_t+vn*te,O[10]=Ve*Ne+on*Ct+xn*Ut+vn*ke,O[11]=Ve*tn+on*Ht+xn*qt+vn*Ye,Ve=ve[12],on=ve[13],xn=ve[14],vn=ve[15],O[12]=Ve*$t+on*Mt+xn*Lt+vn*se,O[13]=Ve*Ie+on*q+xn*_t+vn*te,O[14]=Ve*Ne+on*Ct+xn*Ut+vn*ke,O[15]=Ve*tn+on*Ht+xn*qt+vn*Ye,O}function rt(O,st,ve){var $t=ve[0],Ie=ve[1],Ne=ve[2],tn,Mt,q,Ct,Ht,Lt,_t,Ut,qt,se,te,ke;return st===O?(O[12]=st[0]*$t+st[4]*Ie+st[8]*Ne+st[12],O[13]=st[1]*$t+st[5]*Ie+st[9]*Ne+st[13],O[14]=st[2]*$t+st[6]*Ie+st[10]*Ne+st[14],O[15]=st[3]*$t+st[7]*Ie+st[11]*Ne+st[15]):(tn=st[0],Mt=st[1],q=st[2],Ct=st[3],Ht=st[4],Lt=st[5],_t=st[6],Ut=st[7],qt=st[8],se=st[9],te=st[10],ke=st[11],O[0]=tn,O[1]=Mt,O[2]=q,O[3]=Ct,O[4]=Ht,O[5]=Lt,O[6]=_t,O[7]=Ut,O[8]=qt,O[9]=se,O[10]=te,O[11]=ke,O[12]=tn*$t+Ht*Ie+qt*Ne+st[12],O[13]=Mt*$t+Lt*Ie+se*Ne+st[13],O[14]=q*$t+_t*Ie+te*Ne+st[14],O[15]=Ct*$t+Ut*Ie+ke*Ne+st[15]),O}function G(O,st,ve){var $t=ve[0],Ie=ve[1],Ne=ve[2];return O[0]=st[0]*$t,O[1]=st[1]*$t,O[2]=st[2]*$t,O[3]=st[3]*$t,O[4]=st[4]*Ie,O[5]=st[5]*Ie,O[6]=st[6]*Ie,O[7]=st[7]*Ie,O[8]=st[8]*Ne,O[9]=st[9]*Ne,O[10]=st[10]*Ne,O[11]=st[11]*Ne,O[12]=st[12],O[13]=st[13],O[14]=st[14],O[15]=st[15],O}function kt(O,st,ve,$t){var Ie=$t[0],Ne=$t[1],tn=$t[2],Mt=Math.sqrt(Ie*Ie+Ne*Ne+tn*tn),q,Ct,Ht,Lt,_t,Ut,qt,se,te,ke,Ye,Ve,on,xn,vn,Qn,Ln,_n,me,pr,Zn,kr,Ar,ei;return Mt<c.Ib?null:(Mt=1/Mt,Ie*=Mt,Ne*=Mt,tn*=Mt,q=Math.sin(ve),Ct=Math.cos(ve),Ht=1-Ct,Lt=st[0],_t=st[1],Ut=st[2],qt=st[3],se=st[4],te=st[5],ke=st[6],Ye=st[7],Ve=st[8],on=st[9],xn=st[10],vn=st[11],Qn=Ie*Ie*Ht+Ct,Ln=Ne*Ie*Ht+tn*q,_n=tn*Ie*Ht-Ne*q,me=Ie*Ne*Ht-tn*q,pr=Ne*Ne*Ht+Ct,Zn=tn*Ne*Ht+Ie*q,kr=Ie*tn*Ht+Ne*q,Ar=Ne*tn*Ht-Ie*q,ei=tn*tn*Ht+Ct,O[0]=Lt*Qn+se*Ln+Ve*_n,O[1]=_t*Qn+te*Ln+on*_n,O[2]=Ut*Qn+ke*Ln+xn*_n,O[3]=qt*Qn+Ye*Ln+vn*_n,O[4]=Lt*me+se*pr+Ve*Zn,O[5]=_t*me+te*pr+on*Zn,O[6]=Ut*me+ke*pr+xn*Zn,O[7]=qt*me+Ye*pr+vn*Zn,O[8]=Lt*kr+se*Ar+Ve*ei,O[9]=_t*kr+te*Ar+on*ei,O[10]=Ut*kr+ke*Ar+xn*ei,O[11]=qt*kr+Ye*Ar+vn*ei,st!==O&&(O[12]=st[12],O[13]=st[13],O[14]=st[14],O[15]=st[15]),O)}function ft(O,st,ve){var $t=Math.sin(ve),Ie=Math.cos(ve),Ne=st[4],tn=st[5],Mt=st[6],q=st[7],Ct=st[8],Ht=st[9],Lt=st[10],_t=st[11];return st!==O&&(O[0]=st[0],O[1]=st[1],O[2]=st[2],O[3]=st[3],O[12]=st[12],O[13]=st[13],O[14]=st[14],O[15]=st[15]),O[4]=Ne*Ie+Ct*$t,O[5]=tn*Ie+Ht*$t,O[6]=Mt*Ie+Lt*$t,O[7]=q*Ie+_t*$t,O[8]=Ct*Ie-Ne*$t,O[9]=Ht*Ie-tn*$t,O[10]=Lt*Ie-Mt*$t,O[11]=_t*Ie-q*$t,O}function J(O,st,ve){var $t=Math.sin(ve),Ie=Math.cos(ve),Ne=st[0],tn=st[1],Mt=st[2],q=st[3],Ct=st[8],Ht=st[9],Lt=st[10],_t=st[11];return st!==O&&(O[4]=st[4],O[5]=st[5],O[6]=st[6],O[7]=st[7],O[12]=st[12],O[13]=st[13],O[14]=st[14],O[15]=st[15]),O[0]=Ne*Ie-Ct*$t,O[1]=tn*Ie-Ht*$t,O[2]=Mt*Ie-Lt*$t,O[3]=q*Ie-_t*$t,O[8]=Ne*$t+Ct*Ie,O[9]=tn*$t+Ht*Ie,O[10]=Mt*$t+Lt*Ie,O[11]=q*$t+_t*Ie,O}function Rt(O,st,ve){var $t=Math.sin(ve),Ie=Math.cos(ve),Ne=st[0],tn=st[1],Mt=st[2],q=st[3],Ct=st[4],Ht=st[5],Lt=st[6],_t=st[7];return st!==O&&(O[8]=st[8],O[9]=st[9],O[10]=st[10],O[11]=st[11],O[12]=st[12],O[13]=st[13],O[14]=st[14],O[15]=st[15]),O[0]=Ne*Ie+Ct*$t,O[1]=tn*Ie+Ht*$t,O[2]=Mt*Ie+Lt*$t,O[3]=q*Ie+_t*$t,O[4]=Ct*Ie-Ne*$t,O[5]=Ht*Ie-tn*$t,O[6]=Lt*Ie-Mt*$t,O[7]=_t*Ie-q*$t,O}function Tt(O,st){return O[0]=1,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=1,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=1,O[11]=0,O[12]=st[0],O[13]=st[1],O[14]=st[2],O[15]=1,O}function Vt(O,st){return O[0]=st[0],O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=st[1],O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=st[2],O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function fe(O,st,ve){var $t=ve[0],Ie=ve[1],Ne=ve[2],tn=Math.sqrt($t*$t+Ie*Ie+Ne*Ne),Mt,q,Ct;return tn<c.Ib?null:(tn=1/tn,$t*=tn,Ie*=tn,Ne*=tn,Mt=Math.sin(st),q=Math.cos(st),Ct=1-q,O[0]=$t*$t*Ct+q,O[1]=Ie*$t*Ct+Ne*Mt,O[2]=Ne*$t*Ct-Ie*Mt,O[3]=0,O[4]=$t*Ie*Ct-Ne*Mt,O[5]=Ie*Ie*Ct+q,O[6]=Ne*Ie*Ct+$t*Mt,O[7]=0,O[8]=$t*Ne*Ct+Ie*Mt,O[9]=Ie*Ne*Ct-$t*Mt,O[10]=Ne*Ne*Ct+q,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O)}function ue(O,st){var ve=Math.sin(st),$t=Math.cos(st);return O[0]=1,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=$t,O[6]=ve,O[7]=0,O[8]=0,O[9]=-ve,O[10]=$t,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function Ce(O,st){var ve=Math.sin(st),$t=Math.cos(st);return O[0]=$t,O[1]=0,O[2]=-ve,O[3]=0,O[4]=0,O[5]=1,O[6]=0,O[7]=0,O[8]=ve,O[9]=0,O[10]=$t,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function be(O,st){var ve=Math.sin(st),$t=Math.cos(st);return O[0]=$t,O[1]=ve,O[2]=0,O[3]=0,O[4]=-ve,O[5]=$t,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=1,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function we(O,st,ve){var $t=st[0],Ie=st[1],Ne=st[2],tn=st[3],Mt=$t+$t,q=Ie+Ie,Ct=Ne+Ne,Ht=$t*Mt,Lt=$t*q,_t=$t*Ct,Ut=Ie*q,qt=Ie*Ct,se=Ne*Ct,te=tn*Mt,ke=tn*q,Ye=tn*Ct;return O[0]=1-(Ut+se),O[1]=Lt+Ye,O[2]=_t-ke,O[3]=0,O[4]=Lt-Ye,O[5]=1-(Ht+se),O[6]=qt+te,O[7]=0,O[8]=_t+ke,O[9]=qt-te,O[10]=1-(Ht+Ut),O[11]=0,O[12]=ve[0],O[13]=ve[1],O[14]=ve[2],O[15]=1,O}function ne(O,st){var ve=new c.WT(3),$t=-st[0],Ie=-st[1],Ne=-st[2],tn=st[3],Mt=st[4],q=st[5],Ct=st[6],Ht=st[7],Lt=$t*$t+Ie*Ie+Ne*Ne+tn*tn;return Lt>0?(ve[0]=(Mt*tn+Ht*$t+q*Ne-Ct*Ie)*2/Lt,ve[1]=(q*tn+Ht*Ie+Ct*$t-Mt*Ne)*2/Lt,ve[2]=(Ct*tn+Ht*Ne+Mt*Ie-q*$t)*2/Lt):(ve[0]=(Mt*tn+Ht*$t+q*Ne-Ct*Ie)*2,ve[1]=(q*tn+Ht*Ie+Ct*$t-Mt*Ne)*2,ve[2]=(Ct*tn+Ht*Ne+Mt*Ie-q*$t)*2),we(O,st,ve),O}function We(O,st){return O[0]=st[12],O[1]=st[13],O[2]=st[14],O}function rn(O,st){var ve=st[0],$t=st[1],Ie=st[2],Ne=st[4],tn=st[5],Mt=st[6],q=st[8],Ct=st[9],Ht=st[10];return O[0]=Math.sqrt(ve*ve+$t*$t+Ie*Ie),O[1]=Math.sqrt(Ne*Ne+tn*tn+Mt*Mt),O[2]=Math.sqrt(q*q+Ct*Ct+Ht*Ht),O}function Xe(O,st){var ve=new c.WT(3);rn(ve,st);var $t=1/ve[0],Ie=1/ve[1],Ne=1/ve[2],tn=st[0]*$t,Mt=st[1]*Ie,q=st[2]*Ne,Ct=st[4]*$t,Ht=st[5]*Ie,Lt=st[6]*Ne,_t=st[8]*$t,Ut=st[9]*Ie,qt=st[10]*Ne,se=tn+Ht+qt,te=0;return se>0?(te=Math.sqrt(se+1)*2,O[3]=.25*te,O[0]=(Lt-Ut)/te,O[1]=(_t-q)/te,O[2]=(Mt-Ct)/te):tn>Ht&&tn>qt?(te=Math.sqrt(1+tn-Ht-qt)*2,O[3]=(Lt-Ut)/te,O[0]=.25*te,O[1]=(Mt+Ct)/te,O[2]=(_t+q)/te):Ht>qt?(te=Math.sqrt(1+Ht-tn-qt)*2,O[3]=(_t-q)/te,O[0]=(Mt+Ct)/te,O[1]=.25*te,O[2]=(Lt+Ut)/te):(te=Math.sqrt(1+qt-tn-Ht)*2,O[3]=(Mt-Ct)/te,O[0]=(_t+q)/te,O[1]=(Lt+Ut)/te,O[2]=.25*te),O}function pn(O,st,ve,$t){st[0]=$t[12],st[1]=$t[13],st[2]=$t[14];var Ie=$t[0],Ne=$t[1],tn=$t[2],Mt=$t[4],q=$t[5],Ct=$t[6],Ht=$t[8],Lt=$t[9],_t=$t[10];ve[0]=Math.sqrt(Ie*Ie+Ne*Ne+tn*tn),ve[1]=Math.sqrt(Mt*Mt+q*q+Ct*Ct),ve[2]=Math.sqrt(Ht*Ht+Lt*Lt+_t*_t);var Ut=1/ve[0],qt=1/ve[1],se=1/ve[2],te=Ie*Ut,ke=Ne*qt,Ye=tn*se,Ve=Mt*Ut,on=q*qt,xn=Ct*se,vn=Ht*Ut,Qn=Lt*qt,Ln=_t*se,_n=te+on+Ln,me=0;return _n>0?(me=Math.sqrt(_n+1)*2,O[3]=.25*me,O[0]=(xn-Qn)/me,O[1]=(vn-Ye)/me,O[2]=(ke-Ve)/me):te>on&&te>Ln?(me=Math.sqrt(1+te-on-Ln)*2,O[3]=(xn-Qn)/me,O[0]=.25*me,O[1]=(ke+Ve)/me,O[2]=(vn+Ye)/me):on>Ln?(me=Math.sqrt(1+on-te-Ln)*2,O[3]=(vn-Ye)/me,O[0]=(ke+Ve)/me,O[1]=.25*me,O[2]=(xn+Qn)/me):(me=Math.sqrt(1+Ln-te-on)*2,O[3]=(ke-Ve)/me,O[0]=(vn+Ye)/me,O[1]=(xn+Qn)/me,O[2]=.25*me),O}function Tn(O,st,ve,$t){var Ie=st[0],Ne=st[1],tn=st[2],Mt=st[3],q=Ie+Ie,Ct=Ne+Ne,Ht=tn+tn,Lt=Ie*q,_t=Ie*Ct,Ut=Ie*Ht,qt=Ne*Ct,se=Ne*Ht,te=tn*Ht,ke=Mt*q,Ye=Mt*Ct,Ve=Mt*Ht,on=$t[0],xn=$t[1],vn=$t[2];return O[0]=(1-(qt+te))*on,O[1]=(_t+Ve)*on,O[2]=(Ut-Ye)*on,O[3]=0,O[4]=(_t-Ve)*xn,O[5]=(1-(Lt+te))*xn,O[6]=(se+ke)*xn,O[7]=0,O[8]=(Ut+Ye)*vn,O[9]=(se-ke)*vn,O[10]=(1-(Lt+qt))*vn,O[11]=0,O[12]=ve[0],O[13]=ve[1],O[14]=ve[2],O[15]=1,O}function $e(O,st,ve,$t,Ie){var Ne=st[0],tn=st[1],Mt=st[2],q=st[3],Ct=Ne+Ne,Ht=tn+tn,Lt=Mt+Mt,_t=Ne*Ct,Ut=Ne*Ht,qt=Ne*Lt,se=tn*Ht,te=tn*Lt,ke=Mt*Lt,Ye=q*Ct,Ve=q*Ht,on=q*Lt,xn=$t[0],vn=$t[1],Qn=$t[2],Ln=Ie[0],_n=Ie[1],me=Ie[2],pr=(1-(se+ke))*xn,Zn=(Ut+on)*xn,kr=(qt-Ve)*xn,Ar=(Ut-on)*vn,ei=(1-(_t+ke))*vn,yi=(te+Ye)*vn,ui=(qt+Ve)*Qn,Ur=(te-Ye)*Qn,ki=(1-(_t+se))*Qn;return O[0]=pr,O[1]=Zn,O[2]=kr,O[3]=0,O[4]=Ar,O[5]=ei,O[6]=yi,O[7]=0,O[8]=ui,O[9]=Ur,O[10]=ki,O[11]=0,O[12]=ve[0]+Ln-(pr*Ln+Ar*_n+ui*me),O[13]=ve[1]+_n-(Zn*Ln+ei*_n+Ur*me),O[14]=ve[2]+me-(kr*Ln+yi*_n+ki*me),O[15]=1,O}function mn(O,st){var ve=st[0],$t=st[1],Ie=st[2],Ne=st[3],tn=ve+ve,Mt=$t+$t,q=Ie+Ie,Ct=ve*tn,Ht=$t*tn,Lt=$t*Mt,_t=Ie*tn,Ut=Ie*Mt,qt=Ie*q,se=Ne*tn,te=Ne*Mt,ke=Ne*q;return O[0]=1-Lt-qt,O[1]=Ht+ke,O[2]=_t-te,O[3]=0,O[4]=Ht-ke,O[5]=1-Ct-qt,O[6]=Ut+se,O[7]=0,O[8]=_t+te,O[9]=Ut-se,O[10]=1-Ct-Lt,O[11]=0,O[12]=0,O[13]=0,O[14]=0,O[15]=1,O}function It(O,st,ve,$t,Ie,Ne,tn){var Mt=1/(ve-st),q=1/(Ie-$t),Ct=1/(Ne-tn);return O[0]=Ne*2*Mt,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=Ne*2*q,O[6]=0,O[7]=0,O[8]=(ve+st)*Mt,O[9]=(Ie+$t)*q,O[10]=(tn+Ne)*Ct,O[11]=-1,O[12]=0,O[13]=0,O[14]=tn*Ne*2*Ct,O[15]=0,O}function Ee(O,st,ve,$t,Ie){var Ne=1/Math.tan(st/2);if(O[0]=Ne/ve,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=Ne,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[11]=-1,O[12]=0,O[13]=0,O[15]=0,Ie!=null&&Ie!==1/0){var tn=1/($t-Ie);O[10]=(Ie+$t)*tn,O[14]=2*Ie*$t*tn}else O[10]=-1,O[14]=-2*$t;return O}var cn=Ee;function sn(O,st,ve,$t,Ie){var Ne=1/Math.tan(st/2);if(O[0]=Ne/ve,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=Ne,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[11]=-1,O[12]=0,O[13]=0,O[15]=0,Ie!=null&&Ie!==1/0){var tn=1/($t-Ie);O[10]=Ie*tn,O[14]=Ie*$t*tn}else O[10]=-1,O[14]=-$t;return O}function Pe(O,st,ve,$t){var Ie=Math.tan(st.upDegrees*Math.PI/180),Ne=Math.tan(st.downDegrees*Math.PI/180),tn=Math.tan(st.leftDegrees*Math.PI/180),Mt=Math.tan(st.rightDegrees*Math.PI/180),q=2/(tn+Mt),Ct=2/(Ie+Ne);return O[0]=q,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=Ct,O[6]=0,O[7]=0,O[8]=-((tn-Mt)*q*.5),O[9]=(Ie-Ne)*Ct*.5,O[10]=$t/(ve-$t),O[11]=-1,O[12]=0,O[13]=0,O[14]=$t*ve/(ve-$t),O[15]=0,O}function ze(O,st,ve,$t,Ie,Ne,tn){var Mt=1/(st-ve),q=1/($t-Ie),Ct=1/(Ne-tn);return O[0]=-2*Mt,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=-2*q,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=2*Ct,O[11]=0,O[12]=(st+ve)*Mt,O[13]=(Ie+$t)*q,O[14]=(tn+Ne)*Ct,O[15]=1,O}var Ke=ze;function le(O,st,ve,$t,Ie,Ne,tn){var Mt=1/(st-ve),q=1/($t-Ie),Ct=1/(Ne-tn);return O[0]=-2*Mt,O[1]=0,O[2]=0,O[3]=0,O[4]=0,O[5]=-2*q,O[6]=0,O[7]=0,O[8]=0,O[9]=0,O[10]=Ct,O[11]=0,O[12]=(st+ve)*Mt,O[13]=(Ie+$t)*q,O[14]=Ne*Ct,O[15]=1,O}function Ae(O,st,ve,$t){var Ie,Ne,tn,Mt,q,Ct,Ht,Lt,_t,Ut,qt=st[0],se=st[1],te=st[2],ke=$t[0],Ye=$t[1],Ve=$t[2],on=ve[0],xn=ve[1],vn=ve[2];return Math.abs(qt-on)<c.Ib&&Math.abs(se-xn)<c.Ib&&Math.abs(te-vn)<c.Ib?M(O):(Ht=qt-on,Lt=se-xn,_t=te-vn,Ut=1/Math.sqrt(Ht*Ht+Lt*Lt+_t*_t),Ht*=Ut,Lt*=Ut,_t*=Ut,Ie=Ye*_t-Ve*Lt,Ne=Ve*Ht-ke*_t,tn=ke*Lt-Ye*Ht,Ut=Math.sqrt(Ie*Ie+Ne*Ne+tn*tn),Ut?(Ut=1/Ut,Ie*=Ut,Ne*=Ut,tn*=Ut):(Ie=0,Ne=0,tn=0),Mt=Lt*tn-_t*Ne,q=_t*Ie-Ht*tn,Ct=Ht*Ne-Lt*Ie,Ut=Math.sqrt(Mt*Mt+q*q+Ct*Ct),Ut?(Ut=1/Ut,Mt*=Ut,q*=Ut,Ct*=Ut):(Mt=0,q=0,Ct=0),O[0]=Ie,O[1]=Mt,O[2]=Ht,O[3]=0,O[4]=Ne,O[5]=q,O[6]=Lt,O[7]=0,O[8]=tn,O[9]=Ct,O[10]=_t,O[11]=0,O[12]=-(Ie*qt+Ne*se+tn*te),O[13]=-(Mt*qt+q*se+Ct*te),O[14]=-(Ht*qt+Lt*se+_t*te),O[15]=1,O)}function Pt(O,st,ve,$t){var Ie=st[0],Ne=st[1],tn=st[2],Mt=$t[0],q=$t[1],Ct=$t[2],Ht=Ie-ve[0],Lt=Ne-ve[1],_t=tn-ve[2],Ut=Ht*Ht+Lt*Lt+_t*_t;Ut>0&&(Ut=1/Math.sqrt(Ut),Ht*=Ut,Lt*=Ut,_t*=Ut);var qt=q*_t-Ct*Lt,se=Ct*Ht-Mt*_t,te=Mt*Lt-q*Ht;return Ut=qt*qt+se*se+te*te,Ut>0&&(Ut=1/Math.sqrt(Ut),qt*=Ut,se*=Ut,te*=Ut),O[0]=qt,O[1]=se,O[2]=te,O[3]=0,O[4]=Lt*te-_t*se,O[5]=_t*qt-Ht*te,O[6]=Ht*se-Lt*qt,O[7]=0,O[8]=Ht,O[9]=Lt,O[10]=_t,O[11]=0,O[12]=Ie,O[13]=Ne,O[14]=tn,O[15]=1,O}function wt(O){return"mat4("+O[0]+", "+O[1]+", "+O[2]+", "+O[3]+", "+O[4]+", "+O[5]+", "+O[6]+", "+O[7]+", "+O[8]+", "+O[9]+", "+O[10]+", "+O[11]+", "+O[12]+", "+O[13]+", "+O[14]+", "+O[15]+")"}function de(O){return Math.sqrt(O[0]*O[0]+O[1]*O[1]+O[2]*O[2]+O[3]*O[3]+O[4]*O[4]+O[5]*O[5]+O[6]*O[6]+O[7]*O[7]+O[8]*O[8]+O[9]*O[9]+O[10]*O[10]+O[11]*O[11]+O[12]*O[12]+O[13]*O[13]+O[14]*O[14]+O[15]*O[15])}function je(O,st,ve){return O[0]=st[0]+ve[0],O[1]=st[1]+ve[1],O[2]=st[2]+ve[2],O[3]=st[3]+ve[3],O[4]=st[4]+ve[4],O[5]=st[5]+ve[5],O[6]=st[6]+ve[6],O[7]=st[7]+ve[7],O[8]=st[8]+ve[8],O[9]=st[9]+ve[9],O[10]=st[10]+ve[10],O[11]=st[11]+ve[11],O[12]=st[12]+ve[12],O[13]=st[13]+ve[13],O[14]=st[14]+ve[14],O[15]=st[15]+ve[15],O}function Re(O,st,ve){return O[0]=st[0]-ve[0],O[1]=st[1]-ve[1],O[2]=st[2]-ve[2],O[3]=st[3]-ve[3],O[4]=st[4]-ve[4],O[5]=st[5]-ve[5],O[6]=st[6]-ve[6],O[7]=st[7]-ve[7],O[8]=st[8]-ve[8],O[9]=st[9]-ve[9],O[10]=st[10]-ve[10],O[11]=st[11]-ve[11],O[12]=st[12]-ve[12],O[13]=st[13]-ve[13],O[14]=st[14]-ve[14],O[15]=st[15]-ve[15],O}function ce(O,st,ve){return O[0]=st[0]*ve,O[1]=st[1]*ve,O[2]=st[2]*ve,O[3]=st[3]*ve,O[4]=st[4]*ve,O[5]=st[5]*ve,O[6]=st[6]*ve,O[7]=st[7]*ve,O[8]=st[8]*ve,O[9]=st[9]*ve,O[10]=st[10]*ve,O[11]=st[11]*ve,O[12]=st[12]*ve,O[13]=st[13]*ve,O[14]=st[14]*ve,O[15]=st[15]*ve,O}function Le(O,st,ve,$t){return O[0]=st[0]+ve[0]*$t,O[1]=st[1]+ve[1]*$t,O[2]=st[2]+ve[2]*$t,O[3]=st[3]+ve[3]*$t,O[4]=st[4]+ve[4]*$t,O[5]=st[5]+ve[5]*$t,O[6]=st[6]+ve[6]*$t,O[7]=st[7]+ve[7]*$t,O[8]=st[8]+ve[8]*$t,O[9]=st[9]+ve[9]*$t,O[10]=st[10]+ve[10]*$t,O[11]=st[11]+ve[11]*$t,O[12]=st[12]+ve[12]*$t,O[13]=st[13]+ve[13]*$t,O[14]=st[14]+ve[14]*$t,O[15]=st[15]+ve[15]*$t,O}function xe(O,st){return O[0]===st[0]&&O[1]===st[1]&&O[2]===st[2]&&O[3]===st[3]&&O[4]===st[4]&&O[5]===st[5]&&O[6]===st[6]&&O[7]===st[7]&&O[8]===st[8]&&O[9]===st[9]&&O[10]===st[10]&&O[11]===st[11]&&O[12]===st[12]&&O[13]===st[13]&&O[14]===st[14]&&O[15]===st[15]}function Ft(O,st){var ve=O[0],$t=O[1],Ie=O[2],Ne=O[3],tn=O[4],Mt=O[5],q=O[6],Ct=O[7],Ht=O[8],Lt=O[9],_t=O[10],Ut=O[11],qt=O[12],se=O[13],te=O[14],ke=O[15],Ye=st[0],Ve=st[1],on=st[2],xn=st[3],vn=st[4],Qn=st[5],Ln=st[6],_n=st[7],me=st[8],pr=st[9],Zn=st[10],kr=st[11],Ar=st[12],ei=st[13],yi=st[14],ui=st[15];return Math.abs(ve-Ye)<=c.Ib*Math.max(1,Math.abs(ve),Math.abs(Ye))&&Math.abs($t-Ve)<=c.Ib*Math.max(1,Math.abs($t),Math.abs(Ve))&&Math.abs(Ie-on)<=c.Ib*Math.max(1,Math.abs(Ie),Math.abs(on))&&Math.abs(Ne-xn)<=c.Ib*Math.max(1,Math.abs(Ne),Math.abs(xn))&&Math.abs(tn-vn)<=c.Ib*Math.max(1,Math.abs(tn),Math.abs(vn))&&Math.abs(Mt-Qn)<=c.Ib*Math.max(1,Math.abs(Mt),Math.abs(Qn))&&Math.abs(q-Ln)<=c.Ib*Math.max(1,Math.abs(q),Math.abs(Ln))&&Math.abs(Ct-_n)<=c.Ib*Math.max(1,Math.abs(Ct),Math.abs(_n))&&Math.abs(Ht-me)<=c.Ib*Math.max(1,Math.abs(Ht),Math.abs(me))&&Math.abs(Lt-pr)<=c.Ib*Math.max(1,Math.abs(Lt),Math.abs(pr))&&Math.abs(_t-Zn)<=c.Ib*Math.max(1,Math.abs(_t),Math.abs(Zn))&&Math.abs(Ut-kr)<=c.Ib*Math.max(1,Math.abs(Ut),Math.abs(kr))&&Math.abs(qt-Ar)<=c.Ib*Math.max(1,Math.abs(qt),Math.abs(Ar))&&Math.abs(se-ei)<=c.Ib*Math.max(1,Math.abs(se),Math.abs(ei))&&Math.abs(te-yi)<=c.Ib*Math.max(1,Math.abs(te),Math.abs(yi))&&Math.abs(ke-ui)<=c.Ib*Math.max(1,Math.abs(ke),Math.abs(ui))}var re=F,Me=Re},94569:function(bt,Et,y){"use strict";y.d(Et,{Fv:function(){return Pe},JG:function(){return We},Jp:function(){return A},Su:function(){return Ce},U_:function(){return Vt},Ue:function(){return S},al:function(){return ne},dC:function(){return pn},t8:function(){return rn},yY:function(){return M}});var c=y(85551),_=y(79111),I=y(92421),z=y(97082);function S(){var wt=new c.WT(4);return c.WT!=Float32Array&&(wt[0]=0,wt[1]=0,wt[2]=0),wt[3]=1,wt}function R(wt){return wt[0]=0,wt[1]=0,wt[2]=0,wt[3]=1,wt}function M(wt,de,je){je=je*.5;var Re=Math.sin(je);return wt[0]=Re*de[0],wt[1]=Re*de[1],wt[2]=Re*de[2],wt[3]=Math.cos(je),wt}function N(wt,de){var je=Math.acos(de[3])*2,Re=Math.sin(je/2);return Re>glMatrix.EPSILON?(wt[0]=de[0]/Re,wt[1]=de[1]/Re,wt[2]=de[2]/Re):(wt[0]=1,wt[1]=0,wt[2]=0),je}function D(wt,de){var je=$e(wt,de);return Math.acos(2*je*je-1)}function A(wt,de,je){var Re=de[0],ce=de[1],Le=de[2],xe=de[3],Ft=je[0],re=je[1],Me=je[2],O=je[3];return wt[0]=Re*O+xe*Ft+ce*Me-Le*re,wt[1]=ce*O+xe*re+Le*Ft-Re*Me,wt[2]=Le*O+xe*Me+Re*re-ce*Ft,wt[3]=xe*O-Re*Ft-ce*re-Le*Me,wt}function L(wt,de,je){je*=.5;var Re=de[0],ce=de[1],Le=de[2],xe=de[3],Ft=Math.sin(je),re=Math.cos(je);return wt[0]=Re*re+xe*Ft,wt[1]=ce*re+Le*Ft,wt[2]=Le*re-ce*Ft,wt[3]=xe*re-Re*Ft,wt}function F(wt,de,je){je*=.5;var Re=de[0],ce=de[1],Le=de[2],xe=de[3],Ft=Math.sin(je),re=Math.cos(je);return wt[0]=Re*re-Le*Ft,wt[1]=ce*re+xe*Ft,wt[2]=Le*re+Re*Ft,wt[3]=xe*re-ce*Ft,wt}function rt(wt,de,je){je*=.5;var Re=de[0],ce=de[1],Le=de[2],xe=de[3],Ft=Math.sin(je),re=Math.cos(je);return wt[0]=Re*re+ce*Ft,wt[1]=ce*re-Re*Ft,wt[2]=Le*re+xe*Ft,wt[3]=xe*re-Le*Ft,wt}function G(wt,de){var je=de[0],Re=de[1],ce=de[2];return wt[0]=je,wt[1]=Re,wt[2]=ce,wt[3]=Math.sqrt(Math.abs(1-je*je-Re*Re-ce*ce)),wt}function kt(wt,de){var je=de[0],Re=de[1],ce=de[2],Le=de[3],xe=Math.sqrt(je*je+Re*Re+ce*ce),Ft=Math.exp(Le),re=xe>0?Ft*Math.sin(xe)/xe:0;return wt[0]=je*re,wt[1]=Re*re,wt[2]=ce*re,wt[3]=Ft*Math.cos(xe),wt}function ft(wt,de){var je=de[0],Re=de[1],ce=de[2],Le=de[3],xe=Math.sqrt(je*je+Re*Re+ce*ce),Ft=xe>0?Math.atan2(xe,Le)/xe:0;return wt[0]=je*Ft,wt[1]=Re*Ft,wt[2]=ce*Ft,wt[3]=.5*Math.log(je*je+Re*Re+ce*ce+Le*Le),wt}function J(wt,de,je){return ft(wt,de),Tn(wt,wt,je),kt(wt,wt),wt}function Rt(wt,de,je,Re){var ce=de[0],Le=de[1],xe=de[2],Ft=de[3],re=je[0],Me=je[1],O=je[2],st=je[3],ve,$t,Ie,Ne,tn;return $t=ce*re+Le*Me+xe*O+Ft*st,$t<0&&($t=-$t,re=-re,Me=-Me,O=-O,st=-st),1-$t>c.Ib?(ve=Math.acos($t),Ie=Math.sin(ve),Ne=Math.sin((1-Re)*ve)/Ie,tn=Math.sin(Re*ve)/Ie):(Ne=1-Re,tn=Re),wt[0]=Ne*ce+tn*re,wt[1]=Ne*Le+tn*Me,wt[2]=Ne*xe+tn*O,wt[3]=Ne*Ft+tn*st,wt}function Tt(wt){var de=glMatrix.RANDOM(),je=glMatrix.RANDOM(),Re=glMatrix.RANDOM(),ce=Math.sqrt(1-de),Le=Math.sqrt(de);return wt[0]=ce*Math.sin(2*Math.PI*je),wt[1]=ce*Math.cos(2*Math.PI*je),wt[2]=Le*Math.sin(2*Math.PI*Re),wt[3]=Le*Math.cos(2*Math.PI*Re),wt}function Vt(wt,de){var je=de[0],Re=de[1],ce=de[2],Le=de[3],xe=je*je+Re*Re+ce*ce+Le*Le,Ft=xe?1/xe:0;return wt[0]=-je*Ft,wt[1]=-Re*Ft,wt[2]=-ce*Ft,wt[3]=Le*Ft,wt}function fe(wt,de){return wt[0]=-de[0],wt[1]=-de[1],wt[2]=-de[2],wt[3]=de[3],wt}function ue(wt,de){var je=de[0]+de[4]+de[8],Re;if(je>0)Re=Math.sqrt(je+1),wt[3]=.5*Re,Re=.5/Re,wt[0]=(de[5]-de[7])*Re,wt[1]=(de[6]-de[2])*Re,wt[2]=(de[1]-de[3])*Re;else{var ce=0;de[4]>de[0]&&(ce=1),de[8]>de[ce*3+ce]&&(ce=2);var Le=(ce+1)%3,xe=(ce+2)%3;Re=Math.sqrt(de[ce*3+ce]-de[Le*3+Le]-de[xe*3+xe]+1),wt[ce]=.5*Re,Re=.5/Re,wt[3]=(de[Le*3+xe]-de[xe*3+Le])*Re,wt[Le]=(de[Le*3+ce]+de[ce*3+Le])*Re,wt[xe]=(de[xe*3+ce]+de[ce*3+xe])*Re}return wt}function Ce(wt,de,je,Re){var ce=arguments.length>4&&arguments[4]!==void 0?arguments[4]:c.yy,Le=Math.PI/360;de*=Le,Re*=Le,je*=Le;var xe=Math.sin(de),Ft=Math.cos(de),re=Math.sin(je),Me=Math.cos(je),O=Math.sin(Re),st=Math.cos(Re);switch(ce){case"xyz":wt[0]=xe*Me*st+Ft*re*O,wt[1]=Ft*re*st-xe*Me*O,wt[2]=Ft*Me*O+xe*re*st,wt[3]=Ft*Me*st-xe*re*O;break;case"xzy":wt[0]=xe*Me*st-Ft*re*O,wt[1]=Ft*re*st-xe*Me*O,wt[2]=Ft*Me*O+xe*re*st,wt[3]=Ft*Me*st+xe*re*O;break;case"yxz":wt[0]=xe*Me*st+Ft*re*O,wt[1]=Ft*re*st-xe*Me*O,wt[2]=Ft*Me*O-xe*re*st,wt[3]=Ft*Me*st+xe*re*O;break;case"yzx":wt[0]=xe*Me*st+Ft*re*O,wt[1]=Ft*re*st+xe*Me*O,wt[2]=Ft*Me*O-xe*re*st,wt[3]=Ft*Me*st-xe*re*O;break;case"zxy":wt[0]=xe*Me*st-Ft*re*O,wt[1]=Ft*re*st+xe*Me*O,wt[2]=Ft*Me*O+xe*re*st,wt[3]=Ft*Me*st-xe*re*O;break;case"zyx":wt[0]=xe*Me*st-Ft*re*O,wt[1]=Ft*re*st+xe*Me*O,wt[2]=Ft*Me*O-xe*re*st,wt[3]=Ft*Me*st+xe*re*O;break;default:throw new Error("Unknown angle order "+ce)}return wt}function be(wt){return"quat("+wt[0]+", "+wt[1]+", "+wt[2]+", "+wt[3]+")"}var we=z.d9,ne=z.al,We=z.JG,rn=z.t8,Xe=z.IH,pn=A,Tn=z.bA,$e=z.AK,mn=z.t7,It=z.kE,Ee=null,cn=z.we,sn=null,Pe=z.Fv,ze=z.I6;function Ke(wt,de){return Math.abs(vec4.dot(wt,de))>=1-glMatrix.EPSILON}var le=function(){var wt=I.Ue(),de=I.al(1,0,0),je=I.al(0,1,0);return function(Re,ce,Le){var xe=I.AK(ce,Le);return xe<-.999999?(I.kC(wt,de,ce),I.Zh(wt)<1e-6&&I.kC(wt,je,ce),I.Fv(wt,wt),M(Re,wt,Math.PI),Re):xe>.999999?(Re[0]=0,Re[1]=0,Re[2]=0,Re[3]=1,Re):(I.kC(wt,ce,Le),Re[0]=wt[0],Re[1]=wt[1],Re[2]=wt[2],Re[3]=1+xe,Pe(Re,Re))}}(),Ae=function(){var wt=S(),de=S();return function(je,Re,ce,Le,xe,Ft){return Rt(wt,Re,xe,Ft),Rt(de,ce,Le,Ft),Rt(je,wt,de,2*Ft*(1-Ft)),je}}(),Pt=function(){var wt=_.Ue();return function(de,je,Re,ce){return wt[0]=Re[0],wt[3]=Re[1],wt[6]=Re[2],wt[1]=ce[0],wt[4]=ce[1],wt[7]=ce[2],wt[2]=-je[0],wt[5]=-je[1],wt[8]=-je[2],Pe(de,ue(de,wt))}}()},45545:function(bt,Et,y){"use strict";y.d(Et,{AK:function(){return we},Fv:function(){return be},I6:function(){return Pe},JG:function(){return S},Ue:function(){return _},t8:function(){return R}});var c=y(85551);function _(){var ce=new c.WT(2);return c.WT!=Float32Array&&(ce[0]=0,ce[1]=0),ce}function I(ce){var Le=new glMatrix.ARRAY_TYPE(2);return Le[0]=ce[0],Le[1]=ce[1],Le}function z(ce,Le){var xe=new glMatrix.ARRAY_TYPE(2);return xe[0]=ce,xe[1]=Le,xe}function S(ce,Le){return ce[0]=Le[0],ce[1]=Le[1],ce}function R(ce,Le,xe){return ce[0]=Le,ce[1]=xe,ce}function M(ce,Le,xe){return ce[0]=Le[0]+xe[0],ce[1]=Le[1]+xe[1],ce}function N(ce,Le,xe){return ce[0]=Le[0]-xe[0],ce[1]=Le[1]-xe[1],ce}function D(ce,Le,xe){return ce[0]=Le[0]*xe[0],ce[1]=Le[1]*xe[1],ce}function A(ce,Le,xe){return ce[0]=Le[0]/xe[0],ce[1]=Le[1]/xe[1],ce}function L(ce,Le){return ce[0]=Math.ceil(Le[0]),ce[1]=Math.ceil(Le[1]),ce}function F(ce,Le){return ce[0]=Math.floor(Le[0]),ce[1]=Math.floor(Le[1]),ce}function rt(ce,Le,xe){return ce[0]=Math.min(Le[0],xe[0]),ce[1]=Math.min(Le[1],xe[1]),ce}function G(ce,Le,xe){return ce[0]=Math.max(Le[0],xe[0]),ce[1]=Math.max(Le[1],xe[1]),ce}function kt(ce,Le){return ce[0]=glMatrix.round(Le[0]),ce[1]=glMatrix.round(Le[1]),ce}function ft(ce,Le,xe){return ce[0]=Le[0]*xe,ce[1]=Le[1]*xe,ce}function J(ce,Le,xe,Ft){return ce[0]=Le[0]+xe[0]*Ft,ce[1]=Le[1]+xe[1]*Ft,ce}function Rt(ce,Le){var xe=Le[0]-ce[0],Ft=Le[1]-ce[1];return Math.sqrt(xe*xe+Ft*Ft)}function Tt(ce,Le){var xe=Le[0]-ce[0],Ft=Le[1]-ce[1];return xe*xe+Ft*Ft}function Vt(ce){var Le=ce[0],xe=ce[1];return Math.sqrt(Le*Le+xe*xe)}function fe(ce){var Le=ce[0],xe=ce[1];return Le*Le+xe*xe}function ue(ce,Le){return ce[0]=-Le[0],ce[1]=-Le[1],ce}function Ce(ce,Le){return ce[0]=1/Le[0],ce[1]=1/Le[1],ce}function be(ce,Le){var xe=Le[0],Ft=Le[1],re=xe*xe+Ft*Ft;return re>0&&(re=1/Math.sqrt(re)),ce[0]=Le[0]*re,ce[1]=Le[1]*re,ce}function we(ce,Le){return ce[0]*Le[0]+ce[1]*Le[1]}function ne(ce,Le,xe){var Ft=Le[0]*xe[1]-Le[1]*xe[0];return ce[0]=ce[1]=0,ce[2]=Ft,ce}function We(ce,Le,xe,Ft){var re=Le[0],Me=Le[1];return ce[0]=re+Ft*(xe[0]-re),ce[1]=Me+Ft*(xe[1]-Me),ce}function rn(ce,Le){Le=Le===void 0?1:Le;var xe=glMatrix.RANDOM()*2*Math.PI;return ce[0]=Math.cos(xe)*Le,ce[1]=Math.sin(xe)*Le,ce}function Xe(ce,Le,xe){var Ft=Le[0],re=Le[1];return ce[0]=xe[0]*Ft+xe[2]*re,ce[1]=xe[1]*Ft+xe[3]*re,ce}function pn(ce,Le,xe){var Ft=Le[0],re=Le[1];return ce[0]=xe[0]*Ft+xe[2]*re+xe[4],ce[1]=xe[1]*Ft+xe[3]*re+xe[5],ce}function Tn(ce,Le,xe){var Ft=Le[0],re=Le[1];return ce[0]=xe[0]*Ft+xe[3]*re+xe[6],ce[1]=xe[1]*Ft+xe[4]*re+xe[7],ce}function $e(ce,Le,xe){var Ft=Le[0],re=Le[1];return ce[0]=xe[0]*Ft+xe[4]*re+xe[12],ce[1]=xe[1]*Ft+xe[5]*re+xe[13],ce}function mn(ce,Le,xe,Ft){var re=Le[0]-xe[0],Me=Le[1]-xe[1],O=Math.sin(Ft),st=Math.cos(Ft);return ce[0]=re*st-Me*O+xe[0],ce[1]=re*O+Me*st+xe[1],ce}function It(ce,Le){var xe=ce[0],Ft=ce[1],re=Le[0],Me=Le[1];return Math.abs(Math.atan2(Ft*re-xe*Me,xe*re+Ft*Me))}function Ee(ce,Le){var xe=ce[0],Ft=ce[1],re=Le[0],Me=Le[1];return Math.atan2(xe*Me-Ft*re,xe*re+Ft*Me)}function cn(ce){return ce[0]=0,ce[1]=0,ce}function sn(ce){return"vec2("+ce[0]+", "+ce[1]+")"}function Pe(ce,Le){return ce[0]===Le[0]&&ce[1]===Le[1]}function ze(ce,Le){var xe=ce[0],Ft=ce[1],re=Le[0],Me=Le[1];return Math.abs(xe-re)<=glMatrix.EPSILON*Math.max(1,Math.abs(xe),Math.abs(re))&&Math.abs(Ft-Me)<=glMatrix.EPSILON*Math.max(1,Math.abs(Ft),Math.abs(Me))}var Ke=null,le=null,Ae=null,Pt=null,wt=null,de=null,je=null,Re=function(){var ce=_();return function(Le,xe,Ft,re,Me,O){var st,ve;for(xe||(xe=2),Ft||(Ft=0),re?ve=Math.min(re*xe+Ft,Le.length):ve=Le.length,st=Ft;st<ve;st+=xe)ce[0]=Le[st],ce[1]=Le[st+1],Me(ce,ce,O),Le[st]=ce[0],Le[st+1]=ce[1];return Le}}()},92421:function(bt,Et,y){"use strict";y.d(Et,{$X:function(){return D},AK:function(){return we},Fp:function(){return kt},Fv:function(){return be},IH:function(){return N},JG:function(){return R},Jp:function(){return A},TK:function(){return je},Ue:function(){return _},VC:function(){return It},VV:function(){return G},Zh:function(){return ce},al:function(){return S},bA:function(){return J},d9:function(){return I},fF:function(){return $e},fS:function(){return Ae},kC:function(){return ne},kE:function(){return z},kK:function(){return mn},lu:function(){return Pt},t7:function(){return We},t8:function(){return M}});var c=y(85551);function _(){var Ft=new c.WT(3);return c.WT!=Float32Array&&(Ft[0]=0,Ft[1]=0,Ft[2]=0),Ft}function I(Ft){var re=new c.WT(3);return re[0]=Ft[0],re[1]=Ft[1],re[2]=Ft[2],re}function z(Ft){var re=Ft[0],Me=Ft[1],O=Ft[2];return Math.sqrt(re*re+Me*Me+O*O)}function S(Ft,re,Me){var O=new c.WT(3);return O[0]=Ft,O[1]=re,O[2]=Me,O}function R(Ft,re){return Ft[0]=re[0],Ft[1]=re[1],Ft[2]=re[2],Ft}function M(Ft,re,Me,O){return Ft[0]=re,Ft[1]=Me,Ft[2]=O,Ft}function N(Ft,re,Me){return Ft[0]=re[0]+Me[0],Ft[1]=re[1]+Me[1],Ft[2]=re[2]+Me[2],Ft}function D(Ft,re,Me){return Ft[0]=re[0]-Me[0],Ft[1]=re[1]-Me[1],Ft[2]=re[2]-Me[2],Ft}function A(Ft,re,Me){return Ft[0]=re[0]*Me[0],Ft[1]=re[1]*Me[1],Ft[2]=re[2]*Me[2],Ft}function L(Ft,re,Me){return Ft[0]=re[0]/Me[0],Ft[1]=re[1]/Me[1],Ft[2]=re[2]/Me[2],Ft}function F(Ft,re){return Ft[0]=Math.ceil(re[0]),Ft[1]=Math.ceil(re[1]),Ft[2]=Math.ceil(re[2]),Ft}function rt(Ft,re){return Ft[0]=Math.floor(re[0]),Ft[1]=Math.floor(re[1]),Ft[2]=Math.floor(re[2]),Ft}function G(Ft,re,Me){return Ft[0]=Math.min(re[0],Me[0]),Ft[1]=Math.min(re[1],Me[1]),Ft[2]=Math.min(re[2],Me[2]),Ft}function kt(Ft,re,Me){return Ft[0]=Math.max(re[0],Me[0]),Ft[1]=Math.max(re[1],Me[1]),Ft[2]=Math.max(re[2],Me[2]),Ft}function ft(Ft,re){return Ft[0]=glMatrix.round(re[0]),Ft[1]=glMatrix.round(re[1]),Ft[2]=glMatrix.round(re[2]),Ft}function J(Ft,re,Me){return Ft[0]=re[0]*Me,Ft[1]=re[1]*Me,Ft[2]=re[2]*Me,Ft}function Rt(Ft,re,Me,O){return Ft[0]=re[0]+Me[0]*O,Ft[1]=re[1]+Me[1]*O,Ft[2]=re[2]+Me[2]*O,Ft}function Tt(Ft,re){var Me=re[0]-Ft[0],O=re[1]-Ft[1],st=re[2]-Ft[2];return Math.sqrt(Me*Me+O*O+st*st)}function Vt(Ft,re){var Me=re[0]-Ft[0],O=re[1]-Ft[1],st=re[2]-Ft[2];return Me*Me+O*O+st*st}function fe(Ft){var re=Ft[0],Me=Ft[1],O=Ft[2];return re*re+Me*Me+O*O}function ue(Ft,re){return Ft[0]=-re[0],Ft[1]=-re[1],Ft[2]=-re[2],Ft}function Ce(Ft,re){return Ft[0]=1/re[0],Ft[1]=1/re[1],Ft[2]=1/re[2],Ft}function be(Ft,re){var Me=re[0],O=re[1],st=re[2],ve=Me*Me+O*O+st*st;return ve>0&&(ve=1/Math.sqrt(ve)),Ft[0]=re[0]*ve,Ft[1]=re[1]*ve,Ft[2]=re[2]*ve,Ft}function we(Ft,re){return Ft[0]*re[0]+Ft[1]*re[1]+Ft[2]*re[2]}function ne(Ft,re,Me){var O=re[0],st=re[1],ve=re[2],$t=Me[0],Ie=Me[1],Ne=Me[2];return Ft[0]=st*Ne-ve*Ie,Ft[1]=ve*$t-O*Ne,Ft[2]=O*Ie-st*$t,Ft}function We(Ft,re,Me,O){var st=re[0],ve=re[1],$t=re[2];return Ft[0]=st+O*(Me[0]-st),Ft[1]=ve+O*(Me[1]-ve),Ft[2]=$t+O*(Me[2]-$t),Ft}function rn(Ft,re,Me,O){var st=Math.acos(Math.min(Math.max(we(re,Me),-1),1)),ve=Math.sin(st),$t=Math.sin((1-O)*st)/ve,Ie=Math.sin(O*st)/ve;return Ft[0]=$t*re[0]+Ie*Me[0],Ft[1]=$t*re[1]+Ie*Me[1],Ft[2]=$t*re[2]+Ie*Me[2],Ft}function Xe(Ft,re,Me,O,st,ve){var $t=ve*ve,Ie=$t*(2*ve-3)+1,Ne=$t*(ve-2)+ve,tn=$t*(ve-1),Mt=$t*(3-2*ve);return Ft[0]=re[0]*Ie+Me[0]*Ne+O[0]*tn+st[0]*Mt,Ft[1]=re[1]*Ie+Me[1]*Ne+O[1]*tn+st[1]*Mt,Ft[2]=re[2]*Ie+Me[2]*Ne+O[2]*tn+st[2]*Mt,Ft}function pn(Ft,re,Me,O,st,ve){var $t=1-ve,Ie=$t*$t,Ne=ve*ve,tn=Ie*$t,Mt=3*ve*Ie,q=3*Ne*$t,Ct=Ne*ve;return Ft[0]=re[0]*tn+Me[0]*Mt+O[0]*q+st[0]*Ct,Ft[1]=re[1]*tn+Me[1]*Mt+O[1]*q+st[1]*Ct,Ft[2]=re[2]*tn+Me[2]*Mt+O[2]*q+st[2]*Ct,Ft}function Tn(Ft,re){re=re===void 0?1:re;var Me=glMatrix.RANDOM()*2*Math.PI,O=glMatrix.RANDOM()*2-1,st=Math.sqrt(1-O*O)*re;return Ft[0]=Math.cos(Me)*st,Ft[1]=Math.sin(Me)*st,Ft[2]=O*re,Ft}function $e(Ft,re,Me){var O=re[0],st=re[1],ve=re[2],$t=Me[3]*O+Me[7]*st+Me[11]*ve+Me[15];return $t=$t||1,Ft[0]=(Me[0]*O+Me[4]*st+Me[8]*ve+Me[12])/$t,Ft[1]=(Me[1]*O+Me[5]*st+Me[9]*ve+Me[13])/$t,Ft[2]=(Me[2]*O+Me[6]*st+Me[10]*ve+Me[14])/$t,Ft}function mn(Ft,re,Me){var O=re[0],st=re[1],ve=re[2];return Ft[0]=O*Me[0]+st*Me[3]+ve*Me[6],Ft[1]=O*Me[1]+st*Me[4]+ve*Me[7],Ft[2]=O*Me[2]+st*Me[5]+ve*Me[8],Ft}function It(Ft,re,Me){var O=Me[0],st=Me[1],ve=Me[2],$t=Me[3],Ie=re[0],Ne=re[1],tn=re[2],Mt=st*tn-ve*Ne,q=ve*Ie-O*tn,Ct=O*Ne-st*Ie;return Mt=Mt+Mt,q=q+q,Ct=Ct+Ct,Ft[0]=Ie+$t*Mt+st*Ct-ve*q,Ft[1]=Ne+$t*q+ve*Mt-O*Ct,Ft[2]=tn+$t*Ct+O*q-st*Mt,Ft}function Ee(Ft,re,Me,O){var st=[],ve=[];return st[0]=re[0]-Me[0],st[1]=re[1]-Me[1],st[2]=re[2]-Me[2],ve[0]=st[0],ve[1]=st[1]*Math.cos(O)-st[2]*Math.sin(O),ve[2]=st[1]*Math.sin(O)+st[2]*Math.cos(O),Ft[0]=ve[0]+Me[0],Ft[1]=ve[1]+Me[1],Ft[2]=ve[2]+Me[2],Ft}function cn(Ft,re,Me,O){var st=[],ve=[];return st[0]=re[0]-Me[0],st[1]=re[1]-Me[1],st[2]=re[2]-Me[2],ve[0]=st[2]*Math.sin(O)+st[0]*Math.cos(O),ve[1]=st[1],ve[2]=st[2]*Math.cos(O)-st[0]*Math.sin(O),Ft[0]=ve[0]+Me[0],Ft[1]=ve[1]+Me[1],Ft[2]=ve[2]+Me[2],Ft}function sn(Ft,re,Me,O){var st=[],ve=[];return st[0]=re[0]-Me[0],st[1]=re[1]-Me[1],st[2]=re[2]-Me[2],ve[0]=st[0]*Math.cos(O)-st[1]*Math.sin(O),ve[1]=st[0]*Math.sin(O)+st[1]*Math.cos(O),ve[2]=st[2],Ft[0]=ve[0]+Me[0],Ft[1]=ve[1]+Me[1],Ft[2]=ve[2]+Me[2],Ft}function Pe(Ft,re){var Me=Ft[0],O=Ft[1],st=Ft[2],ve=re[0],$t=re[1],Ie=re[2],Ne=Math.sqrt((Me*Me+O*O+st*st)*(ve*ve+$t*$t+Ie*Ie)),tn=Ne&&we(Ft,re)/Ne;return Math.acos(Math.min(Math.max(tn,-1),1))}function ze(Ft){return Ft[0]=0,Ft[1]=0,Ft[2]=0,Ft}function Ke(Ft){return"vec3("+Ft[0]+", "+Ft[1]+", "+Ft[2]+")"}function le(Ft,re){return Ft[0]===re[0]&&Ft[1]===re[1]&&Ft[2]===re[2]}function Ae(Ft,re){var Me=Ft[0],O=Ft[1],st=Ft[2],ve=re[0],$t=re[1],Ie=re[2];return Math.abs(Me-ve)<=c.Ib*Math.max(1,Math.abs(Me),Math.abs(ve))&&Math.abs(O-$t)<=c.Ib*Math.max(1,Math.abs(O),Math.abs($t))&&Math.abs(st-Ie)<=c.Ib*Math.max(1,Math.abs(st),Math.abs(Ie))}var Pt=D,wt=null,de=null,je=Tt,Re=null,ce=z,Le=null,xe=function(){var Ft=_();return function(re,Me,O,st,ve,$t){var Ie,Ne;for(Me||(Me=3),O||(O=0),st?Ne=Math.min(st*Me+O,re.length):Ne=re.length,Ie=O;Ie<Ne;Ie+=Me)Ft[0]=re[Ie],Ft[1]=re[Ie+1],Ft[2]=re[Ie+2],ve(Ft,Ft,$t),re[Ie]=Ft[0],re[Ie+1]=Ft[1],re[Ie+2]=Ft[2];return re}}()},97082:function(bt,Et,y){"use strict";y.d(Et,{AK:function(){return we},Fv:function(){return be},I6:function(){return mn},IH:function(){return M},JG:function(){return S},Ue:function(){return _},al:function(){return z},bA:function(){return ft},d9:function(){return I},fF:function(){return Xe},kE:function(){return Vt},t7:function(){return We},t8:function(){return R},we:function(){return fe}});var c=y(85551);function _(){var Pt=new c.WT(4);return c.WT!=Float32Array&&(Pt[0]=0,Pt[1]=0,Pt[2]=0,Pt[3]=0),Pt}function I(Pt){var wt=new c.WT(4);return wt[0]=Pt[0],wt[1]=Pt[1],wt[2]=Pt[2],wt[3]=Pt[3],wt}function z(Pt,wt,de,je){var Re=new c.WT(4);return Re[0]=Pt,Re[1]=wt,Re[2]=de,Re[3]=je,Re}function S(Pt,wt){return Pt[0]=wt[0],Pt[1]=wt[1],Pt[2]=wt[2],Pt[3]=wt[3],Pt}function R(Pt,wt,de,je,Re){return Pt[0]=wt,Pt[1]=de,Pt[2]=je,Pt[3]=Re,Pt}function M(Pt,wt,de){return Pt[0]=wt[0]+de[0],Pt[1]=wt[1]+de[1],Pt[2]=wt[2]+de[2],Pt[3]=wt[3]+de[3],Pt}function N(Pt,wt,de){return Pt[0]=wt[0]-de[0],Pt[1]=wt[1]-de[1],Pt[2]=wt[2]-de[2],Pt[3]=wt[3]-de[3],Pt}function D(Pt,wt,de){return Pt[0]=wt[0]*de[0],Pt[1]=wt[1]*de[1],Pt[2]=wt[2]*de[2],Pt[3]=wt[3]*de[3],Pt}function A(Pt,wt,de){return Pt[0]=wt[0]/de[0],Pt[1]=wt[1]/de[1],Pt[2]=wt[2]/de[2],Pt[3]=wt[3]/de[3],Pt}function L(Pt,wt){return Pt[0]=Math.ceil(wt[0]),Pt[1]=Math.ceil(wt[1]),Pt[2]=Math.ceil(wt[2]),Pt[3]=Math.ceil(wt[3]),Pt}function F(Pt,wt){return Pt[0]=Math.floor(wt[0]),Pt[1]=Math.floor(wt[1]),Pt[2]=Math.floor(wt[2]),Pt[3]=Math.floor(wt[3]),Pt}function rt(Pt,wt,de){return Pt[0]=Math.min(wt[0],de[0]),Pt[1]=Math.min(wt[1],de[1]),Pt[2]=Math.min(wt[2],de[2]),Pt[3]=Math.min(wt[3],de[3]),Pt}function G(Pt,wt,de){return Pt[0]=Math.max(wt[0],de[0]),Pt[1]=Math.max(wt[1],de[1]),Pt[2]=Math.max(wt[2],de[2]),Pt[3]=Math.max(wt[3],de[3]),Pt}function kt(Pt,wt){return Pt[0]=glMatrix.round(wt[0]),Pt[1]=glMatrix.round(wt[1]),Pt[2]=glMatrix.round(wt[2]),Pt[3]=glMatrix.round(wt[3]),Pt}function ft(Pt,wt,de){return Pt[0]=wt[0]*de,Pt[1]=wt[1]*de,Pt[2]=wt[2]*de,Pt[3]=wt[3]*de,Pt}function J(Pt,wt,de,je){return Pt[0]=wt[0]+de[0]*je,Pt[1]=wt[1]+de[1]*je,Pt[2]=wt[2]+de[2]*je,Pt[3]=wt[3]+de[3]*je,Pt}function Rt(Pt,wt){var de=wt[0]-Pt[0],je=wt[1]-Pt[1],Re=wt[2]-Pt[2],ce=wt[3]-Pt[3];return Math.sqrt(de*de+je*je+Re*Re+ce*ce)}function Tt(Pt,wt){var de=wt[0]-Pt[0],je=wt[1]-Pt[1],Re=wt[2]-Pt[2],ce=wt[3]-Pt[3];return de*de+je*je+Re*Re+ce*ce}function Vt(Pt){var wt=Pt[0],de=Pt[1],je=Pt[2],Re=Pt[3];return Math.sqrt(wt*wt+de*de+je*je+Re*Re)}function fe(Pt){var wt=Pt[0],de=Pt[1],je=Pt[2],Re=Pt[3];return wt*wt+de*de+je*je+Re*Re}function ue(Pt,wt){return Pt[0]=-wt[0],Pt[1]=-wt[1],Pt[2]=-wt[2],Pt[3]=-wt[3],Pt}function Ce(Pt,wt){return Pt[0]=1/wt[0],Pt[1]=1/wt[1],Pt[2]=1/wt[2],Pt[3]=1/wt[3],Pt}function be(Pt,wt){var de=wt[0],je=wt[1],Re=wt[2],ce=wt[3],Le=de*de+je*je+Re*Re+ce*ce;return Le>0&&(Le=1/Math.sqrt(Le)),Pt[0]=de*Le,Pt[1]=je*Le,Pt[2]=Re*Le,Pt[3]=ce*Le,Pt}function we(Pt,wt){return Pt[0]*wt[0]+Pt[1]*wt[1]+Pt[2]*wt[2]+Pt[3]*wt[3]}function ne(Pt,wt,de,je){var Re=de[0]*je[1]-de[1]*je[0],ce=de[0]*je[2]-de[2]*je[0],Le=de[0]*je[3]-de[3]*je[0],xe=de[1]*je[2]-de[2]*je[1],Ft=de[1]*je[3]-de[3]*je[1],re=de[2]*je[3]-de[3]*je[2],Me=wt[0],O=wt[1],st=wt[2],ve=wt[3];return Pt[0]=O*re-st*Ft+ve*xe,Pt[1]=-(Me*re)+st*Le-ve*ce,Pt[2]=Me*Ft-O*Le+ve*Re,Pt[3]=-(Me*xe)+O*ce-st*Re,Pt}function We(Pt,wt,de,je){var Re=wt[0],ce=wt[1],Le=wt[2],xe=wt[3];return Pt[0]=Re+je*(de[0]-Re),Pt[1]=ce+je*(de[1]-ce),Pt[2]=Le+je*(de[2]-Le),Pt[3]=xe+je*(de[3]-xe),Pt}function rn(Pt,wt){wt=wt===void 0?1:wt;var de,je,Re,ce,Le,xe,Ft;Ft=glMatrix.RANDOM(),de=Ft*2-1,je=(4*glMatrix.RANDOM()-2)*Math.sqrt(Ft*-Ft+Ft),Le=de*de+je*je,Ft=glMatrix.RANDOM(),Re=Ft*2-1,ce=(4*glMatrix.RANDOM()-2)*Math.sqrt(Ft*-Ft+Ft),xe=Re*Re+ce*ce;var re=Math.sqrt((1-Le)/xe);return Pt[0]=wt*de,Pt[1]=wt*je,Pt[2]=wt*Re*re,Pt[3]=wt*ce*re,Pt}function Xe(Pt,wt,de){var je=wt[0],Re=wt[1],ce=wt[2],Le=wt[3];return Pt[0]=de[0]*je+de[4]*Re+de[8]*ce+de[12]*Le,Pt[1]=de[1]*je+de[5]*Re+de[9]*ce+de[13]*Le,Pt[2]=de[2]*je+de[6]*Re+de[10]*ce+de[14]*Le,Pt[3]=de[3]*je+de[7]*Re+de[11]*ce+de[15]*Le,Pt}function pn(Pt,wt,de){var je=de[0],Re=de[1],ce=de[2],Le=de[3],xe=wt[0],Ft=wt[1],re=wt[2],Me=Re*re-ce*Ft,O=ce*xe-je*re,st=je*Ft-Re*xe;return Me=Me+Me,O=O+O,st=st+st,Pt[0]=xe+Le*Me+Re*st-ce*O,Pt[1]=Ft+Le*O+ce*Me-je*st,Pt[2]=re+Le*st+je*O-Re*Me,Pt[3]=wt[3],Pt}function Tn(Pt){return Pt[0]=0,Pt[1]=0,Pt[2]=0,Pt[3]=0,Pt}function $e(Pt){return"vec4("+Pt[0]+", "+Pt[1]+", "+Pt[2]+", "+Pt[3]+")"}function mn(Pt,wt){return Pt[0]===wt[0]&&Pt[1]===wt[1]&&Pt[2]===wt[2]&&Pt[3]===wt[3]}function It(Pt,wt){var de=Pt[0],je=Pt[1],Re=Pt[2],ce=Pt[3],Le=wt[0],xe=wt[1],Ft=wt[2],re=wt[3];return Math.abs(de-Le)<=glMatrix.EPSILON*Math.max(1,Math.abs(de),Math.abs(Le))&&Math.abs(je-xe)<=glMatrix.EPSILON*Math.max(1,Math.abs(je),Math.abs(xe))&&Math.abs(Re-Ft)<=glMatrix.EPSILON*Math.max(1,Math.abs(Re),Math.abs(Ft))&&Math.abs(ce-re)<=glMatrix.EPSILON*Math.max(1,Math.abs(ce),Math.abs(re))}var Ee=null,cn=null,sn=null,Pe=null,ze=null,Ke=null,le=null,Ae=function(){var Pt=_();return function(wt,de,je,Re,ce,Le){var xe,Ft;for(de||(de=4),je||(je=0),Re?Ft=Math.min(Re*de+je,wt.length):Ft=wt.length,xe=je;xe<Ft;xe+=de)Pt[0]=wt[xe],Pt[1]=wt[xe+1],Pt[2]=wt[xe+2],Pt[3]=wt[xe+3],ce(Pt,Pt,Le),wt[xe]=Pt[0],wt[xe+1]=Pt[1],wt[xe+2]=Pt[2],wt[xe+3]=Pt[3];return wt}}()},75172:function(bt,Et,y){var c=y(89224);bt.exports={Graph:c.Graph,json:y(17401),alg:y(54613),version:c.version}},91606:function(bt,Et,y){var c=y(95329);bt.exports=_;function _(I){var z={},S=[],R;function M(N){c.has(z,N)||(z[N]=!0,R.push(N),c.each(I.successors(N),M),c.each(I.predecessors(N),M))}return c.each(I.nodes(),function(N){R=[],M(N),R.length&&S.push(R)}),S}},21482:function(bt,Et,y){var c=y(95329);bt.exports=_;function _(z,S,R){c.isArray(S)||(S=[S]);var M=(z.isDirected()?z.successors:z.neighbors).bind(z),N=[],D={};return c.each(S,function(A){if(!z.hasNode(A))throw new Error("Graph does not have node: "+A);I(z,A,R==="post",D,M,N)}),N}function I(z,S,R,M,N,D){c.has(M,S)||(M[S]=!0,R||D.push(S),c.each(N(S),function(A){I(z,A,R,M,N,D)}),R&&D.push(S))}},40845:function(bt,Et,y){var c=y(13746),_=y(95329);bt.exports=I;function I(z,S,R){return _.transform(z.nodes(),function(M,N){M[N]=c(z,N,S,R)},{})}},13746:function(bt,Et,y){var c=y(95329),_=y(36614);bt.exports=z;var I=c.constant(1);function z(R,M,N,D){return S(R,String(M),N||I,D||function(A){return R.outEdges(A)})}function S(R,M,N,D){var A={},L=new _,F,rt,G=function(kt){var ft=kt.v!==F?kt.v:kt.w,J=A[ft],Rt=N(kt),Tt=rt.distance+Rt;if(Rt<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+kt+" Weight: "+Rt);Tt<J.distance&&(J.distance=Tt,J.predecessor=F,L.decrease(ft,Tt))};for(R.nodes().forEach(function(kt){var ft=kt===M?0:Number.POSITIVE_INFINITY;A[kt]={distance:ft},L.add(kt,ft)});L.size()>0&&(F=L.removeMin(),rt=A[F],rt.distance!==Number.POSITIVE_INFINITY);)D(F).forEach(G);return A}},59324:function(bt,Et,y){var c=y(95329),_=y(94558);bt.exports=I;function I(z){return c.filter(_(z),function(S){return S.length>1||S.length===1&&z.hasEdge(S[0],S[0])})}},22893:function(bt,Et,y){var c=y(95329);bt.exports=I;var _=c.constant(1);function I(S,R,M){return z(S,R||_,M||function(N){return S.outEdges(N)})}function z(S,R,M){var N={},D=S.nodes();return D.forEach(function(A){N[A]={},N[A][A]={distance:0},D.forEach(function(L){A!==L&&(N[A][L]={distance:Number.POSITIVE_INFINITY})}),M(A).forEach(function(L){var F=L.v===A?L.w:L.v,rt=R(L);N[A][F]={distance:rt,predecessor:A}})}),D.forEach(function(A){var L=N[A];D.forEach(function(F){var rt=N[F];D.forEach(function(G){var kt=rt[A],ft=L[G],J=rt[G],Rt=kt.distance+ft.distance;Rt<J.distance&&(J.distance=Rt,J.predecessor=ft.predecessor)})})}),N}},54613:function(bt,Et,y){bt.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(bt,Et,y){var c=y(7793);bt.exports=_;function _(I){try{c(I)}catch(z){if(z instanceof c.CycleException)return!1;throw z}return!0}},98049:function(bt,Et,y){var c=y(21482);bt.exports=_;function _(I,z){return c(I,z,"post")}},67158:function(bt,Et,y){var c=y(21482);bt.exports=_;function _(I,z){return c(I,z,"pre")}},66058:function(bt,Et,y){var c=y(95329),_=y(6349),I=y(36614);bt.exports=z;function z(S,R){var M=new _,N={},D=new I,A;function L(rt){var G=rt.v===A?rt.w:rt.v,kt=D.priority(G);if(kt!==void 0){var ft=R(rt);ft<kt&&(N[G]=A,D.decrease(G,ft))}}if(S.nodeCount()===0)return M;c.each(S.nodes(),function(rt){D.add(rt,Number.POSITIVE_INFINITY),M.setNode(rt)}),D.decrease(S.nodes()[0],0);for(var F=!1;D.size()>0;){if(A=D.removeMin(),c.has(N,A))M.setEdge(A,N[A]);else{if(F)throw new Error("Input graph is not connected: "+S);F=!0}S.nodeEdges(A).forEach(L)}return M}},94558:function(bt,Et,y){var c=y(95329);bt.exports=_;function _(I){var z=0,S=[],R={},M=[];function N(D){var A=R[D]={onStack:!0,lowlink:z,index:z++};if(S.push(D),I.successors(D).forEach(function(rt){c.has(R,rt)?R[rt].onStack&&(A.lowlink=Math.min(A.lowlink,R[rt].index)):(N(rt),A.lowlink=Math.min(A.lowlink,R[rt].lowlink))}),A.lowlink===A.index){var L=[],F;do F=S.pop(),R[F].onStack=!1,L.push(F);while(D!==F);M.push(L)}}return I.nodes().forEach(function(D){c.has(R,D)||N(D)}),M}},7793:function(bt,Et,y){var c=y(95329);bt.exports=_,_.CycleException=I;function _(z){var S={},R={},M=[];function N(D){if(c.has(R,D))throw new I;c.has(S,D)||(R[D]=!0,S[D]=!0,c.each(z.predecessors(D),N),delete R[D],M.push(D))}if(c.each(z.sinks(),N),c.size(S)!==z.nodeCount())throw new I;return M}function I(){}I.prototype=new Error},36614:function(bt,Et,y){var c=y(95329);bt.exports=_;function _(){this._arr=[],this._keyIndices={}}_.prototype.size=function(){return this._arr.length},_.prototype.keys=function(){return this._arr.map(function(I){return I.key})},_.prototype.has=function(I){return c.has(this._keyIndices,I)},_.prototype.priority=function(I){var z=this._keyIndices[I];if(z!==void 0)return this._arr[z].priority},_.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},_.prototype.add=function(I,z){var S=this._keyIndices;if(I=String(I),!c.has(S,I)){var R=this._arr,M=R.length;return S[I]=M,R.push({key:I,priority:z}),this._decrease(M),!0}return!1},_.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var I=this._arr.pop();return delete this._keyIndices[I.key],this._heapify(0),I.key},_.prototype.decrease=function(I,z){var S=this._keyIndices[I];if(z>this._arr[S].priority)throw new Error("New priority is greater than current priority. Key: "+I+" Old: "+this._arr[S].priority+" New: "+z);this._arr[S].priority=z,this._decrease(S)},_.prototype._heapify=function(I){var z=this._arr,S=2*I,R=S+1,M=I;S<z.length&&(M=z[S].priority<z[M].priority?S:M,R<z.length&&(M=z[R].priority<z[M].priority?R:M),M!==I&&(this._swap(I,M),this._heapify(M)))},_.prototype._decrease=function(I){for(var z=this._arr,S=z[I].priority,R;I!==0&&(R=I>>1,!(z[R].priority<S));)this._swap(I,R),I=R},_.prototype._swap=function(I,z){var S=this._arr,R=this._keyIndices,M=S[I],N=S[z];S[I]=N,S[z]=M,R[N.key]=I,R[M.key]=z}},6349:function(bt,Et,y){"use strict";var c=y(95329);bt.exports=S;var _="\0",I="\0",z="";function S(L){this._isDirected=c.has(L,"directed")?L.directed:!0,this._isMultigraph=c.has(L,"multigraph")?L.multigraph:!1,this._isCompound=c.has(L,"compound")?L.compound:!1,this._label=void 0,this._defaultNodeLabelFn=c.constant(void 0),this._defaultEdgeLabelFn=c.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[I]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}S.prototype._nodeCount=0,S.prototype._edgeCount=0,S.prototype.isDirected=function(){return this._isDirected},S.prototype.isMultigraph=function(){return this._isMultigraph},S.prototype.isCompound=function(){return this._isCompound},S.prototype.setGraph=function(L){return this._label=L,this},S.prototype.graph=function(){return this._label},S.prototype.setDefaultNodeLabel=function(L){return c.isFunction(L)||(L=c.constant(L)),this._defaultNodeLabelFn=L,this},S.prototype.nodeCount=function(){return this._nodeCount},S.prototype.nodes=function(){return c.keys(this._nodes)},S.prototype.sources=function(){var L=this;return c.filter(this.nodes(),function(F){return c.isEmpty(L._in[F])})},S.prototype.sinks=function(){var L=this;return c.filter(this.nodes(),function(F){return c.isEmpty(L._out[F])})},S.prototype.setNodes=function(L,F){var rt=arguments,G=this;return c.each(L,function(kt){rt.length>1?G.setNode(kt,F):G.setNode(kt)}),this},S.prototype.setNode=function(L,F){return c.has(this._nodes,L)?(arguments.length>1&&(this._nodes[L]=F),this):(this._nodes[L]=arguments.length>1?F:this._defaultNodeLabelFn(L),this._isCompound&&(this._parent[L]=I,this._children[L]={},this._children[I][L]=!0),this._in[L]={},this._preds[L]={},this._out[L]={},this._sucs[L]={},++this._nodeCount,this)},S.prototype.node=function(L){return this._nodes[L]},S.prototype.hasNode=function(L){return c.has(this._nodes,L)},S.prototype.removeNode=function(L){var F=this;if(c.has(this._nodes,L)){var rt=function(G){F.removeEdge(F._edgeObjs[G])};delete this._nodes[L],this._isCompound&&(this._removeFromParentsChildList(L),delete this._parent[L],c.each(this.children(L),function(G){F.setParent(G)}),delete this._children[L]),c.each(c.keys(this._in[L]),rt),delete this._in[L],delete this._preds[L],c.each(c.keys(this._out[L]),rt),delete this._out[L],delete this._sucs[L],--this._nodeCount}return this},S.prototype.setParent=function(L,F){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(c.isUndefined(F))F=I;else{F+="";for(var rt=F;!c.isUndefined(rt);rt=this.parent(rt))if(rt===L)throw new Error("Setting "+F+" as parent of "+L+" would create a cycle");this.setNode(F)}return this.setNode(L),this._removeFromParentsChildList(L),this._parent[L]=F,this._children[F][L]=!0,this},S.prototype._removeFromParentsChildList=function(L){delete this._children[this._parent[L]][L]},S.prototype.parent=function(L){if(this._isCompound){var F=this._parent[L];if(F!==I)return F}},S.prototype.children=function(L){if(c.isUndefined(L)&&(L=I),this._isCompound){var F=this._children[L];if(F)return c.keys(F)}else{if(L===I)return this.nodes();if(this.hasNode(L))return[]}},S.prototype.predecessors=function(L){var F=this._preds[L];if(F)return c.keys(F)},S.prototype.successors=function(L){var F=this._sucs[L];if(F)return c.keys(F)},S.prototype.neighbors=function(L){var F=this.predecessors(L);if(F)return c.union(F,this.successors(L))},S.prototype.isLeaf=function(L){var F;return this.isDirected()?F=this.successors(L):F=this.neighbors(L),F.length===0},S.prototype.filterNodes=function(L){var F=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});F.setGraph(this.graph());var rt=this;c.each(this._nodes,function(ft,J){L(J)&&F.setNode(J,ft)}),c.each(this._edgeObjs,function(ft){F.hasNode(ft.v)&&F.hasNode(ft.w)&&F.setEdge(ft,rt.edge(ft))});var G={};function kt(ft){var J=rt.parent(ft);return J===void 0||F.hasNode(J)?(G[ft]=J,J):J in G?G[J]:kt(J)}return this._isCompound&&c.each(F.nodes(),function(ft){F.setParent(ft,kt(ft))}),F},S.prototype.setDefaultEdgeLabel=function(L){return c.isFunction(L)||(L=c.constant(L)),this._defaultEdgeLabelFn=L,this},S.prototype.edgeCount=function(){return this._edgeCount},S.prototype.edges=function(){return c.values(this._edgeObjs)},S.prototype.setPath=function(L,F){var rt=this,G=arguments;return c.reduce(L,function(kt,ft){return G.length>1?rt.setEdge(kt,ft,F):rt.setEdge(kt,ft),ft}),this},S.prototype.setEdge=function(){var L,F,rt,G,kt=!1,ft=arguments[0];typeof ft=="object"&&ft!==null&&"v"in ft?(L=ft.v,F=ft.w,rt=ft.name,arguments.length===2&&(G=arguments[1],kt=!0)):(L=ft,F=arguments[1],rt=arguments[3],arguments.length>2&&(G=arguments[2],kt=!0)),L=""+L,F=""+F,c.isUndefined(rt)||(rt=""+rt);var J=N(this._isDirected,L,F,rt);if(c.has(this._edgeLabels,J))return kt&&(this._edgeLabels[J]=G),this;if(!c.isUndefined(rt)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(L),this.setNode(F),this._edgeLabels[J]=kt?G:this._defaultEdgeLabelFn(L,F,rt);var Rt=D(this._isDirected,L,F,rt);return L=Rt.v,F=Rt.w,Object.freeze(Rt),this._edgeObjs[J]=Rt,R(this._preds[F],L),R(this._sucs[L],F),this._in[F][J]=Rt,this._out[L][J]=Rt,this._edgeCount++,this},S.prototype.edge=function(L,F,rt){var G=arguments.length===1?A(this._isDirected,arguments[0]):N(this._isDirected,L,F,rt);return this._edgeLabels[G]},S.prototype.hasEdge=function(L,F,rt){var G=arguments.length===1?A(this._isDirected,arguments[0]):N(this._isDirected,L,F,rt);return c.has(this._edgeLabels,G)},S.prototype.removeEdge=function(L,F,rt){var G=arguments.length===1?A(this._isDirected,arguments[0]):N(this._isDirected,L,F,rt),kt=this._edgeObjs[G];return kt&&(L=kt.v,F=kt.w,delete this._edgeLabels[G],delete this._edgeObjs[G],M(this._preds[F],L),M(this._sucs[L],F),delete this._in[F][G],delete this._out[L][G],this._edgeCount--),this},S.prototype.inEdges=function(L,F){var rt=this._in[L];if(rt){var G=c.values(rt);return F?c.filter(G,function(kt){return kt.v===F}):G}},S.prototype.outEdges=function(L,F){var rt=this._out[L];if(rt){var G=c.values(rt);return F?c.filter(G,function(kt){return kt.w===F}):G}},S.prototype.nodeEdges=function(L,F){var rt=this.inEdges(L,F);if(rt)return rt.concat(this.outEdges(L,F))};function R(L,F){L[F]?L[F]++:L[F]=1}function M(L,F){--L[F]||delete L[F]}function N(L,F,rt,G){var kt=""+F,ft=""+rt;if(!L&&kt>ft){var J=kt;kt=ft,ft=J}return kt+z+ft+z+(c.isUndefined(G)?_:G)}function D(L,F,rt,G){var kt=""+F,ft=""+rt;if(!L&&kt>ft){var J=kt;kt=ft,ft=J}var Rt={v:kt,w:ft};return G&&(Rt.name=G),Rt}function A(L,F){return N(L,F.v,F.w,F.name)}},89224:function(bt,Et,y){bt.exports={Graph:y(6349),version:y(16544)}},17401:function(bt,Et,y){var c=y(95329),_=y(6349);bt.exports={write:I,read:R};function I(M){var N={options:{directed:M.isDirected(),multigraph:M.isMultigraph(),compound:M.isCompound()},nodes:z(M),edges:S(M)};return c.isUndefined(M.graph())||(N.value=c.clone(M.graph())),N}function z(M){return c.map(M.nodes(),function(N){var D=M.node(N),A=M.parent(N),L={v:N};return c.isUndefined(D)||(L.value=D),c.isUndefined(A)||(L.parent=A),L})}function S(M){return c.map(M.edges(),function(N){var D=M.edge(N),A={v:N.v,w:N.w};return c.isUndefined(N.name)||(A.name=N.name),c.isUndefined(D)||(A.value=D),A})}function R(M){var N=new _(M.options).setGraph(M.value);return c.each(M.nodes,function(D){N.setNode(D.v,D.value),D.parent&&N.setParent(D.v,D.parent)}),c.each(M.edges,function(D){N.setEdge({v:D.v,w:D.w,name:D.name},D.value)}),N}},95329:function(bt,Et,y){var c;try{c={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(_){}c||(c=window._),bt.exports=c},16544:function(bt){bt.exports="2.1.8"},34634:function(bt,Et,y){"use strict";y.r(Et),y.d(Et,{isAnyArray:function(){return _}});const c=Object.prototype.toString;function _(I){const z=c.call(I);return z.endsWith("Array]")&&!z.includes("Big")}},55973:function(bt){bt.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(bt,Et,y){var c=y(73893),_=y(33152),I=c(_,"DataView");bt.exports=I},97288:function(bt,Et,y){var c=y(73893),_=y(33152),I=c(_,"Promise");bt.exports=I},23599:function(bt,Et,y){var c=y(73893),_=y(33152),I=c(_,"Set");bt.exports=I},98924:function(bt,Et,y){var c=y(52166),_=y(34776),I=y(40393);function z(S){var R=-1,M=S==null?0:S.length;for(this.__data__=new c;++R<M;)this.add(S[R])}z.prototype.add=z.prototype.push=_,z.prototype.has=I,bt.exports=z},26873:function(bt,Et,y){var c=y(73893),_=y(33152),I=c(_,"WeakMap");bt.exports=I},74809:function(bt){function Et(y,c){for(var _=-1,I=y==null?0:y.length;++_<I&&c(y[_],_,y)!==!1;);return y}bt.exports=Et},86952:function(bt){function Et(y,c){for(var _=-1,I=y==null?0:y.length,z=0,S=[];++_<I;){var R=y[_];c(R,_,y)&&(S[z++]=R)}return S}bt.exports=Et},84271:function(bt,Et,y){var c=y(17424);function _(I,z){var S=I==null?0:I.length;return!!S&&c(I,z,0)>-1}bt.exports=_},94874:function(bt){function Et(y,c,_){for(var I=-1,z=y==null?0:y.length;++I<z;)if(_(c,y[I]))return!0;return!1}bt.exports=Et},75010:function(bt){function Et(y,c){for(var _=-1,I=y==null?0:y.length,z=Array(I);++_<I;)z[_]=c(y[_],_,y);return z}bt.exports=Et},57095:function(bt){function Et(y,c){for(var _=-1,I=c.length,z=y.length;++_<I;)y[z+_]=c[_];return y}bt.exports=Et},99861:function(bt){function Et(y,c,_,I){var z=-1,S=y==null?0:y.length;for(I&&S&&(_=y[++z]);++z<S;)_=c(_,y[z],z,y);return _}bt.exports=Et},64045:function(bt){function Et(y,c){for(var _=-1,I=y==null?0:y.length;++_<I;)if(c(y[_],_,y))return!0;return!1}bt.exports=Et},26539:function(bt,Et,y){var c=y(22310),_=c("length");bt.exports=_},91937:function(bt,Et,y){var c=y(95378),_=y(55451);function I(z,S){return z&&c(S,_(S),z)}bt.exports=I},26680:function(bt,Et,y){var c=y(95378),_=y(56730);function I(z,S){return z&&c(S,_(S),z)}bt.exports=I},99045:function(bt,Et,y){var c=y(91866),_=y(74809),I=y(60348),z=y(91937),S=y(26680),R=y(32315),M=y(47760),N=y(15168),D=y(71678),A=y(12076),L=y(22675),F=y(66139),rt=y(79264),G=y(97541),kt=y(4084),ft=y(80744),J=y(57835),Rt=y(41626),Tt=y(20816),Vt=y(65226),fe=y(55451),ue=y(56730),Ce=1,be=2,we=4,ne="[object Arguments]",We="[object Array]",rn="[object Boolean]",Xe="[object Date]",pn="[object Error]",Tn="[object Function]",$e="[object GeneratorFunction]",mn="[object Map]",It="[object Number]",Ee="[object Object]",cn="[object RegExp]",sn="[object Set]",Pe="[object String]",ze="[object Symbol]",Ke="[object WeakMap]",le="[object ArrayBuffer]",Ae="[object DataView]",Pt="[object Float32Array]",wt="[object Float64Array]",de="[object Int8Array]",je="[object Int16Array]",Re="[object Int32Array]",ce="[object Uint8Array]",Le="[object Uint8ClampedArray]",xe="[object Uint16Array]",Ft="[object Uint32Array]",re={};re[ne]=re[We]=re[le]=re[Ae]=re[rn]=re[Xe]=re[Pt]=re[wt]=re[de]=re[je]=re[Re]=re[mn]=re[It]=re[Ee]=re[cn]=re[sn]=re[Pe]=re[ze]=re[ce]=re[Le]=re[xe]=re[Ft]=!0,re[pn]=re[Tn]=re[Ke]=!1;function Me(O,st,ve,$t,Ie,Ne){var tn,Mt=st&Ce,q=st&be,Ct=st&we;if(ve&&(tn=Ie?ve(O,$t,Ie,Ne):ve(O)),tn!==void 0)return tn;if(!Tt(O))return O;var Ht=ft(O);if(Ht){if(tn=rt(O),!Mt)return M(O,tn)}else{var Lt=F(O),_t=Lt==Tn||Lt==$e;if(J(O))return R(O,Mt);if(Lt==Ee||Lt==ne||_t&&!Ie){if(tn=q||_t?{}:kt(O),!Mt)return q?D(O,S(tn,O)):N(O,z(tn,O))}else{if(!re[Lt])return Ie?O:{};tn=G(O,Lt,Mt)}}Ne||(Ne=new c);var Ut=Ne.get(O);if(Ut)return Ut;Ne.set(O,tn),Vt(O)?O.forEach(function(te){tn.add(Me(te,st,ve,te,O,Ne))}):Rt(O)&&O.forEach(function(te,ke){tn.set(ke,Me(te,st,ve,ke,O,Ne))});var qt=Ct?q?L:A:q?ue:fe,se=Ht?void 0:qt(O);return _(se||O,function(te,ke){se&&(ke=te,te=O[ke]),I(tn,ke,Me(te,st,ve,ke,O,Ne))}),tn}bt.exports=Me},44107:function(bt,Et,y){var c=y(85605),_=y(49164),I=_(c);bt.exports=I},2659:function(bt,Et,y){var c=y(45029);function _(I,z,S){for(var R=-1,M=I.length;++R<M;){var N=I[R],D=z(N);if(D!=null&&(A===void 0?D===D&&!c(D):S(D,A)))var A=D,L=N}return L}bt.exports=_},32872:function(bt,Et,y){var c=y(44107);function _(I,z){var S=[];return c(I,function(R,M,N){z(R,M,N)&&S.push(R)}),S}bt.exports=_},51533:function(bt){function Et(y,c,_,I){for(var z=y.length,S=_+(I?1:-1);I?S--:++S<z;)if(c(y[S],S,y))return S;return-1}bt.exports=Et},9256:function(bt,Et,y){var c=y(57095),_=y(88133);function I(z,S,R,M,N){var D=-1,A=z.length;for(R||(R=_),N||(N=[]);++D<A;){var L=z[D];S>0&&R(L)?S>1?I(L,S-1,R,M,N):c(N,L):M||(N[N.length]=L)}return N}bt.exports=I},85605:function(bt,Et,y){var c=y(14018),_=y(55451);function I(z,S){return z&&c(z,S,_)}bt.exports=I},89147:function(bt,Et,y){var c=y(1186),_=y(9171);function I(z,S){S=c(S,z);for(var R=0,M=S.length;z!=null&&R<M;)z=z[_(S[R++])];return R&&R==M?z:void 0}bt.exports=I},75635:function(bt,Et,y){var c=y(57095),_=y(80744);function I(z,S,R){var M=S(z);return _(z)?M:c(M,R(z))}bt.exports=I},40302:function(bt){function Et(y,c){return y>c}bt.exports=Et},3251:function(bt){var Et=Object.prototype,y=Et.hasOwnProperty;function c(_,I){return _!=null&&y.call(_,I)}bt.exports=c},62348:function(bt){function Et(y,c){return y!=null&&c in Object(y)}bt.exports=Et},17424:function(bt,Et,y){var c=y(51533),_=y(8373),I=y(49237);function z(S,R,M){return R===R?I(S,R,M):c(S,_,M)}bt.exports=z},77295:function(bt,Et,y){var c=y(84412),_=y(93913);function I(z,S,R,M,N){return z===S?!0:z==null||S==null||!_(z)&&!_(S)?z!==z&&S!==S:c(z,S,R,M,I,N)}bt.exports=I},84412:function(bt,Et,y){var c=y(91866),_=y(50401),I=y(57710),z=y(4983),S=y(66139),R=y(80744),M=y(57835),N=y(18397),D=1,A="[object Arguments]",L="[object Array]",F="[object Object]",rt=Object.prototype,G=rt.hasOwnProperty;function kt(ft,J,Rt,Tt,Vt,fe){var ue=R(ft),Ce=R(J),be=ue?L:S(ft),we=Ce?L:S(J);be=be==A?F:be,we=we==A?F:we;var ne=be==F,We=we==F,rn=be==we;if(rn&&M(ft)){if(!M(J))return!1;ue=!0,ne=!1}if(rn&&!ne)return fe||(fe=new c),ue||N(ft)?_(ft,J,Rt,Tt,Vt,fe):I(ft,J,be,Rt,Tt,Vt,fe);if(!(Rt&D)){var Xe=ne&&G.call(ft,"__wrapped__"),pn=We&&G.call(J,"__wrapped__");if(Xe||pn){var Tn=Xe?ft.value():ft,$e=pn?J.value():J;return fe||(fe=new c),Vt(Tn,$e,Rt,Tt,fe)}}return rn?(fe||(fe=new c),z(ft,J,Rt,Tt,Vt,fe)):!1}bt.exports=kt},55005:function(bt,Et,y){var c=y(66139),_=y(93913),I="[object Map]";function z(S){return _(S)&&c(S)==I}bt.exports=z},51524:function(bt,Et,y){var c=y(91866),_=y(77295),I=1,z=2;function S(R,M,N,D){var A=N.length,L=A,F=!D;if(R==null)return!L;for(R=Object(R);A--;){var rt=N[A];if(F&&rt[2]?rt[1]!==R[rt[0]]:!(rt[0]in R))return!1}for(;++A<L;){rt=N[A];var G=rt[0],kt=R[G],ft=rt[1];if(F&&rt[2]){if(kt===void 0&&!(G in R))return!1}else{var J=new c;if(D)var Rt=D(kt,ft,G,R,M,J);if(!(Rt===void 0?_(ft,kt,I|z,D,J):Rt))return!1}}return!0}bt.exports=S},8373:function(bt){function Et(y){return y!==y}bt.exports=Et},38652:function(bt,Et,y){var c=y(66139),_=y(93913),I="[object Set]";function z(S){return _(S)&&c(S)==I}bt.exports=z},95979:function(bt,Et,y){var c=y(17632),_=y(38933),I=y(46962),z=y(80744),S=y(35769);function R(M){return typeof M=="function"?M:M==null?I:typeof M=="object"?z(M)?_(M[0],M[1]):c(M):S(M)}bt.exports=R},6019:function(bt,Et,y){var c=y(7975),_=y(23730),I=Object.prototype,z=I.hasOwnProperty;function S(R){if(!c(R))return _(R);var M=[];for(var N in Object(R))z.call(R,N)&&N!="constructor"&&M.push(N);return M}bt.exports=S},93757:function(bt){function Et(y,c){return y<c}bt.exports=Et},65487:function(bt,Et,y){var c=y(44107),_=y(24665);function I(z,S){var R=-1,M=_(z)?Array(z.length):[];return c(z,function(N,D,A){M[++R]=S(N,D,A)}),M}bt.exports=I},17632:function(bt,Et,y){var c=y(51524),_=y(10261),I=y(24122);function z(S){var R=_(S);return R.length==1&&R[0][2]?I(R[0][0],R[0][1]):function(M){return M===S||c(M,S,R)}}bt.exports=z},38933:function(bt,Et,y){var c=y(77295),_=y(44231),I=y(37879),z=y(86773),S=y(88411),R=y(24122),M=y(9171),N=1,D=2;function A(L,F){return z(L)&&S(F)?R(M(L),F):function(rt){var G=_(rt,L);return G===void 0&&G===F?I(rt,L):c(F,G,N|D)}}bt.exports=A},58506:function(bt,Et,y){var c=y(75010),_=y(89147),I=y(95979),z=y(65487),S=y(33065),R=y(38342),M=y(11249),N=y(46962),D=y(80744);function A(L,F,rt){F.length?F=c(F,function(ft){return D(ft)?function(J){return _(J,ft.length===1?ft[0]:ft)}:ft}):F=[N];var G=-1;F=c(F,R(I));var kt=z(L,function(ft,J,Rt){var Tt=c(F,function(Vt){return Vt(ft)});return{criteria:Tt,index:++G,value:ft}});return S(kt,function(ft,J){return M(ft,J,rt)})}bt.exports=A},88832:function(bt,Et,y){var c=y(10867),_=y(37879);function I(z,S){return c(z,S,function(R,M){return _(z,M)})}bt.exports=I},10867:function(bt,Et,y){var c=y(89147),_=y(36897),I=y(1186);function z(S,R,M){for(var N=-1,D=R.length,A={};++N<D;){var L=R[N],F=c(S,L);M(F,L)&&_(A,I(L,S),F)}return A}bt.exports=z},22310:function(bt){function Et(y){return function(c){return c==null?void 0:c[y]}}bt.exports=Et},96916:function(bt,Et,y){var c=y(89147);function _(I){return function(z){return c(z,I)}}bt.exports=_},36121:function(bt){var Et=Math.ceil,y=Math.max;function c(_,I,z,S){for(var R=-1,M=y(Et((I-_)/(z||1)),0),N=Array(M);M--;)N[S?M:++R]=_,_+=z;return N}bt.exports=c},30739:function(bt){function Et(y,c,_,I,z){return z(y,function(S,R,M){_=I?(I=!1,S):c(_,S,R,M)}),_}bt.exports=Et},36897:function(bt,Et,y){var c=y(60348),_=y(1186),I=y(70213),z=y(20816),S=y(9171);function R(M,N,D,A){if(!z(M))return M;N=_(N,M);for(var L=-1,F=N.length,rt=F-1,G=M;G!=null&&++L<F;){var kt=S(N[L]),ft=D;if(kt==="__proto__"||kt==="constructor"||kt==="prototype")return M;if(L!=rt){var J=G[kt];ft=A?A(J,kt,G):void 0,ft===void 0&&(ft=z(J)?J:I(N[L+1])?[]:{})}c(G,kt,ft),G=G[kt]}return M}bt.exports=R},33065:function(bt){function Et(y,c){var _=y.length;for(y.sort(c);_--;)y[_]=y[_].value;return y}bt.exports=Et},50230:function(bt,Et,y){var c=y(91869),_=y(75010),I=y(80744),z=y(45029),S=1/0,R=c?c.prototype:void 0,M=R?R.toString:void 0;function N(D){if(typeof D=="string")return D;if(I(D))return _(D,N)+"";if(z(D))return M?M.call(D):"";var A=D+"";return A=="0"&&1/D==-S?"-0":A}bt.exports=N},13927:function(bt,Et,y){var c=y(15333),_=/^\s+/;function I(z){return z&&z.slice(0,c(z)+1).replace(_,"")}bt.exports=I},29098:function(bt,Et,y){var c=y(98924),_=y(84271),I=y(94874),z=y(1931),S=y(47506),R=y(79679),M=200;function N(D,A,L){var F=-1,rt=_,G=D.length,kt=!0,ft=[],J=ft;if(L)kt=!1,rt=I;else if(G>=M){var Rt=A?null:S(D);if(Rt)return R(Rt);kt=!1,rt=z,J=new c}else J=A?[]:ft;t:for(;++F<G;){var Tt=D[F],Vt=A?A(Tt):Tt;if(Tt=L||Tt!==0?Tt:0,kt&&Vt===Vt){for(var fe=J.length;fe--;)if(J[fe]===Vt)continue t;A&&J.push(Vt),ft.push(Tt)}else rt(J,Vt,L)||(J!==ft&&J.push(Vt),ft.push(Tt))}return ft}bt.exports=N},20720:function(bt,Et,y){var c=y(75010);function _(I,z){return c(z,function(S){return I[S]})}bt.exports=_},94484:function(bt){function Et(y,c,_){for(var I=-1,z=y.length,S=c.length,R={};++I<z;){var M=I<S?c[I]:void 0;_(R,y[I],M)}return R}bt.exports=Et},1931:function(bt){function Et(y,c){return y.has(c)}bt.exports=Et},11756:function(bt,Et,y){var c=y(46962);function _(I){return typeof I=="function"?I:c}bt.exports=_},1186:function(bt,Et,y){var c=y(80744),_=y(86773),I=y(40493),z=y(44140);function S(R,M){return c(R)?R:_(R,M)?[R]:I(z(R))}bt.exports=S},27984:function(bt,Et,y){var c=y(20188);function _(I,z){var S=z?c(I.buffer):I.buffer;return new I.constructor(S,I.byteOffset,I.byteLength)}bt.exports=_},78583:function(bt){var Et=/\w*$/;function y(c){var _=new c.constructor(c.source,Et.exec(c));return _.lastIndex=c.lastIndex,_}bt.exports=y},28757:function(bt,Et,y){var c=y(91869),_=c?c.prototype:void 0,I=_?_.valueOf:void 0;function z(S){return I?Object(I.call(S)):{}}bt.exports=z},83018:function(bt,Et,y){var c=y(45029);function _(I,z){if(I!==z){var S=I!==void 0,R=I===null,M=I===I,N=c(I),D=z!==void 0,A=z===null,L=z===z,F=c(z);if(!A&&!F&&!N&&I>z||N&&D&&L&&!A&&!F||R&&D&&L||!S&&L||!M)return 1;if(!R&&!N&&!F&&I<z||F&&S&&M&&!R&&!N||A&&S&&M||!D&&M||!L)return-1}return 0}bt.exports=_},11249:function(bt,Et,y){var c=y(83018);function _(I,z,S){for(var R=-1,M=I.criteria,N=z.criteria,D=M.length,A=S.length;++R<D;){var L=c(M[R],N[R]);if(L){if(R>=A)return L;var F=S[R];return L*(F=="desc"?-1:1)}}return I.index-z.index}bt.exports=_},15168:function(bt,Et,y){var c=y(95378),_=y(58966);function I(z,S){return c(z,_(z),S)}bt.exports=I},71678:function(bt,Et,y){var c=y(95378),_=y(66817);function I(z,S){return c(z,_(z),S)}bt.exports=I},49164:function(bt,Et,y){var c=y(24665);function _(I,z){return function(S,R){if(S==null)return S;if(!c(S))return I(S,R);for(var M=S.length,N=z?M:-1,D=Object(S);(z?N--:++N<M)&&R(D[N],N,D)!==!1;);return S}}bt.exports=_},19554:function(bt,Et,y){var c=y(95979),_=y(24665),I=y(55451);function z(S){return function(R,M,N){var D=Object(R);if(!_(R)){var A=c(M,3);R=I(R),M=function(F){return A(D[F],F,D)}}var L=S(R,M,N);return L>-1?D[A?R[L]:L]:void 0}}bt.exports=z},76106:function(bt,Et,y){var c=y(36121),_=y(8138),I=y(97341);function z(S){return function(R,M,N){return N&&typeof N!="number"&&_(R,M,N)&&(M=N=void 0),R=I(R),M===void 0?(M=R,R=0):M=I(M),N=N===void 0?R<M?1:-1:I(N),c(R,M,N,S)}}bt.exports=z},47506:function(bt,Et,y){var c=y(23599),_=y(9958),I=y(79679),z=1/0,S=c&&1/I(new c([,-0]))[1]==z?function(R){return new c(R)}:_;bt.exports=S},50401:function(bt,Et,y){var c=y(98924),_=y(64045),I=y(1931),z=1,S=2;function R(M,N,D,A,L,F){var rt=D&z,G=M.length,kt=N.length;if(G!=kt&&!(rt&&kt>G))return!1;var ft=F.get(M),J=F.get(N);if(ft&&J)return ft==N&&J==M;var Rt=-1,Tt=!0,Vt=D&S?new c:void 0;for(F.set(M,N),F.set(N,M);++Rt<G;){var fe=M[Rt],ue=N[Rt];if(A)var Ce=rt?A(ue,fe,Rt,N,M,F):A(fe,ue,Rt,M,N,F);if(Ce!==void 0){if(Ce)continue;Tt=!1;break}if(Vt){if(!_(N,function(be,we){if(!I(Vt,we)&&(fe===be||L(fe,be,D,A,F)))return Vt.push(we)})){Tt=!1;break}}else if(!(fe===ue||L(fe,ue,D,A,F))){Tt=!1;break}}return F.delete(M),F.delete(N),Tt}bt.exports=R},57710:function(bt,Et,y){var c=y(91869),_=y(77945),I=y(43607),z=y(50401),S=y(83383),R=y(79679),M=1,N=2,D="[object Boolean]",A="[object Date]",L="[object Error]",F="[object Map]",rt="[object Number]",G="[object RegExp]",kt="[object Set]",ft="[object String]",J="[object Symbol]",Rt="[object ArrayBuffer]",Tt="[object DataView]",Vt=c?c.prototype:void 0,fe=Vt?Vt.valueOf:void 0;function ue(Ce,be,we,ne,We,rn,Xe){switch(we){case Tt:if(Ce.byteLength!=be.byteLength||Ce.byteOffset!=be.byteOffset)return!1;Ce=Ce.buffer,be=be.buffer;case Rt:return!(Ce.byteLength!=be.byteLength||!rn(new _(Ce),new _(be)));case D:case A:case rt:return I(+Ce,+be);case L:return Ce.name==be.name&&Ce.message==be.message;case G:case ft:return Ce==be+"";case F:var pn=S;case kt:var Tn=ne&M;if(pn||(pn=R),Ce.size!=be.size&&!Tn)return!1;var $e=Xe.get(Ce);if($e)return $e==be;ne|=N,Xe.set(Ce,be);var mn=z(pn(Ce),pn(be),ne,We,rn,Xe);return Xe.delete(Ce),mn;case J:if(fe)return fe.call(Ce)==fe.call(be)}return!1}bt.exports=ue},4983:function(bt,Et,y){var c=y(12076),_=1,I=Object.prototype,z=I.hasOwnProperty;function S(R,M,N,D,A,L){var F=N&_,rt=c(R),G=rt.length,kt=c(M),ft=kt.length;if(G!=ft&&!F)return!1;for(var J=G;J--;){var Rt=rt[J];if(!(F?Rt in M:z.call(M,Rt)))return!1}var Tt=L.get(R),Vt=L.get(M);if(Tt&&Vt)return Tt==M&&Vt==R;var fe=!0;L.set(R,M),L.set(M,R);for(var ue=F;++J<G;){Rt=rt[J];var Ce=R[Rt],be=M[Rt];if(D)var we=F?D(be,Ce,Rt,M,R,L):D(Ce,be,Rt,R,M,L);if(!(we===void 0?Ce===be||A(Ce,be,N,D,L):we)){fe=!1;break}ue||(ue=Rt=="constructor")}if(fe&&!ue){var ne=R.constructor,We=M.constructor;ne!=We&&"constructor"in R&&"constructor"in M&&!(typeof ne=="function"&&ne instanceof ne&&typeof We=="function"&&We instanceof We)&&(fe=!1)}return L.delete(R),L.delete(M),fe}bt.exports=S},522:function(bt,Et,y){var c=y(40151),_=y(19652),I=y(71152);function z(S){return I(_(S,void 0,c),S+"")}bt.exports=z},12076:function(bt,Et,y){var c=y(75635),_=y(58966),I=y(55451);function z(S){return c(S,I,_)}bt.exports=z},22675:function(bt,Et,y){var c=y(75635),_=y(66817),I=y(56730);function z(S){return c(S,I,_)}bt.exports=z},10261:function(bt,Et,y){var c=y(88411),_=y(55451);function I(z){for(var S=_(z),R=S.length;R--;){var M=S[R],N=z[M];S[R]=[M,N,c(N)]}return S}bt.exports=I},58966:function(bt,Et,y){var c=y(86952),_=y(4134),I=Object.prototype,z=I.propertyIsEnumerable,S=Object.getOwnPropertySymbols,R=S?function(M){return M==null?[]:(M=Object(M),c(S(M),function(N){return z.call(M,N)}))}:_;bt.exports=R},66817:function(bt,Et,y){var c=y(57095),_=y(49217),I=y(58966),z=y(4134),S=Object.getOwnPropertySymbols,R=S?function(M){for(var N=[];M;)c(N,I(M)),M=_(M);return N}:z;bt.exports=R},66139:function(bt,Et,y){var c=y(15584),_=y(40164),I=y(97288),z=y(23599),S=y(26873),R=y(86756),M=y(63256),N="[object Map]",D="[object Object]",A="[object Promise]",L="[object Set]",F="[object WeakMap]",rt="[object DataView]",G=M(c),kt=M(_),ft=M(I),J=M(z),Rt=M(S),Tt=R;(c&&Tt(new c(new ArrayBuffer(1)))!=rt||_&&Tt(new _)!=N||I&&Tt(I.resolve())!=A||z&&Tt(new z)!=L||S&&Tt(new S)!=F)&&(Tt=function(Vt){var fe=R(Vt),ue=fe==D?Vt.constructor:void 0,Ce=ue?M(ue):"";if(Ce)switch(Ce){case G:return rt;case kt:return N;case ft:return A;case J:return L;case Rt:return F}return fe}),bt.exports=Tt},63100:function(bt,Et,y){var c=y(1186),_=y(13053),I=y(80744),z=y(70213),S=y(11156),R=y(9171);function M(N,D,A){D=c(D,N);for(var L=-1,F=D.length,rt=!1;++L<F;){var G=R(D[L]);if(!(rt=N!=null&&A(N,G)))break;N=N[G]}return rt||++L!=F?rt:(F=N==null?0:N.length,!!F&&S(F)&&z(G,F)&&(I(N)||_(N)))}bt.exports=M},55015:function(bt){var Et="\\ud800-\\udfff",y="\\u0300-\\u036f",c="\\ufe20-\\ufe2f",_="\\u20d0-\\u20ff",I=y+c+_,z="\\ufe0e\\ufe0f",S="\\u200d",R=RegExp("["+S+Et+I+z+"]");function M(N){return R.test(N)}bt.exports=M},79264:function(bt){var Et=Object.prototype,y=Et.hasOwnProperty;function c(_){var I=_.length,z=new _.constructor(I);return I&&typeof _[0]=="string"&&y.call(_,"index")&&(z.index=_.index,z.input=_.input),z}bt.exports=c},97541:function(bt,Et,y){var c=y(20188),_=y(27984),I=y(78583),z=y(28757),S=y(78358),R="[object Boolean]",M="[object Date]",N="[object Map]",D="[object Number]",A="[object RegExp]",L="[object Set]",F="[object String]",rt="[object Symbol]",G="[object ArrayBuffer]",kt="[object DataView]",ft="[object Float32Array]",J="[object Float64Array]",Rt="[object Int8Array]",Tt="[object Int16Array]",Vt="[object Int32Array]",fe="[object Uint8Array]",ue="[object Uint8ClampedArray]",Ce="[object Uint16Array]",be="[object Uint32Array]";function we(ne,We,rn){var Xe=ne.constructor;switch(We){case G:return c(ne);case R:case M:return new Xe(+ne);case kt:return _(ne,rn);case ft:case J:case Rt:case Tt:case Vt:case fe:case ue:case Ce:case be:return S(ne,rn);case N:return new Xe;case D:case F:return new Xe(ne);case A:return I(ne);case L:return new Xe;case rt:return z(ne)}}bt.exports=we},88133:function(bt,Et,y){var c=y(91869),_=y(13053),I=y(80744),z=c?c.isConcatSpreadable:void 0;function S(R){return I(R)||_(R)||!!(z&&R&&R[z])}bt.exports=S},86773:function(bt,Et,y){var c=y(80744),_=y(45029),I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,z=/^\w*$/;function S(R,M){if(c(R))return!1;var N=typeof R;return N=="number"||N=="symbol"||N=="boolean"||R==null||_(R)?!0:z.test(R)||!I.test(R)||M!=null&&R in Object(M)}bt.exports=S},88411:function(bt,Et,y){var c=y(20816);function _(I){return I===I&&!c(I)}bt.exports=_},83383:function(bt){function Et(y){var c=-1,_=Array(y.size);return y.forEach(function(I,z){_[++c]=[z,I]}),_}bt.exports=Et},24122:function(bt){function Et(y,c){return function(_){return _==null?!1:_[y]===c&&(c!==void 0||y in Object(_))}}bt.exports=Et},26332:function(bt,Et,y){var c=y(52858),_=500;function I(z){var S=c(z,function(M){return R.size===_&&R.clear(),M}),R=S.cache;return S}bt.exports=I},23730:function(bt,Et,y){var c=y(31030),_=c(Object.keys,Object);bt.exports=_},34776:function(bt){var Et="__lodash_hash_undefined__";function y(c){return this.__data__.set(c,Et),this}bt.exports=y},40393:function(bt){function Et(y){return this.__data__.has(y)}bt.exports=Et},79679:function(bt){function Et(y){var c=-1,_=Array(y.size);return y.forEach(function(I){_[++c]=I}),_}bt.exports=Et},49237:function(bt){function Et(y,c,_){for(var I=_-1,z=y.length;++I<z;)if(y[I]===c)return I;return-1}bt.exports=Et},29405:function(bt,Et,y){var c=y(26539),_=y(55015),I=y(60844);function z(S){return _(S)?I(S):c(S)}bt.exports=z},40493:function(bt,Et,y){var c=y(26332),_=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,I=/\\(\\)?/g,z=c(function(S){var R=[];return S.charCodeAt(0)===46&&R.push(""),S.replace(_,function(M,N,D,A){R.push(D?A.replace(I,"$1"):N||M)}),R});bt.exports=z},9171:function(bt,Et,y){var c=y(45029),_=1/0;function I(z){if(typeof z=="string"||c(z))return z;var S=z+"";return S=="0"&&1/z==-_?"-0":S}bt.exports=I},15333:function(bt){var Et=/\s/;function y(c){for(var _=c.length;_--&&Et.test(c.charAt(_)););return _}bt.exports=y},60844:function(bt){var Et="\\ud800-\\udfff",y="\\u0300-\\u036f",c="\\ufe20-\\ufe2f",_="\\u20d0-\\u20ff",I=y+c+_,z="\\ufe0e\\ufe0f",S="["+Et+"]",R="["+I+"]",M="\\ud83c[\\udffb-\\udfff]",N="(?:"+R+"|"+M+")",D="[^"+Et+"]",A="(?:\\ud83c[\\udde6-\\uddff]){2}",L="[\\ud800-\\udbff][\\udc00-\\udfff]",F="\\u200d",rt=N+"?",G="["+z+"]?",kt="(?:"+F+"(?:"+[D,A,L].join("|")+")"+G+rt+")*",ft=G+rt+kt,J="(?:"+[D+R+"?",R,A,L,S].join("|")+")",Rt=RegExp(M+"(?="+M+")|"+J+ft,"g");function Tt(Vt){for(var fe=Rt.lastIndex=0;Rt.test(Vt);)++fe;return fe}bt.exports=Tt},76833:function(bt,Et,y){var c=y(99045),_=4;function I(z){return c(z,_)}bt.exports=I},20250:function(bt,Et,y){var c=y(99045),_=1,I=4;function z(S){return c(S,_|I)}bt.exports=z},28548:function(bt,Et,y){var c=y(92918),_=y(43607),I=y(8138),z=y(56730),S=Object.prototype,R=S.hasOwnProperty,M=c(function(N,D){N=Object(N);var A=-1,L=D.length,F=L>2?D[2]:void 0;for(F&&I(D[0],D[1],F)&&(L=1);++A<L;)for(var rt=D[A],G=z(rt),kt=-1,ft=G.length;++kt<ft;){var J=G[kt],Rt=N[J];(Rt===void 0||_(Rt,S[J])&&!R.call(N,J))&&(N[J]=rt[J])}return N});bt.exports=M},76934:function(bt,Et,y){bt.exports=y(99204)},64725:function(bt,Et,y){var c=y(86952),_=y(32872),I=y(95979),z=y(80744);function S(R,M){var N=z(R)?c:_;return N(R,I(M,3))}bt.exports=S},79785:function(bt,Et,y){var c=y(19554),_=y(9991),I=c(_);bt.exports=I},9991:function(bt,Et,y){var c=y(51533),_=y(95979),I=y(12824),z=Math.max;function S(R,M,N){var D=R==null?0:R.length;if(!D)return-1;var A=N==null?0:I(N);return A<0&&(A=z(D+A,0)),c(R,_(M,3),A)}bt.exports=S},40151:function(bt,Et,y){var c=y(9256);function _(I){var z=I==null?0:I.length;return z?c(I,1):[]}bt.exports=_},99204:function(bt,Et,y){var c=y(74809),_=y(44107),I=y(11756),z=y(80744);function S(R,M){var N=z(R)?c:_;return N(R,I(M))}bt.exports=S},23190:function(bt,Et,y){var c=y(14018),_=y(11756),I=y(56730);function z(S,R){return S==null?S:c(S,_(R),I)}bt.exports=z},44231:function(bt,Et,y){var c=y(89147);function _(I,z,S){var R=I==null?void 0:c(I,z);return R===void 0?S:R}bt.exports=_},99946:function(bt,Et,y){var c=y(3251),_=y(63100);function I(z,S){return z!=null&&_(z,S,c)}bt.exports=I},37879:function(bt,Et,y){var c=y(62348),_=y(63100);function I(z,S){return z!=null&&_(z,S,c)}bt.exports=I},61627:function(bt,Et,y){var c=y(6019),_=y(66139),I=y(13053),z=y(80744),S=y(24665),R=y(57835),M=y(7975),N=y(18397),D="[object Map]",A="[object Set]",L=Object.prototype,F=L.hasOwnProperty;function rt(G){if(G==null)return!0;if(S(G)&&(z(G)||typeof G=="string"||typeof G.splice=="function"||R(G)||N(G)||I(G)))return!G.length;var kt=_(G);if(kt==D||kt==A)return!G.size;if(M(G))return!c(G).length;for(var ft in G)if(F.call(G,ft))return!1;return!0}bt.exports=rt},41626:function(bt,Et,y){var c=y(55005),_=y(38342),I=y(52495),z=I&&I.isMap,S=z?_(z):c;bt.exports=S},65226:function(bt,Et,y){var c=y(38652),_=y(38342),I=y(52495),z=I&&I.isSet,S=z?_(z):c;bt.exports=S},7941:function(bt,Et,y){var c=y(86756),_=y(80744),I=y(93913),z="[object String]";function S(R){return typeof R=="string"||!_(R)&&I(R)&&c(R)==z}bt.exports=S},45029:function(bt,Et,y){var c=y(86756),_=y(93913),I="[object Symbol]";function z(S){return typeof S=="symbol"||_(S)&&c(S)==I}bt.exports=z},16513:function(bt){function Et(y){return y===void 0}bt.exports=Et},55451:function(bt,Et,y){var c=y(63333),_=y(6019),I=y(24665);function z(S){return I(S)?c(S):_(S)}bt.exports=z},10611:function(bt){function Et(y){var c=y==null?0:y.length;return c?y[c-1]:void 0}bt.exports=Et},9924:function(bt,Et,y){var c=y(75010),_=y(95979),I=y(65487),z=y(80744);function S(R,M){var N=z(R)?c:I;return N(R,_(M,3))}bt.exports=S},70642:function(bt,Et,y){var c=y(42813),_=y(85605),I=y(95979);function z(S,R){var M={};return R=I(R,3),_(S,function(N,D,A){c(M,D,R(N,D,A))}),M}bt.exports=z},95987:function(bt,Et,y){var c=y(2659),_=y(40302),I=y(46962);function z(S){return S&&S.length?c(S,I,_):void 0}bt.exports=z},52858:function(bt,Et,y){var c=y(52166),_="Expected a function";function I(z,S){if(typeof z!="function"||S!=null&&typeof S!="function")throw new TypeError(_);var R=function(){var M=arguments,N=S?S.apply(this,M):M[0],D=R.cache;if(D.has(N))return D.get(N);var A=z.apply(this,M);return R.cache=D.set(N,A)||D,A};return R.cache=new(I.Cache||c),R}I.Cache=c,bt.exports=I},73376:function(bt,Et,y){var c=y(2659),_=y(93757),I=y(46962);function z(S){return S&&S.length?c(S,I,_):void 0}bt.exports=z},83296:function(bt,Et,y){var c=y(2659),_=y(95979),I=y(93757);function z(S,R){return S&&S.length?c(S,_(R,2),I):void 0}bt.exports=z},9958:function(bt){function Et(){}bt.exports=Et},5795:function(bt,Et,y){var c=y(33152),_=function(){return c.Date.now()};bt.exports=_},89409:function(bt,Et,y){var c=y(88832),_=y(522),I=_(function(z,S){return z==null?{}:c(z,S)});bt.exports=I},35769:function(bt,Et,y){var c=y(22310),_=y(96916),I=y(86773),z=y(9171);function S(R){return I(R)?c(z(R)):_(R)}bt.exports=S},60859:function(bt,Et,y){var c=y(76106),_=c();bt.exports=_},16473:function(bt,Et,y){var c=y(99861),_=y(44107),I=y(95979),z=y(30739),S=y(80744);function R(M,N,D){var A=S(M)?c:z,L=arguments.length<3;return A(M,I(N,4),D,L,_)}bt.exports=R},40617:function(bt,Et,y){var c=y(6019),_=y(66139),I=y(24665),z=y(7941),S=y(29405),R="[object Map]",M="[object Set]";function N(D){if(D==null)return 0;if(I(D))return z(D)?S(D):D.length;var A=_(D);return A==R||A==M?D.size:c(D).length}bt.exports=N},351:function(bt,Et,y){var c=y(9256),_=y(58506),I=y(92918),z=y(8138),S=I(function(R,M){if(R==null)return[];var N=M.length;return N>1&&z(R,M[0],M[1])?M=[]:N>2&&z(M[0],M[1],M[2])&&(M=[M[0]]),_(R,c(M,1),[])});bt.exports=S},4134:function(bt){function Et(){return[]}bt.exports=Et},97341:function(bt,Et,y){var c=y(59406),_=1/0,I=17976931348623157e292;function z(S){if(!S)return S===0?S:0;if(S=c(S),S===_||S===-_){var R=S<0?-1:1;return R*I}return S===S?S:0}bt.exports=z},12824:function(bt,Et,y){var c=y(97341);function _(I){var z=c(I),S=z%1;return z===z?S?z-S:z:0}bt.exports=_},59406:function(bt,Et,y){var c=y(13927),_=y(20816),I=y(45029),z=NaN,S=/^[-+]0x[0-9a-f]+$/i,R=/^0b[01]+$/i,M=/^0o[0-7]+$/i,N=parseInt;function D(A){if(typeof A=="number")return A;if(I(A))return z;if(_(A)){var L=typeof A.valueOf=="function"?A.valueOf():A;A=_(L)?L+"":L}if(typeof A!="string")return A===0?A:+A;A=c(A);var F=R.test(A);return F||M.test(A)?N(A.slice(2),F?2:8):S.test(A)?z:+A}bt.exports=D},44140:function(bt,Et,y){var c=y(50230);function _(I){return I==null?"":c(I)}bt.exports=_},91116:function(bt,Et,y){var c=y(74809),_=y(35024),I=y(85605),z=y(95979),S=y(49217),R=y(80744),M=y(57835),N=y(9363),D=y(20816),A=y(18397);function L(F,rt,G){var kt=R(F),ft=kt||M(F)||A(F);if(rt=z(rt,4),G==null){var J=F&&F.constructor;ft?G=kt?new J:[]:D(F)?G=N(J)?_(S(F)):{}:G={}}return(ft?c:I)(F,function(Rt,Tt,Vt){return rt(G,Rt,Tt,Vt)}),G}bt.exports=L},44065:function(bt,Et,y){var c=y(9256),_=y(92918),I=y(29098),z=y(41590),S=_(function(R){return I(c(R,1,z,!0))});bt.exports=S},95708:function(bt,Et,y){var c=y(44140),_=0;function I(z){var S=++_;return c(z)+S}bt.exports=I},81229:function(bt,Et,y){var c=y(20720),_=y(55451);function I(z){return z==null?[]:c(z,_(z))}bt.exports=I},92993:function(bt,Et,y){var c=y(60348),_=y(94484);function I(z,S){return _(z||[],S||[],c)}bt.exports=I},34402:function(bt,Et,y){"use strict";y.r(Et),y.d(Et,{default:function(){return z}});var c=y(34634);function _(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,c.isAnyArray)(S))throw new TypeError("input must be an array");if(S.length===0)throw new TypeError("input must not be empty");var M=R.fromIndex,N=M===void 0?0:M,D=R.toIndex,A=D===void 0?S.length:D;if(N<0||N>=S.length||!Number.isInteger(N))throw new Error("fromIndex must be a positive integer smaller than length");if(A<=N||A>S.length||!Number.isInteger(A))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var L=S[N],F=N+1;F<A;F++)S[F]>L&&(L=S[F]);return L}function I(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!(0,c.isAnyArray)(S))throw new TypeError("input must be an array");if(S.length===0)throw new TypeError("input must not be empty");var M=R.fromIndex,N=M===void 0?0:M,D=R.toIndex,A=D===void 0?S.length:D;if(N<0||N>=S.length||!Number.isInteger(N))throw new Error("fromIndex must be a positive integer smaller than length");if(A<=N||A>S.length||!Number.isInteger(A))throw new Error("toIndex must be an integer greater than fromIndex and at most equal to length");for(var L=S[N],F=N+1;F<A;F++)S[F]<L&&(L=S[F]);return L}function z(S){var R=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((0,c.isAnyArray)(S)){if(S.length===0)throw new TypeError("input must not be empty")}else throw new TypeError("input must be an array");var M;if(R.output!==void 0){if(!(0,c.isAnyArray)(R.output))throw new TypeError("output option must be an array if specified");M=R.output}else M=new Array(S.length);var N=I(S),D=_(S);if(N===D)throw new RangeError("minimum and maximum input values are equal. Cannot rescale a constant array");var A=R.min,L=A===void 0?R.autoMinMax?N:0:A,F=R.max,rt=F===void 0?R.autoMinMax?D:1:F;if(L>=rt)throw new RangeError("min option must be smaller than max option");for(var G=(rt-L)/(D-N),kt=0;kt<S.length;kt++)M[kt]=(S[kt]-N)*G+L;return M}},81683:function(bt,Et,y){"use strict";var c=y(55973),_=Array.prototype.concat,I=Array.prototype.slice,z=bt.exports=function(R){for(var M=[],N=0,D=R.length;N<D;N++){var A=R[N];c(A)?M=_.call(M,I.call(A)):M.push(A)}return M};z.wrap=function(S){return function(){return S(z(arguments))}}},99755:function(bt){"use strict";bt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFQAAABSCAYAAADKMvPcAAAAAXNSR0IArs4c6QAAFkdJREFUeF7NXXlsHNd5/2Z3Z3e5S3J5LClREklJlGxZtmzJUVo0boEICdI2BYICrQQ0PaJaV2JZSOO6NtC/+EfbFC36T902QBpFllxbDYXayFH1MArXQRugKIIojmQ7kSlKpMX7Wh6z3B3uvuJ7b76ZNzNvDl6ulqZI7szOfO/3ft/93lgDz+vP2ZuFHsh37YSOhkZIJ7zHN+NvHQAMMKEOrD4O8+YirCw0wNj9E9qJ2lqv389YoqP8/Z3bkoXmgpZPt+q6loa0Rtcxwy4YcBDl87/wXRMqwOr3K/OVCbN8/1zb0ZL3PPvGjDHtCvzX/r3Q1WQAfpmA9xP/bu4LRdOtrxzogN8MUuxOZXyxmimP/L52bCXqjv1sIN0De3b1mvkWTU9rhomSkrRRUqshs+8pDdk5E+UE0HUdCpDjv9+oTc3+XsMTQ7KsHFAE8zL898ECNGenoQQlG1BZyKghxjsuBEQ4gQOJoqGA+F3Ed0yAH+oj989rx8aDrvg37H/aHzGbesu6ppVMw5ZXkECgYWOi5EMEoNIFhKQosZA6ZwGKsnbpObhZG536QsPRYZKVA/rX7D/62iHfMgYlwG8EFL8/CoaK2dahCAUOaJf1832YmD+pPTXoBfVvjbe7e1OtndNgAH1zAkgMVWIYqGhRbBWQyoCinEU9Bz1QgHZoYO/lpn9yTjvK76D1s+/mdkPLI8NQgmGYBsFQ0+IozfRmqr0koCkU32aoLgDtgSL/OVKdXP585hPvE6hfK7+1e3uyvR1lxYnnspqmzVBOLElU+lUJGT8YBqb7mA2oJS+yEwHt04tQWl1c+O3Ckdsc0L9g1/tqUG8ZhGkOqGCnV3U2D1BSIT4cDigOC1VeAItAclB1AeoNY2TsxfxnRr86/73Wnlxx7xgYXE78KdQdJ9/kSMpSqsG0QPINxwMsHhc+yAU6gYqyFnUEU3x3QzP75dy+H2maxrQ/Zf/y+ATM6ggoqbsDZzy7uK6zLDDJopJzEmovwMTvJkixm0sjg9sbO/YsQjXJzZKJ7HQmnkMp/pNefoYhe2UnEyi3Gcxcbke5iUIbKgA9oBdhyJj52Ysdv7io/XH1n568q89qpO7k3dcFUpwP2aP2Dk14UbSo3EZZgCJrESqUC0EkMPFvLmsMp8PJZoEpyBcAWEwzQHKi2vdBkQNaSlTvPd98dFr7QzbwsfdhzGancEVb+FIA6iiWmP2cqUNBF8Di3wgBykUenUwSv1QMQPGcWMzEs2I4Lx6hmKj2OejRC3BIL0K+3lA53fbETe08e+XJ2zChOer+UYAZ7BBIpdC+oq0iNuE4bVZScLRmMEMcURx2WrYVQzuUiwBFtd9RbxaAnmXffPI2zHJARTi/Ra8AZvqGaNkvglJWTwrj7EtFORfu+Gg8ER49dODSZ63zUHMKus7tPKp8MZmtfLnt4ze1U+zykTswldhSQF3CKpwF2TVuEGXl9IOgtpkK5ln3JGcdaDdD1dy6rsvrSzEp6NwxHdALsCvbtvJs0+Fb2in2jSN3YH7rAF0jM4P1Iyjk8Yc29rREsjPMZkrX9U2OlTVZgKLK70w0rjzX/nO3tDPs0uEPYIaHI5uu8hFg0mHOnjgqF8Nh8AmJ64RCwiMxsX5VlxmPNp57er3oAHqyeunwPX2LALW9sNvHuhSb/xEEqCLgDok1bQgiHQyCHpFyEpghpkMAKmJRm6FPs4tPDMFcatMZGoOdwmHETP/W7NHX64TCWOl2cP8PgPoH5aiMZPCVhtM/MPdpfvZuPNZ0201ZVqFV7jtglCxUXmLoaXb58UGY0jeVoQp2knBC5Cib6XcI8cCMUOO4GuHRBnFVf3SiBrTy948PpkubA2iEV3XNbxwn5MuEFIC5HFCECQm1m/4owg+hM608W+J1hxz05SSGnmWXDt2GmXQchgbPf1hIExwj+jU9Ss39IZK3IqSyHsEaEcfpuWNjOYrI8XKj5eUzTSvPtR++pZ2sXDp0L60GlG4nV6194YSPRWr1sAdqMVMmKP1uvxfDAZFDQxm9KqlSUQJCKb93FmzT4JQEXSJZWqEE9BS78tgdmMx4GSoEFV+5atLMpFMzddBW8d6NSieCb+YDj8Cy/9ASANShqtVqtUYjBQUhtKqC5Fc+ki1T1eq5ZOO0vlqr8o+jCPxeIbJYotCp3jP5x/GfPMCyUWkwNdZW1WqanKVRO8TH0FOVbzx2Jz3vApTAxHy10dTrVX3bzR9q50KtXjCS8Y583Pir7pVqtdNQNgbd3hULJ9jbQRvWZiZ+9p2OU4vx7rK+sz7509eK5SzrdcqFpiCaHNiTyp9hLz/6AUxnZYaSwRWNs6zxz9pX3lufKPE/9bmpi00TubmHsKWBMyf+VYRdJgCqGsaAbSxf/07rF34U/y7rO7Of9SfeHj54hPfZrEK2wEjKlGxAKy8/ei8tAKXGHFXPsZKyHVrqZWi+dU07IVRqi16fW764YxYqXVjzVBW5KezCOiSykxp6zbXG2y+1f3Zhi8Tilz07+2bh/uLSPixwi2agmGoBqJUpEaDn2DcPDsFsgxdQwU5smGEronk1CdkZHUxTh5Tdyw8eBNa0Q17cSCFsGbacX4aFFS03Xy+13odFbToAUMrPHVWzZGON9Tqk5nS9oaxDWYtjO72S2bYU7U0O7SaAmauz5WWAWm0xs5hibaPl5ST2sdyASoE9AXqaXXlkGCZzKoYKQIsWqKLNKyzHWl7q2BHnWW5r2J3MmIBikwwdgmjmWdV93SlI+yRcgwfAU0WHwIQx04BhE/tYom29LkBlGyqaZYKt6AQIToV1i6gYuYfoCC0E5W1hC0xZ5bmqe6pHvLhr9capj4/FXvqiOyknPkbFSkw2gMFBFKCibMK+yyqvYOhZdunAXZjJywyVvTyt6PDBSYZEEjAss/AyRhh37KmLvjr110lgb0zqzqOFnvDWM3dQwkl5c233PaOCeOds4RQRUEs+q12NMlNPA69Gk8pzea1p5bkuEdgfGE27AcVLC1sl0ita3ZExswwrbdyeBZbcQvghgU+evGLWNEMX6kVmAK/AT7WZqY5Dian4M6MnGYc0Iv1VG6u0eFtyuyZUOUsrqzWN1F9ur7vDJgnQp9nFhz+EuUZvkw6FxC8EMw/J+XYwRq5p/Zvu6XFd1a8sXGydqRu9Fa2acHW1AsAh1UZWZrWM0VrO3r3WfaK8Fsse99zjkwONE4uwp8LMtB0jW006NDPYqHMx9Ay7/NA9mGpSqTyC2W5ma0/pf/ROv6bV4wqxnvOemnppR1mvd4ng2Un5VL0gco1c1Yu5d69pWwMmjePXh95oma6ZfRTY22ETb9JZxREnsPcD6qziKEAnFIxvaWc+ksB+Vq88JBZ+kdKrXB/ZzxxsSzXW/7H1Nz+SwP4Hw08cQbMke3nOUAKUbOg5dmn/ECw0j/F1TcJKcNtkiqUmPdBhfk37/DvrYd1aPnO8NNBWYqU9TmgSkCmRh+chUwG2FfI/7teO8RrDVr0u3L6eGUnXHyNPT/dRAnpy5dL+0Ywf0KJZEC1S6IIE1Ef/TPuNsa0SGO3omaVvHRirreRwqU3YciC+AMJapYe2qwFS83/S8infssfNlPXZ8bf3TFQW25zQSVxdLBpDlS/CTi0rvPwp9sq+cZgtiJV3FkNNEYZgUI9rdzB4zkCqnKhoq5lMGjJKadXvuk6tAOCHK/gTKrgknC1ABeZWzYYJbVEXAXQIoLYzcOqQyNJmlqqa9VQFJcikQ+SI5VLR41dhoVKBMmOsnNTSU5XFLAX3aI7IwtNyIV5gJkDPspf77kOpxQbUFCovqtEivaOlhRQ+BS8aCFpr5J8BVGgeg2ImgmtTEUwpuPd/QrRNeNJh2S6eFqNZ0gt2aBdYC42gLFlrCizQVoqgXmRJ7uBeyOGKQ9MWQ8+uvNx3P1NqwQFRcYQSf8rnaTUcBc+hgAYKLjkYa5YpsEdVotXIOBDlgiCr6EtJh2CHtfJZFxmcCPW8r7UlyrQskk+4FdBz+SyHROZIhJRC5Q/kCtBJDP0Se3XvMEy3IkvwAuQKKHB1gmchdHQ13BlQGPA8sLfA44EzpnuujQcSMJ5ekCvp4HVRAtMrXQCYvvTTfR7JJuf0fKGavVRIoOQsdChAJzH0NLuyZwzm2mSG4lCICQSs/XdgoytYeCq94bXksVC2RHGncqGvxUyZdwQbTbA3i49nksKZS3VPOxW267TutU2coXoAoGI7jXiR0DKwtIxPrdVulQ42WfJARLuDcmf/ZpjgdjNl7k4G74XRuo+iGCImWAG7JzXGMcjAyrqHQvPVd1am1JnGXP7RW9oX2dXdIzDZ7rWh1NYX+bEOmWRiKccS1Xolqh7q97Led4SXB0hkdFYGU6vVodGsmbqLoQpm0oAICmJoBjJG3VytZALiD/fkZn1zzd+xZKINUsm0zmpVUyuvmrmalsgQ0fiHJefoA/Q8e7X3LpSKY6YIm9BWyNUmtJwNK3DvP5ufn45wlOs+/Mm3+lPLB4oPr6RqWTIDYWuPZPuey2Qm/739t0bWffOID2KMfOzda33lhGgiykUbjDZ8gJ4qv9o7niwV5UxJ7MsQhZF2lqlez1z4yVYJTNf91MLl9qXK8m5h/MMMhuOEeMG7C25cW8eWxrWM5/jIQMP0kn5Qlo3CNwJ0V7pp5VlU+bPscs+kudzBvbwVsNgxFhSgg2XLr2aefnctAqznXGzSLULSyuWDthYKZefhCuRge6q1frHzs1ufy/f3J278zi8csdszcl9e13m1ybahz7Cr3aPmXKcLUBP4PhwM7Luhtf5Lev2d9WxsXQuwJ5cGtk+VzZ28++rZcyQ7A6zR2gE1FKDM0j/9u85j2OLfsteF29ebx7XkfpF6ikyJmx1ebdL5Uhyboc8YV7tHU25AaRcG3ykGRWhmueW76buDX9+i3vyFmevNtVpl7z3NSPL9R1Y86kZIsJMCarE5rAA7k9kqtMIHz2mf2JJ6aP/QUHYpObpvtFrJYLZEsnkBtRl6mv3DrmlzYZsd2OtihxuygNJOBBXrfllIsbxVeCYzt8Y8hJwkD0cqepXNmGVtAsraoDltN8IowfCGKbaztOqQCCiuHkY7ljVTLM/7SmGveNJiXFzRdVaqGjC5Wk4MG6JRh9mSC1BsI+eEytsM/SIb2DlulrbzXN7OlNy7xbBIItJPquOj0PGECxoe9WfQblNnUbBTxMK+hQ7WDJIERe5hRQMRf6JdRRX0QRri4AJlk/pJqOY8lzesbZBeledxaM6xoc+yqzs+NJe6BKAiEnRUy9l2jbkzDYZDGbmk2iuuJ72z7KTcoPOnn/7A3snlnU23GGCvr84QHPxTqimah4KZos4gXtzLc4YKQG2GPr18dces7gZUfEB8UZ7sgBmiVpEg+0GlYgMVRew4NGDDAA2HPwyA5LPy+cBNhyFJAoEjsnNMjZGC4ifP5a2Jp5+kOTag6OWxOEKZ0tnlV7om9ZUdVDqTAxZyA2IdiOMUYu3YIIJGFSKsJW1i5t13tw2uRHZKiZ1Jp8mnk5xJc2oIqrKiwmSFpJ6OdE7iKnt5KWwa2D5llnZyo+uqlbsFo4WtfjE879hChdhYhV1zv+VWRfeVFBIoNGPjBRJhbny23Jpl0g5SeRvQL7PXto2ay7vCAI3aoMrnLKCH7jf8UevrreMWvYhljhsMmsAQR6mYZOUkKR2YLIFjIILDpqXXtpXSXkCl20WorD2M2MwMYq7/ni6VVUUVLtkCrhtgP51rh43Va0aEpaValeyUnGrT4uudM5mF7mETH48h1coDZ8vDOes8j4HwEzPCMXBBPfeMd82IEC4EUNtfB4ZW8pQ6YJL9VtrQC2ygY9w0ehBQ53ETqghNbT1jq3qcHRjC8tthCf2ptIeRE2QBrQDLNVGhYEoCWcyUV/QrAT3LvlucM2Z6qUlnczSOqtureaMcUMhxgk8JpId9bpKEJxdxVT3UbnoZGsOGnmevt88ZC7sH6XlNyv3TG2Bn3NhUGpi4W5hN3AQ1l8nnU0i6N82goyviVHmNvScOPb/wevtc0gLUWp/pvr7fq0baNrrAGsD0WysFoFGOz2awW0IZlvh2U3ZIXtUQRsgpMEup51dKA20TKWMPFkeo3ucA6g8uYj9ZJnT7odqzBjIzhvmxiBPIbN+1I22nzQrrFzdrAwH9Evtea8koYSs5EtD4+9AjVFKxdTpUK1zqGWav1abJvnYsx+hFWgbSY0P5pgWPyv8Be6Nl0jD6/IAGsTO+g1HFCrZt9NhMRy39Jsbt99VX9W5RVEIbGR4FEUFWeSkOlQrMdhz6InuzMGJM7iNA8aOqOYql6pGhjF/VQ+2xy2b6LaHDvGCNsFU9EMwwWxl0zLKhUj3UBvQCu968YMztxwIvX0ooEcB2FJsZHknqGw/MGOYjTkIQGB7JtlJ2jWHvSy0Qbz30Bfbtpglj6aFBqTjiunecHD0uMwOD7CA1lxmiUHXPff3WLqpu4NhEd5hGghLA8nnid+6UpHqozdAXpr7dNJFzAJUXanEB44Qqa3zMhd9fSmC5QA+z12GrSiRWhzJTBZwKZH88agPqdUrPTA40LufhYVR550GscZ8sE8UAtc2MdkBrY6baKMSVTRW8e4H2MzWw2vQ8+7f8lFE64AU0cntKXDW3WK6yTi41i83M4PaLzyYHslM+oFJrWTNUzlDKlKwWiK3y/eyt7JAx9ShVm2ing7ASIZ418rkh7rqmn3PrCI8CJtGR1LpmqEf3jssbEpGdk8/zT4DNUMspFSFdfr73yXc13Lo8ahw6fNuc1cSGAff6O2XUt0Z2ulVSYRfjslNx33is9NpFFYiyw/CC6bb63nooLmdsyqbnX9h2aJDvLD658NqB0fpynnbbBoTO4u24YEog+Rgk38DHpgBHpPDosqVT1VOd26jY5o0JvDrkBV3+21pwIS0WSzYnBvtbj8xzQH93/Ep+Lrv68BSs8Kduh2pMnPTNuoBbucKACok1Q6KM+OwM89xes+aeJifMcdMC/8LFtrjIYlcmV+rv/tgHeBd77/vxyUvbp9OrO90LDaRZ8zw5Uc1iqxQch3UbUHM//GGPenMzi1oYjkNUHZftqHukCCQPmaxtibu0bLUwXHmv/5jYK+V6mMDx2YHCXHWuZzFZS+NtnI6fNIsK+op+tqeCGQcwF/toiYV4k/+rUHNnimV++sOzULO1zoOcLjp/RgFfWNGebZ6Z+d+RkWsnnP9DhO/pDOikfry4p3VxFfIsUUuximmdE3MfkktY/2ph5Vis/UtGHdJstZbjk2mB7fWvYu2qsGGJVKKerIGhJeurfPVy5P+fYZ1ISh9r1JN10FLV1qbC3Nd3HHUtbPYxdOO32/gVfvX29cxKcmm3gcvEPY8col44bi3Pa5mpo3s//eFWb+pd64hiPD9krZfc+Pm4DPvXhl7vmanXinJHhq+q1nVIm9m7bzzy6ZmN32nzr/BAAorDRNPzg8HHDxqwmhGlQwFmkTXMX96/tXs7NwLzAwsoDur4rX9tMzKre2jFMIYpzT3dN1/S9lt7NjYy9K357AMNKP6/koaG3zpCgHYmM7W/3PXUja2BYnOu+kADikO8MPb9DnM5qWUSZS2Xblr96q6ffyBtJ03H/wHu5An4eGwyKAAAAABJRU5ErkJggg=="},92691:function(bt){"use strict";bt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABUCAYAAAB9czKDAAAAAXNSR0IArs4c6QAAD9VJREFUeF7tXWtsHFcVPrO7s4/Zlx9rx27IuiUkTeqEqk8VQYQqVYgfBYlSWS0tFQikAEKV2n8gEP7Bjz6iSK1KRalQW0RbCBIqlUBFqOIHCUIlTR8kbY1jx02J7cRO7F17Z707uzvo3MfszO7szJ19WdHuJI7t7J07957vnsc995wzErR46bouLbz7YjIg+aL+YCyglbb8LXbZ4dvDALAFAPjd/mr8CUAoKOuqulGRwaddVtWNfV/4zkYrA5aavfmTfx6N+IZ2p6PD10YBJAk0DfAP4Bd+6+Ald7Bv566rT5Zl/FkG0AuV7KWza2N/mjkvTU9XvA6tKQBmTj6X2jF+S1qTSpKmZgA0FTRQAUGwUL/DQDSerIlQbETtBU0GAoCsgCwrAHISCvk1bfT9K2ekqamyFxA8A3Dm77+Ije69ea+Wz0qaugqahl8q+aIA4OWB8tiUU6fmNisZvUxLrG1zoNC7zADISgrwq5RfV1MH7/lQ7Om0lWcAzp/944EASCE1swSaugQq4YAMaLWrn4+CExXHLYhLc4QhZGm43h37tFsEjcYry2y9IAcgJyRBVpIgJ8dBSY5DZmlufuLQD9ZEQfAEwEfHH48nxib3qpnzgF8GAETu14gfpxHUThjZmdxfT6bmwaADMNOxcV/s+USuuy8U0orpAOQEzgFyKg1ywL85cuM3ZzoCwNzJ59KBYGgkk5ljAKxS+W+IHjZpQlDRIYhIcufV7eVJrpxg6cydbZEfCAegGEqmIRDfWdl52/3viI7JEwfMv/fr6yv5tRgCoGWWQNVQ/FBK+wO+YiAQUIuaLIVCIdHnAxQAgDfHn/HC3/nPNj156L2mQ96xtx64WYrGKxQK4K8UQmVJD/O5oyKmAIyDktoH48PZ09Kehx1mUJ2UJwBmT/3yhlLuUoQDQBQvV0igrB164M/z4pS/elueevW+awKFrXHO/UQMoS4gAOyGnCzN7rnj4azIDD0B8MG/nzpQ2lgKqcgBxAKiqx9ZMCLH1m/92u/nRB56tbeZOfa9nRUtO6apKH4zKIQAFOQCCkBC8s8N3vnIusg8vQFw4skDpcJyiChhFeW/Rswxwn6RkcwtX372rMhDr/Y2Z197dJem50e1DNIAxTBZhSAnU6Ak0wCKPD9x6EdClpAnAGbfOjqZXVsIawiAhg9HY0ABRRkHX3Q0e9OXnpy92okrMv65v/0srRc2R1AP0o0oIQRZiMgBoMnzE3d3BIDHJvNri2GDA4j8TxL7NxIfy97wxZ/3BACL/3gsrWZyI7gQURR3HYBM5jyAmiG+HwpAGpTkjo39h6b/K7KCrvY2828emfCXMil11Q6ANICmdJ4DCOshAMQGToMS3rGx/64+AF0TQQgAcoDCAeghDlh888iE1pADuqQDKAeg8kclnAa55zhATamr1Bzvug6gfqDeBYByQD0ACprj3bKCDADQDE32FgdsHwDHH5vM56gZ2gcAOYB6hC0b0j4HdN7IrXIAmuNLxCVDPQLjgC7pzm3E+hxA0OUAaIwD+gB0ftFbnmAFgB7JGi7pPgd0Hg17DkBvaLLDVlBfBNmIoBoOQG8odMoZ1wegHoDMEjtEpu7oDivho5P53EKNGUq9ob20E7aIIDwTwJgoYAB0lgP6ANRbQTQwgRzIsIP5DoqgPgAGAHk1Rc4DajgAvQJa53RAH4A6DthOEUQDlHpUB2wnB5CYIHTDmo4ke04JbycA6IQi0QAMAIyH6W0AaFglj4rorA5YXwijB5AcRPQBoEqYW0EsLGUbAMDzgLGN/Xf9uCcO5RfffGYC8ldSxC1PlHA3OSC3ENZW0QVr5oBeA+DIBOTVKgA8LqgbHFDCnXAdAKgDdvUQB9gDoKArotP7gNI6uiKsHEDC8XpKBG0rABeoL4iHJpKwlHGQ470TF4S+IC6CIEODlI0Y2VSHd8IWDsCQSBYVHI6NqaFwdFkNxn1xiAMkyF9yZR0CtfWYphsefGrZGlc8Fql+xv43w9okYgr7rBqEzH9KlqN19/FO14DGzA6U6ttcYY0GSgXL/anBuL6Cn11agUpR1SV/YEd548qgcTbeLQA+Pn50Ul2v4QDmhCIeURKiOE6cUiQ5iKf8NDgjaZzR5XSo0mrSUpMHNpiGi7lwuOJRBPOwRAxQ6xYAs8ePTpY4AGwfwBPVSEwMIX6SxIvyHCo3UtpnhjVJpLrbvIPV6A6SC4HpWEhwND0xP4J8qTSzjYfpd1IEWTiAAMDsX5IvmwQgxGe5s2xQjqRkeWSEUURyylw4SqgPNqCmuI9wgUoDk9ETQBI0WJLK9gFAKM0SljFXBBOX6f81uuw/MZOkEV+YcnTtOie0sEGyJomQ3spG4QK+dVQsG5RxQ7U6AM2TIOcBXecAg1Y4VJZD6wIAmT/NaaCX7eo3wYTqBGSoyHK5DJCNyrES3lbQykaCSUj268Vy0Sdr/phWyYdoyQQRtrJfJgxq0wB5Ki0dMO262v/2AGDkBrusdiMP2Jkz7EhBICVlAWSIKvLZ3VN/qLGVrHdh8ZAPXvrGDT4tH+bJ48Yi56DzRdM8PtWH8j67zwG0RgTXA25q07s65IKC12RIwrAyMDM69eym27NmXvnWvkouF63mMJtWahtHTObEwewmACRHjIdlu1HDURu43UzSoNl5axJ8keFSJJZYiUnh3EZY9/n8IUlSg5LPvyXl8kUpoBf9uq+UrGxkY8Rby0zEWhnnvBhqlUJ9awtHcabmJQu6pwM4BzQmYrOrvtqjFQB66E0LY9AqJVTv8DIJxERE0xBtdQ6ASReIj8dZpDLfm3Xi3eeADgNAWJsrdWrmGiUBFNxncAC4LkQbHSu2sM0SL6PD9JQY8WutgupdtnqEQ0DWAStXQDgAOpMjxvcBZCeIZWpU+wIdlGytb7EMS4RkoiPBORBK/U6bb5QMO71av4isWDdpJ/C5E1+Q8RlmaIcAOHviqQOwuUoStXmSnpipV5WrvNiLwHyNJoYlxPUBFz2WBcsULatbZJTPqdsb2C+O1gCiC4TGhqbRPzY/IFiyxlOi9rm3nhgrr2XkcvFyRa8UdRVZvoUL17H4RVvjv3l/0H7ceYBIMKBjpJplZGSceCf/Lv7U2paNxiwFgpIUS0iR2A5JzUiru6YezYs8xRMAIh3223ijQB8Ab/Rqe+s+AG0nqbcO+wB4o1fbW/cBaDtJvXXoGYBzb70wlhz+9EgwFPZpuRzocqXh8Z+3odi0LuL/BV27cW/h2kXrDYJBgGIRSsXs5sBn7xauHOYJgMVTL08kd92cMmrkGO5YJ7eih01ZO72UgiT1MDrnHk2FXDfOv31x+I4H/ycyBGEAZv/128TI+Gf2UOKjz4VWS+Eu99Y2MiJDdZm/py48kJ2vrUZnF+SsAq+q01ALRPQLp5dPT05NER52uoQAQB/72swbB8v6lsyrRJEjObL9N69+syfRwyRtRtgWQM3eEGOYdFzN7MidCEkr6VJ/FSRToFW0zZHbplzrhwoBsHjypbQcHR6hsZAsMBfPQ0m9aPthuRPQvKTcW/OniLc0jcvl4KVV3xUZExdB3GOLEXLqeVeXhCsAs395OjRw7bWTWvaiVAUAD6X5YYzpeLEtMtzKOe0guHMf7k8Q42VWypgDkEpDQBnUojd/9T+SJDU0VFwBWHz/lX0AehTjYHg0sCF+LIu/3vtJptaGYz8ricTIYceXRj9ucr3u5uozHZ/OvbYsRhQdc6Gythr5/AMfNxJfjgAsnnwuJUd3TpDCRKReNK8SaFr9doPloRptdUu7qTOmCBs0sxDfrKpEunWsQV3DQdwrynKG5cSn9MzS0kfXfOWwreeyIQC6fsy/8kH0YGlrxc8BoCdO/EzcLvyDzoYopDaII3fh4K4ZCK1rIzCaAMAKr5P+wqopeDZAK+liAadyKLQ1fPu9Z+ywbgjApXde3iP55QQSv1702MkVk3XRBrHjvJ7NhG988GMhfgtj8iwCjVLGKYBUGpRUGvTs+oXYnd9ergXBFoC1d14YKIVHdhOxQ8QPFT28VnSdYGc0QGuCxEkSm7h5+S++8jlMDfQP10HmBSsocszN6O1edA97w4bBBWnQ46OVuVPLp289fNiyFOoAQJv/0unXD5aLazKpCMWKk5LzVv6OmJpJbB/h66lZt+qbXAj1atdd3FlAM5mlkKKFnHyafyNx6D5LGlcdAMTmDyZGSIFuYvlgSa4Gb8ggstW0Xltkc7FTZPeVaFhfTRK/ntTeeNK4n59jE12QpmGLamZ+4NADRl1pCwCzs0+HBjRm8xuih5ZjMcSOWdywNya1Y1cpNkUX4ruGO4rJn/qxiI2utndzTBMgCOP1ewMLAItv/24/QFnR8A0ZmAdGwq+pz8cq92ksjmHtiM3LwboW6cCZCHU2vllsi3RfF0DmZOm4d1jVG3gcjRYRC99PpaGoly8Pfu7+BezFAGD5xG9G/UNDu8w2P40ss5qvjmvQ1vfS2J5xFybuE3W1llh8UdVr6Px6lebWenWctgobxTRXyFjic2yXrsClGenGh3IEgDPHpoMjk7dPljYu+KjJycJOzFEPpGfBVWhHN04IYpkwWdHgxT31FogYEPatqmOuG715RyygvzyDY4TEMDeFiQsqodBW/PZ7zxAAVt47dj1IEKuufpb9zXZTEoAq++IZLSKVo2SW9N/tujr+9JxpZvgw8++Ck5aKJUnSKwmtXIqbE1kgieIoTfRBOZv/mALw4V9voXKfeztR7qPokUGqyOsHD7/WE68mEaStp2bLz3/3uoqqDhnyw7Q3qMQTBQLApXdfvSl/ZYGJH/ZaDnKHAnJo4PL++18kCqN/eafA8vM/vM6vbQ1ZXnjEnHX+wR0UgMUTz0xom+baB3T187yvYDixEvAN0LeGJpP0m/ex9MYdzFUmqVtSRS4kSmpmGI0ZHipv+IlSadgqRj8hAODu99wbP91b2Lgc47WQCQPwiF8eEs6jkquHcFclUd1NCbEtoe3k2SkhcdlnaLg8JnPTN46wjauSgkB8cHXw6z+hOoCCMO079/ransLmSoy6HXjjJGAKKs2ArKaferYI2gaV1UnQtm4FrCCRZ1FXCE1pJUQneQr4MzPnMbE9FL0y8NCRc9ifZSNGXs782vcnttTscNVu5q9s5d9rSe9g5omM2K2Ni6nY3oXQuDezV8P1mSSdlYOAx7aM+LIMvkj84vCDTxgRE7be0E+OPTK0CbmdoBWMkBsS/075wrodMCW+1R40Ge0tuQJ2uzXXKbUW3+9xdbe+pPhLratBCz5/IC/FlAtDU49bkgwbngdMT0/77tlzMRkJa1FtS7e8ppy+WzFM/haKNFWUv2+x4A9I+HORpZCStzaG+e8h9trI6gskeTs3RuCfN/c2SNHeWTvHt0BW30PpNpZg0F/WpNKWpqqZaw7/yvZE7P8Vipiu8V4ihQAAAABJRU5ErkJggg=="},46016:function(bt){"use strict";bt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFYAAABWCAYAAABVVmH3AAAAAXNSR0IArs4c6QAAIABJREFUeF7tfXuwJFd53+/0Y3p65r53V8vu6slDKAghg4SE3kgCSwjjOCSlKuwKxIaUE7tC4nJRJtiFbxWOE5yKqxLsuMDBGMlAkHAcwBAS7AjbvFYsK7FiV4+VWImVFkm7e++dVz/Oo7/U1z09t6enZ6Z3JcgfydRu3ZmefpzzO7/v933nO48R+P+vWggcJfLC57FvEGCXA/i2Az828C2AKEHfBn545UV4TAhBfENR664/gZOOETV3DbASGCwqwqLvoZ0YNKSBIxzYQsKBDUoIyrKhJEHZAbSyEDVdbIaEzQtX0Mkr9mIU+b5j1GxbeJlN2J0YrCY2ElJIDIAk/Ze9yMCCA+EQQtPA/TdcIDb/rwFLRN5WhJfoBLsswk4Q2lqDwIXnsnLpkX4mrYfvAZicDAaCT3FESg4hDIQGSNjoJ4QNO8EzF52D588G6MPHaS3SuNh2sCfWIKWRCAuGy8fvidIGToHlolkCFv/3GnBAiJ5/Bf73TxRYIrIj4Fylcb6KcA5x4RhIg0TzewM2I1I2EhMBNkAMFtnpcQzBTi3NmAxQB4BkYAUsh48LWImBxYALCzqx8SxCnHjlefjRPJAfPE77jMErAaxECobBlBpGJUiMgpGERCRIlAJx40sbZBkI14GADdu14DRtuK0mvv8TAfZ5ooWGwiVWgr1Gwo6BxLZTBjA7UyZYNkykQQ6lhU6iFNEMUMXMzVg7ehkNoQWEw2gCgsEUTspcSySwLAcWg50I2CnoCZS28ITcgyeuFEIV73XgBO1EgsuExopUMIpgtIBOFEygkOgYxthIkgSJVClb0/9FKbA9WC0bTtNFo+3h9I8VWCJa6ir8vSTGPrApZSCmYNoEE+oM4CEDUhNjs2dmjABlc1egIhKRznwDA5qaI7NTQzTclMmWcCFS8zQZsA0LduLAshM4FrPOwpOnNY76Gg3LxattYHcOaGygKYGOE5hIwuRgMlOZoTmYatjQsQRZAsITEG4TdqsBz3cR/liAZf0MFF4jNc4zGsayoTXBEJsVYIhSMBPbQRKwWRESBi9MRTUrvGRGDNGUw2P8mQ+JTFdHJGZQNSBcF/xGRALCNrBcF4IS2JYLyxOwVZKBLACL9ZmZnfqeBCZMYLSEJgM9ICSxRGIlSLS1raWCWSvRtRrouAmCTY0FinEus5fBbdgpsI2VNuIXFVgiEp0YL1UGl7KFEqAVGzEDSjDMCtvJGMqsTEHM3qeaVQa0yFJV+DB6OwQ6Za+A0Gob9MSC5TpAEsOymb0WLKsBhslpZBLBoHIhWDMTEtB9CcOAMjuTITtTYgr0mg6ef8cV2BBCjKKBj/4t7bEMLuglGfhNC5bfgrvURvSiAXuCqOVHuBoJlhlQTdCkoROCDhUMV4CZmrKPgcwdQEGrcvCmATqUh4y2mfaOXmXgmUF8QqrDFizHBVLGssMj2Hl0kUYgFpJBkAGaWgq/mBkSGzvbeOZtV4pgXOGzT587RJec3MIOI6ClBDUaqdW4q8DGiwJsENA+beG1UsLmOJMIipmaAEbKzPRTL5qBm4I6BkoBpSo2ngmgIw0sPIBBZmfHrOb3+d/UQtgZ2SD+OwLPwcYS8Myd1wpWp6mvP/8OXddNYIUB1IBALgDfhbu0gKdfELBs+psSlwngpcxOxYBqaGJQKW3F2YBWmTczccxnD5lZg6U5jWc1GgObsrnwnNzDG3ZCDYgG4cl3XieenwXqVw/QctfC63shZF9BhTESvpaBXW7i0FkDy6B2Fa5OFHZHGZiK2cqAxir9zGY1Yug80y1WdMS6wpsz0du6DC8/hyWj5cD2mnB8G0//g9eKJ6eB+z8fp1d3etjTDRBHYRrKJZTAai9B/NPX41tnBex9RM4VEa6RCmsJQeagyiFLWU8LzmmmFk5l2RCduZJRxfBpllBu3ZJO58A6LlyOR1sOnr/jMny/3LFYJ7Ku+j7e1FEw3QHiWEPHBGoQ7MU2tn7pDeLIGQPLoL62jxsVYYEsSKmhpMyYmrBzOhMdnWH2JTUYk4cz1eGZ1lCgJLFXt2E1Xbg+B/pNNDwHp2+9GAeK4H7pIF1gHLyqFyDaCCCjYeTXdOD4Dh5+z7XizJwXm38vwvWxwiqDGkZQJoE0zNQM0GQYvoxZ0LxQqa7pvhiAVpA2syiV9vlFw4HdsmEza9tNuJ4Lr+ni+JsuEYf4NMbgS9/DG0MNdzNAPJCQLAN8bctD8s+uwXe4EWozNtXUEFdJjd2JhZhBTRKoFNRkGE6Vvf2c2LMuoMXzpknDGGCF+HZCrwtNXnaS6VfMWA+WTXCWm3AcN2Vtw7Pw6O2Xisf/1yO0N5K4vBtBdmLE7F/SDgLBbrVw4p9fk+lybWA3+nSZSXCRIkipIBnUKElDqyRRhfgv160z8OJ1HFve6xoDas4zpoFaBWjeYMw824JgcInBdeB4rLmcuTI4pAUuijT8QQgVKigpYBIB0UxgbZ7GgfU7hawN7GBAe3oGV5GGlGz6CWTMmsp96cxRbfehK5xObVAKCL8YZl/W6SqtnSYNbgLLZ+YCTtuB02jC4U4D96Olhu5oaGlgDMevMaxGC6f+5U3iaN6Ycxl74gS1nGW80cSAsRAHMjV/xaDGQ0dVLvDM0KiKZVMALVa6CPSE2XNkXhX7Fs2+gr4TDrKEsmtn4AqC7TRg2RYsNvuYe2gGJg5AnF3zBRz7Ihx47ytEXBvYjZBuiCWWJCGWCkpLqDhJdSWNUXPhn2XOdbX0x8HS1OxLwFcyuVSB/BwGl8MwDv6TLAcMxfnjYXaLv1tZxMavXC8eLbTjbI3dDOnCQOEyoxAzW+MgTadpk4VVo+zTNIa+mIDWarhizSpCuWlmP4/tNneJLQh7mK5k82ddZbAXbVi2xMH33rHN1pkae/gwNdbOxa2cb45DSC0QG5mFVZwBmrCskieeyuQqsy+BMNPsy+CVPtfV0XKjTwW98AU7tfyja8FqO7DdFp59303iWLkYUzX2mU16LWnsjQWiiGO1JJUAkwxBrdPFnMWyMwW+CrB5GlkFVhWgdUAtnsMAew7sBVeZi7bcB+68Mx1+G3tVAstDKeEmbuawClYKrIolDCeEixFAbW8/rYtZPl7h2MrPmArWHOdVF9D55ynOnAuvCXvVAf3aLVmHoBawT27R6yDxkjhBrGPEQ7YmHAWMJKBG8F9mWRVLp5r98EGVma5CLYr3nJCnGefVcWDTmMwObdFR9oLnNnwnPParN7WOzwWWw6ukiZs5+A0lYm0goyRja3pxWUurWFbQzLEK1NThOmZfRyPr6m25cfN7s8mbZDSgOYzpXLiJshZ92E1PNHZ4oPdc53y9zNoJKXh6ky6PFPZqBlUg7kloBpVkjeT0DCc0pskFKkzoZAWVzuacOo1TbnS+JmH9tEGxwWOWjYuRwOLMlUkUpXEbD//Yymo1XWvR042dbXhtzzn6C68TTxVZOwYs5wOePInbeCS1ZxArk/ayTBQP2VqMw6v642X2lj6XzXYsbq0b5NfR0jrnVOmGDYvNfMnBsffdJp5f/zKda2zsiwNFyrgJg8u3Tru8Duy1lnAWPXhtH9EvXeV+cyqwx0/RPqlweWQQSQ6vBtA9Zuv2+H6t8aZKyTgDllZ6+5LgTdXIOedNM3sGlP8v+Nj6jVuyYJ/zrt5X1BVBAqsbuQnHrxlzgaYLu+kIe7WNxkoTzRU4f1scyhlj7A9O0VWxxGpoEIVRxladpEPWLwzQCm0+I/2ry8Ap0ccEOUuWlIdPyz70+TfjwTt52sfw9R/+hs4bDHB+SEr3wtTXpKxt2LBaTVgrlnBX2vCabfPUe65oPp5fNwKWE9jnP4uf7hvEWqYJbMnj64aHdqc4rDFyTEvVzZCMounU8dKV5/DBgoycKZMZVA72PUfbCTmH1+8Q3WK5PnqA3F4PV3f62mxpMjzizN/zdY0E1oIn3KUW3F0LjnrPNeIbE8A+eZL2DDR+SsWIujrtEGieWjMWt9Z1TjVDsZLVjuozK603xr45TK5yTmXg2fyb7OGBE+9/s/hhEdT8/Ue+SZds9vWO0wHpiFlrg7iMzNrFFuwlT6ROTCjnW796s+jzdSPGPvEsXRZIcHowlhGkNtDRcCJC2WzHnE6hJNMko46HHoFcx+zrnFOy//FLhjRnc/Zgtdvo/8Z1ODJt0twf7KeLN3p6d7dPkuUgGoZgzFoOu1Y84bY8eEu+88REovvICboxSuCqAeRAQIZx5rQqh1WqmDtF3+YF+HW1tgr4s5aP3LOTshcWXaUsHFq/mWcpTb7uPkB7eqG+9NQA8ZYk1QtgpMk6SgyssGEtN4TDTuycVef0L18pHhoxloich57Gm8MY8UCnYZZmp8WzO6qEv1ihOsBP3GN4oI7J12VyOZSbKjNDQFhXFywlfMf9/vtuE4MqUD/+CC1aA31dL4DeGiA+HZEMojQXm+QYsBysNISz2ERjxYP69VuzsCuVAp5oqwivDw3iIIIMYmhtMpF+Mcy+qpK1gXjBZp9Blt0m6+dzz4klAL77+PrN4lQVqOv3kXPpMm7ajE2jE1DcjRFvBJROl8qlIGWtgfBbsHc0RWNt0XEH9+Fr6+siSYE9coIuCDReyRebADHPvONoYF6YVRlv1gGizjkVrVH5vNJ5U88Zao5ru1ajqSzPcp9bf8v0CRn3HFTXBEqs9RVJHuLu9iE3NaUykHZzh9EOy4Hvwt7ZEs6Kj+aq7xz8lRuGU+UPPkWvijlFGCGOAdmL07Gs0cVjplyKAUffzfPQVYI4OaIyGoousmg2WEVGjnNPpXfjbmh2B9ZDjj09z+399q14eJqzuufb8asiy37ZICK5lTIVqqMytqZxbKlADOxSU7hrbTTW2s4T/+oG8cOUsYeeoisijZWORjyIoHSUjmdNDBDO09tZujYvSz8k1BgydZzTVJkptTjnALgbutR25SWbOFSVQ+VL/vwI7QkG5vUDlUYAcktCbsWkBqyt0WhC9Fg5XRc26+xyG+45i+b4r93Q/EEK7LeO09VygHasU43VoRkydlqWanjbeR6/jo5WnTMTrCnRR3bNkKGFVuIjaSfAhrXaBCVN96H1m0VUpav3HKYFE5qb+hq0EVDcZ1AlKXZYDGye6SoTzHMyB7bURGN11fnRB24Qj6XA3v8MXRv04HVCyFhDKTO9G1sn8Vw1gDcVrHkSUqEJU5lcApRlwLZUCuqyD8Bzj6wPA/gysPcQ2eY7+o1dEs1AUtwJILcGUBthQVcLFxXLwMD6Puwdjmgse8npD97uHU6B/cZjdGNgYA0iyAFPx+SIoNwVreia1mHWbBC2S3o2jmmMpSPzcQsRQMZUlxdeWOFj67cvb1QxlY996kG6Ko7NOf2hrvZ60Kfktq5OlTmVWcRyC/ZOXzRWm9T94O2N72WMPUY3dSKIrQhShhmw02LVCZ3NZaHiyXU08myBH4GaWn/moIr34srySOqCD7tF7pPrbxXPTgP17u9Er9TkXBxpkhtd1lRIdlaprupqXS36hCKwOxedwW/eKg6mwP7NY3TjIILoh5CsrzwZoXhhhTWOlXGe1o4wr2v2tXU0K8a2tm5fOIoAYJ79N2/1x5LQxcJ/+iHaLSNzdaRInuxB9mPIriLdDdM1XvnqnTHTKpOBLIilFuw1T7gvWaTBB9/ceCAD9nG6dhDAZWBZCnS2SGziVcmuOmDNOefMgC+GUGz2k6XKQXXs5PS/u307lVeu0KcO0WpicO1gYKgjKd7ieDWA7qlMV4sdgZGlVtTFGcayuxeEe47vdNffIrIZ3X99mK7iBbcMbJczWnp7xKBSR3PnO4NZVYyvY/ZV52wDv/1gVZ7eMoyJ0zwpZ6xsd+NDP4PHp8Wqf/ZtWhKeub4fQHQlxd0QaqMPyaAO8k5AoSVmES0HdseCcHe3ks0P5c7rr4/S6wY9LHYiKJ6dnAP749TI0b3nNc7Q2KHypOskS/NbMKguwVp0k60P/aw3WoldZuoXD1BrS+DGQBu7F5LkCKAzgOKeVTDsBExjaBXRRsA2hXvOonPyd94iHk0Z+9WH6bIowo6tLNzSgxJj6+ptHbDqnLNd+DwUqTb5YsPnoHpN6n74rY1HpjH1E/dR013UNw6McAd9Upsx4l4I3SHSHK/Gua7WkMKcxQwsa+yOpnD3rpkT628adhD+7mG6eCPGPl6o0C8wtq72na3ZV8pMmV4lb191DWfyhQNrqeX2fvct07uqPBrQTlKm+v2QZFdCDiTUKVUAtU5YWTqHgW21tL3Ldxurrfjov3/rwrMpY79yhPYMJC7hLhzPJ9AmnZ81MbujjjTMBKuW2W9392Zq8vBBzNQcVO9+PMKZpUm3C3AHIH4QN4ShWQgiUhsy9SdpWDWLqeUyVGmt5ShrueXau3zR2LPmHOROSAosa452cc1AIhpEmRQkJWDPJiKoYvxsB5Z/O11HR6Cl4/uwGkOmem/BI+uF5ZhFcHlY/zPfxXWBMqvM1BzUvibT68JoGxTF40SqQ6I8IvEc11pb0M7OpmjsPtT8u1HaMAX3IXrjRgwe01GDsJArqGj+OqFYWUtnevtCC0wwpPj84Zf8h5nKoLYt6rYONR6dxlQG9VP71dURWbvyFCCbf87U/owcwMiBlcxwvIwK7YZrr3rC2eEr84f/qLWfTx+NeX3+IbqyG8CPePmigWE5mFrJGSY9dk0BiAnpHC2Izbz9XLMfVm4MVNfd+vDPbu/DUiUBd+2XV6rE2ttTFG+FUL2h+Xf6maMqJlYq61s6uP0xe8f6apGwdvpwz9lhn/6Dt3mPjAH7pQfp4k6APaHkhG7arR2fAzv1AVl16gOan51N16nqNY2xfRhlFUOq1Pz9ZPN37/COzto149Pfpdf0pbkw1CQ3A8iBgtqMSc0DtXoW+LZMZbXN5MoxEO2GsHe14exc9B//j39fPDcG7F88QCuRxk/1AkiODOJhyHU2Zl/lwMaODW860+wLDM2ZmE+SsJru6d+/DU/MAvVP748vVYn98mDIVE4BnuZeVUgmZ2o9v5GBuE2fgv4roMly5AtrzReN2G7uv7dq1cxnv0PX9TTQD6H7JQdWR8xnRwR5AXOzH5+sNcv7cpKDp6s3mrBalJz6vZ/zfjAL1LsPyssjaV0YaciNXjoKIDtyNqjp8yutcrvc6Smlc2wH1toC66sjP3ln47s5CcamGH3xAF3yrMGudJl4BJPLwUz9m6u3bO/bLX6mLC2C2m64z/zeHeLpKi3lY+yo7n5AXRFLax+D2pUkN3ps/lA5U+v1/8ssZcy3h3jyNmB99Rxh7fLh7myJ4x+70x9N+BgD9i8P0epGH6/psh5pGGbtpNMZb9kq0LMHDws3FKwq91TW5fK98nH7lg8s2O6xf3uHODkL1LsewBukNOcwqCd7lAb/DGoQUdJV6Ty0sdi8zNKxEYhRVregAqW3DOxKW6Q9Lu00789lYExj8xb/zP14QyeGtRlmOQOeYTeuj9tVm+vJp4A65pwmy50e4TEq1lTfQ9JuuUc//GbRmQZqGvwf1NeGUqymieoIahaos5cobTspVeFginVmfV1aEM6uRbt399u97xfLNzHx+E/up/MiiQu5B5bLQRmI6YBus3T7nG0trRs55KAuLrl6ReGR9bdVbx3CFbnnMDXCUF8XK7GYg5qGVBK6E1HCI6tFplY746KOuigDWlVfzsFyNLDmwVlZ8h+56+3i9Exg19fJOvc2XDMIQJsKWsU1Yr0xVc+95pkDyhXIx+kXPETKdh/5SGn9VLHwnFBpLOvrewPhc/CfM5VBTceqNJIc1PpmP6mlxWfmIDeJ59IK65wWqc/+4/bBsjVVrpq5az9dtCGxLxg6sXxOaLXeqtHQSB7bVRUkPTYs1TQHlvamiHcCcrdOxHj83oplPvm9eUS139fXSSkaOai8IntLw3QLoFbLzrinH5V7hiMuyiHHrk1HWGsLcNZW/MfvfvvkNieVwN53HzkPC1wzCKFPM2sLnYWJqKSOc5oCaH6v1PNzoN3kPQLdZz7yD6d7fr7mowdouUm4NlDG7gxIcTJli7upkvQgzsapmKmTLM2bZRvYOktCy43D2sps3bng6Ht+3j1YeznSpw/QzkGIV58OIHlxR5RGB+wzt5PNeUD3wkKx7Qm87KRMHDzxR7+wsjnNSfHxT+6nHQbmmtgA00ANSwmVsSil0GuaN4mkyidwJJCzdYetH73rXUtj2pqXfYKxHAve8yCu3RqgkWbWYyjeNDHKV40M9TR7aLFHcqbd2iGoPJTiuPGOVTw6bSJFXtiPf532km2ukAmSTkQqHfuXUOlwypCpZVC3wanv7adFQXyc2er5wtrn293PvtN7eBoJJoD9wmE6vx/hVZ0AERd8QyodaXe4xuvMkiWVmjx0UGz6nPZbqqGn3Nif/IZ8lXLsl4cSelOSDEMoBnWLzT9Cwmm/Me8/mhVTALRitslUiyvIV04fZitHAqttiAt3+w/McqwTy5E+/xBu3QpgbfBoQpoJglaRGg4DF6SgnJGao6M5yAwod035Tlbb/eF/njHeP9RT1yNcpYzZGcRQmyoL/Dd60IOE9FYvi1q2vX+un9vNOqJDHedUhfTwVgsNYS+3YS86+OG972o9M0uyxoD90hG6YBDg1d0E0amBjgeBo4JIJbzGqczVOjFpuYw5S5d9N45dHP3YjPiUC80jqdrRb5CRaHY1FHdRexF4zF9vJRlTTYGpk2Y/2befcL6lOcBVVsYkqCsBExrL5va5Q7ilF2lnIJ240+FurTIBb3oAGL65Jlij0KtO6w+fknt9Nv2FZnJqx895x6Zl+/OC/fG36VyLzOt4T9meIh5G0cxUHvfnGJUzVKOBv+JkuJFHmh/oV4di254jL0suAcsLpAdPtr73tfXqafXFRhkx9s++F5xrK//yQYJoo6tlRzoqiDMJ0Ik+YVt+30BdzMAamW4NOrY/YTGQGT1gWHIek+JllL7nHvvDUg+lzBBu4Lv2y8uUsF8aaKhekIZQsqehTwXQ3O+vBnW6c5oWN6fPnmH6/JU/jAIWFxzRpM6RL7x7V2+WBEww9r89SNf3Y90+HaTDwSok0hzj+Z6b2E08wIsfPvBXtFtLdRHvhRLobC5+8SFleeDP6XooG1Z72T36Rz8jZoZS64epcUGkr9ZKrHVjqL4ilTupzZAMmz6DOopRx5jKZj+JUiWoM8As1icPrdo+rNVl/7F77xRTJ9WVwU4Ze9f3qN1U5o1bimJeHTKQxPsTkMUbKCI5+Tt3NJ/IL/zNL9EFcaz3hknWDx9Lw1XIQzou1YTVEMLZueacXjsXx4qb0uT3/cQDtAKFN4TSNJipuZ5udKH7uZ4moHC45LK4aq7cETgTHS26uuJ7BpX/L7d5dMA/9pmfz0YG6r5SYD/3IF3akzivG+h0XmiXeM9xwCNh77ac75b3O/mtL0avUMbexTNH8unjuVmVycB7ZfP09GVXOEseGqtt3onNec5J8OS7rxepWf2Xb9AFwsLlIZmkH6U9Kd3hnlQ3m0eVZ/zDsbRfBsO8hEmVk50HDidYWAK4d7W45B//wjvEiXnXVDL2Mwfp1n6grdMxGFilLErcWFjLK073/beIw1U3/e2v0vm9gT63H2bglhPIeYVYClou7GVLOIuLcBYaaCy4wvVtOLZjb8RKhRDWPt4WJTf9Uxz0RzCZnqqkr91kWwzHh0YqtX14sMzkyUAsH73armFu/k0PYsU3x/7inYsztzudBrj4+Ndp0fXMDZshxZ0IEY+185wCX/DUb+coLy+fdvEHPk+7exoXdSKV6u34pgnZVekCYILV8GAt8XRyF47nw/Et3uxOpNs5x4p49w6dh1J97klFSPqF7FRxAK92V3SOlpaBzkFdajlYWnI5CVRbUycY+18fopd1A/3yToB4qwMZs8PnuUi8K9r97v3TxuvzG/36F2lnINXLeT7pYDjvafSQwpIdnk7e5p3XhLAXmrB93jN7uEFuyF3mGAmzNCQyW5EaBv3uMOOfITRvHm5V+JTr7fhw4CRVGFTbEdaOBdJLCy12VOma2LN9iT/9Ll0RhXotdVoDqIBlIBHW2pLT+cCbxJFpN07X8n8N58dS793oAjytPC5NfywCwcxl7eIIoZnuKix4Q/J0w3IepVCCkkiCWE9ZVsZ6UhXMO9sQqlyf3Enx2NWqqzvN1cWjs9KVdYEWn9ivbhjEaJwcIO4p4m1KqCWE015wnvytW8VEt40z9lEXL1NCn9cZACdZlwdQveEUyPJUnbIGckV4xzXHy1KFvFmgSRxix5R1TbONFuowNGdjdvJ2lXMTL5t6+XjO0uUmkee2jn/5F6dPp68LaH6e+MS36c2nBtps9BEHw2igxVq46Bz51zdkcScH7X/yAPZ4hPOFZXZHESgwWUjEE3Z5dQmPgrImTluyUyxYcfpjjsk2oGfvnOpWvshSr2FtNqLjT/2P975itC9h3fvMOk98/Bvqp5/Plt7IPv/ODwB2MqvLzrMLFDu27a00LbMLFmz+6RJtwYQx8cQ53Y94rJ5DI9JsxkVQyabQsYWjNBp8vJx9ygAd51B5JWGJiKN6VMWtVZUsx6gcQuVD1m3fiXzLfeq//6LYejGALN9D/PF+uuVkR5tTARRHBPyjDCwFTRfOkg+3acO2LWEREYUKFAOal9zHhgFGwh48BZVAPKnCst2YBJ7+9DuQJoDvvLe/00oW9mqpmtzpYO3k3K5OcseUm/38XtMI6CmamzuoWTq64CUhifbTX3k3Nuf9qM8LAVz8p2/Kq7b6wt8aAsskshsQS65weFtl3m2SBASvreWENy/8YEA5OaMMpYtAeDUQ/+yJsd0Td78dz5YLzFLyrrt6a+R5e7rStJV2wPFpzvDpyelx3ZzVry+DkAf5ZAleRIw2WZ2m7z3342LoBGM/sp8u2urqCza3stXNXNl0+6MGBPuXdDNaTsRoIElYWyndzSe/UcOFJOU+17PxXB0L1Ju/AAABOklEQVRv+i++fNTbPL13bUDOjlibNkcFzGKTUOrA8vtOG10d0+rhGAabNx/nv1niRKS7FrsNu++76nTwVPtUnYzUC2HoBLAcNvl/pa7aCIWzKUnlXp1bnH9GZFTRgvmxydugvorjH33ynYv8+ysTs7/rFPKKj5J7sTVYi22nHQnRTqCbscw6DXlPTsf8MzRDuSgMBjn8o1LD13DGDDUoiVqu3ZNCdpaWljp1GrpOOc/mnLRwv/9N8jcH8uW9rrXEixyYRflruHty+tG23cCR4aa17G/MS1KfTWFYMu68F030+wtd13KsSNjkCIeMcITk300DqAHjpD/mQEaJRDWarXCXRPiJf4L4bBv4bMo675qxEYT3/+XWahA1d1LLc2VfIkoodnUS+w0/jjex9bFfHv+BsXk3/3/5+/8DKIf6sstcS3AAAAAASUVORK5CYII="},37426:function(bt){"use strict";bt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAEKNJREFUeF7tnAuQFdWZx/+nH/c1M84MyAzOIBpjBYRgNujWqMFE86AUNYpbRGMqmlTMEtmEGC2yZrfUcTdhw6KbJyYQNUIFycbEVMgTDBoRMwQzBAyia5AFBKI4w7zuq1/nbJ1+3Nu3b9/b3ffeGZDNqbIGb58+ffp3/v2d7/vO6SaIWD71ezYpl0OLoCJhyIgzBtFsQrMasv+Ut+o64FvH82PFdvg1qh10rqxa/7D/lPbHOV+ErgGaQDHa1YKBxz9CfKtHRFS1Ognb2CeeZglqYLouoCUK4EYMQM1teBRQbaANAiomcWDbx8hQWCa11AsFfNGPmChNwmwiQHZLuC6lcmlV63HQE2HDDNNGlAETxrC37w6SqwVmmHNCAb95C+vWCaZOmNlooHmKKgoiYXD7J8mBMPBqqRMInDFGbtyEd4sxkKrAgyCFsfMRTEAU1ZaBqdJXQsHObMee8bLngcC57VZVzA6cp6oBDzMhBpmQeo/7zOiV7kmn2Ne/mIzUouCgcwKBL3qStcoU53o7J4sYeuyDZH/QBU7m4z2PsFkwkCz00b5JXcTB/sVkYDz6Hgx8K5uCHKZ7L35KAP8umwURSe/srYs42r+Y/PWEAP/4JtaRB870XtzQMPTE1W9xhXPg1KVwO46IE7zedxs5cvIA1wADpxZwt8k8uYDb/rPwN+A1PQCBNnzhJtYhaUWT4ijhVAGueUwKp2gQvL77RJmUvwGvScgVTwqtcK9beEoq3L5JI3aCFc5cJsUZulMOuEtRJxb4E6yDxcrdwvECzhhLAJgKoBmADCDwKaz1odeqtC0DrNZ2AegAMgCOEULG3O0E3sxCP+AaIMiNdQt5zgZAB4BuTQMbHIRycEjRaK6uGy9llohHZ5hXop2TALraidx1eiwmy5A4dABHCCGUNxQNuDufIWPolw0MfBhjnQCmvXJAzaz8njY0eDxdg8KainD482EXQ8sG3mclqqKcKvYj7a7FBexfJLmJ6VqGLPt022kXz42fBuA4IVYGMrAjBYV7E1ANBG6bkVmvHFCzd60YOh5NUu7aJw9wp1eLb5ZbPnBhvB3Aq4SQ4XDAiWXDS5hTDP3yHxoT2jPGztY0tC/pzRytTdm8d42H7UArqDyCwt0yWH1fbGp7e0wnhLx0sgCfc+h1GLff90aNGToXbH6nzUA9ZsT7hNUL/K7PNLfOnYVWALtCAVdthZd0pLEKn/uHl5SxFd8cjpCD9kC2QTfCbjca+I1XSKnrFyROB/DiSQO8b6cyuvJ7w6OV7bcPYA/kYNgV2jA9uMqlXoUv+pCUXHRNYgqAvdGBF7cYNNKGzzWBb9CqAA8/lRbNSSXA1doqh3/igLtnTbGhk2ZdwP3tdRG2bruF83taYgveJzR1dcXiMYD8dRDqM8+PZH/+rJTLZLLmKEgFN7AI/sQA96wp8hWfBnopkYBXnhDLIU9qayI3XSWmLnpXvKm9yYxcy4qmwfjDXiW7/ql05tA+anihTzxwvTw9ezID54q+5MJm+cOXJ5tmdiMly8HxhjMK+w6p+Wf20PTGzUa+ODKW2kXFFQRVsfs88HGPanQbbgN3W5SGA9+rjH51zUhJ3iGc1S5V9Y1XxJLz57U2d7YjFu58/1oZDfq2PyqZB/9bH7PSIlZ2RJQc6NUjzZqBz3+CdcCl8IInIGJoS+MCn7l9ezH61TXHIgJ3wY7x8D2F1XfKU6Z1xuqC7dxjVgP93PKBNwaGkoYDvajyiQTO1zQTJwp4qefhTIhoSsHQcoTqIB9+b3P8ip5E6tzp4JnHyOWNIai/2a5kN242snmVMUnmCTSvWZlo4MDQlo81LLSPoHAf4DZsrnAaAzE0QnSSE5YsnJS8vgfNGQ2sLQWhGnmeoeT//eUo1DsezA2LMmOCCsb/IpOFxP+WmJWJAu6sijQY+NZdytgDj45U8MPL/emisjkFrm5CaCxrwqZyylT6LR8SUtdfGk9e25sfuepSErtqjpCY/TaZp0wL5cgwjCd3qfkntlDlnpuEJsbAvrjWGBE0MFHLMEECE02VTzRwj1sYoxg5LY5D7s63n2PnrvvLteT9qeUdxTz305fhfAu4Hjrw8QdeVLehp8glc4n8lVvibV/bqKR/3geNGiBnT4HwnllxKZlQSf9+pu/eD13QGbtgJhHv+Wi85ck/KdkHN9LMiQO+jnVALHcLS5CG2TvIT6iwRXn7rcDWXcroisdGI06ajrpz5oTpNieGnCJxHWTpIqHp2p5Y8s1h0J0HoW7fqxpHjjOqKMD0DpDzz4qLl8yA3N0B6eXDUJd9Oz+SZoyWA+feScblqYyXSXEBD9r6W+uO1nqBc+xFk9JEqAyi5fMCk5Pk7GlEXH+7mY8OLKt+pYxt2JTNy4kEFbQsEzXG5GSSTqwNt4HXCjPMnvLtt9Wq8JQJkXsnlsJLbbhOFCEmJ8jmf0tMln1jzNIx+NL3laHf76GaoOWYnExQc9IseCnWjFka/NizqGco6wp85q9jHZrLpBTaDto+bJsQp37ZgLl+ePY2oC/QpFhw/YoFHOATpSETQnU+cfJ/pwjTQX7wBbHtbd2lk6W3HU3TsOBu4029mjkpizYnCngQbNdecS4sX9j2AX6MK7wUeGW4XlAObOv3oh3nwPkA6IQI738nif37J8y1xYrlJ33IfPPHuYwg5ZjATQlLUq5ugLuElv02cyolqz4TATwkbI/AS2/UNSD8QBE4D6OjF8ekmCq3/XAO21I5IbKSF5be0JZceBF8R/LP+1X1jjV0RNUYkxio5YNnTXPC2yy4hBOq8CDQQSbEx7Y4TTrAl68dK9NPNPwuO64T0nVWSlxypdD8251MeWo3M3pmE+nG95HkOZ0xkadnXzsO/amdirLu6Zzyzu4E+ex1QurxZ2h6xytprWi/be/E7sjE2HAa4BZ6YEadYC3gGF2+dqAO4ClQPUuQskL8ZTc1N3/gwniTDBD+XuePn0Pm4U2KWrLLRAEEkbGr302kf7pOaEmlZHMu+NM+Nfef6/Xh0WMZcy/JxCuc4syoEAvK9ObRfWx6/cAtS8HNSVwmZMU/Jttm+eRRshrYtt2quuJnLKfqYJ+9Mh5///lITGkrD/uHMtD+5eu5wUNH0yX58QlTeCN8cF+7rgHblwJbdyhjKzeMRbThNmhT2ZYvvvafJ0+a1lk9NfuNjUg/96pi/OgLcb6SXrFkNBhLv5Y99vrBDHUmztIU7ThMmpetYs1Cs7nEX1J83xy1VqlCF6f685/B1OjAS2FzD2Xp9ammq3tQ1Rvh5mXhcmVoZCSPH97Telp3m/3qeoVe7z2k5pat0I5bGUPuimdcOfFxAB6aXh0VGWNzt+xQ0is3GJEUbtlsS9kc+Ia7k5M72v2X0ZzuDWdBr703P8z//9ufTzTPmVb9aeADdM0Xs0eLAZA7vP9/AtwBzW/Xgc1dwM1fTnaGiSgXfHlkeHAkTn/xr4k2P/vt1c5da/Jv7noprbmzhtWW2+qKNOsQbuhToyrcBM6L7ZFQM7pMkmceSPLdt4HlvnXK2PP/C/0X94bLsXzl4fzAs3uo6lZ5lPXNSGuagb1vQIVqwAtwvdexYXNTwhcbeDp22zfMzTaBZf0WNbdzP9Mf+HTc+jJGQLnv0fzgc/1pVaZJWlj9ibC+GRn4NatZalDEFEGAqBowk/KFPrrWtiv1u6yK54cdt2Py1t3K2MpHy224L3BzvrSX1OzFBp6oeu7+Nr6dLLD0vQx132HoH/+gf+TpbcABXlyMSLHSybN6qjYS8PnrWNNoDjMkAaRaAop3slbXsZ+7hbuVsRUPhYw0U06W0EpSOTmT392fOD1EUhB8lefV11TjvXPCLTZ/6bv5wf4XqWoBzzDTRSzxVhoEvLeXCZunYZbB4P/qQMhwPyho6r/TBv5YAHDHj3SZEyv3TQQmgzxye6J1xrTqXoojjOFhGFMCXEJel3s1N9x9fIBJCcMK98cR+HseZl06xRllz2gQ6KDjnsehUcCnnk7Ezy2Ip7omQyTQyvZNSrLMeNfMRKUGuD0aXbPq8zpm9zRgNA9j7a/zmT2vMU0Gs/PjfsD5Gf4q5x5LKJNy5a9YfOg1zGaCz66lal/ziQibV3/BV+HVU7SFRQfX6o654GAkCJVg5sG9zyUx/N8XMuvy10GkOAMUCCIYX+dU9TwTaYLKZo48y+QET9mOE/CLH2LnUuaKMCOC9LXpFdY+OfBtf1TS//F4+MDHDdyy4YpAbdgxiRC+YOw3e3KY/He+pskHhNvKnJEncSSgiXEWVxSoImOCDsbrSibsHJNZggqSlbItt+HVFR64P3zeetauZXFOSYcjAA+y2d7jT90KZEaQX7IqG+kDX+Y6pivvzZXKQZsKNxQTYkHldmYw2KlSIOhxEzbhoM31Te+WCe+kWRk4P2K/XMXTI7vLVHBZL5OyUzGbiOYrb2WuRzVPpSJoVzt+de6/Crh8OugNywePKVoy1NtrBYXrOYJksrC85pgHU+GV9l1VoO6oH8hDYnHKvRILNivsT6m8AlTZU/lOb3tHZ2eMEULK34C45CF2lsFQ9GeDlN2A4zPPAH56C9D3ZzVz7w/C703xha7nCfgnUJKAA7/4pFqkiZQoDqonCydK1ioPB23FG1mYwLmHYh/zX3LzB37zDa2p6y5LTAZwgBAyWKJwnhnMxTDDrewwqo1iryt5PEvnAbfNA55+QUn/16PptCJXV3pxLdPJGjpK5wvKxa8qVY6CXKRtxQvN1jU5bAs0//8sOHhFTbJUYX3TMiGla5zlwD/50damKy4W22VZHiWE7DMH2+kQfxP44ocwk/EQrl7VekYgyKY7fbjzcuDWHmA4A2P/UVU5PBDTRkejvQms2EZb1xQft5B7Ie5SuW2JFj2alpjbu8lDlr3tFNvkk3BnB5Gnd8bj7daWaZ6ZPEgI4a+DF4Ff+gibouaL37YKA6mmOj4nuX+aewbA1d4zvdRPrqxU60ihjRArTJXacnYYFKJV+x9holefNp137Ute9DVVcMFqJgsEswW9mIwPghkUxvuaGc/k6buFwlWHR/DemzWvW83OBX3x0yYT6vu1Pt+57ZyEIzuWIeh9UoMQ4jv5O8DfLhloq3ovDTQzYeaFege0UfdS1g4DPU/Bnv415amloKfQNCnzHmTtGnCO3w0yHbooIc8/URz42WGPOQxlecO0y3sZtW1XZ8P2u6y/BoggIaXR8gCKGhjIryIHwwD21iEXrWLnMYKUF7jIcGzHEhyu9GjUcrG32jnc1L68B7MYgeQ1Y+f9HV7oXxxd5eSCb7GZTHR/GcDCQsbx65RvFfDcc2v5PGZTHq96TGp3J1480EuCA1fPzZILVrNWZuDckt/5OzwEVBBwXNMRudFKb9RVf8Ha07MQlUNUKW20ygneQ4xAEIA2qpQvUhgGhpU15NVahONMmmcwA13exyZo4go6HmbiCvKGwrQRxiPyhRPkCPg0rEvIXXsp/ufxjxCjZuD8xL9fxaYaOrrrukGP21fWoQAfvFA/CEQDjzvXrJYjcuroFLk5DH+p1UMxTbUbCjcvqorpoBX2ati9qlnZQaA8o13tOmGejCDlhznu8KEy3rxrEg739lrfrqq1lIW/vYwJP/kOWomOJqr555TN3xOlySHmqlueNOL5NxSSd4GTgsdHC6zP796nUuB5FSoULs9AJQHZGQqG61G1e3D+Dy50RqLE9NSOAAAAAElFTkSuQmCC"},19150:function(bt){"use strict";bt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGIAAABGCAYAAAA3mEEuAAAAAXNSR0IArs4c6QAAEaRJREFUeF7dnHuQHMV5wL+v57Fv3UvHoUMCvYUNBpMirsiOsMSpXEiOcABLgAAXkkicwoQ4xFUJdipWGYfghMTP2I4jYqPEIUiAFQEWyIV0Fc4KihzAkiPkQgJ0Euhxx2n3HvuYR3+pnt3Zm92d3Z2ZnQ0i84dutTvzdff36+/7ur/uHoSQL9q7WYZz+7oBzE6QIApIMpiEoRSjA4DikCT+H9ZlyxZ/mcQBmQ6mmQVFTsPa584hIoVVlJuccBQEAESEsH1FHyjKhQCGFHqlnYoKXXhJYD2wJhWAxYbx9l3j7So6FBC0ba0EkZF5wLGjXRWFdoHwY1UavY0bBk+3o40tg7AsYeeKBW2D4EdRQTXkpwxMHsf1T48GLarec62D+PeBPuB8dtgVq5DnR1HNKtKqLI4EBj+MGwbzzYry83tLIGjvchnScDkAhhsT2umG7GDfChAJ03jLnmN+FN3s3tZAPPWJCwD1Oc0KCfR7K4qqV2BYMoWcyxcdxKt/EJZEaBHEwGJAngqk6HYrq1q+rTJhEWGorxAdxo27RsJqe4sgVlwJCHJYlQlFQW6VCUPx1XKZchZv3X0irLYHBmGNlnZc+xuhVMQ5UQtbaWHLsxusYxrvDC9OBAch5g7K6IdDASGEtENh7ZBp11WiDN4xeDSs9r83IISCZKUAnAqA3ASTK8CkOHCThdUwS06YIKpHcu9rEKbI4RgjEIuN4OpdBafSafNmBosOdICSnwXAYy0BCRNA2RWV8ly27PctCBPy0EPHcEXjiVAxZzXQD0AX+oLRDuU7IVRXxqAM3vV+c03IcqB1/xrXbTe9KpfEjL3gc8YeNoxGE8v3HQjhjnqM15pZghsgenJgPpi8qym8sGfiXuYcPkDQtrUqnBuZAUoMoVeewjVPZ6vb1P5greNpXLfn7abKdLmBfroqAuOFy4A1WM8I2woauSNnHT2AsABMjfSDgT3WOopdV6QMzOh90+kh2gtCFJyM/qo6MPuBQtuWLwSok15vBwSvMhuAsBbH3tw3C8DoLXeiarkc0/jZ6XlIm0GwHK574bAfxVffS9tW9QLkL6743quy/BTs1725gLDWZSbSfUDUB3LVUNytzh0zD+O67TlRzfaBsBqGabyhtdkn/cuqGaDmF5XnBWFkT+sB8gPYAcIaes/fNxN0fRZIpZSPF7CcjuNnB621jfaCkHAUb9pz3E/HrLGIrZ9IQFS/NPQJmj3hCwrWoAxs2nsMtq7sBo79gKbqarUNk4zsJP7eC2fCB1HdC5g8jp/+2estgdi2sgN0c2FFsGtFYPWzfqygMlgXQLY2FERrquPFGqyHPIAgIrHYIyi7px1GRxkc+ovFDXUiqzos+0ZrCyhDX+uB7PFeX7rXswCZU/VzHJ4V5avU4s2+ZDcAQURxABCLPckA1Th/HhEwhvcCvLwFQM/U1iuoJbi10Fa+DcKzFuqAIKJZANCvT6WN9JkDWeP0QS2XHXHfzxMFEAmhvGZUxZmoi60Wa1bQTPeYVGvcdWUU5VSXWdny+Mx5UqznciV5ydIYZDMIQw8BjL4coMd61mjABKMLCCLqBoB5E28PTRze9ZmMmc5STiOERLEyTvMQ35e+Bvt38YGJ++tcwszA+mf6ymvc82Bh+tE45PU65VSlClM9V0qzV/5dp5rsVmDHnQDZ0DdfBARg66AKBBGJ2H6ZNnZU+8U//Xa5tqGBiE8z8KN8J7QiiOK/XkFYHahzLltw0096YfQQwu77fXRxj7e25OJqQfQBwOxX/u1Tp3In9xt2FQSIZLnrT1fMt0W0G0SDpLn4qXvpVxIzr7w5BTtuKwVxj0pudltLEITwWhDzdH2q48A3F7zjLDunELpF7DIIB6QEJMCyoKrL6ZJaswZhCTF3V9YEhDp3tTL3uq/3wNADAMf2NlNv4999jYqaFVULYtHkuWORg4987GzoIErOPQiEypDiPTY42yAYMbkLF971Uh/s/xbAkR3NtFP/91AhuFvEYm1yWPnF9z9SsT3Ej0UwLe7aW+NxMbLyHpRr44IdE6oifbW266gvdBDBMbo8WWsRLYAo+ie3EZNQXV6uhFCrzmJPjyq58jDZTtZbz5dHSHVA1HFLzq9bsginFYS1J6qMpN0gSsHZtoSiQmOYnDWXpWZ/VInGZzOMdzPKjvF89iQffWPIkLPD1uqdlYrMFVFEOxKUzzQ5W/F/ASJUK3AKazMIVrICAaAQ7WL9v/kn8RkLr42qidnOYyYVzdOmTuqFEz/Pnxl6MMuNvGUdFpSKDy4aaRcIL6t0QQGVZbcIouyGLK9U6ZpsCEyPYf/H/yjWeen6lBLv9LxNRs+mefrQ1snMf33bsouowsgViAcAtp4Cu6aWh6d1SLULhA1GQBBWgHIM+1dv6UhevCzwthht+MXciWfunpgy8+QKo10gQh8ZNUgEKiFahD1ackKYe/OOLrXrA5Gglms/p505pJ14cn2azDzVWEeDUVL1T74tot2WYFcwbBDCCgSIAkXY/Ou+l0ouWtlgrNkYjz7yuqn0Liqft5g8uit3ZvcfTpCJZRiNwoaboXgG0S5rqNfksEAwRYxoEhaEhBzDzsXrohdc+0BnUEvQDv1Y006+YiZXPVyhz5HB+zPjh58pkJqnbK4qbjgKq+cHm4JohwV4SY2HAiIh5g5xZBpHpsQwkeK48NbBHkhcFGibvn54h0kvPqTBkuuZuvyLFW5NT79lntj2yTEyGAk3xRVWMapqFojeUxCNIIcGQo5jUiu6pFlXb4r2Lv2zYKdKR18j7ak/0DVukHrZDUxd9oWaYe74f3x1fPTIY4WsUSBuYkUAP29BNHMNLYNQCC1rEC5Jj6EUMVnfmq0dyTkfDRagf7LJmDr9OimqyWHuJ5k68MUaENqJfYW3d941kTOQVKZxO3g3a6s163fLNbXDHYnC/MhtBYSVeS25paTMUaIIYxGVzd9wYCYo7vmmhso6vJNr+x42gSPpoIPStQTUtT+s3BFhNTBLpx/52FiWaZyMAongbbuoZjBqQPhRVjPh9u9BJoCtg0hAUiPUohGW5CZLphbIfXc8L1b4/F3ZDMATt+haPksgGcVc00XLmXrdX7rOwE88OpA2Jk8ZHCXuHNI2K7QCxKEWsq/1Cgo62vIMwmVhyJq8JRIgc5OJkZJckKXUvKVq7/VbmscHsVQZnzndnAPfNbVXHjet2CAh4dUbZeWqjXWD/fgzG8bHTr6q84LGs8p0rHhPQQSxBN/ziDogmFKMDymKMIkpUmretZGZq7/T+HTp8H7QX/gqKWv+BmHmpQDZDGjbPq0VrQFJvfR3Jbcg7VTyxHOfnxw7ulfjqHOOGvfqntpiEUGtwNmgVi1CgLDiQzTCEgVFkrs+qPauf2JG3Z753z8kePVHBJyRvmQNKtfcx+DwdlP7+Td14AZB/xWorvn7aOWrZ2qlTTx+y0R24jU9WxAgiu7JS5z4fw1CpghLRlQmaYaUSHXJvZv2ubomXSxNDj7ILYVzgygWIfXWnYr21MaCln6Hq1KEcO2jMaWjv+mOjvEffXw8nztnmlw2s6i/NyDCDPQtWURp6CqTyZKRCEuwlCRxJneufTyl9C6ssyvwKOnP/bFJ2XFuBeVF16H22rOm5ZKW3a+oS66vmx4vD0pGjvL0U7dPEudmtjDBs8i412Fs2SKGQlgqFRUStTWoIOoPRsMtWI3DVztAdCy7L6Z+6LbaYaddlew7pD15jwbGKNdMnUATI6QrMfmp7zebj1kSpl7eqpsHvpvLl0BwZJx7nE+EAqI6JhBl4O69x+AHK3rAlPoBeNPOVEOlJRAaoYgRRYvoZAkmWxYR61mkJG/+53hDP58+yief2JQnrltD1ei6x2JK5yUe1ip00B6/I5tJv2UIizD5pHmuNLHzFSNasQgXEPi54mFGa1v+RS/2gmbOAvT4ghghL6G+iXc9PyZkWH6ZiNzXrBuMmkSwlpkqSVpKiscliZkozxz4chQW/07DXJP+5l5j/GdfKkQW3ygnl3/B00xc5KHyQ3+dz1POzHHTNLlhBgrWQUDUiwlEGRuE3dPLB1U06gNqcmZcyMXor/De4jHnlkCIWbUYvgqriMkxGeM9cnLdY1FQOhoG3snBBwuRq+5UvQRoPTsKhe0b85Q9ZeSJm5wbVqCuC6K8nDftCFiqtJ0mCAghxg2GC4gykH/4fQWMty4Echzdqp6Bi7Mj90yfHQkMQswjBIjeiMqYJktMYXIUYxLr+5CSWP0dFZRGLtOZI24Qz3QdtJ/eo2kjBw0ibubINHOazk3VMEWaY6qU/CtLcIEgfvMNwsscoQGIMpBvrYoATvUDl7rL5zuEWgr0Lnx++TDiZm7fGwiEc2ZtFAypOzKDiTgRRSYhkyR14YCsXvMlBZTA60MitwT6nq8YheEhC4KwBnvEJAK168w6LBD1rMDZZzyAcLgsFc6OFSe8CXPK7e1nvkFYPUzMrDWyArawikREtYJ2lMUlFDCQSWr3AglXPqQoHWKnv88rcwr0PX9uFM4cMUUuxbYG0nTudEtWBtYork00unxZhNd5gg8QzeoXKEYUQUynwQWIJFdZXLgoJkkxlIogSGJAEsOrbpeUD98mebIOcbjkl1u59uoTJmCOa4bJiZtmnhmcuFKMDdV5pjpW4Gy8ZxBeIRRHODXB2ovC690T0CKKIMR2Sm0qwiQyLauIRxQrXlguSpEtEKo4rC7FES9ZypQ51zDoXYSgdCLEO6x8E+hp0keOgHLyJa6/8Z+kFbLWuoRmSJzQ4JZb0gyeswL0dJAur0eEAcLLsma1Bs8LEKUDLPbikOWeJEJJUyQBI6oqDLVpGOJNyMgIldJrjHWTsCaWy0i6poOCjItsLCErQhAwmM5FfokMpIrY4AGCp2DtxxLKjv98sAgnCHvNWhYhVGWMuGUZqCosyotWgcQZMBnFtFtjZP2tuIQiJCSNMwJTJ2EJeVayCK1oCTkFyV4Q8mMNDUF4GR3V8yXnjUVYI4DSBgIBQY9hwoYR4YyRwjokFZFkpnGTRSQF0RBuSuz8UEEFzcpyWJeEROJ9qjKjgqmTygyeN5FEcLYgGEikFFfl/EJoCiKoYzcwjfe2dpjfWbQdIxZOnTsZ++UjV1uHr+2r6YmhEgirsaUtNUwvWkZMJtRIYTEpgihmmZKCUUZYMDjWTKdlVgKhkwAApkZiwpYzC0QtWEKZszi+teH5C2DobwGOPOtvXbkeKIPO4L2DJ4NyrH7OBnEJgN6z7+E5FYKbnqFzgLDPQdiWgRJhXI5gQUAxOIr/g7AQYRVVF4mD4yajPORB9HoyNAuAsIRItSWIZz3GBruYzivWRy4Y+HIXPHs/wKn94YDIq2/ifcU8URiXDUK8E2n+G0NfGzn90tfLr1r2A8K2Cmvvqx6zVvBQJ0RhETKhOMErPguLsE7zlo705kulkbAKYQ0ChuWKxObjHEQDuiOncvpv2tKRnPVbMXj0Bmui2PKF4h1UXQf9vAisWZk2CPF3ia5PRV/9x4+c1rPvWlNvLyCqz87Ze2DFAZNYLA7CVVmfozFAnaM4nC0AOSsmer/o5YJJpAqAxUxsKPNpBbb86BU3Ri4e+Ksu2L8F4OV/baYPb7+TchY/F947X0WhZYUQkeijH9D1NB/e+8DYmYM/LgQB4TwlVPwcQ+tgvF7cKV6EUtleoWPR88W3zv5qAQjgiqxnYqXTpB+8MQWjxwCevTscl2SAAWP0P7h5sHz61hu9xndV9kwiobO51oFmfcqYfPe4TpQrJ6bcRKGmT8uosyxkDVt1x31h1LyuDBXUVK+kJi8UuS60gvPQ98JxSWJkN0P+NX5m91TYTagNnOItkwA9ACA2E9d/KUp1TfQpCbLjDdYivMya/C9yuSpEvHtjdBjg2G6A4dKrH1rVnLCEXOoN/NOdE62Kcu3QYQqlbWuTkDk3BxTTW9rVC5sgFQxbrkhbZ3rfwc3by1OfINVq9EzTnRNBCqSn18ThbL4TkEeBuAJiyGr5pyDSWnwmSJmKYgLpOkRiU5BMZnBd+wDYrftf5H4s7DrfhR4AAAAASUVORK5CYII="},55303:function(bt){"use strict";bt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFwAAABGCAYAAABBovOlAAAAAXNSR0IArs4c6QAAFIpJREFUeF7VnHt0HNV9x3/33pnZl6SVJXltyw9kGyMjBztgNwk05diFHmJIk7QElYQmYBxIUx9oCOSc0D8a9eQP2rTp6Ukf5NGWJqchB7vlD5pwTpwmuAnBGGJjbPzCdg0SRpK1eqz2OXNn7u25Mzs7M7szOyN5ZZT5w5K1d+7M/dzffO/v97u/WQS/wccAH2rLlUudhJAOpKO4zoHJTKkgrE1vS70/uw8NGotteGix3VDY/QzxIfydfL5LQtIyGkNxmcq+p2CNGIYOl9b3wKUDaEgP6/dKff4bA3wrf1DOQk+PXjQyTEGShVkGoEGorBZIAyYxnI116eMn0ZB2pcAGXWfRA+/lQ0mlUsmoxOiSgSDBt2bTAdbtalGbEASEA7DpnpIxfrh3qPRegV+UwDnnaC38ZVpTS8s4xm1uOAI2pQKpv5T4wXbOt86REJnFenz8XPfDs1ca/KICvp0PSW+D1k01I2MgXXHDM0HXrDtcShqlxpkge9IULJclWRs/1f74FEKIXwn4iwJ4Hx+Ka1DOANBuThH2WKlbQgQRU7Pnat117c0nxD5kYIxTjvilvhOl7IEdC7vAvmfAhWysh690aMAyBrAOc/i1BbARaNRF0tuPA7XGtw6226oRR4wTyKIp+dK5DQ+rC2HxVxz4XXwv+QW80g0AGQw85gZh/e6F7RUC96TU46i2bPBaGnpoOrH2hGFCphO8e/zY8s8WWwn+igG/mn8zVoK3MkChh8tCNlyHB1IjcFO75+CR1C+S9ZMavOA2ShYBXIxRMn5szRdmWqHzCw78av5QRwWkjAE4HWgpAVJSWyjnBdv7tJjT2ESyHCnyXx8UXVE1DS59Zv2fZIcQYvO1+gUBLqLBb4HaDVDJIMDxpjcXsAh6hCAkuAnTbceV9NF0+08RF2OscgNJeKJ9Fb50GH0+8M6CxtxS4AN8SMlBKQOg9TAgJJIV1A3U6/5VrdR3WC5LDJGksAU5kufjuoa4MuKEc86mlkN87MDaXZVIYxXnRW3YrJ1IIuXV4jIds85Aj62+gyi6HSF09w/taz6NGSRZ0xbgSkax7DrYnngAAAhFOd7RMXYyM1gI4zlv4MKtWwV/3sVM/5kkwy7U8LnPQD3WHajbdZ5MmHWH6XbESW0IvHwMiBGpmAQYe63vvlzQAjtn4EKfvwfaUgraMgN4UAQSzr+ZlMzR6mwbdl/U1u1WW3fDtXzcUMyhwhJo7NTKzzZEsHMCvpI/3g2grmKApHCiTVo0te5mYXs0Tfcukk1sIsz7qcmRNRZLSnz6CzAQBFiVSuTi8c33TNs0IgNfwR+9CgB6Lgu0fdcBemoOpum6HxTcNMqMT7jjvfUoklUHvCGl0ETOahejAHGITb628e63hcxEAt7Hv9ipAlnfGtheOA1hTpgL2CSStHtunk2cXz4m2LLrJtsDyTEgrMgTJ9cPDkcC3ssf7eEAwsLnfzTxt2uPapj7V3tC6tXa9f9armSeXkndPQQ+KWGLcf0ahVHxeP+nT0cCfhe/i/wS1vQjgMS8iAfcnAdJRD31Xt8n79J0wRXWHaTp/nLlOJjeSfVbqD335roO4kTtbMfnD64eLEcCLjrayr8tj8L5dRwMz4ZApAlo4pGYj78cpN0uCLZfZl7QJ9/i0Vs/qOIajgftO3G+1l3XV5huu8aKOONxLI19vP/uMTsdEBm4uEHhe/fBI8s1CitAJtHObSIlNSsJ0+0GKWmE4GuJbqqtWCQ99xEuWYizd08NfGbUfRuh0ATkeiu+Hf5BeUMdWYVirDPYwiN4FE00uzacMIuqQWjm/oUsbPYgqvrvPAfR0gc1BnXGhZl88eSmwbGmwKuAlwFAFwiPpkXhfyTpaVEjMe5hmoP99DQ8WToCJTu+b+jfaxQ+K4JzRrNF0vyMawCK4r5EKHDOuVgU1wJAYqQwrb6dm9YuieoOsdZoavOnwdlKcCZc07znxKzEoU9ToPVt7V48Q4g2I104gTd0ZOQ1bW2xLC3BY7n9cIh6nmzvOtCg3dF0W2g0wiSrsdx4u7G0u8zZisjAOecietw0Q4vwxK9+Mfm9068E1HCkAFKNA+dSHdxqEy7RKnQn3cKJ/be6fux+VfF5sENU+yTEZ/pQ11rp7zbe2rkstUT+aPZpOE+zrgs2Sl5UjwRznUnAJ+QcGz+8zUrRXn/6h71zBb4OANIfefY/xl7PjdQqlbhaDzIAuGjnOxELCDyCwXe1daADv7N76QjkyGB2H1B7799l1bYD1Bw4AMFYZ1i5tOzC+Yn6zeb+0z/sRS4LF30ZQRrOORfP+qZnh89O7/nZf+bd42gEDgCpRrJmu4jARTte8bFyz/lJgIbJdu5sLgHBvf0fin2t/+auB7I/hhfosNWJy430XSRdbTg2vffxT6793ETQbo9t4c7kyWAw8F80OeciR3LV7p8+N/r8Oyc8inbZwIU8mCBdGdwq2AboCwQ8gWV05qOPLP+X0hH4q9yhhnxNkGUjQKqRTI59esWbU0NoqOm2mltS7P6aARdiv2L5t/72HRSjnoKYKwrcNmB7gppYuN00qqUf3rkn8ys6Qh7LvlB7TILCdgKkDJiNvbFq93TUjWMBXK9JitVzM+C9FGD5mqeeGKmXxdYBt3uuWnqQrIhmcwAumkeBfnDnnqVH6Zj0Z9n9ZpzqjTktQIyxYjuD0cPrP5+LsDx4mjiSUo2a5SsB3GOh1n94TVLmAVyc0iIrdwMX3bqtG2FplhXZ2JmNuz3r11ygOxbueD8GCdbwy7ZwC66zcHJVttxBty6L34sA9W5hqqrvLMC1dA+8HIGCn8XbwB/L7q/1oCMyk1QSY60o9rGAkxXufH7rgAuKdR6J44enYHWM4xWdK7EYuIG9buUFqrKp/Ky1TqQAWNWC13d04TRucwIlF7VT46OsHJM5lJ0q4yjg3XNz1CUpEpenukh+7ODqL821m8Dp9gMeJ3DxVb/QnnMeaOHuKzh6XqVtexumZafMOfjHm29L375yY3szQ3ynWNS+dPD53OuVd4xd/b8Ve6jvgx0pWQ4sqygBZY++/OPpn2cvUDf4udASwEd5wfiUcuTsOXR7pLrBG1/amyi00bh7iyxoXCZwjXgizRYCr142larJSFKV0Y5118j/dvPHMxGeepihReOZkTeK96++ocNMz4Ycpwrj6t2/3DtTMXQu7Bwxy5uKCv3ELXt6MqlUHiF0Iexa2y88FR9VyQrEWRdmaOLkpnurznvwmX7A5yUp/hbuBZ5KpSAhyeiBjZuTX7zuw0vCBjSfz4WVb9//3axqGNwNvZXAB07sVRgu9gKgbntVxWo48J1nn4+NVEr9iDOP5SgSeffwwJ2N6dm5S4oDPCnJiEsy6iYS2n3dDYkvbNi2UMD57/38+5NUV5kNvcxkDlCKZOXNLHw7f0GaunhxOS1rGY6wJ+EWBlxMEjGgHwBcaTbL8SRENhI5eubgTYM1uzA7nx/wFIiFUlh33OBYicXx7ms3xx96301NcuTzsW3rHAqUf+zAD6byOmY5VuCVqqULaYli5X7AhzjHz5z6zjKUUJYxA/msITJgVQ+UlK2//rZM5XQ/R9gvAVp1PpGmaKtOH962zYzgLxu4sPBERxp1KnF817oNiUcGbgyukp0/bxP4H7y4b6aMwcgLKy8K6DovzwO4yPlvOPdUDyHGCsSaLCBUBsz8gW9/4QVpIjNxDTb84i5bWazwilO19Mkb/uiMyMPMH7i5YMoomZbRkhjDaXkJ/tg16+KPrLeAf/fc65Xj+Xe5hDEiCHke011rrpcHOpfWasS/f+ENejz/LgPZ9VRSDQzO+eeuukG0JRSAD770TK6CuZEvzLI8xaxi5OcMfPPw0zM6La/ktZcBmm+VBQG/7tgPlgDIIsPqc3hjWcS52jW15PSBHTv0ywJuWrcko1gsjpfGEbl19UD8y9d+0Hx9JEcpLwLllHqzguJWlibTyD3MHC3BDPXmcOxR9FbbCuD3HNw3W6EVY1LX2KyuMk3DrMyqPn3I0/Prj+zpeZ1O4Icn/4eE14k7dxcEXFxuy9G9KxmG5d5Le63bMKiR6Vx6+sDaHWaFbUuApxOYtCud+NbVa2vAT85MGCNawXTdMBIT6wziA50Zkpad7OGxXJaPa4W6bBwFqgH8dqYPp2VZvJ/J7zny3GxFV43JwqwFXMKsXNDNhTPsqEWao07yyvflrIZ9yWANF9K05di+Po7kLic7YydbrSoBhcO5w9sGa7mZ1gLP9Ma//P6bTQv/1/PH1BOFUW7KiawA0XXzp6FTdP/qLdK16Z6azPz7W0eNs+ok0ygAkWQuSIvtJiJJfNeaTdJAypKU+w79Vz5HVaOsCR2fYdOGIVI1bO7Am204ez9rZuFinKK49dljAxs4gjZnAi3tRpyPHNvyh5fcxtAy4CmeJLes36B8ZcEWzVYBfzH4YagrpbB2bYIt3O5ILKBTXdMbOdKr3ooMksSyrw3c+Xb9xVoGXEjKTT3LY1+9Ybu5aJYo5TVddhsNpUjosvtGcpTCDC3V8vCyLPxr6+iVk+biKiz8/iPPzU6XCsyycJVNGwVeKei8PofvR9SRlADgLilxL3kGkydObhoMjTRF8DOsVjZipkuIQ+H1zXe96ZdLXzDg3zh5qPyWkWOMYiSKBwxKkRJTgAFG9/b2K1s6e2teypMXjtD/y2eZUZUTXZY4qNYe9q61W+XrOzOSreGleuCGzu0wv5mONwXuU6xk20hU4OLaAyf2tskUX7VkS/eZA2iH7zdYtBT4B3ozytfe97tm4DNBS+ySpjHk9lLMUciwQUkRd/4kS0v8YrHIZRksy3Zt8vWlOklSlk0LF4tm64E3ltnV7UtGsnB7ssVC2myXqKXAt3RnlK9vtYC3+vAAF8FPoSopl2PhATWPllnUtsnmBDxs3C0Gnla+vnXnggGveSmBwINfNTq4c5e5xfbYqEvDm0iJ7XEYDBYhcMCkPd2J+9vSyjdvWnjgRV1j+bzGcpLKRHjvaPgcgIdZd1XWDLJYgEMKRFgvIs30FQAu6gMfOPKT2RzRjKII7XWN5agN3PFqgh5py8InpcdE4NPUsi1BsdeR9xS4ezB2HuWKAj/xk9lSqchmtLIhgFOxXWda+FyBe4MbbzDubAKL8S4u4CKXknYsfH2yXf7nD9+xYPnw+1/5UUHVNSMIuFkhEHC8/IkHe0wLHxahvbcixVN5VVfYaWgwcXJbuB8etljan89p0Wyw8CpwK3mVJOk4kf5p2x2dS5NWsNLK4+jMhPE3bx0q5nRHUmwLj7IDYQIvCUnxBj4e9D716osKuNjp6Uk72cKkkiBrEt3yHX3rYjLCIo2CMIjUrAwi66zrlgUKH3xzeilKgiyyinCqNCGyirX5Eb9JEnChoww4n+Uq++n429pUKW+IXIq5aLo0fL7AfYVlMVu42PFJSp1oSZzhdHoJTsYSpB2w1NGmEFniJEaSGLBhklfMxJWOzIy3LMO6VBe6b+UA+fu3XjWmNLUWymtV8AZnXOTDxU8dY6NSKbE8BaNkFNi0Vjaojq3Q3tD5fIB7M9Ze3XaeTBkMjS4eSbGAOzs+3XEgCSVBYnKMtMsKQVjCiThCSDdwLWNoArc2GnpiMTRetL4PwMwSVg+NakCqwHXGuMoMljMoE/pd0jVWKGhs1nQJrQ1lE3hIvdvLt3klxaviQd80tMiAi0IU9yZEexyRNimNOxUgmEg4QSRs7fhgxJD4KSSluqsTA5CotQEiDpE5wa4cisFlrsuM67zCixWDM0NnJYMyW07Uos4ryvyAu0N38+I+2m0trBQWkYZbxT+iHoWnrV17RYnjdkXBkqTglGRgLMlYRhgJ6OI9E1kTwGNgYAt0rArfqcqxElZCj1RVBZ3LnMqM00qZU2ZwAVtIib2JjA2Zm3v2c7Rwy7qDZMQ2ARk4MmhPNv/mgR3Rvw8lzFG4DC/FAi6qsey6lFiM4TjuQLJi4A7chhimSMEYyZggoeTmMLEFXRzMtHjnwNySFRWsKaCmf10BAVtjBhewxU9RJiFAm3IS8bAl5XHbSwl5jZBTg/Z0db9pb41FvExoMxt4YH14UA9W2ZtVY2gGQULPUymIGQwzIqE4kVAikQBGNKRUYTMsIfGqBTPrDa0XrMS/jV+nUzH/hpnCK1AGEdiIv6hM59hQTNg16w4dotXg5dseXPpqaZL8hQm82Yu4FCQdymoMzp3cNNjy76q1gQe+AdEcuPP6iZAWAV9EnpxoKAlJENWwTJWQWNCSyWStcDNGnJdqjWqwQmIyF79romjTNQvlqmRgRVg1mKDFPUUr/7HuXkz+yZ0PLXs6exq+kT0SALxavGPIkxvO0pF9gwvzVdg2cOsdn7PHp/e8+KNINdKews5aUaeMxOs/TtlyChLErp61JsAEYMqK41ZwjQq/kbt/io9LZQCsON7LXCC7DeWPr9oce+K6W5b86fCL8GJp1HeRFFVSFOjwiU2DUxEfmnk1q2ko53w9Bej4xPP7Ro+Mnwv9ovPmlbT2vYhFta5m3JXQi4t3M5NJKEEJxBNhWa71NpC9Dy/CdRSTOcfVnzPUfGKiLJSivy7Sjv731k/1jFGdDA5Xa8PrvBJJIllcyr5rvwI4L5IRT3IDF8/UwLSm8a++9LOpfReONi3pbQDuMDZ/q31eqyN3Km3tP5m5j6QzA0zTEFYULn6638FyxmK1reVMQnzvGztXkb++/tbOVakl8uD5/XC+5H2ThEh4lpRiFw9v+/3wOouIQMOaebwEzrkYkXgTOT5cmKqcmZnRJqaLRnV9C+vL//OYeIu5/l1PVyleDECv+9xTqFf9j65hJCkKr2/rd9GueAL3JTrlq9u6YiWg8PjoIThUyppSYhAwMFMme9rSE632QKIAasiucc5F4sl+114MNzADF+UC71WbUVqC/blheDJ7HPJMrwBIeWIk83ded0fucr5Z83LH0xRm9YsOFg3wfQDov8f3x0fYZAJUSSrrREK6JiGZSFQHwiQwFGroZUwoJxLlpTJVtP6CXbl6ubBacf7/A7kxJfsyNujOAAAAAElFTkSuQmCC"},22214:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return z}});var c=y(58289),_=y(75538),I=y(85458);function z(S,R,M){return R=(0,c.Z)(R),(0,I.Z)(S,(0,_.Z)()?Reflect.construct(R,M||[],(0,c.Z)(S).constructor):R.apply(S,M))}},19251:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(3208);function _(I,z){var S=typeof Symbol!="undefined"&&I[Symbol.iterator]||I["@@iterator"];if(!S){if(Array.isArray(I)||(S=(0,c.Z)(I))||z&&I&&typeof I.length=="number"){S&&(I=S);var R=0,M=function(){};return{s:M,n:function(){return R>=I.length?{done:!0}:{done:!1,value:I[R++]}},e:function(F){throw F},f:M}}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 N,D=!0,A=!1;return{s:function(){S=S.call(I)},n:function(){var F=S.next();return D=F.done,F},e:function(F){A=!0,N=F},f:function(){try{D||S.return==null||S.return()}finally{if(A)throw N}}}}},53754:function(bt,Et,y){"use strict";y.d(Et,{Sc:function(){return we},y3:function(){return A}});var c=y(49529);const _=c.XA,I=c.a_,z=c.yQ,S=c.Hs,R=c.Ec,M=c.dx,N=c.LU,D=c.Rm,A=c.y3,L=c.qK,F=c.pb,rt=c.j,G=c.sO,kt=c.BZ,ft=c.EK,J=c.Db,Rt=c.Fx,Tt=c.tU,Vt=c.Ym,fe=c.rs,ue=c.QR,Ce=c.TB,be=c.oH,we=c.Sc,ne=c.BN,We=c.it,rn=c.$r,Xe=c.QM,pn=c.AV;var Tn=(c.y3,c.y3);const $e=c.GH,mn=c.SO,It=c.uZ,Ee=c.yU,cn=c.F1,sn=c.re},96262:function(bt,Et,y){"use strict";y.d(Et,{Ud:function(){return G},Yy:function(){return I}});const c=Symbol("Comlink.proxy"),_=Symbol("Comlink.endpoint"),I=Symbol("Comlink.releaseProxy"),z=Symbol("Comlink.finalizer"),S=Symbol("Comlink.thrown"),R=$e=>typeof $e=="object"&&$e!==null||typeof $e=="function",M={canHandle:$e=>R($e)&&$e[c],serialize($e){const{port1:mn,port2:It}=new MessageChannel;return L($e,mn),[It,[It]]},deserialize($e){return $e.start(),G($e)}},N={canHandle:$e=>R($e)&&S in $e,serialize({value:$e}){let mn;return $e instanceof Error?mn={isError:!0,value:{message:$e.message,name:$e.name,stack:$e.stack}}:mn={isError:!1,value:$e},[mn,[]]},deserialize($e){throw $e.isError?Object.assign(new Error($e.value.message),$e.value):$e.value}},D=new Map([["proxy",M],["throw",N]]);function A($e,mn){for(const It of $e)if(mn===It||It==="*"||It instanceof RegExp&&It.test(mn))return!0;return!1}function L($e,mn=globalThis,It=["*"]){mn.addEventListener("message",function Ee(cn){if(!cn||!cn.data)return;if(!A(It,cn.origin)){console.warn(`Invalid origin '${cn.origin}' for comlink proxy`);return}const{id:sn,type:Pe,path:ze}=Object.assign({path:[]},cn.data),Ke=(cn.data.argumentList||[]).map(Xe);let le;try{const Ae=ze.slice(0,-1).reduce((wt,de)=>wt[de],$e),Pt=ze.reduce((wt,de)=>wt[de],$e);switch(Pe){case"GET":le=Pt;break;case"SET":Ae[ze.slice(-1)[0]]=Xe(cn.data.value),le=!0;break;case"APPLY":le=Pt.apply(Ae,Ke);break;case"CONSTRUCT":{const wt=new Pt(...Ke);le=ne(wt)}break;case"ENDPOINT":{const{port1:wt,port2:de}=new MessageChannel;L($e,de),le=we(wt,[wt])}break;case"RELEASE":le=void 0;break;default:return}}catch(Ae){le={value:Ae,[S]:0}}Promise.resolve(le).catch(Ae=>({value:Ae,[S]:0})).then(Ae=>{const[Pt,wt]=rn(Ae);mn.postMessage(Object.assign(Object.assign({},Pt),{id:sn}),wt),Pe==="RELEASE"&&(mn.removeEventListener("message",Ee),rt(mn),z in $e&&typeof $e[z]=="function"&&$e[z]())}).catch(Ae=>{const[Pt,wt]=rn({value:new TypeError("Unserializable return value"),[S]:0});mn.postMessage(Object.assign(Object.assign({},Pt),{id:sn}),wt)})}),mn.start&&mn.start()}function F($e){return $e.constructor.name==="MessagePort"}function rt($e){F($e)&&$e.close()}function G($e,mn){const It=new Map;return $e.addEventListener("message",function(cn){const{data:sn}=cn;if(!sn||!sn.id)return;const Pe=It.get(sn.id);if(Pe)try{Pe(sn)}finally{It.delete(sn.id)}}),fe($e,It,[],mn)}function kt($e){if($e)throw new Error("Proxy has been released and is not useable")}function ft($e){return pn($e,new Map,{type:"RELEASE"}).then(()=>{rt($e)})}const J=new WeakMap,Rt="FinalizationRegistry"in globalThis&&new FinalizationRegistry($e=>{const mn=(J.get($e)||0)-1;J.set($e,mn),mn===0&&ft($e)});function Tt($e,mn){const It=(J.get(mn)||0)+1;J.set(mn,It),Rt&&Rt.register($e,mn,$e)}function Vt($e){Rt&&Rt.unregister($e)}function fe($e,mn,It=[],Ee=function(){}){let cn=!1;const sn=new Proxy(Ee,{get(Pe,ze){if(kt(cn),ze===I)return()=>{Vt(sn),ft($e),mn.clear(),cn=!0};if(ze==="then"){if(It.length===0)return{then:()=>sn};const Ke=pn($e,mn,{type:"GET",path:It.map(le=>le.toString())}).then(Xe);return Ke.then.bind(Ke)}return fe($e,mn,[...It,ze])},set(Pe,ze,Ke){kt(cn);const[le,Ae]=rn(Ke);return pn($e,mn,{type:"SET",path:[...It,ze].map(Pt=>Pt.toString()),value:le},Ae).then(Xe)},apply(Pe,ze,Ke){kt(cn);const le=It[It.length-1];if(le===_)return pn($e,mn,{type:"ENDPOINT"}).then(Xe);if(le==="bind")return fe($e,mn,It.slice(0,-1));const[Ae,Pt]=Ce(Ke);return pn($e,mn,{type:"APPLY",path:It.map(wt=>wt.toString()),argumentList:Ae},Pt).then(Xe)},construct(Pe,ze){kt(cn);const[Ke,le]=Ce(ze);return pn($e,mn,{type:"CONSTRUCT",path:It.map(Ae=>Ae.toString()),argumentList:Ke},le).then(Xe)}});return Tt(sn,$e),sn}function ue($e){return Array.prototype.concat.apply([],$e)}function Ce($e){const mn=$e.map(rn);return[mn.map(It=>It[0]),ue(mn.map(It=>It[1]))]}const be=new WeakMap;function we($e,mn){return be.set($e,mn),$e}function ne($e){return Object.assign($e,{[c]:!0})}function We($e,mn=globalThis,It="*"){return{postMessage:(Ee,cn)=>$e.postMessage(Ee,It,cn),addEventListener:mn.addEventListener.bind(mn),removeEventListener:mn.removeEventListener.bind(mn)}}function rn($e){for(const[mn,It]of D)if(It.canHandle($e)){const[Ee,cn]=It.serialize($e);return[{type:"HANDLER",name:mn,value:Ee},cn]}return[{type:"RAW",value:$e},be.get($e)||[]]}function Xe($e){switch($e.type){case"HANDLER":return D.get($e.name).deserialize($e.value);case"RAW":return $e.value}}function pn($e,mn,It,Ee){return new Promise(cn=>{const sn=Tn();mn.set(sn,cn),$e.start&&$e.start(),$e.postMessage(Object.assign({id:sn},It),Ee)})}function Tn(){return new Array(4).fill(0).map(()=>Math.floor(Math.random()*Number.MAX_SAFE_INTEGER).toString(16)).join("-")}},32575:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_,I){var z,S=1;_==null&&(_=0),I==null&&(I=0);function R(){var M,N=z.length,D,A=0,L=0;for(M=0;M<N;++M)D=z[M],A+=D.x,L+=D.y;for(A=(A/N-_)*S,L=(L/N-I)*S,M=0;M<N;++M)D=z[M],D.x-=A,D.y-=L}return R.initialize=function(M){z=M},R.x=function(M){return arguments.length?(_=+M,R):_},R.y=function(M){return arguments.length?(I=+M,R):I},R.strength=function(M){return arguments.length?(S=+M,R):S},R}},33039:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return R}});var c=y(14301),_=y(91592),I=y(12068);function z(M){return M.x+M.vx}function S(M){return M.y+M.vy}function R(M){var N,D,A,L=1,F=1;typeof M!="function"&&(M=(0,_.Z)(M==null?1:+M));function rt(){for(var ft,J=N.length,Rt,Tt,Vt,fe,ue,Ce,be=0;be<F;++be)for(Rt=(0,c.Z)(N,z,S).visitAfter(G),ft=0;ft<J;++ft)Tt=N[ft],ue=D[Tt.index],Ce=ue*ue,Vt=Tt.x+Tt.vx,fe=Tt.y+Tt.vy,Rt.visit(we);function we(ne,We,rn,Xe,pn){var Tn=ne.data,$e=ne.r,mn=ue+$e;if(Tn){if(Tn.index>Tt.index){var It=Vt-Tn.x-Tn.vx,Ee=fe-Tn.y-Tn.vy,cn=It*It+Ee*Ee;cn<mn*mn&&(It===0&&(It=(0,I.Z)(A),cn+=It*It),Ee===0&&(Ee=(0,I.Z)(A),cn+=Ee*Ee),cn=(mn-(cn=Math.sqrt(cn)))/cn*L,Tt.vx+=(It*=cn)*(mn=($e*=$e)/(Ce+$e)),Tt.vy+=(Ee*=cn)*mn,Tn.vx-=It*(mn=1-mn),Tn.vy-=Ee*mn)}return}return We>Vt+mn||Xe<Vt-mn||rn>fe+mn||pn<fe-mn}}function G(ft){if(ft.data)return ft.r=D[ft.data.index];for(var J=ft.r=0;J<4;++J)ft[J]&&ft[J].r>ft.r&&(ft.r=ft[J].r)}function kt(){if(N){var ft,J=N.length,Rt;for(D=new Array(J),ft=0;ft<J;++ft)Rt=N[ft],D[Rt.index]=+M(Rt,ft,N)}}return rt.initialize=function(ft,J){N=ft,A=J,kt()},rt.iterations=function(ft){return arguments.length?(F=+ft,rt):F},rt.strength=function(ft){return arguments.length?(L=+ft,rt):L},rt.radius=function(ft){return arguments.length?(M=typeof ft=="function"?ft:(0,_.Z)(+ft),kt(),rt):M},rt}},91592:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return function(){return _}}},12068:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return c}});function c(_){return(_()-.5)*1e-6}},42398:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return z}});const c=1664525,_=1013904223,I=4294967296;function z(){let S=1;return()=>(S=(c*S+_)%I)/I}},31136:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return S}});var c=y(91592),_=y(12068);function I(R){return R.index}function z(R,M){var N=R.get(M);if(!N)throw new Error("node not found: "+M);return N}function S(R){var M=I,N=J,D,A=(0,c.Z)(30),L,F,rt,G,kt,ft=1;R==null&&(R=[]);function J(ue){return 1/Math.min(rt[ue.source.index],rt[ue.target.index])}function Rt(ue){for(var Ce=0,be=R.length;Ce<ft;++Ce)for(var we=0,ne,We,rn,Xe,pn,Tn,$e;we<be;++we)ne=R[we],We=ne.source,rn=ne.target,Xe=rn.x+rn.vx-We.x-We.vx||(0,_.Z)(kt),pn=rn.y+rn.vy-We.y-We.vy||(0,_.Z)(kt),Tn=Math.sqrt(Xe*Xe+pn*pn),Tn=(Tn-L[we])/Tn*ue*D[we],Xe*=Tn,pn*=Tn,rn.vx-=Xe*($e=G[we]),rn.vy-=pn*$e,We.vx+=Xe*($e=1-$e),We.vy+=pn*$e}function Tt(){if(F){var ue,Ce=F.length,be=R.length,we=new Map(F.map((We,rn)=>[M(We,rn,F),We])),ne;for(ue=0,rt=new Array(Ce);ue<be;++ue)ne=R[ue],ne.index=ue,typeof ne.source!="object"&&(ne.source=z(we,ne.source)),typeof ne.target!="object"&&(ne.target=z(we,ne.target)),rt[ne.source.index]=(rt[ne.source.index]||0)+1,rt[ne.target.index]=(rt[ne.target.index]||0)+1;for(ue=0,G=new Array(be);ue<be;++ue)ne=R[ue],G[ue]=rt[ne.source.index]/(rt[ne.source.index]+rt[ne.target.index]);D=new Array(be),Vt(),L=new Array(be),fe()}}function Vt(){if(F)for(var ue=0,Ce=R.length;ue<Ce;++ue)D[ue]=+N(R[ue],ue,R)}function fe(){if(F)for(var ue=0,Ce=R.length;ue<Ce;++ue)L[ue]=+A(R[ue],ue,R)}return Rt.initialize=function(ue,Ce){F=ue,kt=Ce,Tt()},Rt.links=function(ue){return arguments.length?(R=ue,Tt(),Rt):R},Rt.id=function(ue){return arguments.length?(M=ue,Rt):M},Rt.iterations=function(ue){return arguments.length?(ft=+ue,Rt):ft},Rt.strength=function(ue){return arguments.length?(N=typeof ue=="function"?ue:(0,c.Z)(+ue),Vt(),Rt):N},Rt.distance=function(ue){return arguments.length?(A=typeof ue=="function"?ue:(0,c.Z)(+ue),fe(),Rt):A},Rt}},84365:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return S}});var c=y(14301),_=y(91592),I=y(12068),z=y(74515);function S(){var R,M,N,D,A=(0,_.Z)(-30),L,F=1,rt=1/0,G=.81;function kt(Tt){var Vt,fe=R.length,ue=(0,c.Z)(R,z.x,z.y).visitAfter(J);for(D=Tt,Vt=0;Vt<fe;++Vt)M=R[Vt],ue.visit(Rt)}function ft(){if(R){var Tt,Vt=R.length,fe;for(L=new Array(Vt),Tt=0;Tt<Vt;++Tt)fe=R[Tt],L[fe.index]=+A(fe,Tt,R)}}function J(Tt){var Vt=0,fe,ue,Ce=0,be,we,ne;if(Tt.length){for(be=we=ne=0;ne<4;++ne)(fe=Tt[ne])&&(ue=Math.abs(fe.value))&&(Vt+=fe.value,Ce+=ue,be+=ue*fe.x,we+=ue*fe.y);Tt.x=be/Ce,Tt.y=we/Ce}else{fe=Tt,fe.x=fe.data.x,fe.y=fe.data.y;do Vt+=L[fe.data.index];while(fe=fe.next)}Tt.value=Vt}function Rt(Tt,Vt,fe,ue){if(!Tt.value)return!0;var Ce=Tt.x-M.x,be=Tt.y-M.y,we=ue-Vt,ne=Ce*Ce+be*be;if(we*we/G<ne)return ne<rt&&(Ce===0&&(Ce=(0,I.Z)(N),ne+=Ce*Ce),be===0&&(be=(0,I.Z)(N),ne+=be*be),ne<F&&(ne=Math.sqrt(F*ne)),M.vx+=Ce*Tt.value*D/ne,M.vy+=be*Tt.value*D/ne),!0;if(Tt.length||ne>=rt)return;(Tt.data!==M||Tt.next)&&(Ce===0&&(Ce=(0,I.Z)(N),ne+=Ce*Ce),be===0&&(be=(0,I.Z)(N),ne+=be*be),ne<F&&(ne=Math.sqrt(F*ne)));do Tt.data!==M&&(we=L[Tt.data.index]*D/ne,M.vx+=Ce*we,M.vy+=be*we);while(Tt=Tt.next)}return kt.initialize=function(Tt,Vt){R=Tt,N=Vt,ft()},kt.strength=function(Tt){return arguments.length?(A=typeof Tt=="function"?Tt:(0,_.Z)(+Tt),ft(),kt):A},kt.distanceMin=function(Tt){return arguments.length?(F=Tt*Tt,kt):Math.sqrt(F)},kt.distanceMax=function(Tt){return arguments.length?(rt=Tt*Tt,kt):Math.sqrt(rt)},kt.theta=function(Tt){return arguments.length?(G=Tt*Tt,kt):Math.sqrt(G)},kt}},54774:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(91592);function _(I,z,S){var R,M=(0,c.Z)(.1),N,D;typeof I!="function"&&(I=(0,c.Z)(+I)),z==null&&(z=0),S==null&&(S=0);function A(F){for(var rt=0,G=R.length;rt<G;++rt){var kt=R[rt],ft=kt.x-z||1e-6,J=kt.y-S||1e-6,Rt=Math.sqrt(ft*ft+J*J),Tt=(D[rt]-Rt)*N[rt]*F/Rt;kt.vx+=ft*Tt,kt.vy+=J*Tt}}function L(){if(R){var F,rt=R.length;for(N=new Array(rt),D=new Array(rt),F=0;F<rt;++F)D[F]=+I(R[F],F,R),N[F]=isNaN(D[F])?0:+M(R[F],F,R)}}return A.initialize=function(F){R=F,L()},A.strength=function(F){return arguments.length?(M=typeof F=="function"?F:(0,c.Z)(+F),L(),A):M},A.radius=function(F){return arguments.length?(I=typeof F=="function"?F:(0,c.Z)(+F),L(),A):I},A.x=function(F){return arguments.length?(z=+F,A):z},A.y=function(F){return arguments.length?(S=+F,A):S},A}},74515:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return N},x:function(){return z},y:function(){return S}});var c=y(27625),_=y(83833),I=y(42398);function z(D){return D.x}function S(D){return D.y}var R=10,M=Math.PI*(3-Math.sqrt(5));function N(D){var A,L=1,F=.001,rt=1-Math.pow(F,1/300),G=0,kt=.6,ft=new Map,J=(0,_.HT)(Vt),Rt=(0,c.Z)("tick","end"),Tt=(0,I.Z)();D==null&&(D=[]);function Vt(){fe(),Rt.call("tick",A),L<F&&(J.stop(),Rt.call("end",A))}function fe(be){var we,ne=D.length,We;be===void 0&&(be=1);for(var rn=0;rn<be;++rn)for(L+=(G-L)*rt,ft.forEach(function(Xe){Xe(L)}),we=0;we<ne;++we)We=D[we],We.fx==null?We.x+=We.vx*=kt:(We.x=We.fx,We.vx=0),We.fy==null?We.y+=We.vy*=kt:(We.y=We.fy,We.vy=0);return A}function ue(){for(var be=0,we=D.length,ne;be<we;++be){if(ne=D[be],ne.index=be,ne.fx!=null&&(ne.x=ne.fx),ne.fy!=null&&(ne.y=ne.fy),isNaN(ne.x)||isNaN(ne.y)){var We=R*Math.sqrt(.5+be),rn=be*M;ne.x=We*Math.cos(rn),ne.y=We*Math.sin(rn)}(isNaN(ne.vx)||isNaN(ne.vy))&&(ne.vx=ne.vy=0)}}function Ce(be){return be.initialize&&be.initialize(D,Tt),be}return ue(),A={tick:fe,restart:function(){return J.restart(Vt),A},stop:function(){return J.stop(),A},nodes:function(be){return arguments.length?(D=be,ue(),ft.forEach(Ce),A):D},alpha:function(be){return arguments.length?(L=+be,A):L},alphaMin:function(be){return arguments.length?(F=+be,A):F},alphaDecay:function(be){return arguments.length?(rt=+be,A):+rt},alphaTarget:function(be){return arguments.length?(G=+be,A):G},velocityDecay:function(be){return arguments.length?(kt=1-be,A):1-kt},randomSource:function(be){return arguments.length?(Tt=be,ft.forEach(Ce),A):Tt},force:function(be,we){return arguments.length>1?(we==null?ft.delete(be):ft.set(be,Ce(we)),A):ft.get(be)},find:function(be,we,ne){var We=0,rn=D.length,Xe,pn,Tn,$e,mn;for(ne==null?ne=1/0:ne*=ne,We=0;We<rn;++We)$e=D[We],Xe=be-$e.x,pn=we-$e.y,Tn=Xe*Xe+pn*pn,Tn<ne&&(mn=$e,ne=Tn);return mn},on:function(be,we){return arguments.length>1?(Rt.on(be,we),A):Rt.on(be)}}}},34123:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(91592);function _(I){var z=(0,c.Z)(.1),S,R,M;typeof I!="function"&&(I=(0,c.Z)(I==null?0:+I));function N(A){for(var L=0,F=S.length,rt;L<F;++L)rt=S[L],rt.vx+=(M[L]-rt.x)*R[L]*A}function D(){if(S){var A,L=S.length;for(R=new Array(L),M=new Array(L),A=0;A<L;++A)R[A]=isNaN(M[A]=+I(S[A],A,S))?0:+z(S[A],A,S)}}return N.initialize=function(A){S=A,D()},N.strength=function(A){return arguments.length?(z=typeof A=="function"?A:(0,c.Z)(+A),D(),N):z},N.x=function(A){return arguments.length?(I=typeof A=="function"?A:(0,c.Z)(+A),D(),N):I},N}},97468:function(bt,Et,y){"use strict";y.d(Et,{Z:function(){return _}});var c=y(91592);function _(I){var z=(0,c.Z)(.1),S,R,M;typeof I!="function"&&(I=(0,c.Z)(I==null?0:+I));function N(A){for(var L=0,F=S.length,rt;L<F;++L)rt=S[L],rt.vy+=(M[L]-rt.y)*R[L]*A}function D(){if(S){var A,L=S.length;for(R=new Array(L),M=new Array(L),A=0;A<L;++A)R[A]=isNaN(M[A]=+I(S[A],A,S))?0:+z(S[A],A,S)}}return N.initialize=function(A){S=A,D()},N.strength=function(A){return arguments.length?(z=typeof A=="function"?A:(0,c.Z)(+A),D(),N):z},N.y=function(A){return arguments.length?(I=typeof A=="function"?A:(0,c.Z)(+A),D(),N):I},N}},80813:function(bt,Et,y){"use strict";y.d(Et,{CR:function(){return J},Jh:function(){return rt},Q_:function(){return pn},XA:function(){return ft},ZT:function(){return _},_T:function(){return z},ev:function(){return Vt},mG:function(){return F},pi:function(){return I},pr:function(){return Tt}});var c=function(Pe,ze){return c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Ke,le){Ke.__proto__=le}||function(Ke,le){for(var Ae in le)Object.prototype.hasOwnProperty.call(le,Ae)&&(Ke[Ae]=le[Ae])},c(Pe,ze)};function _(Pe,ze){if(typeof ze!="function"&&ze!==null)throw new TypeError("Class extends value "+String(ze)+" is not a constructor or null");c(Pe,ze);function Ke(){this.constructor=Pe}Pe.prototype=ze===null?Object.create(ze):(Ke.prototype=ze.prototype,new Ke)}var I=function(){return I=Object.assign||function(ze){for(var Ke,le=1,Ae=arguments.length;le<Ae;le++){Ke=arguments[le];for(var Pt in Ke)Object.prototype.hasOwnProperty.call(Ke,Pt)&&(ze[Pt]=Ke[Pt])}return ze},I.apply(this,arguments)};function z(Pe,ze){var Ke={};for(var le in Pe)Object.prototype.hasOwnProperty.call(Pe,le)&&ze.indexOf(le)<0&&(Ke[le]=Pe[le]);if(Pe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ae=0,le=Object.getOwnPropertySymbols(Pe);Ae<le.length;Ae++)ze.indexOf(le[Ae])<0&&Object.prototype.propertyIsEnumerable.call(Pe,le[Ae])&&(Ke[le[Ae]]=Pe[le[Ae]]);return Ke}function S(Pe,ze,Ke,le){var Ae=arguments.length,Pt=Ae<3?ze:le===null?le=Object.getOwnPropertyDescriptor(ze,Ke):le,wt;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Pt=Reflect.decorate(Pe,ze,Ke,le);else for(var de=Pe.length-1;de>=0;de--)(wt=Pe[de])&&(Pt=(Ae<3?wt(Pt):Ae>3?wt(ze,Ke,Pt):wt(ze,Ke))||Pt);return Ae>3&&Pt&&Object.defineProperty(ze,Ke,Pt),Pt}function R(Pe,ze){return function(Ke,le){ze(Ke,le,Pe)}}function M(Pe,ze,Ke,le,Ae,Pt){function wt(st){if(st!==void 0&&typeof st!="function")throw new TypeError("Function expected");return st}for(var de=le.kind,je=de==="getter"?"get":de==="setter"?"set":"value",Re=!ze&&Pe?le.static?Pe:Pe.prototype:null,ce=ze||(Re?Object.getOwnPropertyDescriptor(Re,le.name):{}),Le,xe=!1,Ft=Ke.length-1;Ft>=0;Ft--){var re={};for(var Me in le)re[Me]=Me==="access"?{}:le[Me];for(var Me in le.access)re.access[Me]=le.access[Me];re.addInitializer=function(st){if(xe)throw new TypeError("Cannot add initializers after decoration has completed");Pt.push(wt(st||null))};var O=(0,Ke[Ft])(de==="accessor"?{get:ce.get,set:ce.set}:ce[je],re);if(de==="accessor"){if(O===void 0)continue;if(O===null||typeof O!="object")throw new TypeError("Object expected");(Le=wt(O.get))&&(ce.get=Le),(Le=wt(O.set))&&(ce.set=Le),(Le=wt(O.init))&&Ae.unshift(Le)}else(Le=wt(O))&&(de==="field"?Ae.unshift(Le):ce[je]=Le)}Re&&Object.defineProperty(Re,le.name,ce),xe=!0}function N(Pe,ze,Ke){for(var le=arguments.length>2,Ae=0;Ae<ze.length;Ae++)Ke=le?ze[Ae].call(Pe,Ke):ze[Ae].call(Pe);return le?Ke:void 0}function D(Pe){return typeof Pe=="symbol"?Pe:"".concat(Pe)}function A(Pe,ze,Ke){return typeof ze=="symbol"&&(ze=ze.description?"[".concat(ze.description,"]"):""),Object.defineProperty(Pe,"name",{configurable:!0,value:Ke?"".concat(Ke," ",ze):ze})}function L(Pe,ze){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(Pe,ze)}function F(Pe,ze,Ke,le){function Ae(Pt){return Pt instanceof Ke?Pt:new Ke(function(wt){wt(Pt)})}return new(Ke||(Ke=Promise))(function(Pt,wt){function de(ce){try{Re(le.next(ce))}catch(Le){wt(Le)}}function je(ce){try{Re(le.throw(ce))}catch(Le){wt(Le)}}function Re(ce){ce.done?Pt(ce.value):Ae(ce.value).then(de,je)}Re((le=le.apply(Pe,ze||[])).next())})}function rt(Pe,ze){var Ke={label:0,sent:function(){if(Pt[0]&1)throw Pt[1];return Pt[1]},trys:[],ops:[]},le,Ae,Pt,wt=Object.create((typeof Iterator=="function"?Iterator:Object).prototype);return wt.next=de(0),wt.throw=de(1),wt.return=de(2),typeof Symbol=="function"&&(wt[Symbol.iterator]=function(){return this}),wt;function de(Re){return function(ce){return je([Re,ce])}}function je(Re){if(le)throw new TypeError("Generator is already executing.");for(;wt&&(wt=0,Re[0]&&(Ke=0)),Ke;)try{if(le=1,Ae&&(Pt=Re[0]&2?Ae.return:Re[0]?Ae.throw||((Pt=Ae.return)&&Pt.call(Ae),0):Ae.next)&&!(Pt=Pt.call(Ae,Re[1])).done)return Pt;switch(Ae=0,Pt&&(Re=[Re[0]&2,Pt.value]),Re[0]){case 0:case 1:Pt=Re;break;case 4:return Ke.label++,{value:Re[1],done:!1};case 5:Ke.label++,Ae=Re[1],Re=[0];continue;case 7:Re=Ke.ops.pop(),Ke.trys.pop();continue;default:if(Pt=Ke.trys,!(Pt=Pt.length>0&&Pt[Pt.length-1])&&(Re[0]===6||Re[0]===2)){Ke=0;continue}if(Re[0]===3&&(!Pt||Re[1]>Pt[0]&&Re[1]<Pt[3])){Ke.label=Re[1];break}if(Re[0]===6&&Ke.label<Pt[1]){Ke.label=Pt[1],Pt=Re;break}if(Pt&&Ke.label<Pt[2]){Ke.label=Pt[2],Ke.ops.push(Re);break}Pt[2]&&Ke.ops.pop(),Ke.trys.pop();continue}Re=ze.call(Pe,Ke)}catch(ce){Re=[6,ce],Ae=0}finally{le=Pt=0}if(Re[0]&5)throw Re[1];return{value:Re[0]?Re[1]:void 0,done:!0}}}var G=Object.create?function(Pe,ze,Ke,le){le===void 0&&(le=Ke);var Ae=Object.getOwnPropertyDescriptor(ze,Ke);(!Ae||("get"in Ae?!ze.__esModule:Ae.writable||Ae.configurable))&&(Ae={enumerable:!0,get:function(){return ze[Ke]}}),Object.defineProperty(Pe,le,Ae)}:function(Pe,ze,Ke,le){le===void 0&&(le=Ke),Pe[le]=ze[Ke]};function kt(Pe,ze){for(var Ke in Pe)Ke!=="default"&&!Object.prototype.hasOwnProperty.call(ze,Ke)&&G(ze,Pe,Ke)}function ft(Pe){var ze=typeof Symbol=="function"&&Symbol.iterator,Ke=ze&&Pe[ze],le=0;if(Ke)return Ke.call(Pe);if(Pe&&typeof Pe.length=="number")return{next:function(){return Pe&&le>=Pe.length&&(Pe=void 0),{value:Pe&&Pe[le++],done:!Pe}}};throw new TypeError(ze?"Object is not iterable.":"Symbol.iterator is not defined.")}function J(Pe,ze){var Ke=typeof Symbol=="function"&&Pe[Symbol.iterator];if(!Ke)return Pe;var le=Ke.call(Pe),Ae,Pt=[],wt;try{for(;(ze===void 0||ze-- >0)&&!(Ae=le.next()).done;)Pt.push(Ae.value)}catch(de){wt={error:de}}finally{try{Ae&&!Ae.done&&(Ke=le.return)&&Ke.call(le)}finally{if(wt)throw wt.error}}return Pt}function Rt(){for(var Pe=[],ze=0;ze<arguments.length;ze++)Pe=Pe.concat(J(arguments[ze]));return Pe}function Tt(){for(var Pe=0,ze=0,Ke=arguments.length;ze<Ke;ze++)Pe+=arguments[ze].length;for(var le=Array(Pe),Ae=0,ze=0;ze<Ke;ze++)for(var Pt=arguments[ze],wt=0,de=Pt.length;wt<de;wt++,Ae++)le[Ae]=Pt[wt];return le}function Vt(Pe,ze,Ke){if(Ke||arguments.length===2)for(var le=0,Ae=ze.length,Pt;le<Ae;le++)(Pt||!(le in ze))&&(Pt||(Pt=Array.prototype.slice.call(ze,0,le)),Pt[le]=ze[le]);return Pe.concat(Pt||Array.prototype.slice.call(ze))}function fe(Pe){return this instanceof fe?(this.v=Pe,this):new fe(Pe)}function ue(Pe,ze,Ke){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var le=Ke.apply(Pe,ze||[]),Ae,Pt=[];return Ae=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),de("next"),de("throw"),de("return",wt),Ae[Symbol.asyncIterator]=function(){return this},Ae;function wt(Ft){return function(re){return Promise.resolve(re).then(Ft,Le)}}function de(Ft,re){le[Ft]&&(Ae[Ft]=function(Me){return new Promise(function(O,st){Pt.push([Ft,Me,O,st])>1||je(Ft,Me)})},re&&(Ae[Ft]=re(Ae[Ft])))}function je(Ft,re){try{Re(le[Ft](re))}catch(Me){xe(Pt[0][3],Me)}}function Re(Ft){Ft.value instanceof fe?Promise.resolve(Ft.value.v).then(ce,Le):xe(Pt[0][2],Ft)}function ce(Ft){je("next",Ft)}function Le(Ft){je("throw",Ft)}function xe(Ft,re){Ft(re),Pt.shift(),Pt.length&&je(Pt[0][0],Pt[0][1])}}function Ce(Pe){var ze,Ke;return ze={},le("next"),le("throw",function(Ae){throw Ae}),le("return"),ze[Symbol.iterator]=function(){return this},ze;function le(Ae,Pt){ze[Ae]=Pe[Ae]?function(wt){return(Ke=!Ke)?{value:fe(Pe[Ae](wt)),done:!1}:Pt?Pt(wt):wt}:Pt}}function be(Pe){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var ze=Pe[Symbol.asyncIterator],Ke;return ze?ze.call(Pe):(Pe=typeof ft=="function"?ft(Pe):Pe[Symbol.iterator](),Ke={},le("next"),le("throw"),le("return"),Ke[Symbol.asyncIterator]=function(){return this},Ke);function le(Pt){Ke[Pt]=Pe[Pt]&&function(wt){return new Promise(function(de,je){wt=Pe[Pt](wt),Ae(de,je,wt.done,wt.value)})}}function Ae(Pt,wt,de,je){Promise.resolve(je).then(function(Re){Pt({value:Re,done:de})},wt)}}function we(Pe,ze){return Object.defineProperty?Object.defineProperty(Pe,"raw",{value:ze}):Pe.raw=ze,Pe}var ne=Object.create?function(Pe,ze){Object.defineProperty(Pe,"default",{enumerable:!0,value:ze})}:function(Pe,ze){Pe.default=ze},We=function(Pe){return We=Object.getOwnPropertyNames||function(ze){var Ke=[];for(var le in ze)Object.prototype.hasOwnProperty.call(ze,le)&&(Ke[Ke.length]=le);return Ke},We(Pe)};function rn(Pe){if(Pe&&Pe.__esModule)return Pe;var ze={};if(Pe!=null)for(var Ke=We(Pe),le=0;le<Ke.length;le++)Ke[le]!=="default"&&G(ze,Pe,Ke[le]);return ne(ze,Pe),ze}function Xe(Pe){return Pe&&Pe.__esModule?Pe:{default:Pe}}function pn(Pe,ze,Ke,le){if(Ke==="a"&&!le)throw new TypeError("Private accessor was defined without a getter");if(typeof ze=="function"?Pe!==ze||!le:!ze.has(Pe))throw new TypeError("Cannot read private member from an object whose class did not declare it");return Ke==="m"?le:Ke==="a"?le.call(Pe):le?le.value:ze.get(Pe)}function Tn(Pe,ze,Ke,le,Ae){if(le==="m")throw new TypeError("Private method is not writable");if(le==="a"&&!Ae)throw new TypeError("Private accessor was defined without a setter");if(typeof ze=="function"?Pe!==ze||!Ae:!ze.has(Pe))throw new TypeError("Cannot write private member to an object whose class did not declare it");return le==="a"?Ae.call(Pe,Ke):Ae?Ae.value=Ke:ze.set(Pe,Ke),Ke}function $e(Pe,ze){if(ze===null||typeof ze!="object"&&typeof ze!="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof Pe=="function"?ze===Pe:Pe.has(ze)}function mn(Pe,ze,Ke){if(ze!=null){if(typeof ze!="object"&&typeof ze!="function")throw new TypeError("Object expected.");var le,Ae;if(Ke){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");le=ze[Symbol.asyncDispose]}if(le===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");le=ze[Symbol.dispose],Ke&&(Ae=le)}if(typeof le!="function")throw new TypeError("Object not disposable.");Ae&&(le=function(){try{Ae.call(this)}catch(Pt){return Promise.reject(Pt)}}),Pe.stack.push({value:ze,dispose:le,async:Ke})}else Ke&&Pe.stack.push({async:!0});return ze}var It=typeof SuppressedError=="function"?SuppressedError:function(Pe,ze,Ke){var le=new Error(Ke);return le.name="SuppressedError",le.error=Pe,le.suppressed=ze,le};function Ee(Pe){function ze(Pt){Pe.error=Pe.hasError?new It(Pt,Pe.error,"An error was suppressed during disposal."):Pt,Pe.hasError=!0}var Ke,le=0;function Ae(){for(;Ke=Pe.stack.pop();)try{if(!Ke.async&&le===1)return le=0,Pe.stack.push(Ke),Promise.resolve().then(Ae);if(Ke.dispose){var Pt=Ke.dispose.call(Ke.value);if(Ke.async)return le|=2,Promise.resolve(Pt).then(Ae,function(wt){return ze(wt),Ae()})}else le|=1}catch(wt){ze(wt)}if(le===1)return Pe.hasError?Promise.reject(Pe.error):Promise.resolve();if(Pe.hasError)throw Pe.error}return Ae()}function cn(Pe,ze){return typeof Pe=="string"&&/^\.\.?\//.test(Pe)?Pe.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(Ke,le,Ae,Pt,wt){return le?ze?".jsx":".js":Ae&&(!Pt||!wt)?Ke:Ae+Pt+"."+wt.toLowerCase()+"js"}):Pe}var sn={__extends:_,__assign:I,__rest:z,__decorate:S,__param:R,__esDecorate:M,__runInitializers:N,__propKey:D,__setFunctionName:A,__metadata:L,__awaiter:F,__generator:rt,__createBinding:G,__exportStar:kt,__values:ft,__read:J,__spread:Rt,__spreadArrays:Tt,__spreadArray:Vt,__await:fe,__asyncGenerator:ue,__asyncDelegator:Ce,__asyncValues:be,__makeTemplateObject:we,__importStar:rn,__importDefault:Xe,__classPrivateFieldGet:pn,__classPrivateFieldSet:Tn,__classPrivateFieldIn:$e,__addDisposableResource:mn,__disposeResources:Ee,__rewriteRelativeImportExtension:cn}}}]);
|
|
|
}()); |